@nogataka/smart-edit 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/LICENSE +0 -1
  2. package/README.md +143 -66
  3. package/dist/cli.js +2 -2
  4. package/dist/devtools/generate_prompt_factory.js +5 -5
  5. package/dist/index.d.ts +33 -34
  6. package/dist/index.js +33 -34
  7. package/dist/interprompt/multilang_prompt.js +2 -2
  8. package/dist/interprompt/prompt_factory.js +2 -2
  9. package/dist/interprompt/util/class_decorators.d.ts +1 -1
  10. package/dist/interprompt/util/class_decorators.js +1 -1
  11. package/dist/{serena → smart-edit}/agent.d.ts +20 -20
  12. package/dist/{serena → smart-edit}/agent.js +43 -43
  13. package/dist/{serena → smart-edit}/analytics.d.ts +1 -1
  14. package/dist/{serena → smart-edit}/analytics.js +3 -3
  15. package/dist/smart-edit/cli.d.ts +9 -0
  16. package/dist/{serena → smart-edit}/cli.js +49 -99
  17. package/dist/{serena → smart-edit}/code_editor.d.ts +7 -7
  18. package/dist/{serena → smart-edit}/config/context_mode.d.ts +13 -13
  19. package/dist/{serena → smart-edit}/config/context_mode.js +12 -12
  20. package/dist/{serena/config/serena_config.d.ts → smart-edit/config/smart_edit_config.d.ts} +14 -14
  21. package/dist/{serena/config/serena_config.js → smart-edit/config/smart_edit_config.js} +31 -31
  22. package/dist/smart-edit/constants.d.ts +18 -0
  23. package/dist/smart-edit/constants.js +27 -0
  24. package/dist/{serena → smart-edit}/dashboard.d.ts +3 -3
  25. package/dist/{serena → smart-edit}/dashboard.js +10 -10
  26. package/dist/{serena → smart-edit}/gui_log_viewer.js +6 -6
  27. package/dist/{serena → smart-edit}/mcp.d.ts +40 -40
  28. package/dist/{serena → smart-edit}/mcp.js +38 -38
  29. package/dist/{serena → smart-edit}/project.d.ts +7 -7
  30. package/dist/{serena → smart-edit}/project.js +18 -18
  31. package/dist/{serena → smart-edit}/prompt_factory.d.ts +3 -3
  32. package/dist/{serena → smart-edit}/prompt_factory.js +1 -1
  33. package/dist/{serena → smart-edit}/resources/config/contexts/codex.yml +2 -2
  34. package/dist/{serena → smart-edit}/resources/config/contexts/context.template.yml +1 -1
  35. package/dist/{serena → smart-edit}/resources/config/contexts/ide-assistant.yml +2 -2
  36. package/dist/{serena → smart-edit}/resources/config/modes/mode.template.yml +1 -1
  37. package/dist/{serena → smart-edit}/resources/config/prompt_templates/simple_tool_outputs.yml +1 -1
  38. package/dist/smart-edit/resources/dashboard/dashboard.js +13 -0
  39. package/dist/smart-edit/resources/dashboard/index.css +1 -0
  40. package/dist/smart-edit/resources/dashboard/index.html +13 -0
  41. package/dist/{serena → smart-edit}/resources/project.template.yml +6 -6
  42. package/dist/{serena/resources/serena_config.template.yml → smart-edit/resources/smart_edit_config.template.yml} +14 -14
  43. package/dist/{serena → smart-edit}/symbol.d.ts +7 -7
  44. package/dist/{serena → smart-edit}/symbol.js +2 -2
  45. package/dist/{serena → smart-edit}/text_utils.js +2 -2
  46. package/dist/{serena → smart-edit}/tools/config_tools.d.ts +1 -1
  47. package/dist/{serena → smart-edit}/tools/config_tools.js +6 -6
  48. package/dist/{serena → smart-edit}/tools/memory_tools.d.ts +4 -4
  49. package/dist/{serena → smart-edit}/tools/memory_tools.js +5 -5
  50. package/dist/{serena → smart-edit}/tools/tools_base.d.ts +15 -15
  51. package/dist/{serena → smart-edit}/tools/tools_base.js +7 -7
  52. package/dist/{serena → smart-edit}/util/exception.d.ts +2 -2
  53. package/dist/{serena → smart-edit}/util/exception.js +2 -2
  54. package/dist/{serena → smart-edit}/util/file_system.js +3 -3
  55. package/dist/{serena → smart-edit}/util/git.js +3 -3
  56. package/dist/{serena → smart-edit}/util/inspection.d.ts +3 -3
  57. package/dist/{serena → smart-edit}/util/inspection.js +3 -3
  58. package/dist/{serena → smart-edit}/util/logging.d.ts +6 -6
  59. package/dist/{serena → smart-edit}/util/logging.js +7 -7
  60. package/dist/{serena → smart-edit}/util/shell.js +1 -1
  61. package/dist/smart-edit/version.d.ts +1 -0
  62. package/dist/{serena → smart-edit}/version.js +3 -3
  63. package/dist/{solidlsp → smart-lsp}/language_servers/autoload.js +1 -1
  64. package/dist/smart-lsp/language_servers/bash_language_server.d.ts +10 -0
  65. package/dist/{solidlsp → smart-lsp}/language_servers/bash_language_server.js +8 -8
  66. package/dist/{solidlsp → smart-lsp}/language_servers/clangd_language_server.d.ts +4 -4
  67. package/dist/{solidlsp → smart-lsp}/language_servers/clangd_language_server.js +9 -9
  68. package/dist/{solidlsp → smart-lsp}/language_servers/clojure_lsp.d.ts +4 -4
  69. package/dist/{solidlsp → smart-lsp}/language_servers/clojure_lsp.js +9 -9
  70. package/dist/{solidlsp → smart-lsp}/language_servers/common.d.ts +2 -2
  71. package/dist/{solidlsp → smart-lsp}/language_servers/common.js +1 -1
  72. package/dist/{solidlsp → smart-lsp}/language_servers/csharp_language_server.d.ts +4 -4
  73. package/dist/{solidlsp → smart-lsp}/language_servers/csharp_language_server.js +12 -12
  74. package/dist/smart-lsp/language_servers/dart_language_server.d.ts +10 -0
  75. package/dist/{solidlsp → smart-lsp}/language_servers/dart_language_server.js +13 -13
  76. package/dist/{solidlsp → smart-lsp}/language_servers/eclipse_jdtls.d.ts +4 -4
  77. package/dist/{solidlsp → smart-lsp}/language_servers/eclipse_jdtls.js +12 -12
  78. package/dist/{solidlsp → smart-lsp}/language_servers/erlang_language_server.d.ts +3 -3
  79. package/dist/{solidlsp → smart-lsp}/language_servers/erlang_language_server.js +6 -6
  80. package/dist/{solidlsp → smart-lsp}/language_servers/gopls.d.ts +3 -3
  81. package/dist/{solidlsp → smart-lsp}/language_servers/gopls.js +4 -4
  82. package/dist/{solidlsp → smart-lsp}/language_servers/intelephense.d.ts +4 -4
  83. package/dist/{solidlsp → smart-lsp}/language_servers/intelephense.js +11 -11
  84. package/dist/{solidlsp → smart-lsp}/language_servers/jedi_server.d.ts +4 -4
  85. package/dist/{solidlsp → smart-lsp}/language_servers/jedi_server.js +4 -4
  86. package/dist/{solidlsp → smart-lsp}/language_servers/kotlin_language_server.d.ts +4 -4
  87. package/dist/{solidlsp → smart-lsp}/language_servers/kotlin_language_server.js +9 -9
  88. package/dist/{solidlsp → smart-lsp}/language_servers/lua_ls.d.ts +4 -4
  89. package/dist/{solidlsp → smart-lsp}/language_servers/lua_ls.js +10 -10
  90. package/dist/{solidlsp → smart-lsp}/language_servers/nixd_language_server.d.ts +4 -4
  91. package/dist/{solidlsp → smart-lsp}/language_servers/nixd_language_server.js +7 -7
  92. package/dist/{solidlsp → smart-lsp}/language_servers/pyright_server.d.ts +4 -4
  93. package/dist/{solidlsp → smart-lsp}/language_servers/pyright_server.js +3 -3
  94. package/dist/{solidlsp → smart-lsp}/language_servers/r_language_server.d.ts +4 -4
  95. package/dist/{solidlsp → smart-lsp}/language_servers/r_language_server.js +5 -5
  96. package/dist/smart-lsp/language_servers/ruby_common.d.ts +10 -0
  97. package/dist/{solidlsp → smart-lsp}/language_servers/ruby_common.js +4 -4
  98. package/dist/{solidlsp → smart-lsp}/language_servers/ruby_lsp.d.ts +4 -4
  99. package/dist/{solidlsp → smart-lsp}/language_servers/ruby_lsp.js +10 -10
  100. package/dist/{solidlsp → smart-lsp}/language_servers/rust_analyzer.d.ts +4 -4
  101. package/dist/{solidlsp → smart-lsp}/language_servers/rust_analyzer.js +4 -4
  102. package/dist/{solidlsp → smart-lsp}/language_servers/solargraph.d.ts +4 -4
  103. package/dist/{solidlsp → smart-lsp}/language_servers/solargraph.js +10 -10
  104. package/dist/{solidlsp → smart-lsp}/language_servers/sourcekit_lsp.d.ts +4 -4
  105. package/dist/{solidlsp → smart-lsp}/language_servers/sourcekit_lsp.js +7 -7
  106. package/dist/{solidlsp → smart-lsp}/language_servers/terraform_ls.d.ts +4 -4
  107. package/dist/{solidlsp → smart-lsp}/language_servers/terraform_ls.js +14 -14
  108. package/dist/{solidlsp → smart-lsp}/language_servers/typescript_language_server.d.ts +4 -4
  109. package/dist/{solidlsp → smart-lsp}/language_servers/typescript_language_server.js +11 -11
  110. package/dist/{solidlsp → smart-lsp}/language_servers/vts_language_server.d.ts +4 -4
  111. package/dist/{solidlsp → smart-lsp}/language_servers/vts_language_server.js +10 -10
  112. package/dist/{solidlsp → smart-lsp}/language_servers/zls.d.ts +4 -4
  113. package/dist/{solidlsp → smart-lsp}/language_servers/zls.js +6 -6
  114. package/dist/{solidlsp → smart-lsp}/ls.d.ts +25 -25
  115. package/dist/{solidlsp → smart-lsp}/ls.js +19 -19
  116. package/dist/{solidlsp → smart-lsp}/ls_config.d.ts +0 -5
  117. package/dist/{solidlsp → smart-lsp}/ls_config.js +0 -5
  118. package/dist/{solidlsp → smart-lsp}/ls_exceptions.d.ts +1 -1
  119. package/dist/{solidlsp → smart-lsp}/ls_exceptions.js +2 -2
  120. package/dist/{solidlsp → smart-lsp}/ls_handler.d.ts +7 -7
  121. package/dist/{solidlsp → smart-lsp}/ls_handler.js +12 -12
  122. package/dist/{solidlsp → smart-lsp}/ls_request.d.ts +4 -4
  123. package/dist/{solidlsp → smart-lsp}/ls_request.js +3 -3
  124. package/package.json +13 -3
  125. package/dist/serena/agno.d.ts +0 -111
  126. package/dist/serena/agno.js +0 -278
  127. package/dist/serena/cli.d.ts +0 -9
  128. package/dist/serena/constants.d.ts +0 -18
  129. package/dist/serena/constants.js +0 -27
  130. package/dist/serena/resources/dashboard/dashboard.js +0 -816
  131. package/dist/serena/resources/dashboard/index.html +0 -312
  132. package/dist/serena/resources/dashboard/jquery.min.js +0 -3
  133. package/dist/serena/version.d.ts +0 -1
  134. package/dist/solidlsp/language_servers/bash_language_server.d.ts +0 -10
  135. package/dist/solidlsp/language_servers/dart_language_server.d.ts +0 -10
  136. package/dist/solidlsp/language_servers/ruby_common.d.ts +0 -10
  137. /package/dist/{serena → smart-edit}/code_editor.js +0 -0
  138. /package/dist/{serena → smart-edit}/generated/generated_prompt_factory.d.ts +0 -0
  139. /package/dist/{serena → smart-edit}/generated/generated_prompt_factory.js +0 -0
  140. /package/dist/{serena → smart-edit}/gui_log_viewer.d.ts +0 -0
  141. /package/dist/{serena → smart-edit}/resources/config/contexts/agent.yml +0 -0
  142. /package/dist/{serena → smart-edit}/resources/config/contexts/chatgpt.yml +0 -0
  143. /package/dist/{serena → smart-edit}/resources/config/contexts/desktop-app.yml +0 -0
  144. /package/dist/{serena → smart-edit}/resources/config/contexts/oaicompat-agent.yml +0 -0
  145. /package/dist/{serena → smart-edit}/resources/config/internal_modes/jetbrains.yml +0 -0
  146. /package/dist/{serena → smart-edit}/resources/config/modes/editing.yml +0 -0
  147. /package/dist/{serena → smart-edit}/resources/config/modes/interactive.yml +0 -0
  148. /package/dist/{serena → smart-edit}/resources/config/modes/no-onboarding.yml +0 -0
  149. /package/dist/{serena → smart-edit}/resources/config/modes/onboarding.yml +0 -0
  150. /package/dist/{serena → smart-edit}/resources/config/modes/one-shot.yml +0 -0
  151. /package/dist/{serena → smart-edit}/resources/config/modes/planning.yml +0 -0
  152. /package/dist/{serena → smart-edit}/resources/config/prompt_templates/system_prompt.yml +0 -0
  153. /package/dist/{serena/resources/dashboard/serena-icon-16.svg → smart-edit/resources/dashboard/smart-edit-icon-16.svg} +0 -0
  154. /package/dist/{serena/resources/dashboard/serena-icon-32.svg → smart-edit/resources/dashboard/smart-edit-icon-32.svg} +0 -0
  155. /package/dist/{serena/resources/dashboard/serena-icon-48.svg → smart-edit/resources/dashboard/smart-edit-icon-48.svg} +0 -0
  156. /package/dist/{serena/resources/dashboard/serena-logs-dark-mode.svg → smart-edit/resources/dashboard/smart-edit-logs-dark-mode.svg} +0 -0
  157. /package/dist/{serena/resources/dashboard/serena-logs.svg → smart-edit/resources/dashboard/smart-edit-logs.svg} +0 -0
  158. /package/dist/{serena → smart-edit}/text_utils.d.ts +0 -0
  159. /package/dist/{serena → smart-edit}/tools/cmd_tools.d.ts +0 -0
  160. /package/dist/{serena → smart-edit}/tools/cmd_tools.js +0 -0
  161. /package/dist/{serena → smart-edit}/tools/file_tools.d.ts +0 -0
  162. /package/dist/{serena → smart-edit}/tools/file_tools.js +0 -0
  163. /package/dist/{serena → smart-edit}/tools/index.d.ts +0 -0
  164. /package/dist/{serena → smart-edit}/tools/index.js +0 -0
  165. /package/dist/{serena → smart-edit}/tools/symbol_tools.d.ts +0 -0
  166. /package/dist/{serena → smart-edit}/tools/symbol_tools.js +0 -0
  167. /package/dist/{serena → smart-edit}/tools/workflow_tools.d.ts +0 -0
  168. /package/dist/{serena → smart-edit}/tools/workflow_tools.js +0 -0
  169. /package/dist/{serena → smart-edit}/util/class_decorators.d.ts +0 -0
  170. /package/dist/{serena → smart-edit}/util/class_decorators.js +0 -0
  171. /package/dist/{serena → smart-edit}/util/file_system.d.ts +0 -0
  172. /package/dist/{serena → smart-edit}/util/general.d.ts +0 -0
  173. /package/dist/{serena → smart-edit}/util/general.js +0 -0
  174. /package/dist/{serena → smart-edit}/util/git.d.ts +0 -0
  175. /package/dist/{serena → smart-edit}/util/shell.d.ts +0 -0
  176. /package/dist/{serena → smart-edit}/util/thread.d.ts +0 -0
  177. /package/dist/{serena → smart-edit}/util/thread.js +0 -0
  178. /package/dist/{solidlsp → smart-lsp}/language_servers/autoload.d.ts +0 -0
  179. /package/dist/{solidlsp → smart-lsp}/ls_types.d.ts +0 -0
  180. /package/dist/{solidlsp → smart-lsp}/ls_types.js +0 -0
  181. /package/dist/{solidlsp → smart-lsp}/lsp_protocol_handler/server.d.ts +0 -0
  182. /package/dist/{solidlsp → smart-lsp}/lsp_protocol_handler/server.js +0 -0
  183. /package/dist/{solidlsp → smart-lsp}/util/subprocess_util.d.ts +0 -0
  184. /package/dist/{solidlsp → smart-lsp}/util/subprocess_util.js +0 -0
  185. /package/dist/{solidlsp → smart-lsp}/util/zip.d.ts +0 -0
  186. /package/dist/{solidlsp → smart-lsp}/util/zip.js +0 -0
@@ -0,0 +1,13 @@
1
+ (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function a(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(o){if(o.ep)return;o.ep=!0;const c=a(o);fetch(o.href,c)}})();var pu={exports:{}},Os={};var ym;function Yv(){if(ym)return Os;ym=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function a(s,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:i,type:s,key:u,ref:o!==void 0?o:null,props:c}}return Os.Fragment=e,Os.jsx=a,Os.jsxs=a,Os}var bm;function qv(){return bm||(bm=1,pu.exports=Yv()),pu.exports}var S=qv(),yu={exports:{}},rt={};var vm;function Xv(){if(vm)return rt;vm=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),_=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=_&&D[_]||D["@@iterator"],typeof D=="function"?D:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,A={};function z(D,U,Z){this.props=D,this.context=U,this.refs=A,this.updater=Z||T}z.prototype.isReactComponent={},z.prototype.setState=function(D,U){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,U,"setState")},z.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function H(){}H.prototype=z.prototype;function Y(D,U,Z){this.props=D,this.context=U,this.refs=A,this.updater=Z||T}var G=Y.prototype=new H;G.constructor=Y,M(G,z.prototype),G.isPureReactComponent=!0;var q=Array.isArray;function K(){}var Q={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function tt(D,U,Z){var W=Z.ref;return{$$typeof:i,type:D,key:U,ref:W!==void 0?W:null,props:Z}}function ct(D,U){return tt(D.type,U,D.props)}function at(D){return typeof D=="object"&&D!==null&&D.$$typeof===i}function it(D){var U={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(Z){return U[Z]})}var kt=/\/+/g;function Vt(D,U){return typeof D=="object"&&D!==null&&D.key!=null?it(""+D.key):U.toString(36)}function dt(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(K,K):(D.status="pending",D.then(function(U){D.status==="pending"&&(D.status="fulfilled",D.value=U)},function(U){D.status==="pending"&&(D.status="rejected",D.reason=U)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function j(D,U,Z,W,st){var ot=typeof D;(ot==="undefined"||ot==="boolean")&&(D=null);var Et=!1;if(D===null)Et=!0;else switch(ot){case"bigint":case"string":case"number":Et=!0;break;case"object":switch(D.$$typeof){case i:case e:Et=!0;break;case p:return Et=D._init,j(Et(D._payload),U,Z,W,st)}}if(Et)return st=st(D),Et=W===""?"."+Vt(D,0):W,q(st)?(Z="",Et!=null&&(Z=Et.replace(kt,"$&/")+"/"),j(st,U,Z,"",function(ja){return ja})):st!=null&&(at(st)&&(st=ct(st,Z+(st.key==null||D&&D.key===st.key?"":(""+st.key).replace(kt,"$&/")+"/")+Et)),U.push(st)),1;Et=0;var he=W===""?".":W+":";if(q(D))for(var Qt=0;Qt<D.length;Qt++)W=D[Qt],ot=he+Vt(W,Qt),Et+=j(W,U,Z,ot,st);else if(Qt=x(D),typeof Qt=="function")for(D=Qt.call(D),Qt=0;!(W=D.next()).done;)W=W.value,ot=he+Vt(W,Qt++),Et+=j(W,U,Z,ot,st);else if(ot==="object"){if(typeof D.then=="function")return j(dt(D),U,Z,W,st);throw U=String(D),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Et}function X(D,U,Z){if(D==null)return D;var W=[],st=0;return j(D,W,"","",function(ot){return U.call(Z,ot,st++)}),W}function P(D){if(D._status===-1){var U=D._result;U=U(),U.then(function(Z){(D._status===0||D._status===-1)&&(D._status=1,D._result=Z)},function(Z){(D._status===0||D._status===-1)&&(D._status=2,D._result=Z)}),D._status===-1&&(D._status=0,D._result=U)}if(D._status===1)return D._result.default;throw D._result}var lt=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},_t={map:X,forEach:function(D,U,Z){X(D,function(){U.apply(this,arguments)},Z)},count:function(D){var U=0;return X(D,function(){U++}),U},toArray:function(D){return X(D,function(U){return U})||[]},only:function(D){if(!at(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return rt.Activity=b,rt.Children=_t,rt.Component=z,rt.Fragment=a,rt.Profiler=o,rt.PureComponent=Y,rt.StrictMode=s,rt.Suspense=d,rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,rt.__COMPILER_RUNTIME={__proto__:null,c:function(D){return Q.H.useMemoCache(D)}},rt.cache=function(D){return function(){return D.apply(null,arguments)}},rt.cacheSignal=function(){return null},rt.cloneElement=function(D,U,Z){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var W=M({},D.props),st=D.key;if(U!=null)for(ot in U.key!==void 0&&(st=""+U.key),U)!F.call(U,ot)||ot==="key"||ot==="__self"||ot==="__source"||ot==="ref"&&U.ref===void 0||(W[ot]=U[ot]);var ot=arguments.length-2;if(ot===1)W.children=Z;else if(1<ot){for(var Et=Array(ot),he=0;he<ot;he++)Et[he]=arguments[he+2];W.children=Et}return tt(D.type,st,W)},rt.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:c,_context:D},D},rt.createElement=function(D,U,Z){var W,st={},ot=null;if(U!=null)for(W in U.key!==void 0&&(ot=""+U.key),U)F.call(U,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(st[W]=U[W]);var Et=arguments.length-2;if(Et===1)st.children=Z;else if(1<Et){for(var he=Array(Et),Qt=0;Qt<Et;Qt++)he[Qt]=arguments[Qt+2];st.children=he}if(D&&D.defaultProps)for(W in Et=D.defaultProps,Et)st[W]===void 0&&(st[W]=Et[W]);return tt(D,ot,st)},rt.createRef=function(){return{current:null}},rt.forwardRef=function(D){return{$$typeof:f,render:D}},rt.isValidElement=at,rt.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:P}},rt.memo=function(D,U){return{$$typeof:m,type:D,compare:U===void 0?null:U}},rt.startTransition=function(D){var U=Q.T,Z={};Q.T=Z;try{var W=D(),st=Q.S;st!==null&&st(Z,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(K,lt)}catch(ot){lt(ot)}finally{U!==null&&Z.types!==null&&(U.types=Z.types),Q.T=U}},rt.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},rt.use=function(D){return Q.H.use(D)},rt.useActionState=function(D,U,Z){return Q.H.useActionState(D,U,Z)},rt.useCallback=function(D,U){return Q.H.useCallback(D,U)},rt.useContext=function(D){return Q.H.useContext(D)},rt.useDebugValue=function(){},rt.useDeferredValue=function(D,U){return Q.H.useDeferredValue(D,U)},rt.useEffect=function(D,U){return Q.H.useEffect(D,U)},rt.useEffectEvent=function(D){return Q.H.useEffectEvent(D)},rt.useId=function(){return Q.H.useId()},rt.useImperativeHandle=function(D,U,Z){return Q.H.useImperativeHandle(D,U,Z)},rt.useInsertionEffect=function(D,U){return Q.H.useInsertionEffect(D,U)},rt.useLayoutEffect=function(D,U){return Q.H.useLayoutEffect(D,U)},rt.useMemo=function(D,U){return Q.H.useMemo(D,U)},rt.useOptimistic=function(D,U){return Q.H.useOptimistic(D,U)},rt.useReducer=function(D,U,Z){return Q.H.useReducer(D,U,Z)},rt.useRef=function(D){return Q.H.useRef(D)},rt.useState=function(D){return Q.H.useState(D)},rt.useSyncExternalStore=function(D,U,Z){return Q.H.useSyncExternalStore(D,U,Z)},rt.useTransition=function(){return Q.H.useTransition()},rt.version="19.2.4",rt}var _m;function $u(){return _m||(_m=1,yu.exports=Xv()),yu.exports}var J=$u(),bu={exports:{}},Ds={},vu={exports:{}},_u={};var xm;function Gv(){return xm||(xm=1,(function(i){function e(j,X){var P=j.length;j.push(X);t:for(;0<P;){var lt=P-1>>>1,_t=j[lt];if(0<o(_t,X))j[lt]=X,j[P]=_t,P=lt;else break t}}function a(j){return j.length===0?null:j[0]}function s(j){if(j.length===0)return null;var X=j[0],P=j.pop();if(P!==X){j[0]=P;t:for(var lt=0,_t=j.length,D=_t>>>1;lt<D;){var U=2*(lt+1)-1,Z=j[U],W=U+1,st=j[W];if(0>o(Z,P))W<_t&&0>o(st,Z)?(j[lt]=st,j[W]=P,lt=W):(j[lt]=Z,j[U]=P,lt=U);else if(W<_t&&0>o(st,P))j[lt]=st,j[W]=P,lt=W;else break t}}return X}function o(j,X){var P=j.sortIndex-X.sortIndex;return P!==0?P:j.id-X.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;i.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();i.unstable_now=function(){return u.now()-f}}var d=[],m=[],p=1,b=null,_=3,x=!1,T=!1,M=!1,A=!1,z=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function G(j){for(var X=a(m);X!==null;){if(X.callback===null)s(m);else if(X.startTime<=j)s(m),X.sortIndex=X.expirationTime,e(d,X);else break;X=a(m)}}function q(j){if(M=!1,G(j),!T)if(a(d)!==null)T=!0,K||(K=!0,it());else{var X=a(m);X!==null&&dt(q,X.startTime-j)}}var K=!1,Q=-1,F=5,tt=-1;function ct(){return A?!0:!(i.unstable_now()-tt<F)}function at(){if(A=!1,K){var j=i.unstable_now();tt=j;var X=!0;try{t:{T=!1,M&&(M=!1,H(Q),Q=-1),x=!0;var P=_;try{e:{for(G(j),b=a(d);b!==null&&!(b.expirationTime>j&&ct());){var lt=b.callback;if(typeof lt=="function"){b.callback=null,_=b.priorityLevel;var _t=lt(b.expirationTime<=j);if(j=i.unstable_now(),typeof _t=="function"){b.callback=_t,G(j),X=!0;break e}b===a(d)&&s(d),G(j)}else s(d);b=a(d)}if(b!==null)X=!0;else{var D=a(m);D!==null&&dt(q,D.startTime-j),X=!1}}break t}finally{b=null,_=P,x=!1}X=void 0}}finally{X?it():K=!1}}}var it;if(typeof Y=="function")it=function(){Y(at)};else if(typeof MessageChannel<"u"){var kt=new MessageChannel,Vt=kt.port2;kt.port1.onmessage=at,it=function(){Vt.postMessage(null)}}else it=function(){z(at,0)};function dt(j,X){Q=z(function(){j(i.unstable_now())},X)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(j){j.callback=null},i.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<j?Math.floor(1e3/j):5},i.unstable_getCurrentPriorityLevel=function(){return _},i.unstable_next=function(j){switch(_){case 1:case 2:case 3:var X=3;break;default:X=_}var P=_;_=X;try{return j()}finally{_=P}},i.unstable_requestPaint=function(){A=!0},i.unstable_runWithPriority=function(j,X){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var P=_;_=j;try{return X()}finally{_=P}},i.unstable_scheduleCallback=function(j,X,P){var lt=i.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?lt+P:lt):P=lt,j){case 1:var _t=-1;break;case 2:_t=250;break;case 5:_t=1073741823;break;case 4:_t=1e4;break;default:_t=5e3}return _t=P+_t,j={id:p++,callback:X,priorityLevel:j,startTime:P,expirationTime:_t,sortIndex:-1},P>lt?(j.sortIndex=P,e(m,j),a(d)===null&&j===a(m)&&(M?(H(Q),Q=-1):M=!0,dt(q,P-lt))):(j.sortIndex=_t,e(d,j),T||x||(T=!0,K||(K=!0,it()))),j},i.unstable_shouldYield=ct,i.unstable_wrapCallback=function(j){var X=_;return function(){var P=_;_=X;try{return j.apply(this,arguments)}finally{_=P}}}})(_u)),_u}var Sm;function Qv(){return Sm||(Sm=1,vu.exports=Gv()),vu.exports}var xu={exports:{}},ce={};var Tm;function Zv(){if(Tm)return ce;Tm=1;var i=$u();function e(d){var m="https://react.dev/errors/"+d;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)m+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(e(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(d,m,p){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:d,containerInfo:m,implementation:p}}var u=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,m){if(d==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return ce.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,ce.createPortal=function(d,m){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(e(299));return c(d,m,null,p)},ce.flushSync=function(d){var m=u.T,p=s.p;try{if(u.T=null,s.p=2,d)return d()}finally{u.T=m,s.p=p,s.d.f()}},ce.preconnect=function(d,m){typeof d=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(d,m))},ce.prefetchDNS=function(d){typeof d=="string"&&s.d.D(d)},ce.preinit=function(d,m){if(typeof d=="string"&&m&&typeof m.as=="string"){var p=m.as,b=f(p,m.crossOrigin),_=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;p==="style"?s.d.S(d,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:b,integrity:_,fetchPriority:x}):p==="script"&&s.d.X(d,{crossOrigin:b,integrity:_,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},ce.preinitModule=function(d,m){if(typeof d=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var p=f(m.as,m.crossOrigin);s.d.M(d,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(d)},ce.preload=function(d,m){if(typeof d=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var p=m.as,b=f(p,m.crossOrigin);s.d.L(d,p,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},ce.preloadModule=function(d,m){if(typeof d=="string")if(m){var p=f(m.as,m.crossOrigin);s.d.m(d,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(d)},ce.requestFormReset=function(d){s.d.r(d)},ce.unstable_batchedUpdates=function(d,m){return d(m)},ce.useFormState=function(d,m,p){return u.H.useFormState(d,m,p)},ce.useFormStatus=function(){return u.H.useHostTransitionStatus()},ce.version="19.2.4",ce}var Mm;function Kv(){if(Mm)return xu.exports;Mm=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),xu.exports=Zv(),xu.exports}var Em;function Fv(){if(Em)return Ds;Em=1;var i=Qv(),e=$u(),a=Kv();function s(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var n=t,l=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(l=n.return),t=n.return;while(t)}return n.tag===3?l:null}function u(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function d(t){if(c(t)!==t)throw Error(s(188))}function m(t){var n=t.alternate;if(!n){if(n=c(t),n===null)throw Error(s(188));return n!==t?null:t}for(var l=t,r=n;;){var h=l.return;if(h===null)break;var g=h.alternate;if(g===null){if(r=h.return,r!==null){l=r;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===l)return d(h),t;if(g===r)return d(h),n;g=g.sibling}throw Error(s(188))}if(l.return!==r.return)l=h,r=g;else{for(var y=!1,v=h.child;v;){if(v===l){y=!0,l=h,r=g;break}if(v===r){y=!0,r=h,l=g;break}v=v.sibling}if(!y){for(v=g.child;v;){if(v===l){y=!0,l=g,r=h;break}if(v===r){y=!0,r=g,l=h;break}v=v.sibling}if(!y)throw Error(s(189))}}if(l.alternate!==r)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?t:n}function p(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=p(t),n!==null)return n;t=t.sibling}return null}var b=Object.assign,_=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),tt=Symbol.for("react.activity"),ct=Symbol.for("react.memo_cache_sentinel"),at=Symbol.iterator;function it(t){return t===null||typeof t!="object"?null:(t=at&&t[at]||t["@@iterator"],typeof t=="function"?t:null)}var kt=Symbol.for("react.client.reference");function Vt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===kt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case M:return"Fragment";case z:return"Profiler";case A:return"StrictMode";case q:return"Suspense";case K:return"SuspenseList";case tt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case T:return"Portal";case Y:return t.displayName||"Context";case H:return(t._context.displayName||"Context")+".Consumer";case G:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Q:return n=t.displayName||null,n!==null?n:Vt(t.type)||"Memo";case F:n=t._payload,t=t._init;try{return Vt(t(n))}catch{}}return null}var dt=Array.isArray,j=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},lt=[],_t=-1;function D(t){return{current:t}}function U(t){0>_t||(t.current=lt[_t],lt[_t]=null,_t--)}function Z(t,n){_t++,lt[_t]=t.current,t.current=n}var W=D(null),st=D(null),ot=D(null),Et=D(null);function he(t,n){switch(Z(ot,n),Z(st,t),Z(W,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Vg(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Vg(n),t=Yg(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}U(W),Z(W,t)}function Qt(){U(W),U(st),U(ot)}function ja(t){t.memoizedState!==null&&Z(Et,t);var n=W.current,l=Yg(n,t.type);n!==l&&(Z(st,t),Z(W,l))}function $s(t){st.current===t&&(U(W),U(st)),Et.current===t&&(U(Et),Ts._currentValue=P)}var $o,pf;function di(t){if($o===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);$o=n&&n[1]||"",pf=-1<l.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+$o+t+pf}var Po=!1;function tr(t,n){if(!t||Po)return"";Po=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(n){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(k){var N=k}Reflect.construct(t,[],V)}else{try{V.call()}catch(k){N=k}t.call(V.prototype)}}else{try{throw Error()}catch(k){N=k}(V=t())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(k){if(k&&N&&typeof k.stack=="string")return[k.stack,N.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=r.DetermineComponentFrameRoot(),y=g[0],v=g[1];if(y&&v){var E=y.split(`
4
+ `),w=v.split(`
5
+ `);for(h=r=0;r<E.length&&!E[r].includes("DetermineComponentFrameRoot");)r++;for(;h<w.length&&!w[h].includes("DetermineComponentFrameRoot");)h++;if(r===E.length||h===w.length)for(r=E.length-1,h=w.length-1;1<=r&&0<=h&&E[r]!==w[h];)h--;for(;1<=r&&0<=h;r--,h--)if(E[r]!==w[h]){if(r!==1||h!==1)do if(r--,h--,0>h||E[r]!==w[h]){var L=`
6
+ `+E[r].replace(" at new "," at ");return t.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",t.displayName)),L}while(1<=r&&0<=h);break}}}finally{Po=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?di(l):""}function by(t,n){switch(t.tag){case 26:case 27:case 5:return di(t.type);case 16:return di("Lazy");case 13:return t.child!==n&&n!==null?di("Suspense Fallback"):di("Suspense");case 19:return di("SuspenseList");case 0:case 15:return tr(t.type,!1);case 11:return tr(t.type.render,!1);case 1:return tr(t.type,!0);case 31:return di("Activity");default:return""}}function yf(t){try{var n="",l=null;do n+=by(t,l),l=t,t=t.return;while(t);return n}catch(r){return`
7
+ Error generating stack: `+r.message+`
8
+ `+r.stack}}var er=Object.prototype.hasOwnProperty,nr=i.unstable_scheduleCallback,ir=i.unstable_cancelCallback,vy=i.unstable_shouldYield,_y=i.unstable_requestPaint,Ee=i.unstable_now,xy=i.unstable_getCurrentPriorityLevel,bf=i.unstable_ImmediatePriority,vf=i.unstable_UserBlockingPriority,Ps=i.unstable_NormalPriority,Sy=i.unstable_LowPriority,_f=i.unstable_IdlePriority,Ty=i.log,My=i.unstable_setDisableYieldValue,ka=null,Ae=null;function kn(t){if(typeof Ty=="function"&&My(t),Ae&&typeof Ae.setStrictMode=="function")try{Ae.setStrictMode(ka,t)}catch{}}var Oe=Math.clz32?Math.clz32:Oy,Ey=Math.log,Ay=Math.LN2;function Oy(t){return t>>>=0,t===0?32:31-(Ey(t)/Ay|0)|0}var tl=256,el=262144,nl=4194304;function gi(t){var n=t&42;if(n!==0)return n;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function il(t,n,l){var r=t.pendingLanes;if(r===0)return 0;var h=0,g=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var v=r&134217727;return v!==0?(r=v&~g,r!==0?h=gi(r):(y&=v,y!==0?h=gi(y):l||(l=v&~t,l!==0&&(h=gi(l))))):(v=r&~g,v!==0?h=gi(v):y!==0?h=gi(y):l||(l=r&~t,l!==0&&(h=gi(l)))),h===0?0:n!==0&&n!==h&&(n&g)===0&&(g=h&-h,l=n&-n,g>=l||g===32&&(l&4194048)!==0)?n:h}function La(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Dy(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32: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 n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xf(){var t=nl;return nl<<=1,(nl&62914560)===0&&(nl=4194304),t}function ar(t){for(var n=[],l=0;31>l;l++)n.push(t);return n}function Ha(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Cy(t,n,l,r,h,g){var y=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var v=t.entanglements,E=t.expirationTimes,w=t.hiddenUpdates;for(l=y&~l;0<l;){var L=31-Oe(l),V=1<<L;v[L]=0,E[L]=-1;var N=w[L];if(N!==null)for(w[L]=null,L=0;L<N.length;L++){var k=N[L];k!==null&&(k.lane&=-536870913)}l&=~V}r!==0&&Sf(t,r,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(y&~n))}function Sf(t,n,l){t.pendingLanes|=n,t.suspendedLanes&=~n;var r=31-Oe(n);t.entangledLanes|=n,t.entanglements[r]=t.entanglements[r]|1073741824|l&261930}function Tf(t,n){var l=t.entangledLanes|=n;for(t=t.entanglements;l;){var r=31-Oe(l),h=1<<r;h&n|t[r]&n&&(t[r]|=n),l&=~h}}function Mf(t,n){var l=n&-n;return l=(l&42)!==0?1:sr(l),(l&(t.suspendedLanes|n))!==0?0:l}function sr(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function lr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ef(){var t=X.p;return t!==0?t:(t=window.event,t===void 0?32:um(t.type))}function Af(t,n){var l=X.p;try{return X.p=t,n()}finally{X.p=l}}var Ln=Math.random().toString(36).slice(2),ie="__reactFiber$"+Ln,ge="__reactProps$"+Ln,qi="__reactContainer$"+Ln,or="__reactEvents$"+Ln,zy="__reactListeners$"+Ln,Ry="__reactHandles$"+Ln,Of="__reactResources$"+Ln,Ba="__reactMarker$"+Ln;function rr(t){delete t[ie],delete t[ge],delete t[or],delete t[zy],delete t[Ry]}function Xi(t){var n=t[ie];if(n)return n;for(var l=t.parentNode;l;){if(n=l[qi]||l[ie]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(t=Fg(t);t!==null;){if(l=t[ie])return l;t=Fg(t)}return n}t=l,l=t.parentNode}return null}function Gi(t){if(t=t[ie]||t[qi]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function Ua(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(s(33))}function Qi(t){var n=t[Of];return n||(n=t[Of]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ee(t){t[Ba]=!0}var Df=new Set,Cf={};function mi(t,n){Zi(t,n),Zi(t+"Capture",n)}function Zi(t,n){for(Cf[t]=n,t=0;t<n.length;t++)Df.add(n[t])}var wy=RegExp("^[: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]*$"),zf={},Rf={};function Ny(t){return er.call(Rf,t)?!0:er.call(zf,t)?!1:wy.test(t)?Rf[t]=!0:(zf[t]=!0,!1)}function al(t,n,l){if(Ny(n))if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var r=n.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+l)}}function sl(t,n,l){if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+l)}}function cn(t,n,l,r){if(r===null)t.removeAttribute(l);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(n,l,""+r)}}function He(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function wf(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function jy(t,n,l){var r=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var h=r.get,g=r.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(y){l=""+y,g.call(this,y)}}),Object.defineProperty(t,n,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function cr(t){if(!t._valueTracker){var n=wf(t)?"checked":"value";t._valueTracker=jy(t,n,""+t[n])}}function Nf(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var l=n.getValue(),r="";return t&&(r=wf(t)?t.checked?"true":"false":t.value),t=r,t!==l?(n.setValue(t),!0):!1}function ll(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}}var ky=/[\n"\\]/g;function Be(t){return t.replace(ky,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ur(t,n,l,r,h,g,y,v){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),n!=null?y==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+He(n)):t.value!==""+He(n)&&(t.value=""+He(n)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),n!=null?fr(t,y,He(n)):l!=null?fr(t,y,He(l)):r!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.name=""+He(v):t.removeAttribute("name")}function jf(t,n,l,r,h,g,y,v){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),n!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){cr(t);return}l=l!=null?""+He(l):"",n=n!=null?""+He(n):l,v||n===t.value||(t.value=n),t.defaultValue=n}r=r??h,r=typeof r!="function"&&typeof r!="symbol"&&!!r,t.checked=v?t.checked:!!r,t.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),cr(t)}function fr(t,n,l){n==="number"&&ll(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Ki(t,n,l,r){if(t=t.options,n){n={};for(var h=0;h<l.length;h++)n["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=n.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&r&&(t[l].defaultSelected=!0)}else{for(l=""+He(l),n=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,r&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function kf(t,n,l){if(n!=null&&(n=""+He(n),n!==t.value&&(t.value=n),l==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=l!=null?""+He(l):""}function Lf(t,n,l,r){if(n==null){if(r!=null){if(l!=null)throw Error(s(92));if(dt(r)){if(1<r.length)throw Error(s(93));r=r[0]}l=r}l==null&&(l=""),n=l}l=He(n),t.defaultValue=l,r=t.textContent,r===l&&r!==""&&r!==null&&(t.value=r),cr(t)}function Fi(t,n){if(n){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=n;return}}t.textContent=n}var Ly=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Hf(t,n,l){var r=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?r?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":r?t.setProperty(n,l):typeof l!="number"||l===0||Ly.has(n)?n==="float"?t.cssFloat=l:t[n]=(""+l).trim():t[n]=l+"px"}function Bf(t,n,l){if(n!=null&&typeof n!="object")throw Error(s(62));if(t=t.style,l!=null){for(var r in l)!l.hasOwnProperty(r)||n!=null&&n.hasOwnProperty(r)||(r.indexOf("--")===0?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="");for(var h in n)r=n[h],n.hasOwnProperty(h)&&l[h]!==r&&Hf(t,h,r)}else for(var g in n)n.hasOwnProperty(g)&&Hf(t,g,n[g])}function hr(t){if(t.indexOf("-")===-1)return!1;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 Hy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),By=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ol(t){return By.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function un(){}var dr=null;function gr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Wi=null,Ji=null;function Uf(t){var n=Gi(t);if(n&&(t=n.stateNode)){var l=t[ge]||null;t:switch(t=n.stateNode,n.type){case"input":if(ur(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Be(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var r=l[n];if(r!==t&&r.form===t.form){var h=r[ge]||null;if(!h)throw Error(s(90));ur(r,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<l.length;n++)r=l[n],r.form===t.form&&Nf(r)}break t;case"textarea":kf(t,l.value,l.defaultValue);break t;case"select":n=l.value,n!=null&&Ki(t,!!l.multiple,n,!1)}}}var mr=!1;function Vf(t,n,l){if(mr)return t(n,l);mr=!0;try{var r=t(n);return r}finally{if(mr=!1,(Wi!==null||Ji!==null)&&(Fl(),Wi&&(n=Wi,t=Ji,Ji=Wi=null,Uf(n),t)))for(n=0;n<t.length;n++)Uf(t[n])}}function Va(t,n){var l=t.stateNode;if(l===null)return null;var r=l[ge]||null;if(r===null)return null;l=r[n];t:switch(n){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 t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(s(231,n,typeof l));return l}var fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pr=!1;if(fn)try{var Ya={};Object.defineProperty(Ya,"passive",{get:function(){pr=!0}}),window.addEventListener("test",Ya,Ya),window.removeEventListener("test",Ya,Ya)}catch{pr=!1}var Hn=null,yr=null,rl=null;function Yf(){if(rl)return rl;var t,n=yr,l=n.length,r,h="value"in Hn?Hn.value:Hn.textContent,g=h.length;for(t=0;t<l&&n[t]===h[t];t++);var y=l-t;for(r=1;r<=y&&n[l-r]===h[g-r];r++);return rl=h.slice(t,1<r?1-r:void 0)}function cl(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function ul(){return!0}function qf(){return!1}function me(t){function n(l,r,h,g,y){this._reactName=l,this._targetInst=h,this.type=r,this.nativeEvent=g,this.target=y,this.currentTarget=null;for(var v in t)t.hasOwnProperty(v)&&(l=t[v],this[v]=l?l(g):g[v]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?ul:qf,this.isPropagationStopped=qf,this}return b(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ul)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ul)},persist:function(){},isPersistent:ul}),n}var pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fl=me(pi),qa=b({},pi,{view:0,detail:0}),Uy=me(qa),br,vr,Xa,hl=b({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xr,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!==Xa&&(Xa&&t.type==="mousemove"?(br=t.screenX-Xa.screenX,vr=t.screenY-Xa.screenY):vr=br=0,Xa=t),br)},movementY:function(t){return"movementY"in t?t.movementY:vr}}),Xf=me(hl),Vy=b({},hl,{dataTransfer:0}),Yy=me(Vy),qy=b({},qa,{relatedTarget:0}),_r=me(qy),Xy=b({},pi,{animationName:0,elapsedTime:0,pseudoElement:0}),Gy=me(Xy),Qy=b({},pi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Zy=me(Qy),Ky=b({},pi,{data:0}),Gf=me(Ky),Fy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wy={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"},Jy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Iy(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Jy[t])?!!n[t]:!1}function xr(){return Iy}var $y=b({},qa,{key:function(t){if(t.key){var n=Fy[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=cl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Wy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xr,charCode:function(t){return t.type==="keypress"?cl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?cl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Py=me($y),tb=b({},hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qf=me(tb),eb=b({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xr}),nb=me(eb),ib=b({},pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),ab=me(ib),sb=b({},hl,{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}),lb=me(sb),ob=b({},pi,{newState:0,oldState:0}),rb=me(ob),cb=[9,13,27,32],Sr=fn&&"CompositionEvent"in window,Ga=null;fn&&"documentMode"in document&&(Ga=document.documentMode);var ub=fn&&"TextEvent"in window&&!Ga,Zf=fn&&(!Sr||Ga&&8<Ga&&11>=Ga),Kf=" ",Ff=!1;function Wf(t,n){switch(t){case"keyup":return cb.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ii=!1;function fb(t,n){switch(t){case"compositionend":return Jf(n);case"keypress":return n.which!==32?null:(Ff=!0,Kf);case"textInput":return t=n.data,t===Kf&&Ff?null:t;default:return null}}function hb(t,n){if(Ii)return t==="compositionend"||!Sr&&Wf(t,n)?(t=Yf(),rl=yr=Hn=null,Ii=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Zf&&n.locale!=="ko"?null:n.data;default:return null}}var db={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 If(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!db[t.type]:n==="textarea"}function $f(t,n,l,r){Wi?Ji?Ji.push(r):Ji=[r]:Wi=r,n=eo(n,"onChange"),0<n.length&&(l=new fl("onChange","change",null,l,r),t.push({event:l,listeners:n}))}var Qa=null,Za=null;function gb(t){jg(t,0)}function dl(t){var n=Ua(t);if(Nf(n))return t}function Pf(t,n){if(t==="change")return n}var th=!1;if(fn){var Tr;if(fn){var Mr="oninput"in document;if(!Mr){var eh=document.createElement("div");eh.setAttribute("oninput","return;"),Mr=typeof eh.oninput=="function"}Tr=Mr}else Tr=!1;th=Tr&&(!document.documentMode||9<document.documentMode)}function nh(){Qa&&(Qa.detachEvent("onpropertychange",ih),Za=Qa=null)}function ih(t){if(t.propertyName==="value"&&dl(Za)){var n=[];$f(n,Za,t,gr(t)),Vf(gb,n)}}function mb(t,n,l){t==="focusin"?(nh(),Qa=n,Za=l,Qa.attachEvent("onpropertychange",ih)):t==="focusout"&&nh()}function pb(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return dl(Za)}function yb(t,n){if(t==="click")return dl(n)}function bb(t,n){if(t==="input"||t==="change")return dl(n)}function vb(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var De=typeof Object.is=="function"?Object.is:vb;function Ka(t,n){if(De(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var l=Object.keys(t),r=Object.keys(n);if(l.length!==r.length)return!1;for(r=0;r<l.length;r++){var h=l[r];if(!er.call(n,h)||!De(t[h],n[h]))return!1}return!0}function ah(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function sh(t,n){var l=ah(t);t=0;for(var r;l;){if(l.nodeType===3){if(r=t+l.textContent.length,t<=n&&r>=n)return{node:l,offset:n-t};t=r}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=ah(l)}}function lh(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?lh(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function oh(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=ll(t.document);n instanceof t.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)t=n.contentWindow;else break;n=ll(t.document)}return n}function Er(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var _b=fn&&"documentMode"in document&&11>=document.documentMode,$i=null,Ar=null,Fa=null,Or=!1;function rh(t,n,l){var r=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Or||$i==null||$i!==ll(r)||(r=$i,"selectionStart"in r&&Er(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}),Fa&&Ka(Fa,r)||(Fa=r,r=eo(Ar,"onSelect"),0<r.length&&(n=new fl("onSelect","select",null,n,l),t.push({event:n,listeners:r}),n.target=$i)))}function yi(t,n){var l={};return l[t.toLowerCase()]=n.toLowerCase(),l["Webkit"+t]="webkit"+n,l["Moz"+t]="moz"+n,l}var Pi={animationend:yi("Animation","AnimationEnd"),animationiteration:yi("Animation","AnimationIteration"),animationstart:yi("Animation","AnimationStart"),transitionrun:yi("Transition","TransitionRun"),transitionstart:yi("Transition","TransitionStart"),transitioncancel:yi("Transition","TransitionCancel"),transitionend:yi("Transition","TransitionEnd")},Dr={},ch={};fn&&(ch=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);function bi(t){if(Dr[t])return Dr[t];if(!Pi[t])return t;var n=Pi[t],l;for(l in n)if(n.hasOwnProperty(l)&&l in ch)return Dr[t]=n[l];return t}var uh=bi("animationend"),fh=bi("animationiteration"),hh=bi("animationstart"),xb=bi("transitionrun"),Sb=bi("transitionstart"),Tb=bi("transitioncancel"),dh=bi("transitionend"),gh=new Map,Cr="abort auxClick beforeToggle 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(" ");Cr.push("scrollEnd");function We(t,n){gh.set(t,n),mi(n,[t])}var gl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Ue=[],ta=0,zr=0;function ml(){for(var t=ta,n=zr=ta=0;n<t;){var l=Ue[n];Ue[n++]=null;var r=Ue[n];Ue[n++]=null;var h=Ue[n];Ue[n++]=null;var g=Ue[n];if(Ue[n++]=null,r!==null&&h!==null){var y=r.pending;y===null?h.next=h:(h.next=y.next,y.next=h),r.pending=h}g!==0&&mh(l,h,g)}}function pl(t,n,l,r){Ue[ta++]=t,Ue[ta++]=n,Ue[ta++]=l,Ue[ta++]=r,zr|=r,t.lanes|=r,t=t.alternate,t!==null&&(t.lanes|=r)}function Rr(t,n,l,r){return pl(t,n,l,r),yl(t)}function vi(t,n){return pl(t,null,null,n),yl(t)}function mh(t,n,l){t.lanes|=l;var r=t.alternate;r!==null&&(r.lanes|=l);for(var h=!1,g=t.return;g!==null;)g.childLanes|=l,r=g.alternate,r!==null&&(r.childLanes|=l),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&n!==null&&(h=31-Oe(l),t=g.hiddenUpdates,r=t[h],r===null?t[h]=[n]:r.push(n),n.lane=l|536870912),g):null}function yl(t){if(50<ps)throw ps=0,Vc=null,Error(s(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var ea={};function Mb(t,n,l,r){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,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 Ce(t,n,l,r){return new Mb(t,n,l,r)}function wr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function hn(t,n){var l=t.alternate;return l===null?(l=Ce(t.tag,n,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=n,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,n=t.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function ph(t,n){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,n=l.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function bl(t,n,l,r,h,g){var y=0;if(r=t,typeof t=="function")wr(t)&&(y=1);else if(typeof t=="string")y=Cv(t,l,W.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case tt:return t=Ce(31,l,n,h),t.elementType=tt,t.lanes=g,t;case M:return _i(l.children,h,g,n);case A:y=8,h|=24;break;case z:return t=Ce(12,l,n,h|2),t.elementType=z,t.lanes=g,t;case q:return t=Ce(13,l,n,h),t.elementType=q,t.lanes=g,t;case K:return t=Ce(19,l,n,h),t.elementType=K,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Y:y=10;break t;case H:y=9;break t;case G:y=11;break t;case Q:y=14;break t;case F:y=16,r=null;break t}y=29,l=Error(s(130,t===null?"null":typeof t,"")),r=null}return n=Ce(y,l,n,h),n.elementType=t,n.type=r,n.lanes=g,n}function _i(t,n,l,r){return t=Ce(7,t,r,n),t.lanes=l,t}function Nr(t,n,l){return t=Ce(6,t,null,n),t.lanes=l,t}function yh(t){var n=Ce(18,null,null,0);return n.stateNode=t,n}function jr(t,n,l){return n=Ce(4,t.children!==null?t.children:[],t.key,n),n.lanes=l,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var bh=new WeakMap;function Ve(t,n){if(typeof t=="object"&&t!==null){var l=bh.get(t);return l!==void 0?l:(n={value:t,source:n,stack:yf(n)},bh.set(t,n),n)}return{value:t,source:n,stack:yf(n)}}var na=[],ia=0,vl=null,Wa=0,Ye=[],qe=0,Bn=null,$e=1,Pe="";function dn(t,n){na[ia++]=Wa,na[ia++]=vl,vl=t,Wa=n}function vh(t,n,l){Ye[qe++]=$e,Ye[qe++]=Pe,Ye[qe++]=Bn,Bn=t;var r=$e;t=Pe;var h=32-Oe(r)-1;r&=~(1<<h),l+=1;var g=32-Oe(n)+h;if(30<g){var y=h-h%5;g=(r&(1<<y)-1).toString(32),r>>=y,h-=y,$e=1<<32-Oe(n)+h|l<<h|r,Pe=g+t}else $e=1<<g|l<<h|r,Pe=t}function kr(t){t.return!==null&&(dn(t,1),vh(t,1,0))}function Lr(t){for(;t===vl;)vl=na[--ia],na[ia]=null,Wa=na[--ia],na[ia]=null;for(;t===Bn;)Bn=Ye[--qe],Ye[qe]=null,Pe=Ye[--qe],Ye[qe]=null,$e=Ye[--qe],Ye[qe]=null}function _h(t,n){Ye[qe++]=$e,Ye[qe++]=Pe,Ye[qe++]=Bn,$e=n.id,Pe=n.overflow,Bn=t}var ae=null,Lt=null,vt=!1,Un=null,Xe=!1,Hr=Error(s(519));function Vn(t){var n=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ja(Ve(n,t)),Hr}function xh(t){var n=t.stateNode,l=t.type,r=t.memoizedProps;switch(n[ie]=t,n[ge]=r,l){case"dialog":mt("cancel",n),mt("close",n);break;case"iframe":case"object":case"embed":mt("load",n);break;case"video":case"audio":for(l=0;l<bs.length;l++)mt(bs[l],n);break;case"source":mt("error",n);break;case"img":case"image":case"link":mt("error",n),mt("load",n);break;case"details":mt("toggle",n);break;case"input":mt("invalid",n),jf(n,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":mt("invalid",n);break;case"textarea":mt("invalid",n),Lf(n,r.value,r.defaultValue,r.children)}l=r.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||r.suppressHydrationWarning===!0||Bg(n.textContent,l)?(r.popover!=null&&(mt("beforetoggle",n),mt("toggle",n)),r.onScroll!=null&&mt("scroll",n),r.onScrollEnd!=null&&mt("scrollend",n),r.onClick!=null&&(n.onclick=un),n=!0):n=!1,n||Vn(t,!0)}function Sh(t){for(ae=t.return;ae;)switch(ae.tag){case 5:case 31:case 13:Xe=!1;return;case 27:case 3:Xe=!0;return;default:ae=ae.return}}function aa(t){if(t!==ae)return!1;if(!vt)return Sh(t),vt=!0,!1;var n=t.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||eu(t.type,t.memoizedProps)),l=!l),l&&Lt&&Vn(t),Sh(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));Lt=Kg(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));Lt=Kg(t)}else n===27?(n=Lt,ti(t.type)?(t=lu,lu=null,Lt=t):Lt=n):Lt=ae?Qe(t.stateNode.nextSibling):null;return!0}function xi(){Lt=ae=null,vt=!1}function Br(){var t=Un;return t!==null&&(ve===null?ve=t:ve.push.apply(ve,t),Un=null),t}function Ja(t){Un===null?Un=[t]:Un.push(t)}var Ur=D(null),Si=null,gn=null;function Yn(t,n,l){Z(Ur,n._currentValue),n._currentValue=l}function mn(t){t._currentValue=Ur.current,U(Ur)}function Vr(t,n,l){for(;t!==null;){var r=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),t===l)break;t=t.return}}function Yr(t,n,l,r){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var y=h.child;g=g.firstContext;t:for(;g!==null;){var v=g;g=h;for(var E=0;E<n.length;E++)if(v.context===n[E]){g.lanes|=l,v=g.alternate,v!==null&&(v.lanes|=l),Vr(g.return,l,t),r||(y=null);break t}g=v.next}}else if(h.tag===18){if(y=h.return,y===null)throw Error(s(341));y.lanes|=l,g=y.alternate,g!==null&&(g.lanes|=l),Vr(y,l,t),y=null}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===t){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}}function sa(t,n,l,r){t=null;for(var h=n,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var y=h.alternate;if(y===null)throw Error(s(387));if(y=y.memoizedProps,y!==null){var v=h.type;De(h.pendingProps.value,y.value)||(t!==null?t.push(v):t=[v])}}else if(h===Et.current){if(y=h.alternate,y===null)throw Error(s(387));y.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Ts):t=[Ts])}h=h.return}t!==null&&Yr(n,t,l,r),n.flags|=262144}function _l(t){for(t=t.firstContext;t!==null;){if(!De(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ti(t){Si=t,gn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function se(t){return Th(Si,t)}function xl(t,n){return Si===null&&Ti(t),Th(t,n)}function Th(t,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},gn===null){if(t===null)throw Error(s(308));gn=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else gn=gn.next=n;return l}var Eb=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(l,r){t.push(r)}};this.abort=function(){n.aborted=!0,t.forEach(function(l){return l()})}},Ab=i.unstable_scheduleCallback,Ob=i.unstable_NormalPriority,Wt={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qr(){return{controller:new Eb,data:new Map,refCount:0}}function Ia(t){t.refCount--,t.refCount===0&&Ab(Ob,function(){t.controller.abort()})}var $a=null,Xr=0,la=0,oa=null;function Db(t,n){if($a===null){var l=$a=[];Xr=0,la=Zc(),oa={status:"pending",value:void 0,then:function(r){l.push(r)}}}return Xr++,n.then(Mh,Mh),n}function Mh(){if(--Xr===0&&$a!==null){oa!==null&&(oa.status="fulfilled");var t=$a;$a=null,la=0,oa=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function Cb(t,n){var l=[],r={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){r.status="fulfilled",r.value=n;for(var h=0;h<l.length;h++)(0,l[h])(n)},function(h){for(r.status="rejected",r.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),r}var Eh=j.S;j.S=function(t,n){rg=Ee(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Db(t,n),Eh!==null&&Eh(t,n)};var Mi=D(null);function Gr(){var t=Mi.current;return t!==null?t:Nt.pooledCache}function Sl(t,n){n===null?Z(Mi,Mi.current):Z(Mi,n.pool)}function Ah(){var t=Gr();return t===null?null:{parent:Wt._currentValue,pool:t}}var ra=Error(s(460)),Qr=Error(s(474)),Tl=Error(s(542)),Ml={then:function(){}};function Oh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Dh(t,n,l){switch(l=t[l],l===void 0?t.push(n):l!==n&&(n.then(un,un),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,zh(t),t;default:if(typeof n.status=="string")n.then(un,un);else{if(t=Nt,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=n,t.status="pending",t.then(function(r){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=r}},function(r){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=r}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,zh(t),t}throw Ai=n,ra}}function Ei(t){try{var n=t._init;return n(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ai=l,ra):l}}var Ai=null;function Ch(){if(Ai===null)throw Error(s(459));var t=Ai;return Ai=null,t}function zh(t){if(t===ra||t===Tl)throw Error(s(483))}var ca=null,Pa=0;function El(t){var n=Pa;return Pa+=1,ca===null&&(ca=[]),Dh(ca,t,n)}function ts(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Al(t,n){throw n.$$typeof===_?Error(s(525)):(t=Object.prototype.toString.call(n),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function Rh(t){function n(C,O){if(t){var R=C.deletions;R===null?(C.deletions=[O],C.flags|=16):R.push(O)}}function l(C,O){if(!t)return null;for(;O!==null;)n(C,O),O=O.sibling;return null}function r(C){for(var O=new Map;C!==null;)C.key!==null?O.set(C.key,C):O.set(C.index,C),C=C.sibling;return O}function h(C,O){return C=hn(C,O),C.index=0,C.sibling=null,C}function g(C,O,R){return C.index=R,t?(R=C.alternate,R!==null?(R=R.index,R<O?(C.flags|=67108866,O):R):(C.flags|=67108866,O)):(C.flags|=1048576,O)}function y(C){return t&&C.alternate===null&&(C.flags|=67108866),C}function v(C,O,R,B){return O===null||O.tag!==6?(O=Nr(R,C.mode,B),O.return=C,O):(O=h(O,R),O.return=C,O)}function E(C,O,R,B){var et=R.type;return et===M?L(C,O,R.props.children,B,R.key):O!==null&&(O.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===F&&Ei(et)===O.type)?(O=h(O,R.props),ts(O,R),O.return=C,O):(O=bl(R.type,R.key,R.props,null,C.mode,B),ts(O,R),O.return=C,O)}function w(C,O,R,B){return O===null||O.tag!==4||O.stateNode.containerInfo!==R.containerInfo||O.stateNode.implementation!==R.implementation?(O=jr(R,C.mode,B),O.return=C,O):(O=h(O,R.children||[]),O.return=C,O)}function L(C,O,R,B,et){return O===null||O.tag!==7?(O=_i(R,C.mode,B,et),O.return=C,O):(O=h(O,R),O.return=C,O)}function V(C,O,R){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Nr(""+O,C.mode,R),O.return=C,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case x:return R=bl(O.type,O.key,O.props,null,C.mode,R),ts(R,O),R.return=C,R;case T:return O=jr(O,C.mode,R),O.return=C,O;case F:return O=Ei(O),V(C,O,R)}if(dt(O)||it(O))return O=_i(O,C.mode,R,null),O.return=C,O;if(typeof O.then=="function")return V(C,El(O),R);if(O.$$typeof===Y)return V(C,xl(C,O),R);Al(C,O)}return null}function N(C,O,R,B){var et=O!==null?O.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return et!==null?null:v(C,O,""+R,B);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case x:return R.key===et?E(C,O,R,B):null;case T:return R.key===et?w(C,O,R,B):null;case F:return R=Ei(R),N(C,O,R,B)}if(dt(R)||it(R))return et!==null?null:L(C,O,R,B,null);if(typeof R.then=="function")return N(C,O,El(R),B);if(R.$$typeof===Y)return N(C,O,xl(C,R),B);Al(C,R)}return null}function k(C,O,R,B,et){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return C=C.get(R)||null,v(O,C,""+B,et);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case x:return C=C.get(B.key===null?R:B.key)||null,E(O,C,B,et);case T:return C=C.get(B.key===null?R:B.key)||null,w(O,C,B,et);case F:return B=Ei(B),k(C,O,R,B,et)}if(dt(B)||it(B))return C=C.get(R)||null,L(O,C,B,et,null);if(typeof B.then=="function")return k(C,O,R,El(B),et);if(B.$$typeof===Y)return k(C,O,R,xl(O,B),et);Al(O,B)}return null}function I(C,O,R,B){for(var et=null,xt=null,$=O,ft=O=0,bt=null;$!==null&&ft<R.length;ft++){$.index>ft?(bt=$,$=null):bt=$.sibling;var St=N(C,$,R[ft],B);if(St===null){$===null&&($=bt);break}t&&$&&St.alternate===null&&n(C,$),O=g(St,O,ft),xt===null?et=St:xt.sibling=St,xt=St,$=bt}if(ft===R.length)return l(C,$),vt&&dn(C,ft),et;if($===null){for(;ft<R.length;ft++)$=V(C,R[ft],B),$!==null&&(O=g($,O,ft),xt===null?et=$:xt.sibling=$,xt=$);return vt&&dn(C,ft),et}for($=r($);ft<R.length;ft++)bt=k($,C,ft,R[ft],B),bt!==null&&(t&&bt.alternate!==null&&$.delete(bt.key===null?ft:bt.key),O=g(bt,O,ft),xt===null?et=bt:xt.sibling=bt,xt=bt);return t&&$.forEach(function(si){return n(C,si)}),vt&&dn(C,ft),et}function nt(C,O,R,B){if(R==null)throw Error(s(151));for(var et=null,xt=null,$=O,ft=O=0,bt=null,St=R.next();$!==null&&!St.done;ft++,St=R.next()){$.index>ft?(bt=$,$=null):bt=$.sibling;var si=N(C,$,St.value,B);if(si===null){$===null&&($=bt);break}t&&$&&si.alternate===null&&n(C,$),O=g(si,O,ft),xt===null?et=si:xt.sibling=si,xt=si,$=bt}if(St.done)return l(C,$),vt&&dn(C,ft),et;if($===null){for(;!St.done;ft++,St=R.next())St=V(C,St.value,B),St!==null&&(O=g(St,O,ft),xt===null?et=St:xt.sibling=St,xt=St);return vt&&dn(C,ft),et}for($=r($);!St.done;ft++,St=R.next())St=k($,C,ft,St.value,B),St!==null&&(t&&St.alternate!==null&&$.delete(St.key===null?ft:St.key),O=g(St,O,ft),xt===null?et=St:xt.sibling=St,xt=St);return t&&$.forEach(function(Vv){return n(C,Vv)}),vt&&dn(C,ft),et}function wt(C,O,R,B){if(typeof R=="object"&&R!==null&&R.type===M&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case x:t:{for(var et=R.key;O!==null;){if(O.key===et){if(et=R.type,et===M){if(O.tag===7){l(C,O.sibling),B=h(O,R.props.children),B.return=C,C=B;break t}}else if(O.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===F&&Ei(et)===O.type){l(C,O.sibling),B=h(O,R.props),ts(B,R),B.return=C,C=B;break t}l(C,O);break}else n(C,O);O=O.sibling}R.type===M?(B=_i(R.props.children,C.mode,B,R.key),B.return=C,C=B):(B=bl(R.type,R.key,R.props,null,C.mode,B),ts(B,R),B.return=C,C=B)}return y(C);case T:t:{for(et=R.key;O!==null;){if(O.key===et)if(O.tag===4&&O.stateNode.containerInfo===R.containerInfo&&O.stateNode.implementation===R.implementation){l(C,O.sibling),B=h(O,R.children||[]),B.return=C,C=B;break t}else{l(C,O);break}else n(C,O);O=O.sibling}B=jr(R,C.mode,B),B.return=C,C=B}return y(C);case F:return R=Ei(R),wt(C,O,R,B)}if(dt(R))return I(C,O,R,B);if(it(R)){if(et=it(R),typeof et!="function")throw Error(s(150));return R=et.call(R),nt(C,O,R,B)}if(typeof R.then=="function")return wt(C,O,El(R),B);if(R.$$typeof===Y)return wt(C,O,xl(C,R),B);Al(C,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,O!==null&&O.tag===6?(l(C,O.sibling),B=h(O,R),B.return=C,C=B):(l(C,O),B=Nr(R,C.mode,B),B.return=C,C=B),y(C)):l(C,O)}return function(C,O,R,B){try{Pa=0;var et=wt(C,O,R,B);return ca=null,et}catch($){if($===ra||$===Tl)throw $;var xt=Ce(29,$,null,C.mode);return xt.lanes=B,xt.return=C,xt}}}var Oi=Rh(!0),wh=Rh(!1),qn=!1;function Zr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kr(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Xn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Gn(t,n,l){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,(Mt&2)!==0){var h=r.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),r.pending=n,n=yl(t),mh(t,null,l),n}return pl(t,r,n,l),yl(t)}function es(t,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var r=n.lanes;r&=t.pendingLanes,l|=r,n.lanes=l,Tf(t,l)}}function Fr(t,n){var l=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,l===r)){var h=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?h=g=y:g=g.next=y,l=l.next}while(l!==null);g===null?h=g=n:g=g.next=n}else h=g=n;l={baseState:r.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:r.shared,callbacks:r.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=n:t.next=n,l.lastBaseUpdate=n}var Wr=!1;function ns(){if(Wr){var t=oa;if(t!==null)throw t}}function is(t,n,l,r){Wr=!1;var h=t.updateQueue;qn=!1;var g=h.firstBaseUpdate,y=h.lastBaseUpdate,v=h.shared.pending;if(v!==null){h.shared.pending=null;var E=v,w=E.next;E.next=null,y===null?g=w:y.next=w,y=E;var L=t.alternate;L!==null&&(L=L.updateQueue,v=L.lastBaseUpdate,v!==y&&(v===null?L.firstBaseUpdate=w:v.next=w,L.lastBaseUpdate=E))}if(g!==null){var V=h.baseState;y=0,L=w=E=null,v=g;do{var N=v.lane&-536870913,k=N!==v.lane;if(k?(yt&N)===N:(r&N)===N){N!==0&&N===la&&(Wr=!0),L!==null&&(L=L.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});t:{var I=t,nt=v;N=n;var wt=l;switch(nt.tag){case 1:if(I=nt.payload,typeof I=="function"){V=I.call(wt,V,N);break t}V=I;break t;case 3:I.flags=I.flags&-65537|128;case 0:if(I=nt.payload,N=typeof I=="function"?I.call(wt,V,N):I,N==null)break t;V=b({},V,N);break t;case 2:qn=!0}}N=v.callback,N!==null&&(t.flags|=64,k&&(t.flags|=8192),k=h.callbacks,k===null?h.callbacks=[N]:k.push(N))}else k={lane:N,tag:v.tag,payload:v.payload,callback:v.callback,next:null},L===null?(w=L=k,E=V):L=L.next=k,y|=N;if(v=v.next,v===null){if(v=h.shared.pending,v===null)break;k=v,v=k.next,k.next=null,h.lastBaseUpdate=k,h.shared.pending=null}}while(!0);L===null&&(E=V),h.baseState=E,h.firstBaseUpdate=w,h.lastBaseUpdate=L,g===null&&(h.shared.lanes=0),Wn|=y,t.lanes=y,t.memoizedState=V}}function Nh(t,n){if(typeof t!="function")throw Error(s(191,t));t.call(n)}function jh(t,n){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Nh(l[t],n)}var ua=D(null),Ol=D(0);function kh(t,n){t=Mn,Z(Ol,t),Z(ua,n),Mn=t|n.baseLanes}function Jr(){Z(Ol,Mn),Z(ua,ua.current)}function Ir(){Mn=Ol.current,U(ua),U(Ol)}var ze=D(null),Ge=null;function Qn(t){var n=t.alternate;Z(Zt,Zt.current&1),Z(ze,t),Ge===null&&(n===null||ua.current!==null||n.memoizedState!==null)&&(Ge=t)}function $r(t){Z(Zt,Zt.current),Z(ze,t),Ge===null&&(Ge=t)}function Lh(t){t.tag===22?(Z(Zt,Zt.current),Z(ze,t),Ge===null&&(Ge=t)):Zn()}function Zn(){Z(Zt,Zt.current),Z(ze,ze.current)}function Re(t){U(ze),Ge===t&&(Ge=null),U(Zt)}var Zt=D(0);function Dl(t){for(var n=t;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||au(l)||su(l)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var pn=0,ut=null,zt=null,Jt=null,Cl=!1,fa=!1,Di=!1,zl=0,as=0,ha=null,zb=0;function qt(){throw Error(s(321))}function Pr(t,n){if(n===null)return!1;for(var l=0;l<n.length&&l<t.length;l++)if(!De(t[l],n[l]))return!1;return!0}function tc(t,n,l,r,h,g){return pn=g,ut=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,j.H=t===null||t.memoizedState===null?vd:mc,Di=!1,g=l(r,h),Di=!1,fa&&(g=Bh(n,l,r,h)),Hh(t),g}function Hh(t){j.H=os;var n=zt!==null&&zt.next!==null;if(pn=0,Jt=zt=ut=null,Cl=!1,as=0,ha=null,n)throw Error(s(300));t===null||It||(t=t.dependencies,t!==null&&_l(t)&&(It=!0))}function Bh(t,n,l,r){ut=t;var h=0;do{if(fa&&(ha=null),as=0,fa=!1,25<=h)throw Error(s(301));if(h+=1,Jt=zt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}j.H=_d,g=n(l,r)}while(fa);return g}function Rb(){var t=j.H,n=t.useState()[0];return n=typeof n.then=="function"?ss(n):n,t=t.useState()[0],(zt!==null?zt.memoizedState:null)!==t&&(ut.flags|=1024),n}function ec(){var t=zl!==0;return zl=0,t}function nc(t,n,l){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~l}function ic(t){if(Cl){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Cl=!1}pn=0,Jt=zt=ut=null,fa=!1,as=zl=0,ha=null}function de(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?ut.memoizedState=Jt=t:Jt=Jt.next=t,Jt}function Kt(){if(zt===null){var t=ut.alternate;t=t!==null?t.memoizedState:null}else t=zt.next;var n=Jt===null?ut.memoizedState:Jt.next;if(n!==null)Jt=n,zt=t;else{if(t===null)throw ut.alternate===null?Error(s(467)):Error(s(310));zt=t,t={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Jt===null?ut.memoizedState=Jt=t:Jt=Jt.next=t}return Jt}function Rl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ss(t){var n=as;return as+=1,ha===null&&(ha=[]),t=Dh(ha,t,n),n=ut,(Jt===null?n.memoizedState:Jt.next)===null&&(n=n.alternate,j.H=n===null||n.memoizedState===null?vd:mc),t}function wl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ss(t);if(t.$$typeof===Y)return se(t)}throw Error(s(438,String(t)))}function ac(t){var n=null,l=ut.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var r=ut.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(n={data:r.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Rl(),ut.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(t),r=0;r<t;r++)l[r]=ct;return n.index++,l}function yn(t,n){return typeof n=="function"?n(t):n}function Nl(t){var n=Kt();return sc(n,zt,t)}function sc(t,n,l){var r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=l;var h=t.baseQueue,g=r.pending;if(g!==null){if(h!==null){var y=h.next;h.next=g.next,g.next=y}n.baseQueue=h=g,r.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{n=h.next;var v=y=null,E=null,w=n,L=!1;do{var V=w.lane&-536870913;if(V!==w.lane?(yt&V)===V:(pn&V)===V){var N=w.revertLane;if(N===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null}),V===la&&(L=!0);else if((pn&N)===N){w=w.next,N===la&&(L=!0);continue}else V={lane:0,revertLane:w.revertLane,gesture:null,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null},E===null?(v=E=V,y=g):E=E.next=V,ut.lanes|=N,Wn|=N;V=w.action,Di&&l(g,V),g=w.hasEagerState?w.eagerState:l(g,V)}else N={lane:V,revertLane:w.revertLane,gesture:w.gesture,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null},E===null?(v=E=N,y=g):E=E.next=N,ut.lanes|=V,Wn|=V;w=w.next}while(w!==null&&w!==n);if(E===null?y=g:E.next=v,!De(g,t.memoizedState)&&(It=!0,L&&(l=oa,l!==null)))throw l;t.memoizedState=g,t.baseState=y,t.baseQueue=E,r.lastRenderedState=g}return h===null&&(r.lanes=0),[t.memoizedState,r.dispatch]}function lc(t){var n=Kt(),l=n.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=t;var r=l.dispatch,h=l.pending,g=n.memoizedState;if(h!==null){l.pending=null;var y=h=h.next;do g=t(g,y.action),y=y.next;while(y!==h);De(g,n.memoizedState)||(It=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),l.lastRenderedState=g}return[g,r]}function Uh(t,n,l){var r=ut,h=Kt(),g=vt;if(g){if(l===void 0)throw Error(s(407));l=l()}else l=n();var y=!De((zt||h).memoizedState,l);if(y&&(h.memoizedState=l,It=!0),h=h.queue,cc(qh.bind(null,r,h,t),[t]),h.getSnapshot!==n||y||Jt!==null&&Jt.memoizedState.tag&1){if(r.flags|=2048,da(9,{destroy:void 0},Yh.bind(null,r,h,l,n),null),Nt===null)throw Error(s(349));g||(pn&127)!==0||Vh(r,n,l)}return l}function Vh(t,n,l){t.flags|=16384,t={getSnapshot:n,value:l},n=ut.updateQueue,n===null?(n=Rl(),ut.updateQueue=n,n.stores=[t]):(l=n.stores,l===null?n.stores=[t]:l.push(t))}function Yh(t,n,l,r){n.value=l,n.getSnapshot=r,Xh(n)&&Gh(t)}function qh(t,n,l){return l(function(){Xh(n)&&Gh(t)})}function Xh(t){var n=t.getSnapshot;t=t.value;try{var l=n();return!De(t,l)}catch{return!0}}function Gh(t){var n=vi(t,2);n!==null&&_e(n,t,2)}function oc(t){var n=de();if(typeof t=="function"){var l=t;if(t=l(),Di){kn(!0);try{l()}finally{kn(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:t},n}function Qh(t,n,l,r){return t.baseState=l,sc(t,zt,typeof r=="function"?r:yn)}function wb(t,n,l,r,h){if(Ll(t))throw Error(s(485));if(t=n.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){g.listeners.push(y)}};j.T!==null?l(!0):g.isTransition=!1,r(g),l=n.pending,l===null?(g.next=n.pending=g,Zh(n,g)):(g.next=l.next,n.pending=l.next=g)}}function Zh(t,n){var l=n.action,r=n.payload,h=t.state;if(n.isTransition){var g=j.T,y={};j.T=y;try{var v=l(h,r),E=j.S;E!==null&&E(y,v),Kh(t,n,v)}catch(w){rc(t,n,w)}finally{g!==null&&y.types!==null&&(g.types=y.types),j.T=g}}else try{g=l(h,r),Kh(t,n,g)}catch(w){rc(t,n,w)}}function Kh(t,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(r){Fh(t,n,r)},function(r){return rc(t,n,r)}):Fh(t,n,l)}function Fh(t,n,l){n.status="fulfilled",n.value=l,Wh(n),t.state=l,n=t.pending,n!==null&&(l=n.next,l===n?t.pending=null:(l=l.next,n.next=l,Zh(t,l)))}function rc(t,n,l){var r=t.pending;if(t.pending=null,r!==null){r=r.next;do n.status="rejected",n.reason=l,Wh(n),n=n.next;while(n!==r)}t.action=null}function Wh(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function Jh(t,n){return n}function Ih(t,n){if(vt){var l=Nt.formState;if(l!==null){t:{var r=ut;if(vt){if(Lt){e:{for(var h=Lt,g=Xe;h.nodeType!==8;){if(!g){h=null;break e}if(h=Qe(h.nextSibling),h===null){h=null;break e}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){Lt=Qe(h.nextSibling),r=h.data==="F!";break t}}Vn(r)}r=!1}r&&(n=l[0])}}return l=de(),l.memoizedState=l.baseState=n,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:n},l.queue=r,l=pd.bind(null,ut,r),r.dispatch=l,r=oc(!1),g=gc.bind(null,ut,!1,r.queue),r=de(),h={state:n,dispatch:null,action:t,pending:null},r.queue=h,l=wb.bind(null,ut,h,g,l),h.dispatch=l,r.memoizedState=t,[n,l,!1]}function $h(t){var n=Kt();return Ph(n,zt,t)}function Ph(t,n,l){if(n=sc(t,n,Jh)[0],t=Nl(yn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var r=ss(n)}catch(y){throw y===ra?Tl:y}else r=n;n=Kt();var h=n.queue,g=h.dispatch;return l!==n.memoizedState&&(ut.flags|=2048,da(9,{destroy:void 0},Nb.bind(null,h,l),null)),[r,g,t]}function Nb(t,n){t.action=n}function td(t){var n=Kt(),l=zt;if(l!==null)return Ph(n,l,t);Kt(),n=n.memoizedState,l=Kt();var r=l.queue.dispatch;return l.memoizedState=t,[n,r,!1]}function da(t,n,l,r){return t={tag:t,create:l,deps:r,inst:n,next:null},n=ut.updateQueue,n===null&&(n=Rl(),ut.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=t.next=t:(r=l.next,l.next=t,t.next=r,n.lastEffect=t),t}function ed(){return Kt().memoizedState}function jl(t,n,l,r){var h=de();ut.flags|=t,h.memoizedState=da(1|n,{destroy:void 0},l,r===void 0?null:r)}function kl(t,n,l,r){var h=Kt();r=r===void 0?null:r;var g=h.memoizedState.inst;zt!==null&&r!==null&&Pr(r,zt.memoizedState.deps)?h.memoizedState=da(n,g,l,r):(ut.flags|=t,h.memoizedState=da(1|n,g,l,r))}function nd(t,n){jl(8390656,8,t,n)}function cc(t,n){kl(2048,8,t,n)}function jb(t){ut.flags|=4;var n=ut.updateQueue;if(n===null)n=Rl(),ut.updateQueue=n,n.events=[t];else{var l=n.events;l===null?n.events=[t]:l.push(t)}}function id(t){var n=Kt().memoizedState;return jb({ref:n,nextImpl:t}),function(){if((Mt&2)!==0)throw Error(s(440));return n.impl.apply(void 0,arguments)}}function ad(t,n){return kl(4,2,t,n)}function sd(t,n){return kl(4,4,t,n)}function ld(t,n){if(typeof n=="function"){t=t();var l=n(t);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function od(t,n,l){l=l!=null?l.concat([t]):null,kl(4,4,ld.bind(null,n,t),l)}function uc(){}function rd(t,n){var l=Kt();n=n===void 0?null:n;var r=l.memoizedState;return n!==null&&Pr(n,r[1])?r[0]:(l.memoizedState=[t,n],t)}function cd(t,n){var l=Kt();n=n===void 0?null:n;var r=l.memoizedState;if(n!==null&&Pr(n,r[1]))return r[0];if(r=t(),Di){kn(!0);try{t()}finally{kn(!1)}}return l.memoizedState=[r,n],r}function fc(t,n,l){return l===void 0||(pn&1073741824)!==0&&(yt&261930)===0?t.memoizedState=n:(t.memoizedState=l,t=ug(),ut.lanes|=t,Wn|=t,l)}function ud(t,n,l,r){return De(l,n)?l:ua.current!==null?(t=fc(t,l,r),De(t,n)||(It=!0),t):(pn&42)===0||(pn&1073741824)!==0&&(yt&261930)===0?(It=!0,t.memoizedState=l):(t=ug(),ut.lanes|=t,Wn|=t,n)}function fd(t,n,l,r,h){var g=X.p;X.p=g!==0&&8>g?g:8;var y=j.T,v={};j.T=v,gc(t,!1,n,l);try{var E=h(),w=j.S;if(w!==null&&w(v,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var L=Cb(E,r);ls(t,n,L,je(t))}else ls(t,n,r,je(t))}catch(V){ls(t,n,{then:function(){},status:"rejected",reason:V},je())}finally{X.p=g,y!==null&&v.types!==null&&(y.types=v.types),j.T=y}}function kb(){}function hc(t,n,l,r){if(t.tag!==5)throw Error(s(476));var h=hd(t).queue;fd(t,h,n,P,l===null?kb:function(){return dd(t),l(r)})}function hd(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:P},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:l},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function dd(t){var n=hd(t);n.next===null&&(n=t.alternate.memoizedState),ls(t,n.next.queue,{},je())}function dc(){return se(Ts)}function gd(){return Kt().memoizedState}function md(){return Kt().memoizedState}function Lb(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var l=je();t=Xn(l);var r=Gn(n,t,l);r!==null&&(_e(r,n,l),es(r,n,l)),n={cache:qr()},t.payload=n;return}n=n.return}}function Hb(t,n,l){var r=je();l={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ll(t)?yd(n,l):(l=Rr(t,n,l,r),l!==null&&(_e(l,t,r),bd(l,n,r)))}function pd(t,n,l){var r=je();ls(t,n,l,r)}function ls(t,n,l,r){var h={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ll(t))yd(n,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var y=n.lastRenderedState,v=g(y,l);if(h.hasEagerState=!0,h.eagerState=v,De(v,y))return pl(t,n,h,0),Nt===null&&ml(),!1}catch{}if(l=Rr(t,n,h,r),l!==null)return _e(l,t,r),bd(l,n,r),!0}return!1}function gc(t,n,l,r){if(r={lane:2,revertLane:Zc(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ll(t)){if(n)throw Error(s(479))}else n=Rr(t,l,r,2),n!==null&&_e(n,t,2)}function Ll(t){var n=t.alternate;return t===ut||n!==null&&n===ut}function yd(t,n){fa=Cl=!0;var l=t.pending;l===null?n.next=n:(n.next=l.next,l.next=n),t.pending=n}function bd(t,n,l){if((l&4194048)!==0){var r=n.lanes;r&=t.pendingLanes,l|=r,n.lanes=l,Tf(t,l)}}var os={readContext:se,use:wl,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};os.useEffectEvent=qt;var vd={readContext:se,use:wl,useCallback:function(t,n){return de().memoizedState=[t,n===void 0?null:n],t},useContext:se,useEffect:nd,useImperativeHandle:function(t,n,l){l=l!=null?l.concat([t]):null,jl(4194308,4,ld.bind(null,n,t),l)},useLayoutEffect:function(t,n){return jl(4194308,4,t,n)},useInsertionEffect:function(t,n){jl(4,2,t,n)},useMemo:function(t,n){var l=de();n=n===void 0?null:n;var r=t();if(Di){kn(!0);try{t()}finally{kn(!1)}}return l.memoizedState=[r,n],r},useReducer:function(t,n,l){var r=de();if(l!==void 0){var h=l(n);if(Di){kn(!0);try{l(n)}finally{kn(!1)}}}else h=n;return r.memoizedState=r.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},r.queue=t,t=t.dispatch=Hb.bind(null,ut,t),[r.memoizedState,t]},useRef:function(t){var n=de();return t={current:t},n.memoizedState=t},useState:function(t){t=oc(t);var n=t.queue,l=pd.bind(null,ut,n);return n.dispatch=l,[t.memoizedState,l]},useDebugValue:uc,useDeferredValue:function(t,n){var l=de();return fc(l,t,n)},useTransition:function(){var t=oc(!1);return t=fd.bind(null,ut,t.queue,!0,!1),de().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,l){var r=ut,h=de();if(vt){if(l===void 0)throw Error(s(407));l=l()}else{if(l=n(),Nt===null)throw Error(s(349));(yt&127)!==0||Vh(r,n,l)}h.memoizedState=l;var g={value:l,getSnapshot:n};return h.queue=g,nd(qh.bind(null,r,g,t),[t]),r.flags|=2048,da(9,{destroy:void 0},Yh.bind(null,r,g,l,n),null),l},useId:function(){var t=de(),n=Nt.identifierPrefix;if(vt){var l=Pe,r=$e;l=(r&~(1<<32-Oe(r)-1)).toString(32)+l,n="_"+n+"R_"+l,l=zl++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=zb++,n="_"+n+"r_"+l.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:dc,useFormState:Ih,useActionState:Ih,useOptimistic:function(t){var n=de();n.memoizedState=n.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=gc.bind(null,ut,!0,l),l.dispatch=n,[t,n]},useMemoCache:ac,useCacheRefresh:function(){return de().memoizedState=Lb.bind(null,ut)},useEffectEvent:function(t){var n=de(),l={impl:t};return n.memoizedState=l,function(){if((Mt&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},mc={readContext:se,use:wl,useCallback:rd,useContext:se,useEffect:cc,useImperativeHandle:od,useInsertionEffect:ad,useLayoutEffect:sd,useMemo:cd,useReducer:Nl,useRef:ed,useState:function(){return Nl(yn)},useDebugValue:uc,useDeferredValue:function(t,n){var l=Kt();return ud(l,zt.memoizedState,t,n)},useTransition:function(){var t=Nl(yn)[0],n=Kt().memoizedState;return[typeof t=="boolean"?t:ss(t),n]},useSyncExternalStore:Uh,useId:gd,useHostTransitionStatus:dc,useFormState:$h,useActionState:$h,useOptimistic:function(t,n){var l=Kt();return Qh(l,zt,t,n)},useMemoCache:ac,useCacheRefresh:md};mc.useEffectEvent=id;var _d={readContext:se,use:wl,useCallback:rd,useContext:se,useEffect:cc,useImperativeHandle:od,useInsertionEffect:ad,useLayoutEffect:sd,useMemo:cd,useReducer:lc,useRef:ed,useState:function(){return lc(yn)},useDebugValue:uc,useDeferredValue:function(t,n){var l=Kt();return zt===null?fc(l,t,n):ud(l,zt.memoizedState,t,n)},useTransition:function(){var t=lc(yn)[0],n=Kt().memoizedState;return[typeof t=="boolean"?t:ss(t),n]},useSyncExternalStore:Uh,useId:gd,useHostTransitionStatus:dc,useFormState:td,useActionState:td,useOptimistic:function(t,n){var l=Kt();return zt!==null?Qh(l,zt,t,n):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:ac,useCacheRefresh:md};_d.useEffectEvent=id;function pc(t,n,l,r){n=t.memoizedState,l=l(r,n),l=l==null?n:b({},n,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var yc={enqueueSetState:function(t,n,l){t=t._reactInternals;var r=je(),h=Xn(r);h.payload=n,l!=null&&(h.callback=l),n=Gn(t,h,r),n!==null&&(_e(n,t,r),es(n,t,r))},enqueueReplaceState:function(t,n,l){t=t._reactInternals;var r=je(),h=Xn(r);h.tag=1,h.payload=n,l!=null&&(h.callback=l),n=Gn(t,h,r),n!==null&&(_e(n,t,r),es(n,t,r))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var l=je(),r=Xn(l);r.tag=2,n!=null&&(r.callback=n),n=Gn(t,r,l),n!==null&&(_e(n,t,l),es(n,t,l))}};function xd(t,n,l,r,h,g,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,g,y):n.prototype&&n.prototype.isPureReactComponent?!Ka(l,r)||!Ka(h,g):!0}function Sd(t,n,l,r){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,r),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,r),n.state!==t&&yc.enqueueReplaceState(n,n.state,null)}function Ci(t,n){var l=n;if("ref"in n){l={};for(var r in n)r!=="ref"&&(l[r]=n[r])}if(t=t.defaultProps){l===n&&(l=b({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}function Td(t){gl(t)}function Md(t){console.error(t)}function Ed(t){gl(t)}function Hl(t,n){try{var l=t.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(r){setTimeout(function(){throw r})}}function Ad(t,n,l){try{var r=t.onCaughtError;r(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function bc(t,n,l){return l=Xn(l),l.tag=3,l.payload={element:null},l.callback=function(){Hl(t,n)},l}function Od(t){return t=Xn(t),t.tag=3,t}function Dd(t,n,l,r){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var g=r.value;t.payload=function(){return h(g)},t.callback=function(){Ad(n,l,r)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){Ad(n,l,r),typeof h!="function"&&(Jn===null?Jn=new Set([this]):Jn.add(this));var v=r.stack;this.componentDidCatch(r.value,{componentStack:v!==null?v:""})})}function Bb(t,n,l,r,h){if(l.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(n=l.alternate,n!==null&&sa(n,l,h,!0),l=ze.current,l!==null){switch(l.tag){case 31:case 13:return Ge===null?Wl():l.alternate===null&&Xt===0&&(Xt=3),l.flags&=-257,l.flags|=65536,l.lanes=h,r===Ml?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([r]):n.add(r),Xc(t,r,h)),!1;case 22:return l.flags|=65536,r===Ml?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([r])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([r]):l.add(r)),Xc(t,r,h)),!1}throw Error(s(435,l.tag))}return Xc(t,r,h),Wl(),!1}if(vt)return n=ze.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,r!==Hr&&(t=Error(s(422),{cause:r}),Ja(Ve(t,l)))):(r!==Hr&&(n=Error(s(423),{cause:r}),Ja(Ve(n,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,r=Ve(r,l),h=bc(t.stateNode,r,h),Fr(t,h),Xt!==4&&(Xt=2)),!1;var g=Error(s(520),{cause:r});if(g=Ve(g,l),ms===null?ms=[g]:ms.push(g),Xt!==4&&(Xt=2),n===null)return!0;r=Ve(r,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=bc(l.stateNode,r,t),Fr(l,t),!1;case 1:if(n=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Jn===null||!Jn.has(g))))return l.flags|=65536,h&=-h,l.lanes|=h,h=Od(h),Dd(h,t,l,r),Fr(l,h),!1}l=l.return}while(l!==null);return!1}var vc=Error(s(461)),It=!1;function le(t,n,l,r){n.child=t===null?wh(n,null,l,r):Oi(n,t.child,l,r)}function Cd(t,n,l,r,h){l=l.render;var g=n.ref;if("ref"in r){var y={};for(var v in r)v!=="ref"&&(y[v]=r[v])}else y=r;return Ti(n),r=tc(t,n,l,y,g,h),v=ec(),t!==null&&!It?(nc(t,n,h),bn(t,n,h)):(vt&&v&&kr(n),n.flags|=1,le(t,n,r,h),n.child)}function zd(t,n,l,r,h){if(t===null){var g=l.type;return typeof g=="function"&&!wr(g)&&g.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=g,Rd(t,n,g,r,h)):(t=bl(l.type,null,r,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,!Oc(t,h)){var y=g.memoizedProps;if(l=l.compare,l=l!==null?l:Ka,l(y,r)&&t.ref===n.ref)return bn(t,n,h)}return n.flags|=1,t=hn(g,r),t.ref=n.ref,t.return=n,n.child=t}function Rd(t,n,l,r,h){if(t!==null){var g=t.memoizedProps;if(Ka(g,r)&&t.ref===n.ref)if(It=!1,n.pendingProps=r=g,Oc(t,h))(t.flags&131072)!==0&&(It=!0);else return n.lanes=t.lanes,bn(t,n,h)}return _c(t,n,l,r,h)}function wd(t,n,l,r){var h=r.children,g=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|l:l,t!==null){for(r=n.child=t.child,h=0;r!==null;)h=h|r.lanes|r.childLanes,r=r.sibling;r=h&~g}else r=0,n.child=null;return Nd(t,n,g,l,r)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Sl(n,g!==null?g.cachePool:null),g!==null?kh(n,g):Jr(),Lh(n);else return r=n.lanes=536870912,Nd(t,n,g!==null?g.baseLanes|l:l,l,r)}else g!==null?(Sl(n,g.cachePool),kh(n,g),Zn(),n.memoizedState=null):(t!==null&&Sl(n,null),Jr(),Zn());return le(t,n,h,l),n.child}function rs(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Nd(t,n,l,r,h){var g=Gr();return g=g===null?null:{parent:Wt._currentValue,pool:g},n.memoizedState={baseLanes:l,cachePool:g},t!==null&&Sl(n,null),Jr(),Lh(n),t!==null&&sa(t,n,r,!0),n.childLanes=h,null}function Bl(t,n){return n=Vl({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function jd(t,n,l){return Oi(n,t.child,null,l),t=Bl(n,n.pendingProps),t.flags|=2,Re(n),n.memoizedState=null,t}function Ub(t,n,l){var r=n.pendingProps,h=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(vt){if(r.mode==="hidden")return t=Bl(n,r),n.lanes=536870912,rs(null,t);if($r(n),(t=Lt)?(t=Zg(t,Xe),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Bn!==null?{id:$e,overflow:Pe}:null,retryLane:536870912,hydrationErrors:null},l=yh(t),l.return=n,n.child=l,ae=n,Lt=null)):t=null,t===null)throw Vn(n);return n.lanes=536870912,null}return Bl(n,r)}var g=t.memoizedState;if(g!==null){var y=g.dehydrated;if($r(n),h)if(n.flags&256)n.flags&=-257,n=jd(t,n,l);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(s(558));else if(It||sa(t,n,l,!1),h=(l&t.childLanes)!==0,It||h){if(r=Nt,r!==null&&(y=Mf(r,l),y!==0&&y!==g.retryLane))throw g.retryLane=y,vi(t,y),_e(r,t,y),vc;Wl(),n=jd(t,n,l)}else t=g.treeContext,Lt=Qe(y.nextSibling),ae=n,vt=!0,Un=null,Xe=!1,t!==null&&_h(n,t),n=Bl(n,r),n.flags|=4096;return n}return t=hn(t.child,{mode:r.mode,children:r.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Ul(t,n){var l=n.ref;if(l===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(t===null||t.ref!==l)&&(n.flags|=4194816)}}function _c(t,n,l,r,h){return Ti(n),l=tc(t,n,l,r,void 0,h),r=ec(),t!==null&&!It?(nc(t,n,h),bn(t,n,h)):(vt&&r&&kr(n),n.flags|=1,le(t,n,l,h),n.child)}function kd(t,n,l,r,h,g){return Ti(n),n.updateQueue=null,l=Bh(n,r,l,h),Hh(t),r=ec(),t!==null&&!It?(nc(t,n,g),bn(t,n,g)):(vt&&r&&kr(n),n.flags|=1,le(t,n,l,g),n.child)}function Ld(t,n,l,r,h){if(Ti(n),n.stateNode===null){var g=ea,y=l.contextType;typeof y=="object"&&y!==null&&(g=se(y)),g=new l(r,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=yc,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=r,g.state=n.memoizedState,g.refs={},Zr(n),y=l.contextType,g.context=typeof y=="object"&&y!==null?se(y):ea,g.state=n.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(pc(n,l,y,r),g.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(y=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),y!==g.state&&yc.enqueueReplaceState(g,g.state,null),is(n,r,g,h),ns(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),r=!0}else if(t===null){g=n.stateNode;var v=n.memoizedProps,E=Ci(l,v);g.props=E;var w=g.context,L=l.contextType;y=ea,typeof L=="object"&&L!==null&&(y=se(L));var V=l.getDerivedStateFromProps;L=typeof V=="function"||typeof g.getSnapshotBeforeUpdate=="function",v=n.pendingProps!==v,L||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(v||w!==y)&&Sd(n,g,r,y),qn=!1;var N=n.memoizedState;g.state=N,is(n,r,g,h),ns(),w=n.memoizedState,v||N!==w||qn?(typeof V=="function"&&(pc(n,l,V,r),w=n.memoizedState),(E=qn||xd(n,l,E,r,N,w,y))?(L||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=w),g.props=r,g.state=w,g.context=y,r=E):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{g=n.stateNode,Kr(t,n),y=n.memoizedProps,L=Ci(l,y),g.props=L,V=n.pendingProps,N=g.context,w=l.contextType,E=ea,typeof w=="object"&&w!==null&&(E=se(w)),v=l.getDerivedStateFromProps,(w=typeof v=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(y!==V||N!==E)&&Sd(n,g,r,E),qn=!1,N=n.memoizedState,g.state=N,is(n,r,g,h),ns();var k=n.memoizedState;y!==V||N!==k||qn||t!==null&&t.dependencies!==null&&_l(t.dependencies)?(typeof v=="function"&&(pc(n,l,v,r),k=n.memoizedState),(L=qn||xd(n,l,L,r,N,k,E)||t!==null&&t.dependencies!==null&&_l(t.dependencies))?(w||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(r,k,E),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(r,k,E)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||y===t.memoizedProps&&N===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&N===t.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=k),g.props=r,g.state=k,g.context=E,r=L):(typeof g.componentDidUpdate!="function"||y===t.memoizedProps&&N===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&N===t.memoizedState||(n.flags|=1024),r=!1)}return g=r,Ul(t,n),r=(n.flags&128)!==0,g||r?(g=n.stateNode,l=r&&typeof l.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,t!==null&&r?(n.child=Oi(n,t.child,null,h),n.child=Oi(n,null,l,h)):le(t,n,l,h),n.memoizedState=g.state,t=n.child):t=bn(t,n,h),t}function Hd(t,n,l,r){return xi(),n.flags|=256,le(t,n,l,r),n.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(t){return{baseLanes:t,cachePool:Ah()}}function Tc(t,n,l){return t=t!==null?t.childLanes&~l:0,n&&(t|=Ne),t}function Bd(t,n,l){var r=n.pendingProps,h=!1,g=(n.flags&128)!==0,y;if((y=g)||(y=t!==null&&t.memoizedState===null?!1:(Zt.current&2)!==0),y&&(h=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,t===null){if(vt){if(h?Qn(n):Zn(),(t=Lt)?(t=Zg(t,Xe),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Bn!==null?{id:$e,overflow:Pe}:null,retryLane:536870912,hydrationErrors:null},l=yh(t),l.return=n,n.child=l,ae=n,Lt=null)):t=null,t===null)throw Vn(n);return su(t)?n.lanes=32:n.lanes=536870912,null}var v=r.children;return r=r.fallback,h?(Zn(),h=n.mode,v=Vl({mode:"hidden",children:v},h),r=_i(r,h,l,null),v.return=n,r.return=n,v.sibling=r,n.child=v,r=n.child,r.memoizedState=Sc(l),r.childLanes=Tc(t,y,l),n.memoizedState=xc,rs(null,r)):(Qn(n),Mc(n,v))}var E=t.memoizedState;if(E!==null&&(v=E.dehydrated,v!==null)){if(g)n.flags&256?(Qn(n),n.flags&=-257,n=Ec(t,n,l)):n.memoizedState!==null?(Zn(),n.child=t.child,n.flags|=128,n=null):(Zn(),v=r.fallback,h=n.mode,r=Vl({mode:"visible",children:r.children},h),v=_i(v,h,l,null),v.flags|=2,r.return=n,v.return=n,r.sibling=v,n.child=r,Oi(n,t.child,null,l),r=n.child,r.memoizedState=Sc(l),r.childLanes=Tc(t,y,l),n.memoizedState=xc,n=rs(null,r));else if(Qn(n),su(v)){if(y=v.nextSibling&&v.nextSibling.dataset,y)var w=y.dgst;y=w,r=Error(s(419)),r.stack="",r.digest=y,Ja({value:r,source:null,stack:null}),n=Ec(t,n,l)}else if(It||sa(t,n,l,!1),y=(l&t.childLanes)!==0,It||y){if(y=Nt,y!==null&&(r=Mf(y,l),r!==0&&r!==E.retryLane))throw E.retryLane=r,vi(t,r),_e(y,t,r),vc;au(v)||Wl(),n=Ec(t,n,l)}else au(v)?(n.flags|=192,n.child=t.child,n=null):(t=E.treeContext,Lt=Qe(v.nextSibling),ae=n,vt=!0,Un=null,Xe=!1,t!==null&&_h(n,t),n=Mc(n,r.children),n.flags|=4096);return n}return h?(Zn(),v=r.fallback,h=n.mode,E=t.child,w=E.sibling,r=hn(E,{mode:"hidden",children:r.children}),r.subtreeFlags=E.subtreeFlags&65011712,w!==null?v=hn(w,v):(v=_i(v,h,l,null),v.flags|=2),v.return=n,r.return=n,r.sibling=v,n.child=r,rs(null,r),r=n.child,v=t.child.memoizedState,v===null?v=Sc(l):(h=v.cachePool,h!==null?(E=Wt._currentValue,h=h.parent!==E?{parent:E,pool:E}:h):h=Ah(),v={baseLanes:v.baseLanes|l,cachePool:h}),r.memoizedState=v,r.childLanes=Tc(t,y,l),n.memoizedState=xc,rs(t.child,r)):(Qn(n),l=t.child,t=l.sibling,l=hn(l,{mode:"visible",children:r.children}),l.return=n,l.sibling=null,t!==null&&(y=n.deletions,y===null?(n.deletions=[t],n.flags|=16):y.push(t)),n.child=l,n.memoizedState=null,l)}function Mc(t,n){return n=Vl({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Vl(t,n){return t=Ce(22,t,null,n),t.lanes=0,t}function Ec(t,n,l){return Oi(n,t.child,null,l),t=Mc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Ud(t,n,l){t.lanes|=n;var r=t.alternate;r!==null&&(r.lanes|=n),Vr(t.return,n,l)}function Ac(t,n,l,r,h,g){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:l,tailMode:h,treeForkCount:g}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=l,y.tailMode=h,y.treeForkCount=g)}function Vd(t,n,l){var r=n.pendingProps,h=r.revealOrder,g=r.tail;r=r.children;var y=Zt.current,v=(y&2)!==0;if(v?(y=y&1|2,n.flags|=128):y&=1,Z(Zt,y),le(t,n,r,l),r=vt?Wa:0,!v&&t!==null&&(t.flags&128)!==0)t:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ud(t,l,n);else if(t.tag===19)Ud(t,l,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break t;for(;t.sibling===null;){if(t.return===null||t.return===n)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(h){case"forwards":for(l=n.child,h=null;l!==null;)t=l.alternate,t!==null&&Dl(t)===null&&(h=l),l=l.sibling;l=h,l===null?(h=n.child,n.child=null):(h=l.sibling,l.sibling=null),Ac(n,!1,h,l,g,r);break;case"backwards":case"unstable_legacy-backwards":for(l=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&Dl(t)===null){n.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}Ac(n,!0,l,null,g,r);break;case"together":Ac(n,!1,null,null,void 0,r);break;default:n.memoizedState=null}return n.child}function bn(t,n,l){if(t!==null&&(n.dependencies=t.dependencies),Wn|=n.lanes,(l&n.childLanes)===0)if(t!==null){if(sa(t,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(s(153));if(n.child!==null){for(t=n.child,l=hn(t,t.pendingProps),n.child=l,l.return=n;t.sibling!==null;)t=t.sibling,l=l.sibling=hn(t,t.pendingProps),l.return=n;l.sibling=null}return n.child}function Oc(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&_l(t)))}function Vb(t,n,l){switch(n.tag){case 3:he(n,n.stateNode.containerInfo),Yn(n,Wt,t.memoizedState.cache),xi();break;case 27:case 5:ja(n);break;case 4:he(n,n.stateNode.containerInfo);break;case 10:Yn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,$r(n),null;break;case 13:var r=n.memoizedState;if(r!==null)return r.dehydrated!==null?(Qn(n),n.flags|=128,null):(l&n.child.childLanes)!==0?Bd(t,n,l):(Qn(n),t=bn(t,n,l),t!==null?t.sibling:null);Qn(n);break;case 19:var h=(t.flags&128)!==0;if(r=(l&n.childLanes)!==0,r||(sa(t,n,l,!1),r=(l&n.childLanes)!==0),h){if(r)return Vd(t,n,l);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Z(Zt,Zt.current),r)break;return null;case 22:return n.lanes=0,wd(t,n,l,n.pendingProps);case 24:Yn(n,Wt,t.memoizedState.cache)}return bn(t,n,l)}function Yd(t,n,l){if(t!==null)if(t.memoizedProps!==n.pendingProps)It=!0;else{if(!Oc(t,l)&&(n.flags&128)===0)return It=!1,Vb(t,n,l);It=(t.flags&131072)!==0}else It=!1,vt&&(n.flags&1048576)!==0&&vh(n,Wa,n.index);switch(n.lanes=0,n.tag){case 16:t:{var r=n.pendingProps;if(t=Ei(n.elementType),n.type=t,typeof t=="function")wr(t)?(r=Ci(t,r),n.tag=1,n=Ld(null,n,t,r,l)):(n.tag=0,n=_c(null,n,t,r,l));else{if(t!=null){var h=t.$$typeof;if(h===G){n.tag=11,n=Cd(null,n,t,r,l);break t}else if(h===Q){n.tag=14,n=zd(null,n,t,r,l);break t}}throw n=Vt(t)||t,Error(s(306,n,""))}}return n;case 0:return _c(t,n,n.type,n.pendingProps,l);case 1:return r=n.type,h=Ci(r,n.pendingProps),Ld(t,n,r,h,l);case 3:t:{if(he(n,n.stateNode.containerInfo),t===null)throw Error(s(387));r=n.pendingProps;var g=n.memoizedState;h=g.element,Kr(t,n),is(n,r,null,l);var y=n.memoizedState;if(r=y.cache,Yn(n,Wt,r),r!==g.cache&&Yr(n,[Wt],l,!0),ns(),r=y.element,g.isDehydrated)if(g={element:r,isDehydrated:!1,cache:y.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=Hd(t,n,r,l);break t}else if(r!==h){h=Ve(Error(s(424)),n),Ja(h),n=Hd(t,n,r,l);break t}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,Lt=Qe(t.firstChild),ae=n,vt=!0,Un=null,Xe=!0,l=wh(n,null,r,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(xi(),r===h){n=bn(t,n,l);break t}le(t,n,r,l)}n=n.child}return n;case 26:return Ul(t,n),t===null?(l=$g(n.type,null,n.pendingProps,null))?n.memoizedState=l:vt||(l=n.type,t=n.pendingProps,r=no(ot.current).createElement(l),r[ie]=n,r[ge]=t,oe(r,l,t),ee(r),n.stateNode=r):n.memoizedState=$g(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return ja(n),t===null&&vt&&(r=n.stateNode=Wg(n.type,n.pendingProps,ot.current),ae=n,Xe=!0,h=Lt,ti(n.type)?(lu=h,Lt=Qe(r.firstChild)):Lt=h),le(t,n,n.pendingProps.children,l),Ul(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&vt&&((h=r=Lt)&&(r=pv(r,n.type,n.pendingProps,Xe),r!==null?(n.stateNode=r,ae=n,Lt=Qe(r.firstChild),Xe=!1,h=!0):h=!1),h||Vn(n)),ja(n),h=n.type,g=n.pendingProps,y=t!==null?t.memoizedProps:null,r=g.children,eu(h,g)?r=null:y!==null&&eu(h,y)&&(n.flags|=32),n.memoizedState!==null&&(h=tc(t,n,Rb,null,null,l),Ts._currentValue=h),Ul(t,n),le(t,n,r,l),n.child;case 6:return t===null&&vt&&((t=l=Lt)&&(l=yv(l,n.pendingProps,Xe),l!==null?(n.stateNode=l,ae=n,Lt=null,t=!0):t=!1),t||Vn(n)),null;case 13:return Bd(t,n,l);case 4:return he(n,n.stateNode.containerInfo),r=n.pendingProps,t===null?n.child=Oi(n,null,r,l):le(t,n,r,l),n.child;case 11:return Cd(t,n,n.type,n.pendingProps,l);case 7:return le(t,n,n.pendingProps,l),n.child;case 8:return le(t,n,n.pendingProps.children,l),n.child;case 12:return le(t,n,n.pendingProps.children,l),n.child;case 10:return r=n.pendingProps,Yn(n,n.type,r.value),le(t,n,r.children,l),n.child;case 9:return h=n.type._context,r=n.pendingProps.children,Ti(n),h=se(h),r=r(h),n.flags|=1,le(t,n,r,l),n.child;case 14:return zd(t,n,n.type,n.pendingProps,l);case 15:return Rd(t,n,n.type,n.pendingProps,l);case 19:return Vd(t,n,l);case 31:return Ub(t,n,l);case 22:return wd(t,n,l,n.pendingProps);case 24:return Ti(n),r=se(Wt),t===null?(h=Gr(),h===null&&(h=Nt,g=qr(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=l),h=g),n.memoizedState={parent:r,cache:h},Zr(n),Yn(n,Wt,h)):((t.lanes&l)!==0&&(Kr(t,n),is(n,null,null,l),ns()),h=t.memoizedState,g=n.memoizedState,h.parent!==r?(h={parent:r,cache:r},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),Yn(n,Wt,r)):(r=g.cache,Yn(n,Wt,r),r!==h.cache&&Yr(n,[Wt],l,!0))),le(t,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(s(156,n.tag))}function vn(t){t.flags|=4}function Dc(t,n,l,r,h){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(gg())t.flags|=8192;else throw Ai=Ml,Qr}else t.flags&=-16777217}function qd(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!im(n))if(gg())t.flags|=8192;else throw Ai=Ml,Qr}function Yl(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?xf():536870912,t.lanes|=n,ya|=n)}function cs(t,n){if(!vt)switch(t.tailMode){case"hidden":n=t.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var r=null;l!==null;)l.alternate!==null&&(r=l),l=l.sibling;r===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ht(t){var n=t.alternate!==null&&t.alternate.child===t.child,l=0,r=0;if(n)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,r|=h.subtreeFlags&65011712,r|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,r|=h.subtreeFlags,r|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=r,t.childLanes=l,n}function Yb(t,n,l){var r=n.pendingProps;switch(Lr(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(n),null;case 1:return Ht(n),null;case 3:return l=n.stateNode,r=null,t!==null&&(r=t.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),mn(Wt),Qt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(aa(n)?vn(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Br())),Ht(n),null;case 26:var h=n.type,g=n.memoizedState;return t===null?(vn(n),g!==null?(Ht(n),qd(n,g)):(Ht(n),Dc(n,h,null,r,l))):g?g!==t.memoizedState?(vn(n),Ht(n),qd(n,g)):(Ht(n),n.flags&=-16777217):(t=t.memoizedProps,t!==r&&vn(n),Ht(n),Dc(n,h,t,r,l)),null;case 27:if($s(n),l=ot.current,h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==r&&vn(n);else{if(!r){if(n.stateNode===null)throw Error(s(166));return Ht(n),null}t=W.current,aa(n)?xh(n):(t=Wg(h,r,l),n.stateNode=t,vn(n))}return Ht(n),null;case 5:if($s(n),h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==r&&vn(n);else{if(!r){if(n.stateNode===null)throw Error(s(166));return Ht(n),null}if(g=W.current,aa(n))xh(n);else{var y=no(ot.current);switch(g){case 1:g=y.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:g=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":g=y.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":g=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":g=y.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?g.multiple=!0:r.size&&(g.size=r.size);break;default:g=typeof r.is=="string"?y.createElement(h,{is:r.is}):y.createElement(h)}}g[ie]=n,g[ge]=r;t:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)g.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break t;for(;y.sibling===null;){if(y.return===null||y.return===n)break t;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=g;t:switch(oe(g,h,r),h){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break t;case"img":r=!0;break t;default:r=!1}r&&vn(n)}}return Ht(n),Dc(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,l),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==r&&vn(n);else{if(typeof r!="string"&&n.stateNode===null)throw Error(s(166));if(t=ot.current,aa(n)){if(t=n.stateNode,l=n.memoizedProps,r=null,h=ae,h!==null)switch(h.tag){case 27:case 5:r=h.memoizedProps}t[ie]=n,t=!!(t.nodeValue===l||r!==null&&r.suppressHydrationWarning===!0||Bg(t.nodeValue,l)),t||Vn(n,!0)}else t=no(t).createTextNode(r),t[ie]=n,n.stateNode=t}return Ht(n),null;case 31:if(l=n.memoizedState,t===null||t.memoizedState!==null){if(r=aa(n),l!==null){if(t===null){if(!r)throw Error(s(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(557));t[ie]=n}else xi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ht(n),t=!1}else l=Br(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return n.flags&256?(Re(n),n):(Re(n),null);if((n.flags&128)!==0)throw Error(s(558))}return Ht(n),null;case 13:if(r=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=aa(n),r!==null&&r.dehydrated!==null){if(t===null){if(!h)throw Error(s(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[ie]=n}else xi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ht(n),h=!1}else h=Br(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(Re(n),n):(Re(n),null)}return Re(n),(n.flags&128)!==0?(n.lanes=l,n):(l=r!==null,t=t!==null&&t.memoizedState!==null,l&&(r=n.child,h=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(h=r.alternate.memoizedState.cachePool.pool),g=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(g=r.memoizedState.cachePool.pool),g!==h&&(r.flags|=2048)),l!==t&&l&&(n.child.flags|=8192),Yl(n,n.updateQueue),Ht(n),null);case 4:return Qt(),t===null&&Jc(n.stateNode.containerInfo),Ht(n),null;case 10:return mn(n.type),Ht(n),null;case 19:if(U(Zt),r=n.memoizedState,r===null)return Ht(n),null;if(h=(n.flags&128)!==0,g=r.rendering,g===null)if(h)cs(r,!1);else{if(Xt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(g=Dl(t),g!==null){for(n.flags|=128,cs(r,!1),t=g.updateQueue,n.updateQueue=t,Yl(n,t),n.subtreeFlags=0,t=l,l=n.child;l!==null;)ph(l,t),l=l.sibling;return Z(Zt,Zt.current&1|2),vt&&dn(n,r.treeForkCount),n.child}t=t.sibling}r.tail!==null&&Ee()>Zl&&(n.flags|=128,h=!0,cs(r,!1),n.lanes=4194304)}else{if(!h)if(t=Dl(g),t!==null){if(n.flags|=128,h=!0,t=t.updateQueue,n.updateQueue=t,Yl(n,t),cs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!g.alternate&&!vt)return Ht(n),null}else 2*Ee()-r.renderingStartTime>Zl&&l!==536870912&&(n.flags|=128,h=!0,cs(r,!1),n.lanes=4194304);r.isBackwards?(g.sibling=n.child,n.child=g):(t=r.last,t!==null?t.sibling=g:n.child=g,r.last=g)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=Ee(),t.sibling=null,l=Zt.current,Z(Zt,h?l&1|2:l&1),vt&&dn(n,r.treeForkCount),t):(Ht(n),null);case 22:case 23:return Re(n),Ir(),r=n.memoizedState!==null,t!==null?t.memoizedState!==null!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?(l&536870912)!==0&&(n.flags&128)===0&&(Ht(n),n.subtreeFlags&6&&(n.flags|=8192)):Ht(n),l=n.updateQueue,l!==null&&Yl(n,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==l&&(n.flags|=2048),t!==null&&U(Mi),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),mn(Wt),Ht(n),null;case 25:return null;case 30:return null}throw Error(s(156,n.tag))}function qb(t,n){switch(Lr(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return mn(Wt),Qt(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return $s(n),null;case 31:if(n.memoizedState!==null){if(Re(n),n.alternate===null)throw Error(s(340));xi()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(Re(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(s(340));xi()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return U(Zt),null;case 4:return Qt(),null;case 10:return mn(n.type),null;case 22:case 23:return Re(n),Ir(),t!==null&&U(Mi),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return mn(Wt),null;case 25:return null;default:return null}}function Xd(t,n){switch(Lr(n),n.tag){case 3:mn(Wt),Qt();break;case 26:case 27:case 5:$s(n);break;case 4:Qt();break;case 31:n.memoizedState!==null&&Re(n);break;case 13:Re(n);break;case 19:U(Zt);break;case 10:mn(n.type);break;case 22:case 23:Re(n),Ir(),t!==null&&U(Mi);break;case 24:mn(Wt)}}function us(t,n){try{var l=n.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var h=r.next;l=h;do{if((l.tag&t)===t){r=void 0;var g=l.create,y=l.inst;r=g(),y.destroy=r}l=l.next}while(l!==h)}}catch(v){Dt(n,n.return,v)}}function Kn(t,n,l){try{var r=n.updateQueue,h=r!==null?r.lastEffect:null;if(h!==null){var g=h.next;r=g;do{if((r.tag&t)===t){var y=r.inst,v=y.destroy;if(v!==void 0){y.destroy=void 0,h=n;var E=l,w=v;try{w()}catch(L){Dt(h,E,L)}}}r=r.next}while(r!==g)}}catch(L){Dt(n,n.return,L)}}function Gd(t){var n=t.updateQueue;if(n!==null){var l=t.stateNode;try{jh(n,l)}catch(r){Dt(t,t.return,r)}}}function Qd(t,n,l){l.props=Ci(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(r){Dt(t,n,r)}}function fs(t,n){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var r=t.stateNode;break;case 30:r=t.stateNode;break;default:r=t.stateNode}typeof l=="function"?t.refCleanup=l(r):l.current=r}}catch(h){Dt(t,n,h)}}function tn(t,n){var l=t.ref,r=t.refCleanup;if(l!==null)if(typeof r=="function")try{r()}catch(h){Dt(t,n,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Dt(t,n,h)}else l.current=null}function Zd(t){var n=t.type,l=t.memoizedProps,r=t.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break t;case"img":l.src?r.src=l.src:l.srcSet&&(r.srcset=l.srcSet)}}catch(h){Dt(t,t.return,h)}}function Cc(t,n,l){try{var r=t.stateNode;uv(r,t.type,l,n),r[ge]=n}catch(h){Dt(t,t.return,h)}}function Kd(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ti(t.type)||t.tag===4}function zc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Kd(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.tag===27&&ti(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Rc(t,n,l){var r=t.tag;if(r===5||r===6)t=t.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(t),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=un));else if(r!==4&&(r===27&&ti(t.type)&&(l=t.stateNode,n=null),t=t.child,t!==null))for(Rc(t,n,l),t=t.sibling;t!==null;)Rc(t,n,l),t=t.sibling}function ql(t,n,l){var r=t.tag;if(r===5||r===6)t=t.stateNode,n?l.insertBefore(t,n):l.appendChild(t);else if(r!==4&&(r===27&&ti(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(ql(t,n,l),t=t.sibling;t!==null;)ql(t,n,l),t=t.sibling}function Fd(t){var n=t.stateNode,l=t.memoizedProps;try{for(var r=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);oe(n,r,l),n[ie]=t,n[ge]=l}catch(g){Dt(t,t.return,g)}}var _n=!1,$t=!1,wc=!1,Wd=typeof WeakSet=="function"?WeakSet:Set,ne=null;function Xb(t,n){if(t=t.containerInfo,Pc=co,t=oh(t),Er(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var r=l.getSelection&&l.getSelection();if(r&&r.rangeCount!==0){l=r.anchorNode;var h=r.anchorOffset,g=r.focusNode;r=r.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break t}var y=0,v=-1,E=-1,w=0,L=0,V=t,N=null;e:for(;;){for(var k;V!==l||h!==0&&V.nodeType!==3||(v=y+h),V!==g||r!==0&&V.nodeType!==3||(E=y+r),V.nodeType===3&&(y+=V.nodeValue.length),(k=V.firstChild)!==null;)N=V,V=k;for(;;){if(V===t)break e;if(N===l&&++w===h&&(v=y),N===g&&++L===r&&(E=y),(k=V.nextSibling)!==null)break;V=N,N=V.parentNode}V=k}l=v===-1||E===-1?null:{start:v,end:E}}else l=null}l=l||{start:0,end:0}}else l=null;for(tu={focusedElem:t,selectionRange:l},co=!1,ne=n;ne!==null;)if(n=ne,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,ne=t;else for(;ne!==null;){switch(n=ne,g=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)h=t[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,l=n,h=g.memoizedProps,g=g.memoizedState,r=l.stateNode;try{var I=Ci(l.type,h);t=r.getSnapshotBeforeUpdate(I,g),r.__reactInternalSnapshotBeforeUpdate=t}catch(nt){Dt(l,l.return,nt)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,l=t.nodeType,l===9)iu(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":iu(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=n.sibling,t!==null){t.return=n.return,ne=t;break}ne=n.return}}function Jd(t,n,l){var r=l.flags;switch(l.tag){case 0:case 11:case 15:Sn(t,l),r&4&&us(5,l);break;case 1:if(Sn(t,l),r&4)if(t=l.stateNode,n===null)try{t.componentDidMount()}catch(y){Dt(l,l.return,y)}else{var h=Ci(l.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(y){Dt(l,l.return,y)}}r&64&&Gd(l),r&512&&fs(l,l.return);break;case 3:if(Sn(t,l),r&64&&(t=l.updateQueue,t!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{jh(t,n)}catch(y){Dt(l,l.return,y)}}break;case 27:n===null&&r&4&&Fd(l);case 26:case 5:Sn(t,l),n===null&&r&4&&Zd(l),r&512&&fs(l,l.return);break;case 12:Sn(t,l);break;case 31:Sn(t,l),r&4&&Pd(t,l);break;case 13:Sn(t,l),r&4&&tg(t,l),r&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=$b.bind(null,l),bv(t,l))));break;case 22:if(r=l.memoizedState!==null||_n,!r){n=n!==null&&n.memoizedState!==null||$t,h=_n;var g=$t;_n=r,($t=n)&&!g?Tn(t,l,(l.subtreeFlags&8772)!==0):Sn(t,l),_n=h,$t=g}break;case 30:break;default:Sn(t,l)}}function Id(t){var n=t.alternate;n!==null&&(t.alternate=null,Id(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&rr(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Bt=null,pe=!1;function xn(t,n,l){for(l=l.child;l!==null;)$d(t,n,l),l=l.sibling}function $d(t,n,l){if(Ae&&typeof Ae.onCommitFiberUnmount=="function")try{Ae.onCommitFiberUnmount(ka,l)}catch{}switch(l.tag){case 26:$t||tn(l,n),xn(t,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:$t||tn(l,n);var r=Bt,h=pe;ti(l.type)&&(Bt=l.stateNode,pe=!1),xn(t,n,l),_s(l.stateNode),Bt=r,pe=h;break;case 5:$t||tn(l,n);case 6:if(r=Bt,h=pe,Bt=null,xn(t,n,l),Bt=r,pe=h,Bt!==null)if(pe)try{(Bt.nodeType===9?Bt.body:Bt.nodeName==="HTML"?Bt.ownerDocument.body:Bt).removeChild(l.stateNode)}catch(g){Dt(l,n,g)}else try{Bt.removeChild(l.stateNode)}catch(g){Dt(l,n,g)}break;case 18:Bt!==null&&(pe?(t=Bt,Gg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Ea(t)):Gg(Bt,l.stateNode));break;case 4:r=Bt,h=pe,Bt=l.stateNode.containerInfo,pe=!0,xn(t,n,l),Bt=r,pe=h;break;case 0:case 11:case 14:case 15:Kn(2,l,n),$t||Kn(4,l,n),xn(t,n,l);break;case 1:$t||(tn(l,n),r=l.stateNode,typeof r.componentWillUnmount=="function"&&Qd(l,n,r)),xn(t,n,l);break;case 21:xn(t,n,l);break;case 22:$t=(r=$t)||l.memoizedState!==null,xn(t,n,l),$t=r;break;default:xn(t,n,l)}}function Pd(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ea(t)}catch(l){Dt(n,n.return,l)}}}function tg(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ea(t)}catch(l){Dt(n,n.return,l)}}function Gb(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Wd),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Wd),n;default:throw Error(s(435,t.tag))}}function Xl(t,n){var l=Gb(t);n.forEach(function(r){if(!l.has(r)){l.add(r);var h=Pb.bind(null,t,r);r.then(h,h)}})}function ye(t,n){var l=n.deletions;if(l!==null)for(var r=0;r<l.length;r++){var h=l[r],g=t,y=n,v=y;t:for(;v!==null;){switch(v.tag){case 27:if(ti(v.type)){Bt=v.stateNode,pe=!1;break t}break;case 5:Bt=v.stateNode,pe=!1;break t;case 3:case 4:Bt=v.stateNode.containerInfo,pe=!0;break t}v=v.return}if(Bt===null)throw Error(s(160));$d(g,y,h),Bt=null,pe=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)eg(n,t),n=n.sibling}var Je=null;function eg(t,n){var l=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ye(n,t),be(t),r&4&&(Kn(3,t,t.return),us(3,t),Kn(5,t,t.return));break;case 1:ye(n,t),be(t),r&512&&($t||l===null||tn(l,l.return)),r&64&&_n&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?r:l.concat(r))));break;case 26:var h=Je;if(ye(n,t),be(t),r&512&&($t||l===null||tn(l,l.return)),r&4){var g=l!==null?l.memoizedState:null;if(r=t.memoizedState,l===null)if(r===null)if(t.stateNode===null){t:{r=t.type,l=t.memoizedProps,h=h.ownerDocument||h;e:switch(r){case"title":g=h.getElementsByTagName("title")[0],(!g||g[Ba]||g[ie]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(r),h.head.insertBefore(g,h.querySelector("head > title"))),oe(g,r,l),g[ie]=t,ee(g),r=g;break t;case"link":var y=em("link","href",h).get(r+(l.href||""));if(y){for(var v=0;v<y.length;v++)if(g=y[v],g.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&g.getAttribute("rel")===(l.rel==null?null:l.rel)&&g.getAttribute("title")===(l.title==null?null:l.title)&&g.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){y.splice(v,1);break e}}g=h.createElement(r),oe(g,r,l),h.head.appendChild(g);break;case"meta":if(y=em("meta","content",h).get(r+(l.content||""))){for(v=0;v<y.length;v++)if(g=y[v],g.getAttribute("content")===(l.content==null?null:""+l.content)&&g.getAttribute("name")===(l.name==null?null:l.name)&&g.getAttribute("property")===(l.property==null?null:l.property)&&g.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&g.getAttribute("charset")===(l.charSet==null?null:l.charSet)){y.splice(v,1);break e}}g=h.createElement(r),oe(g,r,l),h.head.appendChild(g);break;default:throw Error(s(468,r))}g[ie]=t,ee(g),r=g}t.stateNode=r}else nm(h,t.type,t.stateNode);else t.stateNode=tm(h,r,t.memoizedProps);else g!==r?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,r===null?nm(h,t.type,t.stateNode):tm(h,r,t.memoizedProps)):r===null&&t.stateNode!==null&&Cc(t,t.memoizedProps,l.memoizedProps)}break;case 27:ye(n,t),be(t),r&512&&($t||l===null||tn(l,l.return)),l!==null&&r&4&&Cc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(ye(n,t),be(t),r&512&&($t||l===null||tn(l,l.return)),t.flags&32){h=t.stateNode;try{Fi(h,"")}catch(I){Dt(t,t.return,I)}}r&4&&t.stateNode!=null&&(h=t.memoizedProps,Cc(t,h,l!==null?l.memoizedProps:h)),r&1024&&(wc=!0);break;case 6:if(ye(n,t),be(t),r&4){if(t.stateNode===null)throw Error(s(162));r=t.memoizedProps,l=t.stateNode;try{l.nodeValue=r}catch(I){Dt(t,t.return,I)}}break;case 3:if(so=null,h=Je,Je=io(n.containerInfo),ye(n,t),Je=h,be(t),r&4&&l!==null&&l.memoizedState.isDehydrated)try{Ea(n.containerInfo)}catch(I){Dt(t,t.return,I)}wc&&(wc=!1,ng(t));break;case 4:r=Je,Je=io(t.stateNode.containerInfo),ye(n,t),be(t),Je=r;break;case 12:ye(n,t),be(t);break;case 31:ye(n,t),be(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Xl(t,r)));break;case 13:ye(n,t),be(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ql=Ee()),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Xl(t,r)));break;case 22:h=t.memoizedState!==null;var E=l!==null&&l.memoizedState!==null,w=_n,L=$t;if(_n=w||h,$t=L||E,ye(n,t),$t=L,_n=w,be(t),r&8192)t:for(n=t.stateNode,n._visibility=h?n._visibility&-2:n._visibility|1,h&&(l===null||E||_n||$t||zi(t)),l=null,n=t;;){if(n.tag===5||n.tag===26){if(l===null){E=l=n;try{if(g=E.stateNode,h)y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{v=E.stateNode;var V=E.memoizedProps.style,N=V!=null&&V.hasOwnProperty("display")?V.display:null;v.style.display=N==null||typeof N=="boolean"?"":(""+N).trim()}}catch(I){Dt(E,E.return,I)}}}else if(n.tag===6){if(l===null){E=n;try{E.stateNode.nodeValue=h?"":E.memoizedProps}catch(I){Dt(E,E.return,I)}}}else if(n.tag===18){if(l===null){E=n;try{var k=E.stateNode;h?Qg(k,!0):Qg(E.stateNode,!1)}catch(I){Dt(E,E.return,I)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break t;for(;n.sibling===null;){if(n.return===null||n.return===t)break t;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}r&4&&(r=t.updateQueue,r!==null&&(l=r.retryQueue,l!==null&&(r.retryQueue=null,Xl(t,l))));break;case 19:ye(n,t),be(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Xl(t,r)));break;case 30:break;case 21:break;default:ye(n,t),be(t)}}function be(t){var n=t.flags;if(n&2){try{for(var l,r=t.return;r!==null;){if(Kd(r)){l=r;break}r=r.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var h=l.stateNode,g=zc(t);ql(t,g,h);break;case 5:var y=l.stateNode;l.flags&32&&(Fi(y,""),l.flags&=-33);var v=zc(t);ql(t,v,y);break;case 3:case 4:var E=l.stateNode.containerInfo,w=zc(t);Rc(t,w,E);break;default:throw Error(s(161))}}catch(L){Dt(t,t.return,L)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function ng(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;ng(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function Sn(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Jd(t,n.alternate,n),n=n.sibling}function zi(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:Kn(4,n,n.return),zi(n);break;case 1:tn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&Qd(n,n.return,l),zi(n);break;case 27:_s(n.stateNode);case 26:case 5:tn(n,n.return),zi(n);break;case 22:n.memoizedState===null&&zi(n);break;case 30:zi(n);break;default:zi(n)}t=t.sibling}}function Tn(t,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var r=n.alternate,h=t,g=n,y=g.flags;switch(g.tag){case 0:case 11:case 15:Tn(h,g,l),us(4,g);break;case 1:if(Tn(h,g,l),r=g,h=r.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(w){Dt(r,r.return,w)}if(r=g,h=r.updateQueue,h!==null){var v=r.stateNode;try{var E=h.shared.hiddenCallbacks;if(E!==null)for(h.shared.hiddenCallbacks=null,h=0;h<E.length;h++)Nh(E[h],v)}catch(w){Dt(r,r.return,w)}}l&&y&64&&Gd(g),fs(g,g.return);break;case 27:Fd(g);case 26:case 5:Tn(h,g,l),l&&r===null&&y&4&&Zd(g),fs(g,g.return);break;case 12:Tn(h,g,l);break;case 31:Tn(h,g,l),l&&y&4&&Pd(h,g);break;case 13:Tn(h,g,l),l&&y&4&&tg(h,g);break;case 22:g.memoizedState===null&&Tn(h,g,l),fs(g,g.return);break;case 30:break;default:Tn(h,g,l)}n=n.sibling}}function Nc(t,n){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&Ia(l))}function jc(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ia(t))}function Ie(t,n,l,r){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ig(t,n,l,r),n=n.sibling}function ig(t,n,l,r){var h=n.flags;switch(n.tag){case 0:case 11:case 15:Ie(t,n,l,r),h&2048&&us(9,n);break;case 1:Ie(t,n,l,r);break;case 3:Ie(t,n,l,r),h&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ia(t)));break;case 12:if(h&2048){Ie(t,n,l,r),t=n.stateNode;try{var g=n.memoizedProps,y=g.id,v=g.onPostCommit;typeof v=="function"&&v(y,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(E){Dt(n,n.return,E)}}else Ie(t,n,l,r);break;case 31:Ie(t,n,l,r);break;case 13:Ie(t,n,l,r);break;case 23:break;case 22:g=n.stateNode,y=n.alternate,n.memoizedState!==null?g._visibility&2?Ie(t,n,l,r):hs(t,n):g._visibility&2?Ie(t,n,l,r):(g._visibility|=2,ga(t,n,l,r,(n.subtreeFlags&10256)!==0||!1)),h&2048&&Nc(y,n);break;case 24:Ie(t,n,l,r),h&2048&&jc(n.alternate,n);break;default:Ie(t,n,l,r)}}function ga(t,n,l,r,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=t,y=n,v=l,E=r,w=y.flags;switch(y.tag){case 0:case 11:case 15:ga(g,y,v,E,h),us(8,y);break;case 23:break;case 22:var L=y.stateNode;y.memoizedState!==null?L._visibility&2?ga(g,y,v,E,h):hs(g,y):(L._visibility|=2,ga(g,y,v,E,h)),h&&w&2048&&Nc(y.alternate,y);break;case 24:ga(g,y,v,E,h),h&&w&2048&&jc(y.alternate,y);break;default:ga(g,y,v,E,h)}n=n.sibling}}function hs(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=t,r=n,h=r.flags;switch(r.tag){case 22:hs(l,r),h&2048&&Nc(r.alternate,r);break;case 24:hs(l,r),h&2048&&jc(r.alternate,r);break;default:hs(l,r)}n=n.sibling}}var ds=8192;function ma(t,n,l){if(t.subtreeFlags&ds)for(t=t.child;t!==null;)ag(t,n,l),t=t.sibling}function ag(t,n,l){switch(t.tag){case 26:ma(t,n,l),t.flags&ds&&t.memoizedState!==null&&zv(l,Je,t.memoizedState,t.memoizedProps);break;case 5:ma(t,n,l);break;case 3:case 4:var r=Je;Je=io(t.stateNode.containerInfo),ma(t,n,l),Je=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=ds,ds=16777216,ma(t,n,l),ds=r):ma(t,n,l));break;default:ma(t,n,l)}}function sg(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function gs(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var r=n[l];ne=r,og(r,t)}sg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lg(t),t=t.sibling}function lg(t){switch(t.tag){case 0:case 11:case 15:gs(t),t.flags&2048&&Kn(9,t,t.return);break;case 3:gs(t);break;case 12:gs(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Gl(t)):gs(t);break;default:gs(t)}}function Gl(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var r=n[l];ne=r,og(r,t)}sg(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Kn(8,n,n.return),Gl(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Gl(n));break;default:Gl(n)}t=t.sibling}}function og(t,n){for(;ne!==null;){var l=ne;switch(l.tag){case 0:case 11:case 15:Kn(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var r=l.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ia(l.memoizedState.cache)}if(r=l.child,r!==null)r.return=l,ne=r;else t:for(l=t;ne!==null;){r=ne;var h=r.sibling,g=r.return;if(Id(r),r===l){ne=null;break t}if(h!==null){h.return=g,ne=h;break t}ne=g}}}var Qb={getCacheForType:function(t){var n=se(Wt),l=n.data.get(t);return l===void 0&&(l=t(),n.data.set(t,l)),l},cacheSignal:function(){return se(Wt).controller.signal}},Zb=typeof WeakMap=="function"?WeakMap:Map,Mt=0,Nt=null,gt=null,yt=0,Ot=0,we=null,Fn=!1,pa=!1,kc=!1,Mn=0,Xt=0,Wn=0,Ri=0,Lc=0,Ne=0,ya=0,ms=null,ve=null,Hc=!1,Ql=0,rg=0,Zl=1/0,Kl=null,Jn=null,Pt=0,In=null,ba=null,En=0,Bc=0,Uc=null,cg=null,ps=0,Vc=null;function je(){return(Mt&2)!==0&&yt!==0?yt&-yt:j.T!==null?Zc():Ef()}function ug(){if(Ne===0)if((yt&536870912)===0||vt){var t=el;el<<=1,(el&3932160)===0&&(el=262144),Ne=t}else Ne=536870912;return t=ze.current,t!==null&&(t.flags|=32),Ne}function _e(t,n,l){(t===Nt&&(Ot===2||Ot===9)||t.cancelPendingCommit!==null)&&(va(t,0),$n(t,yt,Ne,!1)),Ha(t,l),((Mt&2)===0||t!==Nt)&&(t===Nt&&((Mt&2)===0&&(Ri|=l),Xt===4&&$n(t,yt,Ne,!1)),en(t))}function fg(t,n,l){if((Mt&6)!==0)throw Error(s(327));var r=!l&&(n&127)===0&&(n&t.expiredLanes)===0||La(t,n),h=r?Wb(t,n):qc(t,n,!0),g=r;do{if(h===0){pa&&!r&&$n(t,n,0,!1);break}else{if(l=t.current.alternate,g&&!Kb(l)){h=qc(t,n,!1),g=!1;continue}if(h===2){if(g=n,t.errorRecoveryDisabledLanes&g)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){n=y;t:{var v=t;h=ms;var E=v.current.memoizedState.isDehydrated;if(E&&(va(v,y).flags|=256),y=qc(v,y,!1),y!==2){if(kc&&!E){v.errorRecoveryDisabledLanes|=g,Ri|=g,h=4;break t}g=ve,ve=h,g!==null&&(ve===null?ve=g:ve.push.apply(ve,g))}h=y}if(g=!1,h!==2)continue}}if(h===1){va(t,0),$n(t,n,0,!0);break}t:{switch(r=t,g=h,g){case 0:case 1:throw Error(s(345));case 4:if((n&4194048)!==n)break;case 6:$n(r,n,Ne,!Fn);break t;case 2:ve=null;break;case 3:case 5:break;default:throw Error(s(329))}if((n&62914560)===n&&(h=Ql+300-Ee(),10<h)){if($n(r,n,Ne,!Fn),il(r,0,!0)!==0)break t;En=n,r.timeoutHandle=qg(hg.bind(null,r,l,ve,Kl,Hc,n,Ne,Ri,ya,Fn,g,"Throttled",-0,0),h);break t}hg(r,l,ve,Kl,Hc,n,Ne,Ri,ya,Fn,g,null,-0,0)}}break}while(!0);en(t)}function hg(t,n,l,r,h,g,y,v,E,w,L,V,N,k){if(t.timeoutHandle=-1,V=n.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:un},ag(n,g,V);var I=(g&62914560)===g?Ql-Ee():(g&4194048)===g?rg-Ee():0;if(I=Rv(V,I),I!==null){En=g,t.cancelPendingCommit=I(_g.bind(null,t,n,g,l,r,h,y,v,E,L,V,null,N,k)),$n(t,g,y,!w);return}}_g(t,n,g,l,r,h,y,v,E)}function Kb(t){for(var n=t;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var r=0;r<l.length;r++){var h=l[r],g=h.getSnapshot;h=h.value;try{if(!De(g(),h))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function $n(t,n,l,r){n&=~Lc,n&=~Ri,t.suspendedLanes|=n,t.pingedLanes&=~n,r&&(t.warmLanes|=n),r=t.expirationTimes;for(var h=n;0<h;){var g=31-Oe(h),y=1<<g;r[g]=-1,h&=~y}l!==0&&Sf(t,l,n)}function Fl(){return(Mt&6)===0?(ys(0),!1):!0}function Yc(){if(gt!==null){if(Ot===0)var t=gt.return;else t=gt,gn=Si=null,ic(t),ca=null,Pa=0,t=gt;for(;t!==null;)Xd(t.alternate,t),t=t.return;gt=null}}function va(t,n){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,dv(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),En=0,Yc(),Nt=t,gt=l=hn(t.current,null),yt=n,Ot=0,we=null,Fn=!1,pa=La(t,n),kc=!1,ya=Ne=Lc=Ri=Wn=Xt=0,ve=ms=null,Hc=!1,(n&8)!==0&&(n|=n&32);var r=t.entangledLanes;if(r!==0)for(t=t.entanglements,r&=n;0<r;){var h=31-Oe(r),g=1<<h;n|=t[h],r&=~g}return Mn=n,ml(),l}function dg(t,n){ut=null,j.H=os,n===ra||n===Tl?(n=Ch(),Ot=3):n===Qr?(n=Ch(),Ot=4):Ot=n===vc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,we=n,gt===null&&(Xt=1,Hl(t,Ve(n,t.current)))}function gg(){var t=ze.current;return t===null?!0:(yt&4194048)===yt?Ge===null:(yt&62914560)===yt||(yt&536870912)!==0?t===Ge:!1}function mg(){var t=j.H;return j.H=os,t===null?os:t}function pg(){var t=j.A;return j.A=Qb,t}function Wl(){Xt=4,Fn||(yt&4194048)!==yt&&ze.current!==null||(pa=!0),(Wn&134217727)===0&&(Ri&134217727)===0||Nt===null||$n(Nt,yt,Ne,!1)}function qc(t,n,l){var r=Mt;Mt|=2;var h=mg(),g=pg();(Nt!==t||yt!==n)&&(Kl=null,va(t,n)),n=!1;var y=Xt;t:do try{if(Ot!==0&&gt!==null){var v=gt,E=we;switch(Ot){case 8:Yc(),y=6;break t;case 3:case 2:case 9:case 6:ze.current===null&&(n=!0);var w=Ot;if(Ot=0,we=null,_a(t,v,E,w),l&&pa){y=0;break t}break;default:w=Ot,Ot=0,we=null,_a(t,v,E,w)}}Fb(),y=Xt;break}catch(L){dg(t,L)}while(!0);return n&&t.shellSuspendCounter++,gn=Si=null,Mt=r,j.H=h,j.A=g,gt===null&&(Nt=null,yt=0,ml()),y}function Fb(){for(;gt!==null;)yg(gt)}function Wb(t,n){var l=Mt;Mt|=2;var r=mg(),h=pg();Nt!==t||yt!==n?(Kl=null,Zl=Ee()+500,va(t,n)):pa=La(t,n);t:do try{if(Ot!==0&&gt!==null){n=gt;var g=we;e:switch(Ot){case 1:Ot=0,we=null,_a(t,n,g,1);break;case 2:case 9:if(Oh(g)){Ot=0,we=null,bg(n);break}n=function(){Ot!==2&&Ot!==9||Nt!==t||(Ot=7),en(t)},g.then(n,n);break t;case 3:Ot=7;break t;case 4:Ot=5;break t;case 7:Oh(g)?(Ot=0,we=null,bg(n)):(Ot=0,we=null,_a(t,n,g,7));break;case 5:var y=null;switch(gt.tag){case 26:y=gt.memoizedState;case 5:case 27:var v=gt;if(y?im(y):v.stateNode.complete){Ot=0,we=null;var E=v.sibling;if(E!==null)gt=E;else{var w=v.return;w!==null?(gt=w,Jl(w)):gt=null}break e}}Ot=0,we=null,_a(t,n,g,5);break;case 6:Ot=0,we=null,_a(t,n,g,6);break;case 8:Yc(),Xt=6;break t;default:throw Error(s(462))}}Jb();break}catch(L){dg(t,L)}while(!0);return gn=Si=null,j.H=r,j.A=h,Mt=l,gt!==null?0:(Nt=null,yt=0,ml(),Xt)}function Jb(){for(;gt!==null&&!vy();)yg(gt)}function yg(t){var n=Yd(t.alternate,t,Mn);t.memoizedProps=t.pendingProps,n===null?Jl(t):gt=n}function bg(t){var n=t,l=n.alternate;switch(n.tag){case 15:case 0:n=kd(l,n,n.pendingProps,n.type,void 0,yt);break;case 11:n=kd(l,n,n.pendingProps,n.type.render,n.ref,yt);break;case 5:ic(n);default:Xd(l,n),n=gt=ph(n,Mn),n=Yd(l,n,Mn)}t.memoizedProps=t.pendingProps,n===null?Jl(t):gt=n}function _a(t,n,l,r){gn=Si=null,ic(n),ca=null,Pa=0;var h=n.return;try{if(Bb(t,h,n,l,yt)){Xt=1,Hl(t,Ve(l,t.current)),gt=null;return}}catch(g){if(h!==null)throw gt=h,g;Xt=1,Hl(t,Ve(l,t.current)),gt=null;return}n.flags&32768?(vt||r===1?t=!0:pa||(yt&536870912)!==0?t=!1:(Fn=t=!0,(r===2||r===9||r===3||r===6)&&(r=ze.current,r!==null&&r.tag===13&&(r.flags|=16384))),vg(n,t)):Jl(n)}function Jl(t){var n=t;do{if((n.flags&32768)!==0){vg(n,Fn);return}t=n.return;var l=Yb(n.alternate,n,Mn);if(l!==null){gt=l;return}if(n=n.sibling,n!==null){gt=n;return}gt=n=t}while(n!==null);Xt===0&&(Xt=5)}function vg(t,n){do{var l=qb(t.alternate,t);if(l!==null){l.flags&=32767,gt=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(t=t.sibling,t!==null)){gt=t;return}gt=t=l}while(t!==null);Xt=6,gt=null}function _g(t,n,l,r,h,g,y,v,E){t.cancelPendingCommit=null;do Il();while(Pt!==0);if((Mt&6)!==0)throw Error(s(327));if(n!==null){if(n===t.current)throw Error(s(177));if(g=n.lanes|n.childLanes,g|=zr,Cy(t,l,g,y,v,E),t===Nt&&(gt=Nt=null,yt=0),ba=n,In=t,En=l,Bc=g,Uc=h,cg=r,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,tv(Ps,function(){return Eg(),null})):(t.callbackNode=null,t.callbackPriority=0),r=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||r){r=j.T,j.T=null,h=X.p,X.p=2,y=Mt,Mt|=4;try{Xb(t,n,l)}finally{Mt=y,X.p=h,j.T=r}}Pt=1,xg(),Sg(),Tg()}}function xg(){if(Pt===1){Pt=0;var t=In,n=ba,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=j.T,j.T=null;var r=X.p;X.p=2;var h=Mt;Mt|=4;try{eg(n,t);var g=tu,y=oh(t.containerInfo),v=g.focusedElem,E=g.selectionRange;if(y!==v&&v&&v.ownerDocument&&lh(v.ownerDocument.documentElement,v)){if(E!==null&&Er(v)){var w=E.start,L=E.end;if(L===void 0&&(L=w),"selectionStart"in v)v.selectionStart=w,v.selectionEnd=Math.min(L,v.value.length);else{var V=v.ownerDocument||document,N=V&&V.defaultView||window;if(N.getSelection){var k=N.getSelection(),I=v.textContent.length,nt=Math.min(E.start,I),wt=E.end===void 0?nt:Math.min(E.end,I);!k.extend&&nt>wt&&(y=wt,wt=nt,nt=y);var C=sh(v,nt),O=sh(v,wt);if(C&&O&&(k.rangeCount!==1||k.anchorNode!==C.node||k.anchorOffset!==C.offset||k.focusNode!==O.node||k.focusOffset!==O.offset)){var R=V.createRange();R.setStart(C.node,C.offset),k.removeAllRanges(),nt>wt?(k.addRange(R),k.extend(O.node,O.offset)):(R.setEnd(O.node,O.offset),k.addRange(R))}}}}for(V=[],k=v;k=k.parentNode;)k.nodeType===1&&V.push({element:k,left:k.scrollLeft,top:k.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<V.length;v++){var B=V[v];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}co=!!Pc,tu=Pc=null}finally{Mt=h,X.p=r,j.T=l}}t.current=n,Pt=2}}function Sg(){if(Pt===2){Pt=0;var t=In,n=ba,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=j.T,j.T=null;var r=X.p;X.p=2;var h=Mt;Mt|=4;try{Jd(t,n.alternate,n)}finally{Mt=h,X.p=r,j.T=l}}Pt=3}}function Tg(){if(Pt===4||Pt===3){Pt=0,_y();var t=In,n=ba,l=En,r=cg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Pt=5:(Pt=0,ba=In=null,Mg(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(Jn=null),lr(l),n=n.stateNode,Ae&&typeof Ae.onCommitFiberRoot=="function")try{Ae.onCommitFiberRoot(ka,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=j.T,h=X.p,X.p=2,j.T=null;try{for(var g=t.onRecoverableError,y=0;y<r.length;y++){var v=r[y];g(v.value,{componentStack:v.stack})}}finally{j.T=n,X.p=h}}(En&3)!==0&&Il(),en(t),h=t.pendingLanes,(l&261930)!==0&&(h&42)!==0?t===Vc?ps++:(ps=0,Vc=t):ps=0,ys(0)}}function Mg(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Ia(n)))}function Il(){return xg(),Sg(),Tg(),Eg()}function Eg(){if(Pt!==5)return!1;var t=In,n=Bc;Bc=0;var l=lr(En),r=j.T,h=X.p;try{X.p=32>l?32:l,j.T=null,l=Uc,Uc=null;var g=In,y=En;if(Pt=0,ba=In=null,En=0,(Mt&6)!==0)throw Error(s(331));var v=Mt;if(Mt|=4,lg(g.current),ig(g,g.current,y,l),Mt=v,ys(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot=="function")try{Ae.onPostCommitFiberRoot(ka,g)}catch{}return!0}finally{X.p=h,j.T=r,Mg(t,n)}}function Ag(t,n,l){n=Ve(l,n),n=bc(t.stateNode,n,2),t=Gn(t,n,2),t!==null&&(Ha(t,2),en(t))}function Dt(t,n,l){if(t.tag===3)Ag(t,t,l);else for(;n!==null;){if(n.tag===3){Ag(n,t,l);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jn===null||!Jn.has(r))){t=Ve(l,t),l=Od(2),r=Gn(n,l,2),r!==null&&(Dd(l,r,n,t),Ha(r,2),en(r));break}}n=n.return}}function Xc(t,n,l){var r=t.pingCache;if(r===null){r=t.pingCache=new Zb;var h=new Set;r.set(n,h)}else h=r.get(n),h===void 0&&(h=new Set,r.set(n,h));h.has(l)||(kc=!0,h.add(l),t=Ib.bind(null,t,n,l),n.then(t,t))}function Ib(t,n,l){var r=t.pingCache;r!==null&&r.delete(n),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Nt===t&&(yt&l)===l&&(Xt===4||Xt===3&&(yt&62914560)===yt&&300>Ee()-Ql?(Mt&2)===0&&va(t,0):Lc|=l,ya===yt&&(ya=0)),en(t)}function Og(t,n){n===0&&(n=xf()),t=vi(t,n),t!==null&&(Ha(t,n),en(t))}function $b(t){var n=t.memoizedState,l=0;n!==null&&(l=n.retryLane),Og(t,l)}function Pb(t,n){var l=0;switch(t.tag){case 31:case 13:var r=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:r=t.stateNode;break;case 22:r=t.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(n),Og(t,l)}function tv(t,n){return nr(t,n)}var $l=null,xa=null,Gc=!1,Pl=!1,Qc=!1,Pn=0;function en(t){t!==xa&&t.next===null&&(xa===null?$l=xa=t:xa=xa.next=t),Pl=!0,Gc||(Gc=!0,nv())}function ys(t,n){if(!Qc&&Pl){Qc=!0;do for(var l=!1,r=$l;r!==null;){if(t!==0){var h=r.pendingLanes;if(h===0)var g=0;else{var y=r.suspendedLanes,v=r.pingedLanes;g=(1<<31-Oe(42|t)+1)-1,g&=h&~(y&~v),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,Rg(r,g))}else g=yt,g=il(r,r===Nt?g:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(g&3)===0||La(r,g)||(l=!0,Rg(r,g));r=r.next}while(l);Qc=!1}}function ev(){Dg()}function Dg(){Pl=Gc=!1;var t=0;Pn!==0&&hv()&&(t=Pn);for(var n=Ee(),l=null,r=$l;r!==null;){var h=r.next,g=Cg(r,n);g===0?(r.next=null,l===null?$l=h:l.next=h,h===null&&(xa=l)):(l=r,(t!==0||(g&3)!==0)&&(Pl=!0)),r=h}Pt!==0&&Pt!==5||ys(t),Pn!==0&&(Pn=0)}function Cg(t,n){for(var l=t.suspendedLanes,r=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var y=31-Oe(g),v=1<<y,E=h[y];E===-1?((v&l)===0||(v&r)!==0)&&(h[y]=Dy(v,n)):E<=n&&(t.expiredLanes|=v),g&=~v}if(n=Nt,l=yt,l=il(t,t===n?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r=t.callbackNode,l===0||t===n&&(Ot===2||Ot===9)||t.cancelPendingCommit!==null)return r!==null&&r!==null&&ir(r),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||La(t,l)){if(n=l&-l,n===t.callbackPriority)return n;switch(r!==null&&ir(r),lr(l)){case 2:case 8:l=vf;break;case 32:l=Ps;break;case 268435456:l=_f;break;default:l=Ps}return r=zg.bind(null,t),l=nr(l,r),t.callbackPriority=n,t.callbackNode=l,n}return r!==null&&r!==null&&ir(r),t.callbackPriority=2,t.callbackNode=null,2}function zg(t,n){if(Pt!==0&&Pt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Il()&&t.callbackNode!==l)return null;var r=yt;return r=il(t,t===Nt?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r===0?null:(fg(t,r,n),Cg(t,Ee()),t.callbackNode!=null&&t.callbackNode===l?zg.bind(null,t):null)}function Rg(t,n){if(Il())return null;fg(t,n,!0)}function nv(){gv(function(){(Mt&6)!==0?nr(bf,ev):Dg()})}function Zc(){if(Pn===0){var t=la;t===0&&(t=tl,tl<<=1,(tl&261888)===0&&(tl=256)),Pn=t}return Pn}function wg(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ol(""+t)}function Ng(t,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,t.id&&l.setAttribute("form",t.id),n.parentNode.insertBefore(l,n),t=new FormData(t),l.parentNode.removeChild(l),t}function iv(t,n,l,r,h){if(n==="submit"&&l&&l.stateNode===h){var g=wg((h[ge]||null).action),y=r.submitter;y&&(n=(n=y[ge]||null)?wg(n.formAction):y.getAttribute("formAction"),n!==null&&(g=n,y=null));var v=new fl("action","action",null,r,h);t.push({event:v,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Pn!==0){var E=y?Ng(h,y):new FormData(h);hc(l,{pending:!0,data:E,method:h.method,action:g},null,E)}}else typeof g=="function"&&(v.preventDefault(),E=y?Ng(h,y):new FormData(h),hc(l,{pending:!0,data:E,method:h.method,action:g},g,E))},currentTarget:h}]})}}for(var Kc=0;Kc<Cr.length;Kc++){var Fc=Cr[Kc],av=Fc.toLowerCase(),sv=Fc[0].toUpperCase()+Fc.slice(1);We(av,"on"+sv)}We(uh,"onAnimationEnd"),We(fh,"onAnimationIteration"),We(hh,"onAnimationStart"),We("dblclick","onDoubleClick"),We("focusin","onFocus"),We("focusout","onBlur"),We(xb,"onTransitionRun"),We(Sb,"onTransitionStart"),We(Tb,"onTransitionCancel"),We(dh,"onTransitionEnd"),Zi("onMouseEnter",["mouseout","mouseover"]),Zi("onMouseLeave",["mouseout","mouseover"]),Zi("onPointerEnter",["pointerout","pointerover"]),Zi("onPointerLeave",["pointerout","pointerover"]),mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mi("onBeforeInput",["compositionend","keypress","textInput","paste"]),mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bs="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(" "),lv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(bs));function jg(t,n){n=(n&4)!==0;for(var l=0;l<t.length;l++){var r=t[l],h=r.event;r=r.listeners;t:{var g=void 0;if(n)for(var y=r.length-1;0<=y;y--){var v=r[y],E=v.instance,w=v.currentTarget;if(v=v.listener,E!==g&&h.isPropagationStopped())break t;g=v,h.currentTarget=w;try{g(h)}catch(L){gl(L)}h.currentTarget=null,g=E}else for(y=0;y<r.length;y++){if(v=r[y],E=v.instance,w=v.currentTarget,v=v.listener,E!==g&&h.isPropagationStopped())break t;g=v,h.currentTarget=w;try{g(h)}catch(L){gl(L)}h.currentTarget=null,g=E}}}}function mt(t,n){var l=n[or];l===void 0&&(l=n[or]=new Set);var r=t+"__bubble";l.has(r)||(kg(n,t,2,!1),l.add(r))}function Wc(t,n,l){var r=0;n&&(r|=4),kg(l,t,r,n)}var to="_reactListening"+Math.random().toString(36).slice(2);function Jc(t){if(!t[to]){t[to]=!0,Df.forEach(function(l){l!=="selectionchange"&&(lv.has(l)||Wc(l,!1,t),Wc(l,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[to]||(n[to]=!0,Wc("selectionchange",!1,n))}}function kg(t,n,l,r){switch(um(n)){case 2:var h=jv;break;case 8:h=kv;break;default:h=fu}l=h.bind(null,n,l,t),h=void 0,!pr||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),r?h!==void 0?t.addEventListener(n,l,{capture:!0,passive:h}):t.addEventListener(n,l,!0):h!==void 0?t.addEventListener(n,l,{passive:h}):t.addEventListener(n,l,!1)}function Ic(t,n,l,r,h){var g=r;if((n&1)===0&&(n&2)===0&&r!==null)t:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var v=r.stateNode.containerInfo;if(v===h)break;if(y===4)for(y=r.return;y!==null;){var E=y.tag;if((E===3||E===4)&&y.stateNode.containerInfo===h)return;y=y.return}for(;v!==null;){if(y=Xi(v),y===null)return;if(E=y.tag,E===5||E===6||E===26||E===27){r=g=y;continue t}v=v.parentNode}}r=r.return}Vf(function(){var w=g,L=gr(l),V=[];t:{var N=gh.get(t);if(N!==void 0){var k=fl,I=t;switch(t){case"keypress":if(cl(l)===0)break t;case"keydown":case"keyup":k=Py;break;case"focusin":I="focus",k=_r;break;case"focusout":I="blur",k=_r;break;case"beforeblur":case"afterblur":k=_r;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":k=Xf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=Yy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=nb;break;case uh:case fh:case hh:k=Gy;break;case dh:k=ab;break;case"scroll":case"scrollend":k=Uy;break;case"wheel":k=lb;break;case"copy":case"cut":case"paste":k=Zy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=Qf;break;case"toggle":case"beforetoggle":k=rb}var nt=(n&4)!==0,wt=!nt&&(t==="scroll"||t==="scrollend"),C=nt?N!==null?N+"Capture":null:N;nt=[];for(var O=w,R;O!==null;){var B=O;if(R=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||R===null||C===null||(B=Va(O,C),B!=null&&nt.push(vs(O,B,R))),wt)break;O=O.return}0<nt.length&&(N=new k(N,I,null,l,L),V.push({event:N,listeners:nt}))}}if((n&7)===0){t:{if(N=t==="mouseover"||t==="pointerover",k=t==="mouseout"||t==="pointerout",N&&l!==dr&&(I=l.relatedTarget||l.fromElement)&&(Xi(I)||I[qi]))break t;if((k||N)&&(N=L.window===L?L:(N=L.ownerDocument)?N.defaultView||N.parentWindow:window,k?(I=l.relatedTarget||l.toElement,k=w,I=I?Xi(I):null,I!==null&&(wt=c(I),nt=I.tag,I!==wt||nt!==5&&nt!==27&&nt!==6)&&(I=null)):(k=null,I=w),k!==I)){if(nt=Xf,B="onMouseLeave",C="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(nt=Qf,B="onPointerLeave",C="onPointerEnter",O="pointer"),wt=k==null?N:Ua(k),R=I==null?N:Ua(I),N=new nt(B,O+"leave",k,l,L),N.target=wt,N.relatedTarget=R,B=null,Xi(L)===w&&(nt=new nt(C,O+"enter",I,l,L),nt.target=R,nt.relatedTarget=wt,B=nt),wt=B,k&&I)e:{for(nt=ov,C=k,O=I,R=0,B=C;B;B=nt(B))R++;B=0;for(var et=O;et;et=nt(et))B++;for(;0<R-B;)C=nt(C),R--;for(;0<B-R;)O=nt(O),B--;for(;R--;){if(C===O||O!==null&&C===O.alternate){nt=C;break e}C=nt(C),O=nt(O)}nt=null}else nt=null;k!==null&&Lg(V,N,k,nt,!1),I!==null&&wt!==null&&Lg(V,wt,I,nt,!0)}}t:{if(N=w?Ua(w):window,k=N.nodeName&&N.nodeName.toLowerCase(),k==="select"||k==="input"&&N.type==="file")var xt=Pf;else if(If(N))if(th)xt=bb;else{xt=pb;var $=mb}else k=N.nodeName,!k||k.toLowerCase()!=="input"||N.type!=="checkbox"&&N.type!=="radio"?w&&hr(w.elementType)&&(xt=Pf):xt=yb;if(xt&&(xt=xt(t,w))){$f(V,xt,l,L);break t}$&&$(t,N,w),t==="focusout"&&w&&N.type==="number"&&w.memoizedProps.value!=null&&fr(N,"number",N.value)}switch($=w?Ua(w):window,t){case"focusin":(If($)||$.contentEditable==="true")&&($i=$,Ar=w,Fa=null);break;case"focusout":Fa=Ar=$i=null;break;case"mousedown":Or=!0;break;case"contextmenu":case"mouseup":case"dragend":Or=!1,rh(V,l,L);break;case"selectionchange":if(_b)break;case"keydown":case"keyup":rh(V,l,L)}var ft;if(Sr)t:{switch(t){case"compositionstart":var bt="onCompositionStart";break t;case"compositionend":bt="onCompositionEnd";break t;case"compositionupdate":bt="onCompositionUpdate";break t}bt=void 0}else Ii?Wf(t,l)&&(bt="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(bt="onCompositionStart");bt&&(Zf&&l.locale!=="ko"&&(Ii||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&Ii&&(ft=Yf()):(Hn=L,yr="value"in Hn?Hn.value:Hn.textContent,Ii=!0)),$=eo(w,bt),0<$.length&&(bt=new Gf(bt,t,null,l,L),V.push({event:bt,listeners:$}),ft?bt.data=ft:(ft=Jf(l),ft!==null&&(bt.data=ft)))),(ft=ub?fb(t,l):hb(t,l))&&(bt=eo(w,"onBeforeInput"),0<bt.length&&($=new Gf("onBeforeInput","beforeinput",null,l,L),V.push({event:$,listeners:bt}),$.data=ft)),iv(V,t,w,l,L)}jg(V,n)})}function vs(t,n,l){return{instance:t,listener:n,currentTarget:l}}function eo(t,n){for(var l=n+"Capture",r=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Va(t,l),h!=null&&r.unshift(vs(t,h,g)),h=Va(t,n),h!=null&&r.push(vs(t,h,g))),t.tag===3)return r;t=t.return}return[]}function ov(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Lg(t,n,l,r,h){for(var g=n._reactName,y=[];l!==null&&l!==r;){var v=l,E=v.alternate,w=v.stateNode;if(v=v.tag,E!==null&&E===r)break;v!==5&&v!==26&&v!==27||w===null||(E=w,h?(w=Va(l,g),w!=null&&y.unshift(vs(l,w,E))):h||(w=Va(l,g),w!=null&&y.push(vs(l,w,E)))),l=l.return}y.length!==0&&t.push({event:n,listeners:y})}var rv=/\r\n?/g,cv=/\u0000|\uFFFD/g;function Hg(t){return(typeof t=="string"?t:""+t).replace(rv,`
9
+ `).replace(cv,"")}function Bg(t,n){return n=Hg(n),Hg(t)===n}function Rt(t,n,l,r,h,g){switch(l){case"children":typeof r=="string"?n==="body"||n==="textarea"&&r===""||Fi(t,r):(typeof r=="number"||typeof r=="bigint")&&n!=="body"&&Fi(t,""+r);break;case"className":sl(t,"class",r);break;case"tabIndex":sl(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":sl(t,l,r);break;case"style":Bf(t,r,g);break;case"data":if(n!=="object"){sl(t,"data",r);break}case"src":case"href":if(r===""&&(n!=="a"||l!=="href")){t.removeAttribute(l);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(l);break}r=ol(""+r),t.setAttribute(l,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(l==="formAction"?(n!=="input"&&Rt(t,n,"name",h.name,h,null),Rt(t,n,"formEncType",h.formEncType,h,null),Rt(t,n,"formMethod",h.formMethod,h,null),Rt(t,n,"formTarget",h.formTarget,h,null)):(Rt(t,n,"encType",h.encType,h,null),Rt(t,n,"method",h.method,h,null),Rt(t,n,"target",h.target,h,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(l);break}r=ol(""+r),t.setAttribute(l,r);break;case"onClick":r!=null&&(t.onclick=un);break;case"onScroll":r!=null&&mt("scroll",t);break;case"onScrollEnd":r!=null&&mt("scrollend",t);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(l=r.__html,l!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}l=ol(""+r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(l,""+r):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":r===!0?t.setAttribute(l,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(l,r):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(l,r):t.removeAttribute(l);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(l):t.setAttribute(l,r);break;case"popover":mt("beforetoggle",t),mt("toggle",t),al(t,"popover",r);break;case"xlinkActuate":cn(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":cn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":cn(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":cn(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":cn(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":cn(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":cn(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":cn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":cn(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":al(t,"is",r);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Hy.get(l)||l,al(t,l,r))}}function $c(t,n,l,r,h,g){switch(l){case"style":Bf(t,r,g);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(l=r.__html,l!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"children":typeof r=="string"?Fi(t,r):(typeof r=="number"||typeof r=="bigint")&&Fi(t,""+r);break;case"onScroll":r!=null&&mt("scroll",t);break;case"onScrollEnd":r!=null&&mt("scrollend",t);break;case"onClick":r!=null&&(t.onclick=un);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cf.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),n=l.slice(2,h?l.length-7:void 0),g=t[ge]||null,g=g!=null?g[l]:null,typeof g=="function"&&t.removeEventListener(n,g,h),typeof r=="function")){typeof g!="function"&&g!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(n,r,h);break t}l in t?t[l]=r:r===!0?t.setAttribute(l,""):al(t,l,r)}}}function oe(t,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",t),mt("load",t);var r=!1,h=!1,g;for(g in l)if(l.hasOwnProperty(g)){var y=l[g];if(y!=null)switch(g){case"src":r=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:Rt(t,n,g,y,l,null)}}h&&Rt(t,n,"srcSet",l.srcSet,l,null),r&&Rt(t,n,"src",l.src,l,null);return;case"input":mt("invalid",t);var v=g=y=h=null,E=null,w=null;for(r in l)if(l.hasOwnProperty(r)){var L=l[r];if(L!=null)switch(r){case"name":h=L;break;case"type":y=L;break;case"checked":E=L;break;case"defaultChecked":w=L;break;case"value":g=L;break;case"defaultValue":v=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(s(137,n));break;default:Rt(t,n,r,L,l,null)}}jf(t,g,v,E,w,y,h,!1);return;case"select":mt("invalid",t),r=y=g=null;for(h in l)if(l.hasOwnProperty(h)&&(v=l[h],v!=null))switch(h){case"value":g=v;break;case"defaultValue":y=v;break;case"multiple":r=v;default:Rt(t,n,h,v,l,null)}n=g,l=y,t.multiple=!!r,n!=null?Ki(t,!!r,n,!1):l!=null&&Ki(t,!!r,l,!0);return;case"textarea":mt("invalid",t),g=h=r=null;for(y in l)if(l.hasOwnProperty(y)&&(v=l[y],v!=null))switch(y){case"value":r=v;break;case"defaultValue":h=v;break;case"children":g=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(s(91));break;default:Rt(t,n,y,v,l,null)}Lf(t,r,h,g);return;case"option":for(E in l)l.hasOwnProperty(E)&&(r=l[E],r!=null)&&(E==="selected"?t.selected=r&&typeof r!="function"&&typeof r!="symbol":Rt(t,n,E,r,l,null));return;case"dialog":mt("beforetoggle",t),mt("toggle",t),mt("cancel",t),mt("close",t);break;case"iframe":case"object":mt("load",t);break;case"video":case"audio":for(r=0;r<bs.length;r++)mt(bs[r],t);break;case"image":mt("error",t),mt("load",t);break;case"details":mt("toggle",t);break;case"embed":case"source":case"link":mt("error",t),mt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(w in l)if(l.hasOwnProperty(w)&&(r=l[w],r!=null))switch(w){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:Rt(t,n,w,r,l,null)}return;default:if(hr(n)){for(L in l)l.hasOwnProperty(L)&&(r=l[L],r!==void 0&&$c(t,n,L,r,l,void 0));return}}for(v in l)l.hasOwnProperty(v)&&(r=l[v],r!=null&&Rt(t,n,v,r,l,null))}function uv(t,n,l,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,y=null,v=null,E=null,w=null,L=null;for(k in l){var V=l[k];if(l.hasOwnProperty(k)&&V!=null)switch(k){case"checked":break;case"value":break;case"defaultValue":E=V;default:r.hasOwnProperty(k)||Rt(t,n,k,null,r,V)}}for(var N in r){var k=r[N];if(V=l[N],r.hasOwnProperty(N)&&(k!=null||V!=null))switch(N){case"type":g=k;break;case"name":h=k;break;case"checked":w=k;break;case"defaultChecked":L=k;break;case"value":y=k;break;case"defaultValue":v=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(s(137,n));break;default:k!==V&&Rt(t,n,N,k,r,V)}}ur(t,y,v,E,w,L,g,h);return;case"select":k=y=v=N=null;for(g in l)if(E=l[g],l.hasOwnProperty(g)&&E!=null)switch(g){case"value":break;case"multiple":k=E;default:r.hasOwnProperty(g)||Rt(t,n,g,null,r,E)}for(h in r)if(g=r[h],E=l[h],r.hasOwnProperty(h)&&(g!=null||E!=null))switch(h){case"value":N=g;break;case"defaultValue":v=g;break;case"multiple":y=g;default:g!==E&&Rt(t,n,h,g,r,E)}n=v,l=y,r=k,N!=null?Ki(t,!!l,N,!1):!!r!=!!l&&(n!=null?Ki(t,!!l,n,!0):Ki(t,!!l,l?[]:"",!1));return;case"textarea":k=N=null;for(v in l)if(h=l[v],l.hasOwnProperty(v)&&h!=null&&!r.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Rt(t,n,v,null,r,h)}for(y in r)if(h=r[y],g=l[y],r.hasOwnProperty(y)&&(h!=null||g!=null))switch(y){case"value":N=h;break;case"defaultValue":k=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==g&&Rt(t,n,y,h,r,g)}kf(t,N,k);return;case"option":for(var I in l)N=l[I],l.hasOwnProperty(I)&&N!=null&&!r.hasOwnProperty(I)&&(I==="selected"?t.selected=!1:Rt(t,n,I,null,r,N));for(E in r)N=r[E],k=l[E],r.hasOwnProperty(E)&&N!==k&&(N!=null||k!=null)&&(E==="selected"?t.selected=N&&typeof N!="function"&&typeof N!="symbol":Rt(t,n,E,N,r,k));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var nt in l)N=l[nt],l.hasOwnProperty(nt)&&N!=null&&!r.hasOwnProperty(nt)&&Rt(t,n,nt,null,r,N);for(w in r)if(N=r[w],k=l[w],r.hasOwnProperty(w)&&N!==k&&(N!=null||k!=null))switch(w){case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(s(137,n));break;default:Rt(t,n,w,N,r,k)}return;default:if(hr(n)){for(var wt in l)N=l[wt],l.hasOwnProperty(wt)&&N!==void 0&&!r.hasOwnProperty(wt)&&$c(t,n,wt,void 0,r,N);for(L in r)N=r[L],k=l[L],!r.hasOwnProperty(L)||N===k||N===void 0&&k===void 0||$c(t,n,L,N,r,k);return}}for(var C in l)N=l[C],l.hasOwnProperty(C)&&N!=null&&!r.hasOwnProperty(C)&&Rt(t,n,C,null,r,N);for(V in r)N=r[V],k=l[V],!r.hasOwnProperty(V)||N===k||N==null&&k==null||Rt(t,n,V,N,r,k)}function Ug(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fv(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,l=performance.getEntriesByType("resource"),r=0;r<l.length;r++){var h=l[r],g=h.transferSize,y=h.initiatorType,v=h.duration;if(g&&v&&Ug(y)){for(y=0,v=h.responseEnd,r+=1;r<l.length;r++){var E=l[r],w=E.startTime;if(w>v)break;var L=E.transferSize,V=E.initiatorType;L&&Ug(V)&&(E=E.responseEnd,y+=L*(E<v?1:(v-w)/(E-w)))}if(--r,n+=8*(g+y)/(h.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Pc=null,tu=null;function no(t){return t.nodeType===9?t:t.ownerDocument}function Vg(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Yg(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function eu(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var nu=null;function hv(){var t=window.event;return t&&t.type==="popstate"?t===nu?!1:(nu=t,!0):(nu=null,!1)}var qg=typeof setTimeout=="function"?setTimeout:void 0,dv=typeof clearTimeout=="function"?clearTimeout:void 0,Xg=typeof Promise=="function"?Promise:void 0,gv=typeof queueMicrotask=="function"?queueMicrotask:typeof Xg<"u"?function(t){return Xg.resolve(null).then(t).catch(mv)}:qg;function mv(t){setTimeout(function(){throw t})}function ti(t){return t==="head"}function Gg(t,n){var l=n,r=0;do{var h=l.nextSibling;if(t.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(r===0){t.removeChild(h),Ea(n);return}r--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")r++;else if(l==="html")_s(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,_s(l);for(var g=l.firstChild;g;){var y=g.nextSibling,v=g.nodeName;g[Ba]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&g.rel.toLowerCase()==="stylesheet"||l.removeChild(g),g=y}}else l==="body"&&_s(t.ownerDocument.body);l=h}while(l);Ea(n)}function Qg(t,n){var l=t;t=0;do{var r=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),r&&r.nodeType===8)if(l=r.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=r}while(l)}function iu(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":iu(l),rr(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function pv(t,n,l,r){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[Ba])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Qe(t.nextSibling),t===null)break}return null}function yv(t,n,l){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Qe(t.nextSibling),t===null))return null;return t}function Zg(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Qe(t.nextSibling),t===null))return null;return t}function au(t){return t.data==="$?"||t.data==="$~"}function su(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function bv(t,n){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||l.readyState!=="loading")n();else{var r=function(){n(),l.removeEventListener("DOMContentLoaded",r)};l.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Qe(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var lu=null;function Kg(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(n===0)return Qe(t.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}t=t.nextSibling}return null}function Fg(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return t;n--}else l!=="/$"&&l!=="/&"||n++}t=t.previousSibling}return null}function Wg(t,n,l){switch(n=no(l),t){case"html":if(t=n.documentElement,!t)throw Error(s(452));return t;case"head":if(t=n.head,!t)throw Error(s(453));return t;case"body":if(t=n.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function _s(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);rr(t)}var Ze=new Map,Jg=new Set;function io(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var An=X.d;X.d={f:vv,r:_v,D:xv,C:Sv,L:Tv,m:Mv,X:Av,S:Ev,M:Ov};function vv(){var t=An.f(),n=Fl();return t||n}function _v(t){var n=Gi(t);n!==null&&n.tag===5&&n.type==="form"?dd(n):An.r(t)}var Sa=typeof document>"u"?null:document;function Ig(t,n,l){var r=Sa;if(r&&typeof n=="string"&&n){var h=Be(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),Jg.has(h)||(Jg.add(h),t={rel:t,crossOrigin:l,href:n},r.querySelector(h)===null&&(n=r.createElement("link"),oe(n,"link",t),ee(n),r.head.appendChild(n)))}}function xv(t){An.D(t),Ig("dns-prefetch",t,null)}function Sv(t,n){An.C(t,n),Ig("preconnect",t,n)}function Tv(t,n,l){An.L(t,n,l);var r=Sa;if(r&&t&&n){var h='link[rel="preload"][as="'+Be(n)+'"]';n==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Be(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Be(l.imageSizes)+'"]')):h+='[href="'+Be(t)+'"]';var g=h;switch(n){case"style":g=Ta(t);break;case"script":g=Ma(t)}Ze.has(g)||(t=b({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:t,as:n},l),Ze.set(g,t),r.querySelector(h)!==null||n==="style"&&r.querySelector(xs(g))||n==="script"&&r.querySelector(Ss(g))||(n=r.createElement("link"),oe(n,"link",t),ee(n),r.head.appendChild(n)))}}function Mv(t,n){An.m(t,n);var l=Sa;if(l&&t){var r=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+Be(r)+'"][href="'+Be(t)+'"]',g=h;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Ma(t)}if(!Ze.has(g)&&(t=b({rel:"modulepreload",href:t},n),Ze.set(g,t),l.querySelector(h)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ss(g)))return}r=l.createElement("link"),oe(r,"link",t),ee(r),l.head.appendChild(r)}}}function Ev(t,n,l){An.S(t,n,l);var r=Sa;if(r&&t){var h=Qi(r).hoistableStyles,g=Ta(t);n=n||"default";var y=h.get(g);if(!y){var v={loading:0,preload:null};if(y=r.querySelector(xs(g)))v.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":n},l),(l=Ze.get(g))&&ou(t,l);var E=y=r.createElement("link");ee(E),oe(E,"link",t),E._p=new Promise(function(w,L){E.onload=w,E.onerror=L}),E.addEventListener("load",function(){v.loading|=1}),E.addEventListener("error",function(){v.loading|=2}),v.loading|=4,ao(y,n,r)}y={type:"stylesheet",instance:y,count:1,state:v},h.set(g,y)}}}function Av(t,n){An.X(t,n);var l=Sa;if(l&&t){var r=Qi(l).hoistableScripts,h=Ma(t),g=r.get(h);g||(g=l.querySelector(Ss(h)),g||(t=b({src:t,async:!0},n),(n=Ze.get(h))&&ru(t,n),g=l.createElement("script"),ee(g),oe(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},r.set(h,g))}}function Ov(t,n){An.M(t,n);var l=Sa;if(l&&t){var r=Qi(l).hoistableScripts,h=Ma(t),g=r.get(h);g||(g=l.querySelector(Ss(h)),g||(t=b({src:t,async:!0,type:"module"},n),(n=Ze.get(h))&&ru(t,n),g=l.createElement("script"),ee(g),oe(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},r.set(h,g))}}function $g(t,n,l,r){var h=(h=ot.current)?io(h):null;if(!h)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=Ta(l.href),l=Qi(h).hoistableStyles,r=l.get(n),r||(r={type:"style",instance:null,count:0,state:null},l.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Ta(l.href);var g=Qi(h).hoistableStyles,y=g.get(t);if(y||(h=h.ownerDocument||h,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,y),(g=h.querySelector(xs(t)))&&!g._p&&(y.instance=g,y.state.loading=5),Ze.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ze.set(t,l),g||Dv(h,t,l,y.state))),n&&r===null)throw Error(s(528,""));return y}if(n&&r!==null)throw Error(s(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ma(l),l=Qi(h).hoistableScripts,r=l.get(n),r||(r={type:"script",instance:null,count:0,state:null},l.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Ta(t){return'href="'+Be(t)+'"'}function xs(t){return'link[rel="stylesheet"]['+t+"]"}function Pg(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function Dv(t,n,l,r){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?r.loading=1:(n=t.createElement("link"),r.preload=n,n.addEventListener("load",function(){return r.loading|=1}),n.addEventListener("error",function(){return r.loading|=2}),oe(n,"link",l),ee(n),t.head.appendChild(n))}function Ma(t){return'[src="'+Be(t)+'"]'}function Ss(t){return"script[async]"+t}function tm(t,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var r=t.querySelector('style[data-href~="'+Be(l.href)+'"]');if(r)return n.instance=r,ee(r),r;var h=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),ee(r),oe(r,"style",h),ao(r,l.precedence,t),n.instance=r;case"stylesheet":h=Ta(l.href);var g=t.querySelector(xs(h));if(g)return n.state.loading|=4,n.instance=g,ee(g),g;r=Pg(l),(h=Ze.get(h))&&ou(r,h),g=(t.ownerDocument||t).createElement("link"),ee(g);var y=g;return y._p=new Promise(function(v,E){y.onload=v,y.onerror=E}),oe(g,"link",r),n.state.loading|=4,ao(g,l.precedence,t),n.instance=g;case"script":return g=Ma(l.src),(h=t.querySelector(Ss(g)))?(n.instance=h,ee(h),h):(r=l,(h=Ze.get(g))&&(r=b({},l),ru(r,h)),t=t.ownerDocument||t,h=t.createElement("script"),ee(h),oe(h,"link",r),t.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(r=n.instance,n.state.loading|=4,ao(r,l.precedence,t));return n.instance}function ao(t,n,l){for(var r=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=r.length?r[r.length-1]:null,g=h,y=0;y<r.length;y++){var v=r[y];if(v.dataset.precedence===n)g=v;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(t,n.firstChild))}function ou(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function ru(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var so=null;function em(t,n,l){if(so===null){var r=new Map,h=so=new Map;h.set(l,r)}else h=so,r=h.get(l),r||(r=new Map,h.set(l,r));if(r.has(t))return r;for(r.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var g=l[h];if(!(g[Ba]||g[ie]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var y=g.getAttribute(n)||"";y=t+y;var v=r.get(y);v?v.push(g):r.set(y,[g])}}return r}function nm(t,n,l){t=t.ownerDocument||t,t.head.insertBefore(l,n==="title"?t.querySelector("head > title"):null)}function Cv(t,n,l){if(l===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function im(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function zv(t,n,l,r){if(l.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Ta(r.href),g=n.querySelector(xs(h));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=lo.bind(t),n.then(t,t)),l.state.loading|=4,l.instance=g,ee(g);return}g=n.ownerDocument||n,r=Pg(r),(h=Ze.get(h))&&ou(r,h),g=g.createElement("link"),ee(g);var y=g;y._p=new Promise(function(v,E){y.onload=v,y.onerror=E}),oe(g,"link",r),l.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=lo.bind(t),n.addEventListener("load",l),n.addEventListener("error",l))}}var cu=0;function Rv(t,n){return t.stylesheets&&t.count===0&&ro(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var r=setTimeout(function(){if(t.stylesheets&&ro(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+n);0<t.imgBytes&&cu===0&&(cu=62500*fv());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ro(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>cu?50:800)+n);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(h)}}:null}function lo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ro(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var oo=null;function ro(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,oo=new Map,n.forEach(wv,t),oo=null,lo.call(t))}function wv(t,n){if(!(n.state.loading&4)){var l=oo.get(t);if(l)var r=l.get(null);else{l=new Map,oo.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var y=h[g];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),r=y)}r&&l.set(null,r)}h=n.instance,y=h.getAttribute("data-precedence"),g=l.get(y)||r,g===r&&l.set(null,h),l.set(y,h),this.count++,r=lo.bind(this),h.addEventListener("load",r),h.addEventListener("error",r),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var Ts={$$typeof:Y,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function Nv(t,n,l,r,h,g,y,v,E){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ar(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ar(0),this.hiddenUpdates=ar(null),this.identifierPrefix=r,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function am(t,n,l,r,h,g,y,v,E,w,L,V){return t=new Nv(t,n,l,y,E,w,L,V,v),n=1,g===!0&&(n|=24),g=Ce(3,null,null,n),t.current=g,g.stateNode=t,n=qr(),n.refCount++,t.pooledCache=n,n.refCount++,g.memoizedState={element:r,isDehydrated:l,cache:n},Zr(g),t}function sm(t){return t?(t=ea,t):ea}function lm(t,n,l,r,h,g){h=sm(h),r.context===null?r.context=h:r.pendingContext=h,r=Xn(n),r.payload={element:l},g=g===void 0?null:g,g!==null&&(r.callback=g),l=Gn(t,r,n),l!==null&&(_e(l,t,n),es(l,t,n))}function om(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<n?l:n}}function uu(t,n){om(t,n),(t=t.alternate)&&om(t,n)}function rm(t){if(t.tag===13||t.tag===31){var n=vi(t,67108864);n!==null&&_e(n,t,67108864),uu(t,67108864)}}function cm(t){if(t.tag===13||t.tag===31){var n=je();n=sr(n);var l=vi(t,n);l!==null&&_e(l,t,n),uu(t,n)}}var co=!0;function jv(t,n,l,r){var h=j.T;j.T=null;var g=X.p;try{X.p=2,fu(t,n,l,r)}finally{X.p=g,j.T=h}}function kv(t,n,l,r){var h=j.T;j.T=null;var g=X.p;try{X.p=8,fu(t,n,l,r)}finally{X.p=g,j.T=h}}function fu(t,n,l,r){if(co){var h=hu(r);if(h===null)Ic(t,n,r,uo,l),fm(t,r);else if(Hv(h,t,n,l,r))r.stopPropagation();else if(fm(t,r),n&4&&-1<Lv.indexOf(t)){for(;h!==null;){var g=Gi(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var y=gi(g.pendingLanes);if(y!==0){var v=g;for(v.pendingLanes|=2,v.entangledLanes|=2;y;){var E=1<<31-Oe(y);v.entanglements[1]|=E,y&=~E}en(g),(Mt&6)===0&&(Zl=Ee()+500,ys(0))}}break;case 31:case 13:v=vi(g,2),v!==null&&_e(v,g,2),Fl(),uu(g,2)}if(g=hu(r),g===null&&Ic(t,n,r,uo,l),g===h)break;h=g}h!==null&&r.stopPropagation()}else Ic(t,n,r,null,l)}}function hu(t){return t=gr(t),du(t)}var uo=null;function du(t){if(uo=null,t=Xi(t),t!==null){var n=c(t);if(n===null)t=null;else{var l=n.tag;if(l===13){if(t=u(n),t!==null)return t;t=null}else if(l===31){if(t=f(n),t!==null)return t;t=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return uo=t,null}function um(t){switch(t){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(xy()){case bf:return 2;case vf:return 8;case Ps:case Sy:return 32;case _f:return 268435456;default:return 32}default:return 32}}var gu=!1,ei=null,ni=null,ii=null,Ms=new Map,Es=new Map,ai=[],Lv="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".split(" ");function fm(t,n){switch(t){case"focusin":case"focusout":ei=null;break;case"dragenter":case"dragleave":ni=null;break;case"mouseover":case"mouseout":ii=null;break;case"pointerover":case"pointerout":Ms.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Es.delete(n.pointerId)}}function As(t,n,l,r,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:n,domEventName:l,eventSystemFlags:r,nativeEvent:g,targetContainers:[h]},n!==null&&(n=Gi(n),n!==null&&rm(n)),t):(t.eventSystemFlags|=r,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function Hv(t,n,l,r,h){switch(n){case"focusin":return ei=As(ei,t,n,l,r,h),!0;case"dragenter":return ni=As(ni,t,n,l,r,h),!0;case"mouseover":return ii=As(ii,t,n,l,r,h),!0;case"pointerover":var g=h.pointerId;return Ms.set(g,As(Ms.get(g)||null,t,n,l,r,h)),!0;case"gotpointercapture":return g=h.pointerId,Es.set(g,As(Es.get(g)||null,t,n,l,r,h)),!0}return!1}function hm(t){var n=Xi(t.target);if(n!==null){var l=c(n);if(l!==null){if(n=l.tag,n===13){if(n=u(l),n!==null){t.blockedOn=n,Af(t.priority,function(){cm(l)});return}}else if(n===31){if(n=f(l),n!==null){t.blockedOn=n,Af(t.priority,function(){cm(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function fo(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var l=hu(t.nativeEvent);if(l===null){l=t.nativeEvent;var r=new l.constructor(l.type,l);dr=r,l.target.dispatchEvent(r),dr=null}else return n=Gi(l),n!==null&&rm(n),t.blockedOn=l,!1;n.shift()}return!0}function dm(t,n,l){fo(t)&&l.delete(n)}function Bv(){gu=!1,ei!==null&&fo(ei)&&(ei=null),ni!==null&&fo(ni)&&(ni=null),ii!==null&&fo(ii)&&(ii=null),Ms.forEach(dm),Es.forEach(dm)}function ho(t,n){t.blockedOn===n&&(t.blockedOn=null,gu||(gu=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Bv)))}var go=null;function gm(t){go!==t&&(go=t,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){go===t&&(go=null);for(var n=0;n<t.length;n+=3){var l=t[n],r=t[n+1],h=t[n+2];if(typeof r!="function"){if(du(r||l)===null)continue;break}var g=Gi(l);g!==null&&(t.splice(n,3),n-=3,hc(g,{pending:!0,data:h,method:l.method,action:r},r,h))}}))}function Ea(t){function n(E){return ho(E,t)}ei!==null&&ho(ei,t),ni!==null&&ho(ni,t),ii!==null&&ho(ii,t),Ms.forEach(n),Es.forEach(n);for(var l=0;l<ai.length;l++){var r=ai[l];r.blockedOn===t&&(r.blockedOn=null)}for(;0<ai.length&&(l=ai[0],l.blockedOn===null);)hm(l),l.blockedOn===null&&ai.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(r=0;r<l.length;r+=3){var h=l[r],g=l[r+1],y=h[ge]||null;if(typeof g=="function")y||gm(l);else if(y){var v=null;if(g&&g.hasAttribute("formAction")){if(h=g,y=g[ge]||null)v=y.formAction;else if(du(h)!==null)continue}else v=y.action;typeof v=="function"?l[r+1]=v:(l.splice(r,3),r-=3),gm(l)}}}function mm(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(y){return h=y})},focusReset:"manual",scroll:"manual"})}function n(){h!==null&&(h(),h=null),r||setTimeout(l,20)}function l(){if(!r&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),h!==null&&(h(),h=null)}}}function mu(t){this._internalRoot=t}mo.prototype.render=mu.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(s(409));var l=n.current,r=je();lm(l,r,t,n,null,null)},mo.prototype.unmount=mu.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;lm(t.current,2,null,t,null,null),Fl(),n[qi]=null}};function mo(t){this._internalRoot=t}mo.prototype.unstable_scheduleHydration=function(t){if(t){var n=Ef();t={blockedOn:null,target:t,priority:n};for(var l=0;l<ai.length&&n!==0&&n<ai[l].priority;l++);ai.splice(l,0,t),l===0&&hm(t)}};var pm=e.version;if(pm!=="19.2.4")throw Error(s(527,pm,"19.2.4"));X.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=m(n),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var Uv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var po=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!po.isDisabled&&po.supportsFiber)try{ka=po.inject(Uv),Ae=po}catch{}}return Ds.createRoot=function(t,n){if(!o(t))throw Error(s(299));var l=!1,r="",h=Td,g=Md,y=Ed;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError)),n=am(t,1,!1,null,null,l,r,null,h,g,y,mm),t[qi]=n.current,Jc(t),new mu(n)},Ds.hydrateRoot=function(t,n,l){if(!o(t))throw Error(s(299));var r=!1,h="",g=Td,y=Md,v=Ed,E=null;return l!=null&&(l.unstable_strictMode===!0&&(r=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(v=l.onRecoverableError),l.formState!==void 0&&(E=l.formState)),n=am(t,1,!0,n,l??null,r,h,E,g,y,v,mm),n.context=sm(null),l=n.current,r=je(),r=sr(r),h=Xn(r),h.callback=null,Gn(l,h,r),l=r,n.current.lanes=l,Ha(n,l),en(n),t[qi]=n.current,Jc(t),new mo(n)},Ds.version="19.2.4",Ds}var Am;function Wv(){if(Am)return bu.exports;Am=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),bu.exports=Fv(),bu.exports}var Jv=Wv();function Is(i){return i+.5|0}const li=(i,e,a)=>Math.max(Math.min(i,a),e);function ks(i){return li(Is(i*2.55),0,255)}function fi(i){return li(Is(i*255),0,255)}function zn(i){return li(Is(i/2.55)/100,0,1)}function Om(i){return li(Is(i*100),0,100)}const Ke={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},qu=[..."0123456789ABCDEF"],Iv=i=>qu[i&15],$v=i=>qu[(i&240)>>4]+qu[i&15],yo=i=>(i&240)>>4===(i&15),Pv=i=>yo(i.r)&&yo(i.g)&&yo(i.b)&&yo(i.a);function t_(i){var e=i.length,a;return i[0]==="#"&&(e===4||e===5?a={r:255&Ke[i[1]]*17,g:255&Ke[i[2]]*17,b:255&Ke[i[3]]*17,a:e===5?Ke[i[4]]*17:255}:(e===7||e===9)&&(a={r:Ke[i[1]]<<4|Ke[i[2]],g:Ke[i[3]]<<4|Ke[i[4]],b:Ke[i[5]]<<4|Ke[i[6]],a:e===9?Ke[i[7]]<<4|Ke[i[8]]:255})),a}const e_=(i,e)=>i<255?e(i):"";function n_(i){var e=Pv(i)?Iv:$v;return i?"#"+e(i.r)+e(i.g)+e(i.b)+e_(i.a,e):void 0}const i_=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function a0(i,e,a){const s=e*Math.min(a,1-a),o=(c,u=(c+i/30)%12)=>a-s*Math.max(Math.min(u-3,9-u,1),-1);return[o(0),o(8),o(4)]}function a_(i,e,a){const s=(o,c=(o+i/60)%6)=>a-a*e*Math.max(Math.min(c,4-c,1),0);return[s(5),s(3),s(1)]}function s_(i,e,a){const s=a0(i,1,.5);let o;for(e+a>1&&(o=1/(e+a),e*=o,a*=o),o=0;o<3;o++)s[o]*=1-e-a,s[o]+=e;return s}function l_(i,e,a,s,o){return i===o?(e-a)/s+(e<a?6:0):e===o?(a-i)/s+2:(i-e)/s+4}function Pu(i){const a=i.r/255,s=i.g/255,o=i.b/255,c=Math.max(a,s,o),u=Math.min(a,s,o),f=(c+u)/2;let d,m,p;return c!==u&&(p=c-u,m=f>.5?p/(2-c-u):p/(c+u),d=l_(a,s,o,p,c),d=d*60+.5),[d|0,m||0,f]}function tf(i,e,a,s){return(Array.isArray(e)?i(e[0],e[1],e[2]):i(e,a,s)).map(fi)}function ef(i,e,a){return tf(a0,i,e,a)}function o_(i,e,a){return tf(s_,i,e,a)}function r_(i,e,a){return tf(a_,i,e,a)}function s0(i){return(i%360+360)%360}function c_(i){const e=i_.exec(i);let a=255,s;if(!e)return;e[5]!==s&&(a=e[6]?ks(+e[5]):fi(+e[5]));const o=s0(+e[2]),c=+e[3]/100,u=+e[4]/100;return e[1]==="hwb"?s=o_(o,c,u):e[1]==="hsv"?s=r_(o,c,u):s=ef(o,c,u),{r:s[0],g:s[1],b:s[2],a}}function u_(i,e){var a=Pu(i);a[0]=s0(a[0]+e),a=ef(a),i.r=a[0],i.g=a[1],i.b=a[2]}function f_(i){if(!i)return;const e=Pu(i),a=e[0],s=Om(e[1]),o=Om(e[2]);return i.a<255?`hsla(${a}, ${s}%, ${o}%, ${zn(i.a)})`:`hsl(${a}, ${s}%, ${o}%)`}const Dm={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"},Cm={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 h_(){const i={},e=Object.keys(Cm),a=Object.keys(Dm);let s,o,c,u,f;for(s=0;s<e.length;s++){for(u=f=e[s],o=0;o<a.length;o++)c=a[o],f=f.replace(c,Dm[c]);c=parseInt(Cm[u],16),i[f]=[c>>16&255,c>>8&255,c&255]}return i}let bo;function d_(i){bo||(bo=h_(),bo.transparent=[0,0,0,0]);const e=bo[i.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const g_=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function m_(i){const e=g_.exec(i);let a=255,s,o,c;if(e){if(e[7]!==s){const u=+e[7];a=e[8]?ks(u):li(u*255,0,255)}return s=+e[1],o=+e[3],c=+e[5],s=255&(e[2]?ks(s):li(s,0,255)),o=255&(e[4]?ks(o):li(o,0,255)),c=255&(e[6]?ks(c):li(c,0,255)),{r:s,g:o,b:c,a}}}function p_(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${zn(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Su=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Aa=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function y_(i,e,a){const s=Aa(zn(i.r)),o=Aa(zn(i.g)),c=Aa(zn(i.b));return{r:fi(Su(s+a*(Aa(zn(e.r))-s))),g:fi(Su(o+a*(Aa(zn(e.g))-o))),b:fi(Su(c+a*(Aa(zn(e.b))-c))),a:i.a+a*(e.a-i.a)}}function vo(i,e,a){if(i){let s=Pu(i);s[e]=Math.max(0,Math.min(s[e]+s[e]*a,e===0?360:1)),s=ef(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function l0(i,e){return i&&Object.assign(e||{},i)}function zm(i){var e={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(e={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(e.a=fi(i[3]))):(e=l0(i,{r:0,g:0,b:0,a:1}),e.a=fi(e.a)),e}function b_(i){return i.charAt(0)==="r"?m_(i):c_(i)}class Gs{constructor(e){if(e instanceof Gs)return e;const a=typeof e;let s;a==="object"?s=zm(e):a==="string"&&(s=t_(e)||d_(e)||b_(e)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var e=l0(this._rgb);return e&&(e.a=zn(e.a)),e}set rgb(e){this._rgb=zm(e)}rgbString(){return this._valid?p_(this._rgb):void 0}hexString(){return this._valid?n_(this._rgb):void 0}hslString(){return this._valid?f_(this._rgb):void 0}mix(e,a){if(e){const s=this.rgb,o=e.rgb;let c;const u=a===c?.5:a,f=2*u-1,d=s.a-o.a,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2;c=1-m,s.r=255&m*s.r+c*o.r+.5,s.g=255&m*s.g+c*o.g+.5,s.b=255&m*s.b+c*o.b+.5,s.a=u*s.a+(1-u)*o.a,this.rgb=s}return this}interpolate(e,a){return e&&(this._rgb=y_(this._rgb,e._rgb,a)),this}clone(){return new Gs(this.rgb)}alpha(e){return this._rgb.a=fi(e),this}clearer(e){const a=this._rgb;return a.a*=1-e,this}greyscale(){const e=this._rgb,a=Is(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=a,this}opaquer(e){const a=this._rgb;return a.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 vo(this._rgb,2,e),this}darken(e){return vo(this._rgb,2,-e),this}saturate(e){return vo(this._rgb,1,e),this}desaturate(e){return vo(this._rgb,1,-e),this}rotate(e){return u_(this._rgb,e),this}}function On(){}const v_=(()=>{let i=0;return()=>i++})();function Tt(i){return i==null}function Ft(i){if(Array.isArray&&Array.isArray(i))return!0;const e=Object.prototype.toString.call(i);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function pt(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function fe(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function nn(i,e){return fe(i)?i:e}function ht(i,e){return typeof i>"u"?e:i}const __=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/e,o0=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*e:+i;function jt(i,e,a){if(i&&typeof i.call=="function")return i.apply(a,e)}function At(i,e,a,s){let o,c,u;if(Ft(i))for(c=i.length,o=0;o<c;o++)e.call(a,i[o],o);else if(pt(i))for(u=Object.keys(i),c=u.length,o=0;o<c;o++)e.call(a,i[u[o]],u[o])}function Lo(i,e){let a,s,o,c;if(!i||!e||i.length!==e.length)return!1;for(a=0,s=i.length;a<s;++a)if(o=i[a],c=e[a],o.datasetIndex!==c.datasetIndex||o.index!==c.index)return!1;return!0}function Ho(i){if(Ft(i))return i.map(Ho);if(pt(i)){const e=Object.create(null),a=Object.keys(i),s=a.length;let o=0;for(;o<s;++o)e[a[o]]=Ho(i[a[o]]);return e}return i}function r0(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function x_(i,e,a,s){if(!r0(i))return;const o=e[i],c=a[i];pt(o)&&pt(c)?on(o,c,s):e[i]=Ho(c)}function on(i,e,a){const s=Ft(e)?e:[e],o=s.length;if(!pt(i))return i;a=a||{};const c=a.merger||x_;let u;for(let f=0;f<o;++f){if(u=s[f],!pt(u))continue;const d=Object.keys(u);for(let m=0,p=d.length;m<p;++m)c(d[m],i,u,a)}return i}function Bs(i,e){return on(i,e,{merger:S_})}function S_(i,e,a){if(!r0(i))return;const s=e[i],o=a[i];pt(s)&&pt(o)?Bs(s,o):Object.prototype.hasOwnProperty.call(e,i)||(e[i]=Ho(o))}const Rm={"":i=>i,x:i=>i.x,y:i=>i.y};function T_(i){const e=i.split("."),a=[];let s="";for(const o of e)s+=o,s.endsWith("\\")?s=s.slice(0,-1)+".":(a.push(s),s="");return a}function M_(i){const e=T_(i);return a=>{for(const s of e){if(s==="")break;a=a&&a[s]}return a}}function Bi(i,e){return(Rm[e]||(Rm[e]=M_(e)))(i)}function nf(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Qs=i=>typeof i<"u",hi=i=>typeof i=="function",wm=(i,e)=>{if(i.size!==e.size)return!1;for(const a of i)if(!e.has(a))return!1;return!0};function E_(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const Ct=Math.PI,Yt=2*Ct,A_=Yt+Ct,Bo=Number.POSITIVE_INFINITY,O_=Ct/180,te=Ct/2,wi=Ct/4,Nm=Ct*2/3,c0=Math.log10,ln=Math.sign;function Us(i,e,a){return Math.abs(i-e)<a}function jm(i){const e=Math.round(i);i=Us(i,e,i/1e3)?e:i;const a=Math.pow(10,Math.floor(c0(i))),s=i/a;return(s<=1?1:s<=2?2:s<=5?5:10)*a}function D_(i){const e=[],a=Math.sqrt(i);let s;for(s=1;s<a;s++)i%s===0&&(e.push(s),e.push(i/s));return a===(a|0)&&e.push(a),e.sort((o,c)=>o-c).pop(),e}function C_(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Uo(i){return!C_(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function z_(i,e){const a=Math.round(i);return a-e<=i&&a+e>=i}function R_(i,e,a){let s,o,c;for(s=0,o=i.length;s<o;s++)c=i[s][a],isNaN(c)||(e.min=Math.min(e.min,c),e.max=Math.max(e.max,c))}function Rn(i){return i*(Ct/180)}function w_(i){return i*(180/Ct)}function km(i){if(!fe(i))return;let e=1,a=0;for(;Math.round(i*e)/e!==i;)e*=10,a++;return a}function u0(i,e){const a=e.x-i.x,s=e.y-i.y,o=Math.sqrt(a*a+s*s);let c=Math.atan2(s,a);return c<-.5*Ct&&(c+=Yt),{angle:c,distance:o}}function Xu(i,e){return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}function N_(i,e){return(i-e+A_)%Yt-Ct}function ke(i){return(i%Yt+Yt)%Yt}function Zs(i,e,a,s){const o=ke(i),c=ke(e),u=ke(a),f=ke(c-o),d=ke(u-o),m=ke(o-c),p=ke(o-u);return o===c||o===u||s&&c===u||f>d&&m<p}function Me(i,e,a){return Math.max(e,Math.min(a,i))}function j_(i){return Me(i,-32768,32767)}function wn(i,e,a,s=1e-6){return i>=Math.min(e,a)-s&&i<=Math.max(e,a)+s}function af(i,e,a){a=a||(u=>i[u]<e);let s=i.length-1,o=0,c;for(;s-o>1;)c=o+s>>1,a(c)?o=c:s=c;return{lo:o,hi:s}}const Gu=(i,e,a,s)=>af(i,a,s?o=>{const c=i[o][e];return c<a||c===a&&i[o+1][e]===a}:o=>i[o][e]<a),k_=(i,e,a)=>af(i,a,s=>i[s][e]>=a);function L_(i,e,a){let s=0,o=i.length;for(;s<o&&i[s]<e;)s++;for(;o>s&&i[o-1]>a;)o--;return s>0||o<i.length?i.slice(s,o):i}const f0=["push","pop","shift","splice","unshift"];function H_(i,e){if(i._chartjs){i._chartjs.listeners.push(e);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),f0.forEach(a=>{const s="_onData"+nf(a),o=i[a];Object.defineProperty(i,a,{configurable:!0,enumerable:!1,value(...c){const u=o.apply(this,c);return i._chartjs.listeners.forEach(f=>{typeof f[s]=="function"&&f[s](...c)}),u}})})}function Lm(i,e){const a=i._chartjs;if(!a)return;const s=a.listeners,o=s.indexOf(e);o!==-1&&s.splice(o,1),!(s.length>0)&&(f0.forEach(c=>{delete i[c]}),delete i._chartjs)}function h0(i){const e=new Set(i);return e.size===i.length?i:Array.from(e)}const d0=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function g0(i,e){let a=[],s=!1;return function(...o){a=o,s||(s=!0,d0.call(window,()=>{s=!1,i.apply(e,a)}))}}function B_(i,e){let a;return function(...s){return e?(clearTimeout(a),a=setTimeout(i,e,s)):i.apply(this,s),e}}const sf=i=>i==="start"?"left":i==="end"?"right":"center",ue=(i,e,a)=>i==="start"?e:i==="end"?a:(e+a)/2,U_=(i,e,a,s)=>i===(s?"left":"right")?a:i==="center"?(e+a)/2:e,_o=i=>i===0||i===1,Hm=(i,e,a)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-e)*Yt/a)),Bm=(i,e,a)=>Math.pow(2,-10*i)*Math.sin((i-e)*Yt/a)+1,Vs={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*te)+1,easeOutSine:i=>Math.sin(i*te),easeInOutSine:i=>-.5*(Math.cos(Ct*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>_o(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>_o(i)?i:Hm(i,.075,.3),easeOutElastic:i=>_o(i)?i:Bm(i,.075,.3),easeInOutElastic(i){return _o(i)?i:i<.5?.5*Hm(i*2,.1125,.45):.5+.5*Bm(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let e=1.70158;return(i/=.5)<1?.5*(i*i*(((e*=1.525)+1)*i-e)):.5*((i-=2)*i*(((e*=1.525)+1)*i+e)+2)},easeInBounce:i=>1-Vs.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Vs.easeInBounce(i*2)*.5:Vs.easeOutBounce(i*2-1)*.5+.5};function lf(i){if(i&&typeof i=="object"){const e=i.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Um(i){return lf(i)?i:new Gs(i)}function Tu(i){return lf(i)?i:new Gs(i).saturate(.5).darken(.1).hexString()}const V_=["x","y","borderWidth","radius","tension"],Y_=["color","borderColor","backgroundColor"];function q_(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),i.set("animations",{colors:{type:"color",properties:Y_},numbers:{type:"number",properties:V_}}),i.describe("animations",{_fallback:"animation"}),i.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 X_(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Vm=new Map;function G_(i,e){e=e||{};const a=i+JSON.stringify(e);let s=Vm.get(a);return s||(s=new Intl.NumberFormat(i,e),Vm.set(a,s)),s}function of(i,e,a){return G_(e,a).format(i)}const Q_={values(i){return Ft(i)?i:""+i},numeric(i,e,a){if(i===0)return"0";const s=this.chart.options.locale;let o,c=i;if(a.length>1){const m=Math.max(Math.abs(a[0].value),Math.abs(a[a.length-1].value));(m<1e-4||m>1e15)&&(o="scientific"),c=Z_(i,a)}const u=c0(Math.abs(c)),f=isNaN(u)?1:Math.max(Math.min(-1*Math.floor(u),20),0),d={notation:o,minimumFractionDigits:f,maximumFractionDigits:f};return Object.assign(d,this.options.ticks.format),of(i,s,d)}};function Z_(i,e){let a=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(a)>=1&&i!==Math.floor(i)&&(a=i-Math.floor(i)),a}var m0={formatters:Q_};function K_(i){i.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,a)=>a.lineWidth,tickColor:(e,a)=>a.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:m0.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ui=Object.create(null),Qu=Object.create(null);function Ys(i,e){if(!e)return i;const a=e.split(".");for(let s=0,o=a.length;s<o;++s){const c=a[s];i=i[c]||(i[c]=Object.create(null))}return i}function Mu(i,e,a){return typeof e=="string"?on(Ys(i,e),a):on(Ys(i,""),e)}class F_{constructor(e,a){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=s=>s.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=(s,o)=>Tu(o.backgroundColor),this.hoverBorderColor=(s,o)=>Tu(o.borderColor),this.hoverColor=(s,o)=>Tu(o.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(a)}set(e,a){return Mu(this,e,a)}get(e){return Ys(this,e)}describe(e,a){return Mu(Qu,e,a)}override(e,a){return Mu(Ui,e,a)}route(e,a,s,o){const c=Ys(this,e),u=Ys(this,s),f="_"+a;Object.defineProperties(c,{[f]:{value:c[a],writable:!0},[a]:{enumerable:!0,get(){const d=this[f],m=u[o];return pt(d)?Object.assign({},m,d):ht(d,m)},set(d){this[f]=d}}})}apply(e){e.forEach(a=>a(this))}}var Gt=new F_({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[q_,X_,K_]);function W_(i){return!i||Tt(i.size)||Tt(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Ym(i,e,a,s,o){let c=e[o];return c||(c=e[o]=i.measureText(o).width,a.push(o)),c>s&&(s=c),s}function Ni(i,e,a){const s=i.currentDevicePixelRatio,o=a!==0?Math.max(a/2,.5):0;return Math.round((e-o)*s)/s+o}function qm(i,e){!e&&!i||(e=e||i.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,i.width,i.height),e.restore())}function Zu(i,e,a,s){p0(i,e,a,s,null)}function p0(i,e,a,s,o){let c,u,f,d,m,p,b,_;const x=e.pointStyle,T=e.rotation,M=e.radius;let A=(T||0)*O_;if(x&&typeof x=="object"&&(c=x.toString(),c==="[object HTMLImageElement]"||c==="[object HTMLCanvasElement]")){i.save(),i.translate(a,s),i.rotate(A),i.drawImage(x,-x.width/2,-x.height/2,x.width,x.height),i.restore();return}if(!(isNaN(M)||M<=0)){switch(i.beginPath(),x){default:o?i.ellipse(a,s,o/2,M,0,0,Yt):i.arc(a,s,M,0,Yt),i.closePath();break;case"triangle":p=o?o/2:M,i.moveTo(a+Math.sin(A)*p,s-Math.cos(A)*M),A+=Nm,i.lineTo(a+Math.sin(A)*p,s-Math.cos(A)*M),A+=Nm,i.lineTo(a+Math.sin(A)*p,s-Math.cos(A)*M),i.closePath();break;case"rectRounded":m=M*.516,d=M-m,u=Math.cos(A+wi)*d,b=Math.cos(A+wi)*(o?o/2-m:d),f=Math.sin(A+wi)*d,_=Math.sin(A+wi)*(o?o/2-m:d),i.arc(a-b,s-f,m,A-Ct,A-te),i.arc(a+_,s-u,m,A-te,A),i.arc(a+b,s+f,m,A,A+te),i.arc(a-_,s+u,m,A+te,A+Ct),i.closePath();break;case"rect":if(!T){d=Math.SQRT1_2*M,p=o?o/2:d,i.rect(a-p,s-d,2*p,2*d);break}A+=wi;case"rectRot":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,_=Math.sin(A)*(o?o/2:M),i.moveTo(a-b,s-f),i.lineTo(a+_,s-u),i.lineTo(a+b,s+f),i.lineTo(a-_,s+u),i.closePath();break;case"crossRot":A+=wi;case"cross":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,_=Math.sin(A)*(o?o/2:M),i.moveTo(a-b,s-f),i.lineTo(a+b,s+f),i.moveTo(a+_,s-u),i.lineTo(a-_,s+u);break;case"star":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,_=Math.sin(A)*(o?o/2:M),i.moveTo(a-b,s-f),i.lineTo(a+b,s+f),i.moveTo(a+_,s-u),i.lineTo(a-_,s+u),A+=wi,b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,_=Math.sin(A)*(o?o/2:M),i.moveTo(a-b,s-f),i.lineTo(a+b,s+f),i.moveTo(a+_,s-u),i.lineTo(a-_,s+u);break;case"line":u=o?o/2:Math.cos(A)*M,f=Math.sin(A)*M,i.moveTo(a-u,s-f),i.lineTo(a+u,s+f);break;case"dash":i.moveTo(a,s),i.lineTo(a+Math.cos(A)*(o?o/2:M),s+Math.sin(A)*M);break;case!1:i.closePath();break}i.fill(),e.borderWidth>0&&i.stroke()}}function Ks(i,e,a){return a=a||.5,!e||i&&i.x>e.left-a&&i.x<e.right+a&&i.y>e.top-a&&i.y<e.bottom+a}function Go(i,e){i.save(),i.beginPath(),i.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),i.clip()}function Qo(i){i.restore()}function J_(i,e,a,s,o){if(!e)return i.lineTo(a.x,a.y);if(o==="middle"){const c=(e.x+a.x)/2;i.lineTo(c,e.y),i.lineTo(c,a.y)}else o==="after"!=!!s?i.lineTo(e.x,a.y):i.lineTo(a.x,e.y);i.lineTo(a.x,a.y)}function I_(i,e,a,s){if(!e)return i.lineTo(a.x,a.y);i.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?a.cp2x:a.cp1x,s?a.cp2y:a.cp1y,a.x,a.y)}function $_(i,e){e.translation&&i.translate(e.translation[0],e.translation[1]),Tt(e.rotation)||i.rotate(e.rotation),e.color&&(i.fillStyle=e.color),e.textAlign&&(i.textAlign=e.textAlign),e.textBaseline&&(i.textBaseline=e.textBaseline)}function P_(i,e,a,s,o){if(o.strikethrough||o.underline){const c=i.measureText(s),u=e-c.actualBoundingBoxLeft,f=e+c.actualBoundingBoxRight,d=a-c.actualBoundingBoxAscent,m=a+c.actualBoundingBoxDescent,p=o.strikethrough?(d+m)/2:m;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=o.decorationWidth||2,i.moveTo(u,p),i.lineTo(f,p),i.stroke()}}function tx(i,e){const a=i.fillStyle;i.fillStyle=e.color,i.fillRect(e.left,e.top,e.width,e.height),i.fillStyle=a}function Fs(i,e,a,s,o,c={}){const u=Ft(e)?e:[e],f=c.strokeWidth>0&&c.strokeColor!=="";let d,m;for(i.save(),i.font=o.string,$_(i,c),d=0;d<u.length;++d)m=u[d],c.backdrop&&tx(i,c.backdrop),f&&(c.strokeColor&&(i.strokeStyle=c.strokeColor),Tt(c.strokeWidth)||(i.lineWidth=c.strokeWidth),i.strokeText(m,a,s,c.maxWidth)),i.fillText(m,a,s,c.maxWidth),P_(i,a,s,m,c),s+=Number(o.lineHeight);i.restore()}function Vo(i,e){const{x:a,y:s,w:o,h:c,radius:u}=e;i.arc(a+u.topLeft,s+u.topLeft,u.topLeft,1.5*Ct,Ct,!0),i.lineTo(a,s+c-u.bottomLeft),i.arc(a+u.bottomLeft,s+c-u.bottomLeft,u.bottomLeft,Ct,te,!0),i.lineTo(a+o-u.bottomRight,s+c),i.arc(a+o-u.bottomRight,s+c-u.bottomRight,u.bottomRight,te,0,!0),i.lineTo(a+o,s+u.topRight),i.arc(a+o-u.topRight,s+u.topRight,u.topRight,0,-te,!0),i.lineTo(a+u.topLeft,s)}const ex=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,nx=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function ix(i,e){const a=(""+i).match(ex);if(!a||a[1]==="normal")return e*1.2;switch(i=+a[2],a[3]){case"px":return i;case"%":i/=100;break}return e*i}const ax=i=>+i||0;function rf(i,e){const a={},s=pt(e),o=s?Object.keys(e):e,c=pt(i)?s?u=>ht(i[u],i[e[u]]):u=>i[u]:()=>i;for(const u of o)a[u]=ax(c(u));return a}function y0(i){return rf(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Da(i){return rf(i,["topLeft","topRight","bottomLeft","bottomRight"])}function Le(i){const e=y0(i);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function re(i,e){i=i||{},e=e||Gt.font;let a=ht(i.size,e.size);typeof a=="string"&&(a=parseInt(a,10));let s=ht(i.style,e.style);s&&!(""+s).match(nx)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const o={family:ht(i.family,e.family),lineHeight:ix(ht(i.lineHeight,e.lineHeight),a),size:a,style:s,weight:ht(i.weight,e.weight),string:""};return o.string=W_(o),o}function Ut(i,e,a,s){let o,c,u;for(o=0,c=i.length;o<c;++o)if(u=i[o],u!==void 0&&(e!==void 0&&typeof u=="function"&&(u=u(e)),a!==void 0&&Ft(u)&&(u=u[a%u.length]),u!==void 0))return u}function sx(i,e,a){const{min:s,max:o}=i,c=o0(e,(o-s)/2),u=(f,d)=>a&&f===0?0:f+d;return{min:u(s,-Math.abs(c)),max:u(o,c)}}function Vi(i,e){return Object.assign(Object.create(i),e)}function cf(i,e=[""],a,s,o=()=>i[0]){const c=a||i;typeof s>"u"&&(s=x0("_fallback",i));const u={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:c,_fallback:s,_getTarget:o,override:f=>cf([f,...i],e,c,s)};return new Proxy(u,{deleteProperty(f,d){return delete f[d],delete f._keys,delete i[0][d],!0},get(f,d){return v0(f,d,()=>dx(d,e,i,f))},getOwnPropertyDescriptor(f,d){return Reflect.getOwnPropertyDescriptor(f._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(f,d){return Gm(f).includes(d)},ownKeys(f){return Gm(f)},set(f,d,m){const p=f._storage||(f._storage=o());return f[d]=p[d]=m,delete f._keys,!0}})}function Ra(i,e,a,s){const o={_cacheable:!1,_proxy:i,_context:e,_subProxy:a,_stack:new Set,_descriptors:b0(i,s),setContext:c=>Ra(i,c,a,s),override:c=>Ra(i.override(c),e,a,s)};return new Proxy(o,{deleteProperty(c,u){return delete c[u],delete i[u],!0},get(c,u,f){return v0(c,u,()=>ox(c,u,f))},getOwnPropertyDescriptor(c,u){return c._descriptors.allKeys?Reflect.has(i,u)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,u)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(c,u){return Reflect.has(i,u)},ownKeys(){return Reflect.ownKeys(i)},set(c,u,f){return i[u]=f,delete c[u],!0}})}function b0(i,e={scriptable:!0,indexable:!0}){const{_scriptable:a=e.scriptable,_indexable:s=e.indexable,_allKeys:o=e.allKeys}=i;return{allKeys:o,scriptable:a,indexable:s,isScriptable:hi(a)?a:()=>a,isIndexable:hi(s)?s:()=>s}}const lx=(i,e)=>i?i+nf(e):e,uf=(i,e)=>pt(e)&&i!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function v0(i,e,a){if(Object.prototype.hasOwnProperty.call(i,e)||e==="constructor")return i[e];const s=a();return i[e]=s,s}function ox(i,e,a){const{_proxy:s,_context:o,_subProxy:c,_descriptors:u}=i;let f=s[e];return hi(f)&&u.isScriptable(e)&&(f=rx(e,f,i,a)),Ft(f)&&f.length&&(f=cx(e,f,i,u.isIndexable)),uf(e,f)&&(f=Ra(f,o,c&&c[e],u)),f}function rx(i,e,a,s){const{_proxy:o,_context:c,_subProxy:u,_stack:f}=a;if(f.has(i))throw new Error("Recursion detected: "+Array.from(f).join("->")+"->"+i);f.add(i);let d=e(c,u||s);return f.delete(i),uf(i,d)&&(d=ff(o._scopes,o,i,d)),d}function cx(i,e,a,s){const{_proxy:o,_context:c,_subProxy:u,_descriptors:f}=a;if(typeof c.index<"u"&&s(i))return e[c.index%e.length];if(pt(e[0])){const d=e,m=o._scopes.filter(p=>p!==d);e=[];for(const p of d){const b=ff(m,o,i,p);e.push(Ra(b,c,u&&u[i],f))}}return e}function _0(i,e,a){return hi(i)?i(e,a):i}const ux=(i,e)=>i===!0?e:typeof i=="string"?Bi(e,i):void 0;function fx(i,e,a,s,o){for(const c of e){const u=ux(a,c);if(u){i.add(u);const f=_0(u._fallback,a,o);if(typeof f<"u"&&f!==a&&f!==s)return f}else if(u===!1&&typeof s<"u"&&a!==s)return null}return!1}function ff(i,e,a,s){const o=e._rootScopes,c=_0(e._fallback,a,s),u=[...i,...o],f=new Set;f.add(s);let d=Xm(f,u,a,c||a,s);return d===null||typeof c<"u"&&c!==a&&(d=Xm(f,u,c,d,s),d===null)?!1:cf(Array.from(f),[""],o,c,()=>hx(e,a,s))}function Xm(i,e,a,s,o){for(;a;)a=fx(i,e,a,s,o);return a}function hx(i,e,a){const s=i._getTarget();e in s||(s[e]={});const o=s[e];return Ft(o)&&pt(a)?a:o||{}}function dx(i,e,a,s){let o;for(const c of e)if(o=x0(lx(c,i),a),typeof o<"u")return uf(i,o)?ff(a,s,i,o):o}function x0(i,e){for(const a of e){if(!a)continue;const s=a[i];if(typeof s<"u")return s}}function Gm(i){let e=i._keys;return e||(e=i._keys=gx(i._scopes)),e}function gx(i){const e=new Set;for(const a of i)for(const s of Object.keys(a).filter(o=>!o.startsWith("_")))e.add(s);return Array.from(e)}const mx=Number.EPSILON||1e-14,wa=(i,e)=>e<i.length&&!i[e].skip&&i[e],S0=i=>i==="x"?"y":"x";function px(i,e,a,s){const o=i.skip?e:i,c=e,u=a.skip?e:a,f=Xu(c,o),d=Xu(u,c);let m=f/(f+d),p=d/(f+d);m=isNaN(m)?0:m,p=isNaN(p)?0:p;const b=s*m,_=s*p;return{previous:{x:c.x-b*(u.x-o.x),y:c.y-b*(u.y-o.y)},next:{x:c.x+_*(u.x-o.x),y:c.y+_*(u.y-o.y)}}}function yx(i,e,a){const s=i.length;let o,c,u,f,d,m=wa(i,0);for(let p=0;p<s-1;++p)if(d=m,m=wa(i,p+1),!(!d||!m)){if(Us(e[p],0,mx)){a[p]=a[p+1]=0;continue}o=a[p]/e[p],c=a[p+1]/e[p],f=Math.pow(o,2)+Math.pow(c,2),!(f<=9)&&(u=3/Math.sqrt(f),a[p]=o*u*e[p],a[p+1]=c*u*e[p])}}function bx(i,e,a="x"){const s=S0(a),o=i.length;let c,u,f,d=wa(i,0);for(let m=0;m<o;++m){if(u=f,f=d,d=wa(i,m+1),!f)continue;const p=f[a],b=f[s];u&&(c=(p-u[a])/3,f[`cp1${a}`]=p-c,f[`cp1${s}`]=b-c*e[m]),d&&(c=(d[a]-p)/3,f[`cp2${a}`]=p+c,f[`cp2${s}`]=b+c*e[m])}}function vx(i,e="x"){const a=S0(e),s=i.length,o=Array(s).fill(0),c=Array(s);let u,f,d,m=wa(i,0);for(u=0;u<s;++u)if(f=d,d=m,m=wa(i,u+1),!!d){if(m){const p=m[e]-d[e];o[u]=p!==0?(m[a]-d[a])/p:0}c[u]=f?m?ln(o[u-1])!==ln(o[u])?0:(o[u-1]+o[u])/2:o[u-1]:o[u]}yx(i,o,c),bx(i,c,e)}function xo(i,e,a){return Math.max(Math.min(i,a),e)}function _x(i,e){let a,s,o,c,u,f=Ks(i[0],e);for(a=0,s=i.length;a<s;++a)u=c,c=f,f=a<s-1&&Ks(i[a+1],e),c&&(o=i[a],u&&(o.cp1x=xo(o.cp1x,e.left,e.right),o.cp1y=xo(o.cp1y,e.top,e.bottom)),f&&(o.cp2x=xo(o.cp2x,e.left,e.right),o.cp2y=xo(o.cp2y,e.top,e.bottom)))}function xx(i,e,a,s,o){let c,u,f,d;if(e.spanGaps&&(i=i.filter(m=>!m.skip)),e.cubicInterpolationMode==="monotone")vx(i,o);else{let m=s?i[i.length-1]:i[0];for(c=0,u=i.length;c<u;++c)f=i[c],d=px(m,f,i[Math.min(c+1,u-(s?0:1))%u],e.tension),f.cp1x=d.previous.x,f.cp1y=d.previous.y,f.cp2x=d.next.x,f.cp2y=d.next.y,m=f}e.capBezierPoints&&_x(i,a)}function hf(){return typeof window<"u"&&typeof document<"u"}function df(i){let e=i.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Yo(i,e,a){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*e.parentNode[a])):s=i,s}const Zo=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Sx(i,e){return Zo(i).getPropertyValue(e)}const Tx=["top","right","bottom","left"];function Hi(i,e,a){const s={};a=a?"-"+a:"";for(let o=0;o<4;o++){const c=Tx[o];s[c]=parseFloat(i[e+"-"+c+a])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Mx=(i,e,a)=>(i>0||e>0)&&(!a||!a.shadowRoot);function Ex(i,e){const a=i.touches,s=a&&a.length?a[0]:i,{offsetX:o,offsetY:c}=s;let u=!1,f,d;if(Mx(o,c,i.target))f=o,d=c;else{const m=e.getBoundingClientRect();f=s.clientX-m.left,d=s.clientY-m.top,u=!0}return{x:f,y:d,box:u}}function ki(i,e){if("native"in i)return i;const{canvas:a,currentDevicePixelRatio:s}=e,o=Zo(a),c=o.boxSizing==="border-box",u=Hi(o,"padding"),f=Hi(o,"border","width"),{x:d,y:m,box:p}=Ex(i,a),b=u.left+(p&&f.left),_=u.top+(p&&f.top);let{width:x,height:T}=e;return c&&(x-=u.width+f.width,T-=u.height+f.height),{x:Math.round((d-b)/x*a.width/s),y:Math.round((m-_)/T*a.height/s)}}function Ax(i,e,a){let s,o;if(e===void 0||a===void 0){const c=i&&df(i);if(!c)e=i.clientWidth,a=i.clientHeight;else{const u=c.getBoundingClientRect(),f=Zo(c),d=Hi(f,"border","width"),m=Hi(f,"padding");e=u.width-m.width-d.width,a=u.height-m.height-d.height,s=Yo(f.maxWidth,c,"clientWidth"),o=Yo(f.maxHeight,c,"clientHeight")}}return{width:e,height:a,maxWidth:s||Bo,maxHeight:o||Bo}}const oi=i=>Math.round(i*10)/10;function Ox(i,e,a,s){const o=Zo(i),c=Hi(o,"margin"),u=Yo(o.maxWidth,i,"clientWidth")||Bo,f=Yo(o.maxHeight,i,"clientHeight")||Bo,d=Ax(i,e,a);let{width:m,height:p}=d;if(o.boxSizing==="content-box"){const _=Hi(o,"border","width"),x=Hi(o,"padding");m-=x.width+_.width,p-=x.height+_.height}return m=Math.max(0,m-c.width),p=Math.max(0,s?m/s:p-c.height),m=oi(Math.min(m,u,d.maxWidth)),p=oi(Math.min(p,f,d.maxHeight)),m&&!p&&(p=oi(m/2)),(e!==void 0||a!==void 0)&&s&&d.height&&p>d.height&&(p=d.height,m=oi(Math.floor(p*s))),{width:m,height:p}}function Qm(i,e,a){const s=e||1,o=oi(i.height*s),c=oi(i.width*s);i.height=oi(i.height),i.width=oi(i.width);const u=i.canvas;return u.style&&(a||!u.style.height&&!u.style.width)&&(u.style.height=`${i.height}px`,u.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||u.height!==o||u.width!==c?(i.currentDevicePixelRatio=s,u.height=o,u.width=c,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const Dx=(function(){let i=!1;try{const e={get passive(){return i=!0,!1}};hf()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return i})();function Zm(i,e){const a=Sx(i,e),s=a&&a.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Li(i,e,a,s){return{x:i.x+a*(e.x-i.x),y:i.y+a*(e.y-i.y)}}function Cx(i,e,a,s){return{x:i.x+a*(e.x-i.x),y:s==="middle"?a<.5?i.y:e.y:s==="after"?a<1?i.y:e.y:a>0?e.y:i.y}}function zx(i,e,a,s){const o={x:i.cp2x,y:i.cp2y},c={x:e.cp1x,y:e.cp1y},u=Li(i,o,a),f=Li(o,c,a),d=Li(c,e,a),m=Li(u,f,a),p=Li(f,d,a);return Li(m,p,a)}const Rx=function(i,e){return{x(a){return i+i+e-a},setWidth(a){e=a},textAlign(a){return a==="center"?a:a==="right"?"left":"right"},xPlus(a,s){return a-s},leftForLtr(a,s){return a-s}}},wx=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,e){return i+e},leftForLtr(i,e){return i}}};function Ca(i,e,a){return i?Rx(e,a):wx()}function T0(i,e){let a,s;(e==="ltr"||e==="rtl")&&(a=i.canvas.style,s=[a.getPropertyValue("direction"),a.getPropertyPriority("direction")],a.setProperty("direction",e,"important"),i.prevTextDirection=s)}function M0(i,e){e!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",e[0],e[1]))}function E0(i){return i==="angle"?{between:Zs,compare:N_,normalize:ke}:{between:wn,compare:(e,a)=>e-a,normalize:e=>e}}function Km({start:i,end:e,count:a,loop:s,style:o}){return{start:i%a,end:e%a,loop:s&&(e-i+1)%a===0,style:o}}function Nx(i,e,a){const{property:s,start:o,end:c}=a,{between:u,normalize:f}=E0(s),d=e.length;let{start:m,end:p,loop:b}=i,_,x;if(b){for(m+=d,p+=d,_=0,x=d;_<x&&u(f(e[m%d][s]),o,c);++_)m--,p--;m%=d,p%=d}return p<m&&(p+=d),{start:m,end:p,loop:b,style:i.style}}function A0(i,e,a){if(!a)return[i];const{property:s,start:o,end:c}=a,u=e.length,{compare:f,between:d,normalize:m}=E0(s),{start:p,end:b,loop:_,style:x}=Nx(i,e,a),T=[];let M=!1,A=null,z,H,Y;const G=()=>d(o,Y,z)&&f(o,Y)!==0,q=()=>f(c,z)===0||d(c,Y,z),K=()=>M||G(),Q=()=>!M||q();for(let F=p,tt=p;F<=b;++F)H=e[F%u],!H.skip&&(z=m(H[s]),z!==Y&&(M=d(z,o,c),A===null&&K()&&(A=f(z,o)===0?F:tt),A!==null&&Q()&&(T.push(Km({start:A,end:F,loop:_,count:u,style:x})),A=null),tt=F,Y=z));return A!==null&&T.push(Km({start:A,end:b,loop:_,count:u,style:x})),T}function O0(i,e){const a=[],s=i.segments;for(let o=0;o<s.length;o++){const c=A0(s[o],i.points,e);c.length&&a.push(...c)}return a}function jx(i,e,a,s){let o=0,c=e-1;if(a&&!s)for(;o<e&&!i[o].skip;)o++;for(;o<e&&i[o].skip;)o++;for(o%=e,a&&(c+=o);c>o&&i[c%e].skip;)c--;return c%=e,{start:o,end:c}}function kx(i,e,a,s){const o=i.length,c=[];let u=e,f=i[e],d;for(d=e+1;d<=a;++d){const m=i[d%o];m.skip||m.stop?f.skip||(s=!1,c.push({start:e%o,end:(d-1)%o,loop:s}),e=u=m.stop?d:null):(u=d,f.skip&&(e=d)),f=m}return u!==null&&c.push({start:e%o,end:u%o,loop:s}),c}function Lx(i,e){const a=i.points,s=i.options.spanGaps,o=a.length;if(!o)return[];const c=!!i._loop,{start:u,end:f}=jx(a,o,c,s);if(s===!0)return Fm(i,[{start:u,end:f,loop:c}],a,e);const d=f<u?f+o:f,m=!!i._fullLoop&&u===0&&f===o-1;return Fm(i,kx(a,u,d,m),a,e)}function Fm(i,e,a,s){return!s||!s.setContext||!a?e:Hx(i,e,a,s)}function Hx(i,e,a,s){const o=i._chart.getContext(),c=Wm(i.options),{_datasetIndex:u,options:{spanGaps:f}}=i,d=a.length,m=[];let p=c,b=e[0].start,_=b;function x(T,M,A,z){const H=f?-1:1;if(T!==M){for(T+=d;a[T%d].skip;)T-=H;for(;a[M%d].skip;)M+=H;T%d!==M%d&&(m.push({start:T%d,end:M%d,loop:A,style:z}),p=z,b=M%d)}}for(const T of e){b=f?b:T.start;let M=a[b%d],A;for(_=b+1;_<=T.end;_++){const z=a[_%d];A=Wm(s.setContext(Vi(o,{type:"segment",p0:M,p1:z,p0DataIndex:(_-1)%d,p1DataIndex:_%d,datasetIndex:u}))),Bx(A,p)&&x(b,_-1,T.loop,p),M=z,p=A}b<_-1&&x(b,_-1,T.loop,p)}return m}function Wm(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Bx(i,e){if(!e)return!1;const a=[],s=function(o,c){return lf(c)?(a.includes(c)||a.push(c),a.indexOf(c)):c};return JSON.stringify(i,s)!==JSON.stringify(e,s)}function So(i,e,a){return i.options.clip?i[a]:e[a]}function Ux(i,e){const{xScale:a,yScale:s}=i;return a&&s?{left:So(a,e,"left"),right:So(a,e,"right"),top:So(s,e,"top"),bottom:So(s,e,"bottom")}:e}function D0(i,e){const a=e._clip;if(a.disabled)return!1;const s=Ux(e,i.chartArea);return{left:a.left===!1?0:s.left-(a.left===!0?0:a.left),right:a.right===!1?i.width:s.right+(a.right===!0?0:a.right),top:a.top===!1?0:s.top-(a.top===!0?0:a.top),bottom:a.bottom===!1?i.height:s.bottom+(a.bottom===!0?0:a.bottom)}}class Vx{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,a,s,o){const c=a.listeners[o],u=a.duration;c.forEach(f=>f({chart:e,initial:a.initial,numSteps:u,currentStep:Math.min(s-a.start,u)}))}_refresh(){this._request||(this._running=!0,this._request=d0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let a=0;this._charts.forEach((s,o)=>{if(!s.running||!s.items.length)return;const c=s.items;let u=c.length-1,f=!1,d;for(;u>=0;--u)d=c[u],d._active?(d._total>s.duration&&(s.duration=d._total),d.tick(e),f=!0):(c[u]=c[c.length-1],c.pop());f&&(o.draw(),this._notify(o,s,e,"progress")),c.length||(s.running=!1,this._notify(o,s,e,"complete"),s.initial=!1),a+=c.length}),this._lastDate=e,a===0&&(this._running=!1)}_getAnims(e){const a=this._charts;let s=a.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},a.set(e,s)),s}listen(e,a,s){this._getAnims(e).listeners[a].push(s)}add(e,a){!a||!a.length||this._getAnims(e).items.push(...a)}has(e){return this._getAnims(e).items.length>0}start(e){const a=this._charts.get(e);a&&(a.running=!0,a.start=Date.now(),a.duration=a.items.reduce((s,o)=>Math.max(s,o._duration),0),this._refresh())}running(e){if(!this._running)return!1;const a=this._charts.get(e);return!(!a||!a.running||!a.items.length)}stop(e){const a=this._charts.get(e);if(!a||!a.items.length)return;const s=a.items;let o=s.length-1;for(;o>=0;--o)s[o].cancel();a.items=[],this._notify(e,a,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Dn=new Vx;const Jm="transparent",Yx={boolean(i,e,a){return a>.5?e:i},color(i,e,a){const s=Um(i||Jm),o=s.valid&&Um(e||Jm);return o&&o.valid?o.mix(s,a).hexString():e},number(i,e,a){return i+(e-i)*a}};class qx{constructor(e,a,s,o){const c=a[s];o=Ut([e.to,o,c,e.from]);const u=Ut([e.from,c,o]);this._active=!0,this._fn=e.fn||Yx[e.type||typeof u],this._easing=Vs[e.easing]||Vs.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=a,this._prop=s,this._from=u,this._to=o,this._promises=void 0}active(){return this._active}update(e,a,s){if(this._active){this._notify(!1);const o=this._target[this._prop],c=s-this._start,u=this._duration-c;this._start=s,this._duration=Math.floor(Math.max(u,e.duration)),this._total+=c,this._loop=!!e.loop,this._to=Ut([e.to,a,o,e.from]),this._from=Ut([e.from,o,a])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const a=e-this._start,s=this._duration,o=this._prop,c=this._from,u=this._loop,f=this._to;let d;if(this._active=c!==f&&(u||a<s),!this._active){this._target[o]=f,this._notify(!0);return}if(a<0){this._target[o]=c;return}d=a/s%2,d=u&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[o]=this._fn(c,f,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((a,s)=>{e.push({res:a,rej:s})})}_notify(e){const a=e?"res":"rej",s=this._promises||[];for(let o=0;o<s.length;o++)s[o][a]()}}class C0{constructor(e,a){this._chart=e,this._properties=new Map,this.configure(a)}configure(e){if(!pt(e))return;const a=Object.keys(Gt.animation),s=this._properties;Object.getOwnPropertyNames(e).forEach(o=>{const c=e[o];if(!pt(c))return;const u={};for(const f of a)u[f]=c[f];(Ft(c.properties)&&c.properties||[o]).forEach(f=>{(f===o||!s.has(f))&&s.set(f,u)})})}_animateOptions(e,a){const s=a.options,o=Gx(e,s);if(!o)return[];const c=this._createAnimations(o,s);return s.$shared&&Xx(e.options.$animations,s).then(()=>{e.options=s},()=>{}),c}_createAnimations(e,a){const s=this._properties,o=[],c=e.$animations||(e.$animations={}),u=Object.keys(a),f=Date.now();let d;for(d=u.length-1;d>=0;--d){const m=u[d];if(m.charAt(0)==="$")continue;if(m==="options"){o.push(...this._animateOptions(e,a));continue}const p=a[m];let b=c[m];const _=s.get(m);if(b)if(_&&b.active()){b.update(_,p,f);continue}else b.cancel();if(!_||!_.duration){e[m]=p;continue}c[m]=b=new qx(_,e,m,p),o.push(b)}return o}update(e,a){if(this._properties.size===0){Object.assign(e,a);return}const s=this._createAnimations(e,a);if(s.length)return Dn.add(this._chart,s),!0}}function Xx(i,e){const a=[],s=Object.keys(e);for(let o=0;o<s.length;o++){const c=i[s[o]];c&&c.active()&&a.push(c.wait())}return Promise.all(a)}function Gx(i,e){if(!e)return;let a=i.options;if(!a){i.options=e;return}return a.$shared&&(i.options=a=Object.assign({},a,{$shared:!1,$animations:{}})),a}function Im(i,e){const a=i&&i.options||{},s=a.reverse,o=a.min===void 0?e:0,c=a.max===void 0?e:0;return{start:s?c:o,end:s?o:c}}function Qx(i,e,a){if(a===!1)return!1;const s=Im(i,a),o=Im(e,a);return{top:o.end,right:s.end,bottom:o.start,left:s.start}}function Zx(i){let e,a,s,o;return pt(i)?(e=i.top,a=i.right,s=i.bottom,o=i.left):e=a=s=o=i,{top:e,right:a,bottom:s,left:o,disabled:i===!1}}function z0(i,e){const a=[],s=i._getSortedDatasetMetas(e);let o,c;for(o=0,c=s.length;o<c;++o)a.push(s[o].index);return a}function $m(i,e,a,s={}){const o=i.keys,c=s.mode==="single";let u,f,d,m;if(e===null)return;let p=!1;for(u=0,f=o.length;u<f;++u){if(d=+o[u],d===a){if(p=!0,s.all)continue;break}m=i.values[d],fe(m)&&(c||e===0||ln(e)===ln(m))&&(e+=m)}return!p&&!s.all?0:e}function Kx(i,e){const{iScale:a,vScale:s}=e,o=a.axis==="x"?"x":"y",c=s.axis==="x"?"x":"y",u=Object.keys(i),f=new Array(u.length);let d,m,p;for(d=0,m=u.length;d<m;++d)p=u[d],f[d]={[o]:p,[c]:i[p]};return f}function Eu(i,e){const a=i&&i.options.stacked;return a||a===void 0&&e.stack!==void 0}function Fx(i,e,a){return`${i.id}.${e.id}.${a.stack||a.type}`}function Wx(i){const{min:e,max:a,minDefined:s,maxDefined:o}=i.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:o?a:Number.POSITIVE_INFINITY}}function Jx(i,e,a){const s=i[e]||(i[e]={});return s[a]||(s[a]={})}function Pm(i,e,a,s){for(const o of e.getMatchingVisibleMetas(s).reverse()){const c=i[o.index];if(a&&c>0||!a&&c<0)return o.index}return null}function tp(i,e){const{chart:a,_cachedMeta:s}=i,o=a._stacks||(a._stacks={}),{iScale:c,vScale:u,index:f}=s,d=c.axis,m=u.axis,p=Fx(c,u,s),b=e.length;let _;for(let x=0;x<b;++x){const T=e[x],{[d]:M,[m]:A}=T,z=T._stacks||(T._stacks={});_=z[m]=Jx(o,p,M),_[f]=A,_._top=Pm(_,u,!0,s.type),_._bottom=Pm(_,u,!1,s.type);const H=_._visualValues||(_._visualValues={});H[f]=A}}function Au(i,e){const a=i.scales;return Object.keys(a).filter(s=>a[s].axis===e).shift()}function Ix(i,e){return Vi(i,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function $x(i,e,a){return Vi(i,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:a,index:e,mode:"default",type:"data"})}function Cs(i,e){const a=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){e=e||i._parsed;for(const o of e){const c=o._stacks;if(!c||c[s]===void 0||c[s][a]===void 0)return;delete c[s][a],c[s]._visualValues!==void 0&&c[s]._visualValues[a]!==void 0&&delete c[s]._visualValues[a]}}}const Ou=i=>i==="reset"||i==="none",ep=(i,e)=>e?i:Object.assign({},i),Px=(i,e,a)=>i&&!e.hidden&&e._stacked&&{keys:z0(a,!0),values:null};class gf{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,a){this.chart=e,this._ctx=e.ctx,this.index=a,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=Eu(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&&Cs(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,a=this._cachedMeta,s=this.getDataset(),o=(b,_,x,T)=>b==="x"?_:b==="r"?T:x,c=a.xAxisID=ht(s.xAxisID,Au(e,"x")),u=a.yAxisID=ht(s.yAxisID,Au(e,"y")),f=a.rAxisID=ht(s.rAxisID,Au(e,"r")),d=a.indexAxis,m=a.iAxisID=o(d,c,u,f),p=a.vAxisID=o(d,u,c,f);a.xScale=this.getScaleForId(c),a.yScale=this.getScaleForId(u),a.rScale=this.getScaleForId(f),a.iScale=this.getScaleForId(m),a.vScale=this.getScaleForId(p)}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 a=this._cachedMeta;return e===a.iScale?a.vScale:a.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Lm(this._data,this),e._stacked&&Cs(e)}_dataCheck(){const e=this.getDataset(),a=e.data||(e.data=[]),s=this._data;if(pt(a)){const o=this._cachedMeta;this._data=Kx(a,o)}else if(s!==a){if(s){Lm(s,this);const o=this._cachedMeta;Cs(o),o._parsed=[]}a&&Object.isExtensible(a)&&H_(a,this),this._syncList=[],this._data=a}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const a=this._cachedMeta,s=this.getDataset();let o=!1;this._dataCheck();const c=a._stacked;a._stacked=Eu(a.vScale,a),a.stack!==s.stack&&(o=!0,Cs(a),a.stack=s.stack),this._resyncElements(e),(o||c!==a._stacked)&&(tp(this,a._parsed),a._stacked=Eu(a.vScale,a))}configure(){const e=this.chart.config,a=e.datasetScopeKeys(this._type),s=e.getOptionScopes(this.getDataset(),a,!0);this.options=e.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,a){const{_cachedMeta:s,_data:o}=this,{iScale:c,_stacked:u}=s,f=c.axis;let d=e===0&&a===o.length?!0:s._sorted,m=e>0&&s._parsed[e-1],p,b,_;if(this._parsing===!1)s._parsed=o,s._sorted=!0,_=o;else{Ft(o[e])?_=this.parseArrayData(s,o,e,a):pt(o[e])?_=this.parseObjectData(s,o,e,a):_=this.parsePrimitiveData(s,o,e,a);const x=()=>b[f]===null||m&&b[f]<m[f];for(p=0;p<a;++p)s._parsed[p+e]=b=_[p],d&&(x()&&(d=!1),m=b);s._sorted=d}u&&tp(this,_)}parsePrimitiveData(e,a,s,o){const{iScale:c,vScale:u}=e,f=c.axis,d=u.axis,m=c.getLabels(),p=c===u,b=new Array(o);let _,x,T;for(_=0,x=o;_<x;++_)T=_+s,b[_]={[f]:p||c.parse(m[T],T),[d]:u.parse(a[T],T)};return b}parseArrayData(e,a,s,o){const{xScale:c,yScale:u}=e,f=new Array(o);let d,m,p,b;for(d=0,m=o;d<m;++d)p=d+s,b=a[p],f[d]={x:c.parse(b[0],p),y:u.parse(b[1],p)};return f}parseObjectData(e,a,s,o){const{xScale:c,yScale:u}=e,{xAxisKey:f="x",yAxisKey:d="y"}=this._parsing,m=new Array(o);let p,b,_,x;for(p=0,b=o;p<b;++p)_=p+s,x=a[_],m[p]={x:c.parse(Bi(x,f),_),y:u.parse(Bi(x,d),_)};return m}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,a,s){const o=this.chart,c=this._cachedMeta,u=a[e.axis],f={keys:z0(o,!0),values:a._stacks[e.axis]._visualValues};return $m(f,u,c.index,{mode:s})}updateRangeFromParsed(e,a,s,o){const c=s[a.axis];let u=c===null?NaN:c;const f=o&&s._stacks[a.axis];o&&f&&(o.values=f,u=$m(o,c,this._cachedMeta.index)),e.min=Math.min(e.min,u),e.max=Math.max(e.max,u)}getMinMax(e,a){const s=this._cachedMeta,o=s._parsed,c=s._sorted&&e===s.iScale,u=o.length,f=this._getOtherScale(e),d=Px(a,s,this.chart),m={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:b}=Wx(f);let _,x;function T(){x=o[_];const M=x[f.axis];return!fe(x[e.axis])||p>M||b<M}for(_=0;_<u&&!(!T()&&(this.updateRangeFromParsed(m,e,x,d),c));++_);if(c){for(_=u-1;_>=0;--_)if(!T()){this.updateRangeFromParsed(m,e,x,d);break}}return m}getAllParsedValues(e){const a=this._cachedMeta._parsed,s=[];let o,c,u;for(o=0,c=a.length;o<c;++o)u=a[o][e.axis],fe(u)&&s.push(u);return s}getMaxOverflow(){return!1}getLabelAndValue(e){const a=this._cachedMeta,s=a.iScale,o=a.vScale,c=this.getParsed(e);return{label:s?""+s.getLabelForValue(c[s.axis]):"",value:o?""+o.getLabelForValue(c[o.axis]):""}}_update(e){const a=this._cachedMeta;this.update(e||"default"),a._clip=Zx(ht(this.options.clip,Qx(a.xScale,a.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,a=this.chart,s=this._cachedMeta,o=s.data||[],c=a.chartArea,u=[],f=this._drawStart||0,d=this._drawCount||o.length-f,m=this.options.drawActiveElementsOnTop;let p;for(s.dataset&&s.dataset.draw(e,c,f,d),p=f;p<f+d;++p){const b=o[p];b.hidden||(b.active&&m?u.push(b):b.draw(e,c))}for(p=0;p<u.length;++p)u[p].draw(e,c)}getStyle(e,a){const s=a?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(e||0,s)}getContext(e,a,s){const o=this.getDataset();let c;if(e>=0&&e<this._cachedMeta.data.length){const u=this._cachedMeta.data[e];c=u.$context||(u.$context=$x(this.getContext(),e,u)),c.parsed=this.getParsed(e),c.raw=o.data[e],c.index=c.dataIndex=e}else c=this.$context||(this.$context=Ix(this.chart.getContext(),this.index)),c.dataset=o,c.index=c.datasetIndex=this.index;return c.active=!!a,c.mode=s,c}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,a){return this._resolveElementOptions(this.dataElementType.id,a,e)}_resolveElementOptions(e,a="default",s){const o=a==="active",c=this._cachedDataOpts,u=e+"-"+a,f=c[u],d=this.enableOptionSharing&&Qs(s);if(f)return ep(f,d);const m=this.chart.config,p=m.datasetElementScopeKeys(this._type,e),b=o?[`${e}Hover`,"hover",e,""]:[e,""],_=m.getOptionScopes(this.getDataset(),p),x=Object.keys(Gt.elements[e]),T=()=>this.getContext(s,o,a),M=m.resolveNamedOptions(_,x,T,b);return M.$shared&&(M.$shared=d,c[u]=Object.freeze(ep(M,d))),M}_resolveAnimations(e,a,s){const o=this.chart,c=this._cachedDataOpts,u=`animation-${a}`,f=c[u];if(f)return f;let d;if(o.options.animation!==!1){const p=this.chart.config,b=p.datasetAnimationScopeKeys(this._type,a),_=p.getOptionScopes(this.getDataset(),b);d=p.createResolver(_,this.getContext(e,s,a))}const m=new C0(o,d&&d.animations);return d&&d._cacheable&&(c[u]=Object.freeze(m)),m}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,a){return!a||Ou(e)||this.chart._animationsDisabled}_getSharedOptions(e,a){const s=this.resolveDataElementOptions(e,a),o=this._sharedOptions,c=this.getSharedOptions(s),u=this.includeOptions(a,c)||c!==o;return this.updateSharedOptions(c,a,s),{sharedOptions:c,includeOptions:u}}updateElement(e,a,s,o){Ou(o)?Object.assign(e,s):this._resolveAnimations(a,o).update(e,s)}updateSharedOptions(e,a,s){e&&!Ou(a)&&this._resolveAnimations(void 0,a).update(e,s)}_setStyle(e,a,s,o){e.active=o;const c=this.getStyle(a,o);this._resolveAnimations(a,s,o).update(e,{options:!o&&this.getSharedOptions(c)||c})}removeHoverStyle(e,a,s){this._setStyle(e,s,"active",!1)}setHoverStyle(e,a,s){this._setStyle(e,s,"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 a=this._data,s=this._cachedMeta.data;for(const[f,d,m]of this._syncList)this[f](d,m);this._syncList=[];const o=s.length,c=a.length,u=Math.min(c,o);u&&this.parse(0,u),c>o?this._insertElements(o,c-o,e):c<o&&this._removeElements(c,o-c)}_insertElements(e,a,s=!0){const o=this._cachedMeta,c=o.data,u=e+a;let f;const d=m=>{for(m.length+=a,f=m.length-1;f>=u;f--)m[f]=m[f-a]};for(d(c),f=e;f<u;++f)c[f]=new this.dataElementType;this._parsing&&d(o._parsed),this.parse(e,a),s&&this.updateElements(c,e,a,"reset")}updateElements(e,a,s,o){}_removeElements(e,a){const s=this._cachedMeta;if(this._parsing){const o=s._parsed.splice(e,a);s._stacked&&Cs(s,o)}s.data.splice(e,a)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[a,s,o]=e;this[a](s,o)}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,a){a&&this._sync(["_removeElements",e,a]);const s=arguments.length-2;s&&this._sync(["_insertElements",e,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function t1(i,e){if(!i._cache.$bar){const a=i.getMatchingVisibleMetas(e);let s=[];for(let o=0,c=a.length;o<c;o++)s=s.concat(a[o].controller.getAllParsedValues(i));i._cache.$bar=h0(s.sort((o,c)=>o-c))}return i._cache.$bar}function e1(i){const e=i.iScale,a=t1(e,i.type);let s=e._length,o,c,u,f;const d=()=>{u===32767||u===-32768||(Qs(f)&&(s=Math.min(s,Math.abs(u-f)||s)),f=u)};for(o=0,c=a.length;o<c;++o)u=e.getPixelForValue(a[o]),d();for(f=void 0,o=0,c=e.ticks.length;o<c;++o)u=e.getPixelForTick(o),d();return s}function n1(i,e,a,s){const o=a.barThickness;let c,u;return Tt(o)?(c=e.min*a.categoryPercentage,u=a.barPercentage):(c=o*s,u=1),{chunk:c/s,ratio:u,start:e.pixels[i]-c/2}}function i1(i,e,a,s){const o=e.pixels,c=o[i];let u=i>0?o[i-1]:null,f=i<o.length-1?o[i+1]:null;const d=a.categoryPercentage;u===null&&(u=c-(f===null?e.end-e.start:f-c)),f===null&&(f=c+c-u);const m=c-(c-Math.min(u,f))/2*d;return{chunk:Math.abs(f-u)/2*d/s,ratio:a.barPercentage,start:m}}function a1(i,e,a,s){const o=a.parse(i[0],s),c=a.parse(i[1],s),u=Math.min(o,c),f=Math.max(o,c);let d=u,m=f;Math.abs(u)>Math.abs(f)&&(d=f,m=u),e[a.axis]=m,e._custom={barStart:d,barEnd:m,start:o,end:c,min:u,max:f}}function R0(i,e,a,s){return Ft(i)?a1(i,e,a,s):e[a.axis]=a.parse(i,s),e}function np(i,e,a,s){const o=i.iScale,c=i.vScale,u=o.getLabels(),f=o===c,d=[];let m,p,b,_;for(m=a,p=a+s;m<p;++m)_=e[m],b={},b[o.axis]=f||o.parse(u[m],m),d.push(R0(_,b,c,m));return d}function Du(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function s1(i,e,a){return i!==0?ln(i):(e.isHorizontal()?1:-1)*(e.min>=a?1:-1)}function l1(i){let e,a,s,o,c;return i.horizontal?(e=i.base>i.x,a="left",s="right"):(e=i.base<i.y,a="bottom",s="top"),e?(o="end",c="start"):(o="start",c="end"),{start:a,end:s,reverse:e,top:o,bottom:c}}function o1(i,e,a,s){let o=e.borderSkipped;const c={};if(!o){i.borderSkipped=c;return}if(o===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:u,end:f,reverse:d,top:m,bottom:p}=l1(i);o==="middle"&&a&&(i.enableBorderRadius=!0,(a._top||0)===s?o=m:(a._bottom||0)===s?o=p:(c[ip(p,u,f,d)]=!0,o=m)),c[ip(o,u,f,d)]=!0,i.borderSkipped=c}function ip(i,e,a,s){return s?(i=r1(i,e,a),i=ap(i,a,e)):i=ap(i,e,a),i}function r1(i,e,a){return i===e?a:i===a?e:i}function ap(i,e,a){return i==="start"?e:i==="end"?a:i}function c1(i,{inflateAmount:e},a){i.inflateAmount=e==="auto"?a===1?.33:0:e}class u1 extends gf{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,a,s,o){return np(e,a,s,o)}parseArrayData(e,a,s,o){return np(e,a,s,o)}parseObjectData(e,a,s,o){const{iScale:c,vScale:u}=e,{xAxisKey:f="x",yAxisKey:d="y"}=this._parsing,m=c.axis==="x"?f:d,p=u.axis==="x"?f:d,b=[];let _,x,T,M;for(_=s,x=s+o;_<x;++_)M=a[_],T={},T[c.axis]=c.parse(Bi(M,m),_),b.push(R0(Bi(M,p),T,u,_));return b}updateRangeFromParsed(e,a,s,o){super.updateRangeFromParsed(e,a,s,o);const c=s._custom;c&&a===this._cachedMeta.vScale&&(e.min=Math.min(e.min,c.min),e.max=Math.max(e.max,c.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const a=this._cachedMeta,{iScale:s,vScale:o}=a,c=this.getParsed(e),u=c._custom,f=Du(u)?"["+u.start+", "+u.end+"]":""+o.getLabelForValue(c[o.axis]);return{label:""+s.getLabelForValue(c[s.axis]),value:f}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const a=this._cachedMeta;this.updateElements(a.data,0,a.data.length,e)}updateElements(e,a,s,o){const c=o==="reset",{index:u,_cachedMeta:{vScale:f}}=this,d=f.getBasePixel(),m=f.isHorizontal(),p=this._getRuler(),{sharedOptions:b,includeOptions:_}=this._getSharedOptions(a,o);for(let x=a;x<a+s;x++){const T=this.getParsed(x),M=c||Tt(T[f.axis])?{base:d,head:d}:this._calculateBarValuePixels(x),A=this._calculateBarIndexPixels(x,p),z=(T._stacks||{})[f.axis],H={horizontal:m,base:M.base,enableBorderRadius:!z||Du(T._custom)||u===z._top||u===z._bottom,x:m?M.head:A.center,y:m?A.center:M.head,height:m?A.size:Math.abs(M.size),width:m?Math.abs(M.size):A.size};_&&(H.options=b||this.resolveDataElementOptions(x,e[x].active?"active":o));const Y=H.options||e[x].options;o1(H,Y,z,u),c1(H,Y,p.ratio),this.updateElement(e[x],x,H,o)}}_getStacks(e,a){const{iScale:s}=this._cachedMeta,o=s.getMatchingVisibleMetas(this._type).filter(p=>p.controller.options.grouped),c=s.options.stacked,u=[],f=this._cachedMeta.controller.getParsed(a),d=f&&f[s.axis],m=p=>{const b=p._parsed.find(x=>x[s.axis]===d),_=b&&b[p.vScale.axis];if(Tt(_)||isNaN(_))return!0};for(const p of o)if(!(a!==void 0&&m(p))&&((c===!1||u.indexOf(p.stack)===-1||c===void 0&&p.stack===void 0)&&u.push(p.stack),p.index===e))break;return u.length||u.push(void 0),u}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,a=this.chart.options.indexAxis;return Object.keys(e).filter(s=>e[s].axis===a).shift()}_getAxis(){const e={},a=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)e[ht(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,a)]=!0;return Object.keys(e)}_getStackIndex(e,a,s){const o=this._getStacks(e,s),c=a!==void 0?o.indexOf(a):-1;return c===-1?o.length-1:c}_getRuler(){const e=this.options,a=this._cachedMeta,s=a.iScale,o=[];let c,u;for(c=0,u=a.data.length;c<u;++c)o.push(s.getPixelForValue(this.getParsed(c)[s.axis],c));const f=e.barThickness;return{min:f||e1(a),pixels:o,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:e.grouped,ratio:f?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:a,_stacked:s,index:o},options:{base:c,minBarLength:u}}=this,f=c||0,d=this.getParsed(e),m=d._custom,p=Du(m);let b=d[a.axis],_=0,x=s?this.applyStack(a,d,s):b,T,M;x!==b&&(_=x-b,x=b),p&&(b=m.barStart,x=m.barEnd-m.barStart,b!==0&&ln(b)!==ln(m.barEnd)&&(_=0),_+=b);const A=!Tt(c)&&!p?c:_;let z=a.getPixelForValue(A);if(this.chart.getDataVisibility(e)?T=a.getPixelForValue(_+x):T=z,M=T-z,Math.abs(M)<u){M=s1(M,a,f)*u,b===f&&(z-=M/2);const H=a.getPixelForDecimal(0),Y=a.getPixelForDecimal(1),G=Math.min(H,Y),q=Math.max(H,Y);z=Math.max(Math.min(z,q),G),T=z+M,s&&!p&&(d._stacks[a.axis]._visualValues[o]=a.getValueForPixel(T)-a.getValueForPixel(z))}if(z===a.getPixelForValue(f)){const H=ln(M)*a.getLineWidthForValue(f)/2;z+=H,M-=H}return{size:M,base:z,head:T,center:T+M/2}}_calculateBarIndexPixels(e,a){const s=a.scale,o=this.options,c=o.skipNull,u=ht(o.maxBarThickness,1/0);let f,d;const m=this._getAxisCount();if(a.grouped){const p=c?this._getStackCount(e):a.stackCount,b=o.barThickness==="flex"?i1(e,a,o,p*m):n1(e,a,o,p*m),_=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,x=this._getAxis().indexOf(ht(_,this.getFirstScaleIdForIndexAxis())),T=this._getStackIndex(this.index,this._cachedMeta.stack,c?e:void 0)+x;f=b.start+b.chunk*T+b.chunk/2,d=Math.min(u,b.chunk*b.ratio)}else f=s.getPixelForValue(this.getParsed(e)[s.axis],e),d=Math.min(u,a.min*a.ratio);return{base:f-d/2,head:f+d/2,center:f,size:d}}draw(){const e=this._cachedMeta,a=e.vScale,s=e.data,o=s.length;let c=0;for(;c<o;++c)this.getParsed(c)[a.axis]!==null&&!s[c].hidden&&s[c].draw(this._ctx)}}function f1(i,e,a){let s=1,o=1,c=0,u=0;if(e<Yt){const f=i,d=f+e,m=Math.cos(f),p=Math.sin(f),b=Math.cos(d),_=Math.sin(d),x=(Y,G,q)=>Zs(Y,f,d,!0)?1:Math.max(G,G*a,q,q*a),T=(Y,G,q)=>Zs(Y,f,d,!0)?-1:Math.min(G,G*a,q,q*a),M=x(0,m,b),A=x(te,p,_),z=T(Ct,m,b),H=T(Ct+te,p,_);s=(M-z)/2,o=(A-H)/2,c=-(M+z)/2,u=-(A+H)/2}return{ratioX:s,ratioY:o,offsetX:c,offsetY:u}}class h1 extends gf{static id="doughnut";static 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"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const a=e.data,{labels:{pointStyle:s,textAlign:o,color:c,useBorderRadius:u,borderRadius:f}}=e.legend.options;return a.labels.length&&a.datasets.length?a.labels.map((d,m)=>{const b=e.getDatasetMeta(0).controller.getStyle(m);return{text:d,fillStyle:b.backgroundColor,fontColor:c,hidden:!e.getDataVisibility(m),lineDash:b.borderDash,lineDashOffset:b.borderDashOffset,lineJoin:b.borderJoinStyle,lineWidth:b.borderWidth,strokeStyle:b.borderColor,textAlign:o,pointStyle:s,borderRadius:u&&(f||b.borderRadius),index:m}}):[]}},onClick(e,a,s){s.chart.toggleDataVisibility(a.index),s.chart.update()}}}};constructor(e,a){super(e,a),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,a){const s=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=s;else{let c=d=>+s[d];if(pt(s[e])){const{key:d="value"}=this._parsing;c=m=>+Bi(s[m],d)}let u,f;for(u=e,f=e+a;u<f;++u)o._parsed[u]=c(u)}}_getRotation(){return Rn(this.options.rotation-90)}_getCircumference(){return Rn(this.options.circumference)}_getRotationExtents(){let e=Yt,a=-Yt;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const o=this.chart.getDatasetMeta(s).controller,c=o._getRotation(),u=o._getCircumference();e=Math.min(e,c),a=Math.max(a,c+u)}return{rotation:e,circumference:a-e}}update(e){const a=this.chart,{chartArea:s}=a,o=this._cachedMeta,c=o.data,u=this.getMaxBorderWidth()+this.getMaxOffset(c)+this.options.spacing,f=Math.max((Math.min(s.width,s.height)-u)/2,0),d=Math.min(__(this.options.cutout,f),1),m=this._getRingWeight(this.index),{circumference:p,rotation:b}=this._getRotationExtents(),{ratioX:_,ratioY:x,offsetX:T,offsetY:M}=f1(b,p,d),A=(s.width-u)/_,z=(s.height-u)/x,H=Math.max(Math.min(A,z)/2,0),Y=o0(this.options.radius,H),G=Math.max(Y*d,0),q=(Y-G)/this._getVisibleDatasetWeightTotal();this.offsetX=T*Y,this.offsetY=M*Y,o.total=this.calculateTotal(),this.outerRadius=Y-q*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-q*m,0),this.updateElements(c,0,c.length,e)}_circumference(e,a){const s=this.options,o=this._cachedMeta,c=this._getCircumference();return a&&s.animation.animateRotate||!this.chart.getDataVisibility(e)||o._parsed[e]===null||o.data[e].hidden?0:this.calculateCircumference(o._parsed[e]*c/Yt)}updateElements(e,a,s,o){const c=o==="reset",u=this.chart,f=u.chartArea,m=u.options.animation,p=(f.left+f.right)/2,b=(f.top+f.bottom)/2,_=c&&m.animateScale,x=_?0:this.innerRadius,T=_?0:this.outerRadius,{sharedOptions:M,includeOptions:A}=this._getSharedOptions(a,o);let z=this._getRotation(),H;for(H=0;H<a;++H)z+=this._circumference(H,c);for(H=a;H<a+s;++H){const Y=this._circumference(H,c),G=e[H],q={x:p+this.offsetX,y:b+this.offsetY,startAngle:z,endAngle:z+Y,circumference:Y,outerRadius:T,innerRadius:x};A&&(q.options=M||this.resolveDataElementOptions(H,G.active?"active":o)),z+=Y,this.updateElement(G,H,q,o)}}calculateTotal(){const e=this._cachedMeta,a=e.data;let s=0,o;for(o=0;o<a.length;o++){const c=e._parsed[o];c!==null&&!isNaN(c)&&this.chart.getDataVisibility(o)&&!a[o].hidden&&(s+=Math.abs(c))}return s}calculateCircumference(e){const a=this._cachedMeta.total;return a>0&&!isNaN(e)?Yt*(Math.abs(e)/a):0}getLabelAndValue(e){const a=this._cachedMeta,s=this.chart,o=s.data.labels||[],c=of(a._parsed[e],s.options.locale);return{label:o[e]||"",value:c}}getMaxBorderWidth(e){let a=0;const s=this.chart;let o,c,u,f,d;if(!e){for(o=0,c=s.data.datasets.length;o<c;++o)if(s.isDatasetVisible(o)){u=s.getDatasetMeta(o),e=u.data,f=u.controller;break}}if(!e)return 0;for(o=0,c=e.length;o<c;++o)d=f.resolveDataElementOptions(o),d.borderAlign!=="inner"&&(a=Math.max(a,d.borderWidth||0,d.hoverBorderWidth||0));return a}getMaxOffset(e){let a=0;for(let s=0,o=e.length;s<o;++s){const c=this.resolveDataElementOptions(s);a=Math.max(a,c.offset||0,c.hoverOffset||0)}return a}_getRingWeightOffset(e){let a=0;for(let s=0;s<e;++s)this.chart.isDatasetVisible(s)&&(a+=this._getRingWeight(s));return a}_getRingWeight(e){return Math.max(ht(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class d1 extends h1{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function ji(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class mf{static override(e){Object.assign(mf.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return ji()}parse(){return ji()}format(){return ji()}add(){return ji()}diff(){return ji()}startOf(){return ji()}endOf(){return ji()}}var g1={_date:mf};function m1(i,e,a,s){const{controller:o,data:c,_sorted:u}=i,f=o._cachedMeta.iScale,d=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(f&&e===f.axis&&e!=="r"&&u&&c.length){const m=f._reversePixels?k_:Gu;if(s){if(o._sharedOptions){const p=c[0],b=typeof p.getRange=="function"&&p.getRange(e);if(b){const _=m(c,e,a-b),x=m(c,e,a+b);return{lo:_.lo,hi:x.hi}}}}else{const p=m(c,e,a);if(d){const{vScale:b}=o._cachedMeta,{_parsed:_}=i,x=_.slice(0,p.lo+1).reverse().findIndex(M=>!Tt(M[b.axis]));p.lo-=Math.max(0,x);const T=_.slice(p.hi).findIndex(M=>!Tt(M[b.axis]));p.hi+=Math.max(0,T)}return p}}return{lo:0,hi:c.length-1}}function Ko(i,e,a,s,o){const c=i.getSortedVisibleDatasetMetas(),u=a[e];for(let f=0,d=c.length;f<d;++f){const{index:m,data:p}=c[f],{lo:b,hi:_}=m1(c[f],e,u,o);for(let x=b;x<=_;++x){const T=p[x];T.skip||s(T,m,x)}}}function p1(i){const e=i.indexOf("x")!==-1,a=i.indexOf("y")!==-1;return function(s,o){const c=e?Math.abs(s.x-o.x):0,u=a?Math.abs(s.y-o.y):0;return Math.sqrt(Math.pow(c,2)+Math.pow(u,2))}}function Cu(i,e,a,s,o){const c=[];return!o&&!i.isPointInArea(e)||Ko(i,a,e,function(f,d,m){!o&&!Ks(f,i.chartArea,0)||f.inRange(e.x,e.y,s)&&c.push({element:f,datasetIndex:d,index:m})},!0),c}function y1(i,e,a,s){let o=[];function c(u,f,d){const{startAngle:m,endAngle:p}=u.getProps(["startAngle","endAngle"],s),{angle:b}=u0(u,{x:e.x,y:e.y});Zs(b,m,p)&&o.push({element:u,datasetIndex:f,index:d})}return Ko(i,a,e,c),o}function b1(i,e,a,s,o,c){let u=[];const f=p1(a);let d=Number.POSITIVE_INFINITY;function m(p,b,_){const x=p.inRange(e.x,e.y,o);if(s&&!x)return;const T=p.getCenterPoint(o);if(!(!!c||i.isPointInArea(T))&&!x)return;const A=f(e,T);A<d?(u=[{element:p,datasetIndex:b,index:_}],d=A):A===d&&u.push({element:p,datasetIndex:b,index:_})}return Ko(i,a,e,m),u}function zu(i,e,a,s,o,c){return!c&&!i.isPointInArea(e)?[]:a==="r"&&!s?y1(i,e,a,o):b1(i,e,a,s,o,c)}function sp(i,e,a,s,o){const c=[],u=a==="x"?"inXRange":"inYRange";let f=!1;return Ko(i,a,e,(d,m,p)=>{d[u]&&d[u](e[a],o)&&(c.push({element:d,datasetIndex:m,index:p}),f=f||d.inRange(e.x,e.y,o))}),s&&!f?[]:c}var v1={modes:{index(i,e,a,s){const o=ki(e,i),c=a.axis||"x",u=a.includeInvisible||!1,f=a.intersect?Cu(i,o,c,s,u):zu(i,o,c,!1,s,u),d=[];return f.length?(i.getSortedVisibleDatasetMetas().forEach(m=>{const p=f[0].index,b=m.data[p];b&&!b.skip&&d.push({element:b,datasetIndex:m.index,index:p})}),d):[]},dataset(i,e,a,s){const o=ki(e,i),c=a.axis||"xy",u=a.includeInvisible||!1;let f=a.intersect?Cu(i,o,c,s,u):zu(i,o,c,!1,s,u);if(f.length>0){const d=f[0].datasetIndex,m=i.getDatasetMeta(d).data;f=[];for(let p=0;p<m.length;++p)f.push({element:m[p],datasetIndex:d,index:p})}return f},point(i,e,a,s){const o=ki(e,i),c=a.axis||"xy",u=a.includeInvisible||!1;return Cu(i,o,c,s,u)},nearest(i,e,a,s){const o=ki(e,i),c=a.axis||"xy",u=a.includeInvisible||!1;return zu(i,o,c,a.intersect,s,u)},x(i,e,a,s){const o=ki(e,i);return sp(i,o,"x",a.intersect,s)},y(i,e,a,s){const o=ki(e,i);return sp(i,o,"y",a.intersect,s)}}};const w0=["left","top","right","bottom"];function zs(i,e){return i.filter(a=>a.pos===e)}function lp(i,e){return i.filter(a=>w0.indexOf(a.pos)===-1&&a.box.axis===e)}function Rs(i,e){return i.sort((a,s)=>{const o=e?s:a,c=e?a:s;return o.weight===c.weight?o.index-c.index:o.weight-c.weight})}function _1(i){const e=[];let a,s,o,c,u,f;for(a=0,s=(i||[]).length;a<s;++a)o=i[a],{position:c,options:{stack:u,stackWeight:f=1}}=o,e.push({index:a,box:o,pos:c,horizontal:o.isHorizontal(),weight:o.weight,stack:u&&c+u,stackWeight:f});return e}function x1(i){const e={};for(const a of i){const{stack:s,pos:o,stackWeight:c}=a;if(!s||!w0.includes(o))continue;const u=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});u.count++,u.weight+=c}return e}function S1(i,e){const a=x1(i),{vBoxMaxWidth:s,hBoxMaxHeight:o}=e;let c,u,f;for(c=0,u=i.length;c<u;++c){f=i[c];const{fullSize:d}=f.box,m=a[f.stack],p=m&&f.stackWeight/m.weight;f.horizontal?(f.width=p?p*s:d&&e.availableWidth,f.height=o):(f.width=s,f.height=p?p*o:d&&e.availableHeight)}return a}function T1(i){const e=_1(i),a=Rs(e.filter(m=>m.box.fullSize),!0),s=Rs(zs(e,"left"),!0),o=Rs(zs(e,"right")),c=Rs(zs(e,"top"),!0),u=Rs(zs(e,"bottom")),f=lp(e,"x"),d=lp(e,"y");return{fullSize:a,leftAndTop:s.concat(c),rightAndBottom:o.concat(d).concat(u).concat(f),chartArea:zs(e,"chartArea"),vertical:s.concat(o).concat(d),horizontal:c.concat(u).concat(f)}}function op(i,e,a,s){return Math.max(i[a],e[a])+Math.max(i[s],e[s])}function N0(i,e){i.top=Math.max(i.top,e.top),i.left=Math.max(i.left,e.left),i.bottom=Math.max(i.bottom,e.bottom),i.right=Math.max(i.right,e.right)}function M1(i,e,a,s){const{pos:o,box:c}=a,u=i.maxPadding;if(!pt(o)){a.size&&(i[o]-=a.size);const b=s[a.stack]||{size:0,count:1};b.size=Math.max(b.size,a.horizontal?c.height:c.width),a.size=b.size/b.count,i[o]+=a.size}c.getPadding&&N0(u,c.getPadding());const f=Math.max(0,e.outerWidth-op(u,i,"left","right")),d=Math.max(0,e.outerHeight-op(u,i,"top","bottom")),m=f!==i.w,p=d!==i.h;return i.w=f,i.h=d,a.horizontal?{same:m,other:p}:{same:p,other:m}}function E1(i){const e=i.maxPadding;function a(s){const o=Math.max(e[s]-i[s],0);return i[s]+=o,o}i.y+=a("top"),i.x+=a("left"),a("right"),a("bottom")}function A1(i,e){const a=e.maxPadding;function s(o){const c={left:0,top:0,right:0,bottom:0};return o.forEach(u=>{c[u]=Math.max(e[u],a[u])}),c}return s(i?["left","right"]:["top","bottom"])}function Ls(i,e,a,s){const o=[];let c,u,f,d,m,p;for(c=0,u=i.length,m=0;c<u;++c){f=i[c],d=f.box,d.update(f.width||e.w,f.height||e.h,A1(f.horizontal,e));const{same:b,other:_}=M1(e,a,f,s);m|=b&&o.length,p=p||_,d.fullSize||o.push(f)}return m&&Ls(o,e,a,s)||p}function To(i,e,a,s,o){i.top=a,i.left=e,i.right=e+s,i.bottom=a+o,i.width=s,i.height=o}function rp(i,e,a,s){const o=a.padding;let{x:c,y:u}=e;for(const f of i){const d=f.box,m=s[f.stack]||{placed:0,weight:1},p=f.stackWeight/m.weight||1;if(f.horizontal){const b=e.w*p,_=m.size||d.height;Qs(m.start)&&(u=m.start),d.fullSize?To(d,o.left,u,a.outerWidth-o.right-o.left,_):To(d,e.left+m.placed,u,b,_),m.start=u,m.placed+=b,u=d.bottom}else{const b=e.h*p,_=m.size||d.width;Qs(m.start)&&(c=m.start),d.fullSize?To(d,c,o.top,_,a.outerHeight-o.bottom-o.top):To(d,c,e.top+m.placed,_,b),m.start=c,m.placed+=b,c=d.right}}e.x=c,e.y=u}var Fe={addBox(i,e){i.boxes||(i.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(a){e.draw(a)}}]},i.boxes.push(e)},removeBox(i,e){const a=i.boxes?i.boxes.indexOf(e):-1;a!==-1&&i.boxes.splice(a,1)},configure(i,e,a){e.fullSize=a.fullSize,e.position=a.position,e.weight=a.weight},update(i,e,a,s){if(!i)return;const o=Le(i.options.layout.padding),c=Math.max(e-o.width,0),u=Math.max(a-o.height,0),f=T1(i.boxes),d=f.vertical,m=f.horizontal;At(i.boxes,M=>{typeof M.beforeLayout=="function"&&M.beforeLayout()});const p=d.reduce((M,A)=>A.box.options&&A.box.options.display===!1?M:M+1,0)||1,b=Object.freeze({outerWidth:e,outerHeight:a,padding:o,availableWidth:c,availableHeight:u,vBoxMaxWidth:c/2/p,hBoxMaxHeight:u/2}),_=Object.assign({},o);N0(_,Le(s));const x=Object.assign({maxPadding:_,w:c,h:u,x:o.left,y:o.top},o),T=S1(d.concat(m),b);Ls(f.fullSize,x,b,T),Ls(d,x,b,T),Ls(m,x,b,T)&&Ls(d,x,b,T),E1(x),rp(f.leftAndTop,x,b,T),x.x+=x.w,x.y+=x.h,rp(f.rightAndBottom,x,b,T),i.chartArea={left:x.left,top:x.top,right:x.left+x.w,bottom:x.top+x.h,height:x.h,width:x.w},At(f.chartArea,M=>{const A=M.box;Object.assign(A,i.chartArea),A.update(x.w,x.h,{left:0,top:0,right:0,bottom:0})})}};class j0{acquireContext(e,a){}releaseContext(e){return!1}addEventListener(e,a,s){}removeEventListener(e,a,s){}getDevicePixelRatio(){return 1}getMaximumSize(e,a,s,o){return a=Math.max(0,a||e.width),s=s||e.height,{width:a,height:Math.max(0,o?Math.floor(a/o):s)}}isAttached(e){return!0}updateConfig(e){}}class O1 extends j0{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const jo="$chartjs",D1={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},cp=i=>i===null||i==="";function C1(i,e){const a=i.style,s=i.getAttribute("height"),o=i.getAttribute("width");if(i[jo]={initial:{height:s,width:o,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",cp(o)){const c=Zm(i,"width");c!==void 0&&(i.width=c)}if(cp(s))if(i.style.height==="")i.height=i.width/(e||2);else{const c=Zm(i,"height");c!==void 0&&(i.height=c)}return i}const k0=Dx?{passive:!0}:!1;function z1(i,e,a){i&&i.addEventListener(e,a,k0)}function R1(i,e,a){i&&i.canvas&&i.canvas.removeEventListener(e,a,k0)}function w1(i,e){const a=D1[i.type]||i.type,{x:s,y:o}=ki(i,e);return{type:a,chart:e,native:i,x:s!==void 0?s:null,y:o!==void 0?o:null}}function qo(i,e){for(const a of i)if(a===e||a.contains(e))return!0}function N1(i,e,a){const s=i.canvas,o=new MutationObserver(c=>{let u=!1;for(const f of c)u=u||qo(f.addedNodes,s),u=u&&!qo(f.removedNodes,s);u&&a()});return o.observe(document,{childList:!0,subtree:!0}),o}function j1(i,e,a){const s=i.canvas,o=new MutationObserver(c=>{let u=!1;for(const f of c)u=u||qo(f.removedNodes,s),u=u&&!qo(f.addedNodes,s);u&&a()});return o.observe(document,{childList:!0,subtree:!0}),o}const Ws=new Map;let up=0;function L0(){const i=window.devicePixelRatio;i!==up&&(up=i,Ws.forEach((e,a)=>{a.currentDevicePixelRatio!==i&&e()}))}function k1(i,e){Ws.size||window.addEventListener("resize",L0),Ws.set(i,e)}function L1(i){Ws.delete(i),Ws.size||window.removeEventListener("resize",L0)}function H1(i,e,a){const s=i.canvas,o=s&&df(s);if(!o)return;const c=g0((f,d)=>{const m=o.clientWidth;a(f,d),m<o.clientWidth&&a()},window),u=new ResizeObserver(f=>{const d=f[0],m=d.contentRect.width,p=d.contentRect.height;m===0&&p===0||c(m,p)});return u.observe(o),k1(i,c),u}function Ru(i,e,a){a&&a.disconnect(),e==="resize"&&L1(i)}function B1(i,e,a){const s=i.canvas,o=g0(c=>{i.ctx!==null&&a(w1(c,i))},i);return z1(s,e,o),o}class U1 extends j0{acquireContext(e,a){const s=e&&e.getContext&&e.getContext("2d");return s&&s.canvas===e?(C1(e,a),s):null}releaseContext(e){const a=e.canvas;if(!a[jo])return!1;const s=a[jo].initial;["height","width"].forEach(c=>{const u=s[c];Tt(u)?a.removeAttribute(c):a.setAttribute(c,u)});const o=s.style||{};return Object.keys(o).forEach(c=>{a.style[c]=o[c]}),a.width=a.width,delete a[jo],!0}addEventListener(e,a,s){this.removeEventListener(e,a);const o=e.$proxies||(e.$proxies={}),u={attach:N1,detach:j1,resize:H1}[a]||B1;o[a]=u(e,a,s)}removeEventListener(e,a){const s=e.$proxies||(e.$proxies={}),o=s[a];if(!o)return;({attach:Ru,detach:Ru,resize:Ru}[a]||R1)(e,a,o),s[a]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,a,s,o){return Ox(e,a,s,o)}isAttached(e){const a=e&&df(e);return!!(a&&a.isConnected)}}function V1(i){return!hf()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?O1:U1}class jn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:a,y:s}=this.getProps(["x","y"],e);return{x:a,y:s}}hasValue(){return Uo(this.x)&&Uo(this.y)}getProps(e,a){const s=this.$animations;if(!a||!s)return this;const o={};return e.forEach(c=>{o[c]=s[c]&&s[c].active()?s[c]._to:this[c]}),o}}function Y1(i,e){const a=i.options.ticks,s=q1(i),o=Math.min(a.maxTicksLimit||s,s),c=a.major.enabled?G1(e):[],u=c.length,f=c[0],d=c[u-1],m=[];if(u>o)return Q1(e,m,c,u/o),m;const p=X1(c,e,o);if(u>0){let b,_;const x=u>1?Math.round((d-f)/(u-1)):null;for(Mo(e,m,p,Tt(x)?0:f-x,f),b=0,_=u-1;b<_;b++)Mo(e,m,p,c[b],c[b+1]);return Mo(e,m,p,d,Tt(x)?e.length:d+x),m}return Mo(e,m,p),m}function q1(i){const e=i.options.offset,a=i._tickSize(),s=i._length/a+(e?0:1),o=i._maxLength/a;return Math.floor(Math.min(s,o))}function X1(i,e,a){const s=Z1(i),o=e.length/a;if(!s)return Math.max(o,1);const c=D_(s);for(let u=0,f=c.length-1;u<f;u++){const d=c[u];if(d>o)return d}return Math.max(o,1)}function G1(i){const e=[];let a,s;for(a=0,s=i.length;a<s;a++)i[a].major&&e.push(a);return e}function Q1(i,e,a,s){let o=0,c=a[0],u;for(s=Math.ceil(s),u=0;u<i.length;u++)u===c&&(e.push(i[u]),o++,c=a[o*s])}function Mo(i,e,a,s,o){const c=ht(s,0),u=Math.min(ht(o,i.length),i.length);let f=0,d,m,p;for(a=Math.ceil(a),o&&(d=o-s,a=d/Math.floor(d/a)),p=c;p<0;)f++,p=Math.round(c+f*a);for(m=Math.max(c,0);m<u;m++)m===p&&(e.push(i[m]),f++,p=Math.round(c+f*a))}function Z1(i){const e=i.length;let a,s;if(e<2)return!1;for(s=i[0],a=1;a<e;++a)if(i[a]-i[a-1]!==s)return!1;return s}const K1=i=>i==="left"?"right":i==="right"?"left":i,fp=(i,e,a)=>e==="top"||e==="left"?i[e]+a:i[e]-a,hp=(i,e)=>Math.min(e||i,i);function dp(i,e){const a=[],s=i.length/e,o=i.length;let c=0;for(;c<o;c+=s)a.push(i[Math.floor(c)]);return a}function F1(i,e,a){const s=i.ticks.length,o=Math.min(e,s-1),c=i._startPixel,u=i._endPixel,f=1e-6;let d=i.getPixelForTick(o),m;if(!(a&&(s===1?m=Math.max(d-c,u-d):e===0?m=(i.getPixelForTick(1)-d)/2:m=(d-i.getPixelForTick(o-1))/2,d+=o<e?m:-m,d<c-f||d>u+f)))return d}function W1(i,e){At(i,a=>{const s=a.gc,o=s.length/2;let c;if(o>e){for(c=0;c<o;++c)delete a.data[s[c]];s.splice(0,o)}})}function ws(i){return i.drawTicks?i.tickLength:0}function gp(i,e){if(!i.display)return 0;const a=re(i.font,e),s=Le(i.padding);return(Ft(i.text)?i.text.length:1)*a.lineHeight+s.height}function J1(i,e){return Vi(i,{scale:e,type:"scale"})}function I1(i,e,a){return Vi(i,{tick:a,index:e,type:"tick"})}function $1(i,e,a){let s=sf(i);return(a&&e!=="right"||!a&&e==="right")&&(s=K1(s)),s}function P1(i,e,a,s){const{top:o,left:c,bottom:u,right:f,chart:d}=i,{chartArea:m,scales:p}=d;let b=0,_,x,T;const M=u-o,A=f-c;if(i.isHorizontal()){if(x=ue(s,c,f),pt(a)){const z=Object.keys(a)[0],H=a[z];T=p[z].getPixelForValue(H)+M-e}else a==="center"?T=(m.bottom+m.top)/2+M-e:T=fp(i,a,e);_=f-c}else{if(pt(a)){const z=Object.keys(a)[0],H=a[z];x=p[z].getPixelForValue(H)-A+e}else a==="center"?x=(m.left+m.right)/2-A+e:x=fp(i,a,e);T=ue(s,u,o),b=a==="left"?-te:te}return{titleX:x,titleY:T,maxWidth:_,rotation:b}}class Na extends jn{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,a){return e}getUserBounds(){let{_userMin:e,_userMax:a,_suggestedMin:s,_suggestedMax:o}=this;return e=nn(e,Number.POSITIVE_INFINITY),a=nn(a,Number.NEGATIVE_INFINITY),s=nn(s,Number.POSITIVE_INFINITY),o=nn(o,Number.NEGATIVE_INFINITY),{min:nn(e,s),max:nn(a,o),minDefined:fe(e),maxDefined:fe(a)}}getMinMax(e){let{min:a,max:s,minDefined:o,maxDefined:c}=this.getUserBounds(),u;if(o&&c)return{min:a,max:s};const f=this.getMatchingVisibleMetas();for(let d=0,m=f.length;d<m;++d)u=f[d].controller.getMinMax(this,e),o||(a=Math.min(a,u.min)),c||(s=Math.max(s,u.max));return a=c&&a>s?s:a,s=o&&a>s?a:s,{min:nn(a,nn(s,a)),max:nn(s,nn(a,s))}}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(){jt(this.options.beforeUpdate,[this])}update(e,a,s){const{beginAtZero:o,grace:c,ticks:u}=this.options,f=u.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=a,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=sx(this,c,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=f<this.ticks.length;this._convertTicksToLabels(d?dp(this.ticks,f):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),u.display&&(u.autoSkip||u.source==="auto")&&(this.ticks=Y1(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,a,s;this.isHorizontal()?(a=this.left,s=this.right):(a=this.top,s=this.bottom,e=!e),this._startPixel=a,this._endPixel=s,this._reversePixels=e,this._length=s-a,this._alignToPixels=this.options.alignToPixels}afterUpdate(){jt(this.options.afterUpdate,[this])}beforeSetDimensions(){jt(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(){jt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),jt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){jt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const a=this.options.ticks;let s,o,c;for(s=0,o=e.length;s<o;s++)c=e[s],c.label=jt(a.callback,[c.value,s,e],this)}afterTickToLabelConversion(){jt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){jt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,a=e.ticks,s=hp(this.ticks.length,e.ticks.maxTicksLimit),o=a.minRotation||0,c=a.maxRotation;let u=o,f,d,m;if(!this._isVisible()||!a.display||o>=c||s<=1||!this.isHorizontal()){this.labelRotation=o;return}const p=this._getLabelSizes(),b=p.widest.width,_=p.highest.height,x=Me(this.chart.width-b,0,this.maxWidth);f=e.offset?this.maxWidth/s:x/(s-1),b+6>f&&(f=x/(s-(e.offset?.5:1)),d=this.maxHeight-ws(e.grid)-a.padding-gp(e.title,this.chart.options.font),m=Math.sqrt(b*b+_*_),u=w_(Math.min(Math.asin(Me((p.highest.height+6)/f,-1,1)),Math.asin(Me(d/m,-1,1))-Math.asin(Me(_/m,-1,1)))),u=Math.max(o,Math.min(c,u))),this.labelRotation=u}afterCalculateLabelRotation(){jt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){jt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:a,options:{ticks:s,title:o,grid:c}}=this,u=this._isVisible(),f=this.isHorizontal();if(u){const d=gp(o,a.options.font);if(f?(e.width=this.maxWidth,e.height=ws(c)+d):(e.height=this.maxHeight,e.width=ws(c)+d),s.display&&this.ticks.length){const{first:m,last:p,widest:b,highest:_}=this._getLabelSizes(),x=s.padding*2,T=Rn(this.labelRotation),M=Math.cos(T),A=Math.sin(T);if(f){const z=s.mirror?0:A*b.width+M*_.height;e.height=Math.min(this.maxHeight,e.height+z+x)}else{const z=s.mirror?0:M*b.width+A*_.height;e.width=Math.min(this.maxWidth,e.width+z+x)}this._calculatePadding(m,p,A,M)}}this._handleMargins(),f?(this.width=this._length=a.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=a.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,a,s,o){const{ticks:{align:c,padding:u},position:f}=this.options,d=this.labelRotation!==0,m=f!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,b=this.right-this.getPixelForTick(this.ticks.length-1);let _=0,x=0;d?m?(_=o*e.width,x=s*a.height):(_=s*e.height,x=o*a.width):c==="start"?x=a.width:c==="end"?_=e.width:c!=="inner"&&(_=e.width/2,x=a.width/2),this.paddingLeft=Math.max((_-p+u)*this.width/(this.width-p),0),this.paddingRight=Math.max((x-b+u)*this.width/(this.width-b),0)}else{let p=a.height/2,b=e.height/2;c==="start"?(p=0,b=e.height):c==="end"&&(p=a.height,b=0),this.paddingTop=p+u,this.paddingBottom=b+u}}_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(){jt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:a}=this.options;return a==="top"||a==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let a,s;for(a=0,s=e.length;a<s;a++)Tt(e[a].label)&&(e.splice(a,1),s--,a--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const a=this.options.ticks.sampleSize;let s=this.ticks;a<s.length&&(s=dp(s,a)),this._labelSizes=e=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,a,s){const{ctx:o,_longestTextCache:c}=this,u=[],f=[],d=Math.floor(a/hp(a,s));let m=0,p=0,b,_,x,T,M,A,z,H,Y,G,q;for(b=0;b<a;b+=d){if(T=e[b].label,M=this._resolveTickFontOptions(b),o.font=A=M.string,z=c[A]=c[A]||{data:{},gc:[]},H=M.lineHeight,Y=G=0,!Tt(T)&&!Ft(T))Y=Ym(o,z.data,z.gc,Y,T),G=H;else if(Ft(T))for(_=0,x=T.length;_<x;++_)q=T[_],!Tt(q)&&!Ft(q)&&(Y=Ym(o,z.data,z.gc,Y,q),G+=H);u.push(Y),f.push(G),m=Math.max(Y,m),p=Math.max(G,p)}W1(c,a);const K=u.indexOf(m),Q=f.indexOf(p),F=tt=>({width:u[tt]||0,height:f[tt]||0});return{first:F(0),last:F(a-1),widest:F(K),highest:F(Q),widths:u,heights:f}}getLabelForValue(e){return e}getPixelForValue(e,a){return NaN}getValueForPixel(e){}getPixelForTick(e){const a=this.ticks;return e<0||e>a.length-1?null:this.getPixelForValue(a[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const a=this._startPixel+e*this._length;return j_(this._alignToPixels?Ni(this.chart,a,0):a)}getDecimalForPixel(e){const a=(e-this._startPixel)/this._length;return this._reversePixels?1-a:a}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:a}=this;return e<0&&a<0?a:e>0&&a>0?e:0}getContext(e){const a=this.ticks||[];if(e>=0&&e<a.length){const s=a[e];return s.$context||(s.$context=I1(this.getContext(),e,s))}return this.$context||(this.$context=J1(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,a=Rn(this.labelRotation),s=Math.abs(Math.cos(a)),o=Math.abs(Math.sin(a)),c=this._getLabelSizes(),u=e.autoSkipPadding||0,f=c?c.widest.width+u:0,d=c?c.highest.height+u:0;return this.isHorizontal()?d*s>f*o?f/s:d/o:d*o<f*s?d/s:f/o}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const a=this.axis,s=this.chart,o=this.options,{grid:c,position:u,border:f}=o,d=c.offset,m=this.isHorizontal(),b=this.ticks.length+(d?1:0),_=ws(c),x=[],T=f.setContext(this.getContext()),M=T.display?T.width:0,A=M/2,z=function(j){return Ni(s,j,M)};let H,Y,G,q,K,Q,F,tt,ct,at,it,kt;if(u==="top")H=z(this.bottom),Q=this.bottom-_,tt=H-A,at=z(e.top)+A,kt=e.bottom;else if(u==="bottom")H=z(this.top),at=e.top,kt=z(e.bottom)-A,Q=H+A,tt=this.top+_;else if(u==="left")H=z(this.right),K=this.right-_,F=H-A,ct=z(e.left)+A,it=e.right;else if(u==="right")H=z(this.left),ct=e.left,it=z(e.right)-A,K=H+A,F=this.left+_;else if(a==="x"){if(u==="center")H=z((e.top+e.bottom)/2+.5);else if(pt(u)){const j=Object.keys(u)[0],X=u[j];H=z(this.chart.scales[j].getPixelForValue(X))}at=e.top,kt=e.bottom,Q=H+A,tt=Q+_}else if(a==="y"){if(u==="center")H=z((e.left+e.right)/2);else if(pt(u)){const j=Object.keys(u)[0],X=u[j];H=z(this.chart.scales[j].getPixelForValue(X))}K=H-A,F=K-_,ct=e.left,it=e.right}const Vt=ht(o.ticks.maxTicksLimit,b),dt=Math.max(1,Math.ceil(b/Vt));for(Y=0;Y<b;Y+=dt){const j=this.getContext(Y),X=c.setContext(j),P=f.setContext(j),lt=X.lineWidth,_t=X.color,D=P.dash||[],U=P.dashOffset,Z=X.tickWidth,W=X.tickColor,st=X.tickBorderDash||[],ot=X.tickBorderDashOffset;G=F1(this,Y,d),G!==void 0&&(q=Ni(s,G,lt),m?K=F=ct=it=q:Q=tt=at=kt=q,x.push({tx1:K,ty1:Q,tx2:F,ty2:tt,x1:ct,y1:at,x2:it,y2:kt,width:lt,color:_t,borderDash:D,borderDashOffset:U,tickWidth:Z,tickColor:W,tickBorderDash:st,tickBorderDashOffset:ot}))}return this._ticksLength=b,this._borderValue=H,x}_computeLabelItems(e){const a=this.axis,s=this.options,{position:o,ticks:c}=s,u=this.isHorizontal(),f=this.ticks,{align:d,crossAlign:m,padding:p,mirror:b}=c,_=ws(s.grid),x=_+p,T=b?-p:x,M=-Rn(this.labelRotation),A=[];let z,H,Y,G,q,K,Q,F,tt,ct,at,it,kt="middle";if(o==="top")K=this.bottom-T,Q=this._getXAxisLabelAlignment();else if(o==="bottom")K=this.top+T,Q=this._getXAxisLabelAlignment();else if(o==="left"){const dt=this._getYAxisLabelAlignment(_);Q=dt.textAlign,q=dt.x}else if(o==="right"){const dt=this._getYAxisLabelAlignment(_);Q=dt.textAlign,q=dt.x}else if(a==="x"){if(o==="center")K=(e.top+e.bottom)/2+x;else if(pt(o)){const dt=Object.keys(o)[0],j=o[dt];K=this.chart.scales[dt].getPixelForValue(j)+x}Q=this._getXAxisLabelAlignment()}else if(a==="y"){if(o==="center")q=(e.left+e.right)/2-x;else if(pt(o)){const dt=Object.keys(o)[0],j=o[dt];q=this.chart.scales[dt].getPixelForValue(j)}Q=this._getYAxisLabelAlignment(_).textAlign}a==="y"&&(d==="start"?kt="top":d==="end"&&(kt="bottom"));const Vt=this._getLabelSizes();for(z=0,H=f.length;z<H;++z){Y=f[z],G=Y.label;const dt=c.setContext(this.getContext(z));F=this.getPixelForTick(z)+c.labelOffset,tt=this._resolveTickFontOptions(z),ct=tt.lineHeight,at=Ft(G)?G.length:1;const j=at/2,X=dt.color,P=dt.textStrokeColor,lt=dt.textStrokeWidth;let _t=Q;u?(q=F,Q==="inner"&&(z===H-1?_t=this.options.reverse?"left":"right":z===0?_t=this.options.reverse?"right":"left":_t="center"),o==="top"?m==="near"||M!==0?it=-at*ct+ct/2:m==="center"?it=-Vt.highest.height/2-j*ct+ct:it=-Vt.highest.height+ct/2:m==="near"||M!==0?it=ct/2:m==="center"?it=Vt.highest.height/2-j*ct:it=Vt.highest.height-at*ct,b&&(it*=-1),M!==0&&!dt.showLabelBackdrop&&(q+=ct/2*Math.sin(M))):(K=F,it=(1-at)*ct/2);let D;if(dt.showLabelBackdrop){const U=Le(dt.backdropPadding),Z=Vt.heights[z],W=Vt.widths[z];let st=it-U.top,ot=0-U.left;switch(kt){case"middle":st-=Z/2;break;case"bottom":st-=Z;break}switch(Q){case"center":ot-=W/2;break;case"right":ot-=W;break;case"inner":z===H-1?ot-=W:z>0&&(ot-=W/2);break}D={left:ot,top:st,width:W+U.width,height:Z+U.height,color:dt.backdropColor}}A.push({label:G,font:tt,textOffset:it,options:{rotation:M,color:X,strokeColor:P,strokeWidth:lt,textAlign:_t,textBaseline:kt,translation:[q,K],backdrop:D}})}return A}_getXAxisLabelAlignment(){const{position:e,ticks:a}=this.options;if(-Rn(this.labelRotation))return e==="top"?"left":"right";let o="center";return a.align==="start"?o="left":a.align==="end"?o="right":a.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(e){const{position:a,ticks:{crossAlign:s,mirror:o,padding:c}}=this.options,u=this._getLabelSizes(),f=e+c,d=u.widest.width;let m,p;return a==="left"?o?(p=this.right+c,s==="near"?m="left":s==="center"?(m="center",p+=d/2):(m="right",p+=d)):(p=this.right-f,s==="near"?m="right":s==="center"?(m="center",p-=d/2):(m="left",p=this.left)):a==="right"?o?(p=this.left+c,s==="near"?m="right":s==="center"?(m="center",p-=d/2):(m="left",p-=d)):(p=this.left+f,s==="near"?m="left":s==="center"?(m="center",p+=d/2):(m="right",p=this.right)):m="right",{textAlign:m,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,a=this.options.position;if(a==="left"||a==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(a==="top"||a==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:a},left:s,top:o,width:c,height:u}=this;a&&(e.save(),e.fillStyle=a,e.fillRect(s,o,c,u),e.restore())}getLineWidthForValue(e){const a=this.options.grid;if(!this._isVisible()||!a.display)return 0;const o=this.ticks.findIndex(c=>c.value===e);return o>=0?a.setContext(this.getContext(o)).lineWidth:0}drawGrid(e){const a=this.options.grid,s=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let c,u;const f=(d,m,p)=>{!p.width||!p.color||(s.save(),s.lineWidth=p.width,s.strokeStyle=p.color,s.setLineDash(p.borderDash||[]),s.lineDashOffset=p.borderDashOffset,s.beginPath(),s.moveTo(d.x,d.y),s.lineTo(m.x,m.y),s.stroke(),s.restore())};if(a.display)for(c=0,u=o.length;c<u;++c){const d=o[c];a.drawOnChartArea&&f({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),a.drawTicks&&f({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:a,options:{border:s,grid:o}}=this,c=s.setContext(this.getContext()),u=s.display?c.width:0;if(!u)return;const f=o.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let m,p,b,_;this.isHorizontal()?(m=Ni(e,this.left,u)-u/2,p=Ni(e,this.right,f)+f/2,b=_=d):(b=Ni(e,this.top,u)-u/2,_=Ni(e,this.bottom,f)+f/2,m=p=d),a.save(),a.lineWidth=c.width,a.strokeStyle=c.color,a.beginPath(),a.moveTo(m,b),a.lineTo(p,_),a.stroke(),a.restore()}drawLabels(e){if(!this.options.ticks.display)return;const s=this.ctx,o=this._computeLabelArea();o&&Go(s,o);const c=this.getLabelItems(e);for(const u of c){const f=u.options,d=u.font,m=u.label,p=u.textOffset;Fs(s,m,0,p,d,f)}o&&Qo(s)}drawTitle(){const{ctx:e,options:{position:a,title:s,reverse:o}}=this;if(!s.display)return;const c=re(s.font),u=Le(s.padding),f=s.align;let d=c.lineHeight/2;a==="bottom"||a==="center"||pt(a)?(d+=u.bottom,Ft(s.text)&&(d+=c.lineHeight*(s.text.length-1))):d+=u.top;const{titleX:m,titleY:p,maxWidth:b,rotation:_}=P1(this,d,a,f);Fs(e,s.text,0,0,c,{color:s.color,maxWidth:b,rotation:_,textAlign:$1(f,a,o),textBaseline:"middle",translation:[m,p]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,a=e.ticks&&e.ticks.z||0,s=ht(e.grid&&e.grid.z,-1),o=ht(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Na.prototype.draw?[{z:a,draw:c=>{this.draw(c)}}]:[{z:s,draw:c=>{this.drawBackground(),this.drawGrid(c),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:a,draw:c=>{this.drawLabels(c)}}]}getMatchingVisibleMetas(e){const a=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",o=[];let c,u;for(c=0,u=a.length;c<u;++c){const f=a[c];f[s]===this.id&&(!e||f.type===e)&&o.push(f)}return o}_resolveTickFontOptions(e){const a=this.options.ticks.setContext(this.getContext(e));return re(a.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Eo{constructor(e,a,s){this.type=e,this.scope=a,this.override=s,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const a=Object.getPrototypeOf(e);let s;nS(a)&&(s=this.register(a));const o=this.items,c=e.id,u=this.scope+"."+c;if(!c)throw new Error("class does not have id: "+e);return c in o||(o[c]=e,tS(e,u,s),this.override&&Gt.override(e.id,e.overrides)),u}get(e){return this.items[e]}unregister(e){const a=this.items,s=e.id,o=this.scope;s in a&&delete a[s],o&&s in Gt[o]&&(delete Gt[o][s],this.override&&delete Ui[s])}}function tS(i,e,a){const s=on(Object.create(null),[a?Gt.get(a):{},Gt.get(e),i.defaults]);Gt.set(e,s),i.defaultRoutes&&eS(e,i.defaultRoutes),i.descriptors&&Gt.describe(e,i.descriptors)}function eS(i,e){Object.keys(e).forEach(a=>{const s=a.split("."),o=s.pop(),c=[i].concat(s).join("."),u=e[a].split("."),f=u.pop(),d=u.join(".");Gt.route(c,o,d,f)})}function nS(i){return"id"in i&&"defaults"in i}class iS{constructor(){this.controllers=new Eo(gf,"datasets",!0),this.elements=new Eo(jn,"elements"),this.plugins=new Eo(Object,"plugins"),this.scales=new Eo(Na,"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,a,s){[...a].forEach(o=>{const c=s||this._getRegistryForType(o);s||c.isForType(o)||c===this.plugins&&o.id?this._exec(e,c,o):At(o,u=>{const f=s||this._getRegistryForType(u);this._exec(e,f,u)})})}_exec(e,a,s){const o=nf(e);jt(s["before"+o],[],s),a[e](s),jt(s["after"+o],[],s)}_getRegistryForType(e){for(let a=0;a<this._typedRegistries.length;a++){const s=this._typedRegistries[a];if(s.isForType(e))return s}return this.plugins}_get(e,a,s){const o=a.get(e);if(o===void 0)throw new Error('"'+e+'" is not a registered '+s+".");return o}}var sn=new iS;class aS{constructor(){this._init=void 0}notify(e,a,s,o){if(a==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const c=o?this._descriptors(e).filter(o):this._descriptors(e),u=this._notify(c,e,a,s);return a==="afterDestroy"&&(this._notify(c,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),u}_notify(e,a,s,o){o=o||{};for(const c of e){const u=c.plugin,f=u[s],d=[a,o,c.options];if(jt(f,d,u)===!1&&o.cancelable)return!1}return!0}invalidate(){Tt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const a=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),a}_createDescriptors(e,a){const s=e&&e.config,o=ht(s.options&&s.options.plugins,{}),c=sS(s);return o===!1&&!a?[]:oS(e,c,o,a)}_notifyStateChanges(e){const a=this._oldCache||[],s=this._cache,o=(c,u)=>c.filter(f=>!u.some(d=>f.plugin.id===d.plugin.id));this._notify(o(a,s),e,"stop"),this._notify(o(s,a),e,"start")}}function sS(i){const e={},a=[],s=Object.keys(sn.plugins.items);for(let c=0;c<s.length;c++)a.push(sn.getPlugin(s[c]));const o=i.plugins||[];for(let c=0;c<o.length;c++){const u=o[c];a.indexOf(u)===-1&&(a.push(u),e[u.id]=!0)}return{plugins:a,localIds:e}}function lS(i,e){return!e&&i===!1?null:i===!0?{}:i}function oS(i,{plugins:e,localIds:a},s,o){const c=[],u=i.getContext();for(const f of e){const d=f.id,m=lS(s[d],o);m!==null&&c.push({plugin:f,options:rS(i.config,{plugin:f,local:a[d]},m,u)})}return c}function rS(i,{plugin:e,local:a},s,o){const c=i.pluginScopeKeys(e),u=i.getOptionScopes(s,c);return a&&e.defaults&&u.push(e.defaults),i.createResolver(u,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ku(i,e){const a=Gt.datasets[i]||{};return((e.datasets||{})[i]||{}).indexAxis||e.indexAxis||a.indexAxis||"x"}function cS(i,e){let a=i;return i==="_index_"?a=e:i==="_value_"&&(a=e==="x"?"y":"x"),a}function uS(i,e){return i===e?"_index_":"_value_"}function mp(i){if(i==="x"||i==="y"||i==="r")return i}function fS(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function Fu(i,...e){if(mp(i))return i;for(const a of e){const s=a.axis||fS(a.position)||i.length>1&&mp(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function pp(i,e,a){if(a[e+"AxisID"]===i)return{axis:e}}function hS(i,e){if(e.data&&e.data.datasets){const a=e.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(a.length)return pp(i,"x",a[0])||pp(i,"y",a[0])}return{}}function dS(i,e){const a=Ui[i.type]||{scales:{}},s=e.scales||{},o=Ku(i.type,e),c=Object.create(null);return Object.keys(s).forEach(u=>{const f=s[u];if(!pt(f))return console.error(`Invalid scale configuration for scale: ${u}`);if(f._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${u}`);const d=Fu(u,f,hS(u,i),Gt.scales[f.type]),m=uS(d,o),p=a.scales||{};c[u]=Bs(Object.create(null),[{axis:d},f,p[d],p[m]])}),i.data.datasets.forEach(u=>{const f=u.type||i.type,d=u.indexAxis||Ku(f,e),p=(Ui[f]||{}).scales||{};Object.keys(p).forEach(b=>{const _=cS(b,d),x=u[_+"AxisID"]||_;c[x]=c[x]||Object.create(null),Bs(c[x],[{axis:_},s[x],p[b]])})}),Object.keys(c).forEach(u=>{const f=c[u];Bs(f,[Gt.scales[f.type],Gt.scale])}),c}function H0(i){const e=i.options||(i.options={});e.plugins=ht(e.plugins,{}),e.scales=dS(i,e)}function B0(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function gS(i){return i=i||{},i.data=B0(i.data),H0(i),i}const yp=new Map,U0=new Set;function Ao(i,e){let a=yp.get(i);return a||(a=e(),yp.set(i,a),U0.add(a)),a}const Ns=(i,e,a)=>{const s=Bi(e,a);s!==void 0&&i.add(s)};class mS{constructor(e){this._config=gS(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=B0(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(),H0(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ao(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,a){return Ao(`${e}.transition.${a}`,()=>[[`datasets.${e}.transitions.${a}`,`transitions.${a}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,a){return Ao(`${e}-${a}`,()=>[[`datasets.${e}.elements.${a}`,`datasets.${e}`,`elements.${a}`,""]])}pluginScopeKeys(e){const a=e.id,s=this.type;return Ao(`${s}-plugin-${a}`,()=>[[`plugins.${a}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,a){const s=this._scopeCache;let o=s.get(e);return(!o||a)&&(o=new Map,s.set(e,o)),o}getOptionScopes(e,a,s){const{options:o,type:c}=this,u=this._cachedScopes(e,s),f=u.get(a);if(f)return f;const d=new Set;a.forEach(p=>{e&&(d.add(e),p.forEach(b=>Ns(d,e,b))),p.forEach(b=>Ns(d,o,b)),p.forEach(b=>Ns(d,Ui[c]||{},b)),p.forEach(b=>Ns(d,Gt,b)),p.forEach(b=>Ns(d,Qu,b))});const m=Array.from(d);return m.length===0&&m.push(Object.create(null)),U0.has(a)&&u.set(a,m),m}chartOptionScopes(){const{options:e,type:a}=this;return[e,Ui[a]||{},Gt.datasets[a]||{},{type:a},Gt,Qu]}resolveNamedOptions(e,a,s,o=[""]){const c={$shared:!0},{resolver:u,subPrefixes:f}=bp(this._resolverCache,e,o);let d=u;if(yS(u,a)){c.$shared=!1,s=hi(s)?s():s;const m=this.createResolver(e,s,f);d=Ra(u,s,m)}for(const m of a)c[m]=d[m];return c}createResolver(e,a,s=[""],o){const{resolver:c}=bp(this._resolverCache,e,s);return pt(a)?Ra(c,a,void 0,o):c}}function bp(i,e,a){let s=i.get(e);s||(s=new Map,i.set(e,s));const o=a.join();let c=s.get(o);return c||(c={resolver:cf(e,a),subPrefixes:a.filter(f=>!f.toLowerCase().includes("hover"))},s.set(o,c)),c}const pS=i=>pt(i)&&Object.getOwnPropertyNames(i).some(e=>hi(i[e]));function yS(i,e){const{isScriptable:a,isIndexable:s}=b0(i);for(const o of e){const c=a(o),u=s(o),f=(u||c)&&i[o];if(c&&(hi(f)||pS(f))||u&&Ft(f))return!0}return!1}var bS="4.5.1";const vS=["top","bottom","left","right","chartArea"];function vp(i,e){return i==="top"||i==="bottom"||vS.indexOf(i)===-1&&e==="x"}function _p(i,e){return function(a,s){return a[i]===s[i]?a[e]-s[e]:a[i]-s[i]}}function xp(i){const e=i.chart,a=e.options.animation;e.notifyPlugins("afterRender"),jt(a&&a.onComplete,[i],e)}function _S(i){const e=i.chart,a=e.options.animation;jt(a&&a.onProgress,[i],e)}function V0(i){return hf()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const ko={},Sp=i=>{const e=V0(i);return Object.values(ko).filter(a=>a.canvas===e).pop()};function xS(i,e,a){const s=Object.keys(i);for(const o of s){const c=+o;if(c>=e){const u=i[o];delete i[o],(a>0||c>e)&&(i[c+a]=u)}}}function SS(i,e,a,s){return!a||i.type==="mouseout"?null:s?e:i}let Fo=class{static defaults=Gt;static instances=ko;static overrides=Ui;static registry=sn;static version=bS;static getChart=Sp;static register(...e){sn.add(...e),Tp()}static unregister(...e){sn.remove(...e),Tp()}constructor(e,a){const s=this.config=new mS(a),o=V0(e),c=Sp(o);if(c)throw new Error("Canvas is already in use. Chart with ID '"+c.id+"' must be destroyed before the canvas with ID '"+c.canvas.id+"' can be reused.");const u=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||V1(o)),this.platform.updateConfig(s);const f=this.platform.acquireContext(o,u.aspectRatio),d=f&&f.canvas,m=d&&d.height,p=d&&d.width;if(this.id=v_(),this.ctx=f,this.canvas=d,this.width=p,this.height=m,this._options=u,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 aS,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=B_(b=>this.update(b),u.resizeDelay||0),this._dataChanges=[],ko[this.id]=this,!f||!d){console.error("Failed to create chart: can't acquire context from the given item");return}Dn.listen(this,"complete",xp),Dn.listen(this,"progress",_S),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:a},width:s,height:o,_aspectRatio:c}=this;return Tt(e)?a&&c?c:o?s/o: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 sn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qm(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return qm(this.canvas,this.ctx),this}stop(){return Dn.stop(this),this}resize(e,a){Dn.running(this)?this._resizeBeforeDraw={width:e,height:a}:this._resize(e,a)}_resize(e,a){const s=this.options,o=this.canvas,c=s.maintainAspectRatio&&this.aspectRatio,u=this.platform.getMaximumSize(o,e,a,c),f=s.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=u.width,this.height=u.height,this._aspectRatio=this.aspectRatio,Qm(this,f,!0)&&(this.notifyPlugins("resize",{size:u}),jt(s.onResize,[this,u],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const a=this.options.scales||{};At(a,(s,o)=>{s.id=o})}buildOrUpdateScales(){const e=this.options,a=e.scales,s=this.scales,o=Object.keys(s).reduce((u,f)=>(u[f]=!1,u),{});let c=[];a&&(c=c.concat(Object.keys(a).map(u=>{const f=a[u],d=Fu(u,f),m=d==="r",p=d==="x";return{options:f,dposition:m?"chartArea":p?"bottom":"left",dtype:m?"radialLinear":p?"category":"linear"}}))),At(c,u=>{const f=u.options,d=f.id,m=Fu(d,f),p=ht(f.type,u.dtype);(f.position===void 0||vp(f.position,m)!==vp(u.dposition))&&(f.position=u.dposition),o[d]=!0;let b=null;if(d in s&&s[d].type===p)b=s[d];else{const _=sn.getScale(p);b=new _({id:d,type:p,ctx:this.ctx,chart:this}),s[b.id]=b}b.init(f,e)}),At(o,(u,f)=>{u||delete s[f]}),At(s,u=>{Fe.configure(this,u,u.options),Fe.addBox(this,u)})}_updateMetasets(){const e=this._metasets,a=this.data.datasets.length,s=e.length;if(e.sort((o,c)=>o.index-c.index),s>a){for(let o=a;o<s;++o)this._destroyDatasetMeta(o);e.splice(a,s-a)}this._sortedMetasets=e.slice(0).sort(_p("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:a}}=this;e.length>a.length&&delete this._stacks,e.forEach((s,o)=>{a.filter(c=>c===s._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){const e=[],a=this.data.datasets;let s,o;for(this._removeUnreferencedMetasets(),s=0,o=a.length;s<o;s++){const c=a[s];let u=this.getDatasetMeta(s);const f=c.type||this.config.type;if(u.type&&u.type!==f&&(this._destroyDatasetMeta(s),u=this.getDatasetMeta(s)),u.type=f,u.indexAxis=c.indexAxis||Ku(f,this.options),u.order=c.order||0,u.index=s,u.label=""+c.label,u.visible=this.isDatasetVisible(s),u.controller)u.controller.updateIndex(s),u.controller.linkScales();else{const d=sn.getController(f),{datasetElementType:m,dataElementType:p}=Gt.datasets[f];Object.assign(d,{dataElementType:sn.getElement(p),datasetElementType:m&&sn.getElement(m)}),u.controller=new d(this,s),e.push(u.controller)}}return this._updateMetasets(),e}_resetElements(){At(this.data.datasets,(e,a)=>{this.getDatasetMeta(a).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const a=this.config;a.update();const s=this._options=a.createResolver(a.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const c=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let u=0;for(let m=0,p=this.data.datasets.length;m<p;m++){const{controller:b}=this.getDatasetMeta(m),_=!o&&c.indexOf(b)===-1;b.buildOrUpdateElements(_),u=Math.max(+b.getMaxOverflow(),u)}u=this._minPadding=s.layout.autoPadding?u:0,this._updateLayout(u),o||At(c,m=>{m.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(_p("z","_idx"));const{_active:f,_lastEvent:d}=this;d?this._eventHandler(d,!0):f.length&&this._updateHoverStyles(f,f,!0),this.render()}_updateScales(){At(this.scales,e=>{Fe.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,a=new Set(Object.keys(this._listeners)),s=new Set(e.events);(!wm(a,s)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,a=this._getUniformDataChanges()||[];for(const{method:s,start:o,count:c}of a){const u=s==="_removeElements"?-c:c;xS(e,o,u)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const a=this.data.datasets.length,s=c=>new Set(e.filter(u=>u[0]===c).map((u,f)=>f+","+u.splice(1).join(","))),o=s(0);for(let c=1;c<a;c++)if(!wm(o,s(c)))return;return Array.from(o).map(c=>c.split(",")).map(c=>({method:c[1],start:+c[2],count:+c[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Fe.update(this,this.width,this.height,e);const a=this.chartArea,s=a.width<=0||a.height<=0;this._layers=[],At(this.boxes,o=>{s&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,c)=>{o._idx=c}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let a=0,s=this.data.datasets.length;a<s;++a)this.getDatasetMeta(a).controller.configure();for(let a=0,s=this.data.datasets.length;a<s;++a)this._updateDataset(a,hi(e)?e({datasetIndex:a}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,a){const s=this.getDatasetMeta(e),o={meta:s,index:e,mode:a,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(s.controller._update(a),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Dn.has(this)?this.attached&&!Dn.running(this)&&Dn.start(this):(this.draw(),xp({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:s,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,o)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const a=this._layers;for(e=0;e<a.length&&a[e].z<=0;++e)a[e].draw(this.chartArea);for(this._drawDatasets();e<a.length;++e)a[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const a=this._sortedMetasets,s=[];let o,c;for(o=0,c=a.length;o<c;++o){const u=a[o];(!e||u.visible)&&s.push(u)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let a=e.length-1;a>=0;--a)this._drawDataset(e[a]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const a=this.ctx,s={meta:e,index:e.index,cancelable:!0},o=D0(this,e);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(o&&Go(a,o),e.controller.draw(),o&&Qo(a),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return Ks(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,a,s,o){const c=v1.modes[a];return typeof c=="function"?c(this,e,s,o):[]}getDatasetMeta(e){const a=this.data.datasets[e],s=this._metasets;let o=s.filter(c=>c&&c._dataset===a).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:a&&a.order||0,index:e,_dataset:a,_parsed:[],_sorted:!1},s.push(o)),o}getContext(){return this.$context||(this.$context=Vi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const a=this.data.datasets[e];if(!a)return!1;const s=this.getDatasetMeta(e);return typeof s.hidden=="boolean"?!s.hidden:!a.hidden}setDatasetVisibility(e,a){const s=this.getDatasetMeta(e);s.hidden=!a}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,a,s){const o=s?"show":"hide",c=this.getDatasetMeta(e),u=c.controller._resolveAnimations(void 0,o);Qs(a)?(c.data[a].hidden=!s,this.update()):(this.setDatasetVisibility(e,s),u.update(c,{visible:s}),this.update(f=>f.datasetIndex===e?o:void 0))}hide(e,a){this._updateVisibility(e,a,!1)}show(e,a){this._updateVisibility(e,a,!0)}_destroyDatasetMeta(e){const a=this._metasets[e];a&&a.controller&&a.controller._destroy(),delete this._metasets[e]}_stop(){let e,a;for(this.stop(),Dn.remove(this),e=0,a=this.data.datasets.length;e<a;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:a}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),qm(e,a),this.platform.releaseContext(a),this.canvas=null,this.ctx=null),delete ko[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,a=this.platform,s=(c,u)=>{a.addEventListener(this,c,u),e[c]=u},o=(c,u,f)=>{c.offsetX=u,c.offsetY=f,this._eventHandler(c)};At(this.options.events,c=>s(c,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,a=this.platform,s=(d,m)=>{a.addEventListener(this,d,m),e[d]=m},o=(d,m)=>{e[d]&&(a.removeEventListener(this,d,m),delete e[d])},c=(d,m)=>{this.canvas&&this.resize(d,m)};let u;const f=()=>{o("attach",f),this.attached=!0,this.resize(),s("resize",c),s("detach",u)};u=()=>{this.attached=!1,o("resize",c),this._stop(),this._resize(0,0),s("attach",f)},a.isAttached(this.canvas)?f():u()}unbindEvents(){At(this._listeners,(e,a)=>{this.platform.removeEventListener(this,a,e)}),this._listeners={},At(this._responsiveListeners,(e,a)=>{this.platform.removeEventListener(this,a,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,a,s){const o=s?"set":"remove";let c,u,f,d;for(a==="dataset"&&(c=this.getDatasetMeta(e[0].datasetIndex),c.controller["_"+o+"DatasetHoverStyle"]()),f=0,d=e.length;f<d;++f){u=e[f];const m=u&&this.getDatasetMeta(u.datasetIndex).controller;m&&m[o+"HoverStyle"](u.element,u.datasetIndex,u.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const a=this._active||[],s=e.map(({datasetIndex:c,index:u})=>{const f=this.getDatasetMeta(c);if(!f)throw new Error("No dataset found at index "+c);return{datasetIndex:c,element:f.data[u],index:u}});!Lo(s,a)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,a))}notifyPlugins(e,a,s){return this._plugins.notify(this,e,a,s)}isPluginEnabled(e){return this._plugins._cache.filter(a=>a.plugin.id===e).length===1}_updateHoverStyles(e,a,s){const o=this.options.hover,c=(d,m)=>d.filter(p=>!m.some(b=>p.datasetIndex===b.datasetIndex&&p.index===b.index)),u=c(a,e),f=s?e:c(e,a);u.length&&this.updateHoverStyle(u,o.mode,!1),f.length&&o.mode&&this.updateHoverStyle(f,o.mode,!0)}_eventHandler(e,a){const s={event:e,replay:a,cancelable:!0,inChartArea:this.isPointInArea(e)},o=u=>(u.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",s,o)===!1)return;const c=this._handleEvent(e,a,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,o),(c||s.changed)&&this.render(),this}_handleEvent(e,a,s){const{_active:o=[],options:c}=this,u=a,f=this._getActiveElements(e,o,s,u),d=E_(e),m=SS(e,this._lastEvent,s,d);s&&(this._lastEvent=null,jt(c.onHover,[e,f,this],this),d&&jt(c.onClick,[e,f,this],this));const p=!Lo(f,o);return(p||a)&&(this._active=f,this._updateHoverStyles(f,o,a)),this._lastEvent=m,p}_getActiveElements(e,a,s,o){if(e.type==="mouseout")return[];if(!s)return a;const c=this.options.hover;return this.getElementsAtEventForMode(e,c.mode,c,o)}};function Tp(){return At(Fo.instances,i=>i._plugins.invalidate())}function TS(i,e,a){const{startAngle:s,x:o,y:c,outerRadius:u,innerRadius:f,options:d}=e,{borderWidth:m,borderJoinStyle:p}=d,b=Math.min(m/u,ke(s-a));if(i.beginPath(),i.arc(o,c,u-m/2,s+b/2,a-b/2),f>0){const _=Math.min(m/f,ke(s-a));i.arc(o,c,f+m/2,a-_/2,s+_/2,!0)}else{const _=Math.min(m/2,u*ke(s-a));if(p==="round")i.arc(o,c,_,a-Ct/2,s+Ct/2,!0);else if(p==="bevel"){const x=2*_*_,T=-x*Math.cos(a+Ct/2)+o,M=-x*Math.sin(a+Ct/2)+c,A=x*Math.cos(s+Ct/2)+o,z=x*Math.sin(s+Ct/2)+c;i.lineTo(T,M),i.lineTo(A,z)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function MS(i,e,a){const{startAngle:s,pixelMargin:o,x:c,y:u,outerRadius:f,innerRadius:d}=e;let m=o/f;i.beginPath(),i.arc(c,u,f,s-m,a+m),d>o?(m=o/d,i.arc(c,u,d,a+m,s-m,!0)):i.arc(c,u,o,a+te,s-te),i.closePath(),i.clip()}function ES(i){return rf(i,["outerStart","outerEnd","innerStart","innerEnd"])}function AS(i,e,a,s){const o=ES(i.options.borderRadius),c=(a-e)/2,u=Math.min(c,s*e/2),f=d=>{const m=(a-Math.min(c,d))*s/2;return Me(d,0,Math.min(c,m))};return{outerStart:f(o.outerStart),outerEnd:f(o.outerEnd),innerStart:Me(o.innerStart,0,u),innerEnd:Me(o.innerEnd,0,u)}}function Oa(i,e,a,s){return{x:a+i*Math.cos(e),y:s+i*Math.sin(e)}}function Xo(i,e,a,s,o,c){const{x:u,y:f,startAngle:d,pixelMargin:m,innerRadius:p}=e,b=Math.max(e.outerRadius+s+a-m,0),_=p>0?p+s+a+m:0;let x=0;const T=o-d;if(s){const dt=p>0?p-s:0,j=b>0?b-s:0,X=(dt+j)/2,P=X!==0?T*X/(X+s):T;x=(T-P)/2}const M=Math.max(.001,T*b-a/Ct)/b,A=(T-M)/2,z=d+A+x,H=o-A-x,{outerStart:Y,outerEnd:G,innerStart:q,innerEnd:K}=AS(e,_,b,H-z),Q=b-Y,F=b-G,tt=z+Y/Q,ct=H-G/F,at=_+q,it=_+K,kt=z+q/at,Vt=H-K/it;if(i.beginPath(),c){const dt=(tt+ct)/2;if(i.arc(u,f,b,tt,dt),i.arc(u,f,b,dt,ct),G>0){const lt=Oa(F,ct,u,f);i.arc(lt.x,lt.y,G,ct,H+te)}const j=Oa(it,H,u,f);if(i.lineTo(j.x,j.y),K>0){const lt=Oa(it,Vt,u,f);i.arc(lt.x,lt.y,K,H+te,Vt+Math.PI)}const X=(H-K/_+(z+q/_))/2;if(i.arc(u,f,_,H-K/_,X,!0),i.arc(u,f,_,X,z+q/_,!0),q>0){const lt=Oa(at,kt,u,f);i.arc(lt.x,lt.y,q,kt+Math.PI,z-te)}const P=Oa(Q,z,u,f);if(i.lineTo(P.x,P.y),Y>0){const lt=Oa(Q,tt,u,f);i.arc(lt.x,lt.y,Y,z-te,tt)}}else{i.moveTo(u,f);const dt=Math.cos(tt)*b+u,j=Math.sin(tt)*b+f;i.lineTo(dt,j);const X=Math.cos(ct)*b+u,P=Math.sin(ct)*b+f;i.lineTo(X,P)}i.closePath()}function OS(i,e,a,s,o){const{fullCircles:c,startAngle:u,circumference:f}=e;let d=e.endAngle;if(c){Xo(i,e,a,s,d,o);for(let m=0;m<c;++m)i.fill();isNaN(f)||(d=u+(f%Yt||Yt))}return Xo(i,e,a,s,d,o),i.fill(),d}function DS(i,e,a,s,o){const{fullCircles:c,startAngle:u,circumference:f,options:d}=e,{borderWidth:m,borderJoinStyle:p,borderDash:b,borderDashOffset:_,borderRadius:x}=d,T=d.borderAlign==="inner";if(!m)return;i.setLineDash(b||[]),i.lineDashOffset=_,T?(i.lineWidth=m*2,i.lineJoin=p||"round"):(i.lineWidth=m,i.lineJoin=p||"bevel");let M=e.endAngle;if(c){Xo(i,e,a,s,M,o);for(let A=0;A<c;++A)i.stroke();isNaN(f)||(M=u+(f%Yt||Yt))}T&&MS(i,e,M),d.selfJoin&&M-u>=Ct&&x===0&&p!=="miter"&&TS(i,e,M),c||(Xo(i,e,a,s,M,o),i.stroke())}class Y0 extends jn{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),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,e&&Object.assign(this,e)}inRange(e,a,s){const o=this.getProps(["x","y"],s),{angle:c,distance:u}=u0(o,{x:e,y:a}),{startAngle:f,endAngle:d,innerRadius:m,outerRadius:p,circumference:b}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),_=(this.options.spacing+this.options.borderWidth)/2,x=ht(b,d-f),T=Zs(c,f,d)&&f!==d,M=x>=Yt||T,A=wn(u,m+_,p+_);return M&&A}getCenterPoint(e){const{x:a,y:s,startAngle:o,endAngle:c,innerRadius:u,outerRadius:f}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:d,spacing:m}=this.options,p=(o+c)/2,b=(u+f+m+d)/2;return{x:a+Math.cos(p)*b,y:s+Math.sin(p)*b}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:a,circumference:s}=this,o=(a.offset||0)/4,c=(a.spacing||0)/2,u=a.circular;if(this.pixelMargin=a.borderAlign==="inner"?.33:0,this.fullCircles=s>Yt?Math.floor(s/Yt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const f=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(f)*o,Math.sin(f)*o);const d=1-Math.sin(Math.min(Ct,s||0)),m=o*d;e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,OS(e,this,m,c,u),DS(e,this,m,c,u),e.restore()}}function q0(i,e,a=e){i.lineCap=ht(a.borderCapStyle,e.borderCapStyle),i.setLineDash(ht(a.borderDash,e.borderDash)),i.lineDashOffset=ht(a.borderDashOffset,e.borderDashOffset),i.lineJoin=ht(a.borderJoinStyle,e.borderJoinStyle),i.lineWidth=ht(a.borderWidth,e.borderWidth),i.strokeStyle=ht(a.borderColor,e.borderColor)}function CS(i,e,a){i.lineTo(a.x,a.y)}function zS(i){return i.stepped?J_:i.tension||i.cubicInterpolationMode==="monotone"?I_:CS}function X0(i,e,a={}){const s=i.length,{start:o=0,end:c=s-1}=a,{start:u,end:f}=e,d=Math.max(o,u),m=Math.min(c,f),p=o<u&&c<u||o>f&&c>f;return{count:s,start:d,loop:e.loop,ilen:m<d&&!p?s+m-d:m-d}}function RS(i,e,a,s){const{points:o,options:c}=e,{count:u,start:f,loop:d,ilen:m}=X0(o,a,s),p=zS(c);let{move:b=!0,reverse:_}=s||{},x,T,M;for(x=0;x<=m;++x)T=o[(f+(_?m-x:x))%u],!T.skip&&(b?(i.moveTo(T.x,T.y),b=!1):p(i,M,T,_,c.stepped),M=T);return d&&(T=o[(f+(_?m:0))%u],p(i,M,T,_,c.stepped)),!!d}function wS(i,e,a,s){const o=e.points,{count:c,start:u,ilen:f}=X0(o,a,s),{move:d=!0,reverse:m}=s||{};let p=0,b=0,_,x,T,M,A,z;const H=G=>(u+(m?f-G:G))%c,Y=()=>{M!==A&&(i.lineTo(p,A),i.lineTo(p,M),i.lineTo(p,z))};for(d&&(x=o[H(0)],i.moveTo(x.x,x.y)),_=0;_<=f;++_){if(x=o[H(_)],x.skip)continue;const G=x.x,q=x.y,K=G|0;K===T?(q<M?M=q:q>A&&(A=q),p=(b*p+G)/++b):(Y(),i.lineTo(G,q),T=K,b=0,M=A=q),z=q}Y()}function Wu(i){const e=i.options,a=e.borderDash&&e.borderDash.length;return!i._decimated&&!i._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!a?wS:RS}function NS(i){return i.stepped?Cx:i.tension||i.cubicInterpolationMode==="monotone"?zx:Li}function jS(i,e,a,s){let o=e._path;o||(o=e._path=new Path2D,e.path(o,a,s)&&o.closePath()),q0(i,e.options),i.stroke(o)}function kS(i,e,a,s){const{segments:o,options:c}=e,u=Wu(e);for(const f of o)q0(i,c,f.style),i.beginPath(),u(i,e,f,{start:a,end:a+s-1})&&i.closePath(),i.stroke()}const LS=typeof Path2D=="function";function HS(i,e,a,s){LS&&!e.options.segment?jS(i,e,a,s):kS(i,e,a,s)}class Wo extends jn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};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,a){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const o=s.spanGaps?this._loop:this._fullLoop;xx(this._points,s,e,o,a),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=Lx(this,this.options.segment))}first(){const e=this.segments,a=this.points;return e.length&&a[e[0].start]}last(){const e=this.segments,a=this.points,s=e.length;return s&&a[e[s-1].end]}interpolate(e,a){const s=this.options,o=e[a],c=this.points,u=O0(this,{property:a,start:o,end:o});if(!u.length)return;const f=[],d=NS(s);let m,p;for(m=0,p=u.length;m<p;++m){const{start:b,end:_}=u[m],x=c[b],T=c[_];if(x===T){f.push(x);continue}const M=Math.abs((o-x[a])/(T[a]-x[a])),A=d(x,T,M,s.stepped);A[a]=e[a],f.push(A)}return f.length===1?f[0]:f}pathSegment(e,a,s){return Wu(this)(e,this,a,s)}path(e,a,s){const o=this.segments,c=Wu(this);let u=this._loop;a=a||0,s=s||this.points.length-a;for(const f of o)u&=c(e,this,f,{start:a,end:a+s-1});return!!u}draw(e,a,s,o){const c=this.options||{};(this.points||[]).length&&c.borderWidth&&(e.save(),HS(e,this,s,o),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Mp(i,e,a,s){const o=i.options,{[a]:c}=i.getProps([a],s);return Math.abs(e-c)<o.radius+o.hitRadius}class G0 extends jn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,a,s){const o=this.options,{x:c,y:u}=this.getProps(["x","y"],s);return Math.pow(e-c,2)+Math.pow(a-u,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,a){return Mp(this,e,"x",a)}inYRange(e,a){return Mp(this,e,"y",a)}getCenterPoint(e){const{x:a,y:s}=this.getProps(["x","y"],e);return{x:a,y:s}}size(e){e=e||this.options||{};let a=e.radius||0;a=Math.max(a,a&&e.hoverRadius||0);const s=a&&e.borderWidth||0;return(a+s)*2}draw(e,a){const s=this.options;this.skip||s.radius<.1||!Ks(this,a,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Zu(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function Q0(i,e){const{x:a,y:s,base:o,width:c,height:u}=i.getProps(["x","y","base","width","height"],e);let f,d,m,p,b;return i.horizontal?(b=u/2,f=Math.min(a,o),d=Math.max(a,o),m=s-b,p=s+b):(b=c/2,f=a-b,d=a+b,m=Math.min(s,o),p=Math.max(s,o)),{left:f,top:m,right:d,bottom:p}}function ri(i,e,a,s){return i?0:Me(e,a,s)}function BS(i,e,a){const s=i.options.borderWidth,o=i.borderSkipped,c=y0(s);return{t:ri(o.top,c.top,0,a),r:ri(o.right,c.right,0,e),b:ri(o.bottom,c.bottom,0,a),l:ri(o.left,c.left,0,e)}}function US(i,e,a){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),o=i.options.borderRadius,c=Da(o),u=Math.min(e,a),f=i.borderSkipped,d=s||pt(o);return{topLeft:ri(!d||f.top||f.left,c.topLeft,0,u),topRight:ri(!d||f.top||f.right,c.topRight,0,u),bottomLeft:ri(!d||f.bottom||f.left,c.bottomLeft,0,u),bottomRight:ri(!d||f.bottom||f.right,c.bottomRight,0,u)}}function VS(i){const e=Q0(i),a=e.right-e.left,s=e.bottom-e.top,o=BS(i,a/2,s/2),c=US(i,a/2,s/2);return{outer:{x:e.left,y:e.top,w:a,h:s,radius:c},inner:{x:e.left+o.l,y:e.top+o.t,w:a-o.l-o.r,h:s-o.t-o.b,radius:{topLeft:Math.max(0,c.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,c.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,c.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,c.bottomRight-Math.max(o.b,o.r))}}}}function wu(i,e,a,s){const o=e===null,c=a===null,f=i&&!(o&&c)&&Q0(i,s);return f&&(o||wn(e,f.left,f.right))&&(c||wn(a,f.top,f.bottom))}function YS(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function qS(i,e){i.rect(e.x,e.y,e.w,e.h)}function Nu(i,e,a={}){const s=i.x!==a.x?-e:0,o=i.y!==a.y?-e:0,c=(i.x+i.w!==a.x+a.w?e:0)-s,u=(i.y+i.h!==a.y+a.h?e:0)-o;return{x:i.x+s,y:i.y+o,w:i.w+c,h:i.h+u,radius:i.radius}}class Z0 extends jn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};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:a,options:{borderColor:s,backgroundColor:o}}=this,{inner:c,outer:u}=VS(this),f=YS(u.radius)?Vo:qS;e.save(),(u.w!==c.w||u.h!==c.h)&&(e.beginPath(),f(e,Nu(u,a,c)),e.clip(),f(e,Nu(c,-a,u)),e.fillStyle=s,e.fill("evenodd")),e.beginPath(),f(e,Nu(c,a)),e.fillStyle=o,e.fill(),e.restore()}inRange(e,a,s){return wu(this,e,a,s)}inXRange(e,a){return wu(this,e,null,a)}inYRange(e,a){return wu(this,null,e,a)}getCenterPoint(e){const{x:a,y:s,base:o,horizontal:c}=this.getProps(["x","y","base","horizontal"],e);return{x:c?(a+o)/2:a,y:c?s:(s+o)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}function XS(i,e,a){const s=i.segments,o=i.points,c=e.points,u=[];for(const f of s){let{start:d,end:m}=f;m=Jo(d,m,o);const p=Ju(a,o[d],o[m],f.loop);if(!e.segments){u.push({source:f,target:p,start:o[d],end:o[m]});continue}const b=O0(e,p);for(const _ of b){const x=Ju(a,c[_.start],c[_.end],_.loop),T=A0(f,o,x);for(const M of T)u.push({source:M,target:_,start:{[a]:Ep(p,x,"start",Math.max)},end:{[a]:Ep(p,x,"end",Math.min)}})}}return u}function Ju(i,e,a,s){if(s)return;let o=e[i],c=a[i];return i==="angle"&&(o=ke(o),c=ke(c)),{property:i,start:o,end:c}}function GS(i,e){const{x:a=null,y:s=null}=i||{},o=e.points,c=[];return e.segments.forEach(({start:u,end:f})=>{f=Jo(u,f,o);const d=o[u],m=o[f];s!==null?(c.push({x:d.x,y:s}),c.push({x:m.x,y:s})):a!==null&&(c.push({x:a,y:d.y}),c.push({x:a,y:m.y}))}),c}function Jo(i,e,a){for(;e>i;e--){const s=a[e];if(!isNaN(s.x)&&!isNaN(s.y))break}return e}function Ep(i,e,a,s){return i&&e?s(i[a],e[a]):i?i[a]:e?e[a]:0}function K0(i,e){let a=[],s=!1;return Ft(i)?(s=!0,a=i):a=GS(i,e),a.length?new Wo({points:a,options:{tension:0},_loop:s,_fullLoop:s}):null}function Ap(i){return i&&i.fill!==!1}function QS(i,e,a){let o=i[e].fill;const c=[e];let u;if(!a)return o;for(;o!==!1&&c.indexOf(o)===-1;){if(!fe(o))return o;if(u=i[o],!u)return!1;if(u.visible)return o;c.push(o),o=u.fill}return!1}function ZS(i,e,a){const s=JS(i);if(pt(s))return isNaN(s.value)?!1:s;let o=parseFloat(s);return fe(o)&&Math.floor(o)===o?KS(s[0],e,o,a):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function KS(i,e,a,s){return(i==="-"||i==="+")&&(a=e+a),a===e||a<0||a>=s?!1:a}function FS(i,e){let a=null;return i==="start"?a=e.bottom:i==="end"?a=e.top:pt(i)?a=e.getPixelForValue(i.value):e.getBasePixel&&(a=e.getBasePixel()),a}function WS(i,e,a){let s;return i==="start"?s=a:i==="end"?s=e.options.reverse?e.min:e.max:pt(i)?s=i.value:s=e.getBaseValue(),s}function JS(i){const e=i.options,a=e.fill;let s=ht(a&&a.target,a);return s===void 0&&(s=!!e.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function IS(i){const{scale:e,index:a,line:s}=i,o=[],c=s.segments,u=s.points,f=$S(e,a);f.push(K0({x:null,y:e.bottom},s));for(let d=0;d<c.length;d++){const m=c[d];for(let p=m.start;p<=m.end;p++)PS(o,u[p],f)}return new Wo({points:o,options:{}})}function $S(i,e){const a=[],s=i.getMatchingVisibleMetas("line");for(let o=0;o<s.length;o++){const c=s[o];if(c.index===e)break;c.hidden||a.unshift(c.dataset)}return a}function PS(i,e,a){const s=[];for(let o=0;o<a.length;o++){const c=a[o],{first:u,last:f,point:d}=t2(c,e,"x");if(!(!d||u&&f)){if(u)s.unshift(d);else if(i.push(d),!f)break}}i.push(...s)}function t2(i,e,a){const s=i.interpolate(e,a);if(!s)return{};const o=s[a],c=i.segments,u=i.points;let f=!1,d=!1;for(let m=0;m<c.length;m++){const p=c[m],b=u[p.start][a],_=u[p.end][a];if(wn(o,b,_)){f=o===b,d=o===_;break}}return{first:f,last:d,point:s}}class F0{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,a,s){const{x:o,y:c,radius:u}=this;return a=a||{start:0,end:Yt},e.arc(o,c,u,a.end,a.start,!0),!s.bounds}interpolate(e){const{x:a,y:s,radius:o}=this,c=e.angle;return{x:a+Math.cos(c)*o,y:s+Math.sin(c)*o,angle:c}}}function e2(i){const{chart:e,fill:a,line:s}=i;if(fe(a))return n2(e,a);if(a==="stack")return IS(i);if(a==="shape")return!0;const o=i2(i);return o instanceof F0?o:K0(o,s)}function n2(i,e){const a=i.getDatasetMeta(e);return a&&i.isDatasetVisible(e)?a.dataset:null}function i2(i){return(i.scale||{}).getPointPositionForValue?s2(i):a2(i)}function a2(i){const{scale:e={},fill:a}=i,s=FS(a,e);if(fe(s)){const o=e.isHorizontal();return{x:o?s:null,y:o?null:s}}return null}function s2(i){const{scale:e,fill:a}=i,s=e.options,o=e.getLabels().length,c=s.reverse?e.max:e.min,u=WS(a,e,c),f=[];if(s.grid.circular){const d=e.getPointPositionForValue(0,c);return new F0({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(u)})}for(let d=0;d<o;++d)f.push(e.getPointPositionForValue(d,u));return f}function ju(i,e,a){const s=e2(e),{chart:o,index:c,line:u,scale:f,axis:d}=e,m=u.options,p=m.fill,b=m.backgroundColor,{above:_=b,below:x=b}=p||{},T=o.getDatasetMeta(c),M=D0(o,T);s&&u.points.length&&(Go(i,a),l2(i,{line:u,target:s,above:_,below:x,area:a,scale:f,axis:d,clip:M}),Qo(i))}function l2(i,e){const{line:a,target:s,above:o,below:c,area:u,scale:f,clip:d}=e,m=a._loop?"angle":e.axis;i.save();let p=c;c!==o&&(m==="x"?(Op(i,s,u.top),ku(i,{line:a,target:s,color:o,scale:f,property:m,clip:d}),i.restore(),i.save(),Op(i,s,u.bottom)):m==="y"&&(Dp(i,s,u.left),ku(i,{line:a,target:s,color:c,scale:f,property:m,clip:d}),i.restore(),i.save(),Dp(i,s,u.right),p=o)),ku(i,{line:a,target:s,color:p,scale:f,property:m,clip:d}),i.restore()}function Op(i,e,a){const{segments:s,points:o}=e;let c=!0,u=!1;i.beginPath();for(const f of s){const{start:d,end:m}=f,p=o[d],b=o[Jo(d,m,o)];c?(i.moveTo(p.x,p.y),c=!1):(i.lineTo(p.x,a),i.lineTo(p.x,p.y)),u=!!e.pathSegment(i,f,{move:u}),u?i.closePath():i.lineTo(b.x,a)}i.lineTo(e.first().x,a),i.closePath(),i.clip()}function Dp(i,e,a){const{segments:s,points:o}=e;let c=!0,u=!1;i.beginPath();for(const f of s){const{start:d,end:m}=f,p=o[d],b=o[Jo(d,m,o)];c?(i.moveTo(p.x,p.y),c=!1):(i.lineTo(a,p.y),i.lineTo(p.x,p.y)),u=!!e.pathSegment(i,f,{move:u}),u?i.closePath():i.lineTo(a,b.y)}i.lineTo(a,e.first().y),i.closePath(),i.clip()}function ku(i,e){const{line:a,target:s,property:o,color:c,scale:u,clip:f}=e,d=XS(a,s,o);for(const{source:m,target:p,start:b,end:_}of d){const{style:{backgroundColor:x=c}={}}=m,T=s!==!0;i.save(),i.fillStyle=x,o2(i,u,f,T&&Ju(o,b,_)),i.beginPath();const M=!!a.pathSegment(i,m);let A;if(T){M?i.closePath():Cp(i,s,_,o);const z=!!s.pathSegment(i,p,{move:M,reverse:!0});A=M&&z,A||Cp(i,s,b,o)}i.closePath(),i.fill(A?"evenodd":"nonzero"),i.restore()}}function o2(i,e,a,s){const o=e.chart.chartArea,{property:c,start:u,end:f}=s||{};if(c==="x"||c==="y"){let d,m,p,b;c==="x"?(d=u,m=o.top,p=f,b=o.bottom):(d=o.left,m=u,p=o.right,b=f),i.beginPath(),a&&(d=Math.max(d,a.left),p=Math.min(p,a.right),m=Math.max(m,a.top),b=Math.min(b,a.bottom)),i.rect(d,m,p-d,b-m),i.clip()}}function Cp(i,e,a,s){const o=e.interpolate(a,s);o&&i.lineTo(o.x,o.y)}var r2={id:"filler",afterDatasetsUpdate(i,e,a){const s=(i.data.datasets||[]).length,o=[];let c,u,f,d;for(u=0;u<s;++u)c=i.getDatasetMeta(u),f=c.dataset,d=null,f&&f.options&&f instanceof Wo&&(d={visible:i.isDatasetVisible(u),index:u,fill:ZS(f,u,s),chart:i,axis:c.controller.options.indexAxis,scale:c.vScale,line:f}),c.$filler=d,o.push(d);for(u=0;u<s;++u)d=o[u],!(!d||d.fill===!1)&&(d.fill=QS(o,u,a.propagate))},beforeDraw(i,e,a){const s=a.drawTime==="beforeDraw",o=i.getSortedVisibleDatasetMetas(),c=i.chartArea;for(let u=o.length-1;u>=0;--u){const f=o[u].$filler;f&&(f.line.updateControlPoints(c,f.axis),s&&f.fill&&ju(i.ctx,f,c))}},beforeDatasetsDraw(i,e,a){if(a.drawTime!=="beforeDatasetsDraw")return;const s=i.getSortedVisibleDatasetMetas();for(let o=s.length-1;o>=0;--o){const c=s[o].$filler;Ap(c)&&ju(i.ctx,c,i.chartArea)}},beforeDatasetDraw(i,e,a){const s=e.meta.$filler;!Ap(s)||a.drawTime!=="beforeDatasetDraw"||ju(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const zp=(i,e)=>{let{boxHeight:a=e,boxWidth:s=e}=i;return i.usePointStyle&&(a=Math.min(a,e),s=i.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:a,itemHeight:Math.max(e,a)}},c2=(i,e)=>i!==null&&e!==null&&i.datasetIndex===e.datasetIndex&&i.index===e.index;class Rp extends jn{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,a,s){this.maxWidth=e,this.maxHeight=a,this._margins=s,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 a=jt(e.generateLabels,[this.chart],this)||[];e.filter&&(a=a.filter(s=>e.filter(s,this.chart.data))),e.sort&&(a=a.sort((s,o)=>e.sort(s,o,this.chart.data))),this.options.reverse&&a.reverse(),this.legendItems=a}fit(){const{options:e,ctx:a}=this;if(!e.display){this.width=this.height=0;return}const s=e.labels,o=re(s.font),c=o.size,u=this._computeTitleHeight(),{boxWidth:f,itemHeight:d}=zp(s,c);let m,p;a.font=o.string,this.isHorizontal()?(m=this.maxWidth,p=this._fitRows(u,c,f,d)+10):(p=this.maxHeight,m=this._fitCols(u,o,f,d)+10),this.width=Math.min(m,e.maxWidth||this.maxWidth),this.height=Math.min(p,e.maxHeight||this.maxHeight)}_fitRows(e,a,s,o){const{ctx:c,maxWidth:u,options:{labels:{padding:f}}}=this,d=this.legendHitBoxes=[],m=this.lineWidths=[0],p=o+f;let b=e;c.textAlign="left",c.textBaseline="middle";let _=-1,x=-p;return this.legendItems.forEach((T,M)=>{const A=s+a/2+c.measureText(T.text).width;(M===0||m[m.length-1]+A+2*f>u)&&(b+=p,m[m.length-(M>0?0:1)]=0,x+=p,_++),d[M]={left:0,top:x,row:_,width:A,height:o},m[m.length-1]+=A+f}),b}_fitCols(e,a,s,o){const{ctx:c,maxHeight:u,options:{labels:{padding:f}}}=this,d=this.legendHitBoxes=[],m=this.columnSizes=[],p=u-e;let b=f,_=0,x=0,T=0,M=0;return this.legendItems.forEach((A,z)=>{const{itemWidth:H,itemHeight:Y}=u2(s,a,c,A,o);z>0&&x+Y+2*f>p&&(b+=_+f,m.push({width:_,height:x}),T+=_+f,M++,_=x=0),d[z]={left:T,top:x,col:M,width:H,height:Y},_=Math.max(_,H),x+=Y+f}),b+=_,m.push({width:_,height:x}),b}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:a,options:{align:s,labels:{padding:o},rtl:c}}=this,u=Ca(c,this.left,this.width);if(this.isHorizontal()){let f=0,d=ue(s,this.left+o,this.right-this.lineWidths[f]);for(const m of a)f!==m.row&&(f=m.row,d=ue(s,this.left+o,this.right-this.lineWidths[f])),m.top+=this.top+e+o,m.left=u.leftForLtr(u.x(d),m.width),d+=m.width+o}else{let f=0,d=ue(s,this.top+e+o,this.bottom-this.columnSizes[f].height);for(const m of a)m.col!==f&&(f=m.col,d=ue(s,this.top+e+o,this.bottom-this.columnSizes[f].height)),m.top=d,m.left+=this.left+o,m.left=u.leftForLtr(u.x(m.left),m.width),d+=m.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Go(e,this),this._draw(),Qo(e)}}_draw(){const{options:e,columnSizes:a,lineWidths:s,ctx:o}=this,{align:c,labels:u}=e,f=Gt.color,d=Ca(e.rtl,this.left,this.width),m=re(u.font),{padding:p}=u,b=m.size,_=b/2;let x;this.drawTitle(),o.textAlign=d.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=m.string;const{boxWidth:T,boxHeight:M,itemHeight:A}=zp(u,b),z=function(K,Q,F){if(isNaN(T)||T<=0||isNaN(M)||M<0)return;o.save();const tt=ht(F.lineWidth,1);if(o.fillStyle=ht(F.fillStyle,f),o.lineCap=ht(F.lineCap,"butt"),o.lineDashOffset=ht(F.lineDashOffset,0),o.lineJoin=ht(F.lineJoin,"miter"),o.lineWidth=tt,o.strokeStyle=ht(F.strokeStyle,f),o.setLineDash(ht(F.lineDash,[])),u.usePointStyle){const ct={radius:M*Math.SQRT2/2,pointStyle:F.pointStyle,rotation:F.rotation,borderWidth:tt},at=d.xPlus(K,T/2),it=Q+_;p0(o,ct,at,it,u.pointStyleWidth&&T)}else{const ct=Q+Math.max((b-M)/2,0),at=d.leftForLtr(K,T),it=Da(F.borderRadius);o.beginPath(),Object.values(it).some(kt=>kt!==0)?Vo(o,{x:at,y:ct,w:T,h:M,radius:it}):o.rect(at,ct,T,M),o.fill(),tt!==0&&o.stroke()}o.restore()},H=function(K,Q,F){Fs(o,F.text,K,Q+A/2,m,{strikethrough:F.hidden,textAlign:d.textAlign(F.textAlign)})},Y=this.isHorizontal(),G=this._computeTitleHeight();Y?x={x:ue(c,this.left+p,this.right-s[0]),y:this.top+p+G,line:0}:x={x:this.left+p,y:ue(c,this.top+G+p,this.bottom-a[0].height),line:0},T0(this.ctx,e.textDirection);const q=A+p;this.legendItems.forEach((K,Q)=>{o.strokeStyle=K.fontColor,o.fillStyle=K.fontColor;const F=o.measureText(K.text).width,tt=d.textAlign(K.textAlign||(K.textAlign=u.textAlign)),ct=T+_+F;let at=x.x,it=x.y;d.setWidth(this.width),Y?Q>0&&at+ct+p>this.right&&(it=x.y+=q,x.line++,at=x.x=ue(c,this.left+p,this.right-s[x.line])):Q>0&&it+q>this.bottom&&(at=x.x=at+a[x.line].width+p,x.line++,it=x.y=ue(c,this.top+G+p,this.bottom-a[x.line].height));const kt=d.x(at);if(z(kt,it,K),at=U_(tt,at+T+_,Y?at+ct:this.right,e.rtl),H(d.x(at),it,K),Y)x.x+=ct+p;else if(typeof K.text!="string"){const Vt=m.lineHeight;x.y+=W0(K,Vt)+p}else x.y+=q}),M0(this.ctx,e.textDirection)}drawTitle(){const e=this.options,a=e.title,s=re(a.font),o=Le(a.padding);if(!a.display)return;const c=Ca(e.rtl,this.left,this.width),u=this.ctx,f=a.position,d=s.size/2,m=o.top+d;let p,b=this.left,_=this.width;if(this.isHorizontal())_=Math.max(...this.lineWidths),p=this.top+m,b=ue(e.align,b,this.right-_);else{const T=this.columnSizes.reduce((M,A)=>Math.max(M,A.height),0);p=m+ue(e.align,this.top,this.bottom-T-e.labels.padding-this._computeTitleHeight())}const x=ue(f,b,b+_);u.textAlign=c.textAlign(sf(f)),u.textBaseline="middle",u.strokeStyle=a.color,u.fillStyle=a.color,u.font=s.string,Fs(u,a.text,x,p,s)}_computeTitleHeight(){const e=this.options.title,a=re(e.font),s=Le(e.padding);return e.display?a.lineHeight+s.height:0}_getLegendItemAt(e,a){let s,o,c;if(wn(e,this.left,this.right)&&wn(a,this.top,this.bottom)){for(c=this.legendHitBoxes,s=0;s<c.length;++s)if(o=c[s],wn(e,o.left,o.left+o.width)&&wn(a,o.top,o.top+o.height))return this.legendItems[s]}return null}handleEvent(e){const a=this.options;if(!d2(e.type,a))return;const s=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const o=this._hoveredItem,c=c2(o,s);o&&!c&&jt(a.onLeave,[e,o,this],this),this._hoveredItem=s,s&&!c&&jt(a.onHover,[e,s,this],this)}else s&&jt(a.onClick,[e,s,this],this)}}function u2(i,e,a,s,o){const c=f2(s,i,e,a),u=h2(o,s,e.lineHeight);return{itemWidth:c,itemHeight:u}}function f2(i,e,a,s){let o=i.text;return o&&typeof o!="string"&&(o=o.reduce((c,u)=>c.length>u.length?c:u)),e+a.size/2+s.measureText(o).width}function h2(i,e,a){let s=i;return typeof e.text!="string"&&(s=W0(e,a)),s}function W0(i,e){const a=i.text?i.text.length:0;return e*a}function d2(i,e){return!!((i==="mousemove"||i==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(i==="click"||i==="mouseup"))}var g2={id:"legend",_element:Rp,start(i,e,a){const s=i.legend=new Rp({ctx:i.ctx,options:a,chart:i});Fe.configure(i,s,a),Fe.addBox(i,s)},stop(i){Fe.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,e,a){const s=i.legend;Fe.configure(i,s,a),s.options=a},afterUpdate(i){const e=i.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(i,e){e.replay||i.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,e,a){const s=e.datasetIndex,o=a.chart;o.isDatasetVisible(s)?(o.hide(s),e.hidden=!0):(o.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const e=i.data.datasets,{labels:{usePointStyle:a,pointStyle:s,textAlign:o,color:c,useBorderRadius:u,borderRadius:f}}=i.legend.options;return i._getSortedDatasetMetas().map(d=>{const m=d.controller.getStyle(a?0:void 0),p=Le(m.borderWidth);return{text:e[d.index].label,fillStyle:m.backgroundColor,fontColor:c,hidden:!d.visible,lineCap:m.borderCapStyle,lineDash:m.borderDash,lineDashOffset:m.borderDashOffset,lineJoin:m.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:m.borderColor,pointStyle:s||m.pointStyle,rotation:m.rotation,textAlign:o||m.textAlign,borderRadius:u&&(f||m.borderRadius),datasetIndex:d.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class J0 extends jn{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,a){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=a;const o=Ft(s.text)?s.text.length:1;this._padding=Le(s.padding);const c=o*re(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=c:this.width=c}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:a,left:s,bottom:o,right:c,options:u}=this,f=u.align;let d=0,m,p,b;return this.isHorizontal()?(p=ue(f,s,c),b=a+e,m=c-s):(u.position==="left"?(p=s+e,b=ue(f,o,a),d=Ct*-.5):(p=c-e,b=ue(f,a,o),d=Ct*.5),m=o-a),{titleX:p,titleY:b,maxWidth:m,rotation:d}}draw(){const e=this.ctx,a=this.options;if(!a.display)return;const s=re(a.font),c=s.lineHeight/2+this._padding.top,{titleX:u,titleY:f,maxWidth:d,rotation:m}=this._drawArgs(c);Fs(e,a.text,0,0,s,{color:a.color,maxWidth:d,rotation:m,textAlign:sf(a.align),textBaseline:"middle",translation:[u,f]})}}function m2(i,e){const a=new J0({ctx:i.ctx,options:e,chart:i});Fe.configure(i,a,e),Fe.addBox(i,a),i.titleBlock=a}var p2={id:"title",_element:J0,start(i,e,a){m2(i,a)},stop(i){const e=i.titleBlock;Fe.removeBox(i,e),delete i.titleBlock},beforeUpdate(i,e,a){const s=i.titleBlock;Fe.configure(i,s,a),s.options=a},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 Hs={average(i){if(!i.length)return!1;let e,a,s=new Set,o=0,c=0;for(e=0,a=i.length;e<a;++e){const f=i[e].element;if(f&&f.hasValue()){const d=f.tooltipPosition();s.add(d.x),o+=d.y,++c}}return c===0||s.size===0?!1:{x:[...s].reduce((f,d)=>f+d)/s.size,y:o/c}},nearest(i,e){if(!i.length)return!1;let a=e.x,s=e.y,o=Number.POSITIVE_INFINITY,c,u,f;for(c=0,u=i.length;c<u;++c){const d=i[c].element;if(d&&d.hasValue()){const m=d.getCenterPoint(),p=Xu(e,m);p<o&&(o=p,f=d)}}if(f){const d=f.tooltipPosition();a=d.x,s=d.y}return{x:a,y:s}}};function an(i,e){return e&&(Ft(e)?Array.prototype.push.apply(i,e):i.push(e)),i}function Cn(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
10
+ `)>-1?i.split(`
11
+ `):i}function y2(i,e){const{element:a,datasetIndex:s,index:o}=e,c=i.getDatasetMeta(s).controller,{label:u,value:f}=c.getLabelAndValue(o);return{chart:i,label:u,parsed:c.getParsed(o),raw:i.data.datasets[s].data[o],formattedValue:f,dataset:c.getDataset(),dataIndex:o,datasetIndex:s,element:a}}function wp(i,e){const a=i.chart.ctx,{body:s,footer:o,title:c}=i,{boxWidth:u,boxHeight:f}=e,d=re(e.bodyFont),m=re(e.titleFont),p=re(e.footerFont),b=c.length,_=o.length,x=s.length,T=Le(e.padding);let M=T.height,A=0,z=s.reduce((G,q)=>G+q.before.length+q.lines.length+q.after.length,0);if(z+=i.beforeBody.length+i.afterBody.length,b&&(M+=b*m.lineHeight+(b-1)*e.titleSpacing+e.titleMarginBottom),z){const G=e.displayColors?Math.max(f,d.lineHeight):d.lineHeight;M+=x*G+(z-x)*d.lineHeight+(z-1)*e.bodySpacing}_&&(M+=e.footerMarginTop+_*p.lineHeight+(_-1)*e.footerSpacing);let H=0;const Y=function(G){A=Math.max(A,a.measureText(G).width+H)};return a.save(),a.font=m.string,At(i.title,Y),a.font=d.string,At(i.beforeBody.concat(i.afterBody),Y),H=e.displayColors?u+2+e.boxPadding:0,At(s,G=>{At(G.before,Y),At(G.lines,Y),At(G.after,Y)}),H=0,a.font=p.string,At(i.footer,Y),a.restore(),A+=T.width,{width:A,height:M}}function b2(i,e){const{y:a,height:s}=e;return a<s/2?"top":a>i.height-s/2?"bottom":"center"}function v2(i,e,a,s){const{x:o,width:c}=s,u=a.caretSize+a.caretPadding;if(i==="left"&&o+c+u>e.width||i==="right"&&o-c-u<0)return!0}function _2(i,e,a,s){const{x:o,width:c}=a,{width:u,chartArea:{left:f,right:d}}=i;let m="center";return s==="center"?m=o<=(f+d)/2?"left":"right":o<=c/2?m="left":o>=u-c/2&&(m="right"),v2(m,i,e,a)&&(m="center"),m}function Np(i,e,a){const s=a.yAlign||e.yAlign||b2(i,a);return{xAlign:a.xAlign||e.xAlign||_2(i,e,a,s),yAlign:s}}function x2(i,e){let{x:a,width:s}=i;return e==="right"?a-=s:e==="center"&&(a-=s/2),a}function S2(i,e,a){let{y:s,height:o}=i;return e==="top"?s+=a:e==="bottom"?s-=o+a:s-=o/2,s}function jp(i,e,a,s){const{caretSize:o,caretPadding:c,cornerRadius:u}=i,{xAlign:f,yAlign:d}=a,m=o+c,{topLeft:p,topRight:b,bottomLeft:_,bottomRight:x}=Da(u);let T=x2(e,f);const M=S2(e,d,m);return d==="center"?f==="left"?T+=m:f==="right"&&(T-=m):f==="left"?T-=Math.max(p,_)+o:f==="right"&&(T+=Math.max(b,x)+o),{x:Me(T,0,s.width-e.width),y:Me(M,0,s.height-e.height)}}function Oo(i,e,a){const s=Le(a.padding);return e==="center"?i.x+i.width/2:e==="right"?i.x+i.width-s.right:i.x+s.left}function kp(i){return an([],Cn(i))}function T2(i,e,a){return Vi(i,{tooltip:e,tooltipItems:a,type:"tooltip"})}function Lp(i,e){const a=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return a?i.override(a):i}const I0={beforeTitle:On,title(i){if(i.length>0){const e=i[0],a=e.chart.data.labels,s=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return a[e.dataIndex]}return""},afterTitle:On,beforeBody:On,beforeLabel:On,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let e=i.dataset.label||"";e&&(e+=": ");const a=i.formattedValue;return Tt(a)||(e+=a),e},labelColor(i){const a=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const a=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:On,afterBody:On,beforeFooter:On,footer:On,afterFooter:On};function xe(i,e,a,s){const o=i[e].call(a,s);return typeof o>"u"?I0[e].call(a,s):o}class Hp extends jn{static positioners=Hs;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 a=this.chart,s=this.options.setContext(this.getContext()),o=s.enabled&&a.options.animation&&s.animations,c=new C0(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(c)),c}getContext(){return this.$context||(this.$context=T2(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,a){const{callbacks:s}=a,o=xe(s,"beforeTitle",this,e),c=xe(s,"title",this,e),u=xe(s,"afterTitle",this,e);let f=[];return f=an(f,Cn(o)),f=an(f,Cn(c)),f=an(f,Cn(u)),f}getBeforeBody(e,a){return kp(xe(a.callbacks,"beforeBody",this,e))}getBody(e,a){const{callbacks:s}=a,o=[];return At(e,c=>{const u={before:[],lines:[],after:[]},f=Lp(s,c);an(u.before,Cn(xe(f,"beforeLabel",this,c))),an(u.lines,xe(f,"label",this,c)),an(u.after,Cn(xe(f,"afterLabel",this,c))),o.push(u)}),o}getAfterBody(e,a){return kp(xe(a.callbacks,"afterBody",this,e))}getFooter(e,a){const{callbacks:s}=a,o=xe(s,"beforeFooter",this,e),c=xe(s,"footer",this,e),u=xe(s,"afterFooter",this,e);let f=[];return f=an(f,Cn(o)),f=an(f,Cn(c)),f=an(f,Cn(u)),f}_createItems(e){const a=this._active,s=this.chart.data,o=[],c=[],u=[];let f=[],d,m;for(d=0,m=a.length;d<m;++d)f.push(y2(this.chart,a[d]));return e.filter&&(f=f.filter((p,b,_)=>e.filter(p,b,_,s))),e.itemSort&&(f=f.sort((p,b)=>e.itemSort(p,b,s))),At(f,p=>{const b=Lp(e.callbacks,p);o.push(xe(b,"labelColor",this,p)),c.push(xe(b,"labelPointStyle",this,p)),u.push(xe(b,"labelTextColor",this,p))}),this.labelColors=o,this.labelPointStyles=c,this.labelTextColors=u,this.dataPoints=f,f}update(e,a){const s=this.options.setContext(this.getContext()),o=this._active;let c,u=[];if(!o.length)this.opacity!==0&&(c={opacity:0});else{const f=Hs[s.position].call(this,o,this._eventPosition);u=this._createItems(s),this.title=this.getTitle(u,s),this.beforeBody=this.getBeforeBody(u,s),this.body=this.getBody(u,s),this.afterBody=this.getAfterBody(u,s),this.footer=this.getFooter(u,s);const d=this._size=wp(this,s),m=Object.assign({},f,d),p=Np(this.chart,s,m),b=jp(s,m,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,c={opacity:1,x:b.x,y:b.y,width:d.width,height:d.height,caretX:f.x,caretY:f.y}}this._tooltipItems=u,this.$context=void 0,c&&this._resolveAnimations().update(this,c),e&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(e,a,s,o){const c=this.getCaretPosition(e,s,o);a.lineTo(c.x1,c.y1),a.lineTo(c.x2,c.y2),a.lineTo(c.x3,c.y3)}getCaretPosition(e,a,s){const{xAlign:o,yAlign:c}=this,{caretSize:u,cornerRadius:f}=s,{topLeft:d,topRight:m,bottomLeft:p,bottomRight:b}=Da(f),{x:_,y:x}=e,{width:T,height:M}=a;let A,z,H,Y,G,q;return c==="center"?(G=x+M/2,o==="left"?(A=_,z=A-u,Y=G+u,q=G-u):(A=_+T,z=A+u,Y=G-u,q=G+u),H=A):(o==="left"?z=_+Math.max(d,p)+u:o==="right"?z=_+T-Math.max(m,b)-u:z=this.caretX,c==="top"?(Y=x,G=Y-u,A=z-u,H=z+u):(Y=x+M,G=Y+u,A=z+u,H=z-u),q=Y),{x1:A,x2:z,x3:H,y1:Y,y2:G,y3:q}}drawTitle(e,a,s){const o=this.title,c=o.length;let u,f,d;if(c){const m=Ca(s.rtl,this.x,this.width);for(e.x=Oo(this,s.titleAlign,s),a.textAlign=m.textAlign(s.titleAlign),a.textBaseline="middle",u=re(s.titleFont),f=s.titleSpacing,a.fillStyle=s.titleColor,a.font=u.string,d=0;d<c;++d)a.fillText(o[d],m.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+f,d+1===c&&(e.y+=s.titleMarginBottom-f)}}_drawColorBox(e,a,s,o,c){const u=this.labelColors[s],f=this.labelPointStyles[s],{boxHeight:d,boxWidth:m}=c,p=re(c.bodyFont),b=Oo(this,"left",c),_=o.x(b),x=d<p.lineHeight?(p.lineHeight-d)/2:0,T=a.y+x;if(c.usePointStyle){const M={radius:Math.min(m,d)/2,pointStyle:f.pointStyle,rotation:f.rotation,borderWidth:1},A=o.leftForLtr(_,m)+m/2,z=T+d/2;e.strokeStyle=c.multiKeyBackground,e.fillStyle=c.multiKeyBackground,Zu(e,M,A,z),e.strokeStyle=u.borderColor,e.fillStyle=u.backgroundColor,Zu(e,M,A,z)}else{e.lineWidth=pt(u.borderWidth)?Math.max(...Object.values(u.borderWidth)):u.borderWidth||1,e.strokeStyle=u.borderColor,e.setLineDash(u.borderDash||[]),e.lineDashOffset=u.borderDashOffset||0;const M=o.leftForLtr(_,m),A=o.leftForLtr(o.xPlus(_,1),m-2),z=Da(u.borderRadius);Object.values(z).some(H=>H!==0)?(e.beginPath(),e.fillStyle=c.multiKeyBackground,Vo(e,{x:M,y:T,w:m,h:d,radius:z}),e.fill(),e.stroke(),e.fillStyle=u.backgroundColor,e.beginPath(),Vo(e,{x:A,y:T+1,w:m-2,h:d-2,radius:z}),e.fill()):(e.fillStyle=c.multiKeyBackground,e.fillRect(M,T,m,d),e.strokeRect(M,T,m,d),e.fillStyle=u.backgroundColor,e.fillRect(A,T+1,m-2,d-2))}e.fillStyle=this.labelTextColors[s]}drawBody(e,a,s){const{body:o}=this,{bodySpacing:c,bodyAlign:u,displayColors:f,boxHeight:d,boxWidth:m,boxPadding:p}=s,b=re(s.bodyFont);let _=b.lineHeight,x=0;const T=Ca(s.rtl,this.x,this.width),M=function(F){a.fillText(F,T.x(e.x+x),e.y+_/2),e.y+=_+c},A=T.textAlign(u);let z,H,Y,G,q,K,Q;for(a.textAlign=u,a.textBaseline="middle",a.font=b.string,e.x=Oo(this,A,s),a.fillStyle=s.bodyColor,At(this.beforeBody,M),x=f&&A!=="right"?u==="center"?m/2+p:m+2+p:0,G=0,K=o.length;G<K;++G){for(z=o[G],H=this.labelTextColors[G],a.fillStyle=H,At(z.before,M),Y=z.lines,f&&Y.length&&(this._drawColorBox(a,e,G,T,s),_=Math.max(b.lineHeight,d)),q=0,Q=Y.length;q<Q;++q)M(Y[q]),_=b.lineHeight;At(z.after,M)}x=0,_=b.lineHeight,At(this.afterBody,M),e.y-=c}drawFooter(e,a,s){const o=this.footer,c=o.length;let u,f;if(c){const d=Ca(s.rtl,this.x,this.width);for(e.x=Oo(this,s.footerAlign,s),e.y+=s.footerMarginTop,a.textAlign=d.textAlign(s.footerAlign),a.textBaseline="middle",u=re(s.footerFont),a.fillStyle=s.footerColor,a.font=u.string,f=0;f<c;++f)a.fillText(o[f],d.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+s.footerSpacing}}drawBackground(e,a,s,o){const{xAlign:c,yAlign:u}=this,{x:f,y:d}=e,{width:m,height:p}=s,{topLeft:b,topRight:_,bottomLeft:x,bottomRight:T}=Da(o.cornerRadius);a.fillStyle=o.backgroundColor,a.strokeStyle=o.borderColor,a.lineWidth=o.borderWidth,a.beginPath(),a.moveTo(f+b,d),u==="top"&&this.drawCaret(e,a,s,o),a.lineTo(f+m-_,d),a.quadraticCurveTo(f+m,d,f+m,d+_),u==="center"&&c==="right"&&this.drawCaret(e,a,s,o),a.lineTo(f+m,d+p-T),a.quadraticCurveTo(f+m,d+p,f+m-T,d+p),u==="bottom"&&this.drawCaret(e,a,s,o),a.lineTo(f+x,d+p),a.quadraticCurveTo(f,d+p,f,d+p-x),u==="center"&&c==="left"&&this.drawCaret(e,a,s,o),a.lineTo(f,d+b),a.quadraticCurveTo(f,d,f+b,d),a.closePath(),a.fill(),o.borderWidth>0&&a.stroke()}_updateAnimationTarget(e){const a=this.chart,s=this.$animations,o=s&&s.x,c=s&&s.y;if(o||c){const u=Hs[e.position].call(this,this._active,this._eventPosition);if(!u)return;const f=this._size=wp(this,e),d=Object.assign({},u,this._size),m=Np(a,e,d),p=jp(e,d,m,a);(o._to!==p.x||c._to!==p.y)&&(this.xAlign=m.xAlign,this.yAlign=m.yAlign,this.width=f.width,this.height=f.height,this.caretX=u.x,this.caretY=u.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(e){const a=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(a);const o={width:this.width,height:this.height},c={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const u=Le(a.padding),f=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&f&&(e.save(),e.globalAlpha=s,this.drawBackground(c,e,o,a),T0(e,a.textDirection),c.y+=u.top,this.drawTitle(c,e,a),this.drawBody(c,e,a),this.drawFooter(c,e,a),M0(e,a.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,a){const s=this._active,o=e.map(({datasetIndex:f,index:d})=>{const m=this.chart.getDatasetMeta(f);if(!m)throw new Error("Cannot find a dataset at index "+f);return{datasetIndex:f,element:m.data[d],index:d}}),c=!Lo(s,o),u=this._positionChanged(o,a);(c||u)&&(this._active=o,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,a,s=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,c=this._active||[],u=this._getActiveElements(e,c,a,s),f=this._positionChanged(u,e),d=a||!Lo(u,c)||f;return d&&(this._active=u,(o.enabled||o.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,a))),d}_getActiveElements(e,a,s,o){const c=this.options;if(e.type==="mouseout")return[];if(!o)return a.filter(f=>this.chart.data.datasets[f.datasetIndex]&&this.chart.getDatasetMeta(f.datasetIndex).controller.getParsed(f.index)!==void 0);const u=this.chart.getElementsAtEventForMode(e,c.mode,c,s);return c.reverse&&u.reverse(),u}_positionChanged(e,a){const{caretX:s,caretY:o,options:c}=this,u=Hs[c.position].call(this,e,a);return u!==!1&&(s!==u.x||o!==u.y)}}var M2={id:"tooltip",_element:Hp,positioners:Hs,afterInit(i,e,a){a&&(i.tooltip=new Hp({chart:i,options:a}))},beforeUpdate(i,e,a){i.tooltip&&i.tooltip.initialize(a)},reset(i,e,a){i.tooltip&&i.tooltip.initialize(a)},afterDraw(i){const e=i.tooltip;if(e&&e._willRender()){const a={tooltip:e};if(i.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;e.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",a)}},afterEvent(i,e){if(i.tooltip){const a=e.replay;i.tooltip.handleEvent(e.event,a,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:(i,e)=>e.bodyFont.size,boxWidth:(i,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:I0},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const E2=(i,e,a,s)=>(typeof e=="string"?(a=i.push(e)-1,s.unshift({index:a,label:e})):isNaN(e)&&(a=null),a);function A2(i,e,a,s){const o=i.indexOf(e);if(o===-1)return E2(i,e,a,s);const c=i.lastIndexOf(e);return o!==c?a:o}const O2=(i,e)=>i===null?null:Me(Math.round(i),0,e);function Bp(i){const e=this.getLabels();return i>=0&&i<e.length?e[i]:i}class D2 extends Na{static id="category";static defaults={ticks:{callback:Bp}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const a=this._addedLabels;if(a.length){const s=this.getLabels();for(const{index:o,label:c}of a)s[o]===c&&s.splice(o,1);this._addedLabels=[]}super.init(e)}parse(e,a){if(Tt(e))return null;const s=this.getLabels();return a=isFinite(a)&&s[a]===e?a:A2(s,e,ht(a,e),this._addedLabels),O2(a,s.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:a}=this.getUserBounds();let{min:s,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(s=0),a||(o=this.getLabels().length-1)),this.min=s,this.max=o}buildTicks(){const e=this.min,a=this.max,s=this.options.offset,o=[];let c=this.getLabels();c=e===0&&a===c.length-1?c:c.slice(e,a+1),this._valueRange=Math.max(c.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let u=e;u<=a;u++)o.push({value:u});return o}getLabelForValue(e){return Bp.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 a=this.ticks;return e<0||e>a.length-1?null:this.getPixelForValue(a[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function C2(i,e){const a=[],{bounds:o,step:c,min:u,max:f,precision:d,count:m,maxTicks:p,maxDigits:b,includeBounds:_}=i,x=c||1,T=p-1,{min:M,max:A}=e,z=!Tt(u),H=!Tt(f),Y=!Tt(m),G=(A-M)/(b+1);let q=jm((A-M)/T/x)*x,K,Q,F,tt;if(q<1e-14&&!z&&!H)return[{value:M},{value:A}];tt=Math.ceil(A/q)-Math.floor(M/q),tt>T&&(q=jm(tt*q/T/x)*x),Tt(d)||(K=Math.pow(10,d),q=Math.ceil(q*K)/K),o==="ticks"?(Q=Math.floor(M/q)*q,F=Math.ceil(A/q)*q):(Q=M,F=A),z&&H&&c&&z_((f-u)/c,q/1e3)?(tt=Math.round(Math.min((f-u)/q,p)),q=(f-u)/tt,Q=u,F=f):Y?(Q=z?u:Q,F=H?f:F,tt=m-1,q=(F-Q)/tt):(tt=(F-Q)/q,Us(tt,Math.round(tt),q/1e3)?tt=Math.round(tt):tt=Math.ceil(tt));const ct=Math.max(km(q),km(Q));K=Math.pow(10,Tt(d)?ct:d),Q=Math.round(Q*K)/K,F=Math.round(F*K)/K;let at=0;for(z&&(_&&Q!==u?(a.push({value:u}),Q<u&&at++,Us(Math.round((Q+at*q)*K)/K,u,Up(u,G,i))&&at++):Q<u&&at++);at<tt;++at){const it=Math.round((Q+at*q)*K)/K;if(H&&it>f)break;a.push({value:it})}return H&&_&&F!==f?a.length&&Us(a[a.length-1].value,f,Up(f,G,i))?a[a.length-1].value=f:a.push({value:f}):(!H||F===f)&&a.push({value:F}),a}function Up(i,e,{horizontal:a,minRotation:s}){const o=Rn(s),c=(a?Math.sin(o):Math.cos(o))||.001,u=.75*e*(""+i).length;return Math.min(e/c,u)}class z2 extends Na{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,a){return Tt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:a,maxDefined:s}=this.getUserBounds();let{min:o,max:c}=this;const u=d=>o=a?o:d,f=d=>c=s?c:d;if(e){const d=ln(o),m=ln(c);d<0&&m<0?f(0):d>0&&m>0&&u(0)}if(o===c){let d=c===0?1:Math.abs(c*.05);f(c+d),e||u(o-d)}this.min=o,this.max=c}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:a,stepSize:s}=e,o;return s?(o=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),a=a||11),a&&(o=Math.min(a,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,a=e.ticks;let s=this.getTickLimit();s=Math.max(2,s);const o={maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},c=this._range||this,u=C2(o,c);return e.bounds==="ticks"&&R_(u,this,"value"),e.reverse?(u.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),u}configure(){const e=this.ticks;let a=this.min,s=this.max;if(super.configure(),this.options.offset&&e.length){const o=(s-a)/Math.max(e.length-1,1)/2;a-=o,s+=o}this._startValue=a,this._endValue=s,this._valueRange=s-a}getLabelForValue(e){return of(e,this.chart.options.locale,this.options.ticks.format)}}class R2 extends z2{static id="linear";static defaults={ticks:{callback:m0.formatters.numeric}};determineDataLimits(){const{min:e,max:a}=this.getMinMax(!0);this.min=fe(e)?e:0,this.max=fe(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),a=e?this.width:this.height,s=Rn(this.options.ticks.minRotation),o=(e?Math.sin(s):Math.cos(s))||.001,c=this._resolveTickFontOptions(0);return Math.ceil(a/Math.min(40,c.lineHeight/o))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Io={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}},Te=Object.keys(Io);function Vp(i,e){return i-e}function Yp(i,e){if(Tt(e))return null;const a=i._adapter,{parser:s,round:o,isoWeekday:c}=i._parseOpts;let u=e;return typeof s=="function"&&(u=s(u)),fe(u)||(u=typeof s=="string"?a.parse(u,s):a.parse(u)),u===null?null:(o&&(u=o==="week"&&(Uo(c)||c===!0)?a.startOf(u,"isoWeek",c):a.startOf(u,o)),+u)}function qp(i,e,a,s){const o=Te.length;for(let c=Te.indexOf(i);c<o-1;++c){const u=Io[Te[c]],f=u.steps?u.steps:Number.MAX_SAFE_INTEGER;if(u.common&&Math.ceil((a-e)/(f*u.size))<=s)return Te[c]}return Te[o-1]}function w2(i,e,a,s,o){for(let c=Te.length-1;c>=Te.indexOf(a);c--){const u=Te[c];if(Io[u].common&&i._adapter.diff(o,s,u)>=e-1)return u}return Te[a?Te.indexOf(a):0]}function N2(i){for(let e=Te.indexOf(i)+1,a=Te.length;e<a;++e)if(Io[Te[e]].common)return Te[e]}function Xp(i,e,a){if(!a)i[e]=!0;else if(a.length){const{lo:s,hi:o}=af(a,e),c=a[s]>=e?a[s]:a[o];i[c]=!0}}function j2(i,e,a,s){const o=i._adapter,c=+o.startOf(e[0].value,s),u=e[e.length-1].value;let f,d;for(f=c;f<=u;f=+o.add(f,1,s))d=a[f],d>=0&&(e[d].major=!0);return e}function Gp(i,e,a){const s=[],o={},c=e.length;let u,f;for(u=0;u<c;++u)f=e[u],o[f]=u,s.push({value:f,major:!1});return c===0||!a?s:j2(i,s,o,a)}class Qp extends Na{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};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,a={}){const s=e.time||(e.time={}),o=this._adapter=new g1._date(e.adapters.date);o.init(a),Bs(s.displayFormats,o.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(e),this._normalized=a.normalized}parse(e,a){return e===void 0?null:Yp(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,a=this._adapter,s=e.time.unit||"day";let{min:o,max:c,minDefined:u,maxDefined:f}=this.getUserBounds();function d(m){!u&&!isNaN(m.min)&&(o=Math.min(o,m.min)),!f&&!isNaN(m.max)&&(c=Math.max(c,m.max))}(!u||!f)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),o=fe(o)&&!isNaN(o)?o:+a.startOf(Date.now(),s),c=fe(c)&&!isNaN(c)?c:+a.endOf(Date.now(),s)+1,this.min=Math.min(o,c-1),this.max=Math.max(o+1,c)}_getLabelBounds(){const e=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return e.length&&(a=e[0],s=e[e.length-1]),{min:a,max:s}}buildTicks(){const e=this.options,a=e.time,s=e.ticks,o=s.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const c=this.min,u=this.max,f=L_(o,c,u);return this._unit=a.unit||(s.autoSkip?qp(a.minUnit,this.min,this.max,this._getLabelCapacity(c)):w2(this,f.length,a.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:N2(this._unit),this.initOffsets(o),e.reverse&&f.reverse(),Gp(this,f,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let a=0,s=0,o,c;this.options.offset&&e.length&&(o=this.getDecimalForValue(e[0]),e.length===1?a=1-o:a=(this.getDecimalForValue(e[1])-o)/2,c=this.getDecimalForValue(e[e.length-1]),e.length===1?s=c:s=(c-this.getDecimalForValue(e[e.length-2]))/2);const u=e.length<3?.5:.25;a=Me(a,0,u),s=Me(s,0,u),this._offsets={start:a,end:s,factor:1/(a+1+s)}}_generate(){const e=this._adapter,a=this.min,s=this.max,o=this.options,c=o.time,u=c.unit||qp(c.minUnit,a,s,this._getLabelCapacity(a)),f=ht(o.ticks.stepSize,1),d=u==="week"?c.isoWeekday:!1,m=Uo(d)||d===!0,p={};let b=a,_,x;if(m&&(b=+e.startOf(b,"isoWeek",d)),b=+e.startOf(b,m?"day":u),e.diff(s,a,u)>1e5*f)throw new Error(a+" and "+s+" are too far apart with stepSize of "+f+" "+u);const T=o.ticks.source==="data"&&this.getDataTimestamps();for(_=b,x=0;_<s;_=+e.add(_,f,u),x++)Xp(p,_,T);return(_===s||o.bounds==="ticks"||x===1)&&Xp(p,_,T),Object.keys(p).sort(Vp).map(M=>+M)}getLabelForValue(e){const a=this._adapter,s=this.options.time;return s.tooltipFormat?a.format(e,s.tooltipFormat):a.format(e,s.displayFormats.datetime)}format(e,a){const o=this.options.time.displayFormats,c=this._unit,u=a||o[c];return this._adapter.format(e,u)}_tickFormatFunction(e,a,s,o){const c=this.options,u=c.ticks.callback;if(u)return jt(u,[e,a,s],this);const f=c.time.displayFormats,d=this._unit,m=this._majorUnit,p=d&&f[d],b=m&&f[m],_=s[a],x=m&&b&&_&&_.major;return this._adapter.format(e,o||(x?b:p))}generateTickLabels(e){let a,s,o;for(a=0,s=e.length;a<s;++a)o=e[a],o.label=this._tickFormatFunction(o.value,a,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const a=this._offsets,s=this.getDecimalForValue(e);return this.getPixelForDecimal((a.start+s)*a.factor)}getValueForPixel(e){const a=this._offsets,s=this.getDecimalForPixel(e)/a.factor-a.end;return this.min+s*(this.max-this.min)}_getLabelSize(e){const a=this.options.ticks,s=this.ctx.measureText(e).width,o=Rn(this.isHorizontal()?a.maxRotation:a.minRotation),c=Math.cos(o),u=Math.sin(o),f=this._resolveTickFontOptions(0).size;return{w:s*c+f*u,h:s*u+f*c}}_getLabelCapacity(e){const a=this.options.time,s=a.displayFormats,o=s[a.unit]||s.millisecond,c=this._tickFormatFunction(e,0,Gp(this,[e],this._majorUnit),o),u=this._getLabelSize(c),f=Math.floor(this.isHorizontal()?this.width/u.w:this.height/u.h)-1;return f>0?f:1}getDataTimestamps(){let e=this._cache.data||[],a,s;if(e.length)return e;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(a=0,s=o.length;a<s;++a)e=e.concat(o[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let a,s;if(e.length)return e;const o=this.getLabels();for(a=0,s=o.length;a<s;++a)e.push(Yp(this,o[a]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return h0(e.sort(Vp))}}function Do(i,e,a){let s=0,o=i.length-1,c,u,f,d;a?(e>=i[s].pos&&e<=i[o].pos&&({lo:s,hi:o}=Gu(i,"pos",e)),{pos:c,time:f}=i[s],{pos:u,time:d}=i[o]):(e>=i[s].time&&e<=i[o].time&&({lo:s,hi:o}=Gu(i,"time",e)),{time:c,pos:f}=i[s],{time:u,pos:d}=i[o]);const m=u-c;return m?f+(d-f)*(e-c)/m:f}class hM extends Qp{static id="timeseries";static defaults=Qp.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(e);this._minPos=Do(a,this.min),this._tableRange=Do(a,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:a,max:s}=this,o=[],c=[];let u,f,d,m,p;for(u=0,f=e.length;u<f;++u)m=e[u],m>=a&&m<=s&&o.push(m);if(o.length<2)return[{time:a,pos:0},{time:s,pos:1}];for(u=0,f=o.length;u<f;++u)p=o[u+1],d=o[u-1],m=o[u],Math.round((p+d)/2)!==m&&c.push({time:m,pos:u/(f-1)});return c}_generate(){const e=this.min,a=this.max;let s=super.getDataTimestamps();return(!s.includes(e)||!s.length)&&s.splice(0,0,e),(!s.includes(a)||s.length===1)&&s.push(a),s.sort((o,c)=>o-c)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const a=this.getDataTimestamps(),s=this.getLabelTimestamps();return a.length&&s.length?e=this.normalize(a.concat(s)):e=a.length?a:s,e=this._cache.all=e,e}getDecimalForValue(e){return(Do(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const a=this._offsets,s=this.getDecimalForPixel(e)/a.factor-a.end;return Do(this._table,s*this._tableRange+this._minPos,!0)}}var Zp=(function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var i=window.screen;if(i)return(i.deviceXDPI||1)/(i.logicalXDPI||1)}return 1})(),qs={toTextLines:function(i){var e=[],a;for(i=[].concat(i);i.length;)a=i.pop(),typeof a=="string"?e.unshift.apply(e,a.split(`
12
+ `)):Array.isArray(a)?i.push.apply(i,a):Tt(i)||e.unshift(""+a);return e},textSize:function(i,e,a){var s=[].concat(e),o=s.length,c=i.font,u=0,f;for(i.font=a.string,f=0;f<o;++f)u=Math.max(i.measureText(s[f]).width,u);return i.font=c,{height:o*a.lineHeight,width:u}},bound:function(i,e,a){return Math.max(i,Math.min(e,a))},arrayDiff:function(i,e){var a=i.slice(),s=[],o,c,u,f;for(o=0,u=e.length;o<u;++o)f=e[o],c=a.indexOf(f),c===-1?s.push([f,1]):a.splice(c,1);for(o=0,u=a.length;o<u;++o)s.push([a[o],-1]);return s},rasterize:function(i){return Math.round(i*Zp)/Zp}};function Lu(i,e){var a=e.x,s=e.y;if(a===null)return{x:0,y:-1};if(s===null)return{x:1,y:0};var o=i.x-a,c=i.y-s,u=Math.sqrt(o*o+c*c);return{x:u?o/u:0,y:u?c/u:-1}}function k2(i,e,a,s,o){switch(o){case"center":a=s=0;break;case"bottom":a=0,s=1;break;case"right":a=1,s=0;break;case"left":a=-1,s=0;break;case"top":a=0,s=-1;break;case"start":a=-a,s=-s;break;case"end":break;default:o*=Math.PI/180,a=Math.cos(o),s=Math.sin(o);break}return{x:i,y:e,vx:a,vy:s}}var L2=0,$0=1,P0=2,ty=4,ey=8;function Co(i,e,a){var s=L2;return i<a.left?s|=$0:i>a.right&&(s|=P0),e<a.top?s|=ey:e>a.bottom&&(s|=ty),s}function H2(i,e){for(var a=i.x0,s=i.y0,o=i.x1,c=i.y1,u=Co(a,s,e),f=Co(o,c,e),d,m,p;!(!(u|f)||u&f);)d=u||f,d&ey?(m=a+(o-a)*(e.top-s)/(c-s),p=e.top):d&ty?(m=a+(o-a)*(e.bottom-s)/(c-s),p=e.bottom):d&P0?(p=s+(c-s)*(e.right-a)/(o-a),m=e.right):d&$0&&(p=s+(c-s)*(e.left-a)/(o-a),m=e.left),d===u?(a=m,s=p,u=Co(a,s,e)):(o=m,c=p,f=Co(o,c,e));return{x0:a,x1:o,y0:s,y1:c}}function zo(i,e){var a=e.anchor,s=i,o,c;return e.clamp&&(s=H2(s,e.area)),a==="start"?(o=s.x0,c=s.y0):a==="end"?(o=s.x1,c=s.y1):(o=(s.x0+s.x1)/2,c=(s.y0+s.y1)/2),k2(o,c,i.vx,i.vy,e.align)}var Ro={arc:function(i,e){var a=(i.startAngle+i.endAngle)/2,s=Math.cos(a),o=Math.sin(a),c=i.innerRadius,u=i.outerRadius;return zo({x0:i.x+s*c,y0:i.y+o*c,x1:i.x+s*u,y1:i.y+o*u,vx:s,vy:o},e)},point:function(i,e){var a=Lu(i,e.origin),s=a.x*i.options.radius,o=a.y*i.options.radius;return zo({x0:i.x-s,y0:i.y-o,x1:i.x+s,y1:i.y+o,vx:a.x,vy:a.y},e)},bar:function(i,e){var a=Lu(i,e.origin),s=i.x,o=i.y,c=0,u=0;return i.horizontal?(s=Math.min(i.x,i.base),c=Math.abs(i.base-i.x)):(o=Math.min(i.y,i.base),u=Math.abs(i.base-i.y)),zo({x0:s,y0:o+u,x1:s+c,y1:o,vx:a.x,vy:a.y},e)},fallback:function(i,e){var a=Lu(i,e.origin);return zo({x0:i.x,y0:i.y,x1:i.x+(i.width||0),y1:i.y+(i.height||0),vx:a.x,vy:a.y},e)}},Nn=qs.rasterize;function B2(i){var e=i.borderWidth||0,a=i.padding,s=i.size.height,o=i.size.width,c=-o/2,u=-s/2;return{frame:{x:c-a.left-e,y:u-a.top-e,w:o+a.width+e*2,h:s+a.height+e*2},text:{x:c,y:u,w:o,h:s}}}function U2(i,e){var a=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!a)return null;if(a.xCenter!==void 0&&a.yCenter!==void 0)return{x:a.xCenter,y:a.yCenter};var s=a.getBasePixel();return i.horizontal?{x:s,y:null}:{x:null,y:s}}function V2(i){return i instanceof Y0?Ro.arc:i instanceof G0?Ro.point:i instanceof Z0?Ro.bar:Ro.fallback}function Y2(i,e,a,s,o,c){var u=Math.PI/2;if(c){var f=Math.min(c,o/2,s/2),d=e+f,m=a+f,p=e+s-f,b=a+o-f;i.moveTo(e,m),d<p&&m<b?(i.arc(d,m,f,-Math.PI,-u),i.arc(p,m,f,-u,0),i.arc(p,b,f,0,u),i.arc(d,b,f,u,Math.PI)):d<p?(i.moveTo(d,a),i.arc(p,m,f,-u,u),i.arc(d,m,f,u,Math.PI+u)):m<b?(i.arc(d,m,f,-Math.PI,0),i.arc(d,b,f,0,Math.PI)):i.arc(d,m,f,-Math.PI,Math.PI),i.closePath(),i.moveTo(e,a)}else i.rect(e,a,s,o)}function q2(i,e,a){var s=a.backgroundColor,o=a.borderColor,c=a.borderWidth;!s&&(!o||!c)||(i.beginPath(),Y2(i,Nn(e.x)+c/2,Nn(e.y)+c/2,Nn(e.w)-c,Nn(e.h)-c,a.borderRadius),i.closePath(),s&&(i.fillStyle=s,i.fill()),o&&c&&(i.strokeStyle=o,i.lineWidth=c,i.lineJoin="miter",i.stroke()))}function X2(i,e,a){var s=a.lineHeight,o=i.w,c=i.x,u=i.y+s/2;return e==="center"?c+=o/2:(e==="end"||e==="right")&&(c+=o),{h:s,w:o,x:c,y:u}}function G2(i,e,a){var s=i.shadowBlur,o=a.stroked,c=Nn(a.x),u=Nn(a.y),f=Nn(a.w);o&&i.strokeText(e,c,u,f),a.filled&&(s&&o&&(i.shadowBlur=0),i.fillText(e,c,u,f),s&&o&&(i.shadowBlur=s))}function Q2(i,e,a,s){var o=s.textAlign,c=s.color,u=!!c,f=s.font,d=e.length,m=s.textStrokeColor,p=s.textStrokeWidth,b=m&&p,_;if(!(!d||!u&&!b))for(a=X2(a,o,f),i.font=f.string,i.textAlign=o,i.textBaseline="middle",i.shadowBlur=s.textShadowBlur,i.shadowColor=s.textShadowColor,u&&(i.fillStyle=c),b&&(i.lineJoin="round",i.lineWidth=p,i.strokeStyle=m),_=0,d=e.length;_<d;++_)G2(i,e[_],{stroked:b,filled:u,w:a.w,x:a.x,y:a.y+a.h*_})}var ny=function(i,e,a,s){var o=this;o._config=i,o._index=s,o._model=null,o._rects=null,o._ctx=e,o._el=a};on(ny.prototype,{_modelize:function(i,e,a,s){var o=this,c=o._index,u=re(Ut([a.font,{}],s,c)),f=Ut([a.color,Gt.color],s,c);return{align:Ut([a.align,"center"],s,c),anchor:Ut([a.anchor,"center"],s,c),area:s.chart.chartArea,backgroundColor:Ut([a.backgroundColor,null],s,c),borderColor:Ut([a.borderColor,null],s,c),borderRadius:Ut([a.borderRadius,0],s,c),borderWidth:Ut([a.borderWidth,0],s,c),clamp:Ut([a.clamp,!1],s,c),clip:Ut([a.clip,!1],s,c),color:f,display:i,font:u,lines:e,offset:Ut([a.offset,4],s,c),opacity:Ut([a.opacity,1],s,c),origin:U2(o._el,s),padding:Le(Ut([a.padding,4],s,c)),positioner:V2(o._el),rotation:Ut([a.rotation,0],s,c)*(Math.PI/180),size:qs.textSize(o._ctx,e,u),textAlign:Ut([a.textAlign,"start"],s,c),textShadowBlur:Ut([a.textShadowBlur,0],s,c),textShadowColor:Ut([a.textShadowColor,f],s,c),textStrokeColor:Ut([a.textStrokeColor,f],s,c),textStrokeWidth:Ut([a.textStrokeWidth,0],s,c)}},update:function(i){var e=this,a=null,s=null,o=e._index,c=e._config,u,f,d,m=Ut([c.display,!0],i,o);m&&(u=i.dataset.data[o],f=ht(jt(c.formatter,[u,i]),u),d=Tt(f)?[]:qs.toTextLines(f),d.length&&(a=e._modelize(m,d,c,i),s=B2(a))),e._model=a,e._rects=s},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(i,e){var a=this,s=i.ctx,o=a._model,c=a._rects,u;this.visible()&&(s.save(),o.clip&&(u=o.area,s.beginPath(),s.rect(u.left,u.top,u.right-u.left,u.bottom-u.top),s.clip()),s.globalAlpha=qs.bound(0,o.opacity,1),s.translate(Nn(e.x),Nn(e.y)),s.rotate(o.rotation),q2(s,c.frame,o),Q2(s,o.lines,c.text,o),s.restore())}});var Z2=Number.MIN_SAFE_INTEGER||-9007199254740991,K2=Number.MAX_SAFE_INTEGER||9007199254740991;function js(i,e,a){var s=Math.cos(a),o=Math.sin(a),c=e.x,u=e.y;return{x:c+s*(i.x-c)-o*(i.y-u),y:u+o*(i.x-c)+s*(i.y-u)}}function Kp(i,e){var a=K2,s=Z2,o=e.origin,c,u,f,d,m;for(c=0;c<i.length;++c)u=i[c],f=u.x-o.x,d=u.y-o.y,m=e.vx*f+e.vy*d,a=Math.min(a,m),s=Math.max(s,m);return{min:a,max:s}}function wo(i,e){var a=e.x-i.x,s=e.y-i.y,o=Math.sqrt(a*a+s*s);return{vx:(e.x-i.x)/o,vy:(e.y-i.y)/o,origin:i,ln:o}}var iy=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};on(iy.prototype,{center:function(){var i=this._rect;return{x:i.x+i.w/2,y:i.y+i.h/2}},update:function(i,e,a){this._rotation=a,this._rect={x:e.x+i.x,y:e.y+i.y,w:e.w,h:e.h}},contains:function(i){var e=this,a=1,s=e._rect;return i=js(i,e.center(),-e._rotation),!(i.x<s.x-a||i.y<s.y-a||i.x>s.x+s.w+a*2||i.y>s.y+s.h+a*2)},intersects:function(i){var e=this._points(),a=i._points(),s=[wo(e[0],e[1]),wo(e[0],e[3])],o,c,u;for(this._rotation!==i._rotation&&s.push(wo(a[0],a[1]),wo(a[0],a[3])),o=0;o<s.length;++o)if(c=Kp(e,s[o]),u=Kp(a,s[o]),c.max<u.min||u.max<c.min)return!1;return!0},_points:function(){var i=this,e=i._rect,a=i._rotation,s=i.center();return[js({x:e.x,y:e.y},s,a),js({x:e.x+e.w,y:e.y},s,a),js({x:e.x+e.w,y:e.y+e.h},s,a),js({x:e.x,y:e.y+e.h},s,a)]}});function ay(i,e,a){var s=e.positioner(i,e),o=s.vx,c=s.vy;if(!o&&!c)return{x:s.x,y:s.y};var u=a.w,f=a.h,d=e.rotation,m=Math.abs(u/2*Math.cos(d))+Math.abs(f/2*Math.sin(d)),p=Math.abs(u/2*Math.sin(d))+Math.abs(f/2*Math.cos(d)),b=1/Math.max(Math.abs(o),Math.abs(c));return m*=o*b,p*=c*b,m+=e.offset*o,p+=e.offset*c,{x:s.x+m,y:s.y+p}}function F2(i,e){var a,s,o,c;for(a=i.length-1;a>=0;--a)for(o=i[a].$layout,s=a-1;s>=0&&o._visible;--s)c=i[s].$layout,c._visible&&o._box.intersects(c._box)&&e(o,c);return i}function W2(i){var e,a,s,o,c,u,f;for(e=0,a=i.length;e<a;++e)s=i[e],o=s.$layout,o._visible&&(f=new Proxy(s._el,{get:(d,m)=>d.getProps([m],!0)[m]}),c=s.geometry(),u=ay(f,s.model(),c),o._box.update(u,c,s.rotation()));return F2(i,function(d,m){var p=d._hidable,b=m._hidable;p&&b||b?m._visible=!1:p&&(d._visible=!1)})}var Xs={prepare:function(i){var e=[],a,s,o,c,u;for(a=0,o=i.length;a<o;++a)for(s=0,c=i[a].length;s<c;++s)u=i[a][s],e.push(u),u.$layout={_box:new iy,_hidable:!1,_visible:!0,_set:a,_idx:u._index};return e.sort(function(f,d){var m=f.$layout,p=d.$layout;return m._idx===p._idx?p._set-m._set:p._idx-m._idx}),this.update(e),e},update:function(i){var e=!1,a,s,o,c,u;for(a=0,s=i.length;a<s;++a)o=i[a],c=o.model(),u=o.$layout,u._hidable=c&&c.display==="auto",u._visible=o.visible(),e|=u._hidable;e&&W2(i)},lookup:function(i,e){var a,s;for(a=i.length-1;a>=0;--a)if(s=i[a].$layout,s&&s._visible&&s._box.contains(e))return i[a];return null},draw:function(i,e){var a,s,o,c,u,f;for(a=0,s=e.length;a<s;++a)o=e[a],c=o.$layout,c._visible&&(u=o.geometry(),f=ay(o._el,o.model(),u),c._box.update(f,u,o.rotation()),o.draw(i,f))}},J2=function(i){if(Tt(i))return null;var e=i,a,s,o;if(pt(i))if(!Tt(i.label))e=i.label;else if(!Tt(i.r))e=i.r;else for(e="",a=Object.keys(i),o=0,s=a.length;o<s;++o)e+=(o!==0?", ":"")+a[o]+": "+i[a[o]];return""+e},I2={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:J2,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},Se="$datalabels",sy="$default";function $2(i,e){var a=i.datalabels,s={},o=[],c,u;return a===!1?null:(a===!0&&(a={}),e=on({},[e,a]),c=e.labels||{},u=Object.keys(c),delete e.labels,u.length?u.forEach(function(f){c[f]&&o.push(on({},[e,c[f],{_key:f}]))}):o.push(e),s=o.reduce(function(f,d){return At(d.listeners||{},function(m,p){f[p]=f[p]||{},f[p][d._key||sy]=m}),delete d.listeners,f},{}),{labels:o,listeners:s})}function Iu(i,e,a,s){if(e){var o=a.$context,c=a.$groups,u;e[c._set]&&(u=e[c._set][c._key],u&&jt(u,[o,s])===!0&&(i[Se]._dirty=!0,a.update(o)))}}function P2(i,e,a,s,o){var c,u;!a&&!s||(a?s?a!==s&&(u=c=!0):u=!0:c=!0,u&&Iu(i,e.leave,a,o),c&&Iu(i,e.enter,s,o))}function tT(i,e){var a=i[Se],s=a._listeners,o,c;if(!(!s.enter&&!s.leave)){if(e.type==="mousemove")c=Xs.lookup(a._labels,e);else if(e.type!=="mouseout")return;o=a._hovered,a._hovered=c,P2(i,s,o,c,e)}}function eT(i,e){var a=i[Se],s=a._listeners.click,o=s&&Xs.lookup(a._labels,e);o&&Iu(i,s,o,e)}var nT={id:"datalabels",defaults:I2,beforeInit:function(i){i[Se]={_actives:[]}},beforeUpdate:function(i){var e=i[Se];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(i,e,a){var s=e.index,o=i[Se],c=o._datasets[s]=[],u=i.isDatasetVisible(s),f=i.data.datasets[s],d=$2(f,a),m=e.meta.data||[],p=i.ctx,b,_,x,T,M,A,z,H;for(p.save(),b=0,x=m.length;b<x;++b)if(z=m[b],z[Se]=[],u&&z&&i.getDataVisibility(b)&&!z.skip)for(_=0,T=d.labels.length;_<T;++_)M=d.labels[_],A=M._key,H=new ny(M,p,z,b),H.$groups={_set:s,_key:A||sy},H.$context={active:!1,chart:i,dataIndex:b,dataset:f,datasetIndex:s},H.update(H.$context),z[Se].push(H),c.push(H);p.restore(),on(o._listeners,d.listeners,{merger:function(Y,G,q){G[Y]=G[Y]||{},G[Y][e.index]=q[Y],o._listened=!0}})},afterUpdate:function(i){i[Se]._labels=Xs.prepare(i[Se]._datasets)},afterDatasetsDraw:function(i){Xs.draw(i,i[Se]._labels)},beforeEvent:function(i,e){if(i[Se]._listened){var a=e.event;switch(a.type){case"mousemove":case"mouseout":tT(i,a);break;case"click":eT(i,a);break}}},afterEvent:function(i){var e=i[Se],a=e._actives,s=e._actives=i.getActiveElements(),o=qs.arrayDiff(a,s),c,u,f,d,m,p,b;for(c=0,u=o.length;c<u;++c)if(m=o[c],m[1])for(b=m[0].element[Se]||[],f=0,d=b.length;f<d;++f)p=b[f],p.$context.active=m[1]===1,p.update(p.$context);(e._dirty||o.length)&&(Xs.update(e._labels),i.render()),delete e._dirty}};const Hu=1e3;function iT(){if(typeof window>"u")return"light";const i=localStorage.getItem("smart-edit-theme");return i==="dark"||i==="light"?i:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function aT(){return typeof window>"u"?!1:localStorage.getItem("smart-edit-sidebar-collapsed")==="true"}function ly(){return{searchKeyword:"",logLevels:new Set,toolNames:new Set}}const sT={logs:[],maxLogIdx:-1,toolNames:[],toolStats:null,theme:iT(),isStatsVisible:!1,connectionMode:"disconnected",activeProject:null,error:null,isLoading:!1,currentView:"logs",sidebarCollapsed:aT(),logFilter:ly(),currentSession:null,sessionHistory:[]};function lT(i,e){switch(e.type){case"SET_LOGS":return{...i,logs:e.logs.slice(-Hu),maxLogIdx:e.maxIdx};case"APPEND_LOG":{const a=[...i.logs,e.log];return{...i,logs:a.length>Hu?a.slice(-Hu):a,maxLogIdx:e.maxIdx}}case"SET_TOOL_NAMES":return{...i,toolNames:e.toolNames};case"SET_TOOL_STATS":return{...i,toolStats:e.stats};case"SET_THEME":return localStorage.setItem("smart-edit-theme",e.theme),document.documentElement.setAttribute("data-theme",e.theme),{...i,theme:e.theme};case"TOGGLE_STATS":return{...i,isStatsVisible:!i.isStatsVisible};case"SET_CONNECTION_MODE":return{...i,connectionMode:e.mode};case"SET_ACTIVE_PROJECT":return{...i,activeProject:e.project};case"SET_ERROR":return{...i,error:e.error};case"SET_LOADING":return{...i,isLoading:e.isLoading};case"CLEAR_LOGS":return{...i,logs:[],maxLogIdx:-1};case"SET_CURRENT_VIEW":return{...i,currentView:e.view};case"TOGGLE_SIDEBAR":{const a=!i.sidebarCollapsed;return localStorage.setItem("smart-edit-sidebar-collapsed",String(a)),{...i,sidebarCollapsed:a}}case"SET_LOG_FILTER":return{...i,logFilter:{...i.logFilter,...e.filter}};case"CLEAR_LOG_FILTERS":return{...i,logFilter:ly()};case"START_SESSION":return{...i,currentSession:e.session};case"END_SESSION":return i.currentSession?{...i,sessionHistory:[{...i.currentSession,endTime:new Date},...i.sessionHistory].slice(0,50),currentSession:null}:i;case"LOAD_SESSION_HISTORY":return{...i,sessionHistory:e.sessions};case"CLEAR_SESSION_HISTORY":return{...i,sessionHistory:[]};default:return i}}const oy=J.createContext(null);function oT({children:i}){const[e,a]=J.useReducer(lT,sT);return S.jsx(oy.Provider,{value:{state:e,dispatch:a},children:i})}function Yi(){const i=J.useContext(oy);if(!i)throw new Error("useDashboard must be used within a DashboardProvider");return i}function rn(){return Yi().state}function ry(){return Yi().dispatch}async function Fp(i=0){const e=await fetch("/get_log_messages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({start_idx:i})});if(!e.ok)throw new Error(`Failed to fetch logs: ${e.statusText}`);return e.json()}async function Wp(){const i=await fetch("/get_tool_names");if(!i.ok)throw new Error(`Failed to fetch tool names: ${i.statusText}`);return(await i.json()).tool_names??[]}async function rT(){const i=await fetch("/get_tool_stats");if(!i.ok)throw new Error(`Failed to fetch tool stats: ${i.statusText}`);return(await i.json()).stats??{}}async function cT(){const i=await fetch("/clear_tool_stats",{method:"POST"});if(!i.ok)throw new Error(`Failed to clear tool stats: ${i.statusText}`)}async function uT(){const i=await fetch("/get_token_count_estimator_name");if(!i.ok)throw new Error(`Failed to fetch token estimator name: ${i.statusText}`);return(await i.json()).token_count_estimator_name??"unknown"}async function fT(){await fetch("/shutdown",{method:"PUT"})}const hT=[{id:"dashboard",label:"Dashboard",icon:"📊"},{id:"logs",label:"Logs",icon:"📝"},{id:"stats",label:"Statistics",icon:"📈"},{id:"sessions",label:"Sessions",icon:"📁"}];function dT(){const{state:i,dispatch:e}=Yi(),{currentView:a,sidebarCollapsed:s}=i,o=f=>{e({type:"SET_CURRENT_VIEW",view:f})},c=()=>{e({type:"TOGGLE_SIDEBAR"})},u=()=>{window.confirm("This will fully terminate the Smart Edit server.")&&(fT(),e({type:"SET_ERROR",error:"Shutting down ..."}),setTimeout(()=>window.close(),2e3))};return S.jsxs("aside",{className:`sidebar ${s?"collapsed":""}`,children:[S.jsxs("div",{className:"sidebar-header",children:[S.jsxs("div",{className:"sidebar-logo",children:[S.jsx("span",{className:"sidebar-logo-icon",children:"⚡"}),S.jsx("span",{className:"sidebar-logo-text",children:"Smart Edit"})]}),S.jsx("button",{className:"sidebar-toggle",onClick:c,title:s?"Expand sidebar":"Collapse sidebar",children:s?"→":"←"})]}),S.jsx("nav",{className:"sidebar-nav",children:hT.map(f=>S.jsxs("button",{className:`nav-item ${a===f.id?"active":""}`,onClick:()=>o(f.id),title:s?f.label:void 0,children:[S.jsx("span",{className:"nav-item-icon",children:f.icon}),S.jsx("span",{className:"nav-item-label",children:f.label})]},f.id))}),S.jsx("div",{className:"sidebar-footer",children:S.jsxs("button",{className:"nav-item shutdown-btn",onClick:u,title:s?"Shutdown Server":void 0,children:[S.jsx("span",{className:"nav-item-icon",children:"⏻"}),S.jsx("span",{className:"nav-item-label",children:"Shutdown"})]})})]})}function gT(){const{state:i,dispatch:e}=Yi(),a=()=>{const s=i.theme==="light"?"dark":"light";e({type:"SET_THEME",theme:s})};return S.jsxs("button",{className:"theme-toggle",onClick:a,children:[S.jsx("span",{className:"icon",children:i.theme==="dark"?"☀️":"🌙"}),S.jsx("span",{children:i.theme==="dark"?"Light":"Dark"})]})}const mT={dashboard:"Dashboard",logs:"Logs",stats:"Statistics",sessions:"Sessions"};function pT(){const{currentView:i,activeProject:e,connectionMode:a}=rn(),s=()=>{switch(a){case"streaming":return"Connected";case"polling":return"Polling";case"disconnected":return"Disconnected"}};return S.jsxs("header",{className:"topbar",children:[S.jsx("div",{className:"topbar-left",children:S.jsxs("div",{children:[S.jsx("h1",{className:"topbar-title",children:mT[i]}),e&&S.jsx("p",{className:"topbar-subtitle",children:e})]})}),S.jsxs("div",{className:"topbar-right",children:[S.jsxs("div",{className:"connection-indicator",children:[S.jsx("span",{className:`connection-dot ${a}`}),S.jsx("span",{children:s()})]}),S.jsx(gT,{})]})]})}function yT({children:i}){return S.jsxs("div",{className:"main-layout",children:[S.jsx(dT,{}),S.jsxs("div",{className:"main-content",children:[S.jsx(pT,{}),S.jsx("main",{className:"content-area",children:i})]})]})}function bT(i,e){const[a,s]=J.useState(i);return J.useEffect(()=>{const o=setTimeout(()=>{s(i)},e);return()=>{clearTimeout(o)}},[i,e]),a}const vT=/\[tool:\s*([^\]]+)\]/i;function cy(i){const e=i.match(vT);return e?e[1].trim():null}function _T(i,e){const a=bT(e.searchKeyword,200);return J.useMemo(()=>i.filter(s=>{if(e.logLevels.size>0&&!e.logLevels.has(s.level))return!1;if(e.toolNames.size>0){const o=cy(s.message);if(!o||!e.toolNames.has(o))return!1}if(a){const o=a.toLowerCase();if(!s.message.toLowerCase().includes(o))return!1}return!0}),[i,e.logLevels,e.toolNames,a])}function xT(i){return J.useMemo(()=>{const e=new Set;for(const a of i){const s=cy(a.message);s&&e.add(s)}return Array.from(e).sort()},[i])}const ST=1e3,TT=3;function MT(i){return i.startsWith("DEBUG")?"debug":i.startsWith("INFO")?"info":i.startsWith("WARNING")?"warning":i.startsWith("ERROR")?"error":"default"}function No(i,e){return{id:e,message:i,level:MT(i)}}function ET(){const{state:i,dispatch:e}=Yi(),a=J.useRef(null),s=J.useRef(null),o=J.useRef(0),c=J.useRef(i.maxLogIdx);c.current=i.maxLogIdx;const u=J.useCallback(async()=>{try{e({type:"SET_LOADING",isLoading:!0});const x=await Wp();e({type:"SET_TOOL_NAMES",toolNames:x});const T=await Fp(0),M=T.messages.map((A,z)=>No(A,z));e({type:"SET_LOGS",logs:M,maxIdx:T.max_idx}),e({type:"SET_ACTIVE_PROJECT",project:T.active_project}),e({type:"SET_ERROR",error:null})}catch(x){e({type:"SET_ERROR",error:x instanceof Error?x.message:String(x)})}finally{e({type:"SET_LOADING",isLoading:!1})}},[e]),f=J.useCallback(async()=>{try{const x=await Fp(c.current+1);if(o.current=0,x.messages.length>0)for(let T=0;T<x.messages.length;T++){const M=c.current+1+T,A=No(x.messages[T],M);e({type:"APPEND_LOG",log:A,maxIdx:M})}e({type:"SET_ACTIVE_PROJECT",project:x.active_project})}catch{o.current++,o.current>=TT&&window.close()}},[e]),d=J.useCallback(()=>{s.current===null&&(e({type:"SET_CONNECTION_MODE",mode:"polling"}),s.current=window.setInterval(f,ST))},[e,f]),m=J.useCallback(()=>{s.current!==null&&(clearInterval(s.current),s.current=null)},[]),p=J.useCallback(()=>{if(!window.EventSource)return!1;try{const x=new EventSource("/log_stream");a.current=x;let T=!1;return x.addEventListener("open",()=>{e({type:"SET_CONNECTION_MODE",mode:"streaming"}),m()}),x.addEventListener("history",M=>{T=!0;const A=JSON.parse(M.data),z=A.messages.map((H,Y)=>No(H,Y));e({type:"SET_LOGS",logs:z,maxIdx:A.maxIdx}),e({type:"SET_ACTIVE_PROJECT",project:A.activeProject})}),x.addEventListener("log",M=>{const A=JSON.parse(M.data),z=No(A.message,A.idx);e({type:"APPEND_LOG",log:z,maxIdx:A.idx}),e({type:"SET_ACTIVE_PROJECT",project:A.activeProject})}),x.addEventListener("toolNames",M=>{const A=JSON.parse(M.data);e({type:"SET_TOOL_NAMES",toolNames:A.toolNames})}),x.onerror=()=>{x.close(),a.current=null,e({type:"SET_CONNECTION_MODE",mode:"disconnected"}),T?d():u().then(()=>{d()})},!0}catch{return!1}},[e,m,u,d]),b=J.useCallback(()=>{a.current&&(a.current.close(),a.current=null),m(),p()||u().then(()=>{d()})},[p,m,u,d]);return J.useEffect(()=>((async()=>{const T=await Wp().catch(()=>[]);e({type:"SET_TOOL_NAMES",toolNames:T}),p()||(await u(),d())})(),()=>{a.current&&a.current.close(),m()}),[e,p,u,d,m]),J.useEffect(()=>{const x=()=>{document.visibilityState==="visible"&&i.connectionMode==="disconnected"&&b()};return document.addEventListener("visibilitychange",x),()=>document.removeEventListener("visibilitychange",x)},[i.connectionMode,b]),{reloadLogs:J.useCallback(async()=>{e({type:"CLEAR_LOGS"}),await u()},[e,u]),reconnect:b}}function AT({value:i,onChange:e,placeholder:a="Search...",className:s=""}){const o=u=>{e(u.target.value)},c=()=>{e("")};return S.jsxs("div",{className:`search-input-wrapper ${s}`,children:[S.jsx("span",{className:"search-input-icon",children:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("circle",{cx:"11",cy:"11",r:"8"}),S.jsx("path",{d:"m21 21-4.35-4.35"})]})}),S.jsx("input",{type:"text",className:"search-input",value:i,onChange:o,placeholder:a}),i&&S.jsx("button",{type:"button",className:"search-input-clear",onClick:c,"aria-label":"Clear search",children:S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M18 6 6 18"}),S.jsx("path",{d:"m6 6 12 12"})]})})]})}function Jp({options:i,selected:e,onChange:a,placeholder:s="Select...",className:o="",multiple:c=!0}){const[u,f]=J.useState(!1),d=J.useRef(null);J.useEffect(()=>{const x=T=>{d.current&&!d.current.contains(T.target)&&f(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);const m=()=>{f(!u)},p=x=>{const T=new Set(e);T.has(x)?T.delete(x):(c||T.clear(),T.add(x)),a(T)},b=()=>{a(new Set)},_=()=>{if(e.size===0)return s;if(e.size===1){const x=Array.from(e)[0];return i.find(M=>M.value===x)?.label||x}return`${e.size} selected`};return S.jsxs("div",{className:`dropdown ${o}`,ref:d,children:[S.jsxs("button",{type:"button",className:"dropdown-trigger",onClick:m,children:[S.jsx("span",{className:"dropdown-text",children:_()}),S.jsx("span",{className:`dropdown-arrow ${u?"open":""}`,children:S.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"m6 9 6 6 6-6"})})})]}),u&&S.jsxs("div",{className:"dropdown-menu",children:[c&&e.size>0&&S.jsx("button",{type:"button",className:"dropdown-clear",onClick:b,children:"Clear all"}),S.jsx("div",{className:"dropdown-options",children:i.map(x=>S.jsxs("label",{className:"dropdown-option",children:[S.jsx("input",{type:c?"checkbox":"radio",checked:e.has(x.value),onChange:()=>p(x.value)}),S.jsx("span",{className:"dropdown-option-label",children:x.label})]},x.value))})]})]})}const OT=[{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warning",label:"Warning"},{value:"error",label:"Error"}];function DT(){const{logs:i,logFilter:e}=rn(),a=ry(),s=xT(i),{reloadLogs:o}=ET(),[c,u]=J.useState(!1),f=s.map(T=>({value:T,label:T})),d=T=>{a({type:"SET_LOG_FILTER",filter:{searchKeyword:T}})},m=T=>{a({type:"SET_LOG_FILTER",filter:{logLevels:T}})},p=T=>{a({type:"SET_LOG_FILTER",filter:{toolNames:T}})},b=()=>{a({type:"CLEAR_LOG_FILTERS"})},_=async()=>{u(!0);try{await o()}finally{u(!1)}},x=e.searchKeyword||e.logLevels.size>0||e.toolNames.size>0;return S.jsxs("div",{className:"log-filter-bar",children:[S.jsx(AT,{value:e.searchKeyword,onChange:d,placeholder:"Search logs...",className:"log-filter-search"}),S.jsxs("div",{className:"log-filter-dropdowns",children:[S.jsx(Jp,{options:OT,selected:e.logLevels,onChange:m,placeholder:"Log Level",className:"log-filter-level"}),f.length>0&&S.jsx(Jp,{options:f,selected:e.toolNames,onChange:p,placeholder:"Tool",className:"log-filter-tool"}),S.jsx("button",{type:"button",className:`icon-btn reload-btn ${c?"spinning":""}`,onClick:_,disabled:c,title:"Reload logs",children:S.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}),S.jsx("path",{d:"M21 3v5h-5"})]})})]}),x&&S.jsx("button",{type:"button",className:"log-filter-clear btn",onClick:b,children:"Clear Filters"})]})}const CT={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function zT(i){return i.replace(/[<>&"'`]/g,e=>CT[e]??e)}function RT(i,e){if(e.length===0)return i;let a=zT(i);for(const s of e){const o=new RegExp(`\\b${wT(s)}\\b`,"gi");a=a.replace(o,'<span class="tool-name">$&</span>')}return a}function wT(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function NT({log:i}){const{toolNames:e}=rn(),a=J.useMemo(()=>RT(i.message,e),[i.message,e]);return S.jsx("div",{className:`log-${i.level}`,dangerouslySetInnerHTML:{__html:a+`
13
+ `}})}function jT({logs:i,isLoading:e,totalCount:a}){const s=J.useRef(null),o=J.useRef(!0);J.useEffect(()=>{const u=s.current;if(!u)return;const f=()=>{o.current=u.scrollTop+u.clientHeight>=u.scrollHeight-10};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)},[]),J.useEffect(()=>{const u=s.current;u&&o.current&&(u.scrollTop=u.scrollHeight)},[i]);const c=i.length!==a;return e&&a===0?S.jsx("div",{className:"log-container",ref:s,children:S.jsx("div",{className:"loading",children:"Loading logs..."})}):a===0?S.jsx("div",{className:"log-container",ref:s,children:S.jsx("div",{className:"loading",children:"No log messages found."})}):i.length===0&&c?S.jsx("div",{className:"log-container",ref:s,children:S.jsx("div",{className:"loading",children:"No logs match the current filters."})}):S.jsxs("div",{className:"log-container",ref:s,children:[c&&S.jsxs("div",{className:"filter-stats",children:["Showing ",S.jsx("span",{className:"filter-stats-count",children:i.length})," of"," ",S.jsx("span",{className:"filter-stats-count",children:a})," logs"]}),i.map(u=>S.jsx(NT,{log:u},u.id))]})}function kT(){const{error:i}=rn();return i?S.jsx("div",{id:"error-container",children:S.jsx("div",{className:"error-message",children:i})}):null}function ci({children:i,title:e,subtitle:a,actions:s,className:o="",style:c}){return S.jsxs("div",{className:`card ${o}`,style:c,children:[(e||s)&&S.jsxs("div",{className:"card-header",children:[S.jsxs("div",{children:[e&&S.jsx("h3",{className:"card-title",children:e}),a&&S.jsx("p",{className:"card-subtitle",children:a})]}),s&&S.jsx("div",{className:"card-actions",children:s})]}),S.jsx("div",{className:"card-body",children:i})]})}function LT(){const{logs:i,logFilter:e,isLoading:a}=rn(),s=_T(i,e);return S.jsxs("div",{className:"log-panel",children:[S.jsx(kT,{}),S.jsxs(ci,{className:"log-card",style:{flex:1,display:"flex",flexDirection:"column"},children:[S.jsx("div",{className:"log-panel-header",children:S.jsx(DT,{})}),S.jsx("div",{className:"log-panel-content",children:S.jsx(jT,{logs:s,isLoading:a,totalCount:i.length})})]})]})}function uy(){const{dispatch:i}=Yi(),[e,a]=J.useState(!1),[s,o]=J.useState("unknown"),c=J.useCallback(async()=>{a(!0);try{const[f,d]=await Promise.all([rT(),uT()]);i({type:"SET_TOOL_STATS",stats:f}),o(d)}catch(f){console.error("Failed to load stats:",f)}finally{a(!1)}},[i]),u=J.useCallback(async()=>{try{await cT(),await c()}catch(f){console.error("Failed to clear stats:",f)}},[c]);return{loadStats:c,clearStats:u,isLoading:e,tokenEstimatorName:s}}function fy(i){return J.useMemo(()=>{if(!i)return{totalCalls:0,totalInputTokens:0,totalOutputTokens:0,totalTokens:0,toolCount:0,mostUsedTool:null,topTools:[]};const e=Object.entries(i);let a=0,s=0,o=0,c=null;const f=e.map(([d,m])=>(a+=m.num_times_called,s+=m.input_tokens,o+=m.output_tokens,(!c||m.num_times_called>c.calls)&&(c={name:d,calls:m.num_times_called}),{name:d,calls:m.num_times_called,inputTokens:m.input_tokens,outputTokens:m.output_tokens})).sort((d,m)=>m.calls-d.calls).slice(0,5);return{totalCalls:a,totalInputTokens:s,totalOutputTokens:o,totalTokens:s+o,toolCount:e.length,mostUsedTool:c,topTools:f}},[i])}function Js(i){return i>=1e6?(i/1e6).toFixed(1)+"M":i>=1e3?(i/1e3).toFixed(1)+"K":i.toString()}function ui({title:i,value:e,subtitle:a,icon:s,trend:o,className:c=""}){return S.jsxs("div",{className:`metric-card ${c}`,children:[S.jsxs("div",{className:"metric-card-header",children:[S.jsx("span",{className:"metric-card-title",children:i}),s&&S.jsx("span",{className:"metric-card-icon",children:s})]}),S.jsx("div",{className:"metric-card-value",children:e}),(a||o)&&S.jsxs("div",{className:"metric-card-footer",children:[a&&S.jsx("span",{className:"metric-card-subtitle",children:a}),o&&S.jsxs("span",{className:`metric-card-trend ${o.direction}`,children:[o.direction==="up"&&"+",o.direction==="down"&&"-",Math.abs(o.value),"%"]})]})]})}function za({value:i,duration:e=500,formatter:a=o=>o.toLocaleString(),className:s=""}){const[o,c]=J.useState(i),u=J.useRef(i),f=J.useRef(void 0);return J.useEffect(()=>{const d=u.current,m=i,p=performance.now(),b=_=>{const x=_-p,T=Math.min(x/e,1),M=1-(1-T)*(1-T),A=Math.round(d+(m-d)*M);c(A),T<1?f.current=requestAnimationFrame(b):u.current=m};return d!==m&&(f.current=requestAnimationFrame(b)),()=>{f.current&&cancelAnimationFrame(f.current)}},[i,e]),S.jsx("span",{className:`live-counter ${s}`,children:a(o)})}const hy="label";function Ip(i,e){typeof i=="function"?i(e):i&&(i.current=e)}function HT(i,e){const a=i.options;a&&e&&Object.assign(a,e)}function dy(i,e){i.labels=e}function gy(i,e,a=hy){const s=[];i.datasets=e.map(o=>{const c=i.datasets.find(u=>u[a]===o[a]);return!c||!o.data||s.includes(c)?{...o}:(s.push(c),Object.assign(c,o),c)})}function BT(i,e=hy){const a={labels:[],datasets:[]};return dy(a,i.labels),gy(a,i.datasets,e),a}function UT(i,e){const{height:a=150,width:s=300,redraw:o=!1,datasetIdKey:c,type:u,data:f,options:d,plugins:m=[],fallbackContent:p,updateMode:b,..._}=i,x=J.useRef(null),T=J.useRef(null),M=()=>{x.current&&(T.current=new Fo(x.current,{type:u,data:BT(f,c),options:d&&{...d},plugins:m}),Ip(e,T.current))},A=()=>{Ip(e,null),T.current&&(T.current.destroy(),T.current=null)};return J.useEffect(()=>{!o&&T.current&&d&&HT(T.current,d)},[o,d]),J.useEffect(()=>{!o&&T.current&&dy(T.current.config.data,f.labels)},[o,f.labels]),J.useEffect(()=>{!o&&T.current&&f.datasets&&gy(T.current.config.data,f.datasets,c)},[o,f.datasets]),J.useEffect(()=>{T.current&&(o?(A(),setTimeout(M)):T.current.update(b))},[o,d,f.labels,f.datasets,b]),J.useEffect(()=>{T.current&&(A(),setTimeout(M))},[u]),J.useEffect(()=>(M(),()=>A()),[]),S.jsx("canvas",{ref:x,role:"img",height:a,width:s,..._,children:p})}const VT=J.forwardRef(UT);function my(i,e){return Fo.register(e),J.forwardRef((a,s)=>S.jsx(VT,{...a,ref:s,type:i}))}const YT=my("bar",u1),qT=my("pie",d1);function py(){const{theme:i}=rn();return J.useMemo(()=>({textColor:i==="dark"?"#ffffff":"#000000",gridColor:i==="dark"?"#444444":"#dddddd",legendColor:i==="dark"?"#ffffff":"#000000"}),[i])}function XT({toolStats:i,maxTools:e=8}){const a=py();if(!i||Object.keys(i).length===0)return S.jsx("div",{className:"chart-empty",children:S.jsx("p",{children:"No tool usage data available"})});const s=Object.entries(i).map(([u,f])=>({name:u,inputTokens:f.input_tokens,outputTokens:f.output_tokens,total:f.input_tokens+f.output_tokens})).sort((u,f)=>f.total-u.total).slice(0,e),o={labels:s.map(u=>u.name),datasets:[{label:"Input Tokens",data:s.map(u=>u.inputTokens),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"Output Tokens",data:s.map(u=>u.outputTokens),backgroundColor:"rgba(34, 197, 94, 0.8)",borderColor:"rgba(34, 197, 94, 1)",borderWidth:1}]},c={indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top",labels:{color:a.textColor,font:{size:11}}},datalabels:{display:!1},tooltip:{callbacks:{label:u=>{const f=u.parsed.x??0;return`${u.dataset.label}: ${f.toLocaleString()}`}}}},scales:{x:{stacked:!0,grid:{color:a.gridColor},ticks:{color:a.textColor,callback:function(u){const f=typeof u=="number"?u:parseFloat(String(u));return f>=1e3?(f/1e3).toFixed(0)+"K":f}}},y:{stacked:!0,grid:{display:!1},ticks:{color:a.textColor}}}};return S.jsx("div",{className:"chart-container",style:{height:Math.max(200,s.length*40)},children:S.jsx(YT,{data:o,options:c})})}const $p=["#101010","#1f1f1f","#2e2e2e","#3d3d3d","#4c4c4c","#5b5b5b","#6a6a6a","#797979","#888888","#979797","#a6a6a6","#b5b5b5","#c4c4c4","#d3d3d3","#e2e2e2"];function GT(i){return Array.from({length:i},(e,a)=>$p[a%$p.length])}function Bu({title:i,labels:e,data:a}){const{textColor:s}=py(),o=J.useMemo(()=>GT(e.length),[e.length]),c=J.useMemo(()=>({labels:e,datasets:[{data:a,backgroundColor:o}]}),[e,a,o]),u=J.useMemo(()=>({plugins:{legend:{display:!0,labels:{color:s}},datalabels:{display:!0,color:"white",font:{weight:"bold"},formatter:f=>f}}}),[s]);return S.jsxs("div",{className:"chart-group",children:[S.jsx("h3",{children:i}),S.jsx(qT,{data:c,options:u})]})}function QT(){return S.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})})}function Pp(){return S.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("circle",{cx:"12",cy:"12",r:"10"}),S.jsx("path",{d:"M12 6v12"}),S.jsx("path",{d:"M8 10h8"}),S.jsx("path",{d:"M8 14h8"})]})}function ZT(){return S.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function KT(){const{toolStats:i}=rn(),{loadStats:e,clearStats:a,isLoading:s,tokenEstimatorName:o}=uy(),c=fy(i);J.useEffect(()=>{i||e()},[i,e]);const u=i?{names:Object.keys(i),counts:Object.values(i).map(f=>f.num_times_called),inputTokens:Object.values(i).map(f=>f.input_tokens),outputTokens:Object.values(i).map(f=>f.output_tokens)}:null;return S.jsxs("div",{className:"stats-panel",children:[S.jsxs("div",{className:"stats-panel-header",children:[S.jsxs("div",{className:"stats-panel-actions",children:[S.jsx("button",{className:"btn",onClick:e,disabled:s,children:s?"Loading...":"Refresh"}),S.jsx("button",{className:"btn",onClick:a,children:"Clear Stats"})]}),o&&S.jsxs("span",{className:"stats-estimator",children:["Token estimator: ",o]})]}),!i||Object.keys(i).length===0?S.jsx(ci,{children:S.jsxs("div",{className:"stats-empty",children:[S.jsx("p",{children:"No tool stats collected yet."}),S.jsx("p",{className:"stats-empty-hint",children:"Tool statistics will appear here once tools are used during the session."})]})}):S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"metrics-grid",children:[S.jsx(ui,{title:"Total Calls",value:S.jsx(za,{value:c.totalCalls}),subtitle:`${c.toolCount} tools used`,icon:S.jsx(ZT,{})}),S.jsx(ui,{title:"Input Tokens",value:S.jsx(za,{value:c.totalInputTokens,formatter:Js}),subtitle:"Total input",icon:S.jsx(Pp,{})}),S.jsx(ui,{title:"Output Tokens",value:S.jsx(za,{value:c.totalOutputTokens,formatter:Js}),subtitle:"Total output",icon:S.jsx(Pp,{})}),S.jsx(ui,{title:"Most Used Tool",value:c.mostUsedTool?.name||"-",subtitle:c.mostUsedTool?`${c.mostUsedTool.calls} calls`:void 0,icon:S.jsx(QT,{})})]}),S.jsxs("div",{className:"stats-charts-grid",children:[S.jsx(ci,{title:"Token Distribution by Tool",children:S.jsx(XT,{toolStats:i})}),S.jsx(ci,{title:"Call Distribution",children:u&&S.jsx(Bu,{title:"",labels:u.names,data:u.counts})})]}),S.jsx("div",{className:"stats-charts-row",children:S.jsx(ci,{title:"Token Breakdown",children:S.jsx("div",{className:"pie-charts-row",children:u&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"pie-chart-item",children:S.jsx(Bu,{title:"Input Tokens",labels:u.names,data:u.inputTokens})}),S.jsx("div",{className:"pie-chart-item",children:S.jsx(Bu,{title:"Output Tokens",labels:u.names,data:u.outputTokens})})]})})})})]})]})}const Uu="smart-edit-session-history";function Vu(i){return{id:i.id,startTime:i.startTime.toISOString(),endTime:i.endTime?i.endTime.toISOString():null,projectName:i.projectName,stats:i.stats,toolStats:i.toolStats}}function FT(i){return{id:i.id,startTime:new Date(i.startTime),endTime:i.endTime?new Date(i.endTime):null,projectName:i.projectName,stats:i.stats,toolStats:i.toolStats}}function WT(){const{state:i,dispatch:e}=Yi();J.useEffect(()=>{try{const f=localStorage.getItem(Uu);if(f){const m=JSON.parse(f).map(FT);e({type:"LOAD_SESSION_HISTORY",sessions:m})}}catch(f){console.error("Failed to load session history:",f)}},[e]),J.useEffect(()=>{try{const f=i.sessionHistory.map(Vu);localStorage.setItem(Uu,JSON.stringify(f))}catch(f){console.error("Failed to save session history:",f)}},[i.sessionHistory]);const a=J.useCallback(f=>{const d={id:crypto.randomUUID(),startTime:new Date,endTime:null,projectName:f,stats:{totalCalls:0,totalInputTokens:0,totalOutputTokens:0},toolStats:null};e({type:"START_SESSION",session:d})},[e]),s=J.useCallback(()=>{if(i.currentSession&&i.toolStats){const f=Object.values(i.toolStats).reduce((m,p)=>({totalCalls:m.totalCalls+p.num_times_called,totalInputTokens:m.totalInputTokens+p.input_tokens,totalOutputTokens:m.totalOutputTokens+p.output_tokens}),{totalCalls:0,totalInputTokens:0,totalOutputTokens:0}),d={...i.currentSession,stats:f,toolStats:i.toolStats};e({type:"START_SESSION",session:d})}e({type:"END_SESSION"})},[e,i.currentSession,i.toolStats]),o=J.useCallback(()=>{e({type:"CLEAR_SESSION_HISTORY"}),localStorage.removeItem(Uu)},[e]),c=J.useCallback(f=>{const d={...Vu(f),exportedAt:new Date().toISOString()};return JSON.stringify(d,null,2)},[]),u=J.useCallback(()=>{const f={sessions:i.sessionHistory.map(Vu),exportedAt:new Date().toISOString()};return JSON.stringify(f,null,2)},[i.sessionHistory]);return{currentSession:i.currentSession,sessionHistory:i.sessionHistory,startSession:a,endSession:s,clearHistory:o,exportSession:c,exportAllSessions:u}}function JT(i){return i.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function t0(i){return i.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function IT(i,e){if(!e)return"In progress";const a=e.getTime()-i.getTime(),s=Math.floor(a/(1e3*60*60)),o=Math.floor(a%(1e3*60*60)/(1e3*60));return s>0?`${s}h ${o}m`:`${o}m`}function $T({sessions:i,onExport:e}){return i.length===0?S.jsxs("div",{className:"session-list-empty",children:[S.jsx("p",{children:"No session history available."}),S.jsx("p",{className:"session-list-empty-hint",children:"Session history will appear here as you use Smart Edit."})]}):S.jsx("div",{className:"session-list",children:i.map(a=>S.jsxs("div",{className:"session-item",children:[S.jsxs("div",{className:"session-item-header",children:[S.jsxs("div",{className:"session-item-info",children:[S.jsx("span",{className:"session-item-date",children:JT(a.startTime)}),S.jsxs("span",{className:"session-item-time",children:[t0(a.startTime),a.endTime&&` - ${t0(a.endTime)}`]})]}),S.jsx("span",{className:"session-item-duration",children:IT(a.startTime,a.endTime)})]}),a.projectName&&S.jsx("div",{className:"session-item-project",children:a.projectName}),S.jsxs("div",{className:"session-item-stats",children:[S.jsxs("div",{className:"session-stat",children:[S.jsx("span",{className:"session-stat-label",children:"Calls"}),S.jsx("span",{className:"session-stat-value",children:a.stats.totalCalls})]}),S.jsxs("div",{className:"session-stat",children:[S.jsx("span",{className:"session-stat-label",children:"Input"}),S.jsx("span",{className:"session-stat-value",children:Js(a.stats.totalInputTokens)})]}),S.jsxs("div",{className:"session-stat",children:[S.jsx("span",{className:"session-stat-label",children:"Output"}),S.jsx("span",{className:"session-stat-value",children:Js(a.stats.totalOutputTokens)})]})]}),S.jsx("div",{className:"session-item-actions",children:S.jsxs("button",{type:"button",className:"session-action-btn",onClick:()=>e(a),title:"Export session as JSON",children:[S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),S.jsx("polyline",{points:"7 10 12 15 17 10"}),S.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),"Export"]})})]},a.id))})}function PT({getData:i,filename:e,label:a="Export All",className:s=""}){const o=J.useCallback(()=>{const c=i(),u=new Blob([c],{type:"application/json"}),f=URL.createObjectURL(u),d=document.createElement("a");d.href=f,d.download=e,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(f)},[i,e]);return S.jsxs("button",{type:"button",className:`btn export-btn ${s}`,onClick:o,children:[S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{marginRight:"6px"},children:[S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),S.jsx("polyline",{points:"7 10 12 15 17 10"}),S.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),a]})}function tM(i,e){const a=new Blob([i],{type:"application/json"}),s=URL.createObjectURL(a),o=document.createElement("a");o.href=s,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(s)}function eM(){const{sessionHistory:i,clearHistory:e,exportSession:a,exportAllSessions:s}=WT(),o=J.useCallback(u=>{const f=a(u),d=u.startTime.toISOString().split("T")[0];tM(f,`smart-edit-session-${d}.json`)},[a]),c=J.useCallback(()=>s(),[s]);return S.jsx("div",{className:"session-panel",children:S.jsxs(ci,{children:[S.jsxs("div",{className:"session-panel-header",children:[S.jsxs("div",{children:[S.jsx("h3",{className:"session-panel-title",children:"Session History"}),S.jsxs("p",{className:"session-panel-subtitle",children:[i.length," session",i.length!==1?"s":""," recorded"]})]}),S.jsx("div",{className:"session-panel-actions",children:i.length>0&&S.jsxs(S.Fragment,{children:[S.jsx(PT,{getData:c,filename:`smart-edit-sessions-${new Date().toISOString().split("T")[0]}.json`,label:"Export All"}),S.jsx("button",{type:"button",className:"btn btn-danger",onClick:e,children:"Clear History"})]})})]}),S.jsx($T,{sessions:i,onExport:o})]})})}function e0(){return S.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function n0(){return S.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("path",{d:"M14 2v6h6"}),S.jsx("path",{d:"M16 13H8"}),S.jsx("path",{d:"M16 17H8"}),S.jsx("path",{d:"M10 9H8"})]})}function i0(){return S.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("circle",{cx:"12",cy:"12",r:"10"}),S.jsx("path",{d:"M12 6v12"}),S.jsx("path",{d:"M8 10h8"}),S.jsx("path",{d:"M8 14h8"})]})}function nM(){return S.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})})}function Yu({title:i,description:e,icon:a,view:s}){const o=ry(),c=()=>{o({type:"SET_CURRENT_VIEW",view:s})};return S.jsxs("button",{type:"button",className:"quick-nav-card",onClick:c,children:[S.jsx("div",{className:"quick-nav-icon",children:a}),S.jsxs("div",{className:"quick-nav-content",children:[S.jsx("h4",{className:"quick-nav-title",children:i}),S.jsx("p",{className:"quick-nav-description",children:e})]}),S.jsx("svg",{className:"quick-nav-arrow",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M9 18l6-6-6-6"})})]})}function iM(){const{logs:i,toolStats:e,connectionMode:a,activeProject:s}=rn(),{loadStats:o}=uy(),c=fy(e);return J.useEffect(()=>{e||o()},[e,o]),S.jsxs("div",{className:"dashboard-overview",children:[S.jsx(ci,{children:S.jsxs("div",{className:"welcome-section",children:[S.jsxs("div",{className:"welcome-content",children:[S.jsx("h2",{className:"welcome-title",children:s?`Welcome to ${s}`:"Welcome to Smart Edit"}),S.jsx("p",{className:"welcome-description",children:"Monitor your coding sessions, view logs, and analyze tool usage statistics."})]}),S.jsx("div",{className:"connection-badge",children:S.jsxs("span",{className:`connection-status ${a}`,children:[a==="streaming"&&"Connected",a==="polling"&&"Polling",a==="disconnected"&&"Disconnected"]})})]})}),S.jsxs("div",{className:"metrics-grid",children:[S.jsx(ui,{title:"Log Entries",value:S.jsx(za,{value:i.length}),subtitle:"Current session",icon:S.jsx(n0,{})}),S.jsx(ui,{title:"Tool Calls",value:S.jsx(za,{value:c.totalCalls}),subtitle:`${c.toolCount} tools used`,icon:S.jsx(e0,{})}),S.jsx(ui,{title:"Total Tokens",value:S.jsx(za,{value:c.totalTokens,formatter:Js}),subtitle:"Input + Output",icon:S.jsx(i0,{})}),S.jsx(ui,{title:"Top Tool",value:c.mostUsedTool?.name||"-",subtitle:c.mostUsedTool?`${c.mostUsedTool.calls} calls`:"No data",icon:S.jsx(nM,{})})]}),S.jsx(ci,{title:"Quick Navigation",children:S.jsxs("div",{className:"quick-nav-grid",children:[S.jsx(Yu,{title:"View Logs",description:"Real-time log stream with filtering",icon:S.jsx(n0,{}),view:"logs"}),S.jsx(Yu,{title:"Statistics",description:"Tool usage and token analytics",icon:S.jsx(e0,{}),view:"stats"}),S.jsx(Yu,{title:"Sessions",description:"Session history and export",icon:S.jsx(i0,{}),view:"sessions"})]})})]})}function aM(){return S.jsx(iM,{})}function sM(){return S.jsx(LT,{})}function lM(){return S.jsx(KT,{})}function oM(){return S.jsx(eM,{})}function rM(){const{currentView:i}=rn();return{dashboard:S.jsx(aM,{}),logs:S.jsx(sM,{}),stats:S.jsx(lM,{}),sessions:S.jsx(oM,{})}[i]}function cM(){const{theme:i,activeProject:e}=rn();return J.useEffect(()=>{document.documentElement.setAttribute("data-theme",i)},[i]),J.useEffect(()=>{document.title=e?`${e} – Smart Edit Dashboard`:"Smart Edit Dashboard"},[e]),S.jsx(yT,{children:S.jsx(rM,{})})}function uM(){return S.jsx(oT,{children:S.jsx(cM,{})})}Fo.register(Y0,Z0,Wo,G0,D2,R2,g2,M2,p2,r2,nT);const yy=document.getElementById("root");if(!yy)throw new Error("Root element not found");Jv.createRoot(yy).render(S.jsx(J.StrictMode,{children:S.jsx(uM,{})}));