@cubejs-backend/server-core 1.7.39 → 1.7.41

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 (197) hide show
  1. package/package.json +13 -13
  2. package/playground/assets/index-C6co9ASN.js +2138 -0
  3. package/playground/index.html +2 -10
  4. package/playground/vizard/assets/abap-CRCWOmpq.js +1 -0
  5. package/playground/vizard/assets/apex-DnsZk_dE.js +1 -0
  6. package/playground/vizard/assets/azcli-1IWB1ccx.js +1 -0
  7. package/playground/vizard/assets/bat-DPkNLes8.js +1 -0
  8. package/playground/vizard/assets/{bicep-DJPqIr_M.js → bicep-Corcdgou.js} +1 -6
  9. package/playground/vizard/assets/cameligo-CGrWLZr3.js +1 -0
  10. package/playground/vizard/assets/clients-CxGQtFsu.js +1 -0
  11. package/playground/vizard/assets/clojure-D9WOWImG.js +1 -0
  12. package/playground/vizard/assets/coffee-B7EJu28W.js +1 -0
  13. package/playground/vizard/assets/cpp-BaF-TIV3.js +1 -0
  14. package/playground/vizard/assets/csharp-BoL64M5l.js +1 -0
  15. package/playground/vizard/assets/csp-C46ZqvIl.js +1 -0
  16. package/playground/vizard/assets/{css-CkCHETKw.js → css-DQU6DXDx.js} +1 -6
  17. package/playground/vizard/assets/{css.worker-CJ81phlL.js → css.worker-C3oFsChe.js} +23 -28
  18. package/playground/vizard/assets/cssMode-DtHNIdrr.js +4 -0
  19. package/playground/vizard/assets/cypher-D84EuPTj.js +1 -0
  20. package/playground/vizard/assets/dart-D8lhlL1r.js +1 -0
  21. package/playground/vizard/assets/dockerfile-DLk6rpji.js +1 -0
  22. package/playground/vizard/assets/ecl-BO6FnfXk.js +1 -0
  23. package/playground/vizard/assets/editor.worker-CHAQ398o.js +11 -0
  24. package/playground/vizard/assets/elixir-BRjLKONM.js +1 -0
  25. package/playground/vizard/assets/flow9-Cac8vKd7.js +1 -0
  26. package/playground/vizard/assets/{freemarker2-BjRjUUgK.js → freemarker2-D3hRPg66.js} +3 -8
  27. package/playground/vizard/assets/fsharp-fd1GTHhf.js +1 -0
  28. package/playground/vizard/assets/go-O9LJTZXk.js +1 -0
  29. package/playground/vizard/assets/graphql-LQdxqEYJ.js +1 -0
  30. package/playground/vizard/assets/handlebars-CmzyTLHM.js +1 -0
  31. package/playground/vizard/assets/hcl-DxDQ3s82.js +1 -0
  32. package/playground/vizard/assets/html-BQlDvTLO.js +1 -0
  33. package/playground/vizard/assets/htmlMode-B5vyN_yh.js +4 -0
  34. package/playground/vizard/assets/icons-CwVYGRlZ.js +57 -0
  35. package/playground/vizard/assets/{index-B0u8YO_h.css → index-9LlxgSLj.css} +1 -1
  36. package/playground/vizard/assets/index-DONzDWNC.js +7 -0
  37. package/playground/vizard/assets/ini-BvajGCUy.js +1 -0
  38. package/playground/vizard/assets/java-SYsfObOQ.js +1 -0
  39. package/playground/vizard/assets/javascript-Cqq1UmLD.js +1 -0
  40. package/playground/vizard/assets/json.worker-CH1C3E3z.js +37 -0
  41. package/playground/vizard/assets/jsonMode-CZ-xTnh0.js +6 -0
  42. package/playground/vizard/assets/julia-DQXNmw_w.js +1 -0
  43. package/playground/vizard/assets/kotlin-qQ0MG-9I.js +1 -0
  44. package/playground/vizard/assets/less-GGFNNJHn.js +2 -0
  45. package/playground/vizard/assets/lexon-Canl7DCW.js +1 -0
  46. package/playground/vizard/assets/liquid-BwaniY5x.js +1 -0
  47. package/playground/vizard/assets/lua-D28Ae8-K.js +1 -0
  48. package/playground/vizard/assets/m3-DPitgjJI.js +1 -0
  49. package/playground/vizard/assets/markdown-B811l8j2.js +1 -0
  50. package/playground/vizard/assets/mdx-FYEkmf7B.js +1 -0
  51. package/playground/vizard/assets/mips-CdjsipkG.js +1 -0
  52. package/playground/vizard/assets/{monaco-QpZRkR_O.js → monaco-CYdCgY0W.js} +151 -181
  53. package/playground/vizard/assets/msdax-CYqgjx_P.js +1 -0
  54. package/playground/vizard/assets/mysql-BHd6q0vd.js +1 -0
  55. package/playground/vizard/assets/objective-c-B1aVtJYH.js +1 -0
  56. package/playground/vizard/assets/other-DNLijWhD.js +2 -0
  57. package/playground/vizard/assets/pascal-BhNW15KB.js +1 -0
  58. package/playground/vizard/assets/pascaligo-5jv8CcQD.js +1 -0
  59. package/playground/vizard/assets/perl-DlYyT36c.js +1 -0
  60. package/playground/vizard/assets/pgsql-Dy0bjov7.js +1 -0
  61. package/playground/vizard/assets/php-120yhfDK.js +1 -0
  62. package/playground/vizard/assets/pla-CjnFlu4u.js +1 -0
  63. package/playground/vizard/assets/postiats-CQpG440k.js +1 -0
  64. package/playground/vizard/assets/powerquery-DdJtto1Z.js +1 -0
  65. package/playground/vizard/assets/powershell-Bu_VLpJB.js +1 -0
  66. package/playground/vizard/assets/{protobuf-Dzs34GPr.js → protobuf-IBS6jZEB.js} +1 -6
  67. package/playground/vizard/assets/pug-kFxLfcjb.js +1 -0
  68. package/playground/vizard/assets/python-CjR2h7KU.js +1 -0
  69. package/playground/vizard/assets/qsharp-gaqVKiJ_.js +1 -0
  70. package/playground/vizard/assets/r-BIFz-_sK.js +1 -0
  71. package/playground/vizard/assets/razor-D4Y0dbDk.js +1 -0
  72. package/playground/vizard/assets/react-l0sNRNKZ.js +1 -0
  73. package/playground/vizard/assets/redis-CHOsPHWR.js +1 -0
  74. package/playground/vizard/assets/redshift-CBifECDb.js +1 -0
  75. package/playground/vizard/assets/restructuredtext-CghPJEOS.js +1 -0
  76. package/playground/vizard/assets/ruby-CYWGW-b1.js +1 -0
  77. package/playground/vizard/assets/rust-DMDD0SHb.js +1 -0
  78. package/playground/vizard/assets/sb-BYAiYHFx.js +1 -0
  79. package/playground/vizard/assets/scala-Bqvq8jcR.js +1 -0
  80. package/playground/vizard/assets/scheme-Dhb-2j9p.js +1 -0
  81. package/playground/vizard/assets/{scss-Rf_ppwBg.js → scss-CTwUZ5N7.js} +1 -6
  82. package/playground/vizard/assets/shell-CsDZo4DB.js +1 -0
  83. package/playground/vizard/assets/solidity-CME5AdoB.js +1 -0
  84. package/playground/vizard/assets/sophia-RYC1BQQz.js +1 -0
  85. package/playground/vizard/assets/sparql-KEyrF7De.js +1 -0
  86. package/playground/vizard/assets/sql-BdTr02Mf.js +1 -0
  87. package/playground/vizard/assets/st-C7iG7M4S.js +1 -0
  88. package/playground/vizard/assets/swift-D7IUmUK8.js +1 -0
  89. package/playground/vizard/assets/systemverilog-DgMryOEJ.js +1 -0
  90. package/playground/vizard/assets/tcl-PloMZuKG.js +1 -0
  91. package/playground/vizard/assets/{ts.worker-VACfgpbU.js → ts.worker-CqkOEKjO.js} +75 -93
  92. package/playground/vizard/assets/{tsMode-DeCT_7_p.js → tsMode-Cvjisfey.js} +3 -8
  93. package/playground/vizard/assets/twig-BfRIq3la.js +1 -0
  94. package/playground/vizard/assets/typescript-DwgdF-Pj.js +1 -0
  95. package/playground/vizard/assets/uikit-Bx93IdUi.js +446 -0
  96. package/playground/vizard/assets/vb-BwAE3J76.js +1 -0
  97. package/playground/vizard/assets/{wgsl-DlxrJ_uh.js → wgsl-B_1kOXbF.js} +1 -6
  98. package/playground/vizard/assets/xml-xRWrYvkC.js +1 -0
  99. package/playground/vizard/assets/yaml-W6T5Qjhq.js +1 -0
  100. package/playground/vizard/download/react-typescript-antd-table.zip +0 -0
  101. package/playground/vizard/download/react-typescript-chartjs-area+bar+doughnut+line+pie.zip +0 -0
  102. package/playground/vizard/index.html +7 -8
  103. package/playground/vizard/preview/react-typescript-antd-table/assets/index-ChyDO9dl.js +313 -0
  104. package/playground/vizard/preview/react-typescript-antd-table/index.html +2 -2
  105. package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/assets/index-D9jKufPU.js +12 -0
  106. package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/index.html +2 -2
  107. package/playground/assets/index-BLNumV43.js +0 -2138
  108. package/playground/vizard/assets/abap-Bs-KDgo-.js +0 -6
  109. package/playground/vizard/assets/apex-BB8ijgrA.js +0 -6
  110. package/playground/vizard/assets/azcli-CM0y7Ame.js +0 -6
  111. package/playground/vizard/assets/bat-Bfxf8Mzl.js +0 -6
  112. package/playground/vizard/assets/cameligo-PnszTm2c.js +0 -6
  113. package/playground/vizard/assets/clients-CzhsrDwG.js +0 -1
  114. package/playground/vizard/assets/clojure-B3cFVYI-.js +0 -6
  115. package/playground/vizard/assets/coffee-D8tSzcLH.js +0 -6
  116. package/playground/vizard/assets/cpp-CP-cATHl.js +0 -6
  117. package/playground/vizard/assets/csharp-Dfj4WFqy.js +0 -6
  118. package/playground/vizard/assets/csp-D9HxVpWn.js +0 -6
  119. package/playground/vizard/assets/cssMode-EIMeoZ0D.js +0 -9
  120. package/playground/vizard/assets/cypher-B50w5pq9.js +0 -6
  121. package/playground/vizard/assets/dart-DvROnYA_.js +0 -6
  122. package/playground/vizard/assets/dockerfile-C4f37Dvd.js +0 -6
  123. package/playground/vizard/assets/ecl-DW46Dzft.js +0 -6
  124. package/playground/vizard/assets/editor.worker-DnhKYsI_.js +0 -11
  125. package/playground/vizard/assets/elixir-BIa5JtGe.js +0 -6
  126. package/playground/vizard/assets/flow9-ByI4Scwv.js +0 -6
  127. package/playground/vizard/assets/fsharp-Cgf6u04w.js +0 -6
  128. package/playground/vizard/assets/go-CJfxPkej.js +0 -6
  129. package/playground/vizard/assets/graphql-CGlhcY2-.js +0 -6
  130. package/playground/vizard/assets/handlebars-Cp-Otq7z.js +0 -6
  131. package/playground/vizard/assets/hcl-CTI7WNlW.js +0 -6
  132. package/playground/vizard/assets/html-9X_QuFNV.js +0 -6
  133. package/playground/vizard/assets/htmlMode-BVz_CiVZ.js +0 -9
  134. package/playground/vizard/assets/icons-D8fX1_2-.js +0 -61
  135. package/playground/vizard/assets/index-Cn46wccg.js +0 -4723
  136. package/playground/vizard/assets/ini-qJXHXiTY.js +0 -6
  137. package/playground/vizard/assets/java-Dnrl9822.js +0 -6
  138. package/playground/vizard/assets/javascript-BrlNfx48.js +0 -6
  139. package/playground/vizard/assets/json.worker-DY5adJme.js +0 -42
  140. package/playground/vizard/assets/jsonMode-CAwYRRV9.js +0 -11
  141. package/playground/vizard/assets/julia-pqMLycLG.js +0 -6
  142. package/playground/vizard/assets/kotlin-DLX697jv.js +0 -6
  143. package/playground/vizard/assets/less-2ExdFhZM.js +0 -7
  144. package/playground/vizard/assets/lexon-ABKfEwhw.js +0 -6
  145. package/playground/vizard/assets/liquid-B5u8u5ff.js +0 -6
  146. package/playground/vizard/assets/lua-CI0blgFs.js +0 -6
  147. package/playground/vizard/assets/m3-yVPEHiu4.js +0 -6
  148. package/playground/vizard/assets/markdown-CjOKAnMy.js +0 -6
  149. package/playground/vizard/assets/mdx-BGfI80Xw.js +0 -6
  150. package/playground/vizard/assets/mips-B7KWClFm.js +0 -6
  151. package/playground/vizard/assets/msdax-N_40gjXO.js +0 -6
  152. package/playground/vizard/assets/mysql-CzgTwwi2.js +0 -6
  153. package/playground/vizard/assets/objective-c-CwAIQX-6.js +0 -6
  154. package/playground/vizard/assets/other-HgnFgCOO.js +0 -2
  155. package/playground/vizard/assets/pascal-3SrKWnFX.js +0 -6
  156. package/playground/vizard/assets/pascaligo-Cv9Y0fbC.js +0 -6
  157. package/playground/vizard/assets/perl-DHxnJL0_.js +0 -6
  158. package/playground/vizard/assets/pgsql-DGJFw0qd.js +0 -6
  159. package/playground/vizard/assets/php-BA3Rqjpx.js +0 -6
  160. package/playground/vizard/assets/pla-DKf5_u7N.js +0 -6
  161. package/playground/vizard/assets/postiats-Bup1kUyj.js +0 -6
  162. package/playground/vizard/assets/powerquery-BfbPeLER.js +0 -6
  163. package/playground/vizard/assets/powershell-DAsS7BG8.js +0 -6
  164. package/playground/vizard/assets/pug-CVuUMJ1K.js +0 -6
  165. package/playground/vizard/assets/python-eaj7SXr6.js +0 -6
  166. package/playground/vizard/assets/qsharp-BgY1GbL_.js +0 -6
  167. package/playground/vizard/assets/r-C2Iz-cGs.js +0 -6
  168. package/playground/vizard/assets/razor-mSmpvSb7.js +0 -6
  169. package/playground/vizard/assets/react-CJahmRYQ.js +0 -32
  170. package/playground/vizard/assets/redis-F7UxdB6U.js +0 -6
  171. package/playground/vizard/assets/redshift-CDF44XVS.js +0 -6
  172. package/playground/vizard/assets/restructuredtext-C_dzeD_4.js +0 -6
  173. package/playground/vizard/assets/ruby-BdxlVRg3.js +0 -6
  174. package/playground/vizard/assets/rust-gU8692nP.js +0 -6
  175. package/playground/vizard/assets/sb-CsAkPjmq.js +0 -6
  176. package/playground/vizard/assets/scala-D_TH4Qyk.js +0 -6
  177. package/playground/vizard/assets/scheme-CTXRt_ZJ.js +0 -6
  178. package/playground/vizard/assets/shell-osqRiq1b.js +0 -6
  179. package/playground/vizard/assets/solidity-BTHmi1CB.js +0 -6
  180. package/playground/vizard/assets/sophia-BRe4RArb.js +0 -6
  181. package/playground/vizard/assets/sparql-CaSv-uNl.js +0 -6
  182. package/playground/vizard/assets/sql-CHiRcria.js +0 -6
  183. package/playground/vizard/assets/st-CCGZ7KTi.js +0 -6
  184. package/playground/vizard/assets/swift-DeyDsJzf.js +0 -8
  185. package/playground/vizard/assets/systemverilog-RSGMMa-l.js +0 -6
  186. package/playground/vizard/assets/tcl-B28K5YOH.js +0 -6
  187. package/playground/vizard/assets/twig-ChoE7Tfw.js +0 -6
  188. package/playground/vizard/assets/typescript-DHPJO5zk.js +0 -6
  189. package/playground/vizard/assets/uikit-B7SaluUF.js +0 -1352
  190. package/playground/vizard/assets/vb-BCnlgLOU.js +0 -6
  191. package/playground/vizard/assets/xml-BzVPTsY-.js +0 -6
  192. package/playground/vizard/assets/yaml-BQjIkRBM.js +0 -6
  193. package/playground/vizard/preview/react-typescript-antd-table/assets/index-BUeSoip0.js +0 -355
  194. package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/assets/index-CqgSyhTK.js +0 -57
  195. /package/playground/vizard/assets/{monaco-ZJDocGaF.css → monaco-DubZzIGg.css} +0 -0
  196. /package/playground/vizard/preview/react-typescript-antd-table/assets/{index-D47x4Gho.css → index-DMzrXVau.css} +0 -0
  197. /package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/assets/{index-D47x4Gho.css → index-DMzrXVau.css} +0 -0
@@ -1,57 +0,0 @@
1
- var Ob=Object.defineProperty;var Cb=(t,e,n)=>e in t?Ob(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var L=(t,e,n)=>(Cb(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ei(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var iv={exports:{}},ml={},sv={exports:{}},W={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Zs=Symbol.for("react.element"),Tb=Symbol.for("react.portal"),Db=Symbol.for("react.fragment"),Rb=Symbol.for("react.strict_mode"),Ab=Symbol.for("react.profiler"),Ib=Symbol.for("react.provider"),$b=Symbol.for("react.context"),Lb=Symbol.for("react.forward_ref"),Nb=Symbol.for("react.suspense"),Fb=Symbol.for("react.memo"),zb=Symbol.for("react.lazy"),jd=Symbol.iterator;function jb(t){return t===null||typeof t!="object"?null:(t=jd&&t[jd]||t["@@iterator"],typeof t=="function"?t:null)}var ov={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},av=Object.assign,lv={};function Mi(t,e,n){this.props=t,this.context=e,this.refs=lv,this.updater=n||ov}Mi.prototype.isReactComponent={};Mi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Mi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function uv(){}uv.prototype=Mi.prototype;function Kf(t,e,n){this.props=t,this.context=e,this.refs=lv,this.updater=n||ov}var Xf=Kf.prototype=new uv;Xf.constructor=Kf;av(Xf,Mi.prototype);Xf.isPureReactComponent=!0;var Bd=Array.isArray,cv=Object.prototype.hasOwnProperty,Jf={current:null},fv={key:!0,ref:!0,__self:!0,__source:!0};function hv(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)cv.call(e,r)&&!fv.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Zs,type:t,key:s,ref:o,props:i,_owner:Jf.current}}function Bb(t,e){return{$$typeof:Zs,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Zf(t){return typeof t=="object"&&t!==null&&t.$$typeof===Zs}function Vb(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Vd=/\/+/g;function Xl(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Vb(""+t.key):e.toString(36)}function sa(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Zs:case Tb:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+Xl(o,0):r,Bd(i)?(n="",t!=null&&(n=t.replace(Vd,"$&/")+"/"),sa(i,e,n,"",function(u){return u})):i!=null&&(Zf(i)&&(i=Bb(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Vd,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",Bd(t))for(var a=0;a<t.length;a++){s=t[a];var l=r+Xl(s,a);o+=sa(s,e,n,l,i)}else if(l=jb(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=r+Xl(s,a++),o+=sa(s,e,n,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function po(t,e,n){if(t==null)return t;var r=[],i=0;return sa(t,r,"","",function(s){return e.call(n,s,i++)}),r}function Ub(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Ve={current:null},oa={transition:null},Wb={ReactCurrentDispatcher:Ve,ReactCurrentBatchConfig:oa,ReactCurrentOwner:Jf};W.Children={map:po,forEach:function(t,e,n){po(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return po(t,function(){e++}),e},toArray:function(t){return po(t,function(e){return e})||[]},only:function(t){if(!Zf(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};W.Component=Mi;W.Fragment=Db;W.Profiler=Ab;W.PureComponent=Kf;W.StrictMode=Rb;W.Suspense=Nb;W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wb;W.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=av({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=Jf.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)cv.call(e,l)&&!fv.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Zs,type:t.type,key:i,ref:s,props:r,_owner:o}};W.createContext=function(t){return t={$$typeof:$b,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:Ib,_context:t},t.Consumer=t};W.createElement=hv;W.createFactory=function(t){var e=hv.bind(null,t);return e.type=t,e};W.createRef=function(){return{current:null}};W.forwardRef=function(t){return{$$typeof:Lb,render:t}};W.isValidElement=Zf;W.lazy=function(t){return{$$typeof:zb,_payload:{_status:-1,_result:t},_init:Ub}};W.memo=function(t,e){return{$$typeof:Fb,type:t,compare:e===void 0?null:e}};W.startTransition=function(t){var e=oa.transition;oa.transition={};try{t()}finally{oa.transition=e}};W.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};W.useCallback=function(t,e){return Ve.current.useCallback(t,e)};W.useContext=function(t){return Ve.current.useContext(t)};W.useDebugValue=function(){};W.useDeferredValue=function(t){return Ve.current.useDeferredValue(t)};W.useEffect=function(t,e){return Ve.current.useEffect(t,e)};W.useId=function(){return Ve.current.useId()};W.useImperativeHandle=function(t,e,n){return Ve.current.useImperativeHandle(t,e,n)};W.useInsertionEffect=function(t,e){return Ve.current.useInsertionEffect(t,e)};W.useLayoutEffect=function(t,e){return Ve.current.useLayoutEffect(t,e)};W.useMemo=function(t,e){return Ve.current.useMemo(t,e)};W.useReducer=function(t,e,n){return Ve.current.useReducer(t,e,n)};W.useRef=function(t){return Ve.current.useRef(t)};W.useState=function(t){return Ve.current.useState(t)};W.useSyncExternalStore=function(t,e,n){return Ve.current.useSyncExternalStore(t,e,n)};W.useTransition=function(){return Ve.current.useTransition()};W.version="18.2.0";sv.exports=W;var ne=sv.exports;const _r=Ei(ne);/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Hb=ne,Yb=Symbol.for("react.element"),qb=Symbol.for("react.fragment"),Gb=Object.prototype.hasOwnProperty,Qb=Hb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Kb={key:!0,ref:!0,__self:!0,__source:!0};function dv(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)Gb.call(e,r)&&!Kb.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:Yb,type:t,key:s,ref:o,props:i,_owner:Qb.current}}ml.Fragment=qb;ml.jsx=dv;ml.jsxs=dv;iv.exports=ml;var qe=iv.exports,mc={},pv={exports:{}},ut={},gv={exports:{}},mv={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(t){function e(S,P){var D=S.length;S.push(P);e:for(;0<D;){var N=D-1>>>1,F=S[N];if(0<i(F,P))S[N]=P,S[D]=F,D=N;else break e}}function n(S){return S.length===0?null:S[0]}function r(S){if(S.length===0)return null;var P=S[0],D=S.pop();if(D!==P){S[0]=D;e:for(var N=0,F=S.length,G=F>>>1;N<G;){var H=2*(N+1)-1,ae=S[H],he=H+1,dt=S[he];if(0>i(ae,D))he<F&&0>i(dt,ae)?(S[N]=dt,S[he]=D,N=he):(S[N]=ae,S[H]=D,N=H);else if(he<F&&0>i(dt,D))S[N]=dt,S[he]=D,N=he;else break e}}return P}function i(S,P){var D=S.sortIndex-P.sortIndex;return D!==0?D:S.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,h=3,d=!1,g=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(S){for(var P=n(u);P!==null;){if(P.callback===null)r(u);else if(P.startTime<=S)r(u),P.sortIndex=P.expirationTime,e(l,P);else break;P=n(u)}}function x(S){if(y=!1,v(S),!g)if(n(l)!==null)g=!0,C(b);else{var P=n(u);P!==null&&M(x,P.startTime-S)}}function b(S,P){g=!1,y&&(y=!1,m(T),T=-1),d=!0;var D=h;try{for(v(P),f=n(l);f!==null&&(!(f.expirationTime>P)||S&&!A());){var N=f.callback;if(typeof N=="function"){f.callback=null,h=f.priorityLevel;var F=N(f.expirationTime<=P);P=t.unstable_now(),typeof F=="function"?f.callback=F:f===n(l)&&r(l),v(P)}else r(l);f=n(l)}if(f!==null)var G=!0;else{var H=n(u);H!==null&&M(x,H.startTime-P),G=!1}return G}finally{f=null,h=D,d=!1}}var E=!1,O=null,T=-1,I=5,R=-1;function A(){return!(t.unstable_now()-R<I)}function j(){if(O!==null){var S=t.unstable_now();R=S;var P=!0;try{P=O(!0,S)}finally{P?V():(E=!1,O=null)}}else E=!1}var V;if(typeof p=="function")V=function(){p(j)};else if(typeof MessageChannel<"u"){var w=new MessageChannel,k=w.port2;w.port1.onmessage=j,V=function(){k.postMessage(null)}}else V=function(){_(j,0)};function C(S){O=S,E||(E=!0,V())}function M(S,P){T=_(function(){S(t.unstable_now())},P)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(S){S.callback=null},t.unstable_continueExecution=function(){g||d||(g=!0,C(b))},t.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<S?Math.floor(1e3/S):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(S){switch(h){case 1:case 2:case 3:var P=3;break;default:P=h}var D=h;h=P;try{return S()}finally{h=D}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(S,P){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var D=h;h=S;try{return P()}finally{h=D}},t.unstable_scheduleCallback=function(S,P,D){var N=t.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?N+D:N):D=N,S){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=D+F,S={id:c++,callback:P,priorityLevel:S,startTime:D,expirationTime:F,sortIndex:-1},D>N?(S.sortIndex=D,e(u,S),n(l)===null&&S===n(u)&&(y?(m(T),T=-1):y=!0,M(x,D-N))):(S.sortIndex=F,e(l,S),g||d||(g=!0,C(b))),S},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(S){var P=h;return function(){var D=h;h=P;try{return S.apply(this,arguments)}finally{h=D}}}})(mv);gv.exports=mv;var Xb=gv.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var yv=ne,lt=Xb;function $(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var vv=new Set,Es={};function Pr(t,e){fi(t,e),fi(t+"Capture",e)}function fi(t,e){for(Es[t]=e,t=0;t<e.length;t++)vv.add(e[t])}var un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yc=Object.prototype.hasOwnProperty,Jb=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ud={},Wd={};function Zb(t){return yc.call(Wd,t)?!0:yc.call(Ud,t)?!1:Jb.test(t)?Wd[t]=!0:(Ud[t]=!0,!1)}function eS(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function tS(t,e,n,r){if(e===null||typeof e>"u"||eS(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ue(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var De={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){De[t]=new Ue(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];De[e]=new Ue(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){De[t]=new Ue(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){De[t]=new Ue(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){De[t]=new Ue(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){De[t]=new Ue(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){De[t]=new Ue(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){De[t]=new Ue(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){De[t]=new Ue(t,5,!1,t.toLowerCase(),null,!1,!1)});var eh=/[\-:]([a-z])/g;function th(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(eh,th);De[e]=new Ue(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(eh,th);De[e]=new Ue(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(eh,th);De[e]=new Ue(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){De[t]=new Ue(t,1,!1,t.toLowerCase(),null,!1,!1)});De.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){De[t]=new Ue(t,1,!1,t.toLowerCase(),null,!0,!0)});function nh(t,e,n,r){var i=De.hasOwnProperty(e)?De[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(tS(e,n,i,r)&&(n=null),r||i===null?Zb(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var dn=yv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,go=Symbol.for("react.element"),jr=Symbol.for("react.portal"),Br=Symbol.for("react.fragment"),rh=Symbol.for("react.strict_mode"),vc=Symbol.for("react.profiler"),_v=Symbol.for("react.provider"),xv=Symbol.for("react.context"),ih=Symbol.for("react.forward_ref"),_c=Symbol.for("react.suspense"),xc=Symbol.for("react.suspense_list"),sh=Symbol.for("react.memo"),bn=Symbol.for("react.lazy"),bv=Symbol.for("react.offscreen"),Hd=Symbol.iterator;function Ii(t){return t===null||typeof t!="object"?null:(t=Hd&&t[Hd]||t["@@iterator"],typeof t=="function"?t:null)}var fe=Object.assign,Jl;function Xi(t){if(Jl===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Jl=e&&e[1]||""}return`
34
- `+Jl+t}var Zl=!1;function eu(t,e){if(!t||Zl)return"";Zl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
- `),s=r.stack.split(`
36
- `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37
- `+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Zl=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Xi(t):""}function nS(t){switch(t.tag){case 5:return Xi(t.type);case 16:return Xi("Lazy");case 13:return Xi("Suspense");case 19:return Xi("SuspenseList");case 0:case 2:case 15:return t=eu(t.type,!1),t;case 11:return t=eu(t.type.render,!1),t;case 1:return t=eu(t.type,!0),t;default:return""}}function bc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Br:return"Fragment";case jr:return"Portal";case vc:return"Profiler";case rh:return"StrictMode";case _c:return"Suspense";case xc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case xv:return(t.displayName||"Context")+".Consumer";case _v:return(t._context.displayName||"Context")+".Provider";case ih:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case sh:return e=t.displayName||null,e!==null?e:bc(t.type)||"Memo";case bn:e=t._payload,t=t._init;try{return bc(t(e))}catch{}}return null}function rS(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return bc(e);case 8:return e===rh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Vn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Sv(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function iS(t){var e=Sv(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function mo(t){t._valueTracker||(t._valueTracker=iS(t))}function wv(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Sv(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Da(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Sc(t,e){var n=e.checked;return fe({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Yd(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Vn(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function kv(t,e){e=e.checked,e!=null&&nh(t,"checked",e,!1)}function wc(t,e){kv(t,e);var n=Vn(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?kc(t,e.type,n):e.hasOwnProperty("defaultValue")&&kc(t,e.type,Vn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function qd(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function kc(t,e,n){(e!=="number"||Da(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Ji=Array.isArray;function ni(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Vn(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Ec(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error($(91));return fe({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Gd(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error($(92));if(Ji(n)){if(1<n.length)throw Error($(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Vn(n)}}function Ev(t,e){var n=Vn(e.value),r=Vn(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Qd(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Mv(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Mc(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Mv(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var yo,Pv=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(yo=yo||document.createElement("div"),yo.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=yo.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ms(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var as={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sS=["Webkit","ms","Moz","O"];Object.keys(as).forEach(function(t){sS.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),as[e]=as[t]})});function Ov(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||as.hasOwnProperty(t)&&as[t]?(""+e).trim():e+"px"}function Cv(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ov(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var oS=fe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Pc(t,e){if(e){if(oS[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error($(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error($(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error($(61))}if(e.style!=null&&typeof e.style!="object")throw Error($(62))}}function Oc(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cc=null;function oh(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Tc=null,ri=null,ii=null;function Kd(t){if(t=no(t)){if(typeof Tc!="function")throw Error($(280));var e=t.stateNode;e&&(e=bl(e),Tc(t.stateNode,t.type,e))}}function Tv(t){ri?ii?ii.push(t):ii=[t]:ri=t}function Dv(){if(ri){var t=ri,e=ii;if(ii=ri=null,Kd(t),e)for(t=0;t<e.length;t++)Kd(e[t])}}function Rv(t,e){return t(e)}function Av(){}var tu=!1;function Iv(t,e,n){if(tu)return t(e,n);tu=!0;try{return Rv(t,e,n)}finally{tu=!1,(ri!==null||ii!==null)&&(Av(),Dv())}}function Ps(t,e){var n=t.stateNode;if(n===null)return null;var r=bl(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error($(231,e,typeof n));return n}var Dc=!1;if(un)try{var $i={};Object.defineProperty($i,"passive",{get:function(){Dc=!0}}),window.addEventListener("test",$i,$i),window.removeEventListener("test",$i,$i)}catch{Dc=!1}function aS(t,e,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var ls=!1,Ra=null,Aa=!1,Rc=null,lS={onError:function(t){ls=!0,Ra=t}};function uS(t,e,n,r,i,s,o,a,l){ls=!1,Ra=null,aS.apply(lS,arguments)}function cS(t,e,n,r,i,s,o,a,l){if(uS.apply(this,arguments),ls){if(ls){var u=Ra;ls=!1,Ra=null}else throw Error($(198));Aa||(Aa=!0,Rc=u)}}function Or(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function $v(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Xd(t){if(Or(t)!==t)throw Error($(188))}function fS(t){var e=t.alternate;if(!e){if(e=Or(t),e===null)throw Error($(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Xd(i),t;if(s===r)return Xd(i),e;s=s.sibling}throw Error($(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error($(189))}}if(n.alternate!==r)throw Error($(190))}if(n.tag!==3)throw Error($(188));return n.stateNode.current===n?t:e}function Lv(t){return t=fS(t),t!==null?Nv(t):null}function Nv(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Nv(t);if(e!==null)return e;t=t.sibling}return null}var Fv=lt.unstable_scheduleCallback,Jd=lt.unstable_cancelCallback,hS=lt.unstable_shouldYield,dS=lt.unstable_requestPaint,me=lt.unstable_now,pS=lt.unstable_getCurrentPriorityLevel,ah=lt.unstable_ImmediatePriority,zv=lt.unstable_UserBlockingPriority,Ia=lt.unstable_NormalPriority,gS=lt.unstable_LowPriority,jv=lt.unstable_IdlePriority,yl=null,Ut=null;function mS(t){if(Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(yl,t,void 0,(t.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:_S,yS=Math.log,vS=Math.LN2;function _S(t){return t>>>=0,t===0?32:31-(yS(t)/vS|0)|0}var vo=64,_o=4194304;function Zi(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function $a(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Zi(a):(s&=o,s!==0&&(r=Zi(s)))}else o=n&~i,o!==0?r=Zi(o):s!==0&&(r=Zi(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Rt(e),i=1<<n,r|=t[n],e&=~i;return r}function xS(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bS(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Rt(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=xS(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function Ac(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Bv(){var t=vo;return vo<<=1,!(vo&4194240)&&(vo=64),t}function nu(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function eo(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Rt(e),t[e]=n}function SS(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Rt(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function lh(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Rt(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var K=0;function Vv(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Uv,uh,Wv,Hv,Yv,Ic=!1,xo=[],An=null,In=null,$n=null,Os=new Map,Cs=new Map,kn=[],wS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Zd(t,e){switch(t){case"focusin":case"focusout":An=null;break;case"dragenter":case"dragleave":In=null;break;case"mouseover":case"mouseout":$n=null;break;case"pointerover":case"pointerout":Os.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cs.delete(e.pointerId)}}function Li(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=no(e),e!==null&&uh(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function kS(t,e,n,r,i){switch(e){case"focusin":return An=Li(An,t,e,n,r,i),!0;case"dragenter":return In=Li(In,t,e,n,r,i),!0;case"mouseover":return $n=Li($n,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return Os.set(s,Li(Os.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Cs.set(s,Li(Cs.get(s)||null,t,e,n,r,i)),!0}return!1}function qv(t){var e=hr(t.target);if(e!==null){var n=Or(e);if(n!==null){if(e=n.tag,e===13){if(e=$v(n),e!==null){t.blockedOn=e,Yv(t.priority,function(){Wv(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function aa(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=$c(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Cc=r,n.target.dispatchEvent(r),Cc=null}else return e=no(n),e!==null&&uh(e),t.blockedOn=n,!1;e.shift()}return!0}function ep(t,e,n){aa(t)&&n.delete(e)}function ES(){Ic=!1,An!==null&&aa(An)&&(An=null),In!==null&&aa(In)&&(In=null),$n!==null&&aa($n)&&($n=null),Os.forEach(ep),Cs.forEach(ep)}function Ni(t,e){t.blockedOn===e&&(t.blockedOn=null,Ic||(Ic=!0,lt.unstable_scheduleCallback(lt.unstable_NormalPriority,ES)))}function Ts(t){function e(i){return Ni(i,t)}if(0<xo.length){Ni(xo[0],t);for(var n=1;n<xo.length;n++){var r=xo[n];r.blockedOn===t&&(r.blockedOn=null)}}for(An!==null&&Ni(An,t),In!==null&&Ni(In,t),$n!==null&&Ni($n,t),Os.forEach(e),Cs.forEach(e),n=0;n<kn.length;n++)r=kn[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<kn.length&&(n=kn[0],n.blockedOn===null);)qv(n),n.blockedOn===null&&kn.shift()}var si=dn.ReactCurrentBatchConfig,La=!0;function MS(t,e,n,r){var i=K,s=si.transition;si.transition=null;try{K=1,ch(t,e,n,r)}finally{K=i,si.transition=s}}function PS(t,e,n,r){var i=K,s=si.transition;si.transition=null;try{K=4,ch(t,e,n,r)}finally{K=i,si.transition=s}}function ch(t,e,n,r){if(La){var i=$c(t,e,n,r);if(i===null)hu(t,e,r,Na,n),Zd(t,r);else if(kS(i,t,e,n,r))r.stopPropagation();else if(Zd(t,r),e&4&&-1<wS.indexOf(t)){for(;i!==null;){var s=no(i);if(s!==null&&Uv(s),s=$c(t,e,n,r),s===null&&hu(t,e,r,Na,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else hu(t,e,r,null,n)}}var Na=null;function $c(t,e,n,r){if(Na=null,t=oh(r),t=hr(t),t!==null)if(e=Or(t),e===null)t=null;else if(n=e.tag,n===13){if(t=$v(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Na=t,null}function Gv(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(pS()){case ah:return 1;case zv:return 4;case Ia:case gS:return 16;case jv:return 536870912;default:return 16}default:return 16}}var Mn=null,fh=null,la=null;function Qv(){if(la)return la;var t,e=fh,n=e.length,r,i="value"in Mn?Mn.value:Mn.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return la=i.slice(t,1<r?1-r:void 0)}function ua(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function bo(){return!0}function tp(){return!1}function ct(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?bo:tp,this.isPropagationStopped=tp,this}return fe(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=bo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),e}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hh=ct(Pi),to=fe({},Pi,{view:0,detail:0}),OS=ct(to),ru,iu,Fi,vl=fe({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dh,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Fi&&(Fi&&t.type==="mousemove"?(ru=t.screenX-Fi.screenX,iu=t.screenY-Fi.screenY):iu=ru=0,Fi=t),ru)},movementY:function(t){return"movementY"in t?t.movementY:iu}}),np=ct(vl),CS=fe({},vl,{dataTransfer:0}),TS=ct(CS),DS=fe({},to,{relatedTarget:0}),su=ct(DS),RS=fe({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),AS=ct(RS),IS=fe({},Pi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),$S=ct(IS),LS=fe({},Pi,{data:0}),rp=ct(LS),NS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},FS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},zS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jS(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=zS[t])?!!e[t]:!1}function dh(){return jS}var BS=fe({},to,{key:function(t){if(t.key){var e=NS[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ua(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?FS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dh,charCode:function(t){return t.type==="keypress"?ua(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ua(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),VS=ct(BS),US=fe({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ip=ct(US),WS=fe({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dh}),HS=ct(WS),YS=fe({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),qS=ct(YS),GS=fe({},vl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),QS=ct(GS),KS=[9,13,27,32],ph=un&&"CompositionEvent"in window,us=null;un&&"documentMode"in document&&(us=document.documentMode);var XS=un&&"TextEvent"in window&&!us,Kv=un&&(!ph||us&&8<us&&11>=us),sp=" ",op=!1;function Xv(t,e){switch(t){case"keyup":return KS.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jv(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Vr=!1;function JS(t,e){switch(t){case"compositionend":return Jv(e);case"keypress":return e.which!==32?null:(op=!0,sp);case"textInput":return t=e.data,t===sp&&op?null:t;default:return null}}function ZS(t,e){if(Vr)return t==="compositionend"||!ph&&Xv(t,e)?(t=Qv(),la=fh=Mn=null,Vr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Kv&&e.locale!=="ko"?null:e.data;default:return null}}var ew={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ap(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!ew[t.type]:e==="textarea"}function Zv(t,e,n,r){Tv(r),e=Fa(e,"onChange"),0<e.length&&(n=new hh("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var cs=null,Ds=null;function tw(t){c0(t,0)}function _l(t){var e=Hr(t);if(wv(e))return t}function nw(t,e){if(t==="change")return e}var e0=!1;if(un){var ou;if(un){var au="oninput"in document;if(!au){var lp=document.createElement("div");lp.setAttribute("oninput","return;"),au=typeof lp.oninput=="function"}ou=au}else ou=!1;e0=ou&&(!document.documentMode||9<document.documentMode)}function up(){cs&&(cs.detachEvent("onpropertychange",t0),Ds=cs=null)}function t0(t){if(t.propertyName==="value"&&_l(Ds)){var e=[];Zv(e,Ds,t,oh(t)),Iv(tw,e)}}function rw(t,e,n){t==="focusin"?(up(),cs=e,Ds=n,cs.attachEvent("onpropertychange",t0)):t==="focusout"&&up()}function iw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return _l(Ds)}function sw(t,e){if(t==="click")return _l(e)}function ow(t,e){if(t==="input"||t==="change")return _l(e)}function aw(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var $t=typeof Object.is=="function"?Object.is:aw;function Rs(t,e){if($t(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!yc.call(e,i)||!$t(t[i],e[i]))return!1}return!0}function cp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function fp(t,e){var n=cp(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cp(n)}}function n0(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?n0(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function r0(){for(var t=window,e=Da();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Da(t.document)}return e}function gh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function lw(t){var e=r0(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&n0(n.ownerDocument.documentElement,n)){if(r!==null&&gh(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=fp(n,s);var o=fp(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var uw=un&&"documentMode"in document&&11>=document.documentMode,Ur=null,Lc=null,fs=null,Nc=!1;function hp(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nc||Ur==null||Ur!==Da(r)||(r=Ur,"selectionStart"in r&&gh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),fs&&Rs(fs,r)||(fs=r,r=Fa(Lc,"onSelect"),0<r.length&&(e=new hh("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Ur)))}function So(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Wr={animationend:So("Animation","AnimationEnd"),animationiteration:So("Animation","AnimationIteration"),animationstart:So("Animation","AnimationStart"),transitionend:So("Transition","TransitionEnd")},lu={},i0={};un&&(i0=document.createElement("div").style,"AnimationEvent"in window||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),"TransitionEvent"in window||delete Wr.transitionend.transition);function xl(t){if(lu[t])return lu[t];if(!Wr[t])return t;var e=Wr[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in i0)return lu[t]=e[n];return t}var s0=xl("animationend"),o0=xl("animationiteration"),a0=xl("animationstart"),l0=xl("transitionend"),u0=new Map,dp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function qn(t,e){u0.set(t,e),Pr(e,[t])}for(var uu=0;uu<dp.length;uu++){var cu=dp[uu],cw=cu.toLowerCase(),fw=cu[0].toUpperCase()+cu.slice(1);qn(cw,"on"+fw)}qn(s0,"onAnimationEnd");qn(o0,"onAnimationIteration");qn(a0,"onAnimationStart");qn("dblclick","onDoubleClick");qn("focusin","onFocus");qn("focusout","onBlur");qn(l0,"onTransitionEnd");fi("onMouseEnter",["mouseout","mouseover"]);fi("onMouseLeave",["mouseout","mouseover"]);fi("onPointerEnter",["pointerout","pointerover"]);fi("onPointerLeave",["pointerout","pointerover"]);Pr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Pr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Pr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Pr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Pr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Pr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var es="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),hw=new Set("cancel close invalid load scroll toggle".split(" ").concat(es));function pp(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,cS(r,e,void 0,t),t.currentTarget=null}function c0(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;pp(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;pp(i,a,u),s=l}}}if(Aa)throw t=Rc,Aa=!1,Rc=null,t}function ee(t,e){var n=e[Vc];n===void 0&&(n=e[Vc]=new Set);var r=t+"__bubble";n.has(r)||(f0(e,t,2,!1),n.add(r))}function fu(t,e,n){var r=0;e&&(r|=4),f0(n,t,r,e)}var wo="_reactListening"+Math.random().toString(36).slice(2);function As(t){if(!t[wo]){t[wo]=!0,vv.forEach(function(n){n!=="selectionchange"&&(hw.has(n)||fu(n,!1,t),fu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[wo]||(e[wo]=!0,fu("selectionchange",!1,e))}}function f0(t,e,n,r){switch(Gv(e)){case 1:var i=MS;break;case 4:i=PS;break;default:i=ch}n=i.bind(null,e,n,t),i=void 0,!Dc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function hu(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=hr(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}Iv(function(){var u=s,c=oh(n),f=[];e:{var h=u0.get(t);if(h!==void 0){var d=hh,g=t;switch(t){case"keypress":if(ua(n)===0)break e;case"keydown":case"keyup":d=VS;break;case"focusin":g="focus",d=su;break;case"focusout":g="blur",d=su;break;case"beforeblur":case"afterblur":d=su;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=np;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=TS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=HS;break;case s0:case o0:case a0:d=AS;break;case l0:d=qS;break;case"scroll":d=OS;break;case"wheel":d=QS;break;case"copy":case"cut":case"paste":d=$S;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=ip}var y=(e&4)!==0,_=!y&&t==="scroll",m=y?h!==null?h+"Capture":null:h;y=[];for(var p=u,v;p!==null;){v=p;var x=v.stateNode;if(v.tag===5&&x!==null&&(v=x,m!==null&&(x=Ps(p,m),x!=null&&y.push(Is(p,x,v)))),_)break;p=p.return}0<y.length&&(h=new d(h,g,null,n,c),f.push({event:h,listeners:y}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",d=t==="mouseout"||t==="pointerout",h&&n!==Cc&&(g=n.relatedTarget||n.fromElement)&&(hr(g)||g[cn]))break e;if((d||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,d?(g=n.relatedTarget||n.toElement,d=u,g=g?hr(g):null,g!==null&&(_=Or(g),g!==_||g.tag!==5&&g.tag!==6)&&(g=null)):(d=null,g=u),d!==g)){if(y=np,x="onMouseLeave",m="onMouseEnter",p="mouse",(t==="pointerout"||t==="pointerover")&&(y=ip,x="onPointerLeave",m="onPointerEnter",p="pointer"),_=d==null?h:Hr(d),v=g==null?h:Hr(g),h=new y(x,p+"leave",d,n,c),h.target=_,h.relatedTarget=v,x=null,hr(c)===u&&(y=new y(m,p+"enter",g,n,c),y.target=v,y.relatedTarget=_,x=y),_=x,d&&g)t:{for(y=d,m=g,p=0,v=y;v;v=Rr(v))p++;for(v=0,x=m;x;x=Rr(x))v++;for(;0<p-v;)y=Rr(y),p--;for(;0<v-p;)m=Rr(m),v--;for(;p--;){if(y===m||m!==null&&y===m.alternate)break t;y=Rr(y),m=Rr(m)}y=null}else y=null;d!==null&&gp(f,h,d,y,!1),g!==null&&_!==null&&gp(f,_,g,y,!0)}}e:{if(h=u?Hr(u):window,d=h.nodeName&&h.nodeName.toLowerCase(),d==="select"||d==="input"&&h.type==="file")var b=nw;else if(ap(h))if(e0)b=ow;else{b=iw;var E=rw}else(d=h.nodeName)&&d.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(b=sw);if(b&&(b=b(t,u))){Zv(f,b,n,c);break e}E&&E(t,h,u),t==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&kc(h,"number",h.value)}switch(E=u?Hr(u):window,t){case"focusin":(ap(E)||E.contentEditable==="true")&&(Ur=E,Lc=u,fs=null);break;case"focusout":fs=Lc=Ur=null;break;case"mousedown":Nc=!0;break;case"contextmenu":case"mouseup":case"dragend":Nc=!1,hp(f,n,c);break;case"selectionchange":if(uw)break;case"keydown":case"keyup":hp(f,n,c)}var O;if(ph)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Vr?Xv(t,n)&&(T="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Kv&&n.locale!=="ko"&&(Vr||T!=="onCompositionStart"?T==="onCompositionEnd"&&Vr&&(O=Qv()):(Mn=c,fh="value"in Mn?Mn.value:Mn.textContent,Vr=!0)),E=Fa(u,T),0<E.length&&(T=new rp(T,t,null,n,c),f.push({event:T,listeners:E}),O?T.data=O:(O=Jv(n),O!==null&&(T.data=O)))),(O=XS?JS(t,n):ZS(t,n))&&(u=Fa(u,"onBeforeInput"),0<u.length&&(c=new rp("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=O))}c0(f,e)})}function Is(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Fa(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ps(t,n),s!=null&&r.unshift(Is(t,s,i)),s=Ps(t,e),s!=null&&r.push(Is(t,s,i))),t=t.return}return r}function Rr(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function gp(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Ps(n,s),l!=null&&o.unshift(Is(n,l,a))):i||(l=Ps(n,s),l!=null&&o.push(Is(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var dw=/\r\n?/g,pw=/\u0000|\uFFFD/g;function mp(t){return(typeof t=="string"?t:""+t).replace(dw,`
38
- `).replace(pw,"")}function ko(t,e,n){if(e=mp(e),mp(t)!==e&&n)throw Error($(425))}function za(){}var Fc=null,zc=null;function jc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Bc=typeof setTimeout=="function"?setTimeout:void 0,gw=typeof clearTimeout=="function"?clearTimeout:void 0,yp=typeof Promise=="function"?Promise:void 0,mw=typeof queueMicrotask=="function"?queueMicrotask:typeof yp<"u"?function(t){return yp.resolve(null).then(t).catch(yw)}:Bc;function yw(t){setTimeout(function(){throw t})}function du(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Ts(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ts(e)}function Ln(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function vp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Oi=Math.random().toString(36).slice(2),Vt="__reactFiber$"+Oi,$s="__reactProps$"+Oi,cn="__reactContainer$"+Oi,Vc="__reactEvents$"+Oi,vw="__reactListeners$"+Oi,_w="__reactHandles$"+Oi;function hr(t){var e=t[Vt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[cn]||n[Vt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=vp(t);t!==null;){if(n=t[Vt])return n;t=vp(t)}return e}t=n,n=t.parentNode}return null}function no(t){return t=t[Vt]||t[cn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Hr(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error($(33))}function bl(t){return t[$s]||null}var Uc=[],Yr=-1;function Gn(t){return{current:t}}function ie(t){0>Yr||(t.current=Uc[Yr],Uc[Yr]=null,Yr--)}function Z(t,e){Yr++,Uc[Yr]=t.current,t.current=e}var Un={},Fe=Gn(Un),Je=Gn(!1),xr=Un;function hi(t,e){var n=t.type.contextTypes;if(!n)return Un;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Ze(t){return t=t.childContextTypes,t!=null}function ja(){ie(Je),ie(Fe)}function _p(t,e,n){if(Fe.current!==Un)throw Error($(168));Z(Fe,e),Z(Je,n)}function h0(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error($(108,rS(t)||"Unknown",i));return fe({},n,r)}function Ba(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Un,xr=Fe.current,Z(Fe,t),Z(Je,Je.current),!0}function xp(t,e,n){var r=t.stateNode;if(!r)throw Error($(169));n?(t=h0(t,e,xr),r.__reactInternalMemoizedMergedChildContext=t,ie(Je),ie(Fe),Z(Fe,t)):ie(Je),Z(Je,n)}var en=null,Sl=!1,pu=!1;function d0(t){en===null?en=[t]:en.push(t)}function xw(t){Sl=!0,d0(t)}function Qn(){if(!pu&&en!==null){pu=!0;var t=0,e=K;try{var n=en;for(K=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}en=null,Sl=!1}catch(i){throw en!==null&&(en=en.slice(t+1)),Fv(ah,Qn),i}finally{K=e,pu=!1}}return null}var qr=[],Gr=0,Va=null,Ua=0,yt=[],vt=0,br=null,nn=1,rn="";function or(t,e){qr[Gr++]=Ua,qr[Gr++]=Va,Va=t,Ua=e}function p0(t,e,n){yt[vt++]=nn,yt[vt++]=rn,yt[vt++]=br,br=t;var r=nn;t=rn;var i=32-Rt(r)-1;r&=~(1<<i),n+=1;var s=32-Rt(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,nn=1<<32-Rt(e)+i|n<<i|r,rn=s+t}else nn=1<<s|n<<i|r,rn=t}function mh(t){t.return!==null&&(or(t,1),p0(t,1,0))}function yh(t){for(;t===Va;)Va=qr[--Gr],qr[Gr]=null,Ua=qr[--Gr],qr[Gr]=null;for(;t===br;)br=yt[--vt],yt[vt]=null,rn=yt[--vt],yt[vt]=null,nn=yt[--vt],yt[vt]=null}var at=null,st=null,le=!1,Ct=null;function g0(t,e){var n=_t(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function bp(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,at=t,st=Ln(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,at=t,st=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=br!==null?{id:nn,overflow:rn}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=_t(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,at=t,st=null,!0):!1;default:return!1}}function Wc(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Hc(t){if(le){var e=st;if(e){var n=e;if(!bp(t,e)){if(Wc(t))throw Error($(418));e=Ln(n.nextSibling);var r=at;e&&bp(t,e)?g0(r,n):(t.flags=t.flags&-4097|2,le=!1,at=t)}}else{if(Wc(t))throw Error($(418));t.flags=t.flags&-4097|2,le=!1,at=t}}}function Sp(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;at=t}function Eo(t){if(t!==at)return!1;if(!le)return Sp(t),le=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!jc(t.type,t.memoizedProps)),e&&(e=st)){if(Wc(t))throw m0(),Error($(418));for(;e;)g0(t,e),e=Ln(e.nextSibling)}if(Sp(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error($(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){st=Ln(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}st=null}}else st=at?Ln(t.stateNode.nextSibling):null;return!0}function m0(){for(var t=st;t;)t=Ln(t.nextSibling)}function di(){st=at=null,le=!1}function vh(t){Ct===null?Ct=[t]:Ct.push(t)}var bw=dn.ReactCurrentBatchConfig;function Pt(t,e){if(t&&t.defaultProps){e=fe({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var Wa=Gn(null),Ha=null,Qr=null,_h=null;function xh(){_h=Qr=Ha=null}function bh(t){var e=Wa.current;ie(Wa),t._currentValue=e}function Yc(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function oi(t,e){Ha=t,_h=Qr=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Xe=!0),t.firstContext=null)}function St(t){var e=t._currentValue;if(_h!==t)if(t={context:t,memoizedValue:e,next:null},Qr===null){if(Ha===null)throw Error($(308));Qr=t,Ha.dependencies={lanes:0,firstContext:t}}else Qr=Qr.next=t;return e}var dr=null;function Sh(t){dr===null?dr=[t]:dr.push(t)}function y0(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Sh(e)):(n.next=i.next,i.next=n),e.interleaved=n,fn(t,r)}function fn(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Sn=!1;function wh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function v0(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function ln(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Nn(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Y&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,fn(t,n)}return i=r.interleaved,i===null?(e.next=e,Sh(r)):(e.next=i.next,i.next=e),r.interleaved=e,fn(t,n)}function ca(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,lh(t,n)}}function wp(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Ya(t,e,n,r){var i=t.updateQueue;Sn=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,c=u=l=null,a=s;do{var h=a.lane,d=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=t,y=a;switch(h=e,d=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){f=g.call(d,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,h=typeof g=="function"?g.call(d,f,h):g,h==null)break e;f=fe({},f,h);break e;case 2:Sn=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else d={eventTime:d,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,o|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);wr|=o,t.lanes=o,t.memoizedState=f}}function kp(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error($(191,i));i.call(r)}}}var _0=new yv.Component().refs;function qc(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:fe({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var wl={isMounted:function(t){return(t=t._reactInternals)?Or(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Be(),i=zn(t),s=ln(r,i);s.payload=e,n!=null&&(s.callback=n),e=Nn(t,s,i),e!==null&&(At(e,t,i,r),ca(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Be(),i=zn(t),s=ln(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Nn(t,s,i),e!==null&&(At(e,t,i,r),ca(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Be(),r=zn(t),i=ln(n,r);i.tag=2,e!=null&&(i.callback=e),e=Nn(t,i,r),e!==null&&(At(e,t,r,n),ca(e,t,r))}};function Ep(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!Rs(n,r)||!Rs(i,s):!0}function x0(t,e,n){var r=!1,i=Un,s=e.contextType;return typeof s=="object"&&s!==null?s=St(s):(i=Ze(e)?xr:Fe.current,r=e.contextTypes,s=(r=r!=null)?hi(t,i):Un),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=wl,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function Mp(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&wl.enqueueReplaceState(e,e.state,null)}function Gc(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=_0,wh(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=St(s):(s=Ze(e)?xr:Fe.current,i.context=hi(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(qc(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&wl.enqueueReplaceState(i,i.state,null),Ya(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function zi(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error($(309));var r=n.stateNode}if(!r)throw Error($(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;a===_0&&(a=i.refs={}),o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error($(284));if(!n._owner)throw Error($(290,t))}return t}function Mo(t,e){throw t=Object.prototype.toString.call(e),Error($(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Pp(t){var e=t._init;return e(t._payload)}function b0(t){function e(m,p){if(t){var v=m.deletions;v===null?(m.deletions=[p],m.flags|=16):v.push(p)}}function n(m,p){if(!t)return null;for(;p!==null;)e(m,p),p=p.sibling;return null}function r(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function i(m,p){return m=jn(m,p),m.index=0,m.sibling=null,m}function s(m,p,v){return m.index=v,t?(v=m.alternate,v!==null?(v=v.index,v<p?(m.flags|=2,p):v):(m.flags|=2,p)):(m.flags|=1048576,p)}function o(m){return t&&m.alternate===null&&(m.flags|=2),m}function a(m,p,v,x){return p===null||p.tag!==6?(p=bu(v,m.mode,x),p.return=m,p):(p=i(p,v),p.return=m,p)}function l(m,p,v,x){var b=v.type;return b===Br?c(m,p,v.props.children,x,v.key):p!==null&&(p.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===bn&&Pp(b)===p.type)?(x=i(p,v.props),x.ref=zi(m,p,v),x.return=m,x):(x=ma(v.type,v.key,v.props,null,m.mode,x),x.ref=zi(m,p,v),x.return=m,x)}function u(m,p,v,x){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=Su(v,m.mode,x),p.return=m,p):(p=i(p,v.children||[]),p.return=m,p)}function c(m,p,v,x,b){return p===null||p.tag!==7?(p=mr(v,m.mode,x,b),p.return=m,p):(p=i(p,v),p.return=m,p)}function f(m,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=bu(""+p,m.mode,v),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case go:return v=ma(p.type,p.key,p.props,null,m.mode,v),v.ref=zi(m,null,p),v.return=m,v;case jr:return p=Su(p,m.mode,v),p.return=m,p;case bn:var x=p._init;return f(m,x(p._payload),v)}if(Ji(p)||Ii(p))return p=mr(p,m.mode,v,null),p.return=m,p;Mo(m,p)}return null}function h(m,p,v,x){var b=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return b!==null?null:a(m,p,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case go:return v.key===b?l(m,p,v,x):null;case jr:return v.key===b?u(m,p,v,x):null;case bn:return b=v._init,h(m,p,b(v._payload),x)}if(Ji(v)||Ii(v))return b!==null?null:c(m,p,v,x,null);Mo(m,v)}return null}function d(m,p,v,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return m=m.get(v)||null,a(p,m,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case go:return m=m.get(x.key===null?v:x.key)||null,l(p,m,x,b);case jr:return m=m.get(x.key===null?v:x.key)||null,u(p,m,x,b);case bn:var E=x._init;return d(m,p,v,E(x._payload),b)}if(Ji(x)||Ii(x))return m=m.get(v)||null,c(p,m,x,b,null);Mo(p,x)}return null}function g(m,p,v,x){for(var b=null,E=null,O=p,T=p=0,I=null;O!==null&&T<v.length;T++){O.index>T?(I=O,O=null):I=O.sibling;var R=h(m,O,v[T],x);if(R===null){O===null&&(O=I);break}t&&O&&R.alternate===null&&e(m,O),p=s(R,p,T),E===null?b=R:E.sibling=R,E=R,O=I}if(T===v.length)return n(m,O),le&&or(m,T),b;if(O===null){for(;T<v.length;T++)O=f(m,v[T],x),O!==null&&(p=s(O,p,T),E===null?b=O:E.sibling=O,E=O);return le&&or(m,T),b}for(O=r(m,O);T<v.length;T++)I=d(O,m,T,v[T],x),I!==null&&(t&&I.alternate!==null&&O.delete(I.key===null?T:I.key),p=s(I,p,T),E===null?b=I:E.sibling=I,E=I);return t&&O.forEach(function(A){return e(m,A)}),le&&or(m,T),b}function y(m,p,v,x){var b=Ii(v);if(typeof b!="function")throw Error($(150));if(v=b.call(v),v==null)throw Error($(151));for(var E=b=null,O=p,T=p=0,I=null,R=v.next();O!==null&&!R.done;T++,R=v.next()){O.index>T?(I=O,O=null):I=O.sibling;var A=h(m,O,R.value,x);if(A===null){O===null&&(O=I);break}t&&O&&A.alternate===null&&e(m,O),p=s(A,p,T),E===null?b=A:E.sibling=A,E=A,O=I}if(R.done)return n(m,O),le&&or(m,T),b;if(O===null){for(;!R.done;T++,R=v.next())R=f(m,R.value,x),R!==null&&(p=s(R,p,T),E===null?b=R:E.sibling=R,E=R);return le&&or(m,T),b}for(O=r(m,O);!R.done;T++,R=v.next())R=d(O,m,T,R.value,x),R!==null&&(t&&R.alternate!==null&&O.delete(R.key===null?T:R.key),p=s(R,p,T),E===null?b=R:E.sibling=R,E=R);return t&&O.forEach(function(j){return e(m,j)}),le&&or(m,T),b}function _(m,p,v,x){if(typeof v=="object"&&v!==null&&v.type===Br&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case go:e:{for(var b=v.key,E=p;E!==null;){if(E.key===b){if(b=v.type,b===Br){if(E.tag===7){n(m,E.sibling),p=i(E,v.props.children),p.return=m,m=p;break e}}else if(E.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===bn&&Pp(b)===E.type){n(m,E.sibling),p=i(E,v.props),p.ref=zi(m,E,v),p.return=m,m=p;break e}n(m,E);break}else e(m,E);E=E.sibling}v.type===Br?(p=mr(v.props.children,m.mode,x,v.key),p.return=m,m=p):(x=ma(v.type,v.key,v.props,null,m.mode,x),x.ref=zi(m,p,v),x.return=m,m=x)}return o(m);case jr:e:{for(E=v.key;p!==null;){if(p.key===E)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(m,p.sibling),p=i(p,v.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else e(m,p);p=p.sibling}p=Su(v,m.mode,x),p.return=m,m=p}return o(m);case bn:return E=v._init,_(m,p,E(v._payload),x)}if(Ji(v))return g(m,p,v,x);if(Ii(v))return y(m,p,v,x);Mo(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(m,p.sibling),p=i(p,v),p.return=m,m=p):(n(m,p),p=bu(v,m.mode,x),p.return=m,m=p),o(m)):n(m,p)}return _}var pi=b0(!0),S0=b0(!1),ro={},Wt=Gn(ro),Ls=Gn(ro),Ns=Gn(ro);function pr(t){if(t===ro)throw Error($(174));return t}function kh(t,e){switch(Z(Ns,e),Z(Ls,t),Z(Wt,ro),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Mc(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Mc(e,t)}ie(Wt),Z(Wt,e)}function gi(){ie(Wt),ie(Ls),ie(Ns)}function w0(t){pr(Ns.current);var e=pr(Wt.current),n=Mc(e,t.type);e!==n&&(Z(Ls,t),Z(Wt,n))}function Eh(t){Ls.current===t&&(ie(Wt),ie(Ls))}var ue=Gn(0);function qa(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var gu=[];function Mh(){for(var t=0;t<gu.length;t++)gu[t]._workInProgressVersionPrimary=null;gu.length=0}var fa=dn.ReactCurrentDispatcher,mu=dn.ReactCurrentBatchConfig,Sr=0,ce=null,xe=null,Ee=null,Ga=!1,hs=!1,Fs=0,Sw=0;function Ae(){throw Error($(321))}function Ph(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!$t(t[n],e[n]))return!1;return!0}function Oh(t,e,n,r,i,s){if(Sr=s,ce=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,fa.current=t===null||t.memoizedState===null?Mw:Pw,t=n(r,i),hs){s=0;do{if(hs=!1,Fs=0,25<=s)throw Error($(301));s+=1,Ee=xe=null,e.updateQueue=null,fa.current=Ow,t=n(r,i)}while(hs)}if(fa.current=Qa,e=xe!==null&&xe.next!==null,Sr=0,Ee=xe=ce=null,Ga=!1,e)throw Error($(300));return t}function Ch(){var t=Fs!==0;return Fs=0,t}function jt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ee===null?ce.memoizedState=Ee=t:Ee=Ee.next=t,Ee}function wt(){if(xe===null){var t=ce.alternate;t=t!==null?t.memoizedState:null}else t=xe.next;var e=Ee===null?ce.memoizedState:Ee.next;if(e!==null)Ee=e,xe=t;else{if(t===null)throw Error($(310));xe=t,t={memoizedState:xe.memoizedState,baseState:xe.baseState,baseQueue:xe.baseQueue,queue:xe.queue,next:null},Ee===null?ce.memoizedState=Ee=t:Ee=Ee.next=t}return Ee}function zs(t,e){return typeof e=="function"?e(t):e}function yu(t){var e=wt(),n=e.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=t;var r=xe,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((Sr&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,ce.lanes|=c,wr|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,$t(r,e.memoizedState)||(Xe=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,ce.lanes|=s,wr|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function vu(t){var e=wt(),n=e.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);$t(s,e.memoizedState)||(Xe=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function k0(){}function E0(t,e){var n=ce,r=wt(),i=e(),s=!$t(r.memoizedState,i);if(s&&(r.memoizedState=i,Xe=!0),r=r.queue,Th(O0.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Ee!==null&&Ee.memoizedState.tag&1){if(n.flags|=2048,js(9,P0.bind(null,n,r,i,e),void 0,null),Pe===null)throw Error($(349));Sr&30||M0(n,e,i)}return i}function M0(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ce.updateQueue,e===null?(e={lastEffect:null,stores:null},ce.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function P0(t,e,n,r){e.value=n,e.getSnapshot=r,C0(e)&&T0(t)}function O0(t,e,n){return n(function(){C0(e)&&T0(t)})}function C0(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!$t(t,n)}catch{return!0}}function T0(t){var e=fn(t,1);e!==null&&At(e,t,1,-1)}function Op(t){var e=jt();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:t},e.queue=t,t=t.dispatch=Ew.bind(null,ce,t),[e.memoizedState,t]}function js(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ce.updateQueue,e===null?(e={lastEffect:null,stores:null},ce.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function D0(){return wt().memoizedState}function ha(t,e,n,r){var i=jt();ce.flags|=t,i.memoizedState=js(1|e,n,void 0,r===void 0?null:r)}function kl(t,e,n,r){var i=wt();r=r===void 0?null:r;var s=void 0;if(xe!==null){var o=xe.memoizedState;if(s=o.destroy,r!==null&&Ph(r,o.deps)){i.memoizedState=js(e,n,s,r);return}}ce.flags|=t,i.memoizedState=js(1|e,n,s,r)}function Cp(t,e){return ha(8390656,8,t,e)}function Th(t,e){return kl(2048,8,t,e)}function R0(t,e){return kl(4,2,t,e)}function A0(t,e){return kl(4,4,t,e)}function I0(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function $0(t,e,n){return n=n!=null?n.concat([t]):null,kl(4,4,I0.bind(null,e,t),n)}function Dh(){}function L0(t,e){var n=wt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Ph(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function N0(t,e){var n=wt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Ph(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function F0(t,e,n){return Sr&21?($t(n,e)||(n=Bv(),ce.lanes|=n,wr|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Xe=!0),t.memoizedState=n)}function ww(t,e){var n=K;K=n!==0&&4>n?n:4,t(!0);var r=mu.transition;mu.transition={};try{t(!1),e()}finally{K=n,mu.transition=r}}function z0(){return wt().memoizedState}function kw(t,e,n){var r=zn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},j0(t))B0(e,n);else if(n=y0(t,e,n,r),n!==null){var i=Be();At(n,t,r,i),V0(n,e,r)}}function Ew(t,e,n){var r=zn(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(j0(t))B0(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,$t(a,o)){var l=e.interleaved;l===null?(i.next=i,Sh(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=y0(t,e,i,r),n!==null&&(i=Be(),At(n,t,r,i),V0(n,e,r))}}function j0(t){var e=t.alternate;return t===ce||e!==null&&e===ce}function B0(t,e){hs=Ga=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function V0(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,lh(t,n)}}var Qa={readContext:St,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useInsertionEffect:Ae,useLayoutEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useMutableSource:Ae,useSyncExternalStore:Ae,useId:Ae,unstable_isNewReconciler:!1},Mw={readContext:St,useCallback:function(t,e){return jt().memoizedState=[t,e===void 0?null:e],t},useContext:St,useEffect:Cp,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,ha(4194308,4,I0.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ha(4194308,4,t,e)},useInsertionEffect:function(t,e){return ha(4,2,t,e)},useMemo:function(t,e){var n=jt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=jt();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=kw.bind(null,ce,t),[r.memoizedState,t]},useRef:function(t){var e=jt();return t={current:t},e.memoizedState=t},useState:Op,useDebugValue:Dh,useDeferredValue:function(t){return jt().memoizedState=t},useTransition:function(){var t=Op(!1),e=t[0];return t=ww.bind(null,t[1]),jt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ce,i=jt();if(le){if(n===void 0)throw Error($(407));n=n()}else{if(n=e(),Pe===null)throw Error($(349));Sr&30||M0(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,Cp(O0.bind(null,r,s,t),[t]),r.flags|=2048,js(9,P0.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=jt(),e=Pe.identifierPrefix;if(le){var n=rn,r=nn;n=(r&~(1<<32-Rt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Fs++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=Sw++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},Pw={readContext:St,useCallback:L0,useContext:St,useEffect:Th,useImperativeHandle:$0,useInsertionEffect:R0,useLayoutEffect:A0,useMemo:N0,useReducer:yu,useRef:D0,useState:function(){return yu(zs)},useDebugValue:Dh,useDeferredValue:function(t){var e=wt();return F0(e,xe.memoizedState,t)},useTransition:function(){var t=yu(zs)[0],e=wt().memoizedState;return[t,e]},useMutableSource:k0,useSyncExternalStore:E0,useId:z0,unstable_isNewReconciler:!1},Ow={readContext:St,useCallback:L0,useContext:St,useEffect:Th,useImperativeHandle:$0,useInsertionEffect:R0,useLayoutEffect:A0,useMemo:N0,useReducer:vu,useRef:D0,useState:function(){return vu(zs)},useDebugValue:Dh,useDeferredValue:function(t){var e=wt();return xe===null?e.memoizedState=t:F0(e,xe.memoizedState,t)},useTransition:function(){var t=vu(zs)[0],e=wt().memoizedState;return[t,e]},useMutableSource:k0,useSyncExternalStore:E0,useId:z0,unstable_isNewReconciler:!1};function mi(t,e){try{var n="",r=e;do n+=nS(r),r=r.return;while(r);var i=n}catch(s){i=`
39
- Error generating stack: `+s.message+`
40
- `+s.stack}return{value:t,source:e,stack:i,digest:null}}function _u(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Qc(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var Cw=typeof WeakMap=="function"?WeakMap:Map;function U0(t,e,n){n=ln(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Xa||(Xa=!0,of=r),Qc(t,e)},n}function W0(t,e,n){n=ln(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Qc(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Qc(t,e),typeof r!="function"&&(Fn===null?Fn=new Set([this]):Fn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Tp(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new Cw;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=Uw.bind(null,t,e,n),e.then(t,t))}function Dp(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Rp(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=ln(-1,1),e.tag=2,Nn(n,e,1))),n.lanes|=1),t)}var Tw=dn.ReactCurrentOwner,Xe=!1;function je(t,e,n,r){e.child=t===null?S0(e,null,n,r):pi(e,t.child,n,r)}function Ap(t,e,n,r,i){n=n.render;var s=e.ref;return oi(e,i),r=Oh(t,e,n,r,s,i),n=Ch(),t!==null&&!Xe?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,hn(t,e,i)):(le&&n&&mh(e),e.flags|=1,je(t,e,r,i),e.child)}function Ip(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!zh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,H0(t,e,s,r,i)):(t=ma(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Rs,n(o,r)&&t.ref===e.ref)return hn(t,e,i)}return e.flags|=1,t=jn(s,r),t.ref=e.ref,t.return=e,e.child=t}function H0(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(Rs(s,r)&&t.ref===e.ref)if(Xe=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(Xe=!0);else return e.lanes=t.lanes,hn(t,e,i)}return Kc(t,e,n,r,i)}function Y0(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Z(Xr,nt),nt|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Z(Xr,nt),nt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Z(Xr,nt),nt|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,Z(Xr,nt),nt|=r;return je(t,e,i,n),e.child}function q0(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Kc(t,e,n,r,i){var s=Ze(n)?xr:Fe.current;return s=hi(e,s),oi(e,i),n=Oh(t,e,n,r,s,i),r=Ch(),t!==null&&!Xe?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,hn(t,e,i)):(le&&r&&mh(e),e.flags|=1,je(t,e,n,i),e.child)}function $p(t,e,n,r,i){if(Ze(n)){var s=!0;Ba(e)}else s=!1;if(oi(e,i),e.stateNode===null)da(t,e),x0(e,n,r),Gc(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=St(u):(u=Ze(n)?xr:Fe.current,u=hi(e,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Mp(e,o,r,u),Sn=!1;var h=e.memoizedState;o.state=h,Ya(e,r,o,i),l=e.memoizedState,a!==r||h!==l||Je.current||Sn?(typeof c=="function"&&(qc(e,n,c,r),l=e.memoizedState),(a=Sn||Ep(e,n,a,r,h,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,v0(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Pt(e.type,a),o.props=u,f=e.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=St(l):(l=Ze(n)?xr:Fe.current,l=hi(e,l));var d=n.getDerivedStateFromProps;(c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==l)&&Mp(e,o,r,l),Sn=!1,h=e.memoizedState,o.state=h,Ya(e,r,o,i);var g=e.memoizedState;a!==f||h!==g||Je.current||Sn?(typeof d=="function"&&(qc(e,n,d,r),g=e.memoizedState),(u=Sn||Ep(e,n,u,r,h,g,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),o.props=r,o.state=g,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return Xc(t,e,n,r,s,i)}function Xc(t,e,n,r,i,s){q0(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&xp(e,n,!1),hn(t,e,s);r=e.stateNode,Tw.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=pi(e,t.child,null,s),e.child=pi(e,null,a,s)):je(t,e,a,s),e.memoizedState=r.state,i&&xp(e,n,!0),e.child}function G0(t){var e=t.stateNode;e.pendingContext?_p(t,e.pendingContext,e.pendingContext!==e.context):e.context&&_p(t,e.context,!1),kh(t,e.containerInfo)}function Lp(t,e,n,r,i){return di(),vh(i),e.flags|=256,je(t,e,n,r),e.child}var Jc={dehydrated:null,treeContext:null,retryLane:0};function Zc(t){return{baseLanes:t,cachePool:null,transitions:null}}function Q0(t,e,n){var r=e.pendingProps,i=ue.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Z(ue,i&1),t===null)return Hc(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Pl(o,r,0,null),t=mr(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Zc(n),e.memoizedState=Jc,t):Rh(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return Dw(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=jn(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=jn(a,s):(s=mr(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Zc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=Jc,r}return s=t.child,t=s.sibling,r=jn(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Rh(t,e){return e=Pl({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Po(t,e,n,r){return r!==null&&vh(r),pi(e,t.child,null,n),t=Rh(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Dw(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=_u(Error($(422))),Po(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=Pl({mode:"visible",children:r.children},i,0,null),s=mr(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&pi(e,t.child,null,o),e.child.memoizedState=Zc(o),e.memoizedState=Jc,s);if(!(e.mode&1))return Po(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error($(419)),r=_u(s,r,void 0),Po(t,e,o,r)}if(a=(o&t.childLanes)!==0,Xe||a){if(r=Pe,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,fn(t,i),At(r,t,i,-1))}return Fh(),r=_u(Error($(421))),Po(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=Ww.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,st=Ln(i.nextSibling),at=e,le=!0,Ct=null,t!==null&&(yt[vt++]=nn,yt[vt++]=rn,yt[vt++]=br,nn=t.id,rn=t.overflow,br=e),e=Rh(e,r.children),e.flags|=4096,e)}function Np(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Yc(t.return,e,n)}function xu(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function K0(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(je(t,e,r.children,n),r=ue.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Np(t,n,e);else if(t.tag===19)Np(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Z(ue,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&qa(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),xu(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&qa(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}xu(e,!0,n,null,s);break;case"together":xu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function da(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function hn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),wr|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error($(153));if(e.child!==null){for(t=e.child,n=jn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=jn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Rw(t,e,n){switch(e.tag){case 3:G0(e),di();break;case 5:w0(e);break;case 1:Ze(e.type)&&Ba(e);break;case 4:kh(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Z(Wa,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Z(ue,ue.current&1),e.flags|=128,null):n&e.child.childLanes?Q0(t,e,n):(Z(ue,ue.current&1),t=hn(t,e,n),t!==null?t.sibling:null);Z(ue,ue.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return K0(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Z(ue,ue.current),r)break;return null;case 22:case 23:return e.lanes=0,Y0(t,e,n)}return hn(t,e,n)}var X0,ef,J0,Z0;X0=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ef=function(){};J0=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,pr(Wt.current);var s=null;switch(n){case"input":i=Sc(t,i),r=Sc(t,r),s=[];break;case"select":i=fe({},i,{value:void 0}),r=fe({},r,{value:void 0}),s=[];break;case"textarea":i=Ec(t,i),r=Ec(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=za)}Pc(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Es.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Es.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ee("scroll",t),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};Z0=function(t,e,n,r){n!==r&&(e.flags|=4)};function ji(t,e){if(!le)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ie(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function Aw(t,e,n){var r=e.pendingProps;switch(yh(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(e),null;case 1:return Ze(e.type)&&ja(),Ie(e),null;case 3:return r=e.stateNode,gi(),ie(Je),ie(Fe),Mh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Eo(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ct!==null&&(uf(Ct),Ct=null))),ef(t,e),Ie(e),null;case 5:Eh(e);var i=pr(Ns.current);if(n=e.type,t!==null&&e.stateNode!=null)J0(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error($(166));return Ie(e),null}if(t=pr(Wt.current),Eo(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Vt]=e,r[$s]=s,t=(e.mode&1)!==0,n){case"dialog":ee("cancel",r),ee("close",r);break;case"iframe":case"object":case"embed":ee("load",r);break;case"video":case"audio":for(i=0;i<es.length;i++)ee(es[i],r);break;case"source":ee("error",r);break;case"img":case"image":case"link":ee("error",r),ee("load",r);break;case"details":ee("toggle",r);break;case"input":Yd(r,s),ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ee("invalid",r);break;case"textarea":Gd(r,s),ee("invalid",r)}Pc(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&ko(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&ko(r.textContent,a,t),i=["children",""+a]):Es.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ee("scroll",r)}switch(n){case"input":mo(r),qd(r,s,!0);break;case"textarea":mo(r),Qd(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=za)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Mv(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Vt]=e,t[$s]=r,X0(t,e,!1,!1),e.stateNode=t;e:{switch(o=Oc(n,r),n){case"dialog":ee("cancel",t),ee("close",t),i=r;break;case"iframe":case"object":case"embed":ee("load",t),i=r;break;case"video":case"audio":for(i=0;i<es.length;i++)ee(es[i],t);i=r;break;case"source":ee("error",t),i=r;break;case"img":case"image":case"link":ee("error",t),ee("load",t),i=r;break;case"details":ee("toggle",t),i=r;break;case"input":Yd(t,r),i=Sc(t,r),ee("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=fe({},r,{value:void 0}),ee("invalid",t);break;case"textarea":Gd(t,r),i=Ec(t,r),ee("invalid",t);break;default:i=r}Pc(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Cv(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Pv(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ms(t,l):typeof l=="number"&&Ms(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Es.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ee("scroll",t):l!=null&&nh(t,s,l,o))}switch(n){case"input":mo(t),qd(t,r,!1);break;case"textarea":mo(t),Qd(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Vn(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?ni(t,!!r.multiple,s,!1):r.defaultValue!=null&&ni(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=za)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Ie(e),null;case 6:if(t&&e.stateNode!=null)Z0(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error($(166));if(n=pr(Ns.current),pr(Wt.current),Eo(e)){if(r=e.stateNode,n=e.memoizedProps,r[Vt]=e,(s=r.nodeValue!==n)&&(t=at,t!==null))switch(t.tag){case 3:ko(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ko(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vt]=e,e.stateNode=r}return Ie(e),null;case 13:if(ie(ue),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(le&&st!==null&&e.mode&1&&!(e.flags&128))m0(),di(),e.flags|=98560,s=!1;else if(s=Eo(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error($(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error($(317));s[Vt]=e}else di(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ie(e),s=!1}else Ct!==null&&(uf(Ct),Ct=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||ue.current&1?be===0&&(be=3):Fh())),e.updateQueue!==null&&(e.flags|=4),Ie(e),null);case 4:return gi(),ef(t,e),t===null&&As(e.stateNode.containerInfo),Ie(e),null;case 10:return bh(e.type._context),Ie(e),null;case 17:return Ze(e.type)&&ja(),Ie(e),null;case 19:if(ie(ue),s=e.memoizedState,s===null)return Ie(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)ji(s,!1);else{if(be!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=qa(t),o!==null){for(e.flags|=128,ji(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Z(ue,ue.current&1|2),e.child}t=t.sibling}s.tail!==null&&me()>yi&&(e.flags|=128,r=!0,ji(s,!1),e.lanes=4194304)}else{if(!r)if(t=qa(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),ji(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!le)return Ie(e),null}else 2*me()-s.renderingStartTime>yi&&n!==1073741824&&(e.flags|=128,r=!0,ji(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=me(),e.sibling=null,n=ue.current,Z(ue,r?n&1|2:n&1),e):(Ie(e),null);case 22:case 23:return Nh(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?nt&1073741824&&(Ie(e),e.subtreeFlags&6&&(e.flags|=8192)):Ie(e),null;case 24:return null;case 25:return null}throw Error($(156,e.tag))}function Iw(t,e){switch(yh(e),e.tag){case 1:return Ze(e.type)&&ja(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return gi(),ie(Je),ie(Fe),Mh(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Eh(e),null;case 13:if(ie(ue),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error($(340));di()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ie(ue),null;case 4:return gi(),null;case 10:return bh(e.type._context),null;case 22:case 23:return Nh(),null;case 24:return null;default:return null}}var Oo=!1,Le=!1,$w=typeof WeakSet=="function"?WeakSet:Set,z=null;function Kr(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){de(t,e,r)}else n.current=null}function tf(t,e,n){try{n()}catch(r){de(t,e,r)}}var Fp=!1;function Lw(t,e){if(Fc=La,t=r0(),gh(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=t,h=null;t:for(;;){for(var d;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===t)break t;if(h===n&&++u===i&&(a=o),h===s&&++c===r&&(l=o),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(zc={focusedElem:t,selectionRange:n},La=!1,z=e;z!==null;)if(e=z,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,z=t;else for(;z!==null;){e=z;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,_=g.memoizedState,m=e.stateNode,p=m.getSnapshotBeforeUpdate(e.elementType===e.type?y:Pt(e.type,y),_);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=e.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(x){de(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,z=t;break}z=e.return}return g=Fp,Fp=!1,g}function ds(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&tf(e,n,s)}i=i.next}while(i!==r)}}function El(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function nf(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function e_(t){var e=t.alternate;e!==null&&(t.alternate=null,e_(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Vt],delete e[$s],delete e[Vc],delete e[vw],delete e[_w])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function t_(t){return t.tag===5||t.tag===3||t.tag===4}function zp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||t_(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function rf(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=za));else if(r!==4&&(t=t.child,t!==null))for(rf(t,e,n),t=t.sibling;t!==null;)rf(t,e,n),t=t.sibling}function sf(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(sf(t,e,n),t=t.sibling;t!==null;)sf(t,e,n),t=t.sibling}var Ce=null,Ot=!1;function vn(t,e,n){for(n=n.child;n!==null;)n_(t,e,n),n=n.sibling}function n_(t,e,n){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(yl,n)}catch{}switch(n.tag){case 5:Le||Kr(n,e);case 6:var r=Ce,i=Ot;Ce=null,vn(t,e,n),Ce=r,Ot=i,Ce!==null&&(Ot?(t=Ce,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ce.removeChild(n.stateNode));break;case 18:Ce!==null&&(Ot?(t=Ce,n=n.stateNode,t.nodeType===8?du(t.parentNode,n):t.nodeType===1&&du(t,n),Ts(t)):du(Ce,n.stateNode));break;case 4:r=Ce,i=Ot,Ce=n.stateNode.containerInfo,Ot=!0,vn(t,e,n),Ce=r,Ot=i;break;case 0:case 11:case 14:case 15:if(!Le&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&tf(n,e,o),i=i.next}while(i!==r)}vn(t,e,n);break;case 1:if(!Le&&(Kr(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){de(n,e,a)}vn(t,e,n);break;case 21:vn(t,e,n);break;case 22:n.mode&1?(Le=(r=Le)||n.memoizedState!==null,vn(t,e,n),Le=r):vn(t,e,n);break;default:vn(t,e,n)}}function jp(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new $w),e.forEach(function(r){var i=Hw.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Et(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ce=a.stateNode,Ot=!1;break e;case 3:Ce=a.stateNode.containerInfo,Ot=!0;break e;case 4:Ce=a.stateNode.containerInfo,Ot=!0;break e}a=a.return}if(Ce===null)throw Error($(160));n_(s,o,i),Ce=null,Ot=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){de(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)r_(e,t),e=e.sibling}function r_(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Et(e,t),Nt(t),r&4){try{ds(3,t,t.return),El(3,t)}catch(y){de(t,t.return,y)}try{ds(5,t,t.return)}catch(y){de(t,t.return,y)}}break;case 1:Et(e,t),Nt(t),r&512&&n!==null&&Kr(n,n.return);break;case 5:if(Et(e,t),Nt(t),r&512&&n!==null&&Kr(n,n.return),t.flags&32){var i=t.stateNode;try{Ms(i,"")}catch(y){de(t,t.return,y)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&kv(i,s),Oc(a,o);var u=Oc(a,s);for(o=0;o<l.length;o+=2){var c=l[o],f=l[o+1];c==="style"?Cv(i,f):c==="dangerouslySetInnerHTML"?Pv(i,f):c==="children"?Ms(i,f):nh(i,c,f,u)}switch(a){case"input":wc(i,s);break;case"textarea":Ev(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var d=s.value;d!=null?ni(i,!!s.multiple,d,!1):h!==!!s.multiple&&(s.defaultValue!=null?ni(i,!!s.multiple,s.defaultValue,!0):ni(i,!!s.multiple,s.multiple?[]:"",!1))}i[$s]=s}catch(y){de(t,t.return,y)}}break;case 6:if(Et(e,t),Nt(t),r&4){if(t.stateNode===null)throw Error($(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(y){de(t,t.return,y)}}break;case 3:if(Et(e,t),Nt(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ts(e.containerInfo)}catch(y){de(t,t.return,y)}break;case 4:Et(e,t),Nt(t);break;case 13:Et(e,t),Nt(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||($h=me())),r&4&&jp(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(Le=(u=Le)||c,Et(e,t),Le=u):Et(e,t),Nt(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(z=t,c=t.child;c!==null;){for(f=z=c;z!==null;){switch(h=z,d=h.child,h.tag){case 0:case 11:case 14:case 15:ds(4,h,h.return);break;case 1:Kr(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(y){de(r,n,y)}}break;case 5:Kr(h,h.return);break;case 22:if(h.memoizedState!==null){Vp(f);continue}}d!==null?(d.return=h,z=d):Vp(f)}c=c.sibling}e:for(c=null,f=t;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Ov("display",o))}catch(y){de(t,t.return,y)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){de(t,t.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Et(e,t),Nt(t),r&4&&jp(t);break;case 21:break;default:Et(e,t),Nt(t)}}function Nt(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(t_(n)){var r=n;break e}n=n.return}throw Error($(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ms(i,""),r.flags&=-33);var s=zp(t);sf(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=zp(t);rf(t,a,o);break;default:throw Error($(161))}}catch(l){de(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Nw(t,e,n){z=t,i_(t)}function i_(t,e,n){for(var r=(t.mode&1)!==0;z!==null;){var i=z,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Oo;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Le;a=Oo;var u=Le;if(Oo=o,(Le=l)&&!u)for(z=i;z!==null;)o=z,l=o.child,o.tag===22&&o.memoizedState!==null?Up(i):l!==null?(l.return=o,z=l):Up(i);for(;s!==null;)z=s,i_(s),s=s.sibling;z=i,Oo=a,Le=u}Bp(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,z=s):Bp(t)}}function Bp(t){for(;z!==null;){var e=z;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Le||El(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Le)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Pt(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&kp(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}kp(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Ts(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}Le||e.flags&512&&nf(e)}catch(h){de(e,e.return,h)}}if(e===t){z=null;break}if(n=e.sibling,n!==null){n.return=e.return,z=n;break}z=e.return}}function Vp(t){for(;z!==null;){var e=z;if(e===t){z=null;break}var n=e.sibling;if(n!==null){n.return=e.return,z=n;break}z=e.return}}function Up(t){for(;z!==null;){var e=z;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{El(4,e)}catch(l){de(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){de(e,i,l)}}var s=e.return;try{nf(e)}catch(l){de(e,s,l)}break;case 5:var o=e.return;try{nf(e)}catch(l){de(e,o,l)}}}catch(l){de(e,e.return,l)}if(e===t){z=null;break}var a=e.sibling;if(a!==null){a.return=e.return,z=a;break}z=e.return}}var Fw=Math.ceil,Ka=dn.ReactCurrentDispatcher,Ah=dn.ReactCurrentOwner,bt=dn.ReactCurrentBatchConfig,Y=0,Pe=null,_e=null,Te=0,nt=0,Xr=Gn(0),be=0,Bs=null,wr=0,Ml=0,Ih=0,ps=null,Ge=null,$h=0,yi=1/0,Jt=null,Xa=!1,of=null,Fn=null,Co=!1,Pn=null,Ja=0,gs=0,af=null,pa=-1,ga=0;function Be(){return Y&6?me():pa!==-1?pa:pa=me()}function zn(t){return t.mode&1?Y&2&&Te!==0?Te&-Te:bw.transition!==null?(ga===0&&(ga=Bv()),ga):(t=K,t!==0||(t=window.event,t=t===void 0?16:Gv(t.type)),t):1}function At(t,e,n,r){if(50<gs)throw gs=0,af=null,Error($(185));eo(t,n,r),(!(Y&2)||t!==Pe)&&(t===Pe&&(!(Y&2)&&(Ml|=n),be===4&&En(t,Te)),et(t,r),n===1&&Y===0&&!(e.mode&1)&&(yi=me()+500,Sl&&Qn()))}function et(t,e){var n=t.callbackNode;bS(t,e);var r=$a(t,t===Pe?Te:0);if(r===0)n!==null&&Jd(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Jd(n),e===1)t.tag===0?xw(Wp.bind(null,t)):d0(Wp.bind(null,t)),mw(function(){!(Y&6)&&Qn()}),n=null;else{switch(Vv(r)){case 1:n=ah;break;case 4:n=zv;break;case 16:n=Ia;break;case 536870912:n=jv;break;default:n=Ia}n=h_(n,s_.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function s_(t,e){if(pa=-1,ga=0,Y&6)throw Error($(327));var n=t.callbackNode;if(ai()&&t.callbackNode!==n)return null;var r=$a(t,t===Pe?Te:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Za(t,r);else{e=r;var i=Y;Y|=2;var s=a_();(Pe!==t||Te!==e)&&(Jt=null,yi=me()+500,gr(t,e));do try{Bw();break}catch(a){o_(t,a)}while(!0);xh(),Ka.current=s,Y=i,_e!==null?e=0:(Pe=null,Te=0,e=be)}if(e!==0){if(e===2&&(i=Ac(t),i!==0&&(r=i,e=lf(t,i))),e===1)throw n=Bs,gr(t,0),En(t,r),et(t,me()),n;if(e===6)En(t,r);else{if(i=t.current.alternate,!(r&30)&&!zw(i)&&(e=Za(t,r),e===2&&(s=Ac(t),s!==0&&(r=s,e=lf(t,s))),e===1))throw n=Bs,gr(t,0),En(t,r),et(t,me()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error($(345));case 2:ar(t,Ge,Jt);break;case 3:if(En(t,r),(r&130023424)===r&&(e=$h+500-me(),10<e)){if($a(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Be(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Bc(ar.bind(null,t,Ge,Jt),e);break}ar(t,Ge,Jt);break;case 4:if(En(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Rt(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Fw(r/1960))-r,10<r){t.timeoutHandle=Bc(ar.bind(null,t,Ge,Jt),r);break}ar(t,Ge,Jt);break;case 5:ar(t,Ge,Jt);break;default:throw Error($(329))}}}return et(t,me()),t.callbackNode===n?s_.bind(null,t):null}function lf(t,e){var n=ps;return t.current.memoizedState.isDehydrated&&(gr(t,e).flags|=256),t=Za(t,e),t!==2&&(e=Ge,Ge=n,e!==null&&uf(e)),t}function uf(t){Ge===null?Ge=t:Ge.push.apply(Ge,t)}function zw(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!$t(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function En(t,e){for(e&=~Ih,e&=~Ml,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Rt(e),r=1<<n;t[n]=-1,e&=~r}}function Wp(t){if(Y&6)throw Error($(327));ai();var e=$a(t,0);if(!(e&1))return et(t,me()),null;var n=Za(t,e);if(t.tag!==0&&n===2){var r=Ac(t);r!==0&&(e=r,n=lf(t,r))}if(n===1)throw n=Bs,gr(t,0),En(t,e),et(t,me()),n;if(n===6)throw Error($(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,ar(t,Ge,Jt),et(t,me()),null}function Lh(t,e){var n=Y;Y|=1;try{return t(e)}finally{Y=n,Y===0&&(yi=me()+500,Sl&&Qn())}}function kr(t){Pn!==null&&Pn.tag===0&&!(Y&6)&&ai();var e=Y;Y|=1;var n=bt.transition,r=K;try{if(bt.transition=null,K=1,t)return t()}finally{K=r,bt.transition=n,Y=e,!(Y&6)&&Qn()}}function Nh(){nt=Xr.current,ie(Xr)}function gr(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,gw(n)),_e!==null)for(n=_e.return;n!==null;){var r=n;switch(yh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ja();break;case 3:gi(),ie(Je),ie(Fe),Mh();break;case 5:Eh(r);break;case 4:gi();break;case 13:ie(ue);break;case 19:ie(ue);break;case 10:bh(r.type._context);break;case 22:case 23:Nh()}n=n.return}if(Pe=t,_e=t=jn(t.current,null),Te=nt=e,be=0,Bs=null,Ih=Ml=wr=0,Ge=ps=null,dr!==null){for(e=0;e<dr.length;e++)if(n=dr[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}dr=null}return t}function o_(t,e){do{var n=_e;try{if(xh(),fa.current=Qa,Ga){for(var r=ce.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ga=!1}if(Sr=0,Ee=xe=ce=null,hs=!1,Fs=0,Ah.current=null,n===null||n.return===null){be=1,Bs=e,_e=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=Te,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var d=Dp(o);if(d!==null){d.flags&=-257,Rp(d,o,a,s,e),d.mode&1&&Tp(s,u,e),e=d,l=u;var g=e.updateQueue;if(g===null){var y=new Set;y.add(l),e.updateQueue=y}else g.add(l);break e}else{if(!(e&1)){Tp(s,u,e),Fh();break e}l=Error($(426))}}else if(le&&a.mode&1){var _=Dp(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Rp(_,o,a,s,e),vh(mi(l,a));break e}}s=l=mi(l,a),be!==4&&(be=2),ps===null?ps=[s]:ps.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var m=U0(s,l,e);wp(s,m);break e;case 1:a=l;var p=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Fn===null||!Fn.has(v)))){s.flags|=65536,e&=-e,s.lanes|=e;var x=W0(s,a,e);wp(s,x);break e}}s=s.return}while(s!==null)}u_(n)}catch(b){e=b,_e===n&&n!==null&&(_e=n=n.return);continue}break}while(!0)}function a_(){var t=Ka.current;return Ka.current=Qa,t===null?Qa:t}function Fh(){(be===0||be===3||be===2)&&(be=4),Pe===null||!(wr&268435455)&&!(Ml&268435455)||En(Pe,Te)}function Za(t,e){var n=Y;Y|=2;var r=a_();(Pe!==t||Te!==e)&&(Jt=null,gr(t,e));do try{jw();break}catch(i){o_(t,i)}while(!0);if(xh(),Y=n,Ka.current=r,_e!==null)throw Error($(261));return Pe=null,Te=0,be}function jw(){for(;_e!==null;)l_(_e)}function Bw(){for(;_e!==null&&!hS();)l_(_e)}function l_(t){var e=f_(t.alternate,t,nt);t.memoizedProps=t.pendingProps,e===null?u_(t):_e=e,Ah.current=null}function u_(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=Iw(n,e),n!==null){n.flags&=32767,_e=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{be=6,_e=null;return}}else if(n=Aw(n,e,nt),n!==null){_e=n;return}if(e=e.sibling,e!==null){_e=e;return}_e=e=t}while(e!==null);be===0&&(be=5)}function ar(t,e,n){var r=K,i=bt.transition;try{bt.transition=null,K=1,Vw(t,e,n,r)}finally{bt.transition=i,K=r}return null}function Vw(t,e,n,r){do ai();while(Pn!==null);if(Y&6)throw Error($(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error($(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(SS(t,s),t===Pe&&(_e=Pe=null,Te=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Co||(Co=!0,h_(Ia,function(){return ai(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=bt.transition,bt.transition=null;var o=K;K=1;var a=Y;Y|=4,Ah.current=null,Lw(t,n),r_(n,t),lw(zc),La=!!Fc,zc=Fc=null,t.current=n,Nw(n),dS(),Y=a,K=o,bt.transition=s}else t.current=n;if(Co&&(Co=!1,Pn=t,Ja=i),s=t.pendingLanes,s===0&&(Fn=null),mS(n.stateNode),et(t,me()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Xa)throw Xa=!1,t=of,of=null,t;return Ja&1&&t.tag!==0&&ai(),s=t.pendingLanes,s&1?t===af?gs++:(gs=0,af=t):gs=0,Qn(),null}function ai(){if(Pn!==null){var t=Vv(Ja),e=bt.transition,n=K;try{if(bt.transition=null,K=16>t?16:t,Pn===null)var r=!1;else{if(t=Pn,Pn=null,Ja=0,Y&6)throw Error($(331));var i=Y;for(Y|=4,z=t.current;z!==null;){var s=z,o=s.child;if(z.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(z=u;z!==null;){var c=z;switch(c.tag){case 0:case 11:case 15:ds(8,c,s)}var f=c.child;if(f!==null)f.return=c,z=f;else for(;z!==null;){c=z;var h=c.sibling,d=c.return;if(e_(c),c===u){z=null;break}if(h!==null){h.return=d,z=h;break}z=d}}}var g=s.alternate;if(g!==null){var y=g.child;if(y!==null){g.child=null;do{var _=y.sibling;y.sibling=null,y=_}while(y!==null)}}z=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,z=o;else e:for(;z!==null;){if(s=z,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ds(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,z=m;break e}z=s.return}}var p=t.current;for(z=p;z!==null;){o=z;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,z=v;else e:for(o=p;z!==null;){if(a=z,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:El(9,a)}}catch(b){de(a,a.return,b)}if(a===o){z=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,z=x;break e}z=a.return}}if(Y=i,Qn(),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(yl,t)}catch{}r=!0}return r}finally{K=n,bt.transition=e}}return!1}function Hp(t,e,n){e=mi(n,e),e=U0(t,e,1),t=Nn(t,e,1),e=Be(),t!==null&&(eo(t,1,e),et(t,e))}function de(t,e,n){if(t.tag===3)Hp(t,t,n);else for(;e!==null;){if(e.tag===3){Hp(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Fn===null||!Fn.has(r))){t=mi(n,t),t=W0(e,t,1),e=Nn(e,t,1),t=Be(),e!==null&&(eo(e,1,t),et(e,t));break}}e=e.return}}function Uw(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Be(),t.pingedLanes|=t.suspendedLanes&n,Pe===t&&(Te&n)===n&&(be===4||be===3&&(Te&130023424)===Te&&500>me()-$h?gr(t,0):Ih|=n),et(t,e)}function c_(t,e){e===0&&(t.mode&1?(e=_o,_o<<=1,!(_o&130023424)&&(_o=4194304)):e=1);var n=Be();t=fn(t,e),t!==null&&(eo(t,e,n),et(t,n))}function Ww(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),c_(t,n)}function Hw(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(e),c_(t,n)}var f_;f_=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Je.current)Xe=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Xe=!1,Rw(t,e,n);Xe=!!(t.flags&131072)}else Xe=!1,le&&e.flags&1048576&&p0(e,Ua,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;da(t,e),t=e.pendingProps;var i=hi(e,Fe.current);oi(e,n),i=Oh(null,e,r,t,i,n);var s=Ch();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ze(r)?(s=!0,Ba(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,wh(e),i.updater=wl,e.stateNode=i,i._reactInternals=e,Gc(e,r,t,n),e=Xc(null,e,r,!0,s,n)):(e.tag=0,le&&s&&mh(e),je(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(da(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=qw(r),t=Pt(r,t),i){case 0:e=Kc(null,e,r,t,n);break e;case 1:e=$p(null,e,r,t,n);break e;case 11:e=Ap(null,e,r,t,n);break e;case 14:e=Ip(null,e,r,Pt(r.type,t),n);break e}throw Error($(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Pt(r,i),Kc(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Pt(r,i),$p(t,e,r,i,n);case 3:e:{if(G0(e),t===null)throw Error($(387));r=e.pendingProps,s=e.memoizedState,i=s.element,v0(t,e),Ya(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=mi(Error($(423)),e),e=Lp(t,e,r,n,i);break e}else if(r!==i){i=mi(Error($(424)),e),e=Lp(t,e,r,n,i);break e}else for(st=Ln(e.stateNode.containerInfo.firstChild),at=e,le=!0,Ct=null,n=S0(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(di(),r===i){e=hn(t,e,n);break e}je(t,e,r,n)}e=e.child}return e;case 5:return w0(e),t===null&&Hc(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,jc(r,i)?o=null:s!==null&&jc(r,s)&&(e.flags|=32),q0(t,e),je(t,e,o,n),e.child;case 6:return t===null&&Hc(e),null;case 13:return Q0(t,e,n);case 4:return kh(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=pi(e,null,r,n):je(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Pt(r,i),Ap(t,e,r,i,n);case 7:return je(t,e,e.pendingProps,n),e.child;case 8:return je(t,e,e.pendingProps.children,n),e.child;case 12:return je(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Z(Wa,r._currentValue),r._currentValue=o,s!==null)if($t(s.value,o)){if(s.children===i.children&&!Je.current){e=hn(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=ln(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Yc(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error($(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Yc(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}je(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,oi(e,n),i=St(i),r=r(i),e.flags|=1,je(t,e,r,n),e.child;case 14:return r=e.type,i=Pt(r,e.pendingProps),i=Pt(r.type,i),Ip(t,e,r,i,n);case 15:return H0(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Pt(r,i),da(t,e),e.tag=1,Ze(r)?(t=!0,Ba(e)):t=!1,oi(e,n),x0(e,r,i),Gc(e,r,i,n),Xc(null,e,r,!0,t,n);case 19:return K0(t,e,n);case 22:return Y0(t,e,n)}throw Error($(156,e.tag))};function h_(t,e){return Fv(t,e)}function Yw(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _t(t,e,n,r){return new Yw(t,e,n,r)}function zh(t){return t=t.prototype,!(!t||!t.isReactComponent)}function qw(t){if(typeof t=="function")return zh(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ih)return 11;if(t===sh)return 14}return 2}function jn(t,e){var n=t.alternate;return n===null?(n=_t(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function ma(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")zh(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Br:return mr(n.children,i,s,e);case rh:o=8,i|=8;break;case vc:return t=_t(12,n,e,i|2),t.elementType=vc,t.lanes=s,t;case _c:return t=_t(13,n,e,i),t.elementType=_c,t.lanes=s,t;case xc:return t=_t(19,n,e,i),t.elementType=xc,t.lanes=s,t;case bv:return Pl(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case _v:o=10;break e;case xv:o=9;break e;case ih:o=11;break e;case sh:o=14;break e;case bn:o=16,r=null;break e}throw Error($(130,t==null?t:typeof t,""))}return e=_t(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function mr(t,e,n,r){return t=_t(7,t,r,e),t.lanes=n,t}function Pl(t,e,n,r){return t=_t(22,t,r,e),t.elementType=bv,t.lanes=n,t.stateNode={isHidden:!1},t}function bu(t,e,n){return t=_t(6,t,null,e),t.lanes=n,t}function Su(t,e,n){return e=_t(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Gw(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nu(0),this.expirationTimes=nu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jh(t,e,n,r,i,s,o,a,l){return t=new Gw(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=_t(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wh(s),t}function Qw(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:jr,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function d_(t){if(!t)return Un;t=t._reactInternals;e:{if(Or(t)!==t||t.tag!==1)throw Error($(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Ze(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error($(171))}if(t.tag===1){var n=t.type;if(Ze(n))return h0(t,n,e)}return e}function p_(t,e,n,r,i,s,o,a,l){return t=jh(n,r,!0,t,i,s,o,a,l),t.context=d_(null),n=t.current,r=Be(),i=zn(n),s=ln(r,i),s.callback=e??null,Nn(n,s,i),t.current.lanes=i,eo(t,i,r),et(t,r),t}function Ol(t,e,n,r){var i=e.current,s=Be(),o=zn(i);return n=d_(n),e.context===null?e.context=n:e.pendingContext=n,e=ln(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Nn(i,e,o),t!==null&&(At(t,i,o,s),ca(t,i,o)),o}function el(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Yp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Bh(t,e){Yp(t,e),(t=t.alternate)&&Yp(t,e)}function Kw(){return null}var g_=typeof reportError=="function"?reportError:function(t){console.error(t)};function Vh(t){this._internalRoot=t}Cl.prototype.render=Vh.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error($(409));Ol(t,e,null,null)};Cl.prototype.unmount=Vh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;kr(function(){Ol(null,t,null,null)}),e[cn]=null}};function Cl(t){this._internalRoot=t}Cl.prototype.unstable_scheduleHydration=function(t){if(t){var e=Hv();t={blockedOn:null,target:t,priority:e};for(var n=0;n<kn.length&&e!==0&&e<kn[n].priority;n++);kn.splice(n,0,t),n===0&&qv(t)}};function Uh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Tl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function qp(){}function Xw(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=el(o);s.call(u)}}var o=p_(e,r,t,0,null,!1,!1,"",qp);return t._reactRootContainer=o,t[cn]=o.current,As(t.nodeType===8?t.parentNode:t),kr(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=el(l);a.call(u)}}var l=jh(t,0,!1,null,null,!1,!1,"",qp);return t._reactRootContainer=l,t[cn]=l.current,As(t.nodeType===8?t.parentNode:t),kr(function(){Ol(e,l,n,r)}),l}function Dl(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=el(o);a.call(l)}}Ol(e,o,t,i)}else o=Xw(n,e,t,i,r);return el(o)}Uv=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Zi(e.pendingLanes);n!==0&&(lh(e,n|1),et(e,me()),!(Y&6)&&(yi=me()+500,Qn()))}break;case 13:kr(function(){var r=fn(t,1);if(r!==null){var i=Be();At(r,t,1,i)}}),Bh(t,1)}};uh=function(t){if(t.tag===13){var e=fn(t,134217728);if(e!==null){var n=Be();At(e,t,134217728,n)}Bh(t,134217728)}};Wv=function(t){if(t.tag===13){var e=zn(t),n=fn(t,e);if(n!==null){var r=Be();At(n,t,e,r)}Bh(t,e)}};Hv=function(){return K};Yv=function(t,e){var n=K;try{return K=t,e()}finally{K=n}};Tc=function(t,e,n){switch(e){case"input":if(wc(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=bl(r);if(!i)throw Error($(90));wv(r),wc(r,i)}}}break;case"textarea":Ev(t,n);break;case"select":e=n.value,e!=null&&ni(t,!!n.multiple,e,!1)}};Rv=Lh;Av=kr;var Jw={usingClientEntryPoint:!1,Events:[no,Hr,bl,Tv,Dv,Lh]},Bi={findFiberByHostInstance:hr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Zw={bundleType:Bi.bundleType,version:Bi.version,rendererPackageName:Bi.rendererPackageName,rendererConfig:Bi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:dn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Lv(t),t===null?null:t.stateNode},findFiberByHostInstance:Bi.findFiberByHostInstance||Kw,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var To=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!To.isDisabled&&To.supportsFiber)try{yl=To.inject(Zw),Ut=To}catch{}}ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Jw;ut.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Uh(e))throw Error($(200));return Qw(t,e,null,n)};ut.createRoot=function(t,e){if(!Uh(t))throw Error($(299));var n=!1,r="",i=g_;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=jh(t,1,!1,null,null,n,!1,r,i),t[cn]=e.current,As(t.nodeType===8?t.parentNode:t),new Vh(e)};ut.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error($(188)):(t=Object.keys(t).join(","),Error($(268,t)));return t=Lv(e),t=t===null?null:t.stateNode,t};ut.flushSync=function(t){return kr(t)};ut.hydrate=function(t,e,n){if(!Tl(e))throw Error($(200));return Dl(null,t,e,!0,n)};ut.hydrateRoot=function(t,e,n){if(!Uh(t))throw Error($(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=g_;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=p_(e,null,t,1,n??null,i,!1,s,o),t[cn]=e.current,As(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Cl(e)};ut.render=function(t,e,n){if(!Tl(e))throw Error($(200));return Dl(null,t,e,!1,n)};ut.unmountComponentAtNode=function(t){if(!Tl(t))throw Error($(40));return t._reactRootContainer?(kr(function(){Dl(null,null,t,!1,function(){t._reactRootContainer=null,t[cn]=null})}),!0):!1};ut.unstable_batchedUpdates=Lh;ut.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Tl(n))throw Error($(200));if(t==null||t._reactInternals===void 0)throw Error($(38));return Dl(t,e,n,!1,r)};ut.version="18.2.0-next-9e3b772b8-20220608";function m_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m_)}catch(t){console.error(t)}}m_(),pv.exports=ut;var ek=pv.exports,Gp=ek;mc.createRoot=Gp.createRoot,mc.hydrateRoot=Gp.hydrateRoot;var Do,tk=new Uint8Array(16);function nk(){if(!Do&&(Do=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Do))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Do(tk)}const rk=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ik(t){return typeof t=="string"&&rk.test(t)}var Oe=[];for(var wu=0;wu<256;++wu)Oe.push((wu+256).toString(16).substr(1));function sk(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Oe[t[e+0]]+Oe[t[e+1]]+Oe[t[e+2]]+Oe[t[e+3]]+"-"+Oe[t[e+4]]+Oe[t[e+5]]+"-"+Oe[t[e+6]]+Oe[t[e+7]]+"-"+Oe[t[e+8]]+Oe[t[e+9]]+"-"+Oe[t[e+10]]+Oe[t[e+11]]+Oe[t[e+12]]+Oe[t[e+13]]+Oe[t[e+14]]+Oe[t[e+15]]).toLowerCase();if(!ik(n))throw TypeError("Stringified UUID is invalid");return n}function ok(t,e,n){t=t||{};var r=t.random||(t.rng||nk)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return sk(r)}var y_={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ke,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",u="day",c="week",f="month",h="quarter",d="year",g="date",y="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var k=["th","st","nd","rd"],C=w%100;return"["+w+(k[(C-20)%10]||k[C]||k[0])+"]"}},v=function(w,k,C){var M=String(w);return!M||M.length>=k?w:""+Array(k+1-M.length).join(C)+w},x={s:v,z:function(w){var k=-w.utcOffset(),C=Math.abs(k),M=Math.floor(C/60),S=C%60;return(k<=0?"+":"-")+v(M,2,"0")+":"+v(S,2,"0")},m:function w(k,C){if(k.date()<C.date())return-w(C,k);var M=12*(C.year()-k.year())+(C.month()-k.month()),S=k.clone().add(M,f),P=C-S<0,D=k.clone().add(M+(P?-1:1),f);return+(-(M+(C-S)/(P?S-D:D-S))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:f,y:d,w:c,d:u,D:g,h:l,m:a,s:o,ms:s,Q:h}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},b="en",E={};E[b]=p;var O="$isDayjsObject",T=function(w){return w instanceof j||!(!w||!w[O])},I=function w(k,C,M){var S;if(!k)return b;if(typeof k=="string"){var P=k.toLowerCase();E[P]&&(S=P),C&&(E[P]=C,S=P);var D=k.split("-");if(!S&&D.length>1)return w(D[0])}else{var N=k.name;E[N]=k,S=N}return!M&&S&&(b=S),S||!M&&b},R=function(w,k){if(T(w))return w.clone();var C=typeof k=="object"?k:{};return C.date=w,C.args=arguments,new j(C)},A=x;A.l=I,A.i=T,A.w=function(w,k){return R(w,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var j=function(){function w(C){this.$L=I(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[O]=!0}var k=w.prototype;return k.parse=function(C){this.$d=function(M){var S=M.date,P=M.utc;if(S===null)return new Date(NaN);if(A.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var D=S.match(_);if(D){var N=D[2]-1||0,F=(D[7]||"0").substring(0,3);return P?new Date(Date.UTC(D[1],N,D[3]||1,D[4]||0,D[5]||0,D[6]||0,F)):new Date(D[1],N,D[3]||1,D[4]||0,D[5]||0,D[6]||0,F)}}return new Date(S)}(C),this.init()},k.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},k.$utils=function(){return A},k.isValid=function(){return this.$d.toString()!==y},k.isSame=function(C,M){var S=R(C);return this.startOf(M)<=S&&S<=this.endOf(M)},k.isAfter=function(C,M){return R(C)<this.startOf(M)},k.isBefore=function(C,M){return this.endOf(M)<R(C)},k.$g=function(C,M,S){return A.u(C)?this[M]:this.set(S,C)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(C,M){var S=this,P=!!A.u(M)||M,D=A.p(C),N=function(Zn,He){var yn=A.w(S.$u?Date.UTC(S.$y,He,Zn):new Date(S.$y,He,Zn),S);return P?yn:yn.endOf(u)},F=function(Zn,He){return A.w(S.toDate()[Zn].apply(S.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(He)),S)},G=this.$W,H=this.$M,ae=this.$D,he="set"+(this.$u?"UTC":"");switch(D){case d:return P?N(1,0):N(31,11);case f:return P?N(1,H):N(0,H+1);case c:var dt=this.$locale().weekStart||0,Ri=(G<dt?G+7:G)-dt;return N(P?ae-Ri:ae+(6-Ri),H);case u:case g:return F(he+"Hours",0);case l:return F(he+"Minutes",1);case a:return F(he+"Seconds",2);case o:return F(he+"Milliseconds",3);default:return this.clone()}},k.endOf=function(C){return this.startOf(C,!1)},k.$set=function(C,M){var S,P=A.p(C),D="set"+(this.$u?"UTC":""),N=(S={},S[u]=D+"Date",S[g]=D+"Date",S[f]=D+"Month",S[d]=D+"FullYear",S[l]=D+"Hours",S[a]=D+"Minutes",S[o]=D+"Seconds",S[s]=D+"Milliseconds",S)[P],F=P===u?this.$D+(M-this.$W):M;if(P===f||P===d){var G=this.clone().set(g,1);G.$d[N](F),G.init(),this.$d=G.set(g,Math.min(this.$D,G.daysInMonth())).$d}else N&&this.$d[N](F);return this.init(),this},k.set=function(C,M){return this.clone().$set(C,M)},k.get=function(C){return this[A.p(C)]()},k.add=function(C,M){var S,P=this;C=Number(C);var D=A.p(M),N=function(H){var ae=R(P);return A.w(ae.date(ae.date()+Math.round(H*C)),P)};if(D===f)return this.set(f,this.$M+C);if(D===d)return this.set(d,this.$y+C);if(D===u)return N(1);if(D===c)return N(7);var F=(S={},S[a]=r,S[l]=i,S[o]=n,S)[D]||1,G=this.$d.getTime()+C*F;return A.w(G,this)},k.subtract=function(C,M){return this.add(-1*C,M)},k.format=function(C){var M=this,S=this.$locale();if(!this.isValid())return S.invalidDate||y;var P=C||"YYYY-MM-DDTHH:mm:ssZ",D=A.z(this),N=this.$H,F=this.$m,G=this.$M,H=S.weekdays,ae=S.months,he=S.meridiem,dt=function(He,yn,Ai,ho){return He&&(He[yn]||He(M,P))||Ai[yn].slice(0,ho)},Ri=function(He){return A.s(N%12||12,He,"0")},Zn=he||function(He,yn,Ai){var ho=He<12?"AM":"PM";return Ai?ho.toLowerCase():ho};return P.replace(m,function(He,yn){return yn||function(Ai){switch(Ai){case"YY":return String(M.$y).slice(-2);case"YYYY":return A.s(M.$y,4,"0");case"M":return G+1;case"MM":return A.s(G+1,2,"0");case"MMM":return dt(S.monthsShort,G,ae,3);case"MMMM":return dt(ae,G);case"D":return M.$D;case"DD":return A.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return dt(S.weekdaysMin,M.$W,H,2);case"ddd":return dt(S.weekdaysShort,M.$W,H,3);case"dddd":return H[M.$W];case"H":return String(N);case"HH":return A.s(N,2,"0");case"h":return Ri(1);case"hh":return Ri(2);case"a":return Zn(N,F,!0);case"A":return Zn(N,F,!1);case"m":return String(F);case"mm":return A.s(F,2,"0");case"s":return String(M.$s);case"ss":return A.s(M.$s,2,"0");case"SSS":return A.s(M.$ms,3,"0");case"Z":return D}return null}(He)||D.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(C,M,S){var P,D=this,N=A.p(M),F=R(C),G=(F.utcOffset()-this.utcOffset())*r,H=this-F,ae=function(){return A.m(D,F)};switch(N){case d:P=ae()/12;break;case f:P=ae();break;case h:P=ae()/3;break;case c:P=(H-G)/6048e5;break;case u:P=(H-G)/864e5;break;case l:P=H/i;break;case a:P=H/r;break;case o:P=H/n;break;default:P=H}return S?P:A.a(P)},k.daysInMonth=function(){return this.endOf(f).$D},k.$locale=function(){return E[this.$L]},k.locale=function(C,M){if(!C)return this.$L;var S=this.clone(),P=I(C,M,!0);return P&&(S.$L=P),S},k.clone=function(){return A.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},w}(),V=j.prototype;return R.prototype=V,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",u],["$M",f],["$y",d],["$D",g]].forEach(function(w){V[w[1]]=function(k){return this.$g(k,w[0],w[1])}}),R.extend=function(w,k){return w.$i||(w(k,j,R),w.$i=!0),R},R.locale=I,R.isDayjs=T,R.unix=function(w){return R(1e3*w)},R.en=E[b],R.Ls=E,R.p={},R})})(y_);var ak=y_.exports;const Jr=Ei(ak);var v_={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ke,function(){var n="month",r="quarter";return function(i,s){var o=s.prototype;o.quarter=function(u){return this.$utils().u(u)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(u-1))};var a=o.add;o.add=function(u,c){return u=Number(u),this.$utils().p(c)===r?this.add(3*u,n):a.bind(this)(u,c)};var l=o.startOf;o.startOf=function(u,c){var f=this.$utils(),h=!!f.u(c)||c;if(f.p(u)===r){var d=this.quarter()-1;return h?this.month(3*d).startOf(n).startOf("day"):this.month(3*d+2).endOf(n).endOf("day")}return l.bind(this)(u,c)}}})})(v_);var lk=v_.exports;const uk=Ei(lk);var __={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ke,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],i=n%100;return"["+n+(r[(i-20)%10]||r[i]||r[0])+"]"}}})})(__);var ck=__.exports;const fk=Ei(ck);function te(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function Se(t){return function e(n){return arguments.length===0||te(n)?e:t.apply(this,arguments)}}function X(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return te(n)?e:Se(function(i){return t(n,i)});default:return te(n)&&te(r)?e:te(n)?Se(function(i){return t(i,r)}):te(r)?Se(function(i){return t(n,i)}):t(n,r)}}}function Rl(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(n){return e.apply(this,arguments)};case 2:return function(n,r){return e.apply(this,arguments)};case 3:return function(n,r,i){return e.apply(this,arguments)};case 4:return function(n,r,i,s){return e.apply(this,arguments)};case 5:return function(n,r,i,s,o){return e.apply(this,arguments)};case 6:return function(n,r,i,s,o,a){return e.apply(this,arguments)};case 7:return function(n,r,i,s,o,a,l){return e.apply(this,arguments)};case 8:return function(n,r,i,s,o,a,l,u){return e.apply(this,arguments)};case 9:return function(n,r,i,s,o,a,l,u,c){return e.apply(this,arguments)};case 10:return function(n,r,i,s,o,a,l,u,c,f){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function Al(t,e,n){return function(){for(var r=[],i=0,s=t,o=0;o<e.length||i<arguments.length;){var a;o<e.length&&(!te(e[o])||i>=arguments.length)?a=e[o]:(a=arguments[i],i+=1),r[o]=a,te(a)||(s-=1),o+=1}return s<=0?n.apply(this,r):Rl(s,Al(t,r,n))}}var hk=X(function(e,n){return e===1?Se(n):Rl(e,Al(e,[],n))});function Ci(t){return function e(n,r,i){switch(arguments.length){case 0:return e;case 1:return te(n)?e:X(function(s,o){return t(n,s,o)});case 2:return te(n)&&te(r)?e:te(n)?X(function(s,o){return t(s,r,o)}):te(r)?X(function(s,o){return t(n,s,o)}):Se(function(s){return t(n,r,s)});default:return te(n)&&te(r)&&te(i)?e:te(n)&&te(r)?X(function(s,o){return t(s,o,i)}):te(n)&&te(i)?X(function(s,o){return t(s,r,o)}):te(r)&&te(i)?X(function(s,o){return t(n,s,o)}):te(n)?Se(function(s){return t(s,r,i)}):te(r)?Se(function(s){return t(n,s,i)}):te(i)?Se(function(s){return t(n,r,s)}):t(n,r,i)}}}const Wh=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function dk(t){return t!=null&&typeof t["@@transducer/step"]=="function"}function Ti(t,e,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!Wh(i)){for(var s=0;s<t.length;){if(typeof i[t[s]]=="function")return i[t[s]].apply(i,r);s+=1}if(dk(i)){var o=e.apply(null,r);return o(i)}}return n.apply(this,arguments)}}function pk(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}const Yt={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}};function gk(t,e){for(var n=0,r=e.length,i=Array(r);n<r;)i[n]=t(e[n]),n+=1;return i}function x_(t){return Object.prototype.toString.call(t)==="[object String]"}var Hh=Se(function(e){return Wh(e)?!0:!e||typeof e!="object"||x_(e)?!1:e.nodeType===1?!!e.length:e.length===0?!0:e.length>0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1}),mk=function(){function t(e){this.f=e}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(e){return e},t.prototype["@@transducer/step"]=function(e,n){return this.f(e,n)},t}();function yk(t){return new mk(t)}var vk=X(function(e,n){return Rl(e.length,function(){return e.apply(n,arguments)})});function _k(t,e,n){for(var r=0,i=n.length;r<i;){if(e=t["@@transducer/step"](e,n[r]),e&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}function Qp(t,e,n){for(var r=n.next();!r.done;){if(e=t["@@transducer/step"](e,r.value),e&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}function Kp(t,e,n,r){return t["@@transducer/result"](n[r](vk(t["@@transducer/step"],t),e))}var Xp=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function vi(t,e,n){if(typeof t=="function"&&(t=yk(t)),Hh(n))return _k(t,e,n);if(typeof n["fantasy-land/reduce"]=="function")return Kp(t,e,n,"fantasy-land/reduce");if(n[Xp]!=null)return Qp(t,e,n[Xp]());if(typeof n.next=="function")return Qp(t,e,n);if(typeof n.reduce=="function")return Kp(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}var xk=function(){function t(e,n){this.xf=n,this.f=e}return t.prototype["@@transducer/init"]=Yt.init,t.prototype["@@transducer/result"]=Yt.result,t.prototype["@@transducer/step"]=function(e,n){return this.xf["@@transducer/step"](e,this.f(n))},t}(),bk=X(function(e,n){return new xk(e,n)});const Sk=bk;function xt(t,e){return Object.prototype.hasOwnProperty.call(e,t)}var Jp=Object.prototype.toString,wk=function(){return Jp.call(arguments)==="[object Arguments]"?function(e){return Jp.call(e)==="[object Arguments]"}:function(e){return xt("callee",e)}}(),kk=!{toString:null}.propertyIsEnumerable("toString"),Zp=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],eg=function(){return arguments.propertyIsEnumerable("length")}(),Ek=function(e,n){for(var r=0;r<e.length;){if(e[r]===n)return!0;r+=1}return!1},tl=Se(typeof Object.keys=="function"&&!eg?function(e){return Object(e)!==e?[]:Object.keys(e)}:function(e){if(Object(e)!==e)return[];var n,r,i=[],s=eg&&wk(e);for(n in e)xt(n,e)&&(!s||n!=="length")&&(i[i.length]=n);if(kk)for(r=Zp.length-1;r>=0;)n=Zp[r],xt(n,e)&&!Ek(i,n)&&(i[i.length]=n),r-=1;return i}),li=X(Ti(["fantasy-land/map","map"],Sk,function(e,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return hk(n.length,function(){return e.call(this,n.apply(this,arguments))});case"[object Object]":return vi(function(r,i){return r[i]=e(n[i]),r},{},tl(n));default:return gk(e,n)}}));const Mk=Number.isInteger||function(e){return e<<0===e};var Pk=X(function(e,n){var r=e<0?n.length+e:e;return x_(n)?n.charAt(r):n[r]}),Ok=X(function(e,n){return e.map(function(r){for(var i=n,s=0,o;s<r.length;){if(i==null)return;o=r[s],i=Mk(o)?Pk(o,i):i[o],s+=1}return i})}),Ck=X(function(e,n){return Ok([e],n)[0]}),Nr=X(function(e,n){return Ck([e],n)}),ku=X(function(e,n){return li(Nr(e),n)}),ya=Ci(vi);function b_(t){return function e(n){for(var r,i,s,o=[],a=0,l=n.length;a<l;){if(Hh(n[a]))for(r=t?e(n[a]):n[a],s=0,i=r.length;s<i;)o[o.length]=r[s],s+=1;else o[o.length]=n[a];a+=1}return o}}function Tk(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}}var Dk=function(t){return{"@@transducer/init":Yt.init,"@@transducer/result":function(e){return t["@@transducer/result"](e)},"@@transducer/step":function(e,n){var r=t["@@transducer/step"](e,n);return r["@@transducer/reduced"]?Tk(r):r}}},Rk=function(e){var n=Dk(e);return{"@@transducer/init":Yt.init,"@@transducer/result":function(r){return n["@@transducer/result"](r)},"@@transducer/step":function(r,i){return Hh(i)?vi(n,r,i):vi(n,r,[i])}}},Ak=X(function(e,n){return li(e,Rk(n))});const Ik=Ak;var $k=X(Ti(["fantasy-land/chain","chain"],Ik,function(e,n){return typeof n=="function"?function(r){return e(n(r))(r)}:b_(!1)(li(e,n))}));function Lk(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))}var cf=Se(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function Yh(t,e,n,r){var i=function(o){for(var a=e.length,l=0;l<a;){if(t===e[l])return n[l];l+=1}e[l+1]=t,n[l+1]=o;for(var u in t)o[u]=r?Yh(t[u],e,n,!0):t[u];return o};switch(cf(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return Lk(t);default:return t}}var qh=Se(function(e){return e!=null&&typeof e.clone=="function"?e.clone():Yh(e,[],[],!0)});function Nk(t,e){return function(){return e.call(this,t.apply(this,arguments))}}function Gh(t,e){return function(){var n=arguments.length;if(n===0)return e();var r=arguments[n-1];return Wh(r)||typeof r[t]!="function"?e.apply(this,arguments):r[t].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}var S_=Ci(Gh("slice",function(e,n,r){return Array.prototype.slice.call(r,e,n)})),Fk=Se(Gh("tail",S_(1,1/0)));function Vi(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return Rl(arguments[0].length,ya(Nk,arguments[0],Fk(arguments)))}function w_(t){return t}var zk=Se(w_);const jk=zk;function tg(t){for(var e=[],n;!(n=t.next()).done;)e.push(n.value);return e}function ng(t,e,n){for(var r=0,i=n.length;r<i;){if(t(e,n[r]))return!0;r+=1}return!1}function Bk(t){var e=String(t).match(/^function (\w*)/);return e==null?"":e[1]}function Vk(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}const Eu=typeof Object.is=="function"?Object.is:Vk;function rg(t,e,n,r){var i=tg(t),s=tg(e);function o(a,l){return Qh(a,l,n.slice(),r.slice())}return!ng(function(a,l){return!ng(o,l,a)},s,i)}function Qh(t,e,n,r){if(Eu(t,e))return!0;var i=cf(t);if(i!==cf(e)||t==null||e==null)return!1;if(typeof t["fantasy-land/equals"]=="function"||typeof e["fantasy-land/equals"]=="function")return typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e)&&typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t);if(typeof t.equals=="function"||typeof e.equals=="function")return typeof t.equals=="function"&&t.equals(e)&&typeof e.equals=="function"&&e.equals(t);switch(i){case"Arguments":case"Array":case"Object":if(typeof t.constructor=="function"&&Bk(t.constructor)==="Promise")return t===e;break;case"Boolean":case"Number":case"String":if(!(typeof t==typeof e&&Eu(t.valueOf(),e.valueOf())))return!1;break;case"Date":if(!Eu(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(!(t.source===e.source&&t.global===e.global&&t.ignoreCase===e.ignoreCase&&t.multiline===e.multiline&&t.sticky===e.sticky&&t.unicode===e.unicode))return!1;break}for(var s=n.length-1;s>=0;){if(n[s]===t)return r[s]===e;s-=1}switch(i){case"Map":return t.size!==e.size?!1:rg(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size!==e.size?!1:rg(t.values(),e.values(),n.concat([t]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=tl(t);if(o.length!==tl(e).length)return!1;var a=n.concat([t]),l=r.concat([e]);for(s=o.length-1;s>=0;){var u=o[s];if(!(xt(u,e)&&Qh(e[u],t[u],a,l)))return!1;s-=1}return!0}var it=X(function(e,n){return Qh(e,n,[],[])});function Uk(t,e,n){var r,i;if(typeof t.indexOf=="function")switch(typeof e){case"number":if(e===0){for(r=1/e;n<t.length;){if(i=t[n],i===0&&1/i===r)return n;n+=1}return-1}else if(e!==e){for(;n<t.length;){if(i=t[n],typeof i=="number"&&i!==i)return n;n+=1}return-1}return t.indexOf(e,n);case"string":case"boolean":case"function":case"undefined":return t.indexOf(e,n);case"object":if(e===null)return t.indexOf(e,n)}for(;n<t.length;){if(it(t[n],e))return n;n+=1}return-1}function ig(t,e){return Uk(e,t,0)>=0}function Wk(t,e){for(var n=0,r=e.length,i=[];n<r;)t(e[n])&&(i[i.length]=e[n]),n+=1;return i}function ff(t){return Object.prototype.toString.call(t)==="[object Object]"}var Hk=function(){function t(e,n){this.xf=n,this.f=e}return t.prototype["@@transducer/init"]=Yt.init,t.prototype["@@transducer/result"]=Yt.result,t.prototype["@@transducer/step"]=function(e,n){return this.f(n)?this.xf["@@transducer/step"](e,n):e},t}(),Yk=X(function(e,n){return new Hk(e,n)});const qk=Yk;var Gk=X(Ti(["filter"],qk,function(t,e){return ff(e)?vi(function(n,r){return t(e[r])&&(n[r]=e[r]),n},{},tl(e)):Wk(t,e)})),Qk=function(){function t(e,n,r,i){this.valueFn=e,this.valueAcc=n,this.keyFn=r,this.xf=i,this.inputs={}}return t.prototype["@@transducer/init"]=Yt.init,t.prototype["@@transducer/result"]=function(e){var n;for(n in this.inputs)if(xt(n,this.inputs)&&(e=this.xf["@@transducer/step"](e,this.inputs[n]),e["@@transducer/reduced"])){e=e["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](e)},t.prototype["@@transducer/step"]=function(e,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),e},t}(),Kk=Al(4,[],function(e,n,r,i){return new Qk(e,n,r,i)});const Xk=Kk;var k_=Al(4,[],Ti([],Xk,function(e,n,r,i){return vi(function(s,o){var a=r(o);return s[a]=e(xt(a,s)?s[a]:Yh(n,[],[],!1),o),s},{},i)})),Jk=function(){function t(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return t.prototype.add=function(e){return!sg(e,!0,this)},t.prototype.has=function(e){return sg(e,!1,this)},t}();function sg(t,e,n){var r=typeof t,i,s;switch(r){case"string":case"number":return t===0&&1/t===-1/0?n._items["-0"]?!0:(e&&(n._items["-0"]=!0),!1):n._nativeSet!==null?e?(i=n._nativeSet.size,n._nativeSet.add(t),s=n._nativeSet.size,s===i):n._nativeSet.has(t):r in n._items?t in n._items[r]?!0:(e&&(n._items[r][t]=!0),!1):(e&&(n._items[r]={},n._items[r][t]=!0),!1);case"boolean":if(r in n._items){var o=t?1:0;return n._items[r][o]?!0:(e&&(n._items[r][o]=!0),!1)}else return e&&(n._items[r]=t?[!1,!0]:[!0,!1]),!1;case"function":return n._nativeSet!==null?e?(i=n._nativeSet.size,n._nativeSet.add(t),s=n._nativeSet.size,s===i):n._nativeSet.has(t):r in n._items?ig(t,n._items[r])?!0:(e&&n._items[r].push(t),!1):(e&&(n._items[r]=[t]),!1);case"undefined":return n._items[r]?!0:(e&&(n._items[r]=!0),!1);case"object":if(t===null)return n._items.null?!0:(e&&(n._items.null=!0),!1);default:return r=Object.prototype.toString.call(t),r in n._items?ig(t,n._items[r])?!0:(e&&n._items[r].push(t),!1):(e&&(n._items[r]=[t]),!1)}}var Zk=function(){function t(e,n){this.xf=n,this.n=e,this.i=0}return t.prototype["@@transducer/init"]=Yt.init,t.prototype["@@transducer/result"]=Yt.result,t.prototype["@@transducer/step"]=function(e,n){this.i+=1;var r=this.n===0?e:this.xf["@@transducer/step"](e,n);return this.n>=0&&this.i>=this.n?pk(r):r},t}(),eE=X(function(e,n){return new Zk(e,n)});const tE=eE;var nE=X(Ti(["take"],tE,function(e,n){return S_(0,e<0?1/0:e,n)}));function rE(t,e){return nE(t<e.length?e.length-t:0,e)}var iE=function(){function t(e,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(e)}return t.prototype["@@transducer/init"]=Yt.init,t.prototype["@@transducer/result"]=function(e){return this.acc=null,this.xf["@@transducer/result"](e)},t.prototype["@@transducer/step"]=function(e,n){return this.full&&(e=this.xf["@@transducer/step"](e,this.acc[this.pos])),this.store(n),e},t.prototype.store=function(e){this.acc[this.pos]=e,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t}(),sE=X(function(e,n){return new iE(e,n)});const oE=sE;var og=X(Ti([],oE,rE)),ag=Se(b_(!0)),_i=Se(function(e){for(var n={},r=0;r<e.length;)n[e[r][0]]=e[r][1],r+=1;return n}),aE=X(Gh("groupBy",k_(function(t,e){return t==null&&(t=[]),t.push(e),t},null))),lg=k_(function(t,e){return e},null),hf=X(function(e,n){for(var r=new Jk,i=[],s=0,o,a;s<n.length;)a=n[s],o=e(a),r.add(o)&&i.push(a),s+=1;return i}),E_=hf(jk);function lE(t){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1,r=arguments.length;n<r;){var i=arguments[n];if(i!=null)for(var s in i)xt(s,i)&&(e[s]=i[s]);n+=1}return e}const uE=typeof Object.assign=="function"?Object.assign:lE;var cE=Ci(function(e,n,r){return e(r)>e(n)?r:n}),fE=Se(function(e){return uE.apply(null,[{}].concat(e))}),hE=Ci(function(e,n,r){var i={},s;for(s in n)xt(s,n)&&(i[s]=xt(s,r)?e(s,n[s],r[s]):n[s]);for(s in r)xt(s,r)&&!xt(s,i)&&(i[s]=r[s]);return i}),dE=Ci(function t(e,n,r){return hE(function(i,s,o){return ff(s)&&ff(o)?t(e,s,o):e(i,s,o)},n,r)}),ug=X(function(e,n){return dE(function(r,i,s){return i},e,n)}),pE=Ci(function(e,n,r){return e(r)<e(n)?r:n}),Ro=X(function(e,n){for(var r={},i=0;i<e.length;)e[i]in n&&(r[e[i]]=n[e[i]]),i+=1;return r}),M_=Se(function(e){var n=[];for(var r in e)xt(r,e)&&(n[n.length]=[r,e[r]]);return n}),gE=$k(w_),df={exports:{}};(function(t,e){var n=typeof self<"u"?self:Ke,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(w){return w&&DataView.prototype.isPrototypeOf(w)}if(a.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(w){return w&&u.indexOf(Object.prototype.toString.call(w))>-1};function f(w){if(typeof w!="string"&&(w=String(w)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(w))throw new TypeError("Invalid character in header field name");return w.toLowerCase()}function h(w){return typeof w!="string"&&(w=String(w)),w}function d(w){var k={next:function(){var C=w.shift();return{done:C===void 0,value:C}}};return a.iterable&&(k[Symbol.iterator]=function(){return k}),k}function g(w){this.map={},w instanceof g?w.forEach(function(k,C){this.append(C,k)},this):Array.isArray(w)?w.forEach(function(k){this.append(k[0],k[1])},this):w&&Object.getOwnPropertyNames(w).forEach(function(k){this.append(k,w[k])},this)}g.prototype.append=function(w,k){w=f(w),k=h(k);var C=this.map[w];this.map[w]=C?C+", "+k:k},g.prototype.delete=function(w){delete this.map[f(w)]},g.prototype.get=function(w){return w=f(w),this.has(w)?this.map[w]:null},g.prototype.has=function(w){return this.map.hasOwnProperty(f(w))},g.prototype.set=function(w,k){this.map[f(w)]=h(k)},g.prototype.forEach=function(w,k){for(var C in this.map)this.map.hasOwnProperty(C)&&w.call(k,this.map[C],C,this)},g.prototype.keys=function(){var w=[];return this.forEach(function(k,C){w.push(C)}),d(w)},g.prototype.values=function(){var w=[];return this.forEach(function(k){w.push(k)}),d(w)},g.prototype.entries=function(){var w=[];return this.forEach(function(k,C){w.push([C,k])}),d(w)},a.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function y(w){if(w.bodyUsed)return Promise.reject(new TypeError("Already read"));w.bodyUsed=!0}function _(w){return new Promise(function(k,C){w.onload=function(){k(w.result)},w.onerror=function(){C(w.error)}})}function m(w){var k=new FileReader,C=_(k);return k.readAsArrayBuffer(w),C}function p(w){var k=new FileReader,C=_(k);return k.readAsText(w),C}function v(w){for(var k=new Uint8Array(w),C=new Array(k.length),M=0;M<k.length;M++)C[M]=String.fromCharCode(k[M]);return C.join("")}function x(w){if(w.slice)return w.slice(0);var k=new Uint8Array(w.byteLength);return k.set(new Uint8Array(w)),k.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(w){this._bodyInit=w,w?typeof w=="string"?this._bodyText=w:a.blob&&Blob.prototype.isPrototypeOf(w)?this._bodyBlob=w:a.formData&&FormData.prototype.isPrototypeOf(w)?this._bodyFormData=w:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)?this._bodyText=w.toString():a.arrayBuffer&&a.blob&&l(w)?(this._bodyArrayBuffer=x(w.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(w)||c(w))?this._bodyArrayBuffer=x(w):this._bodyText=w=Object.prototype.toString.call(w):this._bodyText="",this.headers.get("content-type")||(typeof w=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var w=y(this);if(w)return w;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var w=y(this);if(w)return w;if(this._bodyBlob)return p(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(v(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(I)}),this.json=function(){return this.text().then(JSON.parse)},this}var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function O(w){var k=w.toUpperCase();return E.indexOf(k)>-1?k:w}function T(w,k){k=k||{};var C=k.body;if(w instanceof T){if(w.bodyUsed)throw new TypeError("Already read");this.url=w.url,this.credentials=w.credentials,k.headers||(this.headers=new g(w.headers)),this.method=w.method,this.mode=w.mode,this.signal=w.signal,!C&&w._bodyInit!=null&&(C=w._bodyInit,w.bodyUsed=!0)}else this.url=String(w);if(this.credentials=k.credentials||this.credentials||"same-origin",(k.headers||!this.headers)&&(this.headers=new g(k.headers)),this.method=O(k.method||this.method||"GET"),this.mode=k.mode||this.mode||null,this.signal=k.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&C)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(C)}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})};function I(w){var k=new FormData;return w.trim().split("&").forEach(function(C){if(C){var M=C.split("="),S=M.shift().replace(/\+/g," "),P=M.join("=").replace(/\+/g," ");k.append(decodeURIComponent(S),decodeURIComponent(P))}}),k}function R(w){var k=new g,C=w.replace(/\r?\n[\t ]+/g," ");return C.split(/\r?\n/).forEach(function(M){var S=M.split(":"),P=S.shift().trim();if(P){var D=S.join(":").trim();k.append(P,D)}}),k}b.call(T.prototype);function A(w,k){k||(k={}),this.type="default",this.status=k.status===void 0?200:k.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in k?k.statusText:"OK",this.headers=new g(k.headers),this.url=k.url||"",this._initBody(w)}b.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},A.error=function(){var w=new A(null,{status:0,statusText:""});return w.type="error",w};var j=[301,302,303,307,308];A.redirect=function(w,k){if(j.indexOf(k)===-1)throw new RangeError("Invalid status code");return new A(null,{status:k,headers:{location:w}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(k,C){this.message=k,this.name=C;var M=Error(k);this.stack=M.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function V(w,k){return new Promise(function(C,M){var S=new T(w,k);if(S.signal&&S.signal.aborted)return M(new o.DOMException("Aborted","AbortError"));var P=new XMLHttpRequest;function D(){P.abort()}P.onload=function(){var N={status:P.status,statusText:P.statusText,headers:R(P.getAllResponseHeaders()||"")};N.url="responseURL"in P?P.responseURL:N.headers.get("X-Request-URL");var F="response"in P?P.response:P.responseText;C(new A(F,N))},P.onerror=function(){M(new TypeError("Network request failed"))},P.ontimeout=function(){M(new TypeError("Network request failed"))},P.onabort=function(){M(new o.DOMException("Aborted","AbortError"))},P.open(S.method,S.url,!0),S.credentials==="include"?P.withCredentials=!0:S.credentials==="omit"&&(P.withCredentials=!1),"responseType"in P&&a.blob&&(P.responseType="blob"),S.headers.forEach(function(N,F){P.setRequestHeader(F,N)}),S.signal&&(S.signal.addEventListener("abort",D),P.onreadystatechange=function(){P.readyState===4&&S.signal.removeEventListener("abort",D)}),P.send(typeof S._bodyInit>"u"?null:S._bodyInit)})}return V.polyfill=!0,s.fetch||(s.fetch=V,s.Headers=g,s.Request=T,s.Response=A),o.Headers=g,o.Request=T,o.Response=A,o.fetch=V,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(df,df.exports);var mE=df.exports;const yE=Ei(mE);(function(t){var e=t.URLSearchParams&&t.URLSearchParams.prototype.get?t.URLSearchParams:null,n=e&&new e({a:1}).toString()==="a=1",r=e&&new e("s=%2B").get("s")==="+",i="__URLSearchParams__",s=e?function(){var p=new e;return p.append("s"," &"),p.toString()==="s=+%26"}():!0,o=l.prototype,a=!!(t.Symbol&&t.Symbol.iterator);if(e&&n&&r&&s)return;function l(p){p=p||"",(p instanceof URLSearchParams||p instanceof l)&&(p=p.toString()),this[i]=y(p)}o.append=function(p,v){_(this[i],p,v)},o.delete=function(p){delete this[i][p]},o.get=function(p){var v=this[i];return p in v?v[p][0]:null},o.getAll=function(p){var v=this[i];return p in v?v[p].slice(0):[]},o.has=function(p){return p in this[i]},o.set=function(v,x){this[i][v]=[""+x]},o.toString=function(){var p=this[i],v=[],x,b,E,O;for(b in p)for(E=h(b),x=0,O=p[b];x<O.length;x++)v.push(E+"="+h(O[x]));return v.join("&")};var u=!r,c=!u&&e&&!n&&t.Proxy;Object.defineProperty(t,"URLSearchParams",{value:c?new Proxy(e,{construct:function(p,v){return new p(new l(v[0]).toString())}}):l});var f=t.URLSearchParams.prototype;f.polyfill=!0,f.forEach=f.forEach||function(p,v){var x=y(this.toString());Object.getOwnPropertyNames(x).forEach(function(b){x[b].forEach(function(E){p.call(v,E,b,this)},this)},this)},f.sort=f.sort||function(){var p=y(this.toString()),v=[],x,b,E;for(x in p)v.push(x);for(v.sort(),b=0;b<v.length;b++)this.delete(v[b]);for(b=0;b<v.length;b++){var O=v[b],T=p[O];for(E=0;E<T.length;E++)this.append(O,T[E])}},f.keys=f.keys||function(){var p=[];return this.forEach(function(v,x){p.push(x)}),g(p)},f.values=f.values||function(){var p=[];return this.forEach(function(v){p.push(v)}),g(p)},f.entries=f.entries||function(){var p=[];return this.forEach(function(v,x){p.push([x,v])}),g(p)},a&&(f[t.Symbol.iterator]=f[t.Symbol.iterator]||f.entries);function h(p){var v={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(p).replace(/[!'\(\)~]|%20|%00/g,function(x){return v[x]})}function d(p){return p.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(v){return decodeURIComponent(v)})}function g(p){var v={next:function(){var x=p.shift();return{done:x===void 0,value:x}}};return a&&(v[t.Symbol.iterator]=function(){return v}),v}function y(p){var v={};if(typeof p=="object")if(m(p))for(var x=0;x<p.length;x++){var b=p[x];if(m(b)&&b.length===2)_(v,b[0],b[1]);else throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var E in p)p.hasOwnProperty(E)&&_(v,E,p[E]);else{p.indexOf("?")===0&&(p=p.slice(1));for(var O=p.split("&"),T=0;T<O.length;T++){var I=O[T],R=I.indexOf("=");-1<R?_(v,d(I.slice(0,R)),d(I.slice(R+1))):I&&_(v,d(I),"")}}return v}function _(p,v,x){var b=typeof x=="string"?x:x!=null&&typeof x.toString=="function"?x.toString():JSON.stringify(x);v in p?p[v].push(b):p[v]=[b]}function m(p){return!!p&&Object.prototype.toString.call(p)==="[object Array]"}})(typeof Ke<"u"?Ke:typeof window<"u"?window:Ke);const vE="day";function P_(t){return _i(M_(t||{}).map(([n,r])=>{if(["measures","dimensions","segments","timeDimensions","filters"].includes(n)&&Array.isArray(r)&&r.length===0)return null;if(n==="order"&&r){if(Array.isArray(r)&&!r.length)return null;if(!Object.keys(r).length)return null}return[n,r]}).filter(Boolean))}function _E(t){const e=t||{};return P_({...e,filters:(e.filters||[]).filter(n=>n.operator),timeDimensions:(e.timeDimensions||[]).filter(n=>!(!n.dateRange&&!n.granularity))})}function O_(t={},e={}){return it(Object.entries(t&&t.order||{}),Object.entries(e&&e.order||{}))&&it(t,e)}function xE(t){const e=(t.timeDimensions||[]).find(n=>n.granularity);return e?{[e.dimension]:"asc"}:(t.measures||[]).length>0&&(t.dimensions||[]).length>0?{[t.measures[0]]:"desc"}:(t.dimensions||[]).length>0?{[t.dimensions[0]]:"asc"}:{}}function bE(t,e={},n){const{query:r,...i}=qh(t),{meta:s,sessionGranularity:o}=n,a=o||vE;let l={query:r,...i},u=null;if(O_(r,e)||(u=r),Array.isArray(u)||Array.isArray(e))return t;if(u){if((e.timeDimensions||[]).length===1&&(u.timeDimensions||[]).length===1&&u.timeDimensions[0].granularity&&e.timeDimensions[0].granularity!==u.timeDimensions[0].granularity&&(l={...l,sessionGranularity:u.timeDimensions[0].granularity}),(e.measures||[]).length===0&&(u.measures||[]).length>0||(e.measures||[]).length===1&&(u.measures||[]).length===1&&e.measures[0]!==u.measures[0]){const[c]=u.timeDimensions||[],f=s.defaultTimeDimensionNameFor(u.measures[0]);return u={...u,timeDimensions:f?[{dimension:f,granularity:c&&c.granularity||a,dateRange:c&&c.dateRange}]:[]},{...l,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:u,chartType:f?"line":"number"}}return(e.dimensions||[]).length===0&&(u.dimensions||[]).length>0?(u={...u,timeDimensions:(u.timeDimensions||[]).map(c=>({...c,granularity:void 0}))},{...l,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:u,chartType:"table"}):(e.dimensions||[]).length>0&&(u.dimensions||[]).length===0?(u={...u,timeDimensions:(u.timeDimensions||[]).map(c=>({...c,granularity:c.granularity||a}))},{...l,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:u,chartType:(u.timeDimensions||[]).length?"line":"number"}):((e.dimensions||[]).length>0||(e.measures||[]).length>0)&&(u.dimensions||[]).length===0&&(u.measures||[]).length===0?(u={...u,timeDimensions:[],filters:[]},{...l,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:u,sessionGranularity:null}):l}if(l.chartType){const c=l.chartType;if((c==="line"||c==="area")&&(e.timeDimensions||[]).length===1&&!e.timeDimensions[0].granularity){const[f]=e.timeDimensions;return{...l,pivotConfig:null,query:{...e,timeDimensions:[{...f,granularity:a}]}}}if((c==="pie"||c==="table"||c==="number")&&(e.timeDimensions||[]).length===1&&e.timeDimensions[0].granularity){const[f]=e.timeDimensions;return{...l,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:{...e,timeDimensions:[{...f,granularity:void 0}]}}}}return l}function Vs(t){return t?(Array.isArray(t)?t:[t]).every(e=>e.measures&&e.measures.length||e.dimensions&&e.dimensions.length||e.timeDimensions&&e.timeDimensions.length):!1}function SE(t,e,n,r,i){const s={...t,x:[...t.x],y:[...t.y]},o=t[r][e],a=s[i].length-1;return o==="measures"?n=a+1:r===i&&n>=a&&s[i][a]==="measures"?n=a-1:r!==i&&n>a&&s[i][a]==="measures"&&(n=a),s[r].splice(e,1),s[i].splice(n,0,o),s}function wE(t,e,n){const r=[...t],[i]=r.splice(e,1);return r.splice(n,0,i),r}function Kh(t=[]){return t.reduce((e,n)=>n.or||n.and?[...e,...Kh(n.or||n.and)]:[...e,n],[])}function kE(t={}){const e=["measures","dimensions","segments"],n=new Set;return e.forEach(r=>(t[r]||[]).forEach(i=>n.add(i))),(t.timeDimensions||[]).forEach(r=>n.add(r.dimension)),Kh(t.filters).forEach(r=>n.add(r.dimension||r.member)),[...n]}function cg(t,e,n,r){const i=t.filter(s=>s!=null);return n&&n.aliasSeries&&n.aliasSeries[e]?[n.aliasSeries[e],...i]:r.has(i[0])?[e,...i]:i}Jr.extend(uk);const lr=(...t)=>Jr(...t).locale({...fk,weekStart:1}),fg={day:t=>t.by("d").map(e=>e.format("YYYY-MM-DDT00:00:00.000")),month:t=>t.snapTo("month").by("M").map(e=>e.format("YYYY-MM-01T00:00:00.000")),year:t=>t.snapTo("year").by("y").map(e=>e.format("YYYY-01-01T00:00:00.000")),hour:t=>t.by("h").map(e=>e.format("YYYY-MM-DDTHH:00:00.000")),minute:t=>t.by("m").map(e=>e.format("YYYY-MM-DDTHH:mm:00.000")),second:t=>t.by("s").map(e=>e.format("YYYY-MM-DDTHH:mm:ss.000")),week:t=>t.snapTo("week").by("w").map(e=>e.startOf("week").format("YYYY-MM-DDT00:00:00.000")),quarter:t=>t.snapTo("quarter").by("quarter").map(e=>e.startOf("quarter").format("YYYY-MM-DDT00:00:00.000"))},EE=/^\d\d\d\d-\d\d-\d\d$/,ME=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z?$/,PE=t=>{const e=new Map;return n=>(n.forEach(r=>{const i=t(r);e.has(i)||e.set(i,[]),e.get(i).push(r)}),Array.from(e.entries()))},Ui=t=>{const e=[];return t.forEach(n=>{n.forEach(r=>e.push(r))}),e},pf=(t,e)=>({by:n=>{const r=[];let i=lr(t);const s=lr(e);for(;i.isBefore(s)||i.isSame(s);)r.push(i),i=i.add(1,n);return r},snapTo:n=>pf(lr(t).startOf(n),lr(e).endOf(n)),start:lr(t),end:lr(e)}),Mt={REGULAR_QUERY:"regularQuery",COMPARE_DATE_RANGE_QUERY:"compareDateRangeQuery",BLENDING_QUERY:"blendingQuery"};class ke{static measureFromAxis(e){return e[e.length-1]}static timeDimensionMember(e){return`${e.dimension}.${e.granularity}`}static deserialize(e,n={}){return new ke(e.loadResponse,n)}constructor(e,n={}){if(this.loadResponse=e,this.loadResponse.queryType!=null?(this.queryType=e.queryType,this.loadResponses=e.results):(this.queryType=Mt.REGULAR_QUERY,this.loadResponse.pivotQuery={...e.query,queryType:this.queryType},this.loadResponses=[e]),!Object.values(Mt).includes(this.queryType))throw new Error("Unknown query type");this.parseDateMeasures=n.parseDateMeasures,this.options=n,this.backwardCompatibleData=[]}drillDown(e,n){if(this.queryType===Mt.COMPARE_DATE_RANGE_QUERY)throw new Error("compareDateRange drillDown query is not currently supported");if(this.queryType===Mt.BLENDING_QUERY)throw new Error("Data blending drillDown query is not currently supported");const{query:r}=this.loadResponses[0],{xValues:i=[],yValues:s=[]}=e,o=this.normalizePivotConfig(n),a=[];o.x.forEach((g,y)=>a.push([g,i[y]])),o.y.forEach((g,y)=>a.push([g,s[y]]));const{filters:l=[],segments:u=[]}=this.query(),{measures:c}=this.loadResponses[0].annotation;let[,f]=a.find(([g])=>g==="measures")||[];if(f===void 0&&([f]=Object.keys(c)),!(c[f]&&c[f].drillMembers||[]).length)return null;const h=[{member:f,operator:"measureFilter"},...l],d=[];return a.filter(([g])=>g!=="measures").forEach(([g,y])=>{const[_,m,p]=g.split(".");if(p!==void 0){const v=pf(y,y).snapTo(p),x=r.timeDimensions.find(E=>E.dimension);let b=[v.start,v.end];if(x!=null&&x.dateRange){const[E,O]=x.dateRange;b=[Jr(E)>v.start?Jr(E):v.start,Jr(O)<v.end?Jr(O):v.end]}d.push({dimension:[_,m].join("."),dateRange:b.map(E=>E.format("YYYY-MM-DDTHH:mm:ss.SSS"))})}else y==null?h.push({member:g,operator:"notSet"}):h.push({member:g,operator:"equals",values:[y.toString()]})}),d.length===0&&r.timeDimensions.length>0&&r.timeDimensions[0].granularity==null&&d.push(r.timeDimensions[0]),{...c[f].drillMembersGrouped,filters:h,...u.length>0?{segments:u}:{},timeDimensions:d,segments:u,timezone:r.timezone}}series(e){return this.seriesNames(e).map(({title:n,shortTitle:r,key:i})=>({title:n,shortTitle:r,key:i,series:this.chartPivot(e).map(({x:s,...o})=>({value:o[i],x:s}))}))}axisValues(e,n=0){const{query:r}=this.loadResponses[n];return i=>{const s=o=>e.filter(a=>a!=="measures").map(a=>i[a]!=null?i[a]:null).concat(o?[o]:[]);return e.find(o=>o==="measures")&&(r.measures||[]).length?r.measures.map(s):[s()]}}axisValuesString(e,n){const r=i=>i==null?"∅":i===""?"[Empty string]":i;return e.map(r).join(n||", ")}static getNormalizedPivotConfig(e={},n=null){const r={x:[],y:[],fillMissingDates:!0,joinDateRange:!1},{measures:i=[],dimensions:s=[]}=e,o=(e.timeDimensions||[]).filter(f=>!!f.granularity);n=n||(o.length?{x:o.map(f=>ke.timeDimensionMember(f)),y:s}:{x:s,y:[]}),n=ug(n,r);const a=f=>f.map(h=>o.find(d=>d.dimension===h)&&!s.find(d=>d===h)?ke.timeDimensionMember(e.timeDimensions.find(d=>d.dimension===h)):h);n.x=a(n.x),n.y=a(n.y);const l=n.x.concat(n.y),u=o.map(f=>ke.timeDimensionMember(f)).concat(s),c=f=>u.includes(f)||f==="measures";return n.x=n.x.concat(u.filter(f=>!l.includes(f)&&f!=="compareDateRange")).filter(c),n.y=n.y.filter(c),n.x.concat(n.y).find(f=>f==="measures")||n.y.push("measures"),s.includes("compareDateRange")&&!n.y.concat(n.x).includes("compareDateRange")&&n.y.unshift("compareDateRange"),i.length||(n.x=n.x.filter(f=>f!=="measures"),n.y=n.y.filter(f=>f!=="measures")),n}normalizePivotConfig(e){return ke.getNormalizedPivotConfig(this.loadResponse.pivotQuery,e)}timeSeries(e,n){if(!e.granularity)return null;let{dateRange:r}=e;if(!r){const l=ke.timeDimensionMember(e),u=Vi(li(c=>c[l]&&lr(c[l])),Gk(Boolean))(this.timeDimensionBackwardCompatibleData(n));r=u.length&&[ya(pE(c=>c.toDate()),u[0],u),ya(cE(c=>c.toDate()),u[0],u)]||null}if(!r)return null;const i=e.dateRange?e.dateRange.find(l=>l.match(EE)):!["hour","minute","second"].includes(e.granularity),[s,o]=r,a=pf(s,o);if(!fg[e.granularity])throw new Error(`Unsupported time granularity: ${e.granularity}`);return fg[e.granularity](i?a.snapTo("d"):a)}pivot(e){e=this.normalizePivotConfig(e);const{pivotQuery:n}=this.loadResponse,r=(s=0)=>{let o=PE(({xValues:h})=>this.axisValuesString(h));const a=(h,d)=>h[d]||0;if(e.fillMissingDates&&e.x.length===1&&it(e.x,(n.timeDimensions||[]).filter(h=>!!h.granularity).map(h=>ke.timeDimensionMember(h)))){const h=this.loadResponses.map(d=>this.timeSeries(d.query.timeDimensions[0],s));h[0]&&(o=d=>{const g=aE(({xValues:y})=>y[0],d);return h[s].map(y=>[y,g[y]||[{xValues:[y],row:{}}]])})}const l=Vi(li(h=>this.axisValues(e.x,s)(h).map(d=>({xValues:d,row:h}))),Ui,o)(this.timeDimensionBackwardCompatibleData(s)),u={};l.forEach(([,h])=>{h.forEach(({row:d})=>{this.axisValues(e.y,s)(d).forEach(g=>{Object.keys(d).length>0&&(u[g.join()]=g)})})});const c=Object.values(u),f=!!e.x.find(h=>h==="measures");return l.map(([,h])=>{const{xValues:d}=h[0],g={};return h.forEach(({row:y})=>{this.axisValues(e.y,s)(y).map(m=>({yValues:m,row:y})).forEach(m=>{g[this.axisValuesString(m.yValues)]=m})}),{xValues:d,yValuesArray:Ui(c.map(y=>{const _=f?ke.measureFromAxis(d):ke.measureFromAxis(y);return[[y,a((g[this.axisValuesString(y)]||{row:{}}).row,_)]]}))}})},i=this.loadResponses.length>1?this.loadResponses.map((s,o)=>r(o)):[];return i.length?this.mergePivots(i,e.joinDateRange):r()}mergePivots(e,n){const r=e.reduce((i,s)=>i!=null&&s.length>=i.length?i:s,null);return r.map((i,s)=>({xValues:n?[e.map(a=>a[s]&&a[s].xValues||[]).join(", ")]:r[s].xValues,yValuesArray:Ui(e.map(a=>a[s].yValuesArray))}))}pivotedRows(e){return this.chartPivot(e)}chartPivot(e){const n=i=>this.parseDateMeasures&&ME.test(i)?new Date(i):Number.isNaN(Number.parseFloat(i))?i:Number.parseFloat(i),r=new Set;return this.queryType===Mt.BLENDING_QUERY&&ag(this.loadResponses.map(({query:s})=>s.measures)).filter((s,o,a)=>a.indexOf(s)!==o).forEach(s=>r.add(s)),this.pivot(e).map(({xValues:i,yValuesArray:s})=>{const o={};return s.forEach(([a,l],u)=>{o[this.axisValuesString(cg(a,u,e,r),",")]=l&&n(l)}),{x:this.axisValuesString(i,","),xValues:i,...o}})}tablePivot(e){const n=this.normalizePivotConfig(e||{}),r=n.x.concat(n.y).includes("measures");return this.pivot(n).map(({xValues:i,yValuesArray:s})=>_i(n.x.map((o,a)=>[o,i[a]]).concat(r?s.map(([o,a])=>[o.length?o.join():"value",a]):[])))}tableColumns(e){const n=this.normalizePivotConfig(e||{}),r=Vi(ku("annotation"),ya(ug(),{}))(this.loadResponses),i=Object.values(r).reduce((c,f)=>({...c,...f}),{}),s={},o=c=>{const{title:f,shortTitle:h,type:d,format:g,meta:y}=i[c]||{};return{key:c,title:f,shortTitle:h,type:d,format:g,meta:y}},a=this.pivot(n);(a[0]&&a[0].yValuesArray||[]).forEach(([c])=>{if(c.length>0){let f=s;c.forEach((h,d)=>{f[`_${h}`]={key:h,memberId:n.y[d]==="measures"?h:n.y[d],children:f[`_${h}`]&&f[`_${h}`].children||{}},f=f[`_${h}`].children})}});const l=(c={},f=[])=>Object.keys(c).length===0?[]:Object.values(c).map(({key:h,...d})=>{const g=l(d.children,[...f,h]),{title:y,shortTitle:_,...m}=o(d.memberId),p=h!==d.memberId||y==null?h:"";return g.length?{...m,key:h,title:[y,p].join(" ").trim(),shortTitle:p||_,children:g}:{...m,key:h,dataIndex:[...f,h].join(),title:[y,p].join(" ").trim(),shortTitle:p||_}});let u=[];return!a.length&&n.y.includes("measures")&&(u=(this.loadResponses[0].query.measures||[]).map(c=>({...o(c),dataIndex:c}))),!n.y.length&&n.x.includes("measures")&&u.push({key:"value",dataIndex:"value",title:"Value",shortTitle:"Value",type:"string"}),n.x.map(c=>c==="measures"?{key:"measures",dataIndex:"measures",title:"Measures",shortTitle:"Measures",type:"string"}:{...o(c),dataIndex:c}).concat(l(s)).concat(u)}totalRow(e){return this.chartPivot(e)[0]}categories(e){return this.chartPivot(e)}seriesNames(e){e=this.normalizePivotConfig(e);const n=Vi(ku("annotation"),ku("measures"),fE)(this.loadResponses),r=Ui(this.loadResponses.map((s,o)=>Vi(li(this.axisValues(e.y,o)),Ui,E_)(this.timeDimensionBackwardCompatibleData(o)))),i=new Set;return this.queryType===Mt.BLENDING_QUERY&&ag(this.loadResponses.map(({query:o})=>o.measures)).filter((o,a,l)=>l.indexOf(o)!==a).forEach(o=>i.add(o)),r.map((s,o)=>{const a=cg(s,o,e,i);return{title:this.axisValuesString(e.y.find(l=>l==="measures")?og(1,a).concat(n[ke.measureFromAxis(s)].title):a,", "),shortTitle:this.axisValuesString(e.y.find(l=>l==="measures")?og(1,a).concat(n[ke.measureFromAxis(s)].shortTitle):a,", "),key:this.axisValuesString(a,","),yValues:s}})}query(){if(this.queryType!==Mt.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].query}pivotQuery(){return this.loadResponse.pivotQuery||null}totalRows(){return this.loadResponses[0].total}rawData(){if(this.queryType!==Mt.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].data}annotation(){if(this.queryType!==Mt.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].annotation}timeDimensionBackwardCompatibleData(e){if(e===void 0)throw new Error("resultIndex is required");if(!this.backwardCompatibleData[e]){const{data:n,query:r}=this.loadResponses[e],i=(r.timeDimensions||[]).filter(s=>!!s.granularity);this.backwardCompatibleData[e]=n.map(s=>({...s,..._i(Object.keys(s).filter(o=>i.find(a=>a.dimension===o)&&!s[ke.timeDimensionMember(i.find(a=>a.dimension===o))]).map(o=>[ke.timeDimensionMember(i.find(a=>a.dimension===o)),s[o]]))}))}return this.backwardCompatibleData[e]}decompose(){return this.loadResponses.map(e=>new ke({queryType:Mt.REGULAR_QUERY,pivotQuery:{...e.query,queryType:Mt.REGULAR_QUERY},results:[e]},this.options))}serialize(){return{loadResponse:qh(this.loadResponse)}}}class hg{constructor(e){this.sqlQuery=e}rawQuery(){return this.sqlQuery.sql}sql(){return this.rawQuery().sql[0]}}const Mu=t=>_i(t.map(e=>[e.name,e])),dg={string:[{name:"contains",title:"contains"},{name:"notContains",title:"does not contain"},{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"set",title:"is set"},{name:"notSet",title:"is not set"},{name:"startsWith",title:"starts with"},{name:"notStartsWith",title:"does not start with"},{name:"endsWith",title:"ends with"},{name:"notEndsWith",title:"does not end with"}],number:[{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"set",title:"is set"},{name:"notSet",title:"is not set"},{name:"gt",title:">"},{name:"gte",title:">="},{name:"lt",title:"<"},{name:"lte",title:"<="}],time:[{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"inDateRange",title:"in date range"},{name:"notInDateRange",title:"not in date range"},{name:"afterDate",title:"after date"},{name:"afterOrOnDate",title:"after or on date"},{name:"beforeDate",title:"before date"},{name:"beforeOrOnDate",title:"before or on date"}]};class OE{constructor(e){this.meta=e;const{cubes:n}=this.meta;this.cubes=n,this.cubesMap=_i(n.map(r=>[r.name,{measures:Mu(r.measures),dimensions:Mu(r.dimensions),segments:Mu(r.segments)}]))}membersForQuery(e,n){return gE(this.cubes.map(r=>r[n])).sort((r,i)=>r.title>i.title?1:-1)}membersGroupedByCube(){const e=["measures","dimensions","segments","timeDimensions"];return this.cubes.reduce((n,r)=>(e.forEach(i=>{let s=r[i];i==="timeDimensions"&&(s=r.dimensions.filter(o=>o.type==="time")),n[i]=[...n[i],{cubeName:r.name,cubeTitle:r.title,type:r.type,public:r.public,members:s}]}),n),{measures:[],dimensions:[],segments:[],timeDimensions:[]})}resolveMember(e,n){const[r]=e.split(".");if(!this.cubesMap[r])return{title:e,error:`Cube not found ${r} for path '${e}'`};const s=(Array.isArray(n)?n:[n]).map(o=>this.cubesMap[r][o]&&this.cubesMap[r][o][e]).find(o=>o);return s||{title:e,error:`Path not found '${e}'`}}defaultTimeDimensionNameFor(e){const[n]=e.split(".");return this.cubesMap[n]?Object.keys(this.cubesMap[n].dimensions||{}).find(r=>this.cubesMap[n].dimensions[r].type==="time"):null}filterOperatorsForMember(e,n){const r=this.resolveMember(e,n);return dg[r.type]||dg.string}}class CE{constructor(e){this.progressResponse=e}stage(){return this.progressResponse.stage}timeElapsed(){return this.progressResponse.timeElapsed}}class TE{constructor({authorization:e,apiUrl:n,method:r,headers:i={},credentials:s}){this.authorization=e,this.apiUrl=n,this.method=r,this.headers=i,this.credentials=s}request(e,{baseRequestId:n,...r}){let i=1;const s=new URLSearchParams(r&&Object.keys(r).map(u=>({[u]:typeof r[u]=="object"?JSON.stringify(r[u]):r[u]})).reduce((u,c)=>({...u,...c}),{}));let o=`${this.apiUrl}/${e}${s.toString().length?`?${s}`:""}`;const a=this.method||(o.length<2e3?"GET":"POST");a==="POST"&&(o=`${this.apiUrl}/${e}`,this.headers["Content-Type"]="application/json");const l=()=>yE(o,{method:a,headers:{Authorization:this.authorization,"x-request-id":n&&`${n}-span-${i++}`,...this.headers},credentials:this.credentials,body:a==="POST"?JSON.stringify(r):null});return{async subscribe(u){let c={error:"network Error"};try{c=await l()}finally{return u(c,()=>this.subscribe(u))}}}}}class DE extends Error{constructor(e,n,r){super(e),this.response=n,this.status=r}}let RE=0;const C_="Mutex has been changed",pt={DEFAULT:"default",COMPACT:"compact"};function AE(t){return new Promise(async(e,n)=>{try{e(await t)}catch(r){r!==C_&&n(r)}})}class IE{constructor(e,n){if(e!==null&&!Array.isArray(e)&&typeof e=="object"&&(n=e,e=void 0),n=n||{},!n.transport&&!n.apiUrl)throw new Error("The `apiUrl` option is required");this.apiToken=e,this.apiUrl=n.apiUrl,this.method=n.method,this.headers=n.headers||{},this.credentials=n.credentials,this.transport=n.transport||new TE({authorization:typeof e=="function"?void 0:e,apiUrl:this.apiUrl,method:this.method,headers:this.headers,credentials:this.credentials}),this.pollInterval=n.pollInterval||5,this.parseDateMeasures=n.parseDateMeasures,this.castNumerics=typeof n.castNumerics=="boolean"?n.castNumerics:!1,this.updateAuthorizationPromise=null}request(e,n){return this.transport.request(e,{baseRequestId:ok(),...n})}loadMethod(e,n,r,i){const s=++RE;typeof r=="function"&&!i&&(i=r,r=void 0),r=r||{};const o=r.mutexKey||"default";r.mutexObj&&(r.mutexObj[o]=s);const a=this.updateTransportAuthorization().then(()=>e());let l=!0,u=!1;const c=async()=>{const d=await a;if(r.mutexObj&&r.mutexObj[o]!==s)throw u=!0,d.unsubscribe&&await d.unsubscribe(),C_},f=async(d,g)=>{const y=await a,_=async()=>r.subscribe&&!u?(y.unsubscribe||await new Promise(b=>setTimeout(()=>b(),this.pollInterval*1e3)),g()):null,m=async b=>u?null:(b&&await new Promise(E=>setTimeout(()=>E(),this.pollInterval*1e3)),g());if(r.subscribe&&!l&&await this.updateTransportAuthorization(),l=!1,d.status===502)return await c(),m(!0);let p={},v="";try{v=await d.text(),p=JSON.parse(v)}catch{p.error=v}if(p.error==="Continue wait")return await c(),r.progressCallback&&r.progressCallback(new CE(p)),m();if(d.status!==200){await c(),!r.subscribe&&y.unsubscribe&&await y.unsubscribe();const b=new DE(p.error,p,d.status);if(i)i(b);else throw b;return _()}await c(),!r.subscribe&&y.unsubscribe&&await y.unsubscribe();const x=n(p);if(i)i(null,x);else return x;return _()},h=a.then(d=>AE(d.subscribe(f)));return i?{unsubscribe:async()=>{const d=await a;return u=!0,d.unsubscribe?d.unsubscribe():null}}:h}async updateTransportAuthorization(){if(this.updateAuthorizationPromise){await this.updateAuthorizationPromise;return}typeof this.apiToken=="function"&&(this.updateAuthorizationPromise=new Promise(async(e,n)=>{try{const r=await this.apiToken();this.transport.authorization!==r&&(this.transport.authorization=r),e()}catch(r){n(r)}finally{this.updateAuthorizationPromise=null}}),await this.updateAuthorizationPromise)}patchQueryInternal(e,n){return n===pt.COMPACT&&e.responseFormat!==pt.COMPACT?{...e,responseFormat:pt.COMPACT}:e}loadResponseInternal(e,n={}){return e.results.length&&(n.castNumerics&&e.results.forEach(r=>{const i=Object.entries({...r.annotation.measures,...r.annotation.dimensions}).map(([s,o])=>{if(o.type==="number")return s}).filter(Boolean);r.data=r.data.map(s=>(i.forEach(o=>{s[o]!=null&&(s[o]=Number(s[o]))}),s))}),e.results[0].query.responseFormat&&e.results[0].query.responseFormat===pt.COMPACT&&e.results.forEach((r,i)=>{const s=[];r.data.dataset.forEach(o=>{const a={};r.data.members.forEach((l,u)=>{a[l]=o[u]}),s.push(a)}),e.results[i].data=s})),new ke(e,{parseDateMeasures:this.parseDateMeasures})}load(e,n,r,i=pt.DEFAULT){return n={castNumerics:this.castNumerics,...n},i===pt.COMPACT&&(Array.isArray(e)?e=e.map(s=>this.patchQueryInternal(s,pt.COMPACT)):e=this.patchQueryInternal(e,pt.COMPACT)),this.loadMethod(()=>this.request("load",{query:e,queryType:"multi"}),s=>this.loadResponseInternal(s,n),n,r)}subscribe(e,n,r,i=pt.DEFAULT){return n={castNumerics:this.castNumerics,...n},i===pt.COMPACT&&(Array.isArray(e)?e=e.map(s=>this.patchQueryInternal(s,pt.COMPACT)):e=this.patchQueryInternal(e,pt.COMPACT)),this.loadMethod(()=>this.request("subscribe",{query:e,queryType:"multi"}),s=>this.loadResponseInternal(s,n),{...n,subscribe:!0},r)}sql(e,n,r){return this.loadMethod(()=>this.request("sql",{query:e}),i=>Array.isArray(i)?i.map(s=>new hg(s)):new hg(i),n,r)}meta(e,n){return this.loadMethod(()=>this.request("meta"),r=>new OE(r),e,n)}dryRun(e,n,r){return this.loadMethod(()=>this.request("dry-run",{query:e}),i=>i,n,r)}}var $E=(t,e)=>new IE(t,e),Il=ne.createContext(null),ia;let pg=(ia=class extends _r.Component{static isQueryPresent(e){return Vs(e)}constructor(e){super(e),this.state={},this.mutexObj={}}componentDidMount(){const{query:e,queries:n}=this.props;e&&this.load(e),n&&this.loadQueries(n)}shouldComponentUpdate(e,n){const{query:r,queries:i,render:s,cubeApi:o,loadSql:a,updateOnlyOnStateChange:l}=this.props;return l?!it(e.query,r)||!it(e.queries,i)||(e.render==null||s==null)&&e.render!==s||e.cubeApi!==o||e.loadSql!==a||!it(n,this.state)||e.updateOnlyOnStateChange!==l:!0}componentDidUpdate(e){const{query:n,queries:r}=this.props;it(e.query,n)||this.load(n),it(e.queries,r)||this.loadQueries(r)}cubeApi(){return this.props.cubeApi||this.context&&this.context.cubeApi}load(e){const{resetResultSetOnChange:n}=this.props;this.setState({isLoading:!0,error:null,sqlQuery:null,...n?{resultSet:null}:{}});const{loadSql:r}=this.props,i=this.cubeApi();e&&Vs(e)&&(r==="only"?i.sql(e,{mutexObj:this.mutexObj,mutexKey:"sql"}).then(s=>this.setState({sqlQuery:s,error:null,isLoading:!1})).catch(s=>this.setState({...n?{resultSet:null}:{},error:s,isLoading:!1})):r?Promise.all([i.sql(e,{mutexObj:this.mutexObj,mutexKey:"sql"}),i.load(e,{mutexObj:this.mutexObj,mutexKey:"query"})]).then(([s,o])=>this.setState({sqlQuery:s,resultSet:o,error:null,isLoading:!1})).catch(s=>this.setState({...n?{resultSet:null}:{},error:s,isLoading:!1})):i.load(e,{mutexObj:this.mutexObj,mutexKey:"query"}).then(s=>this.setState({resultSet:s,error:null,isLoading:!1})).catch(s=>this.setState({...n?{resultSet:null}:{},error:s,isLoading:!1})))}loadQueries(e){const n=this.cubeApi(),{resetResultSetOnChange:r}=this.props;this.setState({isLoading:!0,...r?{resultSet:null}:{},error:null}),Promise.all(M_(e).map(([s,o])=>n.load(o,{mutexObj:this.mutexObj,mutexKey:s}).then(a=>[s,a]))).then(s=>this.setState({resultSet:_i(s),error:null,isLoading:!1})).catch(s=>this.setState({...r?{resultSet:null}:{},error:s,isLoading:!1}))}render(){var l;const{error:e,queries:n,resultSet:r,isLoading:i,sqlQuery:s}=this.state,{render:o}=this.props,a={error:e?new Error(((l=e.response)==null?void 0:l.plainError)||e.message||e.toString()):null,resultSet:n?r||{}:r,loadingState:{isLoading:i},sqlQuery:s};return o?o(a):null}},L(ia,"contextType",Il),L(ia,"defaultProps",{cubeApi:null,query:null,render:null,queries:null,loadSql:null,updateOnlyOnStateChange:!1,resetResultSetOnChange:!0}),ia);function gf(t){return typeof t!="object"?t:Object.fromEntries(Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>Array.isArray(n)?[e,n.map(gf)]:[e,typeof n=="object"?gf(n):n]))}const LE=[{name:void 0,title:"w/o grouping"},{name:"second",title:"Second"},{name:"minute",title:"Minute"},{name:"hour",title:"Hour"},{name:"day",title:"Day"},{name:"week",title:"Week"},{name:"month",title:"Month"},{name:"quarter",title:"Quarter"},{name:"year",title:"Year"}],wn=class wn extends _r.Component{constructor(n){super(n);L(this,"fetchMeta",async()=>{var o,a,l;if(!this.cubeApi())return;let n,r=null,i=null,s=null;try{this.setState({isFetchingMeta:!0}),n=await this.cubeApi().meta()}catch(u){r=((o=u.response)==null?void 0:o.plainError)||u,i=u,s=((l=(a=u.response)==null?void 0:a.stack)==null?void 0:l.replace(u.message||"",""))||""}this.setState({meta:n,metaError:r?new Error(r.message||r.toString()):null,richMetaError:i,metaErrorStack:s,isFetchingMeta:!1},()=>{this.updateQuery({})})});this.state={query:n.defaultQuery||n.query,chartType:n.defaultChartType,validatedQuery:n.query,missingMembers:[],isFetchingMeta:!0,dryRunResponse:null,...n.vizState,...n.initialVizState},this.mutexObj={},this.orderMembersOrderKeys=[]}static getDerivedStateFromProps(n,r){if(n.query||n.vizState){const i={...r,...n.vizState||{}};if(Array.isArray(n.query))throw new Error("Array of queries is not supported.");return{...i,query:{...i.query,...n.query||{}}}}return null}static resolveMember(n,{meta:r,query:i}){return r?Array.isArray(i)?i.reduce((s,o)=>s.concat(wn.resolveMember(n,{meta:r,query:o})),[]):n==="timeDimensions"?(i.timeDimensions||[]).map((s,o)=>({...s,dimension:{...r.resolveMember(s.dimension,"dimensions"),granularities:LE},index:o})):(i[n]||[]).map((s,o)=>({index:o,...r.resolveMember(s,n)})):[]}async componentDidMount(){this.prevContext=this.context,await this.fetchMeta()}async componentDidUpdate(n){var o,a;const{schemaVersion:r,onSchemaChange:i}=this.props,{meta:s}=this.state;if(((o=this.prevContext)==null?void 0:o.cubeApi)!==((a=this.context)==null?void 0:a.cubeApi)&&(this.prevContext=this.context,await this.fetchMeta()),n.schemaVersion!==r)try{const l=await this.cubeApi().meta();!it(l,s)&&typeof i=="function"&&i({schemaVersion:r,refresh:async()=>{await this.fetchMeta()}})}catch(l){this.setState({metaError:l})}}cubeApi(){const{cubeApi:n}=this.props;return n||this.context&&this.context.cubeApi}getMissingMembers(n,r){return r?kE(n).map(i=>r.resolveMember(i,["measures","dimensions","segments"]).error?i:!1).filter(Boolean):[]}isQueryPresent(){const{query:n}=this.state;return pg.isQueryPresent(n)}prepareRenderProps(n){const r=M=>M.name,i=M=>{const S=M.compareDateRange?{compareDateRange:M.compareDateRange}:{dateRange:M.dateRange};return gf({dimension:M.dimension.name,granularity:M.granularity,...S})},s=M=>{var S,P;return{member:((S=M.member)==null?void 0:S.name)||((P=M.dimension)==null?void 0:P.name),operator:M.operator,...["set","notSet"].includes(M.operator)?{}:{values:M.values}}},o=(M,S=r)=>({add:P=>{const{query:D}=this.state;this.updateQuery({[M]:(D[M]||[]).concat(S(P))})},remove:P=>{const{query:D}=this.state;return this.updateQuery({[M]:(D[M]||[]).filter((N,F)=>F!==P.index)})},update:(P,D)=>{const{query:N}=this.state,F=(N[M]||[]).concat([]);return F.splice(P.index,1,S(D)),this.updateQuery({[M]:F})}}),{meta:a,metaError:l,richMetaError:u,query:c,queryError:f,chartType:h,pivotConfig:d,validatedQuery:g,missingMembers:y,isFetchingMeta:_,dryRunResponse:m,metaErrorStack:p}=this.state,x=hf(M=>`${Nr("member",M)}${Nr("operator",M)}`,Kh(a&&c.filters||[]).map(M=>({...M,member:M.member||M.dimension}))).map((M,S)=>({...M,dimension:a.resolveMember(M.member||M.dimension,["dimensions","measures"]),operators:a.filterOperatorsForMember(M.member||M.dimension,["dimensions","measures"]),index:S})),b=wn.resolveMember("measures",this.state),E=wn.resolveMember("dimensions",this.state),O=wn.resolveMember("timeDimensions",this.state),T=(a&&c.segments||[]).map((M,S)=>({index:S,...a.resolveMember(M,"segments")}));let I=[],R=[],A=[],j=[];const V=(a==null?void 0:a.membersGroupedByCube())||{measures:[],dimensions:[],segments:[],timeDimensions:[]};if(a){I=a.membersForQuery(c,"measures"),R=a.membersForQuery(c,"dimensions"),A=a.membersForQuery(c,"segments");const M=lg(Nr("cubeName"),V.measures),S=lg(Nr("cubeName"),V.dimensions);j=E_([...Object.keys(M),...Object.keys(S)]).sort().map(D=>{var F,G;return{...M[D]||S[D],members:[...(F=M[D])==null?void 0:F.members,...(G=S[D])==null?void 0:G.members].sort((H,ae)=>H.shortTitle>ae.shortTitle?1:-1)}})}const w=Array.isArray(c.order)?Object.fromEntries(c.order):c.order,k=[...b,...E,...O.map(({dimension:M})=>M)];let C=hf(Nr("id"),[...k.map(({name:M,title:S})=>({id:M,title:S,order:(w==null?void 0:w[M])||"none"}))]);return this.orderMembersOrderKeys.length!==C.length&&(this.orderMembersOrderKeys=C.map(({id:M})=>M)),this.orderMembersOrderKeys.length&&(C=(this.orderMembersOrderKeys||[]).map(M=>C.find(S=>S.id===M)).filter(Boolean)),{meta:a,metaError:l,richMetaError:u,metaErrorStack:p,query:c,error:f,validatedQuery:g,isQueryPresent:this.isQueryPresent(),chartType:h,measures:b,dimensions:E,timeDimensions:O,segments:T,filters:x,orderMembers:C,availableMeasures:I,availableDimensions:R,availableTimeDimensions:R.filter(M=>M.type==="time"),availableSegments:A,availableMembers:V,availableFilterMembers:j,updateQuery:M=>this.updateQuery(M),updateMeasures:o("measures"),updateDimensions:o("dimensions"),updateSegments:o("segments"),updateTimeDimensions:o("timeDimensions",i),updateFilters:o("filters",s),updateChartType:M=>this.updateVizState({chartType:M}),updateOrder:{set:(M,S="asc")=>{this.updateQuery({order:C.map(P=>({...P,order:P.id===M?S:P.order})).reduce((P,{id:D,order:N})=>N!=="none"?[...P,[D,N]]:P,[])})},update:M=>{this.updateQuery({order:M})},reorder:(M,S)=>{if(M==null||S==null)return;const P=wE(C,M,S);this.orderMembersOrderKeys=P.map(({id:D})=>D),this.updateQuery({order:P.reduce((D,{id:N,order:F})=>F!=="none"?[...D,[N,F]]:D,[])})}},pivotConfig:d,updatePivotConfig:{moveItem:({sourceIndex:M,destinationIndex:S,sourceAxis:P,destinationAxis:D})=>{this.updateVizState({pivotConfig:SE(d,M,S,P,D)})},update:M=>{const{limit:S}=M;this.updateVizState({pivotConfig:{...d,...M},...S?{query:{...c,limit:S}}:null})}},missingMembers:y,refresh:this.fetchMeta,isFetchingMeta:_,dryRunResponse:m,...n}}updateQuery(n){const{query:r}=this.state;this.updateVizState({query:P_({...r,...n})})}async updateVizState(n){var g;const{setQuery:r,setVizState:i}=this.props,{query:s,pivotConfig:o,chartType:a,meta:l}=this.state,u=this.applyStateChangeHeuristics(n);u.query||(u.query={...s});let c=null;const f=y=>{const{onVizStateChanged:_}=this.props;if(_){const m=Ro(["chartType","pivotConfig","query"],y);(!c||!it(c,m))&&(_(m),c=qh(m))}},h=y=>{i&&i(Ro(["chartType","pivotConfig","query"],y)),y.query&&r&&r(y.query)};if(u.shouldApplyHeuristicOrder&&(u.query.order=xE(u.query)),u.pivotConfig=ke.getNormalizedPivotConfig(u.query,u.pivotConfig!==void 0?u.pivotConfig:o),u.missingMembers=this.getMissingMembers(u.query,l),u.chartType=u.chartType||n.chartType||a,h({...n,query:u.query}),this.setState({...u,queryError:null}),f(u),!it(Ro(["measures","dimensions","timeDimensions"],s),Ro(["measures","dimensions","timeDimensions"],u.query))&&Vs(u.query)&&u.missingMembers.length===0)try{const y=await this.cubeApi().dryRun(u.query,{mutexObj:this.mutexObj});u.shouldApplyHeuristicOrder&&(u.query.order=(y.queryOrder||[]).reduce((_,m)=>({..._,...m}),{})),u.pivotConfig=ke.getNormalizedPivotConfig(y.pivotQuery,u.pivotConfig),u.validatedQuery=this.validatedQuery(u),u.dryRunResponse=y,Vs(s)&&h({...this.state,...u})}catch(y){this.setState({queryError:new Error(((g=y.response)==null?void 0:g.plainError)||y.message),richQueryError:new Error(y.message||y.toString())})}this.setState(u,()=>f(this.state))}validatedQuery(n){const{query:r}=n||this.state;return _E(r)}defaultHeuristics(n){const{query:r,sessionGranularity:i,meta:s}=this.state;return bE(n,r,{meta:s,sessionGranularity:i||"day"})}applyStateChangeHeuristics(n){const{stateChangeHeuristics:r,disableHeuristics:i}=this.props;return i?n:r&&r(this.state,n)||this.defaultHeuristics(n)}render(){const{query:n}=this.state,{cubeApi:r,render:i,wrapWithQueryRenderer:s}=this.props;return s?_r.createElement(pg,{query:n,cubeApi:r,resetResultSetOnChange:!1,render:o=>i?i(this.prepareRenderProps(o)):null}):i?i(this.prepareRenderProps()):null}};L(wn,"contextType",Il),L(wn,"defaultProps",{cubeApi:null,stateChangeHeuristics:null,disableHeuristics:!1,render:null,wrapWithQueryRenderer:!0,defaultChartType:"line",defaultQuery:{},initialVizState:null,onVizStateChanged:null,query:null,setQuery:null,vizState:null,setVizState:null});let gg=wn;function NE({cubeApi:t,children:e,options:n={}}){return _r.createElement(Il.Provider,{value:{cubeApi:t,options:n}},e)}function FE(t){const e=ne.useRef([]);return it(t,e.current)||(e.current=t),e.current}function zE(){const t=ne.useRef(!1);return ne.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),()=>t.current}function jE(t,e={}){const n=ne.useRef({}),r=zE(),[i,s]=ne.useState(null),[o,a]=ne.useState(!1),[l,u]=ne.useState(null),[c,f]=ne.useState(null),[h,d]=ne.useState(null),g=ne.useContext(Il);let y=null;const _=({progressResponse:p})=>f(p);async function m(){var x;const{resetResultSetOnChange:p}=e,v=e.cubeApi||(g==null?void 0:g.cubeApi);if(!v)throw new Error("Cube API client is not provided");p&&u(null),d(null),a(!0);try{const b=await v.load(t,{mutexObj:n.current,mutexKey:"query",progressCallback:_,castNumerics:!!(typeof e.castNumerics=="boolean"?e.castNumerics:(x=g==null?void 0:g.options)!=null&&x.castNumerics)});r()&&(u(b),f(null))}catch(b){r()&&(d(b),u(null),f(null))}r()&&a(!1)}return ne.useEffect(()=>{const{skip:p=!1,resetResultSetOnChange:v}=e,x=e.cubeApi||(g==null?void 0:g.cubeApi);if(!x)throw new Error("Cube API client is not provided");async function b(){if(!p&&Vs(t)){O_(i,t)||((v==null||v)&&u(null),s(t)),d(null),a(!0);try{y&&(await y.unsubscribe(),y=null),e.subscribe?y=x.subscribe(t,{mutexObj:n.current,mutexKey:"query",progressCallback:_},(E,O)=>{r()&&(E?d(E):u(O),a(!1),f(null))}):await m()}catch(E){r()&&(d(E),u(null),a(!1),f(null))}}}return b(),()=>{y&&(y.unsubscribe(),y=null)}},FE([t,Object.keys(t&&t.order||{}),e,g])),{isLoading:o,resultSet:l,error:h,progress:c,previousQuery:i,refetch:m}}var T_={exports:{}},D_={exports:{}};(function(t){function e(n,r){if(n==null)return{};var i={};for(var s in n)if({}.hasOwnProperty.call(n,s)){if(r.indexOf(s)!==-1)continue;i[s]=n[s]}return i}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(D_);var BE=D_.exports;(function(t){var e=BE;function n(r,i){if(r==null)return{};var s,o,a=e(r,i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);for(o=0;o<l.length;o++)s=l[o],i.indexOf(s)===-1&&{}.propertyIsEnumerable.call(r,s)&&(a[s]=r[s])}return a}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(T_);var VE=T_.exports,R_={exports:{}};(function(t){function e(r,i,s,o,a,l,u){try{var c=r[l](u),f=c.value}catch(h){return void s(h)}c.done?i(f):Promise.resolve(f).then(o,a)}function n(r){return function(){var i=this,s=arguments;return new Promise(function(o,a){var l=r.apply(i,s);function u(f){e(l,o,a,u,c,"next",f)}function c(f){e(l,o,a,u,c,"throw",f)}u(void 0)})}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(R_);var UE=R_.exports,A_={exports:{}};(function(t){function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(A_);var WE=A_.exports,I_={exports:{}},$_={exports:{}},L_={exports:{}};(function(t){function e(n){"@babel/helpers - typeof";return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(L_);var Xh=L_.exports,N_={exports:{}};(function(t){var e=Xh.default;function n(r,i){if(e(r)!="object"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var o=s.call(r,i||"default");if(e(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(N_);var HE=N_.exports;(function(t){var e=Xh.default,n=HE;function r(i){var s=n(i,"string");return e(s)=="symbol"?s:s+""}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})($_);var F_=$_.exports;(function(t){var e=F_;function n(i,s){for(var o=0;o<s.length;o++){var a=s[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(i,e(a.key),a)}}function r(i,s,o){return s&&n(i.prototype,s),o&&n(i,o),Object.defineProperty(i,"prototype",{writable:!1}),i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(I_);var YE=I_.exports,z_={exports:{}};(function(t){var e=F_;function n(r,i,s){return(i=e(i))in r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s,r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(z_);var qE=z_.exports,Wi=function(t){return t&&t.Math===Math&&t},ve=Wi(typeof globalThis=="object"&&globalThis)||Wi(typeof window=="object"&&window)||Wi(typeof self=="object"&&self)||Wi(typeof Ke=="object"&&Ke)||Wi(typeof Ke=="object"&&Ke)||function(){return this}()||Function("return this")(),Jh={},ft=function(t){try{return!!t()}catch{return!0}},GE=ft,qt=!GE(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),QE=ft,$l=!QE(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),KE=$l,Ao=Function.prototype.call,pn=KE?Ao.bind(Ao):function(){return Ao.apply(Ao,arguments)},j_={},B_={}.propertyIsEnumerable,V_=Object.getOwnPropertyDescriptor,XE=V_&&!B_.call({1:2},1);j_.f=XE?function(e){var n=V_(this,e);return!!n&&n.enumerable}:B_;var U_=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},W_=$l,H_=Function.prototype,mf=H_.call,JE=W_&&H_.bind.bind(mf,mf),We=W_?JE:function(t){return function(){return mf.apply(t,arguments)}},Y_=We,ZE=Y_({}.toString),eM=Y_("".slice),io=function(t){return eM(ZE(t),8,-1)},tM=We,nM=ft,rM=io,Pu=Object,iM=tM("".split),q_=nM(function(){return!Pu("z").propertyIsEnumerable(0)})?function(t){return rM(t)==="String"?iM(t,""):Pu(t)}:Pu,Ll=function(t){return t==null},sM=Ll,oM=TypeError,G_=function(t){if(sM(t))throw new oM("Can't call method on "+t);return t},aM=q_,lM=G_,Nl=function(t){return aM(lM(t))},Ou=typeof document=="object"&&document.all,Re=typeof Ou>"u"&&Ou!==void 0?function(t){return typeof t=="function"||t===Ou}:function(t){return typeof t=="function"},uM=Re,gn=function(t){return typeof t=="object"?t!==null:uM(t)},Cu=ve,cM=Re,fM=function(t){return cM(t)?t:void 0},Cr=function(t,e){return arguments.length<2?fM(Cu[t]):Cu[t]&&Cu[t][e]},hM=We,Zh=hM({}.isPrototypeOf),so=typeof navigator<"u"&&String(navigator.userAgent)||"",Q_=ve,Tu=so,mg=Q_.process,yg=Q_.Deno,vg=mg&&mg.versions||yg&&yg.version,_g=vg&&vg.v8,Tt,nl;_g&&(Tt=_g.split("."),nl=Tt[0]>0&&Tt[0]<4?1:+(Tt[0]+Tt[1]));!nl&&Tu&&(Tt=Tu.match(/Edge\/(\d+)/),(!Tt||Tt[1]>=74)&&(Tt=Tu.match(/Chrome\/(\d+)/),Tt&&(nl=+Tt[1])));var ed=nl,xg=ed,dM=ft,pM=ve,gM=pM.String,K_=!!Object.getOwnPropertySymbols&&!dM(function(){var t=Symbol("symbol detection");return!gM(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&xg&&xg<41}),mM=K_,X_=mM&&!Symbol.sham&&typeof Symbol.iterator=="symbol",yM=Cr,vM=Re,_M=Zh,xM=X_,bM=Object,J_=xM?function(t){return typeof t=="symbol"}:function(t){var e=yM("Symbol");return vM(e)&&_M(e.prototype,bM(t))},SM=String,Fl=function(t){try{return SM(t)}catch{return"Object"}},wM=Re,kM=Fl,EM=TypeError,Kn=function(t){if(wM(t))return t;throw new EM(kM(t)+" is not a function")},MM=Kn,PM=Ll,td=function(t,e){var n=t[e];return PM(n)?void 0:MM(n)},Du=pn,Ru=Re,Au=gn,OM=TypeError,CM=function(t,e){var n,r;if(e==="string"&&Ru(n=t.toString)&&!Au(r=Du(n,t))||Ru(n=t.valueOf)&&!Au(r=Du(n,t))||e!=="string"&&Ru(n=t.toString)&&!Au(r=Du(n,t)))return r;throw new OM("Can't convert object to primitive value")},Z_={exports:{}},bg=ve,TM=Object.defineProperty,nd=function(t,e){try{TM(bg,t,{value:e,configurable:!0,writable:!0})}catch{bg[t]=e}return e},DM=ve,RM=nd,Sg="__core-js_shared__",wg=Z_.exports=DM[Sg]||RM(Sg,{});(wg.versions||(wg.versions=[])).push({version:"3.36.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"});var rd=Z_.exports,kg=rd,ex=function(t,e){return kg[t]||(kg[t]=e||{})},AM=G_,IM=Object,id=function(t){return IM(AM(t))},$M=We,LM=id,NM=$M({}.hasOwnProperty),mn=Object.hasOwn||function(e,n){return NM(LM(e),n)},FM=We,zM=0,jM=Math.random(),BM=FM(1 .toString),tx=function(t){return"Symbol("+(t===void 0?"":t)+")_"+BM(++zM+jM,36)},VM=ve,UM=ex,Eg=mn,WM=tx,HM=K_,YM=X_,Zr=VM.Symbol,Iu=UM("wks"),qM=YM?Zr.for||Zr:Zr&&Zr.withoutSetter||WM,ht=function(t){return Eg(Iu,t)||(Iu[t]=HM&&Eg(Zr,t)?Zr[t]:qM("Symbol."+t)),Iu[t]},GM=pn,Mg=gn,Pg=J_,QM=td,KM=CM,XM=ht,JM=TypeError,ZM=XM("toPrimitive"),eP=function(t,e){if(!Mg(t)||Pg(t))return t;var n=QM(t,ZM),r;if(n){if(e===void 0&&(e="default"),r=GM(n,t,e),!Mg(r)||Pg(r))return r;throw new JM("Can't convert object to primitive value")}return e===void 0&&(e="number"),KM(t,e)},tP=eP,nP=J_,nx=function(t){var e=tP(t,"string");return nP(e)?e:e+""},rP=ve,Og=gn,yf=rP.document,iP=Og(yf)&&Og(yf.createElement),zl=function(t){return iP?yf.createElement(t):{}},sP=qt,oP=ft,aP=zl,rx=!sP&&!oP(function(){return Object.defineProperty(aP("div"),"a",{get:function(){return 7}}).a!==7}),lP=qt,uP=pn,cP=j_,fP=U_,hP=Nl,dP=nx,pP=mn,gP=rx,Cg=Object.getOwnPropertyDescriptor;Jh.f=lP?Cg:function(e,n){if(e=hP(e),n=dP(n),gP)try{return Cg(e,n)}catch{}if(pP(e,n))return fP(!uP(cP.f,e,n),e[n])};var Xn={},mP=qt,yP=ft,ix=mP&&yP(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),vP=gn,_P=String,xP=TypeError,Gt=function(t){if(vP(t))return t;throw new xP(_P(t)+" is not an object")},bP=qt,SP=rx,wP=ix,Io=Gt,Tg=nx,kP=TypeError,$u=Object.defineProperty,EP=Object.getOwnPropertyDescriptor,Lu="enumerable",Nu="configurable",Fu="writable";Xn.f=bP?wP?function(e,n,r){if(Io(e),n=Tg(n),Io(r),typeof e=="function"&&n==="prototype"&&"value"in r&&Fu in r&&!r[Fu]){var i=EP(e,n);i&&i[Fu]&&(e[n]=r.value,r={configurable:Nu in r?r[Nu]:i[Nu],enumerable:Lu in r?r[Lu]:i[Lu],writable:!1})}return $u(e,n,r)}:$u:function(e,n,r){if(Io(e),n=Tg(n),Io(r),SP)try{return $u(e,n,r)}catch{}if("get"in r||"set"in r)throw new kP("Accessors not supported");return"value"in r&&(e[n]=r.value),e};var MP=qt,PP=Xn,OP=U_,sd=MP?function(t,e,n){return PP.f(t,e,OP(1,n))}:function(t,e,n){return t[e]=n,t},sx={exports:{}},vf=qt,CP=mn,ox=Function.prototype,TP=vf&&Object.getOwnPropertyDescriptor,od=CP(ox,"name"),DP=od&&(function(){}).name==="something",RP=od&&(!vf||vf&&TP(ox,"name").configurable),AP={EXISTS:od,PROPER:DP,CONFIGURABLE:RP},IP=We,$P=Re,_f=rd,LP=IP(Function.toString);$P(_f.inspectSource)||(_f.inspectSource=function(t){return LP(t)});var ad=_f.inspectSource,NP=ve,FP=Re,Dg=NP.WeakMap,zP=FP(Dg)&&/native code/.test(String(Dg)),jP=ex,BP=tx,Rg=jP("keys"),ax=function(t){return Rg[t]||(Rg[t]=BP(t))},ld={},VP=zP,lx=ve,UP=gn,WP=sd,zu=mn,ju=rd,HP=ax,YP=ld,Ag="Object already initialized",xf=lx.TypeError,qP=lx.WeakMap,rl,Us,il,GP=function(t){return il(t)?Us(t):rl(t,{})},QP=function(t){return function(e){var n;if(!UP(e)||(n=Us(e)).type!==t)throw new xf("Incompatible receiver, "+t+" required");return n}};if(VP||ju.state){var Ft=ju.state||(ju.state=new qP);Ft.get=Ft.get,Ft.has=Ft.has,Ft.set=Ft.set,rl=function(t,e){if(Ft.has(t))throw new xf(Ag);return e.facade=t,Ft.set(t,e),e},Us=function(t){return Ft.get(t)||{}},il=function(t){return Ft.has(t)}}else{var Ar=HP("state");YP[Ar]=!0,rl=function(t,e){if(zu(t,Ar))throw new xf(Ag);return e.facade=t,WP(t,Ar,e),e},Us=function(t){return zu(t,Ar)?t[Ar]:{}},il=function(t){return zu(t,Ar)}}var ux={set:rl,get:Us,has:il,enforce:GP,getterFor:QP},ud=We,KP=ft,XP=Re,$o=mn,bf=qt,JP=AP.CONFIGURABLE,ZP=ad,cx=ux,eO=cx.enforce,tO=cx.get,Ig=String,va=Object.defineProperty,nO=ud("".slice),rO=ud("".replace),iO=ud([].join),sO=bf&&!KP(function(){return va(function(){},"length",{value:8}).length!==8}),oO=String(String).split("String"),aO=sx.exports=function(t,e,n){nO(Ig(e),0,7)==="Symbol("&&(e="["+rO(Ig(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!$o(t,"name")||JP&&t.name!==e)&&(bf?va(t,"name",{value:e,configurable:!0}):t.name=e),sO&&n&&$o(n,"arity")&&t.length!==n.arity&&va(t,"length",{value:n.arity});try{n&&$o(n,"constructor")&&n.constructor?bf&&va(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var r=eO(t);return $o(r,"source")||(r.source=iO(oO,typeof e=="string"?e:"")),t};Function.prototype.toString=aO(function(){return XP(this)&&tO(this).source||ZP(this)},"toString");var fx=sx.exports,lO=Re,uO=Xn,cO=fx,fO=nd,oo=function(t,e,n,r){r||(r={});var i=r.enumerable,s=r.name!==void 0?r.name:e;if(lO(n)&&cO(n,s,r),r.global)i?t[e]=n:fO(e,n);else{try{r.unsafe?t[e]&&(i=!0):delete t[e]}catch{}i?t[e]=n:uO.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},hx={},hO=Math.ceil,dO=Math.floor,pO=Math.trunc||function(e){var n=+e;return(n>0?dO:hO)(n)},gO=pO,dx=function(t){var e=+t;return e!==e||e===0?0:gO(e)},mO=dx,yO=Math.max,vO=Math.min,_O=function(t,e){var n=mO(t);return n<0?yO(n+e,0):vO(n,e)},xO=dx,bO=Math.min,SO=function(t){var e=xO(t);return e>0?bO(e,9007199254740991):0},wO=SO,cd=function(t){return wO(t.length)},kO=Nl,EO=_O,MO=cd,$g=function(t){return function(e,n,r){var i=kO(e),s=MO(i);if(s===0)return!t&&-1;var o=EO(r,s),a;if(t&&n!==n){for(;s>o;)if(a=i[o++],a!==a)return!0}else for(;s>o;o++)if((t||o in i)&&i[o]===n)return t||o||0;return!t&&-1}},PO={includes:$g(!0),indexOf:$g(!1)},OO=We,Bu=mn,CO=Nl,TO=PO.indexOf,DO=ld,Lg=OO([].push),px=function(t,e){var n=CO(t),r=0,i=[],s;for(s in n)!Bu(DO,s)&&Bu(n,s)&&Lg(i,s);for(;e.length>r;)Bu(n,s=e[r++])&&(~TO(i,s)||Lg(i,s));return i},fd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],RO=px,AO=fd,IO=AO.concat("length","prototype");hx.f=Object.getOwnPropertyNames||function(e){return RO(e,IO)};var gx={};gx.f=Object.getOwnPropertySymbols;var $O=Cr,LO=We,NO=hx,FO=gx,zO=Gt,jO=LO([].concat),BO=$O("Reflect","ownKeys")||function(e){var n=NO.f(zO(e)),r=FO.f;return r?jO(n,r(e)):n},Ng=mn,VO=BO,UO=Jh,WO=Xn,HO=function(t,e,n){for(var r=VO(e),i=WO.f,s=UO.f,o=0;o<r.length;o++){var a=r[o];!Ng(t,a)&&!(n&&Ng(n,a))&&i(t,a,s(e,a))}},YO=ft,qO=Re,GO=/#|\.prototype\./,ao=function(t,e){var n=KO[QO(t)];return n===JO?!0:n===XO?!1:qO(e)?YO(e):!!e},QO=ao.normalize=function(t){return String(t).replace(GO,".").toLowerCase()},KO=ao.data={},XO=ao.NATIVE="N",JO=ao.POLYFILL="P",mx=ao,Lo=ve,ZO=Jh.f,eC=sd,tC=oo,nC=nd,rC=HO,iC=mx,kt=function(t,e){var n=t.target,r=t.global,i=t.stat,s,o,a,l,u,c;if(r?o=Lo:i?o=Lo[n]||nC(n,{}):o=Lo[n]&&Lo[n].prototype,o)for(a in e){if(u=e[a],t.dontCallGetSet?(c=ZO(o,a),l=c&&c.value):l=o[a],s=iC(r?a:n+(i?".":"#")+a,t.forced),!s&&l!==void 0){if(typeof u==typeof l)continue;rC(u,l)}(t.sham||l&&l.sham)&&eC(u,"sham",!0),tC(o,a,u,t)}},sC=io,oC=We,aC=function(t){if(sC(t)==="Function")return oC(t)},Fg=aC,lC=Kn,uC=$l,cC=Fg(Fg.bind),jl=function(t,e){return lC(t),e===void 0?t:uC?cC(t,e):function(){return t.apply(e,arguments)}},fC=io,hC=Array.isArray||function(e){return fC(e)==="Array"},dC=ht,pC=dC("toStringTag"),yx={};yx[pC]="z";var hd=String(yx)==="[object z]",gC=hd,mC=Re,_a=io,yC=ht,vC=yC("toStringTag"),_C=Object,xC=_a(function(){return arguments}())==="Arguments",bC=function(t,e){try{return t[e]}catch{}},dd=gC?_a:function(t){var e,n,r;return t===void 0?"Undefined":t===null?"Null":typeof(n=bC(e=_C(t),vC))=="string"?n:xC?_a(e):(r=_a(e))==="Object"&&mC(e.callee)?"Arguments":r},SC=We,wC=ft,vx=Re,kC=dd,EC=Cr,MC=ad,_x=function(){},xx=EC("Reflect","construct"),pd=/^\s*(?:class|function)\b/,PC=SC(pd.exec),OC=!pd.test(_x),Hi=function(e){if(!vx(e))return!1;try{return xx(_x,[],e),!0}catch{return!1}},bx=function(e){if(!vx(e))return!1;switch(kC(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return OC||!!PC(pd,MC(e))}catch{return!0}};bx.sham=!0;var Sx=!xx||wC(function(){var t;return Hi(Hi.call)||!Hi(Object)||!Hi(function(){t=!0})||t})?bx:Hi,zg=hC,CC=Sx,TC=gn,DC=ht,RC=DC("species"),jg=Array,AC=function(t){var e;return zg(t)&&(e=t.constructor,CC(e)&&(e===jg||zg(e.prototype))?e=void 0:TC(e)&&(e=e[RC],e===null&&(e=void 0))),e===void 0?jg:e},IC=AC,$C=function(t,e){return new(IC(t))(e===0?0:e)},LC=jl,NC=We,FC=q_,zC=id,jC=cd,BC=$C,Bg=NC([].push),_n=function(t){var e=t===1,n=t===2,r=t===3,i=t===4,s=t===6,o=t===7,a=t===5||s;return function(l,u,c,f){for(var h=zC(l),d=FC(h),g=jC(d),y=LC(u,c),_=0,m=f||BC,p=e?m(l,g):n||o?m(l,0):void 0,v,x;g>_;_++)if((a||_ in d)&&(v=d[_],x=y(v,_,h),t))if(e)p[_]=x;else if(x)switch(t){case 3:return!0;case 5:return v;case 6:return _;case 2:Bg(p,v)}else switch(t){case 4:return!1;case 7:Bg(p,v)}return s?-1:r||i?i:p}},gd={forEach:_n(0),map:_n(1),filter:_n(2),some:_n(3),every:_n(4),find:_n(5),findIndex:_n(6),filterReject:_n(7)},VC=ft,UC=function(t,e){var n=[][t];return!!n&&VC(function(){n.call(null,e||function(){return 1},1)})},WC=gd.forEach,HC=UC,YC=HC("forEach"),wx=YC?[].forEach:function(e){return WC(this,e,arguments.length>1?arguments[1]:void 0)},qC=kt,Vg=wx;qC({target:"Array",proto:!0,forced:[].forEach!==Vg},{forEach:Vg});var GC=hd,QC=dd,KC=GC?{}.toString:function(){return"[object "+QC(this)+"]"},XC=hd,JC=oo,ZC=KC;XC||JC(Object.prototype,"toString",ZC,{unsafe:!0});var eT={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},tT=zl,Vu=tT("span").classList,Ug=Vu&&Vu.constructor&&Vu.constructor.prototype,nT=Ug===Object.prototype?void 0:Ug,Wg=ve,Hg=eT,rT=nT,Uu=wx,iT=sd,kx=function(t){if(t&&t.forEach!==Uu)try{iT(t,"forEach",Uu)}catch{t.forEach=Uu}};for(var Wu in Hg)Hg[Wu]&&kx(Wg[Wu]&&Wg[Wu].prototype);kx(rT);var Ex=We,sT=oo,md=Date.prototype,Yg="Invalid Date",Mx="toString",oT=Ex(md[Mx]),aT=Ex(md.getTime);String(new Date(NaN))!==Yg&&sT(md,Mx,function(){var e=aT(this);return e===e?oT(this):Yg});var lT=px,uT=fd,Px=Object.keys||function(e){return lT(e,uT)},cT=kt,fT=id,Ox=Px,hT=ft,dT=hT(function(){Ox(1)});cT({target:"Object",stat:!0,forced:dT},{keys:function(e){return Ox(fT(e))}});var pT=ve,gT=io,Bl=gT(pT.process)==="process",mT=We,yT=Kn,vT=function(t,e,n){try{return mT(yT(Object.getOwnPropertyDescriptor(t,e)[n]))}catch{}},_T=gn,xT=function(t){return _T(t)||t===null},bT=xT,ST=String,wT=TypeError,kT=function(t){if(bT(t))return t;throw new wT("Can't set "+ST(t)+" as a prototype")},ET=vT,MT=Gt,PT=kT,OT=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},n;try{n=ET(Object.prototype,"__proto__","set"),n(e,[]),t=e instanceof Array}catch{}return function(i,s){return MT(i),PT(s),t?n(i,s):i.__proto__=s,i}}():void 0),CT=Xn.f,TT=mn,DT=ht,qg=DT("toStringTag"),RT=function(t,e,n){t&&!n&&(t=t.prototype),t&&!TT(t,qg)&&CT(t,qg,{configurable:!0,value:e})},Gg=fx,AT=Xn,IT=function(t,e,n){return n.get&&Gg(n.get,e,{getter:!0}),n.set&&Gg(n.set,e,{setter:!0}),AT.f(t,e,n)},$T=Cr,LT=IT,NT=ht,FT=qt,Qg=NT("species"),zT=function(t){var e=$T(t);FT&&e&&!e[Qg]&&LT(e,Qg,{configurable:!0,get:function(){return this}})},jT=Zh,BT=TypeError,VT=function(t,e){if(jT(e,t))return t;throw new BT("Incorrect invocation")},UT=Sx,WT=Fl,HT=TypeError,YT=function(t){if(UT(t))return t;throw new HT(WT(t)+" is not a constructor")},Kg=Gt,qT=YT,GT=Ll,QT=ht,KT=QT("species"),XT=function(t,e){var n=Kg(t).constructor,r;return n===void 0||GT(r=Kg(n)[KT])?e:qT(r)},JT=$l,Cx=Function.prototype,Xg=Cx.apply,Jg=Cx.call,Tx=typeof Reflect=="object"&&Reflect.apply||(JT?Jg.bind(Xg):function(){return Jg.apply(Xg,arguments)}),ZT=Cr,Dx=ZT("document","documentElement"),e2=We,Rx=e2([].slice),t2=TypeError,Ax=function(t,e){if(t<e)throw new t2("Not enough arguments");return t},n2=so,Ix=/(?:ipad|iphone|ipod).*applewebkit/i.test(n2),ot=ve,r2=Tx,i2=jl,Zg=Re,s2=mn,$x=ft,em=Dx,o2=Rx,tm=zl,a2=Ax,l2=Ix,u2=Bl,Sf=ot.setImmediate,wf=ot.clearImmediate,c2=ot.process,Hu=ot.Dispatch,f2=ot.Function,nm=ot.MessageChannel,h2=ot.String,Yu=0,ms={},rm="onreadystatechange",Ws,er,qu,Gu;$x(function(){Ws=ot.location});var yd=function(t){if(s2(ms,t)){var e=ms[t];delete ms[t],e()}},Qu=function(t){return function(){yd(t)}},im=function(t){yd(t.data)},sm=function(t){ot.postMessage(h2(t),Ws.protocol+"//"+Ws.host)};(!Sf||!wf)&&(Sf=function(e){a2(arguments.length,1);var n=Zg(e)?e:f2(e),r=o2(arguments,1);return ms[++Yu]=function(){r2(n,void 0,r)},er(Yu),Yu},wf=function(e){delete ms[e]},u2?er=function(t){c2.nextTick(Qu(t))}:Hu&&Hu.now?er=function(t){Hu.now(Qu(t))}:nm&&!l2?(qu=new nm,Gu=qu.port2,qu.port1.onmessage=im,er=i2(Gu.postMessage,Gu)):ot.addEventListener&&Zg(ot.postMessage)&&!ot.importScripts&&Ws&&Ws.protocol!=="file:"&&!$x(sm)?(er=sm,ot.addEventListener("message",im,!1)):rm in tm("script")?er=function(t){em.appendChild(tm("script"))[rm]=function(){em.removeChild(this),yd(t)}}:er=function(t){setTimeout(Qu(t),0)});var Lx={set:Sf,clear:wf},om=ve,d2=qt,p2=Object.getOwnPropertyDescriptor,g2=function(t){if(!d2)return om[t];var e=p2(om,t);return e&&e.value},Nx=function(){this.head=null,this.tail=null};Nx.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var Fx=Nx,m2=so,y2=/ipad|iphone|ipod/i.test(m2)&&typeof Pebble<"u",v2=so,_2=/web0s(?!.*chrome)/i.test(v2),xi=ve,x2=g2,am=jl,Ku=Lx.set,b2=Fx,S2=Ix,w2=y2,k2=_2,Xu=Bl,lm=xi.MutationObserver||xi.WebKitMutationObserver,um=xi.document,cm=xi.process,No=xi.Promise,kf=x2("queueMicrotask"),Ir,Ju,Zu,Fo,fm;if(!kf){var zo=new b2,jo=function(){var t,e;for(Xu&&(t=cm.domain)&&t.exit();e=zo.get();)try{e()}catch(n){throw zo.head&&Ir(),n}t&&t.enter()};!S2&&!Xu&&!k2&&lm&&um?(Ju=!0,Zu=um.createTextNode(""),new lm(jo).observe(Zu,{characterData:!0}),Ir=function(){Zu.data=Ju=!Ju}):!w2&&No&&No.resolve?(Fo=No.resolve(void 0),Fo.constructor=No,fm=am(Fo.then,Fo),Ir=function(){fm(jo)}):Xu?Ir=function(){cm.nextTick(jo)}:(Ku=am(Ku,xi),Ir=function(){Ku(jo)}),kf=function(t){zo.head||Ir(),zo.add(t)}}var E2=kf,M2=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch{}},vd=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},P2=ve,Vl=P2.Promise,zx=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",O2=zx,C2=Bl,T2=!O2&&!C2&&typeof window=="object"&&typeof document=="object",D2=ve,ys=Vl,R2=Re,A2=mx,I2=ad,$2=ht,L2=T2,N2=zx,ec=ed;ys&&ys.prototype;var F2=$2("species"),Ef=!1,jx=R2(D2.PromiseRejectionEvent),z2=A2("Promise",function(){var t=I2(ys),e=t!==String(ys);if(!e&&ec===66)return!0;if(!ec||ec<51||!/native code/.test(t)){var n=new ys(function(s){s(1)}),r=function(s){s(function(){},function(){})},i=n.constructor={};if(i[F2]=r,Ef=n.then(function(){})instanceof r,!Ef)return!0}return!e&&(L2||N2)&&!jx}),lo={CONSTRUCTOR:z2,REJECTION_EVENT:jx,SUBCLASSING:Ef},Di={},hm=Kn,j2=TypeError,B2=function(t){var e,n;this.promise=new t(function(r,i){if(e!==void 0||n!==void 0)throw new j2("Bad Promise constructor");e=r,n=i}),this.resolve=hm(e),this.reject=hm(n)};Di.f=function(t){return new B2(t)};var V2=kt,sl=Bl,Wn=ve,bi=pn,dm=oo,pm=OT,U2=RT,W2=zT,H2=Kn,xa=Re,Y2=gn,q2=VT,G2=XT,Bx=Lx.set,_d=E2,Q2=M2,K2=vd,X2=Fx,Vx=ux,ol=Vl,xd=lo,Ux=Di,Ul="Promise",Wx=xd.CONSTRUCTOR,J2=xd.REJECTION_EVENT,Z2=xd.SUBCLASSING,tc=Vx.getterFor(Ul),eD=Vx.set,Fr=ol&&ol.prototype,fr=ol,Bo=Fr,Hx=Wn.TypeError,Mf=Wn.document,bd=Wn.process,Pf=Ux.f,tD=Pf,nD=!!(Mf&&Mf.createEvent&&Wn.dispatchEvent),Yx="unhandledrejection",rD="rejectionhandled",gm=0,qx=1,iD=2,Sd=1,Gx=2,Vo,mm,sD,ym,Qx=function(t){var e;return Y2(t)&&xa(e=t.then)?e:!1},Kx=function(t,e){var n=e.value,r=e.state===qx,i=r?t.ok:t.fail,s=t.resolve,o=t.reject,a=t.domain,l,u,c;try{i?(r||(e.rejection===Gx&&aD(e),e.rejection=Sd),i===!0?l=n:(a&&a.enter(),l=i(n),a&&(a.exit(),c=!0)),l===t.promise?o(new Hx("Promise-chain cycle")):(u=Qx(l))?bi(u,l,s,o):s(l)):o(n)}catch(f){a&&!c&&a.exit(),o(f)}},Xx=function(t,e){t.notified||(t.notified=!0,_d(function(){for(var n=t.reactions,r;r=n.get();)Kx(r,t);t.notified=!1,e&&!t.rejection&&oD(t)}))},Jx=function(t,e,n){var r,i;nD?(r=Mf.createEvent("Event"),r.promise=e,r.reason=n,r.initEvent(t,!1,!0),Wn.dispatchEvent(r)):r={promise:e,reason:n},!J2&&(i=Wn["on"+t])?i(r):t===Yx&&Q2("Unhandled promise rejection",n)},oD=function(t){bi(Bx,Wn,function(){var e=t.facade,n=t.value,r=vm(t),i;if(r&&(i=K2(function(){sl?bd.emit("unhandledRejection",n,e):Jx(Yx,e,n)}),t.rejection=sl||vm(t)?Gx:Sd,i.error))throw i.value})},vm=function(t){return t.rejection!==Sd&&!t.parent},aD=function(t){bi(Bx,Wn,function(){var e=t.facade;sl?bd.emit("rejectionHandled",e):Jx(rD,e,t.value)})},ei=function(t,e,n){return function(r){t(e,r,n)}},ui=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=iD,Xx(t,!0))},Of=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new Hx("Promise can't be resolved itself");var r=Qx(e);r?_d(function(){var i={done:!1};try{bi(r,e,ei(Of,i,t),ei(ui,i,t))}catch(s){ui(i,s,t)}}):(t.value=e,t.state=qx,Xx(t,!1))}catch(i){ui({done:!1},i,t)}}};if(Wx&&(fr=function(e){q2(this,Bo),H2(e),bi(Vo,this);var n=tc(this);try{e(ei(Of,n),ei(ui,n))}catch(r){ui(n,r)}},Bo=fr.prototype,Vo=function(e){eD(this,{type:Ul,done:!1,notified:!1,parent:!1,reactions:new X2,rejection:!1,state:gm,value:void 0})},Vo.prototype=dm(Bo,"then",function(e,n){var r=tc(this),i=Pf(G2(this,fr));return r.parent=!0,i.ok=xa(e)?e:!0,i.fail=xa(n)&&n,i.domain=sl?bd.domain:void 0,r.state===gm?r.reactions.add(i):_d(function(){Kx(i,r)}),i.promise}),mm=function(){var t=new Vo,e=tc(t);this.promise=t,this.resolve=ei(Of,e),this.reject=ei(ui,e)},Ux.f=Pf=function(t){return t===fr||t===sD?new mm(t):tD(t)},xa(ol)&&Fr!==Object.prototype)){ym=Fr.then,Z2||dm(Fr,"then",function(e,n){var r=this;return new fr(function(i,s){bi(ym,r,i,s)}).then(e,n)},{unsafe:!0});try{delete Fr.constructor}catch{}pm&&pm(Fr,Bo)}V2({global:!0,constructor:!0,wrap:!0,forced:Wx},{Promise:fr});U2(fr,Ul,!1);W2(Ul);var Zx={},lD=ht,uD=Zx,cD=lD("iterator"),fD=Array.prototype,hD=function(t){return t!==void 0&&(uD.Array===t||fD[cD]===t)},dD=dd,_m=td,pD=Ll,gD=Zx,mD=ht,yD=mD("iterator"),e1=function(t){if(!pD(t))return _m(t,yD)||_m(t,"@@iterator")||gD[dD(t)]},vD=pn,_D=Kn,xD=Gt,bD=Fl,SD=e1,wD=TypeError,kD=function(t,e){var n=arguments.length<2?SD(t):e;if(_D(n))return xD(vD(n,t));throw new wD(bD(t)+" is not iterable")},ED=pn,xm=Gt,MD=td,PD=function(t,e,n){var r,i;xm(t);try{if(r=MD(t,"return"),!r){if(e==="throw")throw n;return n}r=ED(r,t)}catch(s){i=!0,r=s}if(e==="throw")throw n;if(i)throw r;return xm(r),n},OD=jl,CD=pn,TD=Gt,DD=Fl,RD=hD,AD=cd,bm=Zh,ID=kD,$D=e1,Sm=PD,LD=TypeError,ba=function(t,e){this.stopped=t,this.result=e},wm=ba.prototype,t1=function(t,e,n){var r=n&&n.that,i=!!(n&&n.AS_ENTRIES),s=!!(n&&n.IS_RECORD),o=!!(n&&n.IS_ITERATOR),a=!!(n&&n.INTERRUPTED),l=OD(e,r),u,c,f,h,d,g,y,_=function(p){return u&&Sm(u,"normal",p),new ba(!0,p)},m=function(p){return i?(TD(p),a?l(p[0],p[1],_):l(p[0],p[1])):a?l(p,_):l(p)};if(s)u=t.iterator;else if(o)u=t;else{if(c=$D(t),!c)throw new LD(DD(t)+" is not iterable");if(RD(c)){for(f=0,h=AD(t);h>f;f++)if(d=m(t[f]),d&&bm(wm,d))return d;return new ba(!1)}u=ID(t,c)}for(g=s?t.next:u.next;!(y=CD(g,u)).done;){try{d=m(y.value)}catch(p){Sm(u,"throw",p)}if(typeof d=="object"&&d&&bm(wm,d))return d}return new ba(!1)},ND=ht,n1=ND("iterator"),r1=!1;try{var FD=0,km={next:function(){return{done:!!FD++}},return:function(){r1=!0}};km[n1]=function(){return this},Array.from(km,function(){throw 2})}catch{}var zD=function(t,e){try{if(!e&&!r1)return!1}catch{return!1}var n=!1;try{var r={};r[n1]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch{}return n},jD=Vl,BD=zD,VD=lo.CONSTRUCTOR,i1=VD||!BD(function(t){jD.all(t).then(void 0,function(){})}),UD=kt,WD=pn,HD=Kn,YD=Di,qD=vd,GD=t1,QD=i1;UD({target:"Promise",stat:!0,forced:QD},{all:function(e){var n=this,r=YD.f(n),i=r.resolve,s=r.reject,o=qD(function(){var a=HD(n.resolve),l=[],u=0,c=1;GD(e,function(f){var h=u++,d=!1;c++,WD(a,n,f).then(function(g){d||(d=!0,l[h]=g,--c||i(l))},s)}),--c||i(l)});return o.error&&s(o.value),r.promise}});var KD=kt,XD=lo.CONSTRUCTOR,Cf=Vl,JD=Cr,ZD=Re,eR=oo,Em=Cf&&Cf.prototype;KD({target:"Promise",proto:!0,forced:XD,real:!0},{catch:function(t){return this.then(void 0,t)}});if(ZD(Cf)){var Mm=JD("Promise").prototype.catch;Em.catch!==Mm&&eR(Em,"catch",Mm,{unsafe:!0})}var tR=kt,nR=pn,rR=Kn,iR=Di,sR=vd,oR=t1,aR=i1;tR({target:"Promise",stat:!0,forced:aR},{race:function(e){var n=this,r=iR.f(n),i=r.reject,s=sR(function(){var o=rR(n.resolve);oR(e,function(a){nR(o,n,a).then(r.resolve,i)})});return s.error&&i(s.value),r.promise}});var lR=kt,uR=Di,cR=lo.CONSTRUCTOR;lR({target:"Promise",stat:!0,forced:cR},{reject:function(e){var n=uR.f(this),r=n.reject;return r(e),n.promise}});var fR=Gt,hR=gn,dR=Di,pR=function(t,e){if(fR(t),hR(e)&&e.constructor===t)return e;var n=dR.f(t),r=n.resolve;return r(e),n.promise},gR=kt,mR=Cr,yR=lo.CONSTRUCTOR,vR=pR;mR("Promise");gR({target:"Promise",stat:!0,forced:yR},{resolve:function(e){return vR(this,e)}});var _R=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",s1=ve,xR=Tx,bR=Re,SR=_R,wR=so,kR=Rx,ER=Ax,MR=s1.Function,PR=/MSIE .\./.test(wR)||SR&&function(){var t=s1.Bun.version.split(".");return t.length<3||t[0]==="0"&&(t[1]<3||t[1]==="3"&&t[2]==="0")}(),o1=function(t,e){var n=e?2:1;return PR?function(r,i){var s=ER(arguments.length,1)>n,o=bR(r)?r:MR(r),a=s?kR(arguments,n):[],l=s?function(){xR(o,this,a)}:o;return e?t(l,i):t(l)}:t},OR=kt,a1=ve,CR=o1,Pm=CR(a1.setInterval,!0);OR({global:!0,bind:!0,forced:a1.setInterval!==Pm},{setInterval:Pm});var TR=kt,l1=ve,DR=o1,Om=DR(l1.setTimeout,!0);TR({global:!0,bind:!0,forced:l1.setTimeout!==Om},{setTimeout:Om});var u1={},RR=qt,AR=ix,IR=Xn,$R=Gt,LR=Nl,NR=Px;u1.f=RR&&!AR?Object.defineProperties:function(e,n){$R(e);for(var r=LR(n),i=NR(n),s=i.length,o=0,a;s>o;)IR.f(e,a=i[o++],r[a]);return e};var FR=Gt,zR=u1,Cm=fd,jR=ld,BR=Dx,VR=zl,UR=ax,Tm=">",Dm="<",Tf="prototype",Df="script",c1=UR("IE_PROTO"),nc=function(){},f1=function(t){return Dm+Df+Tm+t+Dm+"/"+Df+Tm},Rm=function(t){t.write(f1("")),t.close();var e=t.parentWindow.Object;return t=null,e},WR=function(){var t=VR("iframe"),e="java"+Df+":",n;return t.style.display="none",BR.appendChild(t),t.src=String(e),n=t.contentWindow.document,n.open(),n.write(f1("document.F=Object")),n.close(),n.F},Uo,Sa=function(){try{Uo=new ActiveXObject("htmlfile")}catch{}Sa=typeof document<"u"?document.domain&&Uo?Rm(Uo):WR():Rm(Uo);for(var t=Cm.length;t--;)delete Sa[Tf][Cm[t]];return Sa()};jR[c1]=!0;var HR=Object.create||function(e,n){var r;return e!==null?(nc[Tf]=FR(e),r=new nc,nc[Tf]=null,r[c1]=e):r=Sa(),n===void 0?r:zR.f(r,n)},YR=ht,qR=HR,GR=Xn.f,Rf=YR("unscopables"),Af=Array.prototype;Af[Rf]===void 0&&GR(Af,Rf,{configurable:!0,value:qR(null)});var QR=function(t){Af[Rf][t]=!0},KR=kt,XR=gd.find,JR=QR,If="find",h1=!0;If in[]&&Array(1)[If](function(){h1=!1});KR({target:"Array",proto:!0,forced:h1},{find:function(e){return XR(this,e,arguments.length>1?arguments[1]:void 0)}});JR(If);var ZR=ft,eA=ht,tA=ed,nA=eA("species"),rA=function(t){return tA>=51||!ZR(function(){var e=[],n=e.constructor={};return n[nA]=function(){return{foo:1}},e[t](Boolean).foo!==1})},iA=kt,sA=gd.filter,oA=rA,aA=oA("filter");iA({target:"Array",proto:!0,forced:!aA},{filter:function(e){return sA(this,e,arguments.length>1?arguments[1]:void 0)}});var d1={exports:{}},p1={exports:{}};(function(t){function e(n,r){this.v=n,this.k=r}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(p1);var g1=p1.exports,m1={exports:{}},y1={exports:{}};(function(t){function e(n,r,i,s){var o=Object.defineProperty;try{o({},"",{})}catch{o=0}t.exports=e=function(l,u,c,f){function h(d,g){e(l,d,function(y){return this._invoke(d,g,y)})}u?o?o(l,u,{value:c,enumerable:!f,configurable:!f,writable:!f}):l[u]=c:(h("next",0),h("throw",1),h("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r,i,s)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(y1);var v1=y1.exports;(function(t){var e=v1;function n(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var r,i,s=typeof Symbol=="function"?Symbol:{},o=s.iterator||"@@iterator",a=s.toStringTag||"@@toStringTag";function l(_,m,p,v){var x=m&&m.prototype instanceof c?m:c,b=Object.create(x.prototype);return e(b,"_invoke",function(E,O,T){var I,R,A,j=0,V=T||[],w=!1,k={p:0,n:0,v:r,a:C,f:C.bind(r,4),d:function(S,P){return I=S,R=0,A=r,k.n=P,u}};function C(M,S){for(R=M,A=S,i=0;!w&&j&&!P&&i<V.length;i++){var P,D=V[i],N=k.p,F=D[2];M>3?(P=F===S)&&(A=D[(R=D[4])?5:(R=3,3)],D[4]=D[5]=r):D[0]<=N&&((P=M<2&&N<D[1])?(R=0,k.v=S,k.n=D[1]):N<F&&(P=M<3||D[0]>S||S>F)&&(D[4]=M,D[5]=S,k.n=F,R=0))}if(P||M>1)return u;throw w=!0,S}return function(M,S,P){if(j>1)throw TypeError("Generator is already running");for(w&&S===1&&C(S,P),R=S,A=P;(i=R<2?r:A)||!w;){I||(R?R<3?(R>1&&(k.n=-1),C(R,A)):k.n=A:k.v=A);try{if(j=2,I){if(R||(M="next"),i=I[M]){if(!(i=i.call(I,A)))throw TypeError("iterator result is not an object");if(!i.done)return i;A=i.value,R<2&&(R=0)}else R===1&&(i=I.return)&&i.call(I),R<2&&(A=TypeError("The iterator does not provide a '"+M+"' method"),R=1);I=r}else if((i=(w=k.n<0)?A:E.call(O,k))!==u)break}catch(D){I=r,R=1,A=D}finally{j=1}}return{value:i,done:w}}}(_,p,v),!0),b}var u={};function c(){}function f(){}function h(){}i=Object.getPrototypeOf;var d=[][o]?i(i([][o]())):(e(i={},o,function(){return this}),i),g=h.prototype=c.prototype=Object.create(d);function y(_){return Object.setPrototypeOf?Object.setPrototypeOf(_,h):(_.__proto__=h,e(_,a,"GeneratorFunction")),_.prototype=Object.create(g),_}return f.prototype=h,e(g,"constructor",h),e(h,"constructor",f),f.displayName="GeneratorFunction",e(h,a,"GeneratorFunction"),e(g),e(g,a,"Generator"),e(g,o,function(){return this}),e(g,"toString",function(){return"[object Generator]"}),(t.exports=n=function(){return{w:l,m:y}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(m1);var _1=m1.exports,x1={exports:{}},b1={exports:{}},S1={exports:{}};(function(t){var e=g1,n=v1;function r(i,s){function o(l,u,c,f){try{var h=i[l](u),d=h.value;return d instanceof e?s.resolve(d.v).then(function(g){o("next",g,c,f)},function(g){o("throw",g,c,f)}):s.resolve(d).then(function(g){h.value=g,c(h)},function(g){return o("throw",g,c,f)})}catch(g){f(g)}}var a;this.next||(n(r.prototype),n(r.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),n(this,"_invoke",function(l,u,c){function f(){return new s(function(h,d){o(l,c,h,d)})}return a=a?a.then(f,f):f()},!0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(S1);var w1=S1.exports;(function(t){var e=_1,n=w1;function r(i,s,o,a,l){return new n(e().w(i,s,o,a),l||Promise)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(b1);var k1=b1.exports;(function(t){var e=k1;function n(r,i,s,o,a){var l=e(r,i,s,o,a);return l.next().then(function(u){return u.done?u.value:l.next()})}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(x1);var lA=x1.exports,E1={exports:{}};(function(t){function e(n){var r=Object(n),i=[];for(var s in r)i.unshift(s);return function o(){for(;i.length;)if((s=i.pop())in r)return o.value=s,o.done=!1,o;return o.done=!0,o}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(E1);var uA=E1.exports,M1={exports:{}};(function(t){var e=Xh.default;function n(r){if(r!=null){var i=r[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],s=0;if(i)return i.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length))return{next:function(){return r&&s>=r.length&&(r=void 0),{value:r&&r[s++],done:!r}}}}throw new TypeError(e(r)+" is not iterable")}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(M1);var cA=M1.exports;(function(t){var e=g1,n=_1,r=lA,i=k1,s=w1,o=uA,a=cA;function l(){var u=n(),c=u.m(l),f=(Object.getPrototypeOf?Object.getPrototypeOf(c):c.__proto__).constructor;function h(y){var _=typeof y=="function"&&y.constructor;return!!_&&(_===f||(_.displayName||_.name)==="GeneratorFunction")}var d={throw:1,return:2,break:3,continue:3};function g(y){var _,m;return function(p){_||(_={stop:function(){return m(p.a,2)},catch:function(){return p.v},abrupt:function(x,b){return m(p.a,d[x],b)},delegateYield:function(x,b,E){return _.resultName=b,m(p.d,a(x),E)},finish:function(x){return m(p.f,x)}},m=function(x,b,E){p.p=_.prev,p.n=_.next;try{return x(b,E)}finally{_.next=p.n}}),_.resultName&&(_[_.resultName]=p.v,_.resultName=void 0),_.sent=p.v,_.next=p.n;try{return y.call(this,_)}finally{p.p=_.prev,p.n=_.next}}}return(t.exports=l=function(){return{wrap:function(m,p,v,x){return u.w(g(m),p,v,x&&x.reverse())},isGeneratorFunction:h,mark:u.m,awrap:function(m,p){return new e(m,p)},AsyncIterator:s,async:function(m,p,v,x,b){return(h(p)?i:r)(g(m),p,v,x,b)},keys:o,values:a}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports})(d1);var fA=d1.exports,wa=fA(),hA=wa;try{regeneratorRuntime=wa}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=wa:Function("r","regeneratorRuntime = r")(wa)}var zr=null;typeof WebSocket<"u"?zr=WebSocket:typeof MozWebSocket<"u"?zr=MozWebSocket:typeof Ke<"u"?zr=Ke.WebSocket||Ke.MozWebSocket:typeof window<"u"?zr=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(zr=self.WebSocket||self.MozWebSocket);var dA=zr,pA=VE,gA=UE,mA=WE,yA=YE,vA=qE,_A=hA,xA=dA;function Tr(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var bA=Tr(pA),ti=Tr(gA),P1=Tr(mA),O1=Tr(yA),Zt=Tr(vA),mt=Tr(_A),rc=Tr(xA),SA=["baseRequestId"],wA=function(){function t(e){var n=e.status,r=e.message;P1.default(this,t),Zt.default(this,"status",void 0),Zt.default(this,"result",void 0),this.status=n,this.result=r}return O1.default(t,[{key:"json",value:function(){var e=ti.default(mt.default.mark(function r(){return mt.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",this.result);case 1:case"end":return s.stop()}},r,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"clone",value:function(){return this}},{key:"text",value:function(){var e=ti.default(mt.default.mark(function r(){return mt.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",typeof this.result=="string"?this.result:JSON.stringify(this.result));case 1:case"end":return s.stop()}},r,this)}));function n(){return e.apply(this,arguments)}return n}()}]),t}(),kA=function(){function t(e){var n=e.authorization,r=e.apiUrl,i=e.heartBeatInterval,s=e.hearBeatInterval;P1.default(this,t),Zt.default(this,"apiUrl",void 0),Zt.default(this,"heartBeatInterval",60),Zt.default(this,"token",void 0),Zt.default(this,"ws",null),Zt.default(this,"messageCounter",1),Zt.default(this,"messageIdToSubscription",{}),Zt.default(this,"messageQueue",[]),this.token=n,this.apiUrl=r,i?this.heartBeatInterval=i:s&&(console.warn("Option hearBeatInterval is deprecated. It was replaced by heartBeatInterval."),this.heartBeatInterval=s)}return O1.default(t,[{key:"authorization",get:function(){return this.token},set:function(n){this.token=n,this.ws&&this.ws.close()}},{key:"close",value:function(){var e=ti.default(mt.default.mark(function r(){return mt.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:this.ws&&this.ws.close();case 1:case"end":return s.stop()}},r,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"initSocket",value:function(){var n=this;if(this.ws)return this.ws.initPromise;var r=new rc.default(this.apiUrl);return r.messageIdSent={},r.sendMessage=function(i){(!i.messageId||i.messageId&&!r.messageIdSent[i.messageId])&&(r.send(JSON.stringify(i)),r.messageIdSent[i.messageId]=!0)},r.sendQueue=function(){n.messageQueue.forEach(function(i){return r.sendMessage(i)}),n.messageQueue=[]},r.reconcile=function(){new Date().getTime()-r.lastMessageTimestamp.getTime()>4*n.heartBeatInterval*1e3?r.close():Object.keys(n.messageIdToSubscription).forEach(function(i){r.sendMessage(n.messageIdToSubscription[i].message)})},r.lastMessageTimestamp=new Date,r.initPromise=new Promise(function(i){r.onopen=function(){r.sendMessage({authorization:n.authorization})},r.onmessage=function(s){r.lastMessageTimestamp=new Date;var o=JSON.parse(s.data);o.handshake&&(r.reconcile(),r.reconcileTimer=setInterval(function(){r.messageIdSent={},r.reconcile()},n.heartBeatInterval*1e3),i()),n.messageIdToSubscription[o.messageId]&&n.messageIdToSubscription[o.messageId].callback(new wA(o)),r.sendQueue()},r.onclose=function(){r&&r.readyState!==rc.default.CLOSED&&r.readyState!==rc.default.CLOSING&&r.close(),r.reconcileTimer&&(clearInterval(r.reconcileTimer),r.reconcileTimer=null),n.ws===r&&(n.ws=null,Object.keys(n.messageIdToSubscription).length&&n.initSocket())},r.onerror=r.onclose}),this.ws=r,this.ws.initPromise}},{key:"sendMessage",value:function(n){var r=this;n.unsubscribe&&this.messageQueue.find(function(i){return i.messageId===n.unsubscribe})?this.messageQueue=this.messageQueue.filter(function(i){return i.messageId!==n.unsubscribe}):this.messageQueue.push(n),setTimeout(ti.default(mt.default.mark(function i(){return mt.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,r.initSocket();case 2:r.ws.sendQueue();case 3:case"end":return o.stop()}},i)})),100)}},{key:"request",value:function(n,r){var i=r.baseRequestId,s=bA.default(r,SA),o={messageId:this.messageCounter++,requestId:i,method:n,params:s},a=[],l=null,u=function(){l&&(l(a.pop()),l=null)};this.messageIdToSubscription[o.messageId]={message:o,callback:function(h){a.push(h),u()}};var c=this;return{subscribe:function(h){var d=this;return ti.default(mt.default.mark(function g(){var y;return mt.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return c.sendMessage(o),m.next=3,new Promise(function(p){l=p,a.length&&u()});case 3:return y=m.sent,m.abrupt("return",h(y,function(){return d.subscribe(h)}));case 5:case"end":return m.stop()}},g)}))()},unsubscribe:function(){return ti.default(mt.default.mark(function h(){return mt.default.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:c.sendMessage({unsubscribe:o.messageId}),delete c.messageIdToSubscription[o.messageId];case 2:case"end":return g.stop()}},h)}))()}}}}]),t}(),EA=kA;const MA=Ei(EA);/*!
41
- * @kurkle/color v0.3.2
42
- * https://github.com/kurkle/color#readme
43
- * (c) 2023 Jukka Kurkela
44
- * Released under the MIT License
45
- */function uo(t){return t+.5|0}const On=(t,e,n)=>Math.max(Math.min(t,n),e);function ts(t){return On(uo(t*2.55),0,255)}function Bn(t){return On(uo(t*255),0,255)}function tn(t){return On(uo(t/2.55)/100,0,1)}function Am(t){return On(uo(t*100),0,100)}const gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},$f=[..."0123456789ABCDEF"],PA=t=>$f[t&15],OA=t=>$f[(t&240)>>4]+$f[t&15],Wo=t=>(t&240)>>4===(t&15),CA=t=>Wo(t.r)&&Wo(t.g)&&Wo(t.b)&&Wo(t.a);function TA(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&gt[t[1]]*17,g:255&gt[t[2]]*17,b:255&gt[t[3]]*17,a:e===5?gt[t[4]]*17:255}:(e===7||e===9)&&(n={r:gt[t[1]]<<4|gt[t[2]],g:gt[t[3]]<<4|gt[t[4]],b:gt[t[5]]<<4|gt[t[6]],a:e===9?gt[t[7]]<<4|gt[t[8]]:255})),n}const DA=(t,e)=>t<255?e(t):"";function RA(t){var e=CA(t)?PA:OA;return t?"#"+e(t.r)+e(t.g)+e(t.b)+DA(t.a,e):void 0}const AA=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function C1(t,e,n){const r=e*Math.min(n,1-n),i=(s,o=(s+t/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function IA(t,e,n){const r=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function $A(t,e,n){const r=C1(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function LA(t,e,n,r,i){return t===i?(e-n)/r+(e<n?6:0):e===i?(n-t)/r+2:(t-e)/r+4}function wd(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=(s+o)/2;let l,u,c;return s!==o&&(c=s-o,u=a>.5?c/(2-s-o):c/(s+o),l=LA(n,r,i,c,s),l=l*60+.5),[l|0,u||0,a]}function kd(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(Bn)}function Ed(t,e,n){return kd(C1,t,e,n)}function NA(t,e,n){return kd($A,t,e,n)}function FA(t,e,n){return kd(IA,t,e,n)}function T1(t){return(t%360+360)%360}function zA(t){const e=AA.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?ts(+e[5]):Bn(+e[5]));const i=T1(+e[2]),s=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?r=NA(i,s,o):e[1]==="hsv"?r=FA(i,s,o):r=Ed(i,s,o),{r:r[0],g:r[1],b:r[2],a:n}}function jA(t,e){var n=wd(t);n[0]=T1(n[0]+e),n=Ed(n),t.r=n[0],t.g=n[1],t.b=n[2]}function BA(t){if(!t)return;const e=wd(t),n=e[0],r=Am(e[1]),i=Am(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${i}%, ${tn(t.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const Im={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},$m={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function VA(){const t={},e=Object.keys($m),n=Object.keys(Im);let r,i,s,o,a;for(r=0;r<e.length;r++){for(o=a=e[r],i=0;i<n.length;i++)s=n[i],a=a.replace(s,Im[s]);s=parseInt($m[o],16),t[a]=[s>>16&255,s>>8&255,s&255]}return t}let Ho;function UA(t){Ho||(Ho=VA(),Ho.transparent=[0,0,0,0]);const e=Ho[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const WA=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function HA(t){const e=WA.exec(t);let n=255,r,i,s;if(e){if(e[7]!==r){const o=+e[7];n=e[8]?ts(o):On(o*255,0,255)}return r=+e[1],i=+e[3],s=+e[5],r=255&(e[2]?ts(r):On(r,0,255)),i=255&(e[4]?ts(i):On(i,0,255)),s=255&(e[6]?ts(s):On(s,0,255)),{r,g:i,b:s,a:n}}}function YA(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${tn(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const ic=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,$r=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function qA(t,e,n){const r=$r(tn(t.r)),i=$r(tn(t.g)),s=$r(tn(t.b));return{r:Bn(ic(r+n*($r(tn(e.r))-r))),g:Bn(ic(i+n*($r(tn(e.g))-i))),b:Bn(ic(s+n*($r(tn(e.b))-s))),a:t.a+n*(e.a-t.a)}}function Yo(t,e,n){if(t){let r=wd(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=Ed(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function D1(t,e){return t&&Object.assign(e||{},t)}function Lm(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Bn(t[3]))):(e=D1(t,{r:0,g:0,b:0,a:1}),e.a=Bn(e.a)),e}function GA(t){return t.charAt(0)==="r"?HA(t):zA(t)}class Hs{constructor(e){if(e instanceof Hs)return e;const n=typeof e;let r;n==="object"?r=Lm(e):n==="string"&&(r=TA(e)||UA(e)||GA(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=D1(this._rgb);return e&&(e.a=tn(e.a)),e}set rgb(e){this._rgb=Lm(e)}rgbString(){return this._valid?YA(this._rgb):void 0}hexString(){return this._valid?RA(this._rgb):void 0}hslString(){return this._valid?BA(this._rgb):void 0}mix(e,n){if(e){const r=this.rgb,i=e.rgb;let s;const o=n===s?.5:n,a=2*o-1,l=r.a-i.a,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-u,r.r=255&u*r.r+s*i.r+.5,r.g=255&u*r.g+s*i.g+.5,r.b=255&u*r.b+s*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(e,n){return e&&(this._rgb=qA(this._rgb,e._rgb,n)),this}clone(){return new Hs(this.rgb)}alpha(e){return this._rgb.a=Bn(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=uo(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Yo(this._rgb,2,e),this}darken(e){return Yo(this._rgb,2,-e),this}saturate(e){return Yo(this._rgb,1,e),this}desaturate(e){return Yo(this._rgb,1,-e),this}rotate(e){return jA(this._rgb,e),this}}/*!
46
- * Chart.js v4.4.2
47
- * https://www.chartjs.org
48
- * (c) 2024 Chart.js Contributors
49
- * Released under the MIT License
50
- */function Qt(){}const QA=(()=>{let t=0;return()=>t++})();function q(t){return t===null||typeof t>"u"}function re(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function U(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function pe(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function tt(t,e){return pe(t)?t:e}function B(t,e){return typeof t>"u"?e:t}const KA=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,R1=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function J(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Q(t,e,n,r){let i,s,o;if(re(t))if(s=t.length,r)for(i=s-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<s;i++)e.call(n,t[i],i);else if(U(t))for(o=Object.keys(t),s=o.length,i=0;i<s;i++)e.call(n,t[o[i]],o[i])}function al(t,e){let n,r,i,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=t[n],s=e[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function ll(t){if(re(t))return t.map(ll);if(U(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let i=0;for(;i<r;++i)e[n[i]]=ll(t[n[i]]);return e}return t}function A1(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function XA(t,e,n,r){if(!A1(t))return;const i=e[t],s=n[t];U(i)&&U(s)?Ys(i,s,r):e[t]=ll(s)}function Ys(t,e,n){const r=re(e)?e:[e],i=r.length;if(!U(t))return t;n=n||{};const s=n.merger||XA;let o;for(let a=0;a<i;++a){if(o=r[a],!U(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)s(l[u],t,o,n)}return t}function vs(t,e){return Ys(t,e,{merger:JA})}function JA(t,e,n){if(!A1(t))return;const r=e[t],i=n[t];U(r)&&U(i)?vs(r,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ll(i))}const Nm={"":t=>t,x:t=>t.x,y:t=>t.y};function ZA(t){const e=t.split("."),n=[];let r="";for(const i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function eI(t){const e=ZA(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function Hn(t,e){return(Nm[e]||(Nm[e]=eI(e)))(t)}function Md(t){return t.charAt(0).toUpperCase()+t.slice(1)}const qs=t=>typeof t<"u",Yn=t=>typeof t=="function",Fm=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function tI(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const oe=Math.PI,se=2*oe,nI=se+oe,ul=Number.POSITIVE_INFINITY,rI=oe/180,ye=oe/2,tr=oe/4,zm=oe*2/3,Cn=Math.log10,Ht=Math.sign;function _s(t,e,n){return Math.abs(t-e)<n}function jm(t){const e=Math.round(t);t=_s(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Cn(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function iI(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((i,s)=>i-s).pop(),e}function Si(t){return!isNaN(parseFloat(t))&&isFinite(t)}function sI(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function I1(t,e,n){let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Dt(t){return t*(oe/180)}function Pd(t){return t*(180/oe)}function Bm(t){if(!pe(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function $1(t,e){const n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*oe&&(s+=se),{angle:s,distance:i}}function Lf(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function oI(t,e){return(t-e+nI)%se-oe}function rt(t){return(t%se+se)%se}function Gs(t,e,n,r){const i=rt(t),s=rt(e),o=rt(n),a=rt(s-i),l=rt(o-i),u=rt(i-s),c=rt(i-o);return i===s||i===o||r&&s===o||a>l&&u<c}function Me(t,e,n){return Math.max(e,Math.min(n,t))}function aI(t){return Me(t,-32768,32767)}function sn(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function Od(t,e,n){n=n||(o=>t[o]<e);let r=t.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const on=(t,e,n,r)=>Od(t,n,r?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),lI=(t,e,n)=>Od(t,n,r=>t[r][e]>=n);function uI(t,e,n){let r=0,i=t.length;for(;r<i&&t[r]<e;)r++;for(;i>r&&t[i-1]>n;)i--;return r>0||i<t.length?t.slice(r,i):t}const L1=["push","pop","shift","splice","unshift"];function cI(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),L1.forEach(n=>{const r="_onData"+Md(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return t._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...s)}),o}})})}function Vm(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(e);i!==-1&&r.splice(i,1),!(r.length>0)&&(L1.forEach(s=>{delete t[s]}),delete t._chartjs)}function N1(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const F1=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function z1(t,e){let n=[],r=!1;return function(...i){n=i,r||(r=!0,F1.call(window,()=>{r=!1,t.apply(e,n)}))}}function fI(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}const Cd=t=>t==="start"?"left":t==="end"?"right":"center",$e=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,hI=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function j1(t,e,n){const r=e.length;let i=0,s=r;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:u,max:c,minDefined:f,maxDefined:h}=o.getUserBounds();f&&(i=Me(Math.min(on(a,l,u).lo,n?r:on(e,l,o.getPixelForValue(u)).lo),0,r-1)),h?s=Me(Math.max(on(a,o.axis,c,!0).hi+1,n?0:on(e,l,o.getPixelForValue(c),!0).hi+1),i,r)-i:s=r-i}return{start:i,count:s}}function B1(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,!0;const s=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const qo=t=>t===0||t===1,Um=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*se/n)),Wm=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*se/n)+1,xs={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*ye)+1,easeOutSine:t=>Math.sin(t*ye),easeInOutSine:t=>-.5*(Math.cos(oe*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>qo(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>qo(t)?t:Um(t,.075,.3),easeOutElastic:t=>qo(t)?t:Wm(t,.075,.3),easeInOutElastic(t){return qo(t)?t:t<.5?.5*Um(t*2,.1125,.45):.5+.5*Wm(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-xs.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?xs.easeInBounce(t*2)*.5:xs.easeOutBounce(t*2-1)*.5+.5};function Td(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Hm(t){return Td(t)?t:new Hs(t)}function sc(t){return Td(t)?t:new Hs(t).saturate(.5).darken(.1).hexString()}const dI=["x","y","borderWidth","radius","tension"],pI=["color","borderColor","backgroundColor"];function gI(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:pI},numbers:{type:"number",properties:dI}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function mI(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ym=new Map;function yI(t,e){e=e||{};const n=t+JSON.stringify(e);let r=Ym.get(n);return r||(r=new Intl.NumberFormat(t,e),Ym.set(n,r)),r}function co(t,e,n){return yI(e,n).format(t)}const V1={values(t){return re(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const r=this.chart.options.locale;let i,s=t;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),s=vI(t,n)}const o=Cn(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),co(t,r,l)},logarithmic(t,e,n){if(t===0)return"0";const r=n[e].significand||t/Math.pow(10,Math.floor(Cn(t)));return[1,2,3,5,10,15].includes(r)||e>.8*n.length?V1.numeric.call(this,t,e,n):""}};function vI(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Wl={formatters:V1};function _I(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Wl.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Er=Object.create(null),Nf=Object.create(null);function bs(t,e){if(!e)return t;const n=e.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];t=t[s]||(t[s]=Object.create(null))}return t}function oc(t,e,n){return typeof e=="string"?Ys(bs(t,e),n):Ys(bs(t,""),e)}class xI{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>sc(i.backgroundColor),this.hoverBorderColor=(r,i)=>sc(i.borderColor),this.hoverColor=(r,i)=>sc(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return oc(this,e,n)}get(e){return bs(this,e)}describe(e,n){return oc(Nf,e,n)}override(e,n){return oc(Er,e,n)}route(e,n,r,i){const s=bs(this,e),o=bs(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[i];return U(l)?Object.assign({},u,l):B(l,u)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var ge=new xI({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[gI,mI,_I]);function bI(t){return!t||q(t.size)||q(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function cl(t,e,n,r,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,n.push(i)),s>r&&(r=s),r}function SI(t,e,n,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},s=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let o=0;const a=n.length;let l,u,c,f,h;for(l=0;l<a;l++)if(f=n[l],f!=null&&!re(f))o=cl(t,i,s,o,f);else if(re(f))for(u=0,c=f.length;u<c;u++)h=f[u],h!=null&&!re(h)&&(o=cl(t,i,s,o,h));t.restore();const d=s.length/2;if(d>n.length){for(l=0;l<d;l++)delete i[s[l]];s.splice(0,d)}return o}function nr(t,e,n){const r=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*r)/r+i}function qm(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Ff(t,e,n,r){U1(t,e,n,r,null)}function U1(t,e,n,r,i){let s,o,a,l,u,c,f,h;const d=e.pointStyle,g=e.rotation,y=e.radius;let _=(g||0)*rI;if(d&&typeof d=="object"&&(s=d.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(_),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),t.restore();return}if(!(isNaN(y)||y<=0)){switch(t.beginPath(),d){default:i?t.ellipse(n,r,i/2,y,0,0,se):t.arc(n,r,y,0,se),t.closePath();break;case"triangle":c=i?i/2:y,t.moveTo(n+Math.sin(_)*c,r-Math.cos(_)*y),_+=zm,t.lineTo(n+Math.sin(_)*c,r-Math.cos(_)*y),_+=zm,t.lineTo(n+Math.sin(_)*c,r-Math.cos(_)*y),t.closePath();break;case"rectRounded":u=y*.516,l=y-u,o=Math.cos(_+tr)*l,f=Math.cos(_+tr)*(i?i/2-u:l),a=Math.sin(_+tr)*l,h=Math.sin(_+tr)*(i?i/2-u:l),t.arc(n-f,r-a,u,_-oe,_-ye),t.arc(n+h,r-o,u,_-ye,_),t.arc(n+f,r+a,u,_,_+ye),t.arc(n-h,r+o,u,_+ye,_+oe),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*y,c=i?i/2:l,t.rect(n-c,r-l,2*c,2*l);break}_+=tr;case"rectRot":f=Math.cos(_)*(i?i/2:y),o=Math.cos(_)*y,a=Math.sin(_)*y,h=Math.sin(_)*(i?i/2:y),t.moveTo(n-f,r-a),t.lineTo(n+h,r-o),t.lineTo(n+f,r+a),t.lineTo(n-h,r+o),t.closePath();break;case"crossRot":_+=tr;case"cross":f=Math.cos(_)*(i?i/2:y),o=Math.cos(_)*y,a=Math.sin(_)*y,h=Math.sin(_)*(i?i/2:y),t.moveTo(n-f,r-a),t.lineTo(n+f,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o);break;case"star":f=Math.cos(_)*(i?i/2:y),o=Math.cos(_)*y,a=Math.sin(_)*y,h=Math.sin(_)*(i?i/2:y),t.moveTo(n-f,r-a),t.lineTo(n+f,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o),_+=tr,f=Math.cos(_)*(i?i/2:y),o=Math.cos(_)*y,a=Math.sin(_)*y,h=Math.sin(_)*(i?i/2:y),t.moveTo(n-f,r-a),t.lineTo(n+f,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o);break;case"line":o=i?i/2:Math.cos(_)*y,a=Math.sin(_)*y,t.moveTo(n-o,r-a),t.lineTo(n+o,r+a);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(_)*(i?i/2:y),r+Math.sin(_)*y);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function an(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Hl(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Yl(t){t.restore()}function wI(t,e,n,r,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else i==="after"!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function kI(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function EI(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),q(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function MI(t,e,n,r,i){if(i.strikethrough||i.underline){const s=t.measureText(r),o=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,u=n+s.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(o,c),t.lineTo(a,c),t.stroke()}}function PI(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Mr(t,e,n,r,i,s={}){const o=re(e)?e:[e],a=s.strokeWidth>0&&s.strokeColor!=="";let l,u;for(t.save(),t.font=i.string,EI(t,s),l=0;l<o.length;++l)u=o[l],s.backdrop&&PI(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),q(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(u,n,r,s.maxWidth)),t.fillText(u,n,r,s.maxWidth),MI(t,n,r,u,s),r+=Number(i.lineHeight);t.restore()}function Qs(t,e){const{x:n,y:r,w:i,h:s,radius:o}=e;t.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*oe,oe,!0),t.lineTo(n,r+s-o.bottomLeft),t.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,oe,ye,!0),t.lineTo(n+i-o.bottomRight,r+s),t.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,ye,0,!0),t.lineTo(n+i,r+o.topRight),t.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-ye,!0),t.lineTo(n+o.topLeft,r)}const OI=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,CI=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function TI(t,e){const n=(""+t).match(OI);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const DI=t=>+t||0;function Dd(t,e){const n={},r=U(e),i=r?Object.keys(e):e,s=U(t)?r?o=>B(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of i)n[o]=DI(s(o));return n}function W1(t){return Dd(t,{top:"y",right:"x",bottom:"y",left:"x"})}function yr(t){return Dd(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ze(t){const e=W1(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function we(t,e){t=t||{},e=e||ge.font;let n=B(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=B(t.style,e.style);r&&!(""+r).match(CI)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:B(t.family,e.family),lineHeight:TI(B(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:B(t.weight,e.weight),string:""};return i.string=bI(i),i}function ns(t,e,n,r){let i=!0,s,o,a;for(s=0,o=t.length;s<o;++s)if(a=t[s],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),i=!1),n!==void 0&&re(a)&&(a=a[n%a.length],i=!1),a!==void 0))return r&&!i&&(r.cacheable=!1),a}function RI(t,e,n){const{min:r,max:i}=t,s=R1(e,(i-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(s)),max:o(i,s)}}function Jn(t,e){return Object.assign(Object.create(t),e)}function Rd(t,e=[""],n,r,i=()=>t[0]){const s=n||t;typeof r>"u"&&(r=G1("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>Rd([a,...t],e,s,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return Y1(a,l,()=>jI(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Qm(a).includes(l)},ownKeys(a){return Qm(a)},set(a,l,u){const c=a._storage||(a._storage=i());return a[l]=c[l]=u,delete a._keys,!0}})}function wi(t,e,n,r){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:H1(t,r),setContext:s=>wi(t,s,n,r),override:s=>wi(t.override(s),e,n,r)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete t[o],!0},get(s,o,a){return Y1(s,o,()=>II(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(s,o,a){return t[o]=a,delete s[o],!0}})}function H1(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Yn(n)?n:()=>n,isIndexable:Yn(r)?r:()=>r}}const AI=(t,e)=>t?t+Md(e):e,Ad=(t,e)=>U(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Y1(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const r=n();return t[e]=r,r}function II(t,e,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=t;let a=r[e];return Yn(a)&&o.isScriptable(e)&&(a=$I(e,a,t,n)),re(a)&&a.length&&(a=LI(e,a,t,o.isIndexable)),Ad(e,a)&&(a=wi(a,i,s&&s[e],o)),a}function $I(t,e,n,r){const{_proxy:i,_context:s,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(s,o||r);return a.delete(t),Ad(t,l)&&(l=Id(i._scopes,i,t,l)),l}function LI(t,e,n,r){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index<"u"&&r(t))return e[s.index%e.length];if(U(e[0])){const l=e,u=i._scopes.filter(c=>c!==l);e=[];for(const c of l){const f=Id(u,i,t,c);e.push(wi(f,s,o&&o[t],a))}}return e}function q1(t,e,n){return Yn(t)?t(e,n):t}const NI=(t,e)=>t===!0?e:typeof t=="string"?Hn(e,t):void 0;function FI(t,e,n,r,i){for(const s of e){const o=NI(n,s);if(o){t.add(o);const a=q1(o._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function Id(t,e,n,r){const i=e._rootScopes,s=q1(e._fallback,n,r),o=[...t,...i],a=new Set;a.add(r);let l=Gm(a,o,n,s||n,r);return l===null||typeof s<"u"&&s!==n&&(l=Gm(a,o,s,l,r),l===null)?!1:Rd(Array.from(a),[""],i,s,()=>zI(e,n,r))}function Gm(t,e,n,r,i){for(;n;)n=FI(t,e,n,r,i);return n}function zI(t,e,n){const r=t._getTarget();e in r||(r[e]={});const i=r[e];return re(i)&&U(n)?n:i||{}}function jI(t,e,n,r){let i;for(const s of e)if(i=G1(AI(s,t),n),typeof i<"u")return Ad(t,i)?Id(n,r,t,i):i}function G1(t,e){for(const n of e){if(!n)continue;const r=n[t];if(typeof r<"u")return r}}function Qm(t){let e=t._keys;return e||(e=t._keys=BI(t._scopes)),e}function BI(t){const e=new Set;for(const n of t)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(r);return Array.from(e)}function Q1(t,e,n,r){const{iScale:i}=t,{key:s="r"}=this._parsing,o=new Array(r);let a,l,u,c;for(a=0,l=r;a<l;++a)u=a+n,c=e[u],o[a]={r:i.parse(Hn(c,s),u)};return o}const VI=Number.EPSILON||1e-14,ki=(t,e)=>e<t.length&&!t[e].skip&&t[e],K1=t=>t==="x"?"y":"x";function UI(t,e,n,r){const i=t.skip?e:t,s=e,o=n.skip?e:n,a=Lf(s,i),l=Lf(o,s);let u=a/(a+l),c=l/(a+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const f=r*u,h=r*c;return{previous:{x:s.x-f*(o.x-i.x),y:s.y-f*(o.y-i.y)},next:{x:s.x+h*(o.x-i.x),y:s.y+h*(o.y-i.y)}}}function WI(t,e,n){const r=t.length;let i,s,o,a,l,u=ki(t,0);for(let c=0;c<r-1;++c)if(l=u,u=ki(t,c+1),!(!l||!u)){if(_s(e[c],0,VI)){n[c]=n[c+1]=0;continue}i=n[c]/e[c],s=n[c+1]/e[c],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[c]=i*o*e[c],n[c+1]=s*o*e[c])}}function HI(t,e,n="x"){const r=K1(n),i=t.length;let s,o,a,l=ki(t,0);for(let u=0;u<i;++u){if(o=a,a=l,l=ki(t,u+1),!a)continue;const c=a[n],f=a[r];o&&(s=(c-o[n])/3,a[`cp1${n}`]=c-s,a[`cp1${r}`]=f-s*e[u]),l&&(s=(l[n]-c)/3,a[`cp2${n}`]=c+s,a[`cp2${r}`]=f+s*e[u])}}function YI(t,e="x"){const n=K1(e),r=t.length,i=Array(r).fill(0),s=Array(r);let o,a,l,u=ki(t,0);for(o=0;o<r;++o)if(a=l,l=u,u=ki(t,o+1),!!l){if(u){const c=u[e]-l[e];i[o]=c!==0?(u[n]-l[n])/c:0}s[o]=a?u?Ht(i[o-1])!==Ht(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}WI(t,i,s),HI(t,s,e)}function Go(t,e,n){return Math.max(Math.min(t,n),e)}function qI(t,e){let n,r,i,s,o,a=an(t[0],e);for(n=0,r=t.length;n<r;++n)o=s,s=a,a=n<r-1&&an(t[n+1],e),s&&(i=t[n],o&&(i.cp1x=Go(i.cp1x,e.left,e.right),i.cp1y=Go(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=Go(i.cp2x,e.left,e.right),i.cp2y=Go(i.cp2y,e.top,e.bottom)))}function GI(t,e,n,r,i){let s,o,a,l;if(e.spanGaps&&(t=t.filter(u=>!u.skip)),e.cubicInterpolationMode==="monotone")YI(t,i);else{let u=r?t[t.length-1]:t[0];for(s=0,o=t.length;s<o;++s)a=t[s],l=UI(u,a,t[Math.min(s+1,o-(r?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,u=a}e.capBezierPoints&&qI(t,n)}function $d(){return typeof window<"u"&&typeof document<"u"}function Ld(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function fl(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}const ql=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function QI(t,e){return ql(t).getPropertyValue(e)}const KI=["top","right","bottom","left"];function vr(t,e,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=KI[i];r[s]=parseFloat(t[e+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const XI=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function JI(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(XI(i,s,t.target))a=i,l=s;else{const u=e.getBoundingClientRect();a=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function ur(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,i=ql(n),s=i.boxSizing==="border-box",o=vr(i,"padding"),a=vr(i,"border","width"),{x:l,y:u,box:c}=JI(t,n),f=o.left+(c&&a.left),h=o.top+(c&&a.top);let{width:d,height:g}=e;return s&&(d-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-f)/d*n.width/r),y:Math.round((u-h)/g*n.height/r)}}function ZI(t,e,n){let r,i;if(e===void 0||n===void 0){const s=Ld(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const o=s.getBoundingClientRect(),a=ql(s),l=vr(a,"border","width"),u=vr(a,"padding");e=o.width-u.width-l.width,n=o.height-u.height-l.height,r=fl(a.maxWidth,s,"clientWidth"),i=fl(a.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:r||ul,maxHeight:i||ul}}const Qo=t=>Math.round(t*10)/10;function e$(t,e,n,r){const i=ql(t),s=vr(i,"margin"),o=fl(i.maxWidth,t,"clientWidth")||ul,a=fl(i.maxHeight,t,"clientHeight")||ul,l=ZI(t,e,n);let{width:u,height:c}=l;if(i.boxSizing==="content-box"){const h=vr(i,"border","width"),d=vr(i,"padding");u-=d.width+h.width,c-=d.height+h.height}return u=Math.max(0,u-s.width),c=Math.max(0,r?u/r:c-s.height),u=Qo(Math.min(u,o,l.maxWidth)),c=Qo(Math.min(c,a,l.maxHeight)),u&&!c&&(c=Qo(u/2)),(e!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=Qo(Math.floor(c*r))),{width:u,height:c}}function Km(t,e,n){const r=e||1,i=Math.floor(t.height*r),s=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||o.height!==i||o.width!==s?(t.currentDevicePixelRatio=r,o.height=i,o.width=s,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const t$=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};$d()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Xm(t,e){const n=QI(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function cr(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function n$(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function r$(t,e,n,r){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},o=cr(t,i,n),a=cr(i,s,n),l=cr(s,e,n),u=cr(o,a,n),c=cr(a,l,n);return cr(u,c,n)}const i$=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},s$=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ci(t,e,n){return t?i$(e,n):s$()}function X1(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function J1(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Z1(t){return t==="angle"?{between:Gs,compare:oI,normalize:rt}:{between:sn,compare:(e,n)=>e-n,normalize:e=>e}}function Jm({start:t,end:e,count:n,loop:r,style:i}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:i}}function o$(t,e,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=Z1(r),l=e.length;let{start:u,end:c,loop:f}=t,h,d;if(f){for(u+=l,c+=l,h=0,d=l;h<d&&o(a(e[u%l][r]),i,s);++h)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:f,style:t.style}}function eb(t,e,n){if(!n)return[t];const{property:r,start:i,end:s}=n,o=e.length,{compare:a,between:l,normalize:u}=Z1(r),{start:c,end:f,loop:h,style:d}=o$(t,e,n),g=[];let y=!1,_=null,m,p,v;const x=()=>l(i,v,m)&&a(i,v)!==0,b=()=>a(s,m)===0||l(s,v,m),E=()=>y||x(),O=()=>!y||b();for(let T=c,I=c;T<=f;++T)p=e[T%o],!p.skip&&(m=u(p[r]),m!==v&&(y=l(m,i,s),_===null&&E()&&(_=a(m,i)===0?T:I),_!==null&&O()&&(g.push(Jm({start:_,end:T,loop:h,count:o,style:d})),_=null),I=T,v=m));return _!==null&&g.push(Jm({start:_,end:f,loop:h,count:o,style:d})),g}function tb(t,e){const n=[],r=t.segments;for(let i=0;i<r.length;i++){const s=eb(r[i],t.points,e);s.length&&n.push(...s)}return n}function a$(t,e,n,r){let i=0,s=e-1;if(n&&!r)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(s+=i);s>i&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function l$(t,e,n,r){const i=t.length,s=[];let o=e,a=t[e],l;for(l=e+1;l<=n;++l){const u=t[l%i];u.skip||u.stop?a.skip||(r=!1,s.push({start:e%i,end:(l-1)%i,loop:r}),e=o=u.stop?l:null):(o=l,a.skip&&(e=l)),a=u}return o!==null&&s.push({start:e%i,end:o%i,loop:r}),s}function u$(t,e){const n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return[];const s=!!t._loop,{start:o,end:a}=a$(n,i,s,r);if(r===!0)return Zm(t,[{start:o,end:a,loop:s}],n,e);const l=a<o?a+i:a,u=!!t._fullLoop&&o===0&&a===i-1;return Zm(t,l$(n,o,l,u),n,e)}function Zm(t,e,n,r){return!r||!r.setContext||!n?e:c$(t,e,n,r)}function c$(t,e,n,r){const i=t._chart.getContext(),s=ey(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=n.length,u=[];let c=s,f=e[0].start,h=f;function d(g,y,_,m){const p=a?-1:1;if(g!==y){for(g+=l;n[g%l].skip;)g-=p;for(;n[y%l].skip;)y+=p;g%l!==y%l&&(u.push({start:g%l,end:y%l,loop:_,style:m}),c=m,f=y%l)}}for(const g of e){f=a?f:g.start;let y=n[f%l],_;for(h=f+1;h<=g.end;h++){const m=n[h%l];_=ey(r.setContext(Jn(i,{type:"segment",p0:y,p1:m,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),f$(_,c)&&d(f,h-1,g.loop,c),y=m,c=_}f<h-1&&d(f,h-1,g.loop,c)}return u}function ey(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function f$(t,e){if(!e)return!1;const n=[],r=function(i,s){return Td(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,r)!==JSON.stringify(e,r)}/*!
51
- * Chart.js v4.4.2
52
- * https://www.chartjs.org
53
- * (c) 2024 Chart.js Contributors
54
- * Released under the MIT License
55
- */class h${constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,i){const s=n.listeners[i],o=n.duration;s.forEach(a=>a({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=F1.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(e),a=!0):(s[o]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,r,e,"progress")),s.length||(r.running=!1,this._notify(i,r,e,"complete"),r.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Kt=new h$;const ty="transparent",d$={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=Hm(t||ty),i=r.valid&&Hm(e||ty);return i&&i.valid?i.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class p${constructor(e,n,r,i){const s=n[r];i=ns([e.to,i,s,e.from]);const o=ns([e.from,s,i]);this._active=!0,this._fn=e.fn||d$[e.type||typeof o],this._easing=xs[e.easing]||xs.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,o=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=ns([e.to,n,i,e.from]),this._from=ns([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,i=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class nb{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!U(e))return;const n=Object.keys(ge.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!U(s))return;const o={};for(const a of n)o[a]=s[a];(re(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(e,n){const r=n.options,i=m$(e,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&g$(e.options.$animations,r).then(()=>{e.options=r},()=>{}),s}_createAnimations(e,n){const r=this._properties,i=[],s=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,n));continue}const c=n[u];let f=s[u];const h=r.get(u);if(f)if(h&&f.active()){f.update(h,c,a);continue}else f.cancel();if(!h||!h.duration){e[u]=c;continue}s[u]=f=new p$(h,e,u,c),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Kt.add(this._chart,r),!0}}function g$(t,e){const n=[],r=Object.keys(e);for(let i=0;i<r.length;i++){const s=t[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function m$(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function ny(t,e){const n=t&&t.options||{},r=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:r?s:i,end:r?i:s}}function y$(t,e,n){if(n===!1)return!1;const r=ny(t,n),i=ny(e,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function v$(t){let e,n,r,i;return U(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i,disabled:t===!1}}function rb(t,e){const n=[],r=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function ry(t,e,n,r={}){const i=t.keys,s=r.mode==="single";let o,a,l,u;if(e!==null){for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(r.all)continue;break}u=t.values[l],pe(u)&&(s||e===0||Ht(e)===Ht(u))&&(e+=u)}return e}}function _$(t){const e=Object.keys(t),n=new Array(e.length);let r,i,s;for(r=0,i=e.length;r<i;++r)s=e[r],n[r]={x:s,y:t[s]};return n}function iy(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function x$(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function b$(t){const{min:e,max:n,minDefined:r,maxDefined:i}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function S$(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function sy(t,e,n,r){for(const i of e.getMatchingVisibleMetas(r).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function oy(t,e){const{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,u=o.axis,c=x$(s,o,r),f=e.length;let h;for(let d=0;d<f;++d){const g=e[d],{[l]:y,[u]:_}=g,m=g._stacks||(g._stacks={});h=m[u]=S$(i,c,y),h[a]=_,h._top=sy(h,o,!0,r.type),h._bottom=sy(h,o,!1,r.type);const p=h._visualValues||(h._visualValues={});p[a]=_}}function ac(t,e){const n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function w$(t,e){return Jn(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function k$(t,e,n){return Jn(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Yi(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const lc=t=>t==="reset"||t==="none",ay=(t,e)=>e?t:Object.assign({},t),E$=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:rb(n,!0),values:null};class It{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=iy(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Yi(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(f,h,d,g)=>f==="x"?h:f==="r"?g:d,s=n.xAxisID=B(r.xAxisID,ac(e,"x")),o=n.yAxisID=B(r.yAxisID,ac(e,"y")),a=n.rAxisID=B(r.rAxisID,ac(e,"r")),l=n.indexAxis,u=n.iAxisID=i(l,s,o,a),c=n.vAxisID=i(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Vm(this._data,this),e._stacked&&Yi(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(U(n))this._data=_$(n);else if(r!==n){if(r){Vm(r,this);const i=this._cachedMeta;Yi(i),i._parsed=[]}n&&Object.isExtensible(n)&&cI(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=iy(n.vScale,n),n.stack!==r.stack&&(i=!0,Yi(n),n.stack=r.stack),this._resyncElements(e),(i||s!==n._stacked)&&oy(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:o}=r,a=s.axis;let l=e===0&&n===i.length?!0:r._sorted,u=e>0&&r._parsed[e-1],c,f,h;if(this._parsing===!1)r._parsed=i,r._sorted=!0,h=i;else{re(i[e])?h=this.parseArrayData(r,i,e,n):U(i[e])?h=this.parseObjectData(r,i,e,n):h=this.parsePrimitiveData(r,i,e,n);const d=()=>f[a]===null||u&&f[a]<u[a];for(c=0;c<n;++c)r._parsed[c+e]=f=h[c],l&&(d()&&(l=!1),u=f);r._sorted=l}o&&oy(this,h)}parsePrimitiveData(e,n,r,i){const{iScale:s,vScale:o}=e,a=s.axis,l=o.axis,u=s.getLabels(),c=s===o,f=new Array(i);let h,d,g;for(h=0,d=i;h<d;++h)g=h+r,f[h]={[a]:c||s.parse(u[g],g),[l]:o.parse(n[g],g)};return f}parseArrayData(e,n,r,i){const{xScale:s,yScale:o}=e,a=new Array(i);let l,u,c,f;for(l=0,u=i;l<u;++l)c=l+r,f=n[c],a[l]={x:s.parse(f[0],c),y:o.parse(f[1],c)};return a}parseObjectData(e,n,r,i){const{xScale:s,yScale:o}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let c,f,h,d;for(c=0,f=i;c<f;++c)h=c+r,d=n[h],u[c]={x:s.parse(Hn(d,a),h),y:o.parse(Hn(d,l),h)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){const i=this.chart,s=this._cachedMeta,o=n[e.axis],a={keys:rb(i,!0),values:n._stacks[e.axis]._visualValues};return ry(a,o,s.index,{mode:r})}updateRangeFromParsed(e,n,r,i){const s=r[n.axis];let o=s===null?NaN:s;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,o=ry(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&e===r.iScale,o=i.length,a=this._getOtherScale(e),l=E$(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:f}=b$(a);let h,d;function g(){d=i[h];const y=d[a.axis];return!pe(d[e.axis])||c>y||f<y}for(h=0;h<o&&!(!g()&&(this.updateRangeFromParsed(u,e,d,l),s));++h);if(s){for(h=o-1;h>=0;--h)if(!g()){this.updateRangeFromParsed(u,e,d,l);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let i,s,o;for(i=0,s=n.length;i<s;++i)o=n[i][e.axis],pe(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=v$(B(this.options.clip,y$(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||i.length-a,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(e,s,a,l),c=a;c<a+l;++c){const f=i[c];f.hidden||(f.active&&u?o.push(f):f.draw(e,s))}for(c=0;c<o.length;++c)o[c].draw(e,s)}getStyle(e,n){const r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){const i=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];s=o.$context||(o.$context=k$(this.getContext(),e,o)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=w$(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){const i=n==="active",s=this._cachedDataOpts,o=e+"-"+n,a=s[o],l=this.enableOptionSharing&&qs(r);if(a)return ay(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],h=u.getOptionScopes(this.getDataset(),c),d=Object.keys(ge.elements[e]),g=()=>this.getContext(r,i,n),y=u.resolveNamedOptions(h,d,g,f);return y.$shared&&(y.$shared=l,s[o]=Object.freeze(ay(y,l))),y}_resolveAnimations(e,n,r){const i=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(i.options.animation!==!1){const c=this.chart.config,f=c.datasetAnimationScopeKeys(this._type,n),h=c.getOptionScopes(this.getDataset(),f);l=c.createResolver(h,this.getContext(e,r,n))}const u=new nb(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||lc(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(r),o=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:o}}updateElement(e,n,r,i){lc(i)?Object.assign(e,r):this._resolveAnimations(n,i).update(e,r)}updateSharedOptions(e,n,r){e&&!lc(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,r=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const i=r.length,s=n.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,r=!0){const i=this._cachedMeta,s=i.data,o=e+n;let a;const l=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(s),a=e;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(e,n),r&&this.updateElements(s,e,n,"reset")}updateElements(e,n,r,i){}_removeElements(e,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(e,n);r._stacked&&Yi(r,i)}r.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,r,i]=e;this[n](r,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}L(It,"defaults",{}),L(It,"datasetElementType",null),L(It,"dataElementType",null);function M$(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let i=0,s=n.length;i<s;i++)r=r.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=N1(r.sort((i,s)=>i-s))}return t._cache.$bar}function P$(t){const e=t.iScale,n=M$(e,t.type);let r=e._length,i,s,o,a;const l=()=>{o===32767||o===-32768||(qs(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(i=0,s=n.length;i<s;++i)o=e.getPixelForValue(n[i]),l();for(a=void 0,i=0,s=e.ticks.length;i<s;++i)o=e.getPixelForTick(i),l();return r}function O$(t,e,n,r){const i=n.barThickness;let s,o;return q(i)?(s=e.min*n.categoryPercentage,o=n.barPercentage):(s=i*r,o=1),{chunk:s/r,ratio:o,start:e.pixels[t]-s/2}}function C$(t,e,n,r){const i=e.pixels,s=i[t];let o=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const l=n.categoryPercentage;o===null&&(o=s-(a===null?e.end-e.start:a-s)),a===null&&(a=s+s-o);const u=s-(s-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/r,ratio:n.barPercentage,start:u}}function T$(t,e,n,r){const i=n.parse(t[0],r),s=n.parse(t[1],r),o=Math.min(i,s),a=Math.max(i,s);let l=o,u=a;Math.abs(o)>Math.abs(a)&&(l=a,u=o),e[n.axis]=u,e._custom={barStart:l,barEnd:u,start:i,end:s,min:o,max:a}}function ib(t,e,n,r){return re(t)?T$(t,e,n,r):e[n.axis]=n.parse(t,r),e}function ly(t,e,n,r){const i=t.iScale,s=t.vScale,o=i.getLabels(),a=i===s,l=[];let u,c,f,h;for(u=n,c=n+r;u<c;++u)h=e[u],f={},f[i.axis]=a||i.parse(o[u],u),l.push(ib(h,f,s,u));return l}function uc(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function D$(t,e,n){return t!==0?Ht(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function R$(t){let e,n,r,i,s;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(i="end",s="start"):(i="start",s="end"),{start:n,end:r,reverse:e,top:i,bottom:s}}function A$(t,e,n,r){let i=e.borderSkipped;const s={};if(!i){t.borderSkipped=s;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:u,bottom:c}=R$(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?i=u:(n._bottom||0)===r?i=c:(s[uy(c,o,a,l)]=!0,i=u)),s[uy(i,o,a,l)]=!0,t.borderSkipped=s}function uy(t,e,n,r){return r?(t=I$(t,e,n),t=cy(t,n,e)):t=cy(t,e,n),t}function I$(t,e,n){return t===e?n:t===n?e:t}function cy(t,e,n){return t==="start"?e:t==="end"?n:t}function $$(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Ss extends It{parsePrimitiveData(e,n,r,i){return ly(e,n,r,i)}parseArrayData(e,n,r,i){return ly(e,n,r,i)}parseObjectData(e,n,r,i){const{iScale:s,vScale:o}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=s.axis==="x"?a:l,c=o.axis==="x"?a:l,f=[];let h,d,g,y;for(h=r,d=r+i;h<d;++h)y=n[h],g={},g[s.axis]=s.parse(Hn(y,u),h),f.push(ib(Hn(y,c),g,o,h));return f}updateRangeFromParsed(e,n,r,i){super.updateRangeFromParsed(e,n,r,i);const s=r._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:r,vScale:i}=n,s=this.getParsed(e),o=s._custom,a=uc(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,r,i){const s=i==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),u=a.isHorizontal(),c=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i);for(let d=n;d<n+r;d++){const g=this.getParsed(d),y=s||q(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(d),_=this._calculateBarIndexPixels(d,c),m=(g._stacks||{})[a.axis],p={horizontal:u,base:y.base,enableBorderRadius:!m||uc(g._custom)||o===m._top||o===m._bottom,x:u?y.head:_.center,y:u?_.center:y.head,height:u?_.size:Math.abs(y.size),width:u?Math.abs(y.size):_.size};h&&(p.options=f||this.resolveDataElementOptions(d,e[d].active?"active":i));const v=p.options||e[d].options;A$(p,v,m,o),$$(p,v,c.ratio),this.updateElement(e[d],d,p,i)}}_getStacks(e,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),s=r.options.stacked,o=[],a=l=>{const u=l.controller.getParsed(n),c=u&&u[l.vScale.axis];if(q(c)||isNaN(c))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((s===!1||o.indexOf(l.stack)===-1||s===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,r){const i=this._getStacks(e,r),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,r=n.iScale,i=[];let s,o;for(s=0,o=n.data.length;s<o;++s)i.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const a=e.barThickness;return{min:a||P$(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:s,minBarLength:o}}=this,a=s||0,l=this.getParsed(e),u=l._custom,c=uc(u);let f=l[n.axis],h=0,d=r?this.applyStack(n,l,r):f,g,y;d!==f&&(h=d-f,d=f),c&&(f=u.barStart,d=u.barEnd-u.barStart,f!==0&&Ht(f)!==Ht(u.barEnd)&&(h=0),h+=f);const _=!q(s)&&!c?s:h;let m=n.getPixelForValue(_);if(this.chart.getDataVisibility(e)?g=n.getPixelForValue(h+d):g=m,y=g-m,Math.abs(y)<o){y=D$(y,n,a)*o,f===a&&(m-=y/2);const p=n.getPixelForDecimal(0),v=n.getPixelForDecimal(1),x=Math.min(p,v),b=Math.max(p,v);m=Math.max(Math.min(m,b),x),g=m+y,r&&!c&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(g)-n.getValueForPixel(m))}if(m===n.getPixelForValue(a)){const p=Ht(y)*n.getLineWidthForValue(a)/2;m+=p,y-=p}return{size:y,base:m,head:g,center:g+y/2}}_calculateBarIndexPixels(e,n){const r=n.scale,i=this.options,s=i.skipNull,o=B(i.maxBarThickness,1/0);let a,l;if(n.grouped){const u=s?this._getStackCount(e):n.stackCount,c=i.barThickness==="flex"?C$(e,n,i,u):O$(e,n,i,u),f=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0);a=c.start+c.chunk*f+c.chunk/2,l=Math.min(o,c.chunk*c.ratio)}else a=r.getPixelForValue(this.getParsed(e)[r.axis],e),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const e=this._cachedMeta,n=e.vScale,r=e.data,i=r.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&r[s].draw(this._ctx)}}L(Ss,"id","bar"),L(Ss,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),L(Ss,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ka extends It{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,r,i){const s=super.parsePrimitiveData(e,n,r,i);for(let o=0;o<s.length;o++)s[o]._custom=this.resolveDataElementOptions(o+r).radius;return s}parseArrayData(e,n,r,i){const s=super.parseArrayData(e,n,r,i);for(let o=0;o<s.length;o++){const a=n[r+o];s[o]._custom=B(a[2],this.resolveDataElementOptions(o+r).radius)}return s}parseObjectData(e,n,r,i){const s=super.parseObjectData(e,n,r,i);for(let o=0;o<s.length;o++){const a=n[r+o];s[o]._custom=B(a&&a.r&&+a.r,this.resolveDataElementOptions(o+r).radius)}return s}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let r=e.length-1;r>=0;--r)n=Math.max(n,e[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=n,o=this.getParsed(e),a=i.getLabelForValue(o.x),l=s.getLabelForValue(o.y),u=o._custom;return{label:r[e]||"",value:"("+a+", "+l+(u?", "+u:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,r,i){const s=i==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(n,i),c=o.axis,f=a.axis;for(let h=n;h<n+r;h++){const d=e[h],g=!s&&this.getParsed(h),y={},_=y[c]=s?o.getPixelForDecimal(.5):o.getPixelForValue(g[c]),m=y[f]=s?a.getBasePixel():a.getPixelForValue(g[f]);y.skip=isNaN(_)||isNaN(m),u&&(y.options=l||this.resolveDataElementOptions(h,d.active?"active":i),s&&(y.options.radius=0)),this.updateElement(d,h,y,i)}}resolveDataElementOptions(e,n){const r=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return n!=="active"&&(i.radius=0),i.radius+=B(r&&r._custom,s),i}}L(ka,"id","bubble"),L(ka,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),L(ka,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function L$(t,e,n){let r=1,i=1,s=0,o=0;if(e<se){const a=t,l=a+e,u=Math.cos(a),c=Math.sin(a),f=Math.cos(l),h=Math.sin(l),d=(v,x,b)=>Gs(v,a,l,!0)?1:Math.max(x,x*n,b,b*n),g=(v,x,b)=>Gs(v,a,l,!0)?-1:Math.min(x,x*n,b,b*n),y=d(0,u,f),_=d(ye,c,h),m=g(oe,u,f),p=g(oe+ye,c,h);r=(y-m)/2,i=(_-p)/2,s=-(y+m)/2,o=-(_+p)/2}return{ratioX:r,ratioY:i,offsetX:s,offsetY:o}}class Tn extends It{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let s=l=>+r[l];if(U(r[e])){const{key:l="value"}=this._parsing;s=u=>+Hn(r[u],l)}let o,a;for(o=e,a=e+n;o<a;++o)i._parsed[o]=s(o)}}_getRotation(){return Dt(this.options.rotation-90)}_getCircumference(){return Dt(this.options.circumference)}_getRotationExtents(){let e=se,n=-se;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,s=i._getRotation(),o=i._getCircumference();e=Math.min(e,s),n=Math.max(n,s+o)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,s=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-o)/2,0),l=Math.min(KA(this.options.cutout,a),1),u=this._getRingWeight(this.index),{circumference:c,rotation:f}=this._getRotationExtents(),{ratioX:h,ratioY:d,offsetX:g,offsetY:y}=L$(f,c,l),_=(r.width-o)/h,m=(r.height-o)/d,p=Math.max(Math.min(_,m)/2,0),v=R1(this.options.radius,p),x=Math.max(v*l,0),b=(v-x)/this._getVisibleDatasetWeightTotal();this.offsetX=g*v,this.offsetY=y*v,i.total=this.calculateTotal(),this.outerRadius=v-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*u,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const r=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*s/se)}updateElements(e,n,r,i){const s=i==="reset",o=this.chart,a=o.chartArea,u=o.options.animation,c=(a.left+a.right)/2,f=(a.top+a.bottom)/2,h=s&&u.animateScale,d=h?0:this.innerRadius,g=h?0:this.outerRadius,{sharedOptions:y,includeOptions:_}=this._getSharedOptions(n,i);let m=this._getRotation(),p;for(p=0;p<n;++p)m+=this._circumference(p,s);for(p=n;p<n+r;++p){const v=this._circumference(p,s),x=e[p],b={x:c+this.offsetX,y:f+this.offsetY,startAngle:m,endAngle:m+v,circumference:v,outerRadius:g,innerRadius:d};_&&(b.options=y||this.resolveDataElementOptions(p,x.active?"active":i)),m+=v,this.updateElement(x,p,b,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let r=0,i;for(i=0;i<n.length;i++){const s=e._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?se*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=co(n._parsed[e],r.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const r=this.chart;let i,s,o,a,l;if(!e){for(i=0,s=r.data.datasets.length;i<s;++i)if(r.isDatasetVisible(i)){o=r.getDatasetMeta(i),e=o.data,a=o.controller;break}}if(!e)return 0;for(i=0,s=e.length;i<s;++i)l=a.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let r=0,i=e.length;r<i;++r){const s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(e){return Math.max(B(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}L(Tn,"id","doughnut"),L(Tn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),L(Tn,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),L(Tn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=e.legend.options;return n.labels.map((s,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class ws extends It{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=j1(n,i,o);this._drawStart=a,this._drawCount=l,B1(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:u},e),this.updateElements(i,a,l,e)}updateElements(e,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:f}=this._getSharedOptions(n,i),h=o.axis,d=a.axis,{spanGaps:g,segment:y}=this.options,_=Si(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||s||i==="none",p=n+r,v=e.length;let x=n>0&&this.getParsed(n-1);for(let b=0;b<v;++b){const E=e[b],O=m?E:{};if(b<n||b>=p){O.skip=!0;continue}const T=this.getParsed(b),I=q(T[d]),R=O[h]=o.getPixelForValue(T[h],b),A=O[d]=s||I?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,T,l):T[d],b);O.skip=isNaN(R)||isNaN(A)||I,O.stop=b>0&&Math.abs(T[h]-x[h])>_,y&&(O.parsed=T,O.raw=u.data[b]),f&&(O.options=c||this.resolveDataElementOptions(b,E.active?"active":i)),m||this.updateElement(E,b,O,i),x=T}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}L(ws,"id","line"),L(ws,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),L(ws,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ks extends It{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=co(n._parsed[e].r,r.options.locale);return{label:i[e]||"",value:s}}parseObjectData(e,n,r,i){return Q1.bind(this)(e,n,r,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,r=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(i/2,0),o=Math.max(r.cutoutPercentage?s/100*r.cutoutPercentage:1,0),a=(s-o)/e.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,r,i){const s=i==="reset",o=this.chart,l=o.options.animation,u=this._cachedMeta.rScale,c=u.xCenter,f=u.yCenter,h=u.getIndexAngle(0)-.5*oe;let d=h,g;const y=360/this.countVisibleElements();for(g=0;g<n;++g)d+=this._computeAngle(g,i,y);for(g=n;g<n+r;g++){const _=e[g];let m=d,p=d+this._computeAngle(g,i,y),v=o.getDataVisibility(g)?u.getDistanceFromCenterForValue(this.getParsed(g).r):0;d=p,s&&(l.animateScale&&(v=0),l.animateRotate&&(m=p=h));const x={x:c,y:f,innerRadius:0,outerRadius:v,startAngle:m,endAngle:p,options:this.resolveDataElementOptions(g,_.active?"active":i)};this.updateElement(_,g,x,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?Dt(this.resolveDataElementOptions(e,n).angle||r):0}}L(ks,"id","polarArea"),L(ks,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),L(ks,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=e.legend.options;return n.labels.map((s,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class hl extends Tn{}L(hl,"id","pie"),L(hl,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Ea extends It{getLabelAndValue(e){const n=this._cachedMeta.vScale,r=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,i){return Q1.bind(this)(e,n,r,i)}update(e){const n=this._cachedMeta,r=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(r.points=i,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:o};this.updateElement(r,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,r,i){const s=this._cachedMeta.rScale,o=i==="reset";for(let a=n;a<n+r;a++){const l=e[a],u=this.resolveDataElementOptions(a,l.active?"active":i),c=s.getPointPositionForValue(a,this.getParsed(a).r),f=o?s.xCenter:c.x,h=o?s.yCenter:c.y,d={x:f,y:h,angle:c.angle,skip:isNaN(f)||isNaN(h),options:u};this.updateElement(l,a,d,i)}}}L(Ea,"id","radar"),L(Ea,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),L(Ea,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Ma extends It{getLabelAndValue(e){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=n,o=this.getParsed(e),a=i.getLabelForValue(o.x),l=s.getLabelForValue(o.y);return{label:r[e]||"",value:"("+a+", "+l+")"}}update(e){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:o}=j1(n,r,i);if(this._drawStart=s,this._drawCount=o,B1(n)&&(s=0,o=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=r;const u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:u},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,s,o,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,c=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(c),h=this.includeOptions(i,f),d=o.axis,g=a.axis,{spanGaps:y,segment:_}=this.options,m=Si(y)?y:Number.POSITIVE_INFINITY,p=this.chart._animationsDisabled||s||i==="none";let v=n>0&&this.getParsed(n-1);for(let x=n;x<n+r;++x){const b=e[x],E=this.getParsed(x),O=p?b:{},T=q(E[g]),I=O[d]=o.getPixelForValue(E[d],x),R=O[g]=s||T?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,E,l):E[g],x);O.skip=isNaN(I)||isNaN(R)||T,O.stop=x>0&&Math.abs(E[d]-v[d])>m,_&&(O.parsed=E,O.raw=u.data[x]),h&&(O.options=f||this.resolveDataElementOptions(x,b.active?"active":i)),p||this.updateElement(b,x,O,i),v=E}this.updateSharedOptions(f,i,c)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=e.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}}L(Ma,"id","scatter"),L(Ma,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),L(Ma,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var N$=Object.freeze({__proto__:null,BarController:Ss,BubbleController:ka,DoughnutController:Tn,LineController:ws,PieController:hl,PolarAreaController:ks,RadarController:Ea,ScatterController:Ma});function rr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Nd{constructor(e){L(this,"options");this.options=e||{}}static override(e){Object.assign(Nd.prototype,e)}init(){}formats(){return rr()}parse(){return rr()}format(){return rr()}add(){return rr()}diff(){return rr()}startOf(){return rr()}endOf(){return rr()}}var F$={_date:Nd};function z$(t,e,n,r){const{controller:i,data:s,_sorted:o}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&o&&s.length){const l=a._reversePixels?lI:on;if(r){if(i._sharedOptions){const u=s[0],c=typeof u.getRange=="function"&&u.getRange(e);if(c){const f=l(s,e,n-c),h=l(s,e,n+c);return{lo:f.lo,hi:h.hi}}}}else return l(s,e,n)}return{lo:0,hi:s.length-1}}function fo(t,e,n,r,i){const s=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=s.length;a<l;++a){const{index:u,data:c}=s[a],{lo:f,hi:h}=z$(s[a],e,o,i);for(let d=f;d<=h;++d){const g=c[d];g.skip||r(g,u,d)}}}function j$(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,i){const s=e?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function cc(t,e,n,r,i){const s=[];return!i&&!t.isPointInArea(e)||fo(t,n,e,function(a,l,u){!i&&!an(a,t.chartArea,0)||a.inRange(e.x,e.y,r)&&s.push({element:a,datasetIndex:l,index:u})},!0),s}function B$(t,e,n,r){let i=[];function s(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:f}=$1(o,{x:e.x,y:e.y});Gs(f,u,c)&&i.push({element:o,datasetIndex:a,index:l})}return fo(t,n,e,s),i}function V$(t,e,n,r,i,s){let o=[];const a=j$(n);let l=Number.POSITIVE_INFINITY;function u(c,f,h){const d=c.inRange(e.x,e.y,i);if(r&&!d)return;const g=c.getCenterPoint(i);if(!(!!s||t.isPointInArea(g))&&!d)return;const _=a(e,g);_<l?(o=[{element:c,datasetIndex:f,index:h}],l=_):_===l&&o.push({element:c,datasetIndex:f,index:h})}return fo(t,n,e,u),o}function fc(t,e,n,r,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!r?B$(t,e,n,i):V$(t,e,n,r,i,s)}function fy(t,e,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return fo(t,n,e,(l,u,c)=>{l[o](e[n],i)&&(s.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(e.x,e.y,i))}),r&&!a?[]:s}var U$={evaluateInteractionItems:fo,modes:{index(t,e,n,r){const i=ur(e,t),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?cc(t,i,s,r,o):fc(t,i,s,!1,r,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,f=u.data[c];f&&!f.skip&&l.push({element:f,datasetIndex:u.index,index:c})}),l):[]},dataset(t,e,n,r){const i=ur(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?cc(t,i,s,r,o):fc(t,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,u=t.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(t,e,n,r){const i=ur(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return cc(t,i,s,r,o)},nearest(t,e,n,r){const i=ur(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return fc(t,i,s,n.intersect,r,o)},x(t,e,n,r){const i=ur(e,t);return fy(t,i,"x",n.intersect,r)},y(t,e,n,r){const i=ur(e,t);return fy(t,i,"y",n.intersect,r)}}};const sb=["left","top","right","bottom"];function qi(t,e){return t.filter(n=>n.pos===e)}function hy(t,e){return t.filter(n=>sb.indexOf(n.pos)===-1&&n.box.axis===e)}function Gi(t,e){return t.sort((n,r)=>{const i=e?r:n,s=e?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function W$(t){const e=[];let n,r,i,s,o,a;for(n=0,r=(t||[]).length;n<r;++n)i=t[n],{position:s,options:{stack:o,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&s+o,stackWeight:a});return e}function H$(t){const e={};for(const n of t){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!sb.includes(i))continue;const o=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}function Y$(t,e){const n=H$(t),{vBoxMaxWidth:r,hBoxMaxHeight:i}=e;let s,o,a;for(s=0,o=t.length;s<o;++s){a=t[s];const{fullSize:l}=a.box,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*r:l&&e.availableWidth,a.height=i):(a.width=r,a.height=c?c*i:l&&e.availableHeight)}return n}function q$(t){const e=W$(t),n=Gi(e.filter(u=>u.box.fullSize),!0),r=Gi(qi(e,"left"),!0),i=Gi(qi(e,"right")),s=Gi(qi(e,"top"),!0),o=Gi(qi(e,"bottom")),a=hy(e,"x"),l=hy(e,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:qi(e,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function dy(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function ob(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function G$(t,e,n,r){const{pos:i,box:s}=n,o=t.maxPadding;if(!U(i)){n.size&&(t[i]-=n.size);const f=r[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,t[i]+=n.size}s.getPadding&&ob(o,s.getPadding());const a=Math.max(0,e.outerWidth-dy(o,t,"left","right")),l=Math.max(0,e.outerHeight-dy(o,t,"top","bottom")),u=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function Q$(t){const e=t.maxPadding;function n(r){const i=Math.max(e[r]-t[r],0);return t[r]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function K$(t,e){const n=e.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(e[o],n[o])}),s}return r(t?["left","right"]:["top","bottom"])}function rs(t,e,n,r){const i=[];let s,o,a,l,u,c;for(s=0,o=t.length,u=0;s<o;++s){a=t[s],l=a.box,l.update(a.width||e.w,a.height||e.h,K$(a.horizontal,e));const{same:f,other:h}=G$(e,n,a,r);u|=f&&i.length,c=c||h,l.fullSize||i.push(a)}return u&&rs(i,e,n,r)||c}function Ko(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i}function py(t,e,n,r){const i=n.padding;let{x:s,y:o}=e;for(const a of t){const l=a.box,u=r[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const f=e.w*c,h=u.size||l.height;qs(u.start)&&(o=u.start),l.fullSize?Ko(l,i.left,o,n.outerWidth-i.right-i.left,h):Ko(l,e.left+u.placed,o,f,h),u.start=o,u.placed+=f,o=l.bottom}else{const f=e.h*c,h=u.size||l.width;qs(u.start)&&(s=u.start),l.fullSize?Ko(l,s,i.top,h,n.outerHeight-i.bottom-i.top):Ko(l,s,e.top+u.placed,h,f),u.start=s,u.placed+=f,s=l.right}}e.x=s,e.y=o}var Ne={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const i=ze(t.options.layout.padding),s=Math.max(e-i.width,0),o=Math.max(n-i.height,0),a=q$(t.boxes),l=a.vertical,u=a.horizontal;Q(t.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const c=l.reduce((y,_)=>_.box.options&&_.box.options.display===!1?y:y+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/c,hBoxMaxHeight:o/2}),h=Object.assign({},i);ob(h,ze(r));const d=Object.assign({maxPadding:h,w:s,h:o,x:i.left,y:i.top},i),g=Y$(l.concat(u),f);rs(a.fullSize,d,f,g),rs(l,d,f,g),rs(u,d,f,g)&&rs(l,d,f,g),Q$(d),py(a.leftAndTop,d,f,g),d.x+=d.w,d.y+=d.h,py(a.rightAndBottom,d,f,g),t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},Q(a.chartArea,y=>{const _=y.box;Object.assign(_,t.chartArea),_.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class ab{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,i){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(e){return!0}updateConfig(e){}}class X$ extends ab{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Pa="$chartjs",J$={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},gy=t=>t===null||t==="";function Z$(t,e){const n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[Pa]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",gy(i)){const s=Xm(t,"width");s!==void 0&&(t.width=s)}if(gy(r))if(t.style.height==="")t.height=t.width/(e||2);else{const s=Xm(t,"height");s!==void 0&&(t.height=s)}return t}const lb=t$?{passive:!0}:!1;function eL(t,e,n){t&&t.addEventListener(e,n,lb)}function tL(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,lb)}function nL(t,e){const n=J$[t.type]||t.type,{x:r,y:i}=ur(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:i!==void 0?i:null}}function dl(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function rL(t,e,n){const r=t.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||dl(a.addedNodes,r),o=o&&!dl(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function iL(t,e,n){const r=t.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||dl(a.removedNodes,r),o=o&&!dl(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ks=new Map;let my=0;function ub(){const t=window.devicePixelRatio;t!==my&&(my=t,Ks.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function sL(t,e){Ks.size||window.addEventListener("resize",ub),Ks.set(t,e)}function oL(t){Ks.delete(t),Ks.size||window.removeEventListener("resize",ub)}function aL(t,e,n){const r=t.canvas,i=r&&Ld(r);if(!i)return;const s=z1((a,l)=>{const u=i.clientWidth;n(a,l),u<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||s(u,c)});return o.observe(i),sL(t,s),o}function hc(t,e,n){n&&n.disconnect(),e==="resize"&&oL(t)}function lL(t,e,n){const r=t.canvas,i=z1(s=>{t.ctx!==null&&n(nL(s,t))},t);return eL(r,e,i),i}class uL extends ab{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(Z$(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[Pa])return!1;const r=n[Pa].initial;["height","width"].forEach(s=>{const o=r[s];q(o)?n.removeAttribute(s):n.setAttribute(s,o)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[Pa],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),o={attach:rL,detach:iL,resize:aL}[n]||lL;i[n]=o(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),i=r[n];if(!i)return;({attach:hc,detach:hc,resize:hc}[n]||tL)(e,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return e$(e,n,r,i)}isAttached(e){const n=Ld(e);return!!(n&&n.isConnected)}}function cL(t){return!$d()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?X$:uL}class Lt{constructor(){L(this,"x");L(this,"y");L(this,"active",!1);L(this,"options");L(this,"$animations")}tooltipPosition(e){const{x:n,y:r}=this.getProps(["x","y"],e);return{x:n,y:r}}hasValue(){return Si(this.x)&&Si(this.y)}getProps(e,n){const r=this.$animations;if(!n||!r)return this;const i={};return e.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}}L(Lt,"defaults",{}),L(Lt,"defaultRoutes");function fL(t,e){const n=t.options.ticks,r=hL(t),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?pL(e):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>i)return gL(e,u,s,o/i),u;const c=dL(s,e,i);if(o>0){let f,h;const d=o>1?Math.round((l-a)/(o-1)):null;for(Xo(e,u,c,q(d)?0:a-d,a),f=0,h=o-1;f<h;f++)Xo(e,u,c,s[f],s[f+1]);return Xo(e,u,c,l,q(d)?e.length:l+d),u}return Xo(e,u,c),u}function hL(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}function dL(t,e,n){const r=mL(t),i=e.length/n;if(!r)return Math.max(i,1);const s=iI(r);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>i)return l}return Math.max(i,1)}function pL(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function gL(t,e,n,r){let i=0,s=n[0],o;for(r=Math.ceil(r),o=0;o<t.length;o++)o===s&&(e.push(t[o]),i++,s=n[i*r])}function Xo(t,e,n,r,i){const s=B(r,0),o=Math.min(B(i,t.length),t.length);let a=0,l,u,c;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),c=s;c<0;)a++,c=Math.round(s+a*n);for(u=Math.max(s,0);u<o;u++)u===c&&(e.push(t[u]),a++,c=Math.round(s+a*n))}function mL(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}const yL=t=>t==="left"?"right":t==="right"?"left":t,yy=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,vy=(t,e)=>Math.min(e||t,t);function _y(t,e){const n=[],r=t.length/e,i=t.length;let s=0;for(;s<i;s+=r)n.push(t[Math.floor(s)]);return n}function vL(t,e,n){const r=t.ticks.length,i=Math.min(e,r-1),s=t._startPixel,o=t._endPixel,a=1e-6;let l=t.getPixelForTick(i),u;if(!(n&&(r===1?u=Math.max(l-s,o-l):e===0?u=(t.getPixelForTick(1)-l)/2:u=(l-t.getPixelForTick(i-1))/2,l+=i<e?u:-u,l<s-a||l>o+a)))return l}function _L(t,e){Q(t,n=>{const r=n.gc,i=r.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function Qi(t){return t.drawTicks?t.tickLength:0}function xy(t,e){if(!t.display)return 0;const n=we(t.font,e),r=ze(t.padding);return(re(t.text)?t.text.length:1)*n.lineHeight+r.height}function xL(t,e){return Jn(t,{scale:e,type:"scale"})}function bL(t,e,n){return Jn(t,{tick:n,index:e,type:"tick"})}function SL(t,e,n){let r=Cd(t);return(n&&e!=="right"||!n&&e==="right")&&(r=yL(r)),r}function wL(t,e,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=t,{chartArea:u,scales:c}=l;let f=0,h,d,g;const y=o-i,_=a-s;if(t.isHorizontal()){if(d=$e(r,s,a),U(n)){const m=Object.keys(n)[0],p=n[m];g=c[m].getPixelForValue(p)+y-e}else n==="center"?g=(u.bottom+u.top)/2+y-e:g=yy(t,n,e);h=a-s}else{if(U(n)){const m=Object.keys(n)[0],p=n[m];d=c[m].getPixelForValue(p)-_+e}else n==="center"?d=(u.left+u.right)/2-_+e:d=yy(t,n,e);g=$e(r,o,i),f=n==="left"?-ye:ye}return{titleX:d,titleY:g,maxWidth:h,rotation:f}}class Dr extends Lt{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return e=tt(e,Number.POSITIVE_INFINITY),n=tt(n,Number.NEGATIVE_INFINITY),r=tt(r,Number.POSITIVE_INFINITY),i=tt(i,Number.NEGATIVE_INFINITY),{min:tt(e,r),max:tt(n,i),minDefined:pe(e),maxDefined:pe(n)}}getMinMax(e){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),o;if(i&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,u=a.length;l<u;++l)o=a[l].controller.getMinMax(this,e),i||(n=Math.min(n,o.min)),s||(r=Math.max(r,o.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:tt(n,tt(r,n)),max:tt(r,tt(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){J(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:i,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=RI(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?_y(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=fL(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){J(this.options.afterUpdate,[this])}beforeSetDimensions(){J(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){J(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),J(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){J(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r],s.label=J(n.callback,[s.value,r,e],this)}afterTickToLabelConversion(){J(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){J(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,r=vy(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,u;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),f=c.widest.width,h=c.highest.height,d=Me(this.chart.width-f,0,this.maxWidth);a=e.offset?this.maxWidth/r:d/(r-1),f+6>a&&(a=d/(r-(e.offset?.5:1)),l=this.maxHeight-Qi(e.grid)-n.padding-xy(e.title,this.chart.options.font),u=Math.sqrt(f*f+h*h),o=Pd(Math.min(Math.asin(Me((c.highest.height+6)/a,-1,1)),Math.asin(Me(l/u,-1,1))-Math.asin(Me(h/u,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){J(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){J(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=xy(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=Qi(s)+l):(e.height=this.maxHeight,e.width=Qi(s)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:f,highest:h}=this._getLabelSizes(),d=r.padding*2,g=Dt(this.labelRotation),y=Math.cos(g),_=Math.sin(g);if(a){const m=r.mirror?0:_*f.width+y*h.height;e.height=Math.min(this.maxHeight,e.height+m+d)}else{const m=r.mirror?0:y*f.width+_*h.height;e.width=Math.min(this.maxWidth,e.width+m+d)}this._calculatePadding(u,c,_,y)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,i){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;l?u?(h=i*e.width,d=r*n.height):(h=r*e.height,d=i*n.width):s==="start"?d=n.width:s==="end"?h=e.width:s!=="inner"&&(h=e.width/2,d=n.width/2),this.paddingLeft=Math.max((h-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((d-f+o)*this.width/(this.width-f),0)}else{let c=n.height/2,f=e.height/2;s==="start"?(c=0,f=e.height):s==="end"&&(c=n.height,f=0),this.paddingTop=c+o,this.paddingBottom=f+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){J(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)q(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=_y(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){const{ctx:i,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/vy(n,r));let u=0,c=0,f,h,d,g,y,_,m,p,v,x,b;for(f=0;f<n;f+=l){if(g=e[f].label,y=this._resolveTickFontOptions(f),i.font=_=y.string,m=s[_]=s[_]||{data:{},gc:[]},p=y.lineHeight,v=x=0,!q(g)&&!re(g))v=cl(i,m.data,m.gc,v,g),x=p;else if(re(g))for(h=0,d=g.length;h<d;++h)b=g[h],!q(b)&&!re(b)&&(v=cl(i,m.data,m.gc,v,b),x+=p);o.push(v),a.push(x),u=Math.max(v,u),c=Math.max(x,c)}_L(s,n);const E=o.indexOf(u),O=a.indexOf(c),T=I=>({width:o[I]||0,height:a[I]||0});return{first:T(0),last:T(n-1),widest:T(E),highest:T(O),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return aI(this._alignToPixels?nr(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const r=n[e];return r.$context||(r.$context=bL(this.getContext(),e,r))}return this.$context||(this.$context=xL(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Dt(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=e.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:o,border:a}=i,l=s.offset,u=this.isHorizontal(),f=this.ticks.length+(l?1:0),h=Qi(s),d=[],g=a.setContext(this.getContext()),y=g.display?g.width:0,_=y/2,m=function(C){return nr(r,C,y)};let p,v,x,b,E,O,T,I,R,A,j,V;if(o==="top")p=m(this.bottom),O=this.bottom-h,I=p-_,A=m(e.top)+_,V=e.bottom;else if(o==="bottom")p=m(this.top),A=e.top,V=m(e.bottom)-_,O=p+_,I=this.top+h;else if(o==="left")p=m(this.right),E=this.right-h,T=p-_,R=m(e.left)+_,j=e.right;else if(o==="right")p=m(this.left),R=e.left,j=m(e.right)-_,E=p+_,T=this.left+h;else if(n==="x"){if(o==="center")p=m((e.top+e.bottom)/2+.5);else if(U(o)){const C=Object.keys(o)[0],M=o[C];p=m(this.chart.scales[C].getPixelForValue(M))}A=e.top,V=e.bottom,O=p+_,I=O+h}else if(n==="y"){if(o==="center")p=m((e.left+e.right)/2);else if(U(o)){const C=Object.keys(o)[0],M=o[C];p=m(this.chart.scales[C].getPixelForValue(M))}E=p-_,T=E-h,R=e.left,j=e.right}const w=B(i.ticks.maxTicksLimit,f),k=Math.max(1,Math.ceil(f/w));for(v=0;v<f;v+=k){const C=this.getContext(v),M=s.setContext(C),S=a.setContext(C),P=M.lineWidth,D=M.color,N=S.dash||[],F=S.dashOffset,G=M.tickWidth,H=M.tickColor,ae=M.tickBorderDash||[],he=M.tickBorderDashOffset;x=vL(this,v,l),x!==void 0&&(b=nr(r,x,P),u?E=T=R=j=b:O=I=A=V=b,d.push({tx1:E,ty1:O,tx2:T,ty2:I,x1:R,y1:A,x2:j,y2:V,width:P,color:D,borderDash:N,borderDashOffset:F,tickWidth:G,tickColor:H,tickBorderDash:ae,tickBorderDashOffset:he}))}return this._ticksLength=f,this._borderValue=p,d}_computeLabelItems(e){const n=this.axis,r=this.options,{position:i,ticks:s}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:c,mirror:f}=s,h=Qi(r.grid),d=h+c,g=f?-c:d,y=-Dt(this.labelRotation),_=[];let m,p,v,x,b,E,O,T,I,R,A,j,V="middle";if(i==="top")E=this.bottom-g,O=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+g,O=this._getXAxisLabelAlignment();else if(i==="left"){const k=this._getYAxisLabelAlignment(h);O=k.textAlign,b=k.x}else if(i==="right"){const k=this._getYAxisLabelAlignment(h);O=k.textAlign,b=k.x}else if(n==="x"){if(i==="center")E=(e.top+e.bottom)/2+d;else if(U(i)){const k=Object.keys(i)[0],C=i[k];E=this.chart.scales[k].getPixelForValue(C)+d}O=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")b=(e.left+e.right)/2-d;else if(U(i)){const k=Object.keys(i)[0],C=i[k];b=this.chart.scales[k].getPixelForValue(C)}O=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(l==="start"?V="top":l==="end"&&(V="bottom"));const w=this._getLabelSizes();for(m=0,p=a.length;m<p;++m){v=a[m],x=v.label;const k=s.setContext(this.getContext(m));T=this.getPixelForTick(m)+s.labelOffset,I=this._resolveTickFontOptions(m),R=I.lineHeight,A=re(x)?x.length:1;const C=A/2,M=k.color,S=k.textStrokeColor,P=k.textStrokeWidth;let D=O;o?(b=T,O==="inner"&&(m===p-1?D=this.options.reverse?"left":"right":m===0?D=this.options.reverse?"right":"left":D="center"),i==="top"?u==="near"||y!==0?j=-A*R+R/2:u==="center"?j=-w.highest.height/2-C*R+R:j=-w.highest.height+R/2:u==="near"||y!==0?j=R/2:u==="center"?j=w.highest.height/2-C*R:j=w.highest.height-A*R,f&&(j*=-1),y!==0&&!k.showLabelBackdrop&&(b+=R/2*Math.sin(y))):(E=T,j=(1-A)*R/2);let N;if(k.showLabelBackdrop){const F=ze(k.backdropPadding),G=w.heights[m],H=w.widths[m];let ae=j-F.top,he=0-F.left;switch(V){case"middle":ae-=G/2;break;case"bottom":ae-=G;break}switch(O){case"center":he-=H/2;break;case"right":he-=H;break;case"inner":m===p-1?he-=H:m>0&&(he-=H/2);break}N={left:he,top:ae,width:H+F.width,height:G+F.height,color:k.backdropColor}}_.push({label:x,font:I,textOffset:j,options:{rotation:y,color:M,strokeColor:S,strokeWidth:P,textAlign:D,textBaseline:V,translation:[b,E],backdrop:N}})}return _}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Dt(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,o=this._getLabelSizes(),a=e+s,l=o.widest.width;let u,c;return n==="left"?i?(c=this.right+s,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?i?(c=this.left+s,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:r,top:i,width:s,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,i,s,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,o;const a=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(s=0,o=i.length;s<o;++s){const l=i[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),o=r.display?s.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,f,h;this.isHorizontal()?(u=nr(e,this.left,o)-o/2,c=nr(e,this.right,a)+a/2,f=h=l):(f=nr(e,this.top,o)-o/2,h=nr(e,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(u,f),n.lineTo(c,h),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Hl(r,i);const s=this.getLabelItems(e);for(const o of s){const a=o.options,l=o.font,u=o.label,c=o.textOffset;Mr(r,u,0,c,l,a)}i&&Yl(r)}drawTitle(){const{ctx:e,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=we(r.font),o=ze(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||U(n)?(l+=o.bottom,re(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:f,rotation:h}=wL(this,l,n,a);Mr(e,r.text,0,0,s,{color:r.color,maxWidth:f,rotation:h,textAlign:SL(a,n,i),textBaseline:"middle",translation:[u,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,r=B(e.grid&&e.grid.z,-1),i=B(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Dr.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];a[r]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return we(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Jo{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let r;ML(n)&&(r=this.register(n));const i=this.items,s=e.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,kL(e,o,r),this.override&&ge.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,r=e.id,i=this.scope;r in n&&delete n[r],i&&r in ge[i]&&(delete ge[i][r],this.override&&delete Er[r])}}function kL(t,e,n){const r=Ys(Object.create(null),[n?ge.get(n):{},ge.get(e),t.defaults]);ge.set(e,r),t.defaultRoutes&&EL(e,t.defaultRoutes),t.descriptors&&ge.describe(e,t.descriptors)}function EL(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),i=r.pop(),s=[t].concat(r).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");ge.route(s,i,l,a)})}function ML(t){return"id"in t&&"defaults"in t}class PL{constructor(){this.controllers=new Jo(It,"datasets",!0),this.elements=new Jo(Lt,"elements"),this.plugins=new Jo(Object,"plugins"),this.scales=new Jo(Dr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):Q(i,o=>{const a=r||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,r){const i=Md(e);J(r["before"+i],[],r),n[e](r),J(r["after"+i],[],r)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return i}}var Bt=new PL;class OL{constructor(){this._init=[]}notify(e,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=i?this._descriptors(e).filter(i):this._descriptors(e),o=this._notify(s,e,n,r);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,n,r,i){i=i||{};for(const s of e){const o=s.plugin,a=o[r],l=[n,i,s.options];if(J(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){q(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const r=e&&e.config,i=B(r.options&&r.options.plugins,{}),s=CL(r);return i===!1&&!n?[]:DL(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],r=this._cache,i=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),e,"stop"),this._notify(i(r,n),e,"start")}}function CL(t){const e={},n=[],r=Object.keys(Bt.plugins.items);for(let s=0;s<r.length;s++)n.push(Bt.getPlugin(r[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const o=i[s];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function TL(t,e){return!e&&t===!1?null:t===!0?{}:t}function DL(t,{plugins:e,localIds:n},r,i){const s=[],o=t.getContext();for(const a of e){const l=a.id,u=TL(r[l],i);u!==null&&s.push({plugin:a,options:RL(t.config,{plugin:a,local:n[l]},u,o)})}return s}function RL(t,{plugin:e,local:n},r,i){const s=t.pluginScopeKeys(e),o=t.getOptionScopes(r,s);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function zf(t,e){const n=ge.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function AL(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function IL(t,e){return t===e?"_index_":"_value_"}function by(t){if(t==="x"||t==="y"||t==="r")return t}function $L(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function jf(t,...e){if(by(t))return t;for(const n of e){const r=n.axis||$L(n.position)||t.length>1&&by(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Sy(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function LL(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return Sy(t,"x",n[0])||Sy(t,"y",n[0])}return{}}function NL(t,e){const n=Er[t.type]||{scales:{}},r=e.scales||{},i=zf(t.type,e),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!U(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=jf(o,a,LL(o,t),ge.scales[a.type]),u=IL(l,i),c=n.scales||{};s[o]=vs(Object.create(null),[{axis:l},a,c[l],c[u]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||zf(a,e),c=(Er[a]||{}).scales||{};Object.keys(c).forEach(f=>{const h=AL(f,l),d=o[h+"AxisID"]||h;s[d]=s[d]||Object.create(null),vs(s[d],[{axis:h},r[d],c[f]])})}),Object.keys(s).forEach(o=>{const a=s[o];vs(a,[ge.scales[a.type],ge.scale])}),s}function cb(t){const e=t.options||(t.options={});e.plugins=B(e.plugins,{}),e.scales=NL(t,e)}function fb(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function FL(t){return t=t||{},t.data=fb(t.data),cb(t),t}const wy=new Map,hb=new Set;function Zo(t,e){let n=wy.get(t);return n||(n=e(),wy.set(t,n),hb.add(n)),n}const Ki=(t,e,n)=>{const r=Hn(e,n);r!==void 0&&t.add(r)};class zL{constructor(e){this._config=FL(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=fb(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),cb(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Zo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Zo(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Zo(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return Zo(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let i=r.get(e);return(!i||n)&&(i=new Map,r.set(e,i)),i}getOptionScopes(e,n,r){const{options:i,type:s}=this,o=this._cachedScopes(e,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{e&&(l.add(e),c.forEach(f=>Ki(l,e,f))),c.forEach(f=>Ki(l,i,f)),c.forEach(f=>Ki(l,Er[s]||{},f)),c.forEach(f=>Ki(l,ge,f)),c.forEach(f=>Ki(l,Nf,f))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),hb.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,Er[n]||{},ge.datasets[n]||{},{type:n},ge,Nf]}resolveNamedOptions(e,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=ky(this._resolverCache,e,i);let l=o;if(BL(o,n)){s.$shared=!1,r=Yn(r)?r():r;const u=this.createResolver(e,r,a);l=wi(o,r,u)}for(const u of n)s[u]=l[u];return s}createResolver(e,n,r=[""],i){const{resolver:s}=ky(this._resolverCache,e,r);return U(n)?wi(s,n,void 0,i):s}}function ky(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const i=n.join();let s=r.get(i);return s||(s={resolver:Rd(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const jL=t=>U(t)&&Object.getOwnPropertyNames(t).some(e=>Yn(t[e]));function BL(t,e){const{isScriptable:n,isIndexable:r}=H1(t);for(const i of e){const s=n(i),o=r(i),a=(o||s)&&t[i];if(s&&(Yn(a)||jL(a))||o&&re(a))return!0}return!1}var VL="4.4.2";const UL=["top","bottom","left","right","chartArea"];function Ey(t,e){return t==="top"||t==="bottom"||UL.indexOf(t)===-1&&e==="x"}function My(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function Py(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),J(n&&n.onComplete,[t],e)}function WL(t){const e=t.chart,n=e.options.animation;J(n&&n.onProgress,[t],e)}function db(t){return $d()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Oa={},Oy=t=>{const e=db(t);return Object.values(Oa).filter(n=>n.canvas===e).pop()};function HL(t,e,n){const r=Object.keys(t);for(const i of r){const s=+i;if(s>=e){const o=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=o)}}}function YL(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}function ea(t,e,n){return t.options.clip?t[n]:e[n]}function qL(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:ea(n,e,"left"),right:ea(n,e,"right"),top:ea(r,e,"top"),bottom:ea(r,e,"bottom")}:e}var xn;let Gl=(xn=class{static register(...e){Bt.add(...e),Cy()}static unregister(...e){Bt.remove(...e),Cy()}constructor(e,n){const r=this.config=new zL(n),i=db(e),s=Oy(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||cL(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=QA(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new OL,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=fI(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],Oa[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Kt.listen(this,"complete",Py),Kt.listen(this,"progress",WL),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return q(e)?n&&s?s:i?r/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Bt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Km(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return qm(this.canvas,this.ctx),this}stop(){return Kt.stop(this),this}resize(e,n){Kt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,n,s),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Km(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),J(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Q(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,r=this.scales,i=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=jf(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),Q(s,o=>{const a=o.options,l=a.id,u=jf(l,a),c=B(a.type,o.dtype);(a.position===void 0||Ey(a.position,u)!==Ey(o.dposition))&&(a.position=o.dposition),i[l]=!0;let f=null;if(l in r&&r[l].type===c)f=r[l];else{const h=Bt.getScale(c);f=new h({id:l,type:c,ctx:this.ctx,chart:this}),r[f.id]=f}f.init(a,e)}),Q(i,(o,a)=>{o||delete r[a]}),Q(r,o=>{Ne.configure(this,o,o.options),Ne.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);e.splice(n,r-n)}this._sortedMetasets=e.slice(0).sort(My("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let o=this.getDatasetMeta(r);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=s.indexAxis||zf(a,this.options),o.order=s.order||0,o.index=r,o.label=""+s.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Bt.getController(a),{datasetElementType:u,dataElementType:c}=ge.datasets[a];Object.assign(l,{dataElementType:Bt.getElement(c),datasetElementType:u&&Bt.getElement(u)}),o.controller=new l(this,r),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){Q(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:f}=this.getDatasetMeta(u),h=!i&&s.indexOf(f)===-1;f.buildOrUpdateElements(h),o=Math.max(+f.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||Q(s,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(My("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Q(this.scales,e=>{Ne.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!Fm(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const o=r==="_removeElements"?-s:s;HL(e,i,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(e.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!Fm(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ne.update(this,this.width,this.height,e);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Q(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Yn(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const r=this.getDatasetMeta(e),i={meta:r,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Kt.has(this)?this.attached&&!Kt.running(this)&&Kt.start(this):(this.draw(),Py({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const o=n[i];(!e||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,r=e._clip,i=!r.disabled,s=qL(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&Hl(n,{left:r.left===!1?0:s.left-r.left,right:r.right===!1?this.width:s.right+r.right,top:r.top===!1?0:s.top-r.top,bottom:r.bottom===!1?this.height:s.bottom+r.bottom}),e.controller.draw(),i&&Yl(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return an(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,i){const s=U$.modes[n];return typeof s=="function"?s(this,e,r,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Jn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){const r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(e),o=s.controller._resolveAnimations(void 0,i);qs(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),o.update(s,{visible:r}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Kt.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),qm(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Oa[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,r=(s,o)=>{n.addEventListener(this,s,o),e[s]=o},i=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};Q(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),e[l]=u},i=(l,u)=>{e[l]&&(n.removeEventListener(this,l,u),delete e[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",s),r("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Q(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Q(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){const i=r?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){o=e[a];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],r=e.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!al(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){const i=this.options.hover,s=(l,u)=>l.filter(c=>!u.some(f=>c.datasetIndex===f.datasetIndex&&c.index===f.index)),o=s(n,e),a=r?e:s(e,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(e,n,r){const{_active:i=[],options:s}=this,o=n,a=this._getActiveElements(e,i,r,o),l=tI(e),u=YL(e,this._lastEvent,r,l);r&&(this._lastEvent=null,J(s.onHover,[e,a,this],this),l&&J(s.onClick,[e,a,this],this));const c=!al(a,i);return(c||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=u,c}_getActiveElements(e,n,r,i){if(e.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}},L(xn,"defaults",ge),L(xn,"instances",Oa),L(xn,"overrides",Er),L(xn,"registry",Bt),L(xn,"version",VL),L(xn,"getChart",Oy),xn);function Cy(){return Q(Gl.instances,t=>t._plugins.invalidate())}function GL(t,e,n){const{startAngle:r,pixelMargin:i,x:s,y:o,outerRadius:a,innerRadius:l}=e;let u=i/a;t.beginPath(),t.arc(s,o,a,r-u,n+u),l>i?(u=i/l,t.arc(s,o,l,n+u,r-u,!0)):t.arc(s,o,i,n+ye,r-ye),t.closePath(),t.clip()}function QL(t){return Dd(t,["outerStart","outerEnd","innerStart","innerEnd"])}function KL(t,e,n,r){const i=QL(t.options.borderRadius),s=(n-e)/2,o=Math.min(s,r*e/2),a=l=>{const u=(n-Math.min(s,l))*r/2;return Me(l,0,Math.min(s,u))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:Me(i.innerStart,0,o),innerEnd:Me(i.innerEnd,0,o)}}function Lr(t,e,n,r){return{x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function pl(t,e,n,r,i,s){const{x:o,y:a,startAngle:l,pixelMargin:u,innerRadius:c}=e,f=Math.max(e.outerRadius+r+n-u,0),h=c>0?c+r+n+u:0;let d=0;const g=i-l;if(r){const k=c>0?c-r:0,C=f>0?f-r:0,M=(k+C)/2,S=M!==0?g*M/(M+r):g;d=(g-S)/2}const y=Math.max(.001,g*f-n/oe)/f,_=(g-y)/2,m=l+_+d,p=i-_-d,{outerStart:v,outerEnd:x,innerStart:b,innerEnd:E}=KL(e,h,f,p-m),O=f-v,T=f-x,I=m+v/O,R=p-x/T,A=h+b,j=h+E,V=m+b/A,w=p-E/j;if(t.beginPath(),s){const k=(I+R)/2;if(t.arc(o,a,f,I,k),t.arc(o,a,f,k,R),x>0){const P=Lr(T,R,o,a);t.arc(P.x,P.y,x,R,p+ye)}const C=Lr(j,p,o,a);if(t.lineTo(C.x,C.y),E>0){const P=Lr(j,w,o,a);t.arc(P.x,P.y,E,p+ye,w+Math.PI)}const M=(p-E/h+(m+b/h))/2;if(t.arc(o,a,h,p-E/h,M,!0),t.arc(o,a,h,M,m+b/h,!0),b>0){const P=Lr(A,V,o,a);t.arc(P.x,P.y,b,V+Math.PI,m-ye)}const S=Lr(O,m,o,a);if(t.lineTo(S.x,S.y),v>0){const P=Lr(O,I,o,a);t.arc(P.x,P.y,v,m-ye,I)}}else{t.moveTo(o,a);const k=Math.cos(I)*f+o,C=Math.sin(I)*f+a;t.lineTo(k,C);const M=Math.cos(R)*f+o,S=Math.sin(R)*f+a;t.lineTo(M,S)}t.closePath()}function XL(t,e,n,r,i){const{fullCircles:s,startAngle:o,circumference:a}=e;let l=e.endAngle;if(s){pl(t,e,n,r,l,i);for(let u=0;u<s;++u)t.fill();isNaN(a)||(l=o+(a%se||se))}return pl(t,e,n,r,l,i),t.fill(),l}function JL(t,e,n,r,i){const{fullCircles:s,startAngle:o,circumference:a,options:l}=e,{borderWidth:u,borderJoinStyle:c,borderDash:f,borderDashOffset:h}=l,d=l.borderAlign==="inner";if(!u)return;t.setLineDash(f||[]),t.lineDashOffset=h,d?(t.lineWidth=u*2,t.lineJoin=c||"round"):(t.lineWidth=u,t.lineJoin=c||"bevel");let g=e.endAngle;if(s){pl(t,e,n,r,g,i);for(let y=0;y<s;++y)t.stroke();isNaN(a)||(g=o+(a%se||se))}d&&GL(t,e,g),s||(pl(t,e,n,r,g,i),t.stroke())}class is extends Lt{constructor(n){super();L(this,"circumference");L(this,"endAngle");L(this,"fullCircles");L(this,"innerRadius");L(this,"outerRadius");L(this,"pixelMargin");L(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.getProps(["x","y"],i),{angle:o,distance:a}=$1(s,{x:n,y:r}),{startAngle:l,endAngle:u,innerRadius:c,outerRadius:f,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,y=B(h,u-l)>=se||Gs(o,l,u),_=sn(a,c+d,f+d);return y&&_}getCenterPoint(n){const{x:r,y:i,startAngle:s,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:c}=this.options,f=(s+o)/2,h=(a+l+c+u)/2;return{x:r+Math.cos(f)*h,y:i+Math.sin(f)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,s=(r.offset||0)/4,o=(r.spacing||0)/2,a=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>se?Math.floor(i/se):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*s,Math.sin(l)*s);const u=1-Math.sin(Math.min(oe,i||0)),c=s*u;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,XL(n,this,c,o,a),JL(n,this,c,o,a),n.restore()}}L(is,"id","arc"),L(is,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),L(is,"defaultRoutes",{backgroundColor:"backgroundColor"}),L(is,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function pb(t,e,n=e){t.lineCap=B(n.borderCapStyle,e.borderCapStyle),t.setLineDash(B(n.borderDash,e.borderDash)),t.lineDashOffset=B(n.borderDashOffset,e.borderDashOffset),t.lineJoin=B(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=B(n.borderWidth,e.borderWidth),t.strokeStyle=B(n.borderColor,e.borderColor)}function ZL(t,e,n){t.lineTo(n.x,n.y)}function eN(t){return t.stepped?wI:t.tension||t.cubicInterpolationMode==="monotone"?kI:ZL}function gb(t,e,n={}){const r=t.length,{start:i=0,end:s=r-1}=n,{start:o,end:a}=e,l=Math.max(i,o),u=Math.min(s,a),c=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:e.loop,ilen:u<l&&!c?r+u-l:u-l}}function tN(t,e,n,r){const{points:i,options:s}=e,{count:o,start:a,loop:l,ilen:u}=gb(i,n,r),c=eN(s);let{move:f=!0,reverse:h}=r||{},d,g,y;for(d=0;d<=u;++d)g=i[(a+(h?u-d:d))%o],!g.skip&&(f?(t.moveTo(g.x,g.y),f=!1):c(t,y,g,h,s.stepped),y=g);return l&&(g=i[(a+(h?u:0))%o],c(t,y,g,h,s.stepped)),!!l}function nN(t,e,n,r){const i=e.points,{count:s,start:o,ilen:a}=gb(i,n,r),{move:l=!0,reverse:u}=r||{};let c=0,f=0,h,d,g,y,_,m;const p=x=>(o+(u?a-x:x))%s,v=()=>{y!==_&&(t.lineTo(c,_),t.lineTo(c,y),t.lineTo(c,m))};for(l&&(d=i[p(0)],t.moveTo(d.x,d.y)),h=0;h<=a;++h){if(d=i[p(h)],d.skip)continue;const x=d.x,b=d.y,E=x|0;E===g?(b<y?y=b:b>_&&(_=b),c=(f*c+x)/++f):(v(),t.lineTo(x,b),g=E,f=0,y=_=b),m=b}v()}function Bf(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?nN:tN}function rN(t){return t.stepped?n$:t.tension||t.cubicInterpolationMode==="monotone"?r$:cr}function iN(t,e,n,r){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),pb(t,e.options),t.stroke(i)}function sN(t,e,n,r){const{segments:i,options:s}=e,o=Bf(e);for(const a of i)pb(t,s,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}const oN=typeof Path2D=="function";function aN(t,e,n,r){oN&&!e.options.segment?iN(t,e,n,r):sN(t,e,n,r)}class Dn extends Lt{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;GI(this._points,r,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=u$(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){const r=this.options,i=e[n],s=this.points,o=tb(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=rN(r);let u,c;for(u=0,c=o.length;u<c;++u){const{start:f,end:h}=o[u],d=s[f],g=s[h];if(d===g){a.push(d);continue}const y=Math.abs((i-d[n])/(g[n]-d[n])),_=l(d,g,y,r.stepped);_[n]=e[n],a.push(_)}return a.length===1?a[0]:a}pathSegment(e,n,r){return Bf(this)(e,this,n,r)}path(e,n,r){const i=this.segments,s=Bf(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)o&=s(e,this,a,{start:n,end:n+r-1});return!!o}draw(e,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),aN(e,this,r,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}L(Dn,"id","line"),L(Dn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),L(Dn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),L(Dn,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Ty(t,e,n,r){const i=t.options,{[n]:s}=t.getProps([n],r);return Math.abs(e-s)<i.radius+i.hitRadius}class Ca extends Lt{constructor(n){super();L(this,"parsed");L(this,"skip");L(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],i);return Math.pow(n-o,2)+Math.pow(r-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return Ty(this,n,"x",r)}inYRange(n,r){return Ty(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!an(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Ff(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}L(Ca,"id","point"),L(Ca,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),L(Ca,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function mb(t,e){const{x:n,y:r,base:i,width:s,height:o}=t.getProps(["x","y","base","width","height"],e);let a,l,u,c,f;return t.horizontal?(f=o/2,a=Math.min(n,i),l=Math.max(n,i),u=r-f,c=r+f):(f=s/2,a=n-f,l=n+f,u=Math.min(r,i),c=Math.max(r,i)),{left:a,top:u,right:l,bottom:c}}function Rn(t,e,n,r){return t?0:Me(e,n,r)}function lN(t,e,n){const r=t.options.borderWidth,i=t.borderSkipped,s=W1(r);return{t:Rn(i.top,s.top,0,n),r:Rn(i.right,s.right,0,e),b:Rn(i.bottom,s.bottom,0,n),l:Rn(i.left,s.left,0,e)}}function uN(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,s=yr(i),o=Math.min(e,n),a=t.borderSkipped,l=r||U(i);return{topLeft:Rn(!l||a.top||a.left,s.topLeft,0,o),topRight:Rn(!l||a.top||a.right,s.topRight,0,o),bottomLeft:Rn(!l||a.bottom||a.left,s.bottomLeft,0,o),bottomRight:Rn(!l||a.bottom||a.right,s.bottomRight,0,o)}}function cN(t){const e=mb(t),n=e.right-e.left,r=e.bottom-e.top,i=lN(t,n/2,r/2),s=uN(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:s},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function dc(t,e,n,r){const i=e===null,s=n===null,a=t&&!(i&&s)&&mb(t,r);return a&&(i||sn(e,a.left,a.right))&&(s||sn(n,a.top,a.bottom))}function fN(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function hN(t,e){t.rect(e.x,e.y,e.w,e.h)}function pc(t,e,n={}){const r=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-r,o=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+r,y:t.y+i,w:t.w+s,h:t.h+o,radius:t.radius}}class Ta extends Lt{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:s,outer:o}=cN(this),a=fN(o.radius)?Qs:hN;e.save(),(o.w!==s.w||o.h!==s.h)&&(e.beginPath(),a(e,pc(o,n,s)),e.clip(),a(e,pc(s,-n,o)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),a(e,pc(s,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,r){return dc(this,e,n,r)}inXRange(e,n){return dc(this,e,null,n)}inYRange(e,n){return dc(this,null,e,n)}getCenterPoint(e){const{x:n,y:r,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+i)/2:n,y:s?r:(r+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}L(Ta,"id","bar"),L(Ta,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),L(Ta,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var dN=Object.freeze({__proto__:null,ArcElement:is,BarElement:Ta,LineElement:Dn,PointElement:Ca});const Vf=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Dy=Vf.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function yb(t){return Vf[t%Vf.length]}function vb(t){return Dy[t%Dy.length]}function pN(t,e){return t.borderColor=yb(e),t.backgroundColor=vb(e),++e}function gN(t,e){return t.backgroundColor=t.data.map(()=>yb(e++)),e}function mN(t,e){return t.backgroundColor=t.data.map(()=>vb(e++)),e}function yN(t){let e=0;return(n,r)=>{const i=t.getDatasetMeta(r).controller;i instanceof Tn?e=gN(n,e):i instanceof ks?e=mN(n,e):i&&(e=pN(n,e))}}function Ry(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function vN(t){return t&&(t.borderColor||t.backgroundColor)}var _N={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=t.config,{elements:s}=i;if(!n.forceOverride&&(Ry(r)||vN(i)||s&&Ry(s)))return;const o=yN(t);r.forEach(o)}};function xN(t,e,n,r,i){const s=i.samples||r;if(s>=n)return t.slice(e,e+n);const o=[],a=(n-2)/(s-2);let l=0;const u=e+n-1;let c=e,f,h,d,g,y;for(o[l++]=t[c],f=0;f<s-2;f++){let _=0,m=0,p;const v=Math.floor((f+1)*a)+1+e,x=Math.min(Math.floor((f+2)*a)+1,n)+e,b=x-v;for(p=v;p<x;p++)_+=t[p].x,m+=t[p].y;_/=b,m/=b;const E=Math.floor(f*a)+1+e,O=Math.min(Math.floor((f+1)*a)+1,n)+e,{x:T,y:I}=t[c];for(d=g=-1,p=E;p<O;p++)g=.5*Math.abs((T-_)*(t[p].y-I)-(T-t[p].x)*(m-I)),g>d&&(d=g,h=t[p],y=p);o[l++]=h,c=y}return o[l++]=t[u],o}function bN(t,e,n,r){let i=0,s=0,o,a,l,u,c,f,h,d,g,y;const _=[],m=e+n-1,p=t[e].x,x=t[m].x-p;for(o=e;o<e+n;++o){a=t[o],l=(a.x-p)/x*r,u=a.y;const b=l|0;if(b===c)u<g?(g=u,f=o):u>y&&(y=u,h=o),i=(s*i+a.x)/++s;else{const E=o-1;if(!q(f)&&!q(h)){const O=Math.min(f,h),T=Math.max(f,h);O!==d&&O!==E&&_.push({...t[O],x:i}),T!==d&&T!==E&&_.push({...t[T],x:i})}o>0&&E!==d&&_.push(t[E]),_.push(a),c=b,s=0,g=y=u,f=h=d=o}}return _}function _b(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Ay(t){t.data.datasets.forEach(e=>{_b(e)})}function SN(t,e){const n=e.length;let r=0,i;const{iScale:s}=t,{min:o,max:a,minDefined:l,maxDefined:u}=s.getUserBounds();return l&&(r=Me(on(e,s.axis,o).lo,0,n-1)),u?i=Me(on(e,s.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var wN={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){Ay(t);return}const r=t.width;t.data.datasets.forEach((i,s)=>{const{_data:o,indexAxis:a}=i,l=t.getDatasetMeta(s),u=o||i.data;if(ns([a,t.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const c=t.scales[l.xAxisID];if(c.type!=="linear"&&c.type!=="time"||t.options.parsing)return;let{start:f,count:h}=SN(l,u);const d=n.threshold||4*r;if(h<=d){_b(i);return}q(o)&&(i._data=u,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let g;switch(n.algorithm){case"lttb":g=xN(u,f,h,r,n);break;case"min-max":g=bN(u,f,h,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=g})},destroy(t){Ay(t)}};function kN(t,e,n){const r=t.segments,i=t.points,s=e.points,o=[];for(const a of r){let{start:l,end:u}=a;u=Fd(l,u,i);const c=Uf(n,i[l],i[u],a.loop);if(!e.segments){o.push({source:a,target:c,start:i[l],end:i[u]});continue}const f=tb(e,c);for(const h of f){const d=Uf(n,s[h.start],s[h.end],h.loop),g=eb(a,i,d);for(const y of g)o.push({source:y,target:h,start:{[n]:Iy(c,d,"start",Math.max)},end:{[n]:Iy(c,d,"end",Math.min)}})}}return o}function Uf(t,e,n,r){if(r)return;let i=e[t],s=n[t];return t==="angle"&&(i=rt(i),s=rt(s)),{property:t,start:i,end:s}}function EN(t,e){const{x:n=null,y:r=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:o,end:a})=>{a=Fd(o,a,i);const l=i[o],u=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:u.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:u.y}))}),s}function Fd(t,e,n){for(;e>t;e--){const r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function Iy(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function xb(t,e){let n=[],r=!1;return re(t)?(r=!0,n=t):n=EN(t,e),n.length?new Dn({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function $y(t){return t&&t.fill!==!1}function MN(t,e,n){let i=t[e].fill;const s=[e];let o;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!pe(i))return i;if(o=t[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function PN(t,e,n){const r=DN(t);if(U(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return pe(i)&&Math.floor(i)===i?ON(r[0],e,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function ON(t,e,n,r){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?!1:n}function CN(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:U(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function TN(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:U(t)?r=t.value:r=e.getBaseValue(),r}function DN(t){const e=t.options,n=e.fill;let r=B(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function RN(t){const{scale:e,index:n,line:r}=t,i=[],s=r.segments,o=r.points,a=AN(e,n);a.push(xb({x:null,y:e.bottom},r));for(let l=0;l<s.length;l++){const u=s[l];for(let c=u.start;c<=u.end;c++)IN(i,o[c],a)}return new Dn({points:i,options:{}})}function AN(t,e){const n=[],r=t.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function IN(t,e,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=$N(s,e,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(t.push(l),!a)break}}t.push(...r)}function $N(t,e,n){const r=t.interpolate(e,n);if(!r)return{};const i=r[n],s=t.segments,o=t.points;let a=!1,l=!1;for(let u=0;u<s.length;u++){const c=s[u],f=o[c.start][n],h=o[c.end][n];if(sn(i,f,h)){a=i===f,l=i===h;break}}return{first:a,last:l,point:r}}class bb{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,r){const{x:i,y:s,radius:o}=this;return n=n||{start:0,end:se},e.arc(i,s,o,n.end,n.start,!0),!r.bounds}interpolate(e){const{x:n,y:r,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function LN(t){const{chart:e,fill:n,line:r}=t;if(pe(n))return NN(e,n);if(n==="stack")return RN(t);if(n==="shape")return!0;const i=FN(t);return i instanceof bb?i:xb(i,r)}function NN(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function FN(t){return(t.scale||{}).getPointPositionForValue?jN(t):zN(t)}function zN(t){const{scale:e={},fill:n}=t,r=CN(n,e);if(pe(r)){const i=e.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function jN(t){const{scale:e,fill:n}=t,r=e.options,i=e.getLabels().length,s=r.reverse?e.max:e.min,o=TN(n,e,s),a=[];if(r.grid.circular){const l=e.getPointPositionForValue(0,s);return new bb({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)a.push(e.getPointPositionForValue(l,o));return a}function gc(t,e,n){const r=LN(e),{line:i,scale:s,axis:o}=e,a=i.options,l=a.fill,u=a.backgroundColor,{above:c=u,below:f=u}=l||{};r&&i.points.length&&(Hl(t,n),BN(t,{line:i,target:r,above:c,below:f,area:n,scale:s,axis:o}),Yl(t))}function BN(t,e){const{line:n,target:r,above:i,below:s,area:o,scale:a}=e,l=n._loop?"angle":e.axis;t.save(),l==="x"&&s!==i&&(Ly(t,r,o.top),Ny(t,{line:n,target:r,color:i,scale:a,property:l}),t.restore(),t.save(),Ly(t,r,o.bottom)),Ny(t,{line:n,target:r,color:s,scale:a,property:l}),t.restore()}function Ly(t,e,n){const{segments:r,points:i}=e;let s=!0,o=!1;t.beginPath();for(const a of r){const{start:l,end:u}=a,c=i[l],f=i[Fd(l,u,i)];s?(t.moveTo(c.x,c.y),s=!1):(t.lineTo(c.x,n),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Ny(t,e){const{line:n,target:r,property:i,color:s,scale:o}=e,a=kN(n,r,i);for(const{source:l,target:u,start:c,end:f}of a){const{style:{backgroundColor:h=s}={}}=l,d=r!==!0;t.save(),t.fillStyle=h,VN(t,o,d&&Uf(i,c,f)),t.beginPath();const g=!!n.pathSegment(t,l);let y;if(d){g?t.closePath():Fy(t,r,f,i);const _=!!r.pathSegment(t,u,{move:g,reverse:!0});y=g&&_,y||Fy(t,r,c,i)}t.closePath(),t.fill(y?"evenodd":"nonzero"),t.restore()}}function VN(t,e,n){const{top:r,bottom:i}=e.chart.chartArea,{property:s,start:o,end:a}=n||{};s==="x"&&(t.beginPath(),t.rect(o,r,a-o,i-r),t.clip())}function Fy(t,e,n,r){const i=e.interpolate(n,r);i&&t.lineTo(i.x,i.y)}var UN={id:"filler",afterDatasetsUpdate(t,e,n){const r=(t.data.datasets||[]).length,i=[];let s,o,a,l;for(o=0;o<r;++o)s=t.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof Dn&&(l={visible:t.isDatasetVisible(o),index:o,fill:PN(a,o,r),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,i.push(l);for(o=0;o<r;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=MN(i,o,n.propagate))},beforeDraw(t,e,n){const r=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let o=i.length-1;o>=0;--o){const a=i[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),r&&a.fill&&gc(t.ctx,a,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=t.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;$y(s)&&gc(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const r=e.meta.$filler;!$y(r)||n.drawTime!=="beforeDatasetDraw"||gc(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const zy=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},WN=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class jy extends Lt{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=J(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,i)=>e.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const r=e.labels,i=we(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=zy(r,s);let u,c;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,s,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,i,a,l)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=i+a;let f=e;s.textAlign="left",s.textBaseline="middle";let h=-1,d=-c;return this.legendItems.forEach((g,y)=>{const _=r+n/2+s.measureText(g.text).width;(y===0||u[u.length-1]+_+2*a>o)&&(f+=c,u[u.length-(y>0?0:1)]=0,d+=c,h++),l[y]={left:0,top:d,row:h,width:_,height:i},u[u.length-1]+=_+a}),f}_fitCols(e,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-e;let f=a,h=0,d=0,g=0,y=0;return this.legendItems.forEach((_,m)=>{const{itemWidth:p,itemHeight:v}=HN(r,n,s,_,i);m>0&&d+v+2*a>c&&(f+=h+a,u.push({width:h,height:d}),g+=h+a,y++,h=d=0),l[m]={left:g,top:d,col:y,width:p,height:v},h=Math.max(h,p),d+=v+a}),f+=h,u.push({width:h,height:d}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,o=ci(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=$e(r,this.left+i,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=$e(r,this.left+i,this.right-this.lineWidths[a])),u.top+=this.top+e+i,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+i}else{let a=0,l=$e(r,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=$e(r,this.top+e+i,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+i,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Hl(e,this),this._draw(),Yl(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=e,a=ge.color,l=ci(e.rtl,this.left,this.width),u=we(o.font),{padding:c}=o,f=u.size,h=f/2;let d;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:g,boxHeight:y,itemHeight:_}=zy(o,f),m=function(E,O,T){if(isNaN(g)||g<=0||isNaN(y)||y<0)return;i.save();const I=B(T.lineWidth,1);if(i.fillStyle=B(T.fillStyle,a),i.lineCap=B(T.lineCap,"butt"),i.lineDashOffset=B(T.lineDashOffset,0),i.lineJoin=B(T.lineJoin,"miter"),i.lineWidth=I,i.strokeStyle=B(T.strokeStyle,a),i.setLineDash(B(T.lineDash,[])),o.usePointStyle){const R={radius:y*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:I},A=l.xPlus(E,g/2),j=O+h;U1(i,R,A,j,o.pointStyleWidth&&g)}else{const R=O+Math.max((f-y)/2,0),A=l.leftForLtr(E,g),j=yr(T.borderRadius);i.beginPath(),Object.values(j).some(V=>V!==0)?Qs(i,{x:A,y:R,w:g,h:y,radius:j}):i.rect(A,R,g,y),i.fill(),I!==0&&i.stroke()}i.restore()},p=function(E,O,T){Mr(i,T.text,E,O+_/2,u,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},v=this.isHorizontal(),x=this._computeTitleHeight();v?d={x:$e(s,this.left+c,this.right-r[0]),y:this.top+c+x,line:0}:d={x:this.left+c,y:$e(s,this.top+x+c,this.bottom-n[0].height),line:0},X1(this.ctx,e.textDirection);const b=_+c;this.legendItems.forEach((E,O)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const T=i.measureText(E.text).width,I=l.textAlign(E.textAlign||(E.textAlign=o.textAlign)),R=g+h+T;let A=d.x,j=d.y;l.setWidth(this.width),v?O>0&&A+R+c>this.right&&(j=d.y+=b,d.line++,A=d.x=$e(s,this.left+c,this.right-r[d.line])):O>0&&j+b>this.bottom&&(A=d.x=A+n[d.line].width+c,d.line++,j=d.y=$e(s,this.top+x+c,this.bottom-n[d.line].height));const V=l.x(A);if(m(V,j,E),A=hI(I,A+g+h,v?A+R:this.right,e.rtl),p(l.x(A),j,E),v)d.x+=R+c;else if(typeof E.text!="string"){const w=u.lineHeight;d.y+=Sb(E,w)+c}else d.y+=b}),J1(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,r=we(n.font),i=ze(n.padding);if(!n.display)return;const s=ci(e.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,u=i.top+l;let c,f=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+u,f=$e(e.align,f,this.right-h);else{const g=this.columnSizes.reduce((y,_)=>Math.max(y,_.height),0);c=u+$e(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}const d=$e(a,f,f+h);o.textAlign=s.textAlign(Cd(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Mr(o,n.text,d,c,r)}_computeTitleHeight(){const e=this.options.title,n=we(e.font),r=ze(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,i,s;if(sn(e,this.left,this.right)&&sn(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],sn(e,i.left,i.left+i.width)&&sn(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(e){const n=this.options;if(!GN(e.type,n))return;const r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=WN(i,r);i&&!s&&J(n.onLeave,[e,i,this],this),this._hoveredItem=r,r&&!s&&J(n.onHover,[e,r,this],this)}else r&&J(n.onClick,[e,r,this],this)}}function HN(t,e,n,r,i){const s=YN(r,t,e,n),o=qN(i,r,e.lineHeight);return{itemWidth:s,itemHeight:o}}function YN(t,e,n,r){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,o)=>s.length>o.length?s:o)),e+n.size/2+r.measureText(i).width}function qN(t,e,n){let r=t;return typeof e.text!="string"&&(r=Sb(e,n)),r}function Sb(t,e){const n=t.text?t.text.length:0;return e*n}function GN(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var QN={id:"legend",_element:jy,start(t,e,n){const r=t.legend=new jy({ctx:t.ctx,options:n,chart:t});Ne.configure(t,r,n),Ne.addBox(t,r)},stop(t){Ne.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const r=t.legend;Ne.configure(t,r,n),r.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const r=e.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),e.hidden=!0):(i.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=ze(u.borderWidth);return{text:e[l.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:o&&(a||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class zd extends Lt{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=re(r.text)?r.text.length:1;this._padding=ze(r.padding);const s=i*we(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:r,bottom:i,right:s,options:o}=this,a=o.align;let l=0,u,c,f;return this.isHorizontal()?(c=$e(a,r,s),f=n+e,u=s-r):(o.position==="left"?(c=r+e,f=$e(a,i,n),l=oe*-.5):(c=s-e,f=$e(a,n,i),l=oe*.5),u=i-n),{titleX:c,titleY:f,maxWidth:u,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const r=we(n.font),s=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(s);Mr(e,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:Cd(n.align),textBaseline:"middle",translation:[o,a]})}}function KN(t,e){const n=new zd({ctx:t.ctx,options:e,chart:t});Ne.configure(t,n,e),Ne.addBox(t,n),t.titleBlock=n}var XN={id:"title",_element:zd,start(t,e,n){KN(t,n)},stop(t){const e=t.titleBlock;Ne.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const r=t.titleBlock;Ne.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ta=new WeakMap;var JN={id:"subtitle",start(t,e,n){const r=new zd({ctx:t.ctx,options:n,chart:t});Ne.configure(t,r,n),Ne.addBox(t,r),ta.set(t,r)},stop(t){Ne.removeBox(t,ta.get(t)),ta.delete(t)},beforeUpdate(t,e,n){const r=ta.get(t);Ne.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ss={average(t){if(!t.length)return!1;let e,n,r=new Set,i=0,s=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),i+=l.y,++s}}return{x:[...r].reduce((a,l)=>a+l)/r.size,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,r=e.y,i=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=t.length;s<o;++s){const l=t[s].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=Lf(e,u);c<i&&(i=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function zt(t,e){return e&&(re(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Xt(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
56
- `)>-1?t.split(`
57
- `):t}function ZN(t,e){const{element:n,datasetIndex:r,index:i}=e,s=t.getDatasetMeta(r).controller,{label:o,value:a}=s.getLabelAndValue(i);return{chart:t,label:o,parsed:s.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function By(t,e){const n=t.chart.ctx,{body:r,footer:i,title:s}=t,{boxWidth:o,boxHeight:a}=e,l=we(e.bodyFont),u=we(e.titleFont),c=we(e.footerFont),f=s.length,h=i.length,d=r.length,g=ze(e.padding);let y=g.height,_=0,m=r.reduce((x,b)=>x+b.before.length+b.lines.length+b.after.length,0);if(m+=t.beforeBody.length+t.afterBody.length,f&&(y+=f*u.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),m){const x=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;y+=d*x+(m-d)*l.lineHeight+(m-1)*e.bodySpacing}h&&(y+=e.footerMarginTop+h*c.lineHeight+(h-1)*e.footerSpacing);let p=0;const v=function(x){_=Math.max(_,n.measureText(x).width+p)};return n.save(),n.font=u.string,Q(t.title,v),n.font=l.string,Q(t.beforeBody.concat(t.afterBody),v),p=e.displayColors?o+2+e.boxPadding:0,Q(r,x=>{Q(x.before,v),Q(x.lines,v),Q(x.after,v)}),p=0,n.font=c.string,Q(t.footer,v),n.restore(),_+=g.width,{width:_,height:y}}function eF(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function tF(t,e,n,r){const{x:i,width:s}=r,o=n.caretSize+n.caretPadding;if(t==="left"&&i+s+o>e.width||t==="right"&&i-s-o<0)return!0}function nF(t,e,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=t;let u="center";return r==="center"?u=i<=(a+l)/2?"left":"right":i<=s/2?u="left":i>=o-s/2&&(u="right"),tF(u,t,e,n)&&(u="center"),u}function Vy(t,e,n){const r=n.yAlign||e.yAlign||eF(t,n);return{xAlign:n.xAlign||e.xAlign||nF(t,e,n,r),yAlign:r}}function rF(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function iF(t,e,n){let{y:r,height:i}=t;return e==="top"?r+=n:e==="bottom"?r-=i+n:r-=i/2,r}function Uy(t,e,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,u=i+s,{topLeft:c,topRight:f,bottomLeft:h,bottomRight:d}=yr(o);let g=rF(e,a);const y=iF(e,l,u);return l==="center"?a==="left"?g+=u:a==="right"&&(g-=u):a==="left"?g-=Math.max(c,h)+i:a==="right"&&(g+=Math.max(f,d)+i),{x:Me(g,0,r.width-e.width),y:Me(y,0,r.height-e.height)}}function na(t,e,n){const r=ze(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function Wy(t){return zt([],Xt(t))}function sF(t,e,n){return Jn(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Hy(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const wb={beforeTitle:Qt,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Qt,beforeBody:Qt,beforeLabel:Qt,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return q(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Qt,afterBody:Qt,beforeFooter:Qt,footer:Qt,afterFooter:Qt};function Ye(t,e,n,r){const i=t[e].call(n,r);return typeof i>"u"?wb[e].call(n,r):i}class Wf extends Lt{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,s=new nb(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=sF(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,i=Ye(r,"beforeTitle",this,e),s=Ye(r,"title",this,e),o=Ye(r,"afterTitle",this,e);let a=[];return a=zt(a,Xt(i)),a=zt(a,Xt(s)),a=zt(a,Xt(o)),a}getBeforeBody(e,n){return Wy(Ye(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,i=[];return Q(e,s=>{const o={before:[],lines:[],after:[]},a=Hy(r,s);zt(o.before,Xt(Ye(a,"beforeLabel",this,s))),zt(o.lines,Ye(a,"label",this,s)),zt(o.after,Xt(Ye(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(e,n){return Wy(Ye(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,i=Ye(r,"beforeFooter",this,e),s=Ye(r,"footer",this,e),o=Ye(r,"afterFooter",this,e);let a=[];return a=zt(a,Xt(i)),a=zt(a,Xt(s)),a=zt(a,Xt(o)),a}_createItems(e){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(ZN(this.chart,n[l]));return e.filter&&(a=a.filter((c,f,h)=>e.filter(c,f,h,r))),e.itemSort&&(a=a.sort((c,f)=>e.itemSort(c,f,r))),Q(a,c=>{const f=Hy(e.callbacks,c);i.push(Ye(f,"labelColor",this,c)),s.push(Ye(f,"labelPointStyle",this,c)),o.push(Ye(f,"labelTextColor",this,c))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const r=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=ss[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=By(this,r),u=Object.assign({},a,l),c=Vy(this.chart,r,u),f=Uy(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,s={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,i){const s=this.getCaretPosition(e,r,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,r){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:f}=yr(a),{x:h,y:d}=e,{width:g,height:y}=n;let _,m,p,v,x,b;return s==="center"?(x=d+y/2,i==="left"?(_=h,m=_-o,v=x+o,b=x-o):(_=h+g,m=_+o,v=x-o,b=x+o),p=_):(i==="left"?m=h+Math.max(l,c)+o:i==="right"?m=h+g-Math.max(u,f)-o:m=this.caretX,s==="top"?(v=d,x=v-o,_=m-o,p=m+o):(v=d+y,x=v+o,_=m+o,p=m-o),b=v),{x1:_,x2:m,x3:p,y1:v,y2:x,y3:b}}drawTitle(e,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const u=ci(r.rtl,this.x,this.width);for(e.x=na(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=we(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+a,l+1===s&&(e.y+=r.titleMarginBottom-a)}}_drawColorBox(e,n,r,i,s){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=s,c=we(s.bodyFont),f=na(this,"left",s),h=i.x(f),d=l<c.lineHeight?(c.lineHeight-l)/2:0,g=n.y+d;if(s.usePointStyle){const y={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},_=i.leftForLtr(h,u)+u/2,m=g+l/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,Ff(e,y,_,m),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,Ff(e,y,_,m)}else{e.lineWidth=U(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const y=i.leftForLtr(h,u),_=i.leftForLtr(i.xPlus(h,1),u-2),m=yr(o.borderRadius);Object.values(m).some(p=>p!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,Qs(e,{x:y,y:g,w:u,h:l,radius:m}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Qs(e,{x:_,y:g+1,w:u-2,h:l-2,radius:m}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(y,g,u,l),e.strokeRect(y,g,u,l),e.fillStyle=o.backgroundColor,e.fillRect(_,g+1,u-2,l-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=r,f=we(r.bodyFont);let h=f.lineHeight,d=0;const g=ci(r.rtl,this.x,this.width),y=function(T){n.fillText(T,g.x(e.x+d),e.y+h/2),e.y+=h+s},_=g.textAlign(o);let m,p,v,x,b,E,O;for(n.textAlign=o,n.textBaseline="middle",n.font=f.string,e.x=na(this,_,r),n.fillStyle=r.bodyColor,Q(this.beforeBody,y),d=a&&_!=="right"?o==="center"?u/2+c:u+2+c:0,x=0,E=i.length;x<E;++x){for(m=i[x],p=this.labelTextColors[x],n.fillStyle=p,Q(m.before,y),v=m.lines,a&&v.length&&(this._drawColorBox(n,e,x,g,r),h=Math.max(f.lineHeight,l)),b=0,O=v.length;b<O;++b)y(v[b]),h=f.lineHeight;Q(m.after,y)}d=0,h=f.lineHeight,Q(this.afterBody,y),e.y-=s}drawFooter(e,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=ci(r.rtl,this.x,this.width);for(e.x=na(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=we(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(i[a],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+r.footerSpacing}}drawBackground(e,n,r,i){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=e,{width:u,height:c}=r,{topLeft:f,topRight:h,bottomLeft:d,bottomRight:g}=yr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+f,l),o==="top"&&this.drawCaret(e,n,r,i),n.lineTo(a+u-h,l),n.quadraticCurveTo(a+u,l,a+u,l+h),o==="center"&&s==="right"&&this.drawCaret(e,n,r,i),n.lineTo(a+u,l+c-g),n.quadraticCurveTo(a+u,l+c,a+u-g,l+c),o==="bottom"&&this.drawCaret(e,n,r,i),n.lineTo(a+d,l+c),n.quadraticCurveTo(a,l+c,a,l+c-d),o==="center"&&s==="left"&&this.drawCaret(e,n,r,i),n.lineTo(a,l+f),n.quadraticCurveTo(a,l,a+f,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const o=ss[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=By(this,e),l=Object.assign({},o,this._size),u=Vy(n,e,l),c=Uy(e,l,u,n);(i._to!==c.x||s._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=ze(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=r,this.drawBackground(s,e,i,n),X1(e,n.textDirection),s.y+=o.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),J1(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,i=e.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),s=!al(r,i),o=this._positionChanged(i,n);(s||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(e,s,n,r),a=this._positionChanged(o,e),l=n||!al(o,s)||a;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,r,i){const s=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,s.mode,s,r);return s.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:r,caretY:i,options:s}=this,o=ss[s.position].call(this,e,n);return o!==!1&&(r!==o.x||i!==o.y)}}L(Wf,"positioners",ss);var oF={id:"tooltip",_element:Wf,positioners:ss,afterInit(t,e,n){n&&(t.tooltip=new Wf({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:wb},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},aF=Object.freeze({__proto__:null,Colors:_N,Decimation:wN,Filler:UN,Legend:QN,SubTitle:JN,Title:XN,Tooltip:oF});const lF=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function uF(t,e,n,r){const i=t.indexOf(e);if(i===-1)return lF(t,e,n,r);const s=t.lastIndexOf(e);return i!==s?n:i}const cF=(t,e)=>t===null?null:Me(Math.round(t),0,e);function Yy(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Hf extends Dr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:s}of n)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(q(e))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:uF(r,e,B(n,e),this._addedLabels),cF(n,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const e=this.min,n=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=e;o<=n;o++)i.push({value:o});return i}getLabelForValue(e){return Yy.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}L(Hf,"id","category"),L(Hf,"defaults",{ticks:{callback:Yy}});function fF(t,e){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:f,includeBounds:h}=t,d=s||1,g=c-1,{min:y,max:_}=e,m=!q(o),p=!q(a),v=!q(u),x=(_-y)/(f+1);let b=jm((_-y)/g/d)*d,E,O,T,I;if(b<1e-14&&!m&&!p)return[{value:y},{value:_}];I=Math.ceil(_/b)-Math.floor(y/b),I>g&&(b=jm(I*b/g/d)*d),q(l)||(E=Math.pow(10,l),b=Math.ceil(b*E)/E),i==="ticks"?(O=Math.floor(y/b)*b,T=Math.ceil(_/b)*b):(O=y,T=_),m&&p&&s&&sI((a-o)/s,b/1e3)?(I=Math.round(Math.min((a-o)/b,c)),b=(a-o)/I,O=o,T=a):v?(O=m?o:O,T=p?a:T,I=u-1,b=(T-O)/I):(I=(T-O)/b,_s(I,Math.round(I),b/1e3)?I=Math.round(I):I=Math.ceil(I));const R=Math.max(Bm(b),Bm(O));E=Math.pow(10,q(l)?R:l),O=Math.round(O*E)/E,T=Math.round(T*E)/E;let A=0;for(m&&(h&&O!==o?(n.push({value:o}),O<o&&A++,_s(Math.round((O+A*b)*E)/E,o,qy(o,x,t))&&A++):O<o&&A++);A<I;++A){const j=Math.round((O+A*b)*E)/E;if(p&&j>a)break;n.push({value:j})}return p&&h&&T!==a?n.length&&_s(n[n.length-1].value,a,qy(a,x,t))?n[n.length-1].value=a:n.push({value:a}):(!p||T===a)&&n.push({value:T}),n}function qy(t,e,{horizontal:n,minRotation:r}){const i=Dt(r),s=(n?Math.sin(i):Math.cos(i))||.001,o=.75*e*(""+t).length;return Math.min(e/s,o)}class gl extends Dr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return q(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const o=l=>i=n?i:l,a=l=>s=r?s:l;if(e){const l=Ht(i),u=Ht(s);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(i===s){let l=s===0?1:Math.abs(s*.05);a(s+l),e||o(i-l)}this.min=i,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=fF(i,s);return e.bounds==="ticks"&&I1(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const i=(r-n)/Math.max(e.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return co(e,this.chart.options.locale,this.options.ticks.format)}}class Yf extends gl{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=pe(e)?e:0,this.max=pe(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=Dt(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}L(Yf,"id","linear"),L(Yf,"defaults",{ticks:{callback:Wl.formatters.numeric}});const Xs=t=>Math.floor(Cn(t)),ir=(t,e)=>Math.pow(10,Xs(t)+e);function Gy(t){return t/Math.pow(10,Xs(t))===1}function Qy(t,e,n){const r=Math.pow(10,n),i=Math.floor(t/r);return Math.ceil(e/r)-i}function hF(t,e){const n=e-t;let r=Xs(n);for(;Qy(t,e,r)>10;)r++;for(;Qy(t,e,r)<10;)r--;return Math.min(r,Xs(t))}function dF(t,{min:e,max:n}){e=tt(t.min,e);const r=[],i=Xs(e);let s=hF(e,n),o=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),l=i>s?Math.pow(10,i):0,u=Math.round((e-l)*o)/o,c=Math.floor((e-l)/a/10)*a*10;let f=Math.floor((u-c)/Math.pow(10,s)),h=tt(t.min,Math.round((l+c+f*Math.pow(10,s))*o)/o);for(;h<n;)r.push({value:h,major:Gy(h),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,o=s>=0?1:o),h=Math.round((l+c+f*Math.pow(10,s))*o)/o;const d=tt(t.max,h);return r.push({value:d,major:Gy(d),significand:f}),r}class qf extends Dr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const r=gl.prototype.parse.apply(this,[e,n]);if(r===0){this._zero=!0;return}return pe(r)&&r>0?r:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=pe(e)?Math.max(0,e):null,this.max=pe(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!pe(this._userMin)&&(this.min=e===ir(this.min,0)?ir(this.min,-1):ir(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const s=a=>r=e?r:a,o=a=>i=n?i:a;r===i&&(r<=0?(s(1),o(10)):(s(ir(r,-1)),o(ir(i,1)))),r<=0&&s(ir(i,-1)),i<=0&&o(ir(r,1)),this.min=r,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},r=dF(n,this);return e.bounds==="ticks"&&I1(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(e){return e===void 0?"0":co(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Cn(e),this._valueRange=Cn(this.max)-Cn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Cn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}L(qf,"id","logarithmic"),L(qf,"defaults",{ticks:{callback:Wl.formatters.logarithmic,major:{enabled:!0}}});function Gf(t){const e=t.ticks;if(e.display&&t.display){const n=ze(e.backdropPadding);return B(e.font&&e.font.size,ge.font.size)+n.height}return 0}function pF(t,e,n){return n=re(n)?n:[n],{w:SI(t,e.string,n),h:n.length*e.lineHeight}}function Ky(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:t<r||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function gF(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],i=[],s=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?oe/s:0;for(let l=0;l<s;l++){const u=o.setContext(t.getPointLabelContext(l));i[l]=u.padding;const c=t.getPointPosition(l,t.drawingArea+i[l],a),f=we(u.font),h=pF(t.ctx,f,t._pointLabels[l]);r[l]=h;const d=rt(t.getIndexAngle(l)+a),g=Math.round(Pd(d)),y=Ky(g,c.x,h.w,0,180),_=Ky(g,c.y,h.h,90,270);mF(n,e,d,y,_)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=_F(t,r,i)}function mF(t,e,n,r,i){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;r.start<e.l?(a=(e.l-r.start)/s,t.l=Math.min(t.l,e.l-a)):r.end>e.r&&(a=(r.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),i.start<e.t?(l=(e.t-i.start)/o,t.t=Math.min(t.t,e.t-l)):i.end>e.b&&(l=(i.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function yF(t,e,n){const r=t.drawingArea,{extra:i,additionalAngle:s,padding:o,size:a}=n,l=t.getPointPosition(e,r+i+o,s),u=Math.round(Pd(rt(l.angle+ye))),c=SF(l.y,a.h,u),f=xF(u),h=bF(l.x,a.w,f);return{visible:!0,x:l.x,y:c,textAlign:f,left:h,top:c,right:h+a.w,bottom:c+a.h}}function vF(t,e){if(!e)return!0;const{left:n,top:r,right:i,bottom:s}=t;return!(an({x:n,y:r},e)||an({x:n,y:s},e)||an({x:i,y:r},e)||an({x:i,y:s},e))}function _F(t,e,n){const r=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:Gf(s)/2,additionalAngle:o?oe/i:0};let u;for(let c=0;c<i;c++){l.padding=n[c],l.size=e[c];const f=yF(t,c,l);r.push(f),a==="auto"&&(f.visible=vF(f,u),f.visible&&(u=f))}return r}function xF(t){return t===0||t===180?"center":t<180?"left":"right"}function bF(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function SF(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function wF(t,e,n){const{left:r,top:i,right:s,bottom:o}=n,{backdropColor:a}=e;if(!q(a)){const l=yr(e.borderRadius),u=ze(e.backdropPadding);t.fillStyle=a;const c=r-u.left,f=i-u.top,h=s-r+u.width,d=o-i+u.height;Object.values(l).some(g=>g!==0)?(t.beginPath(),Qs(t,{x:c,y:f,w:h,h:d,radius:l}),t.fill()):t.fillRect(c,f,h,d)}}function kF(t,e){const{ctx:n,options:{pointLabels:r}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const o=r.setContext(t.getPointLabelContext(i));wF(n,o,s);const a=we(o.font),{x:l,y:u,textAlign:c}=s;Mr(n,t._pointLabels[i],l,u+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function kb(t,e,n,r){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,se);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let o=1;o<r;o++)s=t.getPointPosition(o,e),i.lineTo(s.x,s.y)}}function EF(t,e,n,r,i){const s=t.ctx,o=e.circular,{color:a,lineWidth:l}=e;!o&&!r||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(i.dash),s.lineDashOffset=i.dashOffset,s.beginPath(),kb(t,n,o,r),s.closePath(),s.stroke(),s.restore())}function MF(t,e,n){return Jn(t,{label:n,index:e,type:"pointLabel"})}class os extends gl{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=ze(Gf(this.options)/2),n=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=pe(e)&&!isNaN(e)?e:0,this.max=pe(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Gf(this.options))}generateTickLabels(e){gl.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,r)=>{const i=J(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const e=this.options;e.display&&e.pointLabels.display?gF(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,r,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,r,i))}getIndexAngle(e){const n=se/(this._pointLabels.length||1),r=this.options.startAngle||0;return rt(e*n+Dt(r))}getDistanceFromCenterForValue(e){if(q(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(q(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const r=n[e];return MF(this.getContext(),e,r)}}getPointPosition(e,n,r=0){const i=this.getIndexAngle(e)-ye+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:r,right:i,bottom:s}=this._pointLabelItems[e];return{left:n,top:r,right:i,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const r=this.ctx;r.save(),r.beginPath(),kb(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=e,r.fill(),r.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:r,grid:i,border:s}=n,o=this._pointLabels.length;let a,l,u;if(n.pointLabels.display&&kF(this,o),i.display&&this.ticks.forEach((c,f)=>{if(f!==0||f===0&&this.min<0){l=this.getDistanceFromCenterForValue(c.value);const h=this.getContext(f),d=i.setContext(h),g=s.setContext(h);EF(this,d,l,o,g)}}),r.display){for(e.save(),a=o-1;a>=0;a--){const c=r.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:h}=c;!h||!f||(e.lineWidth=h,e.strokeStyle=f,e.setLineDash(c.borderDash),e.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let s,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const u=r.setContext(this.getContext(l)),c=we(u.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){e.font=c.string,o=e.measureText(a.label).width,e.fillStyle=u.backdropColor;const f=ze(u.backdropPadding);e.fillRect(-o/2-f.left,-s-c.size/2-f.top,o+f.width,c.size+f.height)}Mr(e,a.label,0,-s,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),e.restore()}drawTitle(){}}L(os,"id","radialLinear"),L(os,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Wl.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),L(os,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),L(os,"descriptors",{angleLines:{_fallback:"grid"}});const Ql={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Qe=Object.keys(Ql);function Xy(t,e){return t-e}function Jy(t,e){if(q(e))return null;const n=t._adapter,{parser:r,round:i,isoWeekday:s}=t._parseOpts;let o=e;return typeof r=="function"&&(o=r(o)),pe(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(Si(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function Zy(t,e,n,r){const i=Qe.length;for(let s=Qe.indexOf(t);s<i-1;++s){const o=Ql[Qe[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(a*o.size))<=r)return Qe[s]}return Qe[i-1]}function PF(t,e,n,r,i){for(let s=Qe.length-1;s>=Qe.indexOf(n);s--){const o=Qe[s];if(Ql[o].common&&t._adapter.diff(i,r,o)>=e-1)return o}return Qe[n?Qe.indexOf(n):0]}function OF(t){for(let e=Qe.indexOf(t)+1,n=Qe.length;e<n;++e)if(Ql[Qe[e]].common)return Qe[e]}function ev(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:r,hi:i}=Od(n,e),s=n[r]>=e?n[r]:n[i];t[s]=!0}}function CF(t,e,n,r){const i=t._adapter,s=+i.startOf(e[0].value,r),o=e[e.length-1].value;let a,l;for(a=s;a<=o;a=+i.add(a,1,r))l=n[a],l>=0&&(e[l].major=!0);return e}function tv(t,e,n){const r=[],i={},s=e.length;let o,a;for(o=0;o<s;++o)a=e[o],i[a]=o,r.push({value:a,major:!1});return s===0||!n?r:CF(t,r,i,n)}class Js extends Dr{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const r=e.time||(e.time={}),i=this._adapter=new F$._date(e.adapters.date);i.init(n),vs(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Jy(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,r=e.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!a&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=pe(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=pe(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){const e=this.options,n=e.time,r=e.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,o=this.max,a=uI(i,s,o);return this._unit=n.unit||(r.autoSkip?Zy(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):PF(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:OF(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),tv(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?r=s:r=(s-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Me(n,0,o),r=Me(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,i=this.options,s=i.time,o=s.unit||Zy(s.minUnit,n,r,this._getLabelCapacity(n)),a=B(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=Si(l)||l===!0,c={};let f=n,h,d;if(u&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,u?"day":o),e.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(h=f,d=0;h<r;h=+e.add(h,a,o),d++)ev(c,h,g);return(h===r||i.bounds==="ticks"||d===1)&&ev(c,h,g),Object.keys(c).sort(Xy).map(y=>+y)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,s=this._unit,o=n||i[s];return this._adapter.format(e,o)}_tickFormatFunction(e,n,r,i){const s=this.options,o=s.ticks.callback;if(o)return J(o,[e,n,r],this);const a=s.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],f=u&&a[u],h=r[n],d=u&&f&&h&&h.major;return this._adapter.format(e,i||(d?f:c))}generateTickLabels(e){let n,r,i;for(n=0,r=e.length;n<r;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,r=this.ctx.measureText(e).width,i=Dt(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*s+a*o,h:r*o+a*s}}_getLabelCapacity(e){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,s=this._tickFormatFunction(e,0,tv(this,[e],this._majorUnit),i),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,r;if(e.length)return e;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)e.push(Jy(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return N1(e.sort(Xy))}}L(Js,"id","time"),L(Js,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ra(t,e,n){let r=0,i=t.length-1,s,o,a,l;n?(e>=t[r].pos&&e<=t[i].pos&&({lo:r,hi:i}=on(t,"pos",e)),{pos:s,time:a}=t[r],{pos:o,time:l}=t[i]):(e>=t[r].time&&e<=t[i].time&&({lo:r,hi:i}=on(t,"time",e)),{time:s,pos:a}=t[r],{time:o,pos:l}=t[i]);const u=o-s;return u?a+(l-a)*(e-s)/u:a}class Qf extends Js{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=ra(n,this.min),this._tableRange=ra(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,i=[],s=[];let o,a,l,u,c;for(o=0,a=e.length;o<a;++o)u=e[o],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)c=i[o+1],l=i[o-1],u=i[o],Math.round((c+l)/2)!==u&&s.push({time:u,pos:o/(a-1)});return s}_generate(){const e=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(ra(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return ra(this._table,r*this._tableRange+this._minPos,!0)}}L(Qf,"id","timeseries"),L(Qf,"defaults",Js.defaults);var TF=Object.freeze({__proto__:null,CategoryScale:Hf,LinearScale:Yf,LogarithmicScale:qf,RadialLinearScale:os,TimeScale:Js,TimeSeriesScale:Qf});const DF=[N$,dN,aF,TF];Gl.register(...DF);const Eb="label";function nv(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function RF(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function Mb(t,e){t.labels=e}function Pb(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Eb;const r=[];t.datasets=e.map(i=>{const s=t.datasets.find(o=>o[n]===i[n]);return!s||!i.data||r.includes(s)?{...i}:(r.push(s),Object.assign(s,i),s)})}function AF(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Eb;const n={labels:[],datasets:[]};return Mb(n,t.labels),Pb(n,t.datasets,e),n}function IF(t,e){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:u=[],fallbackContent:c,updateMode:f,...h}=t,d=ne.useRef(null),g=ne.useRef(),y=()=>{d.current&&(g.current=new Gl(d.current,{type:o,data:AF(a,s),options:l&&{...l},plugins:u}),nv(e,g.current))},_=()=>{nv(e,null),g.current&&(g.current.destroy(),g.current=null)};return ne.useEffect(()=>{!i&&g.current&&l&&RF(g.current,l)},[i,l]),ne.useEffect(()=>{!i&&g.current&&Mb(g.current.config.data,a.labels)},[i,a.labels]),ne.useEffect(()=>{!i&&g.current&&a.datasets&&Pb(g.current.config.data,a.datasets,s)},[i,a.datasets]),ne.useEffect(()=>{g.current&&(i?(_(),setTimeout(y)):g.current.update(f))},[i,l,a.labels,a.datasets,f]),ne.useEffect(()=>{g.current&&(_(),setTimeout(y))},[o]),ne.useEffect(()=>(y(),()=>_()),[]),_r.createElement("canvas",Object.assign({ref:d,role:"img",height:n,width:r},h),c)}const $F=ne.forwardRef(IF);function Kl(t,e){return Gl.register(e),ne.forwardRef((n,r)=>_r.createElement($F,Object.assign({},n,{ref:r,type:t})))}const rv=Kl("line",ws),LF=Kl("bar",Ss),NF=Kl("doughnut",Tn),FF=Kl("pie",hl);function zF(t){const{resultSet:e,pivotConfig:n,chartType:r}=t,i={labels:e.chartPivot(n).map(o=>o.x),datasets:e.series(n).map(o=>({fill:r==="area",label:o.title,data:o.series.map(({value:a})=>a)}))},s={area:rv,bar:LF,doughnut:NF,line:rv,pie:FF}[r];return qe.jsx(s,{data:i})}function jF(t){const e=location.hash.slice(1);if(e)try{return{...t,...JSON.parse(atob(decodeURIComponent(e)))}}catch{console.error("Invalid hash",e)}return{...t}}function BF(t){const{children:e,query:n,subscribe:r}=t,{resultSet:i,isLoading:s,error:o}=jE(n??{},{subscribe:r,skip:!n});return s?qe.jsx(qe.Fragment,{children:"Loading..."}):o?qe.jsx(qe.Fragment,{children:o.toString()}):i?(e==null?void 0:e({resultSet:i}))||null:qe.jsx(qe.Fragment,{children:"Empty result set"})}var sr={BASE_URL:"/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};function VF(){const{apiUrl:t,apiToken:e,query:n,pivotConfig:r,chartType:i,useWebSockets:s,useSubscription:o}=jF({apiUrl:sr.VITE_CUBE_API_URL||"",apiToken:sr.VITE_CUBE_API_TOKEN||"",query:JSON.parse(sr.VITE_CUBE_QUERY||"{}"),pivotConfig:JSON.parse(sr.VITE_CUBE_PIVOT_CONFIG||"{}"),chartType:sr.VITE_CHART_TYPE,websockets:sr.VITE_CUBE_API_USE_WEBSOCKETS==="true",subscription:sr.VITE_CUBE_API_USE_SUBSCRIPTION==="true"});let a;s&&(a=new MA({authorization:e,apiUrl:t}));const l=$E(e,{apiUrl:t,transport:a});return qe.jsx(qe.Fragment,{children:qe.jsx(NE,{cubeApi:l,children:qe.jsx(BF,{query:n,subscribe:o,children:({resultSet:u})=>qe.jsx(zF,{chartType:i,resultSet:u,pivotConfig:r})})})})}mc.createRoot(document.getElementById("root")).render(qe.jsx(_r.StrictMode,{children:qe.jsx(VF,{})}));