[
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]\npatreon: # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: philip2809\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\nlfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry\npolar: # Replace with a single Polar username\nbuy_me_a_coffee: philip2809 # Replace with a single Buy Me a Coffee username\nthanks_dev: # Replace with a single thanks.dev username\ncustom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Build results\n_static/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.test\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# Next.js build output\n.next\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and *not* Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2025 Philip Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.md",
    "content": "[buymeacoffee]: https://www.buymeacoffee.com/philip2809\n[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\n\n<div align=\"center\">\n  <img alt=\"neato-brainslug Logo\" src=\"./pics/logo.svg\" width=\"250\">\n  <h1>neato-brainslug</h1>\n</div>\n\n<div align=\"center\">\n\n_Control your Neato vacuum locally with an ESPHome brainslug_\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/V7V61PBIY6)\n[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]\n\n  <h2>\n      <a href=\"https://discord.gg/PAgwhWvyD8\">\n        Discord\n      </a>\n      <span> | </span>\n      <a href=\"faq.md\">\n        FAQ\n      </a>\n      <span> | </span>\n      <a href=\"manual.md\">\n        Manual\n      </a>\n      <span> | </span>\n      <a href=\"#beta\">\n        Beta\n      </a>\n      <span> | </span>\n      <a href=\"https://brainslug.phma.dev\">\n        Brainslug Tools\n      </a>\n</div>\n\n\n\n\nRepair your Neato Robot Vacuum to be controlled locally after the shutdown of the Neato servers. The scope of this project is to give your robot at least the same functionallity as when you bought it, however the project is in a development state. The `main` branch only gets updates on releases, check out the `next` branch for the latest updates!\n\nSince there is a couple of robots from Neato and they have different firmware versions, they will need different configurations. I have decided they will be grouped based on their \"generation\".\n\n- `gen1` - (Generation 1)\n    - XV11\n    - XV12\n    - XV14\n    - XV21\n    - XV RS/HP\n    - XV signature\n    - XV signature pro\n- `gen2` - (Generation 2)\n    - Neato Botvac D70\n    - Neato Botvac D75\n    - Neato Botvac D80\n    - Neato Botvac D85\n    - Neato Botvac Connected **(Non DX)** `905-0249`, `905-0317`\n- `gen3` - (Generation 3)\n    - Neato Botvac D3 Connected `905-0321`, `905-0437`, `905-0327`\n    - Neato Botvac D4 Connected `905-0499`, `905-0514`\n    - Neato Botvac D5 Connected `905-0358`, `905-0357`, `905-0402`\n    - Neato Botvac D6 Connected `905-0496`, `905-0517`\n    - Neato Botvac D7 Connected `905-0415`, `905-0537`\n- `gen 4` (Generation 4) - Sadly not yet supported\n    - Neato D800 (very very likely the same as the d8-d10, not confirmed tho)\n    - Neato D8 Intelligent `905-09596`\n    - Neato D9 Intelligent `905-0559`\n    - Neato D10 Intelligent `905-0724`\n\n\n| Feature | `gen1` | `gen2` | `gen3` |\n|---|---|---|---|\n| Start & Stop | ✅ | ✅ | ✅ |\n| Check errors | ✅ | ✅ | ✅ |\n| Status | 🟠 | 🟠 | ✅ |\n| Edit settings | ❌ | ✅ | ✅ |\n| Scheduling on robot (via screen) | ✅ | ✅ | ❌ |\n| Scheduling via ESPHome | ✅ | ✅ | ✅ |\n| Scheduling via HA Automation | ✅ ¹ | ✅ ¹ | ✅ ¹ |\n| Notifications | ✅ ¹ | ✅ ¹ | ✅ ¹ |\n| Return to start | ❌ ³ | ✅ | ❌ ³ |\n| Return to dock | ❌ ³ | ❌ ³ | ✅ |\n| Manual driving | ❌ ² | ❌ ² | ✅ |\n\n- ✅ - Supported\n- 🟠 - Limited functionality\n- ❌ - Not supported\n- ¹ - Home Assistant required\n- ² - Support can be added by version 1\n- ³ - Support can be added by version 2\n\nPlease refer to the [status.md](./status.md) for project status, roadmap and version meanings!\n  \nThe ability to create, view and edit floormaps so the robot can get the same functionallity with no-go lines and zones is in the making.\n\nThe reason this works on all Neato robots is because they all have the command interface, even the robots that originally don't have any WiFi, will still work, since it is no longer WiFi robot that is connecting to the WiFi, it is the ESP device. This also removes any limitations the robots WiFi may have had.\n\n**`gen1` robots**\n- We are currently looking into the best way to connect to these, please join the [Discord](https://discord.gg/PAgwhWvyD8) where we are currently talking about the best way to do it and the experimentation going on!\n\n**`gen4` robots**\n- These robots use a compleatly different board, chip and firmware, and we cannot interface with these directly. However one idea to get the start/stop feature back is to wire an esp32 to the button itself, join the [Discord](https://discord.gg/PAgwhWvyD8) or open an discussion here so we can discuss! \n\n# Getting started!\n\nFor this repair you will need some tools to connect an ESP device, if you already have an ESP device, awesome try using that, but if you don't already have one you should buy one according to what we have found works best. ESPs recommended by ESPHome (`ESP32`, `ESP32S3` and `ESP32C3`) will all work and have prebuilt files for easy installation, however some ESP devices that are very cheap and small should be avoided since they have some defects and need to use a lower power output on the wifi signal. Please check [supported-esp32.md](./supported-esp32.md) for more information!\n\nFirst of all we need to get the version of your robot, do this with the [Brainslug Tools](https://brainslug.phma.dev/#/robot)\n\nSince we are parsing the data from the serial interface we need to be on the same verion of the robot firmware, this is what has been confirmed working:\n| `gen2`  | `gen3` |\n|---|---|\n| `2.2.0` or `2.2.1` | `4.5.3` or `4.6.0` (note, many `4.X.X` versions will work) |\n\nIf you have another version then these; please get in touch!\n\nThere is two ways of using this repair:\n\n- [**Without Home Assistant**](./install-no-ha.md) \n- [**With Home Assistant**](./install-ha.md)\n\n**If you don't mind to tinker a little bit I really do recommend to check out Home Assistant and do that route.** It is an open source home automation tool that puts local control and privacy first. Read more about them on their [website](https://www.home-assistant.io/) and try their [live demo](https://demo.home-assistant.io) if you want! There is a lot of great guides and information about home hassistant on youtube and their forums! They also have some amazing guides on their [site](https://www.home-assistant.io/installation/) to get an home assistant installation going. If you have any questions or problems, don't hesitate to ask for help here in the [discusstions](https://github.com/Philip2809/neato-connected/discussions) section, on our [Discord](https://discord.gg/PAgwhWvyD8) or the home assistant [help](https://www.home-assistant.io/help/) page. \n\n**From version 2 of this project, when ROS is used for getting a floormap, you will need a separate computer running ROS, and the easiest and prioritized way to set that up will be via Home Assistant.**\n\n## Beta\nThe `main` branch will have the code and guide for the latest release, but in case you want to try the latest beta this version with live on the `next` branch. In case certain features are on their way into the beta, but not in a beta yet, they will live on `next/<feature name>`. \n\nThe config files for the betas will live in the `config` folder instead of the releases tab, where the links in the different guides will point to!\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=philip2809/neato-brainslug&type=date&legend=top-left)](https://www.star-history.com/#philip2809/neato-brainslug&type=date&legend=top-left)\n\n## Acknowledgements\n\n- @Fabian Ullrich, Jiska Classen, Johannes Eger, Matthias Hollick, Fabian Freyer, crunch from Secure Mobile Networking Lab\n    - [Security and Privacy for IoT Ecosystems](https://tuprints.ulb.tu-darmstadt.de/handle/tuda/4937)\n    - [Vacuums in the Cloud:\nAnalyzing Security in a Hardened IoT Ecosystem](https://www.usenix.org/system/files/woot19-paper_ullrich.pdf)\n    - And all of their work on these robots!\n- [@jeroenterheerdt](https://github.com/jeroenterheerdt) for testing, reviewing, writing the guide for installing internally and the original [neato-serial](https://github.com/jeroenterheerdt/neato-serial)\n- [@algaen](https://github.com/algaen) for the info about the D8 (D9, D10?) robots\n- [@tomwj](https://github.com/tomwj) for testing and pictures installing it internally in a D7\n- [@RobertSundling](https://github.com/RobertSundling) for the [firmware files](https://github.com/RobertSundling/neato-botvac)\n- [@mikeyp] for the amazing logo\n"
  },
  {
    "path": "assets/index-BhclUVWI.js",
    "content": "var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel=\"modulepreload\"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return T(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={\"=\":`=0`,\":\":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var D=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},O={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=O,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!w.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return T(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)w.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return T(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=E,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(S,D)}catch(e){D(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.4`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,E());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var ee=!1,S=-1,C=5,w=-1;function T(){return g?!0:!(e.unstable_now()-w<C)}function te(){if(g=!1,ee){var t=e.unstable_now();w=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(S),S=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&T());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?E():ee=!1}}}var E;if(typeof y==`function`)E=function(){y(te)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=te,E=function(){re.postMessage(null)}}else E=function(){_(te,0)};function ie(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,E()))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),re=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case w:return`Suspense`;case T:return`SuspenseList`;case ne:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case S:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case te:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ue=[],de=-1;function fe(e){return{current:e}}function pe(e){0>de||(e.current=ue[de],ue[de]=null,de--)}function k(e,t){de++,ue[de]=e.current,e.current=t}var me=fe(null),he=fe(null),ge=fe(null),_e=fe(null);function ve(e,t){switch(k(ge,t),k(he,e),k(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(me),k(me,e)}function ye(){pe(me),pe(he),pe(ge)}function be(e){e.memoizedState!==null&&k(_e,e);var t=me.current,n=Hd(t,e.type);t!==n&&(k(he,e),k(me,n))}function xe(e){he.current===e&&(pe(me),pe(he)),_e.current===e&&(pe(_e),Qf._currentValue=le)}var Se,Ce;function we(e){if(Se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\\n( *(at )?)/);Se=t&&t[1]||``,Ce=-1<e.stack.indexOf(`\n    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`\n`+Se+e+Ce}var Te=!1;function Ee(e,t){if(!e||Te)return``;Te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`\n`),l=s.split(`\n`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`\n`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?we(n):``}function De(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we(`Lazy`);case 13:return e.child!==t&&t!==null?we(`Suspense Fallback`):we(`Suspense`);case 19:return we(`SuspenseList`);case 0:case 15:return Ee(e.type,!1);case 11:return Ee(e.type.render,!1);case 1:return Ee(e.type,!0);case 31:return we(`Activity`);default:return``}}function Oe(e){try{var t=``,n=null;do t+=De(e,n),n=e,e=e.return;while(e);return t}catch(e){return`\nError generating stack: `+e.message+`\n`+e.stack}}var ke=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,je=t.unstable_cancelCallback,Me=t.unstable_shouldYield,Ne=t.unstable_requestPaint,Pe=t.unstable_now,Fe=t.unstable_getCurrentPriorityLevel,Ie=t.unstable_ImmediatePriority,Le=t.unstable_UserBlockingPriority,Re=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Be=t.unstable_IdlePriority,Ve=t.log,He=t.unstable_setDisableYieldValue,Ue=null,We=null;function Ge(e){if(typeof Ve==`function`&&He(e),We&&typeof We.setStrictMode==`function`)try{We.setStrictMode(Ue,e)}catch{}}var A=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-A(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ot(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-A(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function st(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-A(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ct(e,t){var n=t&-t;return n=n&42?1:lt(n),(n&(e.suspendedLanes|t))===0?n:0}function lt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ut(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function dt(){var e=O.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ft(e,t){var n=O.p;try{return O.p=e,t()}finally{O.p=n}}var pt=Math.random().toString(36).slice(2),mt=`__reactFiber$`+pt,ht=`__reactProps$`+pt,gt=`__reactContainer$`+pt,_t=`__reactEvents$`+pt,vt=`__reactListeners$`+pt,yt=`__reactHandles$`+pt,bt=`__reactResources$`+pt,xt=`__reactMarker$`+pt;function St(e){delete e[mt],delete e[ht],delete e[_t],delete e[vt],delete e[yt]}function Ct(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gt]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[mt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function wt(e){if(e=e[mt]||e[gt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Et(e){var t=e[bt];return t||=e[bt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Dt(e){e[xt]=!0}var Ot=new Set,kt={};function At(e,t){jt(e,t),jt(e+`Capture`,t)}function jt(e,t){for(kt[e]=t,e=0;e<t.length;e++)Ot.add(t[e])}var Mt=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]*$`),Nt={},Pt={};function Ft(e){return ke.call(Pt,e)?!0:ke.call(Nt,e)?!1:Mt.test(e)?Pt[e]=!0:(Nt[e]=!0,!1)}function It(e,t,n){if(Ft(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Lt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Rt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Bt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Vt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ht(e){if(!e._valueTracker){var t=Bt(e)?`checked`:`value`;e._valueTracker=Vt(e,t,``+e[t])}}function Ut(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Bt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Wt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Gt=/[\\n\"\\\\]/g;function Kt(e){return e.replace(Gt,function(e){return`\\\\`+e.charCodeAt(0).toString(16)+` `})}function qt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+zt(t)):e.value!==``+zt(t)&&(e.value=``+zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Yt(e,o,zt(n)):Yt(e,o,zt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+zt(s):e.removeAttribute(`name`)}function Jt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ht(e);return}n=n==null?``:``+zt(n),t=t==null?n:``+zt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ht(e)}function Yt(e,t,n){t===`number`&&Wt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Xt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+zt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Zt(e,t,n){if(t!=null&&(t=``+zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+zt(n)}function Qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ce(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ht(e)}function $t(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var en=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 tn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||en.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function nn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&tn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&tn(e,o,t[o])}function rn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){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 an=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`]]),on=/^[\\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 sn(e){return on.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function cn(){}var ln=null;function un(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dn=null,fn=null;function pn(e){var t=wt(e);if(t&&(e=t.stateNode)){var n=e[ht]||null;a:switch(e=t.stateNode,t.type){case`input`:if(qt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=\"`+Kt(``+t)+`\"][type=\"radio\"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ht]||null;if(!a)throw Error(i(90));qt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ut(r)}break a;case`textarea`:Zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Xt(e,!!n.multiple,t,!1)}}}var mn=!1;function hn(e,t,n){if(mn)return e(t,n);mn=!0;try{return e(t)}finally{if(mn=!1,(dn!==null||fn!==null)&&(bu(),dn&&(t=dn,e=fn,fn=dn=null,pn(t),e)))for(t=0;t<e.length;t++)pn(e[t])}}function gn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ht]||null;if(r===null)return null;n=r[t];a:switch(t){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)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var _n=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),vn=!1;if(_n)try{var yn={};Object.defineProperty(yn,`passive`,{get:function(){vn=!0}}),window.addEventListener(`test`,yn,yn),window.removeEventListener(`test`,yn,yn)}catch{vn=!1}var bn=null,xn=null,Sn=null;function Cn(){if(Sn)return Sn;var e,t=xn,n=t.length,r,i=`value`in bn?bn.value:bn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Sn=i.slice(e,1<r?1-r:void 0)}function wn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Tn(){return!0}function En(){return!1}function Dn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Tn:En,this.isPropagationStopped=En,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Tn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Tn)},persist:function(){},isPersistent:Tn}),t}var On={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kn=Dn(On),An=h({},On,{view:0,detail:0}),jn=Dn(An),Mn,Nn,Pn,Fn=h({},An,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Pn&&(Pn&&e.type===`mousemove`?(Mn=e.screenX-Pn.screenX,Nn=e.screenY-Pn.screenY):Nn=Mn=0,Pn=e),Mn)},movementY:function(e){return`movementY`in e?e.movementY:Nn}}),In=Dn(Fn),Ln=Dn(h({},Fn,{dataTransfer:0})),Rn=Dn(h({},An,{relatedTarget:0})),zn=Dn(h({},On,{animationName:0,elapsedTime:0,pseudoElement:0})),Bn=Dn(h({},On,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Vn=Dn(h({},On,{data:0})),Hn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Un={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`},j={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Wn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=j[e])?!!t[e]:!1}function Gn(){return Wn}var Kn=Dn(h({},An,{key:function(e){if(e.key){var t=Hn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=wn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Un[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gn,charCode:function(e){return e.type===`keypress`?wn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?wn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),qn=Dn(h({},Fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Jn=Dn(h({},An,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gn})),Yn=Dn(h({},On,{propertyName:0,elapsedTime:0,pseudoElement:0})),Xn=Dn(h({},Fn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Zn=Dn(h({},On,{newState:0,oldState:0})),Qn=[9,13,27,32],$n=_n&&`CompositionEvent`in window,er=null;_n&&`documentMode`in document&&(er=document.documentMode);var tr=_n&&`TextEvent`in window&&!er,nr=_n&&(!$n||er&&8<er&&11>=er),rr=` `,ir=!1;function ar(e,t){switch(e){case`keyup`:return Qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function or(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var sr=!1;function cr(e,t){switch(e){case`compositionend`:return or(t);case`keypress`:return t.which===32?(ir=!0,rr):null;case`textInput`:return e=t.data,e===rr&&ir?null:e;default:return null}}function lr(e,t){if(sr)return e===`compositionend`||!$n&&ar(e,t)?(e=Cn(),Sn=xn=bn=null,sr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return nr&&t.locale!==`ko`?null:t.data;default:return null}}var ur={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 dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ur[e.type]:t===`textarea`}function fr(e,t,n,r){dn?fn?fn.push(r):fn=[r]:dn=r,t=Ed(t,`onChange`),0<t.length&&(n=new kn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var pr=null,mr=null;function hr(e){yd(e,0)}function gr(e){if(Ut(Tt(e)))return e}function _r(e,t){if(e===`change`)return t}var vr=!1;if(_n){var yr;if(_n){var br=`oninput`in document;if(!br){var xr=document.createElement(`div`);xr.setAttribute(`oninput`,`return;`),br=typeof xr.oninput==`function`}yr=br}else yr=!1;vr=yr&&(!document.documentMode||9<document.documentMode)}function Sr(){pr&&(pr.detachEvent(`onpropertychange`,Cr),mr=pr=null)}function Cr(e){if(e.propertyName===`value`&&gr(mr)){var t=[];fr(t,mr,e,un(e)),hn(hr,t)}}function wr(e,t,n){e===`focusin`?(Sr(),pr=t,mr=n,pr.attachEvent(`onpropertychange`,Cr)):e===`focusout`&&Sr()}function Tr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return gr(mr)}function Er(e,t){if(e===`click`)return gr(t)}function Dr(e,t){if(e===`input`||e===`change`)return gr(t)}function Or(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var kr=typeof Object.is==`function`?Object.is:Or;function Ar(e,t){if(kr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ke.call(t,i)||!kr(e[i],t[i]))return!1}return!0}function jr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mr(e,t){var n=jr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=jr(n)}}function Nr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wt(e.document)}return t}function Fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ir=_n&&`documentMode`in document&&11>=document.documentMode,Lr=null,Rr=null,zr=null,Br=!1;function Vr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Br||Lr==null||Lr!==Wt(r)||(r=Lr,`selectionStart`in r&&Fr(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}),zr&&Ar(zr,r)||(zr=r,r=Ed(Rr,`onSelect`),0<r.length&&(t=new kn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Lr)))}function Hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ur={animationend:Hr(`Animation`,`AnimationEnd`),animationiteration:Hr(`Animation`,`AnimationIteration`),animationstart:Hr(`Animation`,`AnimationStart`),transitionrun:Hr(`Transition`,`TransitionRun`),transitionstart:Hr(`Transition`,`TransitionStart`),transitioncancel:Hr(`Transition`,`TransitionCancel`),transitionend:Hr(`Transition`,`TransitionEnd`)},Wr={},Gr={};_n&&(Gr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),`TransitionEvent`in window||delete Ur.transitionend.transition);function Kr(e){if(Wr[e])return Wr[e];if(!Ur[e])return e;var t=Ur[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Gr)return Wr[e]=t[n];return e}var qr=Kr(`animationend`),Jr=Kr(`animationiteration`),Yr=Kr(`animationstart`),Xr=Kr(`transitionrun`),Zr=Kr(`transitionstart`),Qr=Kr(`transitioncancel`),$r=Kr(`transitionend`),ei=new Map,ti=`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(` `);ti.push(`scrollEnd`);function ni(e,t){ei.set(e,t),At(t,[e])}var ri=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ii=[],ai=0,oi=0;function si(){for(var e=ai,t=oi=ai=0;t<e;){var n=ii[t];ii[t++]=null;var r=ii[t];ii[t++]=null;var i=ii[t];ii[t++]=null;var a=ii[t];if(ii[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&di(n,i,a)}}function ci(e,t,n,r){ii[ai++]=e,ii[ai++]=t,ii[ai++]=n,ii[ai++]=r,oi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function li(e,t,n,r){return ci(e,t,n,r),fi(e)}function ui(e,t){return ci(e,null,null,t),fi(e)}function di(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-A(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function fi(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pi={};function mi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,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 hi(e,t,n,r){return new mi(e,t,n,r)}function gi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _i(e,t){var n=e.alternate;return n===null?(n=hi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function vi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)gi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ne:return e=hi(31,n,t,a),e.elementType=ne,e.lanes=o,e;case y:return bi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=hi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case w:return e=hi(13,n,t,a),e.elementType=w,e.lanes=o,e;case T:return e=hi(19,n,t,a),e.elementType=T,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:s=10;break a;case ee:s=9;break a;case C:s=11;break a;case te:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=hi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function bi(e,t,n,r){return e=hi(7,e,r,t),e.lanes=n,e}function xi(e,t,n){return e=hi(6,e,null,t),e.lanes=n,e}function Si(e){var t=hi(18,null,null,0);return t.stateNode=e,t}function Ci(e,t,n){return t=hi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wi=new WeakMap;function Ti(e,t){if(typeof e==`object`&&e){var n=wi.get(e);return n===void 0?(t={value:e,source:t,stack:Oe(t)},wi.set(e,t),t):n}return{value:e,source:t,stack:Oe(t)}}var Ei=[],Di=0,Oi=null,ki=0,Ai=[],ji=0,Mi=null,Ni=1,Pi=``;function Fi(e,t){Ei[Di++]=ki,Ei[Di++]=Oi,Oi=e,ki=t}function Ii(e,t,n){Ai[ji++]=Ni,Ai[ji++]=Pi,Ai[ji++]=Mi,Mi=e;var r=Ni;e=Pi;var i=32-A(r)-1;r&=~(1<<i),n+=1;var a=32-A(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ni=1<<32-A(t)+i|n<<i|r,Pi=a+e}else Ni=1<<a|n<<i|r,Pi=e}function Li(e){e.return!==null&&(Fi(e,1),Ii(e,1,0))}function Ri(e){for(;e===Oi;)Oi=Ei[--Di],Ei[Di]=null,ki=Ei[--Di],Ei[Di]=null;for(;e===Mi;)Mi=Ai[--ji],Ai[ji]=null,Pi=Ai[--ji],Ai[ji]=null,Ni=Ai[--ji],Ai[ji]=null}function zi(e,t){Ai[ji++]=Ni,Ai[ji++]=Pi,Ai[ji++]=Mi,Ni=t.id,Pi=t.overflow,Mi=e}var Bi=null,M=null,N=!1,Vi=null,Hi=!1,Ui=Error(i(519));function Wi(e){throw Xi(Ti(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ui}function Gi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[mt]=e,t[ht]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Jt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Qt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=cn),t=!0):t=!1,t||Wi(e,!0)}function Ki(e){for(Bi=e.return;Bi;)switch(Bi.tag){case 5:case 31:case 13:Hi=!1;return;case 27:case 3:Hi=!0;return;default:Bi=Bi.return}}function qi(e){if(e!==Bi)return!1;if(!N)return Ki(e),N=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&M&&Wi(e),Ki(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));M=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));M=uf(e)}else t===27?(t=M,Zd(e.type)?(e=lf,lf=null,M=e):M=t):M=Bi?cf(e.stateNode.nextSibling):null;return!0}function Ji(){M=Bi=null,N=!1}function Yi(){var e=Vi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Vi=null),e}function Xi(e){Vi===null?Vi=[e]:Vi.push(e)}var Zi=fe(null),Qi=null,$i=null;function ea(e,t,n){k(Zi,t._currentValue),t._currentValue=n}function ta(e){e._currentValue=Zi.current,pe(Zi)}function na(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ra(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),na(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),na(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ia(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;kr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===_e.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&ra(t,e,n,r),t.flags|=262144}function aa(e){for(e=e.firstContext;e!==null;){if(!kr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oa(e){Qi=e,$i=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function sa(e){return la(Qi,e)}function ca(e,t){return Qi===null&&oa(e),la(e,t)}function la(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$i===null){if(e===null)throw Error(i(308));$i=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $i=$i.next=t;return n}var ua=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},da=t.unstable_scheduleCallback,fa=t.unstable_NormalPriority,P={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pa(){return{controller:new ua,data:new Map,refCount:0}}function ma(e){e.refCount--,e.refCount===0&&da(fa,function(){e.controller.abort()})}var ha=null,ga=0,_a=0,va=null;function ya(e,t){if(ha===null){var n=ha=[];ga=0,_a=dd(),va={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ga++,t.then(ba,ba),t}function ba(){if(--ga===0&&ha!==null){va!==null&&(va.status=`fulfilled`);var e=ha;ha=null,_a=0,va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function xa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Sa=D.S;D.S=function(e,t){eu=Pe(),typeof t==`object`&&t&&typeof t.then==`function`&&ya(e,t),Sa!==null&&Sa(e,t)};var Ca=fe(null);function wa(){var e=Ca.current;return e===null?K.pooledCache:e}function Ta(e,t){t===null?k(Ca,Ca.current):k(Ca,t.pool)}function Ea(){var e=wa();return e===null?null:{parent:P._currentValue,pool:e}}var Da=Error(i(460)),Oa=Error(i(474)),ka=Error(i(542)),Aa={then:function(){}};function ja(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ma(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(cn,cn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ia(e),e;default:if(typeof t.status==`string`)t.then(cn,cn);else{if(e=K,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ia(e),e}throw Pa=t,Da}}function Na(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Pa=e,Da):e}}var Pa=null;function Fa(){if(Pa===null)throw Error(i(459));var e=Pa;return Pa=null,e}function Ia(e){if(e===Da||e===ka)throw Error(i(483))}var La=null,Ra=0;function za(e){var t=Ra;return Ra+=1,La===null&&(La=[]),Ma(La,e,t)}function Ba(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Va(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ha(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=_i(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=xi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===E&&Na(i)===t.type)?(t=a(t,n.props),Ba(t,n),t.return=e,t):(t=yi(n.type,n.key,n.props,null,e.mode,r),Ba(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ci(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=bi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=xi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=yi(t.type,t.key,t.props,null,e.mode,n),Ba(n,t),n.return=e,n;case v:return t=Ci(t,e.mode,n),t.return=e,t;case E:return t=Na(t),f(e,t,n)}if(ce(t)||ae(t))return t=bi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,za(t),n);if(t.$$typeof===S)return f(e,ca(e,t),n);Va(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case E:return n=Na(n),p(e,t,n,r)}if(ce(n)||ae(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,za(n),r);if(n.$$typeof===S)return p(e,t,ca(e,n),r);Va(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=Na(r),m(e,t,n,r,i)}if(ce(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,za(r),i);if(r.$$typeof===S)return m(e,t,n,ca(t,r),i);Va(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),N&&Fi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return N&&Fi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),N&&Fi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),N&&Fi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return N&&Fi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),N&&Fi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Na(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ba(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=bi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=yi(o.type,o.key,o.props,null,e.mode,c),Ba(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ci(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Na(o),b(e,r,o,c)}if(ce(o))return h(e,r,o,c);if(ae(o)){if(l=ae(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,za(o),c);if(o.$$typeof===S)return b(e,r,ca(e,o),c);Va(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=xi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ra=0;var i=b(e,t,n,r);return La=null,i}catch(t){if(t===Da||t===ka)throw t;var a=hi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ua=Ha(!0),Wa=Ha(!1),Ga=!1;function Ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=fi(e),di(e,null,n),t}return ci(e,r,t,n),fi(e)}function Xa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}function Za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Qa=!1;function $a(){if(Qa){var e=va;if(e!==null)throw e}}function eo(e,t,n,r){Qa=!1;var i=e.updateQueue;Ga=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===_a&&(Qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ga=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function to(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function no(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)to(n[e],t)}var ro=fe(null),io=fe(0);function ao(e,t){e=Wl,k(io,e),k(ro,t),Wl=e|t.baseLanes}function oo(){k(io,Wl),k(ro,ro.current)}function so(){Wl=io.current,pe(ro),pe(io)}var co=fe(null),lo=null;function uo(e){var t=e.alternate;k(F,F.current&1),k(co,e),lo===null&&(t===null||ro.current!==null||t.memoizedState!==null)&&(lo=e)}function fo(e){k(F,F.current),k(co,e),lo===null&&(lo=e)}function po(e){e.tag===22?(k(F,F.current),k(co,e),lo===null&&(lo=e)):mo(e)}function mo(){k(F,F.current),k(co,co.current)}function ho(e){pe(co),lo===e&&(lo=null),pe(F)}var F=fe(0);function go(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _o=0,I=null,L=null,R=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function z(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return _o=a,I=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Hs:Us,bo=!1,a=n(r,i),bo=!1,yo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){D.H=Vs;var t=L!==null&&L.next!==null;if(_o=0,R=L=I=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||V||(e=e.dependencies,e!==null&&aa(e)&&(V=!0))}function Oo(e,t,n,r){I=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,R=L=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Ws,o=t(n,r)}while(yo);return o}function ko(){var e=D.H,t=e.useState()[0];return t=typeof t.then==`function`?Fo(t):t,e=e.useState()[0],(L===null?null:L.memoizedState)!==e&&(I.flags|=1024),t}function Ao(){var e=xo!==0;return xo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}_o=0,R=L=I=null,yo=!1,So=xo=0,Co=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return R===null?I.memoizedState=R=e:R=R.next=e,R}function B(){if(L===null){var e=I.alternate;e=e===null?null:e.memoizedState}else e=L.next;var t=R===null?I.memoizedState:R.next;if(t!==null)R=t,L=e;else{if(e===null)throw I.alternate===null?Error(i(467)):Error(i(310));L=e,e={memoizedState:L.memoizedState,baseState:L.baseState,baseQueue:L.baseQueue,queue:L.queue,next:null},R===null?I.memoizedState=R=e:R=R.next=e}return R}function Po(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fo(e){var t=So;return So+=1,Co===null&&(Co=[]),e=Ma(Co,e,t),t=I,(R===null?t.memoizedState:R.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Hs:Us),e}function Io(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Fo(e);if(e.$$typeof===S)return sa(e)}throw Error(i(438,String(e)))}function Lo(e){var t=null,n=I.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=I.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Po(),I.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=re;return t.index++,n}function Ro(e,t){return typeof t==`function`?t(e):t}function zo(e){return Bo(B(),L,e)}function Bo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(_o&f)===f:(J&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===_a&&(d=!0);else if((_o&p)===p){u=u.next,p===_a&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,I.lanes|=p,Gl|=p;f=u.action,bo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,I.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!kr(o,e.memoizedState)&&(V=!0,d&&(n=va,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Vo(e){var t=B(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);kr(o,t.memoizedState)||(V=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ho(e,t,n){var r=I,a=B(),o=N;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!kr((L||a).memoizedState,n);if(s&&(a.memoizedState=n,V=!0),a=a.queue,ps(Go.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||R!==null&&R.memoizedState.tag&1){if(r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,a,n,t),null),K===null)throw Error(i(349));o||_o&127||Uo(r,t,n)}return n}function Uo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=I.updateQueue,t===null?(t=Po(),I.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wo(e,t,n,r){t.value=n,t.getSnapshot=r,Ko(t)&&qo(e)}function Go(e,t,n){return n(function(){Ko(t)&&qo(e)})}function Ko(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kr(e,n)}catch{return!0}}function qo(e){var t=ui(e,2);t!==null&&hu(t,e,2)}function Jo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),bo){Ge(!0);try{n()}finally{Ge(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:e},t}function Yo(e,t,n,r){return e.baseState=n,Bo(e,L,typeof r==`function`?r:Ro)}function Xo(e,t,n,r,a){if(Rs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};D.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Zo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Zo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=D.T,o={};D.T=o;try{var s=n(i,r),c=D.S;c!==null&&c(o,s),Qo(e,t,s)}catch(n){es(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),D.T=a}}else try{a=n(i,r),Qo(e,t,a)}catch(n){es(e,t,n)}}function Qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){$o(e,t,n)},function(n){return es(e,t,n)}):$o(e,t,n)}function $o(e,t,n){t.status=`fulfilled`,t.value=n,ts(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Zo(e,n)))}function es(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ts(t),t=t.next;while(t!==r)}e.action=null}function ts(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ns(e,t){return t}function rs(e,t){if(N){var n=K.formState;if(n!==null){a:{var r=I;if(N){if(M){b:{for(var i=M,a=Hi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){M=cf(i.nextSibling),r=i.data===`F!`;break a}}Wi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:t},n.queue=r,n=Fs.bind(null,I,r),r.dispatch=n,r=Jo(!1),a=Ls.bind(null,I,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Xo.bind(null,I,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function is(e){return as(B(),L,e)}function as(e,t,n){if(t=Bo(e,t,ns)[0],e=zo(Ro)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Fo(t)}catch(e){throw e===Da?ka:e}else r=t;t=B();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(I.flags|=2048,cs(9,{destroy:void 0},os.bind(null,i,n),null)),[r,a,e]}function os(e,t){e.action=t}function ss(e){var t=B(),n=L;if(n!==null)return as(t,n,e);B(),t=t.memoizedState,n=B();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function cs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=I.updateQueue,t===null&&(t=Po(),I.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ls(){return B().memoizedState}function us(e,t,n,r){var i=No();I.flags|=e,i.memoizedState=cs(1|t,{destroy:void 0},n,r===void 0?null:r)}function ds(e,t,n,r){var i=B();r=r===void 0?null:r;var a=i.memoizedState.inst;L!==null&&r!==null&&To(r,L.memoizedState.deps)?i.memoizedState=cs(t,a,n,r):(I.flags|=e,i.memoizedState=cs(1|t,a,n,r))}function fs(e,t){us(8390656,8,e,t)}function ps(e,t){ds(2048,8,e,t)}function ms(e){I.flags|=4;var t=I.updateQueue;if(t===null)t=Po(),I.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function hs(e){var t=B().memoizedState;return ms({ref:t,nextImpl:e}),function(){if(G&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function gs(e,t){return ds(4,2,e,t)}function _s(e,t){return ds(4,4,e,t)}function vs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ys(e,t,n){n=n==null?null:n.concat([e]),ds(4,4,vs.bind(null,t,e),n)}function bs(){}function xs(e,t){var n=B();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ss(e,t){var n=B();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),bo){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r}function Cs(e,t,n){return n===void 0||_o&1073741824&&!(J&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),I.lanes|=e,Gl|=e,n)}function ws(e,t,n,r){return kr(n,t)?n:ro.current===null?!(_o&42)||_o&1073741824&&!(J&261930)?(V=!0,e.memoizedState=n):(e=mu(),I.lanes|=e,Gl|=e,t):(e=Cs(e,n,r),kr(e,t)||(V=!0),e)}function Ts(e,t,n,r,i){var a=O.p;O.p=a!==0&&8>a?a:8;var o=D.T,s={};D.T=s,Ls(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Is(e,t,xa(c,r),pu(e)):Is(e,t,r,pu(e))}catch(n){Is(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function Es(){}function Ds(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Os(e).queue;Ts(e,a,t,le,n===null?Es:function(){return ks(e),n(r)})}function Os(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ks(e){var t=Os(e);t.next===null&&(t=e.alternate.memoizedState),Is(e,t.next.queue,{},pu())}function As(){return sa(Qf)}function js(){return B().memoizedState}function Ms(){return B().memoizedState}function Ns(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ja(n);var r=Ya(t,e,n);r!==null&&(hu(r,t,n),Xa(r,t,n)),t={cache:pa()},e.payload=t;return}t=t.return}}function Ps(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Rs(e)?zs(t,n):(n=li(e,t,n,r),n!==null&&(hu(n,e,r),Bs(n,t,r)))}function Fs(e,t,n){Is(e,t,n,pu())}function Is(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rs(e))zs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,kr(s,o))return ci(e,t,i,0),K===null&&si(),!1}catch{}if(n=li(e,t,i,r),n!==null)return hu(n,e,r),Bs(n,t,r),!0}return!1}function Ls(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Rs(e)){if(t)throw Error(i(479))}else t=li(e,n,r,2),t!==null&&hu(t,e,2)}function Rs(e){var t=e.alternate;return e===I||t!==null&&t===I}function zs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var Vs={readContext:sa,use:Io,useCallback:z,useContext:z,useEffect:z,useImperativeHandle:z,useLayoutEffect:z,useInsertionEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useSyncExternalStore:z,useId:z,useHostTransitionStatus:z,useFormState:z,useActionState:z,useOptimistic:z,useMemoCache:z,useCacheRefresh:z};Vs.useEffectEvent=z;var Hs={readContext:sa,use:Io,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:sa,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(bo){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(bo){Ge(!0);try{n(t)}finally{Ge(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ps.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,n=Fs.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bs,useDeferredValue:function(e,t){return Cs(No(),e,t)},useTransition:function(){var e=Jo(!1);return e=Ts.bind(null,I,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,a=No();if(N){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),K===null)throw Error(i(349));J&127||Uo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,fs(Go.bind(null,r,o,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=K.identifierPrefix;if(N){var n=Pi,r=Ni;n=(r&~(1<<32-A(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:As,useFormState:rs,useActionState:rs,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ls.bind(null,I,!0,n),n.dispatch=t,[e,t]},useMemoCache:Lo,useCacheRefresh:function(){return No().memoizedState=Ns.bind(null,I)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(G&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Us={readContext:sa,use:Io,useCallback:xs,useContext:sa,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:zo,useRef:ls,useState:function(){return zo(Ro)},useDebugValue:bs,useDeferredValue:function(e,t){return ws(B(),L.memoizedState,e,t)},useTransition:function(){var e=zo(Ro)[0],t=B().memoizedState;return[typeof e==`boolean`?e:Fo(e),t]},useSyncExternalStore:Ho,useId:js,useHostTransitionStatus:As,useFormState:is,useActionState:is,useOptimistic:function(e,t){return Yo(B(),L,e,t)},useMemoCache:Lo,useCacheRefresh:Ms};Us.useEffectEvent=hs;var Ws={readContext:sa,use:Io,useCallback:xs,useContext:sa,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:Vo,useRef:ls,useState:function(){return Vo(Ro)},useDebugValue:bs,useDeferredValue:function(e,t){var n=B();return L===null?Cs(n,e,t):ws(n,L.memoizedState,e,t)},useTransition:function(){var e=Vo(Ro)[0],t=B().memoizedState;return[typeof e==`boolean`?e:Fo(e),t]},useSyncExternalStore:Ho,useId:js,useHostTransitionStatus:As,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){var n=B();return L===null?(n.baseState=e,[e,n.queue.dispatch]):Yo(n,L,e,t)},useMemoCache:Lo,useCacheRefresh:Ms};Ws.useEffectEvent=hs;function Gs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ks={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ja(r);i.payload=t,n!=null&&(i.callback=n),t=Ya(e,i,r),t!==null&&(hu(t,e,r),Xa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ja(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ya(e,i,r),t!==null&&(hu(t,e,r),Xa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ja(n);r.tag=2,t!=null&&(r.callback=t),t=Ya(e,r,n),t!==null&&(hu(t,e,n),Xa(t,e,n))}};function qs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ar(n,r)||!Ar(i,a):!0}function Js(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ks.enqueueReplaceState(t,t.state,null)}function Ys(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Xs(e){ri(e)}function Zs(e){console.error(e)}function Qs(e){ri(e)}function $s(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ec(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){return n=Ja(n),n.tag=3,n.payload={element:null},n.callback=function(){$s(e,t)},n}function nc(e){return e=Ja(e),e.tag=3,e}function rc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ec(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ec(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ic(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ia(t,n,a,!0),n=co.current,n!==null){switch(n.tag){case 31:case 13:return lo===null?Du():n.alternate===null&&X===0&&(X=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Aa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===Aa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(N)return t=co.current,t===null?(r!==Ui&&(t=Error(i(423),{cause:r}),Xi(Ti(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ti(r,n),a=tc(e.stateNode,r,a),Za(e,a),X!==4&&(X=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ui&&(e=Error(i(422),{cause:r}),Xi(Ti(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ti(o,n),Xl===null?Xl=[o]:Xl.push(o),X!==4&&(X=2),t===null)return!0;r=Ti(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=tc(n.stateNode,r,e),Za(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=nc(a),rc(a,e,n,r),Za(n,a),!1}n=n.return}while(n!==null);return!1}var ac=Error(i(461)),V=!1;function oc(e,t,n,r){t.child=e===null?Wa(t,null,n,r):Ua(t,e.child,n,r)}function sc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return oa(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!V?(jo(e,t,i),jc(e,t,i)):(N&&s&&Li(t),t.flags|=1,oc(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!gi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lc(e,t,a,r,i)):(e=yi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Mc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ar:n,n(o,r)&&e.ref===t.ref)return jc(e,t,i)}return t.flags|=1,e=_i(a,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ar(a,r)&&e.ref===t.ref)if(V=!1,t.pendingProps=r=a,Mc(e,i))e.flags&131072&&(V=!0);else return t.lanes=e.lanes,jc(e,t,i)}return _c(e,t,n,r,i)}function uc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ta(t,a===null?null:a.cachePool),a===null?oo():ao(t,a),po(t);else return r=t.lanes=536870912,fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ta(t,null),oo(),mo(t)):(Ta(t,a.cachePool),ao(t,a),mo(t),t.memoizedState=null);return oc(e,t,i,n),t.child}function dc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fc(e,t,n,r,i){var a=wa();return a=a===null?null:{parent:P._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ta(t,null),oo(),po(t),e!==null&&ia(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return Ua(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,ho(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(N){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,dc(null,e);if(fo(t),(e=M)?(e=rf(e,Hi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi===null?null:{id:Ni,overflow:Pi},retryLane:536870912,hydrationErrors:null},n=Si(e),n.return=t,t.child=n,Bi=t,M=null)):e=null,e===null)throw Wi(t);return t.lanes=536870912,null}return pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(fo(t),a)if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(V||ia(e,t,n,!1),a=(n&e.childLanes)!==0,V||a){if(r=K,r!==null&&(s=ct(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ui(e,s),hu(r,e,s),ac;Du(),t=mc(e,t,n)}else e=o.treeContext,M=cf(s.nextSibling),Bi=t,N=!0,Vi=null,Hi=!1,e!==null&&zi(t,e),t=pc(t,r),t.flags|=4096;return t}return e=_i(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _c(e,t,n,r,i){return oa(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!V?(jo(e,t,i),jc(e,t,i)):(N&&r&&Li(t),t.flags|=1,oc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return oa(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!V?(jo(e,t,a),jc(e,t,a)):(N&&r&&Li(t),t.flags|=1,oc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if(oa(t),t.stateNode===null){var a=pi,o=n.contextType;typeof o==`object`&&o&&(a=sa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ks,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ka(t),o=n.contextType,a.context=typeof o==`object`&&o?sa(o):pi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Gs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ks.enqueueReplaceState(a,a.state,null),eo(t,r,a,i),$a(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ys(n,s);a.props=c;var l=a.context,u=n.contextType;o=pi,typeof u==`object`&&u&&(o=sa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Js(t,a,r,o),Ga=!1;var f=t.memoizedState;a.state=f,eo(t,r,a,i),$a(),l=t.memoizedState,s||f!==l||Ga?(typeof d==`function`&&(Gs(t,n,d,r),l=t.memoizedState),(c=Ga||qs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,qa(e,t),o=t.memoizedProps,u=Ys(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=pi,typeof l==`object`&&l&&(c=sa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Js(t,a,r,c),Ga=!1,f=t.memoizedState,a.state=f,eo(t,r,a,i),$a();var p=t.memoizedState;o!==d||f!==p||Ga||e!==null&&e.dependencies!==null&&aa(e.dependencies)?(typeof s==`function`&&(Gs(t,n,s,r),p=t.memoizedState),(u=Ga||qs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&aa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,gc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ua(t,e.child,null,i),t.child=Ua(t,null,n,i)):oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=jc(e,t,i),e}function bc(e,t,n,r){return Ji(),t.flags|=256,oc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:Ea()}}function Cc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function wc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(F.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(N){if(a?uo(t):mo(t),(e=M)?(e=rf(e,Hi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi===null?null:{id:Ni,overflow:Pi},retryLane:536870912,hydrationErrors:null},n=Si(e),n.return=t,t.child=n,Bi=t,M=null)):e=null,e===null)throw Wi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(mo(t),a=t.mode,c=Ec({mode:`hidden`,children:c},a),r=bi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(null,r)):(uo(t),Tc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(uo(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState===null?(mo(t),c=r.fallback,a=t.mode,r=Ec({mode:`visible`,children:r.children},a),c=bi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ua(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,t=dc(null,r)):(mo(t),t.child=e.child,t.flags|=128,t=null);else if(uo(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Xi({value:r,source:null,stack:null}),t=Dc(e,t,n)}else if(V||ia(e,t,n,!1),s=(n&e.childLanes)!==0,V||s){if(s=K,s!==null&&(r=ct(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ui(e,r),hu(s,e,r),ac;af(c)||Du(),t=Dc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,M=cf(c.nextSibling),Bi=t,N=!0,Vi=null,Hi=!1,e!==null&&zi(t,e),t=Tc(t,r.children),t.flags|=4096);return t}return a?(mo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=_i(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=bi(c,a,n,null),c.flags|=2):c=_i(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,dc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(a=c.cachePool,a===null?a=Ea():(l=P._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(e.child,r)):(uo(t),n=e.child,e=n.sibling,n=_i(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Tc(e,t){return t=Ec({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ec(e,t){return e=hi(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return Ua(t,e.child,null,n),e=Tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),na(e.return,t,n)}function kc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=F.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,k(F,o),oc(e,t,r,n),r=N?ki:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oc(e,n,t);else if(e.tag===19)Oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&go(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&go(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kc(t,!0,n,null,a,r);break;case`together`:kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function jc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ia(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=_i(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_i(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&aa(e))):!0}function Nc(e,t,n){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),ea(t,P,e.memoizedState.cache),Ji();break;case 27:case 5:be(t);break;case 4:ve(t,t.stateNode.containerInfo);break;case 10:ea(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,fo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(uo(t),e=jc(e,t,n),e===null?null:e.sibling):wc(e,t,n):(uo(t),t.flags|=128,null);uo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ia(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),k(F,F.current),r)break;return null;case 22:return t.lanes=0,uc(e,t,n,t.pendingProps);case 24:ea(t,P,e.memoizedState.cache)}return jc(e,t,n)}function Pc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)V=!0;else{if(!Mc(e,n)&&!(t.flags&128))return V=!1,Nc(e,t,n);V=!!(e.flags&131072)}else V=!1,N&&t.flags&1048576&&Ii(t,ki,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Na(t.elementType),t.type=e,typeof e==`function`)gi(e)?(r=Ys(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===C){t.tag=11,t=sc(null,t,e,r,n);break a}else if(a===te){t.tag=14,t=cc(null,t,e,r,n);break a}}throw t=se(e)||e,Error(i(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ys(r,t.pendingProps),yc(e,t,r,a,n);case 3:a:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,qa(e,t),eo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ea(t,P,r),r!==o.cache&&ra(t,[P],n,!0),$a(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=bc(e,t,r,n);break a}else if(r!==a){a=Ti(Error(i(424)),t),Xi(a),t=bc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(M=cf(e.firstChild),Bi=t,N=!0,Vi=null,Hi=!0,n=Wa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ji(),r===a){t=jc(e,t,n);break a}oc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:N||(n=t.type,e=t.pendingProps,r=Bd(ge.current).createElement(n),r[mt]=t,r[ht]=e,Pd(r,n,e),Dt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return be(t),e===null&&N&&(r=t.stateNode=ff(t.type,t.pendingProps,ge.current),Bi=t,Hi=!0,a=M,Zd(t.type)?(lf=a,M=cf(r.firstChild)):M=a),oc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&N&&((a=r=M)&&(r=tf(r,t.type,t.pendingProps,Hi),r===null?a=!1:(t.stateNode=r,Bi=t,M=cf(r.firstChild),Hi=!1,a=!0)),a||Wi(t)),be(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),Qf._currentValue=a),gc(e,t),oc(e,t,r,n),t.child;case 6:return e===null&&N&&((e=n=M)&&(n=nf(n,t.pendingProps,Hi),n===null?e=!1:(t.stateNode=n,Bi=t,M=null,e=!0)),e||Wi(t)),null;case 13:return wc(e,t,n);case 4:return ve(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ua(t,null,r,n):oc(e,t,r,n),t.child;case 11:return sc(e,t,t.type,t.pendingProps,n);case 7:return oc(e,t,t.pendingProps,n),t.child;case 8:return oc(e,t,t.pendingProps.children,n),t.child;case 12:return oc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ea(t,t.type,r.value),oc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,oa(t),a=sa(a),r=r(a),t.flags|=1,oc(e,t,r,n),t.child;case 14:return cc(e,t,t.type,t.pendingProps,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 19:return Ac(e,t,n);case 31:return hc(e,t,n);case 22:return uc(e,t,n,t.pendingProps);case 24:return oa(t),r=sa(P),e===null?(a=wa(),a===null&&(a=K,o=pa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ka(t),ea(t,P,a)):((e.lanes&n)!==0&&(qa(e,t),eo(t,null,null,n),$a()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ea(t,P,r),r!==a.cache&&ra(t,[P],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ea(t,P,r))),oc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Fc(e){e.flags|=4}function Ic(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Pa=Aa,Oa}else e.flags&=-16777217}function Lc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Pa=Aa,Oa}function Rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:nt(),e.lanes|=t,Yl|=t)}function zc(e,t){if(!N)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function H(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bc(e,t,n){var r=t.pendingProps;switch(Ri(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return H(t),null;case 1:return H(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ta(P),ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(qi(t)?Fc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yi())),H(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Fc(t),o===null?(H(t),Ic(t,a,null,r,n)):(H(t),Lc(t,o))):o?o===e.memoizedState?(H(t),t.flags&=-16777217):(Fc(t),H(t),Lc(t,o)):(e=e.memoizedProps,e!==r&&Fc(t),H(t),Ic(t,a,e,r,n)),null;case 27:if(xe(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return H(t),null}e=me.current,qi(t)?Gi(t,e):(e=ff(a,r,n),t.stateNode=e,Fc(t))}return H(t),null;case 5:if(xe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return H(t),null}if(o=me.current,qi(t))Gi(t,o);else{var s=Bd(ge.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[mt]=t,o[ht]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Fc(t)}}return H(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,qi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Bi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Wi(t,!0)}else e=Bd(e).createTextNode(r),e[mt]=t,t.stateNode=e}return H(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=qi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[mt]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),e=!1}else n=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ho(t),t):(ho(t),null);if(t.flags&128)throw Error(i(558))}return H(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=qi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[mt]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),a=!1}else a=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ho(t),t):(ho(t),null)}return ho(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Rc(t,t.updateQueue),H(t),null);case 4:return ye(),e===null&&Sd(t.stateNode.containerInfo),H(t),null;case 10:return ta(t.type),H(t),null;case 19:if(pe(F),r=t.memoizedState,r===null)return H(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)zc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=go(e),o!==null){for(t.flags|=128,zc(r,!1),e=o.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)vi(n,e),n=n.sibling;return k(F,F.current&1|2),N&&Fi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Pe()>tu&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304)}else{if(!a)if(e=go(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!N)return H(t),null}else 2*Pe()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(H(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Pe(),e.sibling=null,n=F.current,k(F,a?n&1|2:n&1),N&&Fi(t,r.treeForkCount),e);case 22:case 23:return ho(t),so(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&pe(Ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ta(P),H(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Vc(e,t){switch(Ri(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ta(P),ye(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xe(t),null;case 31:if(t.memoizedState!==null){if(ho(t),t.alternate===null)throw Error(i(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ho(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(F),null;case 4:return ye(),null;case 10:return ta(t.type),null;case 22:case 23:return ho(t),so(),e!==null&&pe(Ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ta(P),null;case 25:return null;default:return null}}function Hc(e,t){switch(Ri(t),t.tag){case 3:ta(P),ye();break;case 26:case 27:case 5:xe(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&ho(t);break;case 13:ho(t);break;case 19:pe(F);break;case 10:ta(t.type);break;case 22:case 23:ho(t),so(),e!==null&&pe(Ca);break;case 24:ta(P)}}function Uc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Wc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{no(t,n)}catch(t){Z(e,e.return,t)}}}function Kc(e,t,n){n.props=Ys(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Yc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ht]=t}catch(t){Z(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[mt]=e,t[ht]=n}catch(t){Z(e,e.return,t)}}var nl=!1,U=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=Pr(e),Fr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ys(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Uc(5,n);break;case 1:if(xl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Ys(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Gc(n),r&512&&qc(n,n.return);break;case 3:if(xl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{no(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&tl(n);case 26:case 5:xl(e,n),t===null&&r&4&&Yc(n),r&512&&qc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||nl,!r){t=t!==null&&t.memoizedState!==null||U,i=nl;var a=U;nl=r,(U=t)&&!a?Cl(e,n,(n.subtreeFlags&8772)!=0):xl(e,n),nl=i,U=a}break;case 30:break;default:xl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&St(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var W=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(We&&typeof We.onCommitFiberUnmount==`function`)try{We.onCommitFiberUnmount(Ue,n)}catch{}switch(n.tag){case 26:U||Jc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:U||Jc(n,t);var r=W,i=ll;Zd(n.type)&&(W=n.stateNode,ll=!1),ul(e,t,n),pf(n.stateNode),W=r,ll=i;break;case 5:U||Jc(n,t);case 6:if(r=W,i=ll,W=null,ul(e,t,n),W=r,ll=i,W!==null)if(ll)try{(W.nodeType===9?W.body:W.nodeName===`HTML`?W.ownerDocument.body:W).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{W.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:W!==null&&(ll?(e=W,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(W,n.stateNode));break;case 4:r=W,i=ll,W=n.stateNode.containerInfo,ll=!0,ul(e,t,n),W=r,ll=i;break;case 0:case 11:case 14:case 15:Wc(2,n,t),U||Wc(4,n,t),ul(e,t,n);break;case 1:U||(Jc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Kc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:U=(r=U)||n.memoizedState!==null,ul(e,t,n),U=r;break;default:ul(e,t,n)}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function gl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){W=c.stateNode,ll=!1;break a}break;case 5:W=c.stateNode,ll=!1;break a;case 3:case 4:W=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(W===null)throw Error(i(160));dl(o,s,a),W=null,ll=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Wc(3,e,e.return),Uc(3,e),Wc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),r&64&&nl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=_l;if(gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[xt]||o[mt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[mt]=e,Dt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[mt]=e,Dt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),n!==null&&r&4&&Xc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),e.flags&32){a=e.stateNode;try{$t(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Xc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(gl(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=_l,_l=gf(t.containerInfo),gl(t,e),_l=a,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}rl&&(rl=!1,bl(e));break;case 4:r=_l,_l=gf(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Pe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=nl,d=U;if(nl=u||a,U=d||l,gl(t,e),U=d,nl=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||nl||U||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Zc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;el(e,Qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&($t(o,``),n.flags&=-33),el(e,Qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;$c(e,Qc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wc(4,t,t.return),Sl(t);break;case 1:Jc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Kc(t,t.return,n),Sl(t);break;case 27:pf(t.stateNode);case 26:case 5:Jc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Cl(i,a,n),Uc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)to(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Gc(a),qc(a,a.return);break;case 27:tl(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&Yc(a),qc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),qc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ma(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Uc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e)));break;case 12:if(i&2048){El(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ol(a,o,s,c,i),Uc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&Gf(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=gf(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Wc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Wc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var Rl={getCacheForType:function(e){var t=sa(P),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return sa(P).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,G=0,K=null,q=null,J=0,Y=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,X=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return G&2&&J!==0?J&-J:D.T===null?dt():dd()}function mu(){if(Jl===0)if(!(J&536870912)||N){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),Jl=e}else Jl=536870912;return e=co.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===K&&(Y===2||Y===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,J,Jl,!1)),it(e,n),(!(G&2)||e!==K)&&(e===K&&(!(G&2)&&(Kl|=n),X===4&&yu(e,J,Jl,!1)),rd(e))}function gu(e,t,n){if(G&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||et(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Hl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Vl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Pe(),10<a)){if(yu(r,t,Jl,!Vl),$e(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Vl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Vl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:cn},Ml(t,a,d);var m=(a&62914560)===a?$l-Pe():(a&4194048)===a?eu-Pe():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!kr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-A(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ot(e,n,t)}function bu(){return G&6?!0:(id(0,!1),!1)}function xu(){if(q!==null){if(Y===0)var e=q.return;else e=q,$i=Qi=null,Mo(e),La=null,Ra=0,e=q;for(;e!==null;)Hc(e.alternate,e),e=e.return;q=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),K=e,q=n=_i(e.current,null),J=t,Y=0,Bl=null,Vl=!1,Hl=et(e,t),Ul=!1,Yl=Jl=ql=Kl=Gl=X=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-A(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,si(),n}function Cu(e,t){I=null,D.H=Vs,t===Da||t===ka?(t=Fa(),Y=3):t===Oa?(t=Fa(),Y=4):Y=t===ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,q===null&&(X=1,$s(e,Ti(t,e.current)))}function wu(){var e=co.current;return e===null?!0:(J&4194048)===J?lo===null:(J&62914560)===J||J&536870912?e===lo:!1}function Tu(){var e=D.H;return D.H=Vs,e===null?Vs:e}function Eu(){var e=D.A;return D.A=Rl,e}function Du(){X=4,Vl||(J&4194048)!==J&&co.current!==null||(Hl=!0),!(Gl&134217727)&&!(Kl&134217727)||K===null||yu(K,J,Jl,!1)}function Ou(e,t,n){var r=G;G|=2;var i=Tu(),a=Eu();(K!==e||J!==t)&&(nu=null,Su(e,t)),t=!1;var o=X;a:do try{if(Y!==0&&q!==null){var s=q,c=Bl;switch(Y){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:co.current===null&&(t=!0);var l=Y;if(Y=0,Bl=null,Pu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=Y,Y=0,Bl=null,Pu(e,s,c,l)}}ku(),o=X;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,$i=Qi=null,G=r,D.H=i,D.A=a,q===null&&(K=null,J=0,si()),o}function ku(){for(;q!==null;)Mu(q)}function Au(e,t){var n=G;G|=2;var r=Tu(),a=Eu();K!==e||J!==t?(nu=null,tu=Pe()+500,Su(e,t)):Hl=et(e,t);a:do try{if(Y!==0&&q!==null){t=q;var o=Bl;b:switch(Y){case 1:Y=0,Bl=null,Pu(e,t,o,1);break;case 2:case 9:if(ja(o)){Y=0,Bl=null,Nu(t);break}t=function(){Y!==2&&Y!==9||K!==e||(Y=7),rd(e)},o.then(t,t);break a;case 3:Y=7;break a;case 4:Y=5;break a;case 7:ja(o)?(Y=0,Bl=null,Nu(t)):(Y=0,Bl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(q.tag){case 26:s=q.memoizedState;case 5:case 27:var c=q;if(s?Wf(s):c.stateNode.complete){Y=0,Bl=null;var l=c.sibling;if(l!==null)q=l;else{var u=c.return;u===null?q=null:(q=u,Fu(u))}break b}}Y=0,Bl=null,Pu(e,t,o,5);break;case 6:Y=0,Bl=null,Pu(e,t,o,6);break;case 8:xu(),X=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return $i=Qi=null,D.H=r,D.A=a,G=n,q===null?(K=null,J=0,si(),X):0}function ju(){for(;q!==null&&!Me();)Mu(q)}function Mu(e){var t=Pc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,J);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,J);break;case 5:Mo(t);default:Hc(n,t),t=q=vi(t,Wl),t=Pc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Pu(e,t,n,r){$i=Qi=null,Mo(t),La=null,Ra=0;var i=t.return;try{if(ic(e,i,t,n,J)){X=1,$s(e,Ti(n,e.current)),q=null;return}}catch(t){if(i!==null)throw q=i,t;X=1,$s(e,Ti(n,e.current)),q=null;return}t.flags&32768?(N||r===1?e=!0:Hl||J&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=co.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Vl);return}e=t.return;var n=Bc(t.alternate,t,Wl);if(n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);X===0&&(X=5)}function Iu(e,t){do{var n=Vc(e.alternate,e);if(n!==null){n.flags&=32767,q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){q=e;return}q=e=n}while(e!==null);X=6,q=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(G&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=oi,at(e,n,o,s,c,l),e===K&&(q=K=null,J=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Re,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=D.T,D.T=null,a=O.p,O.p=2,s=G,G|=4;try{ol(e,t,n)}finally{G=s,O.p=a,D.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=G;G|=4;try{vl(t,e);var a=zd,o=Pr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Nr(s.ownerDocument.documentElement,s)){if(c!==null&&Fr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Mr(s,h),v=Mr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{G=i,O.p=r,D.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=G;G|=4;try{sl(e,t.alternate,t)}finally{G=i,O.p=r,D.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Ne();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),ut(n),t=t.stateNode,We&&typeof We.onCommitFiberRoot==`function`)try{We.onCommitFiberRoot(Ue,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=D.T,i=O.p,O.p=2,D.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{D.T=t,O.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ma(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=ut(su),r=D.T,a=O.p;try{O.p=32>n?32:n,D.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(i(331));var c=G;if(G|=4,Fl(o.current),Dl(o,o.current,s,n),G=c,id(0,!1),We&&typeof We.onPostCommitFiberRoot==`function`)try{We.onPostCommitFiberRoot(Ue,o)}catch{}return!0}finally{O.p=a,D.T=r,Vu(e,t)}}function Wu(e,t,n){t=Ti(n,t),t=tc(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(it(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=Ti(n,e),n=nc(2),r=Ya(t,n,2),r!==null&&(rc(n,r,t,e),it(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>Pe()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=nt()),e=ui(e,t),e!==null&&(it(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ae(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-A(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=$e(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Pe(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-A(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=K,n=J,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Y===2||Y===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&je(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&je(r),ut(n)){case 2:case 8:n=Le;break;case 32:n=Re;break;case 268435456:n=Be;break;default:n=Re}return r=cd.bind(null,e),n=Ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&je(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=J;return r=$e(e,e===K?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Pe()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){G&6?Ae(Ie,ad):od()})}function dd(){if(nd===0){var e=_a;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:sn(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ht]||null).action),o=r.submitter;o&&(t=(t=o[ht]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new kn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Ds(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Ds(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<ti.length;hd++){var gd=ti[hd];ni(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}ni(qr,`onAnimationEnd`),ni(Jr,`onAnimationIteration`),ni(Yr,`onAnimationStart`),ni(`dblclick`,`onDoubleClick`),ni(`focusin`,`onFocus`),ni(`focusout`,`onBlur`),ni(Xr,`onTransitionRun`),ni(Zr,`onTransitionStart`),ni(Qr,`onTransitionCancel`),ni($r,`onTransitionEnd`),jt(`onMouseEnter`,[`mouseout`,`mouseover`]),jt(`onMouseLeave`,[`mouseout`,`mouseover`]),jt(`onPointerEnter`,[`pointerout`,`pointerover`]),jt(`onPointerLeave`,[`pointerout`,`pointerover`]),At(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),At(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),At(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),At(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ri(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ri(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[_t];n===void 0&&(n=t[_t]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Ot.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!vn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}hn(function(){var r=a,i=un(n),s=[];a:{var c=ei.get(e);if(c!==void 0){var l=kn,u=e;switch(e){case`keypress`:if(wn(n)===0)break a;case`keydown`:case`keyup`:l=Kn;break;case`focusin`:u=`focus`,l=Rn;break;case`focusout`:u=`blur`,l=Rn;break;case`beforeblur`:case`afterblur`:l=Rn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=In;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Ln;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Jn;break;case qr:case Jr:case Yr:l=zn;break;case $r:l=Yn;break;case`scroll`:case`scrollend`:l=jn;break;case`wheel`:l=Xn;break;case`copy`:case`cut`:case`paste`:l=Bn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=qn;break;case`toggle`:case`beforetoggle`:l=Zn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=gn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==ln&&(u=n.relatedTarget||n.fromElement)&&(Ct(u)||u[gt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ct(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=In,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=qn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Tt(l),h=u==null?c:Tt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?Tt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=_r;else if(dr(c))if(vr)v=Dr;else{v=Tr;var y=wr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&rn(r.elementType)&&(v=_r):v=Er;if(v&&=v(e,r)){fr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Yt(c,`number`,c.value)}switch(y=r?Tt(r):window,e){case`focusin`:(dr(y)||y.contentEditable===`true`)&&(Lr=y,Rr=r,zr=null);break;case`focusout`:zr=Rr=Lr=null;break;case`mousedown`:Br=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Br=!1,Vr(s,n,i);break;case`selectionchange`:if(Ir)break;case`keydown`:case`keyup`:Vr(s,n,i)}var b;if($n)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else sr?ar(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(nr&&n.locale!==`ko`&&(sr||x!==`onCompositionStart`?x===`onCompositionEnd`&&sr&&(b=Cn()):(bn=i,xn=`value`in bn?bn.value:bn.textContent,sr=!0)),y=Ed(r,x),0<y.length&&(x=new Vn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=or(n),b!==null&&(x.data=b)))),(b=tr?cr(e,n):lr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Vn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=gn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=gn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=gn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=gn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\\r\\n?/g,Ad=/\\u0000|\\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`\n`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&$t(e,``+r);break;case`className`:Lt(e,`class`,r);break;case`tabIndex`:Lt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Lt(e,n,r);break;case`style`:nn(e,r,o);break;case`data`:if(t!==`object`){Lt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.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`){e.removeAttribute(`xlink:href`);break}n=sn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);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`?e.setAttribute(n,``+r):e.removeAttribute(n);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`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),It(e,`popover`,r);break;case`xlinkActuate`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:It(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=an.get(n)||n,It(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:nn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&$t(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!kt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ht]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):It(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Jt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Xt(e,!!r,n,!0):Xt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}Qt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(rn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}qt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Xt(e,!!n,n?[]:``,!1):Xt(e,!!n,t,!0)):Xt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Zt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(rn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[xt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),St(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[xt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);St(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=O.d;O.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=wt(e);t!==null&&t.tag===5&&t.type===`form`?ks(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Kt(t);i=`link[rel=\"`+e+`\"][href=\"`+i+`\"]`,typeof n==`string`&&(i+=`[crossorigin=\"`+n+`\"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel=\"preload\"][as=\"`+Kt(t)+`\"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset=\"`+Kt(n.imageSrcSet)+`\"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes=\"`+Kt(n.imageSizes)+`\"]`)):i+=`[href=\"`+Kt(e)+`\"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel=\"modulepreload\"][as=\"`+Kt(r)+`\"][href=\"`+Kt(e)+`\"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Et(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,\"data-precedence\":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Dt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ge.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Et(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Et(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Et(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href=\"`+Kt(e)+`\"`}function jf(e){return`link[rel=\"stylesheet\"][`+e+`]`}function Mf(e){return h({},e,{\"data-precedence\":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel=\"preload\"][as=\"style\"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Dt(t),e.head.appendChild(t))}function Pf(e){return`[src=\"`+Kt(e)+`\"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~=\"`+Kt(n.href)+`\"]`);if(r)return t.instance=r,Dt(r),r;var a=h({},n,{\"data-href\":n.href,\"data-precedence\":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Dt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Dt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Dt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel=\"stylesheet\"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[xt]||a[mt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:S,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=hi(3,null,null,t),e.current=a,a.stateNode=e,t=pa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ka(a),e}function tp(e){return e?(e=pi,e):pi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ya(e,r,t),n!==null&&(hu(n,e,t),Xa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ui(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=lt(t);var n=ui(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=2,up(e,t,n,r)}finally{O.p=a,D.T=i}}function lp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=8,up(e,t,n,r)}finally{O.p=a,D.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=wt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-A(o);s.entanglements[1]|=c,o&=~c}rd(a),!(G&6)&&(tu=Pe()+500,id(0,!1))}}break;case 31:case 13:s=ui(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=un(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=Ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){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(Fe()){case Ie:return 2;case Le:return 8;case Re:case ze:return 32;case Be:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=wt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=Ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ft(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ft(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ln=r,n.target.dispatchEvent(r),ln=null}else return t=wt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=wt(n);a!==null&&(e.splice(t,3),t-=3,Ds(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ht]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ht]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[gt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.4`)throw Error(i(527,Lp,`19.2.4`));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:D,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ue=zp.inject(Rp),We=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Xs,s=Zs,c=Qs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[gt]=t.current,Sd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()}))(),_=c(u(),1),v=`modulepreload`,y=function(e){return`/`+e},b={},x=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=y(t,n),t in b)return;b[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel=\"stylesheet\"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href=\"${t}\"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:v,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ee=`popstate`;function S(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function C(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=ie(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),ne(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:re(t))}function r(e,t){T(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return ae(t,n,r,e)}function w(e,t){if(e===!1||e==null)throw Error(t)}function T(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function te(){return Math.random().toString(36).substring(2,10)}function E(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ne(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?ie(t):t,state:n,key:t&&t.key||r||te(),unstable_mask:i}}function re({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function ie(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ae(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=S(e)?e:ne(h.location,e,t);n&&n(r,e),l=u()+1;let d=E(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=S(e)?e:ne(h.location,e,t);n&&n(r,e),l=u();let i=E(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return oe(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(ee,d),c=e,()=>{i.removeEventListener(ee,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function oe(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),w(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:re(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function se(e,t,n=`/`){return ce(e,t,n,!1)}function ce(e,t,n,r){let i=Ce((typeof t==`string`?ie(t):t).pathname||`/`,n);if(i==null)return null;let a=O(e);ue(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=Se(i);o=ye(a[e],t,r)}return o}function D(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function O(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;w(c.relativePath.startsWith(r),`Absolute route path \"${c.relativePath}\" nested under path \"${r}\" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=je([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(w(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path \"${l}\".`),O(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:_e(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of le(e.path))a(e,t,!0,n)}),t}function le(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=le(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ue(e){e.sort((e,t)=>e.score===t.score?ve(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var de=/^:[\\w-]+$/,fe=3,pe=2,k=1,me=10,he=-2,ge=e=>e===`*`;function _e(e,t){let n=e.split(`/`),r=n.length;return n.some(ge)&&(r+=he),t&&(r+=pe),n.filter(e=>!ge(e)).reduce((e,t)=>e+(de.test(t)?fe:t===``?k:me),r)}function ve(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ye(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=be({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=be({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:je([a,u.pathname]),pathnameBase:Me(je([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=je([a,u.pathnameBase]))}return o}function be(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=xe(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function xe(e,t=!1,n=!0){T(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path \"${e}\" will be treated as if it were \"${e.replace(/\\*$/,`/*`)}\" because the \\`*\\` character must always follow a \\`/\\` in the pattern. To get rid of this warning, please change the route path to \"${e.replace(/\\*$/,`/*`)}\".`);let r=[],i=`^`+e.replace(/\\/*\\*?$/,``).replace(/^\\/*/,`/`).replace(/[\\\\.*+^${}|()[\\]]/g,`\\\\$&`).replace(/\\/:([\\w-]+)(\\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\\\/]*)`:`(?:/([^\\\\/]*))?`}return`/([^\\\\/]+)`}).replace(/\\/([\\w-]+)\\?(\\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\\\/(.+)|\\\\/*)$`):n?i+=`\\\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Se(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\\//g,`%2F`)).join(`/`)}catch(t){return T(!1,`The URL path \"${e}\" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ce(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var we=/^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;function Te(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?ie(e):e,a;return n?(n=n.replace(/\\/\\/+/g,`/`),a=n.startsWith(`/`)?Ee(n.substring(1),`/`):Ee(n,t)):a=t,{pathname:a,search:Ne(r),hash:Pe(i)}}function Ee(e,t){let n=t.replace(/\\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function De(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \\`to.${t}\\` field [${JSON.stringify(r)}].  Please separate it out to the \\`to.${n}\\` field. Alternatively you may provide the full path as a string in <Link to=\"...\"> and the router will parse it for you.`}function Oe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ke(e){let t=Oe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ae(e,t,n,r=!1){let i;typeof e==`string`?i=ie(e):(i={...e},w(!i.pathname||!i.pathname.includes(`?`),De(`?`,`pathname`,`search`,i)),w(!i.pathname||!i.pathname.includes(`#`),De(`#`,`pathname`,`hash`,i)),w(!i.search||!i.search.includes(`#`),De(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Te(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var je=e=>e.join(`/`).replace(/\\/\\/+/g,`/`),Me=e=>e.replace(/\\/+$/,``).replace(/^\\/*/,`/`),Ne=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Pe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Fe=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ie(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Le(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\\/\\/*/g,`/`)||`/`}var Re=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ze(e,t){let n=e;if(typeof n!=`string`||!we.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Re)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=Ce(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{T(!1,`<Link to=\"${n}\"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\\0`);var Be=_.createContext(null);Be.displayName=`DataRouter`;var Ve=_.createContext(null);Ve.displayName=`DataRouterState`;var He=_.createContext(!1),Ue=_.createContext({isTransitioning:!1});Ue.displayName=`ViewTransition`;var We=_.createContext(new Map);We.displayName=`Fetchers`;var Ge=_.createContext(null);Ge.displayName=`Await`;var A=_.createContext(null);A.displayName=`Navigation`;var Ke=_.createContext(null);Ke.displayName=`Location`;var qe=_.createContext({outlet:null,matches:[],isDataRoute:!1});qe.displayName=`Route`;var Je=_.createContext(null);Je.displayName=`RouteError`;var Ye=`REACT_ROUTER_ERROR`,Xe=`REDIRECT`,Ze=`ROUTE_ERROR_RESPONSE`;function Qe(e){if(e.startsWith(`${Ye}:${Xe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function $e(e){if(e.startsWith(`${Ye}:${Ze}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Fe(t.status,t.statusText,t.data)}catch{}}function et(e,{relative:t}={}){w(tt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext(A),{hash:i,pathname:a,search:o}=st(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:je([n,a])),r.createHref({pathname:s,search:o,hash:i})}function tt(){return _.useContext(Ke)!=null}function nt(){return w(tt(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(Ke).location}var rt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function it(e){_.useContext(A).static||_.useLayoutEffect(e)}function at(){let{isDataRoute:e}=_.useContext(qe);return e?Et():ot()}function ot(){w(tt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(Be),{basename:t,navigator:n}=_.useContext(A),{matches:r}=_.useContext(qe),{pathname:i}=nt(),a=JSON.stringify(ke(r)),o=_.useRef(!1);return it(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(T(o.current,rt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ae(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:je([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}_.createContext(null);function st(e,{relative:t}={}){let{matches:n}=_.useContext(qe),{pathname:r}=nt(),i=JSON.stringify(ke(n));return _.useMemo(()=>Ae(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ct(e,t){return lt(e,t)}function lt(e,t,n){w(tt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext(A),{matches:i}=_.useContext(qe),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Ot(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \\`useRoutes()\\`) at \"${s}\" (under <Route path=\"${e}\">) but the parent route path has no trailing \"*\". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path=\"${e}\"> to <Route path=\"${e===`/`?`*`:`${e}/*`}\">.`)}let u=nt(),d;if(t){let e=typeof t==`string`?ie(t):t;w(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \\`<Routes location>\\` or \\`useRoutes(routes, location)\\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is \"${c}\" but pathname \"${e.pathname}\" was given in the \\`location\\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\\//,``).split(`/`);p=`/`+f.replace(/^\\//,``).split(`/`).slice(e.length).join(`/`)}let m=se(e,{pathname:p});T(l||m!=null,`No routes matched location \"${d.pathname}${d.search}${d.hash}\" `),T(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location \"${d.pathname}${d.search}${d.hash}\" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an \"empty\" page.`);let h=gt(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:je([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:je([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(Ke.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function ut(){let e=Tt(),t=Ie(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=_.createElement(_.Fragment,null,_.createElement(`p`,null,`💿 Hey developer 👋`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var dt=_.createElement(ut,null),ft=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=$e(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(qe.Provider,{value:this.props.routeContext},_.createElement(Je.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(mt,{error:e},t):t}};ft.contextType=He;var pt=new WeakMap;function mt({children:e,error:t}){let{basename:n}=_.useContext(A);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Qe(t.digest);if(e){let r=pt.get(t);if(r)throw r;let i=ze(e.location,n);if(Re&&!pt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw pt.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function ht({routeContext:e,match:t,children:n}){let r=_.useContext(Be);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(qe.Provider,{value:e},n)}function gt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);w(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Le(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||dt,o&&(s<0&&c===0?(Ot(`route-fallback`,!1,\"No `HydrateFallback` element provided to render during initial hydration\"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(ht,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(ft,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function _t(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function vt(e){let t=_.useContext(Be);return w(t,_t(e)),t}function yt(e){let t=_.useContext(Ve);return w(t,_t(e)),t}function bt(e){let t=_.useContext(qe);return w(t,_t(e)),t}function xt(e){let t=bt(e),n=t.matches[t.matches.length-1];return w(n.route.id,`${e} can only be used on routes that contain a unique \"id\"`),n.route.id}function St(){return xt(`useRouteId`)}function Ct(){return yt(`useNavigation`).navigation}function wt(){let{matches:e,loaderData:t}=yt(`useMatches`);return _.useMemo(()=>e.map(e=>D(e,t)),[e,t])}function Tt(){let e=_.useContext(Je),t=yt(`useRouteError`),n=xt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Et(){let{router:e}=vt(`useNavigate`),t=xt(`useNavigate`),n=_.useRef(!1);return it(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{T(n.current,rt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Dt={};function Ot(e,t,n){!t&&!Dt[e]&&(Dt[e]=!0,T(!1,n))}_.useOptimistic,_.memo(kt);function kt({routes:e,future:t,state:n,isStatic:r,onError:i}){return lt(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function At({to:e,replace:t,state:n,relative:r}){w(tt(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=_.useContext(A);T(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=_.useContext(qe),{pathname:o}=nt(),s=at(),c=Ae(e,ke(a),o,r===`path`),l=JSON.stringify(c);return _.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function jt(e){w(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Mt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){w(!tt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=ie(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=_.useMemo(()=>{let e=Ce(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return T(h!=null,`<Router basename=\"${s}\"> is not able to match the URL \"${l}${u}${d}\" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:_.createElement(A.Provider,{value:c},_.createElement(Ke.Provider,{children:t,value:h}))}function Nt({children:e,location:t}){return ct(Pt(e),t)}function Pt(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,Pt(e.props.children,i));return}w(e.type===jt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),w(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Pt(e.props.children,i)),n.push(a)}),n}var Ft=`get`,It=`application/x-www-form-urlencoded`;function Lt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Rt(e){return Lt(e)&&e.tagName.toLowerCase()===`button`}function zt(e){return Lt(e)&&e.tagName.toLowerCase()===`form`}function Bt(e){return Lt(e)&&e.tagName.toLowerCase()===`input`}function Vt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ht(e,t){return e.button===0&&(!t||t===`_self`)&&!Vt(e)}var Ut=null;function Wt(){if(Ut===null)try{new FormData(document.createElement(`form`),0),Ut=!1}catch{Ut=!0}return Ut}var Gt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Kt(e){return e!=null&&!Gt.has(e)?(T(!1,`\"${e}\" is not a valid \\`encType\\` for \\`<Form>\\`/\\`<fetcher.Form>\\` and will default to \"${It}\"`),null):e}function qt(e,t){let n,r,i,a,o;if(zt(e)){let o=e.getAttribute(`action`);r=o?Ce(o,t):null,n=e.getAttribute(`method`)||Ft,i=Kt(e.getAttribute(`enctype`))||It,a=new FormData(e)}else if(Rt(e)||Bt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type=\"submit\"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Ce(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Ft,i=Kt(e.getAttribute(`formenctype`))||Kt(o.getAttribute(`enctype`))||It,a=new FormData(o,e),!Wt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Lt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type=\"submit|image\">`);else n=Ft,r=null,i=It,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\\0`);var Jt={\"&\":`\\\\u0026`,\">\":`\\\\u003e`,\"<\":`\\\\u003c`,\"\\u2028\":`\\\\u2028`,\"\\u2029\":`\\\\u2029`},Yt=/[&><\\u2028\\u2029]/g;function Xt(e){return e.replace(Yt,e=>Jt[e])}function Zt(e,t){if(e===!1||e==null)throw Error(t)}function Qt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Ce(i.pathname,t)===`/`?i.pathname=`${t.replace(/\\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\\/$/,``)}.${r}`,i}async function $t(e,t){if(e.id in t)return t[e.id];try{let n=await x(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \\`${e.module}\\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function en(e){return e!=null&&typeof e.page==`string`}function tn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function nn(e,t,n){return cn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await $t(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(tn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function rn(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function an(e,t,{includeHydrateFallback:n}={}){return on(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function on(e){return[...new Set(e)]}function sn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function cn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!en(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(sn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function ln(){let e=_.useContext(Be);return Zt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function un(){let e=_.useContext(Ve);return Zt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var dn=_.createContext(void 0);dn.displayName=`FrameworkContext`;function fn(){let e=_.useContext(dn);return Zt(e,`You must render this element inside a <HydratedRouter> element`),e}function pn(e,t){let n=_.useContext(dn),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),_.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:mn(s,p),onBlur:mn(c,m),onMouseEnter:mn(l,p),onMouseLeave:mn(u,m),onTouchStart:mn(d,p)}]:[a,f,{}]:[!1,f,{}]}function mn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function hn({page:e,...t}){let{router:n}=ln(),r=_.useMemo(()=>se(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?_.createElement(_n,{page:e,matches:r,...t}):null}function gn(e){let{manifest:t,routeModules:n}=fn(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return nn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function _n({page:e,matches:t,...n}){let r=nt(),{future:i,manifest:a,routeModules:o}=fn(),{basename:s}=ln(),{loaderData:c,matches:l}=un(),u=_.useMemo(()=>rn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=_.useMemo(()=>rn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Qt(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=_.useMemo(()=>an(d,a),[d,a]),m=gn(d);return _.createElement(_.Fragment,null,f.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function vn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var yn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{yn&&(window.__reactRouterVersion=`7.13.1`)}catch{}function bn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=_.useRef();i.current??=C({window:r,v5Compat:!0});let a=i.current,[o,s]=_.useState({action:a.action,location:a.location}),c=_.useCallback(e=>{n===!1?s(e):_.startTransition(()=>s(e))},[n]);return _.useLayoutEffect(()=>a.listen(c),[a,c]),_.createElement(Mt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function xn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=_.useState({action:n.action,location:n.location}),o=_.useCallback(e=>{r===!1?a(e):_.startTransition(()=>a(e))},[r]);return _.useLayoutEffect(()=>n.listen(o),[n,o]),_.createElement(Mt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}xn.displayName=`unstable_HistoryRouter`;var Sn=/^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i,Cn=_.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:v}=_.useContext(A),y=typeof l==`string`&&Sn.test(l),b=ze(l,h);l=b.to;let x=et(l,{relative:r}),ee=nt(),S=null;if(o){let e=Ae(o,[],ee.unstable_mask?ee.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:je([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=pn(n,p),te=An(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});function E(t){e&&e(t),t.defaultPrevented||te(t)}let ne=!(b.isExternal||i),re=_.createElement(`a`,{...p,...T,href:(ne?S:void 0)||b.absoluteURL||x,onClick:ne?E:e,ref:vn(m,w),target:c,\"data-discover\":!y&&t===`render`?`true`:void 0});return C&&!y?_.createElement(_.Fragment,null,re,_.createElement(hn,{page:x})):re});Cn.displayName=`Link`;var wn=_.forwardRef(function({\"aria-current\":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=st(a,{relative:c.relative}),d=nt(),f=_.useContext(Ve),{navigator:p,basename:m}=_.useContext(A),h=f!=null&&Bn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=Ce(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`,ee=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),S={isActive:x,isPending:ee,isTransitioning:h},C=x?e:void 0,w;w=typeof n==`function`?n(S):[n,x?`active`:null,ee?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return _.createElement(Cn,{...c,\"aria-current\":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});wn.displayName=`NavLink`;var Tn=_.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Ft,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=_.useContext(A),g=Nn(),v=Pn(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Sn.test(s);return _.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?_.startTransition(()=>p()):p()},...p,\"data-discover\":!b&&e===`render`?`true`:void 0})});Tn.displayName=`Form`;function En({getKey:e,storageKey:t,...n}){let r=_.useContext(dn),{basename:i}=_.useContext(A),a=nt(),o=wt();Rn({getKey:e,storageKey:t});let s=_.useMemo(()=>{if(!r||!e)return null;let t=Ln(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return _.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Xt(JSON.stringify(t||Fn))}, ${Xt(JSON.stringify(s))})`}})}En.displayName=`ScrollRestoration`;function Dn(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function On(e){let t=_.useContext(Be);return w(t,Dn(e)),t}function kn(e){let t=_.useContext(Ve);return w(t,Dn(e)),t}function An(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=at(),d=nt(),f=st(e,{relative:o});return _.useCallback(p=>{if(Ht(p,t)){p.preventDefault();let t=n===void 0?re(d)===re(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?_.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var jn=0,Mn=()=>`__${String(++jn)}__`;function Nn(){let{router:e}=On(`useSubmit`),{basename:t}=_.useContext(A),n=St(),r=e.fetch,i=e.navigate;return _.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=qt(e,t);a.navigate===!1?await r(a.fetcherKey||Mn(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Pn(e,{relative:t}={}){let{basename:n}=_.useContext(A),r=_.useContext(qe);w(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...st(e||`.`,{relative:t})},o=nt();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:je([n,a.pathname])),re(a)}var Fn=`react-router-scroll-positions`,In={};function Ln(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Ce(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Rn({getKey:e,storageKey:t}={}){let{router:n}=On(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=kn(`useScrollRestoration`),{basename:a}=_.useContext(A),o=nt(),s=wt(),c=Ct();_.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),zn(_.useCallback(()=>{if(c.state===`idle`){let t=Ln(o,s,a,e);In[t]=window.scrollY}try{sessionStorage.setItem(t||Fn,JSON.stringify(In))}catch(e){T(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(_.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Fn);e&&(In=JSON.parse(e))}catch{}},[t]),_.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(In,()=>window.scrollY,e?(t,n)=>Ln(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),_.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{T(!1,`\"${o.hash.slice(1)}\" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function zn(e,t){let{capture:n}=t||{};_.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Bn(e,{relative:t}={}){let n=_.useContext(Ue);w(n!=null,\"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?\");let{basename:r}=On(`useViewTransitionState`),i=st(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ce(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ce(n.nextLocation.pathname,r)||n.nextLocation.pathname;return be(i.pathname,o)!=null||be(i.pathname,a)!=null}var Vn=`/assets/logo-DvFIlBYQ.svg`,Hn=`data:image/svg+xml,%3csvg%20width='98'%20height='96'%20viewBox='0%200%2098%2096'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_730_27136)'%3e%3cpath%20d='M41.4395%2069.3848C28.8066%2067.8535%2019.9062%2058.7617%2019.9062%2046.9902C19.9062%2042.2051%2021.6289%2037.0371%2024.5%2033.5918C23.2559%2030.4336%2023.4473%2023.7344%2024.8828%2020.959C28.7109%2020.4805%2033.8789%2022.4902%2036.9414%2025.2656C40.5781%2024.1172%2044.4062%2023.543%2049.0957%2023.543C53.7852%2023.543%2057.6133%2024.1172%2061.0586%2025.1699C64.0254%2022.4902%2069.2891%2020.4805%2073.1172%2020.959C74.457%2023.543%2074.6484%2030.2422%2073.4043%2033.4961C76.4668%2037.1328%2078.0937%2042.0137%2078.0937%2046.9902C78.0937%2058.7617%2069.1934%2067.6621%2056.3691%2069.2891C59.623%2071.3945%2061.8242%2075.9883%2061.8242%2081.252L61.8242%2091.2051C61.8242%2094.0762%2064.2168%2095.7031%2067.0879%2094.5547C84.4102%2087.9512%2098%2070.6289%2098%2049.1914C98%2022.1074%2075.9883%206.69539e-07%2048.9043%204.309e-07C21.8203%201.92261e-07%20-1.9479e-07%2022.1074%20-4.3343e-07%2049.1914C-6.20631e-07%2070.4375%2013.4941%2088.0469%2031.6777%2094.6504C34.2617%2095.6074%2036.75%2093.8848%2036.75%2091.3008L36.75%2083.6445C35.4102%2084.2188%2033.6875%2084.6016%2032.1562%2084.6016C25.8398%2084.6016%2022.1074%2081.1563%2019.4277%2074.7441C18.375%2072.1602%2017.2266%2070.6289%2015.0254%2070.3418C13.877%2070.2461%2013.4941%2069.7676%2013.4941%2069.1934C13.4941%2068.0449%2015.4082%2067.1836%2017.3223%2067.1836C20.0977%2067.1836%2022.4902%2068.9063%2024.9785%2072.4473C26.8926%2075.2227%2028.9023%2076.4668%2031.2949%2076.4668C33.6875%2076.4668%2035.2187%2075.6055%2037.4199%2073.4043C39.0469%2071.7773%2040.291%2070.3418%2041.4395%2069.3848Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_730_27136'%3e%3crect%20width='98'%20height='96'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,Un=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),j=o(((e,t)=>{t.exports=Un()}))();function Wn(){let e=at();return(0,j.jsxs)(`div`,{className:`header`,children:[(0,j.jsx)(`button`,{className:`nav-btn`,onClick:()=>e(`/robot`),children:`Robot Management`}),(0,j.jsxs)(`div`,{className:`logo`,children:[(0,j.jsx)(`img`,{src:Vn,alt:`Brainslug Logo`,height:80}),(0,j.jsxs)(`div`,{className:`logo-text`,children:[(0,j.jsx)(`span`,{children:`Brainslug Tools`}),(0,j.jsx)(`span`,{className:``,children:`Tools to flash and manage your brainslug`})]}),(0,j.jsx)(`a`,{href:`http://github.com/philip2809/neato-brainslug`,target:`_blank`,rel:`noopener noreferrer`,children:(0,j.jsx)(`img`,{src:Hn,alt:`GitHub Logo`,height:30,className:`github`})})]}),(0,j.jsx)(`button`,{className:`nav-btn`,onClick:()=>e(`/flash`),children:`ESP Flasher`})]})}function Gn(e,t){return[[e,t[0]]]}function Kn(e,t){let n=[],r=[];return e.split(`\n`).forEach(e=>{let[i,...a]=e.split(`,`),o=t.find(e=>e.key===i);o&&(o.basic?n:r).push(...o.parser?o.parser(a):Gn(o.name||o.key,a))}),{lastUpdated:Date.now(),basic:n,advanced:r}}function qn(e){let t=e.split(`\n`);return t.length===2?{basic:[[`Error`,t[1]]],lastUpdated:Date.now()}:{basic:[[`Error`,t[2]],[`Alert`,t[4]]],lastUpdated:Date.now()}}var Jn=[{key:`Model`,basic:!0,parser:e=>[[`Model`,e[0]],[`ModelNum`,e[1]]]},{key:`Software`,basic:!0,parser:e=>[[`Software`,e.slice(0,3).join(`.`)+`-`+e[3]]]},{key:`MainBoard Serial Number`,basic:!0,parser:e=>[[`MFG Code`,e[0]],[`Serial Number`,e[1]]]}],Yn=[{key:`FuelPercent`,name:`Fuel Percent`,basic:!0},{key:`BattTempCAvg`,basic:!0,name:`Average Battery Temperature (C)`},{key:`VBattV`,basic:!0,name:`Battery Voltage`},{key:`VExtV`,basic:!0,name:`Charger Voltage`},{key:`BatteryOverTemp`},{key:`ChargingActive`},{key:`ChargingEnabled`},{key:`ConfidentOnFuel`},{key:`OnReservedFuel`},{key:`BatteryFailure`},{key:`ExtPwrPresent`},{key:`ThermistorPresent`},{key:`Discharge_mAH`},{key:`Charger_mAH`}],Xn=class{serialConnection;version={basic:[],advanced:[],command:`GetVersion`,lastUpdated:0};charger={basic:[],advanced:[],command:`GetCharger`,lastUpdated:0};error={basic:[],advanced:[],command:`GetErr`,lastUpdated:0};constructor(e){this.serialConnection=e,this.startDataRead(),this.startWriteData(),this.sendCommand(`GetVersion`),this.sendCommand(`GetCharger`),this.sendCommand(`GetErr`),this.startGetErrLoop()}readBuffer=new Uint8Array;async startDataRead(){for(;this.serialConnection.readable;){let e=this.serialConnection.readable.getReader();try{for(;;){let{value:t,done:n}=await e.read();if(n)break;if(t&&(this.readBuffer=new Uint8Array([...this.readBuffer,...t]),t.includes(26))){console.warn(`Received message with 0x1A, decoding buffer`);let e=new TextDecoder().decode(this.readBuffer).split(`\u001a`),t=e.pop();if(e.forEach(e=>{this.parseData(e)}),t===``){this.readBuffer=new Uint8Array;continue}this.readBuffer=new TextEncoder().encode(t)}}}catch{}finally{e.releaseLock()}}}parseData(e){console.log(`Parsing data:`,e),e.includes(`Component,Major,Minor,Build,Aux`)?this.version={...Kn(e,Jn),command:`GetVersion`}:e.includes(`Label,Value`)&&e.includes(`BattTempCAvg`)?this.charger={...Kn(e,Yn),command:`GetCharger`}:e.startsWith(`GetErr`)&&(this.error={...qn(e),command:`GetErr`}),console.log(`Updated robot data:`,{version:this.version,charger:this.charger}),tr()}cmdQueue=[];writeTimer;serialWriter;async startWriteData(){if(!this.serialConnection.writable){console.error(`Serial connection not writable`);return}if(this.writeTimer){this.stopWriteData();return}this.serialWriter=this.serialConnection.writable.getWriter(),this.writeTimer=setInterval(()=>{if(this.cmdQueue.length===0)return;if(!this.serialWriter){console.error(`Serial writer not available`),this.stopWriteData();return}let e=this.cmdQueue.shift();console.log(`Sending command:`,e),this.serialWriter.write(new TextEncoder().encode(e))},100)}async stopWriteData(){this.writeTimer&&=(clearInterval(this.writeTimer),void 0),this.serialWriter&&=(await this.serialWriter.close(),void 0)}async sendCommand(e){this.cmdQueue.push(e+`\n`)}getErrLoopTimer;startGetErrLoop(){if(this.getErrLoopTimer){this.stopGetErrLoop();return}this.getErrLoopTimer=setInterval(()=>{this.sendCommand(`GetErr`)},2e3)}stopGetErrLoop(){this.getErrLoopTimer&&=(clearInterval(this.getErrLoopTimer),void 0)}},Zn,Qn=null,$n=new Set,er=0,tr=()=>{er++,$n.forEach(e=>e())},nr=e=>($n.add(e),()=>$n.delete(e)),rr=()=>er;async function ir(e,t){e(`Select device in browser prompt`);try{Zn=await navigator.serial.requestPort({filters:t?[{usbVendorId:8456}]:[]})}catch{e(`No device selected`);return}e(`Opening port...`);try{await Zn.open({baudRate:115200})}catch{e(`Error opening port`);return}e(`Connected successfully`),setTimeout(async()=>{Qn=new Xn(Zn),tr()},200)}function ar(e){let t=new Date(e);if(!Number.isNaN(t.valueOf()))return t;let n=String(e).match(/\\d+/g);if(n==null||n.length<=2)return t;{let[e,t,...r]=n.map(e=>parseInt(e)),i=[e,t-1,...r];return new Date(Date.UTC(...i))}}var or=(e,t,n)=>{let r=e===1?t:t+`s`;return e+` `+r+` `+n};function sr(){return sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sr.apply(null,arguments)}var cr=60,lr=cr*60,ur=lr*24,dr=ur*7,fr=ur*30,pr=ur*365,mr=()=>Date.now();function hr({date:e,formatter:t,component:n=`time`,live:r=!0,minPeriod:i=0,maxPeriod:a=dr,title:o,now:s=mr,...c}){let[l,u]=(0,_.useState)(s());(0,_.useEffect)(()=>{if(!r)return;let t=(()=>{let t=ar(e).valueOf();if(!t)return console.warn(`[react-timeago] Invalid Date provided`),0;let n=Math.round(Math.abs(l-t)/1e3),r=n<cr?1e3:n<lr?1e3*cr:n<ur?1e3*lr:1e3*dr,o=Math.min(Math.max(r,i*1e3),a*1e3);return o?setTimeout(()=>{u(s())},o):0})();return()=>{t&&clearTimeout(t)}},[e,r,a,i,s,l]),(0,_.useEffect)(()=>{u(s())},[e]);let d=n,f=ar(e).valueOf();if(!f)return null;let p=Math.round(Math.abs(l-f)/1e3),m=f<l?`ago`:`from now`,[h,g]=p<cr?[Math.round(p),`second`]:p<lr?[Math.round(p/cr),`minute`]:p<ur?[Math.round(p/lr),`hour`]:p<dr?[Math.round(p/ur),`day`]:p<fr?[Math.round(p/dr),`week`]:p<pr?[Math.round(p/fr),`month`]:[Math.round(p/pr),`year`],v=o===void 0?typeof e==`string`?e:ar(e).toISOString().substring(0,16).replace(`T`,` `):o,y=d===`time`?{...c,dateTime:ar(e).toISOString()}:c,b=(e=e,t=t,n=n,r=f,i=or,a=a)=>or(e,t,n,r,i,a),x=t||or,ee;try{ee=x(h,g,m,f,b,s),ee||=or(h,g,m,f,b,s)}catch(e){console.error(`[react-timeago] Formatter threw an error:`,e),ee=or(h,g,m,f,b,s)}return _.createElement(d,sr({},y,{title:v}),ee)}function gr(){let[e,t]=(0,_.useState)(`Not connected`),[n,r]=(0,_.useState)(!1);if((0,_.useSyncExternalStore)(nr,rr),!Qn)return(0,j.jsxs)(`div`,{className:`card connect-robot`,children:[(0,j.jsx)(`span`,{className:`title`,children:`Connect your Neato`}),(0,j.jsxs)(`p`,{className:`subtitle`,children:[`Remove the dustbin from your Neato vacuum and connect to the USB port. Click the button below and select your Neato, It may appear as `,(0,j.jsx)(`strong`,{children:`\"USB Serial Device (COMx)\"`}),` on Windows, or `,(0,j.jsx)(`strong`,{children:`\"CDC Serial\"`}),` / `,(0,j.jsx)(`strong`,{children:`\"ttyACM0\"`}),` on Linux/MacOS. You can also try to unplug and replug to device to see which one appears if you're not sure.`]}),(0,j.jsxs)(`div`,{className:`toggle-row`,children:[(0,j.jsxs)(`label`,{className:`switch`,children:[(0,j.jsx)(`input`,{type:`checkbox`,checked:n,onChange:()=>r(!n)}),(0,j.jsx)(`span`,{className:`slider`})]}),(0,j.jsx)(`span`,{className:`toggle-label`,onClick:()=>r(!n),children:`Filter by Neato device type`}),(0,j.jsx)(`span`,{className:`badge`,children:`Experimental`})]}),(0,j.jsx)(`button`,{className:`connect`,onClick:()=>ir(t,n),children:`Connect to Robot`}),(0,j.jsxs)(`div`,{className:`status`,children:[`Status: `,e]})]});let{version:i,charger:a,error:o}=Qn;return(0,j.jsxs)(`div`,{className:`info-cards`,children:[(0,j.jsx)(_r,{title:`Version Info`,data:i}),(0,j.jsx)(_r,{title:`Error Info`,data:o}),(0,j.jsx)(_r,{title:`Charger Info`,data:a})]})}function _r({title:e,data:t}){let n=t.basic.length>0||t.advanced&&t.advanced.length>0,[r,i]=(0,_.useState)(!1);return(0,j.jsxs)(`div`,{className:`card robot-info`,children:[(0,j.jsxs)(`div`,{className:`info-header`,children:[(0,j.jsxs)(`div`,{className:`title-group`,children:[(0,j.jsx)(`h2`,{children:e}),(0,j.jsxs)(`span`,{className:`time-ago`,children:[`Updated: `,(0,j.jsx)(hr,{date:t.lastUpdated})]})]}),(0,j.jsxs)(`div`,{className:`action-group`,children:[(0,j.jsx)(`button`,{className:`action-btn`,onClick:()=>Qn?.sendCommand(t.command),children:`Refresh`}),(0,j.jsx)(`span`,{className:`tooltip-wrap`,title:!t.advanced||t.advanced.length===0?`No advanced data`:void 0,children:(0,j.jsx)(`button`,{className:`action-btn`,onClick:()=>i(e=>!e),disabled:!t.advanced||t.advanced.length===0,children:r?`Hide Advanced`:`Show Advanced`})})]})]}),!n&&(0,j.jsx)(`p`,{className:`no-data`,children:`No data received yet.`}),(0,j.jsxs)(`div`,{className:`table`,children:[t.basic.map(([e,t])=>(0,j.jsxs)(`div`,{className:`row`,children:[(0,j.jsxs)(`span`,{className:`key`,children:[e,`:`]}),(0,j.jsx)(`span`,{children:t})]},e)),r&&t.advanced&&t.advanced.map(([e,t])=>(0,j.jsxs)(`div`,{className:`row`,children:[(0,j.jsxs)(`span`,{className:`key`,children:[e,`:`]}),(0,j.jsx)(`span`,{children:t})]},e))]})]})}function vr(){return(0,j.jsxs)(`div`,{className:`card unsupported`,children:[(0,j.jsx)(`p`,{className:`success`,children:`Flasher coming soon!`}),(0,j.jsx)(`p`,{children:`An ESP32 flasher will be available here soon.`})]})}function yr(){let e=at();return(0,_.useEffect)(()=>{`serial`in navigator&&e(`/`,{replace:!0})},[e]),(0,j.jsxs)(`div`,{className:`card unsupported`,children:[(0,j.jsx)(`p`,{className:`warn`,children:`Browser not supported`}),(0,j.jsxs)(`p`,{children:[`WebSerial is required for the tools to work.`,(0,j.jsx)(`br`,{}),`Please use a Chromium-based browser like `,(0,j.jsx)(`strong`,{children:`Chrome`}),`, `,(0,j.jsx)(`strong`,{children:`Brave`}),`, or `,(0,j.jsx)(`strong`,{children:`Edge`}),`.`]})]})}function br(){let e=at();return(0,_.useEffect)(()=>{`serial`in navigator||e(`/unsupported`,{replace:!0})},[e]),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Wn,{}),(0,j.jsxs)(Nt,{children:[(0,j.jsx)(jt,{path:`/robot`,element:(0,j.jsx)(gr,{})}),(0,j.jsx)(jt,{path:`/flash`,element:(0,j.jsx)(vr,{})}),(0,j.jsx)(jt,{path:`/unsupported`,element:(0,j.jsx)(yr,{})}),(0,j.jsx)(jt,{path:`*`,element:(0,j.jsx)(At,{to:`/robot`,replace:!0})})]})]})}(0,g.createRoot)(document.getElementById(`root`)).render((0,j.jsx)(_.StrictMode,{children:(0,j.jsx)(bn,{children:(0,j.jsx)(br,{})})}));"
  },
  {
    "path": "assets/index-DG4tEwHR.css",
    "content": "#root{text-align:center;box-sizing:border-box;flex-direction:column;width:100%;max-width:100%;min-height:100svh;margin:0 auto;font-size:1.6rem;display:flex}body{color:#e0e0e0;background:#141414;justify-content:center;align-items:center;margin:0;font-family:Trebuchet MS,sans-serif;display:flex}html{font-size:62.5%}*{box-sizing:border-box;margin:0;padding:0}.container{width:100%;max-width:480px}h1{color:#fff;margin-bottom:.3rem;font-size:1.3rem;font-weight:600}.page-sub{color:#555;margin-bottom:2rem;font-size:.8rem}.tools{flex-direction:column;gap:.75rem;margin-bottom:1.5rem;display:flex}a.tool-card{background:#1e1e1e;border:1px solid #2e2e2e;border-radius:10px;padding:1.1rem 1.25rem;text-decoration:none;transition:border-color .15s,background .15s;display:block}a.tool-card:hover{background:#222;border-color:#3a3a3a}.tool-title{color:#e0e0e0;margin-bottom:.25rem;font-size:.95rem;font-weight:600}.tool-desc{color:#666;font-size:.8rem}.more{color:#555;padding-left:.25rem;font-size:.78rem}.card{background:#1e1e1e;border:1px solid #2e2e2e;border-radius:12px;flex-direction:column;align-items:center;gap:20px;width:100%;max-width:600px;margin:auto;padding:2.5rem;display:flex}.header{align-items:center;width:100%;margin-top:1rem;margin-bottom:2rem;font-size:2rem;display:flex}.header>*{justify-content:center;align-items:center;display:flex}.header .nav-btn{color:#e0e0e0;cursor:pointer;background:0 0;border:2px solid #3a3a3a;border-radius:8px;max-width:fit-content;margin:0 auto;padding:.8rem 1.6rem;font-family:inherit;font-size:1.6rem;font-weight:500;transition:all .2s ease-in-out}.header .nav-btn:hover{color:#fff;background:#2a2a2a;border-color:#5a9e6f;transform:translateY(-2px);box-shadow:0 4px 12px #0003}.header .nav-btn:active{box-shadow:none;transform:translateY(0)}.header .logo{justify-content:center;align-items:center;display:flex}.header .logo .github{margin-left:4rem;transition:transform .2s ease-in-out}.header .logo .github:hover{transform:scale(1.1)}.header .logo .logo-text{flex-direction:column;gap:.5rem;display:flex}.header .logo .logo-text span{color:#ccc;font-size:2.2rem}.header .logo .logo-text span:nth-child(2){color:#666;font-size:2rem}.connect-robot{text-align:left;background:#1e1e1e;border:1px solid #2e2e2e;border-radius:12px;flex-direction:column;width:100%;max-width:480px;padding:2.5rem;display:flex}.connect-robot .subtitle{color:#ccc;font-size:1.4rem;line-height:1.5}.connect-robot .title{color:#e0e0e0;margin-bottom:.75rem;font-size:2.2rem;font-weight:600}.connect-robot .toggle-row{justify-content:center;align-items:center;gap:.8rem;display:flex}.connect-robot .toggle-row .toggle-label{color:#aaa;-webkit-user-select:none;user-select:none;cursor:pointer;font-size:1.2rem}.connect-robot .toggle-row .badge{color:#a07840;text-transform:uppercase;letter-spacing:.05em;background:#2a2218;border:1px solid #3a3020;border-radius:4px;padding:.2rem .5rem;font-size:.85rem;font-weight:600}.connect-robot .toggle-row .switch{flex-shrink:0;width:38px;height:22px;display:inline-block;position:relative}.connect-robot .toggle-row .switch input{opacity:0;width:0;height:0}.connect-robot .toggle-row .switch input:checked+.slider{background:#2a3a2a;border-color:#3a5a3a}.connect-robot .toggle-row .switch input:checked+.slider:before{background:#5a9e6f;transform:translate(16px)}.connect-robot .toggle-row .slider{cursor:pointer;background:#2e2e2e;border:1px solid #3a3a3a;border-radius:20px;transition:background .2s,border-color .2s;position:absolute;inset:0}.connect-robot .toggle-row .slider:before{content:\"\";background:#888;border-radius:50%;width:14px;height:14px;transition:transform .2s,background .2s;position:absolute;top:3px;left:3px}.connect-robot button.connect{color:#e0e0e0;cursor:pointer;background:#2a2a2a;border:1px solid #3a3a3a;border-radius:6px;align-self:center;padding:.8rem 1.6rem;font-family:inherit;font-size:1.6rem;font-weight:500;transition:background .15s,border-color .15s}.connect-robot button.connect:hover:not(:disabled){background:#333;border-color:#4a4a4a}.connect-robot button.connect:disabled{opacity:.6;cursor:not-allowed}.connect-robot .status{color:#888;align-self:center;font-size:1.4rem}.info-cards{flex-direction:column;gap:1.5rem;margin-top:2rem;margin-bottom:2rem;display:flex}.robot-info{box-sizing:border-box;background:#1e1e1e;border:1px solid #2e2e2e;border-radius:12px;width:100%;max-width:550px;padding:1.5rem;font-size:1.8rem}.robot-info .info-header{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1.5rem;display:flex}.robot-info .info-header .title-group{flex-direction:column;gap:.3rem;display:flex}.robot-info .info-header .title-group h2{color:#fff;margin:0;font-size:2rem;font-weight:600}.robot-info .info-header .title-group .time-ago{color:#888;min-width:15rem;font-size:1.2rem}.robot-info .info-header .action-group{align-items:center;gap:.8rem;display:flex}.robot-info .info-header .action-group .tooltip-wrap{display:inline-flex}.robot-info .info-header .action-group .action-btn{color:#e0e0e0;cursor:pointer;background:#2a2a2a;border:1px solid #3a3a3a;border-radius:6px;padding:.5rem 1rem;font-family:inherit;font-size:1.3rem;font-weight:500;transition:background .15s,border-color .15s,opacity .15s}.robot-info .info-header .action-group .action-btn:hover:not(:disabled){background:#333;border-color:#4a4a4a}.robot-info .info-header .action-group .action-btn:disabled{opacity:.4;cursor:not-allowed}.robot-info .no-data{color:#666;margin-bottom:1rem;font-size:1.4rem;font-style:italic}.robot-info .table{flex-direction:column;width:100%;display:flex}.robot-info .table .row{background-color:#3a3a3a;justify-content:space-between;padding:.8rem;display:flex}.robot-info .table .row:nth-child(odd){background-color:#2a2a2a}.robot-info .table .row .key{color:#aaa;font-weight:500}.unsupported{text-align:center}.unsupported p{color:#aaa;font-size:1.8rem;line-height:1.7}.unsupported strong{color:#e0e0e0}.unsupported .warn{color:#c0605a;font-size:1.6rem;font-weight:600}.unsupported .success{color:#5ac060;font-size:1.6rem;font-weight:600}\n"
  },
  {
    "path": "brainslug-tools/eslint.config.js",
    "content": "import js from '@eslint/js'\nimport globals from 'globals'\nimport reactHooks from 'eslint-plugin-react-hooks'\nimport reactRefresh from 'eslint-plugin-react-refresh'\nimport tseslint from 'typescript-eslint'\nimport { defineConfig, globalIgnores } from 'eslint/config'\n\nexport default defineConfig([\n  globalIgnores(['dist']),\n  {\n    files: ['**/*.{ts,tsx}'],\n    extends: [\n      js.configs.recommended,\n      tseslint.configs.recommended,\n      reactHooks.configs.flat.recommended,\n      reactRefresh.configs.vite,\n    ],\n    languageOptions: {\n      ecmaVersion: 2020,\n      globals: globals.browser,\n    },\n  },\n])\n"
  },
  {
    "path": "brainslug-tools/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/logo.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Brainslug Tools</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "brainslug-tools/package.json",
    "content": "{\n  \"name\": \"brainslug-tools\",\n  \"private\": false,\n  \"version\": \"1.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"tsc -b && vite build\",\n    \"lint\": \"eslint .\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"@types/w3c-web-serial\": \"^1.0.8\",\n    \"esp-web-tools\": \"10.2.1\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\",\n    \"react-router-dom\": \"^7.13.1\",\n    \"react-timeago\": \"^8.3.0\",\n    \"sass\": \"^1.98.0\"\n  },\n  \"devDependencies\": {\n    \"@eslint/js\": \"^9.39.4\",\n    \"@types/node\": \"^24.12.0\",\n    \"@types/react\": \"^19.2.14\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^6.0.0\",\n    \"eslint\": \"^9.39.4\",\n    \"eslint-plugin-react-hooks\": \"^7.0.1\",\n    \"eslint-plugin-react-refresh\": \"^0.5.2\",\n    \"globals\": \"^17.4.0\",\n    \"typescript\": \"~5.9.3\",\n    \"typescript-eslint\": \"^8.56.1\",\n    \"vite\": \"^8.0.0\"\n  }\n}\n"
  },
  {
    "path": "brainslug-tools/src/App.css",
    "content": "* {\n  margin: 0;\n  padding: 0;\n  box-sizing: border-box;\n}\n\n.container {\n  width: 100%;\n  max-width: 480px;\n}\n\nh1 {\n  font-size: 1.3rem;\n  font-weight: 600;\n  color: #fff;\n  margin-bottom: 0.3rem;\n}\n\n.page-sub {\n  font-size: 0.8rem;\n  color: #555;\n  margin-bottom: 2rem;\n}\n\n.tools {\n  display: flex;\n  flex-direction: column;\n  gap: 0.75rem;\n  margin-bottom: 1.5rem;\n}\n\na.tool-card {\n  display: block;\n  background: #1e1e1e;\n  border: 1px solid #2e2e2e;\n  border-radius: 10px;\n  padding: 1.1rem 1.25rem;\n  text-decoration: none;\n  transition: border-color 0.15s, background 0.15s;\n}\n\na.tool-card:hover {\n  background: #222;\n  border-color: #3a3a3a;\n}\n\n.tool-title {\n  font-size: 0.95rem;\n  font-weight: 600;\n  color: #e0e0e0;\n  margin-bottom: 0.25rem;\n}\n\n.tool-desc {\n  font-size: 0.8rem;\n  color: #666;\n}\n\n.more {\n  font-size: 0.78rem;\n  color: #555;\n  padding-left: 0.25rem;\n}\n\n.card {\n  background: #1e1e1e;\n  border: 1px solid #2e2e2e;\n  border-radius: 12px;\n  padding: 2.5rem;\n  width: 100%;\n  max-width: 600px;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 20px;\n  margin: auto;\n\n  text-align: center;\n\n  p {\n    font-size: 1.8rem;\n    color: #aaa;\n    line-height: 1.7;\n  }\n\n  strong {\n    color: #e0e0e0;\n  }\n\n  .warn {\n    font-size: 1.6rem;\n    font-weight: 600;\n    color: #c0605a;\n  }\n\n  .success {\n    font-size: 1.6rem;\n    font-weight: 600;\n    color: #5ac060;\n  }\n\n  a {\n    color: #5ac060;\n    font-weight: 500;\n    transition: color 0.2s ease-in-out;\n\n    &:hover {\n      color: #7cd080;\n    }\n  }\n}"
  },
  {
    "path": "brainslug-tools/src/App.tsx",
    "content": "import './App.css'\nimport Header from './components/header'\nimport { Navigate, Route, Routes } from \"react-router-dom\";\nimport Robot from './pages/robot';\nimport Flasher from './pages/flasher';\nimport Unsupported from './pages/unsupported';\nimport Home from './pages/home';\n// import HaConfig from './pages/ha-config';\n\n\nfunction App() {\n\n  return (\n    <>\n      <Header />\n      <Routes>\n        <Route path=\"/\" element={<Home />} />\n        <Route path=\"/robot\" element={<Robot />} />\n        <Route path=\"/flash\" element={<Flasher />} />\n        {/* <Route path=\"/ha-config\" element={<HaConfig />} /> */}\n        <Route path=\"/unsupported\" element={<Unsupported />} />\n        <Route path=\"*\" element={<Navigate to=\"/\" replace />} />\n      </Routes>\n    </>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "brainslug-tools/src/components/header.scss",
    "content": ".header {\n    width: 100%;\n    display: flex;\n    margin-top: 1rem;\n    font-size: 2rem;\n    margin-bottom: 2rem;\n    align-items: center;\n\n    & > * {\n        flex: 1;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n    }\n\n    .nav-btn {\n        background: transparent;\n        border: 2px solid #3a3a3a;\n        color: #e0e0e0;\n        font-family: inherit;\n        font-size: 1.6rem;\n        font-weight: 500;\n        padding: 0.8rem 1.6rem;\n        border-radius: 8px;\n        cursor: pointer;\n        transition: all 0.2s ease-in-out;\n        margin: 0 auto;\n\n        &:hover {\n            background: #2a2a2a;\n            border-color: #5a9e6f;\n            color: #fff;\n            transform: translateY(-2px);\n            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);\n        }\n\n        &:active {\n            transform: translateY(0);\n            box-shadow: none;\n        }\n    }\n\n    a {\n        color: #e0e0e0;\n        text-decoration: none;\n        display: flex;\n        align-items: center;\n        gap: 0.5rem;\n    }\n\n    .logo {\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        \n        .github {\n            margin-left: 4rem;\n            transition: transform 0.2s ease-in-out;\n\n            &:hover {\n                transform: scale(1.1);\n            }\n        }\n\n        .logo-text {\n            display: flex;\n            gap: 0.5rem;\n            flex-direction: column;\n\n            span {\n                font-size: 2.2rem;\n                color: #ccc;\n            }\n            span:nth-child(2) {\n                font-size: 2rem;\n                color: #666;\n            }\n        }\n    }\n}"
  },
  {
    "path": "brainslug-tools/src/components/header.tsx",
    "content": "import './header.scss';\nimport { Link, useNavigate } from 'react-router-dom';\nimport logo from '../assets/logo.svg';\nimport github from '../assets/github.svg';\n\nfunction Header() {\n    const navigate = useNavigate();\n\n    return (\n        <div className=\"header\">\n            <div>\n                <button className=\"nav-btn\" onClick={() => navigate('/robot')}>Robot Management</button>\n            </div>\n            <div className=\"logo\">\n                <Link to=\"/\">\n                    <img src={logo} alt=\"Brainslug Logo\" height={80} />\n                    <div className=\"logo-text\">\n                        <span>Brainslug Tools</span>\n                        <span className=''>Tools to flash and manage your brainslug</span>\n                    </div>\n                </Link>\n                <a href=\"http://github.com/philip2809/neato-brainslug\" target=\"_blank\" rel=\"noopener noreferrer\">\n                    <img src={github} alt=\"GitHub Logo\" height={30} className=\"github\" />\n                </a>\n            </div>\n            <div>\n                <button className=\"nav-btn\" onClick={() => navigate('/flash')}>ESP Flasher</button>\n                {/* <button className=\"nav-btn\" onClick={() => navigate('/ha-config')}>HA Config</button> */}\n            </div>\n        </div>\n    )\n}\n\nexport default Header\n"
  },
  {
    "path": "brainslug-tools/src/index.css",
    "content": "\n\n:root {\n  --esp-tools-button-color: #5ac060;\n\n  /* MDC Web (Older versions / some components) */\n  --mdc-typography-body1-line-height: 2rem;\n  --mdc-typography-body1-font-size: 1.6rem;\n  --mdc-typography-headline6-font-size: 1.8rem;\n  --mdc-typography-headline5-font-size: 2rem;\n  --mdc-typography-headline4-font-size: 2.4rem;\n  --mdc-typography-headline3-font-size: 3rem;\n  --mdc-typography-headline2-font-size: 3.6rem;\n  --mdc-typography-headline1-font-size: 4.8rem;\n  --mdc-typography-button-font-size: 1.6rem;\n  --mdc-typography-caption-font-size: 1.4rem;\n  --mdc-typography-overline-font-size: 1.4rem;\n\n  /* Material 3 Web Typography (Used by esp-web-tools 10+) */\n  /* Fixes rem scaling issue caused by html font-size: 62.5% */\n  --md-sys-typescale-body-large-size: 1.6rem;\n  --md-sys-typescale-body-large-line-height: 2.4rem;\n  --md-sys-typescale-body-medium-size: 1.4rem;\n  --md-sys-typescale-body-medium-line-height: 2.0rem;\n  --md-sys-typescale-body-small-size: 1.2rem;\n  --md-sys-typescale-body-small-line-height: 1.6rem;\n  \n  --md-sys-typescale-label-large-size: 1.4rem;\n  --md-sys-typescale-label-large-line-height: 2.0rem;\n  --md-sys-typescale-label-medium-size: 1.2rem;\n  --md-sys-typescale-label-medium-line-height: 1.6rem;\n  --md-sys-typescale-label-small-size: 1.1rem;\n  --md-sys-typescale-label-small-line-height: 1.6rem;\n  \n  --md-sys-typescale-title-large-size: 2.2rem;\n  --md-sys-typescale-title-large-line-height: 2.8rem;\n  --md-sys-typescale-title-medium-size: 1.6rem;\n  --md-sys-typescale-title-medium-line-height: 2.4rem;\n  --md-sys-typescale-title-small-size: 1.4rem;\n  --md-sys-typescale-title-small-line-height: 2.0rem;\n  \n  --md-sys-typescale-headline-large-size: 3.2rem;\n  --md-sys-typescale-headline-large-line-height: 4.0rem;\n  --md-sys-typescale-headline-medium-size: 2.8rem;\n  --md-sys-typescale-headline-medium-line-height: 3.6rem;\n  --md-sys-typescale-headline-small-size: 2.4rem;\n  --md-sys-typescale-headline-small-line-height: 3.2rem;\n}\n\n\n\n#root {\n  max-width: 100%;\n  margin: 0 auto;\n  text-align: center;\n  min-height: 100svh;\n  display: flex;\n  flex-direction: column;\n  box-sizing: border-box;\n  width: 100%;\n  font-size: 1.6rem;\n  /* font-size: 160%; */\n}\n\n\nbody {\n  background: #141414;\n  color: #e0e0e0;\n  font-family: 'Trebuchet MS', sans-serif;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin: 0;\n  font-size: 1.6rem;\n}\n\n\nhtml {\n  font-size: 62.5%;\n}\n"
  },
  {
    "path": "brainslug-tools/src/logic/connect.ts",
    "content": "import { Robot } from \"./robot\";\n\nlet robotConnection: SerialPort;\nexport let robot: Robot | null = null;\n\nconst listeners = new Set<() => void>();\nlet updateTick = 0;\n\nexport const updateRobotStore = () => {\n    // Simply bump a tick counter to notify React that internal class state changed\n    updateTick++;\n    listeners.forEach(listener => listener());\n}\n\nexport const subscribeToRobot = (listener: () => void) => {\n    listeners.add(listener);\n    return () => listeners.delete(listener);\n}\n\nexport const getRobotUpdateTick = () => updateTick;\n\nexport const ConnectionStatus = {\n    NotConnected: 'NotConnected',\n    Connecting: 'Connecting',\n    Connected: 'Connected',\n    Error: 'Error'\n} as const;\n\n\nexport async function connectToRobot(setStatus: (status: string) => void, filterResults: boolean) {\n    setStatus('Select device in browser prompt');\n    try {\n        robotConnection = await navigator.serial.requestPort({\n            filters: filterResults ? [{ usbVendorId: 0x2108 } ] : []\n        });\n    } catch (e) {\n        setStatus('No device selected');\n        return;\n    }\n    setStatus('Opening port...');\n    try {\n        await robotConnection.open({ baudRate: 115200 });\n    } catch (e) {\n        setStatus('Error opening port');\n        return;\n    }\n    setStatus('Connected successfully');\n\n    setTimeout(async () => {\n        robot = new Robot(robotConnection);\n        updateRobotStore();\n\n        // const writer = robotConnection?.writable?.getWriter();\n        // await writer?.write(new TextEncoder().encode('GetErr\\n'));\n        // // writer?.releaseLock();\n        // await writer?.write(new TextEncoder().encode('GetVersion\\n'));\n        // await writer?.write(new TextEncoder().encode('GetWarranty\\n'));\n        // await writer?.write(new TextEncoder().encode('GetState\\n'));\n        // await writer?.write(new TextEncoder().encode('GetCharger\\n'));\n        // // writer?.releaseLock();\n        // console.log('Sent GetVersion command');\n    }, 200);\n\n}\n\n\n"
  },
  {
    "path": "brainslug-tools/src/logic/parser.ts",
    "content": "import type { DataKey } from \"./robot\";\n\ninterface BaseDataKeyParser {\n    key: string;\n    basic?: true;\n}\ninterface CustomDataKeyParser extends BaseDataKeyParser {\n    parser: (value: string[]) => DataKey[];\n    name?: string;\n}\ninterface DefaultDataKeyParser extends BaseDataKeyParser {\n    name?: string;\n    parser?: never;\n}\ntype DataKeyParser = CustomDataKeyParser | DefaultDataKeyParser;\n\nfunction defaultParser(name: string, value: string[]): DataKey[] {\n    return [[name, value[0]]];\n}\nexport function parseKeys(data: string, keys: DataKeyParser[]) {\n    const basic: DataKey[] = [];\n    const advanced: DataKey[] = [];\n    const lines = data.split('\\n');\n    lines.forEach(line => {\n        const [stringKey, ...value] = line.split(',');\n        const key = keys.find(k => k.key === stringKey);\n        if (!key) return;\n        (key.basic ? basic : advanced).push(...(key.parser ? key.parser(value) : defaultParser(key.name || key.key, value)));\n    });\n    const now = Date.now();\n\n    return {\n        lastUpdated: now,\n        basic,\n        advanced,\n    }\n}\n\n\n\nexport function parseGetErr(data: string) {\n    const lines = data.split('\\n');\n\n    // gen2\n    if (lines.length === 2) return { basic: [[\"Error\", lines[1]]] as DataKey[], lastUpdated: Date.now() };\n    // gen3\n    return { basic: [[\"Error\", lines[2]], [\"Alert\", lines[4]]] as DataKey[], lastUpdated: Date.now() };\n}\n\n\n\nexport const GetVersionKeys: DataKeyParser[] = [{\n    key: 'Model',\n    basic: true,\n    parser: (value: string[]) => {\n        return [\n            ['Model', value[0]],\n            ['ModelNum', value[1]]\n        ];\n    }\n},\n{\n    key: 'Software',\n    basic: true,\n    parser: (value: string[]) => {\n        return [\n            ['Software', value.slice(0, 3).join(\".\") + '-' + value[3]]\n        ]\n    }\n},\n{\n    key: 'MainBoard Serial Number',\n    basic: true,\n    parser: (value: string[]) => {\n        return [\n            ['MFG Code', value[0]],\n            ['Serial Number', value[1]]\n        ]\n    }\n}];\n\n\nexport const GetChargerKeys: DataKeyParser[] = [\n    {\n        key: 'FuelPercent',\n        name: 'Fuel Percent',\n        basic: true,\n    },\n    {\n        key: 'BattTempCAvg',\n        basic: true,\n        name: 'Average Battery Temperature (C)',\n    },\n    {\n        key: 'VBattV',\n        basic: true,\n        name: 'Battery Voltage',\n    },\n    {\n        key: 'VExtV',\n        basic: true,\n        name: 'Charger Voltage',\n    },\n    { key: 'BatteryOverTemp' },\n    { key: 'ChargingActive' },\n    { key: 'ChargingEnabled' },\n    { key: 'ConfidentOnFuel' },\n    { key: 'OnReservedFuel' },\n    { key: 'BatteryFailure' },\n    { key: 'ExtPwrPresent' },\n    { key: 'ThermistorPresent' },\n    { key: 'Discharge_mAH' },\n    { key: 'Charger_mAH' },\n];\n\n"
  },
  {
    "path": "brainslug-tools/src/logic/robot.ts",
    "content": "import { updateRobotStore } from \"./connect\";\nimport { GetChargerKeys, GetVersionKeys, parseGetErr, parseKeys } from \"./parser\";\n\n\nexport interface VersionData {\n    model?: string;\n    modelNum?: string;\n    software?: string;\n    serial?: string;\n    mfgCode?: string;\n}\n\nexport type DataKey = [string, string];\nexport interface DataKeyData {\n    basic: DataKey[];\n    advanced?: DataKey[];\n    command: string;\n    lastUpdated: number;\n}\n\nexport class Robot {\n    serialConnection: SerialPort;\n    version: DataKeyData = { basic: [], advanced: [], command: 'GetVersion', lastUpdated: 0 };\n    charger: DataKeyData = { basic: [], advanced: [], command: 'GetCharger', lastUpdated: 0 };\n    error: DataKeyData = { basic: [], advanced: [], command: 'GetErr', lastUpdated: 0 };\n    \n\n    constructor(serialConnection: SerialPort) {\n        this.serialConnection = serialConnection;\n\n        this.startDataRead();\n        this.startWriteData();\n\n        this.sendCommand('GetVersion');\n        this.sendCommand('GetCharger');\n        this.sendCommand('GetErr');\n        this.startGetErrLoop();\n    }\n\n\n\n    readBuffer: Uint8Array = new Uint8Array();\n    async startDataRead() {\n        while (this.serialConnection.readable) {\n            const reader = this.serialConnection.readable.getReader();\n            try {\n                while (true) {\n                    const { value, done } = await reader.read();\n                    if (done) {\n                        // |reader| has been canceled.\n                        break;\n                    }\n                    if (!value) continue;\n                    this.readBuffer = new Uint8Array([...this.readBuffer, ...value]);\n                    // when value has with \\x1A we have a full message, decode and continue buffer for new data\n                    if (value.includes(0x1A)) {\n                        console.warn('Received message with 0x1A, decoding buffer');\n                        const parts = new TextDecoder().decode(this.readBuffer).split('\\x1A');\n                        const lastPart = parts.pop();\n\n                        parts.forEach(part => {\n                            this.parseData(part);\n                        });\n                        if (lastPart === \"\") {\n                            this.readBuffer = new Uint8Array();\n                            continue;\n                        }\n                        this.readBuffer = new TextEncoder().encode(lastPart);\n                    }\n                }\n            } catch (error) {\n                // Handle |error|...\n            } finally {\n                reader.releaseLock();\n            }\n        }\n    }\n\n    parseData(data: string) {\n        console.log('Parsing data:', data);\n        if (data.includes('Component,Major,Minor,Build,Aux')) this.version = { ...this.version, ...parseKeys(data, GetVersionKeys) };\n        else if (data.includes('Label,Value') && data.includes('BattTempCAvg')) this.charger = { ...this.charger, ...parseKeys(data, GetChargerKeys) };\n        else if (data.startsWith('GetErr')) this.error = { ...this.error, ...parseGetErr(data) };\n        console.log('Updated robot data:', { version: this.version, charger: this.charger });\n        updateRobotStore();\n    }\n\n    cmdQueue: string[] = [];\n    writeTimer?: number;\n    serialWriter?: WritableStreamDefaultWriter;\n    async startWriteData() {\n        if (!this.serialConnection.writable) {\n            console.error('Serial connection not writable');\n            return;\n        }\n\n        if (this.writeTimer) {\n            this.stopWriteData();\n            return;\n        };\n\n        this.serialWriter = this.serialConnection.writable.getWriter();\n        this.writeTimer = setInterval(() => {\n            if (this.cmdQueue.length === 0) return;\n            if (!this.serialWriter) {\n                console.error('Serial writer not available');\n                this.stopWriteData();\n                return;\n            }\n            const cmd = this.cmdQueue.shift()!;\n            console.log('Sending command:', cmd);\n            this.serialWriter.write(new TextEncoder().encode(cmd));\n        }, 100);\n    }\n\n    async stopWriteData() {\n        if (this.writeTimer) {\n            clearInterval(this.writeTimer);\n            this.writeTimer = undefined;\n        }\n        if (this.serialWriter) {\n            await this.serialWriter.close();\n            this.serialWriter = undefined;\n        }\n    }\n\n    async sendCommand(command: string) {\n        this.cmdQueue.push(command + '\\n');\n    }\n\n    getErrLoopTimer?: number;\n    startGetErrLoop() {\n        if (this.getErrLoopTimer) {\n            this.stopGetErrLoop();\n            return;\n        }\n        this.getErrLoopTimer = setInterval(() => {\n            this.sendCommand('GetErr');\n        }, 2000);\n    }\n\n    stopGetErrLoop() {\n        if (this.getErrLoopTimer) {\n            clearInterval(this.getErrLoopTimer);\n            this.getErrLoopTimer = undefined;\n        }\n    }\n}\n\n"
  },
  {
    "path": "brainslug-tools/src/main.tsx",
    "content": "import { StrictMode } from 'react'\nimport { createRoot } from 'react-dom/client'\nimport './index.css'\nimport App from './App.tsx'\nimport { HashRouter } from 'react-router-dom'\n\ncreateRoot(document.getElementById('root')!).render(\n  <StrictMode>\n    <HashRouter>\n      <App />\n    </HashRouter>\n  </StrictMode>,\n)\n"
  },
  {
    "path": "brainslug-tools/src/pages/flasher.scss",
    "content": ".gen-picker {\n    .gen-pick {\n        position: relative;\n        cursor: pointer;\n        font-size: 14px;\n        padding: 8px 28px;\n        color: var(--esp-tools-button-text-color, #fff);\n        background-color: var(--esp-tools-button-color, #03a9f4);\n        border: none;\n        border-radius: 4px;\n        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .12), 0 1px 5px 0 rgba(0, 0, 0, .2);\n    }\n\n    display: flex;\n    gap: 1rem;\n    justify-content: center;\n}"
  },
  {
    "path": "brainslug-tools/src/pages/flasher.tsx",
    "content": "import './flasher.scss'\nimport { InstallButton } from \"esp-web-tools\"\nimport { useEffect, useRef, useState } from \"react\";\nimport { useNavigate } from 'react-router-dom';\n\nfunction Flasher() {\n  const containerRef = useRef<HTMLDivElement>(null);\n  const [gen, setGen] = useState<2 | 3 | null>(null);\n\n  const navigate = useNavigate();\n  useEffect(() => {\n    if (!('serial' in navigator)) {\n      navigate('/unsupported', { replace: true });\n    }\n  }, [navigate]);\n\n  useEffect(() => {\n    if (!gen) return;\n    if (!containerRef.current) return;\n    if (containerRef.current.children.length) {\n      Array.from(containerRef.current.children).forEach(child => containerRef.current?.removeChild(child));\n    }\n\n    const button = new InstallButton();\n    button.manifest = createManifest(gen);\n\n    button.showLog = true;\n    button.logConsole = true;\n\n    containerRef.current.appendChild(button);\n\n    containerRef.current.animate([\n      { opacity: 0, transform: 'scale(0.95)' },\n      { opacity: 1, transform: 'scale(1)' }\n    ], { duration: 300, easing: 'ease-out' });\n  }, [gen]);\n\n  return (\n    <div className=\"card flasher\">\n      <p className=\"success\">Brainslug Web Flasher</p>\n      <p>\n        Select your Neato robot generation, D3-D7 robots are <code>gen3</code> and D70-D85 + BotVac Connected (without D) is <code>gen2</code>.\n        You can read more about the generations <a href=\"https://github.com/Philip2809/neato-brainslug/blob/main/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">on the GitHub</a>.\n      </p>\n\n      <div className=\"gen-picker\">\n        <button\n          className={`gen-pick ${gen === 2 ? 'active' : ''}`}\n          onClick={() => setGen(2)}\n          style={{\n            boxShadow: gen === 2 ? '0 0 8px 2px rgba(76, 175, 80, 0.6)' : 'none',\n            transition: 'box-shadow 0.2s ease, transform 0.2s ease',\n            transform: gen === 2 ? 'scale(1.05)' : 'scale(1)'\n          }}\n        >\n          GEN 2\n        </button>\n        <button\n          className={`gen-pick ${gen === 3 ? 'active' : ''}`}\n          onClick={() => setGen(3)}\n          style={{\n            boxShadow: gen === 3 ? '0 0 8px 2px rgba(76, 175, 80, 0.6)' : 'none',\n            transition: 'box-shadow 0.2s ease, transform 0.2s ease',\n            transform: gen === 3 ? 'scale(1.05)' : 'scale(1)'\n          }}\n        >\n          GEN 3\n        </button>\n      </div>\n\n\n      <div ref={containerRef}></div>\n    </div>\n  )\n}\n\nexport default Flasher\n\n\nfunction createManifest(gen: number) {\n  const genstr = gen === 2 ? 'gen2' : 'gen3';\n  const getUrl = (filename: string) => new URL(filename, window.location.href).href;\n\n  const manifest = {\n    \"name\": `Neato Brainslug - ${genstr.toUpperCase()}`,\n    \"version\": \"1.2.1\",\n    \"home_assistant_domain\": \"esphome\",\n    \"funding_url\": \"https://ko-fi.com/philip2809\",\n    \"builds\": [\n      {\n        \"chipFamily\": \"ESP32\",\n        \"parts\": [\n          {\n            \"path\": getUrl(`/webflash/nbs-${genstr}-esp32.factory.bin`),\n            \"offset\": 0\n          }\n        ]\n      },\n      {\n        \"chipFamily\": \"ESP32-S3\",\n        \"parts\": [\n          {\n            \"path\": getUrl(`/webflash/nbs-${genstr}-esp32s3.factory.bin`),\n            \"offset\": 0\n          }\n        ]\n      },\n      {\n        \"chipFamily\": \"ESP32-C3\",\n        \"parts\": [\n          {\n            \"path\": getUrl(`/webflash/nbs-${genstr}-esp32c3.factory.bin`),\n            \"offset\": 0\n          }\n        ]\n      },\n      {\n        \"chipFamily\": \"ESP32-C6\",\n        \"parts\": [\n          {\n            \"path\": getUrl(`/webflash/nbs-${genstr}-esp32c6.factory.bin`),\n            \"offset\": 0\n          }\n        ]\n      }\n    ]\n  }\n  const json = JSON.stringify(manifest);\n  const blob = new Blob([json], { type: \"application/json\" });\n  return URL.createObjectURL(blob);\n}\n"
  },
  {
    "path": "brainslug-tools/src/pages/ha-config.scss",
    "content": ".ha-config-container {\n  padding: 2rem;\n  max-width: fit-content;\n  margin: 0 auto;\n  text-align: left;\n  display: flex;\n  flex-direction: column;\n  gap: 1rem;\n\n  h1 {\n    margin-bottom: 0.5rem;\n  }\n\n  p {\n    margin-top: 0;\n    margin-bottom: 2rem;\n    color: #a0a0a0;\n  }\n\n  .config-layout {\n    display: flex;\n    gap: 2rem;\n\n    @media (max-width: 800px) {\n      flex-direction: column;\n    }\n  }\n\n  .config-form {\n    flex: 1;\n    display: flex;\n    flex-direction: column;\n    gap: 1rem;\n    background: #1e1e1e;\n    padding: 1.5rem;\n    border-radius: 8px;\n\n    .form-group {\n      display: flex;\n      flex-direction: column;\n      gap: 0.4rem;\n\n      label {\n        font-weight: bold;\n        color: #ddd;\n      }\n\n      input[type=\"text\"], select {\n        padding: 0.6rem;\n        background: #2a2a2a;\n        border: 1px solid #444;\n        border-radius: 4px;\n        color: #fff;\n        font-family: inherit;\n\n        &:focus {\n          border-color: #646cff;\n          outline: none;\n        }\n      }\n    }\n\n    .checkbox-group {\n      flex-direction: row;\n      align-items: center;\n\n      label {\n        display: flex;\n        align-items: center;\n        gap: 0.5rem;\n        cursor: pointer;\n      }\n\n      input[type=\"checkbox\"] {\n        cursor: pointer;\n        width: 1.2rem;\n        height: 1.2rem;\n      }\n    }\n\n    .sub-group {\n      padding-left: 1.5rem;\n      border-left: 2px solid #444;\n      display: flex;\n      flex-direction: column;\n      gap: 1rem;\n      margin-top: -0.5rem;\n    }\n\n    hr {\n      border: 0;\n      border-top: 1px solid #444;\n      margin: 0.5rem 0;\n    }\n  }\n\n  .config-output {\n    flex: 1;\n    background: #161b22;\n    border-radius: 8px;\n    padding: 1.5rem;\n    border: 1px solid #30363d;\n    display: flex;\n    flex-direction: column;\n\n    .output-header {\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n      margin-bottom: 1rem;\n      border-bottom: 1px solid #30363d;\n      padding-bottom: 0.5rem;\n\n      h3 {\n        margin: 0;\n        color: #fff;\n      }\n\n      .action-btn {\n        background-color: #238636;\n        color: #fff;\n        border: none;\n        padding: 0.4rem 1rem;\n        border-radius: 4px;\n        cursor: pointer;\n        font-weight: 500;\n\n        &:hover {\n          background-color: #2ea043;\n        }\n      }\n    }\n\n    pre {\n      margin: 0;\n      overflow-x: auto;\n      font-size: 1.1rem;\n      color: #e6edf3;\n      font-family: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace;\n      \n      code {\n        white-space: pre;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "brainslug-tools/src/pages/ha-config.tsx",
    "content": "import { useState } from 'react';\nimport './ha-config.scss';\n\nexport default function HaConfig() {\n  const [name, setName] = useState('neato-vacuum');\n  const [comment, setComment] = useState('');\n  const [infoInterval, setInfoInterval] = useState('2sec');\n  const [chargerInterval, setChargerInterval] = useState('2min');\n  const [otaPassword, setOtaPassword] = useState('!secret neato_vacuum_ota');\n\n  const [useHa, setUseHa] = useState(true);\n  const [wifiSsid, setWifiSsid] = useState('!secret wifi_ssid');\n  const [wifiPassword, setWifiPassword] = useState('!secret wifi_password');\n  const [haEncryptionKey, setHaEncryptionKey] = useState('!secret neato_vacuum_api');\n\n  const [useCustomUart, setUseCustomUart] = useState(false);\n  const [uartTx, setUartTx] = useState('17');\n  const [uartRx, setUartRx] = useState('16');\n\n  const [useDomainInfo, setUseDomainInfo] = useState(false);\n  const [domain, setDomain] = useState('.lan');\n  const [useAddress, setUseAddress] = useState('192.168.205.199');\n\n  const [boardType, setBoardType] = useState('esp32s2.yaml');\n  const [neatoGen, setNeatoGen] = useState('gen3.yaml');\n\n  const generateYaml = () => {\n    let yaml = `    substitutions:\n    name: ${name}\n    comment: \"${comment}\"\n    infointerval: ${infoInterval}\n    chargerinterval: ${chargerInterval}\n    ota_password: ${otaPassword}\n\n`;\n\n    if (useHa) {\n      yaml += `\n  ### If you are using ha:\n  wifi_ssid: ${wifiSsid}\n  wifi_password: ${wifiPassword}\n  ha_encryption_key: ${haEncryptionKey}\n`;\n    } else {\n      yaml += `\n  ### If you are using ha:\n  # wifi_ssid: !secret wifi_ssid\n  # wifi_password: !secret wifi_password\n  # ha_encryption_key: !secret neato_vacuum_api\n`;\n    }\n\n    if (useCustomUart) {\n      yaml += `\n  ### If you want to change the UART Pins\n  uart_tx: ${uartTx}\n  uart_rx: ${uartRx}\n`;\n    } else {\n      yaml += `\n  ### If you want to change the UART Pins\n  # uart_tx: 17\n  # uart_rx: 16\n`;\n    }\n\n    yaml += `\n\nwifi:\n`;\n    if (useDomainInfo) {\n      yaml += `  ### If your router sets another TLD for local devices, specify that here\n  domain: ${domain}\n  ### If you are having issues with the dns or are 100% this will be the ip, you can spesify that here\n  use_address: ${useAddress}\n`;\n    } else {\n      yaml += `  ### If your router sets another TLD for local devices, specify that here\n  # domain: .lan\n  ### If you are having issues with the dns or are 100% this will be the ip, you can spesify that here\n  # use_address: 192.168.205.199\n`;\n    }\n\n    yaml += `\n\npackages:\n  remote_package_files:\n    url: https://github.com/philip2809/neato-brainslug\n    files:\n`;\n    const boards = ['esp32.yaml', 'esp32c3.yaml', 'esp32s3.yaml', 'esp32s2.yaml'];\n    for (const b of boards) {\n      yaml += b === boardType ? `      - config/boards/${b}\\n` : `      # - config/boards/${b}\\n`;\n    }\n\n    yaml += `\\n`;\n\n    if (useHa) {\n      yaml += `      - config/ha.yaml             # Remember to set wifi credentials and ha_encryption_key in the substitutions if you are using this\n      # - config/no-ha.yaml\n`;\n    } else {\n      yaml += `      # - config/ha.yaml\n      - config/no-ha.yaml\n`;\n    }\n\n    yaml += `\\n      - config/webserver.yaml\\n`;\n\n    if (neatoGen === 'gen3.yaml') {\n      yaml += `      - config/gen3.yaml\n      # - config/gen2.yaml\\n`;\n    } else {\n      yaml += `      # - config/gen3.yaml\n      - config/gen2.yaml\\n`;\n    }\n\n    yaml += `    ref: main\n`;\n\n    return yaml;\n  };\n\n  const copyToClipboard = () => {\n    navigator.clipboard.writeText(generateYaml());\n  };\n\n  return (\n    <div className=\"ha-config-container card\">\n      <p className=\"success\">HA Config Generator</p>\n      <p>Configure your ESPHome YAML file easily.</p>\n\n      <div className=\"config-layout\">\n        <div className=\"config-form\">\n          <div className=\"form-group\">\n            <label>Name</label>\n            <input type=\"text\" value={name} onChange={e => setName(e.target.value)} />\n          </div>\n          <div className=\"form-group\">\n            <label>Comment</label>\n            <input type=\"text\" value={comment} onChange={e => setComment(e.target.value)} />\n          </div>\n          <div className=\"form-group\">\n            <label>Info Interval</label>\n            <input type=\"text\" value={infoInterval} onChange={e => setInfoInterval(e.target.value)} />\n          </div>\n          <div className=\"form-group\">\n            <label>Charger Interval</label>\n            <input type=\"text\" value={chargerInterval} onChange={e => setChargerInterval(e.target.value)} />\n          </div>\n          <div className=\"form-group\">\n            <label>OTA Password</label>\n            <input type=\"text\" value={otaPassword} onChange={e => setOtaPassword(e.target.value)} />\n          </div>\n\n          <hr />\n\n          <div className=\"form-group checkbox-group\">\n            <label>\n              <input type=\"checkbox\" checked={useHa} onChange={e => setUseHa(e.target.checked)} />\n              Use Home Assistant Integration?\n            </label>\n          </div>\n          {useHa && (\n            <div className=\"sub-group\">\n              <div className=\"form-group\">\n                <label>Wi-Fi SSID</label>\n                <input type=\"text\" value={wifiSsid} onChange={e => setWifiSsid(e.target.value)} />\n              </div>\n              <div className=\"form-group\">\n                <label>Wi-Fi Password</label>\n                <input type=\"text\" value={wifiPassword} onChange={e => setWifiPassword(e.target.value)} />\n              </div>\n              <div className=\"form-group\">\n                <label>HA Encryption Key</label>\n                <input type=\"text\" value={haEncryptionKey} onChange={e => setHaEncryptionKey(e.target.value)} />\n              </div>\n            </div>\n          )}\n\n          <hr />\n\n          <div className=\"form-group checkbox-group\">\n            <label>\n              <input type=\"checkbox\" checked={useCustomUart} onChange={e => setUseCustomUart(e.target.checked)} />\n              Change UART Pins?\n            </label>\n          </div>\n          {useCustomUart && (\n            <div className=\"sub-group\">\n              <div className=\"form-group\">\n                <label>UART TX</label>\n                <input type=\"text\" value={uartTx} onChange={e => setUartTx(e.target.value)} />\n              </div>\n              <div className=\"form-group\">\n                <label>UART RX</label>\n                <input type=\"text\" value={uartRx} onChange={e => setUartRx(e.target.value)} />\n              </div>\n            </div>\n          )}\n\n          <hr />\n\n          <div className=\"form-group checkbox-group\">\n            <label>\n              <input type=\"checkbox\" checked={useDomainInfo} onChange={e => setUseDomainInfo(e.target.checked)} />\n              Use Custom DNS/IP?\n            </label>\n          </div>\n          {useDomainInfo && (\n            <div className=\"sub-group\">\n              <div className=\"form-group\">\n                <label>Domain</label>\n                <input type=\"text\" value={domain} onChange={e => setDomain(e.target.value)} />\n              </div>\n              <div className=\"form-group\">\n                <label>Use Address</label>\n                <input type=\"text\" value={useAddress} onChange={e => setUseAddress(e.target.value)} />\n              </div>\n            </div>\n          )}\n\n          <hr />\n\n          <div className=\"form-group\">\n            <label>Board Type</label>\n            <select value={boardType} onChange={e => setBoardType(e.target.value)}>\n              <option value=\"esp32.yaml\">ESP32</option>\n              <option value=\"esp32c3.yaml\">ESP32-C3</option>\n              <option value=\"esp32s3.yaml\">ESP32-S3</option>\n              <option value=\"esp32s2.yaml\">ESP32-S2</option>\n            </select>\n          </div>\n\n          <div className=\"form-group\">\n            <label>Neato Generation</label>\n            <select value={neatoGen} onChange={e => setNeatoGen(e.target.value)}>\n              <option value=\"gen3.yaml\">Gen 3 (Botvac Connected onwards)</option>\n              <option value=\"gen2.yaml\">Gen 2</option>\n            </select>\n          </div>\n        </div>\n\n        <div className=\"config-output\">\n          <div className=\"output-header\">\n            <h3>Generated YAML</h3>\n            <button onClick={copyToClipboard} className=\"action-btn\">Copy</button>\n          </div>\n          <pre>\n            <code>{generateYaml()}</code>\n          </pre>\n        </div>\n      </div>\n    </div>\n  );\n}\n"
  },
  {
    "path": "brainslug-tools/src/pages/home.scss",
    "content": ".home {\n    text-align: center;\n    max-width: 900px;\n\n    p {\n        font-size: 1.8rem;\n        color: #aaa;\n        line-height: 1.7;\n    }\n\n    strong {\n        color: #e0e0e0;\n    }\n\n    .success {\n        font-size: 2.2rem;\n        font-weight: 600;\n        color: #5ac060;\n    }\n}"
  },
  {
    "path": "brainslug-tools/src/pages/home.tsx",
    "content": "import { Link } from 'react-router-dom';\nimport './home.scss';\n\nfunction Home() {\n\n    return (\n        <div className=\"card home\">\n            <p className=\"success\">Neato Brainslug</p>\n            <p>\n                Neato Brainslug allows local control of your Neato robot, <strong>with</strong> or <strong>without</strong>, Home Assistant.\n                To make the proccess of installing the Brainslug easier, tools on this site will help you along the way. <br /> <br />\n\n                Use <Link to=\"/robot\">Robot Managment</Link> to connect to your robot and view live data or find errors with your device!<br />\n                Use the <Link to=\"/flash\">Web Flasher</Link> to easily flash the Brainslug firmware to your ESP32, no matter your OS!<br /><br />\n\n                For furthur information about the project, check out the&nbsp;<a href=\"https://github.com/philip2809/neato-brainslug\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub repository</a> where \n                you can find full install guides!\n            </p>\n        </div>\n    )\n}\n\nexport default Home\n"
  },
  {
    "path": "brainslug-tools/src/pages/robot.scss",
    "content": "\n.connect-robot {\n  background: #1e1e1e;\n  border: 1px solid #2e2e2e;\n  border-radius: 12px;\n  padding: 2.5rem;\n  width: 100%;\n  max-width: 480px;\n  text-align: left;\n  display: flex;\n  flex-direction: column;\n\n  .subtitle {\n    font-size: 1.4rem;\n    color: #ccc;\n    line-height: 1.5;\n  }\n\n  .title {\n    font-size: 2.2rem;\n    font-weight: 600;\n    color: #e0e0e0;\n    margin-bottom: 0.75rem;\n  }\n\n  .toggle-row {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    gap: 0.8rem;\n\n    .toggle-label {\n      font-size: 1.2rem;\n      color: #aaa;\n      user-select: none;\n      cursor: pointer;\n    }\n\n    .badge {\n      font-size: 0.85rem;\n      font-weight: 600;\n      background: #2a2218;\n      color: #a07840;\n      border: 1px solid #3a3020;\n      border-radius: 4px;\n      padding: 0.2rem 0.5rem;\n      text-transform: uppercase;\n      letter-spacing: 0.05em;\n    }\n\n    /* custom toggle switch */\n    .switch {\n      position: relative;\n      display: inline-block;\n      width: 38px;\n      height: 22px;\n      flex-shrink: 0;\n\n      input {\n        opacity: 0;\n        width: 0;\n        height: 0;\n\n        &:checked + .slider {\n          background: #2a3a2a;\n          border-color: #3a5a3a;\n        }\n\n        &:checked + .slider::before {\n          transform: translateX(16px);\n          background: #5a9e6f;\n        }\n      }\n    }\n\n    .slider {\n      position: absolute;\n      inset: 0;\n      background: #2e2e2e;\n      border: 1px solid #3a3a3a;\n      border-radius: 20px;\n      cursor: pointer;\n      transition: background 0.2s, border-color 0.2s;\n\n      &::before {\n        content: '';\n        position: absolute;\n        width: 14px;\n        height: 14px;\n        left: 3px;\n        top: 3px;\n        background: #888;\n        border-radius: 50%;\n        transition: transform 0.2s, background 0.2s;\n      }\n    }\n  }\n\n  button.connect {\n    background: #2a2a2a;\n    border: 1px solid #3a3a3a;\n    color: #e0e0e0;\n    font-family: inherit;\n    font-size: 1.6rem;\n    font-weight: 500;\n    padding: 0.8rem 1.6rem;\n    border-radius: 6px;\n    cursor: pointer;\n    transition: background 0.15s, border-color 0.15s;\n    align-self: center;\n\n    &:hover:not(:disabled) {\n      background: #333;\n      border-color: #4a4a4a;\n    }\n\n    &:disabled {\n      opacity: 0.6;\n      cursor: not-allowed;\n    }\n  }\n\n  .status {\n    font-size: 1.4rem;\n    color: #888;\n    align-self: center;\n  }\n}\n\n.info-cards {\n  display: flex;\n  flex-direction: column;\n  margin-top: 2rem;\n  gap: 1.5rem;\n  margin-bottom: 2rem;\n}\n\n.robot-info {\n  font-size: 1.8rem;\n  padding: 1.5rem;\n  background: #1e1e1e;\n  border: 1px solid #2e2e2e;\n  border-radius: 12px;\n  width: 100%;\n  max-width: 550px;\n  box-sizing: border-box;\n\n  .info-header {\n    display: flex;\n    justify-content: space-between;\n    align-items: flex-start;\n    margin-bottom: 1.5rem;\n    flex-wrap: wrap;\n    gap: 1rem;\n\n    .title-group {\n      display: flex;\n      flex-direction: column;\n      gap: 0.3rem;\n\n      h2 {\n        margin: 0;\n        font-size: 2rem;\n        font-weight: 600;\n        color: #fff;\n      }\n\n      .time-ago {\n        font-size: 1.2rem;\n        color: #888;\n        min-width: 15rem; /* Prevents text shifts from pushing buttons */\n      }\n    }\n\n    .action-group {\n      display: flex;\n      gap: 0.8rem;\n      align-items: center;\n\n      .tooltip-wrap {\n        display: inline-flex;\n      }\n\n      .action-btn {\n        background: #2a2a2a;\n        border: 1px solid #3a3a3a;\n        color: #e0e0e0;\n        font-family: inherit;\n        font-size: 1.3rem;\n        font-weight: 500;\n        padding: 0.5rem 1rem;\n        border-radius: 6px;\n        cursor: pointer;\n        transition: background 0.15s, border-color 0.15s, opacity 0.15s;\n\n        &:hover:not(:disabled) {\n          background: #333;\n          border-color: #4a4a4a;\n        }\n\n        &:disabled {\n          opacity: 0.4;\n          cursor: not-allowed;\n        }\n      }\n    }\n  }\n\n  .no-data {\n    color: #666;\n    font-size: 1.4rem;\n    font-style: italic;\n    margin-bottom: 1rem;\n  }\n\n  .table {\n    display: flex;\n    flex-direction: column;\n    width: 100%;\n    \n    .row {\n      padding: 0.8rem;\n      display: flex;\n      justify-content: space-between;\n      background-color: #3a3a3a;\n      &:nth-child(odd) {\n        background-color: #2a2a2a;\n      }\n\n      .key {\n        font-weight: 500;\n        color: #aaa;\n      }\n    }\n  }\n}"
  },
  {
    "path": "brainslug-tools/src/pages/robot.tsx",
    "content": "import { useEffect, useState, useSyncExternalStore } from 'react';\nimport './robot.scss';\nimport { connectToRobot, robot, subscribeToRobot, getRobotUpdateTick } from '../logic/connect';\nimport type { DataKeyData } from '../logic/robot';\nimport TimeAgo from 'react-timeago';\nimport { useNavigate } from 'react-router-dom';\n\nfunction Robot() {\n  const [status, setStatus] = useState<string>('Not connected');\n  const [filterResults, setFilterResults] = useState(false);\n\n  const navigate = useNavigate();\n  useEffect(() => {\n    if (!('serial' in navigator)) {\n      navigate('/unsupported', { replace: true });\n    }\n  }, [navigate]);\n\n  // Just use the external store to subscribe to a simple \"update tick\" counter.\n  // When 'updateRobotStore()' is called, the tick increases, forcing React to rerender.\n  useSyncExternalStore(subscribeToRobot, getRobotUpdateTick);\n\n  if (!robot) return (\n    <div className=\"card connect-robot\">\n      <span className='title'>Connect your Neato</span>\n      <p className=\"subtitle\">\n        Remove the dustbin from your Neato vacuum and connect to the USB port.\n        Click the button below and select your Neato, It may appear as <strong>\"USB Serial Device (COMx)\"</strong> on Windows,\n        or <strong>\"CDC Serial\"</strong> / <strong>\"ttyACM0\"</strong> on Linux/MacOS. You can also try to unplug and replug to device\n        to see which one appears if you're not sure.\n      </p>\n\n      <div className=\"toggle-row\">\n        <label className=\"switch\">\n          <input\n            type=\"checkbox\"\n            checked={filterResults}\n            onChange={() => setFilterResults(!filterResults)}\n          />\n          <span className=\"slider\"></span>\n        </label>\n        <span className=\"toggle-label\" onClick={() => setFilterResults(!filterResults)}>\n          Filter by Neato device type\n        </span>\n        <span className=\"badge\">Experimental</span>\n      </div>\n\n      <button className=\"connect\" onClick={() => connectToRobot(setStatus, filterResults)}>\n        Connect to Robot\n      </button>\n\n      <div className=\"status\">Status: {status}</div>\n    </div>\n  )\n\n  // Easily extract the value now to avoid ? all over the HTML\n  const { version, charger, error } = robot;\n\n  return (\n    <div className='info-cards'>\n      <InfoCard title=\"Version Info\" data={version} />\n      <InfoCard title=\"Error Info\" data={error} />\n      <InfoCard title=\"Charger Info\" data={charger} />\n    </div>\n  )\n}\n\nfunction InfoCard({ title, data }: { title: string, data: DataKeyData }) {\n\n  const hasData = data.basic.length > 0 || (data.advanced && data.advanced.length > 0);\n  const [advancedVisible, setAdvancedVisible] = useState(false);\n\n  return (\n    <div className=\"card robot-info\">\n      <div className=\"info-header\">\n        <div className=\"title-group\">\n          <h2>{title}</h2>\n          <span className=\"time-ago\">Updated: <TimeAgo date={data.lastUpdated} /></span>\n        </div>\n        <div className=\"action-group\">\n          <button className=\"action-btn\" onClick={() => robot?.sendCommand(data.command)}>Refresh</button>\n          <span className=\"tooltip-wrap\" title={(!data.advanced || data.advanced.length === 0) ? \"No advanced data\" : undefined}>\n            <button className=\"action-btn\" onClick={() => setAdvancedVisible(v => !v)} disabled={!data.advanced || data.advanced.length === 0}>\n              {advancedVisible ? 'Hide Advanced' : 'Show Advanced'}\n            </button>\n          </span>\n        </div>\n      </div>\n      {!hasData && <p className=\"no-data\">No data received yet.</p>}\n      <div className='table'>\n        {data.basic.map(([key, value]) => (\n          <div className='row' key={key}>\n            <span className='key'>{key}:</span>\n            <span>{value}</span>\n          </div>\n        ))}\n        {advancedVisible && data.advanced && data.advanced.map(([key, value]) => (\n          <div className='row' key={key}>\n            <span className='key'>{key}:</span>\n            <span>{value}</span>\n          </div>\n        ))}\n      </div>\n    </div>\n  )\n}\n\nexport default Robot\n"
  },
  {
    "path": "brainslug-tools/src/pages/unsupported.scss",
    "content": ".unsupported {\n    text-align: center;\n\n    p {\n        font-size: 1.8rem;\n        color: #aaa;\n        line-height: 1.7;\n    }\n\n    strong {\n        color: #e0e0e0;\n    }\n\n    .warn {\n        font-size: 1.6rem;\n        font-weight: 600;\n        color: #c0605a;\n    }\n\n    .success {\n        font-size: 1.6rem;\n        font-weight: 600;\n        color: #5ac060;\n    }\n}"
  },
  {
    "path": "brainslug-tools/src/pages/unsupported.tsx",
    "content": "import { useNavigate } from 'react-router-dom';\nimport './unsupported.scss';\nimport { useEffect } from 'react';\n\nfunction Unsupported() {\n\n    const navigate = useNavigate();\n    useEffect(() => {\n        if (('serial' in navigator)) {\n            navigate('/', { replace: true });\n        }\n    }, [navigate]);\n\n    return (\n        <div className=\"card unsupported\">\n            <p className=\"warn\">Browser not supported</p>\n            <p>WebSerial is required for the tools to work.<br />\n                Please use a Chromium-based browser like <strong>Chrome</strong>, <strong>Brave</strong>, or <strong>Edge</strong>.</p>\n        </div>\n    )\n}\n\nexport default Unsupported\n"
  },
  {
    "path": "brainslug-tools/tsconfig.app.json",
    "content": "{\n  \"compilerOptions\": {\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n    \"target\": \"ES2023\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2023\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"types\": [\"vite/client\", \"w3c-web-serial\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"verbatimModuleSyntax\": true,\n    \"moduleDetection\": \"force\",\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"erasableSyntaxOnly\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUncheckedSideEffectImports\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "brainslug-tools/tsconfig.json",
    "content": "{\n  \"files\": [],\n  \"references\": [\n    { \"path\": \"./tsconfig.app.json\" },\n    { \"path\": \"./tsconfig.node.json\" }\n  ]\n}\n"
  },
  {
    "path": "brainslug-tools/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.node.tsbuildinfo\",\n    \"target\": \"ES2023\",\n    \"lib\": [\"ES2023\"],\n    \"module\": \"ESNext\",\n    \"types\": [\"node\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"verbatimModuleSyntax\": true,\n    \"moduleDetection\": \"force\",\n    \"noEmit\": true,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"erasableSyntaxOnly\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUncheckedSideEffectImports\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "brainslug-tools/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vite.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "build/build.sh",
    "content": "set -e\n\ndocker compose up -d\ndocker exec -i esphome_builder bash << 'EOF'\nset -e\n\nBUILT_FACTORY=\"/config/prebuilt/.esphome/build/neato-vacuum/.pioenvs/neato-vacuum/firmware.factory.bin\"\nBUILT_OTA=\"/config/prebuilt/.esphome/build/neato-vacuum/.pioenvs/neato-vacuum/firmware.ota.bin\"\n\n\ncd /config/prebuilt\n\nesphome compile gen3-esp32.yaml\ncp $BUILT_FACTORY ./nbs-gen3-esp32.factory.bin\ncp $BUILT_OTA ./nbs-gen3-esp32.ota.bin\n\nesphome compile gen3-esp32s3.yaml\ncp $BUILT_FACTORY ./nbs-gen3-esp32s3.factory.bin\ncp $BUILT_OTA ./nbs-gen3-esp32s3.ota.bin\n\nesphome compile gen3-esp32c3.yaml\ncp $BUILT_FACTORY ./nbs-gen3-esp32c3.factory.bin\ncp $BUILT_OTA ./nbs-gen3-esp32c3.ota.bin\n\nesphome compile gen2-esp32.yaml\ncp $BUILT_FACTORY ./nbs-gen2-esp32.factory.bin\ncp $BUILT_OTA ./nbs-gen2-esp32.ota.bin\n\nesphome compile gen2-esp32s3.yaml\ncp $BUILT_FACTORY ./nbs-gen2-esp32s3.factory.bin\ncp $BUILT_OTA ./nbs-gen2-esp32s3.ota.bin\n\nesphome compile gen2-esp32c3.yaml\ncp $BUILT_FACTORY ./nbs-gen2-esp32c3.factory.bin\ncp $BUILT_OTA ./nbs-gen2-esp32c3.ota.bin\nEOF"
  },
  {
    "path": "build/dev.sh",
    "content": "set -e\n\ndocker compose up -d\ndocker exec -e DO_UPLOAD=\"$1\" -i esphome_builder bash << 'EOF'\nset -e\n\nBUILT_OTA=\"/config/.esphome/build/neato-vacuum/.pioenvs/neato-vacuum/firmware.ota.bin\"\nBUILT_FACTORY=\"/config/.esphome/build/neato-vacuum/.pioenvs/neato-vacuum/firmware.factory.bin\"\ncd /config\n\nrm -f dev.ota.bin\nrm -f dev.factory.bin\n\nesphome compile .local.yaml\n\ncp $BUILT_OTA dev.ota.bin\ncp $BUILT_FACTORY dev.factory.bin\n\nchown 1000:1000 dev.ota.bin\nchown 1000:1000 dev.factory.bin\n\nif [ \"$DO_UPLOAD\" = \"upload\" ]; then\n  echo \"Uploading to ESP...\"\n  curl -X POST \"http://192.168.205.199/update\" \\\n    -H \"Accept: application/octet-stream\" \\\n    -F \"update=@./dev.ota.bin;type=application/octet-stream\"\nfi\nEOF"
  },
  {
    "path": "build/docker-compose.yml",
    "content": "services:\n  esphome:\n    container_name: esphome_builder\n    image: ghcr.io/esphome/esphome\n    volumes:\n      - ../config:/config\n      - /etc/localtime:/etc/localtime:ro\n    restart: always\n    privileged: true\n    network_mode: host\n    environment:\n      - USERNAME=test\n      - PASSWORD=ChangeMe"
  },
  {
    "path": "build/new-version.md",
    "content": "\n\nnote for myself to release new version\n\n- update version in gen3 and gen2 config\n- update version in brainslug tools\n- update version in webserver\n- update version in ha card\n\n"
  },
  {
    "path": "config/.gitignore",
    "content": "# Gitignore settings for ESPHome\n# This is an example and may include too much for your use-case.\n# You can modify this file to suit your needs.\n.esphome/\nsecrets.yaml\n\ndev.factory.bin\ndev.ota.bin\ndev.yaml"
  },
  {
    "path": "config/boards/esp32.yaml",
    "content": "esp32:\n  variant: ESP32\n  framework:\n    type: esp-idf\n\nsubstitutions:\n  uart_tx: 17\n  uart_rx: 16\n\n  \n\n"
  },
  {
    "path": "config/boards/esp32c3.yaml",
    "content": "esp32:\n  variant: ESP32C3\n  framework:\n    type: esp-idf\n\nsubstitutions:\n  uart_tx: 7\n  uart_rx: 6\n\n  \n\n"
  },
  {
    "path": "config/boards/esp32c6.yaml",
    "content": "esp32:\n  variant: ESP32C6\n  framework:\n    type: esp-idf\n\nsubstitutions:\n  uart_tx: 7\n  uart_rx: 6\n\n  \n\n"
  },
  {
    "path": "config/boards/esp32s2.yaml",
    "content": "esp32:\n  variant: ESP32S2\n  framework:\n    type: esp-idf\n\nsubstitutions:\n  uart_tx: 17\n  uart_rx: 16\n\n  \n\n"
  },
  {
    "path": "config/boards/esp32s3.yaml",
    "content": "esp32:\n  variant: ESP32S3\n  framework:\n    type: esp-idf\n\nsubstitutions:\n  uart_tx: 17\n  uart_rx: 16\n\n  \n\n"
  },
  {
    "path": "config/comp/gen2.yaml",
    "content": "substitutions:\n  version: \"1.2.1\"\n  type: \"gen2\"\n  buildinfo: \"${version} [TX:${uart_tx} RX:${uart_rx}]\"\n\n\nlogger:\nimprov_serial:\ncaptive_portal:\n\nwifi:\n  ap:\n    ssid: \"neato-brainslug\"\n    password: \"make-it-suck-again\"\n\nota:\n  - platform: esphome\n    password: ${ota_password}\n\nesphome:\n  name: ${name}\n  project: \n    name: philip2809.neato-brainslug\n    version: ${buildinfo}\n\n  comment: \"${type}|${buildinfo}|${comment}\"\n\n  on_boot:\n    - priority: 600\n      then:\n        - lambda: !lambda |-\n            id(uiState).publish_state(\"Starting...\");\n        - logger.set_level: INFO\n\n    - priority: -100\n      then:\n        - lambda: !lambda |-\n            id(uiState).publish_state(\"Starting...\");\n\n            // Update nbs_time and text entity from persisted global\n            if (!id(g_timezone).empty()) {\n              id(nbs_time).set_timezone(id(g_timezone).c_str());\n              id(timezone_text).publish_state(id(g_timezone).c_str());\n              ESP_LOGI(\"timezone\", \"Restored timezone: %s\", id(g_timezone).c_str());\n            }\n\n            char buf[40];\n            snprintf(\n              buf, sizeof(buf),\n              \"%u,%u,%u,%u,%u,%u,%u,%u\",\n              id(g_schedule)[0],\n              id(g_schedule)[1],\n              id(g_schedule)[2],\n              id(g_schedule)[3],\n              id(g_schedule)[4],\n              id(g_schedule)[5],\n              id(g_schedule)[6],\n              id(g_schedule)[7]\n            );\n\n            id(scheduleset).publish_state(buf);\n\n\nscript:\n  - id: get_user_settings\n    mode: queued\n    then:\n      - delay: 100ms\n      - uart.write: \"GetUserSettings \\n\"\n\n  - id: get_all_data\n    mode: queued\n    then: \n      - uart.write: \"GetErr \\n\"  \n      - delay: 50ms  \n      - uart.write: \"GetCharger \\n\"    \n      - delay: 50ms  \n      - uart.write: \"GetUserSettings \\n\"  \n      - delay: 50ms\n      - uart.write: \"SetSystemMode \\n\"\n      - delay: 50ms  \n      - uart.write: \"GetVersion \\n\"    \n  \n  - id: initial_data_get # when the robot has booted, run this initial fetch after 5 seconds of being able to send commands, the 5 sec needed to the robot can calculate battery level etc.\n    mode: queued\n    then: \n      - delay: 5sec\n      - script.execute: get_all_data\n\n  - id: robotShutdown\n    mode: queued\n    then:\n      - lambda: 'id(uiState).publish_state(\"Shutting down...\");'\n      - uart.write: \"TestMode On \\n\"\n      - delay: 100ms\n      - uart.write: \"SetSystemMode Shutdown \\n\"\n\n  - id: powercycle\n    mode: queued\n    then:\n      - lambda: 'id(initial_ready) = false;' # I want to refetch all data in case we powercycle\n      - lambda: 'id(uiState).publish_state(\"Shutting down...\");'\n      - uart.write: \"TestMode On \\n\"\n      - delay: 100ms\n      - uart.write: \"SetSystemMode PowerCycle \\n\"\n\n  - id: play_extra_sounds\n    parameters:\n      soundid: int\n    then:\n      - if:\n          condition:\n            lambda: |-\n              return id(g_play_extra_sounds);\n          then:\n            - uart.write: !lambda |-\n                std::string s =\n                  \"PlaySound SoundId \" + std::to_string(soundid) + \"\\n\";\n                return std::vector<uint8_t>(s.begin(), s.end());\n\n\nglobals:\n  - id: initial_ready\n    type: bool\n    restore_value: no\n    initial_value: 'false'\n\n  # --- Restore Value ---\n  - id: g_play_extra_sounds\n    type: bool\n    restore_value: yes\n\n  - id: g_schedule\n    type: uint8_t[8]\n    restore_value: yes\n    initial_value: '{0,0,0,0,0,0,0,0}'\n\n  - id: g_timezone\n    type: std::string\n    restore_value: yes\n    initial_value: ''\n\n\ninterval:\n  - interval: ${infointerval}\n    then:\n      - uart.write: \"GetErr \\n\"\n  - interval: ${chargerinterval}\n    then: \n      - uart.write: \"GetCharger \\n\"\n\n\nuart:\n  id: uart_bus\n  baud_rate: 115200\n  tx_pin: ${uart_tx}\n  rx_pin: ${uart_rx}\n  rx_buffer_size: 2048\n  debug:\n    dummy_receiver: true\n    direction: RX\n    after:\n      bytes: 0\n      delimiter: \"\\x1A\"\n    sequence:\n      - lambda: !lambda |-\n          UARTDebug::log_string(direction, bytes);\n\n          // convert bytes -> std::string\n          std::string str(bytes.begin(), bytes.end());\n\n          // ---- TRIM FUNCTION ----\n          auto trim = [](std::string &s) {\n            // trim leading\n            s.erase(s.begin(), std::find_if(s.begin(), s.end(),\n                [](unsigned char ch){ return !std::isspace(ch); }));\n            // trim trailing\n            s.erase(std::find_if(s.rbegin(), s.rend(),\n                [](unsigned char ch){ return !std::isspace(ch); }).base(), s.end());\n          };\n\n          // --- HEX DECODER ---\n          auto hex_to_uint32 = [](const std::string &hex) -> uint32_t {\n              return static_cast<uint32_t>(strtoul(hex.c_str(), nullptr, 16));\n          };\n\n          // ---- SPLIT ON CRLF ----\n          std::vector<std::string> lines;\n          size_t start = 0;\n          size_t end = 0;\n\n          while ((end = str.find(\"\\r\\n\", start)) != std::string::npos) {\n            std::string line = str.substr(start, end - start);\n            trim(line);\n            if (!line.empty()) lines.push_back(line);\n            start = end + 2;\n          }\n\n          if (start < str.size()) {\n            std::string last = str.substr(start);\n            trim(last);\n            if (!last.empty()) lines.push_back(last);\n          }\n\n          if (lines.empty()) return;\n\n          // ---- DETECT WHICH COMMAND WAS USED ----\n          std::string command = lines[0];  // first line (GetErr, GetState, etc.)\n\n\n          ESP_LOGI(\"uart_parser\", \"COMMAND: %s\", command.c_str());\n          // ---- OPTIONAL: print each line for debugging ----\n          for (auto &line : lines) {\n            std::vector<uint8_t> v(line.begin(), line.end());\n            UARTDebug::log_string(direction, v);\n            //ESP_LOGI(\"uart_parser\", \"LINE: %s\", line.c_str());\n          }\n\n\n\n          // ---- SPECIAL PARSING FOR GetErr ----\n          if (command == \"GetErr\") {\n            // A GetErr response looks like for gen2:\n            // 0: GetErr\n            // 1: <error>\n\n            if (lines.size() == 3 && lines[1] != \"\") id(robotError).publish_state(lines[1].c_str());\n            else id(robotError).publish_state(\"No errors\");\n\n            // If we can get erros/alerts, the system is ready for other commands:\n            if (!id(initial_ready)) {\n                id(initial_ready) = true;\n                id(uiState).publish_state(\"Started, ready for commands!\");\n                id(initial_data_get).execute();\n            }\n          }\n\n          else if (command == \"GetCharger\") {\n            // Format after the header:\n            // Label,Value\n            // FuelPercent,53\n            // BatteryOverTemp,0\n            // ...\n\n            for (size_t i = 2; i < lines.size(); i++) {\n              std::string &line = lines[i];\n\n              size_t comma = line.find(',');\n              if (comma == std::string::npos) continue;\n\n              std::string key = line.substr(0, comma);\n              std::string value = line.substr(comma + 1);\n\n              // Trim them:\n              trim(key);\n              trim(value);\n\n              // ---- MATCH KEYS AND PUBLISH ----\n                   if (key == \"FuelPercent\") id(chargerFuelPercent).publish_state(atof(value.c_str()));\n              else if (key == \"BatteryOverTemp\") id(chargerBatteryOverTemp).publish_state(value == \"1\");\n              else if (key == \"ChargingActive\") id(chargerChargingActive).publish_state(value == \"1\");\n              else if (key == \"ChargingEnabled\") id(chargerChargingEnabled).publish_state(value == \"1\");\n              else if (key == \"ConfidentOnFuel\") id(chargerConfidentOnFuel).publish_state(value == \"1\");\n              else if (key == \"OnReservedFuel\") id(chargerOnReservedFuel).publish_state(value == \"1\");\n              else if (key == \"EmptyFuel\") id(chargerEmptyFuel).publish_state(value == \"1\");\n              else if (key == \"BatteryFailure\") id(chargerBatteryFailure).publish_state(value == \"1\");\n              else if (key == \"ExtPwrPresent\") id(chargerExtPwrPresent).publish_state(value == \"1\");\n              else if (key == \"ThermistorPresent\") id(chargerThermistorPresent).publish_state(value == \"1\");\n              else if (key == \"BattTempCAvg\") id(chargerBattTempCAvg).publish_state(atof(value.c_str()));\n              else if (key == \"VBattV\") id(chargerVBattV).publish_state(atof(value.c_str()));\n              else if (key == \"VExtV\") id(chargerVExtV).publish_state(atof(value.c_str()));\n              else if (key == \"Charger_mAH\") id(chargerCharger_mAH).publish_state(atof(value.c_str()));\n              else if (key == \"Discharge_mAH\") id(chargerDischarge_mAH).publish_state(atof(value.c_str()));\n            }\n          }\n\n          else if (command == \"SetSystemMode\") { // Using this command to figure out if you have testmode on or off\n            // 0: SetSystemMode\n            // 1: \"TestMode must be on to use this command.\" OR \"No options specified\"\n            if (lines.size() != 2) return;\n            if (lines[1] == \"No options specified\") id(testMode).publish_state(true);\n            else if (lines[1] == \"TestMode must be on to use this command.\") id(testMode).publish_state(false);\n          }\n\n          else if (command == \"GetVersion\") {\n            for (auto &line : lines) {\n              size_t comma = line.find(',');\n              if (comma == std::string::npos) continue;\n\n              std::string key = line.substr(0, comma);\n              std::string value = line.substr(comma + 1);\n              trim(key);\n              trim(value);\n\n                   if (key == \"Serial Number\") id(robotSerial).publish_state(value.c_str());\n              else if (key == \"Model\") id(robotModel).publish_state(value.c_str());\n              else if (key == \"Software\") id(robotSoftware).publish_state(value.c_str());\n            }\n          }\n\n          else if (command == \"GetUserSettings\") {\n            for (auto &line : lines) {\n              trim(line);\n\n              // Skip lines that start with binary/invalid chars\n              if (!line.empty() && static_cast<unsigned char>(line[0]) >= 0x80) continue;\n\n              // ---- Key,Value lines ----\n              size_t comma = line.find(',');\n              if (comma != std::string::npos) {\n                std::string key = line.substr(0, comma);\n                std::string value = line.substr(comma + 1);\n                trim(key);\n                trim(value);\n\n                     if (key == \"ClickSounds\") id(clickSounds).publish_state(value == \"ON\");\n                else if (key == \"StealthLED\") id(stealthLed).publish_state(value == \"ON\");\n                else if (key == \"LED\") id(led).publish_state(value == \"ON\");\n                else if (key == \"AutoShutdown\") id(autoShutdownEnabled).publish_state(value == \"ON\");\n                else if (key == \"Wall Enable\") id(wallEnable).publish_state(value == \"ON\");\n                else if (key == \"Eco Mode\") id(ecoMode).publish_state(value == \"ON\");\n                else if (key == \"IntenseClean\") id(intenseClean).publish_state(value == \"ON\");\n                else if (key == \"WiFi\") id(wifiOnOff).publish_state(value == \"ON\");\n                else if (key == \"Melody Sounds\") id(melodySounds).publish_state(value == \"ON\");\n                else if (key == \"Warning Sounds\") id(warningSounds).publish_state(value == \"ON\");\n                else if (key == \"Bin Full Detect\") id(binFullDetect).publish_state(value == \"ON\");\n              } \n              else if (line.find(\"Schedule is Enabled\") != std::string::npos) id(scheduleEnabled).publish_state(true);\n              else if (line.find(\"Schedule is Disabled\") != std::string::npos) id(scheduleEnabled).publish_state(false);\n            }\n          } else if (command.find(\"<Fast Memory>\") != std::string::npos) id(uiState).publish_state(\"Starting...\");\n\n\ntime:\n  - platform: ${time_platform}\n    id: nbs_time\n    on_time:\n      - minutes: /10\n        seconds: 0\n        then:\n          - lambda: !lambda |-\n              auto now = id(nbs_time).now();\n              if (!now.is_valid()) return;\n\n              uint8_t flags = id(g_schedule)[0];\n\n              // bit 0 = global enable\n              if (!(flags & 0x01)) {\n                ESP_LOGD(\"schedule\", \"Global disabled\");\n                return;\n              }\n\n              // day_of_week: Sunday=1 ... Saturday=7\n              uint8_t dow = now.day_of_week;\n\n              // bit for day enable: bit1 = Sunday, bit2 = Monday, ...\n              uint8_t day_bit = 1 << dow;\n              if (!(flags & day_bit)) {\n                ESP_LOGD(\"schedule\", \"Day %d disabled\", dow);\n                return;\n              }\n\n              // schedule value for today\n              uint8_t value = id(g_schedule)[dow];\n\n              // convert value → hour/min\n              uint8_t target_hour = value / 6;\n              uint8_t target_min  = (value % 6) * 10;\n\n              ESP_LOGD(\"schedule\",\n                \"Now %02d:%02d | Target %02d:%02d (value=%d)\",\n                now.hour, now.minute,\n                target_hour, target_min,\n                value\n              );\n\n              // check match\n              if (now.hour == target_hour && now.minute == target_min) {\n                ESP_LOGD(\"schedule\", \"Schedule matched → DO ACTION\");\n                id(houseClean).press();\n              }\n\n\ntext:\n  - platform: template\n    id: scheduleset\n    name: \"ScheduleSet\"\n    mode: TEXT\n    set_action:\n      lambda: !lambda |-\n        int i = 0;\n        char *p = strtok((char *)x.c_str(), \",\");\n\n        while (p && i < 8) {\n          int v = atoi(p);\n\n          if (i == 0) {          // flags\n            if (v < 0) v = 0;\n            if (v > 255) v = 255;\n          } else {               // day values\n            if (v < 0) v = 0;\n            if (v > 143) v = 143;\n          }\n\n          id(g_schedule)[i++] = (uint8_t)v;\n          p = strtok(nullptr, \",\");\n        }\n\n        if (i != 8) {\n          ESP_LOGW(\"schedule\", \"Invalid schedule string\");\n        }\n\n        char buf[40];\n        snprintf(\n          buf, sizeof(buf),\n          \"%u,%u,%u,%u,%u,%u,%u,%u\",\n          id(g_schedule)[0],\n          id(g_schedule)[1],\n          id(g_schedule)[2],\n          id(g_schedule)[3],\n          id(g_schedule)[4],\n          id(g_schedule)[5],\n          id(g_schedule)[6],\n          id(g_schedule)[7]\n        );\n\n        id(scheduleset).publish_state(buf);\n\n  - platform: template\n    id: timezone_text\n    name: \"Timezone\"\n    mode: TEXT\n    set_action:\n      lambda: !lambda |-\n        id(timezone_text).publish_state(x.c_str()); // update this text component\n        id(g_timezone) = std::string(x.c_str()); // store tz in global\n        id(nbs_time).set_timezone(x.c_str()); // set timezone for time\n        ESP_LOGI(\"timezone\", \"Timezone set to: %s\", x.c_str()); // log\n\n\nsensor:\n  # --- GetCharger ---\n  - platform: template\n    id: chargerFuelPercent\n    name: \"Fuel Percent\"\n    unit_of_measurement: \"%\"\n\n  - platform: template\n    id: chargerBattTempCAvg\n    name: \"Battery Temp C Avg\"\n    unit_of_measurement: \"°C\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerVBattV\n    name: \"Battery Voltage V\"\n    unit_of_measurement: \"V\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerVExtV\n    name: \"External Voltage V\"\n    unit_of_measurement: \"V\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerCharger_mAH\n    name: \"Charger mAh\"\n    unit_of_measurement: \"mAh\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerDischarge_mAH\n    name: \"Discharge mAh\"\n    unit_of_measurement: \"mAh\"\n    entity_category: \"diagnostic\"\n\n\nbinary_sensor:\n  # --- GetCharger ---\n  - platform: template\n    id: chargerBatteryOverTemp\n    name: \"Battery Over Temp\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerChargingActive\n    name: \"Charging Active\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerChargingEnabled\n    name: \"Charging Enabled\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerConfidentOnFuel\n    name: \"Confident On Fuel\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerOnReservedFuel\n    name: \"On Reserved Fuel\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerEmptyFuel\n    name: \"Empty Fuel\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerBatteryFailure\n    name: \"Battery Failure\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerExtPwrPresent\n    name: \"Ext Power Present\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerThermistorPresent\n    name: \"Thermistor Present\"\n    entity_category: \"diagnostic\"\n\n\ntext_sensor:\n  - platform: template\n    id: nbs_time_text\n    name: \"NBS Time\"\n    lambda: !lambda |-\n      char buf[10];\n      auto t = id(nbs_time).now();\n      snprintf(buf, sizeof(buf), \"%02d:%02d\", t.hour, t.minute);\n      return std::string(buf);\n\n  # --- GetErr ---\n  - platform: template\n    id: robotError\n    name: \"Robot Error\"\n\n  # --- GetVersion ---\n  - platform: template\n    id: robotSerial\n    name: \"Serial Number\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: robotModel\n    name: \"Model\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: robotSoftware\n    name: \"Software\"\n    entity_category: \"diagnostic\"\n\n  # --- GetState ---\n  - platform: template\n    name: \"UI State\"\n    id: uiState\n\nswitch:\n  - platform: template\n    name: \"Test Mode\"\n    # optimistic: true\n    id: testMode\n    turn_on_action:\n      - uart.write: \"TestMode On \\n\"\n      - delay: 500ms\n      - uart.write: \"SetSystemMode \\n\"\n    turn_off_action:\n      - uart.write: \"TestMode Off \\n\"\n      - delay: 500ms\n      - uart.write: \"SetSystemMode \\n\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Play Extra Sounds\"\n    optimistic: true\n    id: switch_play_extra_sounds\n    turn_on_action:\n      - lambda: 'id(g_play_extra_sounds) = true;'\n    turn_off_action:\n      - lambda: 'id(g_play_extra_sounds) = false;'\n    entity_category: \"diagnostic\"\n\n  # --- SetUserSettings ---\n  - platform: template\n    name: \"Click sounds\"\n    optimistic: true\n    id: clickSounds\n    turn_on_action:\n      - uart.write: \"SetUserSettings ButtonClick ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings ButtonClick OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"StealthLED\"\n    optimistic: true\n    id: stealthLed\n    turn_on_action:\n      - uart.write: \"SetUserSettings StealthLED ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings StealthLED OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"LEDs enabled\"\n    optimistic: true\n    id: led\n    turn_on_action:\n      - uart.write: \"SetUserSettings LEDEnable ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings LEDEnable OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"AutoShutdown\"\n    optimistic: true\n    id: autoShutdownEnabled\n    turn_on_action:\n      - uart.write: \"SetUserSettings AutoShutdown ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings AutoShutdown OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Wall Enable\"\n    optimistic: true\n    id: wallEnable\n    turn_on_action:\n      - uart.write: \"SetUserSettings WallEnable ON \\n\"\n      - delay: 100ms\n      - uart.write: \"GetUserSettings \\n\"\n    turn_off_action:\n      - uart.write: \"SetUserSettings WallEnable OFF \\n\"\n      - delay: 100ms\n      - uart.write: \"GetUserSettings \\n\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Eco Mode\"\n    optimistic: true\n    id: ecoMode\n    turn_on_action:\n      - uart.write: \"SetUserSettings EcoMode ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings EcoMode OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"IntenseClean\"\n    optimistic: true\n    id: intenseClean\n    turn_on_action:\n      - uart.write: \"SetUserSettings IntenseClean ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings IntenseClean OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"WiFi\"\n    optimistic: true\n    id: wifiOnOff\n    turn_on_action:\n      - uart.write: \"SetUserSettings WiFi ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings WiFi OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Melody Sounds\"\n    optimistic: true\n    id: melodySounds\n    turn_on_action:\n      - uart.write: \"SetUserSettings Melodies ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings Melodies OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Warning Sounds\"\n    optimistic: true\n    id: warningSounds\n    turn_on_action:\n      - uart.write: \"SetUserSettings Warnings ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings Warnings OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Bin Full Detect\"\n    optimistic: true\n    id: binFullDetect\n    turn_on_action:\n      - uart.write: \"SetUserSettings BinFullDetect ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings BinFullDetect OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Robot Schedule\"\n    optimistic: true\n    id: scheduleEnabled\n    turn_on_action:\n      - uart.write: \"SetUserSettings Schedule ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings Schedule OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n\nnumber:\n  # --- Spot cleaning ---\n  - platform: template\n    id: spot_width\n    min_value: 100\n    max_value: 400\n    step: 1\n    unit_of_measurement: cm\n    mode: SLIDER\n    name: Spot Clean Width\n    optimistic: true\n\n  - platform: template\n    id: spot_height\n    min_value: 100\n    max_value: 400\n    step: 1\n    unit_of_measurement: cm\n    mode: SLIDER\n    name: Spot Clean Height\n    optimistic: true\n\n\nselect:\n  - platform: logger\n    name: \"Logger select\"\n\n\nbutton:\n  - platform: template\n    name: \"House Clean\"\n    id: houseClean\n    icon: mdi:home\n    on_press:\n      - script.execute:\n          id: play_extra_sounds\n          soundid: 1\n      - uart.write: \"Clean House \\n\"\n\n  - platform: template\n    name: \"Spot Clean\"\n    icon: mdi:target\n    on_press:\n      - script.execute:\n          id: play_extra_sounds\n          soundid: 1\n      - uart.write: \"Clean Spot \\n\"\n\n  - platform: template\n    name: \"Spot Clean (Height & Width)\"\n    icon: mdi:target\n    on_press:\n      then:\n        - uart.write: !lambda |-\n            // Convert numbers to integers\n            int w = (int) id(spot_width).state;\n            int h = (int) id(spot_height).state;\n\n            std::string cmd = \"Clean Spot Width \" + std::to_string(w) + \" Height \" + std::to_string(h) + \"\\n\";\n            id(play_extra_sounds)->execute(1);\n            return std::vector<uint8_t>(cmd.begin(), cmd.end());\n\n  - platform: template\n    name: \"Stop Cleaning\"\n    icon: mdi:stop\n    on_press:\n      - uart.write: \"SetButton start \\n\"\n      - delay: 1250ms\n      - uart.write: \"SetButton soft \\n\"\n\n  - platform: template\n    name: \"Pause Cleaning\"\n    icon: mdi:pause\n    on_press:\n      - uart.write: \"SetButton start \\n\"\n\n  - platform: template\n    name: \"Resume Cleaning\"\n    icon: mdi:play\n    on_press:\n      - uart.write: \"SetButton start \\n\"\n\n  - platform: template\n    name: \"Send to start\"\n    icon: mdi:home\n    on_press:\n      - uart.write: \"SetButton down \\n\"\n      - delay: 1250ms\n      - uart.write: \"SetButton soft \\n\"\n\n  - platform: template\n    name: \"Locate Robot\"\n    icon: mdi:volume-high\n    on_press:\n      - uart.write: \"PlaySound SoundId 2 \\n\"  \n\n  - platform: template\n    name: \"Update status\"\n    icon: mdi:refresh\n    on_press:\n      - script.execute: get_all_data \n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Clear errors\"\n    icon: mdi:notification-clear-all\n    on_press:\n      - uart.write: \"GetErr clear \\n\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Shutdown\"\n    icon: mdi:power\n    on_press:\n      - script.execute: robotShutdown \n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"PowerCycle\"\n    icon: mdi:restart\n    on_press:\n      - script.execute: powercycle \n    entity_category: \"diagnostic\"\n\n  - platform: restart\n    name: Reboot ESP\n\n"
  },
  {
    "path": "config/comp/gen3.yaml",
    "content": "substitutions:\n  version: \"1.2.1\"\n  type: \"gen3\"\n  buildinfo: \"${version} [TX:${uart_tx} RX:${uart_rx}]\"\n\n\nlogger:\nimprov_serial:\ncaptive_portal:\n\nwifi:\n  ap:\n    ssid: \"neato-brainslug\"\n    password: \"make-it-suck-again\"\n\nota:\n  - platform: esphome\n    password: ${ota_password}\n\nesphome:\n  name: ${name}\n  project: \n    name: philip2809.neato-brainslug\n    version: ${buildinfo}\n\n  comment: \"${type}|${buildinfo}|${comment}\"\n\n  on_boot:\n    - priority: 600\n      then:\n        - lambda: !lambda |-\n            id(uiState).publish_state(\"Starting...\");\n        - logger.set_level: INFO\n\n    - priority: -100\n      then:\n        - lambda: !lambda |-\n            id(uiState).publish_state(\"Starting...\");\n\n            ESPTime t = ESPTime::from_epoch_local(id(g_last_cleaning_start_time));\n            std::string ts = t.strftime(\"%Y-%m-%d %H:%M:%S\");\n            id(last_cleaning_time).publish_state(ts.c_str());\n\n            if (id(g_last_cleaning_type) == 0) {\n              id(last_cleaning_type).publish_state(\"HOUSE\");\n            } else if (id(g_last_cleaning_type) == 1) {\n              id(last_cleaning_type).publish_state(\"SPOT\");\n            }\n\n            id(last_cleaning_duration).publish_state(id(g_last_cleaning_duration));\n\n            // Update nbs_time and text entity from persisted global\n            if (!id(g_timezone).empty()) {\n              id(nbs_time).set_timezone(id(g_timezone).c_str());\n              id(timezone_text).publish_state(id(g_timezone).c_str());\n              ESP_LOGI(\"timezone\", \"Restored timezone: %s\", id(g_timezone).c_str());\n            }\n\n            char buf[40];\n            snprintf(\n              buf, sizeof(buf),\n              \"%u,%u,%u,%u,%u,%u,%u,%u\",\n              id(g_schedule)[0],\n              id(g_schedule)[1],\n              id(g_schedule)[2],\n              id(g_schedule)[3],\n              id(g_schedule)[4],\n              id(g_schedule)[5],\n              id(g_schedule)[6],\n              id(g_schedule)[7]\n            );\n\n            id(scheduleset).publish_state(buf);\n\n\nscript:\n  - id: get_user_settings\n    mode: queued\n    then:\n      - delay: 100ms\n      - uart.write: \"GetUserSettings \\n\"\n\n  - id: get_all_data\n    mode: queued\n    then: \n      - uart.write: \"GetErr \\n\"  \n      - delay: 50ms  \n      - uart.write: \"GetState \\n\"    \n      - delay: 50ms  \n      - uart.write: \"GetCharger \\n\"    \n      - delay: 50ms  \n      - uart.write: \"GetUserSettings \\n\"  \n      - delay: 50ms\n      - uart.write: \"GetWarranty \\n\"\n      - delay: 50ms  \n      - uart.write: \"TestMode \\n\"\n      - delay: 50ms  \n      - uart.write: \"GetVersion \\n\"    \n  \n  - id: initial_data_get # when the robot has booted, run this initial fetch after 5 seconds of being able to send commands, the 5 sec needed to the robot can calculate battery level etc.\n    mode: queued\n    then: \n      - delay: 5sec\n      - script.execute: get_all_data\n\n  - id: robotShutdown\n    mode: queued\n    then:\n      - lambda: 'id(uiState).publish_state(\"Shutting down...\");'\n      - uart.write: \"TestMode On \\n\"\n      - delay: 100ms\n      - uart.write: \"SetSystemMode Shutdown \\n\"\n\n  - id: powercycle\n    mode: queued\n    then:\n      - lambda: 'id(initial_ready) = false;' # I want to refetch all data in case we powercycle\n      - lambda: 'id(uiState).publish_state(\"Shutting down...\");'\n      - uart.write: \"TestMode On \\n\"\n      - delay: 100ms\n      - uart.write: \"SetSystemMode PowerCycle \\n\"\n\n  - id: cleaning_stopped\n    then: \n      - lambda: !lambda |-\n          uint64_t now_ts = id(nbs_time).now().timestamp;\n          uint64_t start_ts = id(g_last_cleaning_start_time);\n\n          if (start_ts > 0) {\n              uint32_t duration_min = (now_ts - start_ts) / 60;\n              id(g_last_cleaning_duration) = duration_min;\n              id(last_cleaning_duration).publish_state(duration_min);\n          }\n\n  - id: play_extra_sounds\n    parameters:\n      soundid: int\n    then:\n      - if:\n          condition:\n            lambda: |-\n              return id(g_play_extra_sounds);\n          then:\n            - uart.write: !lambda |-\n                std::string s =\n                  \"PlaySound SoundId \" + std::to_string(soundid) + \"\\n\";\n                return std::vector<uint8_t>(s.begin(), s.end());\n\n  - id: send_event\n    parameters:\n      event: string\n    then:\n      - uart.write: !lambda |-\n          std::string s =\n            \"SetEvent event \" + event + \" SKey \" + id(robot_skey) + \"\\n\";\n          return std::vector<uint8_t>(s.begin(), s.end());\n\n\nglobals:\n  - id: initial_ready\n    type: bool\n    restore_value: no\n    initial_value: 'false'\n\n  - id: robot_skey\n    type: std::string\n    restore_value: no\n\n  # --- Restore Value ---\n  - id: g_last_cleaning_start_time\n    type: uint64_t\n    restore_value: yes\n\n  - id: g_last_cleaning_type\n    type: uint32_t\n    restore_value: yes\n\n  - id: g_last_cleaning_duration\n    type: uint32_t\n    restore_value: yes\n\n  - id: g_play_extra_sounds\n    type: bool\n    restore_value: yes\n\n  - id: g_schedule\n    type: uint8_t[8]\n    restore_value: yes\n    initial_value: '{0,0,0,0,0,0,0,0}'\n\n  - id: g_timezone\n    type: std::string\n    restore_value: yes\n    initial_value: ''\n\n\ninterval:\n  - interval: ${infointerval}\n    then:\n      - uart.write: \"GetErr \\n\"\n      - uart.write: \"GetState \\n\"\n  - interval: ${chargerinterval}\n    then: \n      - uart.write: \"GetCharger \\n\"\n\n\nuart:\n  id: uart_bus\n  baud_rate: 115200\n  tx_pin: ${uart_tx}\n  rx_pin: ${uart_rx}\n  rx_buffer_size: 2048\n  debug:\n    dummy_receiver: true\n    direction: RX\n    after:\n      bytes: 0\n      delimiter: \"\\x1A\"\n    sequence:\n      - lambda: !lambda |-\n          UARTDebug::log_string(direction, bytes);\n\n          // convert bytes -> std::string\n          std::string str(bytes.begin(), bytes.end());\n\n          // ---- TRIM FUNCTION ----\n          auto trim = [](std::string &s) {\n            // trim leading\n            s.erase(s.begin(), std::find_if(s.begin(), s.end(),\n                [](unsigned char ch){ return !std::isspace(ch); }));\n            // trim trailing\n            s.erase(std::find_if(s.rbegin(), s.rend(),\n                [](unsigned char ch){ return !std::isspace(ch); }).base(), s.end());\n          };\n\n          // --- HEX DECODER ---\n          auto hex_to_uint32 = [](const std::string &hex) -> uint32_t {\n              return static_cast<uint32_t>(strtoul(hex.c_str(), nullptr, 16));\n          };\n\n          // ---- SPLIT ON CRLF ----\n          std::vector<std::string> lines;\n          size_t start = 0;\n          size_t end = 0;\n\n          while ((end = str.find(\"\\r\\n\", start)) != std::string::npos) {\n            std::string line = str.substr(start, end - start);\n            trim(line);\n            if (!line.empty()) lines.push_back(line);\n            start = end + 2;\n          }\n\n          if (start < str.size()) {\n            std::string last = str.substr(start);\n            trim(last);\n            if (!last.empty()) lines.push_back(last);\n          }\n\n          if (lines.empty()) return;\n\n          // ---- DETECT WHICH COMMAND WAS USED ----\n          std::string command = lines[0];  // first line (GetErr, GetState, etc.)\n\n\n          ESP_LOGI(\"uart_parser\", \"COMMAND: %s\", command.c_str());\n          // ---- OPTIONAL: print each line for debugging ----\n          for (auto &line : lines) {\n            std::vector<uint8_t> v(line.begin(), line.end());\n            UARTDebug::log_string(direction, v);\n            //ESP_LOGI(\"uart_parser\", \"LINE: %s\", line.c_str());\n          }\n\n\n\n          // ---- SPECIAL PARSING FOR GetErr ----\n          if (command == \"GetErr\") {\n            // A GetErr response looks like for gen3:\n            // 0: GetErr\n            // 1: Error\n            // 2: <error1>\n            // 3: Alert\n            // 4: <error2>\n            // 5: USB state\n            // 6: NOT connected\n\n            if (lines.size() < 7) return;\n            if (lines[1] != \"Error\" || lines[3] != \"Alert\") return;\n\n            id(robotError).publish_state(lines[2].c_str());\n            id(robotAlert).publish_state(lines[4].c_str());\n            id(usbConnected).publish_state(lines[6].find(\"NOT connected\") == std::string::npos);\n\n            // If we can get erros/alerts, the system is ready for other commands:\n            if (!id(initial_ready)) {\n                id(initial_ready) = true;\n                id(initial_data_get).execute();\n            }\n          }\n\n          else if (command == \"GetCharger\") {\n            // Format after the header:\n            // Label,Value\n            // FuelPercent,53\n            // BatteryOverTemp,0\n            // ...\n\n            for (size_t i = 2; i < lines.size(); i++) {\n              std::string &line = lines[i];\n\n              size_t comma = line.find(',');\n              if (comma == std::string::npos) continue;\n\n              std::string key = line.substr(0, comma);\n              std::string value = line.substr(comma + 1);\n\n              // Trim them:\n              trim(key);\n              trim(value);\n\n              // ---- MATCH KEYS AND PUBLISH ----\n                   if (key == \"FuelPercent\") id(chargerFuelPercent).publish_state(atof(value.c_str()));\n              else if (key == \"BatteryOverTemp\") id(chargerBatteryOverTemp).publish_state(value == \"1\");\n              else if (key == \"ChargingActive\") id(chargerChargingActive).publish_state(value == \"1\");\n              else if (key == \"ChargingEnabled\") id(chargerChargingEnabled).publish_state(value == \"1\");\n              else if (key == \"ConfidentOnFuel\") id(chargerConfidentOnFuel).publish_state(value == \"1\");\n              else if (key == \"OnReservedFuel\") id(chargerOnReservedFuel).publish_state(value == \"1\");\n              else if (key == \"EmptyFuel\") id(chargerEmptyFuel).publish_state(value == \"1\");\n              else if (key == \"BatteryFailure\") id(chargerBatteryFailure).publish_state(value == \"1\");\n              else if (key == \"ExtPwrPresent\") id(chargerExtPwrPresent).publish_state(value == \"1\");\n              else if (key == \"ThermistorPresent\") id(chargerThermistorPresent).publish_state(value == \"1\");\n              else if (key == \"BattTempCAvg\") id(chargerBattTempCAvg).publish_state(atof(value.c_str()));\n              else if (key == \"VBattV\") id(chargerVBattV).publish_state(atof(value.c_str()));\n              else if (key == \"VExtV\") id(chargerVExtV).publish_state(atof(value.c_str()));\n              else if (key == \"Charger_mAH\") id(chargerCharger_mAH).publish_state(atof(value.c_str()));\n              else if (key == \"Discharge_mAH\") id(chargerDischarge_mAH).publish_state(atof(value.c_str()));\n            }\n          }\n\n          else if (command == \"GetWarranty\") {\n              // Format after the header:\n              // Item,Value\n              // CumulativeCleaningTimeInSecs,001ce34f\n              // CumulativeBatteryCycles,01f7\n              // ValidationCode,15648b6e\n\n              for (size_t i = 2; i < lines.size(); i++) {\n                  std::string &line = lines[i];\n                  size_t comma = line.find(',');\n                  if (comma == std::string::npos) continue;\n\n                  std::string key = line.substr(0, comma);\n                  std::string value = line.substr(comma + 1);\n\n                  // Trim whitespace\n                  trim(key);\n                  trim(value);\n                  \n                  if (key == \"CumulativeBatteryCycles\") {\n                      uint32_t cycles = hex_to_uint32(value);\n                      id(batteryCycles).publish_state(cycles);\n                  }\n              }\n          }\n\n          else if (command == \"GetVersion\") {\n            for (auto &line : lines) {\n              size_t comma = line.find(',');\n              if (comma == std::string::npos) continue;\n\n              std::string key = line.substr(0, comma);\n              std::string value = line.substr(comma + 1);\n              trim(key);\n              trim(value);\n\n                   if (key == \"Serial Number\") id(robotSerial).publish_state(value.c_str());\n              else if (key == \"Model\") id(robotModel).publish_state(value.c_str());\n              else if (key == \"Software\") id(robotSoftware).publish_state(value.c_str());\n            }\n          }\n          else if (command == \"TestMode\") {\n            if (lines[1].find(\": On\") != std::string::npos) id(testMode).publish_state(true);\n            else if (lines[1].find(\": Off\") != std::string::npos) id(testMode).publish_state(false);\n          } \n          \n          else if (command == \"GetState\") {\n              std::string &states_line = lines[1];  // \"Current UI State is: ...\\nCurrent Robot State is: ...\\n\\x1A\"\n\n              size_t sep = states_line.find('\\n');\n              if (sep == std::string::npos) return;  // safety\n\n              std::string ui_line = states_line.substr(0, sep);\n              std::string robot_line = states_line.substr(sep + 1);\n\n              static const char* prefix_ui = \"Current UI State is: \";\n              static const char* prefix_robot = \"Current Robot State is: \";\n\n              // Extract UI state\n              if (ui_line.find(prefix_ui) == 0) {\n                  std::string ui_state = ui_line.substr(strlen(prefix_ui));\n                  trim(ui_state);\n                  std::string old_state = id(uiState).state;\n\n                  bool old_spot = (old_state == \"UIMGR_STATE_SPOTCLEANINGPAUSED\" ||\n                                  old_state == \"UIMGR_STATE_SPOTCLEANINGRUNNING\");\n\n                  bool new_spot = (ui_state == \"UIMGR_STATE_SPOTCLEANINGPAUSED\" ||\n                                  ui_state == \"UIMGR_STATE_SPOTCLEANINGRUNNING\");\n\n                  bool old_house = (old_state == \"UIMGR_STATE_HOUSECLEANINGPAUSED\" ||\n                                    old_state == \"UIMGR_STATE_HOUSECLEANINGRUNNING\");\n\n                  bool new_house = (ui_state == \"UIMGR_STATE_HOUSECLEANINGPAUSED\" ||\n                                    ui_state == \"UIMGR_STATE_HOUSECLEANINGRUNNING\");\n                  // Cleaning started\n                  if (!old_spot && new_spot) {\n                      // Mark start time\n                      id(g_last_cleaning_start_time) = id(nbs_time).now().timestamp;\n                      id(g_last_cleaning_type) = 1;  // SPOT = 1\n\n                      id(last_cleaning_time).publish_state(id(nbs_time).now().strftime(\"%Y-%m-%d %H:%M:%S\"));\n                      id(last_cleaning_type).publish_state(\"SPOT\");\n                  } else if (!old_house && new_house) {\n                      id(g_last_cleaning_start_time) = id(nbs_time).now().timestamp;\n                      id(g_last_cleaning_type) = 0;  // HOUSE = 0\n\n                      id(last_cleaning_time).publish_state(id(nbs_time).now().strftime(\"%Y-%m-%d %H:%M:%S\"));\n                      id(last_cleaning_type).publish_state(\"HOUSE\");\n                  } else {\n                      // Cleaning stopped\n                      bool old_cleaning = old_spot || old_house;\n                      bool new_cleaning = new_spot || new_house;\n\n                      if (old_cleaning && !new_cleaning) id(cleaning_stopped).execute();\n                  }\n\n                  id(uiState).publish_state(ui_state.c_str());\n              }\n\n              // Extract Robot state\n              if (robot_line.find(prefix_robot) == 0) {\n                  std::string robot_state = robot_line.substr(strlen(prefix_robot));\n                  \n                  // Remove trailing \\x1A if present\n                  size_t ctrl_z = robot_state.find('\\x1A');\n                  if (ctrl_z != std::string::npos) {\n                      robot_state.erase(ctrl_z);\n                  }\n\n                  trim(robot_state);\n                  \n                  id(robotState).publish_state(robot_state.c_str());\n              }\n          }\n\n\n          else if (command == \"GetUserSettings\") {\n            for (auto &line : lines) {\n              trim(line);\n\n              // Skip lines that start with binary/invalid chars\n              if (!line.empty() && static_cast<unsigned char>(line[0]) >= 0x80) continue;\n\n              // ---- Key,Value lines ----\n              size_t comma = line.find(',');\n              if (comma != std::string::npos) {\n                std::string key = line.substr(0, comma);\n                std::string value = line.substr(comma + 1);\n                trim(key);\n                trim(value);\n\n                     if (key == \"ClickSounds\") id(clickSounds).publish_state(value == \"ON\");\n                else if (key == \"LED\") id(led).publish_state(value == \"ON\");\n                else if (key == \"Wall Enable\") id(wallEnable).publish_state(value == \"ON\");\n                else if (key == \"Eco Mode\") id(ecoMode).publish_state(value == \"ON\");\n                else if (key == \"IntenseClean\") id(intenseClean).publish_state(value == \"ON\");\n                else if (key == \"WiFi\") id(wifiOnOff).publish_state(value == \"ON\");\n                else if (key == \"Melody Sounds\") id(melodySounds).publish_state(value == \"ON\");\n                else if (key == \"Warning Sounds\") id(warningSounds).publish_state(value == \"ON\");\n                else if (key == \"Bin Full Detect\") id(binFullDetect).publish_state(value == \"ON\");\n                else if (key == \"Filter Change Time (seconds)\") id(filterChangeTime).publish_state(atof(value.c_str()));\n                else if (key == \"Brush Change Time (seconds)\") id(brushChangeTime).publish_state(atof(value.c_str()));\n                else if (key == \"Dirt Bin Alert Reminder Interval (minutes)\") id(dirtBinAlertReminder).publish_state(atof(value.c_str()));\n              } \n              // ---- Special lines without commas ----\n              else if (line.find(\"Current Dirt Bin Runtime is:\") == 0) {\n                std::string val = line.substr(strlen(\"Current Dirt Bin Runtime is:\"));\n                trim(val);\n                id(currentDirtBinRuntime).publish_state(atof(val.c_str()));\n              } \n              else if (line.find(\"Number of Cleanings where Dust Bin was Full is:\") == 0) {\n                std::string val = line.substr(strlen(\"Number of Cleanings where Dust Bin was Full is:\"));\n                trim(val);\n                id(numberDustBinFull).publish_state(atof(val.c_str()));\n              } \n            }\n          } else if (command.find(\"ARCHES Board\") != std::string::npos) id(uiState).publish_state(\"Starting...\");\n\n\ntime:\n  - platform: ${time_platform}\n    id: nbs_time\n    on_time:\n      - minutes: /10\n        seconds: 0\n        then:\n          - lambda: !lambda |-\n              auto now = id(nbs_time).now();\n              if (!now.is_valid()) return;\n\n              uint8_t flags = id(g_schedule)[0];\n\n              // bit 0 = global enable\n              if (!(flags & 0x01)) {\n                ESP_LOGD(\"schedule\", \"Global disabled\");\n                return;\n              }\n\n              // day_of_week: Sunday=1 ... Saturday=7\n              uint8_t dow = now.day_of_week;\n\n              // bit for day enable: bit1 = Sunday, bit2 = Monday, ...\n              uint8_t day_bit = 1 << dow;\n              if (!(flags & day_bit)) {\n                ESP_LOGD(\"schedule\", \"Day %d disabled\", dow);\n                return;\n              }\n\n              // schedule value for today\n              uint8_t value = id(g_schedule)[dow];\n\n              // convert value → hour/min\n              uint8_t target_hour = value / 6;\n              uint8_t target_min  = (value % 6) * 10;\n\n              ESP_LOGD(\"schedule\",\n                \"Now %02d:%02d | Target %02d:%02d (value=%d)\",\n                now.hour, now.minute,\n                target_hour, target_min,\n                value\n              );\n\n              // check match\n              if (now.hour == target_hour && now.minute == target_min) {\n                ESP_LOGD(\"schedule\", \"Schedule matched → DO ACTION\");\n                id(houseClean).press();\n              }\n\n\ntext:\n  - platform: template\n    id: scheduleset\n    name: \"ScheduleSet\"\n    mode: TEXT\n    set_action:\n      lambda: !lambda |-\n        int i = 0;\n        char *p = strtok((char *)x.c_str(), \",\");\n\n        while (p && i < 8) {\n          int v = atoi(p);\n\n          if (i == 0) {          // flags\n            if (v < 0) v = 0;\n            if (v > 255) v = 255;\n          } else {               // day values\n            if (v < 0) v = 0;\n            if (v > 143) v = 143;\n          }\n\n          id(g_schedule)[i++] = (uint8_t)v;\n          p = strtok(nullptr, \",\");\n        }\n\n        if (i != 8) {\n          ESP_LOGW(\"schedule\", \"Invalid schedule string\");\n        }\n\n        char buf[40];\n        snprintf(\n          buf, sizeof(buf),\n          \"%u,%u,%u,%u,%u,%u,%u,%u\",\n          id(g_schedule)[0],\n          id(g_schedule)[1],\n          id(g_schedule)[2],\n          id(g_schedule)[3],\n          id(g_schedule)[4],\n          id(g_schedule)[5],\n          id(g_schedule)[6],\n          id(g_schedule)[7]\n        );\n\n        id(scheduleset).publish_state(buf);\n\n  - platform: template\n    id: timezone_text\n    name: \"Timezone\"\n    mode: TEXT\n    set_action:\n      lambda: !lambda |-\n        id(timezone_text).publish_state(x.c_str()); // update this text component\n        id(g_timezone) = std::string(x.c_str()); // store tz in global\n        id(nbs_time).set_timezone(x.c_str()); // set timezone for time\n        ESP_LOGI(\"timezone\", \"Timezone set to: %s\", x.c_str()); // log\n\n\nsensor:\n  # --- GetCharger ---\n  - platform: template\n    id: chargerFuelPercent\n    name: \"Fuel Percent\"\n    unit_of_measurement: \"%\"\n\n  - platform: template\n    id: chargerBattTempCAvg\n    name: \"Battery Temp C Avg\"\n    unit_of_measurement: \"°C\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerVBattV\n    name: \"Battery Voltage V\"\n    unit_of_measurement: \"V\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerVExtV\n    name: \"External Voltage V\"\n    unit_of_measurement: \"V\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerCharger_mAH\n    name: \"Charger mAh\"\n    unit_of_measurement: \"mAh\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerDischarge_mAH\n    name: \"Discharge mAh\"\n    unit_of_measurement: \"mAh\"\n    entity_category: \"diagnostic\"\n\n  # --- GetUserSettings ---\n  - platform: template\n    name: \"Filter Change Time\"\n    id: filterChangeTime\n    unit_of_measurement: \"s\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Brush Change Time\"\n    id: brushChangeTime\n    unit_of_measurement: \"s\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Dirt Bin Alert Reminder\"\n    id: dirtBinAlertReminder\n    unit_of_measurement: \"min\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Current Dirt Bin Runtime\"\n    id: currentDirtBinRuntime\n    unit_of_measurement: \"s\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Number of Full Dust Bin Cleanings\"\n    id: numberDustBinFull\n    unit_of_measurement: \"count\"\n    entity_category: \"diagnostic\"\n\n  # --- GetWarranty ---\n  - platform: template\n    name: \"Battery Cycles\"\n    id: batteryCycles\n    unit_of_measurement: \"cycles\"\n    entity_category: \"diagnostic\"\n\n  # --- Last cleaning ---\n  - platform: template\n    name: \"Last cleaning duration\"\n    id: last_cleaning_duration\n    unit_of_measurement: \"min\"\n\n\nbinary_sensor:\n  # --- GetErr ---\n  - platform: template\n    id: usbConnected\n    name: \"USB Connected\"\n    entity_category: \"diagnostic\"\n\n  # --- GetCharger ---\n  - platform: template\n    id: chargerBatteryOverTemp\n    name: \"Battery Over Temp\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerChargingActive\n    name: \"Charging Active\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerChargingEnabled\n    name: \"Charging Enabled\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerConfidentOnFuel\n    name: \"Confident On Fuel\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerOnReservedFuel\n    name: \"On Reserved Fuel\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerEmptyFuel\n    name: \"Empty Fuel\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerBatteryFailure\n    name: \"Battery Failure\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerExtPwrPresent\n    name: \"Ext Power Present\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: chargerThermistorPresent\n    name: \"Thermistor Present\"\n    entity_category: \"diagnostic\"\n\n\ntext_sensor:\n  - platform: template\n    id: nbs_time_text\n    name: \"NBS Time\"\n    lambda: !lambda |-\n      char buf[10];\n      auto t = id(nbs_time).now();\n      snprintf(buf, sizeof(buf), \"%02d:%02d\", t.hour, t.minute);\n      return std::string(buf);\n\n  # --- Last cleaning ---\n  - platform: template\n    name: \"Last cleaning time\"\n    id: last_cleaning_time\n\n  - platform: template\n    name: \"Last cleaning type\"\n    id: last_cleaning_type\n\n  # --- GetErr ---\n  - platform: template\n    id: robotError\n    name: \"Robot Error\"\n\n  - platform: template\n    id: robotAlert\n    name: \"Robot Alert\"\n\n  # --- GetVersion ---\n  - platform: template\n    id: robotSerial\n    name: \"Serial Number\"\n    entity_category: \"diagnostic\"\n    on_value: \n      then:\n        - lambda: !lambda |-\n            // Get the mac address, abort  if the serial is malformed\n            size_t comma_pos = x.find(',');\n            if (comma_pos == std::string::npos) {\n              ESP_LOGE(\"config\", \"Serial invalid (no comma): %s\", x.c_str());\n              abort();\n            }\n\n            std::string mac = x.substr(comma_pos + 1, 12);\n\n            if (mac.length() != 12) {\n              ESP_LOGE(\"config\", \"Invalid MAC length (%d): %s\", mac.length(), mac.c_str());\n              abort();\n            }\n\n            // Calculate based on mac\n            static uint8_t t1[256];\n            static uint8_t t2[256];\n            static char result[128];\n            const uint8_t byte_array[] = { 0x68, 0x36, 0x43, 0x58, 0x09, 0x09, 0x3A, 0x3C, 0x2A, 0x7B, 0x59 };\n\n            for (int i = 0; i < 256; i++)\n              t1[i] = i;\n\n            int j = 0, i = 0;\n            for (int i = 0; i < 256; i++) {\n              j = (j + t1[i] + byte_array[i % 11]) & 0xFF;\n              uint8_t tmp = t1[i];\n              t1[i] = t1[j];\n              t1[j] = tmp;\n            }\n\n            j = 0;\n            for (size_t k = 0; k < 12; k++) {\n              i = (i + 1) & 0xFF;\n              j = (j + t1[i]) & 0xFF;\n\n              uint8_t tmp = t1[i];\n              t1[i] = t1[j];\n              t1[j] = tmp;\n\n              t2[k] = t1[(t1[i] + t1[j]) & 0xFF];\n            }\n\n            size_t len = mac.length();\n\n            for (size_t j = 0; j < len; j++) {\n              snprintf(&result[j * 2], 3, \"%02x\", t2[j] ^ (uint8_t) mac[j]);\n            }\n\n            result[len * 2] = result[len / 2];\n            id(robot_skey) = std::string(result);\n\n\n  - platform: template\n    id: robotModel\n    name: \"Model\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    id: robotSoftware\n    name: \"Software\"\n    entity_category: \"diagnostic\"\n\n  # --- GetState ---\n  - platform: template\n    name: \"UI State\"\n    id: uiState\n\n  - platform: template\n    name: \"Robot State\"\n    id: robotState\n\n\nswitch:\n  - platform: template\n    name: \"Test Mode\"\n    # optimistic: true\n    id: testMode\n    turn_on_action:\n      - uart.write: \"TestMode On \\n\"\n      - delay: 500ms\n      - uart.write: \"TestMode \\n\"\n    turn_off_action:\n      - uart.write: \"TestMode Off \\n\"\n      - delay: 500ms\n      - uart.write: \"TestMode \\n\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Play Extra Sounds\"\n    optimistic: true\n    id: switch_play_extra_sounds\n    turn_on_action:\n      - lambda: 'id(g_play_extra_sounds) = true;'\n    turn_off_action:\n      - lambda: 'id(g_play_extra_sounds) = false;'\n    entity_category: \"diagnostic\"\n\n  # --- SetUserSettings ---\n  - platform: template\n    name: \"Click sounds\"\n    optimistic: true\n    id: clickSounds\n    turn_on_action:\n      - uart.write: \"SetUserSettings ButtonClick ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings ButtonClick OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"LED\"\n    optimistic: true\n    id: led\n    turn_on_action:\n      - uart.write: \"SetUserSettings StealthLED ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings StealthLED OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Wall Enable\"\n    optimistic: true\n    id: wallEnable\n    turn_on_action:\n      - uart.write: \"SetUserSettings WallEnable ON \\n\"\n      - delay: 100ms\n      - uart.write: \"GetUserSettings \\n\"\n    turn_off_action:\n      - uart.write: \"SetUserSettings WallEnable OFF \\n\"\n      - delay: 100ms\n      - uart.write: \"GetUserSettings \\n\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Eco Mode\"\n    optimistic: true\n    id: ecoMode\n    turn_on_action:\n      - uart.write: \"SetUserSettings EcoMode ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings EcoMode OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"IntenseClean\"\n    optimistic: true\n    id: intenseClean\n    turn_on_action:\n      - uart.write: \"SetUserSettings IntenseClean ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings IntenseClean OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"WiFi\"\n    optimistic: true\n    id: wifiOnOff\n    turn_on_action:\n      - uart.write: \"SetUserSettings WiFi ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings WiFi OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Melody Sounds\"\n    optimistic: true\n    id: melodySounds\n    turn_on_action:\n      - uart.write: \"SetUserSettings Melodies ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings Melodies OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Warning Sounds\"\n    optimistic: true\n    id: warningSounds\n    turn_on_action:\n      - uart.write: \"SetUserSettings Warnings ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings Warnings OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Bin Full Detect\"\n    optimistic: true\n    id: binFullDetect\n    turn_on_action:\n      - uart.write: \"SetUserSettings BinFullDetect ON \\n\"\n      - script.execute: get_user_settings\n    turn_off_action:\n      - uart.write: \"SetUserSettings BinFullDetect OFF \\n\"\n      - script.execute: get_user_settings\n    entity_category: \"diagnostic\"\n\n\nnumber:\n  # --- Spot cleaning ---\n  - platform: template\n    id: spot_width\n    min_value: 100\n    max_value: 400\n    step: 1\n    unit_of_measurement: cm\n    mode: SLIDER\n    name: Spot Clean Width\n    optimistic: true\n\n  - platform: template\n    id: spot_height\n    min_value: 100\n    max_value: 400\n    step: 1\n    unit_of_measurement: cm\n    mode: SLIDER\n    name: Spot Clean Height\n    optimistic: true\n\n\nselect:\n  - platform: logger\n    name: \"Logger select\"\n\n  - platform: template\n    name: \"Navigation Mode\"\n    id: navigationMode\n    optimistic: true\n    options:\n      - \"Normal\"\n      - \"Gentle\"\n      - \"Deep\"\n      - \"Quick\"\n    icon: \"mdi:robot-vacuum\"\n    on_value:\n      then:\n        - uart.write: !lambda |-\n            std::string cmd = std::string(\"SetNavigationMode \") + x + \"\\n\";\n            return std::vector<uint8_t>(cmd.begin(), cmd.end());\n\n\nbutton:\n  - platform: template\n    name: \"House Clean\"\n    id: houseClean\n    icon: mdi:home\n    on_press:\n      - script.execute:\n          id: play_extra_sounds\n          soundid: 1\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_START_HOUSE_CLEANING\"\n\n  - platform: template\n    name: \"Spot Clean\"\n    icon: mdi:target\n    on_press:\n      - script.execute:\n          id: play_extra_sounds\n          soundid: 1\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_START_SPOT_CLEANING\"\n\n  - platform: template\n    name: \"Spot Clean (Height & Width)\"\n    icon: mdi:target\n    on_press:\n      then:\n        - uart.write: !lambda |-\n            // Convert numbers to integers\n            int w = (int) id(spot_width).state;\n            int h = (int) id(spot_height).state;\n\n            std::string cmd = \"Clean Spot Width \" + std::to_string(w) + \" Height \" + std::to_string(h) + \"\\n\";\n            id(play_extra_sounds)->execute(1);\n            return std::vector<uint8_t>(cmd.begin(), cmd.end());\n\n  - platform: template\n    name: \"Stop Cleaning\"\n    icon: mdi:stop\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_STOP_CLEANING\"\n\n  - platform: template\n    name: \"Pause Cleaning\"\n    icon: mdi:pause\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_PAUSE_CLEANING\"\n\n  - platform: template\n    name: \"Send to base\"\n    icon: mdi:home\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_SEND_TO_BASE\"\n\n  - platform: template\n    name: \"Resume Cleaning\"\n    icon: mdi:play\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_RESUME_CLEANING\"\n\n  - platform: template\n    name: \"Locate Robot\"\n    icon: mdi:volume-high\n    on_press:\n      - uart.write: \"PlaySound SoundId 20 \\n\"  \n\n  - platform: template\n    name: \"Manual Drive Forward Up\"\n    icon: mdi:arrow-up\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_FORWARD_UP\"\n\n  - platform: template\n    name: \"Manual Drive Backwards Up\"\n    icon: mdi:arrow-down\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_BACKWARDS_UP\"\n\n  - platform: template\n    name: \"Manual Drive Turn Left Up\"\n    icon: mdi:arrow-left\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_TURN_LEFT_UP\"\n\n  - platform: template\n    name: \"Manual Drive Turn Right Up\"\n    icon: mdi:arrow-right\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_TURN_RIGHT_UP\"\n\n  - platform: template\n    name: \"Manual Drive Arc Left Up\"\n    icon: mdi:rotate-left\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_ARC_LEFT_UP\"\n\n  - platform: template\n    name: \"Manual Drive Arc Right Up\"\n    icon: mdi:rotate-right\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_ARC_RIGHT_UP\"\n\n  - platform: template\n    name: \"Manual Drive Forward Down\"\n    icon: mdi:arrow-up-bold\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_FORWARD_DOWN\"\n\n  - platform: template\n    name: \"Manual Drive Backwards Down\"\n    icon: mdi:arrow-down-bold\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_BACKWARDS_DOWN\"\n\n  - platform: template\n    name: \"Manual Drive Turn Left Down\"\n    icon: mdi:arrow-left-bold\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_TURN_LEFT_DOWN\"\n\n  - platform: template\n    name: \"Manual Drive Turn Right Down\"\n    icon: mdi:arrow-right-bold\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_TURN_RIGHT_DOWN\"\n\n  - platform: template\n    name: \"Manual Drive Arc Left Down\"\n    icon: mdi:rotate-left\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_ARC_LEFT_DOWN\"\n\n  - platform: template\n    name: \"Manual Drive Arc Right Down\"\n    icon: mdi:rotate-right\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_ARC_RIGHT_DOWN\"\n\n  - platform: template\n    name: \"Manual Drive Button Timeout\"\n    icon: mdi:timer-off\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_DRIVE_MANUAL_BTN_TIMEOUT\"\n\n  - platform: template\n    name: \"Start Manual Cleaning\"\n    icon: mdi:play-circle\n    on_press:\n      - script.execute:\n          id: send_event\n          event: \"UIMGR_EVENT_SMARTAPP_START_MANUAL_CLEANING\"\n\n  - platform: template\n    name: \"Update status\"\n    icon: mdi:refresh\n    on_press:\n      - script.execute: get_all_data \n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Clear errors\"\n    icon: mdi:notification-clear-all\n    on_press:\n      then:\n        - uart.write: \"SetUIError clearall \\n\"\n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"Shutdown\"\n    icon: mdi:power\n    on_press:\n      - script.execute: robotShutdown \n    entity_category: \"diagnostic\"\n\n  - platform: template\n    name: \"PowerCycle\"\n    icon: mdi:restart\n    on_press:\n      - script.execute: powercycle \n    entity_category: \"diagnostic\"\n\n  - platform: restart\n    name: Reboot ESP\n\n"
  },
  {
    "path": "config/comp/ha.yaml",
    "content": "substitutions:\n  time_platform: homeassistant\n\nwifi:\n  ssid: ${wifi_ssid}\n  password: ${wifi_password}\n\napi:\n  encryption:\n    key: ${ha_encryption_key}\n\n  actions:\n    - action: send_cmd\n      variables:\n        command: string\n      then:\n        - uart.write: !lambda |-\n            // Convert to std::string\n            std::string s = command;\n\n            // IMPORTANT: keep newline exactly like YAML version\n            if (s.empty() || s.back() != '\\n')\n              s += \"\\n\";\n\n            // convert string → vector<uint8_t>\n            return std::vector<uint8_t>(s.begin(), s.end());\n\n    - action: play_sound\n      variables:\n        soundid: int\n      then:\n        - uart.write: !lambda |-\n            // Create std::string\n            std::string s = \"PlaySound SoundId \" + std::to_string(soundid) + \"\\n\";\n            // convert string → vector<uint8_t>\n            return std::vector<uint8_t>(s.begin(), s.end());\n\n\n"
  },
  {
    "path": "config/comp/no-ha.yaml",
    "content": "substitutions:\n  time_platform: sntp\n\n"
  },
  {
    "path": "config/comp/ros.yaml",
    "content": "\n\nexternal_components:\n  # - source: github://tube0013/esphome-stream-server-v2\n  - source: github://oxan/esphome-stream-server\n\nstream_server:\n  id: ss\n  buffer_size: 4096\n  uart_id: uart_bus\n  port: 6638\n\n# binary_sensor:\n#   - platform: stream_server\n#     stream_server: ss\n#     name: \"ROS Stream Server Connected\"\n"
  },
  {
    "path": "config/comp/webserver.yaml",
    "content": "web_server:\n  port: 80\n  js_url: \"https://cdn.jsdelivr.net/gh/philip2809/neato-brainslug@main/config/js/${version}.js\"\n"
  },
  {
    "path": "config/home-assistant/gen2-card.yaml",
    "content": "type: vertical-stack\nvariables:\n  NOTE: >\n    Combatability between esphome config and this card is ensured as long as the\n    major version's match, for relase candicates, betas etc (indicated by\n    X.X-a/b/rc.X), the version has to match perfectly otherwise compatability is\n    not promised. Please try to keep the versions the same, and check the github\n    for updates!\n  project: philip2809.neato-brainslug\n  version: \"1.2.1\"\n  type: \"gen2\"\ncards:\n  - type: custom:button-card\n    variables:\n      robot_id: neato_vacuum\n    icon: mdi:robot-vacuum-variant\n    entity: \"[[[ return `sensor.${variables.robot_id}_robot_error`; ]]]\"\n    size: 50%\n    color_type: icon\n    tap_action:\n      action: none\n    hold_action:\n      action: none\n    double_tap_action:\n      action: none\n    name: |\n      [[[ \n        const uiState = states[`sensor.${variables.robot_id}_ui_state`]?.state || '';\n        return uiState\n      ]]]\n    styles:\n      icon:\n        - color: |\n            [[[ \n              const uiState = states[`sensor.${variables.robot_id}_ui_state`]?.state || '';\n              if (uiState === \"Starting...\") return '#edb926';\n              if (uiState === \"Shutting down...\") return 'gray';\n\n              const err = states[`sensor.${variables.robot_id}_robot_error`]?.state || '';\n              if (err !== \"No errors\") return '#950606';\n              return '#00cc00';\n            ]]]\n      card:\n        - border-radius: 20px\n        - display: flex\n        - justify-content: center\n        - align-items: center\n        - margin: 0 auto\n        - position: relative\n      custom_fields:\n        battery:\n          - position: absolute\n          - top: 8px\n          - right: 8px\n          - padding: 4px 8px\n          - border-radius: 8px\n          - font-weight: bold\n          - animation: |\n              [[[ \n                if (states[`binary_sensor.${variables.robot_id}_charging_active`]?.state !== 'on') return '';\n                const pct = Number(states[`sensor.${variables.robot_id}_fuel_percent`]?.state);\n                return pct > 35 ? 'pulseGreen 3s infinite' : 'pulseOrange 3s infinite';\n              ]]]\n          - background-color: |\n              [[[ \n                const pct = Number(states[`sensor.${variables.robot_id}_fuel_percent`]?.state);\n                return pct > 35 ? 'rgb(124, 252, 0)' : 'rgb(255, 140, 0)';\n              ]]]\n          - color: black\n        dock:\n          - position: absolute\n          - top: 8px\n          - left: 8px\n          - padding: 4px\n          - border-radius: 8px\n          - background-color: rgba(255,255,255,0.2)\n          - display: |\n              [[[ \n                return states[`binary_sensor.${variables.robot_id}_ext_power_present`]?.state === 'on'\n                  ? 'block'\n                  : 'none';\n              ]]]\n    custom_fields:\n      battery: |-\n        [[[ \n          const v = states[`sensor.${variables.robot_id}_fuel_percent`]?.state;\n          return (v ?? '0') + '%';\n        ]]]\n      dock: |\n        [[[ \n          if (states[`binary_sensor.${variables.robot_id}_ext_power_present`]?.state === 'on') {\n            return 'DOCKED';\n          } else {\n            return '';\n          }\n        ]]]\n    extra_styles: |\n      @keyframes pulseGreen {\n        0%   { box-shadow: 0 0 5px 0    rgba(124, 252, 0, 0.6); }\n        50%  { box-shadow: 0 0 20px 6px rgba(124, 252, 0, 1.0); }\n        100% { box-shadow: 0 0 5px 0    rgba(124, 252, 0, 0.6); }\n      }\n      @keyframes pulseOrange {\n        0%   { box-shadow: 0 0 5px 0    rgba(255, 140, 0, 0.6); }\n        50%  { box-shadow: 0 0 20px 6px rgba(255, 140, 0, 1.0); }\n        100% { box-shadow: 0 0 5px 0    rgba(255, 140, 0, 0.6); }\n      }\n  - type: vertical-stack\n    cards:\n      - type: horizontal-stack\n        cards:\n          - type: custom:button-card\n            variables:\n              robot_id: neato_vacuum\n            show_icon: false\n            entity: \"[[[ return `sensor.${variables.robot_id}_robot_error`; ]]]\"\n            show_state: false\n            styles:\n              card:\n                - border-color: |\n                    [[[ \n                      const err = states[`sensor.${variables.robot_id}_robot_error`]?.state || '';\n                      return err === \"No errors\" ? \"\" : \"#950606\"; \n                    ]]]\n            name: |\n              [[[ \n                const err = states[`sensor.${variables.robot_id}_robot_error`]?.state || '';\n                return err;\n              ]]]\n  - type: horizontal-stack\n    cards:\n      - type: custom:button-card\n        variables:\n          robot_id: neato_vacuum\n        entity: \"[[[ return `button.${variables.robot_id}_house_clean`; ]]]\"\n        name: Clean\n        tap_action:\n          action: toggle\n      - type: custom:button-card\n        variables:\n          robot_id: neato_vacuum\n        entity: \"[[[ return `button.${variables.robot_id}_resume_cleaning`; ]]]\"\n        name: Resume\n        tap_action:\n          action: toggle\n      - type: custom:button-card\n        variables:\n          robot_id: neato_vacuum\n        entity: \"[[[ return `button.${variables.robot_id}_pause_cleaning`; ]]]\"\n        name: Pause\n        tap_action:\n          action: toggle\n      - type: custom:button-card\n        variables:\n          robot_id: neato_vacuum\n        entity: \"[[[ return `button.${variables.robot_id}_spot_clean`; ]]]\"\n        name: Spot Clean\n        tap_action:\n          action: toggle\n        hold_action:\n          action: fire-dom-event\n          browser_mod:\n            service: browser_mod.popup\n            data:\n              title: Spot Clean - Height and Width\n              size: normal\n              content:\n                type: vertical-stack\n                cards:\n                  - type: entities\n                    entities:\n                      - entity: number.neato_vacuum_spot_clean_height\n                        name: Height\n                        icon: mdi:arrow-up-down\n                      - entity: number.neato_vacuum_spot_clean_width\n                        name: Width\n                        icon: mdi:arrow-left-right\n                  - type: custom:button-card\n                    size: 20%\n                    name: Start Spot Cleaning\n                    entity: button.neato_vacuum_spot_clean_height_width\n                    tap_action:\n                      action: toggle\n  - type: horizontal-stack\n    cards:\n      - type: custom:button-card\n        variables:\n          robot_id: neato_vacuum\n        entity: \"[[[ return `button.${variables.robot_id}_stop_cleaning`; ]]]\"\n        name: STOP\n        tap_action:\n          action: toggle\n      - type: custom:button-card\n        variables:\n          robot_id: neato_vacuum\n        entity: \"[[[ return `button.${variables.robot_id}_locate_robot`; ]]]\"\n        name: Locate\n        tap_action:\n          action: toggle\n      - type: custom:button-card\n        entity: button.neato_vacuum_send_to_start\n        name: Send to start\n        tap_action:\n          action: toggle\n      - type: custom:button-card\n        variables:\n          robot_id: neato_vacuum\n        name: Settings\n        icon: mdi:cog\n        tap_action:\n          action: fire-dom-event\n          browser_mod:\n            service: browser_mod.popup\n            data:\n              title: More options\n              size: normal\n              content:\n                type: vertical-stack\n                cards:\n                  - type: horizontal-stack\n                    cards:\n                      - show_name: true\n                        show_icon: true\n                        entity: >-\n                          [[[ return `switch.${variables.robot_id}_eco_mode`;\n                          ]]]\n                        name: ECO Mode\n                        type: button\n                      - show_name: true\n                        show_icon: true\n                        entity: >-\n                          [[[ return `switch.${variables.robot_id}_test_mode`;\n                          ]]]\n                        name: Test Mode\n                        type: button\n                      - entity: >-\n                          [[[ return\n                          `button.${variables.robot_id}_update_status`; ]]]\n                        name: Fetch status\n                        show_icon: true\n                        type: button\n                        tap_action:\n                          action: toggle\n                      - entity: >-\n                          [[[ return\n                          `button.${variables.robot_id}_clear_errors`; ]]]\n                        name: Clear Errors\n                        show_icon: true\n                        type: button\n                        tap_action:\n                          action: toggle\n                  - type: entities\n                    entities:\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_play_extra_sounds`; ]]]\n                        name: Play extra sounds\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_click_sounds`; ]]]\n                        name: Click Sounds\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_melody_sounds`; ]]]\n                        name: Melody Sounds\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_warning_sounds`; ]]]\n                        name: Warning Sounds\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_bin_full_detect`; ]]]\n                        name: Bin Full Detect\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_autoshutdown`; ]]]\n                        name: Auto Shutdown\n                      - entity: \"[[[ return `switch.${variables.robot_id}_led`; ]]]\"\n                        name: LED\n                      - entity: >-\n                          [[[ return `switch.${variables.robot_id}_stealthled`;\n                          ]]]\n                        name: Stealth Led\n                      - entity: >-\n                          [[[ return `switch.${variables.robot_id}_wall_enable`;\n                          ]]]\n                        name: Wall Follower\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_intenseclean`; ]]]\n                        name: Intense Clean\n                      - entity: \"[[[ return `switch.${variables.robot_id}_wifi`; ]]]\"\n                        name: WiFi\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_robot_schedule`; ]]]\n                        name: Robot Schedule\n                    state_color: false\n                    show_header_toggle: false\n                  - type: entities\n                    entities:\n                      - entity: \"[[[ return `sensor.${variables.robot_id}_model`;]]]\"\n                        name: Model\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_serial_number`;]]]\n                        name: S/N\n                      - entity: \"[[[ return `sensor.${variables.robot_id}_software`;]]]\"\n                        name: Software\n                      - entity: \"[[[ return `sensor.${variables.robot_id}_nbs_time`;]]]\"\n                        name: Robot Time\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_battery_voltage_v`;]]]\n                        name: Battery Voltage\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_battery_temp_c_avg`;]]]\n                        name: Battery Temp (avg)\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_charger_mah`;]]]\n                        name: Charging\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_discharge_mah`;]]]\n                        name: Discharging\n                  - type: horizontal-stack\n                    cards:\n                      - show_name: true\n                        show_icon: true\n                        entity: \"[[[ return `button.${variables.robot_id}_shutdown`;]]]\"\n                        type: button\n                        name: Power Off\n                        tap_action:\n                          action: toggle\n                      - show_name: true\n                        show_icon: true\n                        entity: >-\n                          [[[ return\n                          `button.${variables.robot_id}_powercycle`;]]]\n                        name: Reboot Robot\n                        type: button\n                        tap_action:\n                          action: toggle\n                      - show_name: true\n                        show_icon: true\n                        type: button\n                        entity: >-\n                          [[[ return\n                          `button.${variables.robot_id}_reboot_esp`;]]]\n                        name: Reboot ESP\n                        tap_action:\n                          action: toggle\n"
  },
  {
    "path": "config/home-assistant/gen2-entity.yaml",
    "content": "- vacuum:\n    - name: Template Neato Vacuum\n      unique_id: template_neato_vacuum\n      state: \"{% set robot_id = 'neato_vacuum' %}\n        {% set error_state = states('sensor.' ~ robot_id ~ '_robot_error') %}\n        {% if is_state('binary_sensor.' ~ robot_id ~ '_ext_power_present', 'on') %}\n            docked\n        {% elif 'No errors' not in error_state %}\n            error\n        {% else %}\n            unknown\n        {% endif %}\"\n      attributes:\n        error: \"{{ states('sensor.neato_vacuum_robot_error') }}\"\n      start:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_house_clean\n      clean_spot:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_spot_clean\n      pause:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_pause_cleaning\n      stop:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_stop_cleaning\n      return_to_base:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_send_to_base\n      locate:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_locate_robot"
  },
  {
    "path": "config/home-assistant/gen3-entity.yaml",
    "content": "- vacuum:\n    - name: Template Neato Vacuum\n      unique_id: template_neato_vacuum\n      state: \"{% set robot_id = 'neato_vacuum' %}\n        {% set ui_state = states('sensor.' ~ robot_id ~ '_ui_state') %}\n        {% set error_state = states('sensor.' ~ robot_id ~ '_robot_error') %}\n        {% if '200' not in error_state %}\n            error\n        {% elif is_state('binary_sensor.' ~ robot_id ~ '_ext_power_present', 'on') %}\n            docked\n        {% elif 'STATE_IDLE' or 'STATE_STANDBY' in ui_state %}\n            idle\n        {% elif 'RUNNING' or 'STATE_START' in ui_state %}\n            cleaning\n        {% elif 'PAUSED' in ui_state %}\n            paused\n        {% elif 'DOCKINGRUNNING' in ui_state %}\n            returning\n        {% else %}\n            error\n        {% endif %}\"\n      attributes:\n        alert: \"{{ states('sensor.neato_vacuum_robot_alert') }}\"\n        error: \"{{ states('sensor.neato_vacuum_robot_error') }}\"\n      start:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_house_clean\n      clean_spot:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_spot_clean\n      pause:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_pause_cleaning\n      stop:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_stop_cleaning\n      return_to_base:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_send_to_base\n      locate:\n        service: button.press\n        target:\n          entity_id: button.neato_vacuum_locate_robot\n"
  },
  {
    "path": "config/home-assistant/gen3_card.yaml",
    "content": "type: vertical-stack\nvariables:\n  NOTE: >\n    Combatability between esphome config and this card is ensured as long as the\n    major version's match, for relase candicates, betas etc (indicated by\n    X.X-a/b/rc.X), the version has to match perfectly otherwise compatability is\n    not promised. Please try to keep the versions the same, and check the github\n    for updates!\n  project: philip2809.neato-brainslug\n  version: \"1.2.1\"\n  type: \"gen3\"\ncards:\n  - type: custom:button-card\n    variables:\n      robot_id: neato_vacuum\n    icon: mdi:robot-vacuum-variant\n    entity: \"[[[ return `sensor.${variables.robot_id}_robot_error`; ]]]\"\n    size: 50%\n    color_type: icon\n    tap_action:\n      action: none\n    hold_action:\n      action: none\n    double_tap_action:\n      action: none\n    name: |\n      [[[ \n        const uiState = states[`sensor.${variables.robot_id}_ui_state`]?.state || '';\n        if (uiState.includes('STATE_IDLE')) return 'IDLE';\n        else if (uiState.includes('STATE_STANDBY')) return 'STANDBY';\n        else if (uiState.includes('STATE_TESTMODE')) return 'Testmode on!';\n        else if (uiState.includes('STATE_USB_LOGCOPY')) return 'Copying logs to USB';\n\n        else if (uiState.includes('STATE_STARTHOUSECLEANING')) return 'Starting House Cleaning';\n        else if (uiState.includes('STATE_HOUSECLEANINGRUNNING')) return 'Cleaning House';\n        else if (uiState.includes('STATE_HOUSECLEANINGPAUSED')) return 'House Cleaning Paused';\n\n        else if (uiState.includes('STATE_STARTSPOTCLEANING')) return 'Starting Spot Clean';\n        else if (uiState.includes('STATE_SPOTCLEANINGRUNNING')) return 'Spot Cleaning';\n        else if (uiState.includes('STATE_SPOTCLEANINGPAUSED')) return 'Spot Cleaning Paused';\n\n        else return uiState || 'Unknown';\n      ]]]\n    styles:\n      icon:\n        - color: |\n            [[[ \n              const uiState = states[`sensor.${variables.robot_id}_ui_state`]?.state || '';\n              if (uiState === \"Starting...\") return '#edb926';\n              if (uiState === \"Shutting down...\") return 'gray';\n              const err = states[`sensor.${variables.robot_id}_robot_error`]?.state || '';\n              if (!err.startsWith('200')) return '#950606';\n              const alert = states[`sensor.${variables.robot_id}_robot_alert`]?.state || '';\n              if (!alert.startsWith('200')) return '#edb926';\n              return '#00cc00';\n            ]]]\n      card:\n        - border-radius: 20px\n        - display: flex\n        - justify-content: center\n        - align-items: center\n        - margin: 0 auto\n        - position: relative\n      custom_fields:\n        battery:\n          - position: absolute\n          - top: 8px\n          - right: 8px\n          - padding: 4px 8px\n          - border-radius: 8px\n          - font-weight: bold\n          - animation: |\n              [[[ \n                if (states[`binary_sensor.${variables.robot_id}_charging_active`]?.state !== 'on') return '';\n                const pct = Number(states[`sensor.${variables.robot_id}_fuel_percent`]?.state);\n                return pct > 35 ? 'pulseGreen 3s infinite' : 'pulseOrange 3s infinite';\n              ]]]\n          - background-color: |\n              [[[ \n                const pct = Number(states[`sensor.${variables.robot_id}_fuel_percent`]?.state);\n                return pct > 35 ? 'rgb(124, 252, 0)' : 'rgb(255, 140, 0)';\n              ]]]\n          - color: black\n        dock:\n          - position: absolute\n          - top: 8px\n          - left: 8px\n          - padding: 4px\n          - border-radius: 8px\n          - background-color: rgba(255,255,255,0.2)\n          - display: |\n              [[[ \n                return states[`binary_sensor.${variables.robot_id}_ext_power_present`]?.state === 'on'\n                  ? 'block'\n                  : 'none';\n              ]]]\n        manual_drive:\n          - position: absolute\n          - bottom: 8px\n          - right: 8px\n          - padding: 4px\n          - border-radius: 8px\n          - height: 15%\n          - width: 10%\n    custom_fields:\n      battery: |-\n        [[[ \n          const v = states[`sensor.${variables.robot_id}_fuel_percent`]?.state;\n          return (v ?? '0') + '%';\n        ]]]\n      dock: |\n        [[[ \n          if (states[`binary_sensor.${variables.robot_id}_ext_power_present`]?.state === 'on') {\n            return 'DOCKED';\n          } else {\n            return '';\n          }\n        ]]]\n      manual_drive:\n        card:\n          type: custom:button-card\n          icon: mdi:steering\n          size: 100%\n          styles:\n            card:\n              - background-color: rgba(255,255,255,0.2)\n          tap_action:\n            action: fire-dom-event\n            browser_mod:\n              service: browser_mod.popup\n              data:\n                title: Manual driving\n                size: normal\n                content:\n                  type: vertical-stack\n                  cards:\n                    - type: horizontal-stack\n                      cards:\n                        - type: custom:button-card\n                          entity: button.neato_vacuum_manual_drive_arc_left_down\n                          name: Arc Left\n                          press_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_arc_left_down\n                          release_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_arc_left_up\n                        - type: custom:button-card\n                          entity: button.neato_vacuum_manual_drive_forward_down\n                          name: Forward\n                          press_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_forward_down\n                          release_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_forward_up\n                        - type: custom:button-card\n                          entity: button.neato_vacuum_manual_drive_arc_right_down\n                          name: Arc Right\n                          press_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_arc_right_down\n                          release_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_arc_right_up\n                    - type: horizontal-stack\n                      cards:\n                        - type: custom:button-card\n                          entity: button.neato_vacuum_manual_drive_turn_left_down\n                          name: Left\n                          press_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_turn_left_down\n                          release_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_turn_left_up\n                        - type: custom:button-card\n                          entity: button.neato_vacuum_manual_drive_button_timeout\n                          name: Timeout\n                          tap_action:\n                            action: toggle\n                        - type: custom:button-card\n                          entity: button.neato_vacuum_manual_drive_turn_right_down\n                          name: Right\n                          press_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_turn_right_down\n                          release_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_turn_right_up\n                    - type: horizontal-stack\n                      cards:\n                        - type: custom:button-card\n                          entity: button.neato_vacuum_start_manual_cleaning\n                          name: Start manual\n                          tap_action:\n                            action: toggle\n                        - type: custom:button-card\n                          entity: button.neato_vacuum_manual_drive_backwards_down\n                          name: Backward\n                          press_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_backwards_down\n                          release_action:\n                            action: call-service\n                            service: button.press\n                            target:\n                              entity_id: button.neato_vacuum_manual_drive_backwards_up\n                        - type: custom:button-card\n                          entity: button.neato_vacuum_stop_cleaning\n                          name: Stop\n                          tap_action:\n                            action: toggle\n    extra_styles: |\n      @keyframes pulseGreen {\n        0%   { box-shadow: 0 0 5px 0    rgba(124, 252, 0, 0.6); }\n        50%  { box-shadow: 0 0 20px 6px rgba(124, 252, 0, 1.0); }\n        100% { box-shadow: 0 0 5px 0    rgba(124, 252, 0, 0.6); }\n      }\n      @keyframes pulseOrange {\n        0%   { box-shadow: 0 0 5px 0    rgba(255, 140, 0, 0.6); }\n        50%  { box-shadow: 0 0 20px 6px rgba(255, 140, 0, 1.0); }\n        100% { box-shadow: 0 0 5px 0    rgba(255, 140, 0, 0.6); }\n      }\n  - type: vertical-stack\n    cards:\n      - type: horizontal-stack\n        cards:\n          - type: custom:button-card\n            variables:\n              robot_id: neato_vacuum\n            show_icon: false\n            entity: \"[[[ return `sensor.${variables.robot_id}_robot_alert`; ]]]\"\n            show_state: false\n            styles:\n              card:\n                - border-color: |\n                    [[[ \n                      const alert = states[`sensor.${variables.robot_id}_robot_alert`]?.state || '';\n                      return alert.startsWith('200') ? '' : '#edb926';\n                    ]]]\n            name: |\n              [[[ \n                const alert = states[`sensor.${variables.robot_id}_robot_alert`]?.state || '';\n                if (alert.startsWith('200')) return 'No alerts';\n                try { return alert.match(/\\(UI_(ERROR|ALERT)_(.+)\\)/)[2].replaceAll('_',' '); }\n                catch { return alert; }\n              ]]]\n          - type: custom:button-card\n            variables:\n              robot_id: neato_vacuum\n            show_icon: false\n            entity: \"[[[ return `sensor.${variables.robot_id}_robot_error`; ]]]\"\n            show_state: false\n            styles:\n              card:\n                - border-color: |\n                    [[[ \n                      const err = states[`sensor.${variables.robot_id}_robot_error`]?.state || '';\n                      return err.startsWith('200') ? '' : '#950606';\n                    ]]]\n            name: |\n              [[[ \n                const err = states[`sensor.${variables.robot_id}_robot_error`]?.state || '';\n                if (err.startsWith('200')) return 'No errors';\n                try { return err.match(/\\(UI_(ERROR|ALERT)_(.+)\\)/)[2].replaceAll('_',' '); }\n                catch { return err; }\n              ]]]\n  - type: horizontal-stack\n    cards:\n      - type: conditional\n        conditions:\n          - condition: and\n            conditions:\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state_not: UIMGR_STATE_HOUSECLEANINGPAUSED\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state_not: UIMGR_STATE_HOUSECLEANINGRUNNING\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state_not: UIMGR_STATE_SPOTCLEANINGPAUSED\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state_not: UIMGR_STATE_SPOTCLEANINGRUNNING\n        card:\n          type: custom:button-card\n          variables:\n            robot_id: neato_vacuum\n          entity: \"[[[ return `button.${variables.robot_id}_house_clean`; ]]]\"\n          name: Clean\n          tap_action:\n            action: toggle\n      - type: conditional\n        conditions:\n          - condition: or\n            conditions:\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state: UIMGR_STATE_HOUSECLEANINGPAUSED\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state: UIMGR_STATE_SPOTCLEANINGPAUSED\n        card:\n          type: custom:button-card\n          variables:\n            robot_id: neato_vacuum\n          entity: \"[[[ return `button.${variables.robot_id}_resume_cleaning`; ]]]\"\n          name: Resume\n          tap_action:\n            action: toggle\n      - type: conditional\n        conditions:\n          - condition: or\n            conditions:\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state: UIMGR_STATE_HOUSECLEANINGRUNNING\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state: UIMGR_STATE_SPOTCLEANINGRUNNING\n        card:\n          type: custom:button-card\n          variables:\n            robot_id: neato_vacuum\n          entity: \"[[[ return `button.${variables.robot_id}_pause_cleaning`; ]]]\"\n          name: Pause\n          tap_action:\n            action: toggle\n      - type: conditional\n        conditions:\n          - condition: and\n            conditions:\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state_not: UIMGR_STATE_HOUSECLEANINGPAUSED\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state_not: UIMGR_STATE_HOUSECLEANINGRUNNING\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state_not: UIMGR_STATE_SPOTCLEANINGPAUSED\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state_not: UIMGR_STATE_SPOTCLEANINGRUNNING\n        card:\n          type: custom:button-card\n          variables:\n            robot_id: neato_vacuum\n          entity: \"[[[ return `button.${variables.robot_id}_spot_clean`; ]]]\"\n          name: Spot Clean\n          tap_action:\n            action: toggle\n          hold_action:\n            action: fire-dom-event\n            browser_mod:\n              service: browser_mod.popup\n              data:\n                title: Spot Clean - Height and Width\n                size: normal\n                content:\n                  type: vertical-stack\n                  cards:\n                    - type: entities\n                      entities:\n                        - entity: number.neato_vacuum_spot_clean_height\n                          name: Height\n                          icon: mdi:arrow-up-down\n                        - entity: number.neato_vacuum_spot_clean_width\n                          name: Width\n                          icon: mdi:arrow-left-right\n                    - type: custom:button-card\n                      size: 20%\n                      name: Start Spot Cleaning\n                      entity: button.neato_vacuum_spot_clean_height_width\n                      tap_action:\n                        action: toggle\n      - type: conditional\n        conditions:\n          - condition: or\n            conditions:\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state: UIMGR_STATE_HOUSECLEANINGPAUSED\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state: UIMGR_STATE_SPOTCLEANINGPAUSED\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state: UIMGR_STATE_HOUSECLEANINGRUNNING\n              - condition: state\n                entity: sensor.neato_vacuum_ui_state\n                state: UIMGR_STATE_SPOTCLEANINGRUNNING\n        card:\n          type: custom:button-card\n          variables:\n            robot_id: neato_vacuum\n          entity: \"[[[ return `button.${variables.robot_id}_stop_cleaning`; ]]]\"\n          name: STOP\n          tap_action:\n            action: toggle\n      - type: custom:button-card\n        variables:\n          robot_id: neato_vacuum\n        entity: \"[[[ return `button.${variables.robot_id}_locate_robot`; ]]]\"\n        name: Locate\n        tap_action:\n          action: toggle\n      - type: conditional\n        conditions:\n          - entity: binary_sensor.neato_vacuum_ext_power_present\n            state_not: \"on\"\n        card:\n          type: custom:button-card\n          entity: button.neato_vacuum_send_to_base\n          name: Send to base\n          tap_action:\n            action: toggle\n      - type: custom:button-card\n        variables:\n          robot_id: neato_vacuum\n        name: Settings\n        icon: mdi:cog\n        tap_action:\n          action: fire-dom-event\n          browser_mod:\n            service: browser_mod.popup\n            data:\n              title: More options\n              size: normal\n              content:\n                type: vertical-stack\n                cards:\n                  - type: horizontal-stack\n                    cards:\n                      - show_name: true\n                        show_icon: true\n                        entity: >-\n                          [[[ return `switch.${variables.robot_id}_eco_mode`;\n                          ]]]\n                        name: ECO Mode\n                        type: button\n                      - show_name: true\n                        show_icon: true\n                        entity: >-\n                          [[[ return `switch.${variables.robot_id}_test_mode`;\n                          ]]]\n                        name: Test Mode\n                        type: button\n                      - entity: >-\n                          [[[ return\n                          `button.${variables.robot_id}_update_status`; ]]]\n                        name: Fetch status\n                        show_icon: true\n                        type: button\n                        tap_action:\n                          action: toggle\n                      - entity: >-\n                          [[[ return\n                          `button.${variables.robot_id}_clear_errors`; ]]]\n                        name: Clear Errors\n                        show_icon: true\n                        type: button\n                        tap_action:\n                          action: toggle\n                  - type: entities\n                    entities:\n                      - entity: >-\n                          [[[ return\n                          `select.${variables.robot_id}_navigation_mode`; ]]]\n                        name: Navigation Mode\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_play_extra_sounds`; ]]]\n                        name: Play extra sounds\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_click_sounds`; ]]]\n                        name: Click Sounds\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_melody_sounds`; ]]]\n                        name: Melody Sounds\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_warning_sounds`; ]]]\n                        name: Warning Sounds\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_bin_full_detect`; ]]]\n                        name: Bin Full Detect\n                      - entity: \"[[[ return `switch.${variables.robot_id}_led`; ]]]\"\n                        name: LED\n                      - entity: >-\n                          [[[ return `switch.${variables.robot_id}_wall_enable`;\n                          ]]]\n                        name: Wall Follower\n                      - entity: >-\n                          [[[ return\n                          `switch.${variables.robot_id}_intenseclean`; ]]]\n                        name: Intense Clean\n                      - entity: \"[[[ return `switch.${variables.robot_id}_wifi`; ]]]\"\n                        name: WiFi\n                    state_color: false\n                    show_header_toggle: false\n                  - type: entities\n                    entities:\n                      - entity: \"[[[ return `sensor.${variables.robot_id}_model`;]]]\"\n                        name: Model\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_serial_number`;]]]\n                        name: S/N\n                      - entity: \"[[[ return `sensor.${variables.robot_id}_software`;]]]\"\n                        name: Software\n                      - entity: \"[[[ return `sensor.${variables.robot_id}_nbs_time`;]]]\"\n                        name: Robot Time\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_battery_voltage_v`;]]]\n                        name: Battery Voltage\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_battery_temp_c_avg`;]]]\n                        name: Battery Temp (avg)\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_battery_cycles`;]]]\n                        name: Battery Cycles\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_charger_mah`;]]]\n                        name: Charging\n                      - entity: >-\n                          [[[ return\n                          `sensor.${variables.robot_id}_discharge_mah`;]]]\n                        name: Discharging\n                  - type: horizontal-stack\n                    cards:\n                      - show_name: true\n                        show_icon: true\n                        entity: \"[[[ return `button.${variables.robot_id}_shutdown`;]]]\"\n                        type: button\n                        name: Power Off\n                        tap_action:\n                          action: toggle\n                      - show_name: true\n                        show_icon: true\n                        entity: >-\n                          [[[ return\n                          `button.${variables.robot_id}_powercycle`;]]]\n                        name: Reboot Robot\n                        type: button\n                        tap_action:\n                          action: toggle\n                      - show_name: true\n                        show_icon: true\n                        type: button\n                        entity: >-\n                          [[[ return\n                          `button.${variables.robot_id}_reboot_esp`;]]]\n                        name: Reboot ESP\n                        tap_action:\n                          action: toggle\n"
  },
  {
    "path": "config/js/1.2.1.js",
    "content": "var Bi=Object.defineProperty;var Ri=(t,e,i)=>e in t?Bi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var Ae=(t,e,i)=>(Ri(t,typeof e!=\"symbol\"?e+\"\":e,i),i);const Ui=function(){const e=document.createElement(\"link\").relList;if(e&&e.supports&&e.supports(\"modulepreload\"))return;for(const n of document.querySelectorAll('link[rel=\"modulepreload\"]'))r(n);new MutationObserver(n=>{for(const s of n)if(s.type===\"childList\")for(const o of s.addedNodes)o.tagName===\"LINK\"&&o.rel===\"modulepreload\"&&r(o)}).observe(document,{childList:!0,subtree:!0});function i(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerpolicy&&(s.referrerPolicy=n.referrerpolicy),n.crossorigin===\"use-credentials\"?s.credentials=\"include\":n.crossorigin===\"anonymous\"?s.credentials=\"omit\":s.credentials=\"same-origin\",s}function r(n){if(n.ep)return;n.ep=!0;const s=i(n);fetch(n.href,s)}};Ui();const Me=window,dt=Me.ShadowRoot&&(Me.ShadyCSS===void 0||Me.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,ht=Symbol(),yt=new WeakMap;class ii{constructor(e,i,r){if(this._$cssResult$=!0,r!==ht)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=e,this.t=i}get styleSheet(){let e=this.o;const i=this.t;if(dt&&e===void 0){const r=i!==void 0&&i.length===1;r&&(e=yt.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&yt.set(i,e))}return e}toString(){return this.cssText}}const Gi=t=>new ii(typeof t==\"string\"?t:t+\"\",void 0,ht),S=(t,...e)=>{const i=t.length===1?t[0]:e.reduce((r,n,s)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o==\"number\")return o;throw Error(\"use css function \"+o+\". Use unsafeCSS\")})(n)+t[s+1],t[0]);return new ii(i,t,ht)},Hi=(t,e)=>{dt?t.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet):e.forEach(i=>{const r=document.createElement(\"style\"),n=Me.litNonce;n!==void 0&&r.setAttribute(\"nonce\",n),r.textContent=i.cssText,t.appendChild(r)})},vt=dt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let i=\"\";for(const r of e.cssRules)i+=r.cssText;return Gi(i)})(t):t;var Ue;const xe=window,At=xe.trustedTypes,Vi=At?At.emptyScript:\"\",Tt=xe.reactiveElementPolyfillSupport,Xe={toAttribute(t,e){switch(e){case Boolean:t=t?Vi:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=t!==null;break;case Number:i=t===null?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},ni=(t,e)=>e!==t&&(e==e||t==t),Ge={attribute:!0,type:String,converter:Xe,reflect:!1,hasChanged:ni},et=\"finalized\";class F extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var i;this.finalize(),((i=this.h)!==null&&i!==void 0?i:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((i,r)=>{const n=this._$Ep(r,i);n!==void 0&&(this._$Ev.set(n,r),e.push(n))}),e}static createProperty(e,i=Ge){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(e,i),!i.noAccessor&&!this.prototype.hasOwnProperty(e)){const r=typeof e==\"symbol\"?Symbol():\"__\"+e,n=this.getPropertyDescriptor(e,r,i);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,i,r){return{get(){return this[i]},set(n){const s=this[e];this[i]=n,this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Ge}static finalize(){if(this.hasOwnProperty(et))return!1;this[et]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty(\"properties\")){const i=this.properties,r=[...Object.getOwnPropertyNames(i),...Object.getOwnPropertySymbols(i)];for(const n of r)this.createProperty(n,i[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const i=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const n of r)i.unshift(vt(n))}else e!==void 0&&i.push(vt(e));return i}static _$Ep(e,i){const r=i.attribute;return r===!1?void 0:typeof r==\"string\"?r:typeof e==\"string\"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(i=>i(this))}addController(e){var i,r;((i=this._$ES)!==null&&i!==void 0?i:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)===null||r===void 0||r.call(e))}removeController(e){var i;(i=this._$ES)===null||i===void 0||i.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])})}createRenderRoot(){var e;const i=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Hi(i,this.constructor.elementStyles),i}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var r;return(r=i.hostConnected)===null||r===void 0?void 0:r.call(i)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var r;return(r=i.hostDisconnected)===null||r===void 0?void 0:r.call(i)})}attributeChangedCallback(e,i,r){this._$AK(e,r)}_$EO(e,i,r=Ge){var n;const s=this.constructor._$Ep(e,r);if(s!==void 0&&r.reflect===!0){const o=(((n=r.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?r.converter:Xe).toAttribute(i,r.type);this._$El=e,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$El=null}}_$AK(e,i){var r;const n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){const o=n.getPropertyOptions(s),c=typeof o.converter==\"function\"?{fromAttribute:o.converter}:((r=o.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?o.converter:Xe;this._$El=s,this[s]=c.fromAttribute(i,o.type),this._$El=null}}requestUpdate(e,i,r){let n=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||ni)(this[e],i)?(this._$AL.has(e)||this._$AL.set(e,i),r.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(i){Promise.reject(i)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,s)=>this[s]=n),this._$Ei=void 0);let i=!1;const r=this._$AL;try{i=this.shouldUpdate(r),i?(this.willUpdate(r),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(r)):this._$Ek()}catch(n){throw i=!1,this._$Ek(),n}i&&this._$AE(r)}willUpdate(e){}_$AE(e){var i;(i=this._$ES)===null||i===void 0||i.forEach(r=>{var n;return(n=r.hostUpdated)===null||n===void 0?void 0:n.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((i,r)=>this._$EO(r,this[r],i)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}F[et]=!0,F.elementProperties=new Map,F.elementStyles=[],F.shadowRootOptions={mode:\"open\"},Tt==null||Tt({ReactiveElement:F}),((Ue=xe.reactiveElementVersions)!==null&&Ue!==void 0?Ue:xe.reactiveElementVersions=[]).push(\"1.6.3\");var He;const Ce=window,K=Ce.trustedTypes,wt=K?K.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,tt=\"$lit$\",P=`lit$${(Math.random()+\"\").slice(9)}$`,ri=\"?\"+P,qi=`<${ri}>`,U=document,oe=()=>U.createComment(\"\"),ae=t=>t===null||typeof t!=\"object\"&&typeof t!=\"function\",si=Array.isArray,zi=t=>si(t)||typeof(t==null?void 0:t[Symbol.iterator])==\"function\",Ve=`[ \t\n\\f\\r]`,te=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,Et=/-->/g,Mt=/>/g,j=RegExp(`>|${Ve}(?:([^\\\\s\"'>=/]+)(${Ve}*=${Ve}*(?:[^ \t\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),$t=/'/g,St=/\"/g,oi=/^(?:script|style|textarea|title)$/i,Fi=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),h=Fi(1),W=Symbol.for(\"lit-noChange\"),g=Symbol.for(\"lit-nothing\"),xt=new WeakMap,B=U.createTreeWalker(U,129,null,!1);function ai(t,e){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return wt!==void 0?wt.createHTML(e):e}const Ki=(t,e)=>{const i=t.length-1,r=[];let n,s=e===2?\"<svg>\":\"\",o=te;for(let c=0;c<i;c++){const a=t[c];let l,u,d=-1,p=0;for(;p<a.length&&(o.lastIndex=p,u=o.exec(a),u!==null);)p=o.lastIndex,o===te?u[1]===\"!--\"?o=Et:u[1]!==void 0?o=Mt:u[2]!==void 0?(oi.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),o=j):u[3]!==void 0&&(o=j):o===j?u[0]===\">\"?(o=n!=null?n:te,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?j:u[3]==='\"'?St:$t):o===St||o===$t?o=j:o===Et||o===Mt?o=te:(o=j,n=void 0);const f=o===j&&t[c+1].startsWith(\"/>\")?\" \":\"\";s+=o===te?a+qi:d>=0?(r.push(l),a.slice(0,d)+tt+a.slice(d)+P+f):a+P+(d===-2?(r.push(void 0),c):f)}return[ai(t,s+(t[i]||\"<?>\")+(e===2?\"</svg>\":\"\")),r]};class ce{constructor({strings:e,_$litType$:i},r){let n;this.parts=[];let s=0,o=0;const c=e.length-1,a=this.parts,[l,u]=Ki(e,i);if(this.el=ce.createElement(l,r),B.currentNode=this.el.content,i===2){const d=this.el.content,p=d.firstChild;p.remove(),d.append(...p.childNodes)}for(;(n=B.nextNode())!==null&&a.length<c;){if(n.nodeType===1){if(n.hasAttributes()){const d=[];for(const p of n.getAttributeNames())if(p.endsWith(tt)||p.startsWith(P)){const f=u[o++];if(d.push(p),f!==void 0){const y=n.getAttribute(f.toLowerCase()+tt).split(P),_=/([.?@])?(.*)/.exec(f);a.push({type:1,index:s,name:_[2],strings:y,ctor:_[1]===\".\"?Ji:_[1]===\"?\"?Zi:_[1]===\"@\"?Yi:De})}else a.push({type:6,index:s})}for(const p of d)n.removeAttribute(p)}if(oi.test(n.tagName)){const d=n.textContent.split(P),p=d.length-1;if(p>0){n.textContent=K?K.emptyScript:\"\";for(let f=0;f<p;f++)n.append(d[f],oe()),B.nextNode(),a.push({type:2,index:++s});n.append(d[p],oe())}}}else if(n.nodeType===8)if(n.data===ri)a.push({type:2,index:s});else{let d=-1;for(;(d=n.data.indexOf(P,d+1))!==-1;)a.push({type:7,index:s}),d+=P.length-1}s++}}static createElement(e,i){const r=U.createElement(\"template\");return r.innerHTML=e,r}}function J(t,e,i=t,r){var n,s,o,c;if(e===W)return e;let a=r!==void 0?(n=i._$Co)===null||n===void 0?void 0:n[r]:i._$Cl;const l=ae(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==l&&((s=a==null?void 0:a._$AO)===null||s===void 0||s.call(a,!1),l===void 0?a=void 0:(a=new l(t),a._$AT(t,i,r)),r!==void 0?((o=(c=i)._$Co)!==null&&o!==void 0?o:c._$Co=[])[r]=a:i._$Cl=a),a!==void 0&&(e=J(t,a._$AS(t,e.values),a,r)),e}class Wi{constructor(e,i){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var i;const{el:{content:r},parts:n}=this._$AD,s=((i=e==null?void 0:e.creationScope)!==null&&i!==void 0?i:U).importNode(r,!0);B.currentNode=s;let o=B.nextNode(),c=0,a=0,l=n[0];for(;l!==void 0;){if(c===l.index){let u;l.type===2?u=new fe(o,o.nextSibling,this,e):l.type===1?u=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(u=new Xi(o,this,e)),this._$AV.push(u),l=n[++a]}c!==(l==null?void 0:l.index)&&(o=B.nextNode(),c++)}return B.currentNode=U,s}v(e){let i=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,i),i+=r.strings.length-2):r._$AI(e[i])),i++}}class fe{constructor(e,i,r,n){var s;this.type=2,this._$AH=g,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=r,this.options=n,this._$Cp=(s=n==null?void 0:n.isConnected)===null||s===void 0||s}get _$AU(){var e,i;return(i=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&i!==void 0?i:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=i.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,i=this){e=J(this,e,i),ae(e)?e===g||e==null||e===\"\"?(this._$AH!==g&&this._$AR(),this._$AH=g):e!==this._$AH&&e!==W&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):zi(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==g&&ae(this._$AH)?this._$AA.nextSibling.data=e:this.$(U.createTextNode(e)),this._$AH=e}g(e){var i;const{values:r,_$litType$:n}=e,s=typeof n==\"number\"?this._$AC(e):(n.el===void 0&&(n.el=ce.createElement(ai(n.h,n.h[0]),this.options)),n);if(((i=this._$AH)===null||i===void 0?void 0:i._$AD)===s)this._$AH.v(r);else{const o=new Wi(s,this),c=o.u(this.options);o.v(r),this.$(c),this._$AH=o}}_$AC(e){let i=xt.get(e.strings);return i===void 0&&xt.set(e.strings,i=new ce(e)),i}T(e){si(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let r,n=0;for(const s of e)n===i.length?i.push(r=new fe(this.k(oe()),this.k(oe()),this,this.options)):r=i[n],r._$AI(s),n++;n<i.length&&(this._$AR(r&&r._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,i){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,i);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var i;this._$AM===void 0&&(this._$Cp=e,(i=this._$AP)===null||i===void 0||i.call(this,e))}}class De{constructor(e,i,r,n,s){this.type=1,this._$AH=g,this._$AN=void 0,this.element=e,this.name=i,this._$AM=n,this.options=s,r.length>2||r[0]!==\"\"||r[1]!==\"\"?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=g}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,i=this,r,n){const s=this.strings;let o=!1;if(s===void 0)e=J(this,e,i,0),o=!ae(e)||e!==this._$AH&&e!==W,o&&(this._$AH=e);else{const c=e;let a,l;for(e=s[0],a=0;a<s.length-1;a++)l=J(this,c[r+a],i,a),l===W&&(l=this._$AH[a]),o||(o=!ae(l)||l!==this._$AH[a]),l===g?e=g:e!==g&&(e+=(l!=null?l:\"\")+s[a+1]),this._$AH[a]=l}o&&!n&&this.j(e)}j(e){e===g?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:\"\")}}class Ji extends De{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===g?void 0:e}}const Qi=K?K.emptyScript:\"\";class Zi extends De{constructor(){super(...arguments),this.type=4}j(e){e&&e!==g?this.element.setAttribute(this.name,Qi):this.element.removeAttribute(this.name)}}class Yi extends De{constructor(e,i,r,n,s){super(e,i,r,n,s),this.type=5}_$AI(e,i=this){var r;if((e=(r=J(this,e,i,0))!==null&&r!==void 0?r:g)===W)return;const n=this._$AH,s=e===g&&n!==g||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==g&&(n===g||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var i,r;typeof this._$AH==\"function\"?this._$AH.call((r=(i=this.options)===null||i===void 0?void 0:i.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}}class Xi{constructor(e,i,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){J(this,e)}}const Ct=Ce.litHtmlPolyfillSupport;Ct==null||Ct(ce,fe),((He=Ce.litHtmlVersions)!==null&&He!==void 0?He:Ce.litHtmlVersions=[]).push(\"2.8.0\");const en=(t,e,i)=>{var r,n;const s=(r=i==null?void 0:i.renderBefore)!==null&&r!==void 0?r:e;let o=s._$litPart$;if(o===void 0){const c=(n=i==null?void 0:i.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=o=new fe(e.insertBefore(oe(),c),c,void 0,i!=null?i:{})}return o._$AI(t),o};var qe,ze;class E extends F{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,i;const r=super.createRenderRoot();return(e=(i=this.renderOptions).renderBefore)!==null&&e!==void 0||(i.renderBefore=r.firstChild),r}update(e){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=en(i,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return W}}E.finalized=!0,E._$litElement$=!0,(qe=globalThis.litElementHydrateSupport)===null||qe===void 0||qe.call(globalThis,{LitElement:E});const kt=globalThis.litElementPolyfillSupport;kt==null||kt({LitElement:E});((ze=globalThis.litElementVersions)!==null&&ze!==void 0?ze:globalThis.litElementVersions=[]).push(\"3.3.3\");const k=t=>e=>typeof e==\"function\"?((i,r)=>(customElements.define(i,r),r))(t,e):((i,r)=>{const{kind:n,elements:s}=r;return{kind:n,elements:s,finisher(o){customElements.define(i,o)}}})(t,e),tn=(t,e)=>e.kind===\"method\"&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer==\"function\"&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}},nn=(t,e,i)=>{e.constructor.createProperty(i,t)};function b(t){return(e,i)=>i!==void 0?nn(t,e,i):tn(t,e)}function x(t){return b({...t,state:!0})}const rn=({finisher:t,descriptor:e})=>(i,r)=>{var n;if(r===void 0){const s=(n=i.originalKey)!==null&&n!==void 0?n:i.key,o=e!=null?{kind:\"method\",placement:\"prototype\",key:s,descriptor:e(i.key)}:{...i,key:s};return t!=null&&(o.finisher=function(c){t(c,s)}),o}{const s=i.constructor;e!==void 0&&Object.defineProperty(i,r,e(r)),t==null||t(s,r)}};function ci(t,e){return rn({descriptor:i=>{const r={get(){var n,s;return(s=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(t))!==null&&s!==void 0?s:null},enumerable:!0,configurable:!0};if(e){const n=typeof i==\"symbol\"?Symbol():\"__\"+i;r.get=function(){var s,o;return this[n]===void 0&&(this[n]=(o=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(t))!==null&&o!==void 0?o:null),this[n]}}return r}})}var Fe;((Fe=window.HTMLSlotElement)===null||Fe===void 0?void 0:Fe.prototype.assignedElements)!=null;function pt(){let t=window.location.pathname;return t.endsWith(\"/\")?t.slice(0,-1):t}window.apiBasePath=pt();function li(t,e){fetch(`${window.apiBasePath}/${t.domain}/${t.id}/${e}`,{method:\"POST\",headers:{\"Content-Type\":\"application/x-www-form-urlencoded\"}})}function Ke(t){li(t,\"press\")}function ui(t,e){li(t,`set?value=${encodeURIComponent(e)}`)}var di=S`.tab-header{display:inline-flex;max-width:90%;font-weight:400;padding-inline:1.5em;padding-top:.5em;padding-bottom:.5em;align-items:center;border-radius:12px 12px 0 0;background-color:rgba(127,127,127,.3);margin-top:1em;user-select:none}.tab-container{border:2px solid rgba(127,127,127,.3);border-radius:0 12px 12px 12px}`,sn=Object.defineProperty,on=Object.getOwnPropertyDescriptor,Oe=(t,e,i,r)=>{for(var n=r>1?void 0:r?on(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&sn(e,i,n),n};let le=class extends E{constructor(){super(),this.rows=10,this.scheme=\"\",this.logs=[],this.handleLog=t=>{const i=t.data,n={\"\\x1B[1;31m\":\"e\",\"\\x1B[0;33m\":\"w\",\"\\x1B[0;32m\":\"i\",\"\\x1B[0;35m\":\"c\",\"\\x1B[0;36m\":\"d\",\"\\x1B[0;37m\":\"v\"}[i.slice(0,7)];if(!n)return;const o=i.slice(7,i.length-4).split(`\n`),c=o[0],l=c.slice(3).split(\":\").slice(0,2).join(\":\"),u=c.slice(5+l.length),d=c.slice(0,3),p=new Date().toTimeString().split(\" \")[0];o.forEach((f,y)=>{console.log(\"ESP_LOG\",f);const _={type:n,level:d,tag:l,detail:y===0?u:f,when:p};this.logs.push(_)}),this.logs=this.logs.slice(-this.rows)}}connectedCallback(){var t;super.connectedCallback(),(t=window.source)==null||t.addEventListener(\"log\",this.handleLog)}disconnectedCallback(){var t;(t=window.source)==null||t.removeEventListener(\"log\",this.handleLog),super.disconnectedCallback()}render(){return h`<div class=\"tab-header\" @dblclick=\"${this._handleTabHeaderDblClick}\">Debug Log</div><div class=\"tab-container\"><div class=\"logs\" color-scheme=\"${this.scheme}\"><div class=\"thead trow\"><div>Time</div><div>Level</div><div>Tag</div><div>Message</div></div><div class=\"tbody\">${this.logs.map(t=>h`<div class=\"trow ${t.type}\"><div>${t.when}</div><div>${t.level}</div><div>${t.tag}</div><div>${t.detail}</div></div>`)}</div></div></div>`}_handleTabHeaderDblClick(t){var i;const e=new CustomEvent(\"log-tab-header-double-clicked\",{bubbles:!0,composed:!0});(i=t.target)==null||i.dispatchEvent(e)}static get styles(){return[di,S`.tbody .trow:nth-child(2n),.thead{background-color:rgba(127,127,127,.05)}.trow div{font-family:monospace;width:100%;line-height:1.2rem}.trow{display:flex}.thead{line-height:1rem}.thead .trow{text-align:left;padding:.25rem .5rem}.trow{display:flex}.trow>div{align-self:flex-start;padding-right:.25em;flex:2 0;min-width:70px}.trow>div:nth-child(2){flex:1 0;overflow:hidden;text-overflow:ellipsis;max-width:40px}.trow>div:nth-child(3){flex:3 0;overflow:hidden;text-overflow:ellipsis}.trow>div:last-child{flex:15 0;padding-right:0;overflow:hidden;text-overflow:ellipsis}pre{margin:0}.v{color:#888}.d{color:#0dd}.c{color:#ff00ff}.i{color:#32cd32}.w{color:#ff0}.e{color:red;font-weight:700}.logs[color-scheme=light]{font-weight:700}.logs[color-scheme=light] .w{color:#cc0}.logs[color-scheme=dark] .d{color:#0aa}.logs{overflow-x:auto;border-radius:12px;border-width:1px;border-style:solid;border-color:rgba(127,127,127,.12);transition:all .3s ease-out 0s;font-size:14px;padding:16px}@media (max-width:1024px){.trow>div:nth-child(2){display:none!important}}`]}};Oe([b({type:Number})],le.prototype,\"rows\",2);Oe([b({type:String})],le.prototype,\"scheme\",2);Oe([x()],le.prototype,\"logs\",2);le=Oe([k(\"esp-log\")],le);var me=S`:host,button,input,select{font-family:ui-monospace,system-ui,Helvetica,Roboto,Oxygen,Ubuntu,sans-serif;--primary-color:#03a9f4;transition:all 350ms!important}`;class an{constructor(){this.entities=new Map,this.listeners=new Set}set(e){this.entities.set(e.unique_id,e),this.notify(e)}get(e){return this.entities.get(e)}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}notify(e){for(const i of this.listeners)i(e)}}const Q=new an;var cn=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,q=(t,e,i,r)=>{for(var n=r>1?void 0:r?ln(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&cn(e,i,n),n};let I=class extends E{constructor(){super(...arguments),this.click=\"\",this.press=\"\",this.release=\"\",this.icon=\"\",this.name=\"\",this.entities={}}connectedCallback(){super.connectedCallback(),this.unsubscribe=Q.subscribe(t=>{t.unique_id===this.click&&(this.entities.click=t),t.unique_id===this.press&&(this.entities.press=t),t.unique_id===this.release&&(this.entities.release=t),this.requestUpdate()})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),super.disconnectedCallback()}get entityIds(){let t=[];return this.click&&t.push(this.click),this.press&&t.push(this.press),this.release&&t.push(this.release),t}onClick(){this.entities.click&&Ke(this.entities.click)}onMouseDown(){this.entities.press&&Ke(this.entities.press)}onMouseUp(){this.entities.release&&Ke(this.entities.release)}updated(t){!this.customButtom||(this.press&&(this.customButtom.removeEventListener(\"touchstart\",this.onMouseDown.bind(this)),this.customButtom.addEventListener(\"touchstart\",this.onMouseDown.bind(this))),this.release&&(this.customButtom.removeEventListener(\"touchend\",this.onMouseUp.bind(this)),this.customButtom.addEventListener(\"touchend\",this.onMouseUp.bind(this))))}render(){var t,e,i,r,n,s;return Object.keys(this.entities).length!==this.entityIds.length?h`<div class=\"cb loading\"><iconify-icon icon=\"mdi:progress-clock\" height=\"24px\"></iconify-icon>loading…</div>`:h`<div class=\"cb\" @click=\"${this.onClick}\" @mousedown=\"${this.onMouseDown}\" @mouseup=\"${this.onMouseUp}\" id=\"custom-button\"><iconify-icon icon=\"${this.icon||((t=this.entities.click)==null?void 0:t.icon)||((e=this.entities.press)==null?void 0:e.icon)||((i=this.entities.release)==null?void 0:i.icon)}\" height=\"24px\"></iconify-icon><span>${this.name||((r=this.entities.click)==null?void 0:r.name)||((n=this.entities.press)==null?void 0:n.name)||((s=this.entities.release)==null?void 0:s.name)}</span></div>`}static get styles(){return[me,S`.cb{border:.1rem solid gray;border-radius:.5rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:1rem;width:6rem}.cb span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.cb:hover{background-color:rgba(255,255,255,.1);cursor:pointer}@media (max-width:1024px){.cb{font-size:.8rem;width:5.3rem}}`]}};q([b({type:String})],I.prototype,\"click\",2);q([b({type:String})],I.prototype,\"press\",2);q([b({type:String})],I.prototype,\"release\",2);q([b({type:String})],I.prototype,\"icon\",2);q([b({type:String})],I.prototype,\"name\",2);q([ci(\"#custom-button\")],I.prototype,\"customButtom\",2);I=q([k(\"custom-button\")],I);var un=S`:host{position:relative}select{background-color:inherit;color:inherit;width:100%;border-radius:4px}option{color:currentColor;background-color:var(--primary-color,currentColor)}input[type=range],input[type=text]{width:calc(100% - 3rem);height:.75rem}.range{text-align:center}.entity-row{display:flex;align-items:center;flex-direction:row;transition:all .3s ease-out 0s;min-height:40px;position:relative}.entity-row.expanded{min-height:240px}.entity-row:nth-child(2n){background-color:rgba(90,90,90,.1)}.entity-row iconify-icon{vertical-align:middle}.entity-row>:nth-child(1){flex:0 0 40px;color:#44739e;line-height:40px;text-align:center}.entity-row>:nth-child(2){flex:1 1 40%;margin-left:16px;margin-right:8px;text-wrap:nowrap;overflow:hidden;text-overflow:ellipsis}.entity-row>:nth-child(3){flex:1 1 50%;margin-right:8px;margin-left:20px;text-align:right;display:flex;justify-content:space-between;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.entity-row>:nth-child(3)>:only-child{margin-left:auto}.binary_sensor_off{color:rgba(127,127,127,.7)}.singlebutton-row button{margin:auto;display:flex}.climate-wrap{width:100%;margin:10px 0 10px 0}.climate-row{width:100%;display:inline-flex;flex-wrap:wrap;text-align:left}.climate-row>select{width:50%}.climate-row>label{align-content:center;width:150px}input[type=color]::-webkit-color-swatch-wrapper{padding:0!important}`,dn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,Le=(t,e,i,r)=>{for(var n=r>1?void 0:r?hn(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&dn(e,i,n),n};const hi=\"ON\",Pt=\"OFF\";let ue=class extends E{constructor(){super(...arguments),this.entityIds=[],this.customNames={},this.customValues={},this.entities=[],this._actionRenderer=new pi}connectedCallback(){super.connectedCallback(),this.unsubscribe=Q.subscribe(t=>{this.entityIds.some(e=>e===t.unique_id)&&(this.entities.push(t),this.entities.sort((e,i)=>this.entityIds.indexOf(e.unique_id)-this.entityIds.indexOf(i.unique_id)),this.requestUpdate())})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),super.disconnectedCallback()}render(){return this.entities.length?h`<div>${this.entities.map(t=>{var e,i,r;return h`<div class=\"entity-row\" .domain=\"${t.domain}\"><div>${t.icon?h`<iconify-icon icon=\"${t.icon}\" height=\"24px\"></iconify-icon>`:g}</div><div>${((e=this.customNames)==null?void 0:e[t.unique_id])||t.name}</div><div style=\"${t.domain===\"number\"?\"overflow-wrap: unset;word-break: unset;\":\"\"}\">${t.has_action?this.control(t):h`<div>${(i=this.customValues)!=null&&i[t.unique_id]?(r=this.customValues)==null?void 0:r[t.unique_id](t.state):t.state}</div>`}</div></div>`})}</div>`:h`loading…`}hasAction(t){return`render_${t.domain}`in this._actionRenderer}control(t){return this._actionRenderer.entity=t,this._actionRenderer.actioner=this,this._actionRenderer.exec(`render_${t.domain}`)}restAction(t,e){fetch(`${window.apiBasePath}/${t.domain}/${t.id}/${e}`,{method:\"POST\",headers:{\"Content-Type\":\"application/x-www-form-urlencoded\"}}).then(i=>{console.log(i)})}static get styles(){return[me,un]}};Le([b({type:String})],ue.prototype,\"entityIds\",2);Le([b()],ue.prototype,\"customNames\",2);Le([b()],ue.prototype,\"customValues\",2);ue=Le([k(\"custom-table\")],ue);class pi{exec(e){if(!this[e]||typeof this[e]!=\"function\"){console.log(`ActionRenderer.${e} is not callable`);return}return this[e]()}_actionButton(e,i,r,n=!1){if(!e)return;let s=r||i.toLowerCase();return h`<button class=\"${n?\"abuttonIsState\":\"abutton\"}\" ?disabled=\"${n}\" @click=\"${()=>{var o;return(o=this.actioner)==null?void 0:o.restAction(e,s)}}\">${i}</button>`}_datetime(e,i,r,n,s){return h`<input type=\"${i}\" name=\"${e.unique_id}\" id=\"${e.unique_id}\" .value=\"${s}\" @change=\"${o=>{var a,l;const c=(a=o.target)==null?void 0:a.value;(l=this.actioner)==null||l.restAction(e,`${r}?${n}=${c.replace(\"T\",\" \")}`)}}\">`}_switch(e){return h`<esp-switch color=\"var(--primary-color,currentColor)\" .state=\"${e.state}\" @state=\"${i=>{var n;let r=\"turn_\"+i.detail.state;(n=this.actioner)==null||n.restAction(e,r.toLowerCase())}}\"></esp-switch>`}_select(e,i,r,n,s){return h`<select @change=\"${o=>{var a,l;const c=(a=o.target)==null?void 0:a.value;(l=this.actioner)==null||l.restAction(e,`${i}?${r}=${encodeURIComponent(c)}`)}}\">${n.map(o=>h`<option value=\"${o}\" ?selected=\"${o==s}\">${o}</option>`)}</select>`}_range(e,i,r,n,s,o,c=1){return e.mode==1?h`<div class=\"range\"><label>${s||0}</label> <input type=\"${e.mode==1?\"number\":\"range\"}\" name=\"${e.unique_id}\" id=\"${e.unique_id}\" step=\"${c}\" min=\"${s||Math.min(0,n)}\" max=\"${o||Math.max(10,n)}\" .value=\"${n}\" @change=\"${a=>{var u,d;const l=(u=a.target)==null?void 0:u.value;(d=this.actioner)==null||d.restAction(e,`${i}?${r}=${l}`)}}\"> <label>${o||100}</label></div>`:h`<esp-range-slider name=\"${e.unique_id}\" step=\"${c}\" min=\"${s}\" max=\"${o}\" .value=\"${n}\" @state=\"${a=>{var l,u;(l=a.target)==null||l.value,(u=this.actioner)==null||u.restAction(e,`${i}?${r}=${a.detail.state}`)}}\"></esp-range-slider>`}_textinput(e,i,r,n,s,o,c){return h`<input type=\"${e.mode==1?\"password\":\"text\"}\" name=\"${e.unique_id}\" id=\"${e.unique_id}\" minlength=\"${s||Math.min(0,n)}\" maxlength=\"${o||Math.max(255,n)}\" pattern=\"${c||\"\"}\" .value=\"${n}\" @change=\"${a=>{var u,d;const l=(u=a.target)==null?void 0:u.value;(d=this.actioner)==null||d.restAction(e,`${i}?${r}=${encodeURIComponent(l)}`)}}\">`}_colorpicker(e,i,r){function n(o){return Number(o).toString(16).padStart(2,\"0\")}function s(o){var a;const c=((a=o.match(/[0-9a-f]{2}/gi))==null?void 0:a.map(l=>parseInt(l,16)))||[0,0,0];return`r=${c[0]}&g=${c[1]}&b=${c[2]}`}return h`<div class=\"colorpicker\"><input type=\"color\" name=\"${e.unique_id}\" id=\"${e.unique_id}\" value=\"#${n(r==null?void 0:r.r)}${n(r==null?void 0:r.g)}${n(r==null?void 0:r.b)}\" @change=\"${o=>{var a,l;const c=(a=o.target)==null?void 0:a.value;(l=this.actioner)==null||l.restAction(e,`${i}?${s(c)}`)}}\"></div>`}render_binary_sensor(){var i;if(!this.entity)return;const e=this.entity.state==hi;return h`<iconify-icon class=\"binary_sensor_${(i=this.entity.state)==null?void 0:i.toLowerCase()}\" icon=\"mdi:checkbox-${e?\"marked-circle\":\"blank-circle-outline\"}\" height=\"24px\"></iconify-icon>`}render_date(){if(!!this.entity)return h`${this._datetime(this.entity,\"date\",\"set\",\"value\",this.entity.value)}`}render_time(){if(!!this.entity)return h`${this._datetime(this.entity,\"time\",\"set\",\"value\",this.entity.value)}`}render_datetime(){if(!!this.entity)return h`${this._datetime(this.entity,\"datetime-local\",\"set\",\"value\",this.entity.value)}`}render_switch(){if(!!this.entity)return this.entity.assumed_state?h`${this._actionButton(this.entity,\"\\u274C\",\"turn_off\")} ${this._actionButton(this.entity,\"\\u2714\\uFE0F\",\"turn_on\")}`:this._switch(this.entity)}render_fan(){if(!!this.entity)return[this.entity.speed,\" \",this.entity.speed_level,this._switch(this.entity),this.entity.speed_count?this._range(this.entity,`turn_${this.entity.state.toLowerCase()}`,\"speed_level\",this.entity.speed_level?this.entity.speed_level:0,0,this.entity.speed_count,1):\"\"]}render_light(){var e,i;if(!!this.entity)return[h`<div class=\"entity\" style=\"width:100%\">${this._switch(this.entity)} ${this.entity.brightness?this._range(this.entity,\"turn_on\",\"brightness\",this.entity.brightness,0,255,1):\"\"} ${this.entity.color_mode===\"rgb\"||this.entity.color_mode===\"rgbw\"?this._colorpicker(this.entity,\"turn_on\",(e=this.entity)==null?void 0:e.color):\"\"} ${(i=this.entity.effects)!=null&&i.filter(r=>r!=\"None\").length?this._select(this.entity,\"turn_on\",\"effect\",this.entity.effects||[],this.entity.effect):\"\"}</div>`]}render_lock(){if(!!this.entity)return h`${this._actionButton(this.entity,\"\\u{1F510}\",\"lock\",this.entity.state===\"LOCKED\")} ${this._actionButton(this.entity,\"\\u{1F513}\",\"unlock\",this.entity.state===\"UNLOCKED\")} ${this._actionButton(this.entity,\"\\u2191\",\"open\")}`}render_cover(){if(!!this.entity)return h`${this._actionButton(this.entity,\"\\u2191\",\"open\",this.entity.state===\"OPEN\")} ${this._actionButton(this.entity,\"\\u2610\",\"stop\")} ${this._actionButton(this.entity,\"\\u2193\",\"close\",this.entity.state===\"CLOSED\")}`}render_button(){if(!!this.entity)return h`${this._actionButton(this.entity,\"PRESS\",\"press\")}`}render_select(){if(!!this.entity)return this._select(this.entity,\"set\",\"option\",this.entity.option||[],this.entity.value)}render_number(){if(!!this.entity)return h`${this._range(this.entity,\"set\",\"value\",this.entity.value,this.entity.min_value,this.entity.max_value,this.entity.step)} ${this.entity.uom}`}render_text(){if(!!this.entity)return this._textinput(this.entity,\"set\",\"value\",this.entity.value,this.entity.min_length,this.entity.max_length,this.entity.pattern)}render_climate(){if(!this.entity)return;let e,i=h`<div class=\"climate-row\" style=\"padding-bottom:10px\" ;><label>Current: ${this.entity.current_temperature} °C</label></div>`;this.entity.target_temperature_low!==void 0&&this.entity.target_temperature_high!==void 0?e=h`<div class=\"climate-row\"><label>Target Low: </label> ${this._range(this.entity,\"set\",\"target_temperature_low\",this.entity.target_temperature_low,this.entity.min_temp,this.entity.max_temp,this.entity.step)}</div><div class=\"climate-row\"><label>Target High: </label> ${this._range(this.entity,\"set\",\"target_temperature_high\",this.entity.target_temperature_high,this.entity.min_temp,this.entity.max_temp,this.entity.step)}</div>`:e=h`<div class=\"climate-row\"><label>Target: </label> ${this._range(this.entity,\"set\",\"target_temperature\",this.entity.target_temperature,this.entity.min_temp,this.entity.max_temp,this.entity.step)}</div>`;let r=h``;return(this.entity.modes?this.entity.modes.length:0)>0&&(r=h`<div class=\"climate-row\"><label>Mode: </label> ${this._select(this.entity,\"set\",\"mode\",this.entity.modes||[],this.entity.mode||\"\")}</div>`),h`<div class=\"climate-wrap\">${i} ${e} ${r}</div>`}render_valve(){if(!!this.entity)return h`${this._actionButton(this.entity,\"OPEN\",\"open\",this.entity.state===\"OPEN\")} ${this._actionButton(this.entity,\"\\u2610\",\"stop\")} ${this._actionButton(this.entity,\"CLOSE\",\"close\",this.entity.state===\"CLOSED\")}`}}var pn=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,Z=(t,e,i,r)=>{for(var n=r>1?void 0:r?fn(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&pn(e,i,n),n};const It=\"checkbox-lever\";let G=class extends E{constructor(){super(...arguments),this.checkbox=null,this.stateOn=hi,this.stateOff=Pt,this.state=Pt,this.color=\"currentColor\",this.disabled=!1}firstUpdated(t){var e;this.checkbox=(e=this.shadowRoot)==null?void 0:e.getElementById(It)}isOn(){return this.state===this.stateOn}toggle(t){const e=this.isOn()?this.stateOff:this.stateOn;let i=new CustomEvent(\"state\",{detail:{state:e,id:this.id}});this.dispatchEvent(i)}render(){return h`<div class=\"sw\"><label><input id=\"${It}\" type=\"checkbox\" .checked=\"${this.isOn()}\" .disabled=\"${this.disabled}\" @click=\"${this.toggle}\"> <span style=\"color:${this.color}\" class=\"lever\"></span></label></div>`}static get styles(){return[me,S`.sw,.sw *{-webkit-tap-highlight-color:transparent;user-select:none;cursor:pointer}input[type=checkbox]{opacity:0;width:0;height:0}input[type=checkbox]:checked+.lever{background-color:currentColor;background-image:linear-gradient(0deg,rgba(255,255,255,.5) 0,rgba(255,255,255,.5) 100%)}input[type=checkbox]:checked+.lever:after,input[type=checkbox]:checked+.lever:before{left:18px}input[type=checkbox]:checked+.lever:after{background-color:currentColor}input[type=checkbox]:not(:checked)+.lever:after{background-color:rgba(127,127,127,.5)}.lever{content:\"\";display:inline-block;position:relative;width:36px;height:14px;background-image:linear-gradient(0deg,rgba(127,127,127,.5) 0,rgba(127,127,127,.5) 100%);background-color:inherit;border-radius:15px;transition:background .3s ease;vertical-align:middle}.lever:after,.lever:before{content:\"\";position:absolute;display:inline-block;width:20px;height:20px;border-radius:50%;left:0;top:-3px;transition:left .3s ease,background .3s ease,box-shadow .1s ease,transform .1s ease}.lever:before{background-color:currentColor;background-image:linear-gradient(0deg,rgba(255,255,255,.9) 0,rgba(255,255,255,.9) 100%)}.lever:after{background-color:#f1f1f1;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}input[type=checkbox]:checked:not(:disabled).tabbed:focus~.lever::before,input[type=checkbox]:checked:not(:disabled)~.lever:active::before{transform:scale(2.4);background-color:rgba(255,255,255,.9) 0;background-image:linear-gradient(0deg,rgba(255,255,255,.9) 0,rgba(255,255,255,.9) 100%)}input[type=checkbox]:not(:disabled).tabbed:focus~.lever::before,input[type=checkbox]:not(:disabled)~.lever:active:before{transform:scale(2.4);background-color:rgba(0,0,0,.08)}input[type=checkbox][disabled]+.lever{cursor:default;background-color:rgba(0,0,0,.12)}input[type=checkbox][disabled]+.lever:after,input[type=checkbox][disabled]:checked+.lever:after{background-color:#949494}`]}};Z([b({type:String})],G.prototype,\"stateOn\",2);Z([b({type:String})],G.prototype,\"stateOff\",2);Z([b({type:String})],G.prototype,\"state\",2);Z([b({type:String})],G.prototype,\"color\",2);Z([b({type:Boolean})],G.prototype,\"disabled\",2);G=Z([k(\"esp-switch\")],G);var mn=Object.defineProperty,gn=Object.getOwnPropertyDescriptor,Y=(t,e,i,r)=>{for(var n=r>1?void 0:r?gn(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&mn(e,i,n),n};const Dt=\"range\",bn=\"rangeValue\",Ot=500;let H=class extends E{constructor(){super(...arguments),this.inputRange=null,this.currentValue=null,this.longPressTimer=null,this.isPopupInputVisible=!1,this.value=0,this.min=0,this.max=0,this.step=0,this.name=\"\"}firstUpdated(t){var e,i;this.inputRange=(e=this.shadowRoot)==null?void 0:e.getElementById(Dt),this.currentValue=(i=this.shadowRoot)==null?void 0:i.getElementById(bn),document.addEventListener(\"mousedown\",r=>{var s;if(!document.querySelector(\".popup-number-input\"))return;!((s=document.querySelector(\".popup-number-input\"))!=null&&s.contains(r.target))&&this.isPopupInputVisible&&this.deletePopupInput()})}updated(){this.updateCurrentValueOverlay()}onMouseDownCurrentValue(t){this.longPressTimer=setTimeout(()=>{this.showPopupInput(t.pageX,t.pageY)},Ot)}onMouseUpCurrentValue(t){this.longPressTimer&&!this.isPopupInputVisible&&(clearTimeout(this.longPressTimer),this.longPressTimer=null)}onTouchStartCurrentValue(t){this.longPressTimer=setTimeout(()=>{this.showPopupInput(t.touches[0].pageX,t.touches[0].pageY)},Ot)}onTouchEndCurrentValue(t){this.longPressTimer&&!this.isPopupInputVisible&&(clearTimeout(this.longPressTimer),this.longPressTimer=null)}deletePopupInput(){const t=document.querySelector(\".popup-number-input\");t&&t.remove(),this.isPopupInputVisible=!1}showPopupInput(t,e){const i=document.createElement(\"input\");i.type=\"number\",i.value=this.inputRange.value,i.min=this.inputRange.min,i.max=this.inputRange.max,i.step=this.inputRange.step,i.classList.add(\"popup-number-input\");const r=`\n    position: absolute;\n    left: ${t}px;\n    top: ${e}px;\n    width: 50px;\n    -webkit-appearance: none;\n    margin: 0;\n    `;i.setAttribute(\"style\",r),document.body.appendChild(i),i.addEventListener(\"contextmenu\",n=>{n.preventDefault()}),i.addEventListener(\"change\",n=>{var c,a;let s=n.target;this.inputRange.value=s==null?void 0:s.value;var o=new Event(\"input\");(c=this.inputRange)==null||c.dispatchEvent(o);var o=new Event(\"change\");(a=this.inputRange)==null||a.dispatchEvent(o)}),i.addEventListener(\"keydown\",n=>{n.key===\"Enter\"&&this.deletePopupInput()}),i.focus(),this.isPopupInputVisible=!0}updateCurrentValueOverlay(){var r,n;const t=Number((this.inputRange.value-this.inputRange.min)*100/(this.inputRange.max-this.inputRange.min)),e=10-t*.2;this.currentValue.innerHTML=`<span>${(r=this.inputRange)==null?void 0:r.value}</span>`,this.currentValue.style.left=`calc(${t}% + (${e}px))`;const i=(n=this.currentValue)==null?void 0:n.querySelector(\"span\");i==null||i.addEventListener(\"mousedown\",this.onMouseDownCurrentValue.bind(this)),i==null||i.addEventListener(\"mouseup\",this.onMouseUpCurrentValue.bind(this)),i==null||i.addEventListener(\"touchstart\",this.onTouchStartCurrentValue.bind(this)),i==null||i.addEventListener(\"touchend\",this.onTouchEndCurrentValue.bind(this)),i==null||i.addEventListener(\"contextmenu\",s=>{s.preventDefault()})}onInputEvent(t){this.updateCurrentValueOverlay()}onInputChangeEvent(t){var e;this.sendState((e=this.inputRange)==null?void 0:e.value)}sendState(t){let e=new CustomEvent(\"state\",{detail:{state:t,id:this.id}});this.dispatchEvent(e)}render(){return h`<div class=\"range-wrap\"><label>${this.min||0}</label><div class=\"slider-wrap\"><div class=\"range-value\" id=\"rangeValue\"></div><input id=\"${Dt}\" type=\"range\" name=\"${this.name}\" step=\"${this.step}\" min=\"${this.min||Math.min(0,this.value)}\" max=\"${this.max||Math.max(10,this.value)}\" .value=\"${this.value}\" @input=\"${this.onInputEvent}\" @change=\"${this.onInputChangeEvent}\"></div><label style=\"text-align:left\">${this.max||100}</label></div>`}static get styles(){return[me,S`:host{min-width:150px;flex:1}input[type=range]{background:0 0;-webkit-appearance:none;appearance:none;margin:20px 0;width:100%;touch-action:none}input[type=range]:focus{outline:0}input[type=range]::-webkit-slider-runnable-track{width:100%;height:4px;cursor:pointer;animate:.2s;background:#03a9f4;border-radius:25px}input[type=range]::-moz-range-track{width:100%;height:4px;cursor:pointer;animate:.2s;background:#03a9f4;border-radius:25px}input[type=range]::-ms-track{background:0 0;width:100%;height:4px;cursor:pointer;animate:.2s;background:0 0;border-color:transparent;color:transparent}input[type=range]::-ms-fill-lower{background:#03a9f4;border-radius:25px}input[type=range]::-ms-fill-upper{background:#03a9f4;border-radius:25px}input[type=range]::-webkit-slider-thumb{height:20px;width:20px;border-radius:50%;background:#fff;box-shadow:0 0 4px 0 #000;cursor:pointer;-webkit-appearance:none;margin-top:-8px}input[type=range]::-moz-range-thumb{height:20px;width:20px;border-radius:50%;background:#fff;box-shadow:0 0 4px 0 #000;cursor:pointer;border:none}input[type=range]::-ms-thumb{height:20px;width:20px;border-radius:50%;background:#fff;box-shadow:0 0 4px 0 #000;cursor:pointer;border:none}input[type=range]:focus::-webkit-slider-runnable-track{background:#03a9f4}input[type=range]:focus::-moz-range-track{background:#03a9f4}input[type=range]:focus::-ms-fill-lower{background:#03a9f4}input[type=range]:focus::-ms-fill-upper{background:#03a9f4}.range-wrap{display:flex;align-items:center}.slider-wrap{flex-grow:1;margin:0 15px;position:relative}.range-value{position:absolute;top:-50%}.range-value span{padding:0 3px 0 3px;height:19px;line-height:18px;text-align:center;background:#03a9f4;color:#fff;font-size:11px;display:block;position:absolute;left:50%;transform:translate(-50%,+80%);border-radius:6px}@-moz-document url-prefix(){.range-value span{transform:translate(-50%,+150%)}}.range-value span:before{content:\"\";position:absolute;width:0;height:0;border-top:10px solid #03a9f4;border-left:5px solid transparent;border-right:5px solid transparent;top:100%;left:50%;margin-left:-5px;margin-top:-1px;pointer-events:none}`]}};Y([b({type:String})],H.prototype,\"value\",2);Y([b({type:String})],H.prototype,\"min\",2);Y([b({type:String})],H.prototype,\"max\",2);Y([b({type:String})],H.prototype,\"step\",2);Y([b({type:String})],H.prototype,\"name\",2);H=Y([k(\"esp-range-slider\")],H);var _n=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,ge=(t,e,i,r)=>{for(var n=r>1?void 0:r?yn(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&_n(e,i,n),n};let V=class extends E{constructor(){super(...arguments),this.entityId=\"text-scheduleset\",this.days=[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],this.globalEnabled=!0,this.dayEnabled=Array(7).fill(!0),this.values=Array(7).fill(0)}connectedCallback(){super.connectedCallback(),this.unsubscribe=Q.subscribe(()=>{const t=Q.get(this.entityId);t&&(this.entity=t,this.setFromString(this.entity.value))})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),super.disconnectedCallback()}buildFlags(){let t=this.globalEnabled?1:0;return this.dayEnabled.forEach((e,i)=>{e&&(t|=1<<i+1)}),t}scheduleString(){return[this.buildFlags(),...this.values].join(\",\")}emit(){const t=this.scheduleString();console.log(t),this.entity&&(this.requestUpdate(),ui(this.entity,t))}setFromString(t){const e=t.split(\",\").map(r=>Number(r.trim()));if(e.length!==8||e.some(isNaN))return;const i=e[0];this.globalEnabled=(i&1)===1;for(let r=0;r<7;r++)this.dayEnabled[r]=(i>>r+1&1)===1,this.values[r]=this.clampValue(e[r+1]);this.requestUpdate()}clampValue(t){return isNaN(t)||t<0?0:t>143?143:t}valueToHM(t){return{h:Math.floor(t/6),m:t%6*10}}pad2(t){return String(t).padStart(2,\"0\")}roundMinute(t){return t=Math.round(t/10)*10,t<0?0:t>50?50:t}hmToValue(t,e){return t<0||t>23?null:(e=this.roundMinute(e),t*6+e/10)}adjustMinute(t,e){const{h:i,m:r}=this.valueToHM(this.values[t]);let n=r+e;n>50&&(n=50),n<0&&(n=0);const s=this.hmToValue(i,n);s!==null&&(this.values[t]=s,this.emit())}adjustHour(t,e){const{h:i,m:r}=this.valueToHM(this.values[t]);let n=i+e;n<0&&(n=23),n>23&&(n=0);const s=this.hmToValue(n,r);s!==null&&(this.values[t]=s,this.emit())}render(){return this.entity?h`<div class=\"row global\"><label>ESP Schedule</label><div class=\"switch ${this.globalEnabled?\" on\":\"\"}\" @click=\"${()=>{this.globalEnabled=!this.globalEnabled,this.emit()}}\"></div></div>${this.days.map((t,e)=>h`<div class=\"row ${!this.dayEnabled[e]||!this.globalEnabled?\" day-disabled\":\"\"}\"><div class=\"switch ${this.dayEnabled[e]?\" on\":\"\"}\" @click=\"${()=>{this.dayEnabled[e]=!this.dayEnabled[e],this.emit()}}\"></div><label>${t}</label><div class=\"time\"><div class=\"hour\"><button class=\"arrow\" @click=\"${()=>this.adjustHour(e,1)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\">▲</button> <input type=\"text\" inputmode=\"numeric\" maxlength=\"2\" readonly=\"readonly\" .value=\"${this.pad2(this.valueToHM(this.values[e]).h)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\" @blur=\"${i=>{let r=Number(i.target.value);isNaN(r)&&(r=0),r<0&&(r=0),r>23&&(r=23);const{m:n}=this.valueToHM(this.values[e]),s=this.hmToValue(r,n);s!==null&&(this.values[e]=s,i.target.value=this.pad2(r),this.emit())}}/\"> <button class=\"arrow\" @click=\"${()=>this.adjustHour(e,-1)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\">▼</button></div><span class=\"sep\">:</span><div class=\"minute\"><button class=\"arrow\" @click=\"${()=>this.adjustMinute(e,10)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\">▲</button> <input type=\"text\" inputmode=\"numeric\" maxlength=\"2\" readonly=\"readonly\" .value=\"${this.pad2(this.valueToHM(this.values[e]).m)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\" @blur=\"${i=>{let r=Number(i.target.value);isNaN(r)&&(r=0);const{h:n}=this.valueToHM(this.values[e]),s=this.hmToValue(n,r);if(s!==null){const{m:o}=this.valueToHM(s);this.values[e]=s,i.target.value=this.pad2(o),this.emit()}}}/\"> <button class=\"arrow\" @click=\"${()=>this.adjustMinute(e,-10)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\">▼</button></div></div></div>`)}`:h`<span>loading...</span>`}};V.styles=S`:host{display:block}.row{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:10px;padding:6px 0}.row.global{grid-template-columns:1fr auto;padding-bottom:10px;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:8px}label{font-size:.95rem;font-weight:700}.day-disabled label{opacity:.5}input[type=text]{background:#2b2b2b;color:#fff;border:1px solid #444;border-radius:8px;padding:6px 8px;font-size:.9rem;width:70px;text-align:center}input[type=text]:disabled{opacity:.4}.time{display:flex;align-items:center;gap:6px}.time input{width:36px;padding:6px 4px;text-align:center;font-size:.9rem}.hour,.minute{display:flex;flex-direction:column;align-items:center}.sep{opacity:.6}.arrow{border:none;background:0 0;color:#aaa;font-size:10px;line-height:10px;cursor:pointer}.arrow:hover{color:#6aa9ff}.arrow:disabled{opacity:.3;cursor:default}.switch{position:relative;width:44px;height:24px;border-radius:999px;background:#555;cursor:pointer;transition:background .2s ease}.switch::after{content:\"\";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .2s ease}.switch.on{background:#3b82f6}.switch.on::after{transform:translateX(20px)}`;ge([b({type:String})],V.prototype,\"entityId\",2);ge([x()],V.prototype,\"globalEnabled\",2);ge([x()],V.prototype,\"dayEnabled\",2);ge([x()],V.prototype,\"values\",2);V=ge([k(\"esp-schedule\")],V);var vn=Object.defineProperty,An=Object.getOwnPropertyDescriptor,X=(t,e,i,r)=>{for(var n=r>1?void 0:r?An(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&vn(e,i,n),n};let D=class extends E{constructor(){super(...arguments),this.value=\"\",this.query=\"\",this.filtered=[],this.selected=\"\",this.entityId=\"text-timezone\",this.zones={\"Africa/Abidjan\":\"GMT0\",\"Africa/Accra\":\"GMT0\",\"Africa/Addis_Ababa\":\"EAT-3\",\"Africa/Algiers\":\"CET-1\",\"Africa/Asmara\":\"EAT-3\",\"Africa/Bamako\":\"GMT0\",\"Africa/Bangui\":\"WAT-1\",\"Africa/Banjul\":\"GMT0\",\"Africa/Bissau\":\"GMT0\",\"Africa/Blantyre\":\"CAT-2\",\"Africa/Brazzaville\":\"WAT-1\",\"Africa/Bujumbura\":\"CAT-2\",\"Africa/Cairo\":\"EET-2EEST,M4.5.5/0,M10.5.4/24\",\"Africa/Casablanca\":\"<+01>-1\",\"Africa/Ceuta\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Africa/Conakry\":\"GMT0\",\"Africa/Dakar\":\"GMT0\",\"Africa/Dar_es_Salaam\":\"EAT-3\",\"Africa/Djibouti\":\"EAT-3\",\"Africa/Douala\":\"WAT-1\",\"Africa/El_Aaiun\":\"<+01>-1\",\"Africa/Freetown\":\"GMT0\",\"Africa/Gaborone\":\"CAT-2\",\"Africa/Harare\":\"CAT-2\",\"Africa/Johannesburg\":\"SAST-2\",\"Africa/Juba\":\"CAT-2\",\"Africa/Kampala\":\"EAT-3\",\"Africa/Khartoum\":\"CAT-2\",\"Africa/Kigali\":\"CAT-2\",\"Africa/Kinshasa\":\"WAT-1\",\"Africa/Lagos\":\"WAT-1\",\"Africa/Libreville\":\"WAT-1\",\"Africa/Lome\":\"GMT0\",\"Africa/Luanda\":\"WAT-1\",\"Africa/Lubumbashi\":\"CAT-2\",\"Africa/Lusaka\":\"CAT-2\",\"Africa/Malabo\":\"WAT-1\",\"Africa/Maputo\":\"CAT-2\",\"Africa/Maseru\":\"SAST-2\",\"Africa/Mbabane\":\"SAST-2\",\"Africa/Mogadishu\":\"EAT-3\",\"Africa/Monrovia\":\"GMT0\",\"Africa/Nairobi\":\"EAT-3\",\"Africa/Ndjamena\":\"WAT-1\",\"Africa/Niamey\":\"WAT-1\",\"Africa/Nouakchott\":\"GMT0\",\"Africa/Ouagadougou\":\"GMT0\",\"Africa/Porto-Novo\":\"WAT-1\",\"Africa/Sao_Tome\":\"GMT0\",\"Africa/Tripoli\":\"EET-2\",\"Africa/Tunis\":\"CET-1\",\"Africa/Windhoek\":\"CAT-2\",\"America/Adak\":\"HST10HDT,M3.2.0,M11.1.0\",\"America/Anchorage\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/Anguilla\":\"AST4\",\"America/Antigua\":\"AST4\",\"America/Araguaina\":\"<-03>3\",\"America/Argentina/Buenos_Aires\":\"<-03>3\",\"America/Argentina/Catamarca\":\"<-03>3\",\"America/Argentina/Cordoba\":\"<-03>3\",\"America/Argentina/Jujuy\":\"<-03>3\",\"America/Argentina/La_Rioja\":\"<-03>3\",\"America/Argentina/Mendoza\":\"<-03>3\",\"America/Argentina/Rio_Gallegos\":\"<-03>3\",\"America/Argentina/Salta\":\"<-03>3\",\"America/Argentina/San_Juan\":\"<-03>3\",\"America/Argentina/San_Luis\":\"<-03>3\",\"America/Argentina/Tucuman\":\"<-03>3\",\"America/Argentina/Ushuaia\":\"<-03>3\",\"America/Aruba\":\"AST4\",\"America/Asuncion\":\"<-03>3\",\"America/Atikokan\":\"EST5\",\"America/Bahia\":\"<-03>3\",\"America/Bahia_Banderas\":\"CST6\",\"America/Barbados\":\"AST4\",\"America/Belem\":\"<-03>3\",\"America/Belize\":\"CST6\",\"America/Blanc-Sablon\":\"AST4\",\"America/Boa_Vista\":\"<-04>4\",\"America/Bogota\":\"<-05>5\",\"America/Boise\":\"MST7MDT,M3.2.0,M11.1.0\",\"America/Cambridge_Bay\":\"MST7MDT,M3.2.0,M11.1.0\",\"America/Campo_Grande\":\"<-04>4\",\"America/Cancun\":\"EST5\",\"America/Caracas\":\"<-04>4\",\"America/Cayenne\":\"<-03>3\",\"America/Cayman\":\"EST5\",\"America/Chicago\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Chihuahua\":\"CST6\",\"America/Costa_Rica\":\"CST6\",\"America/Creston\":\"MST7\",\"America/Cuiaba\":\"<-04>4\",\"America/Curacao\":\"AST4\",\"America/Danmarkshavn\":\"GMT0\",\"America/Dawson\":\"MST7\",\"America/Dawson_Creek\":\"MST7\",\"America/Denver\":\"MST7MDT,M3.2.0,M11.1.0\",\"America/Detroit\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Dominica\":\"AST4\",\"America/Edmonton\":\"MST7MDT,M3.2.0,M11.1.0\",\"America/Eirunepe\":\"<-05>5\",\"America/El_Salvador\":\"CST6\",\"America/Fort_Nelson\":\"MST7\",\"America/Fortaleza\":\"<-03>3\",\"America/Glace_Bay\":\"AST4ADT,M3.2.0,M11.1.0\",\"America/Godthab\":\"<-02>2<-01>,M3.5.0/-1,M10.5.0/0\",\"America/Goose_Bay\":\"AST4ADT,M3.2.0,M11.1.0\",\"America/Grand_Turk\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Grenada\":\"AST4\",\"America/Guadeloupe\":\"AST4\",\"America/Guatemala\":\"CST6\",\"America/Guayaquil\":\"<-05>5\",\"America/Guyana\":\"<-04>4\",\"America/Halifax\":\"AST4ADT,M3.2.0,M11.1.0\",\"America/Havana\":\"CST5CDT,M3.2.0/0,M11.1.0/1\",\"America/Hermosillo\":\"MST7\",\"America/Indiana/Indianapolis\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Indiana/Knox\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Indiana/Marengo\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Indiana/Petersburg\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Indiana/Tell_City\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Indiana/Vevay\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Indiana/Vincennes\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Indiana/Winamac\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Inuvik\":\"MST7MDT,M3.2.0,M11.1.0\",\"America/Iqaluit\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Jamaica\":\"EST5\",\"America/Juneau\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/Kentucky/Louisville\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Kentucky/Monticello\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Kralendijk\":\"AST4\",\"America/La_Paz\":\"<-04>4\",\"America/Lima\":\"<-05>5\",\"America/Los_Angeles\":\"PST8PDT,M3.2.0,M11.1.0\",\"America/Lower_Princes\":\"AST4\",\"America/Maceio\":\"<-03>3\",\"America/Managua\":\"CST6\",\"America/Manaus\":\"<-04>4\",\"America/Marigot\":\"AST4\",\"America/Martinique\":\"AST4\",\"America/Matamoros\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Mazatlan\":\"MST7\",\"America/Menominee\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Merida\":\"CST6\",\"America/Metlakatla\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/Mexico_City\":\"CST6\",\"America/Miquelon\":\"<-03>3<-02>,M3.2.0,M11.1.0\",\"America/Moncton\":\"AST4ADT,M3.2.0,M11.1.0\",\"America/Monterrey\":\"CST6\",\"America/Montevideo\":\"<-03>3\",\"America/Montreal\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Montserrat\":\"AST4\",\"America/Nassau\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/New_York\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Nipigon\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Nome\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/Noronha\":\"<-02>2\",\"America/North_Dakota/Beulah\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/North_Dakota/Center\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/North_Dakota/New_Salem\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Nuuk\":\"<-02>2<-01>,M3.5.0/-1,M10.5.0/0\",\"America/Ojinaga\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Panama\":\"EST5\",\"America/Pangnirtung\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Paramaribo\":\"<-03>3\",\"America/Phoenix\":\"MST7\",\"America/Port-au-Prince\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Port_of_Spain\":\"AST4\",\"America/Porto_Velho\":\"<-04>4\",\"America/Puerto_Rico\":\"AST4\",\"America/Punta_Arenas\":\"<-03>3\",\"America/Rainy_River\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Rankin_Inlet\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Recife\":\"<-03>3\",\"America/Regina\":\"CST6\",\"America/Resolute\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Rio_Branco\":\"<-05>5\",\"America/Santarem\":\"<-03>3\",\"America/Santiago\":\"<-04>4<-03>,M9.1.6/24,M4.1.6/24\",\"America/Santo_Domingo\":\"AST4\",\"America/Sao_Paulo\":\"<-03>3\",\"America/Scoresbysund\":\"<-02>2<-01>,M3.5.0/-1,M10.5.0/0\",\"America/Sitka\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/St_Barthelemy\":\"AST4\",\"America/St_Johns\":\"NST3:30NDT,M3.2.0,M11.1.0\",\"America/St_Kitts\":\"AST4\",\"America/St_Lucia\":\"AST4\",\"America/St_Thomas\":\"AST4\",\"America/St_Vincent\":\"AST4\",\"America/Swift_Current\":\"CST6\",\"America/Tegucigalpa\":\"CST6\",\"America/Thule\":\"AST4ADT,M3.2.0,M11.1.0\",\"America/Thunder_Bay\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Tijuana\":\"PST8PDT,M3.2.0,M11.1.0\",\"America/Toronto\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Tortola\":\"AST4\",\"America/Vancouver\":\"PST8PDT,M3.2.0,M11.1.0\",\"America/Whitehorse\":\"MST7\",\"America/Winnipeg\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Yakutat\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/Yellowknife\":\"MST7MDT,M3.2.0,M11.1.0\",\"Antarctica/Casey\":\"<+08>-8\",\"Antarctica/Davis\":\"<+07>-7\",\"Antarctica/DumontDUrville\":\"<+10>-10\",\"Antarctica/Macquarie\":\"AEST-10AEDT,M10.1.0,M4.1.0/3\",\"Antarctica/Mawson\":\"<+05>-5\",\"Antarctica/McMurdo\":\"NZST-12NZDT,M9.5.0,M4.1.0/3\",\"Antarctica/Palmer\":\"<-03>3\",\"Antarctica/Rothera\":\"<-03>3\",\"Antarctica/Syowa\":\"<+03>-3\",\"Antarctica/Troll\":\"<+00>0<+02>-2,M3.5.0/1,M10.5.0/3\",\"Antarctica/Vostok\":\"<+05>-5\",\"Arctic/Longyearbyen\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Asia/Aden\":\"<+03>-3\",\"Asia/Almaty\":\"<+05>-5\",\"Asia/Amman\":\"<+03>-3\",\"Asia/Anadyr\":\"<+12>-12\",\"Asia/Aqtau\":\"<+05>-5\",\"Asia/Aqtobe\":\"<+05>-5\",\"Asia/Ashgabat\":\"<+05>-5\",\"Asia/Atyrau\":\"<+05>-5\",\"Asia/Baghdad\":\"<+03>-3\",\"Asia/Bahrain\":\"<+03>-3\",\"Asia/Baku\":\"<+04>-4\",\"Asia/Bangkok\":\"<+07>-7\",\"Asia/Barnaul\":\"<+07>-7\",\"Asia/Beirut\":\"EET-2EEST,M3.5.0/0,M10.5.0/0\",\"Asia/Bishkek\":\"<+06>-6\",\"Asia/Brunei\":\"<+08>-8\",\"Asia/Chita\":\"<+09>-9\",\"Asia/Choibalsan\":\"<+08>-8\",\"Asia/Colombo\":\"<+0530>-5:30\",\"Asia/Damascus\":\"<+03>-3\",\"Asia/Dhaka\":\"<+06>-6\",\"Asia/Dili\":\"<+09>-9\",\"Asia/Dubai\":\"<+04>-4\",\"Asia/Dushanbe\":\"<+05>-5\",\"Asia/Famagusta\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Asia/Gaza\":\"EET-2EEST,M3.4.4/50,M10.4.4/50\",\"Asia/Hebron\":\"EET-2EEST,M3.4.4/50,M10.4.4/50\",\"Asia/Ho_Chi_Minh\":\"<+07>-7\",\"Asia/Hong_Kong\":\"HKT-8\",\"Asia/Hovd\":\"<+07>-7\",\"Asia/Irkutsk\":\"<+08>-8\",\"Asia/Jakarta\":\"WIB-7\",\"Asia/Jayapura\":\"WIT-9\",\"Asia/Jerusalem\":\"IST-2IDT,M3.4.4/26,M10.5.0\",\"Asia/Kabul\":\"<+0430>-4:30\",\"Asia/Kamchatka\":\"<+12>-12\",\"Asia/Karachi\":\"PKT-5\",\"Asia/Kathmandu\":\"<+0545>-5:45\",\"Asia/Khandyga\":\"<+09>-9\",\"Asia/Kolkata\":\"IST-5:30\",\"Asia/Krasnoyarsk\":\"<+07>-7\",\"Asia/Kuala_Lumpur\":\"<+08>-8\",\"Asia/Kuching\":\"<+08>-8\",\"Asia/Kuwait\":\"<+03>-3\",\"Asia/Macau\":\"CST-8\",\"Asia/Magadan\":\"<+11>-11\",\"Asia/Makassar\":\"WITA-8\",\"Asia/Manila\":\"PST-8\",\"Asia/Muscat\":\"<+04>-4\",\"Asia/Nicosia\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Asia/Novokuznetsk\":\"<+07>-7\",\"Asia/Novosibirsk\":\"<+07>-7\",\"Asia/Omsk\":\"<+06>-6\",\"Asia/Oral\":\"<+05>-5\",\"Asia/Phnom_Penh\":\"<+07>-7\",\"Asia/Pontianak\":\"WIB-7\",\"Asia/Pyongyang\":\"KST-9\",\"Asia/Qatar\":\"<+03>-3\",\"Asia/Qyzylorda\":\"<+05>-5\",\"Asia/Riyadh\":\"<+03>-3\",\"Asia/Sakhalin\":\"<+11>-11\",\"Asia/Samarkand\":\"<+05>-5\",\"Asia/Seoul\":\"KST-9\",\"Asia/Shanghai\":\"CST-8\",\"Asia/Singapore\":\"<+08>-8\",\"Asia/Srednekolymsk\":\"<+11>-11\",\"Asia/Taipei\":\"CST-8\",\"Asia/Tashkent\":\"<+05>-5\",\"Asia/Tbilisi\":\"<+04>-4\",\"Asia/Tehran\":\"<+0330>-3:30\",\"Asia/Thimphu\":\"<+06>-6\",\"Asia/Tokyo\":\"JST-9\",\"Asia/Tomsk\":\"<+07>-7\",\"Asia/Ulaanbaatar\":\"<+08>-8\",\"Asia/Urumqi\":\"<+06>-6\",\"Asia/Ust-Nera\":\"<+10>-10\",\"Asia/Vientiane\":\"<+07>-7\",\"Asia/Vladivostok\":\"<+10>-10\",\"Asia/Yakutsk\":\"<+09>-9\",\"Asia/Yangon\":\"<+0630>-6:30\",\"Asia/Yekaterinburg\":\"<+05>-5\",\"Asia/Yerevan\":\"<+04>-4\",\"Atlantic/Azores\":\"<-01>1<+00>,M3.5.0/0,M10.5.0/1\",\"Atlantic/Bermuda\":\"AST4ADT,M3.2.0,M11.1.0\",\"Atlantic/Canary\":\"WET0WEST,M3.5.0/1,M10.5.0\",\"Atlantic/Cape_Verde\":\"<-01>1\",\"Atlantic/Faroe\":\"WET0WEST,M3.5.0/1,M10.5.0\",\"Atlantic/Madeira\":\"WET0WEST,M3.5.0/1,M10.5.0\",\"Atlantic/Reykjavik\":\"GMT0\",\"Atlantic/South_Georgia\":\"<-02>2\",\"Atlantic/St_Helena\":\"GMT0\",\"Atlantic/Stanley\":\"<-03>3\",\"Australia/Adelaide\":\"ACST-9:30ACDT,M10.1.0,M4.1.0/3\",\"Australia/Brisbane\":\"AEST-10\",\"Australia/Broken_Hill\":\"ACST-9:30ACDT,M10.1.0,M4.1.0/3\",\"Australia/Currie\":\"AEST-10AEDT,M10.1.0,M4.1.0/3\",\"Australia/Darwin\":\"ACST-9:30\",\"Australia/Eucla\":\"<+0845>-8:45\",\"Australia/Hobart\":\"AEST-10AEDT,M10.1.0,M4.1.0/3\",\"Australia/Lindeman\":\"AEST-10\",\"Australia/Lord_Howe\":\"<+1030>-10:30<+11>-11,M10.1.0,M4.1.0\",\"Australia/Melbourne\":\"AEST-10AEDT,M10.1.0,M4.1.0/3\",\"Australia/Perth\":\"AWST-8\",\"Australia/Sydney\":\"AEST-10AEDT,M10.1.0,M4.1.0/3\",\"Etc/GMT\":\"GMT0\",\"Etc/GMT+0\":\"GMT0\",\"Etc/GMT+1\":\"<-01>1\",\"Etc/GMT+10\":\"<-10>10\",\"Etc/GMT+11\":\"<-11>11\",\"Etc/GMT+12\":\"<-12>12\",\"Etc/GMT+2\":\"<-02>2\",\"Etc/GMT+3\":\"<-03>3\",\"Etc/GMT+4\":\"<-04>4\",\"Etc/GMT+5\":\"<-05>5\",\"Etc/GMT+6\":\"<-06>6\",\"Etc/GMT+7\":\"<-07>7\",\"Etc/GMT+8\":\"<-08>8\",\"Etc/GMT+9\":\"<-09>9\",\"Etc/GMT-0\":\"GMT0\",\"Etc/GMT-1\":\"<+01>-1\",\"Etc/GMT-10\":\"<+10>-10\",\"Etc/GMT-11\":\"<+11>-11\",\"Etc/GMT-12\":\"<+12>-12\",\"Etc/GMT-13\":\"<+13>-13\",\"Etc/GMT-14\":\"<+14>-14\",\"Etc/GMT-2\":\"<+02>-2\",\"Etc/GMT-3\":\"<+03>-3\",\"Etc/GMT-4\":\"<+04>-4\",\"Etc/GMT-5\":\"<+05>-5\",\"Etc/GMT-6\":\"<+06>-6\",\"Etc/GMT-7\":\"<+07>-7\",\"Etc/GMT-8\":\"<+08>-8\",\"Etc/GMT-9\":\"<+09>-9\",\"Etc/GMT0\":\"GMT0\",\"Etc/Greenwich\":\"GMT0\",\"Etc/UCT\":\"UTC0\",\"Etc/UTC\":\"UTC0\",\"Etc/Universal\":\"UTC0\",\"Etc/Zulu\":\"UTC0\",\"Europe/Amsterdam\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Andorra\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Astrakhan\":\"<+04>-4\",\"Europe/Athens\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Belgrade\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Berlin\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Bratislava\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Brussels\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Bucharest\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Budapest\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Busingen\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Chisinau\":\"EET-2EEST,M3.5.0,M10.5.0/3\",\"Europe/Copenhagen\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Dublin\":\"IST-1GMT0,M10.5.0,M3.5.0/1\",\"Europe/Gibraltar\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Guernsey\":\"GMT0BST,M3.5.0/1,M10.5.0\",\"Europe/Helsinki\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Isle_of_Man\":\"GMT0BST,M3.5.0/1,M10.5.0\",\"Europe/Istanbul\":\"<+03>-3\",\"Europe/Jersey\":\"GMT0BST,M3.5.0/1,M10.5.0\",\"Europe/Kaliningrad\":\"EET-2\",\"Europe/Kiev\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Kirov\":\"MSK-3\",\"Europe/Lisbon\":\"WET0WEST,M3.5.0/1,M10.5.0\",\"Europe/Ljubljana\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/London\":\"GMT0BST,M3.5.0/1,M10.5.0\",\"Europe/Luxembourg\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Madrid\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Malta\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Mariehamn\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Minsk\":\"<+03>-3\",\"Europe/Monaco\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Moscow\":\"MSK-3\",\"Europe/Oslo\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Paris\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Podgorica\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Prague\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Riga\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Rome\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Samara\":\"<+04>-4\",\"Europe/San_Marino\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Sarajevo\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Saratov\":\"<+04>-4\",\"Europe/Simferopol\":\"MSK-3\",\"Europe/Skopje\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Sofia\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Stockholm\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Tallinn\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Tirane\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Ulyanovsk\":\"<+04>-4\",\"Europe/Uzhgorod\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Vaduz\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Vatican\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Vienna\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Vilnius\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Volgograd\":\"MSK-3\",\"Europe/Warsaw\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Zagreb\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Zaporozhye\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Zurich\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Indian/Antananarivo\":\"EAT-3\",\"Indian/Chagos\":\"<+06>-6\",\"Indian/Christmas\":\"<+07>-7\",\"Indian/Cocos\":\"<+0630>-6:30\",\"Indian/Comoro\":\"EAT-3\",\"Indian/Kerguelen\":\"<+05>-5\",\"Indian/Mahe\":\"<+04>-4\",\"Indian/Maldives\":\"<+05>-5\",\"Indian/Mauritius\":\"<+04>-4\",\"Indian/Mayotte\":\"EAT-3\",\"Indian/Reunion\":\"<+04>-4\",\"Pacific/Apia\":\"<+13>-13\",\"Pacific/Auckland\":\"NZST-12NZDT,M9.5.0,M4.1.0/3\",\"Pacific/Bougainville\":\"<+11>-11\",\"Pacific/Chatham\":\"<+1245>-12:45<+1345>,M9.5.0/2:45,M4.1.0/3:45\",\"Pacific/Chuuk\":\"<+10>-10\",\"Pacific/Easter\":\"<-06>6<-05>,M9.1.6/22,M4.1.6/22\",\"Pacific/Efate\":\"<+11>-11\",\"Pacific/Enderbury\":\"<+13>-13\",\"Pacific/Fakaofo\":\"<+13>-13\",\"Pacific/Fiji\":\"<+12>-12\",\"Pacific/Funafuti\":\"<+12>-12\",\"Pacific/Galapagos\":\"<-06>6\",\"Pacific/Gambier\":\"<-09>9\",\"Pacific/Guadalcanal\":\"<+11>-11\",\"Pacific/Guam\":\"ChST-10\",\"Pacific/Honolulu\":\"HST10\",\"Pacific/Kiritimati\":\"<+14>-14\",\"Pacific/Kosrae\":\"<+11>-11\",\"Pacific/Kwajalein\":\"<+12>-12\",\"Pacific/Majuro\":\"<+12>-12\",\"Pacific/Marquesas\":\"<-0930>9:30\",\"Pacific/Midway\":\"SST11\",\"Pacific/Nauru\":\"<+12>-12\",\"Pacific/Niue\":\"<-11>11\",\"Pacific/Norfolk\":\"<+11>-11<+12>,M10.1.0,M4.1.0/3\",\"Pacific/Noumea\":\"<+11>-11\",\"Pacific/Pago_Pago\":\"SST11\",\"Pacific/Palau\":\"<+09>-9\",\"Pacific/Pitcairn\":\"<-08>8\",\"Pacific/Pohnpei\":\"<+11>-11\",\"Pacific/Port_Moresby\":\"<+10>-10\",\"Pacific/Rarotonga\":\"<-10>10\",\"Pacific/Saipan\":\"ChST-10\",\"Pacific/Tahiti\":\"<-10>10\",\"Pacific/Tarawa\":\"<+12>-12\",\"Pacific/Tongatapu\":\"<+13>-13\",\"Pacific/Wake\":\"<+12>-12\",\"Pacific/Wallis\":\"<+12>-12\"}}connectedCallback(){super.connectedCallback(),this.unsubscribe=Q.subscribe(t=>{t.unique_id===this.entityId&&(this.entity=t,this.requestUpdate())})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),super.disconnectedCallback()}firstUpdated(){this.filtered=Object.keys(this.zones),this.value&&this.select(this.value)}updated(){this.value&&this.value!==this.selected&&this.select(this.value)}filter(){const t=this.query.toLowerCase();this.filtered=Object.keys(this.zones).filter(e=>e.toLowerCase().includes(t))}select(t){this.selected=t,this.query=t,this.dispatchEvent(new CustomEvent(\"timezone-changed\",{detail:t})),this.entity&&ui(this.entity,this.zones[t])}render(){return this.entity?h`<span>In case the \"NBS Time\" is not the correct timezone, select your timezone here.</span><div class=\"wrap\"><input type=\"text\" .value=\"${this.query}\" @input=\"${t=>{this.query=t.target.value,this.filter()}}\" placeholder=\"Type to search timezones…\"><div class=\"list\">${this.filtered.slice(0,50).map(t=>h`<div class=\"item ${t===this.selected?\"sel\":\"\"}\" @click=\"${()=>this.select(t)}\"><span>${t}</span> <span class=\"code\">${this.zones[t]}</span></div>`)}</div></div>`:h`loading...`}};D.styles=S`.wrap{margin-top:1rem;display:flex;flex-direction:column;gap:8px}input{padding:10px;border-radius:8px;border:1px solid #444}.list{max-height:240px;overflow:auto;border:1px solid #444;border-radius:8px}.item{display:flex;justify-content:space-between;padding:8px;cursor:pointer}.item:hover{background:rgba(127,127,127,.7)}.item.sel{background:rgba(82,82,82,.7)}.code{opacity:.6;font-size:.8rem}`;X([b({type:String})],D.prototype,\"value\",2);X([x()],D.prototype,\"query\",2);X([x()],D.prototype,\"filtered\",2);X([x()],D.prototype,\"selected\",2);X([b({type:String})],D.prototype,\"entityId\",2);D=X([k(\"timezone-selector\")],D);const w={house_clean:\"button-house_clean\",spot_clean:\"button-spot_clean\",spot_clean__height___width_:\"button-spot_clean__height___width_\",stop_cleaning:\"button-stop_cleaning\",pause_cleaning:\"button-pause_cleaning\",resume_cleaning:\"button-resume_cleaning\",locate_robot:\"button-locate_robot\",update_status:\"button-update_status\",clear_errors:\"button-clear_errors\",shutdown:\"button-shutdown\",powercycle:\"button-powercycle\",reboot_esp:\"button-reboot_esp\"},v={...w,send_to_base:\"button-send_to_base\",start_manual_cleaning:\"button-start_manual_cleaning\",manual_drive_forward_up:\"button-manual_drive_forward_up\",manual_drive_backwards_up:\"button-manual_drive_backwards_up\",manual_drive_turn_left_up:\"button-manual_drive_turn_left_up\",manual_drive_turn_right_up:\"button-manual_drive_turn_right_up\",manual_drive_arc_left_up:\"button-manual_drive_arc_left_up\",manual_drive_arc_right_up:\"button-manual_drive_arc_right_up\",manual_drive_forward_down:\"button-manual_drive_forward_down\",manual_drive_backwards_down:\"button-manual_drive_backwards_down\",manual_drive_turn_left_down:\"button-manual_drive_turn_left_down\",manual_drive_turn_right_down:\"button-manual_drive_turn_right_down\",manual_drive_arc_left_down:\"button-manual_drive_arc_left_down\",manual_drive_arc_right_down:\"button-manual_drive_arc_right_down\",manual_drive_button_timeout:\"button-manual_drive_button_timeout\"},Tn={...w,send_to_start:\"button-send_to_start\"},fi={logger:\"select-logger_select\"},wn={...fi,navigation_mode:\"select-navigation_mode\"},Te={usb_connected:\"binary_sensor-usb_connected\",battery_over_temp:\"binary_sensor-battery_over_temp\",charging_active:\"binary_sensor-charging_active\",charging_enabled:\"binary_sensor-charging_enabled\",confident_on_fuel:\"binary_sensor-confident_on_fuel\",on_reserved_fuel:\"binary_sensor-on_reserved_fuel\",empty_fuel:\"binary_sensor-empty_fuel\",battery_failure:\"binary_sensor-battery_failure\",ext_power_present:\"binary_sensor-ext_power_present\",thermistor_present:\"binary_sensor-thermistor_present\"},ie={fuel_percent:\"sensor-fuel_percent\",battery_temp_c_avg:\"sensor-battery_temp_c_avg\",battery_voltage_v:\"sensor-battery_voltage_v\",external_voltage_v:\"sensor-external_voltage_v\",charger_mah:\"sensor-charger_mah\",discharge_mah:\"sensor-discharge_mah\",filter_change_time:\"sensor-filter_change_time\",brush_change_time:\"sensor-brush_change_time\",dirt_bin_alert_reminder:\"sensor-dirt_bin_alert_reminder\",current_dirt_bin_runtime:\"sensor-current_dirt_bin_runtime\",number_of_full_dust_bin_cleanings:\"sensor-number_of_full_dust_bin_cleanings\",battery_cycles:\"sensor-battery_cycles\",last_cleaning_duration:\"sensor-last_cleaning_duration\"},Lt={spot_clean_width:\"number-spot_clean_width\",spot_clean_height:\"number-spot_clean_height\"},Nt={timezone:\"text-timezone\",schedule:\"text-scheduleset\"},$={test_mode:\"switch-test_mode\",play_extra_sounds:\"switch-play_extra_sounds\",click_sounds:\"switch-click_sounds\",led:\"switch-led\",wall_enable:\"switch-wall_enable\",eco_mode:\"switch-eco_mode\",intenseclean:\"switch-intenseclean\",wifi:\"switch-wifi\",melody_sounds:\"switch-melody_sounds\",warning_sounds:\"switch-warning_sounds\",bin_full_detect:\"switch-bin_full_detect\"},We={...$,stealthled:\"switch-stealthled\",autoshutdown:\"switch-autoshutdown\",robot_schedule:\"switch-robot_schedule\"},C={last_cleaning_time:\"text_sensor-last_cleaning_time\",last_cleaning_type:\"text_sensor-last_cleaning_type\",robot_error:\"text_sensor-robot_error\",robot_alert:\"text_sensor-robot_alert\",serial_number:\"text_sensor-serial_number\",model:\"text_sensor-model\",software:\"text_sensor-software\",ui_state:\"text_sensor-ui_state\",nbs_time:\"text_sensor-nbs_time\"};var En=Object.defineProperty,Mn=Object.getOwnPropertyDescriptor,$n=(t,e,i,r)=>{for(var n=r>1?void 0:r?Mn(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&En(e,i,n),n};let it=class extends E{render(){return h`<div class=\"manual-driving\"><span class=\"helper\">You need to turn manual cleaning on by pressing \"Start\", once the vacuum is in manual cleaning mode you can hold down the different actions! Timeout will stop the current action.</span><div style=\"display:flex;gap:1rem;flex-direction:column\"><div style=\"display:flex;gap:1rem\"><custom-button name=\"Arc Left\" press=\"${v.manual_drive_arc_left_down}\" release=\"${v.manual_drive_arc_left_up}\"></custom-button><custom-button name=\"Forward\" press=\"${v.manual_drive_forward_down}\" release=\"${v.manual_drive_forward_up}\"></custom-button><custom-button name=\"Arc Right\" press=\"${v.manual_drive_arc_right_down}\" release=\"${v.manual_drive_arc_right_up}\"></custom-button></div><div style=\"display:flex;gap:1rem\"><custom-button name=\"Left\" press=\"${v.manual_drive_turn_left_down}\" release=\"${v.manual_drive_turn_left_up}\"></custom-button><custom-button name=\"Timeout\" click=\"${v.manual_drive_button_timeout}\"></custom-button><custom-button name=\"Right\" press=\"${v.manual_drive_turn_right_down}\" release=\"${v.manual_drive_turn_right_up}\"></custom-button></div><div style=\"display:flex;gap:1rem\"><custom-button name=\"Start\" click=\"${v.start_manual_cleaning}\"></custom-button><custom-button name=\"Backward\" press=\"${v.manual_drive_backwards_down}\" release=\"${v.manual_drive_backwards_up}\"></custom-button><custom-button name=\"Stop\" click=\"${v.stop_cleaning}\"></custom-button></div></div></div>`}};it.styles=S`.manual-driving{display:flex;justify-content:center;align-items:center;flex-direction:column}.manual-driving span{width:75%;padding:1rem;margin:1.5rem 0;background-color:rgba(127,127,127,.3);border-radius:.5rem}`;it=$n([k(\"manual-driving\")],it);const mi=Object.freeze({left:0,top:0,width:16,height:16}),ke=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),be=Object.freeze({...mi,...ke}),nt=Object.freeze({...be,body:\"\",hidden:!1}),Sn=Object.freeze({width:null,height:null}),gi=Object.freeze({...Sn,...ke});function xn(t,e=0){const i=t.replace(/^-?[0-9.]*/,\"\");function r(n){for(;n<0;)n+=4;return n%4}if(i===\"\"){const n=parseInt(t);return isNaN(n)?0:r(n)}else if(i!==t){let n=0;switch(i){case\"%\":n=25;break;case\"deg\":n=90}if(n){let s=parseFloat(t.slice(0,t.length-i.length));return isNaN(s)?0:(s=s/n,s%1===0?r(s):0)}}return e}const Cn=/[\\s,]+/;function kn(t,e){e.split(Cn).forEach(i=>{switch(i.trim()){case\"horizontal\":t.hFlip=!0;break;case\"vertical\":t.vFlip=!0;break}})}const bi={...gi,preserveAspectRatio:\"\"};function jt(t){const e={...bi},i=(r,n)=>t.getAttribute(r)||n;return e.width=i(\"width\",null),e.height=i(\"height\",null),e.rotate=xn(i(\"rotate\",\"\")),kn(e,i(\"flip\",\"\")),e.preserveAspectRatio=i(\"preserveAspectRatio\",i(\"preserveaspectratio\",\"\")),e}function Pn(t,e){for(const i in bi)if(t[i]!==e[i])return!0;return!1}const re=/^[a-z0-9]+(-[a-z0-9]+)*$/,_e=(t,e,i,r=\"\")=>{const n=t.split(\":\");if(t.slice(0,1)===\"@\"){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),a=n.pop(),l={provider:n.length>0?n[0]:r,prefix:a,name:c};return e&&!$e(l)?null:l}const s=n[0],o=s.split(\"-\");if(o.length>1){const c={provider:r,prefix:o.shift(),name:o.join(\"-\")};return e&&!$e(c)?null:c}if(i&&r===\"\"){const c={provider:r,prefix:\"\",name:s};return e&&!$e(c,i)?null:c}return null},$e=(t,e)=>t?!!((t.provider===\"\"||t.provider.match(re))&&(e&&t.prefix===\"\"||t.prefix.match(re))&&t.name.match(re)):!1;function In(t,e){const i={};!t.hFlip!=!e.hFlip&&(i.hFlip=!0),!t.vFlip!=!e.vFlip&&(i.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(i.rotate=r),i}function Bt(t,e){const i=In(t,e);for(const r in nt)r in ke?r in t&&!(r in i)&&(i[r]=ke[r]):r in e?i[r]=e[r]:r in t&&(i[r]=t[r]);return i}function Dn(t,e){const i=t.icons,r=t.aliases||Object.create(null),n=Object.create(null);function s(o){if(i[o])return n[o]=[];if(!(o in n)){n[o]=null;const c=r[o]&&r[o].parent,a=c&&s(c);a&&(n[o]=[c].concat(a))}return n[o]}return(e||Object.keys(i).concat(Object.keys(r))).forEach(s),n}function On(t,e,i){const r=t.icons,n=t.aliases||Object.create(null);let s={};function o(c){s=Bt(r[c]||n[c],s)}return o(e),i.forEach(o),Bt(t,s)}function _i(t,e){const i=[];if(typeof t!=\"object\"||typeof t.icons!=\"object\")return i;t.not_found instanceof Array&&t.not_found.forEach(n=>{e(n,null),i.push(n)});const r=Dn(t);for(const n in r){const s=r[n];s&&(e(n,On(t,n,s)),i.push(n))}return i}const Ln={provider:\"\",aliases:{},not_found:{},...mi};function Je(t,e){for(const i in e)if(i in t&&typeof t[i]!=typeof e[i])return!1;return!0}function yi(t){if(typeof t!=\"object\"||t===null)return null;const e=t;if(typeof e.prefix!=\"string\"||!t.icons||typeof t.icons!=\"object\"||!Je(t,Ln))return null;const i=e.icons;for(const n in i){const s=i[n];if(!n.match(re)||typeof s.body!=\"string\"||!Je(s,nt))return null}const r=e.aliases||Object.create(null);for(const n in r){const s=r[n],o=s.parent;if(!n.match(re)||typeof o!=\"string\"||!i[o]&&!r[o]||!Je(s,nt))return null}return e}const Pe=Object.create(null);function Nn(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function O(t,e){const i=Pe[t]||(Pe[t]=Object.create(null));return i[e]||(i[e]=Nn(t,e))}function ft(t,e){return yi(e)?_i(e,(i,r)=>{r?t.icons[i]=r:t.missing.add(i)}):[]}function jn(t,e,i){try{if(typeof i.body==\"string\")return t.icons[e]={...i},!0}catch{}return!1}function Bn(t,e){let i=[];return(typeof t==\"string\"?[t]:Object.keys(Pe)).forEach(n=>{(typeof n==\"string\"&&typeof e==\"string\"?[e]:Object.keys(Pe[n]||{})).forEach(o=>{const c=O(n,o);i=i.concat(Object.keys(c.icons).map(a=>(n!==\"\"?\"@\"+n+\":\":\"\")+o+\":\"+a))})}),i}let de=!1;function vi(t){return typeof t==\"boolean\"&&(de=t),de}function he(t){const e=typeof t==\"string\"?_e(t,!0,de):t;if(e){const i=O(e.provider,e.prefix),r=e.name;return i.icons[r]||(i.missing.has(r)?null:void 0)}}function Ai(t,e){const i=_e(t,!0,de);if(!i)return!1;const r=O(i.provider,i.prefix);return jn(r,i.name,e)}function Rt(t,e){if(typeof t!=\"object\")return!1;if(typeof e!=\"string\"&&(e=t.provider||\"\"),de&&!e&&!t.prefix){let n=!1;return yi(t)&&(t.prefix=\"\",_i(t,(s,o)=>{o&&Ai(s,o)&&(n=!0)})),n}const i=t.prefix;if(!$e({provider:e,prefix:i,name:\"a\"}))return!1;const r=O(e,i);return!!ft(r,t)}function Rn(t){return!!he(t)}function Un(t){const e=he(t);return e?{...be,...e}:null}function Gn(t){const e={loaded:[],missing:[],pending:[]},i=Object.create(null);t.sort((n,s)=>n.provider!==s.provider?n.provider.localeCompare(s.provider):n.prefix!==s.prefix?n.prefix.localeCompare(s.prefix):n.name.localeCompare(s.name));let r={provider:\"\",prefix:\"\",name:\"\"};return t.forEach(n=>{if(r.name===n.name&&r.prefix===n.prefix&&r.provider===n.provider)return;r=n;const s=n.provider,o=n.prefix,c=n.name,a=i[s]||(i[s]=Object.create(null)),l=a[o]||(a[o]=O(s,o));let u;c in l.icons?u=e.loaded:o===\"\"||l.missing.has(c)?u=e.missing:u=e.pending;const d={provider:s,prefix:o,name:c};u.push(d)}),e}function Ti(t,e){t.forEach(i=>{const r=i.loaderCallbacks;r&&(i.loaderCallbacks=r.filter(n=>n.id!==e))})}function Hn(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let i=!1;const r=t.provider,n=t.prefix;e.forEach(s=>{const o=s.icons,c=o.pending.length;o.pending=o.pending.filter(a=>{if(a.prefix!==n)return!0;const l=a.name;if(t.icons[l])o.loaded.push({provider:r,prefix:n,name:l});else if(t.missing.has(l))o.missing.push({provider:r,prefix:n,name:l});else return i=!0,!0;return!1}),o.pending.length!==c&&(i||Ti([t],s.id),s.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),s.abort))})}))}let Vn=0;function qn(t,e,i){const r=Vn++,n=Ti.bind(null,i,r);if(!e.pending.length)return n;const s={id:r,icons:e,callback:t,abort:n};return i.forEach(o=>{(o.loaderCallbacks||(o.loaderCallbacks=[])).push(s)}),n}const rt=Object.create(null);function Ut(t,e){rt[t]=e}function st(t){return rt[t]||rt[\"\"]}function zn(t,e=!0,i=!1){const r=[];return t.forEach(n=>{const s=typeof n==\"string\"?_e(n,e,i):n;s&&r.push(s)}),r}var Fn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Kn(t,e,i,r){const n=t.resources.length,s=t.random?Math.floor(Math.random()*n):t.index;let o;if(t.random){let m=t.resources.slice(0);for(o=[];m.length>1;){const M=Math.floor(Math.random()*m.length);o.push(m[M]),m=m.slice(0,M).concat(m.slice(M+1))}o=o.concat(m)}else o=t.resources.slice(s).concat(t.resources.slice(0,s));const c=Date.now();let a=\"pending\",l=0,u,d=null,p=[],f=[];typeof r==\"function\"&&f.push(r);function y(){d&&(clearTimeout(d),d=null)}function _(){a===\"pending\"&&(a=\"aborted\"),y(),p.forEach(m=>{m.status===\"pending\"&&(m.status=\"aborted\")}),p=[]}function Be(m,M){M&&(f=[]),typeof m==\"function\"&&f.push(m)}function ye(){return{startTime:c,payload:e,status:a,queriesSent:l,queriesPending:p.length,subscribe:Be,abort:_}}function A(){a=\"failed\",f.forEach(m=>{m(void 0,u)})}function T(){p.forEach(m=>{m.status===\"pending\"&&(m.status=\"aborted\")}),p=[]}function ji(m,M,ee){const ve=M!==\"success\";switch(p=p.filter(N=>N!==m),a){case\"pending\":break;case\"failed\":if(ve||!t.dataAfterTimeout)return;break;default:return}if(M===\"abort\"){u=ee,A();return}if(ve){u=ee,p.length||(o.length?Re():A());return}if(y(),T(),!t.random){const N=t.resources.indexOf(m.resource);N!==-1&&N!==t.index&&(t.index=N)}a=\"completed\",f.forEach(N=>{N(ee)})}function Re(){if(a!==\"pending\")return;y();const m=o.shift();if(m===void 0){if(p.length){d=setTimeout(()=>{y(),a===\"pending\"&&(T(),A())},t.timeout);return}A();return}const M={status:\"pending\",resource:m,callback:(ee,ve)=>{ji(M,ee,ve)}};p.push(M),l++,d=setTimeout(Re,t.rotate),i(m,e,M.callback)}return setTimeout(Re),ye}function wi(t){const e={...Fn,...t};let i=[];function r(){i=i.filter(c=>c().status===\"pending\")}function n(c,a,l){const u=Kn(e,c,a,(d,p)=>{r(),l&&l(d,p)});return i.push(u),u}function s(c){return i.find(a=>c(a))||null}return{query:n,find:s,setIndex:c=>{e.index=c},getIndex:()=>e.index,cleanup:r}}function mt(t){let e;if(typeof t.resources==\"string\")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||\"/\",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Ne=Object.create(null),ne=[\"https://api.simplesvg.com\",\"https://api.unisvg.com\"],Se=[];for(;ne.length>0;)ne.length===1||Math.random()>.5?Se.push(ne.shift()):Se.push(ne.pop());Ne[\"\"]=mt({resources:[\"https://api.iconify.design\"].concat(Se)});function Gt(t,e){const i=mt(e);return i===null?!1:(Ne[t]=i,!0)}function je(t){return Ne[t]}function Wn(){return Object.keys(Ne)}function Ht(){}const Qe=Object.create(null);function Jn(t){if(!Qe[t]){const e=je(t);if(!e)return;const i=wi(e),r={config:e,redundancy:i};Qe[t]=r}return Qe[t]}function Ei(t,e,i){let r,n;if(typeof t==\"string\"){const s=st(t);if(!s)return i(void 0,424),Ht;n=s.send;const o=Jn(t);o&&(r=o.redundancy)}else{const s=mt(t);if(s){r=wi(s);const o=t.resources?t.resources[0]:\"\",c=st(o);c&&(n=c.send)}}return!r||!n?(i(void 0,424),Ht):r.query(e,n,i)().abort}const Vt=\"iconify2\",pe=\"iconify\",Mi=pe+\"-count\",qt=pe+\"-version\",$i=36e5,Qn=168;function ot(t,e){try{return t.getItem(e)}catch{}}function gt(t,e,i){try{return t.setItem(e,i),!0}catch{}}function zt(t,e){try{t.removeItem(e)}catch{}}function at(t,e){return gt(t,Mi,e.toString())}function ct(t){return parseInt(ot(t,Mi))||0}const R={local:!0,session:!0},Si={local:new Set,session:new Set};let bt=!1;function Zn(t){bt=t}let we=typeof window==\"undefined\"?{}:window;function xi(t){const e=t+\"Storage\";try{if(we&&we[e]&&typeof we[e].length==\"number\")return we[e]}catch{}R[t]=!1}function Ci(t,e){const i=xi(t);if(!i)return;const r=ot(i,qt);if(r!==Vt){if(r){const c=ct(i);for(let a=0;a<c;a++)zt(i,pe+a.toString())}gt(i,qt,Vt),at(i,0);return}const n=Math.floor(Date.now()/$i)-Qn,s=c=>{const a=pe+c.toString(),l=ot(i,a);if(typeof l==\"string\"){try{const u=JSON.parse(l);if(typeof u==\"object\"&&typeof u.cached==\"number\"&&u.cached>n&&typeof u.provider==\"string\"&&typeof u.data==\"object\"&&typeof u.data.prefix==\"string\"&&e(u,c))return!0}catch{}zt(i,a)}};let o=ct(i);for(let c=o-1;c>=0;c--)s(c)||(c===o-1?(o--,at(i,o)):Si[t].add(c))}function ki(){if(!bt){Zn(!0);for(const t in R)Ci(t,e=>{const i=e.data,r=e.provider,n=i.prefix,s=O(r,n);if(!ft(s,i).length)return!1;const o=i.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,o):o,!0})}}function Yn(t,e){const i=t.lastModifiedCached;if(i&&i>=e)return i===e;if(t.lastModifiedCached=e,i)for(const r in R)Ci(r,n=>{const s=n.data;return n.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function Xn(t,e){bt||ki();function i(r){let n;if(!R[r]||!(n=xi(r)))return;const s=Si[r];let o;if(s.size)s.delete(o=Array.from(s).shift());else if(o=ct(n),!at(n,o+1))return;const c={cached:Math.floor(Date.now()/$i),provider:t.provider,data:e};return gt(n,pe+o.toString(),JSON.stringify(c))}e.lastModified&&!Yn(t,e.lastModified)||!Object.keys(e.icons).length||(e.not_found&&(e=Object.assign({},e),delete e.not_found),i(\"local\")||i(\"session\"))}function Ft(){}function er(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Hn(t)}))}function tr(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:i,prefix:r}=t,n=t.iconsToLoad;delete t.iconsToLoad;let s;if(!n||!(s=st(i)))return;s.prepare(i,r,n).forEach(c=>{Ei(i,c,a=>{if(typeof a!=\"object\")c.icons.forEach(l=>{t.missing.add(l)});else try{const l=ft(t,a);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),Xn(t,a)}catch(l){console.error(l)}er(t)})})}))}const _t=(t,e)=>{const i=zn(t,!0,vi()),r=Gn(i);if(!r.pending.length){let a=!0;return e&&setTimeout(()=>{a&&e(r.loaded,r.missing,r.pending,Ft)}),()=>{a=!1}}const n=Object.create(null),s=[];let o,c;return r.pending.forEach(a=>{const{provider:l,prefix:u}=a;if(u===c&&l===o)return;o=l,c=u,s.push(O(l,u));const d=n[l]||(n[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(a=>{const{provider:l,prefix:u,name:d}=a,p=O(l,u),f=p.pendingIcons||(p.pendingIcons=new Set);f.has(d)||(f.add(d),n[l][u].push(d))}),s.forEach(a=>{const{provider:l,prefix:u}=a;n[l][u].length&&tr(a,n[l][u])}),e?qn(e,r,s):Ft},ir=t=>new Promise((e,i)=>{const r=typeof t==\"string\"?_e(t,!0):t;if(!r){i(t);return}_t([r||t],n=>{if(n.length&&r){const s=he(r);if(s){e({...be,...s});return}}i(t)})});function nr(t){try{const e=typeof t==\"string\"?JSON.parse(t):t;if(typeof e.body==\"string\")return{...e}}catch{}}function rr(t,e){const i=typeof t==\"string\"?_e(t,!0,!0):null;if(!i){const s=nr(t);return{value:t,data:s}}const r=he(i);if(r!==void 0||!i.prefix)return{value:t,name:i,data:r};const n=_t([i],()=>e(t,i,he(i)));return{value:t,name:i,loading:n}}function Ze(t){return t.hasAttribute(\"inline\")}let Pi=!1;try{Pi=navigator.vendor.indexOf(\"Apple\")===0}catch{}function sr(t,e){switch(e){case\"svg\":case\"bg\":case\"mask\":return e}return e!==\"style\"&&(Pi||t.indexOf(\"<a\")===-1)?\"svg\":t.indexOf(\"currentColor\")===-1?\"bg\":\"mask\"}const or=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ar=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function lt(t,e,i){if(e===1)return t;if(i=i||100,typeof t==\"number\")return Math.ceil(t*e*i)/i;if(typeof t!=\"string\")return t;const r=t.split(or);if(r===null||!r.length)return t;const n=[];let s=r.shift(),o=ar.test(s);for(;;){if(o){const c=parseFloat(s);isNaN(c)?n.push(s):n.push(Math.ceil(c*e*i)/i)}else n.push(s);if(s=r.shift(),s===void 0)return n.join(\"\");o=!o}}const cr=t=>t===\"unset\"||t===\"undefined\"||t===\"none\";function Ii(t,e){const i={...be,...t},r={...gi,...e},n={left:i.left,top:i.top,width:i.width,height:i.height};let s=i.body;[i,r].forEach(y=>{const _=[],Be=y.hFlip,ye=y.vFlip;let A=y.rotate;Be?ye?A+=2:(_.push(\"translate(\"+(n.width+n.left).toString()+\" \"+(0-n.top).toString()+\")\"),_.push(\"scale(-1 1)\"),n.top=n.left=0):ye&&(_.push(\"translate(\"+(0-n.left).toString()+\" \"+(n.height+n.top).toString()+\")\"),_.push(\"scale(1 -1)\"),n.top=n.left=0);let T;switch(A<0&&(A-=Math.floor(A/4)*4),A=A%4,A){case 1:T=n.height/2+n.top,_.unshift(\"rotate(90 \"+T.toString()+\" \"+T.toString()+\")\");break;case 2:_.unshift(\"rotate(180 \"+(n.width/2+n.left).toString()+\" \"+(n.height/2+n.top).toString()+\")\");break;case 3:T=n.width/2+n.left,_.unshift(\"rotate(-90 \"+T.toString()+\" \"+T.toString()+\")\");break}A%2===1&&(n.left!==n.top&&(T=n.left,n.left=n.top,n.top=T),n.width!==n.height&&(T=n.width,n.width=n.height,n.height=T)),_.length&&(s='<g transform=\"'+_.join(\" \")+'\">'+s+\"</g>\")});const o=r.width,c=r.height,a=n.width,l=n.height;let u,d;o===null?(d=c===null?\"1em\":c===\"auto\"?l:c,u=lt(d,a/l)):(u=o===\"auto\"?a:o,d=c===null?lt(u,l/a):c===\"auto\"?l:c);const p={},f=(y,_)=>{cr(_)||(p[y]=_.toString())};return f(\"width\",u),f(\"height\",d),p.viewBox=n.left.toString()+\" \"+n.top.toString()+\" \"+a.toString()+\" \"+l.toString(),{attributes:p,body:s}}const lr=()=>{let t;try{if(t=fetch,typeof t==\"function\")return t}catch{}};let Ie=lr();function ur(t){Ie=t}function dr(){return Ie}function hr(t,e){const i=je(t);if(!i)return 0;let r;if(!i.maxURL)r=0;else{let n=0;i.resources.forEach(o=>{n=Math.max(n,o.length)});const s=e+\".json?icons=\";r=i.maxURL-n-i.path.length-s.length}return r}function pr(t){return t===404}const fr=(t,e,i)=>{const r=[],n=hr(t,e),s=\"icons\";let o={type:s,provider:t,prefix:e,icons:[]},c=0;return i.forEach((a,l)=>{c+=a.length+1,c>=n&&l>0&&(r.push(o),o={type:s,provider:t,prefix:e,icons:[]},c=a.length),o.icons.push(a)}),r.push(o),r};function mr(t){if(typeof t==\"string\"){const e=je(t);if(e)return e.path}return\"/\"}const gr=(t,e,i)=>{if(!Ie){i(\"abort\",424);return}let r=mr(e.provider);switch(e.type){case\"icons\":{const s=e.prefix,c=e.icons.join(\",\"),a=new URLSearchParams({icons:c});r+=s+\".json?\"+a.toString();break}case\"custom\":{const s=e.uri;r+=s.slice(0,1)===\"/\"?s.slice(1):s;break}default:i(\"abort\",400);return}let n=503;Ie(t+r).then(s=>{const o=s.status;if(o!==200){setTimeout(()=>{i(pr(o)?\"abort\":\"next\",o)});return}return n=501,s.json()}).then(s=>{if(typeof s!=\"object\"||s===null){setTimeout(()=>{s===404?i(\"abort\",s):i(\"next\",n)});return}setTimeout(()=>{i(\"success\",s)})}).catch(()=>{i(\"next\",n)})},br={prepare:fr,send:gr};function Kt(t,e){switch(t){case\"local\":case\"session\":R[t]=e;break;case\"all\":for(const i in R)R[i]=e;break}}const Ye=\"data-style\";let Di=\"\";function _r(t){Di=t}function Wt(t,e){let i=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(Ye));i||(i=document.createElement(\"style\"),i.setAttribute(Ye,Ye),t.appendChild(i)),i.textContent=\":host{display:inline-block;vertical-align:\"+(e?\"-0.125em\":\"0\")+\"}span,svg{display:block}\"+Di}function Oi(){Ut(\"\",br),vi(!0);let t;try{t=window}catch{}if(t){if(ki(),t.IconifyPreload!==void 0){const i=t.IconifyPreload,r=\"Invalid IconifyPreload syntax.\";typeof i==\"object\"&&i!==null&&(i instanceof Array?i:[i]).forEach(n=>{try{(typeof n!=\"object\"||n===null||n instanceof Array||typeof n.icons!=\"object\"||typeof n.prefix!=\"string\"||!Rt(n))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const i=t.IconifyProviders;if(typeof i==\"object\"&&i!==null)for(const r in i){const n=\"IconifyProviders[\"+r+\"] is invalid.\";try{const s=i[r];if(typeof s!=\"object\"||!s||s.resources===void 0)continue;Gt(r,s)||console.error(n)}catch{console.error(n)}}}}return{enableCache:i=>Kt(i,!0),disableCache:i=>Kt(i,!1),iconExists:Rn,getIcon:Un,listIcons:Bn,addIcon:Ai,addCollection:Rt,calculateSize:lt,buildIcon:Ii,loadIcons:_t,loadIcon:ir,addAPIProvider:Gt,appendCustomStyle:_r,_api:{getAPIConfig:je,setAPIModule:Ut,sendAPIQuery:Ei,setFetch:ur,getFetch:dr,listAPIProviders:Wn}}}function Li(t,e){let i=t.indexOf(\"xlink:\")===-1?\"\":' xmlns:xlink=\"http://www.w3.org/1999/xlink\"';for(const r in e)i+=\" \"+r+'=\"'+e[r]+'\"';return'<svg xmlns=\"http://www.w3.org/2000/svg\"'+i+\">\"+t+\"</svg>\"}function yr(t){return t.replace(/\"/g,\"'\").replace(/%/g,\"%25\").replace(/#/g,\"%23\").replace(/</g,\"%3C\").replace(/>/g,\"%3E\").replace(/\\s+/g,\" \")}function vr(t){return\"data:image/svg+xml,\"+yr(t)}function Ar(t){return'url(\"'+vr(t)+'\")'}const ut={\"background-color\":\"currentColor\"},Ni={\"background-color\":\"transparent\"},Jt={image:\"var(--svg)\",repeat:\"no-repeat\",size:\"100% 100%\"},Qt={\"-webkit-mask\":ut,mask:ut,background:Ni};for(const t in Qt){const e=Qt[t];for(const i in Jt)e[t+\"-\"+i]=Jt[i]}function Zt(t){return t?t+(t.match(/^[-0-9.]+$/)?\"px\":\"\"):\"inherit\"}function Tr(t,e,i){const r=document.createElement(\"span\");let n=t.body;n.indexOf(\"<a\")!==-1&&(n+=\"<!-- \"+Date.now()+\" -->\");const s=t.attributes,o=Li(n,{...s,width:e.width+\"\",height:e.height+\"\"}),c=Ar(o),a=r.style,l={\"--svg\":c,width:Zt(s.width),height:Zt(s.height),...i?ut:Ni};for(const u in l)a.setProperty(u,l[u]);return r}let se;function wr(){try{se=window.trustedTypes.createPolicy(\"iconify\",{createHTML:t=>t})}catch{se=null}}function Er(t){return se===void 0&&wr(),se?se.createHTML(t):t}function Mr(t){const e=document.createElement(\"span\"),i=t.attributes;let r=\"\";i.width||(r=\"width: inherit;\"),i.height||(r+=\"height: inherit;\"),r&&(i.style=r);const n=Li(t.body,i);return e.innerHTML=Er(n),e.firstChild}function Yt(t,e){const i=e.icon.data,r=e.customisations,n=Ii(i,r);r.preserveAspectRatio&&(n.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=e.renderedMode;let o;switch(s){case\"svg\":o=Mr(n);break;default:o=Tr(n,{...be,...i},s===\"mask\")}const c=Array.from(t.childNodes).find(a=>{const l=a.tagName&&a.tagName.toUpperCase();return l===\"SPAN\"||l===\"SVG\"});c?o.tagName===\"SPAN\"&&c.tagName===o.tagName?c.setAttribute(\"style\",o.getAttribute(\"style\")):t.replaceChild(o,c):t.appendChild(o)}function Xt(t,e,i){const r=i&&(i.rendered?i:i.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:r}}function $r(t=\"iconify-icon\"){let e,i;try{e=window.customElements,i=window.HTMLElement}catch{return}if(!e||!i)return;const r=e.get(t);if(r)return r;const n=[\"icon\",\"mode\",\"inline\",\"width\",\"height\",\"rotate\",\"flip\"],s=class extends i{constructor(){super();Ae(this,\"_shadowRoot\");Ae(this,\"_state\");Ae(this,\"_checkQueued\",!1);const a=this._shadowRoot=this.attachShadow({mode:\"open\"}),l=Ze(this);Wt(a,l),this._state=Xt({value:\"\"},l),this._queueCheck()}static get observedAttributes(){return n.slice(0)}attributeChangedCallback(a){if(a===\"inline\"){const l=Ze(this),u=this._state;l!==u.inline&&(u.inline=l,Wt(this._shadowRoot,l))}else this._queueCheck()}get icon(){const a=this.getAttribute(\"icon\");if(a&&a.slice(0,1)===\"{\")try{return JSON.parse(a)}catch{}return a}set icon(a){typeof a==\"object\"&&(a=JSON.stringify(a)),this.setAttribute(\"icon\",a)}get inline(){return Ze(this)}set inline(a){a?this.setAttribute(\"inline\",\"true\"):this.removeAttribute(\"inline\")}restartAnimation(){const a=this._state;if(a.rendered){const l=this._shadowRoot;if(a.renderedMode===\"svg\")try{l.lastChild.setCurrentTime(0);return}catch{}Yt(l,a)}}get status(){const a=this._state;return a.rendered?\"rendered\":a.icon.data===null?\"failed\":\"loading\"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const a=this._state,l=this.getAttribute(\"icon\");if(l!==a.icon.value){this._iconChanged(l);return}if(!a.rendered)return;const u=this.getAttribute(\"mode\"),d=jt(this);(a.attrMode!==u||Pn(a.customisations,d))&&this._renderIcon(a.icon,d,u)}_iconChanged(a){const l=rr(a,(u,d,p)=>{const f=this._state;if(f.rendered||this.getAttribute(\"icon\")!==u)return;const y={value:u,name:d,data:p};y.data?this._gotIconData(y):f.icon=y});l.data?this._gotIconData(l):this._state=Xt(l,this._state.inline,this._state)}_gotIconData(a){this._checkQueued=!1,this._renderIcon(a,jt(this),this.getAttribute(\"mode\"))}_renderIcon(a,l,u){const d=sr(a.data.body,u),p=this._state.inline;Yt(this._shadowRoot,this._state={rendered:!0,icon:a,inline:p,customisations:l,attrMode:u,renderedMode:d})}};n.forEach(c=>{c in s.prototype||Object.defineProperty(s.prototype,c,{get:function(){return this.getAttribute(c)},set:function(a){a!==null?this.setAttribute(c,a):this.removeAttribute(c)}})});const o=Oi();for(const c in o)s[c]=s.prototype[c]=o[c];return e.define(t,s),s}$r()||Oi();var Sr=S`.btn,button{cursor:pointer;border-radius:4px;color:#03a9f4;border:none;background-color:unset;padding:8px;font-weight:500;font-size:12.25px;letter-spacing:1.09375px;text-transform:uppercase;margin-right:-8px}.btn:active,button:active{background-image:rgba(127,127,127,.2);transition-duration:1s}.btn:hover,button:hover{background-color:rgba(127,127,127,.2);transition-duration:1s}.abuttonIsState{background-color:#28a745;color:#fff;border:none;padding:10px 20px;font-size:16px;border-radius:4px;transition:background-color .3s ease}`,xr=S`.main-grid{display:grid;grid-template-columns:1fr 1fr;width:100%;padding-bottom:2rem}.main-buttons{display:grid;gap:1rem;justify-content:center;grid-template-columns:auto auto auto auto;align-content:center;align-items:center;justify-content:center}@media (max-width:1024px){.main-grid{grid-template-columns:1fr}.main-buttons{gap:.5rem;grid-template-columns:auto auto auto}}.flex-grid-half{display:grid;grid-template-columns:700px 2fr}.flex-grid-half.expanded_entity,.flex-grid-half.expanded_logs{grid-template-columns:1fr}.flex-grid-half .col{margin:8px}.flex-grid-half .col:nth-child(2){overflow:hidden}.flex-grid-half.expanded_logs .col:nth-child(1){display:none}.flex-grid-half.expanded_entity .col:nth-child(2){display:none}@media (max-width:1024px){.flex-grid,.flex-grid-half{display:block}.flex-grid-half .col{width:100%!important;margin:0 0 10px 0!important;display:block!important}}*{box-sizing:border-box}.flex-grid{margin:0 0 20px 0}h1{text-align:center;width:100%;line-height:1.1em;margin-block:.25em}header div{text-align:center;width:100%}header #logo,header iconify-icon{float:right;font-size:2.5rem;color:rgba(127,127,127,.5)}header #logo{float:left;color:rgba(127,127,127,.5)}.connected{color:rgba(0,157,16,.75)}esp-logo{float:left;line-height:1em;font-size:initial}form{display:flex;justify-content:space-between;background-color:rgba(127,127,127,.05);border-radius:12px;border-width:1px;border-style:solid;border-color:rgba(127,127,127,.12)}form .btn{margin-right:0}.helper{width:75%;padding:1rem;margin:.3rem 0;background-color:rgba(127,127,127,.3);border-radius:.5rem}`,Cr=Object.defineProperty,kr=Object.getOwnPropertyDescriptor,z=(t,e,i,r)=>{for(var n=r>1?void 0:r?kr(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&Cr(e,i,n),n};window.source=new EventSource(pt()+\"/events\");window.entities=[];const Ee={};var ti;(ti=window.source)==null||ti.addEventListener(\"state\",t=>{const e=t,i=JSON.parse(e.data.replace(/[\\u0000-\\u001F\\u007F-\\u009F]/g,\"\"));let r=window.entities.findIndex(n=>n.unique_id===i.id);if(r!=-1&&i.id){if(typeof i.value==\"number\"){let n=[...window.entities[r].value_numeric_history];n.push(i.value),window.entities[r].value_numeric_history=n.splice(-50)}delete i.id,delete i.domain,delete i.unique_id,Object.assign(window.entities[r],i)}else if(i!=null&&i.name)ei(i);else{if(Ee[i.id]?Ee[i.id]++:Ee[i.id]=1,Ee[i.id]<1)return;let n=i.id.split(\"-\"),s=n[0],o=n.slice(1).join(\"-\");fetch(`${window.apiBasePath}/${s}/${o}?detail=all`,{method:\"GET\"}).then(c=>{if(console.log(c),!c.ok)throw new Error(`HTTP error! Status: ${c.status}`);return c.json()}).then(c=>{console.log(c),ei(c)}).catch(c=>{console.error(\"Fetch error:\",c)})}});function ei(t){if(console.log(t),window.entities.findIndex(i=>i.unique_id===t.id)===-1&&t.id){let i=t.id.split(\"-\"),r={...t,domain:i[0],unique_id:t.id,id:i.slice(1).join(\"-\"),entity_category:t.entity_category,value_numeric_history:[t.value]};r.has_action=`render_${r.domain}`in pi.prototype,window.entities.push(r),Q.set(r)}}function Pr(t){const e=Math.sign(t);if(t===0)return new Intl.RelativeTimeFormat(\"en\").format(0,\"second\");const i=[{type:\"year\",seconds:12*30*24*60*60*1e3},{type:\"month\",seconds:30*24*60*60*1e3},{type:\"week\",seconds:7*24*60*60*1e3},{type:\"day\",seconds:24*60*60*1e3},{type:\"hour\",seconds:60*60*1e3},{type:\"minute\",seconds:60*1e3},{type:\"second\",seconds:1e3}];let r=\"\";const n=new Intl.RelativeTimeFormat(\"en\");let s=0;for(let o of i){const c=Math.trunc(Math.abs(t/o.seconds));if(c>0){const a=n.format(c*e,o.type);if(t-=c*o.seconds*e,r+=s===0&&o.type!=\"second\"?a.replace(\" ago\",\" \"):a,s++>=1)break}}return r}let L=class extends E{constructor(){super(),this.scheme=\"\",this.ping=0,this.connected=!0,this.lastUpdate=0,this.showLog=localStorage.showLog===\"true\",this.version=\"3.0.0\",this.config={ota:!1,log:!0,title:\"\",comment:\"\",lang:\"\"},this.darkQuery=window.matchMedia(\"(prefers-color-scheme: dark)\"),this.frames=[{},{color:\"rgba(0, 196, 21, 0.75)\"},{}];const t=document.querySelector(\"script#config\");console.log(t),t&&this.setConfig(JSON.parse(t.innerText))}setConfig(t){\"log\"in t||(t.log=this.config.log),this.config=t,document.title=t.title,document.documentElement.lang=t.lang;const[e,i,r]=t.comment.split(\"|\");this.nbsconfig={type:e,version:i,comment:r}}firstUpdated(t){super.firstUpdated(t),document.getElementsByTagName(\"head\")[0].innerHTML+='<meta name=viewport content=\"width=device-width, initial-scale=1,user-scalable=no\">';const e=document.querySelector(\"link[rel~='icon']\");e.href='data:image/svg+xml,<svg width=\"32\" height=\"32\" xmlns=\"http://www.w3.org/2000/svg\"><style>path{stroke-width:1;fill:black;stroke:black;stroke-linecap:round;stroke-linejoin:round}@media (prefers-color-scheme:dark){path{fill:white;stroke:white}}</style><path d=\"M1.3 18H5v10h21.8V18h3.7l-3.7-3.7V7.8h-2.4V12l-8.7-8.7L1.3 18Z\"/></svg>',this.scheme=this.schemeDefault(),window.source.addEventListener(\"ping\",i=>{var r;if((r=i.data)!=null&&r.length){const n=JSON.parse(i.data);n.title!==void 0&&(this.setConfig(n),this.requestUpdate())}this._updateUptime(i),this.lastUpdate=Date.now()}),window.source.addEventListener(\"log\",i=>{this._updateUptime(i),this.lastUpdate=Date.now()}),window.source.addEventListener(\"state\",i=>{this.lastUpdate=Date.now()}),window.source.addEventListener(\"error\",i=>{console.dir(i),this.connected=!1,this.requestUpdate()}),setInterval(()=>{this.connected=!!this.ping&&Date.now()-this.lastUpdate<15e3},5e3),document.addEventListener(\"entity-tab-header-double-clicked\",i=>{var n;const r=(n=this.shadowRoot)==null?void 0:n.querySelector(\"main.flex-grid-half\");r==null||r.classList.toggle(\"expanded_entity\")}),document.addEventListener(\"log-tab-header-double-clicked\",i=>{var n;const r=(n=this.shadowRoot)==null?void 0:n.querySelector(\"main.flex-grid-half\");r==null||r.classList.toggle(\"expanded_logs\")})}schemeDefault(){return this.darkQuery.matches?\"dark\":\"light\"}updated(t){super.updated(t),t.has(\"scheme\")&&document.documentElement.style.setProperty(\"color-scheme\",this.scheme),t.has(\"ping\")&&this.ping&&this.beat.animate(this.frames,1e3)}uptime(){return`${Pr(-this.ping|0)}`}renderOta(){if(this.config.ota){let t=pt();return h`<form method=\"POST\" action=\"${t}/update\" enctype=\"multipart/form-data\"><input class=\"btn\" type=\"file\" name=\"update\" accept=\"application/octet-stream\"> <input class=\"btn\" type=\"submit\" value=\"Update\"></form>`}}renderLog(){return!this.config.log||!this.showLog?g:h`<section id=\"col_logs\" class=\"col\"><esp-log rows=\"50\" .scheme=\"${this.scheme}\"></esp-log></section>`}renderTitle(){var t,e;return h`<h1>${this.config.title||h` `}</h1><div>${[(t=this.nbsconfig)==null?void 0:t.comment,`started ${this.uptime()}`,(e=this.nbsconfig)==null?void 0:e.version].filter(i=>i).map(i=>`${i}`).join(\" \\xB7 \")}</div>`}render(){var t,e,i,r,n,s,o;return h`<header><iconify-icon .icon=\"${this.connected?\"mdi:circle\":\"mdi:circle-off-outline\"}\" .title=\"${this.uptime()}\" class=\"top-icon ${this.connected?\"connected\":\"\"}\" id=\"beat\"></iconify-icon><a href=\"#\" id=\"scheme\" @click=\"${()=>{this.scheme=this.scheme!==\"dark\"?\"dark\":\"light\"}}\"><iconify-icon icon=\"mdi:theme-light-dark\" class=\"top-icon\"></iconify-icon></a>${this.renderTitle()}</header><div class=\"main-grid\"><div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center\"><div style=\"display:flex;gap:1rem;flex-direction:column;width:100%\"><div class=\"main-buttons\"><custom-button click=\"${w.house_clean}\"></custom-button><custom-button click=\"${w.spot_clean}\"></custom-button><custom-button click=\"${w.locate_robot}\"></custom-button>${((t=this.nbsconfig)==null?void 0:t.type)===\"gen3\"?h`<custom-button click=\"${v.send_to_base}\"></custom-button>`:g} ${((e=this.nbsconfig)==null?void 0:e.type)===\"gen2\"?h`<custom-button click=\"${Tn.send_to_start}\"></custom-button>`:g}<custom-button click=\"${w.pause_cleaning}\"></custom-button><custom-button click=\"${w.resume_cleaning}\"></custom-button><custom-button click=\"${w.stop_cleaning}\"></custom-button><custom-button click=\"${w.update_status}\"></custom-button><custom-button click=\"${w.shutdown}\"></custom-button><custom-button click=\"${w.powercycle}\"></custom-button><custom-button click=\"${w.reboot_esp}\"></custom-button><custom-button name=\"Clear Errors\" click=\"${w.clear_errors}\"></custom-button></div>${((i=this.nbsconfig)==null?void 0:i.type)===\"gen3\"?h`<hr style=\"width:100%\"><custom-table .entityIds=\"${[C.last_cleaning_time,C.last_cleaning_type,ie.last_cleaning_duration]}\"></custom-table>`:g}</div></div><div style=\"display:flex;justify-content:center;flex-direction:column\"><custom-table .entityIds=\"${[ie.fuel_percent,Te.ext_power_present,C.ui_state,C.robot_error,C.robot_alert,C.nbs_time]}\" .customNames=\"${{[Te.ext_power_present]:\"Docked\"}}\" .customValues=\"${{[C.robot_error]:c=>c.startsWith(\"200\")?\"No errors\":c,[C.robot_alert]:c=>c.startsWith(\"200\")?\"No alerts\":c}}\"></custom-table><hr style=\"width:100%\"><custom-table .entityIds=\"${[Lt.spot_clean_height,Lt.spot_clean_width]}\"></custom-table><custom-button name=\"Spot Clean\" click=\"${v.spot_clean__height___width_}\" style=\"align-self:center\"></custom-button></div></div><div class=\"main-grid\"><div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center\">${((r=this.nbsconfig)==null?void 0:r.type)===\"gen2\"?h`<custom-table style=\"width:50%\" .entityIds=\"${[We.robot_schedule]}\"></custom-table>`:g}<esp-schedule style=\"width:50%\"></esp-schedule></div><div style=\"display:flex;justify-content:center;flex-direction:column\"><custom-table .entityIds=\"${[wn.navigation_mode,$.test_mode,$.eco_mode,$.play_extra_sounds,$.click_sounds,$.melody_sounds,$.warning_sounds,$.bin_full_detect,...((n=this.nbsconfig)==null?void 0:n.type)===\"gen2\"?[We.autoshutdown,We.stealthled]:[],$.led,$.wall_enable,$.intenseclean,$.wifi]}\"></custom-table></div></div><div class=\"main-grid\"><div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center\">${((s=this.nbsconfig)==null?void 0:s.type)===\"gen3\"?h`<manual-driving></manual-driving>`:g}</div><div style=\"display:flex;justify-content:center;flex-direction:column\"><custom-table .entityIds=\"${[C.model,C.software,C.serial_number,Te.battery_failure,Te.battery_over_temp,ie.battery_cycles,ie.battery_voltage_v,ie.battery_temp_c_avg,Nt.timezone,Nt.schedule,fi.logger]}\"></custom-table></div></div><div class=\"main-grid\"><div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center\"><timezone-selector></timezone-selector></div><div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center\"><span class=\"helper\">The manual for the Webserver can be found <a href=\"https://github.com/Philip2809/neato-brainslug/blob/main/manual.md\" target=\"_blank\">here</a>. </span><span class=\"helper\">When new updates for Neato Brainslug is out, you can easily update your device by uploading the OTA file here! </span>${this.renderOta()} <span class=\"helper\" style=\"display:flex;align-items:center\"><code>Type: ${(o=this.nbsconfig)==null?void 0:o.type}</code>       Toggle the debug logs:  <a href=\"#\" title=\"Toggle log\" @click=\"${()=>{this.showLog=!this.showLog,localStorage.showLog=String(this.showLog)}}\"><iconify-icon style=\"font-size:2rem;color:rgba(177,177,177,.8)\" icon=\"mdi:console\" class=\"top-icon\"></iconify-icon></a></span></div></div>${this.renderLog()}`}_updateUptime(t){t.lastEventId&&(this.ping=parseInt(t.lastEventId),this.connected=!0,this.requestUpdate())}static get styles(){return[me,Sr,xr,di]}};z([x()],L.prototype,\"scheme\",2);z([x()],L.prototype,\"ping\",2);z([x()],L.prototype,\"connected\",2);z([x()],L.prototype,\"lastUpdate\",2);z([ci(\"#beat\")],L.prototype,\"beat\",2);z([x()],L.prototype,\"showLog\",2);L=z([k(\"esp-app\")],L);\n"
  },
  {
    "path": "config/js/1.2.js",
    "content": "var Bi=Object.defineProperty;var Ri=(t,e,i)=>e in t?Bi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var Ae=(t,e,i)=>(Ri(t,typeof e!=\"symbol\"?e+\"\":e,i),i);const Ui=function(){const e=document.createElement(\"link\").relList;if(e&&e.supports&&e.supports(\"modulepreload\"))return;for(const n of document.querySelectorAll('link[rel=\"modulepreload\"]'))r(n);new MutationObserver(n=>{for(const s of n)if(s.type===\"childList\")for(const o of s.addedNodes)o.tagName===\"LINK\"&&o.rel===\"modulepreload\"&&r(o)}).observe(document,{childList:!0,subtree:!0});function i(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerpolicy&&(s.referrerPolicy=n.referrerpolicy),n.crossorigin===\"use-credentials\"?s.credentials=\"include\":n.crossorigin===\"anonymous\"?s.credentials=\"omit\":s.credentials=\"same-origin\",s}function r(n){if(n.ep)return;n.ep=!0;const s=i(n);fetch(n.href,s)}};Ui();const Me=window,dt=Me.ShadowRoot&&(Me.ShadyCSS===void 0||Me.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,ht=Symbol(),yt=new WeakMap;class ii{constructor(e,i,r){if(this._$cssResult$=!0,r!==ht)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=e,this.t=i}get styleSheet(){let e=this.o;const i=this.t;if(dt&&e===void 0){const r=i!==void 0&&i.length===1;r&&(e=yt.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&yt.set(i,e))}return e}toString(){return this.cssText}}const Gi=t=>new ii(typeof t==\"string\"?t:t+\"\",void 0,ht),S=(t,...e)=>{const i=t.length===1?t[0]:e.reduce((r,n,s)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o==\"number\")return o;throw Error(\"use css function \"+o+\". Use unsafeCSS\")})(n)+t[s+1],t[0]);return new ii(i,t,ht)},Hi=(t,e)=>{dt?t.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet):e.forEach(i=>{const r=document.createElement(\"style\"),n=Me.litNonce;n!==void 0&&r.setAttribute(\"nonce\",n),r.textContent=i.cssText,t.appendChild(r)})},vt=dt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let i=\"\";for(const r of e.cssRules)i+=r.cssText;return Gi(i)})(t):t;var Ue;const xe=window,At=xe.trustedTypes,Vi=At?At.emptyScript:\"\",Tt=xe.reactiveElementPolyfillSupport,Xe={toAttribute(t,e){switch(e){case Boolean:t=t?Vi:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=t!==null;break;case Number:i=t===null?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},ni=(t,e)=>e!==t&&(e==e||t==t),Ge={attribute:!0,type:String,converter:Xe,reflect:!1,hasChanged:ni},et=\"finalized\";class F extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var i;this.finalize(),((i=this.h)!==null&&i!==void 0?i:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((i,r)=>{const n=this._$Ep(r,i);n!==void 0&&(this._$Ev.set(n,r),e.push(n))}),e}static createProperty(e,i=Ge){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(e,i),!i.noAccessor&&!this.prototype.hasOwnProperty(e)){const r=typeof e==\"symbol\"?Symbol():\"__\"+e,n=this.getPropertyDescriptor(e,r,i);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,i,r){return{get(){return this[i]},set(n){const s=this[e];this[i]=n,this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Ge}static finalize(){if(this.hasOwnProperty(et))return!1;this[et]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty(\"properties\")){const i=this.properties,r=[...Object.getOwnPropertyNames(i),...Object.getOwnPropertySymbols(i)];for(const n of r)this.createProperty(n,i[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const i=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const n of r)i.unshift(vt(n))}else e!==void 0&&i.push(vt(e));return i}static _$Ep(e,i){const r=i.attribute;return r===!1?void 0:typeof r==\"string\"?r:typeof e==\"string\"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(i=>i(this))}addController(e){var i,r;((i=this._$ES)!==null&&i!==void 0?i:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)===null||r===void 0||r.call(e))}removeController(e){var i;(i=this._$ES)===null||i===void 0||i.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])})}createRenderRoot(){var e;const i=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Hi(i,this.constructor.elementStyles),i}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var r;return(r=i.hostConnected)===null||r===void 0?void 0:r.call(i)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var r;return(r=i.hostDisconnected)===null||r===void 0?void 0:r.call(i)})}attributeChangedCallback(e,i,r){this._$AK(e,r)}_$EO(e,i,r=Ge){var n;const s=this.constructor._$Ep(e,r);if(s!==void 0&&r.reflect===!0){const o=(((n=r.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?r.converter:Xe).toAttribute(i,r.type);this._$El=e,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$El=null}}_$AK(e,i){var r;const n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){const o=n.getPropertyOptions(s),c=typeof o.converter==\"function\"?{fromAttribute:o.converter}:((r=o.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?o.converter:Xe;this._$El=s,this[s]=c.fromAttribute(i,o.type),this._$El=null}}requestUpdate(e,i,r){let n=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||ni)(this[e],i)?(this._$AL.has(e)||this._$AL.set(e,i),r.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(i){Promise.reject(i)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,s)=>this[s]=n),this._$Ei=void 0);let i=!1;const r=this._$AL;try{i=this.shouldUpdate(r),i?(this.willUpdate(r),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(r)):this._$Ek()}catch(n){throw i=!1,this._$Ek(),n}i&&this._$AE(r)}willUpdate(e){}_$AE(e){var i;(i=this._$ES)===null||i===void 0||i.forEach(r=>{var n;return(n=r.hostUpdated)===null||n===void 0?void 0:n.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((i,r)=>this._$EO(r,this[r],i)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}F[et]=!0,F.elementProperties=new Map,F.elementStyles=[],F.shadowRootOptions={mode:\"open\"},Tt==null||Tt({ReactiveElement:F}),((Ue=xe.reactiveElementVersions)!==null&&Ue!==void 0?Ue:xe.reactiveElementVersions=[]).push(\"1.6.3\");var He;const Ce=window,K=Ce.trustedTypes,wt=K?K.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,tt=\"$lit$\",P=`lit$${(Math.random()+\"\").slice(9)}$`,ri=\"?\"+P,qi=`<${ri}>`,U=document,oe=()=>U.createComment(\"\"),ae=t=>t===null||typeof t!=\"object\"&&typeof t!=\"function\",si=Array.isArray,zi=t=>si(t)||typeof(t==null?void 0:t[Symbol.iterator])==\"function\",Ve=`[ \t\n\\f\\r]`,te=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,Et=/-->/g,Mt=/>/g,j=RegExp(`>|${Ve}(?:([^\\\\s\"'>=/]+)(${Ve}*=${Ve}*(?:[^ \t\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),$t=/'/g,St=/\"/g,oi=/^(?:script|style|textarea|title)$/i,Fi=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),h=Fi(1),W=Symbol.for(\"lit-noChange\"),g=Symbol.for(\"lit-nothing\"),xt=new WeakMap,B=U.createTreeWalker(U,129,null,!1);function ai(t,e){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return wt!==void 0?wt.createHTML(e):e}const Ki=(t,e)=>{const i=t.length-1,r=[];let n,s=e===2?\"<svg>\":\"\",o=te;for(let c=0;c<i;c++){const a=t[c];let l,u,d=-1,p=0;for(;p<a.length&&(o.lastIndex=p,u=o.exec(a),u!==null);)p=o.lastIndex,o===te?u[1]===\"!--\"?o=Et:u[1]!==void 0?o=Mt:u[2]!==void 0?(oi.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),o=j):u[3]!==void 0&&(o=j):o===j?u[0]===\">\"?(o=n!=null?n:te,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?j:u[3]==='\"'?St:$t):o===St||o===$t?o=j:o===Et||o===Mt?o=te:(o=j,n=void 0);const f=o===j&&t[c+1].startsWith(\"/>\")?\" \":\"\";s+=o===te?a+qi:d>=0?(r.push(l),a.slice(0,d)+tt+a.slice(d)+P+f):a+P+(d===-2?(r.push(void 0),c):f)}return[ai(t,s+(t[i]||\"<?>\")+(e===2?\"</svg>\":\"\")),r]};class ce{constructor({strings:e,_$litType$:i},r){let n;this.parts=[];let s=0,o=0;const c=e.length-1,a=this.parts,[l,u]=Ki(e,i);if(this.el=ce.createElement(l,r),B.currentNode=this.el.content,i===2){const d=this.el.content,p=d.firstChild;p.remove(),d.append(...p.childNodes)}for(;(n=B.nextNode())!==null&&a.length<c;){if(n.nodeType===1){if(n.hasAttributes()){const d=[];for(const p of n.getAttributeNames())if(p.endsWith(tt)||p.startsWith(P)){const f=u[o++];if(d.push(p),f!==void 0){const y=n.getAttribute(f.toLowerCase()+tt).split(P),_=/([.?@])?(.*)/.exec(f);a.push({type:1,index:s,name:_[2],strings:y,ctor:_[1]===\".\"?Ji:_[1]===\"?\"?Zi:_[1]===\"@\"?Yi:De})}else a.push({type:6,index:s})}for(const p of d)n.removeAttribute(p)}if(oi.test(n.tagName)){const d=n.textContent.split(P),p=d.length-1;if(p>0){n.textContent=K?K.emptyScript:\"\";for(let f=0;f<p;f++)n.append(d[f],oe()),B.nextNode(),a.push({type:2,index:++s});n.append(d[p],oe())}}}else if(n.nodeType===8)if(n.data===ri)a.push({type:2,index:s});else{let d=-1;for(;(d=n.data.indexOf(P,d+1))!==-1;)a.push({type:7,index:s}),d+=P.length-1}s++}}static createElement(e,i){const r=U.createElement(\"template\");return r.innerHTML=e,r}}function J(t,e,i=t,r){var n,s,o,c;if(e===W)return e;let a=r!==void 0?(n=i._$Co)===null||n===void 0?void 0:n[r]:i._$Cl;const l=ae(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==l&&((s=a==null?void 0:a._$AO)===null||s===void 0||s.call(a,!1),l===void 0?a=void 0:(a=new l(t),a._$AT(t,i,r)),r!==void 0?((o=(c=i)._$Co)!==null&&o!==void 0?o:c._$Co=[])[r]=a:i._$Cl=a),a!==void 0&&(e=J(t,a._$AS(t,e.values),a,r)),e}class Wi{constructor(e,i){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var i;const{el:{content:r},parts:n}=this._$AD,s=((i=e==null?void 0:e.creationScope)!==null&&i!==void 0?i:U).importNode(r,!0);B.currentNode=s;let o=B.nextNode(),c=0,a=0,l=n[0];for(;l!==void 0;){if(c===l.index){let u;l.type===2?u=new fe(o,o.nextSibling,this,e):l.type===1?u=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(u=new Xi(o,this,e)),this._$AV.push(u),l=n[++a]}c!==(l==null?void 0:l.index)&&(o=B.nextNode(),c++)}return B.currentNode=U,s}v(e){let i=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,i),i+=r.strings.length-2):r._$AI(e[i])),i++}}class fe{constructor(e,i,r,n){var s;this.type=2,this._$AH=g,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=r,this.options=n,this._$Cp=(s=n==null?void 0:n.isConnected)===null||s===void 0||s}get _$AU(){var e,i;return(i=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&i!==void 0?i:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=i.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,i=this){e=J(this,e,i),ae(e)?e===g||e==null||e===\"\"?(this._$AH!==g&&this._$AR(),this._$AH=g):e!==this._$AH&&e!==W&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):zi(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==g&&ae(this._$AH)?this._$AA.nextSibling.data=e:this.$(U.createTextNode(e)),this._$AH=e}g(e){var i;const{values:r,_$litType$:n}=e,s=typeof n==\"number\"?this._$AC(e):(n.el===void 0&&(n.el=ce.createElement(ai(n.h,n.h[0]),this.options)),n);if(((i=this._$AH)===null||i===void 0?void 0:i._$AD)===s)this._$AH.v(r);else{const o=new Wi(s,this),c=o.u(this.options);o.v(r),this.$(c),this._$AH=o}}_$AC(e){let i=xt.get(e.strings);return i===void 0&&xt.set(e.strings,i=new ce(e)),i}T(e){si(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let r,n=0;for(const s of e)n===i.length?i.push(r=new fe(this.k(oe()),this.k(oe()),this,this.options)):r=i[n],r._$AI(s),n++;n<i.length&&(this._$AR(r&&r._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,i){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,i);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var i;this._$AM===void 0&&(this._$Cp=e,(i=this._$AP)===null||i===void 0||i.call(this,e))}}class De{constructor(e,i,r,n,s){this.type=1,this._$AH=g,this._$AN=void 0,this.element=e,this.name=i,this._$AM=n,this.options=s,r.length>2||r[0]!==\"\"||r[1]!==\"\"?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=g}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,i=this,r,n){const s=this.strings;let o=!1;if(s===void 0)e=J(this,e,i,0),o=!ae(e)||e!==this._$AH&&e!==W,o&&(this._$AH=e);else{const c=e;let a,l;for(e=s[0],a=0;a<s.length-1;a++)l=J(this,c[r+a],i,a),l===W&&(l=this._$AH[a]),o||(o=!ae(l)||l!==this._$AH[a]),l===g?e=g:e!==g&&(e+=(l!=null?l:\"\")+s[a+1]),this._$AH[a]=l}o&&!n&&this.j(e)}j(e){e===g?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:\"\")}}class Ji extends De{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===g?void 0:e}}const Qi=K?K.emptyScript:\"\";class Zi extends De{constructor(){super(...arguments),this.type=4}j(e){e&&e!==g?this.element.setAttribute(this.name,Qi):this.element.removeAttribute(this.name)}}class Yi extends De{constructor(e,i,r,n,s){super(e,i,r,n,s),this.type=5}_$AI(e,i=this){var r;if((e=(r=J(this,e,i,0))!==null&&r!==void 0?r:g)===W)return;const n=this._$AH,s=e===g&&n!==g||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==g&&(n===g||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var i,r;typeof this._$AH==\"function\"?this._$AH.call((r=(i=this.options)===null||i===void 0?void 0:i.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}}class Xi{constructor(e,i,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){J(this,e)}}const Ct=Ce.litHtmlPolyfillSupport;Ct==null||Ct(ce,fe),((He=Ce.litHtmlVersions)!==null&&He!==void 0?He:Ce.litHtmlVersions=[]).push(\"2.8.0\");const en=(t,e,i)=>{var r,n;const s=(r=i==null?void 0:i.renderBefore)!==null&&r!==void 0?r:e;let o=s._$litPart$;if(o===void 0){const c=(n=i==null?void 0:i.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=o=new fe(e.insertBefore(oe(),c),c,void 0,i!=null?i:{})}return o._$AI(t),o};var qe,ze;class E extends F{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,i;const r=super.createRenderRoot();return(e=(i=this.renderOptions).renderBefore)!==null&&e!==void 0||(i.renderBefore=r.firstChild),r}update(e){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=en(i,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return W}}E.finalized=!0,E._$litElement$=!0,(qe=globalThis.litElementHydrateSupport)===null||qe===void 0||qe.call(globalThis,{LitElement:E});const kt=globalThis.litElementPolyfillSupport;kt==null||kt({LitElement:E});((ze=globalThis.litElementVersions)!==null&&ze!==void 0?ze:globalThis.litElementVersions=[]).push(\"3.3.3\");const k=t=>e=>typeof e==\"function\"?((i,r)=>(customElements.define(i,r),r))(t,e):((i,r)=>{const{kind:n,elements:s}=r;return{kind:n,elements:s,finisher(o){customElements.define(i,o)}}})(t,e),tn=(t,e)=>e.kind===\"method\"&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer==\"function\"&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}},nn=(t,e,i)=>{e.constructor.createProperty(i,t)};function b(t){return(e,i)=>i!==void 0?nn(t,e,i):tn(t,e)}function x(t){return b({...t,state:!0})}const rn=({finisher:t,descriptor:e})=>(i,r)=>{var n;if(r===void 0){const s=(n=i.originalKey)!==null&&n!==void 0?n:i.key,o=e!=null?{kind:\"method\",placement:\"prototype\",key:s,descriptor:e(i.key)}:{...i,key:s};return t!=null&&(o.finisher=function(c){t(c,s)}),o}{const s=i.constructor;e!==void 0&&Object.defineProperty(i,r,e(r)),t==null||t(s,r)}};function ci(t,e){return rn({descriptor:i=>{const r={get(){var n,s;return(s=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(t))!==null&&s!==void 0?s:null},enumerable:!0,configurable:!0};if(e){const n=typeof i==\"symbol\"?Symbol():\"__\"+i;r.get=function(){var s,o;return this[n]===void 0&&(this[n]=(o=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(t))!==null&&o!==void 0?o:null),this[n]}}return r}})}var Fe;((Fe=window.HTMLSlotElement)===null||Fe===void 0?void 0:Fe.prototype.assignedElements)!=null;function pt(){let t=window.location.pathname;return t.endsWith(\"/\")?t.slice(0,-1):t}window.apiBasePath=pt();function li(t,e){fetch(`${window.apiBasePath}/${t.domain}/${t.id}/${e}`,{method:\"POST\",headers:{\"Content-Type\":\"application/x-www-form-urlencoded\"}})}function Ke(t){li(t,\"press\")}function ui(t,e){li(t,`set?value=${encodeURIComponent(e)}`)}var di=S`.tab-header{display:inline-flex;max-width:90%;font-weight:400;padding-inline:1.5em;padding-top:.5em;padding-bottom:.5em;align-items:center;border-radius:12px 12px 0 0;background-color:rgba(127,127,127,.3);margin-top:1em;user-select:none}.tab-container{border:2px solid rgba(127,127,127,.3);border-radius:0 12px 12px 12px}`,sn=Object.defineProperty,on=Object.getOwnPropertyDescriptor,Oe=(t,e,i,r)=>{for(var n=r>1?void 0:r?on(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&sn(e,i,n),n};let le=class extends E{constructor(){super(),this.rows=10,this.scheme=\"\",this.logs=[],this.handleLog=t=>{const i=t.data,n={\"\\x1B[1;31m\":\"e\",\"\\x1B[0;33m\":\"w\",\"\\x1B[0;32m\":\"i\",\"\\x1B[0;35m\":\"c\",\"\\x1B[0;36m\":\"d\",\"\\x1B[0;37m\":\"v\"}[i.slice(0,7)];if(!n)return;const o=i.slice(7,i.length-4).split(`\n`),c=o[0],l=c.slice(3).split(\":\").slice(0,2).join(\":\"),u=c.slice(5+l.length),d=c.slice(0,3),p=new Date().toTimeString().split(\" \")[0];o.forEach((f,y)=>{console.log(\"ESP_LOG\",f);const _={type:n,level:d,tag:l,detail:y===0?u:f,when:p};this.logs.push(_)}),this.logs=this.logs.slice(-this.rows)}}connectedCallback(){var t;super.connectedCallback(),(t=window.source)==null||t.addEventListener(\"log\",this.handleLog)}disconnectedCallback(){var t;(t=window.source)==null||t.removeEventListener(\"log\",this.handleLog),super.disconnectedCallback()}render(){return h`<div class=\"tab-header\" @dblclick=\"${this._handleTabHeaderDblClick}\">Debug Log</div><div class=\"tab-container\"><div class=\"logs\" color-scheme=\"${this.scheme}\"><div class=\"thead trow\"><div>Time</div><div>Level</div><div>Tag</div><div>Message</div></div><div class=\"tbody\">${this.logs.map(t=>h`<div class=\"trow ${t.type}\"><div>${t.when}</div><div>${t.level}</div><div>${t.tag}</div><div>${t.detail}</div></div>`)}</div></div></div>`}_handleTabHeaderDblClick(t){var i;const e=new CustomEvent(\"log-tab-header-double-clicked\",{bubbles:!0,composed:!0});(i=t.target)==null||i.dispatchEvent(e)}static get styles(){return[di,S`.tbody .trow:nth-child(2n),.thead{background-color:rgba(127,127,127,.05)}.trow div{font-family:monospace;width:100%;line-height:1.2rem}.trow{display:flex}.thead{line-height:1rem}.thead .trow{text-align:left;padding:.25rem .5rem}.trow{display:flex}.trow>div{align-self:flex-start;padding-right:.25em;flex:2 0;min-width:70px}.trow>div:nth-child(2){flex:1 0;overflow:hidden;text-overflow:ellipsis;max-width:40px}.trow>div:nth-child(3){flex:3 0;overflow:hidden;text-overflow:ellipsis}.trow>div:last-child{flex:15 0;padding-right:0;overflow:hidden;text-overflow:ellipsis}pre{margin:0}.v{color:#888}.d{color:#0dd}.c{color:#ff00ff}.i{color:#32cd32}.w{color:#ff0}.e{color:red;font-weight:700}.logs[color-scheme=light]{font-weight:700}.logs[color-scheme=light] .w{color:#cc0}.logs[color-scheme=dark] .d{color:#0aa}.logs{overflow-x:auto;border-radius:12px;border-width:1px;border-style:solid;border-color:rgba(127,127,127,.12);transition:all .3s ease-out 0s;font-size:14px;padding:16px}@media (max-width:1024px){.trow>div:nth-child(2){display:none!important}}`]}};Oe([b({type:Number})],le.prototype,\"rows\",2);Oe([b({type:String})],le.prototype,\"scheme\",2);Oe([x()],le.prototype,\"logs\",2);le=Oe([k(\"esp-log\")],le);var me=S`:host,button,input,select{font-family:ui-monospace,system-ui,Helvetica,Roboto,Oxygen,Ubuntu,sans-serif;--primary-color:#03a9f4;transition:all 350ms!important}`;class an{constructor(){this.entities=new Map,this.listeners=new Set}set(e){this.entities.set(e.unique_id,e),this.notify(e)}get(e){return this.entities.get(e)}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}notify(e){for(const i of this.listeners)i(e)}}const Q=new an;var cn=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,q=(t,e,i,r)=>{for(var n=r>1?void 0:r?ln(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&cn(e,i,n),n};let I=class extends E{constructor(){super(...arguments),this.click=\"\",this.press=\"\",this.release=\"\",this.icon=\"\",this.name=\"\",this.entities={}}connectedCallback(){super.connectedCallback(),this.unsubscribe=Q.subscribe(t=>{t.unique_id===this.click&&(this.entities.click=t),t.unique_id===this.press&&(this.entities.press=t),t.unique_id===this.release&&(this.entities.release=t),this.requestUpdate()})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),super.disconnectedCallback()}get entityIds(){let t=[];return this.click&&t.push(this.click),this.press&&t.push(this.press),this.release&&t.push(this.release),t}onClick(){this.entities.click&&Ke(this.entities.click)}onMouseDown(){this.entities.press&&Ke(this.entities.press)}onMouseUp(){this.entities.release&&Ke(this.entities.release)}updated(t){!this.customButtom||(this.press&&(this.customButtom.removeEventListener(\"touchstart\",this.onMouseDown.bind(this)),this.customButtom.addEventListener(\"touchstart\",this.onMouseDown.bind(this))),this.release&&(this.customButtom.removeEventListener(\"touchend\",this.onMouseUp.bind(this)),this.customButtom.addEventListener(\"touchend\",this.onMouseUp.bind(this))))}render(){var t,e,i,r,n,s;return Object.keys(this.entities).length!==this.entityIds.length?h`<div class=\"cb loading\"><iconify-icon icon=\"mdi:progress-clock\" height=\"24px\"></iconify-icon>loading…</div>`:h`<div class=\"cb\" @click=\"${this.onClick}\" @mousedown=\"${this.onMouseDown}\" @mouseup=\"${this.onMouseUp}\" id=\"custom-button\"><iconify-icon icon=\"${this.icon||((t=this.entities.click)==null?void 0:t.icon)||((e=this.entities.press)==null?void 0:e.icon)||((i=this.entities.release)==null?void 0:i.icon)}\" height=\"24px\"></iconify-icon><span>${this.name||((r=this.entities.click)==null?void 0:r.name)||((n=this.entities.press)==null?void 0:n.name)||((s=this.entities.release)==null?void 0:s.name)}</span></div>`}static get styles(){return[me,S`.cb{border:.1rem solid gray;border-radius:.5rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:1rem;width:6rem}.cb span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.cb:hover{background-color:rgba(255,255,255,.1);cursor:pointer}@media (max-width:1024px){.cb{font-size:.8rem;width:5.3rem}}`]}};q([b({type:String})],I.prototype,\"click\",2);q([b({type:String})],I.prototype,\"press\",2);q([b({type:String})],I.prototype,\"release\",2);q([b({type:String})],I.prototype,\"icon\",2);q([b({type:String})],I.prototype,\"name\",2);q([ci(\"#custom-button\")],I.prototype,\"customButtom\",2);I=q([k(\"custom-button\")],I);var un=S`:host{position:relative}select{background-color:inherit;color:inherit;width:100%;border-radius:4px}option{color:currentColor;background-color:var(--primary-color,currentColor)}input[type=range],input[type=text]{width:calc(100% - 3rem);height:.75rem}.range{text-align:center}.entity-row{display:flex;align-items:center;flex-direction:row;transition:all .3s ease-out 0s;min-height:40px;position:relative}.entity-row.expanded{min-height:240px}.entity-row:nth-child(2n){background-color:rgba(90,90,90,.1)}.entity-row iconify-icon{vertical-align:middle}.entity-row>:nth-child(1){flex:0 0 40px;color:#44739e;line-height:40px;text-align:center}.entity-row>:nth-child(2){flex:1 1 40%;margin-left:16px;margin-right:8px;text-wrap:nowrap;overflow:hidden;text-overflow:ellipsis}.entity-row>:nth-child(3){flex:1 1 50%;margin-right:8px;margin-left:20px;text-align:right;display:flex;justify-content:space-between;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.entity-row>:nth-child(3)>:only-child{margin-left:auto}.binary_sensor_off{color:rgba(127,127,127,.7)}.singlebutton-row button{margin:auto;display:flex}.climate-wrap{width:100%;margin:10px 0 10px 0}.climate-row{width:100%;display:inline-flex;flex-wrap:wrap;text-align:left}.climate-row>select{width:50%}.climate-row>label{align-content:center;width:150px}input[type=color]::-webkit-color-swatch-wrapper{padding:0!important}`,dn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,Le=(t,e,i,r)=>{for(var n=r>1?void 0:r?hn(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&dn(e,i,n),n};const hi=\"ON\",Pt=\"OFF\";let ue=class extends E{constructor(){super(...arguments),this.entityIds=[],this.customNames={},this.customValues={},this.entities=[],this._actionRenderer=new pi}connectedCallback(){super.connectedCallback(),this.unsubscribe=Q.subscribe(t=>{this.entityIds.some(e=>e===t.unique_id)&&(this.entities.push(t),this.entities.sort((e,i)=>this.entityIds.indexOf(e.unique_id)-this.entityIds.indexOf(i.unique_id)),this.requestUpdate())})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),super.disconnectedCallback()}render(){return this.entities.length?h`<div>${this.entities.map(t=>{var e,i,r;return h`<div class=\"entity-row\" .domain=\"${t.domain}\"><div>${t.icon?h`<iconify-icon icon=\"${t.icon}\" height=\"24px\"></iconify-icon>`:g}</div><div>${((e=this.customNames)==null?void 0:e[t.unique_id])||t.name}</div><div style=\"${t.domain===\"number\"?\"overflow-wrap: unset;word-break: unset;\":\"\"}\">${t.has_action?this.control(t):h`<div>${(i=this.customValues)!=null&&i[t.unique_id]?(r=this.customValues)==null?void 0:r[t.unique_id](t.state):t.state}</div>`}</div></div>`})}</div>`:h`loading…`}hasAction(t){return`render_${t.domain}`in this._actionRenderer}control(t){return this._actionRenderer.entity=t,this._actionRenderer.actioner=this,this._actionRenderer.exec(`render_${t.domain}`)}restAction(t,e){fetch(`${window.apiBasePath}/${t.domain}/${t.id}/${e}`,{method:\"POST\",headers:{\"Content-Type\":\"application/x-www-form-urlencoded\"}}).then(i=>{console.log(i)})}static get styles(){return[me,un]}};Le([b({type:String})],ue.prototype,\"entityIds\",2);Le([b()],ue.prototype,\"customNames\",2);Le([b()],ue.prototype,\"customValues\",2);ue=Le([k(\"custom-table\")],ue);class pi{exec(e){if(!this[e]||typeof this[e]!=\"function\"){console.log(`ActionRenderer.${e} is not callable`);return}return this[e]()}_actionButton(e,i,r,n=!1){if(!e)return;let s=r||i.toLowerCase();return h`<button class=\"${n?\"abuttonIsState\":\"abutton\"}\" ?disabled=\"${n}\" @click=\"${()=>{var o;return(o=this.actioner)==null?void 0:o.restAction(e,s)}}\">${i}</button>`}_datetime(e,i,r,n,s){return h`<input type=\"${i}\" name=\"${e.unique_id}\" id=\"${e.unique_id}\" .value=\"${s}\" @change=\"${o=>{var a,l;const c=(a=o.target)==null?void 0:a.value;(l=this.actioner)==null||l.restAction(e,`${r}?${n}=${c.replace(\"T\",\" \")}`)}}\">`}_switch(e){return h`<esp-switch color=\"var(--primary-color,currentColor)\" .state=\"${e.state}\" @state=\"${i=>{var n;let r=\"turn_\"+i.detail.state;(n=this.actioner)==null||n.restAction(e,r.toLowerCase())}}\"></esp-switch>`}_select(e,i,r,n,s){return h`<select @change=\"${o=>{var a,l;const c=(a=o.target)==null?void 0:a.value;(l=this.actioner)==null||l.restAction(e,`${i}?${r}=${encodeURIComponent(c)}`)}}\">${n.map(o=>h`<option value=\"${o}\" ?selected=\"${o==s}\">${o}</option>`)}</select>`}_range(e,i,r,n,s,o,c=1){return e.mode==1?h`<div class=\"range\"><label>${s||0}</label> <input type=\"${e.mode==1?\"number\":\"range\"}\" name=\"${e.unique_id}\" id=\"${e.unique_id}\" step=\"${c}\" min=\"${s||Math.min(0,n)}\" max=\"${o||Math.max(10,n)}\" .value=\"${n}\" @change=\"${a=>{var u,d;const l=(u=a.target)==null?void 0:u.value;(d=this.actioner)==null||d.restAction(e,`${i}?${r}=${l}`)}}\"> <label>${o||100}</label></div>`:h`<esp-range-slider name=\"${e.unique_id}\" step=\"${c}\" min=\"${s}\" max=\"${o}\" .value=\"${n}\" @state=\"${a=>{var l,u;(l=a.target)==null||l.value,(u=this.actioner)==null||u.restAction(e,`${i}?${r}=${a.detail.state}`)}}\"></esp-range-slider>`}_textinput(e,i,r,n,s,o,c){return h`<input type=\"${e.mode==1?\"password\":\"text\"}\" name=\"${e.unique_id}\" id=\"${e.unique_id}\" minlength=\"${s||Math.min(0,n)}\" maxlength=\"${o||Math.max(255,n)}\" pattern=\"${c||\"\"}\" .value=\"${n}\" @change=\"${a=>{var u,d;const l=(u=a.target)==null?void 0:u.value;(d=this.actioner)==null||d.restAction(e,`${i}?${r}=${encodeURIComponent(l)}`)}}\">`}_colorpicker(e,i,r){function n(o){return Number(o).toString(16).padStart(2,\"0\")}function s(o){var a;const c=((a=o.match(/[0-9a-f]{2}/gi))==null?void 0:a.map(l=>parseInt(l,16)))||[0,0,0];return`r=${c[0]}&g=${c[1]}&b=${c[2]}`}return h`<div class=\"colorpicker\"><input type=\"color\" name=\"${e.unique_id}\" id=\"${e.unique_id}\" value=\"#${n(r==null?void 0:r.r)}${n(r==null?void 0:r.g)}${n(r==null?void 0:r.b)}\" @change=\"${o=>{var a,l;const c=(a=o.target)==null?void 0:a.value;(l=this.actioner)==null||l.restAction(e,`${i}?${s(c)}`)}}\"></div>`}render_binary_sensor(){var i;if(!this.entity)return;const e=this.entity.state==hi;return h`<iconify-icon class=\"binary_sensor_${(i=this.entity.state)==null?void 0:i.toLowerCase()}\" icon=\"mdi:checkbox-${e?\"marked-circle\":\"blank-circle-outline\"}\" height=\"24px\"></iconify-icon>`}render_date(){if(!!this.entity)return h`${this._datetime(this.entity,\"date\",\"set\",\"value\",this.entity.value)}`}render_time(){if(!!this.entity)return h`${this._datetime(this.entity,\"time\",\"set\",\"value\",this.entity.value)}`}render_datetime(){if(!!this.entity)return h`${this._datetime(this.entity,\"datetime-local\",\"set\",\"value\",this.entity.value)}`}render_switch(){if(!!this.entity)return this.entity.assumed_state?h`${this._actionButton(this.entity,\"\\u274C\",\"turn_off\")} ${this._actionButton(this.entity,\"\\u2714\\uFE0F\",\"turn_on\")}`:this._switch(this.entity)}render_fan(){if(!!this.entity)return[this.entity.speed,\" \",this.entity.speed_level,this._switch(this.entity),this.entity.speed_count?this._range(this.entity,`turn_${this.entity.state.toLowerCase()}`,\"speed_level\",this.entity.speed_level?this.entity.speed_level:0,0,this.entity.speed_count,1):\"\"]}render_light(){var e,i;if(!!this.entity)return[h`<div class=\"entity\" style=\"width:100%\">${this._switch(this.entity)} ${this.entity.brightness?this._range(this.entity,\"turn_on\",\"brightness\",this.entity.brightness,0,255,1):\"\"} ${this.entity.color_mode===\"rgb\"||this.entity.color_mode===\"rgbw\"?this._colorpicker(this.entity,\"turn_on\",(e=this.entity)==null?void 0:e.color):\"\"} ${(i=this.entity.effects)!=null&&i.filter(r=>r!=\"None\").length?this._select(this.entity,\"turn_on\",\"effect\",this.entity.effects||[],this.entity.effect):\"\"}</div>`]}render_lock(){if(!!this.entity)return h`${this._actionButton(this.entity,\"\\u{1F510}\",\"lock\",this.entity.state===\"LOCKED\")} ${this._actionButton(this.entity,\"\\u{1F513}\",\"unlock\",this.entity.state===\"UNLOCKED\")} ${this._actionButton(this.entity,\"\\u2191\",\"open\")}`}render_cover(){if(!!this.entity)return h`${this._actionButton(this.entity,\"\\u2191\",\"open\",this.entity.state===\"OPEN\")} ${this._actionButton(this.entity,\"\\u2610\",\"stop\")} ${this._actionButton(this.entity,\"\\u2193\",\"close\",this.entity.state===\"CLOSED\")}`}render_button(){if(!!this.entity)return h`${this._actionButton(this.entity,\"PRESS\",\"press\")}`}render_select(){if(!!this.entity)return this._select(this.entity,\"set\",\"option\",this.entity.option||[],this.entity.value)}render_number(){if(!!this.entity)return h`${this._range(this.entity,\"set\",\"value\",this.entity.value,this.entity.min_value,this.entity.max_value,this.entity.step)} ${this.entity.uom}`}render_text(){if(!!this.entity)return this._textinput(this.entity,\"set\",\"value\",this.entity.value,this.entity.min_length,this.entity.max_length,this.entity.pattern)}render_climate(){if(!this.entity)return;let e,i=h`<div class=\"climate-row\" style=\"padding-bottom:10px\" ;><label>Current: ${this.entity.current_temperature} °C</label></div>`;this.entity.target_temperature_low!==void 0&&this.entity.target_temperature_high!==void 0?e=h`<div class=\"climate-row\"><label>Target Low: </label> ${this._range(this.entity,\"set\",\"target_temperature_low\",this.entity.target_temperature_low,this.entity.min_temp,this.entity.max_temp,this.entity.step)}</div><div class=\"climate-row\"><label>Target High: </label> ${this._range(this.entity,\"set\",\"target_temperature_high\",this.entity.target_temperature_high,this.entity.min_temp,this.entity.max_temp,this.entity.step)}</div>`:e=h`<div class=\"climate-row\"><label>Target: </label> ${this._range(this.entity,\"set\",\"target_temperature\",this.entity.target_temperature,this.entity.min_temp,this.entity.max_temp,this.entity.step)}</div>`;let r=h``;return(this.entity.modes?this.entity.modes.length:0)>0&&(r=h`<div class=\"climate-row\"><label>Mode: </label> ${this._select(this.entity,\"set\",\"mode\",this.entity.modes||[],this.entity.mode||\"\")}</div>`),h`<div class=\"climate-wrap\">${i} ${e} ${r}</div>`}render_valve(){if(!!this.entity)return h`${this._actionButton(this.entity,\"OPEN\",\"open\",this.entity.state===\"OPEN\")} ${this._actionButton(this.entity,\"\\u2610\",\"stop\")} ${this._actionButton(this.entity,\"CLOSE\",\"close\",this.entity.state===\"CLOSED\")}`}}var pn=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,Z=(t,e,i,r)=>{for(var n=r>1?void 0:r?fn(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&pn(e,i,n),n};const It=\"checkbox-lever\";let G=class extends E{constructor(){super(...arguments),this.checkbox=null,this.stateOn=hi,this.stateOff=Pt,this.state=Pt,this.color=\"currentColor\",this.disabled=!1}firstUpdated(t){var e;this.checkbox=(e=this.shadowRoot)==null?void 0:e.getElementById(It)}isOn(){return this.state===this.stateOn}toggle(t){const e=this.isOn()?this.stateOff:this.stateOn;let i=new CustomEvent(\"state\",{detail:{state:e,id:this.id}});this.dispatchEvent(i)}render(){return h`<div class=\"sw\"><label><input id=\"${It}\" type=\"checkbox\" .checked=\"${this.isOn()}\" .disabled=\"${this.disabled}\" @click=\"${this.toggle}\"> <span style=\"color:${this.color}\" class=\"lever\"></span></label></div>`}static get styles(){return[me,S`.sw,.sw *{-webkit-tap-highlight-color:transparent;user-select:none;cursor:pointer}input[type=checkbox]{opacity:0;width:0;height:0}input[type=checkbox]:checked+.lever{background-color:currentColor;background-image:linear-gradient(0deg,rgba(255,255,255,.5) 0,rgba(255,255,255,.5) 100%)}input[type=checkbox]:checked+.lever:after,input[type=checkbox]:checked+.lever:before{left:18px}input[type=checkbox]:checked+.lever:after{background-color:currentColor}input[type=checkbox]:not(:checked)+.lever:after{background-color:rgba(127,127,127,.5)}.lever{content:\"\";display:inline-block;position:relative;width:36px;height:14px;background-image:linear-gradient(0deg,rgba(127,127,127,.5) 0,rgba(127,127,127,.5) 100%);background-color:inherit;border-radius:15px;transition:background .3s ease;vertical-align:middle}.lever:after,.lever:before{content:\"\";position:absolute;display:inline-block;width:20px;height:20px;border-radius:50%;left:0;top:-3px;transition:left .3s ease,background .3s ease,box-shadow .1s ease,transform .1s ease}.lever:before{background-color:currentColor;background-image:linear-gradient(0deg,rgba(255,255,255,.9) 0,rgba(255,255,255,.9) 100%)}.lever:after{background-color:#f1f1f1;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}input[type=checkbox]:checked:not(:disabled).tabbed:focus~.lever::before,input[type=checkbox]:checked:not(:disabled)~.lever:active::before{transform:scale(2.4);background-color:rgba(255,255,255,.9) 0;background-image:linear-gradient(0deg,rgba(255,255,255,.9) 0,rgba(255,255,255,.9) 100%)}input[type=checkbox]:not(:disabled).tabbed:focus~.lever::before,input[type=checkbox]:not(:disabled)~.lever:active:before{transform:scale(2.4);background-color:rgba(0,0,0,.08)}input[type=checkbox][disabled]+.lever{cursor:default;background-color:rgba(0,0,0,.12)}input[type=checkbox][disabled]+.lever:after,input[type=checkbox][disabled]:checked+.lever:after{background-color:#949494}`]}};Z([b({type:String})],G.prototype,\"stateOn\",2);Z([b({type:String})],G.prototype,\"stateOff\",2);Z([b({type:String})],G.prototype,\"state\",2);Z([b({type:String})],G.prototype,\"color\",2);Z([b({type:Boolean})],G.prototype,\"disabled\",2);G=Z([k(\"esp-switch\")],G);var mn=Object.defineProperty,gn=Object.getOwnPropertyDescriptor,Y=(t,e,i,r)=>{for(var n=r>1?void 0:r?gn(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&mn(e,i,n),n};const Dt=\"range\",bn=\"rangeValue\",Ot=500;let H=class extends E{constructor(){super(...arguments),this.inputRange=null,this.currentValue=null,this.longPressTimer=null,this.isPopupInputVisible=!1,this.value=0,this.min=0,this.max=0,this.step=0,this.name=\"\"}firstUpdated(t){var e,i;this.inputRange=(e=this.shadowRoot)==null?void 0:e.getElementById(Dt),this.currentValue=(i=this.shadowRoot)==null?void 0:i.getElementById(bn),document.addEventListener(\"mousedown\",r=>{var s;if(!document.querySelector(\".popup-number-input\"))return;!((s=document.querySelector(\".popup-number-input\"))!=null&&s.contains(r.target))&&this.isPopupInputVisible&&this.deletePopupInput()})}updated(){this.updateCurrentValueOverlay()}onMouseDownCurrentValue(t){this.longPressTimer=setTimeout(()=>{this.showPopupInput(t.pageX,t.pageY)},Ot)}onMouseUpCurrentValue(t){this.longPressTimer&&!this.isPopupInputVisible&&(clearTimeout(this.longPressTimer),this.longPressTimer=null)}onTouchStartCurrentValue(t){this.longPressTimer=setTimeout(()=>{this.showPopupInput(t.touches[0].pageX,t.touches[0].pageY)},Ot)}onTouchEndCurrentValue(t){this.longPressTimer&&!this.isPopupInputVisible&&(clearTimeout(this.longPressTimer),this.longPressTimer=null)}deletePopupInput(){const t=document.querySelector(\".popup-number-input\");t&&t.remove(),this.isPopupInputVisible=!1}showPopupInput(t,e){const i=document.createElement(\"input\");i.type=\"number\",i.value=this.inputRange.value,i.min=this.inputRange.min,i.max=this.inputRange.max,i.step=this.inputRange.step,i.classList.add(\"popup-number-input\");const r=`\n    position: absolute;\n    left: ${t}px;\n    top: ${e}px;\n    width: 50px;\n    -webkit-appearance: none;\n    margin: 0;\n    `;i.setAttribute(\"style\",r),document.body.appendChild(i),i.addEventListener(\"contextmenu\",n=>{n.preventDefault()}),i.addEventListener(\"change\",n=>{var c,a;let s=n.target;this.inputRange.value=s==null?void 0:s.value;var o=new Event(\"input\");(c=this.inputRange)==null||c.dispatchEvent(o);var o=new Event(\"change\");(a=this.inputRange)==null||a.dispatchEvent(o)}),i.addEventListener(\"keydown\",n=>{n.key===\"Enter\"&&this.deletePopupInput()}),i.focus(),this.isPopupInputVisible=!0}updateCurrentValueOverlay(){var r,n;const t=Number((this.inputRange.value-this.inputRange.min)*100/(this.inputRange.max-this.inputRange.min)),e=10-t*.2;this.currentValue.innerHTML=`<span>${(r=this.inputRange)==null?void 0:r.value}</span>`,this.currentValue.style.left=`calc(${t}% + (${e}px))`;const i=(n=this.currentValue)==null?void 0:n.querySelector(\"span\");i==null||i.addEventListener(\"mousedown\",this.onMouseDownCurrentValue.bind(this)),i==null||i.addEventListener(\"mouseup\",this.onMouseUpCurrentValue.bind(this)),i==null||i.addEventListener(\"touchstart\",this.onTouchStartCurrentValue.bind(this)),i==null||i.addEventListener(\"touchend\",this.onTouchEndCurrentValue.bind(this)),i==null||i.addEventListener(\"contextmenu\",s=>{s.preventDefault()})}onInputEvent(t){this.updateCurrentValueOverlay()}onInputChangeEvent(t){var e;this.sendState((e=this.inputRange)==null?void 0:e.value)}sendState(t){let e=new CustomEvent(\"state\",{detail:{state:t,id:this.id}});this.dispatchEvent(e)}render(){return h`<div class=\"range-wrap\"><label>${this.min||0}</label><div class=\"slider-wrap\"><div class=\"range-value\" id=\"rangeValue\"></div><input id=\"${Dt}\" type=\"range\" name=\"${this.name}\" step=\"${this.step}\" min=\"${this.min||Math.min(0,this.value)}\" max=\"${this.max||Math.max(10,this.value)}\" .value=\"${this.value}\" @input=\"${this.onInputEvent}\" @change=\"${this.onInputChangeEvent}\"></div><label style=\"text-align:left\">${this.max||100}</label></div>`}static get styles(){return[me,S`:host{min-width:150px;flex:1}input[type=range]{background:0 0;-webkit-appearance:none;appearance:none;margin:20px 0;width:100%;touch-action:none}input[type=range]:focus{outline:0}input[type=range]::-webkit-slider-runnable-track{width:100%;height:4px;cursor:pointer;animate:.2s;background:#03a9f4;border-radius:25px}input[type=range]::-moz-range-track{width:100%;height:4px;cursor:pointer;animate:.2s;background:#03a9f4;border-radius:25px}input[type=range]::-ms-track{background:0 0;width:100%;height:4px;cursor:pointer;animate:.2s;background:0 0;border-color:transparent;color:transparent}input[type=range]::-ms-fill-lower{background:#03a9f4;border-radius:25px}input[type=range]::-ms-fill-upper{background:#03a9f4;border-radius:25px}input[type=range]::-webkit-slider-thumb{height:20px;width:20px;border-radius:50%;background:#fff;box-shadow:0 0 4px 0 #000;cursor:pointer;-webkit-appearance:none;margin-top:-8px}input[type=range]::-moz-range-thumb{height:20px;width:20px;border-radius:50%;background:#fff;box-shadow:0 0 4px 0 #000;cursor:pointer;border:none}input[type=range]::-ms-thumb{height:20px;width:20px;border-radius:50%;background:#fff;box-shadow:0 0 4px 0 #000;cursor:pointer;border:none}input[type=range]:focus::-webkit-slider-runnable-track{background:#03a9f4}input[type=range]:focus::-moz-range-track{background:#03a9f4}input[type=range]:focus::-ms-fill-lower{background:#03a9f4}input[type=range]:focus::-ms-fill-upper{background:#03a9f4}.range-wrap{display:flex;align-items:center}.slider-wrap{flex-grow:1;margin:0 15px;position:relative}.range-value{position:absolute;top:-50%}.range-value span{padding:0 3px 0 3px;height:19px;line-height:18px;text-align:center;background:#03a9f4;color:#fff;font-size:11px;display:block;position:absolute;left:50%;transform:translate(-50%,+80%);border-radius:6px}@-moz-document url-prefix(){.range-value span{transform:translate(-50%,+150%)}}.range-value span:before{content:\"\";position:absolute;width:0;height:0;border-top:10px solid #03a9f4;border-left:5px solid transparent;border-right:5px solid transparent;top:100%;left:50%;margin-left:-5px;margin-top:-1px;pointer-events:none}`]}};Y([b({type:String})],H.prototype,\"value\",2);Y([b({type:String})],H.prototype,\"min\",2);Y([b({type:String})],H.prototype,\"max\",2);Y([b({type:String})],H.prototype,\"step\",2);Y([b({type:String})],H.prototype,\"name\",2);H=Y([k(\"esp-range-slider\")],H);var _n=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,ge=(t,e,i,r)=>{for(var n=r>1?void 0:r?yn(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&_n(e,i,n),n};let V=class extends E{constructor(){super(...arguments),this.entityId=\"text-scheduleset\",this.days=[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],this.globalEnabled=!0,this.dayEnabled=Array(7).fill(!0),this.values=Array(7).fill(0)}connectedCallback(){super.connectedCallback(),this.unsubscribe=Q.subscribe(()=>{const t=Q.get(this.entityId);t&&(this.entity=t,this.setFromString(this.entity.value))})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),super.disconnectedCallback()}buildFlags(){let t=this.globalEnabled?1:0;return this.dayEnabled.forEach((e,i)=>{e&&(t|=1<<i+1)}),t}scheduleString(){return[this.buildFlags(),...this.values].join(\",\")}emit(){const t=this.scheduleString();console.log(t),this.entity&&(this.requestUpdate(),ui(this.entity,t))}setFromString(t){const e=t.split(\",\").map(r=>Number(r.trim()));if(e.length!==8||e.some(isNaN))return;const i=e[0];this.globalEnabled=(i&1)===1;for(let r=0;r<7;r++)this.dayEnabled[r]=(i>>r+1&1)===1,this.values[r]=this.clampValue(e[r+1]);this.requestUpdate()}clampValue(t){return isNaN(t)||t<0?0:t>143?143:t}valueToHM(t){return{h:Math.floor(t/6),m:t%6*10}}pad2(t){return String(t).padStart(2,\"0\")}roundMinute(t){return t=Math.round(t/10)*10,t<0?0:t>50?50:t}hmToValue(t,e){return t<0||t>23?null:(e=this.roundMinute(e),t*6+e/10)}adjustMinute(t,e){const{h:i,m:r}=this.valueToHM(this.values[t]);let n=r+e;n>50&&(n=50),n<0&&(n=0);const s=this.hmToValue(i,n);s!==null&&(this.values[t]=s,this.emit())}adjustHour(t,e){const{h:i,m:r}=this.valueToHM(this.values[t]);let n=i+e;n<0&&(n=23),n>23&&(n=0);const s=this.hmToValue(n,r);s!==null&&(this.values[t]=s,this.emit())}render(){return this.entity?h`<div class=\"row global\"><label>ESP Schedule</label><div class=\"switch ${this.globalEnabled?\" on\":\"\"}\" @click=\"${()=>{this.globalEnabled=!this.globalEnabled,this.emit()}}\"></div></div>${this.days.map((t,e)=>h`<div class=\"row ${!this.dayEnabled[e]||!this.globalEnabled?\" day-disabled\":\"\"}\"><div class=\"switch ${this.dayEnabled[e]?\" on\":\"\"}\" @click=\"${()=>{this.dayEnabled[e]=!this.dayEnabled[e],this.emit()}}\"></div><label>${t}</label><div class=\"time\"><div class=\"hour\"><button class=\"arrow\" @click=\"${()=>this.adjustHour(e,1)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\">▲</button> <input type=\"text\" inputmode=\"numeric\" maxlength=\"2\" readonly=\"readonly\" .value=\"${this.pad2(this.valueToHM(this.values[e]).h)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\" @blur=\"${i=>{let r=Number(i.target.value);isNaN(r)&&(r=0),r<0&&(r=0),r>23&&(r=23);const{m:n}=this.valueToHM(this.values[e]),s=this.hmToValue(r,n);s!==null&&(this.values[e]=s,i.target.value=this.pad2(r),this.emit())}}/\"> <button class=\"arrow\" @click=\"${()=>this.adjustHour(e,-1)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\">▼</button></div><span class=\"sep\">:</span><div class=\"minute\"><button class=\"arrow\" @click=\"${()=>this.adjustMinute(e,10)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\">▲</button> <input type=\"text\" inputmode=\"numeric\" maxlength=\"2\" readonly=\"readonly\" .value=\"${this.pad2(this.valueToHM(this.values[e]).m)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\" @blur=\"${i=>{let r=Number(i.target.value);isNaN(r)&&(r=0);const{h:n}=this.valueToHM(this.values[e]),s=this.hmToValue(n,r);if(s!==null){const{m:o}=this.valueToHM(s);this.values[e]=s,i.target.value=this.pad2(o),this.emit()}}}/\"> <button class=\"arrow\" @click=\"${()=>this.adjustMinute(e,-10)}\" ?disabled=\"${!this.dayEnabled[e]||!this.globalEnabled}\">▼</button></div></div></div>`)}`:h`<span>loading...</span>`}};V.styles=S`:host{display:block}.row{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:10px;padding:6px 0}.row.global{grid-template-columns:1fr auto;padding-bottom:10px;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:8px}label{font-size:.95rem;font-weight:700}.day-disabled label{opacity:.5}input[type=text]{background:#2b2b2b;color:#fff;border:1px solid #444;border-radius:8px;padding:6px 8px;font-size:.9rem;width:70px;text-align:center}input[type=text]:disabled{opacity:.4}.time{display:flex;align-items:center;gap:6px}.time input{width:36px;padding:6px 4px;text-align:center;font-size:.9rem}.hour,.minute{display:flex;flex-direction:column;align-items:center}.sep{opacity:.6}.arrow{border:none;background:0 0;color:#aaa;font-size:10px;line-height:10px;cursor:pointer}.arrow:hover{color:#6aa9ff}.arrow:disabled{opacity:.3;cursor:default}.switch{position:relative;width:44px;height:24px;border-radius:999px;background:#555;cursor:pointer;transition:background .2s ease}.switch::after{content:\"\";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .2s ease}.switch.on{background:#3b82f6}.switch.on::after{transform:translateX(20px)}`;ge([b({type:String})],V.prototype,\"entityId\",2);ge([x()],V.prototype,\"globalEnabled\",2);ge([x()],V.prototype,\"dayEnabled\",2);ge([x()],V.prototype,\"values\",2);V=ge([k(\"esp-schedule\")],V);var vn=Object.defineProperty,An=Object.getOwnPropertyDescriptor,X=(t,e,i,r)=>{for(var n=r>1?void 0:r?An(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&vn(e,i,n),n};let D=class extends E{constructor(){super(...arguments),this.value=\"\",this.query=\"\",this.filtered=[],this.selected=\"\",this.entityId=\"text-timezone\",this.zones={\"Africa/Abidjan\":\"GMT0\",\"Africa/Accra\":\"GMT0\",\"Africa/Addis_Ababa\":\"EAT-3\",\"Africa/Algiers\":\"CET-1\",\"Africa/Asmara\":\"EAT-3\",\"Africa/Bamako\":\"GMT0\",\"Africa/Bangui\":\"WAT-1\",\"Africa/Banjul\":\"GMT0\",\"Africa/Bissau\":\"GMT0\",\"Africa/Blantyre\":\"CAT-2\",\"Africa/Brazzaville\":\"WAT-1\",\"Africa/Bujumbura\":\"CAT-2\",\"Africa/Cairo\":\"EET-2EEST,M4.5.5/0,M10.5.4/24\",\"Africa/Casablanca\":\"<+01>-1\",\"Africa/Ceuta\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Africa/Conakry\":\"GMT0\",\"Africa/Dakar\":\"GMT0\",\"Africa/Dar_es_Salaam\":\"EAT-3\",\"Africa/Djibouti\":\"EAT-3\",\"Africa/Douala\":\"WAT-1\",\"Africa/El_Aaiun\":\"<+01>-1\",\"Africa/Freetown\":\"GMT0\",\"Africa/Gaborone\":\"CAT-2\",\"Africa/Harare\":\"CAT-2\",\"Africa/Johannesburg\":\"SAST-2\",\"Africa/Juba\":\"CAT-2\",\"Africa/Kampala\":\"EAT-3\",\"Africa/Khartoum\":\"CAT-2\",\"Africa/Kigali\":\"CAT-2\",\"Africa/Kinshasa\":\"WAT-1\",\"Africa/Lagos\":\"WAT-1\",\"Africa/Libreville\":\"WAT-1\",\"Africa/Lome\":\"GMT0\",\"Africa/Luanda\":\"WAT-1\",\"Africa/Lubumbashi\":\"CAT-2\",\"Africa/Lusaka\":\"CAT-2\",\"Africa/Malabo\":\"WAT-1\",\"Africa/Maputo\":\"CAT-2\",\"Africa/Maseru\":\"SAST-2\",\"Africa/Mbabane\":\"SAST-2\",\"Africa/Mogadishu\":\"EAT-3\",\"Africa/Monrovia\":\"GMT0\",\"Africa/Nairobi\":\"EAT-3\",\"Africa/Ndjamena\":\"WAT-1\",\"Africa/Niamey\":\"WAT-1\",\"Africa/Nouakchott\":\"GMT0\",\"Africa/Ouagadougou\":\"GMT0\",\"Africa/Porto-Novo\":\"WAT-1\",\"Africa/Sao_Tome\":\"GMT0\",\"Africa/Tripoli\":\"EET-2\",\"Africa/Tunis\":\"CET-1\",\"Africa/Windhoek\":\"CAT-2\",\"America/Adak\":\"HST10HDT,M3.2.0,M11.1.0\",\"America/Anchorage\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/Anguilla\":\"AST4\",\"America/Antigua\":\"AST4\",\"America/Araguaina\":\"<-03>3\",\"America/Argentina/Buenos_Aires\":\"<-03>3\",\"America/Argentina/Catamarca\":\"<-03>3\",\"America/Argentina/Cordoba\":\"<-03>3\",\"America/Argentina/Jujuy\":\"<-03>3\",\"America/Argentina/La_Rioja\":\"<-03>3\",\"America/Argentina/Mendoza\":\"<-03>3\",\"America/Argentina/Rio_Gallegos\":\"<-03>3\",\"America/Argentina/Salta\":\"<-03>3\",\"America/Argentina/San_Juan\":\"<-03>3\",\"America/Argentina/San_Luis\":\"<-03>3\",\"America/Argentina/Tucuman\":\"<-03>3\",\"America/Argentina/Ushuaia\":\"<-03>3\",\"America/Aruba\":\"AST4\",\"America/Asuncion\":\"<-03>3\",\"America/Atikokan\":\"EST5\",\"America/Bahia\":\"<-03>3\",\"America/Bahia_Banderas\":\"CST6\",\"America/Barbados\":\"AST4\",\"America/Belem\":\"<-03>3\",\"America/Belize\":\"CST6\",\"America/Blanc-Sablon\":\"AST4\",\"America/Boa_Vista\":\"<-04>4\",\"America/Bogota\":\"<-05>5\",\"America/Boise\":\"MST7MDT,M3.2.0,M11.1.0\",\"America/Cambridge_Bay\":\"MST7MDT,M3.2.0,M11.1.0\",\"America/Campo_Grande\":\"<-04>4\",\"America/Cancun\":\"EST5\",\"America/Caracas\":\"<-04>4\",\"America/Cayenne\":\"<-03>3\",\"America/Cayman\":\"EST5\",\"America/Chicago\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Chihuahua\":\"CST6\",\"America/Costa_Rica\":\"CST6\",\"America/Creston\":\"MST7\",\"America/Cuiaba\":\"<-04>4\",\"America/Curacao\":\"AST4\",\"America/Danmarkshavn\":\"GMT0\",\"America/Dawson\":\"MST7\",\"America/Dawson_Creek\":\"MST7\",\"America/Denver\":\"MST7MDT,M3.2.0,M11.1.0\",\"America/Detroit\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Dominica\":\"AST4\",\"America/Edmonton\":\"MST7MDT,M3.2.0,M11.1.0\",\"America/Eirunepe\":\"<-05>5\",\"America/El_Salvador\":\"CST6\",\"America/Fort_Nelson\":\"MST7\",\"America/Fortaleza\":\"<-03>3\",\"America/Glace_Bay\":\"AST4ADT,M3.2.0,M11.1.0\",\"America/Godthab\":\"<-02>2<-01>,M3.5.0/-1,M10.5.0/0\",\"America/Goose_Bay\":\"AST4ADT,M3.2.0,M11.1.0\",\"America/Grand_Turk\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Grenada\":\"AST4\",\"America/Guadeloupe\":\"AST4\",\"America/Guatemala\":\"CST6\",\"America/Guayaquil\":\"<-05>5\",\"America/Guyana\":\"<-04>4\",\"America/Halifax\":\"AST4ADT,M3.2.0,M11.1.0\",\"America/Havana\":\"CST5CDT,M3.2.0/0,M11.1.0/1\",\"America/Hermosillo\":\"MST7\",\"America/Indiana/Indianapolis\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Indiana/Knox\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Indiana/Marengo\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Indiana/Petersburg\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Indiana/Tell_City\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Indiana/Vevay\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Indiana/Vincennes\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Indiana/Winamac\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Inuvik\":\"MST7MDT,M3.2.0,M11.1.0\",\"America/Iqaluit\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Jamaica\":\"EST5\",\"America/Juneau\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/Kentucky/Louisville\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Kentucky/Monticello\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Kralendijk\":\"AST4\",\"America/La_Paz\":\"<-04>4\",\"America/Lima\":\"<-05>5\",\"America/Los_Angeles\":\"PST8PDT,M3.2.0,M11.1.0\",\"America/Lower_Princes\":\"AST4\",\"America/Maceio\":\"<-03>3\",\"America/Managua\":\"CST6\",\"America/Manaus\":\"<-04>4\",\"America/Marigot\":\"AST4\",\"America/Martinique\":\"AST4\",\"America/Matamoros\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Mazatlan\":\"MST7\",\"America/Menominee\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Merida\":\"CST6\",\"America/Metlakatla\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/Mexico_City\":\"CST6\",\"America/Miquelon\":\"<-03>3<-02>,M3.2.0,M11.1.0\",\"America/Moncton\":\"AST4ADT,M3.2.0,M11.1.0\",\"America/Monterrey\":\"CST6\",\"America/Montevideo\":\"<-03>3\",\"America/Montreal\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Montserrat\":\"AST4\",\"America/Nassau\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/New_York\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Nipigon\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Nome\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/Noronha\":\"<-02>2\",\"America/North_Dakota/Beulah\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/North_Dakota/Center\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/North_Dakota/New_Salem\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Nuuk\":\"<-02>2<-01>,M3.5.0/-1,M10.5.0/0\",\"America/Ojinaga\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Panama\":\"EST5\",\"America/Pangnirtung\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Paramaribo\":\"<-03>3\",\"America/Phoenix\":\"MST7\",\"America/Port-au-Prince\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Port_of_Spain\":\"AST4\",\"America/Porto_Velho\":\"<-04>4\",\"America/Puerto_Rico\":\"AST4\",\"America/Punta_Arenas\":\"<-03>3\",\"America/Rainy_River\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Rankin_Inlet\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Recife\":\"<-03>3\",\"America/Regina\":\"CST6\",\"America/Resolute\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Rio_Branco\":\"<-05>5\",\"America/Santarem\":\"<-03>3\",\"America/Santiago\":\"<-04>4<-03>,M9.1.6/24,M4.1.6/24\",\"America/Santo_Domingo\":\"AST4\",\"America/Sao_Paulo\":\"<-03>3\",\"America/Scoresbysund\":\"<-02>2<-01>,M3.5.0/-1,M10.5.0/0\",\"America/Sitka\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/St_Barthelemy\":\"AST4\",\"America/St_Johns\":\"NST3:30NDT,M3.2.0,M11.1.0\",\"America/St_Kitts\":\"AST4\",\"America/St_Lucia\":\"AST4\",\"America/St_Thomas\":\"AST4\",\"America/St_Vincent\":\"AST4\",\"America/Swift_Current\":\"CST6\",\"America/Tegucigalpa\":\"CST6\",\"America/Thule\":\"AST4ADT,M3.2.0,M11.1.0\",\"America/Thunder_Bay\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Tijuana\":\"PST8PDT,M3.2.0,M11.1.0\",\"America/Toronto\":\"EST5EDT,M3.2.0,M11.1.0\",\"America/Tortola\":\"AST4\",\"America/Vancouver\":\"PST8PDT,M3.2.0,M11.1.0\",\"America/Whitehorse\":\"MST7\",\"America/Winnipeg\":\"CST6CDT,M3.2.0,M11.1.0\",\"America/Yakutat\":\"AKST9AKDT,M3.2.0,M11.1.0\",\"America/Yellowknife\":\"MST7MDT,M3.2.0,M11.1.0\",\"Antarctica/Casey\":\"<+08>-8\",\"Antarctica/Davis\":\"<+07>-7\",\"Antarctica/DumontDUrville\":\"<+10>-10\",\"Antarctica/Macquarie\":\"AEST-10AEDT,M10.1.0,M4.1.0/3\",\"Antarctica/Mawson\":\"<+05>-5\",\"Antarctica/McMurdo\":\"NZST-12NZDT,M9.5.0,M4.1.0/3\",\"Antarctica/Palmer\":\"<-03>3\",\"Antarctica/Rothera\":\"<-03>3\",\"Antarctica/Syowa\":\"<+03>-3\",\"Antarctica/Troll\":\"<+00>0<+02>-2,M3.5.0/1,M10.5.0/3\",\"Antarctica/Vostok\":\"<+05>-5\",\"Arctic/Longyearbyen\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Asia/Aden\":\"<+03>-3\",\"Asia/Almaty\":\"<+05>-5\",\"Asia/Amman\":\"<+03>-3\",\"Asia/Anadyr\":\"<+12>-12\",\"Asia/Aqtau\":\"<+05>-5\",\"Asia/Aqtobe\":\"<+05>-5\",\"Asia/Ashgabat\":\"<+05>-5\",\"Asia/Atyrau\":\"<+05>-5\",\"Asia/Baghdad\":\"<+03>-3\",\"Asia/Bahrain\":\"<+03>-3\",\"Asia/Baku\":\"<+04>-4\",\"Asia/Bangkok\":\"<+07>-7\",\"Asia/Barnaul\":\"<+07>-7\",\"Asia/Beirut\":\"EET-2EEST,M3.5.0/0,M10.5.0/0\",\"Asia/Bishkek\":\"<+06>-6\",\"Asia/Brunei\":\"<+08>-8\",\"Asia/Chita\":\"<+09>-9\",\"Asia/Choibalsan\":\"<+08>-8\",\"Asia/Colombo\":\"<+0530>-5:30\",\"Asia/Damascus\":\"<+03>-3\",\"Asia/Dhaka\":\"<+06>-6\",\"Asia/Dili\":\"<+09>-9\",\"Asia/Dubai\":\"<+04>-4\",\"Asia/Dushanbe\":\"<+05>-5\",\"Asia/Famagusta\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Asia/Gaza\":\"EET-2EEST,M3.4.4/50,M10.4.4/50\",\"Asia/Hebron\":\"EET-2EEST,M3.4.4/50,M10.4.4/50\",\"Asia/Ho_Chi_Minh\":\"<+07>-7\",\"Asia/Hong_Kong\":\"HKT-8\",\"Asia/Hovd\":\"<+07>-7\",\"Asia/Irkutsk\":\"<+08>-8\",\"Asia/Jakarta\":\"WIB-7\",\"Asia/Jayapura\":\"WIT-9\",\"Asia/Jerusalem\":\"IST-2IDT,M3.4.4/26,M10.5.0\",\"Asia/Kabul\":\"<+0430>-4:30\",\"Asia/Kamchatka\":\"<+12>-12\",\"Asia/Karachi\":\"PKT-5\",\"Asia/Kathmandu\":\"<+0545>-5:45\",\"Asia/Khandyga\":\"<+09>-9\",\"Asia/Kolkata\":\"IST-5:30\",\"Asia/Krasnoyarsk\":\"<+07>-7\",\"Asia/Kuala_Lumpur\":\"<+08>-8\",\"Asia/Kuching\":\"<+08>-8\",\"Asia/Kuwait\":\"<+03>-3\",\"Asia/Macau\":\"CST-8\",\"Asia/Magadan\":\"<+11>-11\",\"Asia/Makassar\":\"WITA-8\",\"Asia/Manila\":\"PST-8\",\"Asia/Muscat\":\"<+04>-4\",\"Asia/Nicosia\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Asia/Novokuznetsk\":\"<+07>-7\",\"Asia/Novosibirsk\":\"<+07>-7\",\"Asia/Omsk\":\"<+06>-6\",\"Asia/Oral\":\"<+05>-5\",\"Asia/Phnom_Penh\":\"<+07>-7\",\"Asia/Pontianak\":\"WIB-7\",\"Asia/Pyongyang\":\"KST-9\",\"Asia/Qatar\":\"<+03>-3\",\"Asia/Qyzylorda\":\"<+05>-5\",\"Asia/Riyadh\":\"<+03>-3\",\"Asia/Sakhalin\":\"<+11>-11\",\"Asia/Samarkand\":\"<+05>-5\",\"Asia/Seoul\":\"KST-9\",\"Asia/Shanghai\":\"CST-8\",\"Asia/Singapore\":\"<+08>-8\",\"Asia/Srednekolymsk\":\"<+11>-11\",\"Asia/Taipei\":\"CST-8\",\"Asia/Tashkent\":\"<+05>-5\",\"Asia/Tbilisi\":\"<+04>-4\",\"Asia/Tehran\":\"<+0330>-3:30\",\"Asia/Thimphu\":\"<+06>-6\",\"Asia/Tokyo\":\"JST-9\",\"Asia/Tomsk\":\"<+07>-7\",\"Asia/Ulaanbaatar\":\"<+08>-8\",\"Asia/Urumqi\":\"<+06>-6\",\"Asia/Ust-Nera\":\"<+10>-10\",\"Asia/Vientiane\":\"<+07>-7\",\"Asia/Vladivostok\":\"<+10>-10\",\"Asia/Yakutsk\":\"<+09>-9\",\"Asia/Yangon\":\"<+0630>-6:30\",\"Asia/Yekaterinburg\":\"<+05>-5\",\"Asia/Yerevan\":\"<+04>-4\",\"Atlantic/Azores\":\"<-01>1<+00>,M3.5.0/0,M10.5.0/1\",\"Atlantic/Bermuda\":\"AST4ADT,M3.2.0,M11.1.0\",\"Atlantic/Canary\":\"WET0WEST,M3.5.0/1,M10.5.0\",\"Atlantic/Cape_Verde\":\"<-01>1\",\"Atlantic/Faroe\":\"WET0WEST,M3.5.0/1,M10.5.0\",\"Atlantic/Madeira\":\"WET0WEST,M3.5.0/1,M10.5.0\",\"Atlantic/Reykjavik\":\"GMT0\",\"Atlantic/South_Georgia\":\"<-02>2\",\"Atlantic/St_Helena\":\"GMT0\",\"Atlantic/Stanley\":\"<-03>3\",\"Australia/Adelaide\":\"ACST-9:30ACDT,M10.1.0,M4.1.0/3\",\"Australia/Brisbane\":\"AEST-10\",\"Australia/Broken_Hill\":\"ACST-9:30ACDT,M10.1.0,M4.1.0/3\",\"Australia/Currie\":\"AEST-10AEDT,M10.1.0,M4.1.0/3\",\"Australia/Darwin\":\"ACST-9:30\",\"Australia/Eucla\":\"<+0845>-8:45\",\"Australia/Hobart\":\"AEST-10AEDT,M10.1.0,M4.1.0/3\",\"Australia/Lindeman\":\"AEST-10\",\"Australia/Lord_Howe\":\"<+1030>-10:30<+11>-11,M10.1.0,M4.1.0\",\"Australia/Melbourne\":\"AEST-10AEDT,M10.1.0,M4.1.0/3\",\"Australia/Perth\":\"AWST-8\",\"Australia/Sydney\":\"AEST-10AEDT,M10.1.0,M4.1.0/3\",\"Etc/GMT\":\"GMT0\",\"Etc/GMT+0\":\"GMT0\",\"Etc/GMT+1\":\"<-01>1\",\"Etc/GMT+10\":\"<-10>10\",\"Etc/GMT+11\":\"<-11>11\",\"Etc/GMT+12\":\"<-12>12\",\"Etc/GMT+2\":\"<-02>2\",\"Etc/GMT+3\":\"<-03>3\",\"Etc/GMT+4\":\"<-04>4\",\"Etc/GMT+5\":\"<-05>5\",\"Etc/GMT+6\":\"<-06>6\",\"Etc/GMT+7\":\"<-07>7\",\"Etc/GMT+8\":\"<-08>8\",\"Etc/GMT+9\":\"<-09>9\",\"Etc/GMT-0\":\"GMT0\",\"Etc/GMT-1\":\"<+01>-1\",\"Etc/GMT-10\":\"<+10>-10\",\"Etc/GMT-11\":\"<+11>-11\",\"Etc/GMT-12\":\"<+12>-12\",\"Etc/GMT-13\":\"<+13>-13\",\"Etc/GMT-14\":\"<+14>-14\",\"Etc/GMT-2\":\"<+02>-2\",\"Etc/GMT-3\":\"<+03>-3\",\"Etc/GMT-4\":\"<+04>-4\",\"Etc/GMT-5\":\"<+05>-5\",\"Etc/GMT-6\":\"<+06>-6\",\"Etc/GMT-7\":\"<+07>-7\",\"Etc/GMT-8\":\"<+08>-8\",\"Etc/GMT-9\":\"<+09>-9\",\"Etc/GMT0\":\"GMT0\",\"Etc/Greenwich\":\"GMT0\",\"Etc/UCT\":\"UTC0\",\"Etc/UTC\":\"UTC0\",\"Etc/Universal\":\"UTC0\",\"Etc/Zulu\":\"UTC0\",\"Europe/Amsterdam\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Andorra\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Astrakhan\":\"<+04>-4\",\"Europe/Athens\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Belgrade\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Berlin\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Bratislava\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Brussels\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Bucharest\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Budapest\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Busingen\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Chisinau\":\"EET-2EEST,M3.5.0,M10.5.0/3\",\"Europe/Copenhagen\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Dublin\":\"IST-1GMT0,M10.5.0,M3.5.0/1\",\"Europe/Gibraltar\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Guernsey\":\"GMT0BST,M3.5.0/1,M10.5.0\",\"Europe/Helsinki\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Isle_of_Man\":\"GMT0BST,M3.5.0/1,M10.5.0\",\"Europe/Istanbul\":\"<+03>-3\",\"Europe/Jersey\":\"GMT0BST,M3.5.0/1,M10.5.0\",\"Europe/Kaliningrad\":\"EET-2\",\"Europe/Kiev\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Kirov\":\"MSK-3\",\"Europe/Lisbon\":\"WET0WEST,M3.5.0/1,M10.5.0\",\"Europe/Ljubljana\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/London\":\"GMT0BST,M3.5.0/1,M10.5.0\",\"Europe/Luxembourg\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Madrid\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Malta\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Mariehamn\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Minsk\":\"<+03>-3\",\"Europe/Monaco\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Moscow\":\"MSK-3\",\"Europe/Oslo\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Paris\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Podgorica\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Prague\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Riga\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Rome\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Samara\":\"<+04>-4\",\"Europe/San_Marino\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Sarajevo\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Saratov\":\"<+04>-4\",\"Europe/Simferopol\":\"MSK-3\",\"Europe/Skopje\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Sofia\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Stockholm\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Tallinn\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Tirane\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Ulyanovsk\":\"<+04>-4\",\"Europe/Uzhgorod\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Vaduz\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Vatican\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Vienna\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Vilnius\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Volgograd\":\"MSK-3\",\"Europe/Warsaw\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Zagreb\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Europe/Zaporozhye\":\"EET-2EEST,M3.5.0/3,M10.5.0/4\",\"Europe/Zurich\":\"CET-1CEST,M3.5.0,M10.5.0/3\",\"Indian/Antananarivo\":\"EAT-3\",\"Indian/Chagos\":\"<+06>-6\",\"Indian/Christmas\":\"<+07>-7\",\"Indian/Cocos\":\"<+0630>-6:30\",\"Indian/Comoro\":\"EAT-3\",\"Indian/Kerguelen\":\"<+05>-5\",\"Indian/Mahe\":\"<+04>-4\",\"Indian/Maldives\":\"<+05>-5\",\"Indian/Mauritius\":\"<+04>-4\",\"Indian/Mayotte\":\"EAT-3\",\"Indian/Reunion\":\"<+04>-4\",\"Pacific/Apia\":\"<+13>-13\",\"Pacific/Auckland\":\"NZST-12NZDT,M9.5.0,M4.1.0/3\",\"Pacific/Bougainville\":\"<+11>-11\",\"Pacific/Chatham\":\"<+1245>-12:45<+1345>,M9.5.0/2:45,M4.1.0/3:45\",\"Pacific/Chuuk\":\"<+10>-10\",\"Pacific/Easter\":\"<-06>6<-05>,M9.1.6/22,M4.1.6/22\",\"Pacific/Efate\":\"<+11>-11\",\"Pacific/Enderbury\":\"<+13>-13\",\"Pacific/Fakaofo\":\"<+13>-13\",\"Pacific/Fiji\":\"<+12>-12\",\"Pacific/Funafuti\":\"<+12>-12\",\"Pacific/Galapagos\":\"<-06>6\",\"Pacific/Gambier\":\"<-09>9\",\"Pacific/Guadalcanal\":\"<+11>-11\",\"Pacific/Guam\":\"ChST-10\",\"Pacific/Honolulu\":\"HST10\",\"Pacific/Kiritimati\":\"<+14>-14\",\"Pacific/Kosrae\":\"<+11>-11\",\"Pacific/Kwajalein\":\"<+12>-12\",\"Pacific/Majuro\":\"<+12>-12\",\"Pacific/Marquesas\":\"<-0930>9:30\",\"Pacific/Midway\":\"SST11\",\"Pacific/Nauru\":\"<+12>-12\",\"Pacific/Niue\":\"<-11>11\",\"Pacific/Norfolk\":\"<+11>-11<+12>,M10.1.0,M4.1.0/3\",\"Pacific/Noumea\":\"<+11>-11\",\"Pacific/Pago_Pago\":\"SST11\",\"Pacific/Palau\":\"<+09>-9\",\"Pacific/Pitcairn\":\"<-08>8\",\"Pacific/Pohnpei\":\"<+11>-11\",\"Pacific/Port_Moresby\":\"<+10>-10\",\"Pacific/Rarotonga\":\"<-10>10\",\"Pacific/Saipan\":\"ChST-10\",\"Pacific/Tahiti\":\"<-10>10\",\"Pacific/Tarawa\":\"<+12>-12\",\"Pacific/Tongatapu\":\"<+13>-13\",\"Pacific/Wake\":\"<+12>-12\",\"Pacific/Wallis\":\"<+12>-12\"}}connectedCallback(){super.connectedCallback(),this.unsubscribe=Q.subscribe(t=>{t.unique_id===this.entityId&&(this.entity=t,this.requestUpdate())})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),super.disconnectedCallback()}firstUpdated(){this.filtered=Object.keys(this.zones),this.value&&this.select(this.value)}updated(){this.value&&this.value!==this.selected&&this.select(this.value)}filter(){const t=this.query.toLowerCase();this.filtered=Object.keys(this.zones).filter(e=>e.toLowerCase().includes(t))}select(t){this.selected=t,this.query=t,this.dispatchEvent(new CustomEvent(\"timezone-changed\",{detail:t})),this.entity&&ui(this.entity,this.zones[t])}render(){return this.entity?h`<span>In case the \"NBS Time\" is not the correct timezone, select your timezone here.</span><div class=\"wrap\"><input type=\"text\" .value=\"${this.query}\" @input=\"${t=>{this.query=t.target.value,this.filter()}}\" placeholder=\"Type to search timezones…\"><div class=\"list\">${this.filtered.slice(0,50).map(t=>h`<div class=\"item ${t===this.selected?\"sel\":\"\"}\" @click=\"${()=>this.select(t)}\"><span>${t}</span> <span class=\"code\">${this.zones[t]}</span></div>`)}</div></div>`:h`loading...`}};D.styles=S`.wrap{margin-top:1rem;display:flex;flex-direction:column;gap:8px}input{padding:10px;border-radius:8px;border:1px solid #444}.list{max-height:240px;overflow:auto;border:1px solid #444;border-radius:8px}.item{display:flex;justify-content:space-between;padding:8px;cursor:pointer}.item:hover{background:rgba(127,127,127,.7)}.item.sel{background:rgba(82,82,82,.7)}.code{opacity:.6;font-size:.8rem}`;X([b({type:String})],D.prototype,\"value\",2);X([x()],D.prototype,\"query\",2);X([x()],D.prototype,\"filtered\",2);X([x()],D.prototype,\"selected\",2);X([b({type:String})],D.prototype,\"entityId\",2);D=X([k(\"timezone-selector\")],D);const w={house_clean:\"button-house_clean\",spot_clean:\"button-spot_clean\",spot_clean__height___width_:\"button-spot_clean__height___width_\",stop_cleaning:\"button-stop_cleaning\",pause_cleaning:\"button-pause_cleaning\",resume_cleaning:\"button-resume_cleaning\",locate_robot:\"button-locate_robot\",update_status:\"button-update_status\",clear_errors:\"button-clear_errors\",shutdown:\"button-shutdown\",powercycle:\"button-powercycle\",reboot_esp:\"button-reboot_esp\"},v={...w,send_to_base:\"button-send_to_base\",start_manual_cleaning:\"button-start_manual_cleaning\",manual_drive_forward_up:\"button-manual_drive_forward_up\",manual_drive_backwards_up:\"button-manual_drive_backwards_up\",manual_drive_turn_left_up:\"button-manual_drive_turn_left_up\",manual_drive_turn_right_up:\"button-manual_drive_turn_right_up\",manual_drive_arc_left_up:\"button-manual_drive_arc_left_up\",manual_drive_arc_right_up:\"button-manual_drive_arc_right_up\",manual_drive_forward_down:\"button-manual_drive_forward_down\",manual_drive_backwards_down:\"button-manual_drive_backwards_down\",manual_drive_turn_left_down:\"button-manual_drive_turn_left_down\",manual_drive_turn_right_down:\"button-manual_drive_turn_right_down\",manual_drive_arc_left_down:\"button-manual_drive_arc_left_down\",manual_drive_arc_right_down:\"button-manual_drive_arc_right_down\",manual_drive_button_timeout:\"button-manual_drive_button_timeout\"},Tn={...w,send_to_start:\"button-send_to_start\"},fi={logger:\"select-logger_select\"},wn={...fi,navigation_mode:\"select-navigation_mode\"},Te={usb_connected:\"binary_sensor-usb_connected\",battery_over_temp:\"binary_sensor-battery_over_temp\",charging_active:\"binary_sensor-charging_active\",charging_enabled:\"binary_sensor-charging_enabled\",confident_on_fuel:\"binary_sensor-confident_on_fuel\",on_reserved_fuel:\"binary_sensor-on_reserved_fuel\",empty_fuel:\"binary_sensor-empty_fuel\",battery_failure:\"binary_sensor-battery_failure\",ext_power_present:\"binary_sensor-ext_power_present\",thermistor_present:\"binary_sensor-thermistor_present\"},ie={fuel_percent:\"sensor-fuel_percent\",battery_temp_c_avg:\"sensor-battery_temp_c_avg\",battery_voltage_v:\"sensor-battery_voltage_v\",external_voltage_v:\"sensor-external_voltage_v\",charger_mah:\"sensor-charger_mah\",discharge_mah:\"sensor-discharge_mah\",filter_change_time:\"sensor-filter_change_time\",brush_change_time:\"sensor-brush_change_time\",dirt_bin_alert_reminder:\"sensor-dirt_bin_alert_reminder\",current_dirt_bin_runtime:\"sensor-current_dirt_bin_runtime\",number_of_full_dust_bin_cleanings:\"sensor-number_of_full_dust_bin_cleanings\",battery_cycles:\"sensor-battery_cycles\",last_cleaning_duration:\"sensor-last_cleaning_duration\"},Lt={spot_clean_width:\"number-spot_clean_width\",spot_clean_height:\"number-spot_clean_height\"},Nt={timezone:\"text-timezone\",schedule:\"text-scheduleset\"},$={test_mode:\"switch-test_mode\",play_extra_sounds:\"switch-play_extra_sounds\",click_sounds:\"switch-click_sounds\",led:\"switch-led\",wall_enable:\"switch-wall_enable\",eco_mode:\"switch-eco_mode\",intenseclean:\"switch-intenseclean\",wifi:\"switch-wifi\",melody_sounds:\"switch-melody_sounds\",warning_sounds:\"switch-warning_sounds\",bin_full_detect:\"switch-bin_full_detect\"},We={...$,stealthled:\"switch-stealthled\",autoshutdown:\"switch-autoshutdown\",robot_schedule:\"switch-robot_schedule\"},C={last_cleaning_time:\"text_sensor-last_cleaning_time\",last_cleaning_type:\"text_sensor-last_cleaning_type\",robot_error:\"text_sensor-robot_error\",robot_alert:\"text_sensor-robot_alert\",serial_number:\"text_sensor-serial_number\",model:\"text_sensor-model\",software:\"text_sensor-software\",ui_state:\"text_sensor-ui_state\",nbs_time:\"text_sensor-nbs_time\"};var En=Object.defineProperty,Mn=Object.getOwnPropertyDescriptor,$n=(t,e,i,r)=>{for(var n=r>1?void 0:r?Mn(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&En(e,i,n),n};let it=class extends E{render(){return h`<div class=\"manual-driving\"><span class=\"helper\">You need to turn manual cleaning on by pressing \"Start\", once the vacuum is in manual cleaning mode you can hold down the different actions! Timeout will stop the current action.</span><div style=\"display:flex;gap:1rem;flex-direction:column\"><div style=\"display:flex;gap:1rem\"><custom-button name=\"Arc Left\" press=\"${v.manual_drive_arc_left_down}\" release=\"${v.manual_drive_arc_left_up}\"></custom-button><custom-button name=\"Forward\" press=\"${v.manual_drive_forward_down}\" release=\"${v.manual_drive_forward_up}\"></custom-button><custom-button name=\"Arc Right\" press=\"${v.manual_drive_arc_right_down}\" release=\"${v.manual_drive_arc_right_up}\"></custom-button></div><div style=\"display:flex;gap:1rem\"><custom-button name=\"Left\" press=\"${v.manual_drive_turn_left_down}\" release=\"${v.manual_drive_turn_left_up}\"></custom-button><custom-button name=\"Timeout\" click=\"${v.manual_drive_button_timeout}\"></custom-button><custom-button name=\"Right\" press=\"${v.manual_drive_turn_right_down}\" release=\"${v.manual_drive_turn_right_up}\"></custom-button></div><div style=\"display:flex;gap:1rem\"><custom-button name=\"Start\" click=\"${v.start_manual_cleaning}\"></custom-button><custom-button name=\"Backward\" press=\"${v.manual_drive_backwards_down}\" release=\"${v.manual_drive_backwards_up}\"></custom-button><custom-button name=\"Stop\" click=\"${v.stop_cleaning}\"></custom-button></div></div></div>`}};it.styles=S`.manual-driving{display:flex;justify-content:center;align-items:center;flex-direction:column}.manual-driving span{width:75%;padding:1rem;margin:1.5rem 0;background-color:rgba(127,127,127,.3);border-radius:.5rem}`;it=$n([k(\"manual-driving\")],it);const mi=Object.freeze({left:0,top:0,width:16,height:16}),ke=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),be=Object.freeze({...mi,...ke}),nt=Object.freeze({...be,body:\"\",hidden:!1}),Sn=Object.freeze({width:null,height:null}),gi=Object.freeze({...Sn,...ke});function xn(t,e=0){const i=t.replace(/^-?[0-9.]*/,\"\");function r(n){for(;n<0;)n+=4;return n%4}if(i===\"\"){const n=parseInt(t);return isNaN(n)?0:r(n)}else if(i!==t){let n=0;switch(i){case\"%\":n=25;break;case\"deg\":n=90}if(n){let s=parseFloat(t.slice(0,t.length-i.length));return isNaN(s)?0:(s=s/n,s%1===0?r(s):0)}}return e}const Cn=/[\\s,]+/;function kn(t,e){e.split(Cn).forEach(i=>{switch(i.trim()){case\"horizontal\":t.hFlip=!0;break;case\"vertical\":t.vFlip=!0;break}})}const bi={...gi,preserveAspectRatio:\"\"};function jt(t){const e={...bi},i=(r,n)=>t.getAttribute(r)||n;return e.width=i(\"width\",null),e.height=i(\"height\",null),e.rotate=xn(i(\"rotate\",\"\")),kn(e,i(\"flip\",\"\")),e.preserveAspectRatio=i(\"preserveAspectRatio\",i(\"preserveaspectratio\",\"\")),e}function Pn(t,e){for(const i in bi)if(t[i]!==e[i])return!0;return!1}const re=/^[a-z0-9]+(-[a-z0-9]+)*$/,_e=(t,e,i,r=\"\")=>{const n=t.split(\":\");if(t.slice(0,1)===\"@\"){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),a=n.pop(),l={provider:n.length>0?n[0]:r,prefix:a,name:c};return e&&!$e(l)?null:l}const s=n[0],o=s.split(\"-\");if(o.length>1){const c={provider:r,prefix:o.shift(),name:o.join(\"-\")};return e&&!$e(c)?null:c}if(i&&r===\"\"){const c={provider:r,prefix:\"\",name:s};return e&&!$e(c,i)?null:c}return null},$e=(t,e)=>t?!!((t.provider===\"\"||t.provider.match(re))&&(e&&t.prefix===\"\"||t.prefix.match(re))&&t.name.match(re)):!1;function In(t,e){const i={};!t.hFlip!=!e.hFlip&&(i.hFlip=!0),!t.vFlip!=!e.vFlip&&(i.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(i.rotate=r),i}function Bt(t,e){const i=In(t,e);for(const r in nt)r in ke?r in t&&!(r in i)&&(i[r]=ke[r]):r in e?i[r]=e[r]:r in t&&(i[r]=t[r]);return i}function Dn(t,e){const i=t.icons,r=t.aliases||Object.create(null),n=Object.create(null);function s(o){if(i[o])return n[o]=[];if(!(o in n)){n[o]=null;const c=r[o]&&r[o].parent,a=c&&s(c);a&&(n[o]=[c].concat(a))}return n[o]}return(e||Object.keys(i).concat(Object.keys(r))).forEach(s),n}function On(t,e,i){const r=t.icons,n=t.aliases||Object.create(null);let s={};function o(c){s=Bt(r[c]||n[c],s)}return o(e),i.forEach(o),Bt(t,s)}function _i(t,e){const i=[];if(typeof t!=\"object\"||typeof t.icons!=\"object\")return i;t.not_found instanceof Array&&t.not_found.forEach(n=>{e(n,null),i.push(n)});const r=Dn(t);for(const n in r){const s=r[n];s&&(e(n,On(t,n,s)),i.push(n))}return i}const Ln={provider:\"\",aliases:{},not_found:{},...mi};function Je(t,e){for(const i in e)if(i in t&&typeof t[i]!=typeof e[i])return!1;return!0}function yi(t){if(typeof t!=\"object\"||t===null)return null;const e=t;if(typeof e.prefix!=\"string\"||!t.icons||typeof t.icons!=\"object\"||!Je(t,Ln))return null;const i=e.icons;for(const n in i){const s=i[n];if(!n.match(re)||typeof s.body!=\"string\"||!Je(s,nt))return null}const r=e.aliases||Object.create(null);for(const n in r){const s=r[n],o=s.parent;if(!n.match(re)||typeof o!=\"string\"||!i[o]&&!r[o]||!Je(s,nt))return null}return e}const Pe=Object.create(null);function Nn(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function O(t,e){const i=Pe[t]||(Pe[t]=Object.create(null));return i[e]||(i[e]=Nn(t,e))}function ft(t,e){return yi(e)?_i(e,(i,r)=>{r?t.icons[i]=r:t.missing.add(i)}):[]}function jn(t,e,i){try{if(typeof i.body==\"string\")return t.icons[e]={...i},!0}catch{}return!1}function Bn(t,e){let i=[];return(typeof t==\"string\"?[t]:Object.keys(Pe)).forEach(n=>{(typeof n==\"string\"&&typeof e==\"string\"?[e]:Object.keys(Pe[n]||{})).forEach(o=>{const c=O(n,o);i=i.concat(Object.keys(c.icons).map(a=>(n!==\"\"?\"@\"+n+\":\":\"\")+o+\":\"+a))})}),i}let de=!1;function vi(t){return typeof t==\"boolean\"&&(de=t),de}function he(t){const e=typeof t==\"string\"?_e(t,!0,de):t;if(e){const i=O(e.provider,e.prefix),r=e.name;return i.icons[r]||(i.missing.has(r)?null:void 0)}}function Ai(t,e){const i=_e(t,!0,de);if(!i)return!1;const r=O(i.provider,i.prefix);return jn(r,i.name,e)}function Rt(t,e){if(typeof t!=\"object\")return!1;if(typeof e!=\"string\"&&(e=t.provider||\"\"),de&&!e&&!t.prefix){let n=!1;return yi(t)&&(t.prefix=\"\",_i(t,(s,o)=>{o&&Ai(s,o)&&(n=!0)})),n}const i=t.prefix;if(!$e({provider:e,prefix:i,name:\"a\"}))return!1;const r=O(e,i);return!!ft(r,t)}function Rn(t){return!!he(t)}function Un(t){const e=he(t);return e?{...be,...e}:null}function Gn(t){const e={loaded:[],missing:[],pending:[]},i=Object.create(null);t.sort((n,s)=>n.provider!==s.provider?n.provider.localeCompare(s.provider):n.prefix!==s.prefix?n.prefix.localeCompare(s.prefix):n.name.localeCompare(s.name));let r={provider:\"\",prefix:\"\",name:\"\"};return t.forEach(n=>{if(r.name===n.name&&r.prefix===n.prefix&&r.provider===n.provider)return;r=n;const s=n.provider,o=n.prefix,c=n.name,a=i[s]||(i[s]=Object.create(null)),l=a[o]||(a[o]=O(s,o));let u;c in l.icons?u=e.loaded:o===\"\"||l.missing.has(c)?u=e.missing:u=e.pending;const d={provider:s,prefix:o,name:c};u.push(d)}),e}function Ti(t,e){t.forEach(i=>{const r=i.loaderCallbacks;r&&(i.loaderCallbacks=r.filter(n=>n.id!==e))})}function Hn(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let i=!1;const r=t.provider,n=t.prefix;e.forEach(s=>{const o=s.icons,c=o.pending.length;o.pending=o.pending.filter(a=>{if(a.prefix!==n)return!0;const l=a.name;if(t.icons[l])o.loaded.push({provider:r,prefix:n,name:l});else if(t.missing.has(l))o.missing.push({provider:r,prefix:n,name:l});else return i=!0,!0;return!1}),o.pending.length!==c&&(i||Ti([t],s.id),s.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),s.abort))})}))}let Vn=0;function qn(t,e,i){const r=Vn++,n=Ti.bind(null,i,r);if(!e.pending.length)return n;const s={id:r,icons:e,callback:t,abort:n};return i.forEach(o=>{(o.loaderCallbacks||(o.loaderCallbacks=[])).push(s)}),n}const rt=Object.create(null);function Ut(t,e){rt[t]=e}function st(t){return rt[t]||rt[\"\"]}function zn(t,e=!0,i=!1){const r=[];return t.forEach(n=>{const s=typeof n==\"string\"?_e(n,e,i):n;s&&r.push(s)}),r}var Fn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Kn(t,e,i,r){const n=t.resources.length,s=t.random?Math.floor(Math.random()*n):t.index;let o;if(t.random){let m=t.resources.slice(0);for(o=[];m.length>1;){const M=Math.floor(Math.random()*m.length);o.push(m[M]),m=m.slice(0,M).concat(m.slice(M+1))}o=o.concat(m)}else o=t.resources.slice(s).concat(t.resources.slice(0,s));const c=Date.now();let a=\"pending\",l=0,u,d=null,p=[],f=[];typeof r==\"function\"&&f.push(r);function y(){d&&(clearTimeout(d),d=null)}function _(){a===\"pending\"&&(a=\"aborted\"),y(),p.forEach(m=>{m.status===\"pending\"&&(m.status=\"aborted\")}),p=[]}function Be(m,M){M&&(f=[]),typeof m==\"function\"&&f.push(m)}function ye(){return{startTime:c,payload:e,status:a,queriesSent:l,queriesPending:p.length,subscribe:Be,abort:_}}function A(){a=\"failed\",f.forEach(m=>{m(void 0,u)})}function T(){p.forEach(m=>{m.status===\"pending\"&&(m.status=\"aborted\")}),p=[]}function ji(m,M,ee){const ve=M!==\"success\";switch(p=p.filter(N=>N!==m),a){case\"pending\":break;case\"failed\":if(ve||!t.dataAfterTimeout)return;break;default:return}if(M===\"abort\"){u=ee,A();return}if(ve){u=ee,p.length||(o.length?Re():A());return}if(y(),T(),!t.random){const N=t.resources.indexOf(m.resource);N!==-1&&N!==t.index&&(t.index=N)}a=\"completed\",f.forEach(N=>{N(ee)})}function Re(){if(a!==\"pending\")return;y();const m=o.shift();if(m===void 0){if(p.length){d=setTimeout(()=>{y(),a===\"pending\"&&(T(),A())},t.timeout);return}A();return}const M={status:\"pending\",resource:m,callback:(ee,ve)=>{ji(M,ee,ve)}};p.push(M),l++,d=setTimeout(Re,t.rotate),i(m,e,M.callback)}return setTimeout(Re),ye}function wi(t){const e={...Fn,...t};let i=[];function r(){i=i.filter(c=>c().status===\"pending\")}function n(c,a,l){const u=Kn(e,c,a,(d,p)=>{r(),l&&l(d,p)});return i.push(u),u}function s(c){return i.find(a=>c(a))||null}return{query:n,find:s,setIndex:c=>{e.index=c},getIndex:()=>e.index,cleanup:r}}function mt(t){let e;if(typeof t.resources==\"string\")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||\"/\",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Ne=Object.create(null),ne=[\"https://api.simplesvg.com\",\"https://api.unisvg.com\"],Se=[];for(;ne.length>0;)ne.length===1||Math.random()>.5?Se.push(ne.shift()):Se.push(ne.pop());Ne[\"\"]=mt({resources:[\"https://api.iconify.design\"].concat(Se)});function Gt(t,e){const i=mt(e);return i===null?!1:(Ne[t]=i,!0)}function je(t){return Ne[t]}function Wn(){return Object.keys(Ne)}function Ht(){}const Qe=Object.create(null);function Jn(t){if(!Qe[t]){const e=je(t);if(!e)return;const i=wi(e),r={config:e,redundancy:i};Qe[t]=r}return Qe[t]}function Ei(t,e,i){let r,n;if(typeof t==\"string\"){const s=st(t);if(!s)return i(void 0,424),Ht;n=s.send;const o=Jn(t);o&&(r=o.redundancy)}else{const s=mt(t);if(s){r=wi(s);const o=t.resources?t.resources[0]:\"\",c=st(o);c&&(n=c.send)}}return!r||!n?(i(void 0,424),Ht):r.query(e,n,i)().abort}const Vt=\"iconify2\",pe=\"iconify\",Mi=pe+\"-count\",qt=pe+\"-version\",$i=36e5,Qn=168;function ot(t,e){try{return t.getItem(e)}catch{}}function gt(t,e,i){try{return t.setItem(e,i),!0}catch{}}function zt(t,e){try{t.removeItem(e)}catch{}}function at(t,e){return gt(t,Mi,e.toString())}function ct(t){return parseInt(ot(t,Mi))||0}const R={local:!0,session:!0},Si={local:new Set,session:new Set};let bt=!1;function Zn(t){bt=t}let we=typeof window==\"undefined\"?{}:window;function xi(t){const e=t+\"Storage\";try{if(we&&we[e]&&typeof we[e].length==\"number\")return we[e]}catch{}R[t]=!1}function Ci(t,e){const i=xi(t);if(!i)return;const r=ot(i,qt);if(r!==Vt){if(r){const c=ct(i);for(let a=0;a<c;a++)zt(i,pe+a.toString())}gt(i,qt,Vt),at(i,0);return}const n=Math.floor(Date.now()/$i)-Qn,s=c=>{const a=pe+c.toString(),l=ot(i,a);if(typeof l==\"string\"){try{const u=JSON.parse(l);if(typeof u==\"object\"&&typeof u.cached==\"number\"&&u.cached>n&&typeof u.provider==\"string\"&&typeof u.data==\"object\"&&typeof u.data.prefix==\"string\"&&e(u,c))return!0}catch{}zt(i,a)}};let o=ct(i);for(let c=o-1;c>=0;c--)s(c)||(c===o-1?(o--,at(i,o)):Si[t].add(c))}function ki(){if(!bt){Zn(!0);for(const t in R)Ci(t,e=>{const i=e.data,r=e.provider,n=i.prefix,s=O(r,n);if(!ft(s,i).length)return!1;const o=i.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,o):o,!0})}}function Yn(t,e){const i=t.lastModifiedCached;if(i&&i>=e)return i===e;if(t.lastModifiedCached=e,i)for(const r in R)Ci(r,n=>{const s=n.data;return n.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function Xn(t,e){bt||ki();function i(r){let n;if(!R[r]||!(n=xi(r)))return;const s=Si[r];let o;if(s.size)s.delete(o=Array.from(s).shift());else if(o=ct(n),!at(n,o+1))return;const c={cached:Math.floor(Date.now()/$i),provider:t.provider,data:e};return gt(n,pe+o.toString(),JSON.stringify(c))}e.lastModified&&!Yn(t,e.lastModified)||!Object.keys(e.icons).length||(e.not_found&&(e=Object.assign({},e),delete e.not_found),i(\"local\")||i(\"session\"))}function Ft(){}function er(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Hn(t)}))}function tr(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:i,prefix:r}=t,n=t.iconsToLoad;delete t.iconsToLoad;let s;if(!n||!(s=st(i)))return;s.prepare(i,r,n).forEach(c=>{Ei(i,c,a=>{if(typeof a!=\"object\")c.icons.forEach(l=>{t.missing.add(l)});else try{const l=ft(t,a);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),Xn(t,a)}catch(l){console.error(l)}er(t)})})}))}const _t=(t,e)=>{const i=zn(t,!0,vi()),r=Gn(i);if(!r.pending.length){let a=!0;return e&&setTimeout(()=>{a&&e(r.loaded,r.missing,r.pending,Ft)}),()=>{a=!1}}const n=Object.create(null),s=[];let o,c;return r.pending.forEach(a=>{const{provider:l,prefix:u}=a;if(u===c&&l===o)return;o=l,c=u,s.push(O(l,u));const d=n[l]||(n[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(a=>{const{provider:l,prefix:u,name:d}=a,p=O(l,u),f=p.pendingIcons||(p.pendingIcons=new Set);f.has(d)||(f.add(d),n[l][u].push(d))}),s.forEach(a=>{const{provider:l,prefix:u}=a;n[l][u].length&&tr(a,n[l][u])}),e?qn(e,r,s):Ft},ir=t=>new Promise((e,i)=>{const r=typeof t==\"string\"?_e(t,!0):t;if(!r){i(t);return}_t([r||t],n=>{if(n.length&&r){const s=he(r);if(s){e({...be,...s});return}}i(t)})});function nr(t){try{const e=typeof t==\"string\"?JSON.parse(t):t;if(typeof e.body==\"string\")return{...e}}catch{}}function rr(t,e){const i=typeof t==\"string\"?_e(t,!0,!0):null;if(!i){const s=nr(t);return{value:t,data:s}}const r=he(i);if(r!==void 0||!i.prefix)return{value:t,name:i,data:r};const n=_t([i],()=>e(t,i,he(i)));return{value:t,name:i,loading:n}}function Ze(t){return t.hasAttribute(\"inline\")}let Pi=!1;try{Pi=navigator.vendor.indexOf(\"Apple\")===0}catch{}function sr(t,e){switch(e){case\"svg\":case\"bg\":case\"mask\":return e}return e!==\"style\"&&(Pi||t.indexOf(\"<a\")===-1)?\"svg\":t.indexOf(\"currentColor\")===-1?\"bg\":\"mask\"}const or=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ar=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function lt(t,e,i){if(e===1)return t;if(i=i||100,typeof t==\"number\")return Math.ceil(t*e*i)/i;if(typeof t!=\"string\")return t;const r=t.split(or);if(r===null||!r.length)return t;const n=[];let s=r.shift(),o=ar.test(s);for(;;){if(o){const c=parseFloat(s);isNaN(c)?n.push(s):n.push(Math.ceil(c*e*i)/i)}else n.push(s);if(s=r.shift(),s===void 0)return n.join(\"\");o=!o}}const cr=t=>t===\"unset\"||t===\"undefined\"||t===\"none\";function Ii(t,e){const i={...be,...t},r={...gi,...e},n={left:i.left,top:i.top,width:i.width,height:i.height};let s=i.body;[i,r].forEach(y=>{const _=[],Be=y.hFlip,ye=y.vFlip;let A=y.rotate;Be?ye?A+=2:(_.push(\"translate(\"+(n.width+n.left).toString()+\" \"+(0-n.top).toString()+\")\"),_.push(\"scale(-1 1)\"),n.top=n.left=0):ye&&(_.push(\"translate(\"+(0-n.left).toString()+\" \"+(n.height+n.top).toString()+\")\"),_.push(\"scale(1 -1)\"),n.top=n.left=0);let T;switch(A<0&&(A-=Math.floor(A/4)*4),A=A%4,A){case 1:T=n.height/2+n.top,_.unshift(\"rotate(90 \"+T.toString()+\" \"+T.toString()+\")\");break;case 2:_.unshift(\"rotate(180 \"+(n.width/2+n.left).toString()+\" \"+(n.height/2+n.top).toString()+\")\");break;case 3:T=n.width/2+n.left,_.unshift(\"rotate(-90 \"+T.toString()+\" \"+T.toString()+\")\");break}A%2===1&&(n.left!==n.top&&(T=n.left,n.left=n.top,n.top=T),n.width!==n.height&&(T=n.width,n.width=n.height,n.height=T)),_.length&&(s='<g transform=\"'+_.join(\" \")+'\">'+s+\"</g>\")});const o=r.width,c=r.height,a=n.width,l=n.height;let u,d;o===null?(d=c===null?\"1em\":c===\"auto\"?l:c,u=lt(d,a/l)):(u=o===\"auto\"?a:o,d=c===null?lt(u,l/a):c===\"auto\"?l:c);const p={},f=(y,_)=>{cr(_)||(p[y]=_.toString())};return f(\"width\",u),f(\"height\",d),p.viewBox=n.left.toString()+\" \"+n.top.toString()+\" \"+a.toString()+\" \"+l.toString(),{attributes:p,body:s}}const lr=()=>{let t;try{if(t=fetch,typeof t==\"function\")return t}catch{}};let Ie=lr();function ur(t){Ie=t}function dr(){return Ie}function hr(t,e){const i=je(t);if(!i)return 0;let r;if(!i.maxURL)r=0;else{let n=0;i.resources.forEach(o=>{n=Math.max(n,o.length)});const s=e+\".json?icons=\";r=i.maxURL-n-i.path.length-s.length}return r}function pr(t){return t===404}const fr=(t,e,i)=>{const r=[],n=hr(t,e),s=\"icons\";let o={type:s,provider:t,prefix:e,icons:[]},c=0;return i.forEach((a,l)=>{c+=a.length+1,c>=n&&l>0&&(r.push(o),o={type:s,provider:t,prefix:e,icons:[]},c=a.length),o.icons.push(a)}),r.push(o),r};function mr(t){if(typeof t==\"string\"){const e=je(t);if(e)return e.path}return\"/\"}const gr=(t,e,i)=>{if(!Ie){i(\"abort\",424);return}let r=mr(e.provider);switch(e.type){case\"icons\":{const s=e.prefix,c=e.icons.join(\",\"),a=new URLSearchParams({icons:c});r+=s+\".json?\"+a.toString();break}case\"custom\":{const s=e.uri;r+=s.slice(0,1)===\"/\"?s.slice(1):s;break}default:i(\"abort\",400);return}let n=503;Ie(t+r).then(s=>{const o=s.status;if(o!==200){setTimeout(()=>{i(pr(o)?\"abort\":\"next\",o)});return}return n=501,s.json()}).then(s=>{if(typeof s!=\"object\"||s===null){setTimeout(()=>{s===404?i(\"abort\",s):i(\"next\",n)});return}setTimeout(()=>{i(\"success\",s)})}).catch(()=>{i(\"next\",n)})},br={prepare:fr,send:gr};function Kt(t,e){switch(t){case\"local\":case\"session\":R[t]=e;break;case\"all\":for(const i in R)R[i]=e;break}}const Ye=\"data-style\";let Di=\"\";function _r(t){Di=t}function Wt(t,e){let i=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(Ye));i||(i=document.createElement(\"style\"),i.setAttribute(Ye,Ye),t.appendChild(i)),i.textContent=\":host{display:inline-block;vertical-align:\"+(e?\"-0.125em\":\"0\")+\"}span,svg{display:block}\"+Di}function Oi(){Ut(\"\",br),vi(!0);let t;try{t=window}catch{}if(t){if(ki(),t.IconifyPreload!==void 0){const i=t.IconifyPreload,r=\"Invalid IconifyPreload syntax.\";typeof i==\"object\"&&i!==null&&(i instanceof Array?i:[i]).forEach(n=>{try{(typeof n!=\"object\"||n===null||n instanceof Array||typeof n.icons!=\"object\"||typeof n.prefix!=\"string\"||!Rt(n))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const i=t.IconifyProviders;if(typeof i==\"object\"&&i!==null)for(const r in i){const n=\"IconifyProviders[\"+r+\"] is invalid.\";try{const s=i[r];if(typeof s!=\"object\"||!s||s.resources===void 0)continue;Gt(r,s)||console.error(n)}catch{console.error(n)}}}}return{enableCache:i=>Kt(i,!0),disableCache:i=>Kt(i,!1),iconExists:Rn,getIcon:Un,listIcons:Bn,addIcon:Ai,addCollection:Rt,calculateSize:lt,buildIcon:Ii,loadIcons:_t,loadIcon:ir,addAPIProvider:Gt,appendCustomStyle:_r,_api:{getAPIConfig:je,setAPIModule:Ut,sendAPIQuery:Ei,setFetch:ur,getFetch:dr,listAPIProviders:Wn}}}function Li(t,e){let i=t.indexOf(\"xlink:\")===-1?\"\":' xmlns:xlink=\"http://www.w3.org/1999/xlink\"';for(const r in e)i+=\" \"+r+'=\"'+e[r]+'\"';return'<svg xmlns=\"http://www.w3.org/2000/svg\"'+i+\">\"+t+\"</svg>\"}function yr(t){return t.replace(/\"/g,\"'\").replace(/%/g,\"%25\").replace(/#/g,\"%23\").replace(/</g,\"%3C\").replace(/>/g,\"%3E\").replace(/\\s+/g,\" \")}function vr(t){return\"data:image/svg+xml,\"+yr(t)}function Ar(t){return'url(\"'+vr(t)+'\")'}const ut={\"background-color\":\"currentColor\"},Ni={\"background-color\":\"transparent\"},Jt={image:\"var(--svg)\",repeat:\"no-repeat\",size:\"100% 100%\"},Qt={\"-webkit-mask\":ut,mask:ut,background:Ni};for(const t in Qt){const e=Qt[t];for(const i in Jt)e[t+\"-\"+i]=Jt[i]}function Zt(t){return t?t+(t.match(/^[-0-9.]+$/)?\"px\":\"\"):\"inherit\"}function Tr(t,e,i){const r=document.createElement(\"span\");let n=t.body;n.indexOf(\"<a\")!==-1&&(n+=\"<!-- \"+Date.now()+\" -->\");const s=t.attributes,o=Li(n,{...s,width:e.width+\"\",height:e.height+\"\"}),c=Ar(o),a=r.style,l={\"--svg\":c,width:Zt(s.width),height:Zt(s.height),...i?ut:Ni};for(const u in l)a.setProperty(u,l[u]);return r}let se;function wr(){try{se=window.trustedTypes.createPolicy(\"iconify\",{createHTML:t=>t})}catch{se=null}}function Er(t){return se===void 0&&wr(),se?se.createHTML(t):t}function Mr(t){const e=document.createElement(\"span\"),i=t.attributes;let r=\"\";i.width||(r=\"width: inherit;\"),i.height||(r+=\"height: inherit;\"),r&&(i.style=r);const n=Li(t.body,i);return e.innerHTML=Er(n),e.firstChild}function Yt(t,e){const i=e.icon.data,r=e.customisations,n=Ii(i,r);r.preserveAspectRatio&&(n.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=e.renderedMode;let o;switch(s){case\"svg\":o=Mr(n);break;default:o=Tr(n,{...be,...i},s===\"mask\")}const c=Array.from(t.childNodes).find(a=>{const l=a.tagName&&a.tagName.toUpperCase();return l===\"SPAN\"||l===\"SVG\"});c?o.tagName===\"SPAN\"&&c.tagName===o.tagName?c.setAttribute(\"style\",o.getAttribute(\"style\")):t.replaceChild(o,c):t.appendChild(o)}function Xt(t,e,i){const r=i&&(i.rendered?i:i.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:r}}function $r(t=\"iconify-icon\"){let e,i;try{e=window.customElements,i=window.HTMLElement}catch{return}if(!e||!i)return;const r=e.get(t);if(r)return r;const n=[\"icon\",\"mode\",\"inline\",\"width\",\"height\",\"rotate\",\"flip\"],s=class extends i{constructor(){super();Ae(this,\"_shadowRoot\");Ae(this,\"_state\");Ae(this,\"_checkQueued\",!1);const a=this._shadowRoot=this.attachShadow({mode:\"open\"}),l=Ze(this);Wt(a,l),this._state=Xt({value:\"\"},l),this._queueCheck()}static get observedAttributes(){return n.slice(0)}attributeChangedCallback(a){if(a===\"inline\"){const l=Ze(this),u=this._state;l!==u.inline&&(u.inline=l,Wt(this._shadowRoot,l))}else this._queueCheck()}get icon(){const a=this.getAttribute(\"icon\");if(a&&a.slice(0,1)===\"{\")try{return JSON.parse(a)}catch{}return a}set icon(a){typeof a==\"object\"&&(a=JSON.stringify(a)),this.setAttribute(\"icon\",a)}get inline(){return Ze(this)}set inline(a){a?this.setAttribute(\"inline\",\"true\"):this.removeAttribute(\"inline\")}restartAnimation(){const a=this._state;if(a.rendered){const l=this._shadowRoot;if(a.renderedMode===\"svg\")try{l.lastChild.setCurrentTime(0);return}catch{}Yt(l,a)}}get status(){const a=this._state;return a.rendered?\"rendered\":a.icon.data===null?\"failed\":\"loading\"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const a=this._state,l=this.getAttribute(\"icon\");if(l!==a.icon.value){this._iconChanged(l);return}if(!a.rendered)return;const u=this.getAttribute(\"mode\"),d=jt(this);(a.attrMode!==u||Pn(a.customisations,d))&&this._renderIcon(a.icon,d,u)}_iconChanged(a){const l=rr(a,(u,d,p)=>{const f=this._state;if(f.rendered||this.getAttribute(\"icon\")!==u)return;const y={value:u,name:d,data:p};y.data?this._gotIconData(y):f.icon=y});l.data?this._gotIconData(l):this._state=Xt(l,this._state.inline,this._state)}_gotIconData(a){this._checkQueued=!1,this._renderIcon(a,jt(this),this.getAttribute(\"mode\"))}_renderIcon(a,l,u){const d=sr(a.data.body,u),p=this._state.inline;Yt(this._shadowRoot,this._state={rendered:!0,icon:a,inline:p,customisations:l,attrMode:u,renderedMode:d})}};n.forEach(c=>{c in s.prototype||Object.defineProperty(s.prototype,c,{get:function(){return this.getAttribute(c)},set:function(a){a!==null?this.setAttribute(c,a):this.removeAttribute(c)}})});const o=Oi();for(const c in o)s[c]=s.prototype[c]=o[c];return e.define(t,s),s}$r()||Oi();var Sr=S`.btn,button{cursor:pointer;border-radius:4px;color:#03a9f4;border:none;background-color:unset;padding:8px;font-weight:500;font-size:12.25px;letter-spacing:1.09375px;text-transform:uppercase;margin-right:-8px}.btn:active,button:active{background-image:rgba(127,127,127,.2);transition-duration:1s}.btn:hover,button:hover{background-color:rgba(127,127,127,.2);transition-duration:1s}.abuttonIsState{background-color:#28a745;color:#fff;border:none;padding:10px 20px;font-size:16px;border-radius:4px;transition:background-color .3s ease}`,xr=S`.main-grid{display:grid;grid-template-columns:1fr 1fr;width:100%;padding-bottom:2rem}.main-buttons{display:grid;gap:1rem;justify-content:center;grid-template-columns:auto auto auto auto;align-content:center;align-items:center;justify-content:center}@media (max-width:1024px){.main-grid{grid-template-columns:1fr}.main-buttons{gap:.5rem;grid-template-columns:auto auto auto}}.flex-grid-half{display:grid;grid-template-columns:700px 2fr}.flex-grid-half.expanded_entity,.flex-grid-half.expanded_logs{grid-template-columns:1fr}.flex-grid-half .col{margin:8px}.flex-grid-half .col:nth-child(2){overflow:hidden}.flex-grid-half.expanded_logs .col:nth-child(1){display:none}.flex-grid-half.expanded_entity .col:nth-child(2){display:none}@media (max-width:1024px){.flex-grid,.flex-grid-half{display:block}.flex-grid-half .col{width:100%!important;margin:0 0 10px 0!important;display:block!important}}*{box-sizing:border-box}.flex-grid{margin:0 0 20px 0}h1{text-align:center;width:100%;line-height:1.1em;margin-block:.25em}header div{text-align:center;width:100%}header #logo,header iconify-icon{float:right;font-size:2.5rem;color:rgba(127,127,127,.5)}header #logo{float:left;color:rgba(127,127,127,.5)}.connected{color:rgba(0,157,16,.75)}esp-logo{float:left;line-height:1em;font-size:initial}form{display:flex;justify-content:space-between;background-color:rgba(127,127,127,.05);border-radius:12px;border-width:1px;border-style:solid;border-color:rgba(127,127,127,.12)}form .btn{margin-right:0}.helper{width:75%;padding:1rem;margin:.3rem 0;background-color:rgba(127,127,127,.3);border-radius:.5rem}`,Cr=Object.defineProperty,kr=Object.getOwnPropertyDescriptor,z=(t,e,i,r)=>{for(var n=r>1?void 0:r?kr(e,i):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(r?o(e,i,n):o(n))||n);return r&&n&&Cr(e,i,n),n};window.source=new EventSource(pt()+\"/events\");window.entities=[];const Ee={};var ti;(ti=window.source)==null||ti.addEventListener(\"state\",t=>{const e=t,i=JSON.parse(e.data.replace(/[\\u0000-\\u001F\\u007F-\\u009F]/g,\"\"));let r=window.entities.findIndex(n=>n.unique_id===i.id);if(r!=-1&&i.id){if(typeof i.value==\"number\"){let n=[...window.entities[r].value_numeric_history];n.push(i.value),window.entities[r].value_numeric_history=n.splice(-50)}delete i.id,delete i.domain,delete i.unique_id,Object.assign(window.entities[r],i)}else if(i!=null&&i.name)ei(i);else{if(Ee[i.id]?Ee[i.id]++:Ee[i.id]=1,Ee[i.id]<1)return;let n=i.id.split(\"-\"),s=n[0],o=n.slice(1).join(\"-\");fetch(`${window.apiBasePath}/${s}/${o}?detail=all`,{method:\"GET\"}).then(c=>{if(console.log(c),!c.ok)throw new Error(`HTTP error! Status: ${c.status}`);return c.json()}).then(c=>{console.log(c),ei(c)}).catch(c=>{console.error(\"Fetch error:\",c)})}});function ei(t){if(console.log(t),window.entities.findIndex(i=>i.unique_id===t.id)===-1&&t.id){let i=t.id.split(\"-\"),r={...t,domain:i[0],unique_id:t.id,id:i.slice(1).join(\"-\"),entity_category:t.entity_category,value_numeric_history:[t.value]};r.has_action=`render_${r.domain}`in pi.prototype,window.entities.push(r),Q.set(r)}}function Pr(t){const e=Math.sign(t);if(t===0)return new Intl.RelativeTimeFormat(\"en\").format(0,\"second\");const i=[{type:\"year\",seconds:12*30*24*60*60*1e3},{type:\"month\",seconds:30*24*60*60*1e3},{type:\"week\",seconds:7*24*60*60*1e3},{type:\"day\",seconds:24*60*60*1e3},{type:\"hour\",seconds:60*60*1e3},{type:\"minute\",seconds:60*1e3},{type:\"second\",seconds:1e3}];let r=\"\";const n=new Intl.RelativeTimeFormat(\"en\");let s=0;for(let o of i){const c=Math.trunc(Math.abs(t/o.seconds));if(c>0){const a=n.format(c*e,o.type);if(t-=c*o.seconds*e,r+=s===0&&o.type!=\"second\"?a.replace(\" ago\",\" \"):a,s++>=1)break}}return r}let L=class extends E{constructor(){super(),this.scheme=\"\",this.ping=0,this.connected=!0,this.lastUpdate=0,this.showLog=localStorage.showLog===\"true\",this.version=\"3.0.0\",this.config={ota:!1,log:!0,title:\"\",comment:\"\",lang:\"\"},this.darkQuery=window.matchMedia(\"(prefers-color-scheme: dark)\"),this.frames=[{},{color:\"rgba(0, 196, 21, 0.75)\"},{}];const t=document.querySelector(\"script#config\");console.log(t),t&&this.setConfig(JSON.parse(t.innerText))}setConfig(t){\"log\"in t||(t.log=this.config.log),this.config=t,document.title=t.title,document.documentElement.lang=t.lang;const[e,i,r]=t.comment.split(\"|\");this.nbsconfig={type:e,version:i,comment:r}}firstUpdated(t){super.firstUpdated(t),document.getElementsByTagName(\"head\")[0].innerHTML+='<meta name=viewport content=\"width=device-width, initial-scale=1,user-scalable=no\">';const e=document.querySelector(\"link[rel~='icon']\");e.href='data:image/svg+xml,<svg width=\"32\" height=\"32\" xmlns=\"http://www.w3.org/2000/svg\"><style>path{stroke-width:1;fill:black;stroke:black;stroke-linecap:round;stroke-linejoin:round}@media (prefers-color-scheme:dark){path{fill:white;stroke:white}}</style><path d=\"M1.3 18H5v10h21.8V18h3.7l-3.7-3.7V7.8h-2.4V12l-8.7-8.7L1.3 18Z\"/></svg>',this.scheme=this.schemeDefault(),window.source.addEventListener(\"ping\",i=>{var r;(r=i.data)!=null&&r.length&&(this.setConfig(JSON.parse(i.data)),this.requestUpdate()),this._updateUptime(i),this.lastUpdate=Date.now()}),window.source.addEventListener(\"log\",i=>{this._updateUptime(i),this.lastUpdate=Date.now()}),window.source.addEventListener(\"state\",i=>{this.lastUpdate=Date.now()}),window.source.addEventListener(\"error\",i=>{console.dir(i),this.connected=!1,this.requestUpdate()}),setInterval(()=>{this.connected=!!this.ping&&Date.now()-this.lastUpdate<15e3},5e3),document.addEventListener(\"entity-tab-header-double-clicked\",i=>{var n;const r=(n=this.shadowRoot)==null?void 0:n.querySelector(\"main.flex-grid-half\");r==null||r.classList.toggle(\"expanded_entity\")}),document.addEventListener(\"log-tab-header-double-clicked\",i=>{var n;const r=(n=this.shadowRoot)==null?void 0:n.querySelector(\"main.flex-grid-half\");r==null||r.classList.toggle(\"expanded_logs\")})}schemeDefault(){return this.darkQuery.matches?\"dark\":\"light\"}updated(t){super.updated(t),t.has(\"scheme\")&&document.documentElement.style.setProperty(\"color-scheme\",this.scheme),t.has(\"ping\")&&this.ping&&this.beat.animate(this.frames,1e3)}uptime(){return`${Pr(-this.ping|0)}`}renderOta(){if(this.config.ota){let t=pt();return h`<form method=\"POST\" action=\"${t}/update\" enctype=\"multipart/form-data\"><input class=\"btn\" type=\"file\" name=\"update\" accept=\"application/octet-stream\"> <input class=\"btn\" type=\"submit\" value=\"Update\"></form>`}}renderLog(){return!this.config.log||!this.showLog?g:h`<section id=\"col_logs\" class=\"col\"><esp-log rows=\"50\" .scheme=\"${this.scheme}\"></esp-log></section>`}renderTitle(){var t,e;return h`<h1>${this.config.title||h` `}</h1><div>${[(t=this.nbsconfig)==null?void 0:t.comment,`started ${this.uptime()}`,(e=this.nbsconfig)==null?void 0:e.version].filter(i=>i).map(i=>`${i}`).join(\" \\xB7 \")}</div>`}render(){var t,e,i,r,n,s,o;return h`<header><iconify-icon .icon=\"${this.connected?\"mdi:circle\":\"mdi:circle-off-outline\"}\" .title=\"${this.uptime()}\" class=\"top-icon ${this.connected?\"connected\":\"\"}\" id=\"beat\"></iconify-icon><a href=\"#\" id=\"scheme\" @click=\"${()=>{this.scheme=this.scheme!==\"dark\"?\"dark\":\"light\"}}\"><iconify-icon icon=\"mdi:theme-light-dark\" class=\"top-icon\"></iconify-icon></a>${this.renderTitle()}</header><div class=\"main-grid\"><div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center\"><div style=\"display:flex;gap:1rem;flex-direction:column;width:100%\"><div class=\"main-buttons\"><custom-button click=\"${w.house_clean}\"></custom-button><custom-button click=\"${w.spot_clean}\"></custom-button><custom-button click=\"${w.locate_robot}\"></custom-button>${((t=this.nbsconfig)==null?void 0:t.type)===\"gen3\"?h`<custom-button click=\"${v.send_to_base}\"></custom-button>`:g} ${((e=this.nbsconfig)==null?void 0:e.type)===\"gen2\"?h`<custom-button click=\"${Tn.send_to_start}\"></custom-button>`:g}<custom-button click=\"${w.pause_cleaning}\"></custom-button><custom-button click=\"${w.resume_cleaning}\"></custom-button><custom-button click=\"${w.stop_cleaning}\"></custom-button><custom-button click=\"${w.update_status}\"></custom-button><custom-button click=\"${w.shutdown}\"></custom-button><custom-button click=\"${w.powercycle}\"></custom-button><custom-button click=\"${w.reboot_esp}\"></custom-button><custom-button name=\"Clear Errors\" click=\"${w.clear_errors}\"></custom-button></div>${((i=this.nbsconfig)==null?void 0:i.type)===\"gen3\"?h`<hr style=\"width:100%\"><custom-table .entityIds=\"${[C.last_cleaning_time,C.last_cleaning_type,ie.last_cleaning_duration]}\"></custom-table>`:g}</div></div><div style=\"display:flex;justify-content:center;flex-direction:column\"><custom-table .entityIds=\"${[ie.fuel_percent,Te.ext_power_present,C.ui_state,C.robot_error,C.robot_alert,C.nbs_time]}\" .customNames=\"${{[Te.ext_power_present]:\"Docked\"}}\" .customValues=\"${{[C.robot_error]:c=>c.startsWith(\"200\")?\"No errors\":c,[C.robot_alert]:c=>c.startsWith(\"200\")?\"No alerts\":c}}\"></custom-table><hr style=\"width:100%\"><custom-table .entityIds=\"${[Lt.spot_clean_height,Lt.spot_clean_width]}\"></custom-table><custom-button name=\"Spot Clean\" click=\"${v.spot_clean__height___width_}\" style=\"align-self:center\"></custom-button></div></div><div class=\"main-grid\"><div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center\">${((r=this.nbsconfig)==null?void 0:r.type)===\"gen2\"?h`<custom-table style=\"width:50%\" .entityIds=\"${[We.robot_schedule]}\"></custom-table>`:g}<esp-schedule style=\"width:50%\"></esp-schedule></div><div style=\"display:flex;justify-content:center;flex-direction:column\"><custom-table .entityIds=\"${[wn.navigation_mode,$.test_mode,$.eco_mode,$.play_extra_sounds,$.click_sounds,$.melody_sounds,$.warning_sounds,$.bin_full_detect,...((n=this.nbsconfig)==null?void 0:n.type)===\"gen2\"?[We.autoshutdown,We.stealthled]:[],$.led,$.wall_enable,$.intenseclean,$.wifi]}\"></custom-table></div></div><div class=\"main-grid\"><div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center\">${((s=this.nbsconfig)==null?void 0:s.type)===\"gen3\"?h`<manual-driving></manual-driving>`:g}</div><div style=\"display:flex;justify-content:center;flex-direction:column\"><custom-table .entityIds=\"${[C.model,C.software,C.serial_number,Te.battery_failure,Te.battery_over_temp,ie.battery_cycles,ie.battery_voltage_v,ie.battery_temp_c_avg,Nt.timezone,Nt.schedule,fi.logger]}\"></custom-table></div></div><div class=\"main-grid\"><div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center\"><timezone-selector></timezone-selector></div><div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center\"><span class=\"helper\">The manual for the Webserver can be found <a href=\"https://github.com/Philip2809/neato-brainslug/blob/main/manual.md\" target=\"_blank\">here</a>. </span><span class=\"helper\">When new updates for Neato Brainslug is out, you can easily update your device by uploading the OTA file here! </span>${this.renderOta()} <span class=\"helper\" style=\"display:flex;align-items:center\"><code>Type: ${(o=this.nbsconfig)==null?void 0:o.type}</code>       Toggle the debug logs:  <a href=\"#\" title=\"Toggle log\" @click=\"${()=>{this.showLog=!this.showLog,localStorage.showLog=String(this.showLog)}}\"><iconify-icon style=\"font-size:2rem;color:rgba(177,177,177,.8)\" icon=\"mdi:console\" class=\"top-icon\"></iconify-icon></a></span></div></div>${this.renderLog()}`}_updateUptime(t){t.lastEventId&&(this.ping=parseInt(t.lastEventId),this.connected=!0,this.requestUpdate())}static get styles(){return[me,Sr,xr,di]}};z([x()],L.prototype,\"scheme\",2);z([x()],L.prototype,\"ping\",2);z([x()],L.prototype,\"connected\",2);z([x()],L.prototype,\"lastUpdate\",2);z([ci(\"#beat\")],L.prototype,\"beat\",2);z([x()],L.prototype,\"showLog\",2);L=z([k(\"esp-app\")],L);\n"
  },
  {
    "path": "config/local.yaml",
    "content": "substitutions:\n  name: neato-vacuum # If you want another name, change it here, remeber to replace it in the ha-card.yaml!\n  comment: \"\" # If you want to write a comment about this vacuum, do so here. e.g. \"Downstairs garage vacuum\"\n\n  infointerval: 2sec\n  chargerinterval: 2min\n\n  ota_password: !secret neato_vacuum_ota\n\n  ### If you are using ha:\n  wifi_ssid: !secret wifi_ssid\n  wifi_password: !secret wifi_password\n  ha_encryption_key: !secret neato_vacuum_api\n\n  ### If you want to change the UART Pins\n  # uart_tx: 17\n  # uart_rx: 16\n\n\nwifi:\n  ### If your router sets another TLD for local devices, specify that here\n  # domain: .lan\n  ### If you are having issues with the dns or are 100% this will be the ip, you can spesify that here\n  # use_address: 192.168.205.199\n\n\n\n\npackages:\n  - !include boards/esp32.yaml\n  # - !include boards/esp32c3.yaml\n  # - !include boards/esp32s3.yaml\n  # - !include boards/esp32s2.yaml\n\n  - !include comp/ha.yaml             # Remember to set wifi credentials and ha_encryption_key in the substitutions if you are using this\n  # - !include comp/no-ha.yaml\n\n  - !include comp/webserver.yaml\n  - !include comp/gen3.yaml\n  # - !include comp/gen2.yaml\n\n  - !include comp/ros.yaml"
  },
  {
    "path": "config/prebuilt/.gitignore",
    "content": "# Gitignore settings for ESPHome\n# This is an example and may include too much for your use-case.\n# You can modify this file to suit your needs.\n/.esphome/\n/secrets.yaml\n"
  },
  {
    "path": "config/prebuilt/gen2-esp32.yaml",
    "content": "substitutions:\n  name: neato-vacuum # If you want another name, change it here, remeber to replace it in the ha-card.yaml!\n  comment: \"\" # If you want to write a comment about this vacuum, do so here. e.g. \"Downstairs garage vacuum\"\n\n  infointerval: 2sec\n  chargerinterval: 2min\n\n  ota_password: !secret brainslug_ota\n\n\npackages:\n  - !include ../boards/esp32.yaml\n  # - !include ../boards/esp32c3.yaml\n  # - !include ../boards/esp32s3.yaml\n\n  # - !include ../comp/ha.yaml\n  - !include ../comp/no-ha.yaml\n\n  - !include ../comp/webserver.yaml\n  # - !include ../comp/gen3.yaml\n  - !include ../comp/gen2.yaml"
  },
  {
    "path": "config/prebuilt/gen2-esp32c3.yaml",
    "content": "substitutions:\n  name: neato-vacuum # If you want another name, change it here, remeber to replace it in the ha-card.yaml!\n  comment: \"\" # If you want to write a comment about this vacuum, do so here. e.g. \"Downstairs garage vacuum\"\n\n  infointerval: 2sec\n  chargerinterval: 2min\n\n  ota_password: !secret brainslug_ota\n\n\npackages:\n  # - !include ../boards/esp32.yaml\n  - !include ../boards/esp32c3.yaml\n  # - !include ../boards/esp32s3.yaml\n\n  # - !include ../comp/ha.yaml\n  - !include ../comp/no-ha.yaml\n\n  - !include ../comp/webserver.yaml\n  # - !include ../comp/gen3.yaml\n  - !include ../comp/gen2.yaml"
  },
  {
    "path": "config/prebuilt/gen2-esp32c6.yaml",
    "content": "substitutions:\n  name: neato-vacuum # If you want another name, change it here, remeber to replace it in the ha-card.yaml!\n  comment: \"\" # If you want to write a comment about this vacuum, do so here. e.g. \"Downstairs garage vacuum\"\n\n  infointerval: 2sec\n  chargerinterval: 2min\n\n  ota_password: !secret brainslug_ota\n\n\npackages:\n  # - !include ../boards/esp32.yaml\n  - !include ../boards/esp32c6.yaml\n  # - !include ../boards/esp32s3.yaml\n\n  # - !include ../comp/ha.yaml\n  - !include ../comp/no-ha.yaml\n\n  - !include ../comp/webserver.yaml\n  # - !include ../comp/gen3.yaml\n  - !include ../comp/gen2.yaml"
  },
  {
    "path": "config/prebuilt/gen2-esp32s3.yaml",
    "content": "substitutions:\n  name: neato-vacuum # If you want another name, change it here, remeber to replace it in the ha-card.yaml!\n  comment: \"\" # If you want to write a comment about this vacuum, do so here. e.g. \"Downstairs garage vacuum\"\n\n  infointerval: 2sec\n  chargerinterval: 2min\n\n  ota_password: !secret brainslug_ota\n\n\npackages:\n  # - !include ../boards/esp32.yaml\n  # - !include ../boards/esp32c3.yaml\n  - !include ../boards/esp32s3.yaml\n\n  # - !include ../comp/ha.yaml\n  - !include ../comp/no-ha.yaml\n\n  - !include ../comp/webserver.yaml\n  # - !include ../comp/gen3.yaml\n  - !include ../comp/gen2.yaml"
  },
  {
    "path": "config/prebuilt/gen3-esp32.yaml",
    "content": "substitutions:\n  name: neato-vacuum # If you want another name, change it here, remeber to replace it in the ha-card.yaml!\n  comment: \"\" # If you want to write a comment about this vacuum, do so here. e.g. \"Downstairs garage vacuum\"\n\n  infointerval: 2sec\n  chargerinterval: 2min\n\n  ota_password: !secret brainslug_ota\n\n\npackages:\n  - !include ../boards/esp32.yaml\n  # - !include ../boards/esp32c3.yaml\n  # - !include ../boards/esp32s3.yaml\n\n  # - !include ../comp/ha.yaml\n  - !include ../comp/no-ha.yaml\n\n  - !include ../comp/webserver.yaml\n  - !include ../comp/gen3.yaml\n  # - !include ../comp/gen2.yaml"
  },
  {
    "path": "config/prebuilt/gen3-esp32c3.yaml",
    "content": "substitutions:\n  name: neato-vacuum # If you want another name, change it here, remeber to replace it in the ha-card.yaml!\n  comment: \"\" # If you want to write a comment about this vacuum, do so here. e.g. \"Downstairs garage vacuum\"\n\n  infointerval: 2sec\n  chargerinterval: 2min\n\n  ota_password: !secret brainslug_ota\n\n\npackages:\n  # - !include ../boards/esp32.yaml\n  - !include ../boards/esp32c3.yaml\n  # - !include ../boards/esp32s3.yaml\n\n  # - !include ../comp/ha.yaml\n  - !include ../comp/no-ha.yaml\n\n  - !include ../comp/webserver.yaml\n  - !include ../comp/gen3.yaml\n  # - !include ../comp/gen2.yaml"
  },
  {
    "path": "config/prebuilt/gen3-esp32c6.yaml",
    "content": "substitutions:\n  name: neato-vacuum # If you want another name, change it here, remeber to replace it in the ha-card.yaml!\n  comment: \"\" # If you want to write a comment about this vacuum, do so here. e.g. \"Downstairs garage vacuum\"\n\n  infointerval: 2sec\n  chargerinterval: 2min\n\n  ota_password: !secret brainslug_ota\n\n\npackages:\n  # - !include ../boards/esp32.yaml\n  - !include ../boards/esp32c6.yaml\n  # - !include ../boards/esp32s3.yaml\n\n  # - !include ../comp/ha.yaml\n  - !include ../comp/no-ha.yaml\n\n  - !include ../comp/webserver.yaml\n  - !include ../comp/gen3.yaml\n  # - !include ../comp/gen2.yaml"
  },
  {
    "path": "config/prebuilt/gen3-esp32s3.yaml",
    "content": "substitutions:\n  name: neato-vacuum # If you want another name, change it here, remeber to replace it in the ha-card.yaml!\n  comment: \"\" # If you want to write a comment about this vacuum, do so here. e.g. \"Downstairs garage vacuum\"\n\n  infointerval: 2sec\n  chargerinterval: 2min\n\n  ota_password: !secret brainslug_ota\n\n\npackages:\n  # - !include ../boards/esp32.yaml\n  # - !include ../boards/esp32c3.yaml\n  - !include ../boards/esp32s3.yaml\n\n  # - !include ../comp/ha.yaml\n  - !include ../comp/no-ha.yaml\n\n  - !include ../comp/webserver.yaml\n  - !include ../comp/gen3.yaml\n  # - !include ../comp/gen2.yaml"
  },
  {
    "path": "config/remote.yaml",
    "content": "substitutions:\n    name: neato-vacuum\n    comment: \"\"\n    infointerval: 2sec\n    chargerinterval: 2min\n    ota_password: !secret neato_vacuum_ota\n\n    ### If you are using ha:\n    wifi_ssid: !secret wifi_ssid\n    wifi_password: !secret wifi_password\n    ha_encryption_key: !secret neato_vacuum_api\n\n    ### If you want to change the UART Pins\n    # uart_tx: 17\n    # uart_rx: 16\n\n\nwifi:\n  ### If your router sets another TLD for local devices, specify that here\n  # domain: .lan\n  ### If you are having issues with the dns or are 100% this will be the ip, you can spesify that here\n  # use_address: 192.168.205.199\n\n\npackages:\n    remote_package_files:\n      url: https://github.com/philip2809/neato-brainslug\n      files:\n        # - config/boards/esp32.yaml\n        # - config/boards/esp32c3.yaml\n        # - config/boards/esp32s3.yaml\n        - config/boards/esp32s2.yaml\n\n        - config/comp/ha.yaml             # Remember to set wifi credentials and ha_encryption_key in the substitutions if you are using this\n        # - config/comp/no-ha.yaml\n\n        - config/comp/webserver.yaml\n        - config/comp/gen3.yaml\n        # - config/comp/gen2.yaml\n      ref: config\n"
  },
  {
    "path": "docs/404.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta http-equiv=\"refresh\" content=\"0; url=/\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/logo.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Brainslug Tools - Not Found</title>\n  </head>\n  <body>\n    <h1>404 - Not Found</h1>\n    <p>The page you are looking for does not exist. Redirecting to the main page...</p>\n  </body>\n</html> "
  },
  {
    "path": "docs/CNAME",
    "content": "brainslug.phma.dev"
  },
  {
    "path": "docs/assets/esp32-DR_yen0A.js",
    "content": "import{t as e}from\"./rom-D7P4LvQr.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP32`,this.IMAGE_CHIP_ID=0,this.EFUSE_RD_REG_BASE=1073061888,this.DR_REG_SYSCON_BASE=1073111040,this.UART_CLKDIV_REG=1072955412,this.UART_CLKDIV_MASK=1048575,this.UART_DATE_REG_ADDR=1610612856,this.XTAL_CLK_DIVIDER=1,this.FLASH_SIZES={\"1MB\":0,\"2MB\":16,\"4MB\":32,\"8MB\":48,\"16MB\":64},this.FLASH_WRITE_SIZE=1024,this.BOOTLOADER_FLASH_OFFSET=4096,this.SPI_REG_BASE=1072963584,this.SPI_USR_OFFS=28,this.SPI_USR1_OFFS=32,this.SPI_USR2_OFFS=36,this.SPI_W0_OFFS=128,this.SPI_MOSI_DLEN_OFFS=40,this.SPI_MISO_DLEN_OFFS=44}async readEfuse(e,t){let n=this.EFUSE_RD_REG_BASE+4*t;return e.debug(`Read efuse `+n),await e.readReg(n)}async getPkgVersion(e){let t=await this.readEfuse(e,3),n=t>>9&7;return n+=(t>>2&1)<<3,n}async getChipRevision(e){let t=await this.readEfuse(e,3),n=await this.readEfuse(e,5),r=await e.readReg(this.DR_REG_SYSCON_BASE+124),i=t>>15&1,a=n>>20&1,o=r>>31&1;return i==0?0:a==0?1:o==0?2:3}async getChipDescription(e){let t=[`ESP32-D0WDQ6`,`ESP32-D0WD`,`ESP32-D2WD`,``,`ESP32-U4WDH`,`ESP32-PICO-D4`,`ESP32-PICO-V3-02`],n=``,r=await this.getPkgVersion(e),i=await this.getChipRevision(e),a=i==3;return await this.readEfuse(e,3)&1&&(t[0]=`ESP32-S0WDQ6`,t[1]=`ESP32-S0WD`),a&&(t[5]=`ESP32-PICO-V3`),n=r>=0&&r<=6?t[r]:`Unknown ESP32`,a&&(r===0||r===1)&&(n+=`-V3`),n+` (revision `+i+`)`}async getChipFeatures(e){let t=[`Wi-Fi`],n=await this.readEfuse(e,3);n&2||t.push(` BT`),n&1?t.push(` Single Core`):t.push(` Dual Core`),n&8192&&(n&4096?t.push(` 160MHz`):t.push(` 240MHz`));let r=await this.getPkgVersion(e);[2,4,5,6].indexOf(r)!==-1&&t.push(` Embedded Flash`),r===6&&t.push(` Embedded PSRAM`),await this.readEfuse(e,4)>>8&31&&t.push(` VRef calibration in efuse`),n>>14&1&&t.push(` BLK3 partially reserved`);let i=await this.readEfuse(e,6)&3;return t.push(` Coding Scheme `+[`None`,`3/4`,`Repeat (UNSUPPORTED)`,`Invalid`][i]),t}async getCrystalFreq(e){let t=await e.readReg(this.UART_CLKDIV_REG)&this.UART_CLKDIV_MASK,n=e.transport.baudrate*t/1e6/this.XTAL_CLK_DIVIDER,r;return r=n>33?40:26,Math.abs(r-n)>1&&e.info(`WARNING: Unsupported crystal in use`),r}_d2h(e){let t=(+e).toString(16);return t.length===1?`0`+t:t}async readMac(e){let t=await this.readEfuse(e,1);t>>>=0;let n=await this.readEfuse(e,2);n>>>=0;let r=new Uint8Array(6);return r[0]=n>>8&255,r[1]=n&255,r[2]=t>>24&255,r[3]=t>>16&255,r[4]=t>>8&255,r[5]=t&255,this._d2h(r[0])+`:`+this._d2h(r[1])+`:`+this._d2h(r[2])+`:`+this._d2h(r[3])+`:`+this._d2h(r[4])+`:`+this._d2h(r[5])}};export{t as ESP32ROM};"
  },
  {
    "path": "docs/assets/esp32c2-CIvS3qc5.js",
    "content": "import{ESP32C3ROM as e}from\"./esp32c3-nJJ15ppW.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP32-C2`,this.IMAGE_CHIP_ID=12,this.EFUSE_BASE=1610647552,this.MAC_EFUSE_REG=this.EFUSE_BASE+64,this.UART_CLKDIV_REG=1610612756,this.UART_CLKDIV_MASK=1048575,this.UART_DATE_REG_ADDR=1610612860,this.XTAL_CLK_DIVIDER=1,this.FLASH_WRITE_SIZE=1024,this.BOOTLOADER_FLASH_OFFSET=0,this.FLASH_SIZES={\"1MB\":0,\"2MB\":16,\"4MB\":32,\"8MB\":48,\"16MB\":64},this.SPI_REG_BASE=1610620928,this.SPI_USR_OFFS=24,this.SPI_USR1_OFFS=28,this.SPI_USR2_OFFS=32,this.SPI_MOSI_DLEN_OFFS=36,this.SPI_MISO_DLEN_OFFS=40,this.SPI_W0_OFFS=88}async getPkgVersion(e){let t=this.EFUSE_BASE+64+4;return await e.readReg(t)>>22&7}async getChipRevision(e){let t=this.EFUSE_BASE+64+4;return(await e.readReg(t)&3<<20)>>20}async getChipDescription(e){let t,n=await this.getPkgVersion(e);t=n===0||n===1?`ESP32-C2`:`unknown ESP32-C2`;let r=await this.getChipRevision(e);return t+=` (revision `+r+`)`,t}async getChipFeatures(e){return[`Wi-Fi`,`BLE`]}async getCrystalFreq(e){let t=await e.readReg(this.UART_CLKDIV_REG)&this.UART_CLKDIV_MASK,n=e.transport.baudrate*t/1e6/this.XTAL_CLK_DIVIDER,r;return r=n>33?40:26,Math.abs(r-n)>1&&e.info(`WARNING: Unsupported crystal in use`),r}async changeBaudRate(e){await this.getCrystalFreq(e)===26&&e.changeBaud()}_d2h(e){let t=(+e).toString(16);return t.length===1?`0`+t:t}async readMac(e){let t=await e.readReg(this.MAC_EFUSE_REG);t>>>=0;let n=await e.readReg(this.MAC_EFUSE_REG+4);n=n>>>0&65535;let r=new Uint8Array(6);return r[0]=n>>8&255,r[1]=n&255,r[2]=t>>24&255,r[3]=t>>16&255,r[4]=t>>8&255,r[5]=t&255,this._d2h(r[0])+`:`+this._d2h(r[1])+`:`+this._d2h(r[2])+`:`+this._d2h(r[3])+`:`+this._d2h(r[4])+`:`+this._d2h(r[5])}getEraseSize(e,t){return t}};export{t as ESP32C2ROM};"
  },
  {
    "path": "docs/assets/esp32c3-nJJ15ppW.js",
    "content": "import{t as e}from\"./rom-D7P4LvQr.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP32-C3`,this.IMAGE_CHIP_ID=5,this.EFUSE_BASE=1610647552,this.MAC_EFUSE_REG=this.EFUSE_BASE+68,this.UART_CLKDIV_REG=1072955412,this.UART_CLKDIV_MASK=1048575,this.UART_DATE_REG_ADDR=1610612860,this.FLASH_WRITE_SIZE=1024,this.BOOTLOADER_FLASH_OFFSET=0,this.FLASH_SIZES={\"1MB\":0,\"2MB\":16,\"4MB\":32,\"8MB\":48,\"16MB\":64},this.SPI_REG_BASE=1610620928,this.SPI_USR_OFFS=24,this.SPI_USR1_OFFS=28,this.SPI_USR2_OFFS=32,this.SPI_MOSI_DLEN_OFFS=36,this.SPI_MISO_DLEN_OFFS=40,this.SPI_W0_OFFS=88}async getPkgVersion(e){let t=this.EFUSE_BASE+68+12;return await e.readReg(t)>>21&7}async getChipRevision(e){let t=this.EFUSE_BASE+68+12;return(await e.readReg(t)&7<<18)>>18}async getMinorChipVersion(e){let t=this.EFUSE_BASE+68+20,n=await e.readReg(t)>>23&1,r=this.EFUSE_BASE+68+12,i=await e.readReg(r)>>18&7;return(n<<3)+i}async getMajorChipVersion(e){let t=this.EFUSE_BASE+68+20;return await e.readReg(t)>>24&3}async getChipDescription(e){let t={0:`ESP32-C3 (QFN32)`,1:`ESP8685 (QFN28)`,2:`ESP32-C3 AZ (QFN32)`,3:`ESP8686 (QFN24)`},n=await this.getPkgVersion(e),r=await this.getMajorChipVersion(e),i=await this.getMinorChipVersion(e);return`${t[n]||`Unknown ESP32-C3`} (revision v${r}.${i})`}async getFlashCap(e){let t=this.EFUSE_BASE+68+12;return await e.readReg(t)>>27&7}async getFlashVendor(e){let t=this.EFUSE_BASE+68+16,n=await e.readReg(t)>>0&7;return{1:`XMC`,2:`GD`,3:`FM`,4:`TT`,5:`ZBIT`}[n]||``}async getChipFeatures(e){let t=[`Wi-Fi`,`BLE`],n={0:null,1:`Embedded Flash 4MB`,2:`Embedded Flash 2MB`,3:`Embedded Flash 1MB`,4:`Embedded Flash 8MB`},r=await this.getFlashCap(e),i=await this.getFlashVendor(e),a=n[r],o=a===void 0?`Unknown Embedded Flash`:a;return a!==null&&t.push(`${o} (${i})`),t}async getCrystalFreq(e){return 40}_d2h(e){let t=(+e).toString(16);return t.length===1?`0`+t:t}async readMac(e){let t=await e.readReg(this.MAC_EFUSE_REG);t>>>=0;let n=await e.readReg(this.MAC_EFUSE_REG+4);n=n>>>0&65535;let r=new Uint8Array(6);return r[0]=n>>8&255,r[1]=n&255,r[2]=t>>24&255,r[3]=t>>16&255,r[4]=t>>8&255,r[5]=t&255,this._d2h(r[0])+`:`+this._d2h(r[1])+`:`+this._d2h(r[2])+`:`+this._d2h(r[3])+`:`+this._d2h(r[4])+`:`+this._d2h(r[5])}getEraseSize(e,t){return t}};export{t as ESP32C3ROM};"
  },
  {
    "path": "docs/assets/esp32c5-DbWg37P4.js",
    "content": "import{ESP32C6ROM as e}from\"./esp32c6-snJpA5DJ.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP32-C5`,this.IMAGE_CHIP_ID=23,this.BOOTLOADER_FLASH_OFFSET=8192,this.EFUSE_BASE=1611352064,this.EFUSE_BLOCK1_ADDR=this.EFUSE_BASE+68,this.MAC_EFUSE_REG=this.EFUSE_BASE+68,this.UART_CLKDIV_REG=1610612756,this.EFUSE_RD_REG_BASE=this.EFUSE_BASE+48,this.EFUSE_PURPOSE_KEY0_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY0_SHIFT=24,this.EFUSE_PURPOSE_KEY1_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY1_SHIFT=28,this.EFUSE_PURPOSE_KEY2_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY2_SHIFT=0,this.EFUSE_PURPOSE_KEY3_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY3_SHIFT=4,this.EFUSE_PURPOSE_KEY4_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY4_SHIFT=8,this.EFUSE_PURPOSE_KEY5_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY5_SHIFT=12,this.EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT_REG=this.EFUSE_RD_REG_BASE,this.EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT=1<<20,this.EFUSE_SPI_BOOT_CRYPT_CNT_REG=this.EFUSE_BASE+52,this.EFUSE_SPI_BOOT_CRYPT_CNT_MASK=7<<18,this.EFUSE_SECURE_BOOT_EN_REG=this.EFUSE_BASE+56,this.EFUSE_SECURE_BOOT_EN_MASK=1<<20,this.IROM_MAP_START=1107296256,this.IROM_MAP_END=1115684864,this.DROM_MAP_START=1115684864,this.DROM_MAP_END=1124073472,this.PCR_SYSCLK_CONF_REG=1611227408,this.PCR_SYSCLK_XTAL_FREQ_V=127<<24,this.PCR_SYSCLK_XTAL_FREQ_S=24,this.XTAL_CLK_DIVIDER=1,this.UARTDEV_BUF_NO=1082520860,this.CHIP_DETECT_MAGIC_VALUE=[285294703,1675706479,1607549039],this.FLASH_FREQUENCY={\"80m\":15,\"40m\":0,\"20m\":2},this.MEMORY_MAP=[[0,65536,`PADDING`],[1115684864,1124073472,`DROM`],[1082130432,1082523648,`DRAM`],[1082130432,1082523648,`BYTE_ACCESSIBLE`],[1073979392,1074003968,`DROM_MASK`],[1073741824,1073979392,`IROM_MASK`],[1107296256,1115684864,`IROM`],[1082130432,1082523648,`IRAM`],[1342177280,1342193664,`RTC_IRAM`],[1342177280,1342193664,`RTC_DRAM`],[1611653120,1611661312,`MEM_INTERNAL2`]],this.UF2_FAMILY_ID=4145808195,this.EFUSE_MAX_KEY=5,this.KEY_PURPOSES={0:`USER/EMPTY`,1:`ECDSA_KEY`,2:`XTS_AES_256_KEY_1`,3:`XTS_AES_256_KEY_2`,4:`XTS_AES_128_KEY`,5:`HMAC_DOWN_ALL`,6:`HMAC_DOWN_JTAG`,7:`HMAC_DOWN_DIGITAL_SIGNATURE`,8:`HMAC_UP`,9:`SECURE_BOOT_DIGEST0`,10:`SECURE_BOOT_DIGEST1`,11:`SECURE_BOOT_DIGEST2`,12:`KM_INIT_KEY`}}async getPkgVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+8)>>26&7}async getMinorChipVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+8)>>0&15}async getMajorChipVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+8)>>4&3}async getChipDescription(e){let t=await this.getPkgVersion(e),n;n=t===0?`ESP32-C5`:`unknown ESP32-C5`;let r=await this.getMajorChipVersion(e),i=await this.getMinorChipVersion(e);return`${n} (revision v${r}.${i})`}async getChipFeatures(e){return[`Wi-Fi 6 (dual-band)`,`BT 5 (LE)`]}async getCrystalFreq(e){let t=await e.readReg(this.UART_CLKDIV_REG)&this.UART_CLKDIV_MASK,n=e.transport.baudrate*t/1e6/this.XTAL_CLK_DIVIDER,r;return r=n>45?48:n>33?40:26,Math.abs(r-n)>1&&e.info(`WARNING: Unsupported crystal in use`),r}async getCrystalFreqRomExpect(e){return(await e.readReg(this.PCR_SYSCLK_CONF_REG)&this.PCR_SYSCLK_XTAL_FREQ_V)>>this.PCR_SYSCLK_XTAL_FREQ_S}};export{t as ESP32C5ROM};"
  },
  {
    "path": "docs/assets/esp32c6-snJpA5DJ.js",
    "content": "import{t as e}from\"./rom-D7P4LvQr.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP32-C6`,this.IMAGE_CHIP_ID=13,this.EFUSE_BASE=1611335680,this.EFUSE_BLOCK1_ADDR=this.EFUSE_BASE+68,this.MAC_EFUSE_REG=this.EFUSE_BASE+68,this.UART_CLKDIV_REG=1072955412,this.UART_CLKDIV_MASK=1048575,this.UART_DATE_REG_ADDR=1610612860,this.FLASH_WRITE_SIZE=1024,this.BOOTLOADER_FLASH_OFFSET=0,this.FLASH_SIZES={\"1MB\":0,\"2MB\":16,\"4MB\":32,\"8MB\":48,\"16MB\":64},this.SPI_REG_BASE=1610620928,this.SPI_USR_OFFS=24,this.SPI_USR1_OFFS=28,this.SPI_USR2_OFFS=32,this.SPI_MOSI_DLEN_OFFS=36,this.SPI_MISO_DLEN_OFFS=40,this.SPI_W0_OFFS=88}async getPkgVersion(e){let t=this.EFUSE_BASE+68+12;return await e.readReg(t)>>21&7}async getChipRevision(e){let t=this.EFUSE_BASE+68+12;return(await e.readReg(t)&7<<18)>>18}async getChipDescription(e){let t;t=await this.getPkgVersion(e)===0?`ESP32-C6`:`unknown ESP32-C6`;let n=await this.getChipRevision(e);return t+=` (revision `+n+`)`,t}async getChipFeatures(e){return[`Wi-Fi 6`,`BT 5`,`IEEE802.15.4`]}async getCrystalFreq(e){return 40}_d2h(e){let t=(+e).toString(16);return t.length===1?`0`+t:t}async readMac(e){let t=await e.readReg(this.MAC_EFUSE_REG);t>>>=0;let n=await e.readReg(this.MAC_EFUSE_REG+4);n=n>>>0&65535;let r=new Uint8Array(6);return r[0]=n>>8&255,r[1]=n&255,r[2]=t>>24&255,r[3]=t>>16&255,r[4]=t>>8&255,r[5]=t&255,this._d2h(r[0])+`:`+this._d2h(r[1])+`:`+this._d2h(r[2])+`:`+this._d2h(r[3])+`:`+this._d2h(r[4])+`:`+this._d2h(r[5])}getEraseSize(e,t){return t}};export{t as ESP32C6ROM};"
  },
  {
    "path": "docs/assets/esp32c61-DUe22z0I.js",
    "content": "import{ESP32C6ROM as e}from\"./esp32c6-snJpA5DJ.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP32-C61`,this.IMAGE_CHIP_ID=20,this.CHIP_DETECT_MAGIC_VALUE=[871374959,606167151],this.UART_DATE_REG_ADDR=1610612860,this.EFUSE_BASE=1611352064,this.EFUSE_BLOCK1_ADDR=this.EFUSE_BASE+68,this.MAC_EFUSE_REG=this.EFUSE_BASE+68,this.EFUSE_RD_REG_BASE=this.EFUSE_BASE+48,this.EFUSE_PURPOSE_KEY0_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY0_SHIFT=0,this.EFUSE_PURPOSE_KEY1_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY1_SHIFT=4,this.EFUSE_PURPOSE_KEY2_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY2_SHIFT=8,this.EFUSE_PURPOSE_KEY3_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY3_SHIFT=12,this.EFUSE_PURPOSE_KEY4_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY4_SHIFT=16,this.EFUSE_PURPOSE_KEY5_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY5_SHIFT=20,this.EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT_REG=this.EFUSE_RD_REG_BASE,this.EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT=1<<20,this.EFUSE_SPI_BOOT_CRYPT_CNT_REG=this.EFUSE_BASE+48,this.EFUSE_SPI_BOOT_CRYPT_CNT_MASK=7<<23,this.EFUSE_SECURE_BOOT_EN_REG=this.EFUSE_BASE+52,this.EFUSE_SECURE_BOOT_EN_MASK=1<<26,this.FLASH_FREQUENCY={\"80m\":15,\"40m\":0,\"20m\":2},this.MEMORY_MAP=[[0,65536,`PADDING`],[1098907648,1107296256,`DROM`],[1082130432,1082523648,`DRAM`],[1082130432,1082523648,`BYTE_ACCESSIBLE`],[1074048e3,1074069504,`DROM_MASK`],[1073741824,1074048e3,`IROM_MASK`],[1090519040,1098907648,`IROM`],[1082130432,1082523648,`IRAM`],[1342177280,1342193664,`RTC_IRAM`],[1342177280,1342193664,`RTC_DRAM`],[1611653120,1611661312,`MEM_INTERNAL2`]],this.UF2_FAMILY_ID=2010665156,this.EFUSE_MAX_KEY=5,this.KEY_PURPOSES={0:`USER/EMPTY`,1:`ECDSA_KEY`,2:`XTS_AES_256_KEY_1`,3:`XTS_AES_256_KEY_2`,4:`XTS_AES_128_KEY`,5:`HMAC_DOWN_ALL`,6:`HMAC_DOWN_JTAG`,7:`HMAC_DOWN_DIGITAL_SIGNATURE`,8:`HMAC_UP`,9:`SECURE_BOOT_DIGEST0`,10:`SECURE_BOOT_DIGEST1`,11:`SECURE_BOOT_DIGEST2`,12:`KM_INIT_KEY`,13:`XTS_AES_256_KEY_1_PSRAM`,14:`XTS_AES_256_KEY_2_PSRAM`,15:`XTS_AES_128_KEY_PSRAM`}}async getPkgVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+8)>>26&7}async getMinorChipVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+8)>>0&15}async getMajorChipVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+8)>>4&3}async getChipDescription(e){let t=await this.getPkgVersion(e),n;n=t===0?`ESP32-C61`:`unknown ESP32-C61`;let r=await this.getMajorChipVersion(e),i=await this.getMinorChipVersion(e);return`${n} (revision v${r}.${i})`}async getChipFeatures(e){return[`WiFi 6`,`BT 5`]}async readMac(e){let t=await e.readReg(this.MAC_EFUSE_REG);t>>>=0;let n=await e.readReg(this.MAC_EFUSE_REG+4);n=n>>>0&65535;let r=new Uint8Array(6);return r[0]=n>>8&255,r[1]=n&255,r[2]=t>>24&255,r[3]=t>>16&255,r[4]=t>>8&255,r[5]=t&255,this._d2h(r[0])+`:`+this._d2h(r[1])+`:`+this._d2h(r[2])+`:`+this._d2h(r[3])+`:`+this._d2h(r[4])+`:`+this._d2h(r[5])}};export{t as ESP32C61ROM};"
  },
  {
    "path": "docs/assets/esp32h2-CCGwb3vw.js",
    "content": "import{t as e}from\"./rom-D7P4LvQr.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP32-H2`,this.IMAGE_CHIP_ID=16,this.EFUSE_BASE=1611335680,this.EFUSE_BLOCK1_ADDR=this.EFUSE_BASE+68,this.MAC_EFUSE_REG=this.EFUSE_BASE+68,this.UART_CLKDIV_REG=1072955412,this.UART_CLKDIV_MASK=1048575,this.UART_DATE_REG_ADDR=1610612860,this.FLASH_WRITE_SIZE=1024,this.BOOTLOADER_FLASH_OFFSET=0,this.FLASH_SIZES={\"1MB\":0,\"2MB\":16,\"4MB\":32,\"8MB\":48,\"16MB\":64},this.SPI_REG_BASE=1610620928,this.SPI_USR_OFFS=24,this.SPI_USR1_OFFS=28,this.SPI_USR2_OFFS=32,this.SPI_MOSI_DLEN_OFFS=36,this.SPI_MISO_DLEN_OFFS=40,this.SPI_W0_OFFS=88,this.USB_RAM_BLOCK=2048,this.UARTDEV_BUF_NO_USB=3,this.UARTDEV_BUF_NO=1070526796}async getPkgVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+16)>>0&7}async getMinorChipVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+12)>>18&7}async getMajorChipVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+12)>>21&3}async getChipDescription(e){let t=await this.getPkgVersion(e),n;n=t===0?`ESP32-H2`:`unknown ESP32-H2`;let r=await this.getMajorChipVersion(e),i=await this.getMinorChipVersion(e);return`${n} (revision v${r}.${i})`}async getChipFeatures(e){return[`BT 5 (LE)`,`IEEE802.15.4`,`Single Core`,`96MHz`]}async getCrystalFreq(e){return 32}_d2h(e){let t=(+e).toString(16);return t.length===1?`0`+t:t}async postConnect(e){let t=await e.readReg(this.UARTDEV_BUF_NO)&255;e.debug(`In _post_connect `+t),t==this.UARTDEV_BUF_NO_USB&&(e.ESP_RAM_BLOCK=this.USB_RAM_BLOCK)}async readMac(e){let t=await e.readReg(this.MAC_EFUSE_REG);t>>>=0;let n=await e.readReg(this.MAC_EFUSE_REG+4);n=n>>>0&65535;let r=new Uint8Array(6);return r[0]=n>>8&255,r[1]=n&255,r[2]=t>>24&255,r[3]=t>>16&255,r[4]=t>>8&255,r[5]=t&255,this._d2h(r[0])+`:`+this._d2h(r[1])+`:`+this._d2h(r[2])+`:`+this._d2h(r[3])+`:`+this._d2h(r[4])+`:`+this._d2h(r[5])}getEraseSize(e,t){return t}};export{t as ESP32H2ROM};"
  },
  {
    "path": "docs/assets/esp32p4-BE8Lllij.js",
    "content": "import{ESP32ROM as e}from\"./esp32-DR_yen0A.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP32-P4`,this.IMAGE_CHIP_ID=18,this.IROM_MAP_START=1073741824,this.IROM_MAP_END=1275068416,this.DROM_MAP_START=1073741824,this.DROM_MAP_END=1275068416,this.BOOTLOADER_FLASH_OFFSET=8192,this.CHIP_DETECT_MAGIC_VALUE=[0,182303440],this.UART_DATE_REG_ADDR=1343004812,this.EFUSE_BASE=1343410176,this.EFUSE_BLOCK1_ADDR=this.EFUSE_BASE+68,this.MAC_EFUSE_REG=this.EFUSE_BASE+68,this.SPI_REG_BASE=1342754816,this.SPI_USR_OFFS=24,this.SPI_USR1_OFFS=28,this.SPI_USR2_OFFS=32,this.SPI_MOSI_DLEN_OFFS=36,this.SPI_MISO_DLEN_OFFS=40,this.SPI_W0_OFFS=88,this.EFUSE_RD_REG_BASE=this.EFUSE_BASE+48,this.EFUSE_PURPOSE_KEY0_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY0_SHIFT=24,this.EFUSE_PURPOSE_KEY1_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY1_SHIFT=28,this.EFUSE_PURPOSE_KEY2_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY2_SHIFT=0,this.EFUSE_PURPOSE_KEY3_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY3_SHIFT=4,this.EFUSE_PURPOSE_KEY4_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY4_SHIFT=8,this.EFUSE_PURPOSE_KEY5_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY5_SHIFT=12,this.EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT_REG=this.EFUSE_RD_REG_BASE,this.EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT=1<<20,this.EFUSE_SPI_BOOT_CRYPT_CNT_REG=this.EFUSE_BASE+52,this.EFUSE_SPI_BOOT_CRYPT_CNT_MASK=7<<18,this.EFUSE_SECURE_BOOT_EN_REG=this.EFUSE_BASE+56,this.EFUSE_SECURE_BOOT_EN_MASK=1<<20,this.PURPOSE_VAL_XTS_AES256_KEY_1=2,this.PURPOSE_VAL_XTS_AES256_KEY_2=3,this.PURPOSE_VAL_XTS_AES128_KEY=4,this.SUPPORTS_ENCRYPTED_FLASH=!0,this.FLASH_ENCRYPTED_WRITE_ALIGN=16,this.MEMORY_MAP=[[0,65536,`PADDING`],[1073741824,1275068416,`DROM`],[1341128704,1341784064,`DRAM`],[1341128704,1341784064,`BYTE_ACCESSIBLE`],[1337982976,1338114048,`DROM_MASK`],[1337982976,1338114048,`IROM_MASK`],[1073741824,1275068416,`IROM`],[1341128704,1341784064,`IRAM`],[1343258624,1343291392,`RTC_IRAM`],[1343258624,1343291392,`RTC_DRAM`],[1611653120,1611661312,`MEM_INTERNAL2`]],this.UF2_FAMILY_ID=1026592404,this.EFUSE_MAX_KEY=5,this.KEY_PURPOSES={0:`USER/EMPTY`,1:`ECDSA_KEY`,2:`XTS_AES_256_KEY_1`,3:`XTS_AES_256_KEY_2`,4:`XTS_AES_128_KEY`,5:`HMAC_DOWN_ALL`,6:`HMAC_DOWN_JTAG`,7:`HMAC_DOWN_DIGITAL_SIGNATURE`,8:`HMAC_UP`,9:`SECURE_BOOT_DIGEST0`,10:`SECURE_BOOT_DIGEST1`,11:`SECURE_BOOT_DIGEST2`,12:`KM_INIT_KEY`}}async getPkgVersion(e){let t=this.EFUSE_BLOCK1_ADDR+8;return await e.readReg(t)>>27&7}async getMinorChipVersion(e){let t=this.EFUSE_BLOCK1_ADDR+8;return await e.readReg(t)>>0&15}async getMajorChipVersion(e){let t=this.EFUSE_BLOCK1_ADDR+8;return await e.readReg(t)>>4&3}async getChipDescription(e){return`${await this.getPkgVersion(e)===0?`ESP32-P4`:`unknown ESP32-P4`} (revision v${await this.getMajorChipVersion(e)}.${await this.getMinorChipVersion(e)})`}async getChipFeatures(e){return[`High-Performance MCU`]}async getCrystalFreq(e){return 40}async getFlashVoltage(e){}async overrideVddsdio(e){e.debug(`VDD_SDIO overrides are not supported for ESP32-P4`)}async readMac(e){let t=await e.readReg(this.MAC_EFUSE_REG);t>>>=0;let n=await e.readReg(this.MAC_EFUSE_REG+4);n=n>>>0&65535;let r=new Uint8Array(6);return r[0]=n>>8&255,r[1]=n&255,r[2]=t>>24&255,r[3]=t>>16&255,r[4]=t>>8&255,r[5]=t&255,this._d2h(r[0])+`:`+this._d2h(r[1])+`:`+this._d2h(r[2])+`:`+this._d2h(r[3])+`:`+this._d2h(r[4])+`:`+this._d2h(r[5])}async getFlashCryptConfig(e){}async getSecureBootEnabled(e){return await e.readReg(this.EFUSE_SECURE_BOOT_EN_REG)&this.EFUSE_SECURE_BOOT_EN_MASK}async getKeyBlockPurpose(e,t){if(t<0||t>this.EFUSE_MAX_KEY){e.debug(`Valid key block numbers must be in range 0-${this.EFUSE_MAX_KEY}`);return}let[n,r]=[[this.EFUSE_PURPOSE_KEY0_REG,this.EFUSE_PURPOSE_KEY0_SHIFT],[this.EFUSE_PURPOSE_KEY1_REG,this.EFUSE_PURPOSE_KEY1_SHIFT],[this.EFUSE_PURPOSE_KEY2_REG,this.EFUSE_PURPOSE_KEY2_SHIFT],[this.EFUSE_PURPOSE_KEY3_REG,this.EFUSE_PURPOSE_KEY3_SHIFT],[this.EFUSE_PURPOSE_KEY4_REG,this.EFUSE_PURPOSE_KEY4_SHIFT],[this.EFUSE_PURPOSE_KEY5_REG,this.EFUSE_PURPOSE_KEY5_SHIFT]][t];return await e.readReg(n)>>r&15}async isFlashEncryptionKeyValid(e){let t=[];for(let n=0;n<=this.EFUSE_MAX_KEY;n++){let r=await this.getKeyBlockPurpose(e,n);t.push(r)}return t.find(e=>e===this.PURPOSE_VAL_XTS_AES128_KEY),!0}};export{t as ESP32P4ROM};"
  },
  {
    "path": "docs/assets/esp32s2-klISvvyE.js",
    "content": "import{t as e}from\"./rom-D7P4LvQr.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP32-S2`,this.IMAGE_CHIP_ID=2,this.IROM_MAP_START=1074266112,this.IROM_MAP_END=1085800448,this.DROM_MAP_START=1056964608,this.DROM_MAP_END=1061093376,this.CHIP_DETECT_MAGIC_VALUE=[1990],this.SPI_REG_BASE=1061167104,this.SPI_USR_OFFS=24,this.SPI_USR1_OFFS=28,this.SPI_USR2_OFFS=32,this.SPI_MOSI_DLEN_OFFS=36,this.SPI_MISO_DLEN_OFFS=40,this.SPI_W0_OFFS=88,this.SPI_ADDR_REG_MSB=!1,this.MAC_EFUSE_REG=1061265476,this.UART_CLKDIV_REG=1061158932,this.SUPPORTS_ENCRYPTED_FLASH=!0,this.FLASH_ENCRYPTED_WRITE_ALIGN=16,this.EFUSE_BASE=1061265408,this.EFUSE_RD_REG_BASE=this.EFUSE_BASE+48,this.EFUSE_BLOCK1_ADDR=this.EFUSE_BASE+68,this.EFUSE_BLOCK2_ADDR=this.EFUSE_BASE+92,this.EFUSE_PURPOSE_KEY0_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY0_SHIFT=24,this.EFUSE_PURPOSE_KEY1_REG=this.EFUSE_BASE+52,this.EFUSE_PURPOSE_KEY1_SHIFT=28,this.EFUSE_PURPOSE_KEY2_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY2_SHIFT=0,this.EFUSE_PURPOSE_KEY3_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY3_SHIFT=4,this.EFUSE_PURPOSE_KEY4_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY4_SHIFT=8,this.EFUSE_PURPOSE_KEY5_REG=this.EFUSE_BASE+56,this.EFUSE_PURPOSE_KEY5_SHIFT=12,this.EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT_REG=this.EFUSE_RD_REG_BASE,this.EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT=1<<19,this.EFUSE_SPI_BOOT_CRYPT_CNT_REG=this.EFUSE_BASE+52,this.EFUSE_SPI_BOOT_CRYPT_CNT_MASK=7<<18,this.EFUSE_SECURE_BOOT_EN_REG=this.EFUSE_BASE+56,this.EFUSE_SECURE_BOOT_EN_MASK=1<<20,this.EFUSE_RD_REPEAT_DATA3_REG=this.EFUSE_BASE+60,this.EFUSE_RD_REPEAT_DATA3_REG_FLASH_TYPE_MASK=512,this.PURPOSE_VAL_XTS_AES256_KEY_1=2,this.PURPOSE_VAL_XTS_AES256_KEY_2=3,this.PURPOSE_VAL_XTS_AES128_KEY=4,this.UARTDEV_BUF_NO=1073741076,this.UARTDEV_BUF_NO_USB_OTG=2,this.USB_RAM_BLOCK=2048,this.GPIO_STRAP_REG=1061175352,this.GPIO_STRAP_SPI_BOOT_MASK=8,this.GPIO_STRAP_VDDSPI_MASK=16,this.RTC_CNTL_OPTION1_REG=1061191976,this.RTC_CNTL_FORCE_DOWNLOAD_BOOT_MASK=1,this.RTCCNTL_BASE_REG=1061191680,this.RTC_CNTL_WDTCONFIG0_REG=this.RTCCNTL_BASE_REG+148,this.RTC_CNTL_WDTCONFIG1_REG=this.RTCCNTL_BASE_REG+152,this.RTC_CNTL_WDTWPROTECT_REG=this.RTCCNTL_BASE_REG+172,this.RTC_CNTL_WDT_WKEY=1356348065,this.MEMORY_MAP=[[0,65536,`PADDING`],[1056964608,1073217536,`DROM`],[1062207488,1073217536,`EXTRAM_DATA`],[1073340416,1073348608,`RTC_DRAM`],[1073340416,1073741824,`BYTE_ACCESSIBLE`],[1073340416,1074208768,`MEM_INTERNAL`],[1073414144,1073741824,`DRAM`],[1073741824,1073848576,`IROM_MASK`],[1073872896,1074200576,`IRAM`],[1074200576,1074208768,`RTC_IRAM`],[1074266112,1082130432,`IROM`],[1342177280,1342185472,`RTC_DATA`]],this.EFUSE_VDD_SPI_REG=this.EFUSE_BASE+52,this.VDD_SPI_XPD=16,this.VDD_SPI_TIEH=32,this.VDD_SPI_FORCE=64,this.UF2_FAMILY_ID=3218951918,this.EFUSE_MAX_KEY=5,this.KEY_PURPOSES={0:`USER/EMPTY`,1:`RESERVED`,2:`XTS_AES_256_KEY_1`,3:`XTS_AES_256_KEY_2`,4:`XTS_AES_128_KEY`,5:`HMAC_DOWN_ALL`,6:`HMAC_DOWN_JTAG`,7:`HMAC_DOWN_DIGITAL_SIGNATURE`,8:`HMAC_UP`,9:`SECURE_BOOT_DIGEST0`,10:`SECURE_BOOT_DIGEST1`,11:`SECURE_BOOT_DIGEST2`},this.UART_CLKDIV_MASK=1048575,this.UART_DATE_REG_ADDR=1610612856,this.FLASH_WRITE_SIZE=1024,this.BOOTLOADER_FLASH_OFFSET=4096,this.FLASH_SIZES={\"1MB\":0,\"2MB\":16,\"4MB\":32,\"8MB\":48,\"16MB\":64}}async getPkgVersion(e){let t=this.EFUSE_BLOCK1_ADDR+16;return await e.readReg(t)>>0&15}async getMinorChipVersion(e){let t=await e.readReg(this.EFUSE_BLOCK1_ADDR+12)>>20&1,n=await e.readReg(this.EFUSE_BLOCK1_ADDR+16)>>4&7;return(t<<3)+n}async getMajorChipVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+12)>>18&3}async getFlashVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+12)>>21&15}async getChipDescription(e){let t={0:`ESP32-S2`,1:`ESP32-S2FH2`,2:`ESP32-S2FH4`,102:`ESP32-S2FNR2`,100:`ESP32-S2R2`},n=await this.getFlashCap(e)+await this.getPsramCap(e)*100,r=await this.getMajorChipVersion(e),i=await this.getMinorChipVersion(e);return`${t[n]||`unknown ESP32-S2`} (revision v${r}.${i})`}async getFlashCap(e){return await this.getFlashVersion(e)}async getPsramVersion(e){let t=this.EFUSE_BLOCK1_ADDR+12;return await e.readReg(t)>>28&15}async getPsramCap(e){return await this.getPsramVersion(e)}async getBlock2Version(e){let t=this.EFUSE_BLOCK2_ADDR+16;return await e.readReg(t)>>4&7}async getChipFeatures(e){let t=[`Wi-Fi`],n={0:`No Embedded Flash`,1:`Embedded Flash 2MB`,2:`Embedded Flash 4MB`}[await this.getFlashCap(e)]||`Unknown Embedded Flash`;t.push(n);let r={0:`No Embedded Flash`,1:`Embedded PSRAM 2MB`,2:`Embedded PSRAM 4MB`}[await this.getPsramCap(e)]||`Unknown Embedded PSRAM`;t.push(r);let i={0:`No calibration in BLK2 of efuse`,1:`ADC and temperature sensor calibration in BLK2 of efuse V1`,2:`ADC and temperature sensor calibration in BLK2 of efuse V2`}[await this.getBlock2Version(e)]||`Unknown Calibration in BLK2`;return t.push(i),t}async getCrystalFreq(e){return 40}_d2h(e){let t=(+e).toString(16);return t.length===1?`0`+t:t}async readMac(e){let t=await e.readReg(this.MAC_EFUSE_REG);t>>>=0;let n=await e.readReg(this.MAC_EFUSE_REG+4);n=n>>>0&65535;let r=new Uint8Array(6);return r[0]=n>>8&255,r[1]=n&255,r[2]=t>>24&255,r[3]=t>>16&255,r[4]=t>>8&255,r[5]=t&255,this._d2h(r[0])+`:`+this._d2h(r[1])+`:`+this._d2h(r[2])+`:`+this._d2h(r[3])+`:`+this._d2h(r[4])+`:`+this._d2h(r[5])}getEraseSize(e,t){return t}async usingUsbOtg(e){return(await e.readReg(this.UARTDEV_BUF_NO)&255)===this.UARTDEV_BUF_NO_USB_OTG}async postConnect(e){let t=await this.usingUsbOtg(e);e.debug(`In _post_connect using USB OTG ?`+t),t&&(e.ESP_RAM_BLOCK=this.USB_RAM_BLOCK)}};export{t as ESP32S2ROM};"
  },
  {
    "path": "docs/assets/esp32s3-CjJ5O_5u.js",
    "content": "import{t as e}from\"./rom-D7P4LvQr.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP32-S3`,this.IMAGE_CHIP_ID=9,this.EFUSE_BASE=1610641408,this.MAC_EFUSE_REG=this.EFUSE_BASE+68,this.EFUSE_BLOCK1_ADDR=this.EFUSE_BASE+68,this.EFUSE_BLOCK2_ADDR=this.EFUSE_BASE+92,this.UART_CLKDIV_REG=1610612756,this.UART_CLKDIV_MASK=1048575,this.UART_DATE_REG_ADDR=1610612864,this.FLASH_WRITE_SIZE=1024,this.BOOTLOADER_FLASH_OFFSET=0,this.FLASH_SIZES={\"1MB\":0,\"2MB\":16,\"4MB\":32,\"8MB\":48,\"16MB\":64},this.SPI_REG_BASE=1610620928,this.SPI_USR_OFFS=24,this.SPI_USR1_OFFS=28,this.SPI_USR2_OFFS=32,this.SPI_MOSI_DLEN_OFFS=36,this.SPI_MISO_DLEN_OFFS=40,this.SPI_W0_OFFS=88,this.USB_RAM_BLOCK=2048,this.UARTDEV_BUF_NO_USB=3,this.UARTDEV_BUF_NO=1070526796}async getChipDescription(e){let t=await this.getMajorChipVersion(e),n=await this.getMinorChipVersion(e),r=await this.getPkgVersion(e);return`${{0:`ESP32-S3 (QFN56)`,1:`ESP32-S3-PICO-1 (LGA56)`}[r]||`unknown ESP32-S3`} (revision v${t}.${n})`}async getPkgVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+12)>>21&7}async getRawMinorChipVersion(e){let t=await e.readReg(this.EFUSE_BLOCK1_ADDR+20)>>23&1,n=await e.readReg(this.EFUSE_BLOCK1_ADDR+12)>>18&7;return(t<<3)+n}async getMinorChipVersion(e){let t=await this.getRawMinorChipVersion(e);return await this.isEco0(e,t)?0:this.getRawMinorChipVersion(e)}async getRawMajorChipVersion(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+20)>>24&3}async getMajorChipVersion(e){let t=await this.getRawMinorChipVersion(e);return await this.isEco0(e,t)?0:this.getRawMajorChipVersion(e)}async getBlkVersionMajor(e){return await e.readReg(this.EFUSE_BLOCK2_ADDR+16)>>0&3}async getBlkVersionMinor(e){return await e.readReg(this.EFUSE_BLOCK1_ADDR+12)>>24&7}async isEco0(e,t){return(t&7)==0&&await this.getBlkVersionMajor(e)===1&&await this.getBlkVersionMinor(e)===1}async getFlashCap(e){let t=this.EFUSE_BASE+68+12;return await e.readReg(t)>>27&7}async getFlashVendor(e){let t=this.EFUSE_BASE+68+16,n=await e.readReg(t)>>0&7;return{1:`XMC`,2:`GD`,3:`FM`,4:`TT`,5:`BY`}[n]||``}async getPsramCap(e){let t=this.EFUSE_BASE+68+16;return await e.readReg(t)>>3&3}async getPsramVendor(e){let t=this.EFUSE_BASE+68+16,n=await e.readReg(t)>>7&3;return{1:`AP_3v3`,2:`AP_1v8`}[n]||``}async getChipFeatures(e){let t=[`Wi-Fi`,`BLE`],n={0:null,1:`Embedded Flash 8MB`,2:`Embedded Flash 4MB`},r=await this.getFlashCap(e),i=await this.getFlashVendor(e),a=n[r],o=a===void 0?`Unknown Embedded Flash`:a;a!==null&&t.push(`${o} (${i})`);let s={0:null,1:`Embedded PSRAM 8MB`,2:`Embedded PSRAM 2MB`},c=await this.getPsramCap(e),l=await this.getPsramVendor(e),u=s[c],d=u===void 0?`Unknown Embedded PSRAM`:u;return u!==null&&t.push(`${d} (${l})`),t}async getCrystalFreq(e){return 40}_d2h(e){let t=(+e).toString(16);return t.length===1?`0`+t:t}async postConnect(e){let t=await e.readReg(this.UARTDEV_BUF_NO)&255;e.debug(`In _post_connect `+t),t==this.UARTDEV_BUF_NO_USB&&(e.ESP_RAM_BLOCK=this.USB_RAM_BLOCK)}async readMac(e){let t=await e.readReg(this.MAC_EFUSE_REG);t>>>=0;let n=await e.readReg(this.MAC_EFUSE_REG+4);n=n>>>0&65535;let r=new Uint8Array(6);return r[0]=n>>8&255,r[1]=n&255,r[2]=t>>24&255,r[3]=t>>16&255,r[4]=t>>8&255,r[5]=t&255,this._d2h(r[0])+`:`+this._d2h(r[1])+`:`+this._d2h(r[2])+`:`+this._d2h(r[3])+`:`+this._d2h(r[4])+`:`+this._d2h(r[5])}getEraseSize(e,t){return t}};export{t as ESP32S3ROM};"
  },
  {
    "path": "docs/assets/esp8266-BCrKhPpV.js",
    "content": "import{t as e}from\"./rom-D7P4LvQr.js\";var t=class extends e{constructor(){super(...arguments),this.CHIP_NAME=`ESP8266`,this.CHIP_DETECT_MAGIC_VALUE=[4293968129],this.EFUSE_RD_REG_BASE=1072693328,this.UART_CLKDIV_REG=1610612756,this.UART_CLKDIV_MASK=1048575,this.XTAL_CLK_DIVIDER=2,this.FLASH_WRITE_SIZE=16384,this.BOOTLOADER_FLASH_OFFSET=0,this.UART_DATE_REG_ADDR=0,this.FLASH_SIZES={\"512KB\":0,\"256KB\":16,\"1MB\":32,\"2MB\":48,\"4MB\":64,\"2MB-c1\":80,\"4MB-c1\":96,\"8MB\":128,\"16MB\":144},this.SPI_REG_BASE=1610613248,this.SPI_USR_OFFS=28,this.SPI_USR1_OFFS=32,this.SPI_USR2_OFFS=36,this.SPI_MOSI_DLEN_OFFS=0,this.SPI_MISO_DLEN_OFFS=0,this.SPI_W0_OFFS=64,this.getChipFeatures=async e=>{let t=[`WiFi`];return await this.getChipDescription(e)==`ESP8285`&&t.push(`Embedded Flash`),t}}async readEfuse(e,t){let n=this.EFUSE_RD_REG_BASE+4*t;return e.debug(`Read efuse `+n),await e.readReg(n)}async getChipDescription(e){let t=await this.readEfuse(e,2);return await this.readEfuse(e,0)&16|t&65536?`ESP8285`:`ESP8266EX`}async getCrystalFreq(e){let t=await e.readReg(this.UART_CLKDIV_REG)&this.UART_CLKDIV_MASK,n=e.transport.baudrate*t/1e6/this.XTAL_CLK_DIVIDER,r;return r=n>33?40:26,Math.abs(r-n)>1&&e.info(`WARNING: Detected crystal freq `+n+`MHz is quite different to normalized freq `+r+`MHz. Unsupported crystal in use?`),r}_d2h(e){let t=(+e).toString(16);return t.length===1?`0`+t:t}async readMac(e){let t=await this.readEfuse(e,0);t>>>=0;let n=await this.readEfuse(e,1);n>>>=0;let r=await this.readEfuse(e,3);r>>>=0;let i=new Uint8Array(6);return r==0?n>>16&255?(n>>16&255)==1?(i[0]=172,i[1]=208,i[2]=116):e.error(`Unknown OUI`):(i[0]=24,i[1]=254,i[2]=52):(i[0]=r>>16&255,i[1]=r>>8&255,i[2]=r&255),i[3]=n>>8&255,i[4]=n&255,i[5]=t>>24&255,this._d2h(i[0])+`:`+this._d2h(i[1])+`:`+this._d2h(i[2])+`:`+this._d2h(i[3])+`:`+this._d2h(i[4])+`:`+this._d2h(i[5])}getEraseSize(e,t){return t}};export{t as ESP8266ROM};"
  },
  {
    "path": "docs/assets/index-C3ZwmNhv.css",
    "content": ":root{--esp-tools-button-color:#5ac060;--mdc-typography-body1-line-height:2rem;--mdc-typography-body1-font-size:1.6rem;--mdc-typography-headline6-font-size:1.8rem;--mdc-typography-headline5-font-size:2rem;--mdc-typography-headline4-font-size:2.4rem;--mdc-typography-headline3-font-size:3rem;--mdc-typography-headline2-font-size:3.6rem;--mdc-typography-headline1-font-size:4.8rem;--mdc-typography-button-font-size:1.6rem;--mdc-typography-caption-font-size:1.4rem;--mdc-typography-overline-font-size:1.4rem;--md-sys-typescale-body-large-size:1.6rem;--md-sys-typescale-body-large-line-height:2.4rem;--md-sys-typescale-body-medium-size:1.4rem;--md-sys-typescale-body-medium-line-height:2rem;--md-sys-typescale-body-small-size:1.2rem;--md-sys-typescale-body-small-line-height:1.6rem;--md-sys-typescale-label-large-size:1.4rem;--md-sys-typescale-label-large-line-height:2rem;--md-sys-typescale-label-medium-size:1.2rem;--md-sys-typescale-label-medium-line-height:1.6rem;--md-sys-typescale-label-small-size:1.1rem;--md-sys-typescale-label-small-line-height:1.6rem;--md-sys-typescale-title-large-size:2.2rem;--md-sys-typescale-title-large-line-height:2.8rem;--md-sys-typescale-title-medium-size:1.6rem;--md-sys-typescale-title-medium-line-height:2.4rem;--md-sys-typescale-title-small-size:1.4rem;--md-sys-typescale-title-small-line-height:2rem;--md-sys-typescale-headline-large-size:3.2rem;--md-sys-typescale-headline-large-line-height:4rem;--md-sys-typescale-headline-medium-size:2.8rem;--md-sys-typescale-headline-medium-line-height:3.6rem;--md-sys-typescale-headline-small-size:2.4rem;--md-sys-typescale-headline-small-line-height:3.2rem}#root{text-align:center;box-sizing:border-box;flex-direction:column;width:100%;max-width:100%;min-height:100svh;margin:0 auto;font-size:1.6rem;display:flex}body{color:#e0e0e0;background:#141414;justify-content:center;align-items:center;margin:0;font-family:Trebuchet MS,sans-serif;font-size:1.6rem;display:flex}html{font-size:62.5%}*{box-sizing:border-box;margin:0;padding:0}.container{width:100%;max-width:480px}h1{color:#fff;margin-bottom:.3rem;font-size:1.3rem;font-weight:600}.page-sub{color:#555;margin-bottom:2rem;font-size:.8rem}.tools{flex-direction:column;gap:.75rem;margin-bottom:1.5rem;display:flex}a.tool-card{background:#1e1e1e;border:1px solid #2e2e2e;border-radius:10px;padding:1.1rem 1.25rem;text-decoration:none;transition:border-color .15s,background .15s;display:block}a.tool-card:hover{background:#222;border-color:#3a3a3a}.tool-title{color:#e0e0e0;margin-bottom:.25rem;font-size:.95rem;font-weight:600}.tool-desc{color:#666;font-size:.8rem}.more{color:#555;padding-left:.25rem;font-size:.78rem}.card{text-align:center;background:#1e1e1e;border:1px solid #2e2e2e;border-radius:12px;flex-direction:column;align-items:center;gap:20px;width:100%;max-width:600px;margin:auto;padding:2.5rem;display:flex}.card p{color:#aaa;font-size:1.8rem;line-height:1.7}.card strong{color:#e0e0e0}.card .warn{color:#c0605a;font-size:1.6rem;font-weight:600}.card .success{color:#5ac060;font-size:1.6rem;font-weight:600}.card a{color:#5ac060;font-weight:500;transition:color .2s ease-in-out}.card a:hover{color:#7cd080}.header{align-items:center;width:100%;margin-top:1rem;margin-bottom:2rem;font-size:2rem;display:flex}.header>*{flex:1;justify-content:center;align-items:center;display:flex}.header .nav-btn{color:#e0e0e0;cursor:pointer;background:0 0;border:2px solid #3a3a3a;border-radius:8px;margin:0 auto;padding:.8rem 1.6rem;font-family:inherit;font-size:1.6rem;font-weight:500;transition:all .2s ease-in-out}.header .nav-btn:hover{color:#fff;background:#2a2a2a;border-color:#5a9e6f;transform:translateY(-2px);box-shadow:0 4px 12px #0003}.header .nav-btn:active{box-shadow:none;transform:translateY(0)}.header a{color:#e0e0e0;align-items:center;gap:.5rem;text-decoration:none;display:flex}.header .logo{justify-content:center;align-items:center;display:flex}.header .logo .github{margin-left:4rem;transition:transform .2s ease-in-out}.header .logo .github:hover{transform:scale(1.1)}.header .logo .logo-text{flex-direction:column;gap:.5rem;display:flex}.header .logo .logo-text span{color:#ccc;font-size:2.2rem}.header .logo .logo-text span:nth-child(2){color:#666;font-size:2rem}.connect-robot{text-align:left;background:#1e1e1e;border:1px solid #2e2e2e;border-radius:12px;flex-direction:column;width:100%;max-width:480px;padding:2.5rem;display:flex}.connect-robot .subtitle{color:#ccc;font-size:1.4rem;line-height:1.5}.connect-robot .title{color:#e0e0e0;margin-bottom:.75rem;font-size:2.2rem;font-weight:600}.connect-robot .toggle-row{justify-content:center;align-items:center;gap:.8rem;display:flex}.connect-robot .toggle-row .toggle-label{color:#aaa;-webkit-user-select:none;user-select:none;cursor:pointer;font-size:1.2rem}.connect-robot .toggle-row .badge{color:#a07840;text-transform:uppercase;letter-spacing:.05em;background:#2a2218;border:1px solid #3a3020;border-radius:4px;padding:.2rem .5rem;font-size:.85rem;font-weight:600}.connect-robot .toggle-row .switch{flex-shrink:0;width:38px;height:22px;display:inline-block;position:relative}.connect-robot .toggle-row .switch input{opacity:0;width:0;height:0}.connect-robot .toggle-row .switch input:checked+.slider{background:#2a3a2a;border-color:#3a5a3a}.connect-robot .toggle-row .switch input:checked+.slider:before{background:#5a9e6f;transform:translate(16px)}.connect-robot .toggle-row .slider{cursor:pointer;background:#2e2e2e;border:1px solid #3a3a3a;border-radius:20px;transition:background .2s,border-color .2s;position:absolute;inset:0}.connect-robot .toggle-row .slider:before{content:\"\";background:#888;border-radius:50%;width:14px;height:14px;transition:transform .2s,background .2s;position:absolute;top:3px;left:3px}.connect-robot button.connect{color:#e0e0e0;cursor:pointer;background:#2a2a2a;border:1px solid #3a3a3a;border-radius:6px;align-self:center;padding:.8rem 1.6rem;font-family:inherit;font-size:1.6rem;font-weight:500;transition:background .15s,border-color .15s}.connect-robot button.connect:hover:not(:disabled){background:#333;border-color:#4a4a4a}.connect-robot button.connect:disabled{opacity:.6;cursor:not-allowed}.connect-robot .status{color:#888;align-self:center;font-size:1.4rem}.info-cards{flex-direction:column;gap:1.5rem;margin-top:2rem;margin-bottom:2rem;display:flex}.robot-info{box-sizing:border-box;background:#1e1e1e;border:1px solid #2e2e2e;border-radius:12px;width:100%;max-width:550px;padding:1.5rem;font-size:1.8rem}.robot-info .info-header{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1.5rem;display:flex}.robot-info .info-header .title-group{flex-direction:column;gap:.3rem;display:flex}.robot-info .info-header .title-group h2{color:#fff;margin:0;font-size:2rem;font-weight:600}.robot-info .info-header .title-group .time-ago{color:#888;min-width:15rem;font-size:1.2rem}.robot-info .info-header .action-group{align-items:center;gap:.8rem;display:flex}.robot-info .info-header .action-group .tooltip-wrap{display:inline-flex}.robot-info .info-header .action-group .action-btn{color:#e0e0e0;cursor:pointer;background:#2a2a2a;border:1px solid #3a3a3a;border-radius:6px;padding:.5rem 1rem;font-family:inherit;font-size:1.3rem;font-weight:500;transition:background .15s,border-color .15s,opacity .15s}.robot-info .info-header .action-group .action-btn:hover:not(:disabled){background:#333;border-color:#4a4a4a}.robot-info .info-header .action-group .action-btn:disabled{opacity:.4;cursor:not-allowed}.robot-info .no-data{color:#666;margin-bottom:1rem;font-size:1.4rem;font-style:italic}.robot-info .table{flex-direction:column;width:100%;display:flex}.robot-info .table .row{background-color:#3a3a3a;justify-content:space-between;padding:.8rem;display:flex}.robot-info .table .row:nth-child(odd){background-color:#2a2a2a}.robot-info .table .row .key{color:#aaa;font-weight:500}.gen-picker .gen-pick{cursor:pointer;color:var(--esp-tools-button-text-color,#fff);background-color:var(--esp-tools-button-color,#03a9f4);border:none;border-radius:4px;padding:8px 28px;font-size:14px;position:relative;box-shadow:0 2px 2px #00000024,0 3px 1px -2px #0000001f,0 1px 5px #0003}.gen-picker{justify-content:center;gap:1rem;display:flex}.unsupported{text-align:center}.unsupported p{color:#aaa;font-size:1.8rem;line-height:1.7}.unsupported strong{color:#e0e0e0}.unsupported .warn{color:#c0605a;font-size:1.6rem;font-weight:600}.unsupported .success{color:#5ac060;font-size:1.6rem;font-weight:600}.home{text-align:center;max-width:900px}.home p{color:#aaa;font-size:1.8rem;line-height:1.7}.home strong{color:#e0e0e0}.home .success{color:#5ac060;font-size:2.2rem;font-weight:600}\n"
  },
  {
    "path": "docs/assets/index-CCRny9cW.js",
    "content": "const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[\"assets/install-dialog-nQsOFibo.js\",\"assets/styles-Bnf3HqYs.js\",\"assets/no-port-picked-DMlthFiI.js\"])))=>i.map(i=>d[i]);\nvar e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel=\"modulepreload\"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={\"=\":`=0`,\":\":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var D=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},O={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=O,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,D)}catch(e){D(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(ee)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=ee,te=function(){re.postMessage(null)}}else te=function(){_(ee,0)};function ie(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),te=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),re=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ne:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case te:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ue=[],de=-1;function fe(e){return{current:e}}function pe(e){0>de||(e.current=ue[de],ue[de]=null,de--)}function k(e,t){de++,ue[de]=e.current,e.current=t}var me=fe(null),he=fe(null),ge=fe(null),_e=fe(null);function ve(e,t){switch(k(ge,t),k(he,e),k(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(me),k(me,e)}function ye(){pe(me),pe(he),pe(ge)}function be(e){e.memoizedState!==null&&k(_e,e);var t=me.current,n=Hd(t,e.type);t!==n&&(k(he,e),k(me,n))}function xe(e){he.current===e&&(pe(me),pe(he)),_e.current===e&&(pe(_e),Qf._currentValue=le)}var Se,Ce;function we(e){if(Se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\\n( *(at )?)/);Se=t&&t[1]||``,Ce=-1<e.stack.indexOf(`\n    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`\n`+Se+e+Ce}var Te=!1;function Ee(e,t){if(!e||Te)return``;Te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`\n`),l=s.split(`\n`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`\n`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?we(n):``}function De(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we(`Lazy`);case 13:return e.child!==t&&t!==null?we(`Suspense Fallback`):we(`Suspense`);case 19:return we(`SuspenseList`);case 0:case 15:return Ee(e.type,!1);case 11:return Ee(e.type.render,!1);case 1:return Ee(e.type,!0);case 31:return we(`Activity`);default:return``}}function Oe(e){try{var t=``,n=null;do t+=De(e,n),n=e,e=e.return;while(e);return t}catch(e){return`\nError generating stack: `+e.message+`\n`+e.stack}}var ke=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,je=t.unstable_cancelCallback,Me=t.unstable_shouldYield,Ne=t.unstable_requestPaint,Pe=t.unstable_now,Fe=t.unstable_getCurrentPriorityLevel,Ie=t.unstable_ImmediatePriority,Le=t.unstable_UserBlockingPriority,Re=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Be=t.unstable_IdlePriority,Ve=t.log,He=t.unstable_setDisableYieldValue,Ue=null,We=null;function Ge(e){if(typeof Ve==`function`&&He(e),We&&typeof We.setStrictMode==`function`)try{We.setStrictMode(Ue,e)}catch{}}var A=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-A(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ot(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-A(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function st(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-A(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ct(e,t){var n=t&-t;return n=n&42?1:lt(n),(n&(e.suspendedLanes|t))===0?n:0}function lt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ut(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function dt(){var e=O.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ft(e,t){var n=O.p;try{return O.p=e,t()}finally{O.p=n}}var pt=Math.random().toString(36).slice(2),mt=`__reactFiber$`+pt,ht=`__reactProps$`+pt,gt=`__reactContainer$`+pt,_t=`__reactEvents$`+pt,vt=`__reactListeners$`+pt,yt=`__reactHandles$`+pt,bt=`__reactResources$`+pt,xt=`__reactMarker$`+pt;function St(e){delete e[mt],delete e[ht],delete e[_t],delete e[vt],delete e[yt]}function Ct(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gt]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[mt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function wt(e){if(e=e[mt]||e[gt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Et(e){var t=e[bt];return t||=e[bt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function j(e){e[xt]=!0}var Dt=new Set,Ot={};function kt(e,t){At(e,t),At(e+`Capture`,t)}function At(e,t){for(Ot[e]=t,e=0;e<t.length;e++)Dt.add(t[e])}var jt=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]*$`),Mt={},Nt={};function Pt(e){return ke.call(Nt,e)?!0:ke.call(Mt,e)?!1:jt.test(e)?Nt[e]=!0:(Mt[e]=!0,!1)}function Ft(e,t,n){if(Pt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function It(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Lt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Rt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Bt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vt(e){if(!e._valueTracker){var t=zt(e)?`checked`:`value`;e._valueTracker=Bt(e,t,``+e[t])}}function Ht(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=zt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ut(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Wt=/[\\n\"\\\\]/g;function Gt(e){return e.replace(Wt,function(e){return`\\\\`+e.charCodeAt(0).toString(16)+` `})}function Kt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Rt(t)):e.value!==``+Rt(t)&&(e.value=``+Rt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Jt(e,o,Rt(n)):Jt(e,o,Rt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Rt(s):e.removeAttribute(`name`)}function qt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Vt(e);return}n=n==null?``:``+Rt(n),t=t==null?n:``+Rt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Vt(e)}function Jt(e,t,n){t===`number`&&Ut(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Yt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Rt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Xt(e,t,n){if(t!=null&&(t=``+Rt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Rt(n)}function Zt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ce(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Rt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Vt(e)}function Qt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $t=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 en(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||$t.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function tn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&en(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&en(e,o,t[o])}function nn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){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 rn=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`]]),an=/^[\\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 on(e){return an.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function sn(){}var cn=null;function ln(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var un=null,dn=null;function fn(e){var t=wt(e);if(t&&(e=t.stateNode)){var n=e[ht]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Kt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=\"`+Gt(``+t)+`\"][type=\"radio\"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ht]||null;if(!a)throw Error(i(90));Kt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ht(r)}break a;case`textarea`:Xt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Yt(e,!!n.multiple,t,!1)}}}var pn=!1;function mn(e,t,n){if(pn)return e(t,n);pn=!0;try{return e(t)}finally{if(pn=!1,(un!==null||dn!==null)&&(bu(),un&&(t=un,e=dn,dn=un=null,fn(t),e)))for(t=0;t<e.length;t++)fn(e[t])}}function hn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ht]||null;if(r===null)return null;n=r[t];a:switch(t){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)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var gn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),_n=!1;if(gn)try{var vn={};Object.defineProperty(vn,`passive`,{get:function(){_n=!0}}),window.addEventListener(`test`,vn,vn),window.removeEventListener(`test`,vn,vn)}catch{_n=!1}var yn=null,bn=null,xn=null;function Sn(){if(xn)return xn;var e,t=bn,n=t.length,r,i=`value`in yn?yn.value:yn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return xn=i.slice(e,1<r?1-r:void 0)}function Cn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function wn(){return!0}function Tn(){return!1}function En(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?wn:Tn,this.isPropagationStopped=Tn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=wn)},persist:function(){},isPersistent:wn}),t}var Dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},On=En(Dn),kn=h({},Dn,{view:0,detail:0}),An=En(kn),jn,Mn,Nn,Pn=h({},kn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Nn&&(Nn&&e.type===`mousemove`?(jn=e.screenX-Nn.screenX,Mn=e.screenY-Nn.screenY):Mn=jn=0,Nn=e),jn)},movementY:function(e){return`movementY`in e?e.movementY:Mn}}),Fn=En(Pn),In=En(h({},Pn,{dataTransfer:0})),Ln=En(h({},kn,{relatedTarget:0})),Rn=En(h({},Dn,{animationName:0,elapsedTime:0,pseudoElement:0})),zn=En(h({},Dn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Bn=En(h({},Dn,{data:0})),Vn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Hn={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`},M={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Un(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=M[e])?!!t[e]:!1}function Wn(){return Un}var Gn=En(h({},kn,{key:function(e){if(e.key){var t=Vn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Hn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wn,charCode:function(e){return e.type===`keypress`?Cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Kn=En(h({},Pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),qn=En(h({},kn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wn})),Jn=En(h({},Dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Yn=En(h({},Pn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Xn=En(h({},Dn,{newState:0,oldState:0})),Zn=[9,13,27,32],Qn=gn&&`CompositionEvent`in window,$n=null;gn&&`documentMode`in document&&($n=document.documentMode);var er=gn&&`TextEvent`in window&&!$n,tr=gn&&(!Qn||$n&&8<$n&&11>=$n),nr=` `,rr=!1;function ir(e,t){switch(e){case`keyup`:return Zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ar(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var or=!1;function sr(e,t){switch(e){case`compositionend`:return ar(t);case`keypress`:return t.which===32?(rr=!0,nr):null;case`textInput`:return e=t.data,e===nr&&rr?null:e;default:return null}}function cr(e,t){if(or)return e===`compositionend`||!Qn&&ir(e,t)?(e=Sn(),xn=bn=yn=null,or=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return tr&&t.locale!==`ko`?null:t.data;default:return null}}var lr={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 ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!lr[e.type]:t===`textarea`}function dr(e,t,n,r){un?dn?dn.push(r):dn=[r]:un=r,t=Ed(t,`onChange`),0<t.length&&(n=new On(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var fr=null,pr=null;function mr(e){yd(e,0)}function hr(e){if(Ht(Tt(e)))return e}function gr(e,t){if(e===`change`)return t}var _r=!1;if(gn){var vr;if(gn){var yr=`oninput`in document;if(!yr){var br=document.createElement(`div`);br.setAttribute(`oninput`,`return;`),yr=typeof br.oninput==`function`}vr=yr}else vr=!1;_r=vr&&(!document.documentMode||9<document.documentMode)}function xr(){fr&&(fr.detachEvent(`onpropertychange`,Sr),pr=fr=null)}function Sr(e){if(e.propertyName===`value`&&hr(pr)){var t=[];dr(t,pr,e,ln(e)),mn(mr,t)}}function Cr(e,t,n){e===`focusin`?(xr(),fr=t,pr=n,fr.attachEvent(`onpropertychange`,Sr)):e===`focusout`&&xr()}function wr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return hr(pr)}function Tr(e,t){if(e===`click`)return hr(t)}function Er(e,t){if(e===`input`||e===`change`)return hr(t)}function Dr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Or=typeof Object.is==`function`?Object.is:Dr;function kr(e,t){if(Or(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ke.call(t,i)||!Or(e[i],t[i]))return!1}return!0}function Ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jr(e,t){var n=Ar(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Ar(n)}}function Mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ut(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ut(e.document)}return t}function Pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Fr=gn&&`documentMode`in document&&11>=document.documentMode,Ir=null,Lr=null,Rr=null,zr=!1;function Br(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zr||Ir==null||Ir!==Ut(r)||(r=Ir,`selectionStart`in r&&Pr(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}),Rr&&kr(Rr,r)||(Rr=r,r=Ed(Lr,`onSelect`),0<r.length&&(t=new On(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ir)))}function Vr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Hr={animationend:Vr(`Animation`,`AnimationEnd`),animationiteration:Vr(`Animation`,`AnimationIteration`),animationstart:Vr(`Animation`,`AnimationStart`),transitionrun:Vr(`Transition`,`TransitionRun`),transitionstart:Vr(`Transition`,`TransitionStart`),transitioncancel:Vr(`Transition`,`TransitionCancel`),transitionend:Vr(`Transition`,`TransitionEnd`)},Ur={},Wr={};gn&&(Wr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),`TransitionEvent`in window||delete Hr.transitionend.transition);function Gr(e){if(Ur[e])return Ur[e];if(!Hr[e])return e;var t=Hr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Wr)return Ur[e]=t[n];return e}var Kr=Gr(`animationend`),qr=Gr(`animationiteration`),Jr=Gr(`animationstart`),Yr=Gr(`transitionrun`),Xr=Gr(`transitionstart`),Zr=Gr(`transitioncancel`),Qr=Gr(`transitionend`),$r=new Map,ei=`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(` `);ei.push(`scrollEnd`);function ti(e,t){$r.set(e,t),kt(t,[e])}var ni=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ri=[],ii=0,ai=0;function oi(){for(var e=ii,t=ai=ii=0;t<e;){var n=ri[t];ri[t++]=null;var r=ri[t];ri[t++]=null;var i=ri[t];ri[t++]=null;var a=ri[t];if(ri[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ui(n,i,a)}}function si(e,t,n,r){ri[ii++]=e,ri[ii++]=t,ri[ii++]=n,ri[ii++]=r,ai|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ci(e,t,n,r){return si(e,t,n,r),di(e)}function li(e,t){return si(e,null,null,t),di(e)}function ui(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-A(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function di(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fi={};function pi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,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 mi(e,t,n,r){return new pi(e,t,n,r)}function hi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gi(e,t){var n=e.alternate;return n===null?(n=mi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function _i(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function vi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)hi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ne:return e=mi(31,n,t,a),e.elementType=ne,e.lanes=o,e;case y:return yi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=mi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=mi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=mi(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case ee:s=14;break a;case te:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=mi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function yi(e,t,n,r){return e=mi(7,e,r,t),e.lanes=n,e}function bi(e,t,n){return e=mi(6,e,null,t),e.lanes=n,e}function xi(e){var t=mi(18,null,null,0);return t.stateNode=e,t}function Si(e,t,n){return t=mi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ci=new WeakMap;function wi(e,t){if(typeof e==`object`&&e){var n=Ci.get(e);return n===void 0?(t={value:e,source:t,stack:Oe(t)},Ci.set(e,t),t):n}return{value:e,source:t,stack:Oe(t)}}var Ti=[],Ei=0,Di=null,Oi=0,ki=[],Ai=0,ji=null,Mi=1,Ni=``;function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=Di,Di=e,Oi=t}function Fi(e,t,n){ki[Ai++]=Mi,ki[Ai++]=Ni,ki[Ai++]=ji,ji=e;var r=Mi;e=Ni;var i=32-A(r)-1;r&=~(1<<i),n+=1;var a=32-A(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Mi=1<<32-A(t)+i|n<<i|r,Ni=a+e}else Mi=1<<a|n<<i|r,Ni=e}function Ii(e){e.return!==null&&(Pi(e,1),Fi(e,1,0))}function Li(e){for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null;for(;e===ji;)ji=ki[--Ai],ki[Ai]=null,Ni=ki[--Ai],ki[Ai]=null,Mi=ki[--Ai],ki[Ai]=null}function Ri(e,t){ki[Ai++]=Mi,ki[Ai++]=Ni,ki[Ai++]=ji,Mi=t.id,Ni=t.overflow,ji=e}var zi=null,N=null,P=!1,Bi=null,Vi=!1,Hi=Error(i(519));function Ui(e){throw Yi(wi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Hi}function Wi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[mt]=e,t[ht]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),qt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Zt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=sn),t=!0):t=!1,t||Ui(e,!0)}function Gi(e){for(zi=e.return;zi;)switch(zi.tag){case 5:case 31:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:zi=zi.return}}function Ki(e){if(e!==zi)return!1;if(!P)return Gi(e),P=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&N&&Ui(e),Gi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));N=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));N=uf(e)}else t===27?(t=N,Zd(e.type)?(e=lf,lf=null,N=e):N=t):N=zi?cf(e.stateNode.nextSibling):null;return!0}function qi(){N=zi=null,P=!1}function Ji(){var e=Bi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Bi=null),e}function Yi(e){Bi===null?Bi=[e]:Bi.push(e)}var Xi=fe(null),Zi=null,Qi=null;function $i(e,t,n){k(Xi,t._currentValue),t._currentValue=n}function ea(e){e._currentValue=Xi.current,pe(Xi)}function ta(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function na(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ta(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ta(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ra(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Or(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===_e.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&na(t,e,n,r),t.flags|=262144}function ia(e){for(e=e.firstContext;e!==null;){if(!Or(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function aa(e){Zi=e,Qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function oa(e){return ca(Zi,e)}function sa(e,t){return Zi===null&&aa(e),ca(e,t)}function ca(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Qi===null){if(e===null)throw Error(i(308));Qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Qi=Qi.next=t;return n}var la=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ua=t.unstable_scheduleCallback,da=t.unstable_NormalPriority,F={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fa(){return{controller:new la,data:new Map,refCount:0}}function pa(e){e.refCount--,e.refCount===0&&ua(da,function(){e.controller.abort()})}var ma=null,ha=0,ga=0,_a=null;function va(e,t){if(ma===null){var n=ma=[];ha=0,ga=dd(),_a={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ha++,t.then(ya,ya),t}function ya(){if(--ha===0&&ma!==null){_a!==null&&(_a.status=`fulfilled`);var e=ma;ma=null,ga=0,_a=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ba(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var xa=D.S;D.S=function(e,t){eu=Pe(),typeof t==`object`&&t&&typeof t.then==`function`&&va(e,t),xa!==null&&xa(e,t)};var Sa=fe(null);function Ca(){var e=Sa.current;return e===null?K.pooledCache:e}function wa(e,t){t===null?k(Sa,Sa.current):k(Sa,t.pool)}function Ta(){var e=Ca();return e===null?null:{parent:F._currentValue,pool:e}}var Ea=Error(i(460)),Da=Error(i(474)),Oa=Error(i(542)),ka={then:function(){}};function Aa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ja(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(sn,sn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Fa(e),e;default:if(typeof t.status==`string`)t.then(sn,sn);else{if(e=K,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Fa(e),e}throw Na=t,Ea}}function Ma(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Na=e,Ea):e}}var Na=null;function Pa(){if(Na===null)throw Error(i(459));var e=Na;return Na=null,e}function Fa(e){if(e===Ea||e===Oa)throw Error(i(483))}var Ia=null,La=0;function Ra(e){var t=La;return La+=1,Ia===null&&(Ia=[]),ja(Ia,e,t)}function za(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ba(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Va(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=gi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=bi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===te&&Ma(i)===t.type)?(t=a(t,n.props),za(t,n),t.return=e,t):(t=vi(n.type,n.key,n.props,null,e.mode,r),za(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Si(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=yi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=vi(t.type,t.key,t.props,null,e.mode,n),za(n,t),n.return=e,n;case v:return t=Si(t,e.mode,n),t.return=e,t;case te:return t=Ma(t),f(e,t,n)}if(ce(t)||ae(t))return t=yi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ra(t),n);if(t.$$typeof===C)return f(e,sa(e,t),n);Ba(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case te:return n=Ma(n),p(e,t,n,r)}if(ce(n)||ae(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ra(n),r);if(n.$$typeof===C)return p(e,t,sa(e,n),r);Ba(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case te:return r=Ma(r),m(e,t,n,r,i)}if(ce(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ra(r),i);if(r.$$typeof===C)return m(e,t,n,sa(t,r),i);Ba(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),P&&Pi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return P&&Pi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),P&&Pi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),P&&Pi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return P&&Pi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),P&&Pi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===te&&Ma(l)===r.type){n(e,r.sibling),c=a(r,o.props),za(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=yi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=vi(o.type,o.key,o.props,null,e.mode,c),za(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Si(o,e.mode,c),c.return=e,e=c}return s(e);case te:return o=Ma(o),b(e,r,o,c)}if(ce(o))return h(e,r,o,c);if(ae(o)){if(l=ae(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ra(o),c);if(o.$$typeof===C)return b(e,r,sa(e,o),c);Ba(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{La=0;var i=b(e,t,n,r);return Ia=null,i}catch(t){if(t===Ea||t===Oa)throw t;var a=mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ha=Va(!0),Ua=Va(!1),Wa=!1;function Ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ka(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ja(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=di(e),ui(e,null,n),t}return si(e,r,t,n),di(e)}function Ya(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}function Xa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Za=!1;function Qa(){if(Za){var e=_a;if(e!==null)throw e}}function $a(e,t,n,r){Za=!1;var i=e.updateQueue;Wa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===ga&&(Za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Wa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function to(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)eo(n[e],t)}var no=fe(null),ro=fe(0);function io(e,t){e=Wl,k(ro,e),k(no,t),Wl=e|t.baseLanes}function ao(){k(ro,Wl),k(no,no.current)}function oo(){Wl=ro.current,pe(no),pe(ro)}var so=fe(null),co=null;function lo(e){var t=e.alternate;k(I,I.current&1),k(so,e),co===null&&(t===null||no.current!==null||t.memoizedState!==null)&&(co=e)}function uo(e){k(I,I.current),k(so,e),co===null&&(co=e)}function fo(e){e.tag===22?(k(I,I.current),k(so,e),co===null&&(co=e)):po(e)}function po(){k(I,I.current),k(so,so.current)}function mo(e){pe(so),co===e&&(co=null),pe(I)}var I=fe(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var go=0,L=null,R=null,_o=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function z(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Or(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return go=a,L=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Hs:Us,bo=!1,a=n(r,i),bo=!1,yo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){D.H=Vs;var t=R!==null&&R.next!==null;if(go=0,_o=R=L=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||V||(e=e.dependencies,e!==null&&ia(e)&&(V=!0))}function Oo(e,t,n,r){L=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,_o=R=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Ws,o=t(n,r)}while(yo);return o}function ko(){var e=D.H,t=e.useState()[0];return t=typeof t.then==`function`?Fo(t):t,e=e.useState()[0],(R===null?null:R.memoizedState)!==e&&(L.flags|=1024),t}function Ao(){var e=xo!==0;return xo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}go=0,_o=R=L=null,yo=!1,So=xo=0,Co=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _o===null?L.memoizedState=_o=e:_o=_o.next=e,_o}function B(){if(R===null){var e=L.alternate;e=e===null?null:e.memoizedState}else e=R.next;var t=_o===null?L.memoizedState:_o.next;if(t!==null)_o=t,R=e;else{if(e===null)throw L.alternate===null?Error(i(467)):Error(i(310));R=e,e={memoizedState:R.memoizedState,baseState:R.baseState,baseQueue:R.baseQueue,queue:R.queue,next:null},_o===null?L.memoizedState=_o=e:_o=_o.next=e}return _o}function Po(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fo(e){var t=So;return So+=1,Co===null&&(Co=[]),e=ja(Co,e,t),t=L,(_o===null?t.memoizedState:_o.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Hs:Us),e}function Io(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Fo(e);if(e.$$typeof===C)return oa(e)}throw Error(i(438,String(e)))}function Lo(e){var t=null,n=L.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=L.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Po(),L.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=re;return t.index++,n}function Ro(e,t){return typeof t==`function`?t(e):t}function zo(e){return Bo(B(),R,e)}function Bo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(go&f)===f:(J&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ga&&(d=!0);else if((go&p)===p){u=u.next,p===ga&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,L.lanes|=p,Gl|=p;f=u.action,bo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,L.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Or(o,e.memoizedState)&&(V=!0,d&&(n=_a,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Vo(e){var t=B(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Or(o,t.memoizedState)||(V=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ho(e,t,n){var r=L,a=B(),o=P;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Or((R||a).memoizedState,n);if(s&&(a.memoizedState=n,V=!0),a=a.queue,ps(Go.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||_o!==null&&_o.memoizedState.tag&1){if(r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,a,n,t),null),K===null)throw Error(i(349));o||go&127||Uo(r,t,n)}return n}function Uo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=L.updateQueue,t===null?(t=Po(),L.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wo(e,t,n,r){t.value=n,t.getSnapshot=r,Ko(t)&&qo(e)}function Go(e,t,n){return n(function(){Ko(t)&&qo(e)})}function Ko(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Or(e,n)}catch{return!0}}function qo(e){var t=li(e,2);t!==null&&hu(t,e,2)}function Jo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),bo){Ge(!0);try{n()}finally{Ge(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:e},t}function Yo(e,t,n,r){return e.baseState=n,Bo(e,R,typeof r==`function`?r:Ro)}function Xo(e,t,n,r,a){if(Rs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};D.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Zo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Zo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=D.T,o={};D.T=o;try{var s=n(i,r),c=D.S;c!==null&&c(o,s),Qo(e,t,s)}catch(n){es(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),D.T=a}}else try{a=n(i,r),Qo(e,t,a)}catch(n){es(e,t,n)}}function Qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){$o(e,t,n)},function(n){return es(e,t,n)}):$o(e,t,n)}function $o(e,t,n){t.status=`fulfilled`,t.value=n,ts(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Zo(e,n)))}function es(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ts(t),t=t.next;while(t!==r)}e.action=null}function ts(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ns(e,t){return t}function rs(e,t){if(P){var n=K.formState;if(n!==null){a:{var r=L;if(P){if(N){b:{for(var i=N,a=Vi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){N=cf(i.nextSibling),r=i.data===`F!`;break a}}Ui(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:t},n.queue=r,n=Fs.bind(null,L,r),r.dispatch=n,r=Jo(!1),a=Ls.bind(null,L,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Xo.bind(null,L,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function is(e){return as(B(),R,e)}function as(e,t,n){if(t=Bo(e,t,ns)[0],e=zo(Ro)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Fo(t)}catch(e){throw e===Ea?Oa:e}else r=t;t=B();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(L.flags|=2048,cs(9,{destroy:void 0},os.bind(null,i,n),null)),[r,a,e]}function os(e,t){e.action=t}function ss(e){var t=B(),n=R;if(n!==null)return as(t,n,e);B(),t=t.memoizedState,n=B();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function cs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=L.updateQueue,t===null&&(t=Po(),L.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ls(){return B().memoizedState}function us(e,t,n,r){var i=No();L.flags|=e,i.memoizedState=cs(1|t,{destroy:void 0},n,r===void 0?null:r)}function ds(e,t,n,r){var i=B();r=r===void 0?null:r;var a=i.memoizedState.inst;R!==null&&r!==null&&To(r,R.memoizedState.deps)?i.memoizedState=cs(t,a,n,r):(L.flags|=e,i.memoizedState=cs(1|t,a,n,r))}function fs(e,t){us(8390656,8,e,t)}function ps(e,t){ds(2048,8,e,t)}function ms(e){L.flags|=4;var t=L.updateQueue;if(t===null)t=Po(),L.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function hs(e){var t=B().memoizedState;return ms({ref:t,nextImpl:e}),function(){if(G&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function gs(e,t){return ds(4,2,e,t)}function _s(e,t){return ds(4,4,e,t)}function vs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ys(e,t,n){n=n==null?null:n.concat([e]),ds(4,4,vs.bind(null,t,e),n)}function bs(){}function xs(e,t){var n=B();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ss(e,t){var n=B();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),bo){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r}function Cs(e,t,n){return n===void 0||go&1073741824&&!(J&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),L.lanes|=e,Gl|=e,n)}function ws(e,t,n,r){return Or(n,t)?n:no.current===null?!(go&42)||go&1073741824&&!(J&261930)?(V=!0,e.memoizedState=n):(e=mu(),L.lanes|=e,Gl|=e,t):(e=Cs(e,n,r),Or(e,t)||(V=!0),e)}function Ts(e,t,n,r,i){var a=O.p;O.p=a!==0&&8>a?a:8;var o=D.T,s={};D.T=s,Ls(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Is(e,t,ba(c,r),pu(e)):Is(e,t,r,pu(e))}catch(n){Is(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function Es(){}function Ds(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Os(e).queue;Ts(e,a,t,le,n===null?Es:function(){return ks(e),n(r)})}function Os(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ks(e){var t=Os(e);t.next===null&&(t=e.alternate.memoizedState),Is(e,t.next.queue,{},pu())}function As(){return oa(Qf)}function js(){return B().memoizedState}function Ms(){return B().memoizedState}function Ns(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=qa(n);var r=Ja(t,e,n);r!==null&&(hu(r,t,n),Ya(r,t,n)),t={cache:fa()},e.payload=t;return}t=t.return}}function Ps(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Rs(e)?zs(t,n):(n=ci(e,t,n,r),n!==null&&(hu(n,e,r),Bs(n,t,r)))}function Fs(e,t,n){Is(e,t,n,pu())}function Is(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rs(e))zs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Or(s,o))return si(e,t,i,0),K===null&&oi(),!1}catch{}if(n=ci(e,t,i,r),n!==null)return hu(n,e,r),Bs(n,t,r),!0}return!1}function Ls(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Rs(e)){if(t)throw Error(i(479))}else t=ci(e,n,r,2),t!==null&&hu(t,e,2)}function Rs(e){var t=e.alternate;return e===L||t!==null&&t===L}function zs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var Vs={readContext:oa,use:Io,useCallback:z,useContext:z,useEffect:z,useImperativeHandle:z,useLayoutEffect:z,useInsertionEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useSyncExternalStore:z,useId:z,useHostTransitionStatus:z,useFormState:z,useActionState:z,useOptimistic:z,useMemoCache:z,useCacheRefresh:z};Vs.useEffectEvent=z;var Hs={readContext:oa,use:Io,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(bo){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(bo){Ge(!0);try{n(t)}finally{Ge(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ps.bind(null,L,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,n=Fs.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bs,useDeferredValue:function(e,t){return Cs(No(),e,t)},useTransition:function(){var e=Jo(!1);return e=Ts.bind(null,L,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,a=No();if(P){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),K===null)throw Error(i(349));J&127||Uo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,fs(Go.bind(null,r,o,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=K.identifierPrefix;if(P){var n=Ni,r=Mi;n=(r&~(1<<32-A(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:As,useFormState:rs,useActionState:rs,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ls.bind(null,L,!0,n),n.dispatch=t,[e,t]},useMemoCache:Lo,useCacheRefresh:function(){return No().memoizedState=Ns.bind(null,L)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(G&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Us={readContext:oa,use:Io,useCallback:xs,useContext:oa,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:zo,useRef:ls,useState:function(){return zo(Ro)},useDebugValue:bs,useDeferredValue:function(e,t){return ws(B(),R.memoizedState,e,t)},useTransition:function(){var e=zo(Ro)[0],t=B().memoizedState;return[typeof e==`boolean`?e:Fo(e),t]},useSyncExternalStore:Ho,useId:js,useHostTransitionStatus:As,useFormState:is,useActionState:is,useOptimistic:function(e,t){return Yo(B(),R,e,t)},useMemoCache:Lo,useCacheRefresh:Ms};Us.useEffectEvent=hs;var Ws={readContext:oa,use:Io,useCallback:xs,useContext:oa,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:Vo,useRef:ls,useState:function(){return Vo(Ro)},useDebugValue:bs,useDeferredValue:function(e,t){var n=B();return R===null?Cs(n,e,t):ws(n,R.memoizedState,e,t)},useTransition:function(){var e=Vo(Ro)[0],t=B().memoizedState;return[typeof e==`boolean`?e:Fo(e),t]},useSyncExternalStore:Ho,useId:js,useHostTransitionStatus:As,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){var n=B();return R===null?(n.baseState=e,[e,n.queue.dispatch]):Yo(n,R,e,t)},useMemoCache:Lo,useCacheRefresh:Ms};Ws.useEffectEvent=hs;function Gs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ks={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=qa(r);i.payload=t,n!=null&&(i.callback=n),t=Ja(e,i,r),t!==null&&(hu(t,e,r),Ya(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=qa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ja(e,i,r),t!==null&&(hu(t,e,r),Ya(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=qa(n);r.tag=2,t!=null&&(r.callback=t),t=Ja(e,r,n),t!==null&&(hu(t,e,n),Ya(t,e,n))}};function qs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!kr(n,r)||!kr(i,a):!0}function Js(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ks.enqueueReplaceState(t,t.state,null)}function Ys(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Xs(e){ni(e)}function Zs(e){console.error(e)}function Qs(e){ni(e)}function $s(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ec(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){return n=qa(n),n.tag=3,n.payload={element:null},n.callback=function(){$s(e,t)},n}function nc(e){return e=qa(e),e.tag=3,e}function rc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ec(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ec(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ic(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ra(t,n,a,!0),n=so.current,n!==null){switch(n.tag){case 31:case 13:return co===null?Du():n.alternate===null&&X===0&&(X=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(P)return t=so.current,t===null?(r!==Hi&&(t=Error(i(423),{cause:r}),Yi(wi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=wi(r,n),a=tc(e.stateNode,r,a),Xa(e,a),X!==4&&(X=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Hi&&(e=Error(i(422),{cause:r}),Yi(wi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=wi(o,n),Xl===null?Xl=[o]:Xl.push(o),X!==4&&(X=2),t===null)return!0;r=wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=tc(n.stateNode,r,e),Xa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=nc(a),rc(a,e,n,r),Xa(n,a),!1}n=n.return}while(n!==null);return!1}var ac=Error(i(461)),V=!1;function oc(e,t,n,r){t.child=e===null?Ua(t,null,n,r):Ha(t,e.child,n,r)}function sc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return aa(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!V?(jo(e,t,i),jc(e,t,i)):(P&&s&&Ii(t),t.flags|=1,oc(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!hi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lc(e,t,a,r,i)):(e=vi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Mc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?kr:n,n(o,r)&&e.ref===t.ref)return jc(e,t,i)}return t.flags|=1,e=gi(a,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(kr(a,r)&&e.ref===t.ref)if(V=!1,t.pendingProps=r=a,Mc(e,i))e.flags&131072&&(V=!0);else return t.lanes=e.lanes,jc(e,t,i)}return _c(e,t,n,r,i)}function uc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wa(t,a===null?null:a.cachePool),a===null?ao():io(t,a),fo(t);else return r=t.lanes=536870912,fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&wa(t,null),ao(),po(t)):(wa(t,a.cachePool),io(t,a),po(t),t.memoizedState=null);return oc(e,t,i,n),t.child}function dc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fc(e,t,n,r,i){var a=Ca();return a=a===null?null:{parent:F._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&wa(t,null),ao(),fo(t),e!==null&&ra(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return Ha(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,mo(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(P){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,dc(null,e);if(uo(t),(e=N)?(e=rf(e,Vi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,zi=t,N=null)):e=null,e===null)throw Ui(t);return t.lanes=536870912,null}return pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(uo(t),a)if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(V||ra(e,t,n,!1),a=(n&e.childLanes)!==0,V||a){if(r=K,r!==null&&(s=ct(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,li(e,s),hu(r,e,s),ac;Du(),t=mc(e,t,n)}else e=o.treeContext,N=cf(s.nextSibling),zi=t,P=!0,Bi=null,Vi=!1,e!==null&&Ri(t,e),t=pc(t,r),t.flags|=4096;return t}return e=gi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _c(e,t,n,r,i){return aa(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!V?(jo(e,t,i),jc(e,t,i)):(P&&r&&Ii(t),t.flags|=1,oc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return aa(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!V?(jo(e,t,a),jc(e,t,a)):(P&&r&&Ii(t),t.flags|=1,oc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if(aa(t),t.stateNode===null){var a=fi,o=n.contextType;typeof o==`object`&&o&&(a=oa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ks,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ga(t),o=n.contextType,a.context=typeof o==`object`&&o?oa(o):fi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Gs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ks.enqueueReplaceState(a,a.state,null),$a(t,r,a,i),Qa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ys(n,s);a.props=c;var l=a.context,u=n.contextType;o=fi,typeof u==`object`&&u&&(o=oa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Js(t,a,r,o),Wa=!1;var f=t.memoizedState;a.state=f,$a(t,r,a,i),Qa(),l=t.memoizedState,s||f!==l||Wa?(typeof d==`function`&&(Gs(t,n,d,r),l=t.memoizedState),(c=Wa||qs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ka(e,t),o=t.memoizedProps,u=Ys(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=fi,typeof l==`object`&&l&&(c=oa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Js(t,a,r,c),Wa=!1,f=t.memoizedState,a.state=f,$a(t,r,a,i),Qa();var p=t.memoizedState;o!==d||f!==p||Wa||e!==null&&e.dependencies!==null&&ia(e.dependencies)?(typeof s==`function`&&(Gs(t,n,s,r),p=t.memoizedState),(u=Wa||qs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ia(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,gc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ha(t,e.child,null,i),t.child=Ha(t,null,n,i)):oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=jc(e,t,i),e}function bc(e,t,n,r){return qi(),t.flags|=256,oc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:Ta()}}function Cc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function wc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(I.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(P){if(a?lo(t):po(t),(e=N)?(e=rf(e,Vi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,zi=t,N=null)):e=null,e===null)throw Ui(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(po(t),a=t.mode,c=Ec({mode:`hidden`,children:c},a),r=yi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(null,r)):(lo(t),Tc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(lo(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState===null?(po(t),c=r.fallback,a=t.mode,r=Ec({mode:`visible`,children:r.children},a),c=yi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ha(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,t=dc(null,r)):(po(t),t.child=e.child,t.flags|=128,t=null);else if(lo(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Yi({value:r,source:null,stack:null}),t=Dc(e,t,n)}else if(V||ra(e,t,n,!1),s=(n&e.childLanes)!==0,V||s){if(s=K,s!==null&&(r=ct(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,li(e,r),hu(s,e,r),ac;af(c)||Du(),t=Dc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,N=cf(c.nextSibling),zi=t,P=!0,Bi=null,Vi=!1,e!==null&&Ri(t,e),t=Tc(t,r.children),t.flags|=4096);return t}return a?(po(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=gi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=yi(c,a,n,null),c.flags|=2):c=gi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,dc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(a=c.cachePool,a===null?a=Ta():(l=F._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(e.child,r)):(lo(t),n=e.child,e=n.sibling,n=gi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Tc(e,t){return t=Ec({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ec(e,t){return e=mi(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return Ha(t,e.child,null,n),e=Tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ta(e.return,t,n)}function kc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=I.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,k(I,o),oc(e,t,r,n),r=P?Oi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oc(e,n,t);else if(e.tag===19)Oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ho(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kc(t,!0,n,null,a,r);break;case`together`:kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function jc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ra(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=gi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=gi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ia(e))):!0}function Nc(e,t,n){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),$i(t,F,e.memoizedState.cache),qi();break;case 27:case 5:be(t);break;case 4:ve(t,t.stateNode.containerInfo);break;case 10:$i(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(lo(t),e=jc(e,t,n),e===null?null:e.sibling):wc(e,t,n):(lo(t),t.flags|=128,null);lo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ra(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),k(I,I.current),r)break;return null;case 22:return t.lanes=0,uc(e,t,n,t.pendingProps);case 24:$i(t,F,e.memoizedState.cache)}return jc(e,t,n)}function Pc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)V=!0;else{if(!Mc(e,n)&&!(t.flags&128))return V=!1,Nc(e,t,n);V=!!(e.flags&131072)}else V=!1,P&&t.flags&1048576&&Fi(t,Oi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ma(t.elementType),t.type=e,typeof e==`function`)hi(e)?(r=Ys(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=sc(null,t,e,r,n);break a}else if(a===ee){t.tag=14,t=cc(null,t,e,r,n);break a}}throw t=se(e)||e,Error(i(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ys(r,t.pendingProps),yc(e,t,r,a,n);case 3:a:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ka(e,t),$a(t,r,null,n);var s=t.memoizedState;if(r=s.cache,$i(t,F,r),r!==o.cache&&na(t,[F],n,!0),Qa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=bc(e,t,r,n);break a}else if(r!==a){a=wi(Error(i(424)),t),Yi(a),t=bc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(N=cf(e.firstChild),zi=t,P=!0,Bi=null,Vi=!0,n=Ua(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(qi(),r===a){t=jc(e,t,n);break a}oc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:P||(n=t.type,e=t.pendingProps,r=Bd(ge.current).createElement(n),r[mt]=t,r[ht]=e,Pd(r,n,e),j(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return be(t),e===null&&P&&(r=t.stateNode=ff(t.type,t.pendingProps,ge.current),zi=t,Vi=!0,a=N,Zd(t.type)?(lf=a,N=cf(r.firstChild)):N=a),oc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&P&&((a=r=N)&&(r=tf(r,t.type,t.pendingProps,Vi),r===null?a=!1:(t.stateNode=r,zi=t,N=cf(r.firstChild),Vi=!1,a=!0)),a||Ui(t)),be(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),Qf._currentValue=a),gc(e,t),oc(e,t,r,n),t.child;case 6:return e===null&&P&&((e=n=N)&&(n=nf(n,t.pendingProps,Vi),n===null?e=!1:(t.stateNode=n,zi=t,N=null,e=!0)),e||Ui(t)),null;case 13:return wc(e,t,n);case 4:return ve(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ha(t,null,r,n):oc(e,t,r,n),t.child;case 11:return sc(e,t,t.type,t.pendingProps,n);case 7:return oc(e,t,t.pendingProps,n),t.child;case 8:return oc(e,t,t.pendingProps.children,n),t.child;case 12:return oc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,$i(t,t.type,r.value),oc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,aa(t),a=oa(a),r=r(a),t.flags|=1,oc(e,t,r,n),t.child;case 14:return cc(e,t,t.type,t.pendingProps,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 19:return Ac(e,t,n);case 31:return hc(e,t,n);case 22:return uc(e,t,n,t.pendingProps);case 24:return aa(t),r=oa(F),e===null?(a=Ca(),a===null&&(a=K,o=fa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ga(t),$i(t,F,a)):((e.lanes&n)!==0&&(Ka(e,t),$a(t,null,null,n),Qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,$i(t,F,r),r!==a.cache&&na(t,[F],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),$i(t,F,r))),oc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Fc(e){e.flags|=4}function Ic(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Na=ka,Da}else e.flags&=-16777217}function Lc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Na=ka,Da}function Rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:nt(),e.lanes|=t,Yl|=t)}function zc(e,t){if(!P)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function H(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bc(e,t,n){var r=t.pendingProps;switch(Li(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return H(t),null;case 1:return H(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ea(F),ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ki(t)?Fc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ji())),H(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Fc(t),o===null?(H(t),Ic(t,a,null,r,n)):(H(t),Lc(t,o))):o?o===e.memoizedState?(H(t),t.flags&=-16777217):(Fc(t),H(t),Lc(t,o)):(e=e.memoizedProps,e!==r&&Fc(t),H(t),Ic(t,a,e,r,n)),null;case 27:if(xe(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return H(t),null}e=me.current,Ki(t)?Wi(t,e):(e=ff(a,r,n),t.stateNode=e,Fc(t))}return H(t),null;case 5:if(xe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return H(t),null}if(o=me.current,Ki(t))Wi(t,o);else{var s=Bd(ge.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[mt]=t,o[ht]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Fc(t)}}return H(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,Ki(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=zi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ui(t,!0)}else e=Bd(e).createTextNode(r),e[mt]=t,t.stateNode=e}return H(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ki(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[mt]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),e=!1}else n=Ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(mo(t),t):(mo(t),null);if(t.flags&128)throw Error(i(558))}return H(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[mt]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),a=!1}else a=Ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(mo(t),t):(mo(t),null)}return mo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Rc(t,t.updateQueue),H(t),null);case 4:return ye(),e===null&&Sd(t.stateNode.containerInfo),H(t),null;case 10:return ea(t.type),H(t),null;case 19:if(pe(I),r=t.memoizedState,r===null)return H(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)zc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(e),o!==null){for(t.flags|=128,zc(r,!1),e=o.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_i(n,e),n=n.sibling;return k(I,I.current&1|2),P&&Pi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Pe()>tu&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!P)return H(t),null}else 2*Pe()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(H(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Pe(),e.sibling=null,n=I.current,k(I,a?n&1|2:n&1),P&&Pi(t,r.treeForkCount),e);case 22:case 23:return mo(t),oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&pe(Sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ea(F),H(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Vc(e,t){switch(Li(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(F),ye(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xe(t),null;case 31:if(t.memoizedState!==null){if(mo(t),t.alternate===null)throw Error(i(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(I),null;case 4:return ye(),null;case 10:return ea(t.type),null;case 22:case 23:return mo(t),oo(),e!==null&&pe(Sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ea(F),null;case 25:return null;default:return null}}function Hc(e,t){switch(Li(t),t.tag){case 3:ea(F),ye();break;case 26:case 27:case 5:xe(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&mo(t);break;case 13:mo(t);break;case 19:pe(I);break;case 10:ea(t.type);break;case 22:case 23:mo(t),oo(),e!==null&&pe(Sa);break;case 24:ea(F)}}function Uc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Wc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{to(t,n)}catch(t){Z(e,e.return,t)}}}function Kc(e,t,n){n.props=Ys(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Yc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ht]=t}catch(t){Z(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=sn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[mt]=e,t[ht]=n}catch(t){Z(e,e.return,t)}}var nl=!1,U=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=Nr(e),Pr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ys(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Uc(5,n);break;case 1:if(xl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Ys(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Gc(n),r&512&&qc(n,n.return);break;case 3:if(xl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{to(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&tl(n);case 26:case 5:xl(e,n),t===null&&r&4&&Yc(n),r&512&&qc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||nl,!r){t=t!==null&&t.memoizedState!==null||U,i=nl;var a=U;nl=r,(U=t)&&!a?Cl(e,n,(n.subtreeFlags&8772)!=0):xl(e,n),nl=i,U=a}break;case 30:break;default:xl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&St(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var W=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(We&&typeof We.onCommitFiberUnmount==`function`)try{We.onCommitFiberUnmount(Ue,n)}catch{}switch(n.tag){case 26:U||Jc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:U||Jc(n,t);var r=W,i=ll;Zd(n.type)&&(W=n.stateNode,ll=!1),ul(e,t,n),pf(n.stateNode),W=r,ll=i;break;case 5:U||Jc(n,t);case 6:if(r=W,i=ll,W=null,ul(e,t,n),W=r,ll=i,W!==null)if(ll)try{(W.nodeType===9?W.body:W.nodeName===`HTML`?W.ownerDocument.body:W).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{W.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:W!==null&&(ll?(e=W,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(W,n.stateNode));break;case 4:r=W,i=ll,W=n.stateNode.containerInfo,ll=!0,ul(e,t,n),W=r,ll=i;break;case 0:case 11:case 14:case 15:Wc(2,n,t),U||Wc(4,n,t),ul(e,t,n);break;case 1:U||(Jc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Kc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:U=(r=U)||n.memoizedState!==null,ul(e,t,n),U=r;break;default:ul(e,t,n)}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function gl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){W=c.stateNode,ll=!1;break a}break;case 5:W=c.stateNode,ll=!1;break a;case 3:case 4:W=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(W===null)throw Error(i(160));dl(o,s,a),W=null,ll=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Wc(3,e,e.return),Uc(3,e),Wc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),r&64&&nl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=_l;if(gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[xt]||o[mt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[mt]=e,j(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[mt]=e,j(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),n!==null&&r&4&&Xc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),e.flags&32){a=e.stateNode;try{Qt(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Xc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(gl(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=_l,_l=gf(t.containerInfo),gl(t,e),_l=a,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}rl&&(rl=!1,bl(e));break;case 4:r=_l,_l=gf(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Pe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=nl,d=U;if(nl=u||a,U=d||l,gl(t,e),U=d,nl=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||nl||U||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Zc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;el(e,Qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Qt(o,``),n.flags&=-33),el(e,Qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;$c(e,Qc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wc(4,t,t.return),Sl(t);break;case 1:Jc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Kc(t,t.return,n),Sl(t);break;case 27:pf(t.stateNode);case 26:case 5:Jc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Cl(i,a,n),Uc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)eo(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Gc(a),qc(a,a.return);break;case 27:tl(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&Yc(a),qc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),qc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&pa(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Uc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e)));break;case 12:if(i&2048){El(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ol(a,o,s,c,i),Uc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&Gf(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=gf(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Wc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Wc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:pa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var Rl={getCacheForType:function(e){var t=oa(F),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return oa(F).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,G=0,K=null,q=null,J=0,Y=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,X=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return G&2&&J!==0?J&-J:D.T===null?dt():dd()}function mu(){if(Jl===0)if(!(J&536870912)||P){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),Jl=e}else Jl=536870912;return e=so.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===K&&(Y===2||Y===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,J,Jl,!1)),it(e,n),(!(G&2)||e!==K)&&(e===K&&(!(G&2)&&(Kl|=n),X===4&&yu(e,J,Jl,!1)),rd(e))}function gu(e,t,n){if(G&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||et(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Hl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Vl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Pe(),10<a)){if(yu(r,t,Jl,!Vl),$e(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Vl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Vl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:sn},Ml(t,a,d);var m=(a&62914560)===a?$l-Pe():(a&4194048)===a?eu-Pe():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Or(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-A(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ot(e,n,t)}function bu(){return G&6?!0:(id(0,!1),!1)}function xu(){if(q!==null){if(Y===0)var e=q.return;else e=q,Qi=Zi=null,Mo(e),Ia=null,La=0,e=q;for(;e!==null;)Hc(e.alternate,e),e=e.return;q=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),K=e,q=n=gi(e.current,null),J=t,Y=0,Bl=null,Vl=!1,Hl=et(e,t),Ul=!1,Yl=Jl=ql=Kl=Gl=X=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-A(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,oi(),n}function Cu(e,t){L=null,D.H=Vs,t===Ea||t===Oa?(t=Pa(),Y=3):t===Da?(t=Pa(),Y=4):Y=t===ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,q===null&&(X=1,$s(e,wi(t,e.current)))}function wu(){var e=so.current;return e===null?!0:(J&4194048)===J?co===null:(J&62914560)===J||J&536870912?e===co:!1}function Tu(){var e=D.H;return D.H=Vs,e===null?Vs:e}function Eu(){var e=D.A;return D.A=Rl,e}function Du(){X=4,Vl||(J&4194048)!==J&&so.current!==null||(Hl=!0),!(Gl&134217727)&&!(Kl&134217727)||K===null||yu(K,J,Jl,!1)}function Ou(e,t,n){var r=G;G|=2;var i=Tu(),a=Eu();(K!==e||J!==t)&&(nu=null,Su(e,t)),t=!1;var o=X;a:do try{if(Y!==0&&q!==null){var s=q,c=Bl;switch(Y){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:so.current===null&&(t=!0);var l=Y;if(Y=0,Bl=null,Pu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=Y,Y=0,Bl=null,Pu(e,s,c,l)}}ku(),o=X;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Qi=Zi=null,G=r,D.H=i,D.A=a,q===null&&(K=null,J=0,oi()),o}function ku(){for(;q!==null;)Mu(q)}function Au(e,t){var n=G;G|=2;var r=Tu(),a=Eu();K!==e||J!==t?(nu=null,tu=Pe()+500,Su(e,t)):Hl=et(e,t);a:do try{if(Y!==0&&q!==null){t=q;var o=Bl;b:switch(Y){case 1:Y=0,Bl=null,Pu(e,t,o,1);break;case 2:case 9:if(Aa(o)){Y=0,Bl=null,Nu(t);break}t=function(){Y!==2&&Y!==9||K!==e||(Y=7),rd(e)},o.then(t,t);break a;case 3:Y=7;break a;case 4:Y=5;break a;case 7:Aa(o)?(Y=0,Bl=null,Nu(t)):(Y=0,Bl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(q.tag){case 26:s=q.memoizedState;case 5:case 27:var c=q;if(s?Wf(s):c.stateNode.complete){Y=0,Bl=null;var l=c.sibling;if(l!==null)q=l;else{var u=c.return;u===null?q=null:(q=u,Fu(u))}break b}}Y=0,Bl=null,Pu(e,t,o,5);break;case 6:Y=0,Bl=null,Pu(e,t,o,6);break;case 8:xu(),X=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Qi=Zi=null,D.H=r,D.A=a,G=n,q===null?(K=null,J=0,oi(),X):0}function ju(){for(;q!==null&&!Me();)Mu(q)}function Mu(e){var t=Pc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,J);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,J);break;case 5:Mo(t);default:Hc(n,t),t=q=_i(t,Wl),t=Pc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Pu(e,t,n,r){Qi=Zi=null,Mo(t),Ia=null,La=0;var i=t.return;try{if(ic(e,i,t,n,J)){X=1,$s(e,wi(n,e.current)),q=null;return}}catch(t){if(i!==null)throw q=i,t;X=1,$s(e,wi(n,e.current)),q=null;return}t.flags&32768?(P||r===1?e=!0:Hl||J&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=so.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Vl);return}e=t.return;var n=Bc(t.alternate,t,Wl);if(n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);X===0&&(X=5)}function Iu(e,t){do{var n=Vc(e.alternate,e);if(n!==null){n.flags&=32767,q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){q=e;return}q=e=n}while(e!==null);X=6,q=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(G&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ai,at(e,n,o,s,c,l),e===K&&(q=K=null,J=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Re,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=D.T,D.T=null,a=O.p,O.p=2,s=G,G|=4;try{ol(e,t,n)}finally{G=s,O.p=a,D.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=G;G|=4;try{vl(t,e);var a=zd,o=Nr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Mr(s.ownerDocument.documentElement,s)){if(c!==null&&Pr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=jr(s,h),v=jr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{G=i,O.p=r,D.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=G;G|=4;try{sl(e,t.alternate,t)}finally{G=i,O.p=r,D.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Ne();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),ut(n),t=t.stateNode,We&&typeof We.onCommitFiberRoot==`function`)try{We.onCommitFiberRoot(Ue,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=D.T,i=O.p,O.p=2,D.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{D.T=t,O.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,pa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=ut(su),r=D.T,a=O.p;try{O.p=32>n?32:n,D.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(i(331));var c=G;if(G|=4,Fl(o.current),Dl(o,o.current,s,n),G=c,id(0,!1),We&&typeof We.onPostCommitFiberRoot==`function`)try{We.onPostCommitFiberRoot(Ue,o)}catch{}return!0}finally{O.p=a,D.T=r,Vu(e,t)}}function Wu(e,t,n){t=wi(n,t),t=tc(e.stateNode,t,2),e=Ja(e,t,2),e!==null&&(it(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=wi(n,e),n=nc(2),r=Ja(t,n,2),r!==null&&(rc(n,r,t,e),it(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>Pe()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=nt()),e=li(e,t),e!==null&&(it(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ae(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-A(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=$e(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Pe(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-A(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=K,n=J,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Y===2||Y===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&je(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&je(r),ut(n)){case 2:case 8:n=Le;break;case 32:n=Re;break;case 268435456:n=Be;break;default:n=Re}return r=cd.bind(null,e),n=Ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&je(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=J;return r=$e(e,e===K?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Pe()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){G&6?Ae(Ie,ad):od()})}function dd(){if(nd===0){var e=ga;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:on(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ht]||null).action),o=r.submitter;o&&(t=(t=o[ht]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new On(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Ds(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Ds(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<ei.length;hd++){var gd=ei[hd];ti(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}ti(Kr,`onAnimationEnd`),ti(qr,`onAnimationIteration`),ti(Jr,`onAnimationStart`),ti(`dblclick`,`onDoubleClick`),ti(`focusin`,`onFocus`),ti(`focusout`,`onBlur`),ti(Yr,`onTransitionRun`),ti(Xr,`onTransitionStart`),ti(Zr,`onTransitionCancel`),ti(Qr,`onTransitionEnd`),At(`onMouseEnter`,[`mouseout`,`mouseover`]),At(`onMouseLeave`,[`mouseout`,`mouseover`]),At(`onPointerEnter`,[`pointerout`,`pointerover`]),At(`onPointerLeave`,[`pointerout`,`pointerover`]),kt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),kt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),kt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),kt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),kt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),kt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ni(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ni(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[_t];n===void 0&&(n=t[_t]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Dt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!_n||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}mn(function(){var r=a,i=ln(n),s=[];a:{var c=$r.get(e);if(c!==void 0){var l=On,u=e;switch(e){case`keypress`:if(Cn(n)===0)break a;case`keydown`:case`keyup`:l=Gn;break;case`focusin`:u=`focus`,l=Ln;break;case`focusout`:u=`blur`,l=Ln;break;case`beforeblur`:case`afterblur`:l=Ln;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Fn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=In;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=qn;break;case Kr:case qr:case Jr:l=Rn;break;case Qr:l=Jn;break;case`scroll`:case`scrollend`:l=An;break;case`wheel`:l=Yn;break;case`copy`:case`cut`:case`paste`:l=zn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Kn;break;case`toggle`:case`beforetoggle`:l=Xn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=hn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==cn&&(u=n.relatedTarget||n.fromElement)&&(Ct(u)||u[gt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ct(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Fn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Kn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Tt(l),h=u==null?c:Tt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?Tt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=gr;else if(ur(c))if(_r)v=Er;else{v=wr;var y=Cr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&nn(r.elementType)&&(v=gr):v=Tr;if(v&&=v(e,r)){dr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Jt(c,`number`,c.value)}switch(y=r?Tt(r):window,e){case`focusin`:(ur(y)||y.contentEditable===`true`)&&(Ir=y,Lr=r,Rr=null);break;case`focusout`:Rr=Lr=Ir=null;break;case`mousedown`:zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:zr=!1,Br(s,n,i);break;case`selectionchange`:if(Fr)break;case`keydown`:case`keyup`:Br(s,n,i)}var b;if(Qn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else or?ir(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(tr&&n.locale!==`ko`&&(or||x!==`onCompositionStart`?x===`onCompositionEnd`&&or&&(b=Sn()):(yn=i,bn=`value`in yn?yn.value:yn.textContent,or=!0)),y=Ed(r,x),0<y.length&&(x=new Bn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=ar(n),b!==null&&(x.data=b)))),(b=er?sr(e,n):cr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Bn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=hn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=hn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=hn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=hn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\\r\\n?/g,Ad=/\\u0000|\\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`\n`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Qt(e,``+r);break;case`className`:It(e,`class`,r);break;case`tabIndex`:It(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:It(e,n,r);break;case`style`:tn(e,r,o);break;case`data`:if(t!==`object`){It(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=on(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=on(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=sn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.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`){e.removeAttribute(`xlink:href`);break}n=on(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);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`?e.setAttribute(n,``+r):e.removeAttribute(n);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`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Ft(e,`popover`,r);break;case`xlinkActuate`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ft(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=rn.get(n)||n,Ft(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:tn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Qt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=sn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ot.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ht]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ft(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}qt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Yt(e,!!r,n,!0):Yt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}Zt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(nn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Kt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Yt(e,!!n,n?[]:``,!1):Yt(e,!!n,t,!0)):Yt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Xt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(nn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[xt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),St(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[xt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);St(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=O.d;O.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=wt(e);t!==null&&t.tag===5&&t.type===`form`?ks(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Gt(t);i=`link[rel=\"`+e+`\"][href=\"`+i+`\"]`,typeof n==`string`&&(i+=`[crossorigin=\"`+n+`\"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),j(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel=\"preload\"][as=\"`+Gt(t)+`\"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset=\"`+Gt(n.imageSrcSet)+`\"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes=\"`+Gt(n.imageSizes)+`\"]`)):i+=`[href=\"`+Gt(e)+`\"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),j(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel=\"modulepreload\"][as=\"`+Gt(r)+`\"][href=\"`+Gt(e)+`\"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),j(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Et(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,\"data-precedence\":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);j(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),j(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),j(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ge.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Et(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Et(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Et(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href=\"`+Gt(e)+`\"`}function jf(e){return`link[rel=\"stylesheet\"][`+e+`]`}function Mf(e){return h({},e,{\"data-precedence\":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel=\"preload\"][as=\"style\"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),j(t),e.head.appendChild(t))}function Pf(e){return`[src=\"`+Gt(e)+`\"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~=\"`+Gt(n.href)+`\"]`);if(r)return t.instance=r,j(r),r;var a=h({},n,{\"data-href\":n.href,\"data-precedence\":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),j(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,j(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),j(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,j(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),j(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel=\"stylesheet\"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[xt]||a[mt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,j(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),j(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=mi(3,null,null,t),e.current=a,a.stateNode=e,t=fa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ga(a),e}function tp(e){return e?(e=fi,e):fi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=qa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ja(e,r,t),n!==null&&(hu(n,e,t),Ya(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=li(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=lt(t);var n=li(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=2,up(e,t,n,r)}finally{O.p=a,D.T=i}}function lp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=8,up(e,t,n,r)}finally{O.p=a,D.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=wt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-A(o);s.entanglements[1]|=c,o&=~c}rd(a),!(G&6)&&(tu=Pe()+500,id(0,!1))}}break;case 31:case 13:s=li(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=ln(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=Ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){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(Fe()){case Ie:return 2;case Le:return 8;case Re:case ze:return 32;case Be:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=wt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=Ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ft(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ft(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);cn=r,n.target.dispatchEvent(r),cn=null}else return t=wt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=wt(n);a!==null&&(e.splice(t,3),t-=3,Ds(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ht]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ht]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[gt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.4`)throw Error(i(527,Lp,`19.2.4`));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:D,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ue=zp.inject(Rp),We=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Xs,s=Zs,c=Qs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[gt]=t.current,Sd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()}))(),_=c(u(),1),v=`modulepreload`,y=function(e){return`/`+e},b={},x=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=y(t,n),t in b)return;b[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel=\"stylesheet\"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href=\"${t}\"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:v,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},S=`popstate`;function C(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function w(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=ie(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),ne(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:re(t))}function r(e,t){E(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return ae(t,n,r,e)}function T(e,t){if(e===!1||e==null)throw Error(t)}function E(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ee(){return Math.random().toString(36).substring(2,10)}function te(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ne(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?ie(t):t,state:n,key:t&&t.key||r||ee(),unstable_mask:i}}function re({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function ie(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ae(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=C(e)?e:ne(h.location,e,t);n&&n(r,e),l=u()+1;let d=te(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=C(e)?e:ne(h.location,e,t);n&&n(r,e),l=u();let i=te(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return oe(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(S,d),c=e,()=>{i.removeEventListener(S,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function oe(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),T(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:re(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function se(e,t,n=`/`){return ce(e,t,n,!1)}function ce(e,t,n,r){let i=Ce((typeof t==`string`?ie(t):t).pathname||`/`,n);if(i==null)return null;let a=O(e);ue(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=Se(i);o=ye(a[e],t,r)}return o}function D(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function O(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;T(c.relativePath.startsWith(r),`Absolute route path \"${c.relativePath}\" nested under path \"${r}\" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=je([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(T(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path \"${l}\".`),O(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:_e(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of le(e.path))a(e,t,!0,n)}),t}function le(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=le(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ue(e){e.sort((e,t)=>e.score===t.score?ve(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var de=/^:[\\w-]+$/,fe=3,pe=2,k=1,me=10,he=-2,ge=e=>e===`*`;function _e(e,t){let n=e.split(`/`),r=n.length;return n.some(ge)&&(r+=he),t&&(r+=pe),n.filter(e=>!ge(e)).reduce((e,t)=>e+(de.test(t)?fe:t===``?k:me),r)}function ve(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ye(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=be({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=be({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:je([a,u.pathname]),pathnameBase:Me(je([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=je([a,u.pathnameBase]))}return o}function be(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=xe(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function xe(e,t=!1,n=!0){E(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path \"${e}\" will be treated as if it were \"${e.replace(/\\*$/,`/*`)}\" because the \\`*\\` character must always follow a \\`/\\` in the pattern. To get rid of this warning, please change the route path to \"${e.replace(/\\*$/,`/*`)}\".`);let r=[],i=`^`+e.replace(/\\/*\\*?$/,``).replace(/^\\/*/,`/`).replace(/[\\\\.*+^${}|()[\\]]/g,`\\\\$&`).replace(/\\/:([\\w-]+)(\\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\\\/]*)`:`(?:/([^\\\\/]*))?`}return`/([^\\\\/]+)`}).replace(/\\/([\\w-]+)\\?(\\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\\\/(.+)|\\\\/*)$`):n?i+=`\\\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Se(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\\//g,`%2F`)).join(`/`)}catch(t){return E(!1,`The URL path \"${e}\" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ce(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var we=/^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;function Te(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?ie(e):e,a;return n?(n=n.replace(/\\/\\/+/g,`/`),a=n.startsWith(`/`)?Ee(n.substring(1),`/`):Ee(n,t)):a=t,{pathname:a,search:Ne(r),hash:Pe(i)}}function Ee(e,t){let n=t.replace(/\\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function De(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \\`to.${t}\\` field [${JSON.stringify(r)}].  Please separate it out to the \\`to.${n}\\` field. Alternatively you may provide the full path as a string in <Link to=\"...\"> and the router will parse it for you.`}function Oe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ke(e){let t=Oe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ae(e,t,n,r=!1){let i;typeof e==`string`?i=ie(e):(i={...e},T(!i.pathname||!i.pathname.includes(`?`),De(`?`,`pathname`,`search`,i)),T(!i.pathname||!i.pathname.includes(`#`),De(`#`,`pathname`,`hash`,i)),T(!i.search||!i.search.includes(`#`),De(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Te(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var je=e=>e.join(`/`).replace(/\\/\\/+/g,`/`),Me=e=>e.replace(/\\/+$/,``).replace(/^\\/*/,`/`),Ne=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Pe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Fe=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ie(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Le(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\\/\\/*/g,`/`)||`/`}var Re=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ze(e,t){let n=e;if(typeof n!=`string`||!we.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Re)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=Ce(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{E(!1,`<Link to=\"${n}\"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\\0`);var Be=_.createContext(null);Be.displayName=`DataRouter`;var Ve=_.createContext(null);Ve.displayName=`DataRouterState`;var He=_.createContext(!1),Ue=_.createContext({isTransitioning:!1});Ue.displayName=`ViewTransition`;var We=_.createContext(new Map);We.displayName=`Fetchers`;var Ge=_.createContext(null);Ge.displayName=`Await`;var A=_.createContext(null);A.displayName=`Navigation`;var Ke=_.createContext(null);Ke.displayName=`Location`;var qe=_.createContext({outlet:null,matches:[],isDataRoute:!1});qe.displayName=`Route`;var Je=_.createContext(null);Je.displayName=`RouteError`;var Ye=`REACT_ROUTER_ERROR`,Xe=`REDIRECT`,Ze=`ROUTE_ERROR_RESPONSE`;function Qe(e){if(e.startsWith(`${Ye}:${Xe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function $e(e){if(e.startsWith(`${Ye}:${Ze}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Fe(t.status,t.statusText,t.data)}catch{}}function et(e,{relative:t}={}){T(tt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext(A),{hash:i,pathname:a,search:o}=st(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:je([n,a])),r.createHref({pathname:s,search:o,hash:i})}function tt(){return _.useContext(Ke)!=null}function nt(){return T(tt(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(Ke).location}var rt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function it(e){_.useContext(A).static||_.useLayoutEffect(e)}function at(){let{isDataRoute:e}=_.useContext(qe);return e?Et():ot()}function ot(){T(tt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(Be),{basename:t,navigator:n}=_.useContext(A),{matches:r}=_.useContext(qe),{pathname:i}=nt(),a=JSON.stringify(ke(r)),o=_.useRef(!1);return it(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(E(o.current,rt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ae(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:je([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}_.createContext(null);function st(e,{relative:t}={}){let{matches:n}=_.useContext(qe),{pathname:r}=nt(),i=JSON.stringify(ke(n));return _.useMemo(()=>Ae(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ct(e,t){return lt(e,t)}function lt(e,t,n){T(tt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext(A),{matches:i}=_.useContext(qe),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Dt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \\`useRoutes()\\`) at \"${s}\" (under <Route path=\"${e}\">) but the parent route path has no trailing \"*\". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path=\"${e}\"> to <Route path=\"${e===`/`?`*`:`${e}/*`}\">.`)}let u=nt(),d;if(t){let e=typeof t==`string`?ie(t):t;T(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \\`<Routes location>\\` or \\`useRoutes(routes, location)\\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is \"${c}\" but pathname \"${e.pathname}\" was given in the \\`location\\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\\//,``).split(`/`);p=`/`+f.replace(/^\\//,``).split(`/`).slice(e.length).join(`/`)}let m=se(e,{pathname:p});E(l||m!=null,`No routes matched location \"${d.pathname}${d.search}${d.hash}\" `),E(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location \"${d.pathname}${d.search}${d.hash}\" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an \"empty\" page.`);let h=gt(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:je([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:je([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(Ke.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function ut(){let e=Tt(),t=Ie(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=_.createElement(_.Fragment,null,_.createElement(`p`,null,`💿 Hey developer 👋`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var dt=_.createElement(ut,null),ft=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=$e(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(qe.Provider,{value:this.props.routeContext},_.createElement(Je.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(mt,{error:e},t):t}};ft.contextType=He;var pt=new WeakMap;function mt({children:e,error:t}){let{basename:n}=_.useContext(A);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Qe(t.digest);if(e){let r=pt.get(t);if(r)throw r;let i=ze(e.location,n);if(Re&&!pt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw pt.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function ht({routeContext:e,match:t,children:n}){let r=_.useContext(Be);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(qe.Provider,{value:e},n)}function gt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);T(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Le(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||dt,o&&(s<0&&c===0?(Dt(`route-fallback`,!1,\"No `HydrateFallback` element provided to render during initial hydration\"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(ht,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(ft,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function _t(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function vt(e){let t=_.useContext(Be);return T(t,_t(e)),t}function yt(e){let t=_.useContext(Ve);return T(t,_t(e)),t}function bt(e){let t=_.useContext(qe);return T(t,_t(e)),t}function xt(e){let t=bt(e),n=t.matches[t.matches.length-1];return T(n.route.id,`${e} can only be used on routes that contain a unique \"id\"`),n.route.id}function St(){return xt(`useRouteId`)}function Ct(){return yt(`useNavigation`).navigation}function wt(){let{matches:e,loaderData:t}=yt(`useMatches`);return _.useMemo(()=>e.map(e=>D(e,t)),[e,t])}function Tt(){let e=_.useContext(Je),t=yt(`useRouteError`),n=xt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Et(){let{router:e}=vt(`useNavigate`),t=xt(`useNavigate`),n=_.useRef(!1);return it(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{E(n.current,rt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var j={};function Dt(e,t,n){!t&&!j[e]&&(j[e]=!0,E(!1,n))}_.useOptimistic,_.memo(Ot);function Ot({routes:e,future:t,state:n,isStatic:r,onError:i}){return lt(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function kt({to:e,replace:t,state:n,relative:r}){T(tt(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=_.useContext(A);E(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=_.useContext(qe),{pathname:o}=nt(),s=at(),c=Ae(e,ke(a),o,r===`path`),l=JSON.stringify(c);return _.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function At(e){T(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function jt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){T(!tt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=ie(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=_.useMemo(()=>{let e=Ce(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return E(h!=null,`<Router basename=\"${s}\"> is not able to match the URL \"${l}${u}${d}\" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:_.createElement(A.Provider,{value:c},_.createElement(Ke.Provider,{children:t,value:h}))}function Mt({children:e,location:t}){return ct(Nt(e),t)}function Nt(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,Nt(e.props.children,i));return}T(e.type===At,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),T(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Nt(e.props.children,i)),n.push(a)}),n}var Pt=`get`,Ft=`application/x-www-form-urlencoded`;function It(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Lt(e){return It(e)&&e.tagName.toLowerCase()===`button`}function Rt(e){return It(e)&&e.tagName.toLowerCase()===`form`}function zt(e){return It(e)&&e.tagName.toLowerCase()===`input`}function Bt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vt(e,t){return e.button===0&&(!t||t===`_self`)&&!Bt(e)}var Ht=null;function Ut(){if(Ht===null)try{new FormData(document.createElement(`form`),0),Ht=!1}catch{Ht=!0}return Ht}var Wt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Gt(e){return e!=null&&!Wt.has(e)?(E(!1,`\"${e}\" is not a valid \\`encType\\` for \\`<Form>\\`/\\`<fetcher.Form>\\` and will default to \"${Ft}\"`),null):e}function Kt(e,t){let n,r,i,a,o;if(Rt(e)){let o=e.getAttribute(`action`);r=o?Ce(o,t):null,n=e.getAttribute(`method`)||Pt,i=Gt(e.getAttribute(`enctype`))||Ft,a=new FormData(e)}else if(Lt(e)||zt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type=\"submit\"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Ce(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Pt,i=Gt(e.getAttribute(`formenctype`))||Gt(o.getAttribute(`enctype`))||Ft,a=new FormData(o,e),!Ut()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(It(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type=\"submit|image\">`);else n=Pt,r=null,i=Ft,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\\0`);var qt={\"&\":`\\\\u0026`,\">\":`\\\\u003e`,\"<\":`\\\\u003c`,\"\\u2028\":`\\\\u2028`,\"\\u2029\":`\\\\u2029`},Jt=/[&><\\u2028\\u2029]/g;function Yt(e){return e.replace(Jt,e=>qt[e])}function Xt(e,t){if(e===!1||e==null)throw Error(t)}function Zt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Ce(i.pathname,t)===`/`?i.pathname=`${t.replace(/\\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\\/$/,``)}.${r}`,i}async function Qt(e,t){if(e.id in t)return t[e.id];try{let n=await x(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \\`${e.module}\\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $t(e){return e!=null&&typeof e.page==`string`}function en(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function tn(e,t,n){return sn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Qt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(en).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function nn(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function rn(e,t,{includeHydrateFallback:n}={}){return an(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function an(e){return[...new Set(e)]}function on(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function sn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!$t(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(on(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function cn(){let e=_.useContext(Be);return Xt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function ln(){let e=_.useContext(Ve);return Xt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var un=_.createContext(void 0);un.displayName=`FrameworkContext`;function dn(){let e=_.useContext(un);return Xt(e,`You must render this element inside a <HydratedRouter> element`),e}function fn(e,t){let n=_.useContext(un),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),_.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:pn(s,p),onBlur:pn(c,m),onMouseEnter:pn(l,p),onMouseLeave:pn(u,m),onTouchStart:pn(d,p)}]:[a,f,{}]:[!1,f,{}]}function pn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function mn({page:e,...t}){let{router:n}=cn(),r=_.useMemo(()=>se(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?_.createElement(gn,{page:e,matches:r,...t}):null}function hn(e){let{manifest:t,routeModules:n}=dn(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return tn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function gn({page:e,matches:t,...n}){let r=nt(),{future:i,manifest:a,routeModules:o}=dn(),{basename:s}=cn(),{loaderData:c,matches:l}=ln(),u=_.useMemo(()=>nn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=_.useMemo(()=>nn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Zt(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=_.useMemo(()=>rn(d,a),[d,a]),m=hn(d);return _.createElement(_.Fragment,null,f.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function _n(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var vn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{vn&&(window.__reactRouterVersion=`7.13.1`)}catch{}function yn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=_.useRef();i.current??=w({window:r,v5Compat:!0});let a=i.current,[o,s]=_.useState({action:a.action,location:a.location}),c=_.useCallback(e=>{n===!1?s(e):_.startTransition(()=>s(e))},[n]);return _.useLayoutEffect(()=>a.listen(c),[a,c]),_.createElement(jt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function bn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=_.useState({action:n.action,location:n.location}),o=_.useCallback(e=>{r===!1?a(e):_.startTransition(()=>a(e))},[r]);return _.useLayoutEffect(()=>n.listen(o),[n,o]),_.createElement(jt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}bn.displayName=`unstable_HistoryRouter`;var xn=/^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i,Sn=_.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:v}=_.useContext(A),y=typeof l==`string`&&xn.test(l),b=ze(l,h);l=b.to;let x=et(l,{relative:r}),S=nt(),C=null;if(o){let e=Ae(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:je([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=fn(n,p),ee=kn(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});function te(t){e&&e(t),t.defaultPrevented||ee(t)}let ne=!(b.isExternal||i),re=_.createElement(`a`,{...p,...E,href:(ne?C:void 0)||b.absoluteURL||x,onClick:ne?te:e,ref:_n(m,T),target:c,\"data-discover\":!y&&t===`render`?`true`:void 0});return w&&!y?_.createElement(_.Fragment,null,re,_.createElement(mn,{page:x})):re});Sn.displayName=`Link`;var Cn=_.forwardRef(function({\"aria-current\":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=st(a,{relative:c.relative}),d=nt(),f=_.useContext(Ve),{navigator:p,basename:m}=_.useContext(A),h=f!=null&&zn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=Ce(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return _.createElement(Sn,{...c,\"aria-current\":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Cn.displayName=`NavLink`;var wn=_.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Pt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=_.useContext(A),g=Mn(),v=Nn(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&xn.test(s);return _.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?_.startTransition(()=>p()):p()},...p,\"data-discover\":!b&&e===`render`?`true`:void 0})});wn.displayName=`Form`;function Tn({getKey:e,storageKey:t,...n}){let r=_.useContext(un),{basename:i}=_.useContext(A),a=nt(),o=wt();Ln({getKey:e,storageKey:t});let s=_.useMemo(()=>{if(!r||!e)return null;let t=In(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return _.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Yt(JSON.stringify(t||Pn))}, ${Yt(JSON.stringify(s))})`}})}Tn.displayName=`ScrollRestoration`;function En(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dn(e){let t=_.useContext(Be);return T(t,En(e)),t}function On(e){let t=_.useContext(Ve);return T(t,En(e)),t}function kn(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=at(),d=nt(),f=st(e,{relative:o});return _.useCallback(p=>{if(Vt(p,t)){p.preventDefault();let t=n===void 0?re(d)===re(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?_.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var An=0,jn=()=>`__${String(++An)}__`;function Mn(){let{router:e}=Dn(`useSubmit`),{basename:t}=_.useContext(A),n=St(),r=e.fetch,i=e.navigate;return _.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Kt(e,t);a.navigate===!1?await r(a.fetcherKey||jn(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Nn(e,{relative:t}={}){let{basename:n}=_.useContext(A),r=_.useContext(qe);T(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...st(e||`.`,{relative:t})},o=nt();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:je([n,a.pathname])),re(a)}var Pn=`react-router-scroll-positions`,Fn={};function In(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Ce(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Ln({getKey:e,storageKey:t}={}){let{router:n}=Dn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=On(`useScrollRestoration`),{basename:a}=_.useContext(A),o=nt(),s=wt(),c=Ct();_.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Rn(_.useCallback(()=>{if(c.state===`idle`){let t=In(o,s,a,e);Fn[t]=window.scrollY}try{sessionStorage.setItem(t||Pn,JSON.stringify(Fn))}catch(e){E(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(_.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Pn);e&&(Fn=JSON.parse(e))}catch{}},[t]),_.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Fn,()=>window.scrollY,e?(t,n)=>In(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),_.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{E(!1,`\"${o.hash.slice(1)}\" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Rn(e,t){let{capture:n}=t||{};_.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function zn(e,{relative:t}={}){let n=_.useContext(Ue);T(n!=null,\"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?\");let{basename:r}=Dn(`useViewTransitionState`),i=st(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ce(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ce(n.nextLocation.pathname,r)||n.nextLocation.pathname;return be(i.pathname,o)!=null||be(i.pathname,a)!=null}var Bn=`/assets/logo-DvFIlBYQ.svg`,Vn=`data:image/svg+xml,%3csvg%20width='98'%20height='96'%20viewBox='0%200%2098%2096'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_730_27136)'%3e%3cpath%20d='M41.4395%2069.3848C28.8066%2067.8535%2019.9062%2058.7617%2019.9062%2046.9902C19.9062%2042.2051%2021.6289%2037.0371%2024.5%2033.5918C23.2559%2030.4336%2023.4473%2023.7344%2024.8828%2020.959C28.7109%2020.4805%2033.8789%2022.4902%2036.9414%2025.2656C40.5781%2024.1172%2044.4062%2023.543%2049.0957%2023.543C53.7852%2023.543%2057.6133%2024.1172%2061.0586%2025.1699C64.0254%2022.4902%2069.2891%2020.4805%2073.1172%2020.959C74.457%2023.543%2074.6484%2030.2422%2073.4043%2033.4961C76.4668%2037.1328%2078.0937%2042.0137%2078.0937%2046.9902C78.0937%2058.7617%2069.1934%2067.6621%2056.3691%2069.2891C59.623%2071.3945%2061.8242%2075.9883%2061.8242%2081.252L61.8242%2091.2051C61.8242%2094.0762%2064.2168%2095.7031%2067.0879%2094.5547C84.4102%2087.9512%2098%2070.6289%2098%2049.1914C98%2022.1074%2075.9883%206.69539e-07%2048.9043%204.309e-07C21.8203%201.92261e-07%20-1.9479e-07%2022.1074%20-4.3343e-07%2049.1914C-6.20631e-07%2070.4375%2013.4941%2088.0469%2031.6777%2094.6504C34.2617%2095.6074%2036.75%2093.8848%2036.75%2091.3008L36.75%2083.6445C35.4102%2084.2188%2033.6875%2084.6016%2032.1562%2084.6016C25.8398%2084.6016%2022.1074%2081.1563%2019.4277%2074.7441C18.375%2072.1602%2017.2266%2070.6289%2015.0254%2070.3418C13.877%2070.2461%2013.4941%2069.7676%2013.4941%2069.1934C13.4941%2068.0449%2015.4082%2067.1836%2017.3223%2067.1836C20.0977%2067.1836%2022.4902%2068.9063%2024.9785%2072.4473C26.8926%2075.2227%2028.9023%2076.4668%2031.2949%2076.4668C33.6875%2076.4668%2035.2187%2075.6055%2037.4199%2073.4043C39.0469%2071.7773%2040.291%2070.3418%2041.4395%2069.3848Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_730_27136'%3e%3crect%20width='98'%20height='96'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,Hn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),M=o(((e,t)=>{t.exports=Hn()}))();function Un(){let e=at();return(0,M.jsxs)(`div`,{className:`header`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(`button`,{className:`nav-btn`,onClick:()=>e(`/robot`),children:`Robot Management`})}),(0,M.jsxs)(`div`,{className:`logo`,children:[(0,M.jsxs)(Sn,{to:`/`,children:[(0,M.jsx)(`img`,{src:Bn,alt:`Brainslug Logo`,height:80}),(0,M.jsxs)(`div`,{className:`logo-text`,children:[(0,M.jsx)(`span`,{children:`Brainslug Tools`}),(0,M.jsx)(`span`,{className:``,children:`Tools to flash and manage your brainslug`})]})]}),(0,M.jsx)(`a`,{href:`http://github.com/philip2809/neato-brainslug`,target:`_blank`,rel:`noopener noreferrer`,children:(0,M.jsx)(`img`,{src:Vn,alt:`GitHub Logo`,height:30,className:`github`})})]}),(0,M.jsx)(`div`,{children:(0,M.jsx)(`button`,{className:`nav-btn`,onClick:()=>e(`/flash`),children:`ESP Flasher`})})]})}function Wn(e,t){return[[e,t[0]]]}function Gn(e,t){let n=[],r=[];return e.split(`\n`).forEach(e=>{let[i,...a]=e.split(`,`),o=t.find(e=>e.key===i);o&&(o.basic?n:r).push(...o.parser?o.parser(a):Wn(o.name||o.key,a))}),{lastUpdated:Date.now(),basic:n,advanced:r}}function Kn(e){let t=e.split(`\n`);return t.length===2?{basic:[[`Error`,t[1]]],lastUpdated:Date.now()}:{basic:[[`Error`,t[2]],[`Alert`,t[4]]],lastUpdated:Date.now()}}var qn=[{key:`Model`,basic:!0,parser:e=>[[`Model`,e[0]],[`ModelNum`,e[1]]]},{key:`Software`,basic:!0,parser:e=>[[`Software`,e.slice(0,3).join(`.`)+`-`+e[3]]]},{key:`MainBoard Serial Number`,basic:!0,parser:e=>[[`MFG Code`,e[0]],[`Serial Number`,e[1]]]}],Jn=[{key:`FuelPercent`,name:`Fuel Percent`,basic:!0},{key:`BattTempCAvg`,basic:!0,name:`Average Battery Temperature (C)`},{key:`VBattV`,basic:!0,name:`Battery Voltage`},{key:`VExtV`,basic:!0,name:`Charger Voltage`},{key:`BatteryOverTemp`},{key:`ChargingActive`},{key:`ChargingEnabled`},{key:`ConfidentOnFuel`},{key:`OnReservedFuel`},{key:`BatteryFailure`},{key:`ExtPwrPresent`},{key:`ThermistorPresent`},{key:`Discharge_mAH`},{key:`Charger_mAH`}],Yn=class{serialConnection;version={basic:[],advanced:[],command:`GetVersion`,lastUpdated:0};charger={basic:[],advanced:[],command:`GetCharger`,lastUpdated:0};error={basic:[],advanced:[],command:`GetErr`,lastUpdated:0};constructor(e){this.serialConnection=e,this.startDataRead(),this.startWriteData(),this.sendCommand(`GetVersion`),this.sendCommand(`GetCharger`),this.sendCommand(`GetErr`),this.startGetErrLoop()}readBuffer=new Uint8Array;async startDataRead(){for(;this.serialConnection.readable;){let e=this.serialConnection.readable.getReader();try{for(;;){let{value:t,done:n}=await e.read();if(n)break;if(t&&(this.readBuffer=new Uint8Array([...this.readBuffer,...t]),t.includes(26))){console.warn(`Received message with 0x1A, decoding buffer`);let e=new TextDecoder().decode(this.readBuffer).split(`\u001a`),t=e.pop();if(e.forEach(e=>{this.parseData(e)}),t===``){this.readBuffer=new Uint8Array;continue}this.readBuffer=new TextEncoder().encode(t)}}}catch{}finally{e.releaseLock()}}}parseData(e){console.log(`Parsing data:`,e),e.includes(`Component,Major,Minor,Build,Aux`)?this.version={...this.version,...Gn(e,qn)}:e.includes(`Label,Value`)&&e.includes(`BattTempCAvg`)?this.charger={...this.charger,...Gn(e,Jn)}:e.startsWith(`GetErr`)&&(this.error={...this.error,...Kn(e)}),console.log(`Updated robot data:`,{version:this.version,charger:this.charger}),er()}cmdQueue=[];writeTimer;serialWriter;async startWriteData(){if(!this.serialConnection.writable){console.error(`Serial connection not writable`);return}if(this.writeTimer){this.stopWriteData();return}this.serialWriter=this.serialConnection.writable.getWriter(),this.writeTimer=setInterval(()=>{if(this.cmdQueue.length===0)return;if(!this.serialWriter){console.error(`Serial writer not available`),this.stopWriteData();return}let e=this.cmdQueue.shift();console.log(`Sending command:`,e),this.serialWriter.write(new TextEncoder().encode(e))},100)}async stopWriteData(){this.writeTimer&&=(clearInterval(this.writeTimer),void 0),this.serialWriter&&=(await this.serialWriter.close(),void 0)}async sendCommand(e){this.cmdQueue.push(e+`\n`)}getErrLoopTimer;startGetErrLoop(){if(this.getErrLoopTimer){this.stopGetErrLoop();return}this.getErrLoopTimer=setInterval(()=>{this.sendCommand(`GetErr`)},2e3)}stopGetErrLoop(){this.getErrLoopTimer&&=(clearInterval(this.getErrLoopTimer),void 0)}},Xn,Zn=null,Qn=new Set,$n=0,er=()=>{$n++,Qn.forEach(e=>e())},tr=e=>(Qn.add(e),()=>Qn.delete(e)),nr=()=>$n;async function rr(e,t){e(`Select device in browser prompt`);try{Xn=await navigator.serial.requestPort({filters:t?[{usbVendorId:8456}]:[]})}catch{e(`No device selected`);return}e(`Opening port...`);try{await Xn.open({baudRate:115200})}catch{e(`Error opening port`);return}e(`Connected successfully`),setTimeout(async()=>{Zn=new Yn(Xn),er()},200)}function ir(e){let t=new Date(e);if(!Number.isNaN(t.valueOf()))return t;let n=String(e).match(/\\d+/g);if(n==null||n.length<=2)return t;{let[e,t,...r]=n.map(e=>parseInt(e)),i=[e,t-1,...r];return new Date(Date.UTC(...i))}}var ar=(e,t,n)=>{let r=e===1?t:t+`s`;return e+` `+r+` `+n};function or(){return or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},or.apply(null,arguments)}var sr=60,cr=sr*60,lr=cr*24,ur=lr*7,dr=lr*30,fr=lr*365,pr=()=>Date.now();function mr({date:e,formatter:t,component:n=`time`,live:r=!0,minPeriod:i=0,maxPeriod:a=ur,title:o,now:s=pr,...c}){let[l,u]=(0,_.useState)(s());(0,_.useEffect)(()=>{if(!r)return;let t=(()=>{let t=ir(e).valueOf();if(!t)return console.warn(`[react-timeago] Invalid Date provided`),0;let n=Math.round(Math.abs(l-t)/1e3),r=n<sr?1e3:n<cr?1e3*sr:n<lr?1e3*cr:1e3*ur,o=Math.min(Math.max(r,i*1e3),a*1e3);return o?setTimeout(()=>{u(s())},o):0})();return()=>{t&&clearTimeout(t)}},[e,r,a,i,s,l]),(0,_.useEffect)(()=>{u(s())},[e]);let d=n,f=ir(e).valueOf();if(!f)return null;let p=Math.round(Math.abs(l-f)/1e3),m=f<l?`ago`:`from now`,[h,g]=p<sr?[Math.round(p),`second`]:p<cr?[Math.round(p/sr),`minute`]:p<lr?[Math.round(p/cr),`hour`]:p<ur?[Math.round(p/lr),`day`]:p<dr?[Math.round(p/ur),`week`]:p<fr?[Math.round(p/dr),`month`]:[Math.round(p/fr),`year`],v=o===void 0?typeof e==`string`?e:ir(e).toISOString().substring(0,16).replace(`T`,` `):o,y=d===`time`?{...c,dateTime:ir(e).toISOString()}:c,b=(e=e,t=t,n=n,r=f,i=ar,a=a)=>ar(e,t,n,r,i,a),x=t||ar,S;try{S=x(h,g,m,f,b,s),S||=ar(h,g,m,f,b,s)}catch(e){console.error(`[react-timeago] Formatter threw an error:`,e),S=ar(h,g,m,f,b,s)}return _.createElement(d,or({},y,{title:v}),S)}function hr(){let[e,t]=(0,_.useState)(`Not connected`),[n,r]=(0,_.useState)(!1),i=at();if((0,_.useEffect)(()=>{`serial`in navigator||i(`/unsupported`,{replace:!0})},[i]),(0,_.useSyncExternalStore)(tr,nr),!Zn)return(0,M.jsxs)(`div`,{className:`card connect-robot`,children:[(0,M.jsx)(`span`,{className:`title`,children:`Connect your Neato`}),(0,M.jsxs)(`p`,{className:`subtitle`,children:[`Remove the dustbin from your Neato vacuum and connect to the USB port. Click the button below and select your Neato, It may appear as `,(0,M.jsx)(`strong`,{children:`\"USB Serial Device (COMx)\"`}),` on Windows, or `,(0,M.jsx)(`strong`,{children:`\"CDC Serial\"`}),` / `,(0,M.jsx)(`strong`,{children:`\"ttyACM0\"`}),` on Linux/MacOS. You can also try to unplug and replug to device to see which one appears if you're not sure.`]}),(0,M.jsxs)(`div`,{className:`toggle-row`,children:[(0,M.jsxs)(`label`,{className:`switch`,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:n,onChange:()=>r(!n)}),(0,M.jsx)(`span`,{className:`slider`})]}),(0,M.jsx)(`span`,{className:`toggle-label`,onClick:()=>r(!n),children:`Filter by Neato device type`}),(0,M.jsx)(`span`,{className:`badge`,children:`Experimental`})]}),(0,M.jsx)(`button`,{className:`connect`,onClick:()=>rr(t,n),children:`Connect to Robot`}),(0,M.jsxs)(`div`,{className:`status`,children:[`Status: `,e]})]});let{version:a,charger:o,error:s}=Zn;return(0,M.jsxs)(`div`,{className:`info-cards`,children:[(0,M.jsx)(gr,{title:`Version Info`,data:a}),(0,M.jsx)(gr,{title:`Error Info`,data:s}),(0,M.jsx)(gr,{title:`Charger Info`,data:o})]})}function gr({title:e,data:t}){let n=t.basic.length>0||t.advanced&&t.advanced.length>0,[r,i]=(0,_.useState)(!1);return(0,M.jsxs)(`div`,{className:`card robot-info`,children:[(0,M.jsxs)(`div`,{className:`info-header`,children:[(0,M.jsxs)(`div`,{className:`title-group`,children:[(0,M.jsx)(`h2`,{children:e}),(0,M.jsxs)(`span`,{className:`time-ago`,children:[`Updated: `,(0,M.jsx)(mr,{date:t.lastUpdated})]})]}),(0,M.jsxs)(`div`,{className:`action-group`,children:[(0,M.jsx)(`button`,{className:`action-btn`,onClick:()=>Zn?.sendCommand(t.command),children:`Refresh`}),(0,M.jsx)(`span`,{className:`tooltip-wrap`,title:!t.advanced||t.advanced.length===0?`No advanced data`:void 0,children:(0,M.jsx)(`button`,{className:`action-btn`,onClick:()=>i(e=>!e),disabled:!t.advanced||t.advanced.length===0,children:r?`Hide Advanced`:`Show Advanced`})})]})]}),!n&&(0,M.jsx)(`p`,{className:`no-data`,children:`No data received yet.`}),(0,M.jsxs)(`div`,{className:`table`,children:[t.basic.map(([e,t])=>(0,M.jsxs)(`div`,{className:`row`,children:[(0,M.jsxs)(`span`,{className:`key`,children:[e,`:`]}),(0,M.jsx)(`span`,{children:t})]},e)),r&&t.advanced&&t.advanced.map(([e,t])=>(0,M.jsxs)(`div`,{className:`row`,children:[(0,M.jsxs)(`span`,{className:`key`,children:[e,`:`]}),(0,M.jsx)(`span`,{children:t})]},e))]})]})}var _r=async e=>{x(()=>import(`./install-dialog-nQsOFibo.js`),__vite__mapDeps([0,1]));let t;try{t=await navigator.serial.requestPort()}catch(t){if(t.name===`NotFoundError`){x(()=>import(`./no-port-picked-DMlthFiI.js`).then(t=>t.openNoPortPickedDialog(()=>_r(e))),__vite__mapDeps([2,1]));return}alert(`Error: ${t.message}`);return}if(!t)return;try{await t.open({baudRate:115200,bufferSize:8192})}catch(e){alert(e.message);return}let n=document.createElement(`ewt-install-dialog`);n.port=t,n.manifestPath=e.manifest||e.getAttribute(`manifest`),n.overrides=e.overrides,n.addEventListener(`closed`,()=>{t.close()},{once:!0}),document.body.appendChild(n)},vr=class e extends HTMLElement{connectedCallback(){if(this.renderRoot)return;if(this.renderRoot=this.attachShadow({mode:`open`}),!e.isSupported||!e.isAllowed){this.toggleAttribute(`install-unsupported`,!0),this.renderRoot.innerHTML=e.isAllowed?`<slot name='unsupported'>Your browser does not support installing things on ESP devices. Use Google Chrome or Microsoft Edge.</slot>`:`<slot name='not-allowed'>You can only install ESP devices on HTTPS websites or on the localhost.</slot>`;return}this.toggleAttribute(`install-supported`,!0);let t=document.createElement(`slot`);t.addEventListener(`click`,async e=>{e.preventDefault(),_r(this)}),t.name=`activate`;let n=document.createElement(`button`);if(n.innerText=`Connect`,t.append(n),`adoptedStyleSheets`in Document.prototype&&`replaceSync`in CSSStyleSheet.prototype){let t=new CSSStyleSheet;t.replaceSync(e.style),this.renderRoot.adoptedStyleSheets=[t]}else{let t=document.createElement(`style`);t.innerText=e.style,this.renderRoot.append(t)}this.renderRoot.append(t)}};vr.isSupported=`serial`in navigator,vr.isAllowed=window.isSecureContext,vr.style=`\n  button {\n    position: relative;\n    cursor: pointer;\n    font-size: 14px;\n    font-weight: 500;\n    padding: 10px 24px;\n    color: var(--esp-tools-button-text-color, #fff);\n    background-color: var(--esp-tools-button-color, #03a9f4);\n    border: none;\n    border-radius: var(--esp-tools-button-border-radius, 9999px);\n  }\n  button::before {\n    content: \" \";\n    position: absolute;\n    top: 0;\n    bottom: 0;\n    left: 0;\n    right: 0;\n    opacity: 0.2;\n    border-radius: var(--esp-tools-button-border-radius, 9999px);\n  }\n  button:hover::before {\n    background-color: rgba(255,255,255,.8);\n  }\n  button:focus {\n    outline: none;\n  }\n  button:focus::before {\n    background-color: white;\n  }\n  button:active::before {\n    background-color: grey;\n  }\n  :host([active]) button {\n    color: rgba(0, 0, 0, 0.38);\n    background-color: rgba(0, 0, 0, 0.12);\n    box-shadow: none;\n    cursor: unset;\n    pointer-events: none;\n  }\n  .hidden {\n    display: none;\n  }`,customElements.define(`esp-web-install-button`,vr);function yr(){let e=(0,_.useRef)(null),[t,n]=(0,_.useState)(null),r=at();return(0,_.useEffect)(()=>{`serial`in navigator||r(`/unsupported`,{replace:!0})},[r]),(0,_.useEffect)(()=>{if(!t||!e.current)return;e.current.children.length&&Array.from(e.current.children).forEach(t=>e.current?.removeChild(t));let n=new vr;n.manifest=br(t),n.showLog=!0,n.logConsole=!0,e.current.appendChild(n),e.current.animate([{opacity:0,transform:`scale(0.95)`},{opacity:1,transform:`scale(1)`}],{duration:300,easing:`ease-out`})},[t]),(0,M.jsxs)(`div`,{className:`card flasher`,children:[(0,M.jsx)(`p`,{className:`success`,children:`Brainslug Web Flasher`}),(0,M.jsxs)(`p`,{children:[`Select your Neato robot generation, D3-D7 robots are `,(0,M.jsx)(`code`,{children:`gen3`}),` and D70-D85 + BotVac Connected (without D) is `,(0,M.jsx)(`code`,{children:`gen2`}),`. You can read more about the generations `,(0,M.jsx)(`a`,{href:`https://github.com/Philip2809/neato-brainslug/blob/main/README.md`,target:`_blank`,rel:`noopener noreferrer`,children:`on the GitHub`}),`.`]}),(0,M.jsxs)(`div`,{className:`gen-picker`,children:[(0,M.jsx)(`button`,{className:`gen-pick ${t===2?`active`:``}`,onClick:()=>n(2),style:{boxShadow:t===2?`0 0 8px 2px rgba(76, 175, 80, 0.6)`:`none`,transition:`box-shadow 0.2s ease, transform 0.2s ease`,transform:t===2?`scale(1.05)`:`scale(1)`},children:`GEN 2`}),(0,M.jsx)(`button`,{className:`gen-pick ${t===3?`active`:``}`,onClick:()=>n(3),style:{boxShadow:t===3?`0 0 8px 2px rgba(76, 175, 80, 0.6)`:`none`,transition:`box-shadow 0.2s ease, transform 0.2s ease`,transform:t===3?`scale(1.05)`:`scale(1)`},children:`GEN 3`})]}),(0,M.jsx)(`div`,{ref:e})]})}function br(e){let t=e===2?`gen2`:`gen3`,n=e=>new URL(e,window.location.href).href,r={name:`Neato Brainslug - ${t.toUpperCase()}`,version:`1.2.1`,home_assistant_domain:`esphome`,funding_url:`https://ko-fi.com/philip2809`,builds:[{chipFamily:`ESP32`,parts:[{path:n(`/webflash/nbs-${t}-esp32.factory.bin`),offset:0}]},{chipFamily:`ESP32-S3`,parts:[{path:n(`/webflash/nbs-${t}-esp32s3.factory.bin`),offset:0}]},{chipFamily:`ESP32-C3`,parts:[{path:n(`/webflash/nbs-${t}-esp32c3.factory.bin`),offset:0}]},{chipFamily:`ESP32-C6`,parts:[{path:n(`/webflash/nbs-${t}-esp32c6.factory.bin`),offset:0}]}]},i=JSON.stringify(r),a=new Blob([i],{type:`application/json`});return URL.createObjectURL(a)}function xr(){let e=at();return(0,_.useEffect)(()=>{`serial`in navigator&&e(`/`,{replace:!0})},[e]),(0,M.jsxs)(`div`,{className:`card unsupported`,children:[(0,M.jsx)(`p`,{className:`warn`,children:`Browser not supported`}),(0,M.jsxs)(`p`,{children:[`WebSerial is required for the tools to work.`,(0,M.jsx)(`br`,{}),`Please use a Chromium-based browser like `,(0,M.jsx)(`strong`,{children:`Chrome`}),`, `,(0,M.jsx)(`strong`,{children:`Brave`}),`, or `,(0,M.jsx)(`strong`,{children:`Edge`}),`.`]})]})}function Sr(){return(0,M.jsxs)(`div`,{className:`card home`,children:[(0,M.jsx)(`p`,{className:`success`,children:`Neato Brainslug`}),(0,M.jsxs)(`p`,{children:[`Neato Brainslug allows local control of your Neato robot, `,(0,M.jsx)(`strong`,{children:`with`}),` or `,(0,M.jsx)(`strong`,{children:`without`}),`, Home Assistant. To make the proccess of installing the Brainslug easier, tools on this site will help you along the way. `,(0,M.jsx)(`br`,{}),` `,(0,M.jsx)(`br`,{}),`Use `,(0,M.jsx)(Sn,{to:`/robot`,children:`Robot Managment`}),` to connect to your robot and view live data or find errors with your device!`,(0,M.jsx)(`br`,{}),`Use the `,(0,M.jsx)(Sn,{to:`/flash`,children:`Web Flasher`}),` to easily flash the Brainslug firmware to your ESP32, no matter your OS!`,(0,M.jsx)(`br`,{}),(0,M.jsx)(`br`,{}),`For furthur information about the project, check out the\\xA0`,(0,M.jsx)(`a`,{href:`https://github.com/philip2809/neato-brainslug`,target:`_blank`,rel:`noopener noreferrer`,children:`GitHub repository`}),` where you can find full install guides!`]})]})}function Cr(){return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Un,{}),(0,M.jsxs)(Mt,{children:[(0,M.jsx)(At,{path:`/`,element:(0,M.jsx)(Sr,{})}),(0,M.jsx)(At,{path:`/robot`,element:(0,M.jsx)(hr,{})}),(0,M.jsx)(At,{path:`/flash`,element:(0,M.jsx)(yr,{})}),(0,M.jsx)(At,{path:`/unsupported`,element:(0,M.jsx)(xr,{})}),(0,M.jsx)(At,{path:`*`,element:(0,M.jsx)(kt,{to:`/`,replace:!0})})]})]})}(0,g.createRoot)(document.getElementById(`root`)).render((0,M.jsx)(_.StrictMode,{children:(0,M.jsx)(yn,{children:(0,M.jsx)(Cr,{})})}));export{o as n,c as r,x as t};"
  },
  {
    "path": "docs/assets/install-dialog-nQsOFibo.js",
    "content": "const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[\"assets/esp32-DR_yen0A.js\",\"assets/rom-D7P4LvQr.js\",\"assets/esp32c2-CIvS3qc5.js\",\"assets/esp32c3-nJJ15ppW.js\",\"assets/esp32c6-snJpA5DJ.js\",\"assets/esp32c61-DUe22z0I.js\",\"assets/esp32c5-DbWg37P4.js\",\"assets/esp32h2-CCGwb3vw.js\",\"assets/esp32s3-CjJ5O_5u.js\",\"assets/esp32s2-klISvvyE.js\",\"assets/esp8266-BCrKhPpV.js\",\"assets/esp32p4-BE8Lllij.js\"])))=>i.map(i=>d[i]);\nimport{n as e,r as t,t as n}from\"./index-CCRny9cW.js\";import{A as r,C as i,D as a,E as o,M as s,N as c,S as l,T as u,_ as d,a as f,b as p,c as m,d as h,f as g,g as _,h as v,i as y,j as b,k as x,l as S,m as C,n as w,o as T,p as E,r as D,s as ee,t as te,u as O,v as k,w as A,x as j,y as ne}from\"./styles-Bnf3HqYs.js\";function re(e,t=pe){let n=oe(e,t);return n&&(n.tabIndex=0,n.focus()),n}function ie(e,t=pe){let n=se(e,t);return n&&(n.tabIndex=0,n.focus()),n}function ae(e,t=pe){for(let n=0;n<e.length;n++){let r=e[n];if(r.tabIndex===0&&t(r))return{item:r,index:n}}return null}function oe(e,t=pe){for(let n of e)if(t(n))return n;return null}function se(e,t=pe){for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r))return r}return null}function ce(e,t,n=pe,r=!0){for(let i=1;i<e.length;i++){let a=(i+t)%e.length;if(a<t&&!r)return null;let o=e[a];if(n(o))return o}return e[t]?e[t]:null}function le(e,t,n=pe,r=!0){for(let i=1;i<e.length;i++){let a=(t-i+e.length)%e.length;if(a>t&&!r)return null;let o=e[a];if(n(o))return o}return e[t]?e[t]:null}function ue(e,t,n=pe,r=!0){if(t){let i=ce(e,t.index,n,r);return i&&(i.tabIndex=0,i.focus()),i}else return re(e,n)}function de(e,t,n=pe,r=!0){if(t){let i=le(e,t.index,n,r);return i&&(i.tabIndex=0,i.focus()),i}else return ie(e,n)}function fe(){return new Event(`request-activation`,{bubbles:!0,composed:!0})}function pe(e){return!e.disabled}var M={ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowUp:`ArrowUp`,ArrowRight:`ArrowRight`,Home:`Home`,End:`End`},me=class{constructor(e){this.handleKeydown=e=>{let t=e.key;if(e.defaultPrevented||!this.isNavigableKey(t))return;let n=this.items;if(!n.length)return;let r=ae(n,this.isActivatable);e.preventDefault();let i=this.isRtl(),a=i?M.ArrowRight:M.ArrowLeft,o=i?M.ArrowLeft:M.ArrowRight,s=null;switch(t){case M.ArrowDown:case o:s=ue(n,r,this.isActivatable,this.wrapNavigation());break;case M.ArrowUp:case a:s=de(n,r,this.isActivatable,this.wrapNavigation());break;case M.Home:s=re(n,this.isActivatable);break;case M.End:s=ie(n,this.isActivatable);break;default:break}s&&r&&r.item!==s&&(r.item.tabIndex=-1)},this.onDeactivateItems=()=>{let e=this.items;for(let t of e)this.deactivateItem(t)},this.onRequestActivation=e=>{this.onDeactivateItems();let t=e.target;this.activateItem(t),t.focus()},this.onSlotchange=()=>{let e=this.items,t=!1;for(let n of e){if(!n.disabled&&n.tabIndex>-1&&!t){t=!0,n.tabIndex=0;continue}n.tabIndex=-1}if(t)return;let n=oe(e,this.isActivatable);n&&(n.tabIndex=0)};let{isItem:t,getPossibleItems:n,isRtl:r,deactivateItem:i,activateItem:a,isNavigableKey:o,isActivatable:s,wrapNavigation:c}=e;this.isItem=t,this.getPossibleItems=n,this.isRtl=r,this.deactivateItem=i,this.activateItem=a,this.isNavigableKey=o,this.isActivatable=s,this.wrapNavigation=c??(()=>!0)}get items(){let e=this.getPossibleItems(),t=[];for(let n of e){if(this.isItem(n)){t.push(n);continue}let e=n.item;e&&this.isItem(e)&&t.push(e)}return t}activateNextItem(){let e=this.items,t=ae(e,this.isActivatable);return t&&(t.item.tabIndex=-1),ue(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){let e=this.items,t=ae(e,this.isActivatable);return t&&(t.item.tabIndex=-1),de(e,t,this.isActivatable,this.wrapNavigation())}},he=new Set(Object.values(M)),ge=class extends A{get items(){return this.listController.items}constructor(){super(),this.listController=new me({isItem:e=>e.hasAttribute(`md-list-item`),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction===`rtl`,deactivateItem:e=>{e.tabIndex=-1},activateItem:e=>{e.tabIndex=0},isNavigableKey:e=>he.has(e),isActivatable:e=>!e.disabled&&e.type!==`text`}),this.internals=this.attachInternals(),this.internals.role=`list`,this.addEventListener(`keydown`,this.listController.handleKeydown)}render(){return x`\n      <slot\n        @deactivate-items=${this.listController.onDeactivateItems}\n        @request-activation=${this.listController.onRequestActivation}\n        @slotchange=${this.listController.onSlotchange}>\n      </slot>\n    `}activateNextItem(){return this.listController.activateNextItem()}activatePreviousItem(){return this.listController.activatePreviousItem()}};c([k({flatten:!0})],ge.prototype,`slotItems`,void 0);var _e=s`:host{background:var(--md-list-container-color, var(--md-sys-color-surface, #fef7ff));color:unset;display:flex;flex-direction:column;outline:none;padding:8px 0;position:relative}\n`,ve=class extends ge{};ve.styles=[_e],customElements.define(`ew-list`,ve);var ye=class extends A{constructor(){super(...arguments),this.multiline=!1}render(){return x`\n      <slot name=\"container\"></slot>\n      <slot class=\"non-text\" name=\"start\"></slot>\n      <div class=\"text\">\n        <slot name=\"overline\" @slotchange=${this.handleTextSlotChange}></slot>\n        <slot\n          class=\"default-slot\"\n          @slotchange=${this.handleTextSlotChange}></slot>\n        <slot name=\"headline\" @slotchange=${this.handleTextSlotChange}></slot>\n        <slot\n          name=\"supporting-text\"\n          @slotchange=${this.handleTextSlotChange}></slot>\n      </div>\n      <slot class=\"non-text\" name=\"trailing-supporting-text\"></slot>\n      <slot class=\"non-text\" name=\"end\"></slot>\n    `}handleTextSlotChange(){let e=!1,t=0;for(let n of this.textSlots)if(be(n)&&(t+=1),t>1){e=!0;break}this.multiline=e}};c([l({type:Boolean,reflect:!0})],ye.prototype,`multiline`,void 0),c([ne(`.text slot`)],ye.prototype,`textSlots`,void 0);function be(e){for(let t of e.assignedNodes({flatten:!0})){let e=t.nodeType===Node.ELEMENT_NODE,n=t.nodeType===Node.TEXT_NODE&&t.textContent?.match(/\\S/);if(e||n)return!0}return!1}var xe=s`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}\n`,Se=class extends ye{};Se.styles=[xe],Se=c([i(`md-item`)],Se);var Ce=Symbol.for(``),we=e=>{if(e?.r===Ce)return e?._$litStatic$},Te=(e,...t)=>({_$litStatic$:t.reduce((t,n,r)=>t+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\\n            take care to ensure page security.`)})(n)+e[r+1],e[0]),r:Ce}),Ee=new Map,De=(e=>(t,...n)=>{let r=n.length,i,a,o=[],s=[],c,l=0,u=!1;for(;l<r;){for(c=t[l];l<r&&(a=n[l],i=we(a))!==void 0;)c+=i+t[++l],u=!0;l!==r&&s.push(a),o.push(c),l++}if(l===r&&o.push(t[r]),u){let e=o.join(`$$lit$$`);(t=Ee.get(e))===void 0&&(o.raw=o,Ee.set(e,t=o)),n=s}return e(t,...n)})(x),Oe=O(A),ke=class extends Oe{constructor(){super(...arguments),this.disabled=!1,this.type=`text`,this.isListItem=!0,this.href=``,this.target=``}get isDisabled(){return this.disabled&&this.type!==`link`}willUpdate(e){this.href&&(this.type=`link`),super.willUpdate(e)}render(){return this.renderListItem(x`\n      <md-item>\n        <div slot=\"container\">\n          ${this.renderRipple()} ${this.renderFocusRing()}\n        </div>\n        <slot name=\"start\" slot=\"start\"></slot>\n        <slot name=\"end\" slot=\"end\"></slot>\n        ${this.renderBody()}\n      </md-item>\n    `)}renderListItem(e){let t=this.type===`link`,n;switch(this.type){case`link`:n=Te`a`;break;case`button`:n=Te`button`;break;default:case`text`:n=Te`li`;break}let r=this.type!==`text`,i=t&&this.target?this.target:u;return De`\n      <${n}\n        id=\"item\"\n        tabindex=\"${this.isDisabled||!r?-1:0}\"\n        ?disabled=${this.isDisabled}\n        role=\"listitem\"\n        aria-selected=${this.ariaSelected||u}\n        aria-checked=${this.ariaChecked||u}\n        aria-expanded=${this.ariaExpanded||u}\n        aria-haspopup=${this.ariaHasPopup||u}\n        class=\"list-item ${E(this.getRenderClasses())}\"\n        href=${this.href||u}\n        target=${i}\n        @focus=${this.onFocus}\n      >${e}</${n}>\n    `}renderRipple(){return this.type===`text`?u:x` <md-ripple\n      part=\"ripple\"\n      for=\"item\"\n      ?disabled=${this.isDisabled}></md-ripple>`}renderFocusRing(){return this.type===`text`?u:x` <md-focus-ring\n      @visibility-changed=${this.onFocusRingVisibilityChanged}\n      part=\"focus-ring\"\n      for=\"item\"\n      inward></md-focus-ring>`}onFocusRingVisibilityChanged(e){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return x`\n      <slot></slot>\n      <slot name=\"overline\" slot=\"overline\"></slot>\n      <slot name=\"headline\" slot=\"headline\"></slot>\n      <slot name=\"supporting-text\" slot=\"supporting-text\"></slot>\n      <slot\n        name=\"trailing-supporting-text\"\n        slot=\"trailing-supporting-text\"></slot>\n    `}onFocus(){this.tabIndex===-1&&this.dispatchEvent(fe())}focus(){this.listItemRoot?.focus()}click(){if(!this.listItemRoot){super.click();return}this.listItemRoot.click()}};ke.shadowRootOptions={...A.shadowRootOptions,delegatesFocus:!0},c([l({type:Boolean,reflect:!0})],ke.prototype,`disabled`,void 0),c([l({reflect:!0})],ke.prototype,`type`,void 0),c([l({type:Boolean,attribute:`md-list-item`,reflect:!0})],ke.prototype,`isListItem`,void 0),c([l()],ke.prototype,`href`,void 0),c([l()],ke.prototype,`target`,void 0),c([p(`.list-item`)],ke.prototype,`listItemRoot`,void 0);var Ae=s`:host{display:flex;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, 0.3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-list-item-one-line-container-height, 56px);padding-top:var(--md-list-item-top-space, 12px);padding-bottom:var(--md-list-item-bottom-space, 12px);padding-inline-start:var(--md-list-item-leading-space, 16px);padding-inline-end:var(--md-list-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}@media(forced-colors: active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}\n`,je=class extends ke{};je.styles=[Ae],customElements.define(`ew-list-item`,je);var Me=class extends y{};Me.styles=[D],customElements.define(`ew-divider`,Me);var Ne=Symbol(`createValidator`),Pe=Symbol(`getValidityAnchor`),Fe=Symbol(`privateValidator`),Ie=Symbol(`privateSyncValidity`),Le=Symbol(`privateCustomValidationMessage`);function Re(e){var t;class n extends e{constructor(){super(...arguments),this[t]=``}get validity(){return this[Ie](),this[m].validity}get validationMessage(){return this[Ie](),this[m].validationMessage}get willValidate(){return this[Ie](),this[m].willValidate}checkValidity(){return this[Ie](),this[m].checkValidity()}reportValidity(){return this[Ie](),this[m].reportValidity()}setCustomValidity(e){this[Le]=e,this[Ie]()}requestUpdate(e,t,n){super.requestUpdate(e,t,n),this[Ie]()}firstUpdated(e){super.firstUpdated(e),this[Ie]()}[(t=Le,Ie)](){this[Fe]||(this[Fe]=this[Ne]());let{validity:e,validationMessage:t}=this[Fe].getValidity(),n=!!this[Le],r=this[Le]||t;this[m].setValidity({...e,customError:n},r,this[Pe]()??void 0)}[Ne](){throw Error(`Implement [createValidator]`)}[Pe](){throw Error(`Implement [getValidityAnchor]`)}}return n}var ze=Symbol(`getFormValue`),Be=Symbol(`getFormState`);function Ve(e){class t extends e{get form(){return this[m].form}get labels(){return this[m].labels}get name(){return this.getAttribute(`name`)??``}set name(e){this.setAttribute(`name`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,e)}attributeChangedCallback(e,t,n){if(e===`name`||e===`disabled`){let n=e===`disabled`?t!==null:t;this.requestUpdate(e,n);return}super.attributeChangedCallback(e,t,n)}requestUpdate(e,t,n){super.requestUpdate(e,t,n),this[m].setFormValue(this[ze](),this[Be]())}[ze](){throw Error(`Implement [getFormValue]`)}[Be](){return this[ze]()}formDisabledCallback(e){this.disabled=e}}return t.formAssociated=!0,c([l({noAccessor:!0})],t.prototype,`name`,null),c([l({type:Boolean,noAccessor:!0})],t.prototype,`disabled`,null),t}var He=class{constructor(e){this.getCurrentState=e,this.currentValidity={validity:{},validationMessage:``}}getValidity(){let e=this.getCurrentState();if(!(!this.prevState||!this.equals(this.prevState,e)))return this.currentValidity;let{validity:t,validationMessage:n}=this.computeValidity(e);return this.prevState=this.copy(e),this.currentValidity={validationMessage:n,validity:{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing}},this.currentValidity}},Ue=class extends He{computeValidity(e){return this.checkboxControl||(this.checkboxControl=document.createElement(`input`),this.checkboxControl.type=`checkbox`),this.checkboxControl.checked=e.checked,this.checkboxControl.required=e.required,{validity:this.checkboxControl.validity,validationMessage:this.checkboxControl.validationMessage}}equals(e,t){return e.checked===t.checked&&e.required===t.required}copy({checked:e,required:t}){return{checked:e,required:t}}},We=O(Re(Ve(S(A)))),Ge=class extends We{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value=`on`,this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener(`click`,e=>{!T(e)||!this.input||(this.focus(),f(this.input))})}update(e){(e.has(`checked`)||e.has(`disabled`)||e.has(`indeterminate`))&&(this.prevChecked=e.get(`checked`)??this.checked,this.prevDisabled=e.get(`disabled`)??this.disabled,this.prevIndeterminate=e.get(`indeterminate`)??this.indeterminate),super.update(e)}render(){let e=!this.prevChecked&&!this.prevIndeterminate,t=this.prevChecked&&!this.prevIndeterminate,n=this.prevIndeterminate,r=this.checked&&!this.indeterminate,i=this.indeterminate,a=E({disabled:this.disabled,selected:r||i,unselected:!r&&!i,checked:r,indeterminate:i,\"prev-unselected\":e,\"prev-checked\":t,\"prev-indeterminate\":n,\"prev-disabled\":this.prevDisabled}),{ariaLabel:o,ariaInvalid:s}=this;return x`\n      <div class=\"container ${a}\">\n        <input\n          type=\"checkbox\"\n          id=\"input\"\n          aria-checked=${i?`mixed`:u}\n          aria-label=${o||u}\n          aria-invalid=${s||u}\n          ?disabled=${this.disabled}\n          ?required=${this.required}\n          .indeterminate=${this.indeterminate}\n          .checked=${this.checked}\n          @input=${this.handleInput}\n          @change=${this.handleChange} />\n\n        <div class=\"outline\"></div>\n        <div class=\"background\"></div>\n        <md-focus-ring part=\"focus-ring\" for=\"input\"></md-focus-ring>\n        <md-ripple for=\"input\" ?disabled=${this.disabled}></md-ripple>\n        <svg class=\"icon\" viewBox=\"0 0 18 18\" aria-hidden=\"true\">\n          <rect class=\"mark short\" />\n          <rect class=\"mark long\" />\n        </svg>\n      </div>\n    `}handleInput(e){let t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){w(this,e)}[ze](){return!this.checked||this.indeterminate?null:this.value}[Be](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute(`checked`)}formStateRestoreCallback(e){this.checked=e===`true`}[Ne](){return new Ue(()=>this)}[Pe](){return this.input}};Ge.shadowRootOptions={...A.shadowRootOptions,delegatesFocus:!0},c([l({type:Boolean})],Ge.prototype,`checked`,void 0),c([l({type:Boolean})],Ge.prototype,`indeterminate`,void 0),c([l({type:Boolean})],Ge.prototype,`required`,void 0),c([l()],Ge.prototype,`value`,void 0),c([j()],Ge.prototype,`prevChecked`,void 0),c([j()],Ge.prototype,`prevDisabled`,void 0),c([j()],Ge.prototype,`prevIndeterminate`,void 0),c([p(`input`)],Ge.prototype,`input`,void 0);var Ke=s`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}}\n`,qe=class extends Ge{};qe.styles=[Ke],customElements.define(`ew-checkbox`,qe);var Je=class{constructor(e){this.targetElement=e,this.state={bold:!1,italic:!1,underline:!1,strikethrough:!1,foregroundColor:null,backgroundColor:null,carriageReturn:!1,lines:[],secret:!1}}logs(){return this.targetElement.innerText}processLine(e){let t=/(?:\\033|\\\\033)(?:\\[(.*?)[@-~]|\\].*?(?:\\007|\\033\\\\))/g,n=0,r=document.createElement(`span`);r.classList.add(`line`);let i=e=>{if(e===``)return;let t=document.createElement(`span`);if(this.state.bold&&t.classList.add(`log-bold`),this.state.italic&&t.classList.add(`log-italic`),this.state.underline&&t.classList.add(`log-underline`),this.state.strikethrough&&t.classList.add(`log-strikethrough`),this.state.secret&&t.classList.add(`log-secret`),this.state.foregroundColor!==null&&t.classList.add(`log-fg-${this.state.foregroundColor}`),this.state.backgroundColor!==null&&t.classList.add(`log-bg-${this.state.backgroundColor}`),t.appendChild(document.createTextNode(e)),r.appendChild(t),this.state.secret){let e=document.createElement(`span`);e.classList.add(`log-secret-redacted`),e.appendChild(document.createTextNode(`[redacted]`)),r.appendChild(e)}};for(;;){let r=t.exec(e);if(r===null)break;let a=r.index;if(i(e.substring(n,a)),n=a+r[0].length,r[1]!==void 0)for(let e of r[1].split(`;`))switch(parseInt(e)){case 0:this.state.bold=!1,this.state.italic=!1,this.state.underline=!1,this.state.strikethrough=!1,this.state.foregroundColor=null,this.state.backgroundColor=null,this.state.secret=!1;break;case 1:this.state.bold=!0;break;case 3:this.state.italic=!0;break;case 4:this.state.underline=!0;break;case 5:this.state.secret=!0;break;case 6:this.state.secret=!1;break;case 9:this.state.strikethrough=!0;break;case 22:this.state.bold=!1;break;case 23:this.state.italic=!1;break;case 24:this.state.underline=!1;break;case 29:this.state.strikethrough=!1;break;case 30:this.state.foregroundColor=`black`;break;case 31:this.state.foregroundColor=`red`;break;case 32:this.state.foregroundColor=`green`;break;case 33:this.state.foregroundColor=`yellow`;break;case 34:this.state.foregroundColor=`blue`;break;case 35:this.state.foregroundColor=`magenta`;break;case 36:this.state.foregroundColor=`cyan`;break;case 37:this.state.foregroundColor=`white`;break;case 39:this.state.foregroundColor=null;break;case 41:this.state.backgroundColor=`red`;break;case 42:this.state.backgroundColor=`green`;break;case 43:this.state.backgroundColor=`yellow`;break;case 44:this.state.backgroundColor=`blue`;break;case 45:this.state.backgroundColor=`magenta`;break;case 46:this.state.backgroundColor=`cyan`;break;case 47:this.state.backgroundColor=`white`;break;case 40:case 49:this.state.backgroundColor=null;break}}return i(e.substring(n)),r}processLines(){let e=this.targetElement.scrollTop>this.targetElement.scrollHeight-this.targetElement.offsetHeight-50,t=this.state.carriageReturn,n=document.createDocumentFragment();if(this.state.lines.length!=0){for(let e of this.state.lines)this.state.carriageReturn&&e!==`\n`&&n.childElementCount&&n.removeChild(n.lastChild),n.appendChild(this.processLine(e)),this.state.carriageReturn=e.includes(`\\r`);t&&this.state.lines[0]!==`\n`?this.targetElement.replaceChild(n,this.targetElement.lastChild):this.targetElement.appendChild(n),this.state.lines=[],e&&(this.targetElement.scrollTop=this.targetElement.scrollHeight)}}addLine(e){this.state.lines.length==0&&setTimeout(()=>this.processLines(),0),this.state.lines.push(e)}},Ye=`\n  .log {\n    flex: 1;\n    background-color: #1c1c1c;\n    font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier,\n      monospace;\n    font-size: 12px;\n    padding: 16px;\n    overflow: auto;\n    line-height: 1.45;\n    border-radius: 3px;\n    white-space: pre-wrap;\n    overflow-wrap: break-word;\n    color: #ddd;\n  }\n\n  .log-bold {\n    font-weight: bold;\n  }\n  .log-italic {\n    font-style: italic;\n  }\n  .log-underline {\n    text-decoration: underline;\n  }\n  .log-strikethrough {\n    text-decoration: line-through;\n  }\n  .log-underline.log-strikethrough {\n    text-decoration: underline line-through;\n  }\n  .log-secret {\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    -ms-user-select: none;\n    user-select: none;\n  }\n  .log-secret-redacted {\n    opacity: 0;\n    width: 1px;\n    font-size: 1px;\n  }\n  .log-fg-black {\n    color: rgb(128, 128, 128);\n  }\n  .log-fg-red {\n    color: rgb(255, 0, 0);\n  }\n  .log-fg-green {\n    color: rgb(0, 255, 0);\n  }\n  .log-fg-yellow {\n    color: rgb(255, 255, 0);\n  }\n  .log-fg-blue {\n    color: rgb(0, 0, 255);\n  }\n  .log-fg-magenta {\n    color: rgb(255, 0, 255);\n  }\n  .log-fg-cyan {\n    color: rgb(0, 255, 255);\n  }\n  .log-fg-white {\n    color: rgb(187, 187, 187);\n  }\n  .log-bg-black {\n    background-color: rgb(0, 0, 0);\n  }\n  .log-bg-red {\n    background-color: rgb(255, 0, 0);\n  }\n  .log-bg-green {\n    background-color: rgb(0, 255, 0);\n  }\n  .log-bg-yellow {\n    background-color: rgb(255, 255, 0);\n  }\n  .log-bg-blue {\n    background-color: rgb(0, 0, 255);\n  }\n  .log-bg-magenta {\n    background-color: rgb(255, 0, 255);\n  }\n  .log-bg-cyan {\n    background-color: rgb(0, 255, 255);\n  }\n  .log-bg-white {\n    background-color: rgb(255, 255, 255);\n  }\n`,Xe=e=>new Promise(t=>setTimeout(t,e)),Ze=class{constructor(){this.chunks=``}transform(e,t){this.chunks+=e;let n=this.chunks.split(/\\r?\\n/);this.chunks=n.pop(),n.forEach(e=>t.enqueue(e+`\\r\n`))}flush(e){e.enqueue(this.chunks)}},Qe=class{transform(e,t){let n=new Date,r=n.getHours().toString().padStart(2,`0`),i=n.getMinutes().toString().padStart(2,`0`),a=n.getSeconds().toString().padStart(2,`0`);t.enqueue(`[${r}:${i}:${a}]${e}`)}},N=class extends Error{},$e=4,et=0,tt=1,nt=2;function rt(e){let t=e.length;for(;--t>=0;)e[t]=0}var it=0,at=1,ot=2,st=3,ct=258,lt=29,ut=256,dt=ut+1+lt,ft=30,pt=19,mt=2*dt+1,ht=15,gt=16,_t=7,vt=256,yt=16,bt=17,xt=18,St=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Ct=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),wt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Tt=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Et=512,Dt=Array((dt+2)*2);rt(Dt);var Ot=Array(ft*2);rt(Ot);var kt=Array(Et);rt(kt);var At=Array(ct-st+1);rt(At);var jt=Array(lt);rt(jt);var Mt=Array(ft);rt(Mt);function Nt(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var Pt,Ft,It;function Lt(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var Rt=e=>e<256?kt[e]:kt[256+(e>>>7)],zt=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},P=(e,t,n)=>{e.bi_valid>gt-n?(e.bi_buf|=t<<e.bi_valid&65535,zt(e,e.bi_buf),e.bi_buf=t>>gt-e.bi_valid,e.bi_valid+=n-gt):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Bt=(e,t,n)=>{P(e,n[t*2],n[t*2+1])},Vt=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},Ht=e=>{e.bi_valid===16?(zt(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},Ut=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=ht;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<mt;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},Wt=(e,t,n)=>{let r=Array(ht+1),i=0,a,o;for(a=1;a<=ht;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=Vt(r[t]++,t))}},Gt=()=>{let e,t,n,r,i,a=Array(ht+1);for(n=0,r=0;r<lt-1;r++)for(jt[r]=n,e=0;e<1<<St[r];e++)At[n++]=r;for(At[n-1]=r,i=0,r=0;r<16;r++)for(Mt[r]=i,e=0;e<1<<Ct[r];e++)kt[i++]=r;for(i>>=7;r<ft;r++)for(Mt[r]=i<<7,e=0;e<1<<Ct[r]-7;e++)kt[256+ i++]=r;for(t=0;t<=ht;t++)a[t]=0;for(e=0;e<=143;)Dt[e*2+1]=8,e++,a[8]++;for(;e<=255;)Dt[e*2+1]=9,e++,a[9]++;for(;e<=279;)Dt[e*2+1]=7,e++,a[7]++;for(;e<=287;)Dt[e*2+1]=8,e++,a[8]++;for(Wt(Dt,dt+1,a),e=0;e<ft;e++)Ot[e*2+1]=5,Ot[e*2]=Vt(e,5);Pt=new Nt(Dt,St,ut+1,dt,ht),Ft=new Nt(Ot,Ct,0,ft,ht),It=new Nt([],wt,0,pt,_t)},Kt=e=>{let t;for(t=0;t<dt;t++)e.dyn_ltree[t*2]=0;for(t=0;t<ft;t++)e.dyn_dtree[t*2]=0;for(t=0;t<pt;t++)e.bl_tree[t*2]=0;e.dyn_ltree[vt*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},qt=e=>{e.bi_valid>8?zt(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Jt=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},Yt=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&Jt(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Jt(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},Xt=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+ a++]&255,r+=(e.pending_buf[e.sym_buf+ a++]&255)<<8,i=e.pending_buf[e.sym_buf+ a++],r===0?Bt(e,i,t):(o=At[i],Bt(e,o+ut+1,t),s=St[o],s!==0&&(i-=jt[o],P(e,i,s)),r--,o=Rt(r),Bt(e,o,n),s=Ct[o],s!==0&&(r-=Mt[o],P(e,r,s)));while(a<e.sym_next);Bt(e,vt,t)},Zt=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=mt,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)Yt(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Yt(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,Yt(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Ut(e,t),Wt(n,c,e.bl_count)},Qt=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[bt*2]++:e.bl_tree[xt*2]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[yt*2]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},$t=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do Bt(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(Bt(e,bt,e.bl_tree),P(e,s-3,3)):(Bt(e,xt,e.bl_tree),P(e,s-11,7)):(a!==i&&(Bt(e,a,e.bl_tree),s--),Bt(e,yt,e.bl_tree),P(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},en=e=>{let t;for(Qt(e,e.dyn_ltree,e.l_desc.max_code),Qt(e,e.dyn_dtree,e.d_desc.max_code),Zt(e,e.bl_desc),t=pt-1;t>=3&&e.bl_tree[Tt[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},tn=(e,t,n,r)=>{let i;for(P(e,t-257,5),P(e,n-1,5),P(e,r-4,4),i=0;i<r;i++)P(e,e.bl_tree[Tt[i]*2+1],3);$t(e,e.dyn_ltree,t-1),$t(e,e.dyn_dtree,n-1)},nn=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return et;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return tt;for(n=32;n<ut;n++)if(e.dyn_ltree[n*2]!==0)return tt;return et},rn=!1,an=e=>{rn||=(Gt(),!0),e.l_desc=new Lt(e.dyn_ltree,Pt),e.d_desc=new Lt(e.dyn_dtree,Ft),e.bl_desc=new Lt(e.bl_tree,It),e.bi_buf=0,e.bi_valid=0,Kt(e)},on=(e,t,n,r)=>{P(e,(it<<1)+(r?1:0),3),qt(e),zt(e,n),zt(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},sn={_tr_init:an,_tr_stored_block:on,_tr_flush_block:(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===nt&&(e.strm.data_type=nn(e)),Zt(e,e.l_desc),Zt(e,e.d_desc),o=en(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?on(e,t,n,r):e.strategy===$e||a===i?(P(e,(at<<1)+(r?1:0),3),Xt(e,Dt,Ot)):(P(e,(ot<<1)+(r?1:0),3),tn(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Xt(e,e.dyn_ltree,e.dyn_dtree)),Kt(e),r&&qt(e)},_tr_tally:(e,t,n)=>(e.pending_buf[e.sym_buf+ e.sym_next++]=t,e.pending_buf[e.sym_buf+ e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+ e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(At[n]+ut+1)*2]++,e.dyn_dtree[Rt(t)*2]++),e.sym_next===e.sym_end),_tr_align:e=>{P(e,at<<1,3),Bt(e,vt,Dt),Ht(e)}},cn=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0},ln=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t})()),F=(e,t,n,r)=>{let i=ln,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1},un={2:`need dictionary`,1:`stream end`,0:``,\"-1\":`file error`,\"-2\":`stream error`,\"-3\":`data error`,\"-4\":`insufficient memory`,\"-5\":`buffer error`,\"-6\":`incompatible version`},dn={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:fn,_tr_stored_block:pn,_tr_flush_block:mn,_tr_tally:hn,_tr_align:gn}=sn,{Z_NO_FLUSH:_n,Z_PARTIAL_FLUSH:vn,Z_FULL_FLUSH:yn,Z_FINISH:I,Z_BLOCK:bn,Z_OK:L,Z_STREAM_END:xn,Z_STREAM_ERROR:Sn,Z_DATA_ERROR:Cn,Z_BUF_ERROR:wn,Z_DEFAULT_COMPRESSION:Tn,Z_FILTERED:En,Z_HUFFMAN_ONLY:Dn,Z_RLE:On,Z_FIXED:kn,Z_DEFAULT_STRATEGY:An,Z_UNKNOWN:jn,Z_DEFLATED:Mn}=dn,Nn=9,Pn=15,Fn=8,In=286,Ln=30,Rn=19,zn=2*In+1,Bn=15,R=3,Vn=258,Hn=Vn+R+1,Un=32,Wn=42,Gn=57,Kn=69,qn=73,Jn=91,Yn=103,Xn=113,Zn=666,z=1,Qn=2,$n=3,er=4,tr=3,nr=(e,t)=>(e.msg=un[t],t),rr=e=>e*2-(e>4?9:0),ir=e=>{let t=e.length;for(;--t>=0;)e[t]=0},ar=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},or=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,B=e=>{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},V=(e,t)=>{mn(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,B(e.strm)},H=(e,t)=>{e.pending_buf[e.pending++]=t},sr=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},cr=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=cn(e.adler,t,i,n):e.state.wrap===2&&(e.adler=F(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},lr=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-Hn?e.strstart-(e.w_size-Hn):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+Vn,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+o]!==m||l[i+o-1]!==p||l[i]!==l[r]||l[++i]!==l[r+1])continue;r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=Vn-(f-r),r=f-Vn,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},ur=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Hn)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),ar(e),r+=t),e.strm.avail_in===0)break;if(n=cr(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=R)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=or(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=or(e,e.ins_h,e.window[i+R-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<R)););}while(e.lookahead<Hn&&e.strm.avail_in!==0)},dr=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==I||t===_n||r!==i+e.strm.avail_in)))break;o=t===I&&r===i+e.strm.avail_in?1:0,pn(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,B(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(cr(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?er:t!==_n&&t!==I&&e.strm.avail_in===0&&e.strstart===e.block_start?Qn:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(cr(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===I)&&t!==_n&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=t===I&&e.strm.avail_in===0&&r===i?1:0,pn(e,e.block_start,r,o),e.block_start+=r,B(e.strm)),o?$n:z)},fr=(e,t)=>{let n,r;for(;;){if(e.lookahead<Hn){if(ur(e),e.lookahead<Hn&&t===_n)return z;if(e.lookahead===0)break}if(n=0,e.lookahead>=R&&(e.ins_h=or(e,e.ins_h,e.window[e.strstart+R-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Hn&&(e.match_length=lr(e,n)),e.match_length>=R)if(r=hn(e,e.strstart-e.match_start,e.match_length-R),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=R){e.match_length--;do e.strstart++,e.ins_h=or(e,e.ins_h,e.window[e.strstart+R-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=or(e,e.ins_h,e.window[e.strstart+1]);else r=hn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(V(e,!1),e.strm.avail_out===0))return z}return e.insert=e.strstart<R-1?e.strstart:R-1,t===I?(V(e,!0),e.strm.avail_out===0?$n:er):e.sym_next&&(V(e,!1),e.strm.avail_out===0)?z:Qn},pr=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<Hn){if(ur(e),e.lookahead<Hn&&t===_n)return z;if(e.lookahead===0)break}if(n=0,e.lookahead>=R&&(e.ins_h=or(e,e.ins_h,e.window[e.strstart+R-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=R-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Hn&&(e.match_length=lr(e,n),e.match_length<=5&&(e.strategy===En||e.match_length===R&&e.strstart-e.match_start>4096)&&(e.match_length=R-1)),e.prev_length>=R&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-R,r=hn(e,e.strstart-1-e.prev_match,e.prev_length-R),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=or(e,e.ins_h,e.window[e.strstart+R-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=R-1,e.strstart++,r&&(V(e,!1),e.strm.avail_out===0))return z}else if(e.match_available){if(r=hn(e,0,e.window[e.strstart-1]),r&&V(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return z}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=hn(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<R-1?e.strstart:R-1,t===I?(V(e,!0),e.strm.avail_out===0?$n:er):e.sym_next&&(V(e,!1),e.strm.avail_out===0)?z:Qn},mr=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=Vn){if(ur(e),e.lookahead<=Vn&&t===_n)return z;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=R&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+Vn;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=Vn-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=R?(n=hn(e,1,e.match_length-R),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=hn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(V(e,!1),e.strm.avail_out===0))return z}return e.insert=0,t===I?(V(e,!0),e.strm.avail_out===0?$n:er):e.sym_next&&(V(e,!1),e.strm.avail_out===0)?z:Qn},hr=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(ur(e),e.lookahead===0)){if(t===_n)return z;break}if(e.match_length=0,n=hn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(V(e,!1),e.strm.avail_out===0))return z}return e.insert=0,t===I?(V(e,!0),e.strm.avail_out===0?$n:er):e.sym_next&&(V(e,!1),e.strm.avail_out===0)?z:Qn};function gr(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var _r=[new gr(0,0,0,0,dr),new gr(4,4,8,4,fr),new gr(4,5,16,8,fr),new gr(4,6,32,32,fr),new gr(4,4,16,16,pr),new gr(8,16,32,32,pr),new gr(8,16,128,128,pr),new gr(8,32,128,256,pr),new gr(32,128,258,1024,pr),new gr(32,258,258,4096,pr)],vr=e=>{e.window_size=2*e.w_size,ir(e.head),e.max_lazy_match=_r[e.level].max_lazy,e.good_match=_r[e.level].good_length,e.nice_match=_r[e.level].nice_length,e.max_chain_length=_r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=R-1,e.match_available=0,e.ins_h=0};function yr(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Mn,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(zn*2),this.dyn_dtree=new Uint16Array((2*Ln+1)*2),this.bl_tree=new Uint16Array((2*Rn+1)*2),ir(this.dyn_ltree),ir(this.dyn_dtree),ir(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Bn+1),this.heap=new Uint16Array(2*In+1),ir(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*In+1),ir(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var br=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==Wn&&t.status!==Gn&&t.status!==Kn&&t.status!==qn&&t.status!==Jn&&t.status!==Yn&&t.status!==Xn&&t.status!==Zn?1:0},xr=e=>{if(br(e))return nr(e,Sn);e.total_in=e.total_out=0,e.data_type=jn;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Gn:t.wrap?Wn:Xn,e.adler=t.wrap===2?0:1,t.last_flush=-2,fn(t),L},Sr=e=>{let t=xr(e);return t===L&&vr(e.state),t},Cr=(e,t)=>br(e)||e.state.wrap!==2?Sn:(e.state.gzhead=t,L),wr=(e,t,n,r,i,a)=>{if(!e)return Sn;let o=1;if(t===Tn&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>Nn||n!==Mn||r<8||r>15||t<0||t>9||a<0||a>kn||r===8&&o!==1)return nr(e,Sn);r===8&&(r=9);let s=new yr;return e.state=s,s.strm=e,s.status=Wn,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+R-1)/R),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,Sr(e)},Tr={deflateInit:(e,t)=>wr(e,t,Mn,Pn,Fn,An),deflateInit2:wr,deflateReset:Sr,deflateResetKeep:xr,deflateSetHeader:Cr,deflate:(e,t)=>{if(br(e)||t>bn||t<0)return e?nr(e,Sn):Sn;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Zn&&t!==I)return nr(e,e.avail_out===0?wn:Sn);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(B(e),e.avail_out===0)return n.last_flush=-1,L}else if(e.avail_in===0&&rr(t)<=rr(r)&&t!==I)return nr(e,wn);if(n.status===Zn&&e.avail_in!==0)return nr(e,wn);if(n.status===Wn&&n.wrap===0&&(n.status=Xn),n.status===Wn){let t=Mn+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=Dn||n.level<2?0:n.level<6?1:n.level===6?2:3,t|=r<<6,n.strstart!==0&&(t|=Un),t+=31-t%31,sr(n,t),n.strstart!==0&&(sr(n,e.adler>>>16),sr(n,e.adler&65535)),e.adler=1,n.status=Xn,B(e),n.pending!==0)return n.last_flush=-1,L}if(n.status===Gn){if(e.adler=0,H(n,31),H(n,139),H(n,8),n.gzhead)H(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),H(n,n.gzhead.time&255),H(n,n.gzhead.time>>8&255),H(n,n.gzhead.time>>16&255),H(n,n.gzhead.time>>24&255),H(n,n.level===9?2:n.strategy>=Dn||n.level<2?4:0),H(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(H(n,n.gzhead.extra.length&255),H(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=F(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Kn;else if(H(n,0),H(n,0),H(n,0),H(n,0),H(n,0),H(n,n.level===9?2:n.strategy>=Dn||n.level<2?4:0),H(n,tr),n.status=Xn,B(e),n.pending!==0)return n.last_flush=-1,L}if(n.status===Kn){if(n.gzhead.extra){let t=n.pending,r=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=F(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,B(e),n.pending!==0)return n.last_flush=-1,L;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=F(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=qn}if(n.status===qn){if(n.gzhead.name){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=F(e.adler,n.pending_buf,n.pending-t,t)),B(e),n.pending!==0)return n.last_flush=-1,L;t=0}r=n.gzindex<n.gzhead.name.length?n.gzhead.name.charCodeAt(n.gzindex++)&255:0,H(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=F(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=Jn}if(n.status===Jn){if(n.gzhead.comment){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=F(e.adler,n.pending_buf,n.pending-t,t)),B(e),n.pending!==0)return n.last_flush=-1,L;t=0}r=n.gzindex<n.gzhead.comment.length?n.gzhead.comment.charCodeAt(n.gzindex++)&255:0,H(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=F(e.adler,n.pending_buf,n.pending-t,t))}n.status=Yn}if(n.status===Yn){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(B(e),n.pending!==0))return n.last_flush=-1,L;H(n,e.adler&255),H(n,e.adler>>8&255),e.adler=0}if(n.status=Xn,B(e),n.pending!==0)return n.last_flush=-1,L}if(e.avail_in!==0||n.lookahead!==0||t!==_n&&n.status!==Zn){let r=n.level===0?dr(n,t):n.strategy===Dn?hr(n,t):n.strategy===On?mr(n,t):_r[n.level].func(n,t);if((r===$n||r===er)&&(n.status=Zn),r===z||r===$n)return e.avail_out===0&&(n.last_flush=-1),L;if(r===Qn&&(t===vn?gn(n):t!==bn&&(pn(n,0,0,!1),t===yn&&(ir(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),B(e),e.avail_out===0))return n.last_flush=-1,L}return t===I?n.wrap<=0?xn:(n.wrap===2?(H(n,e.adler&255),H(n,e.adler>>8&255),H(n,e.adler>>16&255),H(n,e.adler>>24&255),H(n,e.total_in&255),H(n,e.total_in>>8&255),H(n,e.total_in>>16&255),H(n,e.total_in>>24&255)):(sr(n,e.adler>>>16),sr(n,e.adler&65535)),B(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending===0?xn:L):L},deflateEnd:e=>{if(br(e))return Sn;let t=e.state.status;return e.state=null,t===Xn?nr(e,Cn):L},deflateSetDictionary:(e,t)=>{let n=t.length;if(br(e))return Sn;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==Wn||r.lookahead)return Sn;if(i===1&&(e.adler=cn(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(ir(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}let a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,ur(r);r.lookahead>=R;){let e=r.strstart,t=r.lookahead-(R-1);do r.ins_h=or(r,r.ins_h,r.window[e+R-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++;while(--t);r.strstart=e,r.lookahead=R-1,ur(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=R-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,L},deflateInfo:`pako deflate (from Nodeca project)`},Er=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Dr={assign:function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(let t in n)Er(n,t)&&(e[t]=n[t])}}return e},flattenChunks:e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n].length;let n=new Uint8Array(t);for(let t=0,r=0,i=e.length;t<i;t++){let i=e[t];n.set(i,r),r+=i.length}return n}},Or=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Or=!1}var kr=new Uint8Array(256);for(let e=0;e<256;e++)kr[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;kr[254]=kr[254]=1;var Ar=e=>{if(typeof TextEncoder==`function`&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t},jr=(e,t)=>{if(t<65534&&e.subarray&&Or)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n=``;for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n},Mr={string2buf:Ar,buf2string:(e,t)=>{let n=t||e.length;if(typeof TextDecoder==`function`&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,a=Array(n*2);for(i=0,r=0;r<n;){let t=e[r++];if(t<128){a[i++]=t;continue}let o=kr[t];if(o>4){a[i++]=65533,r+=o-1;continue}for(t&=o===2?31:o===3?15:7;o>1&&r<n;)t=t<<6|e[r++]&63,o--;if(o>1){a[i++]=65533;continue}t<65536?a[i++]=t:(t-=65536,a[i++]=55296|t>>10&1023,a[i++]=56320|t&1023)}return jr(a,i)},utf8border:(e,t)=>{t||=e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)==128;)n--;return n<0||n===0?t:n+kr[e[n]]>t?n:t}};function Nr(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}var Pr=Nr,Fr=Object.prototype.toString,{Z_NO_FLUSH:Ir,Z_SYNC_FLUSH:Lr,Z_FULL_FLUSH:Rr,Z_FINISH:zr,Z_OK:Br,Z_STREAM_END:Vr,Z_DEFAULT_COMPRESSION:Hr,Z_DEFAULT_STRATEGY:Ur,Z_DEFLATED:Wr}=dn;function Gr(e){this.options=Dr.assign({level:Hr,method:Wr,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ur},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new Pr,this.strm.avail_out=0;let n=Tr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Br)throw Error(un[n]);if(t.header&&Tr.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e=typeof t.dictionary==`string`?Mr.string2buf(t.dictionary):Fr.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary,n=Tr.deflateSetDictionary(this.strm,e),n!==Br)throw Error(un[n]);this._dict_set=!0}}Gr.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(a=t===~~t?t:t===!0?zr:Ir,typeof e==`string`?n.input=Mr.string2buf(e):Fr.call(e)===`[object ArrayBuffer]`?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===Lr||a===Rr)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Tr.deflate(n,a),i===Vr)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Tr.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Br;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},Gr.prototype.onData=function(e){this.chunks.push(e)},Gr.prototype.onEnd=function(e){e===Br&&(this.result=Dr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Kr(e,t){let n=new Gr(t);if(n.push(e,!0),n.err)throw n.msg||un[n.err];return n.result}function qr(e,t){return t||={},t.raw=!0,Kr(e,t)}function Jr(e,t){return t||={},t.gzip=!0,Kr(e,t)}var Yr={Deflate:Gr,deflate:Kr,deflateRaw:qr,gzip:Jr,constants:dn},Xr=16209,Zr=16191,Qr=function(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=e.state;n=e.next_in,w=e.input,r=n+(e.avail_in-5),i=e.next_out,T=e.output,a=i-(t-e.avail_out),o=i+(e.avail_out-257),s=E.dmax,c=E.wsize,l=E.whave,u=E.wnext,d=E.window,f=E.hold,p=E.bits,m=E.lencode,h=E.distcode,g=(1<<E.lenbits)-1,_=(1<<E.distbits)-1;top:do{p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=m[f&g];dolen:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y===0)T[i++]=v&65535;else if(y&16){b=v&65535,y&=15,y&&(p<y&&(f+=w[n++]<<p,p+=8),b+=f&(1<<y)-1,f>>>=y,p-=y),p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=h[f&_];dodist:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y&16){if(x=v&65535,y&=15,p<y&&(f+=w[n++]<<p,p+=8,p<y&&(f+=w[n++]<<p,p+=8)),x+=f&(1<<y)-1,x>s){e.msg=`invalid distance too far back`,E.mode=Xr;break top}if(f>>>=y,p-=y,y=i-a,x>y){if(y=x-y,y>l&&E.sane){e.msg=`invalid distance too far back`,E.mode=Xr;break top}if(S=0,C=d,u===0){if(S+=c-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}else if(u<y){if(S+=c+u-y,y-=u,y<b){b-=y;do T[i++]=d[S++];while(--y);if(S=0,u<b){y=u,b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}}else if(S+=u-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}for(;b>2;)T[i++]=C[S++],T[i++]=C[S++],T[i++]=C[S++],b-=3;b&&(T[i++]=C[S++],b>1&&(T[i++]=C[S++]))}else{S=i-x;do T[i++]=T[S++],T[i++]=T[S++],T[i++]=T[S++],b-=3;while(b>2);b&&(T[i++]=T[S++],b>1&&(T[i++]=T[S++]))}}else if(y&64){e.msg=`invalid distance code`,E.mode=Xr;break top}else{v=h[(v&65535)+(f&(1<<y)-1)];continue dodist}break}}else if(!(y&64)){v=m[(v&65535)+(f&(1<<y)-1)];continue dolen}else if(y&32){E.mode=Zr;break top}else{e.msg=`invalid literal/length code`,E.mode=Xr;break top}break}}while(n<r&&i<o);b=p>>3,n-=b,p-=b<<3,f&=(1<<p)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?5+(r-n):5-(n-r),e.avail_out=i<o?257+(o-i):257-(i-o),E.hold=f,E.bits=p},$r=15,ei=852,ti=592,ni=0,ri=1,ii=2,ai=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),oi=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),si=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ci=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),li=(e,t,n,r,i,a,o,s)=>{let c=s.bits,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y,b,x,S,C,w=null,T,E=new Uint16Array($r+1),D=new Uint16Array($r+1),ee=null,te,O,k;for(l=0;l<=$r;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=$r;f>=1&&E[f]===0;f--);if(p>f&&(p=f),f===0)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(d=1;d<f&&E[d]===0;d++);for(p<d&&(p=d),g=1,l=1;l<=$r;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===ni||f!==1))return-1;for(D[1]=0,l=1;l<$r;l++)D[l+1]=D[l]+E[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[D[t[n+u]]++]=u);if(e===ni?(w=ee=o,T=20):e===ri?(w=ai,ee=oi,T=257):(w=si,ee=ci,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===ri&&_>ei||e===ii&&_>ti)return 1;for(;;){te=l-h,o[u]+1<T?(O=0,k=o[u]):o[u]>=T?(O=ee[o[u]-T],k=w[o[u]-T]):(O=96,k=0),y=1<<l-h,b=1<<m,d=b;do b-=y,i[C+(v>>h)+b]=te<<24|O<<16|k|0;while(b!==0);for(y=1<<l-1;v&y;)y>>=1;if(y===0?v=0:(v&=y-1,v+=y),u++,--E[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>p&&(v&S)!==x){for(h===0&&(h=p),C+=d,m=l-h,g=1<<m;m+h<f&&(g-=E[m+h],!(g<=0));)m++,g<<=1;if(_+=1<<m,e===ri&&_>ei||e===ii&&_>ti)return 1;x=v&S,i[x]=p<<24|m<<16|C-a|0}}return v!==0&&(i[C+v]=l-h<<24|4194304),s.bits=p,0},ui=0,di=1,fi=2,{Z_FINISH:pi,Z_BLOCK:mi,Z_TREES:hi,Z_OK:gi,Z_STREAM_END:_i,Z_NEED_DICT:vi,Z_STREAM_ERROR:U,Z_DATA_ERROR:yi,Z_MEM_ERROR:bi,Z_BUF_ERROR:xi,Z_DEFLATED:Si}=dn,Ci=16180,wi=16181,Ti=16182,Ei=16183,Di=16184,Oi=16185,ki=16186,Ai=16187,ji=16188,Mi=16189,Ni=16190,Pi=16191,Fi=16192,Ii=16193,Li=16194,Ri=16195,zi=16196,Bi=16197,Vi=16198,Hi=16199,Ui=16200,Wi=16201,Gi=16202,Ki=16203,qi=16204,Ji=16205,Yi=16206,Xi=16207,Zi=16208,W=16209,Qi=16210,$i=16211,ea=852,ta=592,na=15,ra=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function ia(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var aa=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.mode<Ci||t.mode>$i?1:0},oa=e=>{if(aa(e))return U;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=t.wrap&1),t.mode=Ci,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(ea),t.distcode=t.distdyn=new Int32Array(ta),t.sane=1,t.back=-1,gi},sa=e=>{if(aa(e))return U;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,oa(e)},ca=(e,t)=>{let n;if(aa(e))return U;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?U:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,sa(e))},la=(e,t)=>{if(!e)return U;let n=new ia;e.state=n,n.strm=e,n.window=null,n.mode=Ci;let r=ca(e,t);return r!==gi&&(e.state=null),r},ua=e=>la(e,na),da=!0,fa,pa,ma=e=>{if(da){fa=new Int32Array(512),pa=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(li(di,e.lens,0,288,fa,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;li(fi,e.lens,0,32,pa,0,e.work,{bits:5}),da=!1}e.lencode=fa,e.lenbits=9,e.distcode=pa,e.distbits=5},ha=(e,t,n,r)=>{let i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},ga={inflateReset:sa,inflateReset2:ca,inflateResetKeep:oa,inflateInit:ua,inflateInit2:la,inflate:(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=0,_,v,y,b,x,S,C,w,T=new Uint8Array(4),E,D,ee=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(aa(e)||!e.output||!e.input&&e.avail_in!==0)return U;n=e.state,n.mode===Pi&&(n.mode=Fi),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,w=gi;inf_leave:for(;;)switch(n.mode){case Ci:if(n.wrap===0){n.mode=Fi;break}for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=F(n.check,T,2,0),l=0,u=0,n.mode=wi;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=W;break}if((l&15)!==Si){e.msg=`unknown compression method`,n.mode=W;break}if(l>>>=4,u-=4,C=(l&15)+8,n.wbits===0&&(n.wbits=C),C>15||C>n.wbits){e.msg=`invalid window size`,n.mode=W;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?Mi:Pi,l=0,u=0;break;case wi:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==Si){e.msg=`unknown compression method`,n.mode=W;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=W;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=F(n.check,T,2,0)),l=0,u=0,n.mode=Ti;case Ti:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=F(n.check,T,4,0)),l=0,u=0,n.mode=Ei;case Ei:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=F(n.check,T,2,0)),l=0,u=0,n.mode=Di;case Di:if(n.flags&1024){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=F(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=Oi;case Oi:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),C)),n.flags&512&&n.wrap&4&&(n.check=F(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=ki;case ki:if(n.flags&2048){if(s===0)break inf_leave;p=0;do C=r[a+ p++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=F(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.name=null);n.length=0,n.mode=Ai;case Ai:if(n.flags&4096){if(s===0)break inf_leave;p=0;do C=r[a+ p++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=F(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=ji;case ji:if(n.flags&512){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg=`header crc mismatch`,n.mode=W;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Pi;break;case Mi:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=ra(l),l=0,u=0,n.mode=Ni;case Ni:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,vi;e.adler=n.check=1,n.mode=Pi;case Pi:if(t===mi||t===hi)break inf_leave;case Fi:if(n.last){l>>>=u&7,u-=u&7,n.mode=Yi;break}for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,--u,l&3){case 0:n.mode=Ii;break;case 1:if(ma(n),n.mode=Hi,t===hi){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=zi;break;case 3:e.msg=`invalid block type`,n.mode=W}l>>>=2,u-=2;break;case Ii:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if((l&65535)!=(l>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=W;break}if(n.length=l&65535,l=0,u=0,n.mode=Li,t===hi)break inf_leave;case Li:n.mode=Ri;case Ri:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break inf_leave;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=Pi;break;case zi:for(;u<14;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg=`too many length or distance symbols`,n.mode=W;break}n.have=0,n.mode=Bi;case Bi:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.lens[ee[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[ee[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},w=li(ui,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=W;break}n.have=0,n.mode=Vi;case Vi:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(y<16)l>>>=_,u-=_,n.lens[n.have++]=y;else{if(y===16){for(D=_+2;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(l>>>=_,u-=_,n.have===0){e.msg=`invalid bit length repeat`,n.mode=W;break}C=n.lens[n.have-1],p=3+(l&3),l>>>=2,u-=2}else if(y===17){for(D=_+3;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=3+(l&7),l>>>=3,u-=3}else{for(D=_+7;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=11+(l&127),l>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=W;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===W)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=W;break}if(n.lenbits=9,E={bits:n.lenbits},w=li(di,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=W;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=li(fi,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=W;break}if(n.mode=Hi,t===hi)break inf_leave;case Hi:n.mode=Ui;case Ui:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,Qr(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===Pi&&(n.back=-1);break}for(n.back=0;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(v&&!(v&240)){for(b=_,x=v,S=y;g=n.lencode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,n.length=y,v===0){n.mode=Ji;break}if(v&32){n.back=-1,n.mode=Pi;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=W;break}n.extra=v&15,n.mode=Wi;case Wi:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Gi;case Gi:for(;g=n.distcode[l&(1<<n.distbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(!(v&240)){for(b=_,x=v,S=y;g=n.distcode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,v&64){e.msg=`invalid distance code`,n.mode=W;break}n.offset=y,n.extra=v&15,n.mode=Ki;case Ki:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=W;break}n.mode=qi;case qi:if(c===0)break inf_leave;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=W;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),h=n.window}else h=i,m=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=h[m++];while(--p);n.length===0&&(n.mode=Ui);break;case Ji:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=Ui;break;case Yi:if(n.wrap){for(;u<32;){if(s===0)break inf_leave;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?F(n.check,i,f,o-f):cn(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:ra(l))!==n.check){e.msg=`incorrect data check`,n.mode=W;break}l=0,u=0}n.mode=Xi;case Xi:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg=`incorrect length check`,n.mode=W;break}l=0,u=0}n.mode=Zi;case Zi:w=_i;break inf_leave;case W:w=yi;break inf_leave;case Qi:return bi;case $i:default:return U}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<W&&(n.mode<Yi||t!==pi))&&ha(e,e.output,e.next_out,f-e.avail_out),d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?F(n.check,i,f,e.next_out-f):cn(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Pi?128:0)+(n.mode===Hi||n.mode===Li?256:0),(d===0&&f===0||t===pi)&&w===gi&&(w=xi),w},inflateEnd:e=>{if(aa(e))return U;let t=e.state;return t.window&&=null,e.state=null,gi},inflateGetHeader:(e,t)=>{if(aa(e))return U;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,gi):U},inflateSetDictionary:(e,t)=>{let n=t.length,r,i,a;return aa(e)||(r=e.state,r.wrap!==0&&r.mode!==Ni)?U:r.mode===Ni&&(i=1,i=cn(i,t,n,0),i!==r.check)?yi:(a=ha(e,t,n,n),a?(r.mode=Qi,bi):(r.havedict=1,gi))},inflateInfo:`pako inflate (from Nodeca project)`};function _a(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=``,this.comment=``,this.hcrc=0,this.done=!1}var va=_a,ya=Object.prototype.toString,{Z_NO_FLUSH:ba,Z_FINISH:xa,Z_OK:Sa,Z_STREAM_END:Ca,Z_NEED_DICT:wa,Z_STREAM_ERROR:Ta,Z_DATA_ERROR:Ea,Z_MEM_ERROR:Da}=dn;function Oa(e){this.options=Dr.assign({chunkSize:1024*64,windowBits:15,to:``},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new Pr,this.strm.avail_out=0;let n=ga.inflateInit2(this.strm,t.windowBits);if(n!==Sa||(this.header=new va,ga.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary==`string`?t.dictionary=Mr.string2buf(t.dictionary):ya.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ga.inflateSetDictionary(this.strm,t.dictionary),n!==Sa))))throw Error(un[n])}Oa.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s;if(this.ended)return!1;for(o=t===~~t?t:t===!0?xa:ba,ya.call(e)===`[object ArrayBuffer]`?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=ga.inflate(n,o),a===wa&&i&&(a=ga.inflateSetDictionary(n,i),a===Sa?a=ga.inflate(n,o):a===Ea&&(a=wa));n.avail_in>0&&a===Ca&&n.state.wrap>0&&e[n.next_in]!==0;)ga.inflateReset(n),a=ga.inflate(n,o);switch(a){case Ta:case Ea:case wa:case Da:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===Ca))if(this.options.to===`string`){let e=Mr.utf8border(n.output,n.next_out),t=n.next_out-e,i=Mr.buf2string(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===Sa&&s===0)){if(a===Ca)return a=ga.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},Oa.prototype.onData=function(e){this.chunks.push(e)},Oa.prototype.onEnd=function(e){e===Sa&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=Dr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ka(e,t){let n=new Oa(t);if(n.push(e),n.err)throw n.msg||un[n.err];return n.result}function Aa(e,t){return t||={},t.raw=!0,ka(e,t)}var ja={Inflate:Oa,inflate:ka,inflateRaw:Aa,ungzip:ka,constants:dn},{Deflate:Ma,deflate:Na,deflateRaw:Pa,gzip:Fa}=Yr,{Inflate:Ia,inflate:La,inflateRaw:Ra,ungzip:za}=ja,Ba=Na,Va=Ia,Ha=class{constructor(e,t=!1,n=!0){this.device=e,this.tracing=t,this.slipReaderEnabled=!1,this.baudrate=0,this.traceLog=``,this.lastTraceTime=Date.now(),this.buffer=new Uint8Array,this.SLIP_END=192,this.SLIP_ESC=219,this.SLIP_ESC_END=220,this.SLIP_ESC_ESC=221,this._DTR_state=!1,this.slipReaderEnabled=n}getInfo(){let e=this.device.getInfo();return e.usbVendorId&&e.usbProductId?`WebSerial VendorID 0x${e.usbVendorId.toString(16)} ProductID 0x${e.usbProductId.toString(16)}`:``}getPid(){return this.device.getInfo().usbProductId}trace(e){let t=`${`TRACE ${(Date.now()-this.lastTraceTime).toFixed(3)}`} ${e}`;console.log(t),this.traceLog+=t+`\n`}async returnTrace(){try{await navigator.clipboard.writeText(this.traceLog),console.log(`Text copied to clipboard!`)}catch(e){console.error(`Failed to copy text:`,e)}}hexify(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``).padEnd(16,` `)}hexConvert(e,t=!0){if(t&&e.length>16){let t=``,n=e;for(;n.length>0;){let e=n.slice(0,16),r=String.fromCharCode(...e).split(``).map(e=>e===` `||e>=` `&&e<=`~`&&e!==`  `?e:`.`).join(``);n=n.slice(16),t+=`\\n    ${this.hexify(e.slice(0,8))} ${this.hexify(e.slice(8))} | ${r}`}return t}else return this.hexify(e)}slipWriter(e){let t=[];t.push(192);for(let n=0;n<e.length;n++)e[n]===219?t.push(219,221):e[n]===192?t.push(219,220):t.push(e[n]);return t.push(192),new Uint8Array(t)}async write(e){let t=this.slipWriter(e);if(this.device.writable){let e=this.device.writable.getWriter();this.tracing&&(console.log(`Write bytes`),this.trace(`Write ${t.length} bytes: ${this.hexConvert(t)}`)),await e.write(t),e.releaseLock()}}appendArray(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}async*readLoop(e){if(this.reader)try{for(;;){let t=new Promise((t,n)=>setTimeout(()=>n(Error(`Read timeout exceeded`)),e)),n=await Promise.race([this.reader.read(),t]);if(n===null)break;let{value:r,done:i}=n;if(i||!r)break;yield r}}catch(e){console.error(`Error reading from serial port:`,e)}finally{this.buffer=new Uint8Array}}async newRead(e,t){if(this.buffer.length>=e){let t=this.buffer.slice(0,e);return this.buffer=this.buffer.slice(e),t}for(;this.buffer.length<e;){let{value:e,done:n}=await this.readLoop(t).next();if(n||!e)break;this.buffer=this.appendArray(this.buffer,e)}let n=this.buffer.slice(0,e);return this.buffer=this.buffer.slice(e),n}async flushInput(){this.reader&&!await this.reader.closed&&(await this.reader.cancel(),this.reader.releaseLock(),this.reader=this.device.readable?.getReader())}async flushOutput(){var e;this.buffer=new Uint8Array,await this.device.writable?.getWriter().close(),(e=this.device.writable)==null||e.getWriter().releaseLock()}inWaiting(){return this.buffer.length}detectPanicHandler(e){let t=/G?uru Meditation Error: (?:Core \\d panic'ed \\(([a-zA-Z ]*)\\))?/,n=/F?atal exception \\(\\d+\\): (?:([a-zA-Z ]*)?.*epc)?/,r=new TextDecoder(`utf-8`).decode(e),i=r.match(t)||r.match(n);if(i){let e=i[1]||i[2],t=`Guru Meditation Error detected${e?` (${e})`:``}`;throw Error(t)}}async*read(e){this.reader||=this.device.readable?.getReader();let t=null,n=!1,r=!1;for(;;){let i=this.inWaiting(),a=await this.newRead(i>0?i:1,e);if(!a||a.length===0){let e=t===null?r?`Serial data stream stopped: Possible serial noise or corruption.`:`No serial data received.`:`Packet content transfer stopped`;throw this.trace(e),Error(e)}this.trace(`Read ${a.length} bytes: ${this.hexConvert(a)}`);let o=0;for(;o<a.length;){let i=a[o++];if(t===null)if(i===this.SLIP_END)t=new Uint8Array;else{this.trace(`Read invalid data: ${this.hexConvert(a)}`);let t=await this.newRead(this.inWaiting(),e);throw this.trace(`Remaining data in serial buffer: ${this.hexConvert(t)}`),this.detectPanicHandler(new Uint8Array([...a,...t||[]])),Error(`Invalid head of packet (0x${i.toString(16)}): Possible serial noise or corruption.`)}else if(n)if(n=!1,i===this.SLIP_ESC_END)t=this.appendArray(t,new Uint8Array([this.SLIP_END]));else if(i===this.SLIP_ESC_ESC)t=this.appendArray(t,new Uint8Array([this.SLIP_ESC]));else{this.trace(`Read invalid data: ${this.hexConvert(a)}`);let t=await this.newRead(this.inWaiting(),e);throw this.trace(`Remaining data in serial buffer: ${this.hexConvert(t)}`),this.detectPanicHandler(new Uint8Array([...a,...t||[]])),Error(`Invalid SLIP escape (0xdb, 0x${i.toString(16)})`)}else i===this.SLIP_ESC?n=!0:i===this.SLIP_END?(this.trace(`Received full packet: ${this.hexConvert(t)}`),this.buffer=this.appendArray(this.buffer,a.slice(o)),yield t,t=null,r=!0):t=this.appendArray(t,new Uint8Array([i]))}}}async*rawRead(){if(this.reader)try{for(;;){let{value:e,done:t}=await this.reader.read();if(t||!e)break;this.tracing&&(console.log(`Raw Read bytes`),this.trace(`Read ${e.length} bytes: ${this.hexConvert(e)}`)),yield e}}catch(e){console.error(`Error reading from serial port:`,e)}finally{this.buffer=new Uint8Array}}async setRTS(e){await this.device.setSignals({requestToSend:e}),await this.setDTR(this._DTR_state)}async setDTR(e){this._DTR_state=e,await this.device.setSignals({dataTerminalReady:e})}async connect(e=115200,t={}){await this.device.open({baudRate:e,dataBits:t?.dataBits,stopBits:t?.stopBits,bufferSize:t?.bufferSize,parity:t?.parity,flowControl:t?.flowControl}),this.baudrate=e,this.reader=this.device.readable?.getReader()}async sleep(e){return new Promise(t=>setTimeout(t,e))}async waitForUnlock(e){for(;this.device.readable&&this.device.readable.locked||this.device.writable&&this.device.writable.locked;)await this.sleep(e)}async disconnect(){this.device.readable?.locked&&await this.reader?.cancel(),await this.waitForUnlock(400),await this.device.close(),this.reader=void 0}};function Ua(e){return new Promise(t=>setTimeout(t,e))}var Wa=class{constructor(e,t){this.resetDelay=t,this.transport=e}async reset(){await this.transport.setDTR(!1),await this.transport.setRTS(!0),await Ua(100),await this.transport.setDTR(!0),await this.transport.setRTS(!1),await Ua(this.resetDelay),await this.transport.setDTR(!1)}},Ga=class{constructor(e){this.transport=e}async reset(){await this.transport.setRTS(!1),await this.transport.setDTR(!1),await Ua(100),await this.transport.setDTR(!0),await this.transport.setRTS(!1),await Ua(100),await this.transport.setRTS(!0),await this.transport.setDTR(!1),await this.transport.setRTS(!0),await Ua(100),await this.transport.setRTS(!1),await this.transport.setDTR(!1)}},Ka=class{constructor(e,t=!1){this.transport=e,this.usingUsbOtg=t,this.transport=e}async reset(){this.usingUsbOtg?(await Ua(200),await this.transport.setRTS(!1),await Ua(200)):(await Ua(100),await this.transport.setRTS(!1))}};function qa(e){let t=[`D`,`R`,`W`],n=e.split(`|`);for(let e of n){let n=e[0],r=e.slice(1);if(!t.includes(n))return!1;if(n===`D`||n===`R`){if(r!==`0`&&r!==`1`)return!1}else if(n===`W`){let e=parseInt(r);if(isNaN(e)||e<=0)return!1}}return!0}var Ja=class{constructor(e,t){this.transport=e,this.sequenceString=t,this.transport=e}async reset(){let e={D:async e=>await this.transport.setDTR(e),R:async e=>await this.transport.setRTS(e),W:async e=>await Ua(e)};try{if(!qa(this.sequenceString))return;let t=this.sequenceString.split(`|`);for(let n of t){let t=n[0],r=n.slice(1);t===`W`?await e.W(Number(r)):(t===`D`||t===`R`)&&await e[t](r===`1`)}}catch{throw Error(`Invalid custom reset sequence`)}}},Ya=t(e(((e,t)=>{t.exports=function(e){return atob(e)}}))());async function Xa(e){let t;switch(e){case`ESP32`:t=await n(()=>import(`./stub_flasher_32-DMOwp-H2.js`),[]);break;case`ESP32-C2`:t=await n(()=>import(`./stub_flasher_32c2-BglC1CA-.js`),[]);break;case`ESP32-C3`:t=await n(()=>import(`./stub_flasher_32c3-DVjTuHxm.js`),[]);break;case`ESP32-C5`:t=await n(()=>import(`./stub_flasher_32c5-Bw4Gkysk.js`),[]);break;case`ESP32-C6`:t=await n(()=>import(`./stub_flasher_32c6-Bdx7wUin.js`),[]);break;case`ESP32-C61`:t=await n(()=>import(`./stub_flasher_32c61-U7D4krFy.js`),[]);break;case`ESP32-H2`:t=await n(()=>import(`./stub_flasher_32h2-wrcmrOHl.js`),[]);break;case`ESP32-P4`:t=await n(()=>import(`./stub_flasher_32p4-Q6hgNTYb.js`),[]);break;case`ESP32-S2`:t=await n(()=>import(`./stub_flasher_32s2-CjuleYts.js`),[]);break;case`ESP32-S3`:t=await n(()=>import(`./stub_flasher_32s3-Bz348Cp3.js`),[]);break;case`ESP8266`:t=await n(()=>import(`./stub_flasher_8266-BdPZCml8.js`),[]);break}if(t)return{bss_start:t.bss_start,data:t.data,data_start:t.data_start,entry:t.entry,text:t.text,text_start:t.text_start,decodedData:Za(t.data),decodedText:Za(t.text)}}function Za(e){let t=(0,Ya.default)(e).split(``).map(function(e){return e.charCodeAt(0)});return new Uint8Array(t)}function Qa(e,t,n=255){let r=e.length%t;if(r!==0){let i=new Uint8Array(t-r).fill(n),a=new Uint8Array(e.length+i.length);return a.set(e),a.set(i,e.length),a}return e}async function $a(e){switch(e){case 15736195:{let{ESP32ROM:e}=await n(async()=>{let{ESP32ROM:e}=await import(`./esp32-DR_yen0A.js`);return{ESP32ROM:e}},__vite__mapDeps([0,1]));return new e}case 203546735:case 1867591791:case 2084675695:{let{ESP32C2ROM:e}=await n(async()=>{let{ESP32C2ROM:e}=await import(`./esp32c2-CIvS3qc5.js`);return{ESP32C2ROM:e}},__vite__mapDeps([2,3,1]));return new e}case 1763790959:case 456216687:case 1216438383:case 1130455151:{let{ESP32C3ROM:e}=await n(async()=>{let{ESP32C3ROM:e}=await import(`./esp32c3-nJJ15ppW.js`);return{ESP32C3ROM:e}},__vite__mapDeps([3,1]));return new e}case 752910447:{let{ESP32C6ROM:e}=await n(async()=>{let{ESP32C6ROM:e}=await import(`./esp32c6-snJpA5DJ.js`);return{ESP32C6ROM:e}},__vite__mapDeps([4,1]));return new e}case 606167151:case 871374959:case 1333878895:{let{ESP32C61ROM:e}=await n(async()=>{let{ESP32C61ROM:e}=await import(`./esp32c61-DUe22z0I.js`);return{ESP32C61ROM:e}},__vite__mapDeps([5,4,1]));return new e}case 285294703:case 1675706479:case 1607549039:{let{ESP32C5ROM:e}=await n(async()=>{let{ESP32C5ROM:e}=await import(`./esp32c5-DbWg37P4.js`);return{ESP32C5ROM:e}},__vite__mapDeps([6,4,1]));return new e}case 3619110528:case 2548236392:{let{ESP32H2ROM:e}=await n(async()=>{let{ESP32H2ROM:e}=await import(`./esp32h2-CCGwb3vw.js`);return{ESP32H2ROM:e}},__vite__mapDeps([7,1]));return new e}case 9:{let{ESP32S3ROM:e}=await n(async()=>{let{ESP32S3ROM:e}=await import(`./esp32s3-CjJ5O_5u.js`);return{ESP32S3ROM:e}},__vite__mapDeps([8,1]));return new e}case 1990:{let{ESP32S2ROM:e}=await n(async()=>{let{ESP32S2ROM:e}=await import(`./esp32s2-klISvvyE.js`);return{ESP32S2ROM:e}},__vite__mapDeps([9,1]));return new e}case 4293968129:{let{ESP8266ROM:e}=await n(async()=>{let{ESP8266ROM:e}=await import(`./esp8266-BCrKhPpV.js`);return{ESP8266ROM:e}},__vite__mapDeps([10,1]));return new e}case 0:case 182303440:case 117676761:{let{ESP32P4ROM:e}=await n(async()=>{let{ESP32P4ROM:e}=await import(`./esp32p4-BE8Lllij.js`);return{ESP32P4ROM:e}},__vite__mapDeps([11,0,1]));return new e}default:return null}}var eo=class{constructor(e){this.ESP_RAM_BLOCK=6144,this.ESP_FLASH_BEGIN=2,this.ESP_FLASH_DATA=3,this.ESP_FLASH_END=4,this.ESP_MEM_BEGIN=5,this.ESP_MEM_END=6,this.ESP_MEM_DATA=7,this.ESP_WRITE_REG=9,this.ESP_READ_REG=10,this.ESP_SPI_ATTACH=13,this.ESP_CHANGE_BAUDRATE=15,this.ESP_FLASH_DEFL_BEGIN=16,this.ESP_FLASH_DEFL_DATA=17,this.ESP_FLASH_DEFL_END=18,this.ESP_SPI_FLASH_MD5=19,this.ESP_ERASE_FLASH=208,this.ESP_ERASE_REGION=209,this.ESP_READ_FLASH=210,this.ESP_RUN_USER_CODE=211,this.ESP_IMAGE_MAGIC=233,this.ESP_CHECKSUM_MAGIC=239,this.ROM_INVALID_RECV_MSG=5,this.DEFAULT_TIMEOUT=3e3,this.ERASE_REGION_TIMEOUT_PER_MB=3e4,this.ERASE_WRITE_TIMEOUT_PER_MB=4e4,this.MD5_TIMEOUT_PER_MB=8e3,this.CHIP_ERASE_TIMEOUT=12e4,this.FLASH_READ_TIMEOUT=1e5,this.MAX_TIMEOUT=this.CHIP_ERASE_TIMEOUT*2,this.CHIP_DETECT_MAGIC_REG_ADDR=1073745920,this.DETECTED_FLASH_SIZES={18:`256KB`,19:`512KB`,20:`1MB`,21:`2MB`,22:`4MB`,23:`8MB`,24:`16MB`},this.DETECTED_FLASH_SIZES_NUM={18:256,19:512,20:1024,21:2048,22:4096,23:8192,24:16384},this.USB_JTAG_SERIAL_PID=4097,this.romBaudrate=115200,this.debugLogging=!1,this.syncStubDetected=!1,this.flashSizeBytes=function(e){let t=-1;return e.indexOf(`KB`)===-1?e.indexOf(`MB`)!==-1&&(t=parseInt(e.slice(0,e.indexOf(`MB`)))*1024*1024):t=parseInt(e.slice(0,e.indexOf(`KB`)))*1024,t},this.IS_STUB=!1,this.FLASH_WRITE_SIZE=16384,this.transport=e.transport,this.baudrate=e.baudrate,this.resetConstructors={classicReset:(e,t)=>new Wa(e,t),customReset:(e,t)=>new Ja(e,t),hardReset:(e,t)=>new Ka(e,t),usbJTAGSerialReset:e=>new Ga(e)},e.serialOptions&&(this.serialOptions=e.serialOptions),e.romBaudrate&&(this.romBaudrate=e.romBaudrate),e.terminal&&(this.terminal=e.terminal,this.terminal.clean()),e.debugLogging!==void 0&&(this.debugLogging=e.debugLogging),e.port&&(this.transport=new Ha(e.port)),e.enableTracing!==void 0&&(this.transport.tracing=e.enableTracing),e.resetConstructors?.classicReset&&(this.resetConstructors.classicReset=e.resetConstructors?.classicReset),e.resetConstructors?.customReset&&(this.resetConstructors.customReset=e.resetConstructors?.customReset),e.resetConstructors?.hardReset&&(this.resetConstructors.hardReset=e.resetConstructors?.hardReset),e.resetConstructors?.usbJTAGSerialReset&&(this.resetConstructors.usbJTAGSerialReset=e.resetConstructors?.usbJTAGSerialReset),this.info(`esptool.js`),this.info(`Serial port `+this.transport.getInfo())}_sleep(e){return new Promise(t=>setTimeout(t,e))}write(e,t=!0){this.terminal?t?this.terminal.writeLine(e):this.terminal.write(e):console.log(e)}error(e,t=!0){this.write(`Error: ${e}`,t)}info(e,t=!0){this.write(e,t)}debug(e,t=!0){this.debugLogging&&this.write(`Debug: ${e}`,t)}_shortToBytearray(e){return new Uint8Array([e&255,e>>8&255])}_intToByteArray(e){return new Uint8Array([e&255,e>>8&255,e>>16&255,e>>24&255])}_byteArrayToShort(e,t){return e|t>>8}_byteArrayToInt(e,t,n,r){return e|t<<8|n<<16|r<<24}_appendBuffer(e,t){let n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer}_appendArray(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n}ui8ToBstr(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}bstrToUi8(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}async flushInput(){try{await this.transport.flushInput()}catch(e){this.error(e.message)}}async readPacket(e=null,t=this.DEFAULT_TIMEOUT){for(let n=0;n<100;n++){let{value:n}=await this.transport.read(t).next();if(!n||n.length<8)continue;let r=n[0];if(r!==1)continue;let i=n[1],a=this._byteArrayToInt(n[4],n[5],n[6],n[7]),o=n.slice(8);if(r==1){if(e==null||i==e)return[a,o];if(o[0]!=0&&o[1]==this.ROM_INVALID_RECV_MSG)throw await this.flushInput(),new N(`unsupported command error`)}}throw new N(`invalid response`)}async command(e=null,t=new Uint8Array,n=0,r=!0,i=this.DEFAULT_TIMEOUT){if(e!=null){this.transport.tracing&&this.transport.trace(`command op:0x${e.toString(16).padStart(2,`0`)} data len=${t.length} wait_response=${r?1:0} timeout=${(i/1e3).toFixed(3)} data=${this.transport.hexConvert(t)}`);let a=new Uint8Array(8+t.length);a[0]=0,a[1]=e,a[2]=this._shortToBytearray(t.length)[0],a[3]=this._shortToBytearray(t.length)[1],a[4]=this._intToByteArray(n)[0],a[5]=this._intToByteArray(n)[1],a[6]=this._intToByteArray(n)[2],a[7]=this._intToByteArray(n)[3];let o;for(o=0;o<t.length;o++)a[8+o]=t[o];await this.transport.write(a)}return r?this.readPacket(e,i):[0,new Uint8Array]}async readReg(e,t=this.DEFAULT_TIMEOUT){let n=this._intToByteArray(e);return(await this.command(this.ESP_READ_REG,n,void 0,void 0,t))[0]}async writeReg(e,t,n=4294967295,r=0,i=0){let a=this._appendArray(this._intToByteArray(e),this._intToByteArray(t));a=this._appendArray(a,this._intToByteArray(n)),a=this._appendArray(a,this._intToByteArray(r)),i>0&&(a=this._appendArray(a,this._intToByteArray(this.chip.UART_DATE_REG_ADDR)),a=this._appendArray(a,this._intToByteArray(0)),a=this._appendArray(a,this._intToByteArray(0)),a=this._appendArray(a,this._intToByteArray(i))),await this.checkCommand(`write target memory`,this.ESP_WRITE_REG,a)}async sync(){this.debug(`Sync`);let e=new Uint8Array(36),t;for(e[0]=7,e[1]=7,e[2]=18,e[3]=32,t=0;t<32;t++)e[4+t]=85;try{let t=await this.command(8,e,void 0,void 0,100);this.syncStubDetected=t[0]===0;for(let e=0;e<7;e++)t=await this.command(),this.syncStubDetected=this.syncStubDetected&&t[0]===0;return t}catch(e){throw this.debug(`Sync err `+e),e}}async _connectAttempt(e=`default_reset`,t){this.debug(`_connect_attempt `+e),t&&await t.reset();let n=this.transport.inWaiting(),r=await this.transport.newRead(n>0?n:1,this.DEFAULT_TIMEOUT),i=Array.from(r,e=>String.fromCharCode(e)).join(``).match(/boot:(0x[0-9a-fA-F]+)(.*waiting for download)?/),a=!1,o=``,s=!1;i&&(a=!0,o=i[1],s=!!i[2]);let c=``;for(let e=0;e<5;e++)try{this.debug(`Sync connect attempt ${e}`);let t=await this.sync();return this.debug(t[0].toString()),`success`}catch(e){this.debug(`Error at sync ${e}`),c=e instanceof Error?e.message:typeof e==`string`?e:JSON.stringify(e)}return a&&(c=`Wrong boot mode detected (${o}).\n        This chip needs to be in download mode.`,s&&(c=`Download mode successfully detected, but getting no sync reply:\n           The serial TX path seems to be down.`)),c}constructResetSequence(e){if(e!==`no_reset`){if(e===`usb_reset`||this.transport.getPid()===this.USB_JTAG_SERIAL_PID){if(this.resetConstructors.usbJTAGSerialReset)return this.debug(`using USB JTAG Serial Reset`),[this.resetConstructors.usbJTAGSerialReset(this.transport)]}else if(this.resetConstructors.classicReset)return this.debug(`using Classic Serial Reset`),[this.resetConstructors.classicReset(this.transport,50),this.resetConstructors.classicReset(this.transport,550)]}return[]}async connect(e=`default_reset`,t=7,n=!0){let r;this.info(`Connecting...`,!1),await this.transport.connect(this.romBaudrate,this.serialOptions);let i=this.constructResetSequence(e);for(let n=0;n<t;n++){let t=i.length>0?i[n%i.length]:null;if(r=await this._connectAttempt(e,t),r===`success`)break}if(r!==`success`)throw new N(`Failed to connect with the device`);if(this.debug(`Connect attempt successful.`),this.info(`\n\\r`,!1),n){let e=await this.readReg(this.CHIP_DETECT_MAGIC_REG_ADDR)>>>0;this.debug(`Chip Magic `+e.toString(16));let t=await $a(e);if(this.chip===null)throw new N(`Unexpected CHIP magic value ${e}. Failed to autodetect chip type.`);this.chip=t}}async detectChip(e=`default_reset`){await this.connect(e),this.info(`Detecting chip type... `,!1),this.chip==null?this.info(`unknown!`):this.info(this.chip.CHIP_NAME)}async checkCommand(e=``,t=null,n=new Uint8Array,r=0,i=this.DEFAULT_TIMEOUT){this.debug(`check_command `+e);let a=await this.command(t,n,r,void 0,i);return a[1].length>4?a[1]:a[0]}async memBegin(e,t,n,r){if(this.IS_STUB){let t=r,n=r+e,i=await Xa(this.chip.CHIP_NAME);if(i){let e=[[i.bss_start||i.data_start,i.data_start+i.decodedData.length],[i.text_start,i.text_start+i.decodedText.length]];for(let[r,i]of e)if(t<i&&n>r)throw new N(`Software loader is resident at 0x${r.toString(16).padStart(8,`0`)}-0x${i.toString(16).padStart(8,`0`)}.\n            Can't load binary at overlapping address range 0x${t.toString(16).padStart(8,`0`)}-0x${n.toString(16).padStart(8,`0`)}.\n            Either change binary loading address, or use the no-stub option to disable the software loader.`)}}this.debug(`mem_begin `+e+` `+t+` `+n+` `+r.toString(16));let i=this._appendArray(this._intToByteArray(e),this._intToByteArray(t));i=this._appendArray(i,this._intToByteArray(n)),i=this._appendArray(i,this._intToByteArray(r)),await this.checkCommand(`enter RAM download mode`,this.ESP_MEM_BEGIN,i)}checksum(e,t=this.ESP_CHECKSUM_MAGIC){for(let n=0;n<e.length;n++)t^=e[n];return t}async memBlock(e,t){let n=this._appendArray(this._intToByteArray(e.length),this._intToByteArray(t));n=this._appendArray(n,this._intToByteArray(0)),n=this._appendArray(n,this._intToByteArray(0)),n=this._appendArray(n,e);let r=this.checksum(e);await this.checkCommand(`write to target RAM`,this.ESP_MEM_DATA,n,r)}async memFinish(e){let t=e===0?1:0,n=this._appendArray(this._intToByteArray(t),this._intToByteArray(e));await this.checkCommand(`leave RAM download mode`,this.ESP_MEM_END,n,void 0,200)}async flashSpiAttach(e){let t=this._intToByteArray(e);await this.checkCommand(`configure SPI flash pins`,this.ESP_SPI_ATTACH,t)}timeoutPerMb(e,t){let n=t/1e6*e;return n<3e3?3e3:n}async flashBegin(e,t){let n=Math.floor((e+this.FLASH_WRITE_SIZE-1)/this.FLASH_WRITE_SIZE),r=this.chip.getEraseSize(t,e),i=new Date,a=i.getTime(),o=3e3;this.IS_STUB==0&&(o=this.timeoutPerMb(this.ERASE_REGION_TIMEOUT_PER_MB,e)),this.debug(`flash begin `+r+` `+n+` `+this.FLASH_WRITE_SIZE+` `+t+` `+e);let s=this._appendArray(this._intToByteArray(r),this._intToByteArray(n));s=this._appendArray(s,this._intToByteArray(this.FLASH_WRITE_SIZE)),s=this._appendArray(s,this._intToByteArray(t)),this.IS_STUB==0&&(s=this._appendArray(s,this._intToByteArray(0))),await this.checkCommand(`enter Flash download mode`,this.ESP_FLASH_BEGIN,s,void 0,o);let c=i.getTime();return e!=0&&this.IS_STUB==0&&this.info(`Took `+(c-a)/1e3+`.`+(c-a)%1e3+`s to erase flash block`),n}async flashDeflBegin(e,t,n){let r=Math.floor((t+this.FLASH_WRITE_SIZE-1)/this.FLASH_WRITE_SIZE),i=Math.floor((e+this.FLASH_WRITE_SIZE-1)/this.FLASH_WRITE_SIZE),a=new Date,o=a.getTime(),s,c;this.IS_STUB?(s=e,c=this.DEFAULT_TIMEOUT):(s=i*this.FLASH_WRITE_SIZE,c=this.timeoutPerMb(this.ERASE_REGION_TIMEOUT_PER_MB,s)),this.info(`Compressed `+e+` bytes to `+t+`...`);let l=this._appendArray(this._intToByteArray(s),this._intToByteArray(r));l=this._appendArray(l,this._intToByteArray(this.FLASH_WRITE_SIZE)),l=this._appendArray(l,this._intToByteArray(n)),(this.chip.CHIP_NAME===`ESP32-S2`||this.chip.CHIP_NAME===`ESP32-S3`||this.chip.CHIP_NAME===`ESP32-C3`||this.chip.CHIP_NAME===`ESP32-C2`)&&this.IS_STUB===!1&&(l=this._appendArray(l,this._intToByteArray(0))),await this.checkCommand(`enter compressed flash mode`,this.ESP_FLASH_DEFL_BEGIN,l,void 0,c);let u=a.getTime();return e!=0&&this.IS_STUB===!1&&this.info(`Took `+(u-o)/1e3+`.`+(u-o)%1e3+`s to erase flash block`),r}async flashBlock(e,t,n){let r=this._appendArray(this._intToByteArray(e.length),this._intToByteArray(t));r=this._appendArray(r,this._intToByteArray(0)),r=this._appendArray(r,this._intToByteArray(0)),r=this._appendArray(r,e);let i=this.checksum(e);await this.checkCommand(`write to target Flash after seq `+t,this.ESP_FLASH_DATA,r,i,n)}async flashDeflBlock(e,t,n){let r=this._appendArray(this._intToByteArray(e.length),this._intToByteArray(t));r=this._appendArray(r,this._intToByteArray(0)),r=this._appendArray(r,this._intToByteArray(0)),r=this._appendArray(r,e);let i=this.checksum(e);this.debug(`flash_defl_block `+e[0].toString(16)+` `+e[1].toString(16)),await this.checkCommand(`write compressed data to flash after seq `+t,this.ESP_FLASH_DEFL_DATA,r,i,n)}async flashFinish(e=!1){let t=e?0:1,n=this._intToByteArray(t);await this.checkCommand(`leave Flash mode`,this.ESP_FLASH_END,n)}async flashDeflFinish(e=!1){let t=e?0:1,n=this._intToByteArray(t);await this.checkCommand(`leave compressed flash mode`,this.ESP_FLASH_DEFL_END,n)}async runSpiflashCommand(e,t,n){let r=this.chip.SPI_REG_BASE,i=r+0,a=r+this.chip.SPI_USR_OFFS,o=r+this.chip.SPI_USR1_OFFS,s=r+this.chip.SPI_USR2_OFFS,c=r+this.chip.SPI_W0_OFFS,l;l=this.chip.SPI_MOSI_DLEN_OFFS==null?async(e,t)=>{let n=o,r=e===0?0:e-1,i=(t===0?0:t-1)<<8|r<<17;await this.writeReg(n,i)}:async(e,t)=>{let n=r+this.chip.SPI_MOSI_DLEN_OFFS,i=r+this.chip.SPI_MISO_DLEN_OFFS;e>0&&await this.writeReg(n,e-1),t>0&&await this.writeReg(i,t-1)};let u=1<<18;if(n>32)throw new N(`Reading more than 32 bits back from a SPI flash operation is unsupported`);if(t.length>64)throw new N(`Writing more than 64 bytes of data with one SPI command is unsupported`);let d=t.length*8,f=await this.readReg(a),p=await this.readReg(s),m=-2147483648,h;n>0&&(m|=268435456),d>0&&(m|=134217728),await l(d,n),await this.writeReg(a,m);let g=7<<28|e;if(await this.writeReg(s,g),d==0)await this.writeReg(c,0);else{if(t.length%4!=0){let e=new Uint8Array(t.length%4);t=this._appendArray(t,e)}let e=c;for(h=0;h<t.length-4;h+=4)g=this._byteArrayToInt(t[h],t[h+1],t[h+2],t[h+3]),await this.writeReg(e,g),e+=4}for(await this.writeReg(i,u),h=0;h<10&&(g=await this.readReg(i)&u,g!=0);h++);if(h===10)throw new N(`SPI command did not complete in time`);let _=await this.readReg(c);return await this.writeReg(a,f),await this.writeReg(s,p),_}async readFlashId(){let e=new Uint8Array;return await this.runSpiflashCommand(159,e,24)}async eraseFlash(){this.info(`Erasing flash (this may take a while)...`);let e=new Date,t=e.getTime(),n=await this.checkCommand(`erase flash`,this.ESP_ERASE_FLASH,void 0,void 0,this.CHIP_ERASE_TIMEOUT);e=new Date;let r=e.getTime();return this.info(`Chip erase completed successfully in `+(r-t)/1e3+`s`),n}toHex(e){return Array.prototype.map.call(e,e=>(`00`+e.toString(16)).slice(-2)).join(``)}async flashMd5sum(e,t){let n=this.timeoutPerMb(this.MD5_TIMEOUT_PER_MB,t),r=this._appendArray(this._intToByteArray(e),this._intToByteArray(t));r=this._appendArray(r,this._intToByteArray(0)),r=this._appendArray(r,this._intToByteArray(0));let i=await this.checkCommand(`calculate md5sum`,this.ESP_SPI_FLASH_MD5,r,void 0,n);return i instanceof Uint8Array&&i.length>16&&(i=i.slice(0,16)),this.toHex(i)}async readFlash(e,t,n=null){let r=this._appendArray(this._intToByteArray(e),this._intToByteArray(t));r=this._appendArray(r,this._intToByteArray(4096)),r=this._appendArray(r,this._intToByteArray(1024));let i=await this.checkCommand(`read flash`,this.ESP_READ_FLASH,r);if(i!=0)throw new N(`Failed to read memory: `+i);let a=new Uint8Array;for(;a.length<t;){let{value:e}=await this.transport.read(this.FLASH_READ_TIMEOUT).next();if(e instanceof Uint8Array)e.length>0&&(a=this._appendArray(a,e),await this.transport.write(this._intToByteArray(a.length)),n&&n(e,a.length,t));else throw new N(`Failed to read memory: `+e)}return a}async runStub(){if(this.syncStubDetected)return this.info(`Stub is already running. No upload is necessary.`),this.chip;this.info(`Uploading stub...`);let e=await Xa(this.chip.CHIP_NAME);if(e===void 0)throw this.debug(`Error loading Stub json`),Error(`Error loading Stub json`);let t=[e.decodedText,e.decodedData];for(let n=0;n<t.length;n++)if(t[n]){let r=n===0?e.text_start:e.data_start,i=t[n].length,a=Math.floor((i+this.ESP_RAM_BLOCK-1)/this.ESP_RAM_BLOCK);await this.memBegin(i,a,this.ESP_RAM_BLOCK,r);for(let e=0;e<a;e++){let r=e*this.ESP_RAM_BLOCK,i=r+this.ESP_RAM_BLOCK;await this.memBlock(t[n].slice(r,i),e)}}this.info(`Running stub...`),await this.memFinish(e.entry);let{value:n}=await this.transport.read(this.DEFAULT_TIMEOUT).next(),r=String.fromCharCode(...n);if(r!==`OHAI`)throw new N(`Failed to start stub. Unexpected response ${r}`);return this.info(`Stub running...`),this.IS_STUB=!0,this.chip}async changeBaud(){this.info(`Changing baudrate to `+this.baudrate);let e=this.IS_STUB?this.romBaudrate:0,t=this._appendArray(this._intToByteArray(this.baudrate),this._intToByteArray(e));await this.command(this.ESP_CHANGE_BAUDRATE,t),this.info(`Changed`),await this.transport.disconnect(),await this._sleep(50),await this.transport.connect(this.baudrate,this.serialOptions)}async main(e=`default_reset`){await this.detectChip(e);let t=await this.chip.getChipDescription(this);return this.info(`Chip is `+t),this.info(`Features: `+await this.chip.getChipFeatures(this)),this.info(`Crystal is `+await this.chip.getCrystalFreq(this)+`MHz`),this.info(`MAC: `+await this.chip.readMac(this)),await this.chip.readMac(this),this.chip.postConnect!==void 0&&await this.chip.postConnect(this),await this.runStub(),this.romBaudrate!==this.baudrate&&await this.changeBaud(),t}parseFlashSizeArg(e){if(this.chip.FLASH_SIZES[e]===void 0)throw new N(`Flash size `+e+` is not supported by this chip type. Supported sizes: `+this.chip.FLASH_SIZES);return this.chip.FLASH_SIZES[e]}_updateImageFlashParams(e,t,n,r,i){if(this.debug(`_update_image_flash_params `+n+` `+r+` `+i),e.length<8||t!=this.chip.BOOTLOADER_FLASH_OFFSET)return e;if(n===`keep`&&r===`keep`&&i===`keep`)return this.info(`Not changing the image`),e;let a=parseInt(e[0]),o=parseInt(e[2]),s=parseInt(e[3]);if(a!==this.ESP_IMAGE_MAGIC)return this.info(`Warning: Image file at 0x`+t.toString(16)+` doesn't look like an image file, so not changing any flash settings.`),e;r!==`keep`&&(o={qio:0,qout:1,dio:2,dout:3}[r]);let c=s&15;i!==`keep`&&(c={\"40m\":0,\"26m\":1,\"20m\":2,\"80m\":15}[i]);let l=s&240;n!==`keep`&&(l=this.parseFlashSizeArg(n));let u=o<<8|c+l;return this.info(`Flash params set to `+u.toString(16)),parseInt(e[2])!==o<<8&&(e=e.substring(0,2)+(o<<8).toString()+e.substring(3)),parseInt(e[3])!==c+l&&(e=e.substring(0,3)+(c+l).toString()+e.substring(4)),e}async writeFlash(e){if(this.debug(`EspLoader program`),e.flashSize!==`keep`){let t=this.flashSizeBytes(e.flashSize);for(let n=0;n<e.fileArray.length;n++)if(e.fileArray[n].data.length+e.fileArray[n].address>t)throw new N(`File ${n+1} doesn't fit in the available flash`)}this.IS_STUB===!0&&e.eraseAll===!0&&await this.eraseFlash();let t,n;for(let r=0;r<e.fileArray.length;r++){if(this.debug(`Data Length `+e.fileArray[r].data.length),t=e.fileArray[r].data,this.debug(`Image Length `+t.length),t.length===0){this.debug(`Warning: File is empty`);continue}t=this.ui8ToBstr(Qa(this.bstrToUi8(t),4)),n=e.fileArray[r].address,t=this._updateImageFlashParams(t,n,e.flashSize,e.flashMode,e.flashFreq);let i=null;e.calculateMD5Hash&&(i=e.calculateMD5Hash(t),this.debug(`Image MD5 `+i));let a=t.length,o;if(e.compress){let e=this.bstrToUi8(t);t=this.ui8ToBstr(Ba(e,{level:9})),o=await this.flashDeflBegin(a,t.length,n)}else o=await this.flashBegin(a,n);let s=0,c=0,l=t.length;e.reportProgress&&e.reportProgress(r,0,l);let u=new Date,d=u.getTime(),f=5e3,p=new Va({chunkSize:1}),m=0;for(p.onData=function(e){m+=e.byteLength};t.length>0;){this.debug(`Write loop `+n+` `+s+` `+o),this.info(`Writing at 0x`+(n+m).toString(16)+`... (`+Math.floor(100*(s+1)/o)+`%)`);let i=this.bstrToUi8(t.slice(0,this.FLASH_WRITE_SIZE));if(e.compress){let e=m;p.push(i,!1);let t=m-e,n=3e3;this.timeoutPerMb(this.ERASE_WRITE_TIMEOUT_PER_MB,t)>3e3&&(n=this.timeoutPerMb(this.ERASE_WRITE_TIMEOUT_PER_MB,t)),this.IS_STUB===!1&&(f=n),await this.flashDeflBlock(i,s,f),this.IS_STUB&&(f=n)}else throw new N(`Yet to handle Non Compressed writes`);c+=i.length,t=t.slice(this.FLASH_WRITE_SIZE,t.length),s++,e.reportProgress&&e.reportProgress(r,c,l)}this.IS_STUB&&await this.readReg(this.CHIP_DETECT_MAGIC_REG_ADDR,f),u=new Date;let h=u.getTime()-d;if(e.compress&&this.info(`Wrote `+a+` bytes (`+c+` compressed) at 0x`+n.toString(16)+` in `+h/1e3+` seconds.`),i){let e=await this.flashMd5sum(n,a);if(new String(e).valueOf()!=new String(i).valueOf())throw this.info(`File  md5: `+i),this.info(`Flash md5: `+e),new N(`MD5 of file does not match data in flash!`);this.info(`Hash of data verified.`)}}this.info(`Leaving...`),this.IS_STUB&&(await this.flashBegin(0,0),e.compress?await this.flashDeflFinish():await this.flashFinish())}async flashId(){this.debug(`flash_id`);let e=await this.readFlashId();this.info(`Manufacturer: `+(e&255).toString(16));let t=e>>16&255;this.info(`Device: `+(e>>8&255).toString(16)+t.toString(16)),this.info(`Detected flash size: `+this.DETECTED_FLASH_SIZES[t])}async getFlashSize(){this.debug(`flash_id`);let e=await this.readFlashId()>>16&255;return this.DETECTED_FLASH_SIZES_NUM[e]}async softReset(e){if(!this.IS_STUB){if(e)return;await this.flashBegin(0,0),await this.flashFinish(!1)}else if(this.chip.CHIP_NAME!=`ESP8266`)throw new N(`Soft resetting is currently only supported on ESP8266`);else e?(await this.flashBegin(0,0),await this.flashFinish(!0)):await this.command(this.ESP_RUN_USER_CODE,void 0,void 0,!1)}async after(e=`hard_reset`,t){switch(e){case`hard_reset`:this.resetConstructors.hardReset&&(this.info(`Hard resetting via RTS pin...`),await this.resetConstructors.hardReset(this.transport,t).reset());break;case`soft_reset`:this.info(`Soft resetting...`),await this.softReset(!1);break;case`no_reset_stub`:this.info(`Staying in flasher stub.`);break;default:this.info(`Staying in bootloader.`),this.IS_STUB&&this.softReset(!0);break}}},to=class extends HTMLElement{constructor(){super(...arguments),this.allowInput=!0}logs(){return this._console?.logs()||``}connectedCallback(){if(this._console)return;let e=this.attachShadow({mode:`open`});if(e.innerHTML=`\n      <style>\n        :host, input {\n          background-color: #1c1c1c;\n          color: #ddd;\n          font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier,\n            monospace;\n          line-height: 1.45;\n          display: flex;\n          flex-direction: column;\n        }\n        form {\n          display: flex;\n          align-items: center;\n          padding: 0 8px 0 16px;\n        }\n        input {\n          flex: 1;\n          padding: 4px;\n          margin: 0 8px;\n          border: 0;\n          outline: none;\n        }\n        ${Ye}\n      </style>\n      <div class=\"log\"></div>\n      ${this.allowInput?`<form>\n                >\n                <input autofocus>\n              </form>\n            `:``}\n    `,this._console=new Je(this.shadowRoot.querySelector(`div`)),this.allowInput){let e=this.shadowRoot.querySelector(`input`);this.addEventListener(`click`,()=>{getSelection()?.toString()===``&&e.focus()}),e.addEventListener(`keydown`,e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),this._sendCommand())})}let t=new AbortController,n=this._connect(t.signal);this._cancelConnection=()=>(t.abort(),n)}async _connect(e){this.logger.debug(`Starting console read loop`);try{await this.port.readable.pipeThrough(new TextDecoderStream,{signal:e}).pipeThrough(new TransformStream(new Ze)).pipeThrough(new TransformStream(new Qe)).pipeTo(new WritableStream({write:e=>{this._console.addLine(e.replace(`\\r`,``))}})),e.aborted||(this._console.addLine(``),this._console.addLine(``),this._console.addLine(`Terminal disconnected`))}catch(e){this._console.addLine(``),this._console.addLine(``),this._console.addLine(`Terminal disconnected: ${e}`)}finally{await Xe(100),this.logger.debug(`Finished console read loop`)}}async _sendCommand(){let e=this.shadowRoot.querySelector(`input`),t=e.value,n=new TextEncoder,r=this.port.writable.getWriter();await r.write(n.encode(t+`\\r\n`)),this._console.addLine(`> ${t}\\r\\n`),e.value=``,e.focus();try{r.releaseLock()}catch(e){console.error(`Ignoring release lock error`,e)}}async disconnect(){this._cancelConnection&&=(await this._cancelConnection(),void 0)}async reset(){this.logger.debug(`Triggering reset`);let e=new Ha(this.port);await e.setRTS(!0),await Xe(100),await new Ka(e).reset()}};customElements.define(`ewt-console`,to);function no(e,t=!0){return t&&getComputedStyle(e).getPropertyValue(`direction`).trim()===`rtl`}var ro=O(S(A)),G=class extends ro{get name(){return this.getAttribute(`name`)??``}set name(e){this.setAttribute(`name`,e)}get form(){return this[m].form}get labels(){return this[m].labels}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.flipIconInRtl=!1,this.href=``,this.download=``,this.target=``,this.ariaLabelSelected=``,this.toggle=!1,this.selected=!1,this.type=`submit`,this.value=``,this.flipIcon=no(this,this.flipIconInRtl),this.addEventListener(`click`,this.handleClick.bind(this))}willUpdate(){this.href&&(this.disabled=!1,this.softDisabled=!1)}render(){let e=this.href?Te`div`:Te`button`,{ariaLabel:t,ariaHasPopup:n,ariaExpanded:r}=this,i=t&&this.ariaLabelSelected,a=this.toggle?this.selected:u,o=u;return this.href||(o=i&&this.selected?this.ariaLabelSelected:t),De`<${e}\n        class=\"icon-button ${E(this.getRenderClasses())}\"\n        id=\"button\"\n        aria-label=\"${o||u}\"\n        aria-haspopup=\"${!this.href&&n||u}\"\n        aria-expanded=\"${!this.href&&r||u}\"\n        aria-pressed=\"${a}\"\n        aria-disabled=${!this.href&&this.softDisabled||u}\n        ?disabled=\"${!this.href&&this.disabled}\"\n        @click=\"${this.handleClickOnChild}\">\n        ${this.renderFocusRing()}\n        ${this.renderRipple()}\n        ${this.selected?u:this.renderIcon()}\n        ${this.selected?this.renderSelectedIcon():u}\n        ${this.href?this.renderLink():this.renderTouchTarget()}\n  </${e}>`}renderLink(){let{ariaLabel:e}=this;return x`\n      <a\n        class=\"link\"\n        id=\"link\"\n        href=\"${this.href}\"\n        download=\"${this.download||u}\"\n        target=\"${this.target||u}\"\n        aria-label=\"${e||u}\">\n        ${this.renderTouchTarget()}\n      </a>\n    `}getRenderClasses(){return{\"flip-icon\":this.flipIcon,selected:this.toggle&&this.selected}}renderIcon(){return x`<span class=\"icon\"><slot></slot></span>`}renderSelectedIcon(){return x`<span class=\"icon icon--selected\"\n      ><slot name=\"selected\"><slot></slot></slot\n    ></span>`}renderTouchTarget(){return x`<span class=\"touch\"></span>`}renderFocusRing(){return x`<md-focus-ring\n      part=\"focus-ring\"\n      for=${this.href?`link`:`button`}></md-focus-ring>`}renderRipple(){let e=!this.href&&(this.disabled||this.softDisabled);return x`<md-ripple\n      for=${this.href?`link`:u}\n      ?disabled=\"${e}\"></md-ripple>`}connectedCallback(){this.flipIcon=no(this,this.flipIconInRtl),super.connectedCallback()}handleClick(e){if(!this.href&&this.softDisabled){e.stopImmediatePropagation(),e.preventDefault();return}}async handleClickOnChild(e){await 0,!(!this.toggle||this.disabled||this.softDisabled||e.defaultPrevented)&&(this.selected=!this.selected,this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0})))}};ee(G),G.formAssociated=!0,G.shadowRootOptions={mode:`open`,delegatesFocus:!0},c([l({type:Boolean,reflect:!0})],G.prototype,`disabled`,void 0),c([l({type:Boolean,attribute:`soft-disabled`,reflect:!0})],G.prototype,`softDisabled`,void 0),c([l({type:Boolean,attribute:`flip-icon-in-rtl`})],G.prototype,`flipIconInRtl`,void 0),c([l()],G.prototype,`href`,void 0),c([l()],G.prototype,`download`,void 0),c([l()],G.prototype,`target`,void 0),c([l({attribute:`aria-label-selected`})],G.prototype,`ariaLabelSelected`,void 0),c([l({type:Boolean})],G.prototype,`toggle`,void 0),c([l({type:Boolean,reflect:!0})],G.prototype,`selected`,void 0),c([l()],G.prototype,`type`,void 0),c([l({reflect:!0})],G.prototype,`value`,void 0),c([j()],G.prototype,`flipIcon`,void 0);var io=s`:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);height:var(--_container-height);width:var(--_container-width);justify-content:center}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) max(0px,(48px - var(--_container-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){pointer-events:none}.icon-button{place-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;place-content:center;outline:none;padding:0;position:relative;text-decoration:none;user-select:none;z-index:0;flex:1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.icon ::slotted(*){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size);font-weight:inherit}md-ripple{z-index:-1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.flip-icon .icon{transform:scaleX(-1)}.icon{display:inline-flex}.link{display:grid;height:100%;outline:none;place-items:center;position:absolute;width:100%}.touch{position:absolute;height:max(48px,100%);width:max(48px,100%)}:host([touch-target=none]) .touch{display:none}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1}}\n`,ao=s`:host{--_disabled-icon-color: var(--md-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-icon-button-disabled-icon-opacity, 0.38);--_icon-size: var(--md-icon-button-icon-size, 24px);--_selected-focus-icon-color: var(--md-icon-button-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-icon-color: var(--md-icon-button-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-color: var(--md-icon-button-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-opacity: var(--md-icon-button-selected-hover-state-layer-opacity, 0.08);--_selected-icon-color: var(--md-icon-button-selected-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-icon-color: var(--md-icon-button-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-color: var(--md-icon-button-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-opacity: var(--md-icon-button-selected-pressed-state-layer-opacity, 0.12);--_state-layer-height: var(--md-icon-button-state-layer-height, 40px);--_state-layer-shape: var(--md-icon-button-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));--_state-layer-width: var(--md-icon-button-state-layer-width, 40px);--_focus-icon-color: var(--md-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-icon-color: var(--md-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-icon-button-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-icon-button-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-icon-button-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-icon-button-pressed-state-layer-opacity, 0.12);--_container-shape-start-start: 0;--_container-shape-start-end: 0;--_container-shape-end-end: 0;--_container-shape-end-start: 0;--_container-height: 0;--_container-width: 0;height:var(--_state-layer-height);width:var(--_state-layer-width)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_state-layer-height))/2) max(0px,(48px - var(--_state-layer-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_state-layer-shape);--md-focus-ring-shape-start-end: var(--_state-layer-shape);--md-focus-ring-shape-end-end: var(--_state-layer-shape);--md-focus-ring-shape-end-start: var(--_state-layer-shape)}.standard{background-color:rgba(0,0,0,0);color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.standard:hover{color:var(--_hover-icon-color)}.standard:focus{color:var(--_focus-icon-color)}.standard:active{color:var(--_pressed-icon-color)}.standard:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}md-ripple{border-radius:var(--_state-layer-shape)}.standard:is(:disabled,[aria-disabled=true]){opacity:var(--_disabled-icon-opacity)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_selected-pressed-icon-color)}.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}\n`,oo=class extends G{};oo.styles=[io,ao],customElements.define(`ew-icon-button`,oo);var so=s`:host{--_active-indicator-color: var(--md-filled-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-text-field-active-indicator-height, 1px);--_caret-color: var(--md-filled-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_container-color: var(--md-filled-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_disabled-active-indicator-color: var(--md-filled-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-indicator-height: var(--md-filled-text-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-text-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-text-field-disabled-container-opacity, 0.04);--_disabled-input-text-color: var(--md-filled-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-filled-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-filled-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filled-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-filled-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-filled-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filled-text-field-disabled-trailing-icon-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-active-indicator-color: var(--md-filled-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-caret-color: var(--md-filled-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-filled-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-filled-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-filled-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-filled-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-input-text-color: var(--md-filled-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-filled-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-filled-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-state-layer-opacity: var(--md-filled-text-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-filled-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-filled-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-filled-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-filled-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-filled-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-text-field-focus-active-indicator-height, 3px);--_focus-input-text-color: var(--md-filled-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-filled-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-filled-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-filled-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-active-indicator-height: var(--md-filled-text-field-hover-active-indicator-height, 1px);--_hover-input-text-color: var(--md-filled-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-filled-text-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-icon-color: var(--md-filled-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-filled-text-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filled-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-filled-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-filled-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-filled-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-filled-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-filled-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-filled-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-filled-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-filled-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-filled-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-filled-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-filled-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-filled-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-filled-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-filled-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-filled-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-filled-text-field-leading-icon-size, 24px);--_supporting-text-color: var(--md-filled-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-filled-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-filled-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-filled-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-filled-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-filled-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-filled-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-filled-text-field-container-shape-start-start, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-filled-text-field-container-shape-start-end, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-filled-text-field-container-shape-end-end, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-filled-text-field-container-shape-end-start, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_icon-input-space: var(--md-filled-text-field-icon-input-space, 16px);--_leading-space: var(--md-filled-text-field-leading-space, 16px);--_trailing-space: var(--md-filled-text-field-trailing-space, 16px);--_top-space: var(--md-filled-text-field-top-space, 16px);--_bottom-space: var(--md-filled-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-filled-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-filled-text-field-input-text-suffix-leading-space, 2px);--_with-label-top-space: var(--md-filled-text-field-with-label-top-space, 8px);--_with-label-bottom-space: var(--md-filled-text-field-with-label-bottom-space, 8px);--_focus-caret-color: var(--md-filled-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_with-leading-icon-leading-space: var(--md-filled-text-field-with-leading-icon-leading-space, 12px);--_with-trailing-icon-trailing-space: var(--md-filled-text-field-with-trailing-icon-trailing-space, 12px);--md-filled-field-active-indicator-color: var(--_active-indicator-color);--md-filled-field-active-indicator-height: var(--_active-indicator-height);--md-filled-field-bottom-space: var(--_bottom-space);--md-filled-field-container-color: var(--_container-color);--md-filled-field-container-shape-end-end: var(--_container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_container-shape-start-start);--md-filled-field-content-color: var(--_input-text-color);--md-filled-field-content-font: var(--_input-text-font);--md-filled-field-content-line-height: var(--_input-text-line-height);--md-filled-field-content-size: var(--_input-text-size);--md-filled-field-content-space: var(--_icon-input-space);--md-filled-field-content-weight: var(--_input-text-weight);--md-filled-field-disabled-active-indicator-color: var(--_disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_error-active-indicator-color);--md-filled-field-error-content-color: var(--_error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_error-label-text-color);--md-filled-field-error-leading-content-color: var(--_error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_label-text-color);--md-filled-field-label-text-font: var(--_label-text-font);--md-filled-field-label-text-line-height: var(--_label-text-line-height);--md-filled-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_label-text-populated-size);--md-filled-field-label-text-size: var(--_label-text-size);--md-filled-field-label-text-weight: var(--_label-text-weight);--md-filled-field-leading-content-color: var(--_leading-icon-color);--md-filled-field-leading-space: var(--_leading-space);--md-filled-field-supporting-text-color: var(--_supporting-text-color);--md-filled-field-supporting-text-font: var(--_supporting-text-font);--md-filled-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-filled-field-supporting-text-size: var(--_supporting-text-size);--md-filled-field-supporting-text-weight: var(--_supporting-text-weight);--md-filled-field-top-space: var(--_top-space);--md-filled-field-trailing-content-color: var(--_trailing-icon-color);--md-filled-field-trailing-space: var(--_trailing-space);--md-filled-field-with-label-bottom-space: var(--_with-label-bottom-space);--md-filled-field-with-label-top-space: var(--_with-label-top-space);--md-filled-field-with-leading-content-leading-space: var(--_with-leading-icon-leading-space);--md-filled-field-with-trailing-content-trailing-space: var(--_with-trailing-icon-trailing-space)}\n`,K=class extends A{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label=``,this.noAsterisk=!1,this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText=``,this.errorText=``,this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){let e=this.count??-1,t=this.max??-1;return e<0||t<=0?``:`${e} / ${t}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has(`disabled`)&&e.get(`disabled`)!==void 0&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set(`focused`,!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get(`focused`),wasPopulated:e.get(`populated`)}),super.update(e)}render(){let e=this.renderLabel(!0),t=this.renderLabel(!1),n=this.renderOutline?.(e);return x`\n      <div class=\"field ${E({disabled:this.disabled,\"disable-transitions\":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,\"with-start\":this.hasStart,\"with-end\":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,\"no-label\":!this.label})}\">\n        <div class=\"container-overflow\">\n          ${this.renderBackground?.()}\n          <slot name=\"container\"></slot>\n          ${this.renderStateLayer?.()} ${this.renderIndicator?.()} ${n}\n          <div class=\"container\">\n            <div class=\"start\">\n              <slot name=\"start\"></slot>\n            </div>\n            <div class=\"middle\">\n              <div class=\"label-wrapper\">\n                ${t} ${n?u:e}\n              </div>\n              <div class=\"content\">\n                <slot></slot>\n              </div>\n            </div>\n            <div class=\"end\">\n              <slot name=\"end\"></slot>\n            </div>\n          </div>\n        </div>\n        ${this.renderSupportingText()}\n      </div>\n    `}updated(e){(e.has(`supportingText`)||e.has(`errorText`)||e.has(`count`)||e.has(`max`))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame(()=>{this.refreshErrorAlert=!1}),this.disableTransitions&&requestAnimationFrame(()=>{this.disableTransitions=!1})}renderSupportingText(){let{supportingOrErrorText:e,counterText:t}=this;if(!e&&!t)return u;let n=x`<span>${e}</span>`,r=t?x`<span class=\"counter\">${t}</span>`:u;return x`\n      <div class=\"supporting-text\" role=${this.error&&this.errorText&&!this.refreshErrorAlert?`alert`:u}>${n}${r}</div>\n      <slot\n        name=\"aria-describedby\"\n        @slotchange=${this.updateSlottedAriaDescribedBy}></slot>\n    `}updateSlottedAriaDescribedBy(){for(let e of this.slottedAriaDescribedBy)o(x`${this.supportingOrErrorText} ${this.counterText}`,e),e.setAttribute(`hidden`,``)}renderLabel(e){if(!this.label)return u;let t;t=e?this.focused||this.populated||this.isAnimating:!this.focused&&!this.populated&&!this.isAnimating;let n={hidden:!t,floating:e,resting:!e},r=`${this.label}${this.required&&!this.noAsterisk?`*`:``}`;return x`\n      <span class=\"label ${E(n)}\" aria-hidden=${!t}\n        >${r}</span\n      >\n    `}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){this.label&&(e??=this.focused,t??=this.populated,(e||t)!==(this.focused||this.populated)&&(this.isAnimating=!0,this.labelAnimation?.cancel(),this.labelAnimation=this.floatingLabelEl?.animate(this.getLabelKeyframes(),{duration:150,easing:h.STANDARD}),this.labelAnimation?.addEventListener(`finish`,()=>{this.isAnimating=!1})))}getLabelKeyframes(){let{floatingLabelEl:e,restingLabelEl:t}=this;if(!e||!t)return[];let{x:n,y:r,height:i}=e.getBoundingClientRect(),{x:a,y:o,height:s}=t.getBoundingClientRect(),c=e.scrollWidth,l=t.scrollWidth,u=l/c,d=`translateX(${a-n}px) translateY(${o-r+Math.round((s-i*u)/2)}px) scale(${u})`,f=`translateX(0) translateY(0) scale(1)`,p=t.clientWidth,m=l>p?`${p/u}px`:``;return this.focused||this.populated?[{transform:d,width:m},{transform:f,width:m}]:[{transform:f,width:m},{transform:d,width:m}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}};c([l({type:Boolean})],K.prototype,`disabled`,void 0),c([l({type:Boolean})],K.prototype,`error`,void 0),c([l({type:Boolean})],K.prototype,`focused`,void 0),c([l()],K.prototype,`label`,void 0),c([l({type:Boolean,attribute:`no-asterisk`})],K.prototype,`noAsterisk`,void 0),c([l({type:Boolean})],K.prototype,`populated`,void 0),c([l({type:Boolean})],K.prototype,`required`,void 0),c([l({type:Boolean})],K.prototype,`resizable`,void 0),c([l({attribute:`supporting-text`})],K.prototype,`supportingText`,void 0),c([l({attribute:`error-text`})],K.prototype,`errorText`,void 0),c([l({type:Number})],K.prototype,`count`,void 0),c([l({type:Number})],K.prototype,`max`,void 0),c([l({type:Boolean,attribute:`has-start`})],K.prototype,`hasStart`,void 0),c([l({type:Boolean,attribute:`has-end`})],K.prototype,`hasEnd`,void 0),c([k({slot:`aria-describedby`})],K.prototype,`slottedAriaDescribedBy`,void 0),c([j()],K.prototype,`isAnimating`,void 0),c([j()],K.prototype,`refreshErrorAlert`,void 0),c([j()],K.prototype,`disableTransitions`,void 0),c([p(`.label.floating`)],K.prototype,`floatingLabelEl`,void 0),c([p(`.label.resting`)],K.prototype,`restingLabelEl`,void 0),c([p(`.container`)],K.prototype,`containerEl`,void 0);var co=class extends K{renderBackground(){return x` <div class=\"background\"></div> `}renderStateLayer(){return x` <div class=\"state-layer\"></div> `}renderIndicator(){return x`<div class=\"active-indicator\"></div>`}},lo=s`@layer styles{:host{--_active-indicator-color: var(--md-filled-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-field-active-indicator-height, 1px);--_bottom-space: var(--md-filled-field-bottom-space, 16px);--_container-color: var(--md-filled-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_content-color: var(--md-filled-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-filled-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-filled-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-filled-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-space: var(--md-filled-field-content-space, 16px);--_content-weight: var(--md-filled-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-active-indicator-color: var(--md-filled-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-indicator-height: var(--md-filled-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-field-disabled-container-opacity, 0.04);--_disabled-content-color: var(--md-filled-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-filled-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-filled-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-filled-field-disabled-leading-content-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-filled-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-filled-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-filled-field-disabled-trailing-content-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-content-color: var(--md-filled-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-active-indicator-color: var(--md-filled-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-content-color: var(--md-filled-field-error-focus-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-label-text-color: var(--md-filled-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-filled-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-filled-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-content-color: var(--md-filled-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-filled-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-filled-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-state-layer-opacity: var(--md-filled-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-filled-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-filled-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-filled-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-filled-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-field-focus-active-indicator-height, 3px);--_focus-content-color: var(--md-filled-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-filled-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-filled-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-filled-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-active-indicator-height: var(--md-filled-field-hover-active-indicator-height, 1px);--_hover-content-color: var(--md-filled-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-filled-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-content-color: var(--md-filled-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-filled-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-filled-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-filled-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-filled-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-filled-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-filled-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-filled-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-filled-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-filled-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-filled-field-leading-space, 16px);--_supporting-text-color: var(--md-filled-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-filled-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-filled-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-filled-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-filled-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-filled-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-filled-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-filled-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-filled-field-top-space, 16px);--_trailing-content-color: var(--md-filled-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-filled-field-trailing-space, 16px);--_with-label-bottom-space: var(--md-filled-field-with-label-bottom-space, 8px);--_with-label-top-space: var(--md-filled-field-with-label-top-space, 8px);--_with-leading-content-leading-space: var(--md-filled-field-with-leading-content-leading-space, 12px);--_with-trailing-content-trailing-space: var(--md-filled-field-with-trailing-content-trailing-space, 12px);--_container-shape-start-start: var(--md-filled-field-container-shape-start-start, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-filled-field-container-shape-start-end, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-filled-field-container-shape-end-end, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-filled-field-container-shape-end-start, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-none, 0px)))}.background,.state-layer{border-radius:inherit;inset:0;pointer-events:none;position:absolute}.background{background:var(--_container-color)}.state-layer{visibility:hidden}.field:not(.disabled):hover .state-layer{visibility:visible}.label.floating{position:absolute;top:var(--_with-label-top-space)}.field:not(.with-start) .label-wrapper{margin-inline-start:var(--_leading-space)}.field:not(.with-end) .label-wrapper{margin-inline-end:var(--_trailing-space)}.active-indicator{inset:auto 0 0 0;pointer-events:none;position:absolute;width:100%;z-index:1}.active-indicator::before,.active-indicator::after{border-bottom:var(--_active-indicator-height) solid var(--_active-indicator-color);inset:auto 0 0 0;content:\"\";position:absolute;width:100%}.active-indicator::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .active-indicator::after{opacity:1}.field:not(.with-start) .content ::slotted(*){padding-inline-start:var(--_leading-space)}.field:not(.with-end) .content ::slotted(*){padding-inline-end:var(--_trailing-space)}.field:not(.no-label) .content ::slotted(:not(textarea)){padding-bottom:var(--_with-label-bottom-space);padding-top:calc(var(--_with-label-top-space) + var(--_label-text-populated-line-height))}.field:not(.no-label) .content ::slotted(textarea){margin-bottom:var(--_with-label-bottom-space);margin-top:calc(var(--_with-label-top-space) + var(--_label-text-populated-line-height))}:hover .active-indicator::before{border-bottom-color:var(--_hover-active-indicator-color);border-bottom-width:var(--_hover-active-indicator-height)}.active-indicator::after{border-bottom-color:var(--_focus-active-indicator-color);border-bottom-width:var(--_focus-active-indicator-height)}:hover .state-layer{background:var(--_hover-state-layer-color);opacity:var(--_hover-state-layer-opacity)}.disabled .active-indicator::before{border-bottom-color:var(--_disabled-active-indicator-color);border-bottom-width:var(--_disabled-active-indicator-height);opacity:var(--_disabled-active-indicator-opacity)}.disabled .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.error .active-indicator::before{border-bottom-color:var(--_error-active-indicator-color)}.error:hover .active-indicator::before{border-bottom-color:var(--_error-hover-active-indicator-color)}.error:hover .state-layer{background:var(--_error-hover-state-layer-color);opacity:var(--_error-hover-state-layer-opacity)}.error .active-indicator::after{border-bottom-color:var(--_error-focus-active-indicator-color)}.resizable .container{bottom:var(--_focus-active-indicator-height);clip-path:inset(var(--_focus-active-indicator-height) 0 0 0)}.resizable .container>*{top:var(--_focus-active-indicator-height)}}@layer hcm{@media(forced-colors: active){.disabled .active-indicator::before{border-color:GrayText;opacity:1}}}\n`,uo=s`:host{display:inline-flex;resize:both}.field{display:flex;flex:1;flex-direction:column;writing-mode:horizontal-tb;max-width:100%}.container-overflow{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:flex;height:100%;position:relative}.container{align-items:center;border-radius:inherit;display:flex;flex:1;max-height:100%;min-height:100%;min-width:min-content;position:relative}.field,.container-overflow{resize:inherit}.resizable:not(.disabled) .container{resize:inherit;overflow:hidden}.disabled{pointer-events:none}slot[name=container]{border-radius:inherit}slot[name=container]::slotted(*){border-radius:inherit;inset:0;pointer-events:none;position:absolute}@layer styles{.start,.middle,.end{display:flex;box-sizing:border-box;height:100%;position:relative}.start{color:var(--_leading-content-color)}.end{color:var(--_trailing-content-color)}.start,.end{align-items:center;justify-content:center}.with-start .start{margin-inline:var(--_with-leading-content-leading-space) var(--_content-space)}.with-end .end{margin-inline:var(--_content-space) var(--_with-trailing-content-trailing-space)}.middle{align-items:stretch;align-self:baseline;flex:1}.content{color:var(--_content-color);display:flex;flex:1;opacity:0;transition:opacity 83ms cubic-bezier(0.2, 0, 0, 1)}.no-label .content,.focused .content,.populated .content{opacity:1;transition-delay:67ms}:is(.disabled,.disable-transitions) .content{transition:none}.content ::slotted(*){all:unset;color:currentColor;font-family:var(--_content-font);font-size:var(--_content-size);line-height:var(--_content-line-height);font-weight:var(--_content-weight);width:100%;overflow-wrap:revert;white-space:revert}.content ::slotted(:not(textarea)){padding-top:var(--_top-space);padding-bottom:var(--_bottom-space)}.content ::slotted(textarea){margin-top:var(--_top-space);margin-bottom:var(--_bottom-space)}:hover .content{color:var(--_hover-content-color)}:hover .start{color:var(--_hover-leading-content-color)}:hover .end{color:var(--_hover-trailing-content-color)}.focused .content{color:var(--_focus-content-color)}.focused .start{color:var(--_focus-leading-content-color)}.focused .end{color:var(--_focus-trailing-content-color)}.disabled .content{color:var(--_disabled-content-color)}.disabled.no-label .content,.disabled.focused .content,.disabled.populated .content{opacity:var(--_disabled-content-opacity)}.disabled .start{color:var(--_disabled-leading-content-color);opacity:var(--_disabled-leading-content-opacity)}.disabled .end{color:var(--_disabled-trailing-content-color);opacity:var(--_disabled-trailing-content-opacity)}.error .content{color:var(--_error-content-color)}.error .start{color:var(--_error-leading-content-color)}.error .end{color:var(--_error-trailing-content-color)}.error:hover .content{color:var(--_error-hover-content-color)}.error:hover .start{color:var(--_error-hover-leading-content-color)}.error:hover .end{color:var(--_error-hover-trailing-content-color)}.error.focused .content{color:var(--_error-focus-content-color)}.error.focused .start{color:var(--_error-focus-leading-content-color)}.error.focused .end{color:var(--_error-focus-trailing-content-color)}}@layer hcm{@media(forced-colors: active){.disabled :is(.start,.content,.end){color:GrayText;opacity:1}}}@layer styles{.label{box-sizing:border-box;color:var(--_label-text-color);overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;z-index:1;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);width:min-content}.label-wrapper{inset:0;pointer-events:none;position:absolute}.label.resting{position:absolute;top:var(--_top-space)}.label.floating{font-size:var(--_label-text-populated-size);line-height:var(--_label-text-populated-line-height);transform-origin:top left}.label.hidden{opacity:0}.no-label .label{display:none}.label-wrapper{inset:0;position:absolute;text-align:initial}:hover .label{color:var(--_hover-label-text-color)}.focused .label{color:var(--_focus-label-text-color)}.disabled .label{color:var(--_disabled-label-text-color)}.disabled .label:not(.hidden){opacity:var(--_disabled-label-text-opacity)}.error .label{color:var(--_error-label-text-color)}.error:hover .label{color:var(--_error-hover-label-text-color)}.error.focused .label{color:var(--_error-focus-label-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .label:not(.hidden){color:GrayText;opacity:1}}}@layer styles{.supporting-text{color:var(--_supporting-text-color);display:flex;font-family:var(--_supporting-text-font);font-size:var(--_supporting-text-size);line-height:var(--_supporting-text-line-height);font-weight:var(--_supporting-text-weight);gap:16px;justify-content:space-between;padding-inline-start:var(--_supporting-text-leading-space);padding-inline-end:var(--_supporting-text-trailing-space);padding-top:var(--_supporting-text-top-space)}.supporting-text :nth-child(2){flex-shrink:0}:hover .supporting-text{color:var(--_hover-supporting-text-color)}.focus .supporting-text{color:var(--_focus-supporting-text-color)}.disabled .supporting-text{color:var(--_disabled-supporting-text-color);opacity:var(--_disabled-supporting-text-opacity)}.error .supporting-text{color:var(--_error-supporting-text-color)}.error:hover .supporting-text{color:var(--_error-hover-supporting-text-color)}.error.focus .supporting-text{color:var(--_error-focus-supporting-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .supporting-text{color:GrayText;opacity:1}}}\n`,fo=class extends co{};fo.styles=[uo,lo],fo=c([i(`md-filled-field`)],fo);var{I:po}=r,mo=e=>e.strings===void 0,ho={},go=(e,t=ho)=>e._$AH=t,_o=C(class extends v{constructor(e){if(super(e),e.type!==_.PROPERTY&&e.type!==_.ATTRIBUTE&&e.type!==_.BOOLEAN_ATTRIBUTE)throw Error(\"The `live` directive is not allowed on child or event bindings\");if(!mo(e))throw Error(\"`live` bindings can only contain a single expression\")}render(e){return e}update(e,[t]){if(t===a||t===u)return t;let n=e.element,r=e.name;if(e.type===_.PROPERTY){if(t===n[r])return a}else if(e.type===_.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return a}else if(e.type===_.ATTRIBUTE&&n.getAttribute(r)===t+``)return a;return go(e),t}}),vo=`important`,yo=` !`+vo,bo=C(class extends v{constructor(e){if(super(e),e.type!==_.ATTRIBUTE||e.name!==`style`||e.strings?.length>2)throw Error(\"The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.\")}render(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r==null?t:t+`${n=n.includes(`-`)?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,`-$&`).toLowerCase()}:${r};`},``)}update(e,[t]){let{style:n}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let e of this.ft)t[e]??(this.ft.delete(e),e.includes(`-`)?n.removeProperty(e):n[e]=null);for(let e in t){let r=t[e];if(r!=null){this.ft.add(e);let t=typeof r==`string`&&r.endsWith(yo);e.includes(`-`)||t?n.setProperty(e,t?r.slice(0,-11):r,t?vo:``):n[e]=r}}return a}}),xo={fromAttribute(e){return e??``},toAttribute(e){return e||null}},So=Symbol(`onReportValidity`),Co=Symbol(`privateCleanupFormListeners`),wo=Symbol(`privateDoNotReportInvalid`),To=Symbol(`privateIsSelfReportingValidity`),Eo=Symbol(`privateCallOnReportValidity`);function Do(e){var t,n,r;class i extends e{constructor(...e){super(...e),this[t]=new AbortController,this[n]=!1,this[r]=!1,this.addEventListener(`invalid`,e=>{this[wo]||!e.isTrusted||this.addEventListener(`invalid`,()=>{this[Eo](e)},{once:!0})},{capture:!0})}checkValidity(){this[wo]=!0;let e=super.checkValidity();return this[wo]=!1,e}reportValidity(){this[To]=!0;let e=super.reportValidity();return e&&this[Eo](null),this[To]=!1,e}[(t=Co,n=wo,r=To,Eo)](e){let t=e?.defaultPrevented;t||(this[So](e),!t&&e?.defaultPrevented&&(this[To]||jo(this[m].form,this))&&this.focus())}[So](e){throw Error(`Implement [onReportValidity]`)}formAssociatedCallback(e){super.formAssociatedCallback&&super.formAssociatedCallback(e),this[Co].abort(),e&&(this[Co]=new AbortController,Oo(this,e,()=>{this[Eo](null)},this[Co].signal))}}return i}function Oo(e,t,n,r){let i=Ao(t),a=!1,o,s=!1;i.addEventListener(`before`,()=>{s=!0,o=new AbortController,a=!1,e.addEventListener(`invalid`,()=>{a=!0},{signal:o.signal})},{signal:r}),i.addEventListener(`after`,()=>{s=!1,o?.abort(),!a&&n()},{signal:r}),t.addEventListener(`submit`,()=>{s||n()},{signal:r})}var ko=new WeakMap;function Ao(e){if(!ko.has(e)){let t=new EventTarget;ko.set(e,t);for(let n of[`reportValidity`,`requestSubmit`]){let r=e[n];e[n]=function(){t.dispatchEvent(new Event(`before`));let e=Reflect.apply(r,this,arguments);return t.dispatchEvent(new Event(`after`)),e}}}return ko.get(e)}function jo(e,t){if(!e)return!0;let n;for(let t of e.elements)if(t.matches(`:invalid`)){n=t;break}return n===t}var Mo=class extends He{computeValidity({state:e,renderedControl:t}){let n=t;No(e)&&!n?(n=this.inputControl||document.createElement(`input`),this.inputControl=n):n||(n=this.textAreaControl||document.createElement(`textarea`),this.textAreaControl=n);let r=No(e)?n:null;if(r&&(r.type=e.type),n.value!==e.value&&(n.value=e.value),n.required=e.required,r){let t=e;t.pattern?r.pattern=t.pattern:r.removeAttribute(`pattern`),t.min?r.min=t.min:r.removeAttribute(`min`),t.max?r.max=t.max:r.removeAttribute(`max`),t.step?r.step=t.step:r.removeAttribute(`step`)}return(e.minLength??-1)>-1?n.setAttribute(`minlength`,String(e.minLength)):n.removeAttribute(`minlength`),(e.maxLength??-1)>-1?n.setAttribute(`maxlength`,String(e.maxLength)):n.removeAttribute(`maxlength`),{validity:n.validity,validationMessage:n.validationMessage}}equals({state:e},{state:t}){let n=e.type===t.type&&e.value===t.value&&e.required===t.required&&e.minLength===t.minLength&&e.maxLength===t.maxLength;return!No(e)||!No(t)?n:n&&e.pattern===t.pattern&&e.min===t.min&&e.max===t.max&&e.step===t.step}copy({state:e}){return{state:No(e)?this.copyInput(e):this.copyTextArea(e),renderedControl:null}}copyInput(e){let{type:t,pattern:n,min:r,max:i,step:a}=e;return{...this.copySharedState(e),type:t,pattern:n,min:r,max:i,step:a}}copyTextArea(e){return{...this.copySharedState(e),type:e.type}}copySharedState({value:e,required:t,minLength:n,maxLength:r}){return{value:e,required:t,minLength:n,maxLength:r}}};function No(e){return e.type!==`textarea`}var Po=O(Do(Re(Ve(S(A))))),q=class extends Po{constructor(){super(...arguments),this.error=!1,this.errorText=``,this.label=``,this.noAsterisk=!1,this.required=!1,this.value=``,this.prefixText=``,this.suffixText=``,this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText=``,this.textDirection=``,this.rows=2,this.cols=20,this.inputMode=``,this.max=``,this.maxLength=-1,this.min=``,this.minLength=-1,this.noSpinner=!1,this.pattern=``,this.placeholder=``,this.readOnly=!1,this.multiple=!1,this.step=``,this.type=`text`,this.autocomplete=``,this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=``}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get valueAsNumber(){let e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){let t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){let e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){let t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,n){this.getInputOrTextarea().setSelectionRange(e,t,n)}showPicker(){let e=this.getInput();e&&e.showPicker()}stepDown(e){let t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){let t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute(`value`)??``,this.nativeError=!1,this.nativeErrorText=``}attributeChangedCallback(e,t,n){e===`value`&&this.dirty||super.attributeChangedCallback(e,t,n)}render(){return x`\n      <span class=\"text-field ${E({disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:this.type===`textarea`,\"no-spinner\":this.noSpinner})}\">\n        ${this.renderField()}\n      </span>\n    `}updated(e){let t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t)}renderField(){return De`<${this.fieldTag}\n      class=\"field\"\n      count=${this.value.length}\n      ?disabled=${this.disabled}\n      ?error=${this.hasError}\n      error-text=${this.getErrorText()}\n      ?focused=${this.focused}\n      ?has-end=${this.hasTrailingIcon}\n      ?has-start=${this.hasLeadingIcon}\n      label=${this.label}\n      ?no-asterisk=${this.noAsterisk}\n      max=${this.maxLength}\n      ?populated=${!!this.value}\n      ?required=${this.required}\n      ?resizable=${this.type===`textarea`}\n      supporting-text=${this.supportingText}\n    >\n      ${this.renderLeadingIcon()}\n      ${this.renderInputOrTextarea()}\n      ${this.renderTrailingIcon()}\n      <div id=\"description\" slot=\"aria-describedby\"></div>\n      <slot name=\"container\" slot=\"container\"></slot>\n    </${this.fieldTag}>`}renderLeadingIcon(){return x`\n      <span class=\"icon leading\" slot=\"start\">\n        <slot name=\"leading-icon\" @slotchange=${this.handleIconChange}></slot>\n      </span>\n    `}renderTrailingIcon(){return x`\n      <span class=\"icon trailing\" slot=\"end\">\n        <slot name=\"trailing-icon\" @slotchange=${this.handleIconChange}></slot>\n      </span>\n    `}renderInputOrTextarea(){let e={direction:this.textDirection},t=this.ariaLabel||this.label||u,n=this.autocomplete,r=(this.maxLength??-1)>-1,i=(this.minLength??-1)>-1;if(this.type===`textarea`)return x`\n        <textarea\n          class=\"input\"\n          style=${bo(e)}\n          aria-describedby=\"description\"\n          aria-invalid=${this.hasError}\n          aria-label=${t}\n          autocomplete=${n||u}\n          name=${this.name||u}\n          ?disabled=${this.disabled}\n          maxlength=${r?this.maxLength:u}\n          minlength=${i?this.minLength:u}\n          placeholder=${this.placeholder||u}\n          ?readonly=${this.readOnly}\n          ?required=${this.required}\n          rows=${this.rows}\n          cols=${this.cols}\n          .value=${_o(this.value)}\n          @change=${this.redispatchEvent}\n          @focus=${this.handleFocusChange}\n          @blur=${this.handleFocusChange}\n          @input=${this.handleInput}\n          @select=${this.redispatchEvent}></textarea>\n      `;let a=this.renderPrefix(),o=this.renderSuffix(),s=this.inputMode;return x`\n      <div class=\"input-wrapper\">\n        ${a}\n        <input\n          class=\"input\"\n          style=${bo(e)}\n          aria-describedby=\"description\"\n          aria-invalid=${this.hasError}\n          aria-label=${t}\n          autocomplete=${n||u}\n          name=${this.name||u}\n          ?disabled=${this.disabled}\n          inputmode=${s||u}\n          max=${this.max||u}\n          maxlength=${r?this.maxLength:u}\n          min=${this.min||u}\n          minlength=${i?this.minLength:u}\n          pattern=${this.pattern||u}\n          placeholder=${this.placeholder||u}\n          ?readonly=${this.readOnly}\n          ?required=${this.required}\n          ?multiple=${this.multiple}\n          step=${this.step||u}\n          type=${this.type}\n          .value=${_o(this.value)}\n          @change=${this.redispatchEvent}\n          @focus=${this.handleFocusChange}\n          @blur=${this.handleFocusChange}\n          @input=${this.handleInput}\n          @select=${this.redispatchEvent} />\n        ${o}\n      </div>\n    `}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?x`<span class=\"${E({suffix:t,prefix:!t})}\">${e}</span>`:u}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){this.focused=this.inputOrTextarea?.matches(`:focus`)??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){w(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type===`textarea`?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[ze](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[Ne](){return new Mo(()=>({state:this,renderedControl:this.inputOrTextarea}))}[Pe](){return this.inputOrTextarea}[So](e){e?.preventDefault();let t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}};q.shadowRootOptions={...A.shadowRootOptions,delegatesFocus:!0},c([l({type:Boolean,reflect:!0})],q.prototype,`error`,void 0),c([l({attribute:`error-text`})],q.prototype,`errorText`,void 0),c([l()],q.prototype,`label`,void 0),c([l({type:Boolean,attribute:`no-asterisk`})],q.prototype,`noAsterisk`,void 0),c([l({type:Boolean,reflect:!0})],q.prototype,`required`,void 0),c([l()],q.prototype,`value`,void 0),c([l({attribute:`prefix-text`})],q.prototype,`prefixText`,void 0),c([l({attribute:`suffix-text`})],q.prototype,`suffixText`,void 0),c([l({type:Boolean,attribute:`has-leading-icon`})],q.prototype,`hasLeadingIcon`,void 0),c([l({type:Boolean,attribute:`has-trailing-icon`})],q.prototype,`hasTrailingIcon`,void 0),c([l({attribute:`supporting-text`})],q.prototype,`supportingText`,void 0),c([l({attribute:`text-direction`})],q.prototype,`textDirection`,void 0),c([l({type:Number})],q.prototype,`rows`,void 0),c([l({type:Number})],q.prototype,`cols`,void 0),c([l({reflect:!0})],q.prototype,`inputMode`,void 0),c([l()],q.prototype,`max`,void 0),c([l({type:Number})],q.prototype,`maxLength`,void 0),c([l()],q.prototype,`min`,void 0),c([l({type:Number})],q.prototype,`minLength`,void 0),c([l({type:Boolean,attribute:`no-spinner`})],q.prototype,`noSpinner`,void 0),c([l()],q.prototype,`pattern`,void 0),c([l({reflect:!0,converter:xo})],q.prototype,`placeholder`,void 0),c([l({type:Boolean,reflect:!0})],q.prototype,`readOnly`,void 0),c([l({type:Boolean,reflect:!0})],q.prototype,`multiple`,void 0),c([l()],q.prototype,`step`,void 0),c([l({reflect:!0})],q.prototype,`type`,void 0),c([l({reflect:!0})],q.prototype,`autocomplete`,void 0),c([j()],q.prototype,`dirty`,void 0),c([j()],q.prototype,`focused`,void 0),c([j()],q.prototype,`nativeError`,void 0),c([j()],q.prototype,`nativeErrorText`,void 0),c([p(`.input`)],q.prototype,`inputOrTextarea`,void 0),c([p(`.field`)],q.prototype,`field`,void 0),c([k({slot:`leading-icon`})],q.prototype,`leadingIcons`,void 0),c([k({slot:`trailing-icon`})],q.prototype,`trailingIcons`,void 0);var Fo=class extends q{constructor(){super(...arguments),this.fieldTag=Te`md-filled-field`}},Io=s`:host{display:inline-flex;outline:none;resize:both;text-align:start;-webkit-tap-highlight-color:rgba(0,0,0,0)}.text-field,.field{width:100%}.text-field{display:inline-flex}.field{cursor:text}.disabled .field{cursor:default}.text-field,.textarea .field{resize:inherit}slot[name=container]{border-radius:inherit}.icon{color:currentColor;display:flex;align-items:center;justify-content:center;fill:currentColor;position:relative}.icon ::slotted(*){display:flex;position:absolute}[has-start] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[has-end] .icon.trailing{font-size:var(--_trailing-icon-size);height:var(--_trailing-icon-size);width:var(--_trailing-icon-size)}.input-wrapper{display:flex}.input-wrapper>*{all:inherit;padding:0}.input{caret-color:var(--_caret-color);overflow-x:hidden;text-align:inherit}.input::placeholder{color:currentColor;opacity:1}.input::-webkit-calendar-picker-indicator{display:none}.input::-webkit-search-decoration,.input::-webkit-search-cancel-button{display:none}@media(forced-colors: active){.input{background:none}}.no-spinner .input::-webkit-inner-spin-button,.no-spinner .input::-webkit-outer-spin-button{display:none}.no-spinner .input[type=number]{-moz-appearance:textfield}:focus-within .input{caret-color:var(--_focus-caret-color)}.error:focus-within .input{caret-color:var(--_error-focus-caret-color)}.text-field:not(.disabled) .prefix{color:var(--_input-text-prefix-color)}.text-field:not(.disabled) .suffix{color:var(--_input-text-suffix-color)}.text-field:not(.disabled) .input::placeholder{color:var(--_input-text-placeholder-color)}.prefix,.suffix{text-wrap:nowrap;width:min-content}.prefix{padding-inline-end:var(--_input-text-prefix-trailing-space)}.suffix{padding-inline-start:var(--_input-text-suffix-leading-space)}\n`,Lo=class extends Fo{constructor(){super(...arguments),this.fieldTag=Te`md-filled-field`}};Lo.styles=[Io,so],customElements.define(`ew-filled-text-field`,Lo);var Ro=class extends A{connectedCallback(){super.connectedCallback(),this.setAttribute(`aria-hidden`,`true`)}render(){return x`<span class=\"shadow\"></span>`}},zo=s`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:\"\";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}\n`,Bo=class extends Ro{};Bo.styles=[zo],Bo=c([i(`md-elevation`)],Bo);function Vo(e,t){return new CustomEvent(`close-menu`,{bubbles:!0,composed:!0,detail:{initiator:e,reason:t,itemPath:[e]}})}var Ho=Vo,Uo={SPACE:`Space`,ENTER:`Enter`},Wo={CLICK_SELECTION:`click-selection`,KEYDOWN:`keydown`},Go={ESCAPE:`Escape`,SPACE:Uo.SPACE,ENTER:Uo.ENTER};function Ko(e){return Object.values(Go).some(t=>t===e)}function qo(e){return Object.values(Uo).some(t=>t===e)}function Jo(e,t){let n=new Event(`md-contains`,{bubbles:!0,composed:!0}),r=[],i=e=>{r=e.composedPath()};return t.addEventListener(`md-contains`,i),e.dispatchEvent(n),t.removeEventListener(`md-contains`,i),r.length>0}var J={NONE:`none`,LIST_ROOT:`list-root`,FIRST_ITEM:`first-item`,LAST_ITEM:`last-item`},Yo={END_START:`end-start`,END_END:`end-end`,START_START:`start-start`,START_END:`start-end`},Xo=class{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:`none`},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){let{surfaceEl:e,anchorEl:t,anchorCorner:n,surfaceCorner:r,positioning:i,xOffset:a,yOffset:o,disableBlockFlip:s,disableInlineFlip:c,repositionStrategy:l}=this.getProperties(),u=n.toLowerCase().trim(),d=r.toLowerCase().trim();if(!e||!t)return;let f=window.innerWidth,p=window.innerHeight,m=document.createElement(`div`);m.style.opacity=`0`,m.style.position=`fixed`,m.style.display=`block`,m.style.inset=`0`,document.body.appendChild(m);let h=m.getBoundingClientRect();m.remove();let g=window.innerHeight-h.bottom,_=window.innerWidth-h.right;this.surfaceStylesInternal={display:`block`,opacity:`0`},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();let v=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),y=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[b,x]=d.split(`-`),[S,C]=u.split(`-`),w=getComputedStyle(e).direction===`ltr`,{blockInset:T,blockOutOfBoundsCorrection:E,surfaceBlockProperty:D}=this.calculateBlock({surfaceRect:v,anchorRect:y,anchorBlock:S,surfaceBlock:b,yOffset:o,positioning:i,windowInnerHeight:p,blockScrollbarHeight:g});if(E&&!s){let e=b===`start`?`end`:`start`,t=S===`start`?`end`:`start`,n=this.calculateBlock({surfaceRect:v,anchorRect:y,anchorBlock:t,surfaceBlock:e,yOffset:o,positioning:i,windowInnerHeight:p,blockScrollbarHeight:g});E>n.blockOutOfBoundsCorrection&&(T=n.blockInset,E=n.blockOutOfBoundsCorrection,D=n.surfaceBlockProperty)}let{inlineInset:ee,inlineOutOfBoundsCorrection:te,surfaceInlineProperty:O}=this.calculateInline({surfaceRect:v,anchorRect:y,anchorInline:C,surfaceInline:x,xOffset:a,positioning:i,isLTR:w,windowInnerWidth:f,inlineScrollbarWidth:_});if(te&&!c){let e=x===`start`?`end`:`start`,t=C===`start`?`end`:`start`,n=this.calculateInline({surfaceRect:v,anchorRect:y,anchorInline:t,surfaceInline:e,xOffset:a,positioning:i,isLTR:w,windowInnerWidth:f,inlineScrollbarWidth:_});Math.abs(te)>Math.abs(n.inlineOutOfBoundsCorrection)&&(ee=n.inlineInset,te=n.inlineOutOfBoundsCorrection,O=n.surfaceInlineProperty)}l===`move`&&(T-=E,ee-=te),this.surfaceStylesInternal={display:`block`,opacity:`1`,[D]:`${T}px`,[O]:`${ee}px`},l===`resize`&&(E&&(this.surfaceStylesInternal.height=`${v.height-E}px`),te&&(this.surfaceStylesInternal.width=`${v.width-te}px`)),this.host.requestUpdate()}calculateBlock(e){let{surfaceRect:t,anchorRect:n,anchorBlock:r,surfaceBlock:i,yOffset:a,positioning:o,windowInnerHeight:s,blockScrollbarHeight:c}=e,l=o===`fixed`||o===`document`?1:0,u=o===`document`?1:0,d=i===`start`?1:0,f=i===`end`?1:0,p=(r===i?0:1)*n.height+a,m=d*n.top+f*(s-n.bottom-c),h=d*window.scrollY-f*window.scrollY,g=Math.abs(Math.min(0,s-m-p-t.height));return{blockInset:l*m+u*h+p,blockOutOfBoundsCorrection:g,surfaceBlockProperty:i===`start`?`inset-block-start`:`inset-block-end`}}calculateInline(e){let{isLTR:t,surfaceInline:n,anchorInline:r,anchorRect:i,surfaceRect:a,xOffset:o,positioning:s,windowInnerWidth:c,inlineScrollbarWidth:l}=e,u=s===`fixed`||s===`document`?1:0,d=s===`document`?1:0,f=t?1:0,p=t?0:1,m=n===`start`?1:0,h=n===`end`?1:0,g=(r===n?0:1)*i.width+o,_=m*i.left+h*(c-i.right-l),v=m*(c-i.right-l)+h*i.left,y=f*_+p*v,b=m*window.scrollX-h*window.scrollX,x=h*window.scrollX-m*window.scrollX,S=f*b+p*x,C=Math.abs(Math.min(0,c-y-g-a.width)),w=u*y+g+d*S,T=n===`start`?`inset-inline-start`:`inset-inline-end`;return(s===`document`||s===`fixed`)&&(T=n===`start`&&t||n===`end`&&!t?`left`:`right`),{inlineInset:w,inlineOutOfBoundsCorrection:C,surfaceInlineProperty:T}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){let e=this.getProperties(),t=!1;for(let[n,r]of Object.entries(e))if(t||=r!==this.lastValues[n],t)break;let n=this.lastValues.isOpen!==e.isOpen,r=!!e.anchorEl,i=!!e.surfaceEl;t&&r&&i&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):n&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:`none`},this.host.requestUpdate();let e=this.getProperties().surfaceEl;e?.popover&&e?.isConnected&&e.hidePopover()}},Y={INDEX:0,ITEM:1,TEXT:2},Zo=class{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer=``,this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=e=>{this.isTypingAhead?this.typeahead(e):this.beginTypeahead(e)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer=``,this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&(e.code===`Space`||e.code===`Enter`||e.code.startsWith(`Arrow`)||e.code===`Escape`||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map((e,t)=>[t,e,e.typeaheadText.trim().toLowerCase()]),this.lastActiveRecord=this.typeaheadRecords.find(e=>e[Y.ITEM].tabIndex===0)??null,this.lastActiveRecord&&(this.lastActiveRecord[Y.ITEM].tabIndex=-1),this.typeahead(e)))}typeahead(e){if(e.defaultPrevented)return;if(clearTimeout(this.cancelTypeaheadTimeout),e.code===`Enter`||e.code.startsWith(`Arrow`)||e.code===`Escape`){this.endTypeahead(),this.lastActiveRecord&&(this.lastActiveRecord[Y.ITEM].tabIndex=-1);return}e.code===`Space`&&e.preventDefault(),this.cancelTypeaheadTimeout=setTimeout(this.endTypeahead,this.getProperties().typeaheadBufferTime),this.typaheadBuffer+=e.key.toLowerCase();let t=this.lastActiveRecord?this.lastActiveRecord[Y.INDEX]:-1,n=this.typeaheadRecords.length,r=e=>(e[Y.INDEX]+n-t)%n,i=this.typeaheadRecords.filter(e=>!e[Y.ITEM].disabled&&e[Y.TEXT].startsWith(this.typaheadBuffer)).sort((e,t)=>r(e)-r(t));if(i.length===0){clearTimeout(this.cancelTypeaheadTimeout),this.lastActiveRecord&&(this.lastActiveRecord[Y.ITEM].tabIndex=-1),this.endTypeahead();return}let a=this.typaheadBuffer.length===1,o;o=this.lastActiveRecord===i[0]&&a?i[1]??i[0]:i[0],this.lastActiveRecord&&(this.lastActiveRecord[Y.ITEM].tabIndex=-1),this.lastActiveRecord=o,o[Y.ITEM].tabIndex=0,o[Y.ITEM].focus()}},Qo=new Set([M.ArrowDown,M.ArrowUp,M.Home,M.End]),$o=new Set([M.ArrowLeft,M.ArrowRight,...Qo]);function es(e=document){let t=e.activeElement;for(;t&&t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}var X=class extends A{get openDirection(){return this.menuCorner.split(`-`)[0]===`start`?`DOWN`:`UP`}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate(`anchorElement`)}constructor(){super(),this.anchor=``,this.positioning=`absolute`,this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.noHorizontalFlip=!1,this.noVerticalFlip=!1,this.typeaheadDelay=200,this.anchorCorner=Yo.END_START,this.menuCorner=Yo.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=J.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=g(),this.listController=new me({isItem:e=>e.hasAttribute(`md-menu-item`),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction===`rtl`,deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>this.isSubmenu?e===(getComputedStyle(this).direction===`rtl`?M.ArrowLeft:M.ArrowRight)?!0:Qo.has(e):$o.has(e),wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Zo(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new Xo(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning===`popover`?`document`:this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,disableBlockFlip:this.noVerticalFlip,disableInlineFlip:this.noHorizontalFlip,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!==`popover`?`move`:`resize`})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!==`document`&&this.positioning!==`fixed`&&this.positioning!==`popover`||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{let t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(Jo(e.relatedTarget,this)||this.pointerPath.length!==0&&Jo(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;let n=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=n},this.onOpened=async()=>{this.lastFocusedElement=es();let e=this.items,t=ae(e);t&&this.defaultFocus!==J.NONE&&(t.item.tabIndex=-1);let n=!this.quick;switch(this.quick?this.dispatchEvent(new Event(`opening`)):n=!!await this.animateOpen(),this.defaultFocus){case J.FIRST_ITEM:let t=oe(e);t&&(t.tabIndex=0,t.focus(),await t.updateComplete);break;case J.LAST_ITEM:let n=se(e);n&&(n.tabIndex=0,n.focus(),await n.updateComplete);break;case J.LIST_ROOT:this.focus();break;default:case J.NONE:break}n||this.dispatchEvent(new Event(`opened`))},this.beforeClose=async()=>{this.open=!1,this.skipRestoreFocus||this.lastFocusedElement?.focus?.(),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event(`closing`)),this.dispatchEvent(new Event(`closed`)))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;let t=e.composedPath();!this.stayOpenOnOutsideClick&&!t.includes(this)&&!t.includes(this.anchorElement)&&(this.open=!1)},this.internals.role=`menu`,this.addEventListener(`keydown`,this.handleKeydown),this.addEventListener(`keydown`,this.captureKeydown,{capture:!0}),this.addEventListener(`focusout`,this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){if(e.has(`open`)){if(this.open){this.removeAttribute(`aria-hidden`);return}this.setAttribute(`aria-hidden`,`true`)}}update(e){e.has(`open`)&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),e.has(`positioning`)&&this.positioning===`popover`&&!this.showPopover&&(this.positioning=`fixed`),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return x`\n      <div\n        class=\"menu ${E(this.getSurfaceClasses())}\"\n        style=${bo(this.menuPositionController.surfaceStyles)}\n        popover=${this.positioning===`popover`?`manual`:u}>\n        ${this.renderElevation()}\n        <div class=\"items\">\n          <div class=\"item-padding\"> ${this.renderMenuItems()} </div>\n        </div>\n      </div>\n    `}renderMenuItems(){return x`<slot\n      @close-menu=${this.onCloseMenu}\n      @deactivate-items=${this.onDeactivateItems}\n      @request-activation=${this.onRequestActivation}\n      @deactivate-typeahead=${this.handleDeactivateTypeahead}\n      @activate-typeahead=${this.handleActivateTypeahead}\n      @stay-open-on-focusout=${this.handleStayOpenOnFocusout}\n      @close-on-focusout=${this.handleCloseOnFocusout}\n      @slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return x`<md-elevation part=\"elevation\"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:this.positioning===`fixed`,\"has-overflow\":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&Ko(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){let e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;let n=this.openDirection;this.dispatchEvent(new Event(`opening`)),e.classList.toggle(`animating`,!0);let r=this.openCloseAnimationSignal.start(),i=e.offsetHeight,a=n===`UP`,o=this.items,s=250/o.length,c=e.animate([{height:`0px`},{height:`${i}px`}],{duration:500,easing:h.EMPHASIZED}),l=t.animate([{transform:a?`translateY(-${i}px)`:``},{transform:``}],{duration:500,easing:h.EMPHASIZED}),u=e.animate([{opacity:0},{opacity:1}],50),d=[];for(let e=0;e<o.length;e++){let t=o[a?o.length-1-e:e],n=t.animate([{opacity:0},{opacity:1}],{duration:250,delay:s*e});t.classList.toggle(`md-menu-hidden`,!0),n.addEventListener(`finish`,()=>{t.classList.toggle(`md-menu-hidden`,!1)}),d.push([t,n])}let f=e=>{},p=new Promise(e=>{f=e});return r.addEventListener(`abort`,()=>{c.cancel(),l.cancel(),u.cancel(),d.forEach(([e,t])=>{e.classList.toggle(`md-menu-hidden`,!1),t.cancel()}),f(!0)}),c.addEventListener(`finish`,()=>{e.classList.toggle(`animating`,!1),this.openCloseAnimationSignal.finish(),f(!1)}),await p}animateClose(){let e,t=new Promise(t=>{e=t}),n=this.surfaceEl,r=this.slotEl;if(!n||!r)return e(!1),t;let i=this.openDirection===`UP`;this.dispatchEvent(new Event(`closing`)),n.classList.toggle(`animating`,!0);let a=this.openCloseAnimationSignal.start(),o=n.offsetHeight,s=this.items,c=.35,l=50/s.length,u=n.animate([{height:`${o}px`},{height:`${o*c}px`}],{duration:150,easing:h.EMPHASIZED_ACCELERATE}),d=r.animate([{transform:``},{transform:i?`translateY(-${o*(1-c)}px)`:``}],{duration:150,easing:h.EMPHASIZED_ACCELERATE}),f=n.animate([{opacity:1},{opacity:0}],{duration:50,delay:100}),p=[];for(let e=0;e<s.length;e++){let t=s[i?e:s.length-1-e],n=t.animate([{opacity:1},{opacity:0}],{duration:50,delay:50+l*e});n.addEventListener(`finish`,()=>{t.classList.toggle(`md-menu-hidden`,!0)}),p.push([t,n])}return a.addEventListener(`abort`,()=>{u.cancel(),d.cancel(),f.cancel(),p.forEach(([e,t])=>{t.cancel(),e.classList.toggle(`md-menu-hidden`,!1)}),e(!1)}),u.addEventListener(`finish`,()=>{n.classList.toggle(`animating`,!1),p.forEach(([e])=>{e.classList.toggle(`md-menu-hidden`,!1)}),this.openCloseAnimationSignal.finish(),this.dispatchEvent(new Event(`closed`)),e(!0)}),t}handleKeydown(e){this.pointerPath=[],this.listController.handleKeydown(e)}setUpGlobalEventListeners(){document.addEventListener(`click`,this.onDocumentClick,{capture:!0}),window.addEventListener(`pointerdown`,this.onWindowPointerdown),document.addEventListener(`resize`,this.onWindowResize,{passive:!0}),window.addEventListener(`resize`,this.onWindowResize,{passive:!0})}cleanUpGlobalEventListeners(){document.removeEventListener(`click`,this.onDocumentClick,{capture:!0}),window.removeEventListener(`pointerdown`,this.onWindowPointerdown),document.removeEventListener(`resize`,this.onWindowResize),window.removeEventListener(`resize`,this.onWindowResize)}onCloseMenu(){this.close()}onDeactivateItems(e){e.stopPropagation(),this.listController.onDeactivateItems()}onRequestActivation(e){e.stopPropagation(),this.listController.onRequestActivation(e)}handleDeactivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!1}handleActivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!0}handleStayOpenOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!0}handleCloseOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!1}close(){this.open=!1,this.slotItems.forEach(e=>{e.close?.()})}show(){this.open=!0}activateNextItem(){return this.listController.activateNextItem()??null}activatePreviousItem(){return this.listController.activatePreviousItem()??null}reposition(){this.open&&this.menuPositionController.position()}};c([p(`.menu`)],X.prototype,`surfaceEl`,void 0),c([p(`slot`)],X.prototype,`slotEl`,void 0),c([l()],X.prototype,`anchor`,void 0),c([l()],X.prototype,`positioning`,void 0),c([l({type:Boolean})],X.prototype,`quick`,void 0),c([l({type:Boolean,attribute:`has-overflow`})],X.prototype,`hasOverflow`,void 0),c([l({type:Boolean,reflect:!0})],X.prototype,`open`,void 0),c([l({type:Number,attribute:`x-offset`})],X.prototype,`xOffset`,void 0),c([l({type:Number,attribute:`y-offset`})],X.prototype,`yOffset`,void 0),c([l({type:Boolean,attribute:`no-horizontal-flip`})],X.prototype,`noHorizontalFlip`,void 0),c([l({type:Boolean,attribute:`no-vertical-flip`})],X.prototype,`noVerticalFlip`,void 0),c([l({type:Number,attribute:`typeahead-delay`})],X.prototype,`typeaheadDelay`,void 0),c([l({attribute:`anchor-corner`})],X.prototype,`anchorCorner`,void 0),c([l({attribute:`menu-corner`})],X.prototype,`menuCorner`,void 0),c([l({type:Boolean,attribute:`stay-open-on-outside-click`})],X.prototype,`stayOpenOnOutsideClick`,void 0),c([l({type:Boolean,attribute:`stay-open-on-focusout`})],X.prototype,`stayOpenOnFocusout`,void 0),c([l({type:Boolean,attribute:`skip-restore-focus`})],X.prototype,`skipRestoreFocus`,void 0),c([l({attribute:`default-focus`})],X.prototype,`defaultFocus`,void 0),c([l({type:Boolean,attribute:`no-navigation-wrap`})],X.prototype,`noNavigationWrap`,void 0),c([k({flatten:!0})],X.prototype,`slotItems`,void 0),c([j()],X.prototype,`typeaheadActive`,void 0);var ts=s`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px))}.menu{border-radius:var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px));display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);color:inherit;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit;scrollbar-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit;scrollbar-width:inherit}.item-padding{padding-block:var(--md-menu-top-space, 8px) var(--md-menu-bottom-space, 8px)}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}\n`,ns=class extends X{};ns.styles=[ts],ns=c([i(`md-menu`)],ns);var rs=class extends He{computeValidity(e){return this.selectControl||=document.createElement(`select`),o(x`<option value=${e.value}></option>`,this.selectControl),this.selectControl.value=e.value,this.selectControl.required=e.required,{validity:this.selectControl.validity,validationMessage:this.selectControl.validationMessage}}equals(e,t){return e.value===t.value&&e.required===t.required}copy({value:e,required:t}){return{value:e,required:t}}};function is(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r.selected&&t.push([r,n])}return t}var as,os=Symbol(`value`),ss=O(Do(Re(Ve(S(A))))),Z=class extends ss{get value(){return this[os]}set value(e){this.lastUserSetValue=e,this.select(e)}get options(){return this.menu?.items??[]}get selectedIndex(){let[e,t]=(this.getSelectedOptions()??[])[0]??[];return t??-1}set selectedIndex(e){this.lastUserSetSelectedIndex=e,this.selectIndex(e)}get selectedOptions(){return(this.getSelectedOptions()??[]).map(([e])=>e)}get hasError(){return this.error||this.nativeError}constructor(){super(),this.quick=!1,this.required=!1,this.errorText=``,this.label=``,this.noAsterisk=!1,this.supportingText=``,this.error=!1,this.menuPositioning=`popover`,this.clampMenuWidth=!1,this.typeaheadDelay=200,this.hasLeadingIcon=!1,this.displayText=``,this.menuAlign=`start`,this[as]=``,this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText=``,this.focused=!1,this.open=!1,this.defaultFocus=J.NONE,this.prevOpen=this.open,this.selectWidth=0,this.addEventListener(`focus`,this.handleFocus.bind(this)),this.addEventListener(`blur`,this.handleBlur.bind(this))}select(e){let t=this.options.find(t=>t.value===e);t&&this.selectItem(t)}selectIndex(e){let t=this.options[e];t&&this.selectItem(t)}reset(){for(let e of this.options)e.selected=e.hasAttribute(`selected`);this.updateValueAndDisplayText(),this.nativeError=!1,this.nativeErrorText=``}showPicker(){this.open=!0}[(as=os,So)](e){e?.preventDefault();let t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}update(e){this.hasUpdated||this.initUserSelection(),this.prevOpen!==this.open&&this.open&&(this.selectWidth=this.getBoundingClientRect().width),this.prevOpen=this.open,super.update(e)}render(){return x`\n      <span\n        class=\"select ${E(this.getRenderClasses())}\"\n        @focusout=${this.handleFocusout}>\n        ${this.renderField()} ${this.renderMenu()}\n      </span>\n    `}async firstUpdated(e){await this.menu?.updateComplete,this.lastSelectedOptionRecords.length||this.initUserSelection(),!this.lastSelectedOptionRecords.length&&!this.options.length&&setTimeout(()=>{this.updateValueAndDisplayText()}),super.firstUpdated(e)}getRenderClasses(){return{disabled:this.disabled,error:this.error,open:this.open}}renderField(){let e=this.ariaLabel||this.label;return De`\n      <${this.fieldTag}\n          aria-haspopup=\"listbox\"\n          role=\"combobox\"\n          part=\"field\"\n          id=\"field\"\n          tabindex=${this.disabled?`-1`:`0`}\n          aria-label=${e||u}\n          aria-describedby=\"description\"\n          aria-expanded=${this.open?`true`:`false`}\n          aria-controls=\"listbox\"\n          class=\"field\"\n          label=${this.label}\n          ?no-asterisk=${this.noAsterisk}\n          .focused=${this.focused||this.open}\n          .populated=${!!this.displayText}\n          .disabled=${this.disabled}\n          .required=${this.required}\n          .error=${this.hasError}\n          ?has-start=${this.hasLeadingIcon}\n          has-end\n          supporting-text=${this.supportingText}\n          error-text=${this.getErrorText()}\n          @keydown=${this.handleKeydown}\n          @click=${this.handleClick}>\n         ${this.renderFieldContent()}\n         <div id=\"description\" slot=\"aria-describedby\"></div>\n      </${this.fieldTag}>`}renderFieldContent(){return[this.renderLeadingIcon(),this.renderLabel(),this.renderTrailingIcon()]}renderLeadingIcon(){return x`\n      <span class=\"icon leading\" slot=\"start\">\n        <slot name=\"leading-icon\" @slotchange=${this.handleIconChange}></slot>\n      </span>\n    `}renderTrailingIcon(){return x`\n      <span class=\"icon trailing\" slot=\"end\">\n        <slot name=\"trailing-icon\" @slotchange=${this.handleIconChange}>\n          <svg height=\"5\" viewBox=\"7 10 10 5\" focusable=\"false\">\n            <polygon\n              class=\"down\"\n              stroke=\"none\"\n              fill-rule=\"evenodd\"\n              points=\"7 10 12 15 17 10\"></polygon>\n            <polygon\n              class=\"up\"\n              stroke=\"none\"\n              fill-rule=\"evenodd\"\n              points=\"7 15 12 10 17 15\"></polygon>\n          </svg>\n        </slot>\n      </span>\n    `}renderLabel(){return x`<div id=\"label\">${this.displayText||x`&nbsp;`}</div>`}renderMenu(){let e=this.label||this.ariaLabel;return x`<div class=\"menu-wrapper\">\n      <md-menu\n        id=\"listbox\"\n        .defaultFocus=${this.defaultFocus}\n        role=\"listbox\"\n        tabindex=\"-1\"\n        aria-label=${e||u}\n        stay-open-on-focusout\n        part=\"menu\"\n        exportparts=\"focus-ring: menu-focus-ring\"\n        anchor=\"field\"\n        style=${bo({\"--__menu-min-width\":`${this.selectWidth}px`,\"--__menu-max-width\":this.clampMenuWidth?`${this.selectWidth}px`:void 0})}\n        no-navigation-wrap\n        .open=${this.open}\n        .quick=${this.quick}\n        .positioning=${this.menuPositioning}\n        .typeaheadDelay=${this.typeaheadDelay}\n        .anchorCorner=${this.menuAlign===`start`?`end-start`:`end-end`}\n        .menuCorner=${this.menuAlign===`start`?`start-start`:`start-end`}\n        @opening=${this.handleOpening}\n        @opened=${this.redispatchEvent}\n        @closing=${this.redispatchEvent}\n        @closed=${this.handleClosed}\n        @close-menu=${this.handleCloseMenu}\n        @request-selection=${this.handleRequestSelection}\n        @request-deselection=${this.handleRequestDeselection}>\n        ${this.renderMenuContent()}\n      </md-menu>\n    </div>`}renderMenuContent(){return x`<slot></slot>`}handleKeydown(e){if(this.open||this.disabled||!this.menu)return;let t=this.menu.typeaheadController,n=e.code===`Space`||e.code===`ArrowDown`||e.code===`ArrowUp`||e.code===`End`||e.code===`Home`||e.code===`Enter`;if(!t.isTypingAhead&&n){switch(e.preventDefault(),this.open=!0,e.code){case`Space`:case`ArrowDown`:case`Enter`:this.defaultFocus=J.NONE;break;case`End`:this.defaultFocus=J.LAST_ITEM;break;case`ArrowUp`:case`Home`:this.defaultFocus=J.FIRST_ITEM;break;default:break}return}if(e.key.length===1){t.onKeydown(e),e.preventDefault();let{lastActiveRecord:n}=t;if(!n)return;this.labelEl?.setAttribute?.(`aria-live`,`polite`),this.selectItem(n[Y.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&Jo(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;let e=this.menu.items;return this.lastSelectedOptionRecords=is(e),this.lastSelectedOptionRecords}async getUpdateComplete(){return await this.menu?.updateComplete,super.getUpdateComplete()}updateValueAndDisplayText(){let e=this.getSelectedOptions()??[],t=!1;if(e.length){let[n]=e[0];t=this.lastSelectedOption!==n,this.lastSelectedOption=n,this[os]=n.value,this.displayText=n.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[os]=``,this.displayText=``;return t}async handleOpening(e){if(this.labelEl?.removeAttribute?.(`aria-live`),this.redispatchEvent(e),this.defaultFocus!==J.NONE)return;let t=this.menu.items,n=ae(t)?.item,[r]=this.lastSelectedOptionRecords[0]??[null];n&&n!==r&&(n.tabIndex=-1),r??=t[0],r&&(r.tabIndex=0,r.focus())}redispatchEvent(e){w(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){let t=e.detail.reason,n=e.detail.itemPath[0];this.open=!1;let r=!1;t.kind===`click-selection`||t.kind===`keydown`&&qo(t.key)?r=this.selectItem(n):(n.tabIndex=-1,n.blur()),r&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach(([t])=>{e!==t&&(t.selected=!1)}),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){let t=e.target;this.lastSelectedOptionRecords.some(([e])=>e===t)||this.selectItem(t)}handleRequestDeselection(e){let t=e.target;this.lastSelectedOptionRecords.some(([e])=>e===t)&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):this.lastUserSetSelectedIndex!==null&&!this.lastSelectedOptionRecords.length?this.selectIndex(this.lastUserSetSelectedIndex):this.updateValueAndDisplayText()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[ze](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){this.field?.click()}[Ne](){return new rs(()=>this)}[Pe](){return this.field}};Z.shadowRootOptions={...A.shadowRootOptions,delegatesFocus:!0},c([l({type:Boolean})],Z.prototype,`quick`,void 0),c([l({type:Boolean})],Z.prototype,`required`,void 0),c([l({type:String,attribute:`error-text`})],Z.prototype,`errorText`,void 0),c([l()],Z.prototype,`label`,void 0),c([l({type:Boolean,attribute:`no-asterisk`})],Z.prototype,`noAsterisk`,void 0),c([l({type:String,attribute:`supporting-text`})],Z.prototype,`supportingText`,void 0),c([l({type:Boolean,reflect:!0})],Z.prototype,`error`,void 0),c([l({attribute:`menu-positioning`})],Z.prototype,`menuPositioning`,void 0),c([l({type:Boolean,attribute:`clamp-menu-width`})],Z.prototype,`clampMenuWidth`,void 0),c([l({type:Number,attribute:`typeahead-delay`})],Z.prototype,`typeaheadDelay`,void 0),c([l({type:Boolean,attribute:`has-leading-icon`})],Z.prototype,`hasLeadingIcon`,void 0),c([l({attribute:`display-text`})],Z.prototype,`displayText`,void 0),c([l({attribute:`menu-align`})],Z.prototype,`menuAlign`,void 0),c([l()],Z.prototype,`value`,null),c([l({type:Number,attribute:`selected-index`})],Z.prototype,`selectedIndex`,null),c([j()],Z.prototype,`nativeError`,void 0),c([j()],Z.prototype,`nativeErrorText`,void 0),c([j()],Z.prototype,`focused`,void 0),c([j()],Z.prototype,`open`,void 0),c([j()],Z.prototype,`defaultFocus`,void 0),c([p(`.field`)],Z.prototype,`field`,void 0),c([p(`md-menu`)],Z.prototype,`menu`,void 0),c([p(`#label`)],Z.prototype,`labelEl`,void 0),c([k({slot:`leading-icon`,flatten:!0})],Z.prototype,`leadingIcons`,void 0);var cs=class extends Z{constructor(){super(...arguments),this.fieldTag=Te`md-filled-field`}},ls=s`:host{--_text-field-active-indicator-color: var(--md-filled-select-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-active-indicator-height: var(--md-filled-select-text-field-active-indicator-height, 1px);--_text-field-container-color: var(--md-filled-select-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_text-field-disabled-active-indicator-color: var(--md-filled-select-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-active-indicator-height: var(--md-filled-select-text-field-disabled-active-indicator-height, 1px);--_text-field-disabled-active-indicator-opacity: var(--md-filled-select-text-field-disabled-active-indicator-opacity, 0.38);--_text-field-disabled-container-color: var(--md-filled-select-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-container-opacity: var(--md-filled-select-text-field-disabled-container-opacity, 0.04);--_text-field-disabled-input-text-color: var(--md-filled-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-filled-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-filled-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-filled-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-filled-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-filled-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-supporting-text-color: var(--md-filled-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-filled-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-filled-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-filled-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-active-indicator-color: var(--md-filled-select-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-active-indicator-color: var(--md-filled-select-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-input-text-color: var(--md-filled-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-filled-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-filled-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-supporting-text-color: var(--md-filled-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-filled-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-active-indicator-color: var(--md-filled-select-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-input-text-color: var(--md-filled-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-filled-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-filled-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-state-layer-color: var(--md-filled-select-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-state-layer-opacity: var(--md-filled-select-text-field-error-hover-state-layer-opacity, 0.08);--_text-field-error-hover-supporting-text-color: var(--md-filled-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-filled-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-filled-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-filled-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-filled-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-supporting-text-color: var(--md-filled-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-filled-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-active-indicator-color: var(--md-filled-select-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-active-indicator-height: var(--md-filled-select-text-field-focus-active-indicator-height, 3px);--_text-field-focus-input-text-color: var(--md-filled-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-filled-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-filled-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-supporting-text-color: var(--md-filled-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-filled-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-active-indicator-color: var(--md-filled-select-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-active-indicator-height: var(--md-filled-select-text-field-hover-active-indicator-height, 1px);--_text-field-hover-input-text-color: var(--md-filled-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-filled-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-filled-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-state-layer-color: var(--md-filled-select-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-state-layer-opacity: var(--md-filled-select-text-field-hover-state-layer-opacity, 0.08);--_text-field-hover-supporting-text-color: var(--md-filled-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-filled-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-filled-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-filled-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-filled-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-filled-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-filled-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-filled-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-filled-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-filled-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-filled-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-filled-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-filled-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-filled-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-filled-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-filled-select-text-field-leading-icon-size, 24px);--_text-field-supporting-text-color: var(--md-filled-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-filled-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-filled-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-filled-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-filled-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-filled-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-filled-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-filled-select-text-field-container-shape-start-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-filled-select-text-field-container-shape-start-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-filled-select-text-field-container-shape-end-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_text-field-container-shape-end-start: var(--md-filled-select-text-field-container-shape-end-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--md-filled-field-active-indicator-color: var(--_text-field-active-indicator-color);--md-filled-field-active-indicator-height: var(--_text-field-active-indicator-height);--md-filled-field-container-color: var(--_text-field-container-color);--md-filled-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-filled-field-content-color: var(--_text-field-input-text-color);--md-filled-field-content-font: var(--_text-field-input-text-font);--md-filled-field-content-line-height: var(--_text-field-input-text-line-height);--md-filled-field-content-size: var(--_text-field-input-text-size);--md-filled-field-content-weight: var(--_text-field-input-text-weight);--md-filled-field-disabled-active-indicator-color: var(--_text-field-disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_text-field-disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_text-field-disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_text-field-disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_text-field-disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_text-field-error-active-indicator-color);--md-filled-field-error-content-color: var(--_text-field-error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_text-field-error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_text-field-error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_text-field-error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_text-field-error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-filled-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_text-field-focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_text-field-focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_text-field-hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_text-field-hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_text-field-hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_text-field-hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_text-field-label-text-color);--md-filled-field-label-text-font: var(--_text-field-label-text-font);--md-filled-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-filled-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-filled-field-label-text-size: var(--_text-field-label-text-size);--md-filled-field-label-text-weight: var(--_text-field-label-text-weight);--md-filled-field-leading-content-color: var(--_text-field-leading-icon-color);--md-filled-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-filled-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-filled-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-filled-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-filled-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-filled-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}\n`,us=s`:host{color:unset;min-width:210px;display:flex}.field{cursor:default;outline:none}.select{position:relative;flex-direction:column}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit;display:flex}md-menu{min-width:var(--__menu-min-width);max-width:var(--__menu-max-width, inherit)}.menu-wrapper{width:0px;height:0px;max-width:inherit}md-menu ::slotted(:not[disabled]){cursor:pointer}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}\n`,ds=class extends cs{};ds.styles=[us,ls],customElements.define(`ew-filled-select`,ds);var fs=s`:host{display:flex;--md-ripple-hover-color: var(--md-menu-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-menu-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-menu-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-menu-item-pressed-state-layer-opacity, 0.12)}:host([disabled]){opacity:var(--md-menu-item-disabled-opacity, 0.3);pointer-events:none}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled){cursor:pointer}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;color:var(--md-menu-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-menu-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-menu-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-menu-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-menu-item-one-line-container-height, 56px);padding-top:var(--md-menu-item-top-space, 12px);padding-bottom:var(--md-menu-item-bottom-space, 12px);padding-inline-start:var(--md-menu-item-leading-space, 16px);padding-inline-end:var(--md-menu-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-menu-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-menu-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-menu-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-menu-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-menu-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-menu-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-menu-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-menu-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-menu-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}.list-item{background-color:var(--md-menu-item-container-color, transparent)}.list-item.selected{background-color:var(--md-menu-item-selected-container-color, var(--md-sys-color-secondary-container, #e8def8))}.selected:not(.disabled) ::slotted(*){color:var(--md-menu-item-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b))}@media(forced-colors: active){:host([disabled]),:host([disabled]) slot{color:GrayText;opacity:1}.list-item{position:relative}.list-item.selected::before{content:\"\";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}\n`,ps=class{constructor(e,t){this.host=e,this.internalTypeaheadText=null,this.onClick=()=>{this.host.keepOpen||this.host.dispatchEvent(Ho(this.host,{kind:Wo.CLICK_SELECTION}))},this.onKeydown=e=>{if(this.host.href&&e.code===`Enter`){let e=this.getInteractiveElement();e instanceof HTMLAnchorElement&&e.click()}if(e.defaultPrevented)return;let t=e.code;this.host.keepOpen&&t!==`Escape`||Ko(t)&&(e.preventDefault(),this.host.dispatchEvent(Ho(this.host,{kind:Wo.KEYDOWN,key:t})))},this.getHeadlineElements=t.getHeadlineElements,this.getSupportingTextElements=t.getSupportingTextElements,this.getDefaultElements=t.getDefaultElements,this.getInteractiveElement=t.getInteractiveElement,this.host.addController(this)}get typeaheadText(){if(this.internalTypeaheadText!==null)return this.internalTypeaheadText;let e=this.getHeadlineElements(),t=[];return e.forEach(e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())}),t.length===0&&this.getDefaultElements().forEach(e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())}),t.length===0&&this.getSupportingTextElements().forEach(e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())}),t.join(` `)}get tagName(){switch(this.host.type){case`link`:return`a`;case`button`:return`button`;default:case`menuitem`:case`option`:return`li`}}get role(){return this.host.type===`option`?`option`:`menuitem`}hostConnected(){this.host.toggleAttribute(`md-menu-item`,!0)}hostUpdate(){this.host.href&&(this.host.type=`link`)}setTypeaheadText(e){this.internalTypeaheadText=e}};function ms(){return new Event(`request-selection`,{bubbles:!0,composed:!0})}function hs(){return new Event(`request-deselection`,{bubbles:!0,composed:!0})}var gs=class{get role(){return this.menuItemController.role}get typeaheadText(){return this.menuItemController.typeaheadText}setTypeaheadText(e){this.menuItemController.setTypeaheadText(e)}get displayText(){return this.internalDisplayText===null?this.menuItemController.typeaheadText:this.internalDisplayText}setDisplayText(e){this.internalDisplayText=e}constructor(e,t){this.host=e,this.internalDisplayText=null,this.firstUpdate=!0,this.onClick=()=>{this.menuItemController.onClick()},this.onKeydown=e=>{this.menuItemController.onKeydown(e)},this.lastSelected=this.host.selected,this.menuItemController=new ps(e,t),e.addController(this)}hostUpdate(){this.lastSelected!==this.host.selected&&(this.host.ariaSelected=this.host.selected?`true`:`false`)}hostUpdated(){this.lastSelected!==this.host.selected&&!this.firstUpdate&&(this.host.selected?this.host.dispatchEvent(ms()):this.host.dispatchEvent(hs())),this.lastSelected=this.host.selected,this.firstUpdate=!1}},_s=O(A),Q=class extends _s{constructor(){super(...arguments),this.disabled=!1,this.isMenuItem=!0,this.selected=!1,this.value=``,this.type=`option`,this.selectOptionController=new gs(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.selectOptionController.typeaheadText}set typeaheadText(e){this.selectOptionController.setTypeaheadText(e)}get displayText(){return this.selectOptionController.displayText}set displayText(e){this.selectOptionController.setDisplayText(e)}render(){return this.renderListItem(x`\n      <md-item>\n        <div slot=\"container\">\n          ${this.renderRipple()} ${this.renderFocusRing()}\n        </div>\n        <slot name=\"start\" slot=\"start\"></slot>\n        <slot name=\"end\" slot=\"end\"></slot>\n        ${this.renderBody()}\n      </md-item>\n    `)}renderListItem(e){return x`\n      <li\n        id=\"item\"\n        tabindex=${this.disabled?-1:0}\n        role=${this.selectOptionController.role}\n        aria-label=${this.ariaLabel||u}\n        aria-selected=${this.ariaSelected||u}\n        aria-checked=${this.ariaChecked||u}\n        aria-expanded=${this.ariaExpanded||u}\n        aria-haspopup=${this.ariaHasPopup||u}\n        class=\"list-item ${E(this.getRenderClasses())}\"\n        @click=${this.selectOptionController.onClick}\n        @keydown=${this.selectOptionController.onKeydown}\n        >${e}</li\n      >\n    `}renderRipple(){return x` <md-ripple\n      part=\"ripple\"\n      for=\"item\"\n      ?disabled=${this.disabled}></md-ripple>`}renderFocusRing(){return x` <md-focus-ring\n      part=\"focus-ring\"\n      for=\"item\"\n      inward></md-focus-ring>`}getRenderClasses(){return{disabled:this.disabled,selected:this.selected}}renderBody(){return x`\n      <slot></slot>\n      <slot name=\"overline\" slot=\"overline\"></slot>\n      <slot name=\"headline\" slot=\"headline\"></slot>\n      <slot name=\"supporting-text\" slot=\"supporting-text\"></slot>\n      <slot\n        name=\"trailing-supporting-text\"\n        slot=\"trailing-supporting-text\"></slot>\n    `}focus(){this.listItemRoot?.focus()}};Q.shadowRootOptions={...A.shadowRootOptions,delegatesFocus:!0},c([l({type:Boolean,reflect:!0})],Q.prototype,`disabled`,void 0),c([l({type:Boolean,attribute:`md-menu-item`,reflect:!0})],Q.prototype,`isMenuItem`,void 0),c([l({type:Boolean})],Q.prototype,`selected`,void 0),c([l()],Q.prototype,`value`,void 0),c([p(`.list-item`)],Q.prototype,`listItemRoot`,void 0),c([k({slot:`headline`})],Q.prototype,`headlineElements`,void 0),c([k({slot:`supporting-text`})],Q.prototype,`supportingTextElements`,void 0),c([d({slot:``})],Q.prototype,`defaultElements`,void 0),c([l({attribute:`typeahead-text`})],Q.prototype,`typeaheadText`,null),c([l({attribute:`display-text`})],Q.prototype,`displayText`,null);var vs=class extends Q{};vs.styles=[fs],customElements.define(`ew-select-option`,vs);var ys=O(A),bs=class extends ys{constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.fourColor=!1}render(){let{ariaLabel:e}=this;return x`\n      <div\n        class=\"progress ${E(this.getRenderClasses())}\"\n        role=\"progressbar\"\n        aria-label=\"${e||u}\"\n        aria-valuemin=\"0\"\n        aria-valuemax=${this.max}\n        aria-valuenow=${this.indeterminate?u:this.value}\n        >${this.renderIndicator()}</div\n      >\n    `}getRenderClasses(){return{indeterminate:this.indeterminate,\"four-color\":this.fourColor}}};c([l({type:Number})],bs.prototype,`value`,void 0),c([l({type:Number})],bs.prototype,`max`,void 0),c([l({type:Boolean})],bs.prototype,`indeterminate`,void 0),c([l({type:Boolean,attribute:`four-color`})],bs.prototype,`fourColor`,void 0);var xs=class extends bs{renderIndicator(){return this.indeterminate?this.renderIndeterminateContainer():this.renderDeterminateContainer()}renderDeterminateContainer(){return x`\n      <svg viewBox=\"0 0 4800 4800\">\n        <circle class=\"track\" pathLength=\"100\"></circle>\n        <circle\n          class=\"active-track\"\n          pathLength=\"100\"\n          stroke-dashoffset=${(1-this.value/this.max)*100}></circle>\n      </svg>\n    `}renderIndeterminateContainer(){return x` <div class=\"spinner\">\n      <div class=\"left\">\n        <div class=\"circle\"></div>\n      </div>\n      <div class=\"right\">\n        <div class=\"circle\"></div>\n      </div>\n    </div>`}},Ss=s`:host{--_active-indicator-color: var(--md-circular-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-width: var(--md-circular-progress-active-indicator-width, 10);--_four-color-active-indicator-four-color: var(--md-circular-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-circular-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-circular-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-circular-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_size: var(--md-circular-progress-size, 48px);display:inline-flex;vertical-align:middle;width:var(--_size);height:var(--_size);position:relative;align-items:center;justify-content:center;contain:strict;content-visibility:auto}.progress{flex:1;align-self:stretch;margin:4px}.progress,.spinner,.left,.right,.circle,svg,.track,.active-track{position:absolute;inset:0}svg{transform:rotate(-90deg)}circle{cx:50%;cy:50%;r:calc(50%*(1 - var(--_active-indicator-width)/100));stroke-width:calc(var(--_active-indicator-width)*1%);stroke-dasharray:100;fill:rgba(0,0,0,0)}.active-track{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1);stroke:var(--_active-indicator-color)}.track{stroke:rgba(0,0,0,0)}.progress.indeterminate{animation:linear infinite linear-rotate;animation-duration:1568.2352941176ms}.spinner{animation:infinite both rotate-arc;animation-duration:5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.left{overflow:hidden;inset:0 50% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_active-indicator-width)/100*(var(--_size) - 8px));border-color:var(--_active-indicator-color) var(--_active-indicator-color) rgba(0,0,0,0) rgba(0,0,0,0);animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:1333ms,5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.four-color .circle{animation-name:expand-arc,four-color}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:-666.5ms,0ms}@media(forced-colors: active){.active-track{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}@keyframes four-color{0%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}15%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}25%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}40%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}50%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}65%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}75%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}90%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}100%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}}\n`,Cs=class extends xs{};Cs.styles=[Ss],customElements.define(`ew-circular-progress`,Cs);var ws=class extends A{render(){return x`\n      <div>\n        <ew-circular-progress\n          active\n          ?indeterminate=${this.progress===void 0}\n          .value=${this.progress===void 0?void 0:this.progress/100}\n        ></ew-circular-progress>\n        ${this.progress===void 0?``:x`<div>${this.progress}%</div>`}\n      </div>\n      ${this.label}\n    `}};ws.styles=s`\n    :host {\n      display: flex;\n      flex-direction: column;\n      text-align: center;\n    }\n    ew-circular-progress {\n      margin-bottom: 16px;\n    }\n  `,c([l()],ws.prototype,`label`,void 0),c([l()],ws.prototype,`progress`,void 0),customElements.define(`ewt-page-progress`,ws);var Ts=class extends A{render(){return x`\n      <div class=\"icon\">${this.icon}</div>\n      ${this.label}\n    `}};Ts.styles=s`\n    :host {\n      display: flex;\n      flex-direction: column;\n      text-align: center;\n    }\n    .icon {\n      font-size: 50px;\n      line-height: 80px;\n      color: black;\n    }\n  `,c([l()],Ts.prototype,`icon`,void 0),c([l()],Ts.prototype,`label`,void 0),customElements.define(`ewt-page-message`,Ts);var Es=b`\n  <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n    <path\n      fill=\"currentColor\"\n      d=\"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\"\n    />\n  </svg>\n`,Ds=b`\n  <svg viewBox=\"0 0 24 24\">\n    <path\n      fill=\"currentColor\"\n      d=\"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z\"\n    />\n  </svg>\n`,Os=b`\n  <svg slot=\"start\" viewBox=\"0 0 24 24\">\n    <path d=\"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z\" />\n  </svg>\n`,ks=b`\n  <svg slot=\"start\" viewBox=\"0 0 24 24\">\n    <path d=\"M12,21L15.6,16.2C14.6,15.45 13.35,15 12,15C10.65,15 9.4,15.45 8.4,16.2L12,21M12,3C7.95,3 4.21,4.34 1.2,6.6L3,9C5.5,7.12 8.62,6 12,6C15.38,6 18.5,7.12 21,9L22.8,6.6C19.79,4.34 16.05,3 12,3M12,9C9.3,9 6.81,9.89 4.8,11.4L6.6,13.8C8.1,12.67 9.97,12 12,12C14.03,12 15.9,12.67 17.4,13.8L19.2,11.4C17.19,9.89 14.7,9 12,9Z\" />\n  </svg>\n`,As=b`\n  <svg slot=\"start\" viewBox=\"0 0 24 24\">\n    <path d=\"M20,19V7H4V19H20M20,3A2,2 0 0,1 22,5V19A2,2 0 0,1 20,21H4A2,2 0 0,1 2,19V5C2,3.89 2.9,3 4,3H20M13,17V15H18V17H13M9.58,13L5.57,9H8.4L11.7,12.3C12.09,12.69 12.09,13.33 11.7,13.72L8.42,17H5.59L9.58,13Z\" />\n  </svg>\n`,js=b`\n  <svg slot=\"start\" viewBox=\"0 0 24 24\">\n  <path d=\"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\" />\n  </svg>\n`,Ms=b`\n  <svg slot=\"start\" viewBox=\"0 0 24 24\">\n    <path d=\"m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864\" />\n  </svg>\n`,Ns=b`\n  <svg slot=\"start\" viewBox=\"0 0 24 24\">\n    <path d=\"M15,14C17.67,14 23,15.33 23,18V20H7V18C7,15.33 12.33,14 15,14M15,12A4,4 0 0,1 11,8A4,4 0 0,1 15,4A4,4 0 0,1 19,8A4,4 0 0,1 15,12M5,9.59L7.12,7.46L8.54,8.88L6.41,11L8.54,13.12L7.12,14.54L5,12.41L2.88,14.54L1.46,13.12L3.59,11L1.46,8.88L2.88,7.46L5,9.59Z\" />\n  </svg>\n`,Ps=b`\n  <svg slot=\"start\" viewBox=\"0 0 24 24\">\n    <path d=\"M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z\" />\n  </svg>\n`,Fs=[73,77,80,82,79,86,1],Is;(function(e){e[e.CURRENT_STATE=1]=`CURRENT_STATE`,e[e.ERROR_STATE=2]=`ERROR_STATE`,e[e.RPC=3]=`RPC`,e[e.RPC_RESULT=4]=`RPC_RESULT`})(Is||={});var Ls;(function(e){e[e.READY=2]=`READY`,e[e.PROVISIONING=3]=`PROVISIONING`,e[e.PROVISIONED=4]=`PROVISIONED`})(Ls||={});var Rs={0:`NO_ERROR`,1:`INVALID_RPC_PACKET`,2:`UNKNOWN_RPC_COMMAND`,3:`UNABLE_TO_CONNECT`,254:`TIMEOUT`,255:`UNKNOWN_ERROR`},zs=class extends Error{constructor(){super(`Port is not ready`)}},Bs=e=>new Promise(t=>setTimeout(t,e)),Vs=(e,t=2)=>{let n=e.toString(16).toUpperCase();return n.startsWith(`-`)?`-0x`+n.substring(1).padStart(t,`0`):`0x`+n.padStart(t,`0`)},Hs=e=>`[`+e.map(e=>Vs(e)).join(`, `)+`]`,Us=class extends EventTarget{constructor(e,t){if(super(),this.port=e,this.logger=t,this.error=0,e.readable===null)throw Error(`Port is not readable`);if(e.writable===null)throw Error(`Port is not writable`)}async initialize(e=1e3){if(this.logger.log(`Initializing Improv Serial`),this._processInput(),await Bs(1e3),this._reader===void 0)throw new zs;try{await new Promise(async(t,n)=>{setTimeout(()=>n(Error(`Improv Wi-Fi Serial not detected`)),e),await this.requestCurrentState(),t(void 0)}),await this.requestInfo()}catch(e){throw await this.close(),e}return this.info}async close(){this._reader&&await new Promise(e=>{this._reader.cancel(),this.addEventListener(`disconnect`,e,{once:!0})})}async requestCurrentState(){let e;try{await new Promise(async(t,n)=>{this.addEventListener(`state-changed`,t,{once:!0}),e=this._sendRPCWithResponse(2,[]),e.catch(e=>{this.removeEventListener(`state-changed`,t),n(e)})})}catch(e){throw this._rpcFeedback=void 0,Error(`Error fetching current state: ${e}`)}if(this.state!==Ls.PROVISIONED){this._rpcFeedback=void 0;return}this.nextUrl=(await e)[0]}async requestInfo(e){let t=await this._sendRPCWithResponse(3,[],e);this.info={firmware:t[0],version:t[1],name:t[3],chipFamily:t[2]}}async provision(e,t,n){let r=new TextEncoder,i=r.encode(e),a=r.encode(t),o=[i.length,...i,a.length,...a];this.nextUrl=(await this._sendRPCWithResponse(1,o,n))[0]}async scan(){let e=(await this._sendRPCWithMultipleResponses(4,[])).map(([e,t,n])=>({name:e,rssi:parseInt(t),secured:n===`YES`}));return e.sort((e,t)=>e.name.toLocaleLowerCase().localeCompare(t.name.toLocaleLowerCase())),e}_sendRPC(e,t){this.writePacketToStream(Is.RPC,[e,t.length,...t])}async _sendRPCWithResponse(e,t,n){if(this._rpcFeedback)throw Error(`Only 1 RPC command that requires feedback can be active`);return await this._awaitRPCResultWithTimeout(new Promise((n,r)=>{this._rpcFeedback={command:e,resolve:n,reject:r},this._sendRPC(e,t)}),n)}async _sendRPCWithMultipleResponses(e,t,n){if(this._rpcFeedback)throw Error(`Only 1 RPC command that requires feedback can be active`);return await this._awaitRPCResultWithTimeout(new Promise((n,r)=>{this._rpcFeedback={command:e,resolve:n,reject:r,receivedData:[]},this._sendRPC(e,t)}),n)}async _awaitRPCResultWithTimeout(e,t){return t?await new Promise((n,r)=>{let i=setTimeout(()=>this._setError(254),t);e.finally(()=>clearTimeout(i)),e.then(n,r)}):await e}async _processInput(){this.logger.debug(`Starting read loop`),this._reader=this.port.readable.getReader();try{let e=[],t,n=0;for(;;){let{value:r,done:i}=await this._reader.read();if(i)break;if(!(!r||r.length===0))for(let i of r){if(t===!1){i===10&&(t=void 0);continue}if(t===!0){e.push(i),e.length===n&&(this._handleIncomingPacket(e),t=void 0,e=[]);continue}if(i===10){e=[];continue}if(e.push(i),e.length===9){if(t=String.fromCharCode(...e.slice(0,6))===`IMPROV`,!t){e=[];continue}n=9+e[8]+1}}}}catch(e){this.logger.error(`Error while reading serial port`,e)}finally{this._reader.releaseLock(),this._reader=void 0}this.logger.debug(`Finished read loop`),this.dispatchEvent(new Event(`disconnect`))}_handleIncomingPacket(e){let t=e.slice(6),n=t[0],r=t[1],i=t[2],a=t.slice(3,3+i);if(this.logger.debug(`PROCESS`,{version:n,packetType:r,packetLength:i,data:Hs(a)}),n!==1){this.logger.error(`Received unsupported version`,n);return}let o=t[3+i],s=0;for(let t=0;t<e.length-1;t++)s+=e[t];if(s&=255,s!==o){this.logger.error(`Received invalid checksum ${o}. Expected ${s}`);return}if(r===Is.CURRENT_STATE)this.state=a[0],this.dispatchEvent(new CustomEvent(`state-changed`,{detail:this.state}));else if(r===Is.ERROR_STATE)this._setError(a[0]);else if(r===Is.RPC_RESULT){if(!this._rpcFeedback){this.logger.error(`Received result while not waiting for one`);return}let e=a[0];if(e!==this._rpcFeedback.command){this.logger.error(`Received result for command ${e} but expected ${this._rpcFeedback.command}`);return}let t=[],n=a[1],r=2;for(;r<2+n;)t.push(String.fromCodePoint(...a.slice(r+1,r+a[r]+1))),r+=a[r]+1;`receivedData`in this._rpcFeedback?t.length>0?this._rpcFeedback.receivedData.push(t):(this._rpcFeedback.resolve(this._rpcFeedback.receivedData),this._rpcFeedback=void 0):(this._rpcFeedback.resolve(t),this._rpcFeedback=void 0)}else this.logger.error(`Unable to handle packet`,t)}async writePacketToStream(e,t){let n=new Uint8Array([...Fs,e,t.length,...t,0,0]);n[n.length-2]=n.reduce((e,t)=>e+t,0)&255,n[n.length-1]=10,this.logger.debug(`Writing to stream:`,Hs(new Array(...n)));let r=this.port.writable.getWriter();await r.write(n);try{r.releaseLock()}catch(e){console.error(`Ignoring release lock error`,e)}}_setError(e){this.error=e,e>0&&this._rpcFeedback&&(this._rpcFeedback.reject(Rs[e]||`UNKNOWN_ERROR (${e})`),this._rpcFeedback=void 0),this.dispatchEvent(new CustomEvent(`error-changed`,{detail:this.error}))}},Ws=async(e,t)=>{await e.setRTS(!0),await Xe(100),await t.after()},Gs=async(e,t,n,r,i)=>{let a,o,s=t=>e({...t,manifest:r,build:a,chipFamily:o}),c=new Ha(t),l=new eo({transport:c,baudrate:115200,romBaudrate:115200,enableTracing:!1});window.esploader=l,s({state:`initializing`,message:`Initializing...`,details:{done:!1}});try{await l.main(),await l.flashId()}catch(e){console.error(e),s({state:`error`,message:`Failed to initialize. Try resetting your device or holding the BOOT button while clicking INSTALL.`,details:{error:`failed_initialize`,details:e}}),await Ws(c,l),await c.disconnect();return}if(o=l.chip.CHIP_NAME,s({state:`initializing`,message:`Initialized. Found ${o}`,details:{done:!0}}),a=r.builds.find(e=>e.chipFamily===o),!a){s({state:`error`,message:`Your ${o} board is not supported.`,details:{error:`not_supported`,details:o}}),await Ws(c,l),await c.disconnect();return}s({state:`preparing`,message:`Preparing installation...`,details:{done:!1}});let u=new URL(n,location.toString()).toString(),d=a.parts.map(async e=>{let t=new URL(e.path,u).toString(),n=await fetch(t);if(!n.ok)throw Error(`Downlading firmware ${e.path} failed: ${n.status}`);let r=new FileReader,i=await n.blob();return new Promise(e=>{r.addEventListener(`load`,()=>e(r.result)),r.readAsBinaryString(i)})}),f=[],p=0;for(let e=0;e<d.length;e++)try{let t=await d[e];f.push({data:t,address:a.parts[e].offset}),p+=t.length}catch(e){s({state:`error`,message:e.message,details:{error:`failed_firmware_download`,details:e.message}}),await Ws(c,l),await c.disconnect();return}s({state:`preparing`,message:`Installation prepared`,details:{done:!0}}),i&&(s({state:`erasing`,message:`Erasing device...`,details:{done:!1}}),await l.eraseFlash(),s({state:`erasing`,message:`Device erased`,details:{done:!0}})),s({state:`writing`,message:`Writing progress: 0%`,details:{bytesTotal:p,bytesWritten:0,percentage:0}});let m=0;try{await l.writeFlash({fileArray:f,flashSize:`keep`,flashMode:`keep`,flashFreq:`keep`,eraseAll:!1,compress:!0,reportProgress:(e,t,n)=>{let r=t/n*f[e].data.length,i=Math.floor((m+r)/p*100);if(t===n){m+=r;return}s({state:`writing`,message:`Writing progress: ${i}%`,details:{bytesTotal:p,bytesWritten:m+t,percentage:i}})}})}catch(e){s({state:`error`,message:e.message,details:{error:`write_failed`,details:e}}),await Ws(c,l),await c.disconnect();return}s({state:`writing`,message:`Writing complete`,details:{bytesTotal:p,bytesWritten:m,percentage:100}}),await Ws(c,l),console.log(`DISCONNECT`),await c.disconnect(),s({state:`finished`,message:`All done!`})},Ks=(e,t=``)=>{let n=document.createElement(`a`);n.target=`_blank`,n.href=e,n.download=t,document.body.appendChild(n),n.dispatchEvent(new MouseEvent(`click`)),document.body.removeChild(n)},qs=(e,t=``)=>{let n=new Blob([e],{type:`text/plain`}),r=URL.createObjectURL(n);Ks(r,t),setTimeout(()=>URL.revokeObjectURL(r),0)},Js=(e,t,n,r)=>{r||={};let i=new CustomEvent(t,{bubbles:r.bubbles===void 0?!0:r.bubbles,cancelable:!!r.cancelable,composed:r.composed===void 0?!0:r.composed,detail:n});e.dispatchEvent(i)},Ys=async e=>{let t=new URL(e,location.toString()).toString(),n=await(await fetch(t)).json();return`new_install_skip_erase`in n&&(console.warn(`Manifest option \"new_install_skip_erase\" is deprecated. Use \"new_install_prompt_erase\" instead.`),n.new_install_skip_erase&&(n.new_install_prompt_erase=!0)),n};console.log(`ESP Web Tools 10.2.1 by Open Home Foundation; https://esphome.github.io/esp-web-tools/`);var Xs=`⚠️`,Zs=`🎉`,$=class extends A{constructor(){super(...arguments),this.logger=console,this._state=`DASHBOARD`,this._installErase=!1,this._installConfirmed=!1,this._provisionForce=!1,this._wasProvisioned=!1,this._busy=!1,this._selectedSsid=null,this._bodyOverflow=null,this._handleDisconnect=()=>{this._state=`ERROR`,this._error=`Disconnected`}}render(){if(!this.port)return x``;let e,t,n=!1;return this._client===void 0&&this._state!==`INSTALL`&&this._state!==`LOGS`?this._error?[e,t]=this._renderError(this._error):t=this._renderProgress(`Connecting`):this._state===`INSTALL`?[e,t,n]=this._renderInstall():this._state===`ASK_ERASE`?[e,t]=this._renderAskErase():this._state===`ERROR`?[e,t]=this._renderError(this._error):this._state===`DASHBOARD`?[e,t,n]=this._client?this._renderDashboard():this._renderDashboardNoImprov():this._state===`PROVISION`?[e,t]=this._renderProvision():this._state===`LOGS`&&([e,t]=this._renderLogs()),x`\n      <ew-dialog\n        open\n        .heading=${e}\n        @cancel=${this._preventDefault}\n        @closed=${this._handleClose}\n      >\n        ${e?x`<div slot=\"headline\">${e}</div>`:``}\n        ${n?x`\n              <ew-icon-button slot=\"headline\" @click=${this._closeDialog}>\n                ${Es}\n              </ew-icon-button>\n            `:``}\n        ${t}\n      </ew-dialog>\n    `}_renderProgress(e,t){return x`\n      <ewt-page-progress\n        slot=\"content\"\n        .label=${e}\n        .progress=${t}\n      ></ewt-page-progress>\n    `}_renderError(e){return[`Error`,x`\n      <ewt-page-message\n        slot=\"content\"\n        .icon=${Xs}\n        .label=${e}\n      ></ewt-page-message>\n      <div slot=\"actions\">\n        <ew-text-button @click=${this._closeDialog}>Close</ew-text-button>\n      </div>\n    `]}_renderDashboard(){let e=this._manifest.name,t;return t=x`\n      <div slot=\"content\">\n        <ew-list>\n          <ew-list-item>\n            <div slot=\"headline\">Connected to ${this._info.name}</div>\n            <div slot=\"supporting-text\">\n              ${this._info.firmware}&nbsp;${this._info.version}\n              (${this._info.chipFamily})\n            </div>\n          </ew-list-item>\n          ${this._isSameVersion?``:x`\n                <ew-list-item\n                  type=\"button\"\n                  @click=${()=>{this._isSameFirmware?this._startInstall(!1):this._manifest.new_install_prompt_erase?this._state=`ASK_ERASE`:this._startInstall(!0)}}\n                >\n                  ${Os}\n                  <div slot=\"headline\">\n                    ${this._isSameFirmware?`Update ${this._manifest.name}`:`Install ${this._manifest.name}`}\n                  </div>\n                </ew-list-item>\n              `}\n          ${this._client.nextUrl===void 0?``:x`\n                <ew-list-item\n                  type=\"link\"\n                  href=${this._client.nextUrl}\n                  target=\"_blank\"\n                >\n                  ${js}\n                  <div slot=\"headline\">Visit Device</div>\n                </ew-list-item>\n              `}\n          ${!this._manifest.home_assistant_domain||this._client.state!==Ls.PROVISIONED?``:x`\n                <ew-list-item\n                  type=\"link\"\n                  href=${`https://my.home-assistant.io/redirect/config_flow_start/?domain=${this._manifest.home_assistant_domain}`}\n                  target=\"_blank\"\n                >\n                  ${Ms}\n                  <div slot=\"headline\">Add to Home Assistant</div>\n                </ew-list-item>\n              `}\n          <ew-list-item\n            type=\"button\"\n            @click=${()=>{this._state=`PROVISION`,this._client.state===Ls.PROVISIONED&&(this._provisionForce=!0)}}\n          >\n            ${ks}\n            <div slot=\"headline\">\n              ${this._client.state===Ls.READY?`Connect to Wi-Fi`:`Change Wi-Fi`}\n            </div>\n          </ew-list-item>\n          <ew-list-item\n            type=\"button\"\n            @click=${async()=>{let e=this._client;e&&(await this._closeClientWithoutEvents(e),await Xe(100)),this._client=void 0,this._state=`LOGS`}}\n          >\n            ${As}\n            <div slot=\"headline\">Logs & Console</div>\n          </ew-list-item>\n          ${this._isSameFirmware&&this._manifest.funding_url?x`\n                <ew-list-item\n                  type=\"link\"\n                  href=${this._manifest.funding_url}\n                  target=\"_blank\"\n                >\n                  ${Ps}\n                  <div slot=\"headline\">Fund Development</div>\n                </ew-list-item>\n              `:``}\n          ${this._isSameVersion?x`\n                <ew-list-item\n                  type=\"button\"\n                  class=\"danger\"\n                  @click=${()=>this._startInstall(!0)}\n                >\n                  ${Ns}\n                  <div slot=\"headline\">Erase User Data</div>\n                </ew-list-item>\n              `:``}\n        </ew-list>\n      </div>\n    `,[e,t,!0]}_renderDashboardNoImprov(){let e=this._manifest.name,t;return t=x`\n      <div slot=\"content\">\n        <ew-list>\n          <ew-list-item\n            type=\"button\"\n            @click=${()=>{this._manifest.new_install_prompt_erase?this._state=`ASK_ERASE`:this._startInstall(!0)}}\n          >\n            ${Os}\n            <div slot=\"headline\">${`Install ${this._manifest.name}`}</div>\n          </ew-list-item>\n          <ew-list-item\n            type=\"button\"\n            @click=${async()=>{this._client=void 0,this._state=`LOGS`}}\n          >\n            ${As}\n            <div slot=\"headline\">Logs & Console</div>\n          </ew-list-item>\n        </ew-list>\n      </div>\n    `,[e,t,!0]}_renderProvision(){let e=`Configure Wi-Fi`,t;if(this._busy)return[e,this._renderProgress(this._ssids===void 0?`Scanning for networks`:`Trying to connect`)];if(!this._provisionForce&&this._client.state===Ls.PROVISIONED){e=void 0;let n=!this._wasProvisioned&&(this._client.nextUrl!==void 0||`home_assistant_domain`in this._manifest);t=x`\n        <div slot=\"content\">\n          <ewt-page-message\n            .icon=${Zs}\n            label=\"Device connected to the network!\"\n          ></ewt-page-message>\n          ${n?x`\n                <ew-list>\n                  ${this._client.nextUrl===void 0?``:x`\n                        <ew-list-item\n                          type=\"link\"\n                          href=${this._client.nextUrl}\n                          target=\"_blank\"\n                          @click=${()=>{this._state=`DASHBOARD`}}\n                        >\n                          ${js}\n                          <div slot=\"headline\">Visit Device</div>\n                        </ew-list-item>\n                      `}\n                  ${this._manifest.home_assistant_domain?x`\n                        <ew-list-item\n                          type=\"link\"\n                          href=${`https://my.home-assistant.io/redirect/config_flow_start/?domain=${this._manifest.home_assistant_domain}`}\n                          target=\"_blank\"\n                          @click=${()=>{this._state=`DASHBOARD`}}\n                        >\n                          ${Ms}\n                          <div slot=\"headline\">Add to Home Assistant</div>\n                        </ew-list-item>\n                      `:``}\n                  <ew-list-item\n                    type=\"button\"\n                    @click=${()=>{this._state=`DASHBOARD`}}\n                  >\n                    <div slot=\"start\" class=\"fake-icon\"></div>\n                    <div slot=\"headline\">Skip</div>\n                  </ew-list-item>\n                </ew-list>\n              `:``}\n        </div>\n\n        ${n?``:x`\n              <div slot=\"actions\">\n                <ew-text-button\n                  @click=${()=>{this._state=`DASHBOARD`}}\n                >\n                  Continue\n                </ew-text-button>\n              </div>\n            `}\n      `}else{let e;switch(this._client.error){case 3:e=`Unable to connect`;break;case 254:e=`Timeout`;break;case 0:case 2:break;default:e=`Unknown error (${this._client.error})`}let n=this._ssids?.find(e=>e.name===this._selectedSsid);t=x`\n        <ew-icon-button slot=\"headline\" @click=${this._updateSsids}>\n          ${Ds}\n        </ew-icon-button>\n        <div slot=\"content\">\n          <div>Connect your device to the network to start using it.</div>\n          ${e?x`<p class=\"error\">${e}</p>`:``}\n          ${this._ssids===null?``:x`\n                <ew-filled-select\n                  menu-positioning=\"fixed\"\n                  label=\"Network\"\n                  @change=${e=>{let t=e.target.selectedIndex;this._selectedSsid=t===this._ssids.length?null:this._ssids[t].name}}\n                >\n                  ${this._ssids.map(e=>x`\n                      <ew-select-option\n                        .selected=${n===e}\n                        .value=${e.name}\n                      >\n                        ${e.name}\n                      </ew-select-option>\n                    `)}\n                  <ew-divider></ew-divider>\n                  <ew-select-option .selected=${!n}>\n                    Join other…\n                  </ew-select-option>\n                </ew-filled-select>\n              `}\n          ${n?``:x`\n                  <ew-filled-text-field\n                    label=\"Network Name\"\n                    name=\"ssid\"\n                  ></ew-filled-text-field>\n                `}\n          ${!n||n.secured?x`\n                <ew-filled-text-field\n                  label=\"Password\"\n                  name=\"password\"\n                  type=\"password\"\n                ></ew-filled-text-field>\n              `:``}\n        </div>\n        <div slot=\"actions\">\n          <ew-text-button\n            @click=${()=>{this._state=`DASHBOARD`}}\n          >\n            ${this._installState&&this._installErase?`Skip`:`Back`}\n          </ew-text-button>\n          <ew-text-button @click=${this._doProvision}>Connect</ew-text-button>\n        </div>\n      `}return[e,t]}_renderAskErase(){return[`Erase device`,x`\n      <div slot=\"content\">\n        <div>\n          Do you want to erase the device before installing\n          ${this._manifest.name}? All data on the device will be lost.\n        </div>\n        <label class=\"formfield\">\n          <ew-checkbox touch-target=\"wrapper\" class=\"danger\"></ew-checkbox>\n          Erase device\n        </label>\n      </div>\n      <div slot=\"actions\">\n        <ew-text-button\n          @click=${()=>{this._state=`DASHBOARD`}}\n        >\n          Back\n        </ew-text-button>\n        <ew-text-button\n          @click=${()=>{let e=this.shadowRoot.querySelector(`ew-checkbox`);this._startInstall(e.checked)}}\n        >\n          Next\n        </ew-text-button>\n      </div>\n    `]}_renderInstall(){let e,t,n=!this._installErase&&this._isSameFirmware;if(!this._installConfirmed&&this._isSameVersion)e=`Erase User Data`,t=x`\n        <div slot=\"content\">\n          Do you want to reset your device and erase all user data from your\n          device?\n        </div>\n        <div slot=\"actions\">\n          <ew-text-button class=\"danger\" @click=${this._confirmInstall}>\n            Erase User Data\n          </ew-text-button>\n        </div>\n      `;else if(!this._installConfirmed){e=`Confirm Installation`;let r=n?`update to`:`install`;t=x`\n        <div slot=\"content\">\n          ${n?x`Your device is running\n                ${this._info.firmware}&nbsp;${this._info.version}.<br /><br />`:``}\n          Do you want to ${r}\n          ${this._manifest.name}&nbsp;${this._manifest.version}?\n          ${this._installErase?x`<br /><br />All data on the device will be erased.`:``}\n        </div>\n        <div slot=\"actions\">\n          <ew-text-button\n            @click=${()=>{this._state=`DASHBOARD`}}\n          >\n            Back\n          </ew-text-button>\n          <ew-text-button @click=${this._confirmInstall}>\n            Install\n          </ew-text-button>\n        </div>\n      `}else if(!this._installState||this._installState.state===`initializing`||this._installState.state===`preparing`)e=`Installing`,t=this._renderProgress(`Preparing installation`);else if(this._installState.state===`erasing`)e=`Installing`,t=this._renderProgress(`Erasing`);else if(this._installState.state===`writing`||this._installState.state===`finished`&&this._client===void 0){e=`Installing`;let n,r;this._installState.state===`finished`?r=`Wrapping up`:this._installState.details.percentage<4?r=`Installing`:n=this._installState.details.percentage,t=this._renderProgress(x`\n          ${r?x`${r}<br />`:``}\n          <br />\n          This will take\n          ${this._installState.chipFamily===`ESP8266`?`a minute`:`2 minutes`}.<br />\n          Keep this page visible to prevent slow down\n        `,n)}else if(this._installState.state===`finished`){e=void 0;let n=this._client!==null;t=x`\n        <ewt-page-message\n          slot=\"content\"\n          .icon=${Zs}\n          label=\"Installation complete!\"\n        ></ewt-page-message>\n\n        <div slot=\"actions\">\n          <ew-text-button\n            @click=${()=>{this._state=n&&this._installErase?`PROVISION`:`DASHBOARD`}}\n          >\n            Next\n          </ew-text-button>\n        </div>\n      `}else this._installState.state===`error`&&(e=`Installation failed`,t=x`\n        <ewt-page-message\n          slot=\"content\"\n          .icon=${Xs}\n          .label=${this._installState.message}\n        ></ewt-page-message>\n        <div slot=\"actions\">\n          <ew-text-button\n            @click=${async()=>{this._initialize(),this._state=`DASHBOARD`}}\n          >\n            Back\n          </ew-text-button>\n        </div>\n      `);return[e,t,!1]}_renderLogs(){let e;return e=x`\n      <div slot=\"content\">\n        <ewt-console .port=${this.port} .logger=${this.logger}></ewt-console>\n      </div>\n      <div slot=\"actions\">\n        <ew-text-button\n          @click=${async()=>{await this.shadowRoot.querySelector(`ewt-console`).reset()}}\n        >\n          Reset Device\n        </ew-text-button>\n        <ew-text-button\n          @click=${()=>{qs(this.shadowRoot.querySelector(`ewt-console`).logs(),`esp-web-tools-logs.txt`),this.shadowRoot.querySelector(`ewt-console`).reset()}}\n        >\n          Download Logs\n        </ew-text-button>\n        <ew-text-button\n          @click=${async()=>{await this.shadowRoot.querySelector(`ewt-console`).disconnect(),this._state=`DASHBOARD`,this._initialize()}}\n        >\n          Back\n        </ew-text-button>\n      </div>\n    `,[`Logs`,e]}willUpdate(e){e.has(`_state`)&&(this._state!==`ERROR`&&(this._error=void 0),this._state===`PROVISION`?this._updateSsids():this._provisionForce=!1,this._state===`INSTALL`&&(this._installConfirmed=!1,this._installState=void 0))}async _updateSsids(e=0){let t=this._ssids;this._ssids=void 0,this._busy=!0;let n;try{n=await this._client.scan()}catch{this._ssids===void 0&&(this._ssids=null,this._selectedSsid=null),this._busy=!1;return}if(n.length===0&&e<3){console.log(`SCHEDULE RETRY`,e),setTimeout(()=>this._updateSsids(e+1),2e3);return}t?this._selectedSsid&&!n.find(e=>e.name===this._selectedSsid)&&(this._selectedSsid=n[0].name):this._selectedSsid=n.length?n[0].name:null,this._ssids=n,this._busy=!1}firstUpdated(e){super.firstUpdated(e),this._bodyOverflow=document.body.style.overflow,document.body.style.overflow=`hidden`,this._initialize()}updated(e){super.updated(e),e.has(`_state`)&&this.setAttribute(`state`,this._state),this._state===`PROVISION`&&(e.has(`_selectedSsid`)&&this._selectedSsid===null?this._focusFormElement(`ew-filled-text-field[name=ssid]`):e.has(`_ssids`)&&this._focusFormElement())}_focusFormElement(e=`ew-filled-text-field, ew-filled-select`){let t=this.shadowRoot.querySelector(e);t&&t.updateComplete.then(()=>setTimeout(()=>t.focus(),100))}async _initialize(e=!1){if(this.port.readable===null||this.port.writable===null){this._state=`ERROR`,this._error=`Serial port is not readable/writable. Close any other application using it and try again.`;return}try{this._manifest=await Ys(this.manifestPath)}catch{this._state=`ERROR`,this._error=`Failed to download manifest`;return}if(this._manifest.new_install_improv_wait_time===0){this._client=null;return}let t=new Us(this.port,this.logger);t.addEventListener(`state-changed`,()=>{this.requestUpdate()}),t.addEventListener(`error-changed`,()=>this.requestUpdate());try{let n=e?this._manifest.new_install_improv_wait_time===void 0?1e4:this._manifest.new_install_improv_wait_time*1e3:1e3;this._info=await t.initialize(n),this._client=t,t.addEventListener(`disconnect`,this._handleDisconnect)}catch(e){this._info=void 0,e instanceof zs?(this._state=`ERROR`,this._error=`Serial port is not ready. Close any other application using it and try again.`):(this._client=null,this.logger.error(`Improv initialization failed.`,e))}}_startInstall(e){this._state=`INSTALL`,this._installErase=e,this._installConfirmed=!1}async _confirmInstall(){this._installConfirmed=!0,this._installState=void 0,this._client&&await this._closeClientWithoutEvents(this._client),this._client=void 0,await this.port.close(),Gs(e=>{this._installState=e,e.state===`finished`?Xe(100).then(()=>this.port.open({baudRate:115200,bufferSize:8192})).then(()=>this._initialize(!0)).then(()=>this.requestUpdate()):e.state===`error`&&Xe(100).then(()=>this.port.open({baudRate:115200,bufferSize:8192}))},this.port,this.manifestPath,this._manifest,this._installErase)}async _doProvision(){this._busy=!0,this._wasProvisioned=this._client.state===Ls.PROVISIONED;let e=this._selectedSsid===null?this.shadowRoot.querySelector(`ew-filled-text-field[name=ssid]`).value:this._selectedSsid,t=this.shadowRoot.querySelector(`ew-filled-text-field[name=password]`)?.value||``;try{await this._client.provision(e,t,3e4)}catch{return}finally{this._busy=!1,this._provisionForce=!1}}_closeDialog(){this.shadowRoot.querySelector(`ew-dialog`).close()}async _handleClose(){this._client&&await this._closeClientWithoutEvents(this._client),Js(this,`closed`),document.body.style.overflow=this._bodyOverflow,this.parentNode.removeChild(this)}get _isSameFirmware(){return this._info?this.overrides?.checkSameFirmware?this.overrides.checkSameFirmware(this._manifest,this._info):this._info.firmware===this._manifest.name:!1}get _isSameVersion(){return this._isSameFirmware&&this._info.version===this._manifest.version}async _closeClientWithoutEvents(e){e.removeEventListener(`disconnect`,this._handleDisconnect),await e.close()}_preventDefault(e){e.preventDefault()}};$.styles=[te,s`\n      :host {\n        --mdc-dialog-max-width: 390px;\n      }\n      div[slot=\"headline\"] {\n        padding-right: 48px;\n      }\n      ew-icon-button[slot=\"headline\"] {\n        position: absolute;\n        right: 4px;\n        top: 8px;\n      }\n      ew-icon-button[slot=\"headline\"] svg {\n        padding: 8px;\n        color: var(--text-color);\n      }\n      .dialog-nav svg {\n        color: var(--text-color);\n      }\n      .table-row {\n        display: flex;\n      }\n      .table-row.last {\n        margin-bottom: 16px;\n      }\n      .table-row svg {\n        width: 20px;\n        margin-right: 8px;\n      }\n      ew-filled-text-field,\n      ew-filled-select {\n        display: block;\n        margin-top: 16px;\n      }\n      label.formfield {\n        display: inline-flex;\n        align-items: center;\n        padding-right: 8px;\n      }\n      ew-list {\n        margin: 0 -24px;\n        padding: 0;\n      }\n      ew-list-item svg {\n        height: 24px;\n      }\n      ewt-page-message + ew-list {\n        padding-top: 16px;\n      }\n      .fake-icon {\n        width: 24px;\n      }\n      .error {\n        color: var(--danger-color);\n      }\n      .danger {\n        --mdc-theme-primary: var(--danger-color);\n        --mdc-theme-secondary: var(--danger-color);\n        --md-sys-color-primary: var(--danger-color);\n        --md-sys-color-on-surface: var(--danger-color);\n      }\n      button.link {\n        background: none;\n        color: inherit;\n        border: none;\n        padding: 0;\n        font: inherit;\n        text-align: left;\n        text-decoration: underline;\n        cursor: pointer;\n      }\n      :host([state=\"LOGS\"]) ew-dialog {\n        max-width: 90vw;\n        max-height: 90vh;\n      }\n      ewt-console {\n        width: calc(80vw - 48px);\n        height: calc(90vh - 168px);\n      }\n    `],c([j()],$.prototype,`_client`,void 0),c([j()],$.prototype,`_state`,void 0),c([j()],$.prototype,`_installErase`,void 0),c([j()],$.prototype,`_installConfirmed`,void 0),c([j()],$.prototype,`_installState`,void 0),c([j()],$.prototype,`_provisionForce`,void 0),c([j()],$.prototype,`_error`,void 0),c([j()],$.prototype,`_busy`,void 0),c([j()],$.prototype,`_ssids`,void 0),c([j()],$.prototype,`_selectedSsid`,void 0),customElements.define(`ewt-install-dialog`,$);export{$ as EwtInstallDialog};"
  },
  {
    "path": "docs/assets/no-port-picked-DMlthFiI.js",
    "content": "import{C as e,M as t,N as n,j as r,k as i,t as a,w as o}from\"./styles-Bnf3HqYs.js\";var s=()=>{let e=window.navigator.userAgent,t=window.navigator?.userAgentData?.platform||window.navigator.platform;return[`macOS`,`Macintosh`,`MacIntel`,`MacPPC`,`Mac68K`].indexOf(t)===-1?[`iPhone`,`iPad`,`iPod`].indexOf(t)===-1?[`Win32`,`Win64`,`Windows`,`WinCE`].indexOf(t)===-1?/Android/.test(e)?`Android`:/Linux/.test(t)?`Linux`:null:`Windows`:`iOS`:`Mac OS`},c=r`\n  <svg\n    version=\"1.1\"\n    id=\"Capa_1\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    x=\"0px\"\n    y=\"0px\"\n    viewBox=\"0 0 510.322 510.322\"\n    xml:space=\"preserve\"\n    style=\"width: 28px; vertical-align: middle;\"\n  >\n    <g>\n      <path\n        style=\"fill:currentColor;\"\n        d=\"M429.064,159.505c0-0.151,0.086-1.057,0.086-1.057c0-75.282-61.261-136.521-136.543-136.521    c-52.244,0-97.867,30.587-120.753,76.339c-11.67-9.081-25.108-15.682-40.273-15.682c-37.166,0-67.387,30.199-67.387,67.387    c0,0,0.453,3.279,0.798,5.824C27.05,168.716,0,203.423,0,244.516c0,25.389,9.901,49.268,27.848,67.171    c17.968,17.99,41.804,27.869,67.193,27.869h130.244v46.83h-54.66l97.694,102.008l95.602-102.008h-54.66v-46.83H419.25    c50.174,0,91.072-40.855,91.072-90.986C510.3,201.827,474.428,164.639,429.064,159.505z M419.207,312.744H309.26v-55.545h-83.975    v55.545H95.019c-18.184,0-35.333-7.075-48.211-19.996c-12.878-12.878-19.953-30.005-19.953-48.189    c0-32.68,23.21-60.808,55.264-66.956l12.511-2.394l-2.092-14.431l-1.488-10.785c0-22.347,18.184-40.51,40.531-40.51    c13.266,0,25.691,6.514,33.305,17.408l15.229,21.873l8.52-25.303c15.013-44.652,56.796-74.656,103.906-74.656    c60.506,0,109.709,49.203,109.709,109.644l-1.337,25.712l15.121,0.302l3.149-0.086c35.419,0,64.216,28.797,64.216,64.216    C483.401,283.969,454.604,312.744,419.207,312.744z\"\n      />\n    </g>\n  </svg>\n`,l=class extends o{render(){let e=s();return i`\n      <ew-dialog open @closed=${this._handleClose}>\n        <div slot=\"headline\">No port selected</div>\n        <div slot=\"content\">\n          <div>\n            If you didn't select a port because you didn't see your device\n            listed, try the following steps:\n          </div>\n          <ol>\n            <li>\n              Make sure that the device is connected to this computer (the one\n              that runs the browser that shows this website)\n            </li>\n            <li>\n              Most devices have a tiny light when it is powered on. If yours has\n              one, make sure it is on.\n            </li>\n            <li>\n              Make sure that the USB cable you use can be used for data and is\n              not a power-only cable.\n            </li>\n            ${e===`Linux`?i`\n                  <li>\n                    If you are using a Linux flavor, make sure that your user is\n                    part of the <code>dialout</code> group so it has permission\n                    to access the device.\n                    <code class=\"block\"\n                      >sudo usermod -a -G dialout YourUserName</code\n                    >\n                    You may need to log out & back in or reboot to activate the\n                    new group access.\n                  </li>\n                `:``}\n            <li>\n              Make sure you have the right drivers installed. Below are the\n              drivers for common chips used in ESP devices:\n              <ul>\n                <li>\n                  CP2102 drivers:\n                  <a\n                    href=\"https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers\"\n                    target=\"_blank\"\n                    rel=\"noopener\"\n                    >Windows & Mac</a\n                  >\n                </li>\n                <li>\n                  CH342, CH343, CH9102 drivers:\n                  <a\n                    href=\"https://www.wch.cn/downloads/CH343SER_ZIP.html\"\n                    target=\"_blank\"\n                    rel=\"noopener\"\n                    >Windows</a\n                  >,\n                  <a\n                    href=\"https://www.wch.cn/downloads/CH34XSER_MAC_ZIP.html\"\n                    target=\"_blank\"\n                    rel=\"noopener\"\n                    >Mac</a\n                  >\n                  <br />\n                  (download via blue button with ${c} icon)\n                </li>\n                <li>\n                  CH340, CH341 drivers:\n                  <a\n                    href=\"https://www.wch.cn/downloads/CH341SER_ZIP.html\"\n                    target=\"_blank\"\n                    rel=\"noopener\"\n                    >Windows</a\n                  >,\n                  <a\n                    href=\"https://www.wch.cn/downloads/CH341SER_MAC_ZIP.html\"\n                    target=\"_blank\"\n                    rel=\"noopener\"\n                    >Mac</a\n                  >\n                  <br />\n                  (download via blue button with ${c} icon)\n                </li>\n              </ul>\n            </li>\n          </ol>\n        </div>\n        <div slot=\"actions\">\n          ${this.doTryAgain?i`\n                <ew-text-button @click=${this.close}>Cancel</ew-text-button>\n                <ew-text-button @click=${this.tryAgain}>\n                  Try Again\n                </ew-text-button>\n              `:i`\n                <ew-text-button @click=${this.close}>Close</ew-text-button>\n              `}\n        </div>\n      </ew-dialog>\n    `}tryAgain(){var e;this.close(),(e=this.doTryAgain)==null||e.call(this)}close(){this.shadowRoot.querySelector(`ew-dialog`).close()}async _handleClose(){this.parentNode.removeChild(this)}};l.styles=[a,t`\n      li + li,\n      li > ul {\n        margin-top: 8px;\n      }\n      ul,\n      ol {\n        margin-bottom: 0;\n        padding-left: 1.5em;\n      }\n      li code.block {\n        display: block;\n        margin: 0.5em 0;\n      }\n    `],l=n([e(`ewt-no-port-picked-dialog`)],l);var u=async e=>{let t=document.createElement(`ewt-no-port-picked-dialog`);return t.doTryAgain=e,document.body.append(t),!0};export{u as openNoPortPickedDialog};"
  },
  {
    "path": "docs/assets/rom-D7P4LvQr.js",
    "content": "var e=class{getEraseSize(e,t){return t}};export{e as t};"
  },
  {
    "path": "docs/assets/stub_flasher_32-DMOwp-H2.js",
    "content": "var e=1074521580,t=`CAD0PxwA9D8AAPQ/AMD8PxAA9D82QQAh+v/AIAA4AkH5/8AgACgEICB0nOIGBQAAAEH1/4H2/8AgAKgEiAigoHTgCAALImYC54b0/yHx/8AgADkCHfAAAKDr/T8Ya/0/hIAAAEBAAABYq/0/pOv9PzZBALH5/yCgdBARIOXOAJYaBoH2/5KhAZCZEZqYwCAAuAmR8/+goHSaiMAgAJIYAJCQ9BvJwMD0wCAAwlgAmpvAIACiSQDAIACSGACB6v+QkPSAgPSHmUeB5f+SoQGQmRGamMAgAMgJoeX/seP/h5wXxgEAfOiHGt7GCADAIACJCsAgALkJRgIAwCAAuQrAIACJCZHX/5qIDAnAIACSWAAd8AAA+CD0P/gw9D82QQCR/f/AIACICYCAJFZI/5H6/8AgAIgJgIAkVkj/HfAAAAAQIPQ/ACD0PwAAAAg2QQAQESCl/P8h+v8MCMAgAIJiAJH6/4H4/8AgAJJoAMAgAJgIVnn/wCAAiAJ88oAiMCAgBB3wAAAAAEA2QQAQESDl+/8Wav+B7P+R+//AIACSaADAIACYCFZ5/x3wAAAMQP0/////AAQg9D82QQAh/P84QhaDBhARIGX4/xb6BQz4DAQ3qA2YIoCZEIKgAZBIg0BAdBARICX6/xARICXz/4giDBtAmBGQqwHMFICrAbHt/7CZELHs/8AgAJJrAJHO/8AgAKJpAMAgAKgJVnr/HAkMGkCag5AzwJqIOUKJIh3wAAAskgBANkEAoqDAgf3/4AgAHfAAADZBAIKgwK0Ch5IRoqDbgff/4AgAoqDcRgQAAAAAgqDbh5IIgfL/4AgAoqDdgfD/4AgAHfA2QQA6MsYCAACiAgAbIhARIKX7/zeS8R3wAAAAfNoFQNguBkCc2gVAHNsFQDYhIaLREIH6/+AIAEYLAAAADBRARBFAQ2PNBL0BrQKB9f/gCACgoHT8Ws0EELEgotEQgfH/4AgASiJAM8BWA/0iogsQIrAgoiCy0RCB7P/gCACtAhwLEBEgpff/LQOGAAAioGMd8AAA/GcAQNCSAEAIaABANkEhYqEHwGYRGmZZBiwKYtEQDAVSZhqB9//gCAAMGECIEUe4AkZFAK0GgdT/4AgAhjQAAJKkHVBzwOCZERqZQHdjiQnNB70BIKIggc3/4AgAkqQd4JkRGpmgoHSICYyqDAiCZhZ9CIYWAAAAkqQd4JkREJmAgmkAEBEgJer/vQetARARIKXt/xARICXp/80HELEgYKYggbv/4AgAkqQd4JkRGpmICXAigHBVgDe1sJKhB8CZERqZmAmAdcCXtwJG3P+G5v8MCIJGbKKkGxCqoIHK/+AIAFYK/7KiC6IGbBC7sBARIOWWAPfqEvZHD7KiDRC7sHq7oksAG3eG8f9867eawWZHCIImGje4Aoe1nCKiCxAisGC2IK0CgZv/4AgAEBEgpd//rQIcCxARICXj/xARIKXe/ywKgbH/4AgAHfAIIPQ/cOL6P0gkBkDwIgZANmEAEBEg5cr/EKEggfv/4AgAPQoMEvwqiAGSogCQiBCJARARIKXP/5Hy/6CiAcAgAIIpAKCIIMAgAIJpALIhAKHt/4Hu/+AIAKAjgx3wAAD/DwAANkEAgTv/DBmSSAAwnEGZKJH7/zkYKTgwMLSaIiozMDxBDAIpWDlIEBEgJfj/LQqMGiKgxR3wAABQLQZANkEAQSz/WDRQM2MWYwRYFFpTUFxBRgEAEBEgZcr/iESmGASIJIel7xARIKXC/xZq/6gUzQO9AoHx/+AIAKCgdIxKUqDEUmQFWBQ6VVkUWDQwVcBZNB3wAADA/D9PSEFJqOv9P3DgC0AU4AtADAD0PzhA9D///wAAjIAAABBAAACs6/0/vOv9P2CQ9D//j///ZJD0P2iQ9D9ckPQ/BMD8PwjA/D8E7P0/FAD0P/D//wCo6/0/DMD8PyRA/T98aABA7GcAQFiGAEBsKgZAODIGQBQsBkDMLAZATCwGQDSFAEDMkABAeC4GQDDvBUBYkgBATIIAQDbBACHZ/wwKImEIQqAAge7/4AgAIdT/MdX/xgAASQJLIjcy+BARICXC/wxLosEgEBEgpcX/IqEBEBEg5cD/QYz+kCIRKiQxyv+xyv/AIABJAiFz/gwMDFoyYgCB3P/gCAAxxf9SoQHAIAAoAywKUCIgwCAAKQOBLP/gCACB1f/gCAAhvv/AIAAoAsy6HMMwIhAiwvgMEyCjgwwLgc7/4AgA8bf/DB3CoAGyoAHioQBA3REAzBGAuwGioACBx//gCAAhsP9Rv/4qRGLVK8AgACgEFnL/wCAAOAQMBwwSwCAAeQQiQRAiAwEMKCJBEYJRCXlRJpIHHDd3Eh3GBwAiAwNyAwKAIhFwIiBmQhAoI8AgACgCKVEGAQAcIiJRCRARIGWy/wyLosEQEBEgJbb/ggMDIgMCgIgRIIggIZP/ICD0h7IcoqDAEBEg5bD/oqDuEBEgZbD/EBEg5a7/Rtv/AAAiAwEcNyc3NPYiGEbvAAAAIsIvICB09kJwcYT/cCKgKAKgAgAiwv4gIHQcFye3AkbmAHF//3AioCgCoAIAcsIwcHB0tlfJhuAALEkMByKgwJcYAobeAHlRDHKtBxARIKWp/60HEBEgJan/EBEgpaf/EBEgZaf/DIuiwRAiwv8QESClqv9WIv1GKAAMElZoM4JhD4F6/+AIAIjxoCiDRskAJogFDBJGxwAAeCMoMyCHIICAtFbI/hARICXG/yp3nBrG9/8AoKxBgW7/4AgAVir9ItLwIKfAzCIGnAAAoID0Vhj+hgQAoKD1ifGBZv/gCACI8Vba+oAiwAwYAIgRIKfAJzjhBgQAAACgrEGBXf/gCABW6vgi0vAgp8BWov7GigAADAcioMAmiAIGqQAMBy0HRqcAJrj1Bn0ADBImuAIGoQC4M6gjDAcQESDloP+gJ4OGnAAMGWa4XIhDIKkRDAcioMKHugIGmgC4U6IjApJhDhARIOW//5jhoJeDhg0ADBlmuDGIQyCpEQwHIqDCh7oCRo8AKDO4U6gjIHiCmeEQESDlvP8hL/4MCJjhiWIi0it5IqCYgy0JxoIAkSn+DAeiCQAioMZ3mgJGgQB4I4LI8CKgwIeXAShZDAeSoO9GAgB6o6IKGBt3oJkwhyfyggMFcgMEgIgRcIggcgMGAHcRgHcgggMHgIgBcIgggJnAgqDBDAeQKJPGbQCBEf4ioMaSCAB9CRaZGpg4DAcioMh3GQIGZwAoWJJIAEZiAByJDAcMEpcYAgZiAPhz6GPYU8hDuDOoI4EJ/+AIAAwIfQqgKIMGWwAMEiZIAkZWAJHy/oHy/sAgAHgJMCIRgHcQIHcgqCPAIAB5CZHt/gwLwCAAeAmAdxAgdyDAIAB5CZHp/sAgAHgJgHcQIHcgwCAAeQmR5f7AIAB4CYB3ECAnIMAgACkJgez+4AgABiAAAAAAgJA0DAcioMB3GQIGPQCAhEGLs3z8xg4AqDuJ8ZnhucHJ0YHm/uAIALjBiPEoK3gbqAuY4cjRcHIQJgINwCAA2AogLDDQIhAgdyDAIAB5ChuZsssQhznAxoD/ZkgCRn//DAcioMCGJgAMEia4AsYhACHC/ohTeCOJAiHB/nkCDAIGHQCxvf4MB9gLDBqCyPCdBy0HgCqT0JqDIJkQIqDGd5lgwbf+fQnoDCKgyYc+U4DwFCKgwFavBC0JhgIAACqTmGlLIpkHnQog/sAqfYcy7Rap2PkMeQvGYP8MEmaIGCGn/oIiAIwYgqDIDAd5AiGj/nkCDBKAJ4MMB0YBAAAMByKg/yCgdBARICVy/3CgdBARIGVx/xARICVw/1bytyIDARwnJzcf9jICRtz+IsL9ICB0DPcntwLG2P5xkv5wIqAoAqACAAByoNJ3Ek9yoNR3EncG0v6IM6KiccCqEXgjifGBlv7gCAAhh/6RiP7AIAAoAojxIDQ1wCIRkCIQICMggCKCDApwssKBjf7gCACio+iBiv7gCADGwP4AANhTyEO4M6gjEBEgZXX/Brz+ALIDAyIDAoC7ESC7ILLL8KLDGBARIKWR/wa1/gAiAwNyAwKAIhFwIiBxb/0iwvCIN4AiYxaSq4gXioKAjEFGAgCJ8RARIKVa/4jxmEemGQSYJ5eo6xARIOVS/xZq/6gXzQKywxiBbP7gCACMOjKgxDlXOBcqMzkXODcgI8ApN4ab/iIDA4IDAnLDGIAiETg1gCIgIsLwVsMJ9lIChiUAIqDJRioAMU/+gU/96AMpceCIwIlhiCatCYeyAQw6meGp0enBEBEgpVL/qNGBRv6pAejBoUX+3Qi9B8LBHPLBGInxgU7+4AgAuCbNCqhxmOGgu8C5JqAiwLgDqneoYYjxqrsMCrkDwKmDgLvAoNB0zJri24CtDeCpgxbqAa0IifGZ4cnREBEgpYD/iPGY4cjRiQNGAQAAAAwcnQyMsjg1jHPAPzHAM8CWs/XWfAAioMcpVQZn/lacmSg1FkKZIqDIBvv/qCNWmpiBLf7gCACionHAqhGBJv7gCACBKv7gCACGW/4AACgzFnKWDAqBJP7gCACio+iBHv7gCADgAgAGVP4d8AAAADZBAJ0CgqDAKAOHmQ/MMgwShgcADAIpA3zihg8AJhIHJiIYhgMAAACCoNuAKSOHmSoMIikDfPJGCAAAACKg3CeZCgwSKQMtCAYEAAAAgqDdfPKHmQYMEikDIqDbHfAAAA==`,n=1074520064,r=`DMD8P+znC0B/6AtAZ+0LQAbpC0Cf6AtABukLQGXpC0CC6gtA9OoLQJ3qC0CV5wtAGuoLQHTqC0CI6QtAGOsLQLDpC0AY6wtAbegLQMroC0AG6QtAZekLQIXoC0DI6wtAKe0LQLjmC0BL7QtAuOYLQLjmC0C45gtAuOYLQLjmC0C45gtAuOYLQLjmC0Bv6wtAuOYLQEnsC0Ap7QtA`,i=1073605544,a=1073528832,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/stub_flasher_32c2-BglC1CA-.js",
    "content": "var e=1077413304,t=`ARG3BwBgTsaDqYcASsg3Sco/JspSxAbOIsy3BABgfVoTCQkAwEwTdPQ/DeDyQGJEI6g0AUJJ0kSySSJKBWGCgIhAgycJABN19Q+Cl30U4xlE/8m/EwcADJRBqodjGOUAhUeFxiOgBQB5VYKABUdjh+YACUZjjcYAfVWCgEIFEwewDUGFY5XnAolHnMH1t5MGwA1jFtUAmMETBQAMgoCTBtANfVVjldcAmMETBbANgoC3dcs/QRGThQW6BsZhP2NFBQa3d8s/k4eHsQOnBwgD1kcIE3X1D5MGFgDCBsGCI5LXCDKXIwCnAAPXRwiRZ5OHBwRjHvcCN/fKPxMHh7GhZ7qXA6YHCLc2yz+3d8s/k4eHsZOGhrVjH+YAI6bHCCOg1wgjkgcIIaD5V+MG9fyyQEEBgoAjptcII6DnCN23NycAYHxLnYv1/zc3AGB8S52L9f+CgEERBsbdN7cnAGAjpgcCNwcACJjDmEN9/8hXskATRfX/BYlBAYKAQREGxtk/fd03BwBAtycAYJjDNycAYBxD/f+yQEEBgoBBESLEN8TKP5MHxABKwAOpBwEGxibCYwoJBEU3OcW9RxMExACBRGPWJwEERL2Ik7QUAH03hT8cRDcGgAATl8cAmeA3BgABt/b/AHWPtyYAYNjCkMKYQn3/QUeR4AVHMwnpQLqXIygkARzEskAiRJJEAklBAYKAQREGxhMHAAxjEOUCEwWwDZcAyP/ngIDjEwXADbJAQQEXA8j/ZwCD4hMHsA3jGOX+lwDI/+eAgOETBdANxbdBESLEJsIGxiqEswS1AGMXlACyQCJEkkRBAYKAA0UEAAUERTfttxMFAAwXA8j/ZwAD3nVxJsPO3v10hWn9cpOEhPqThwkHIsVKwdLc1tqmlwbHFpGzhCcAKokmhS6ElzDI/+eAgJOThwkHBWqKl7OKR0Ep5AVnfXUTBIX5kwcHB6KXM4QnABMFhfqTBwcHqpeihTOFJwCXMMj/54CAkCKFwUW5PwFFhWIWkbpAKkSaRApJ9llmWtZaSWGCgKKJY3OKAIVpTobWhUqFlwDI/+eAQOITdfUPAe1OhtaFJoWXMMj/54DAi06ZMwQ0QVm3EwUwBlW/cXH9ck7PUs1Wy17HBtci1SbTStFayWLFZsNqwe7eqokWkRMFAAIuirKKtosCwpcAyP/ngEBIhWdj7FcRhWR9dBMEhPqThwQHopczhCcAIoWXMMj/54AghX17Eww7+ZMMi/kThwQHk4cEB2KX5pcBSTMMJwCzjCcAEk1je00JY3GpA3mgfTWmhYgYSTVdNSaGjBgihZcwyP/ngCCBppkmmWN1SQOzB6lBY/F3A7MEKkFj85oA1oQmhowYToWXAMj/54Dg0xN19Q9V3QLEgUR5XY1NowEBAGKFlwDI/+eAYMR9+QNFMQDmhS0xY04FAOPinf6FZ5OHBweml4qX2pcjiqf4hQT5t+MWpf2RR+OG9PYFZ311kwcHBxMEhfmilzOEJwATBYX6kwcHB6qXM4UnAKKFlyDI/+eAgHflOyKFwUXxM8U7EwUAApcAyP/ngOA2hWIWkbpQKlSaVApZ+klqStpKSku6SypMmkwKTfZdTWGCgAERBs4izFExNwTOP2wAEwVE/5cAyP/ngKDKqocFRZXnskeT9wcgPsZ5OTcnAGAcR7cGQAATBUT/1Y8cx7JFlwDI/+eAIMgzNaAA8kBiRAVhgoBBEbfHyj8GxpOHxwAFRyOA5wAT18UAmMcFZ30XzMPIx/mNOpWqlbGBjMsjqgcAQTcZwRMFUAyyQEEBgoABESLMN8TKP5MHxAAmysRHTsYGzkrIqokTBMQAY/OVAK6EqcADKUQAJpkTWckAHEhjVfAAHERjXvkC4T593UhAJobOhZcAyP/ngCC7E3X1DwHFkwdADFzIXECml1zAXESFj1zE8kBiRNJEQkmySQVhgoDdNm2/t1dBSRlxk4f3hAFFPs6G3qLcptrK2M7W0tTW0trQ3s7izObK6sjuxpcAyP/ngICtt0fKPzd3yz+ThwcAEweHumPg5xSlOZFFaAixMYU5t/fKP5OHh7EhZz6XIyD3CLcFOEC3BzhAAUaThwcLk4UFADdJyj8VRSMg+QCXAMj/54DgGzcHAGBcRxMFAAK3xMo/k+cXEFzHlwDI/+eAoBq3RwBgiF+BRbd5yz9xiWEVEzUVAJcAyP/ngOCwwWf9FxMHABCFZkFmtwUAAQFFk4TEALdKyj8NapcAyP/ngOCrk4mJsRMJCQATi8oAJpqDp8kI9d+Dq8kIhUcjpgkIIwLxAoPHGwAJRyMT4QKjAvECAtRNR2OL5wZRR2OJ5wYpR2Of5wCDxzsAA8crAKIH2Y8RR2OW5wCDp4sAnEM+1EE2oUVIEJE+g8c7AAPHKwCiB9mPEWdBB2N+9wITBbANlwDI/+eAQJQTBcANlwDI/+eAgJMTBeAOlwDI/+eAwJKBNr23I6AHAJEHbb3JRyMT8QJ9twPHGwDRRmPn5gKFRmPm5gABTBME8A+dqHkXE3f3D8lG4+jm/rd2yz8KB5OGxro2lxhDAoeTBgcDk/b2DxFG42nW/BMH9wITd/cPjUZj7uYIt3bLPwoHk4aGvzaXGEMChxMHQAJjmucQAtQdRAFFlwDI/+eAIIoBRYE8TTxFPKFFSBB9FEk0ffABTAFEE3X0DyU8E3X8Dw08UTzjEQTsg8cbAElHY2X3MAlH43n36vUXk/f3Dz1H42P36jd3yz+KBxMHh8C6l5xDgocFRJ3rcBCBRQFFlwDI/+eAQIkd4dFFaBAVNAFEMagFRIHvlwDI/+eAwI0zNKAAKaAhR2OF5wAFRAFMYbcDrIsAA6TLALNnjADSB/X3mTll9cFsIpz9HH19MwWMQF3cs3eVAZXjwWwzBYxAY+aMAv18MwWMQF3QMYGXAMj/54Bgil35ZpT1tzGBlwDI/+eAYIld8WqU0bdBgZcAyP/ngKCIWfkzBJRBwbchR+OK5/ABTBMEAAw5t0FHzb9BRwVE453n9oOlywADpYsAVTK5v0FHBUTjk+f2A6cLAZFnY+jnHoOlSwEDpYsAMTGBt0FHBUTjlOf0g6cLARFnY2n3HAOnywCDpUsBA6WLADOE5wLdNiOsBAAjJIqwCb8DxwQAYwMHFAOniwDBFxMEAAxjE/cAwEgBR5MG8A5jRvcCg8dbAAPHSwABTKIH2Y8Dx2sAQgddj4PHewDiB9mP44T25hMEEAyFtTOG6wADRoYBBQexjuG3g8cEAP3H3ERjnQcUwEgjgAQAVb1hR2OW5wKDp8sBA6eLAYOmSwEDpgsBg6XLAAOliwCX8Mf/54BgeSqMMzSgAAG9AUwFRCm1EUcFROOd5+a3lwBgtENld30XBWb5jtGOA6WLALTDtEeBRfmO0Y60x/RD+Y7RjvTD1F91j1GP2N+X8Mf/54BAdwW1E/f3AOMXB+qT3EcAE4SLAAFMfV3jd5zbSESX8Mf/54DAYRhEVEAQQPmOYwenARxCE0f3/32P2Y4UwgUMQQTZvxFHtbVBRwVE45rn3oOniwADp0sBIyT5ACMi6QDJs4MlSQDBF5Hlic8BTBMEYAyhuwMniQBjZvcGE/c3AOMbB+IDKIkAAUYBRzMF6ECzhuUAY2n3AOMHBtIjJKkAIyLZAA2zM4brABBOEQeQwgVG6b8hRwVE45Tn2AMkiQAZwBMEgAwjJAkAIyIJADM0gAC9swFMEwQgDMW5AUwTBIAM5bEBTBMEkAzFsRMHIA1jg+cMEwdADeOR57oDxDsAg8crACIEXYyX8Mf/54BgXwOsxABBFGNzhAEijOMPDLbAQGKUMYCcSGNV8ACcRGNa9Arv8I/hdd3IQGKGk4WLAZfwx//ngGBbAcWTB0AM3MjcQOKX3MDcRLOHh0HcxJfwx//ngEBaFb4JZRMFBXEDrMsAA6SLAJfwx//ngEBMtwcAYNhLtwYAAcEWk1dHARIHdY+9i9mPs4eHAwFFs9WHApfwx//ngOBMEwWAPpfwx//ngOBI3bSDpksBA6YLAYOlywADpYsA7/Av98G8g8U7AIPHKwAThYsBogXdjcEVqTptvO/w79qBtwPEOwCDxysAE4yLASIEXYzcREEUxeORR4VLY/6HCJMHkAzcyHm0A6cNACLQBUizh+xAPtaDJ4qwY3P0AA1IQsY6xO/wb9YiRzJIN8XKP+KFfBCThsoAEBATBUUCl/DH/+eA4Ek398o/kwjHAIJXA6eIsIOlDQAdjB2PPpyyVyOk6LCqi76VI6C9AJOHygCdjQHFoWdjlvUAWoVdOCOgbQEJxNxEmcPjQHD5Y98LAJMHcAyFv4VLt33LP7fMyj+TjY26k4zMAOm/45ULntxE44IHnpMHgAyxt4OniwDjmwecAUWX8Mf/54DAOQllEwUFcZfwx//ngCA2l/DH/+eA4DlNugOkywDjBgSaAUWX8Mf/54AgNxMFgD6X8Mf/54CgMwKUQbr2UGZU1lRGWbZZJlqWWgZb9ktmTNZMRk22TQlhgoA=`,n=1077411840,r=`DEDKP+AIOEAsCThAhAk4QFIKOEC+CjhAbAo4QKgHOEAOCjhATgo4QJgJOEBYBzhAzAk4QFgHOEC6CDhA/gg4QCwJOECECThAzAg4QBIIOEBCCDhAyAg4QBYNOEAsCThA1gs4QMoMOECkBjhA9Aw4QKQGOECkBjhApAY4QKQGOECkBjhApAY4QKQGOECkBjhAcgs4QKQGOEDyCzhAygw4QA==`,i=1070295976,a=1070219264,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/stub_flasher_32c3-DVjTuHxm.js",
    "content": "var e=1077413584,t=`QREixCbCBsa3NwRgEUc3RMg/2Mu3NARgEwQEANxAkYuR57JAIkSSREEBgoCIQBxAE3X1D4KX3bcBEbcHAGBOxoOphwBKyDdJyD8mylLEBs4izLcEAGB9WhMJCQDATBN09D8N4PJAYkQjqDQBQknSRLJJIkoFYYKAiECDJwkAE3X1D4KXfRTjGUT/yb8TBwAMlEGqh2MY5QCFR4XGI6AFAHlVgoAFR2OH5gAJRmONxgB9VYKAQgUTB7ANQYVjlecCiUecwfW3kwbADWMW1QCYwRMFAAyCgJMG0A19VWOV1wCYwRMFsA2CgLd1yT9BEZOFxboGxmE/Y0UFBrd3yT+Th0eyA6cHCAPWRwgTdfUPkwYWAMIGwYIjktcIMpcjAKcAA9dHCJFnk4cHBGMe9wI398g/EwdHsqFnupcDpgcItzbJP7d3yT+Th0eyk4ZGtmMf5gAjpscII6DXCCOSBwghoPlX4wb1/LJAQQGCgCOm1wgjoOcI3bc3JwBgfEudi/X/NzcAYHxLnYv1/4KAQREGxt03tycAYCOmBwI3BwAImMOYQ33/yFeyQBNF9f8FiUEBgoBBEQbG2T993TcHAEC3JwBgmMM3JwBgHEP9/7JAQQGCgEERIsQ3xMg/kweEAUrAA6kHAQbGJsJjCgkERTc5xb1HEwSEAYFEY9YnAQREvYiTtBQAfTeFPxxENwaAABOXxwCZ4DcGAAG39v8AdY+3JgBg2MKQwphCff9BR5HgBUczCelAupcjKCQBHMSyQCJEkkQCSUEBgoABEQbOIswlNzcEzj9sABMFRP+XAMj/54Ag8KqHBUWV57JHk/cHID7GiTc3JwBgHEe3BkAAEwVE/9WPHMeyRZcAyP/ngKDtMzWgAPJAYkQFYYKAQRG3x8g/BsaTh4cBBUcjgOcAE9fFAJjHBWd9F8zDyMf5jTqVqpWxgYzLI6oHAEE3GcETBVAMskBBAYKAAREizDfEyD+TB4QBJsrER07GBs5KyKqJEwSEAWPzlQCuhKnAAylEACaZE1nJABxIY1XwABxEY175ArU9fd1IQCaGzoWXAMj/54Ag4RN19Q8BxZMHQAxcyFxAppdcwFxEhY9cxPJAYkTSREJJskkFYYKAaTVtv0ERBsaXAMj/54AA1gNFhQGyQHUVEzUVAEEBgoBBEQbGxTcdyTdHyD8TBwcAXEONxxBHHcK3BgxgmEYNinGbUY+YxgVmuE4TBgbA8Y99dhMG9j9xj9mPvM6yQEEBgoBBEQbGeT8RwQ1FskBBARcDyP9nAIPMQREGxibCIsSqhJcAyP/ngODJrT8NyTdHyD+TBgcAg9fGABMEBwCFB8IHwYMjlvYAkwYADGOG1AATB+ADY3X3AG03IxYEALJAIkSSREEBgoBBEQbGEwcADGMa5QATBbANRTcTBcANskBBAVm/EwewDeMb5f5xNxMF0A31t0ERIsQmwgbGKoSzBLUAYxeUALJAIkSSREEBgoADRQQABQRNP+23NXEmy07H/XKFaf10Is1KyVLFVsMGz5OEhPoWkZOHCQemlxgIs4TnACqJJoUuhJcAyP/ngEAYk4cJBxgIBWq6l7OKR0Ex5AVnfXWTBYX6kwcHBxMFhfkUCKqXM4XXAJMHBweul7OF1wAqxpcAyP/ngAAVMkXBRZU3AUWFYhaR+kBqRNpESkm6SSpKmkoNYYKAooljc4oAhWlOhtaFSoWXAMj/54AAwxN19Q8B7U6G1oUmhZcAyP/ngEAQTpkzBDRBUbcTBTAGVb8TBQAMSb0xcf1yBWdO11LVVtNezwbfIt0m20rZWtFizWbLaslux/13FpETBwcHPpccCLqXPsYjqgf4qokuirKKtovFM5MHAAIZwbcHAgA+hZcAyP/ngOAIhWdj5VcTBWR9eRMJifqTBwQHypcYCDOJ5wBKhZcAyP/ngGAHfXsTDDv5kwyL+RMHBAeTBwQHFAhil+aXgUQzDNcAs4zXAFJNY3xNCWPxpANBqJk/ooUIAY01uTcihgwBSoWXAMj/54BAA6KZopRj9UQDs4ekQWPxdwMzBJpAY/OKAFaEIoYMAU6FlwDI/+eAQLITdfUPVd0CzAFEeV2NTaMJAQBihZcAyP/ngICkffkDRTEB5oWRPGNPBQDj4o3+hWeThwcHopcYCLqX2pcjiqf4BQTxt+MVpf2RR+MF9PYFZ311kwcHB5MFhfoTBYX5FAiqlzOF1wCTBwcHrpezhdcAKsaXAMj/54Bg+XE9MkXBRWUzUT1VObcHAgAZ4ZMHAAI+hZcAyP/ngGD2hWIWkfpQalTaVEpZulkqWppaClv6S2pM2kxKTbpNKWGCgLdXQUkZcZOH94QBRYbeotym2srYztbS1NbS2tDezuLM5srqyO7GPs6XAMj/54BAnLExDc23BAxgnEQ3RMg/EwQEABzEvEx9dxMH9z9cwPmPk+cHQLzMEwVABpcAyP/ngGCSHETxm5PnFwCcxAE5IcG3hwBgN0fYUJOGhwoTBxeqmMIThwcJIyAHADc3HY8joAYAEwenEpOGBwuYwpOHxwqYQzcGAIBRj5jDI6AGALdHyD83d8k/k4cHABMHR7shoCOgBwCRB+Pt5/5BO5FFaAhxOWEzt/fIP5OHR7IhZz6XIyD3CLcHOEA3Scg/k4eHDiMg+QC3eck/UTYTCQkAk4lJsmMJBRC3JwxgRUe414VFRUWXAMj/54Dg37cFOEABRpOFBQBFRZcAyP/ngODgtzcEYBFHmMs3BQIAlwDI/+eAIOCXAMj/54Cg8LdHAGCcXwnl8YvhFxO1FwCBRZcAyP/ngICTwWe3xMg//RcTBwAQhWZBZrcFAAEBRZOEhAG3Ssg/DWqXAMj/54AAjhOLigEmmoOnyQj134OryQiFRyOmCQgjAvECg8cbAAlHIxPhAqMC8QIC1E1HY4HnCFFHY4/nBilHY5/nAIPHOwADxysAogfZjxFHY5bnAIOniwCcQz7UpTmhRUgQUTaDxzsAA8crAKIH2Y8RZ0EHY3T3BBMFsA39NBMFwA3lNBMF4A7NNKkxQbe3BThAAUaThYUDFUWXAMj/54BA0TcHAGBcRxMFAAKT5xcQXMcJt8lHIxPxAk23A8cbANFGY+fmAoVGY+bmAAFMEwTwD4WoeRcTd/cPyUbj6Ob+t3bJPwoHk4aGuzaXGEMCh5MGBwOT9vYPEUbjadb8Ewf3AhN39w+NRmPo5gq3dsk/CgeThkbANpcYQwKHEwdAAmOV5xIC1B1EAUWBNAFFcTRVNk02oUVIEH0UdTR19AFMAUQTdfQPlTwTdfwPvTRZNuMeBOqDxxsASUdjZfcyCUfjdvfq9ReT9/cPPUfjYPfqN3fJP4oHEwdHwbqXnEOChwVEoeu3BwBAA6dHAZlHcBCBRQFFY/3nAJfQzP/ngACzBUQF6dFFaBA9PAFEHaCXsMz/54Bg/e23BUSB75fwx//ngOBwMzSgACmgIUdjhecABUQBTL23A6yLAAOkywCzZ4wA0gf19+/w34B98cFsIpz9HH19MwWMQE3Ys3eVAZXjwWwzBYxAY+aMAv18MwWMQEncMYGX8Mf/54Dga1X5ZpT1tzGBl/DH/+eA4GpV8WqU0bdBgZfwx//ngKBpUfkzBJRBwbchR+OM5+4BTBMEAAzNvUFHzb9BRwVE45zn9oOlywADpYsAXTKxv0FHBUTjkuf2A6cLAZFnY+rnHoOlSwEDpYsA7/AP/DW/QUcFROOS5/SDpwsBEWdjavccA6fLAIOlSwEDpYsAM4TnAu/wj/kjrAQAIySKsDG3A8cEAGMDBxQDp4sAwRcTBAAMYxP3AMBIAUeTBvAOY0b3AoPHWwADx0sAAUyiB9mPA8drAEIHXY+Dx3sA4gfZj+OE9uQTBBAMgbUzhusAA0aGAQUHsY7ht4PHBAD9x9xEY50HFMBII4AEAH21YUdjlucCg6fLAQOniwGDpksBA6YLAYOlywADpYsAl/DH/+eAoFkqjDM0oADFuwFMBUTtsxFHBUTjmufmt5cAYLRDZXd9FwVm+Y7RjgOliwC0w7RHgUX5jtGOtMf0Q/mO0Y70w9RfdY9Rj9jfl/DH/+eAwFcBvRP39wDjFQfqk9xHABOEiwABTH1d43ec2UhEl/DH/+eAQEQYRFRAEED5jmMHpwEcQhNH9/99j9mOFMIFDEEE2b8RR6W1QUcFROOX596Dp4sAA6dLASMq+QAjKOkATbuDJQkBwReR5YnPAUwTBGAMJbsDJ0kBY2b3BhP3NwDjGQfiAyhJAQFGAUczBehAs4blAGNp9wDjBwbQIyqpACMo2QAJszOG6wAQThEHkMIFRum/IUcFROOR59gDJEkBGcATBIAMIyoJACMoCQAzNIAApbMBTBMEIAzBuQFMEwSADOGxAUwTBJAMwbETByANY4PnDBMHQA3jnue2A8Q7AIPHKwAiBF2Ml/DH/+eAIEIDrMQAQRRjc4QBIozjDAy0wEBilDGAnEhjVfAAnERjW/QK7/DPxnXdyEBihpOFiwGX8Mf/54AgPgHFkwdADNzI3EDil9zA3ESzh4dB3MSX8Mf/54AAPTm2CWUTBQVxA6zLAAOkiwCX8Mf/54DALrcHAGDYS7cGAAHBFpNXRwESB3WPvYvZj7OHhwMBRbPVhwKX8Mf/54CgLxMFgD6X8Mf/54BgK8G0g6ZLAQOmCwGDpcsAA6WLAO/wz/dttIPFOwCDxysAE4WLAaIF3Y3BFe/wr9BJvO/wD8A9vwPEOwCDxysAE4yLASIEXYzcREEUzeORR4VLY/+HCJMHkAzcyJ20A6cNACLQBUizh+xAPtaDJ4qwY3P0AA1IQsY6xO/wj7siRzJIN8XIP+KFfBCThooBEBATBQUDl/DH/+eAACw398g/kwiHAYJXA6eIsIOlDQAdjB2PPpyyVyOk6LCqi76VI6C9AJOHigGdjQHFoWdjl/UAWoXv8E/GI6BtAQnE3ESZw+NPcPdj3wsAkwdwDL23hUu3fck/t8zIP5ONTbuTjIwB6b/jkAuc3ETjjQeakweADKm3g6eLAOOWB5rv8A/PCWUTBQVxl/DH/+eAwBjv8M/Jl/DH/+eAABxpsgOkywDjAgSY7/CPzBMFgD6X8Mf/54BgFu/wb8cClK2y7/DvxvZQZlTWVEZZtlkmWpZaBlv2S2ZM1kxGTbZNCWGCgA==`,n=1077411840,r=`GEDIP8AKOEAQCzhAaAs4QDYMOECiDDhAUAw4QHIJOEDyCzhAMgw4QHwLOEAiCThAsAs4QCIJOECaCjhA4Ao4QBALOEBoCzhArAo4QNYJOEAgCjhAqAo4QPoOOEAQCzhAug04QLIOOEBiCDhA2g44QGIIOEBiCDhAYgg4QGIIOEBiCDhAYgg4QGIIOEBiCDhAVg04QGIIOEDYDThAsg44QA==`,i=1070164916,a=1070088192,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/stub_flasher_32c5-Bw4Gkysk.js",
    "content": "var e=1082132164,t=`QREixCbCBsa39wBgEUc3BIRA2Mu39ABgEwQEANxAkYuR57JAIkSSREEBgoCIQBxAE3X1D4KX3bcBEbcHAGBOxoOphwBKyDcJhEAmylLEBs4izLcEAGB9WhMJCQDATBN09D8N4PJAYkQjqDQBQknSRLJJIkoFYYKAiECDJwkAE3X1D4KXfRTjGUT/yb8TBwAMlEGqh2MY5QCFR4XGI6AFAHlVgoAFR2OH5gAJRmONxgB9VYKAQgUTB7ANQYVjlecCiUecwfW3kwbADWMW1QCYwRMFAAyCgJMG0A19VWOV1wCYwRMFsA2CgLc1hUBBEZOFhboGxmE/Y0UFBrc3hUCThweyA6cHCAPWRwgTdfUPkwYWAMIGwYIjktcIMpcjAKcAA9dHCJFnk4cHBGMe9wI3t4RAEwcHsqFnupcDpgcIt/aEQLc3hUCThweyk4YGtmMf5gAjpscII6DXCCOSBwghoPlX4wb1/LJAQQGCgCOm1wgjoOcI3bc3NwBgfEudi/X/NycAYHxLnYv1/4KAQREGxt03tzcAYCOmBwI3BwAImMOYQ33/yFeyQBNF9f8FiUEBgoBBEQbG2T993TcHAEC3NwBgmMM3NwBgHEP9/7JAQQGCgEERIsQ3hIRAkwdEAUrAA6kHAQbGJsJjCgkERTc5xb1HEwREAYFEY9YnAQREvYiTtBQAfTeFPxxENwaAABOXxwCZ4DcGAAG39v8AdY+3NgBg2MKQwphCff9BR5HgBUczCelAupcjKCQBHMSyQCJEkkQCSUEBgoABEQbOIswlNzcEhkBsABMFBP+XAID/54Cg86qHBUWV57JHk/cHID7GiTc3NwBgHEe3BkAAEwUE/9WPHMeyRZcAgP/ngCDxMzWgAPJAYkQFYYKAQRG3h4RABsaTh0cBBUcjgOcAE9fFAJjHBWd9F8zDyMf5jTqVqpWxgYzLI6oHAEE3GcETBVAMskBBAYKAAREizDeEhECTB0QBJsrER07GBs5KyKqJEwREAWPzlQCuhKnAAylEACaZE1nJABxIY1XwABxEY175ArU9fd1IQCaGzoWXAID/54Ag5BN19Q8BxZMHQAxcyFxAppdcwFxEhY9cxPJAYkTSREJJskkFYYKAaTVtv0ERBsaXAID/54CA1gNFhQGyQHUVEzUVAEEBgoBBEQbGxTcNxbcHhECThwcA1EOZzjdnCWATB8cQHEM3Bv3/fRbxjzcGAwDxjtWPHMOyQEEBgoBBEQbGbTcRwQ1FskBBARcDgP9nAIPMQREGxibCIsSqhJcAgP/ngKDJWTcNyTcHhECTBgcAg9eGABMEBwCFB8IHwYMjlPYAkwYADGOG1AATB+ADY3X3AG03IxQEALJAIkSSREEBgoBBEQbGEwcADGMa5QATBbANRTcTBcANskBBAVm/EwewDeMb5f5xNxMF0A31t0ERIsQmwgbGKoSzBLUAYxeUALJAIkSSREEBgoADRQQABQRNP+23NXEmy07H/XKFaf10Is1KyVLFVsMGz5OEhPoWkZOHCQemlxgIs4TnACqJJoUuhJcAgP/ngEAxk4cJBxgIBWq6l7OKR0Ex5AVnfXWTBYX6kwcHBxMFhfkUCKqXM4XXAJMHBweul7OF1wAqxpcAgP/ngAAuMkXBRZU3AUWFYhaR+kBqRNpESkm6SSpKmkoNYYKAooljc4oAhWlOhtaFSoWXAID/54DAxhN19Q8B7U6G1oUmhZcAgP/ngEApTpkzBDRBUbcTBTAGVb8TBQAMSb0xcf1yBWdO11LVVtNezwbfIt0m20rZWtFizWbLaslux/13FpETBwcHPpccCLqXPsYjqgf4qokuirKKtov1M5MHAAIZwbcHAgA+hZcAgP/ngCAghWdj5VcTBWR9eRMJifqTBwQHypcYCDOJ5wBKhZcAgP/ngGAgfXsTDDv5kwyL+RMHBAeTBwQHFAhil+aXgUQzDNcAs4zXAFJNY3xNCWPxpANBqJk/ooUIAY01uTcihgwBSoWXAID/54BAHKKZopRj9UQDs4ekQWPxdwMzBJpAY/OKAFaEIoYMAU6FlwCA/+eAALYTdfUPVd0CzAFEeV2NTaMJAQBihZcAgP/ngECkffkDRTEB5oWFNGNPBQDj4o3+hWeThwcHopcYCLqX2pcjiqf4BQTxt+MVpf2RR+MF9PYFZ311kwcHB5MFhfoTBYX5FAiqlzOF1wCTBwcHrpezhdcAKsaXAID/54BgEnE9MkXBRWUzUT3BMbcHAgAZ4ZMHAAI+hZcAgP/ngKANhWIWkfpQalTaVEpZulkqWppaClv6S2pM2kxKTbpNKWGCgLdXQUkZcZOH94QBRYbeotym2srYztbS1NbS2tDezuLM5srqyO7GPs6XAID/54DAnaE5Ec23Zwlgk4fHEJhDtwaEQCOi5gC3BgMAVY+Ywy05Bc23JwtgN0fYUJOGh8ETBxeqmMIThgfAIyAGACOgBgCThgfCmMKTh8fBmEM3BgQAUY+YwyOgBgC3B4RANzeFQJOHBwATBwe7IaAjoAcAkQfj7ef+XTuRRWgIyTF9M7e3hECThweyIWc+lyMg9wi3B4BANwmEQJOHhw4jIPkAtzmFQF0+EwkJAJOJCbJjBgUQtwcBYBMHEAIjqOcMhUVFRZcAgP/ngAD5twWAQAFGk4UFAEVFlwCA/+eAQPq39wBgEUeYyzcFAgCXAID/54CA+bcXCWCIX4FFt4SEQHGJYRUTNRUAlwCA/+eAgJ/BZ/0XEwcAEIVmQWa3BQABAUWThEQBtwqEQA1qlwCA/+eAQJUTi0oBJpqDp8kI9d+Dq8kIhUcjpgkIIwLxAoPHGwAJRyMT4QKjAvECAtRNR2OB5whRR2OP5wYpR2Of5wCDxzsAA8crAKIH2Y8RR2OW5wCDp4sAnEM+1FUxoUVIEEU+g8c7AAPHKwCiB9mPEWdBB2N09wQTBbANKT4TBcANET4TBeAOOTadOUG3twWAQAFGk4WFAxVFlwCA/+eAQOs3BwBgXEcTBQACk+cXEFzHMbfJRyMT8QJNtwPHGwDRRmPn5gKFRmPm5gABTBME8A+FqHkXE3f3D8lG4+jm/rc2hUAKB5OGRrs2lxhDAoeTBgcDk/b2DxFG42nW/BMH9wITd/cPjUZj6+YItzaFQAoHk4YGwDaXGEMChxMHQAJjmOcQAtQdRAFFtTQBRWU8wT75NqFFSBB9FOE8dfQBTAFEE3X0D0U0E3X8D2k8TT7jHgTqg8cbAElHY2j3MAlH43b36vUXk/f3Dz1H42D36jc3hUCKBxMHB8G6l5xDgocFRJ3rcBCBRQFFl/B//+eAgHEd4dFFaBCtPAFEMagFRIHvl/B//+eAQHczNKAAKaAhR2OF5wAFRAFMYbcDrIsAA6TLALNnjADSB/X37/D/hX3xwWwinP0cfX0zBYxAVdyzd5UBlePBbDMFjEBj5owC/XwzBYxAVdAxgZfwf//ngMBzVflmlPW3MYGX8H//54DAclXxapTRt0GBl/B//+eAAHJR+TMElEHBtyFH44nn8AFMEwQADDG3QUfNv0FHBUTjnOf2g6XLAAOliwD1MrG/QUcFROOS5/YDpwsBkWdj6uceg6VLAQOliwDv8D+BNb9BRwVE45Ln9IOnCwERZ2Nq9xwDp8sAg6VLAQOliwAzhOcC7/Cv/iOsBAAjJIqwMbcDxwQAYwMHFAOniwDBFxMEAAxjE/cAwEgBR5MG8A5jRvcCg8dbAAPHSwABTKIH2Y8Dx2sAQgddj4PHewDiB9mP44H25hMEEAypvTOG6wADRoYBBQexjuG3g8cEAP3H3ERjnQcUwEgjgAQAfbVhR2OW5wKDp8sBA6eLAYOmSwEDpgsBg6XLAAOliwCX8H//54CAYiqMMzSgACm1AUwFRBG1EUcFROOa5+a3lwBgtF9ld30XBWb5jtGOA6WLALTftFeBRfmO0Y601/Rf+Y7RjvTf9FN1j1GP+NOX8H//54CgZSm9E/f3AOMVB+qT3EcAE4SLAAFMfV3jdJzbSESX8H//54AgSBhEVEAQQPmOYwenARxCE0f3/32P2Y4UwgUMQQTZvxFHpbVBRwVE45fn3oOniwADp0sBIyj5ACMm6QB1u4MlyQDBF5Hlic8BTBMEYAyJuwMnCQFjZvcGE/c3AOMZB+IDKAkBAUYBRzMF6ECzhuUAY2n3AOMEBtIjKKkAIybZADG7M4brABBOEQeQwgVG6b8hRwVE45Hn2AMkCQEZwBMEgAwjKAkAIyYJADM0gAClswFMEwQgDO2xAUwTBIAMzbEBTBMEkAzpuRMHIA1jg+cMEwdADeOb57gDxDsAg8crACIEXYyX8H//54CASAOsxABBFGNzhAEijOMJDLbAQGKUMYCcSGNV8ACcRGNb9Arv8O/Ldd3IQGKGk4WLAZfwf//ngIBEAcWTB0AM3MjcQOKX3MDcRLOHh0HcxJfwf//ngGBDJbYJZRMFBXEDrMsAA6SLAJfwf//ngKAytwcAYNhLtwYAAcEWk1dHARIHdY+9i9mPs4eHAwFFs9WHApfwf//ngAA0EwWAPpfwf//ngEAv6byDpksBA6YLAYOlywADpYsA7/Av/NG0g8U7AIPHKwAThYsBogXdjcEV7/DP1XW07/AvxT2/A8Q7AIPHKwATjIsBIgRdjNxEQRTN45FHhUtj/4cIkweQDNzIQbQDpw0AItAFSLOH7EA+1oMnirBjc/QADUhCxjrE7/CvwCJHMkg3hYRA4oV8EJOGSgEQEBMFxQKX8H//54CgMTe3hECTCEcBglcDp4iwg6UNAB2MHY8+nLJXI6TosKqLvpUjoL0Ak4dKAZ2NAcWhZ2OX9QBahe/wb8sjoG0BCcTcRJnD409w92PfCwCTB3AMvbeFS7c9hUC3jIRAk40Nu5OMTAHpv+OdC5zcROOKB5yTB4AMqbeDp4sA45MHnO/wb9MJZRMFBXGX8H//54CgHO/w786X8H//54BgIVWyA6TLAOMPBJjv8O/QEwWAPpfwf//ngEAa7/CPzAKUUbLv8A/M9lBmVNZURlm2WSZalloGW/ZLZkzWTEZNtk0JYYKAAAA=`,n=1082130432,r=`FACEQG4KgEC+CoBAFguAQOQLgEBQDIBA/guAQDoJgECgC4BA4AuAQCoLgEDqCIBAXguAQOoIgEBICoBAjgqAQL4KgEAWC4BAWgqAQJ4JgEDOCYBAVgqAQKgOgEC+CoBAaA2AQGAOgEAqCIBAiA6AQCoIgEAqCIBAKgiAQCoIgEAqCIBAKgiAQCoIgEAqCIBABA2AQCoIgECGDYBAYA6AQA==`,i=1082469296,a=1082392576,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/stub_flasher_32c6-Bdx7wUin.js",
    "content": "var e=1082132164,t=`QREixCbCBsa39wBgEUc3BIRA2Mu39ABgEwQEANxAkYuR57JAIkSSREEBgoCIQBxAE3X1D4KX3bcBEbcHAGBOxoOphwBKyDcJhEAmylLEBs4izLcEAGB9WhMJCQDATBN09A8N4PJAYkQjqDQBQknSRLJJIkoFYYKAiECDJwkAE3X1D4KXfRTjGUT/yb8TBwAMlEGqh2MY5QCFR4XGI6AFAHlVgoAFR2OH5gAJRmONxgB9VYKAQgUTB7ANQYVjlecCiUecwfW3kwbADWMW1QCYwRMFAAyCgJMG0A19VWOV1wCYwRMFsA2CgLc1hUBBEZOFhboGxmE/Y0UFBrc3hUCThweyA6cHCAPWRwgTdfUPkwYWAMIGwYIjktcIMpcjAKcAA9dHCJFnk4cHBGMe9wI3t4RAEwcHsqFnupcDpgcIt/aEQLc3hUCThweyk4YGtmMf5gAjpscII6DXCCOSBwghoPlX4wb1/LJAQQGCgCOm1wgjoOcI3bc3NwBgfEudi/X/NycAYHxLnYv1/4KAQREGxt03tzcAYCOmBwI3BwAImMOYQ33/yFeyQBNF9f8FiUEBgoBBEQbG2T993TcHAEC3NwBgmMM3NwBgHEP9/7JAQQGCgEERIsQ3hIRAkwdEAUrAA6kHAQbGJsJjCgkERTc5xb1HEwREAYFEY9YnAQREvYiTtBQAfTeFPxxENwaAABOXxwCZ4DcGAAG39v8AdY+3NgBg2MKQwphCff9BR5HgBUczCelAupcjKCQBHMSyQCJEkkQCSUEBgoABEQbOIswlNzcEzj9sABMFRP+XAID/54Cg8qqHBUWV57JHk/cHID7GiTc3NwBgHEe3BkAAEwVE/9WPHMeyRZcAgP/ngCDwMzWgAPJAYkQFYYKAQRG3h4RABsaTh0cBBUcjgOcAE9fFAJjHBWd9F8zDyMf5jTqVqpWxgYzLI6oHAEE3GcETBVAMskBBAYKAAREizDeEhECTB0QBJsrER07GBs5KyKqJEwREAWPzlQCuhKnAAylEACaZE1nJABxIY1XwABxEY175ArU9fd1IQCaGzoWXAID/54Ag4xN19Q8BxZMHQAxcyFxAppdcwFxEhY9cxPJAYkTSREJJskkFYYKAaTVtv0ERBsaXAID/54BA1gNFhQGyQHUVEzUVAEEBgoBBEQbGxTcNxbcHhECThwcA1EOZzjdnCWATBwcRHEM3Bv3/fRbxjzcGAwDxjtWPHMOyQEEBgoBBEQbGbTcRwQ1FskBBARcDgP9nAIPMQREGxibCIsSqhJcAgP/ngODJWTcNyTcHhECTBgcAg9eGABMEBwCFB8IHwYMjlPYAkwYADGOG1AATB+ADY3X3AG03IxQEALJAIkSSREEBgoBBEQbGEwcADGMa5QATBbANRTcTBcANskBBAVm/EwewDeMb5f5xNxMF0A31t0ERIsQmwgbGKoSzBLUAYxeUALJAIkSSREEBgoADRQQABQRNP+23NXEmy07H/XKFaf10Is1KyVLFVsMGz5OEhPoWkZOHCQemlxgIs4TnACqJJoUuhJcAgP/ngIAsk4cJBxgIBWq6l7OKR0Ex5AVnfXWTBYX6kwcHBxMFhfkUCKqXM4XXAJMHBweul7OF1wAqxpcAgP/ngEApMkXBRZU3AUWFYhaR+kBqRNpESkm6SSpKmkoNYYKAooljc4oAhWlOhtaFSoWXAID/54DAxRN19Q8B7U6G1oUmhZcAgP/ngIAkTpkzBDRBUbcTBTAGVb8TBQAMSb0xcf1yBWdO11LVVtNezwbfIt0m20rZWtFizWbLaslux/13FpETBwcHPpccCLqXPsYjqgf4qokuirKKtov1M5MHAAIZwbcHAgA+hZcAgP/ngCAdhWdj5VcTBWR9eRMJifqTBwQHypcYCDOJ5wBKhZcAgP/ngKAbfXsTDDv5kwyL+RMHBAeTBwQHFAhil+aXgUQzDNcAs4zXAFJNY3xNCWPxpANBqJk/ooUIAY01uTcihgwBSoWXAID/54CAF6KZopRj9UQDs4ekQWPxdwMzBJpAY/OKAFaEIoYMAU6FlwCA/+eAALUTdfUPVd0CzAFEeV2NTaMJAQBihZcAgP/ngECkffkDRTEB5oWFNGNPBQDj4o3+hWeThwcHopcYCLqX2pcjiqf4BQTxt+MVpf2RR+MF9PYFZ311kwcHB5MFhfoTBYX5FAiqlzOF1wCTBwcHrpezhdcAKsaXAID/54CgDXE9MkXBRWUzUT3BMbcHAgAZ4ZMHAAI+hZcAgP/ngKAKhWIWkfpQalTaVEpZulkqWppaClv6S2pM2kxKTbpNKWGCgLdXQUkZcZOH94QBRYbeotym2srYztbS1NbS2tDezuLM5srqyO7GPs6XAID/54CAnaE5DcE3ZwlgEwcHERxDtwaEQCOi9gC3Bv3//Rb1j8Fm1Y8cwxU5Bc23JwtgN0fYUJOGh8ETBxeqmMIThgfAIyAGACOgBgCThgfCmMKTh8fBmEM3BgQAUY+YwyOgBgC3B4RANzeFQJOHBwATBwe7IaAjoAcAkQfj7ef+RTuRRWgIdTllM7e3hECThweyIWc+lyMg9wi3B4BANwmEQJOHhw4jIPkAtzmFQEU+EwkJAJOJCbJjBQUQtwcBYEVHI6DnDIVFRUWXAID/54AA9rcFgEABRpOFBQBFRZcAgP/ngAD3t/cAYBFHmMs3BQIAlwCA/+eAQPa3FwlgiF+BRbeEhEBxiWEVEzUVAJcAgP/ngACewWf9FxMHABCFZkFmtwUAAQFFk4REAbcKhEANapcAgP/ngACUE4tKASaag6fJCPXfg6vJCIVHI6YJCCMC8QKDxxsACUcjE+ECowLxAgLUTUdjgecIUUdjj+cGKUdjn+cAg8c7AAPHKwCiB9mPEUdjlucAg6eLAJxDPtRFMaFFSBB1NoPHOwADxysAogfZjxFnQQdjdPcEEwWwDRk+EwXADQE+EwXgDik2jTlBt7cFgEABRpOFhQMVRZcAgP/ngADoNwcAYFxHEwUAApPnFxBcxzG3yUcjE/ECTbcDxxsA0UZj5+YChUZj5uYAAUwTBPAPhah5FxN39w/JRuPo5v63NoVACgeThka7NpcYQwKHkwYHA5P29g8RRuNp1vwTB/cCE3f3D41GY+vmCLc2hUAKB5OGBsA2lxhDAocTB0ACY5jnEALUHUQBRaU0AUVVPPE26TahRUgQfRTRPHX0AUwBRBN19A9xPBN1/A9ZPH024x4E6oPHGwBJR2No9zAJR+N29+r1F5P39w89R+Ng9+o3N4VAigcTBwfBupecQ4KHBUSd63AQgUUBRZfwf//ngABxHeHRRWgQnTwBRDGoBUSB75fwf//ngAB2MzSgACmgIUdjhecABUQBTGG3A6yLAAOkywCzZ4wA0gf19+/wv4V98cFsIpz9HH19MwWMQFXcs3eVAZXjwWwzBYxAY+aMAv18MwWMQFXQMYGX8H//54CAclX5ZpT1tzGBl/B//+eAgHFV8WqU0bdBgZfwf//ngMBwUfkzBJRBwbchR+OJ5/ABTBMEAAwxt0FHzb9BRwVE45zn9oOlywADpYsA5TKxv0FHBUTjkuf2A6cLAZFnY+rnHoOlSwEDpYsA7/D/gDW/QUcFROOS5/SDpwsBEWdjavccA6fLAIOlSwEDpYsAM4TnAu/wb/4jrAQAIySKsDG3A8cEAGMDBxQDp4sAwRcTBAAMYxP3AMBIAUeTBvAOY0b3AoPHWwADx0sAAUyiB9mPA8drAEIHXY+Dx3sA4gfZj+OB9uYTBBAMqb0zhusAA0aGAQUHsY7ht4PHBAD9x9xEY50HFMBII4AEAH21YUdjlucCg6fLAQOniwGDpksBA6YLAYOlywADpYsAl/B//+eAQGEqjDM0oAAptQFMBUQRtRFHBUTjmufmt5cAYLRfZXd9FwVm+Y7RjgOliwC037RXgUX5jtGOtNf0X/mO0Y703/RTdY9Rj/jTl/B//+eAIGQpvRP39wDjFQfqk9xHABOEiwABTH1d43Sc20hEl/B//+eAIEgYRFRAEED5jmMHpwEcQhNH9/99j9mOFMIFDEEE2b8RR6W1QUcFROOX596Dp4sAA6dLASMo+QAjJukAdbuDJckAwReR5YnPAUwTBGAMibsDJwkBY2b3BhP3NwDjGQfiAygJAQFGAUczBehAs4blAGNp9wDjBAbSIyipACMm2QAxuzOG6wAQThEHkMIFRum/IUcFROOR59gDJAkBGcATBIAMIygJACMmCQAzNIAApbMBTBMEIAztsQFMEwSADM2xAUwTBJAM6bkTByANY4PnDBMHQA3jm+e4A8Q7AIPHKwAiBF2Ml/B//+eAQEcDrMQAQRRjc4QBIozjCQy2wEBilDGAnEhjVfAAnERjW/QK7/Cvy3XdyEBihpOFiwGX8H//54BAQwHFkwdADNzI3EDil9zA3ESzh4dB3MSX8H//54AgQiW2CWUTBQVxA6zLAAOkiwCX8H//54CgMrcHAGDYS7cGAAHBFpNXRwESB3WPvYvZj7OHhwMBRbPVhwKX8H//54DAMxMFgD6X8H//54BAL+m8g6ZLAQOmCwGDpcsAA6WLAO/w7/vRtIPFOwCDxysAE4WLAaIF3Y3BFe/wj9V1tO/w78Q9vwPEOwCDxysAE4yLASIEXYzcREEUzeORR4VLY/+HCJMHkAzcyEG0A6cNACLQBUizh+xAPtaDJ4qwY3P0AA1IQsY6xO/wb8AiRzJIN4WEQOKFfBCThkoBEBATBcUCl/B//+eAIDE3t4RAkwhHAYJXA6eIsIOlDQAdjB2PPpyyVyOk6LCqi76VI6C9AJOHSgGdjQHFoWdjl/UAWoXv8C/LI6BtAQnE3ESZw+NPcPdj3wsAkwdwDL23hUu3PYVAt4yEQJONDbuTjEwB6b/jnQuc3ETjigeckweADKm3g6eLAOOTB5zv8C/TCWUTBQVxl/B//+eAoBzv8K/Ol/B//+eA4CBVsgOkywDjDwSY7/Cv0BMFgD6X8H//54BAGu/wT8wClFGy7/DPy/ZQZlTWVEZZtlkmWpZaBlv2S2ZM1kxGTbZNCWGCgAAA`,n=1082130432,r=`FACEQHIKgEDCCoBAGguAQOgLgEBUDIBAAgyAQD4JgECkC4BA5AuAQC4LgEDuCIBAYguAQO4IgEBMCoBAkgqAQMIKgEAaC4BAXgqAQKIJgEDSCYBAWgqAQKwOgEDCCoBAbA2AQGQOgEAuCIBAjA6AQC4IgEAuCIBALgiAQC4IgEAuCIBALgiAQC4IgEAuCIBACA2AQC4IgECKDYBAZA6AQA==`,i=1082469296,a=1082392576,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/stub_flasher_32c61-U7D4krFy.js",
    "content": "var e=1082132164,t=`QREixCbCBsa39wBgEUc3RIBA2Mu39ABgEwQEANxAkYuR57JAIkSSREEBgoCIQBxAE3X1D4KX3bcBEbcHAGBOxoOphwBKyDdJgEAmylLEBs4izLcEAGB9WhMJCQDATBN09A8N4PJAYkQjqDQBQknSRLJJIkoFYYKAiECDJwkAE3X1D4KXfRTjGUT/yb8TBwAMlEGqh2MY5QCFR4XGI6AFAHlVgoAFR2OH5gAJRmONxgB9VYKAQgUTB7ANQYVjlecCiUecwfW3kwbADWMW1QCYwRMFAAyCgJMG0A19VWOV1wCYwRMFsA2CgLd1gUBBEZOFhboGxmE/Y0UFBrd3gUCThweyA6cHCAPWRwgTdfUPkwYWAMIGwYIjktcIMpcjAKcAA9dHCJFnk4cHBGMe9wI394BAEwcHsqFnupcDpgcItzaBQLd3gUCThweyk4YGtmMf5gAjpscII6DXCCOSBwghoPlX4wb1/LJAQQGCgCOm1wgjoOcI3bc3NwBgfEudi/X/NycAYHxLnYv1/4KAQREGxt03tzcAYCOmBwI3BwAImMOYQ33/yFeyQBNF9f8FiUEBgoBBEQbG2T993TcHAEC3NwBgmMM3NwBgHEP9/7JAQQGCgEERIsQ3xIBAkwdEAUrAA6kHAQbGJsJjCgkERTc5xb1HEwREAYFEY9YnAQREvYiTtBQAfTeFPxxENwaAABOXxwCZ4DcGAAG39v8AdY+3NgBg2MKQwphCff9BR5HgBUczCelAupcjKCQBHMSyQCJEkkQCSUEBgoABEQbOIswlNzcEzj9sABMFRP+XAID/54Cg86qHBUWV57JHk/cHID7GiTc3NwBgHEe3BkAAEwVE/9WPHMeyRZcAgP/ngCDxMzWgAPJAYkQFYYKAQRG3x4BABsaTh0cBBUcjgOcAE9fFAJjHBWd9F8zDyMf5jTqVqpWxgYzLI6oHAEE3GcETBVAMskBBAYKAAREizDfEgECTB0QBJsrER07GBs5KyKqJEwREAWPzlQCuhKnAAylEACaZE1nJABxIY1XwABxEY175ArU9fd1IQCaGzoWXAID/54Ag5BN19Q8BxZMHQAxcyFxAppdcwFxEhY9cxPJAYkTSREJJskkFYYKAaTVtv0ERBsaXAID/54CA1gNFhQGyQHUVEzUVAEEBgoBBEQbGxTcNxbdHgECThwcA1EOZzjdnCWATB4cOHEM3Bv3/fRbxjzcGAwDxjtWPHMOyQEEBgoBBEQbGbTcRwQ1FskBBARcDgP9nAIPMQREGxibCIsSqhJcAgP/ngKDJWTcNyTdHgECTBgcAg9eGABMEBwCFB8IHwYMjlPYAkwYADGOG1AATB+ADY3X3AG03IxQEALJAIkSSREEBgoBBEQbGEwcADGMa5QATBbANRTcTBcANskBBAVm/EwewDeMb5f5xNxMF0A31t0ERIsQmwgbGKoSzBLUAYxeUALJAIkSSREEBgoADRQQABQRNP+23NXEmy07H/XKFaf10Is1KyVLFVsMGz5OEhPoWkZOHCQemlxgIs4TnACqJJoUuhJcAgP/ngIAvk4cJBxgIBWq6l7OKR0Ex5AVnfXWTBYX6kwcHBxMFhfkUCKqXM4XXAJMHBweul7OF1wAqxpcAgP/ngEAsMkXBRZU3AUWFYhaR+kBqRNpESkm6SSpKmkoNYYKAooljc4oAhWlOhtaFSoWXAID/54DAxhN19Q8B7U6G1oUmhZcAgP/ngIAnTpkzBDRBUbcTBTAGVb8TBQAMSb0xcf1yBWdO11LVVtNezwbfIt0m20rZWtFizWbLaslux/13FpETBwcHPpccCLqXPsYjqgf4qokuirKKtov1M5MHAAIZwbcHAgA+hZcAgP/ngGAehWdj5VcTBWR9eRMJifqTBwQHypcYCDOJ5wBKhZcAgP/ngKAefXsTDDv5kwyL+RMHBAeTBwQHFAhil+aXgUQzDNcAs4zXAFJNY3xNCWPxpANBqJk/ooUIAY01uTcihgwBSoWXAID/54CAGqKZopRj9UQDs4ekQWPxdwMzBJpAY/OKAFaEIoYMAU6FlwCA/+eAALYTdfUPVd0CzAFEeV2NTaMJAQBihZcAgP/ngECkffkDRTEB5oWFNGNPBQDj4o3+hWeThwcHopcYCLqX2pcjiqf4BQTxt+MVpf2RR+MF9PYFZ311kwcHB5MFhfoTBYX5FAiqlzOF1wCTBwcHrpezhdcAKsaXAID/54CgEHE9MkXBRWUzUT3BMbcHAgAZ4ZMHAAI+hZcAgP/ngOALhWIWkfpQalTaVEpZulkqWppaClv6S2pM2kxKTbpNKWGCgLdXQUkZcZOH94QBRYbeotym2srYztbS1NbS2tDezuLM5srqyO7GPs6XAID/54DAnaE5DcE3ZwlgEweHDhxDt0aAQCOi9gC3Bv3//Rb1j8Fm1Y8cwxU5Bc23JwtgN0fYUJOGh8ETBxeqmMIThgfAIyAGACOgBgCThgfCmMKTh8fBmEM3BgQAUY+YwyOgBgC3R4BAN3eBQJOHBwATBwe7IaAjoAcAkQfj7ef+RTuRRWgIdTllM7f3gECThweyIWc+lyMg9wi3B4BAN0mAQJOHhw4jIPkAt3mBQEU+EwkJAJOJCbJjBgUQtwcBYBMHEAIjpOcKhUVFRZcAgP/ngOD2twWAQAFGk4UFAEVFlwCA/+eAIPi39wBgEUeYyzcFAgCXAID/54Bg97cXCWCIX4FFt8SAQHGJYRUTNRUAlwCA/+eAIJ/BZ/0XEwcAEIVmQWa3BQABAUWThEQBt0qAQA1qlwCA/+eA4JQTi0oBJpqDp8kI9d+Dq8kIhUcjpgkIIwLxAoPHGwAJRyMT4QKjAvECAtRNR2OB5whRR2OP5wYpR2Of5wCDxzsAA8crAKIH2Y8RR2OW5wCDp4sAnEM+1Hk5oUVIEG02g8c7AAPHKwCiB9mPEWdBB2N09wQTBbANET4TBcANOTYTBeAOITaFOUG3twWAQAFGk4WFAxVFlwCA/+eAIOk3BwBgXEcTBQACk+cXEFzHMbfJRyMT8QJNtwPHGwDRRmPn5gKFRmPm5gABTBME8A+FqHkXE3f3D8lG4+jm/rd2gUAKB5OGRrs2lxhDAoeTBgcDk/b2DxFG42nW/BMH9wITd/cPjUZj6+YIt3aBQAoHk4YGwDaXGEMChxMHQAJjmOcQAtQdRAFFnTQBRU086TbhNqFFSBB9FMk8dfQBTAFEE3X0D2k8E3X8D1E8dTbjHgTqg8cbAElHY2j3MAlH43b36vUXk/f3Dz1H42D36jd3gUCKBxMHB8G6l5xDgocFRJ3rcBCBRQFFl/B//+eAIHEd4dFFaBCVPAFEMagFRIHvl/B//+eA4HYzNKAAKaAhR2OF5wAFRAFMYbcDrIsAA6TLALNnjADSB/X37/CfhX3xwWwinP0cfX0zBYxAVdyzd5UBlePBbDMFjEBj5owC/XwzBYxAVdAxgZfwf//ngGBzVflmlPW3MYGX8H//54BgclXxapTRt0GBl/B//+eAoHFR+TMElEHBtyFH44nn8AFMEwQADDG3QUfNv0FHBUTjnOf2g6XLAAOliwDdMrG/QUcFROOS5/YDpwsBkWdj6uceg6VLAQOliwDv8N+ANb9BRwVE45Ln9IOnCwERZ2Nq9xwDp8sAg6VLAQOliwAzhOcC7/BP/iOsBAAjJIqwMbcDxwQAYwMHFAOniwDBFxMEAAxjE/cAwEgBR5MG8A5jRvcCg8dbAAPHSwABTKIH2Y8Dx2sAQgddj4PHewDiB9mP44H25hMEEAypvTOG6wADRoYBBQexjuG3g8cEAP3H3ERjnQcUwEgjgAQAfbVhR2OW5wKDp8sBA6eLAYOmSwEDpgsBg6XLAAOliwCX8H//54AgYiqMMzSgACm1AUwFRBG1EUcFROOa5+a3lwBgtF9ld30XBWb5jtGOA6WLALTftFeBRfmO0Y601/Rf+Y7RjvTf9FN1j1GP+NOX8H//54BAZSm9E/f3AOMVB+qT3EcAE4SLAAFMfV3jdJzbSESX8H//54DARxhEVEAQQPmOYwenARxCE0f3/32P2Y4UwgUMQQTZvxFHpbVBRwVE45fn3oOniwADp0sBIyj5ACMm6QB1u4MlyQDBF5Hlic8BTBMEYAyJuwMnCQFjZvcGE/c3AOMZB+IDKAkBAUYBRzMF6ECzhuUAY2n3AOMEBtIjKKkAIybZADG7M4brABBOEQeQwgVG6b8hRwVE45Hn2AMkCQEZwBMEgAwjKAkAIyYJADM0gAClswFMEwQgDO2xAUwTBIAMzbEBTBMEkAzpuRMHIA1jg+cMEwdADeOb57gDxDsAg8crACIEXYyX8H//54AgSAOsxABBFGNzhAEijOMJDLbAQGKUMYCcSGNV8ACcRGNb9Arv8I/Ldd3IQGKGk4WLAZfwf//ngCBEAcWTB0AM3MjcQOKX3MDcRLOHh0HcxJfwf//ngABDJbYJZRMFBXEDrMsAA6SLAJfwf//ngEAytwcAYNhLtwYAAcEWk1dHARIHdY+9i9mPs4eHAwFFs9WHApfwf//ngKAzEwWAPpfwf//ngOAu6byDpksBA6YLAYOlywADpYsA7/DP+9G0g8U7AIPHKwAThYsBogXdjcEV7/Bv1XW07/DPxD2/A8Q7AIPHKwATjIsBIgRdjNxEQRTN45FHhUtj/4cIkweQDNzIQbQDpw0AItAFSLOH7EA+1oMnirBjc/QADUhCxjrE7/BPwCJHMkg3xYBA4oV8EJOGSgEQEBMFxQKX8H//54BAMTf3gECTCEcBglcDp4iwg6UNAB2MHY8+nLJXI6TosKqLvpUjoL0Ak4dKAZ2NAcWhZ2OX9QBahe/wD8sjoG0BCcTcRJnD409w92PfCwCTB3AMvbeFS7d9gUC3zIBAk40Nu5OMTAHpv+OdC5zcROOKB5yTB4AMqbeDp4sA45MHnO/wD9MJZRMFBXGX8H//54BAHO/wj86X8H//54AAIVWyA6TLAOMPBJjv8I/QEwWAPpfwf//ngOAZ7/AvzAKUUbLv8K/L9lBmVNZURlm2WSZalloGW/ZLZkzWTEZNtk0JYYKA`,n=1082130432,r=`FECAQHQKgEDECoBAHAuAQOoLgEBWDIBABAyAQEAJgECmC4BA5guAQDALgEDwCIBAZAuAQPAIgEBOCoBAlAqAQMQKgEAcC4BAYAqAQKQJgEDUCYBAXAqAQK4OgEDECoBAbg2AQGYOgEAwCIBAjg6AQDAIgEAwCIBAMAiAQDAIgEAwCIBAMAiAQDAIgEAwCIBACg2AQDAIgECMDYBAZg6AQA==`,i=1082223536,a=1082146816,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/stub_flasher_32h2-wrcmrOHl.js",
    "content": "var e=1082132164,t=`QREixCbCBsa39wBgEUc3BINA2Mu39ABgEwQEANxAkYuR57JAIkSSREEBgoCIQBxAE3X1D4KX3bcBEbcHAGBOxoOphwBKyDcJg0AmylLEBs4izLcEAGB9WhMJCQDATBN09A8N4PJAYkQjqDQBQknSRLJJIkoFYYKAiECDJwkAE3X1D4KXfRTjGUT/yb8TBwAMlEGqh2MY5QCFR4XGI6AFAHlVgoAFR2OH5gAJRmONxgB9VYKAQgUTB7ANQYVjlecCiUecwfW3kwbADWMW1QCYwRMFAAyCgJMG0A19VWOV1wCYwRMFsA2CgLc1hEBBEZOFhboGxmE/Y0UFBrc3hECThweyA6cHCAPWRwgTdfUPkwYWAMIGwYIjktcIMpcjAKcAA9dHCJFnk4cHBGMe9wI3t4NAEwcHsqFnupcDpgcIt/aDQLc3hECThweyk4YGtmMf5gAjpscII6DXCCOSBwghoPlX4wb1/LJAQQGCgCOm1wgjoOcI3bc3NwBgfEudi/X/NycAYHxLnYv1/4KAQREGxt03tzcAYCOmBwI3BwAImMOYQ33/yFeyQBNF9f8FiUEBgoBBEQbG2T993TcHAEC3NwBgmMM3NwBgHEP9/7JAQQGCgEERIsQ3hINAkwdEAUrAA6kHAQbGJsJjCgkERTc5xb1HEwREAYFEY9YnAQREvYiTtBQAfTeFPxxENwaAABOXxwCZ4DcGAAG39v8AdY+3NgBg2MKQwphCff9BR5HgBUczCelAupcjKCQBHMSyQCJEkkQCSUEBgoABEQbOIswlNzcEhUBsABMFBP+XAID/54Ag8qqHBUWV57JHk/cHID7GiTc3NwBgHEe3BkAAEwUE/9WPHMeyRZcAgP/ngKDvMzWgAPJAYkQFYYKAQRG3h4NABsaTh0cBBUcjgOcAE9fFAJjHBWd9F8zDyMf5jTqVqpWxgYzLI6oHAEE3GcETBVAMskBBAYKAAREizDeEg0CTB0QBJsrER07GBs5KyKqJEwREAWPzlQCuhKnAAylEACaZE1nJABxIY1XwABxEY175ArU9fd1IQCaGzoWXAID/54Cg4hN19Q8BxZMHQAxcyFxAppdcwFxEhY9cxPJAYkTSREJJskkFYYKAaTVtv0ERBsaXAID/54BA1gNFhQGyQHUVEzUVAEEBgoBBEQbGxTcNxbcHg0CThwcA1EOZzjdnCWATB8cQHEM3Bv3/fRbxjzcGAwDxjtWPHMOyQEEBgoBBEQbGbTcRwQ1FskBBARcDgP9nAIPMQREGxibCIsSqhJcAgP/ngODJWTcNyTcHg0CTBgcAg9eGABMEBwCFB8IHwYMjlPYAkwYADGOG1AATB+ADY3X3AG03IxQEALJAIkSSREEBgoBBEQbGEwcADGMa5QATBbANRTcTBcANskBBAVm/EwewDeMb5f5xNxMF0A31t0ERIsQmwgbGKoSzBLUAYxeUALJAIkSSREEBgoADRQQABQRNP+23NXEmy07H/XKFaf10Is1KyVLFVsMGz5OEhPoWkZOHCQemlxgIs4TnACqJJoUuhJcAgP/ngEApk4cJBxgIBWq6l7OKR0Ex5AVnfXWTBYX6kwcHBxMFhfkUCKqXM4XXAJMHBweul7OF1wAqxpcAgP/ngAAmMkXBRZU3AUWFYhaR+kBqRNpESkm6SSpKmkoNYYKAooljc4oAhWlOhtaFSoWXAID/54BAxRN19Q8B7U6G1oUmhZcAgP/ngEAhTpkzBDRBUbcTBTAGVb8TBQAMSb0xcf1yBWdO11LVVtNezwbfIt0m20rZWtFizWbLaslux/13FpETBwcHPpccCLqXPsYjqgf4qokuirKKtov1M5MHAAIZwbcHAgA+hZcAgP/ngOAZhWdj5VcTBWR9eRMJifqTBwQHypcYCDOJ5wBKhZcAgP/ngGAYfXsTDDv5kwyL+RMHBAeTBwQHFAhil+aXgUQzDNcAs4zXAFJNY3xNCWPxpANBqJk/ooUIAY01uTcihgwBSoWXAID/54BAFKKZopRj9UQDs4ekQWPxdwMzBJpAY/OKAFaEIoYMAU6FlwCA/+eAgLQTdfUPVd0CzAFEeV2NTaMJAQBihZcAgP/ngECkffkDRTEB5oWFNGNPBQDj4o3+hWeThwcHopcYCLqX2pcjiqf4BQTxt+MVpf2RR+MF9PYFZ311kwcHB5MFhfoTBYX5FAiqlzOF1wCTBwcHrpezhdcAKsaXAID/54BgCnE9MkXBRWUzUT3BMbcHAgAZ4ZMHAAI+hZcAgP/ngGAHhWIWkfpQalTaVEpZulkqWppaClv6S2pM2kxKTbpNKWGCgLdXQUkZcZOH94QBRYbeotym2srYztbS1NbS2tDezuLM5srqyO7GPs6XAID/54CAnaE5DcE3ZwlgEwfHEBxDtwaDQCOi9gC3Bv3//Rb1j8Fm1Y8cwxU5Bc23JwtgN0fYUJOGx8ETBxeqmMIThgfAIyAGACOgBgCThkfCmMKThwfCmEM3BgQAUY+YwyOgBgC3B4NANzeEQJOHBwATBwe7IaAjoAcAkQfj7ef+RTuRRWgIdTllM7e3g0CThweyIWc+lyMg9wi3B4BANwmDQJOHhw4jIPkAtzmEQEU+EwkJAJOJCbJjBQUQtwcBYEVHI6rnCIVFRUWXAID/54DA8rcFgEABRpOFBQBFRZcAgP/ngMDzt/cAYBFHmMs3BQIAlwCA/+eAAPO3FwlgiF+BRbeEg0BxiWEVEzUVAJcAgP/ngICdwWf9FxMHABCFZkFmtwUAAQFFk4REAbcKg0ANapcAgP/ngICTE4tKASaag6fJCPXfg6vJCIVHI6YJCCMC8QKDxxsACUcjE+ECowLxAgLUTUdjgecIUUdjj+cGKUdjn+cAg8c7AAPHKwCiB9mPEUdjlucAg6eLAJxDPtRFMaFFSBB1NoPHOwADxysAogfZjxFnQQdjdPcEEwWwDRk+EwXADQE+EwXgDik2jTlBt7cFgEABRpOFhQMVRZcAgP/ngMDkNwcAYFxHEwUAApPnFxBcxzG3yUcjE/ECTbcDxxsA0UZj5+YChUZj5uYAAUwTBPAPhah5FxN39w/JRuPo5v63NoRACgeThka7NpcYQwKHkwYHA5P29g8RRuNp1vwTB/cCE3f3D41GY+vmCLc2hEAKB5OGBsA2lxhDAocTB0ACY5jnEALUHUQBRaU0AUVVPPE26TahRUgQfRTRPHX0AUwBRBN19A9xPBN1/A9ZPH024x4E6oPHGwBJR2No9zAJR+N29+r1F5P39w89R+Ng9+o3N4RAigcTBwfBupecQ4KHBUSd63AQgUUBRZfwf//ngABxHeHRRWgQnTwBRDGoBUSB75fwf//ngIB1MzSgACmgIUdjhecABUQBTGG3A6yLAAOkywCzZ4wA0gf19+/wv4V98cFsIpz9HH19MwWMQFXcs3eVAZXjwWwzBYxAY+aMAv18MwWMQFXQMYGX8H//54AAclX5ZpT1tzGBl/B//+eAAHFV8WqU0bdBgZfwf//ngEBwUfkzBJRBwbchR+OJ5/ABTBMEAAwxt0FHzb9BRwVE45zn9oOlywADpYsA5TKxv0FHBUTjkuf2A6cLAZFnY+rnHoOlSwEDpYsA7/D/gDW/QUcFROOS5/SDpwsBEWdjavccA6fLAIOlSwEDpYsAM4TnAu/wb/4jrAQAIySKsDG3A8cEAGMDBxQDp4sAwRcTBAAMYxP3AMBIAUeTBvAOY0b3AoPHWwADx0sAAUyiB9mPA8drAEIHXY+Dx3sA4gfZj+OB9uYTBBAMqb0zhusAA0aGAQUHsY7ht4PHBAD9x9xEY50HFMBII4AEAH21YUdjlucCg6fLAQOniwGDpksBA6YLAYOlywADpYsAl/B//+eAwGAqjDM0oAAptQFMBUQRtRFHBUTjmufmt5cAYLRLZXd9FwVm+Y7RjgOliwC0y/RDgUX5jtGO9MP0S/mO0Y70y7RDdY9Rj7jDl/B//+eAoGMpvRP39wDjFQfqk9xHABOEiwABTH1d43Sc20hEl/B//+eAIEgYRFRAEED5jmMHpwEcQhNH9/99j9mOFMIFDEEE2b8RR6W1QUcFROOX596Dp4sAA6dLASMo+QAjJukAdbuDJckAwReR5YnPAUwTBGAMibsDJwkBY2b3BhP3NwDjGQfiAygJAQFGAUczBehAs4blAGNp9wDjBAbSIyipACMm2QAxuzOG6wAQThEHkMIFRum/IUcFROOR59gDJAkBGcATBIAMIygJACMmCQAzNIAApbMBTBMEIAztsQFMEwSADM2xAUwTBJAM6bkTByANY4PnDBMHQA3jm+e4A8Q7AIPHKwAiBF2Ml/B//+eAwEYDrMQAQRRjc4QBIozjCQy2wEBilDGAnEhjVfAAnERjW/QK7/Cvy3XdyEBihpOFiwGX8H//54DAQgHFkwdADNzI3EDil9zA3ESzh4dB3MSX8H//54CgQSW2CWUTBQVxA6zLAAOkiwCX8H//54CgMrcHAGDYS7cGAAHBFpNXRwESB3WPvYvZj7OHhwMBRbPVhwKX8H//54DAMxMFgD6X8H//54BAL+m8g6ZLAQOmCwGDpcsAA6WLAO/w7/vRtIPFOwCDxysAE4WLAaIF3Y3BFe/wj9V1tO/w78Q9vwPEOwCDxysAE4yLASIEXYzcREEUzeORR4VLY/+HCJMHkAzcyEG0A6cNACLQBUizh+xAPtaDJ4qwY3P0AA1IQsY6xO/wb8AiRzJIN4WDQOKFfBCThkoBEBATBcUCl/B//+eAIDE3t4NAkwhHAYJXA6eIsIOlDQAdjB2PPpyyVyOk6LCqi76VI6C9AJOHSgGdjQHFoWdjl/UAWoXv8C/LI6BtAQnE3ESZw+NPcPdj3wsAkwdwDL23hUu3PYRAt4yDQJONDbuTjEwB6b/jnQuc3ETjigeckweADKm3g6eLAOOTB5zv8C/TCWUTBQVxl/B//+eAoBzv8K/Ol/B//+eA4CBVsgOkywDjDwSY7/Cv0BMFgD6X8H//54BAGu/wT8wClFGy7/DPy/ZQZlTWVEZZtlkmWpZaBlv2S2ZM1kxGTbZNCWGCgAAA`,n=1082130432,r=`FACDQHIKgEDCCoBAGguAQOgLgEBUDIBAAgyAQD4JgECkC4BA5AuAQC4LgEDuCIBAYguAQO4IgEBMCoBAkgqAQMIKgEAaC4BAXgqAQKIJgEDSCYBAWgqAQKwOgEDCCoBAbA2AQGQOgEAuCIBAjA6AQC4IgEAuCIBALgiAQC4IgEAuCIBALgiAQC4IgEAuCIBACA2AQC4IgECKDYBAZA6AQA==`,i=1082403760,a=1082327040,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/stub_flasher_32p4-Q6hgNTYb.js",
    "content": "var e=1341195918,t=`QREixCbCBsa3Jw1QEUc3BPVP2Mu3JA1QEwQEANxAkYuR57JAIkSSREEBgoCIQBxAE3X1D4KX3bcBEbenDFBOxoOphwBKyDcJ9U8mylLEBs4izLekDFB9WhMJCQDATBN09D8N4PJAYkQjqDQBQknSRLJJIkoFYYKAiECDJwkAE3X1D4KXfRTjGUT/yb8TBwAMlEGqh2MY5QCFR4XGI6AFAHlVgoAFR2OH5gAJRmONxgB9VYKAQgUTB7ANQYVjlecCiUecwfW3kwbADWMW1QCYwRMFAAyCgJMG0A19VWOV1wCYwRMFsA2CgLc19k9BEZOFRboGxmE/Y0UFBrc39k+Th8exA6cHCAPWRwgTdfUPkwYWAMIGwYIjktcIMpcjAKcAA9dHCJFnk4cHBGMe9wI3t/VPEwfHsaFnupcDpgcIt/b1T7c39k+Th8exk4bGtWMf5gAjpscII6DXCCOSBwghoPlX4wb1/LJAQQGCgCOm1wgjoOcI3bc31whQfEudi/X/N8cIUHxLnYv1/4KAQREGxt03t9cIUCOmBwI3BwAImMOYQ33/yFeyQBNF9f8FiUEBgoBBEQbG2T993TcHAEC31whQmMM31whQHEP9/7JAQQGCgEERIsQ3hPVPkwcEAUrAA6kHAQbGJsJjCgkERTc5xb1HEwQEAYFEY9YnAQREvYiTtBQAfTeFPxxENwaAABOXxwCZ4DcGAAG39v8AdY+31ghQ2MKQwphCff9BR5HgBUczCelAupcjKCQBHMSyQCJEkkQCSUEBgoABEQbOIswlNzcE9E9sABMFxP6XAM//54Ag86qHBUWV57JHk/cHID7GiTc31whQHEe3BkAAEwXE/tWPHMeyRZcAz//ngKDwMzWgAPJAYkQFYYKAQRG3h/VPBsaThwcBBUcjgOcAE9fFAJjHBWd9F8zDyMf5jTqVqpWxgYzLI6oHAEE3GcETBVAMskBBAYKAAREizDeE9U+TBwQBJsrER07GBs5KyKqJEwQEAWPzlQCuhKnAAylEACaZE1nJABxIY1XwABxEY175ArU9fd1IQCaGzoWXAM//54Cg4xN19Q8BxZMHQAxcyFxAppdcwFxEhY9cxPJAYkTSREJJskkFYYKAaTVtv0ERBsaXAM//54BA1gNFhQGyQGkVEzUVAEEBgoBBEQbGxTcRwRlFskBBARcDz/9nAOPPQREGxibCIsSqhJcAz//ngADNdT8NyTcH9U+TBgcAg9dGABMEBwCFB8IHwYMjkvYAkwYADGOG1AATB+ADY3X3AG03IxIEALJAIkSSREEBgoBBEQbGEwcADGMa5QATBbANRTcTBcANskBBAVm/EwewDeMb5f5xNxMF0A31t0ERIsQmwgbGKoSzBLUAYxeUALJAIkSSREEBgoADRQQABQRNP+23NXEmy07H/XKFaf10Is1KyVLFVsMGz5OEhPoWkZOHCQemlxgIs4TnACqJJoUuhJcAz//ngOAZk4cJBxgIBWq6l7OKR0Ex5AVnfXWTBYX6kwcHBxMFhfkUCKqXM4XXAJMHBweul7OF1wAqxpcAz//ngKAWMkXBRZU3AUWFYhaR+kBqRNpESkm6SSpKmkoNYYKAooljc4oAhWlOhtaFSoWXAM//54CgyRN19Q8B7U6G1oUmhZcAz//ngOARTpkzBDRBUbcTBTAGVb8TBQAMSb0xcf1yBWdO11LVVtNezwbfIt0m20rZWtFizWbLaslux/13FpETBwcHPpccCLqXPsYjqgf4qokuirKKtosNNZMHAAIZwbcHAgA+hZcAz//ngIAKhWdj5VcTBWR9eRMJifqTBwQHypcYCDOJ5wBKhZcAz//ngAAJfXsTDDv5kwyL+RMHBAeTBwQHFAhil+aXgUQzDNcAs4zXAFJNY3xNCWPxpANBqJk/ooUIAY01uTcihgwBSoWXAM//54DgBKKZopRj9UQDs4ekQWPxdwMzBJpAY/OKAFaEIoYMAU6FlwDP/+eA4LgTdfUPVd0CzAFEeV2NTaMJAQBihZcAz//ngKCnffkDRTEB5oVZPGNPBQDj4o3+hWeThwcHopcYCLqX2pcjiqf4BQTxt+MVpf2RR+MF9PYFZ311kwcHB5MFhfoTBYX5FAiqlzOF1wCTBwcHrpezhdcAKsaXAM//54AA+3E9MkXBRWUzUT3dObcHAgAZ4ZMHAAI+hZcAz//ngAD4hWIWkfpQalTaVEpZulkqWppaClv6S2pM2kxKTbpNKWGCgLdXQUkZcZOH94QBRYbeotym2srYztbS1NbS2tDezuLM5srqyO7GPs6XAM//54DgoHkxBcU3R9hQt2cRUBMHF6qYzyOgBwAjrAcAmNPYT7cGBABVj9jPI6AHArcH9U83N/ZPk4cHABMHx7ohoCOgBwCRB+Pt5/7VM5FFaAjFOfE7t7f1T5OHx7EhZz6XIyD3CLcH8U83CfVPk4eHDiMg+QC3OfZPKTmTicmxEwkJAGMFBRC3Zw1QEwcQArjPhUVFRZcAz//ngKDmtwXxTwFGk4UFAEVFlwDP/+eAoOe3Jw1QEUeYyzcFAgCXAM//54Dg5rcHDlCIX4FFt4T1T3GJYRUTNRUAlwDP/+eAYKXBZ/0XEwcAEIVmQWa3BQABAUWThAQBtwr1Tw1qlwDP/+eAIJsTiwoBJpqDp8kI9d+Dq8kIhUcjpgkIIwLxAoPHGwAJRyMT4QKjAvECAtRNR2OB5whRR2OP5wYpR2Of5wCDxzsAA8crAKIH2Y8RR2OW5wCDp4sAnEM+1NE5oUVIEMU2g8c7AAPHKwCiB9mPEWdBB2N09wQTBbANqTYTBcANkTYTBeAOPT5dMUG3twXxTwFGk4WFAxVFlwDP/+eAoNg3pwxQXEcTBQACk+cXEFzHMbfJRyMT8QJNtwPHGwDRRmPn5gKFRmPm5gABTBME8A+FqHkXE3f3D8lG4+jm/rc29k8KB5OGBrs2lxhDAoeTBgcDk/b2DxFG42nW/BMH9wITd/cPjUZj6+YItzb2TwoHk4bGvzaXGEMChxMHQAJjl+cQAtQdRAFFcTwBReU0ATH9PqFFSBB9FCE2dfQBTAFEE3X0D8E8E3X8D+k0zTbjHgTqg8cbAElHY2v3MAlH43b36vUXk/f3Dz1H42D36jc39k+KBxMHx8C6l5xDgocFRJ3rcBCBRQFFl/DO/+eAoHcd4dFFaBBtNAFEMagFRIHvl/DO/+eAIH0zNKAAKaAhR2OF5wAFRAFMYbcDrIsAA6TLALNnjADSB/X30TBl9cFsIpz9HH19MwWMQF3cs3eVAZXjwWwzBYxAY+aMAv18MwWMQF3QMYGX8M7/54DAeV35ZpT1tzGBl/DO/+eAwHhd8WqU0bdBgZfwzv/ngAB4WfkzBJRBwbchR+OK5/ABTBMEAAw5t0FHzb9BRwVE453n9oOlywADpYsAOTy5v0FHBUTjk+f2A6cLAZFnY+7nHoOlSwEDpYsA7/C/hz2/QUcFROOT5/SDpwsBEWdjbvccA6fLAIOlSwEDpYsAM4TnAu/wP4UjrAQAIySKsDm3A8cEAGMHBxQDp4sAwRcTBAAMYxP3AMBIAUeTBvAOY0b3AoPHWwADx0sAAUyiB9mPA8drAEIHXY+Dx3sA4gfZj+OC9uYTBBAMsb0zhusAA0aGAQUHsY7ht4PHBAD9y9xEY5EHFsBII4AEAEW9YUdjlucCg6fLAQOniwGDpksBA6YLAYOlywADpYsAl/DO/+eAgGgqjDM0oAAxtQFMBUQZtRFHBUTjm+fmtxcOUPRfZXd9FwVm+Y7RjgOliwCThQcI9N+UQfmO0Y6UwZOFRwiUQfmO0Y6UwbRfgUV1j1GPuN+X8M7/54AgaxG9E/f3AOMRB+qT3EcAE4SLAAFMfV3jcZzbSESX8M7/54AgThhEVEAQQPmOYwenARxCE0f3/32P2Y4UwgUMQQTZvxFHhbVBRwVE45Tn3oOniwADp0sBIyb5ACMk6QBdu4MliQDBF5Hlic8BTBMEYAyxswMnyQBjZvcGE/c3AOMVB+IDKMkAAUYBRzMF6ECzhuUAY2n3AOMBBtIjJqkAIyTZABm7M4brABBOEQeQwgVG6b8hRwVE457n1gMkyQAZwBMEgAwjJgkAIyQJADM0gACNswFMEwQgDNWxAUwTBIAM8bkBTBMEkAzRuRMHIA1jg+cMEwdADeOY57gDxDsAg8crACIEXYyX8M7/54AATgOsxABBFGNzhAEijOMGDLbAQGKUMYCcSGNV8ACcRGNb9Arv8O/Rdd3IQGKGk4WLAZfwzv/ngABKAcWTB0AM3MjcQOKX3MDcRLOHh0HcxJfwzv/ngOBIDbYJZRMFBXEDrMsAA6SLAJfwzv/ngKA4t6cMUNhLtwYAAcEWk1dHARIHdY+9i9mPs4eHAwFFs9WHApfwzv/ngAA6EwWAPpfwzv/ngEA10byDpksBA6YLAYOlywADpYsA7/DP/n28g8U7AIPHKwAThYsBogXdjcEV7/DP21207/Avyz2/A8Q7AIPHKwATjIsBIgRdjNxEQRTN45FHhUtj/4cIkweQDNzIrbwDpw0AItAFSLOH7EA+1oMnirBjc/QADUhCxjrE7/CvxiJHMkg3hfVP4oV8EJOGCgEQEBMFhQKX8M7/54BgNze39U+TCAcBglcDp4iwg6UNAB2MHY8+nLJXI6TosKqLvpUjoL0Ak4cKAZ2NAcWhZ2OX9QBahe/wb9EjoG0BCcTcRJnD409w92PfCwCTB3AMvbeFS7c99k+3jPVPk43NupOMDAHpv+OaC5zcROOHB5yTB4AMqbeDp4sA45AHnO/wD9YJZRMFBXGX8M7/54CgIpfwzv/ngKAnTbIDpMsA4w4EmO/wz9MTBYA+l/DO/+eAgCAClFmy9lBmVNZURlm2WSZalloGW/ZLZkzWTEZNtk0JYYKAAAA=`,n=1341194240,r=`EAD1TwYK8U9WCvFPrgrxT4QL8U/wC/FPngvxT9QI8U9AC/FPgAvxT8IK8U+ECPFP9grxT4QI8U/gCfFPJgrxT1YK8U+uCvFP8gnxTzgJ8U9oCfFP7gnxT0AO8U9WCvFPCA3xTwAO8U/EB/FPJA7xT8QH8U/EB/FPxAfxT8QH8U/EB/FPxAfxT8QH8U/EB/FPpAzxT8QH8U8mDfFPAA7xTw==`,i=1341533100,a=1341456384,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/stub_flasher_32s2-CjuleYts.js",
    "content": "var e=1073907716,t=`CAAAYBwAAGBIAP0/EAAAYDZBACH7/8AgADgCQfr/wCAAKAQgIJSc4kH4/0YEAAw4MIgBwCAAqAiIBKCgdOAIAAsiZgLohvT/IfH/wCAAOQId8AAA7Cv+P2Sr/T+EgAAAQEAAAKTr/T/wK/4/NkEAsfn/IKB0EBEgJQgBlhoGgfb/kqEBkJkRmpjAIAC4CZHz/6CgdJqIwCAAkhgAkJD0G8nAwPTAIADCWACam8AgAKJJAMAgAJIYAIHq/5CQ9ICA9IeZR4Hl/5KhAZCZEZqYwCAAyAmh5f+x4/+HnBfGAQB86Ica3sYIAMAgAIkKwCAAuQlGAgDAIAC5CsAgAIkJkdf/mogMCcAgAJJYAB3wAABUIEA/VDBAPzZBAJH9/8AgAIgJgIAkVkj/kfr/wCAAiAmAgCRWSP8d8AAAACwgQD8AIEA/AAAACDZBABARIKX8/yH6/wwIwCAAgmIAkfr/gfj/wCAAkmgAwCAAmAhWef/AIACIAnzygCIwICAEHfAAAAAAQDZBABARIOX7/xZq/4Hs/5H7/8AgAJJoAMAgAJgIVnn/HfAAAFiA/T////8ABCBAPzZBACH8/zhCFoMGEBEgZfj/FvoFDPgMBDeoDZgigJkQgqABkEiDQEB0EBEgJfr/EBEgJfP/iCIMG0CYEZCrAcwUgKsBse3/sJkQsez/wCAAkmsAkc7/wCAAomkAwCAAqAlWev8cCQwaQJqDkDPAmog5QokiHfAAAHDi+j8IIEA/hGIBQKRiAUA2YQAQESBl7f8x+f+9Aa0Dgfr/4AgATQoMEuzqiAGSogCQiBCJARARIOXx/5Hy/6CiAcAgAIgJoIggwCAAiQm4Aa0Dge7/4AgAoCSDHfAAAP8PAAA2QQCBxf8MGZJIADCcQZkokfv/ORgpODAwtJoiKjMwPEEMAilYOUgQESAl+P8tCowaIqDFHfAAAMxxAUA2QQBBtv9YNFAzYxZjBFgUWlNQXEFGAQAQESDl7P+IRKYYBIgkh6XvEBEgJeX/Fmr/qBTNA70CgfH/4AgAoKB0jEpSoMRSZAVYFDpVWRRYNDBVwFk0HfAA+Pz/P0QA/T9MAP0/ADIBQOwxAUAwMwFANmEAfMitAoeTLTH3/8YFAKgDDBwQsSCB9//gCACBK/+iAQCICOAIAKgDgfP/4AgA5hrcxgoAAABmAyYMA80BDCsyYQCB7v/gCACYAYHo/zeZDagIZhoIMeb/wCAAokMAmQgd8EAA/T8AAP0/jDEBQDZBACH8/4Hc/8gCqAix+v+B+//gCAAMCIkCHfBgLwFANkEAgf7/4AgAggoYDAmCyP4MEoApkx3w+Cv+P/Qr/j8YAEw/jABMP//z//82QQAQESDl/P8WWgSh+P+ICrzYgff/mAi8abH2/3zMwCAAiAuQkBTAiBCQiCDAIACJC4gKsfH/DDpgqhHAIACYC6CIEKHu/6CZEJCIIMAgAIkLHfAoKwFANkEAEBEgZff/vBqR0f+ICRuoqQmR0P8MCoqZIkkAgsjBDBmAqYOggHTMiqKvQKoiIJiTjPkQESAl8v/GAQCtAoHv/+AIAB3wNkEAoqDAEBEg5fr/HfAAADZBAIKgwK0Ch5IRoqDbEBEgZfn/oqDcRgQAAAAAgqDbh5IIEBEgJfj/oqDdEBEgpff/HfA2QQA6MsYCAKICACLCARARIKX7/zeS8B3wAAAAbFIAQIxyAUCMUgBADFMAQDYhIaLREIH6/+AIAEYLAAAADBRARBFAQ2PNBL0BrQKB9f/gCACgoHT8Ws0EELEgotEQgfH/4AgASiJAM8BWA/0iogsQIrAgoiCy0RCB7P/gCACtAhwLEBEgpff/LQOGAAAioGMd8AAAQCsBQDZBABARICXl/4y6gYj/iAiMSBARICXi/wwKgfj/4AgAHfAAAIQyAUC08QBAkDIBQMDxAEA2QQAQESDl4f+smjFc/4ziqAOB9//gCACiogDGBgAAAKKiAIH0/+AIAKgDgfP/4AgARgUAAAAsCoyCgfD/4AgAhgEAAIHs/+AIAB3w8CsBQDZBIWKhB8BmERpmWQYMBWLREK0FUmYaEBEgZfn/DBhAiBFHuAJGRACtBoG1/+AIAIYzAACSpB1Qc8DgmREamUB3Y4kJzQe9ASCiIIGu/+AIAJKkHeCZERqZoKB0iAmMigwIgmYWfQiGFQCSpB3gmREamYkJEBEgpeL/vQetARARICXm/xARIKXh/80HELEgYKYggZ3/4AgAkqQd4JkRGpmICXAigHBVgDe1tJKhB8CZERqZmAmAdcCXtwJG3f+G5/8MCIJGbKKkGxCqoIHM/+AIAFYK/7KiC6IGbBC7sBARICWiAPfqEvZHD7KiDRC7sHq7oksAG3eG8f9867eawWZHCIImGje4Aoe1nCKiCxAisGC2IK0CgX3/4AgAEBEgJdj/rQIcCxARIKXb/xARICXX/wwaEBEgpef/HfAAAP0/T0hBSfwr/j9sgAJASDwBQDyDAkAIAAhgEIACQAwAAGA4QEA///8AACiBQD+MgAAAEEAAAAAs/j8QLP4/fJBAP/+P//+AkEA/hJBAP3iQQD9QAP0/VAD9P1ws/j8UAABg8P//APwr/j9YAP0/cID9P1zyAECI2ABA0PEAQKTxAEDUMgFAWDIBQKDkAEAEcAFAAHUBQIBJAUDoNQFA7DsBQIAAAUCYIAFA7HABQGxxAUAMcQFAhCkBQHh2AUDgdwFAlHYBQAAwAEBoAAFANsEAIcz/DAopoYHm/+AIABARIGW7/xbqBDHz/kHy/sAgACgDUfL+KQTAIAAoBWHs/qKgZCkGYe7+YCIQYqQAYCIgwCAAKQWB2P/gCABIBHzCQCIQDCRAIiDAIAApA4YBAEkCSyLGAQAhsv8xs/8MBDcy7RARIOXB/wxLosEoEBEgZcX/IqEBEBEgpcD/QfH9kCIRKiTAIABJAjGo/yHZ/TJiABARICWy/xY6BiGd/sGd/qgCDCuBn/7gCAAMnDwLDAqBuv/gCACxnv8MDAyagbj/4AgAoqIAgTL/4AgAsZn/qAJSoAGBs//gCACoAoEp/+AIAKgCgbD/4AgAMZP/wCAAKANQIiDAIAApAwYKAACxj//NCgxagab/4AgAMYz/UqEBwCAAKAMsClAiIMAgACkDgRv/4AgAgaH/4AgAIYX/wCAAKALMuhzDMCIQIsL4DBMgo4MMC4Ga/+AIAPF+/wwdDByyoAHioQBA3REAzBGAuwGioACBk//gCAAhef9RCf4qRGLVK8YWAAAAAMAgADIHADAwdBbzBKKiAMAgACJHAIH9/uAIAKKiccCqEYF+/+AIAIGF/+AIAHFo/3zowCAAOAeir/+AMxAQqgHAIAA5B4F+/+AIAIF+/+AIAK0CgX3/4AgAcVD+wCAAKAQWsvkMB8AgADgEDBLAIAB5BCJBHCIDAQwoeYEiQR2CUQ8cN3cSIxxHdxIkZpImIgMDcgMCgCIRcCIgZkIXKCPAIAAoAimBxgIAABwihgAAAAzCIlEPEBEg5aT/sqAIosEcEBEgZaj/cgMDIgMCgHcRIHcgIUD/ICD0d7IaoqDAEBEgJaP/oqDuEBEgpaL/EBEgZaH/Btj/IgMBHEgnODf2IhsG9wAiwi8gIHS2QgJGJgCBMv+AIqAoAqACAAAAIsL+ICB0HCgnuAJG7QCBLP+AIqAoAqACAILCMICAdLZYxIbnACxJDAgioMCXFwKG5QCJgQxyfQitBxARIKWb/60HEBEgJZv/EBEg5Zn/EBEgZZn/DIuiwRwLIhARIOWc/1Yy/YYvAAwSVhc1wsEQvQetB4Eu/+AIAFYaNLKgDKLBEBARIGWa/wauAAAADBJWtzKBJ//gCAAGKwAmhwYMEobGAAAAeCMoMyCHIICAtFa4/hARIGVt/yp3nBqG9/8AoKxBgRz/4AgAVhr9ItLwIKfAzCIGmwAAoID0Vhj+hgQAoKD1icGBFP/gCACIwVbK+oAiwAwYAIgRIKfAJzjhhgMAoKxBgQv/4AgAVvr4ItLwIKfAVqL+RooAAAwIIqDAJocChqgADAgtCMamACa39YZ8AAwSJrcChqAAuDOoI3KgABARICWR/6Ang8abAAwZZrddeEMgqREMCCKgwne6AkaZALhTqCOSYQ4QESAlZ/+Y4QwCoJKDhg0ADBlmtzF4QyCpEQwIIqDCd7oCRo4AKDO4U6gjIHeCmeEQESAlZP8hVv0MCJjhiWIi0it5IqCYgy0JxoEAkVD9DAiiCQAioMaHmgJGgACII3LH8CKgwHeYAShZDAiSoO9GAgCKo6IKGBuIoJkwdyjycgMFggMEgHcRgHcgggMGAIgRcIggcgMHgHcBgHcgcJnAcqDBDAiQJ5PGbABxOP0ioMaSBwCNCRZZGpg3DAgioMiHGQIGZgAoV5JHAEZhAByJDAgMEpcXAgZhAPhz6GPYU8hDuDOoIwwHgbH+4AgAjQqgJ4MGWgAMEiZHAkZVAJGX/oGX/sAgAHgJQCIRgHcQIHcgqCPAIAB5CZGS/gwLwCAAeAmAdxAgdyDAIAB5CZGO/sAgAHgJgHcQIHcgwCAAeQmRiv7AIAB4CYB3ECAnIMAgACkJgZX+4AgABh8AcKA0DAgioMCHGgLGPABwtEGLk30KfPwGDgAAqDmZ4bnBydGBhP7gCACY4bjBKCmIGagJyNGAghAmAg3AIADYCiAsMNAiECCIIMAgAIkKG3eSyRC3N8RGgf9mRwLGf/8MCCKgwIYmAAwSJrcCxiEAIWj+iFN4I4kCIWf+eQIMAgYdALFj/gwI2AsMGnLH8J0ILQjQKoNwmpMgmRAioMaHmWDBXf6NCegMIqDJdz5TcPAUIqDAVq8ELQmGAgAAKpOYaUsimQidCiD+wCqNdzLtFsnY+QyJC0Zh/wAMEmaHFyFN/ogCjBiCoMgMB3kCIUn+eQIMEoAngwwIRgEAAAwIIqD/IKB0gmEMEBEgZWL/iMGAoHQQESClYf8QESBlYP9WArUiAwEcJyc3HvYyAobQ/iLC/SAgdAz3J7cCBs3+cTb+cCKgKAKgAgByoNJ3El9yoNR3kgIGIQDGxf4AAHgzOCMQESAlT/+NClZqsKKiccCqEYnBgTD+4AgAISj+kSn+wCAAKAKIwSC0NcAiEZAiECC7IHC7gq0IMLvCgTb+4AgAoqPogST+4AgARrH+AADYU8hDuDOoIxARIGVs/4as/rIDAyIDAoC7ESC7ILLL8KLDGBARIOU3/8al/gAAIgMDcgMCgCIRcCIggST+4AgAcZD8IsLwiDeAImMWUqeIF4qCgIxBhgIAicEQESAlI/+CIQySJwSmGQSYJ5eo6RARICUb/xZq/6gXzQKywxiBFP7gCACMOjKgxDlXOBcqMzkXODcgI8ApN4EO/uAIAIaI/gAAIgMDggMCcsMYgCIRODWAIiAiwvBWwwn2UgKGJQAioMlGKgAx7P2BbvzoAymR4IjAiUGIJq0Jh7IBDDqZ4anR6cEQESBlGv+o0YHj/ejBqQGh4v3dCL0HwsEk8sEQicGB9f3gCAC4Js0KqJGY4aC7wLkmoCLAuAOqd6hBiMGquwwKuQPAqYOAu8Cg0HTMmuLbgK0N4KmDFuoBrQiJwZnhydEQESDlJf+IwZjhyNGJA0YBAAAADBydDIyyODWMc8A/McAzwJaz9daMACKgxylVhlP+AFaslCg1FlKUIqDIxvr/KCNWopMQESAlTP+ionHAqhGBvP3gCAAQESAlM/+Bzv3gCABGRv4AKDMWMpEQESClSf+io+iBs/3gCAAQESDlMP/gAgAGPv4AEBEgJTD/HfAAADZBAJ0CgqDAKAOHmQ/MMgwShgcADAIpA3zihg8AJhIHJiIYhgMAAACCoNuAKSOHmSoMIikDfPJGCAAAACKg3CeZCgwSKQMtCAYEAAAAgqDdfPKHmQYMEikDIqDbHfAAAA==`,n=1073905664,r=`WAD9P0uLAkDdiwJA8pACQGaMAkD+iwJAZowCQMWMAkDejQJAUY4CQPmNAkDVigJAd40CQNCNAkDojAJAdI4CQBCNAkB0jgJAy4sCQCqMAkBmjAJAxYwCQOOLAkAXiwJAN48CQKqQAkDqiQJA0ZACQOqJAkDqiQJA6okCQOqJAkDqiQJA6okCQOqJAkDqiQJA1I4CQOqJAkDJjwJAqpACQA==`,i=1073622012,a=1073545216,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/stub_flasher_32s3-Bz348Cp3.js",
    "content": "var e=1077381760,t=`FIADYACAA2BMAMo/BIADYDZBAIH7/wxJwCAAmQjGBAAAgfj/wCAAqAiB9/+goHSICOAIACH2/8AgAIgCJ+jhHfAAAAAIAABgHAAAYBAAAGA2QQAh/P/AIAA4AkH7/8AgACgEICCUnOJB6P9GBAAMODCIAcAgAKgIiASgoHTgCAALImYC6Ib0/yHx/8AgADkCHfAAAPQryz9sq8o/hIAAAEBAAACs68o/+CvLPzZBALH5/yCgdBARICU5AZYaBoH2/5KhAZCZEZqYwCAAuAmR8/+goHSaiMAgAJIYAJCQ9BvJwMD0wCAAwlgAmpvAIACiSQDAIACSGACB6v+QkPSAgPSHmUeB5f+SoQGQmRGamMAgAMgJoeX/seP/h5wXxgEAfOiHGt7GCADAIACJCsAgALkJRgIAwCAAuQrAIACJCZHX/5qIDAnAIACSWAAd8AAAVCAAYFQwAGA2QQCR/f/AIACICYCAJFZI/5H6/8AgAIgJgIAkVkj/HfAAAAAsIABgACAAYAAAAAg2QQAQESCl/P8h+v8MCMAgAIJiAJH6/4H4/8AgAJJoAMAgAJgIVnn/wCAAiAJ88oAiMCAgBB3wAAAAAEA2QQAQESDl+/8Wav+B7P+R+//AIACSaADAIACYCFZ5/x3wAADoCABAuAgAQDaBAIH9/+AIABwGBgwAAABgVEMMCAwa0JURDI05Me0CiWGpUZlBiSGJEdkBLA8MzAxLgfL/4AgAUETAWjNaIuYUzQwCHfAAABQoAEA2QQAgoiCB/f/gCAAd8AAAcOL6PwggAGC8CgBAyAoAQDZhABARIGXv/zH5/70BrQOB+v/gCABNCgwS7OqIAZKiAJCIEIkBEBEg5fP/kfL/oKIBwCAAiAmgiCDAIACJCbgBrQOB7v/gCACgJIMd8AAAXIDKP/8PAABoq8o/NkEAgfz/DBmSSAAwnEGZKJH6/zkYKTgwMLSaIiozMDxBOUgx9v8ioAAyAwAiaAUnEwmBv//gCABGAwAAEBEgZfb/LQqMGiKgxR3wAP///wAEIABg9AgAQAwJAEAACQBANoEAMeT/KEMWghEQESAl5v8W+hAM+AwEJ6gMiCMMEoCANIAkkyBAdBARICXo/xARIOXg/yHa/yICABYyCqgjgev/QCoRFvQEJyg8gaH/4AgAgej/4AgA6CMMAgwaqWGpURyPQO4RDI3CoNgMWylBKTEpISkRKQGBl//gCACBlP/gCACGAgAAAKCkIYHb/+AIABwKBiAAAAAnKDmBjf/gCACB1P/gCADoIwwSHI9A7hEMjSwMDFutAilhKVFJQUkxSSFJEUkBgYP/4AgAgYH/4AgARgEAgcn/4AgADBqGDQAAKCMMGUAiEZCJAcwUgIkBkb//kCIQkb7/wCAAImkAIVr/wCAAgmIAwCAAiAJWeP8cCgwSQKKDKEOgIsApQygjqiIpIx3wAAA2gQCBaf/gCAAsBoYPAAAAga//4AgAYFRDDAgMGtCVEe0CqWGpUYlBiTGZITkRiQEsDwyNwqASsqAEgVz/4AgAgVr/4AgAWjNaIlBEwOYUvx3wAAAUCgBANmEAQYT/WDRQM2MWYwtYFFpTUFxBRgEAEBEgZeb/aESmFgRoJGel7xARIGXM/xZq/1F6/2gUUgUAFkUGgUX/4AgAYFB0gqEAUHjAd7MIzQO9Aq0Ghg4AzQe9Aq0GUtX/EBEgZfT/OlVQWEEMCUYFAADCoQCZARARIOXy/5gBctcBG5mQkHRgp4BwsoBXOeFww8AQESAl8f+BLv/gCACGBQDNA70CrQaB1f/gCACgoHSMSiKgxCJkBSgUOiIpFCg0MCLAKTQd8ABcBwBANkEAgf7/4AgAggoYDAmCyPwMEoApkx3wNkEAgfj/4AgAggoYDAmCyP0MEoApkx3wvP/OP0gAyj9QAMo/QCYAQDQmAEDQJgBANmEAfMitAoeTLTH3/8YFAACoAwwcvQGB9//gCACBj/6iAQCICOAIAKgDgfP/4AgA5hrdxgoAAABmAyYMA80BDCsyYQCB7v/gCACYAYHo/zeZDagIZhoIMeb/wCAAokMAmQgd8EQAyj8CAMo/KCYAQDZBACH8/4Hc/8gCqAix+v+B+//gCAAMCIkCHfCQBgBANkEAEBEgpfP/jLqB8v+ICIxIEBEgpfz/EBEg5fD/FioAoqAEgfb/4AgAHfAAAMo/SAYAQDZBABARIGXw/00KvDox5P8MGYgDDAobSEkDMeL/ijOCyMGAqYMiQwCgQHTMqjKvQDAygDCUkxZpBBARIOX2/0YPAK0Cge7/4AgAEBEgZer/rMox6f886YITABuIgID0glMAhzkPgq9AiiIMGiCkk6CgdBaqAAwCEBEgJfX/IlMAHfAAADZBAKKgwBARICX3/x3wAAA2QQCCoMCtAoeSEaKg2xARIKX1/6Kg3EYEAAAAAIKg24eSCBARIGX0/6Kg3RARIOXz/x3wNkEAOjLGAgAAogIAGyIQESCl+/83kvEd8AAAAFwcAEAgCgBAaBwAQHQcAEA2ISGi0RCB+v/gCACGDwAAUdD+DBRARBGCBQBAQ2PNBL0BrQKMmBARICWm/8YBAAAAgfD/4AgAoKB0/DrNBL0BotEQge3/4AgASiJAM8BW4/siogsQIrCtArLREIHo/+AIAK0CHAsQESCl9v8tA4YAACKgYx3wAACIJgBAhBsAQJQmAECQGwBANkEAEBEgpdj/rIoME0Fm//AzAYyyqASB9v/gCACtA8YJAK0DgfT/4AgAqASB8//gCAAGCQAQESDl0/8MGPCIASwDoIODrQgWkgCB7P/gCACGAQAAgej/4AgAHfBgBgBANkEhYqQd4GYRGmZZBgwXUqAAYtEQUKUgQHcRUmYaEBEg5ff/R7cCxkIArQaBt//gCADGLwCRjP5Qc8CCCQBAd2PNB70BrQIWqAAQESBllf/GAQAAAIGt/+AIAKCgdIyqDAiCZhZ9CEYSAAAAEBEgpeP/vQetARARICXn/xARIKXi/80HELEgYKYggaH/4AgAeiJ6VTe1yIKhB8CIEZKkHRqI4JkRiAgamZgJgHXAlzeDxur/DAiCRmyipBsQqqCBz//gCABWCv+yoguiBmwQu7AQESClsgD36hL2Rw+Sog0QmbB6maJJABt3hvH/fOmXmsFmRxKSoQeCJhrAmREamYkJN7gCh7WLIqILECKwvQatAoGA/+AIABARIOXY/60CHAsQESBl3P8QESDl1/8MGhARIOXm/x3wAADKP09IQUmwgABgoTrYUJiAAGC4gABgKjEdj7SAAGD8K8s/rIA3QJggDGA8gjdArIU3QAgACGCAIQxgEIA3QBCAA2BQgDdADAAAYDhAAGCcLMs///8AACyBAGAQQAAAACzLPxAsyz98kABg/4///4CQAGCEkABgeJAAYFQAyj9YAMo/XCzLPxQAAGDw//8A/CvLP1wAyj90gMo/gAcAQHgbAEC4JgBAZCYAQHQfAEDsCgBABCAAQFQJAEBQCgBAAAYAQBwpAEAkJwBACCgAQOQGAEB0gQRAnAkAQPwJAEAICgBAqAYAQIQJAEBsCQBAkAkAQCgIAEDYBgBANgEBIcH/DAoiYRCB5f/gCAAQESDlrP8WigQxvP8hvP9Bvf/AIAApAwwCwCAAKQTAIAApA1G5/zG5/2G5/8AgADkFwCAAOAZ89BBEAUAzIMAgADkGwCAAKQWGAQBJAksiBgIAIaj/Ma//QqAANzLsEBEgJcD/DEuiwUAQESClw/8ioQEQESDlvv8xY/2QIhEqI8AgADkCQaT/ITv9SQIQESClpf8tChb6BSGa/sGb/qgCDCuBnf7gCABBnP+xnf8cGgwMwCAAqQSBt//gCAAMGvCqAYEl/+AIALGW/6gCDBWBsv/gCACoAoEd/+AIAKgCga//4AgAQZD/wCAAKARQIiDAIAApBIYWABARIGWd/6yaQYr/HBqxiv/AIACiZAAgwiCBoP/gCAAhh/8MRAwawCAASQLwqgHGCAAAALGD/80KDFqBmP/gCABBgP9SoQHAIAAoBCwKUCIgwCAAKQSBAv/gCACBk//gCAAhef/AIAAoAsy6HMRAIhAiwvgMFCCkgwwLgYz/4AgAgYv/4AgAXQqMmkGo/QwSIkQARhQAHIYMEmlBYsEgqWFpMakhqRGpAf0K7QopUQyNwqCfsqAEIKIggWr94AgAcgEiHGhix+dgYHRnuAEtBTyGDBV3NgEMBUGU/VAiICAgdCJEABbiAKFZ/4Fy/+AIAIFb/eAIAPFW/wwdDBwMG+KhAEDdEQDMEWC7AQwKgWr/4AgAMYT9YtMrhhYAwCAAUgcAUFB0FhUFDBrwqgHAIAAiRwCByf7gCACionHAqhGBX//gCACBXv/gCABxQv986MAgAFgHfPqAVRAQqgHAIABZB4FY/+AIAIFX/+AIACCiIIFW/+AIAHEn/kHp/MAgACgEFmL5DAfAIABYBAwSwCAAeQQiQTQiBQEMKHnhIkE1glEbHDd3EiQcR3cSIWaSISIFA3IFAoAiEXAiIGZCEiglwCAAKAIp4YYBAAAAHCIiURsQESBlmf+yoAiiwTQQESDlnP+yBQMiBQKAuxEgSyAhGf8gIPRHshqioMAQESCll/+ioO4QESAll/8QESDllf+G2P8iBQEcRyc3N/YiGwYJAQAiwi8gIHS2QgIGJQBxC/9wIqAoAqACAAAiwv4gIHQcJye3Akb/AHEF/3AioCgCoAIAcsIwcHB0tlfFhvkALEkMByKgwJcUAob3AHnhDHKtBxARIGWQ/60HEBEg5Y//EBEgZY7/EBEgJY7/DIuiwTQiwv8QESBlkf9WIv1GQAAMElakOcLBIL0ErQSBCP/gCABWqjgcS6LBIBARICWP/4bAAAwSVnQ3gQL/4AgAoCSDxtoAJoQEDBLG2AAoJXg1cIIggIC0Vtj+EBEgZT7/eiKsmgb4/0EN/aCsQYIEAIz4gSL94AgARgMActfwRgMAAACB8f7gCAAW6v4G7v9wosDMF8anAKCA9FaY/EYKAEH+/KCg9YIEAJwYgRP94AgAxgMAfPgAiBGKd8YCAIHj/uAIABbK/kbf/wwYAIgRcKLAdzjKhgkAQfD8oKxBggQAjOiBBv3gCAAGAwBy1/AGAwAAgdX+4AgAFvr+BtL/cKLAVif9hosADAcioMAmhAIGqgAMBy0HRqgAJrT1Bn4ADBImtAIGogC4NaglDAcQESClgf+gJ4OGnQAMGWa0X4hFIKkRDAcioMKHugIGmwC4VaglkmEWEBEgZTT/kiEWoJeDRg4ADBlmtDSIRSCpEQwHIqDCh7oCRpAAKDW4VaglIHiCkmEWEBEgZTH/IcH8DAiSIRaJYiLSK3JiAqCYgy0JBoMAkbv8DAeiCQAioMZ3mgKGgQB4JbLE8CKgwLeXAiIpBQwHkqDvRgIAeoWCCBgbd4CZMLcn8oIFBXIFBICIEXCIIHIFBgB3EYB3IIIFB4CIAXCIIICZwIKgwQwHkCiTxm0AgaP8IqDGkggAfQkWmRqYOAwHIqDIdxkCBmcAKFiSSABGYgAciQwHDBKXFAIGYgD4dehl2FXIRbg1qCWBev7gCAAMCH0KoCiDBlsADBImRAJGVgCRX/6BX/7AIAB4CUAiEYB3ECB3IKglwCAAeQmRWv4MC8AgAHgJgHcQIHcgwCAAeQmRVv7AIAB4CYB3ECB3IMAgAHkJkVL+wCAAeAmAdxAgJyDAIAApCYFb/uAIAAYgAABAkDQMByKgwHcZAoY9AEBEQYvFfPhGDwCoPIJhFZJhFsJhFIFU/uAIAMIhFIIhFSgseByoDJIhFnByECYCDcAgANgKICgw0CIQIHcgwCAAeQobmcLMEEc5vsZ//2ZEAkZ+/wwHIqDAhiYADBImtALGIQAhL/6IVXgliQIhLv55AgwCBh0A8Sr+DAfIDwwZssTwjQctB7Apk8CJgyCIECKgxneYYKEk/n0I2AoioMm3PVOw4BQioMBWrgQtCIYCAAAqhYhoSyKJB40JIO3AKny3Mu0WaNjpCnkPxl//DBJmhBghFP6CIgCMGIKgyAwHeQIhEP55AgwSgCeDDAdGAQAADAcioP8goHQQESClUv9woHQQESDlUf8QESClUP9W8rAiBQEcJyc3H/YyAkbA/iLC/SAgdAz3J7cCxrz+cf/9cCKgKAKgAgAAcqDSdxJfcqDUd5ICBiEARrX+KDVYJRARIKU0/40KVmqsoqJxwKoRgmEVgQD+4AgAcfH9kfH9wCAAeAeCIRVwtDXAdxGQdxBwuyAgu4KtCFC7woH//eAIAKKj6IH0/eAIAMag/gAA2FXIRbg1qCUQESAlXP8GnP4AsgUDIgUCgLsRILsgssvwosUYEBEgJR//BpX+ACIFA3IFAoAiEXAiIIHt/eAIAHH7+yLC8Ig3gCJjFjKjiBeKgoCMQUYDAAAAgmEVEBEgpQP/giEVkicEphkFkicCl6jnEBEgZen+Fmr/qBfNArLFGIHc/eAIAIw6UqDEWVdYFypVWRdYNyAlwCk3gdb94AgABnf+AAAiBQOCBQJyxRiAIhFYM4AiICLC8FZFCvZSAoYnACKgyUYsAFGz/YHY+6gFKfGgiMCJgYgmrQmHsgEMOpJhFqJhFBARIOX6/qIhFIGq/akB6AWhqf3dCL0HwsE88sEggmEVgbz94AgAuCbNCqjxkiEWoLvAuSagIsC4Bap3qIGCIRWquwwKuQXAqYOAu8Cg0HTMiuLbgK0N4KmDrCqtCIJhFZJhFsJhFBARIKUM/4IhFZIhFsIhFIkFBgEAAAwcnQyMslgzjHXAXzHAVcCWNfXWfAAioMcpUwZA/lbcjygzFoKPIqDIBvv/KCVW0o4QESBlIv+ionHAqhGBif3gCACBlv3gCACGNP4oNRbSjBARIGUg/6Kj6IGC/eAIAOACAAYu/h3wAAAANkEAnQKCoMAoA4eZD8wyDBKGBwAMAikDfOKGDwAmEgcmIhiGAwAAAIKg24ApI4eZKgwiKQN88kYIAAAAIqDcJ5kKDBIpAy0IBgQAAACCoN188oeZBgwSKQMioNsd8AAA`,n=1077379072,r=`XADKP16ON0AzjzdAR5Q3QL2PN0BTjzdAvY83QB2QN0A6kTdArJE3QFWRN0DpjTdA0JA3QCyRN0BAkDdA0JE3QGiQN0DQkTdAIY83QH6PN0C9jzdAHZA3QDmPN0AqjjdAkJI3QA2UN0AAjTdALZQ3QACNN0AAjTdAAI03QACNN0AAjTdAAI03QACNN0AAjTdAKpI3QACNN0AlkzdADZQ3QAQInwAAAAAAAAAYAQQIBQAAAAAAAAAIAQQIBgAAAAAAAAAAAQQIIQAAAAAAIAAAEQQI3AAAAAAAIAAAEQQIDAAAAAAAIAAAAQQIEgAAAAAAIAAAESAoDAAQAQAA`,i=1070279676,a=1070202880,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/stub_flasher_8266-BdPZCml8.js",
    "content": "var e=1074843652,t=`qBAAQAH//0ZzAAAAkIH/PwgB/z+AgAAAhIAAAEBAAABIQf8/lIH/PzH5/xLB8CAgdAJhA4XwATKv/pZyA1H0/0H2/zH0/yAgdDA1gEpVwCAAaANCFQBAMPQbQ0BA9MAgAEJVADo2wCAAIkMAIhUAMev/ICD0N5I/Ieb/Meb/Qen/OjLAIABoA1Hm/yeWEoYAAAAAAMAgACkEwCAAWQNGAgDAIABZBMAgACkDMdv/OiIMA8AgADJSAAgxEsEQDfAAoA0AAJiB/z8Agf4/T0hBSais/z+krP8/KNAQQFzqEEAMAABg//8AAAAQAAAAAAEAAAAAAYyAAAAQQAAAAAD//wBAAAAAgf4/BIH+PxAnAAAUAABg//8PAKis/z8Igf4/uKz/PwCAAAA4KQAAkI//PwiD/z8Qg/8/rKz/P5yv/z8wnf8/iK//P5gbAAAACAAAYAkAAFAOAABQEgAAPCkAALCs/z+0rP8/1Kr/PzspAADwgf8/DK//P5Cu/z+ACwAAEK7/P5Ct/z8BAAAAAAAAALAVAADx/wAAmKz/P7wPAECIDwBAqA8AQFg/AEBERgBALEwAQHhIAEAASgBAtEkAQMwuAEDYOQBASN8AQJDhAEBMJgBAhEkAQCG9/5KhEJARwCJhIyKgAAJhQ8JhQtJhQeJhQPJhPwHp/8AAACGz/zG0/wwEBgEAAEkCSyI3MvjFtgEioIwMQyohBakBxbUBIX3/wXv/Maz/KizAIADJAiGp/wwEOQIxqf8MUgHZ/8AAADGn/yKhAcAgAEgDICQgwCAAKQMioCAB0//AAAAB0v/AAAAB0v/AAABxnv9Rn/9Bn/8xn/9ioQAMAgHN/8AAACGd/zFj/yojwCAAOAIWc//AIADYAgwDwCAAOQIMEiJBhCINAQwkIkGFQlFDMmEiJpIJHDM3EiCGCAAAACINAzINAoAiETAiIGZCESgtwCAAKAIiYSIGAQAcIiJRQ8WpASKghAyDGiJFnAEiDQMyDQKAIhEwMiAhgP83shMioMAFlwEioO6FlgEFpwFG3P8AACINAQy0R5ICBpkAJzRDZmICxssA9nIgZjIChnEA9kIIZiICxlYARsoAZkICBocAZlICxqsAhsYAJoJ59oIChqsADJRHkgKGjwBmkgIGowAGwAAcJEeSAkZ8ACc0Jwz0R5IChj4AJzQLDNRHkgKGgwDGtwAAZrICRksAHBRHkgJGWABGswBCoNFHEmgnNBEcNEeSAkY4AEKg0EcST8asAABCoNJHkgKGLwAyoNM3kgJGnAVGpwAsQgwOJ5MCBnEFRisAIqAAhYkBIqAARYkBxZkBhZkBIqCEMqAIGiILzMWLAVbc/QwOzQ5GmwAAzBOGZgVGlQAmgwLGkwAGZwUBaf/AAAD6zJwixo8AAAAgLEEBZv/AAABWEiPy3/DwLMDML4ZwBQAgMPRWE/7hLP+GAwAgIPUBXv/AAABW0iDg/8DwLMD3PuqGAwAgLEEBV//AAABWUh/y3/DwLMBWr/5GYQUmg4DGAQAAAGazAkbd/wwOwqDAhngAAABmswJGSwUGcgAAwqABJrMCBnAAIi0EMRj/4qAAwqDCJ7MCxm4AOF0oLYV3AUZDBQDCoAEmswKGZgAyLQQhD//ioADCoMI3sgJGZQAoPQwcIOOCOF0oLcV0ATH4/gwESWMy0yvpIyDEgwZaAAAh9P4MDkICAMKgxueUAsZYAMhSKC0yw/AwIsBCoMAgxJMizRhNAmKg78YBAFIEABtEUGYwIFTANyXxMg0FUg0EIg0GgDMRACIRUEMgQDIgIg0HDA6AIgEwIiAgJsAyoMEgw5OGQwAAACHa/gwOMgIAwqDG55MCxj4AODLCoMjnEwIGPADiQgDIUgY6AByCDA4MHCcTAgY3AAYQBWZDAoYWBUYwADAgNAwOwqDA5xIChjAAMPRBi+3NAnzzxgwAKD4yYTEBAv/AAABILigeYi4AICQQMiExJgQOwCAAUiYAQEMwUEQQQCIgwCAAKQYbzOLOEPc8yMaB/2ZDAkaA/wai/2azAgYABcYWAAAAYcH+DA5IBgwVMsPwLQ5AJYMwXoNQIhDCoMbnkktxuv7tAogHwqDJNzg+MFAUwqDAos0YjNUGDABaKigCS1UpBEtEDBJQmMA3Ne0WYtpJBpkHxmf/ZoMChuwEDBwMDsYBAAAA4qAAwqD/wCB0BWAB4CB0xV8BRXABVkzAIg0BDPM3EjEnMxVmQgIGtgRmYgLGugQmMgLG+f4GGQAAHCM3kgIGsAQyoNI3EkUcEzcSAkbz/sYYACGV/ug90i0CAcD+wAAAIZP+wCAAOAIhkv4gIxDgIoLQPSAFjAE9Ai0MAbn+wAAAIqPoAbb+wAAAxuP+WF1ITTg9Ii0CxWsBBuD+ADINAyINAoAzESAzIDLD8CLNGEVKAcbZ/gAiDQMyDQKAIhEwIiAxZ/4iwvAiYSkoMwwUIMSDwMB0jExSISn2VQvSzRjSYSQMH8Z3BAAioMkpU8bK/iFx/nGQ/rIiAGEs/oKgAyInApIhKYJhJ7DGwCc5BAwaomEnsmE2BTkBsiE2cWf+UiEkYiEpcEvAykRqVQuEUmElgmErhwQCxk4Ed7sCRk0EkUj+PFOo6VIpEGIpFShpomEoUmEmYmEqyHniKRT4+SezAsbuAzFV/jAioCgCoAIAMTz+DA4MEumT6YMp0ymj4mEm/Q7iYSjNDoYGAHIhJwwTcGEEfMRgQ5NtBDliXQtyISSG4AMAAIIhJJIhJSEs/pe42DIIABt4OYKGBgCiIScMIzBqEHzFDBRgRYNtBDliXQuG1ANyISRSISUhIf5Xt9tSBwD4glmSgC8RHPNaIkJhMVJhNLJhNhvXRXgBDBNCITFSITSyITZWEgEioCAgVRBWhQDwIDQiwvggNYPw9EGL/wwSYSf+AB9AAFKhVzYPAA9AQPCRDAbwYoMwZiCcJgwfhgAA0iEkIQb+LEM5Yl0LhpwAXQu2PCAGDwByISd8w3BhBAwSYCODbQIMMwYWAAAAXQvSISRGAAD9BoIhJYe92RvdCy0iAgAAHEAAIqGLzCDuILY85G0PcfH94CAkKbcgIUEpx+DjQcLM/VYiIMAgJCc8KEYRAJIhJ3zDkGEEDBJgI4NtAgxTIeX9OWJ9DQaVAwAAAF0L0iEkRgAA/QaiISWnvdEb3QstIgIAABxAACKhi8wg7iDAICQnPOHAICQAAkDg4JEir/ggzBDyoAAWnAaGDAAAAHIhJ3zDcGEEDBJgI4NtAgxjBuf/0iEkXQuCISWHveAb3QstIgIAABxAACKhIO4gi8y2jOQhxf3CzPj6MiHc/Soj4kIA4OhBhgwAAACSIScME5BhBHzEYDSDbQMMc8bU/9IhJF0LoiElIbj9p73dQc/9Mg0A+iJKIjJCABvdG//2TwKG3P8hsP189iLSKfISHCISHSBmMGBg9GefBwYeANIhJF0LLHMGQAC2jCFGDwAAciEnfMNwYQQMEmAjg20CPDMGu/8AAF0L0iEkRgAA/QaCISWHvdkb3QstIgIAABxAACKhi8wg7iC2jORtD+CQdJJhKODoQcLM+P0GRgIAPEOG0wLSISRdCyFj/Se176IhKAtvokUAG1UWhgdWrPiGHAAMk8bKAl0L0iEkRgAA/QYhWf0ntepGBgByISd8w3BhBAwSYCODbQIsY8aY/9IhJLBbIIIhJYe935FO/dBowFApwGeyAiBiIGe/AW0PTQbQPSBQJSBSYTRiYTWyYTYBs/3AAABiITVSITSyITZq3WpVYG/AVmb5Rs8C/QYmMgjGBAAA0iEkXQsMoyFn/TlifQ1GFgMAAAwPJhICRiAAIqEgImcRLAQhev1CZxIyoAVSYTRiYTVyYTOyYTYBnf3AAAByITOyITZiITVSITQ9ByKgkEKgCEJDWAsiGzNWUv8ioHAMkzJH6AsiG3dWUv8clHKhWJFN/Qx4RgIAAHoimiKCQgAtAxsyR5PxIWL9MWL9DIQGAQBCQgAbIjeS90ZgASFf/foiIgIAJzwdRg8AAACiISd8w6BhBAwSYCODbQIMswZT/9IhJF0LIVT9+iJiISVnvdsb3Qs9MgMAABxAADOhMO4gMgIAi8w3POEhTP1BTP36IjICAAwSABNAACKhQE+gCyLgIhAwzMAAA0Dg4JFIBDEl/SokMD+gImMRG//2PwKG3v8hP/1CoSAMA1JhNLJhNgFf/cAAAH0NDA9SITSyITZGFQAAAIIhJ3zDgGEEDBJgI4NtAgzjBrMCciEkXQuSISWXt+AbdwsnIgIAABxAACKhIO4gi8y2POQhK/1BCv36IiICAOAwJCpEISj9wsz9KiQyQgDg40Eb/yED/TIiEzc/0xwzMmIT3QdtDwYcAUwEDAMiwURSYTRiYTWyYTZyYTMBO/3AAAByITOB9fwioWCAh4JBFv0qKPoiMqAAIsIYgmEyATL9wAAAgiEyIRH9QqSAKij6IgwDIsIYASz9wAAAqM+CITLwKqAiIhGK/6JhLSJhLk0PUiE0YiE1ciEzsiE2BgQAACIPWBv/ECKgMiIRGzMyYhEyIS5AL8A3MuYMAikRKQGtAgwT4EMRksFESvmYD0pBKinwIhEbMykUmqpms+Ux3vw6IowS9iorIc78QqbQQEeCgshYKogioLwqJIJhLAwJfPNCYTkiYTDGQwAAXQvSISRGAAD9BiwzxpgAAKIhLIIKAIJhNxaIDhAooHgCG/f5Av0IDALwIhEiYThCIThwIAQiYS8L/0AiIHBxQVZf/gynhzc7cHgRkHcgAHcRcHAxQiEwcmEvDBpxrvwAGEAAqqEqhHCIkPD6EXKj/4YCAABCIS+qIkJYAPqIJ7fyBiAAciE5IICUioeioLBBofyqiECIkHKYDMxnMlgMfQMyw/4gKUGhm/zypLDGCgAggASAh8BCITl894CHMIqE8IiAoIiQcpgMzHcyWAwwcyAyw/6CITcLiIJhN0IhNwy4ICFBh5TIICAEIHfAfPoiITlwejB6ciKksCp3IYb8IHeQklcMQiEsG5kbREJhLHIhLpcXAsa9/4IhLSYoAsaYAEaBAAzix7ICxi8AkiEl0CnApiICBiUAIZv84DCUQXX8KiNAIpAiEgwAMhEwIDGW8gAwKTEWEgUnPAJGIwAGEgAADKPHs0KRkPx8+AADQOBgkWBgBCAoMCommiJAIpAikgwbc9ZCBitjPQdnvN0GBgCiISd8w6BhBAwSYCODbQIcA8Z1/tIhJF0LYiElZ73gIg0AGz0AHEAAIqEg7iCLzAzi3QPHMgJG2/+GBwAiDQGLPAATQAAyoSINACvdABxAACKhICMgIO4gwswQIW784DCUYUj8KiNgIpAyEgwAMxEwIDGWogAwOTEgIIRGCQAAAIFl/AykfPcbNAAEQOBAkUBABCAnMCokiiJgIpAikgxNA5Yi/gADQODgkTDMwCJhKAzzJyMVITP8ciEo+jIhV/wb/yojckIABjQAAIIhKGa4Gtx/HAmSYSgGAQDSISRdCxwTISj8fPY5YgZB/jFM/CojIsLwIgIAImEmJzwdBg4AoiEnfMOgYQQMEmAjg20CHCPGNf4AANIhJF0LYiElZ73eG90LLSICAHIhJgAcQAAioYvMIO4gdzzhgiEmMTn8kiEoDBYAGEAAZqGaMwtmMsPw4CYQYgMAAAhA4OCRKmYhMvyAzMAqLwwDZrkMMQX8+kMxLvw6NDIDAE0GUmE0YmE1smE2AUH8wAAAYiE1UiE0av+yITaGAAAADA9x+vtCJxFiJxJqZGe/AoZ5//eWB4YCANIhJF0LHFNGyf8A8Rr8IRv8PQ9SYTRiYTWyYTZyYTMBLfzAAAByITMhBPwyJxFCJxI6PwEo/MAAALIhNmIhNVIhNDHj+yjDCyIpw/Hh+3jP1me4hj4BYiElDOLQNsCmQw9Br/tQNMCmIwJGTQDGMQIAx7ICRi4ApiMCBiUAQdX74CCUQCKQIhK8ADIRMCAxlgIBMCkxFkIFJzwChiQAxhIAAAAMo8ezRHz4kqSwAANA4GCRYGAEICgwKiaaIkAikCKSDBtz1oIGK2M9B2e83YYGAHIhJ3zDcGEEDBJgI4NtAhxzxtT9AADSISRdC4IhJYe93iINABs9ABxAACKhIO4gi8wM4t0DxzICxtv/BggAAAAiDQGLPAATQAAyoSINACvdABxAACKhICMgIO4gwswQQaj74CCUQCKQIhK8ACIRIPAxlo8AICkx8PCExggADKN892KksBsjAANA4DCRMDAE8Pcw+vNq/0D/kPKfDD0Cli/+AAJA4OCRIMzAIqD/96ICxkAAhgIAAByDBtMA0iEkXQshYvsnte/yRQBtDxtVRusADOLHMhkyDQEiDQCAMxEgIyAAHEAAIqEg7iAr3cLMEDGD++AglKoiMCKQIhIMACIRIDAxICkx1hMCDKQbJAAEQOBAkUBABDA5MDo0QXj7ijNAM5AykwxNApbz/f0DAAJA4OCRIMzAd4N8YqAOxzYaQg0BIg0AgEQRICQgABxAACKhIO4g0s0CwswQQWn74CCUqiJAIpBCEgwARBFAIDFASTHWEgIMphtGAAZA4GCRYGAEICkwKiZhXvuKImAikCKSDG0ElvL9MkUAAARA4OCRQMzAdwIIG1X9AkYCAAAAIkUBK1UGc//wYIRm9gKGswAirv8qZiF6++BmEWoiKAIiYSYhePtyISZqYvgGFpcFdzwdBg4AAACCISd8w4BhBAwSYCODbQIckwZb/dIhJF0LkiEll73gG90LLSICAKIhJgAcQAAioYvMIO4gpzzhYiEmDBIAFkAAIqELIuAiEGDMwAAGQODgkSr/DOLHsgJGMAByISXQJ8CmIgKGJQBBLPvgIJRAIpAi0g8iEgwAMhEwIDGW8gAwKTEWMgUnPAJGJACGEgAADKPHs0SRT/t8+AADQOBgkWBgBCAoMCommiJAIpAikgwbc9aCBitjPQdnvN2GBgCCISd8w4BhBAwSYCODbQIco8Yr/QAA0iEkXQuSISWXvd4iDQAbPQAcQAAioSDuIIvMDOLdA8cyAkbb/wYIAAAAIg0BizwAE0AAMqEiDQAr3QAcQAAioSAjICDuIMLMEGH/+uAglGAikCLSDzISDAAzETAgMZaCADA5MSAghMYIAIEk+wykfPcbNAAEQOBAkUBABCAnMCokiiJgIpAikgxNA5Yi/gADQODgkTDMwDEa++AiESozOAMyYSYxGPuiISYqIygCImEoFgoGpzweRg4AciEnfMNwYQQMEmAjg20CHLPG9/wAAADSISRdC4IhJYe93RvdCy0iAgCSISYAHEAAIqGLzCDuIJc84aIhJgwSABpAACKhYiEoCyLgIhAqZgAKQODgkaDMwGJhKHHi+oIhKHB1wJIhKzHf+oAnwJAiEDoicmEqPQUntQE9AkGW+vozbQ83tG0GEgAhwPosUzliBm4APFMhvfp9DTliDCZGbABdC9IhJEYAAP0GIYv6J7XhoiEqYiEociErYCrAMcn6cCIQKiMiAgAbqiJFAKJhKhtVC29WH/0GDAAAMgIAYsb9MkUAMgIBMkUBMgICOyIyRQI7VfY24xYGATICADJFAGYmBSICASJFAWpV/QaioLB8+YKksHKhAAa9/iGc+iiyB+IChpb8wCAkJzwgRg8AgiEnfMOAYQQMEmAjg20CLAMGrPwAAF0L0iEkRgAA/QaSISWXvdkb3QstIgIAABxAACKhi8wg7iDAICQnPOHAICQAAkDg4JF8giDMEH0NRgEAAAt3wsz4oiEkd7oC9ozxIbD6MbD6TQxSYTRyYTOyYTZFlAALIrIhNnIhM1IhNCDuEAwPFkwGhgwAAACCISd8w4BhBAwSYCODbQIskwYPAHIhJF0LkiEll7fgG3cLJyICAAAcQAAioSDuIIvMtozk4DB0wsz44OhBhgoAoiEnfMOgYQQMEmAjg20CLKMhX/o5YoYPAAAAciEkXQtiISVnt9kyBwAbd0FZ+hv/KKSAIhEwIiAppPZPB8bd/3IhJF0LIVL6LCM5YgwGhgEAciEkXQt89iYWFEsmzGJGAwALd8LM+IIhJHe4AvaM8YFI+iF4+jF4+sl4TQxSYTRiYTVyYTOCYTKyYTbFhQCCITKSISiiISYLIpnokiEq4OIQomgQciEzoiEkUiE0siE2YiE1+fjiaBSSaBWg18CwxcD9BpZWDjFl+vjYLQwFfgDw4PRNAvDw9X0MDHhiITWyITZGJQAAAJICAKICAurpkgIB6pma7vr+4gIDmpqa/5qe4gIEmv+anuICBZr/mp7iAgaa/5qe4gIHmv+a7ur/iyI6kkc5wEAjQbAisLCQYEYCAAAyAgAbIjru6v8qOb0CRzPvMUf6LQ5CYTFiYTVyYTOCYTKyYTZFdQAxQfrtAi0PxXQAQiExciEzsiE2QHfAgiEyQTr6YiE1/QKMhy0LsDjAxub/AAAA/xEhAfrq7+nS/QbcVvii8O7AfO/g94NGAgAAAAAMDN0M8q/9MS36UiEpKCNiISTQIsDQVcDaZtEJ+ikjOA1xCPpSYSnKU1kNcDXADAIMFfAlg2JhJCAgdFaCAELTgEAlgxaSAMH++S0MBSkAyQ2CISmcKJHl+Sg5FrIA8C8x8CLA1iIAxoP7MqDHId/5li8BjB9GS/oh3PkyIgPME4ZI+jKgyDlShkb6KC2MEsZE+iHo+QEU+sAAAAEW+sAAAEZA+sg9zByGPvoio+gBDvrAAADADADGOvriYSIMfEaN+gEO+sAAAAwcDAMGCAAAyC34PfAsICAgtMwSxpT6Rif7Mi0DIi0CxTIAMqAADBwgw4PGIvt4fWhtWF1ITTg9KC0MDAH0+cAAAO0CDBLgwpOGHvsAAAHu+cAAAAwMBhj7ACHC+UhdOC1JAiHA+TkCBvr/Qb75DAI4BMKgyDDCgykEQbr5PQwMHCkEMMKDBgz7xzICxvT9xvv9AiFDkqEQwiFC0iFB4iFA8iE/mhEN8AAACAAAYBwAAGAAAABgEAAAYCH8/xLB8OkBwCAA6AIJMckh2REh+P/AIADIAsDAdJzs0Zb5RgQAAAAx9P/AIAAoAzgNICB0wAMAC8xmDOqG9P8h7/8IMcAgAOkCyCHYEegBEsEQDfAAAAD4AgBgEAIAYAACAGAAAAAIIfz/wCAAOAIwMCRWQ/8h+f9B+v/AIAA5AjH3/8AgAEkDwCAASANWdP/AIAAoAgwTICAEMCIwDfAAAIAAAAAAQP///wAEAgBgEsHwySHBbPkJMShM2REWgghF+v8WIggoTAzzDA0nowwoLDAiEAwTINOD0NB0EBEgRfj/FmL/Id7/Me7/wCAAOQLAIAAyIgBWY/8x1//AIAAoAyAgJFZC/ygsMeX/QEIRIWH50DKDIeT/ICQQQeT/wCAAKQQhz//AIAA5AsAgADgCVnP/DBIcA9Ajk90CKEzQIsApTCgs2tLZLAgxyCHYERLBEA3wAAAATEoAQBLB4MlhwUH5+TH4POlBCXHZUe0C97MB/QMWHwTYHNrf0NxBBgEAAACF8v8oTKYSBCgsJ63yRe3/FpL/KBxNDz0OAe7/wAAAICB0jDIioMQpXCgcSDz6IvBEwCkcSTwIcchh2FHoQfgxEsEgDfAAAAD/DwAAUSb5EsHwCTEMFEJFADBMQUklQfr/ORUpNTAwtEoiKiMgLEEpRQwCImUFAVf5wAAACDEyoMUgI5MSwRAN8AAAADA7AEASwfAJMTKgwDeSESKg2wH7/8AAACKg3EYEAAAAADKg2zeSCAH2/8AAACKg3QH0/8AAAAgxEsEQDfAAAAASwfDJIdkRCTHNAjrSRgIAACIMAMLMAcX6/9ec8wIhA8IhAtgREsEQDfAAAFgQAABwEAAAGJgAQBxLAEA0mABAAJkAQJH7/xLB4Mlh6UH5MQlx2VGQEcDtAiLREM0DAfX/wAAA8fb4hgoA3QzHvwHdD00NPQEtDgHw/8AAACAgdPxCTQ09ASLREAHs/8AAANDugNDMwFYc/SHl/zLREBAigAHn/8AAACHh/xwDGiIF9f8tDAYBAAAAIqBjkd3/mhEIcchh2FHoQfgxEsEgDfAAEsHwIqDACTEBuv/AAAAIMRLBEA3wAAAAbBAAAGgQAAB0EAAAeBAAAHwQAACAEAAAkBAAAJgPAECMOwBAEsHgkfz/+TH9AiHG/8lh2VEJcelBkBHAGiI5AjHy/ywCGjNJA0Hw/9LREBpEwqAAUmQAwm0aAfD/wAAAYer/Ibz4GmZoBmeyAsZJAC0NAbb/wAAAIbP/MeX/KkEaM0kDRj4AAABhr/8x3/8aZmgGGjPoA8AmwOeyAiDiIGHd/z0BGmZZBk0O8C8gAaj/wAAAMdj/ICB0GjNYA4yyDARCbRbtBMYSAAAAAEHR/+r/GkRZBAXx/z0OLQGF4/9F8P9NDj0B0C0gAZr/wAAAYcn/6swaZlgGIZP/GiIoAie8vDHC/1AswBozOAM3sgJG3f9G6v9CoABCTWwhuf8QIoABv//AAABWAv9huf8iDWwQZoA4BkUHAPfiEfZODkGx/xpE6jQiQwAb7sbx/zKv/jeSwSZOKSF7/9A9IBAigAF+/8AAAAXo/yF2/xwDGiJF2v9F5/8sAgGm+MAAAIYFAGFx/1ItGhpmaAZntchXPAIG2f/G7/8AkaD/mhEIcchh2FHoQfgxEsEgDfBdAkKgwCgDR5UOzDIMEoYGAAwCKQN84g3wJhIFJiIRxgsAQqDbLQVHlSkMIikDBggAIqDcJ5UIDBIpAy0EDfAAQqDdfPJHlQsMEikDIqDbDfAAfPIN8AAAtiMwbQJQ9kBA80BHtSlQRMAAFEAAM6EMAjc2BDBmwBsi8CIRMDFBC0RWxP43NgEbIg3wAIyTDfA3NgwMEg3wAAAAAABESVYwDAIN8LYjKFDyQEDzQEe1F1BEwAAUQAAzoTcyAjAiwDAxQULE/1YE/zcyAjAiwA3wzFMAAABESVYwDAIN8AAAAAAUQObECSAzgQAioQ3wAAAAMqEMAg3wAA==`,n=1074843648,r=`CIH+PwUFBAACAwcAAwMLANTXEEAL2BBAOdgQQNbYEECF5xBAOtkQQJDZEEDc2RBAhecQQKLaEEAf2xBA4NsQQIXnEECF5xBAeNwQQIXnEEBV3xBAHOAQQFfgEECF5xBAhecQQPPgEECF5xBA2+EQQIHiEEDA4xBAf+QQQFDlEECF5xBAhecQQIXnEECF5xBAfuYQQIXnEEB05xBAsN0QQKnYEEDC5RBAydoQQBvaEECF5xBACOcQQE/nEECF5xBAhecQQIXnEECF5xBAhecQQIXnEECF5xBAhecQQELaEEB/2hBA2uUQQAEAAAACAAAAAwAAAAQAAAAFAAAABwAAAAkAAAANAAAAEQAAABkAAAAhAAAAMQAAAEEAAABhAAAAgQAAAMEAAAABAQAAgQEAAAECAAABAwAAAQQAAAEGAAABCAAAAQwAAAEQAAABGAAAASAAAAEwAAABQAAAAWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAUAAAAGAAAABgAAAAcAAAAHAAAACAAAAAgAAAAJAAAACQAAAAoAAAAKAAAACwAAAAsAAAAMAAAADAAAAA0AAAANAAAAAAAAAAAAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAANAAAADwAAABEAAAATAAAAFwAAABsAAAAfAAAAIwAAACsAAAAzAAAAOwAAAEMAAABTAAAAYwAAAHMAAACDAAAAowAAAMMAAADjAAAAAgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAgAAAAMAAAADAAAAAwAAAAMAAAAEAAAABAAAAAQAAAAEAAAABQAAAAUAAAAFAAAABQAAAAAAAAAAAAAAAAAAABAREgAIBwkGCgULBAwDDQIOAQ8AAQEAAAEAAAAEAAAA`,i=1073720488,a=1073643776,o={entry:e,text:t,text_start:n,data:r,data_start:i,bss_start:a};export{a as bss_start,r as data,i as data_start,o as default,e as entry,t as text,n as text_start};"
  },
  {
    "path": "docs/assets/styles-Bnf3HqYs.js",
    "content": "function e(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var t=globalThis,n=t.ShadowRoot&&(t.ShadyCSS===void 0||t.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,r=Symbol(),i=new WeakMap,a=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==r)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(n&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=i.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&i.set(t,e))}return e}toString(){return this.cssText}},o=e=>new a(typeof e==`string`?e:e+``,void 0,r),s=(e,...t)=>new a(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,r),c=(e,r)=>{if(n)e.adoptedStyleSheets=r.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of r){let r=document.createElement(`style`),i=t.litNonce;i!==void 0&&r.setAttribute(`nonce`,i),r.textContent=n.cssText,e.appendChild(r)}},l=n?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return o(t)})(e):e,{is:u,defineProperty:d,getOwnPropertyDescriptor:ee,getOwnPropertyNames:te,getOwnPropertySymbols:f,getPrototypeOf:ne}=Object,p=globalThis,re=p.trustedTypes,ie=re?re.emptyScript:``,ae=p.reactiveElementPolyfillSupport,m=(e,t)=>e,h={toAttribute(e,t){switch(t){case Boolean:e=e?ie:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},oe=(e,t)=>!u(e,t),se={attribute:!0,type:String,converter:h,reflect:!1,useDefault:!1,hasChanged:oe};Symbol.metadata??=Symbol(`metadata`),p.litPropertyMetadata??=new WeakMap;var g=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=se){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&d(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=ee(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??se}static _$Ei(){if(this.hasOwnProperty(m(`elementProperties`)))return;let e=ne(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(m(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m(`properties`))){let e=this.properties,t=[...te(e),...f(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(l(e))}else e!==void 0&&t.push(l(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?h:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?h:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??oe)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};g.elementStyles=[],g.shadowRootOptions={mode:`open`},g[m(`elementProperties`)]=new Map,g[m(`finalized`)]=new Map,ae?.({ReactiveElement:g}),(p.reactiveElementVersions??=[]).push(`2.1.2`);var ce=globalThis,le=e=>e,_=ce.trustedTypes,ue=_?_.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,v=`$lit$`,y=`lit$${Math.random().toFixed(9).slice(2)}$`,b=`?`+y,de=`<${b}>`,x=document,S=()=>x.createComment(``),C=e=>e===null||typeof e!=`object`&&typeof e!=`function`,fe=Array.isArray,pe=e=>fe(e)||typeof e?.[Symbol.iterator]==`function`,w=`[ \t\n\\f\\r]`,T=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,me=/-->/g,he=/>/g,E=RegExp(`>|${w}(?:([^\\\\s\"'>=/]+)(${w}*=${w}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,`g`),ge=/'/g,_e=/\"/g,ve=/^(?:script|style|textarea|title)$/i,ye=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),D=ye(1),be=ye(2),xe=ye(3),O=Symbol.for(`lit-noChange`),k=Symbol.for(`lit-nothing`),Se=new WeakMap,A=x.createTreeWalker(x,129);function Ce(e,t){if(!fe(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return ue===void 0?t:ue.createHTML(t)}var we=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=T;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===T?c[1]===`!--`?o=me:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=E):(ve.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=E):o=he:o===E?c[0]===`>`?(o=i??T,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?E:c[3]===`\"`?_e:ge):o===_e||o===ge?o=E:o===me||o===he?o=T:(o=E,i=void 0);let d=o===E&&e[t+1].startsWith(`/>`)?` `:``;a+=o===T?n+de:l>=0?(r.push(s),n.slice(0,l)+v+n.slice(l)+y+d):n+y+(l===-2?t:d)}return[Ce(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},Te=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=we(t,n);if(this.el=e.createElement(l,r),A.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=A.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(v)){let t=u[o++],n=i.getAttribute(e).split(y),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?De:r[1]===`?`?Oe:r[1]===`@`?ke:N}),i.removeAttribute(e)}else e.startsWith(y)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(ve.test(i.tagName)){let e=i.textContent.split(y),t=e.length-1;if(t>0){i.textContent=_?_.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],S()),A.nextNode(),c.push({type:2,index:++a});i.append(e[t],S())}}}else if(i.nodeType===8)if(i.data===b)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(y,e+1))!==-1;)c.push({type:7,index:a}),e+=y.length-1}a++}}static createElement(e,t){let n=x.createElement(`template`);return n.innerHTML=e,n}};function j(e,t,n=e,r){if(t===O)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=C(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=j(e,i._$AS(e,t.values),i,r)),t}var Ee=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??x).importNode(t,!0);A.currentNode=r;let i=A.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new M(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new Ae(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=A.nextNode(),a++)}return A.currentNode=x,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},M=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=j(this,e,t),C(e)?e===k||e==null||e===``?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==O&&this._(e):e._$litType$===void 0?e.nodeType===void 0?pe(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==k&&C(this._$AH)?this._$AA.nextSibling.data=e:this.T(x.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=Te.createElement(Ce(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new Ee(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Se.get(e.strings);return t===void 0&&Se.set(e.strings,t=new Te(e)),t}k(t){fe(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(S()),this.O(S()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=le(e).nextSibling;le(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},N=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=k}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=j(this,e,t,0),a=!C(e)||e!==this._$AH&&e!==O,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=j(this,r[n+o],t,o),s===O&&(s=this._$AH[o]),a||=!C(s)||s!==this._$AH[o],s===k?e=k:e!==k&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},De=class extends N{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},Oe=class extends N{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},ke=class extends N{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=j(this,e,t,0)??k)===O)return;let n=this._$AH,r=e===k&&n!==k||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==k&&(n===k||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ae=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){j(this,e)}},je={M:v,P:y,A:b,C:1,L:we,R:Ee,D:pe,V:j,I:M,H:N,N:Oe,U:ke,B:De,F:Ae},Me=ce.litHtmlPolyfillSupport;Me?.(Te,M),(ce.litHtmlVersions??=[]).push(`3.3.2`);var Ne=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new M(t.insertBefore(S(),e),e,void 0,n??{})}return i._$AI(e),i},P=globalThis,F=class extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ne(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return O}};F._$litElement$=!0,F.finalized=!0,P.litElementHydrateSupport?.({LitElement:F});var Pe=P.litElementPolyfillSupport;Pe?.({LitElement:F}),(P.litElementVersions??=[]).push(`4.2.2`);var I=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},Fe={attribute:!0,type:String,converter:h,reflect:!1,hasChanged:oe},Ie=(e=Fe,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function L(e){return(t,n)=>typeof n==`object`?Ie(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function R(e){return L({...e,state:!0,attribute:!1})}var z=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function B(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return z(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return z(n,r,{get(){return a(this)}})}}var Le;function Re(e){return(t,n)=>z(t,n,{get(){return(this.renderRoot??(Le??=document.createDocumentFragment())).querySelectorAll(e)}})}function ze(e){return(t,n)=>{let{slot:r,selector:i}=e??{},a=`slot`+(r?`[name=${r}]`:`:not([name])`);return z(t,n,{get(){let t=(this.renderRoot?.querySelector(a))?.assignedElements(e)??[];return i===void 0?t:t.filter(e=>e.matches(i))}})}}function Be(e){return(t,n)=>{let{slot:r}=e??{},i=`slot`+(r?`[name=${r}]`:`:not([name])`);return z(t,n,{get(){return(this.renderRoot?.querySelector(i))?.assignedNodes(e)??[]}})}}var Ve=s`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}\n`,He=Symbol(`attachableController`),Ue=new MutationObserver(e=>{for(let t of e)t.target[He]?.hostConnected()}),We=class{get htmlFor(){return this.host.getAttribute(`for`)}set htmlFor(e){e===null?this.host.removeAttribute(`for`):this.host.setAttribute(`for`,e)}get control(){return this.host.hasAttribute(`for`)?!this.htmlFor||!this.host.isConnected?null:this.host.getRootNode().querySelector(`#${this.htmlFor}`):this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[He]=this,Ue?.observe(e,{attributeFilter:[`for`]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute(`for`))}detach(){this.setCurrentControl(null),this.host.setAttribute(`for`,``)}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}},Ge=[`focusin`,`focusout`,`pointerdown`],V=class extends F{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new We(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute(`aria-hidden`,`true`)}handleEvent(e){if(!e[Ke]){switch(e.type){default:return;case`focusin`:this.visible=this.control?.matches(`:focus-visible`)??!1;break;case`focusout`:case`pointerdown`:this.visible=!1;break}e[Ke]=!0}}onControlChange(e,t){for(let n of Ge)e?.removeEventListener(n,this),t?.addEventListener(n,this)}update(e){e.has(`visible`)&&this.dispatchEvent(new Event(`visibility-changed`)),super.update(e)}};e([L({type:Boolean,reflect:!0})],V.prototype,`visible`,void 0),e([L({type:Boolean,reflect:!0})],V.prototype,`inward`,void 0);var Ke=Symbol(`handledByFocusRing`),qe=s`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}\n`,H=class extends V{};H.styles=[qe],H=e([I(`md-focus-ring`)],H);var Je={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ye=e=>(...t)=>({_$litDirective$:e,values:t}),Xe=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},U=Ye(class extends Xe{constructor(e){if(super(e),e.type!==Je.ATTRIBUTE||e.name!==`class`||e.strings?.length>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(e){return` `+Object.keys(e).filter(t=>e[t]).join(` `)+` `}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(` `).split(/\\s/).filter(e=>e!==``)));for(let e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}let n=e.element.classList;for(let e of this.st)e in t||(n.remove(e),this.st.delete(e));for(let e in t){let r=!!t[e];r===this.st.has(e)||this.nt?.has(e)||(r?(n.add(e),this.st.add(e)):(n.remove(e),this.st.delete(e)))}return O}}),W={STANDARD:`cubic-bezier(0.2, 0, 0, 1)`,STANDARD_ACCELERATE:`cubic-bezier(.3,0,1,1)`,STANDARD_DECELERATE:`cubic-bezier(0,0,0,1)`,EMPHASIZED:`cubic-bezier(.3,0,0,1)`,EMPHASIZED_ACCELERATE:`cubic-bezier(.3,0,.8,.15)`,EMPHASIZED_DECELERATE:`cubic-bezier(.05,.7,.1,1)`};function Ze(){let e=null;return{start(){return e?.abort(),e=new AbortController,e.signal},finish(){e=null}}}var Qe=450,$e=225,et=.2,tt=10,nt=75,rt=.35,it=`::after`,at=`forwards`,G;(function(e){e[e.INACTIVE=0]=`INACTIVE`,e[e.TOUCH_DELAY=1]=`TOUCH_DELAY`,e[e.HOLDING=2]=`HOLDING`,e[e.WAITING_FOR_CLICK=3]=`WAITING_FOR_CLICK`})(G||={});var ot=[`click`,`contextmenu`,`pointercancel`,`pointerdown`,`pointerenter`,`pointerleave`,`pointerup`],st=150,ct=window.matchMedia(`(forced-colors: active)`),K=class extends F{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize=``,this.rippleScale=``,this.initialSize=0,this.state=G.INACTIVE,this.attachableController=new We(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute(`aria-hidden`,`true`)}render(){return D`<div class=\"surface ${U({hovered:this.hovered,pressed:this.pressed})}\"></div>`}update(e){e.has(`disabled`)&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==G.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state===G.HOLDING){this.state=G.WAITING_FOR_CLICK;return}if(this.state===G.TOUCH_DELAY){this.state=G.WAITING_FOR_CLICK,this.startPressAnimation(this.rippleStartEvent);return}}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e)){this.state=G.WAITING_FOR_CLICK,this.startPressAnimation(e);return}this.state=G.TOUCH_DELAY,await new Promise(e=>{setTimeout(e,st)}),this.state===G.TOUCH_DELAY&&(this.state=G.HOLDING,this.startPressAnimation(e))}}handleClick(){if(!this.disabled){if(this.state===G.WAITING_FOR_CLICK){this.endPressAnimation();return}this.state===G.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation())}}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||this.endPressAnimation()}determineRippleSize(){let{height:e,width:t}=this.getBoundingClientRect(),n=Math.max(e,t),r=Math.max(rt*n,nt),i=this.currentCSSZoom??1,a=Math.floor(n*et/i),o=Math.sqrt(t**2+e**2)+tt;this.initialSize=a,this.rippleScale=`${(o+r)/a/i}`,this.rippleSize=`${a}px`}getNormalizedPointerEventCoords(e){let{scrollX:t,scrollY:n}=window,{left:r,top:i}=this.getBoundingClientRect(),a=t+r,o=n+i,{pageX:s,pageY:c}=e,l=this.currentCSSZoom??1;return{x:(s-a)/l,y:(c-o)/l}}getTranslationCoordinates(e){let{height:t,width:n}=this.getBoundingClientRect(),r=this.currentCSSZoom??1,i={x:(n/r-this.initialSize)/2,y:(t/r-this.initialSize)/2},a;return a=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:n/r/2,y:t/r/2},a={x:a.x-this.initialSize/2,y:a.y-this.initialSize/2},{startPoint:a,endPoint:i}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();let{startPoint:t,endPoint:n}=this.getTranslationCoordinates(e),r=`${t.x}px, ${t.y}px`,i=`${n.x}px, ${n.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${r}) scale(1)`,`translate(${i}) scale(${this.rippleScale})`]},{pseudoElement:it,duration:Qe,easing:W.STANDARD,fill:at})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=G.INACTIVE;let e=this.growAnimation,t=1/0;if(typeof e?.currentTime==`number`?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to(`ms`).value),t>=$e){this.pressed=!1;return}await new Promise(e=>{setTimeout(e,$e-t)}),this.growAnimation===e&&(this.pressed=!1)}shouldReactToEvent(e){if(this.disabled||!e.isPrimary||this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if(e.type===`pointerenter`||e.type===`pointerleave`)return!this.isTouch(e);let t=e.buttons===1;return this.isTouch(e)||t}isTouch({pointerType:e}){return e===`touch`}async handleEvent(e){if(!ct?.matches)switch(e.type){case`click`:this.handleClick();break;case`contextmenu`:this.handleContextmenu();break;case`pointercancel`:this.handlePointercancel(e);break;case`pointerdown`:await this.handlePointerdown(e);break;case`pointerenter`:this.handlePointerenter(e);break;case`pointerleave`:this.handlePointerleave(e);break;case`pointerup`:this.handlePointerup(e);break;default:break}}onControlChange(e,t){for(let n of ot)e?.removeEventListener(n,this),t?.addEventListener(n,this)}};e([L({type:Boolean,reflect:!0})],K.prototype,`disabled`,void 0),e([R()],K.prototype,`hovered`,void 0),e([R()],K.prototype,`pressed`,void 0),e([B(`.surface`)],K.prototype,`mdRoot`,void 0);var lt=s`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:\"\";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}\n`,q=class extends K{};q.styles=[lt],q=e([I(`md-ripple`)],q);var ut=`role.ariaAtomic.ariaAutoComplete.ariaBusy.ariaChecked.ariaColCount.ariaColIndex.ariaColSpan.ariaCurrent.ariaDisabled.ariaExpanded.ariaHasPopup.ariaHidden.ariaInvalid.ariaKeyShortcuts.ariaLabel.ariaLevel.ariaLive.ariaModal.ariaMultiLine.ariaMultiSelectable.ariaOrientation.ariaPlaceholder.ariaPosInSet.ariaPressed.ariaReadOnly.ariaRequired.ariaRoleDescription.ariaRowCount.ariaRowIndex.ariaRowSpan.ariaSelected.ariaSetSize.ariaSort.ariaValueMax.ariaValueMin.ariaValueNow.ariaValueText`.split(`.`),dt=ut.map(ft);function J(e){return dt.includes(e)}function ft(e){return e.replace(`aria`,`aria-`).replace(/Elements?/g,``).toLowerCase()}var Y=Symbol(`privateIgnoreAttributeChangesFor`);function pt(e){var t;class n extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,n){if(!J(e)){super.attributeChangedCallback(e,t,n);return}if(this[Y].has(e))return;this[Y].add(e),this.removeAttribute(e),this[Y].delete(e);let r=gt(e);n===null?delete this.dataset[r]:this.dataset[r]=n,this.requestUpdate(gt(e),t)}getAttribute(e){return J(e)?super.getAttribute(ht(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),J(e)&&(super.removeAttribute(ht(e)),this.requestUpdate())}}return t=Y,mt(n),n}function mt(e){for(let t of ut){let n=ft(t),r=ht(n),i=gt(n);e.createProperty(t,{attribute:n,noAccessor:!0}),e.createProperty(Symbol(r),{attribute:r,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[i]??null},set(e){let n=this.dataset[i]??null;e!==n&&(e===null?delete this.dataset[i]:this.dataset[i]=e,this.requestUpdate(t,n))}})}}function ht(e){return`data-${e}`}function gt(e){return e.replace(/-\\w/,e=>e[1].toUpperCase())}var X=Symbol(`internals`),_t=Symbol(`privateInternals`);function vt(e){class t extends e{get[X](){return this[_t]||(this[_t]=this.attachInternals()),this[_t]}}return t}function yt(e){e.addInitializer(e=>{let t=e;t.addEventListener(`click`,async e=>{let{type:n,[X]:r}=t,{form:i}=r;if(!(!i||n===`button`)&&(await new Promise(e=>{setTimeout(e)}),!e.defaultPrevented)){if(n===`reset`){i.reset();return}i.addEventListener(`submit`,e=>{Object.defineProperty(e,`submitter`,{configurable:!0,enumerable:!0,get:()=>t})},{capture:!0,once:!0}),r.setFormValue(t.value),i.requestSubmit()}})})}function bt(e){let t=new MouseEvent(`click`,{bubbles:!0});return e.dispatchEvent(t),t}function xt(e){return e.currentTarget!==e.target||e.composedPath()[0]!==e.target||e.target.disabled?!1:!St(e)}function St(e){let t=Ct;return t&&(e.preventDefault(),e.stopImmediatePropagation()),wt(),t}var Ct=!1;async function wt(){Ct=!0,await null,Ct=!1}var Tt=pt(vt(F)),Z=class extends Tt{get name(){return this.getAttribute(`name`)??``}set name(e){this.setAttribute(`name`,e)}get form(){return this[X].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href=``,this.download=``,this.target=``,this.trailingIcon=!1,this.hasIcon=!1,this.type=`submit`,this.value=``,this.addEventListener(`click`,this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){let e=this.disabled||this.softDisabled,t=this.href?this.renderLink():this.renderButton(),n=this.href?`link`:`button`;return D`\n      ${this.renderElevationOrOutline?.()}\n      <div class=\"background\"></div>\n      <md-focus-ring part=\"focus-ring\" for=${n}></md-focus-ring>\n      <md-ripple\n        part=\"ripple\"\n        for=${n}\n        ?disabled=\"${e}\"></md-ripple>\n      ${t}\n    `}renderButton(){let{ariaLabel:e,ariaHasPopup:t,ariaExpanded:n}=this;return D`<button\n      id=\"button\"\n      class=\"button\"\n      ?disabled=${this.disabled}\n      aria-disabled=${this.softDisabled||k}\n      aria-label=\"${e||k}\"\n      aria-haspopup=\"${t||k}\"\n      aria-expanded=\"${n||k}\">\n      ${this.renderContent()}\n    </button>`}renderLink(){let{ariaLabel:e,ariaHasPopup:t,ariaExpanded:n}=this;return D`<a\n      id=\"link\"\n      class=\"button\"\n      aria-label=\"${e||k}\"\n      aria-haspopup=\"${t||k}\"\n      aria-expanded=\"${n||k}\"\n      aria-disabled=${this.disabled||this.softDisabled||k}\n      tabindex=\"${this.disabled&&!this.softDisabled?-1:k}\"\n      href=${this.href}\n      download=${this.download||k}\n      target=${this.target||k}\n      >${this.renderContent()}\n    </a>`}renderContent(){let e=D`<slot\n      name=\"icon\"\n      @slotchange=\"${this.handleSlotChange}\"></slot>`;return D`\n      <span class=\"touch\"></span>\n      ${this.trailingIcon?k:e}\n      <span class=\"label\"><slot></slot></span>\n      ${this.trailingIcon?e:k}\n    `}handleClick(e){if(this.softDisabled||this.disabled&&this.href){e.stopImmediatePropagation(),e.preventDefault();return}!xt(e)||!this.buttonElement||(this.focus(),bt(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}};yt(Z),Z.formAssociated=!0,Z.shadowRootOptions={mode:`open`,delegatesFocus:!0},e([L({type:Boolean,reflect:!0})],Z.prototype,`disabled`,void 0),e([L({type:Boolean,attribute:`soft-disabled`,reflect:!0})],Z.prototype,`softDisabled`,void 0),e([L()],Z.prototype,`href`,void 0),e([L()],Z.prototype,`download`,void 0),e([L()],Z.prototype,`target`,void 0),e([L({type:Boolean,attribute:`trailing-icon`,reflect:!0})],Z.prototype,`trailingIcon`,void 0),e([L({type:Boolean,attribute:`has-icon`,reflect:!0})],Z.prototype,`hasIcon`,void 0),e([L()],Z.prototype,`type`,void 0),e([L({reflect:!0})],Z.prototype,`value`,void 0),e([B(`.button`)],Z.prototype,`buttonElement`,void 0),e([ze({slot:`icon`,flatten:!0})],Z.prototype,`assignedIcons`,void 0);var Et=class extends Z{},Dt=s`:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}\n`,Ot=class extends Et{};Ot.styles=[Ve,Dt],customElements.define(`ew-text-button`,Ot);var Q=class extends F{constructor(){super(...arguments),this.inset=!1,this.insetStart=!1,this.insetEnd=!1}};e([L({type:Boolean,reflect:!0})],Q.prototype,`inset`,void 0),e([L({type:Boolean,reflect:!0,attribute:`inset-start`})],Q.prototype,`insetStart`,void 0),e([L({type:Boolean,reflect:!0,attribute:`inset-end`})],Q.prototype,`insetEnd`,void 0);var kt=s`:host{box-sizing:border-box;color:var(--md-divider-color, var(--md-sys-color-outline-variant, #cac4d0));display:flex;height:var(--md-divider-thickness, 1px);width:100%}:host([inset]),:host([inset-start]){padding-inline-start:16px}:host([inset]),:host([inset-end]){padding-inline-end:16px}:host::before{background:currentColor;content:\"\";height:100%;width:100%}@media(forced-colors: active){:host::before{background:CanvasText}}\n`;function At(e,t){t.bubbles&&(!e.shadowRoot||t.composed)&&t.stopPropagation();let n=Reflect.construct(t.constructor,[t.type,t]),r=e.dispatchEvent(n);return r||t.preventDefault(),r}var jt=class extends Q{};jt.styles=[kt],jt=e([I(`md-divider`)],jt);var Mt={dialog:[[[{transform:`translateY(-50px)`},{transform:`translateY(0)`}],{duration:500,easing:W.EMPHASIZED}]],scrim:[[[{opacity:0},{opacity:.32}],{duration:500,easing:`linear`}]],container:[[[{opacity:0},{opacity:1}],{duration:50,easing:`linear`,pseudoElement:`::before`}],[[{height:`35%`},{height:`100%`}],{duration:500,easing:W.EMPHASIZED,pseudoElement:`::before`}]],headline:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:`linear`,fill:`forwards`}]],content:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:`linear`,fill:`forwards`}]],actions:[[[{opacity:0},{opacity:0,offset:.5},{opacity:1}],{duration:300,easing:`linear`,fill:`forwards`}]]},Nt={dialog:[[[{transform:`translateY(0)`},{transform:`translateY(-50px)`}],{duration:150,easing:W.EMPHASIZED_ACCELERATE}]],scrim:[[[{opacity:.32},{opacity:0}],{duration:150,easing:`linear`}]],container:[[[{height:`100%`},{height:`35%`}],{duration:150,easing:W.EMPHASIZED_ACCELERATE,pseudoElement:`::before`}],[[{opacity:`1`},{opacity:`0`}],{delay:100,duration:50,easing:`linear`,pseudoElement:`::before`}]],headline:[[[{opacity:1},{opacity:0}],{duration:100,easing:`linear`,fill:`forwards`}]],content:[[[{opacity:1},{opacity:0}],{duration:100,easing:`linear`,fill:`forwards`}]],actions:[[[{opacity:1},{opacity:0}],{duration:100,easing:`linear`,fill:`forwards`}]]},Pt=pt(F),$=class extends Pt{get open(){return this.isOpen}set open(e){e!==this.isOpen&&(this.isOpen=e,e?(this.setAttribute(`open`,``),this.show()):(this.removeAttribute(`open`),this.close()))}constructor(){super(),this.quick=!1,this.returnValue=``,this.noFocusTrap=!1,this.getOpenAnimation=()=>Mt,this.getCloseAnimation=()=>Nt,this.isOpen=!1,this.isOpening=!1,this.isConnectedPromise=this.getIsConnectedPromise(),this.isAtScrollTop=!1,this.isAtScrollBottom=!1,this.nextClickIsFromContent=!1,this.hasHeadline=!1,this.hasActions=!1,this.hasIcon=!1,this.escapePressedWithoutCancel=!1,this.treewalker=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT),this.addEventListener(`submit`,this.handleSubmit)}async show(){this.isOpening=!0,await this.isConnectedPromise,await this.updateComplete;let e=this.dialog;if(e.open||!this.isOpening){this.isOpening=!1;return}if(!this.dispatchEvent(new Event(`open`,{cancelable:!0}))){this.open=!1,this.isOpening=!1;return}e.showModal(),this.open=!0,this.scroller&&(this.scroller.scrollTop=0),this.querySelector(`[autofocus]`)?.focus(),await this.animateDialog(this.getOpenAnimation()),this.dispatchEvent(new Event(`opened`)),this.isOpening=!1}async close(e=this.returnValue){if(this.isOpening=!1,!this.isConnected){this.open=!1;return}await this.updateComplete;let t=this.dialog;if(!t.open||this.isOpening){this.open=!1;return}let n=this.returnValue;if(this.returnValue=e,!this.dispatchEvent(new Event(`close`,{cancelable:!0}))){this.returnValue=n;return}await this.animateDialog(this.getCloseAnimation()),t.close(e),this.open=!1,this.dispatchEvent(new Event(`closed`))}connectedCallback(){super.connectedCallback(),this.isConnectedPromiseResolve()}disconnectedCallback(){super.disconnectedCallback(),this.isConnectedPromise=this.getIsConnectedPromise()}render(){let e=this.open&&!(this.isAtScrollTop&&this.isAtScrollBottom),t={\"has-headline\":this.hasHeadline,\"has-actions\":this.hasActions,\"has-icon\":this.hasIcon,scrollable:e,\"show-top-divider\":e&&!this.isAtScrollTop,\"show-bottom-divider\":e&&!this.isAtScrollBottom},n=this.open&&!this.noFocusTrap,r=D`\n      <div\n        class=\"focus-trap\"\n        tabindex=\"0\"\n        aria-hidden=\"true\"\n        @focus=${this.handleFocusTrapFocus}></div>\n    `,{ariaLabel:i}=this;return D`\n      <div class=\"scrim\"></div>\n      <dialog\n        class=${U(t)}\n        aria-label=${i||k}\n        aria-labelledby=${this.hasHeadline?`headline`:k}\n        role=${this.type===`alert`?`alertdialog`:k}\n        @cancel=${this.handleCancel}\n        @click=${this.handleDialogClick}\n        @close=${this.handleClose}\n        @keydown=${this.handleKeydown}\n        .returnValue=${this.returnValue||k}>\n        ${n?r:k}\n        <div class=\"container\" @click=${this.handleContentClick}>\n          <div class=\"headline\">\n            <div class=\"icon\" aria-hidden=\"true\">\n              <slot name=\"icon\" @slotchange=${this.handleIconChange}></slot>\n            </div>\n            <h2 id=\"headline\" aria-hidden=${!this.hasHeadline||k}>\n              <slot\n                name=\"headline\"\n                @slotchange=${this.handleHeadlineChange}></slot>\n            </h2>\n            <md-divider></md-divider>\n          </div>\n          <div class=\"scroller\">\n            <div class=\"content\">\n              <div class=\"top anchor\"></div>\n              <slot name=\"content\"></slot>\n              <div class=\"bottom anchor\"></div>\n            </div>\n          </div>\n          <div class=\"actions\">\n            <md-divider></md-divider>\n            <slot name=\"actions\" @slotchange=${this.handleActionsChange}></slot>\n          </div>\n        </div>\n        ${n?r:k}\n      </dialog>\n    `}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{for(let t of e)this.handleAnchorIntersection(t)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}handleDialogClick(){if(this.nextClickIsFromContent){this.nextClickIsFromContent=!1;return}this.dispatchEvent(new Event(`cancel`,{cancelable:!0}))&&this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(e){let t=e.target,{submitter:n}=e;t.getAttribute(`method`)!==`dialog`||!n||this.close(n.getAttribute(`value`)??this.returnValue)}handleCancel(e){if(e.target!==this.dialog)return;this.escapePressedWithoutCancel=!1;let t=!At(this,e);e.preventDefault(),!t&&this.close()}handleClose(){this.escapePressedWithoutCancel&&(this.escapePressedWithoutCancel=!1,this.dialog?.dispatchEvent(new Event(`cancel`,{cancelable:!0})))}handleKeydown(e){e.key===`Escape`&&(this.escapePressedWithoutCancel=!0,setTimeout(()=>{this.escapePressedWithoutCancel=!1}))}async animateDialog(e){if(this.cancelAnimations?.abort(),this.cancelAnimations=new AbortController,this.quick)return;let{dialog:t,scrim:n,container:r,headline:i,content:a,actions:o}=this;if(!t||!n||!r||!i||!a||!o)return;let{container:s,dialog:c,scrim:l,headline:u,content:d,actions:ee}=e,te=[[t,c??[]],[n,l??[]],[r,s??[]],[i,u??[]],[a,d??[]],[o,ee??[]]],f=[];for(let[e,t]of te)for(let n of t){let t=e.animate(...n);this.cancelAnimations.signal.addEventListener(`abort`,()=>{t.cancel()}),f.push(t)}await Promise.all(f.map(e=>e.finished.catch(()=>{})))}handleHeadlineChange(e){this.hasHeadline=e.target.assignedElements().length>0}handleActionsChange(e){this.hasActions=e.target.assignedElements().length>0}handleIconChange(e){this.hasIcon=e.target.assignedElements().length>0}handleAnchorIntersection(e){let{target:t,isIntersecting:n}=e;t===this.topAnchor&&(this.isAtScrollTop=n),t===this.bottomAnchor&&(this.isAtScrollBottom=n)}getIsConnectedPromise(){return new Promise(e=>{this.isConnectedPromiseResolve=e})}handleFocusTrapFocus(e){let[t,n]=this.getFirstAndLastFocusableChildren();if(!t||!n){this.dialog?.focus();return}let r=e.target===this.firstFocusTrap,i=!r,a=e.relatedTarget===t,o=e.relatedTarget===n,s=!a&&!o;if(i&&o||r&&s){t.focus();return}if(r&&a||i&&s){n.focus();return}}getFirstAndLastFocusableChildren(){if(!this.treewalker)return[null,null];let e=null,t=null;for(this.treewalker.currentNode=this.treewalker.root;this.treewalker.nextNode();){let n=this.treewalker.currentNode;Ft(n)&&(e||=n,t=n)}return[e,t]}};e([L({type:Boolean})],$.prototype,`open`,null),e([L({type:Boolean})],$.prototype,`quick`,void 0),e([L({attribute:!1})],$.prototype,`returnValue`,void 0),e([L()],$.prototype,`type`,void 0),e([L({type:Boolean,attribute:`no-focus-trap`})],$.prototype,`noFocusTrap`,void 0),e([B(`dialog`)],$.prototype,`dialog`,void 0),e([B(`.scrim`)],$.prototype,`scrim`,void 0),e([B(`.container`)],$.prototype,`container`,void 0),e([B(`.headline`)],$.prototype,`headline`,void 0),e([B(`.content`)],$.prototype,`content`,void 0),e([B(`.actions`)],$.prototype,`actions`,void 0),e([R()],$.prototype,`isAtScrollTop`,void 0),e([R()],$.prototype,`isAtScrollBottom`,void 0),e([B(`.scroller`)],$.prototype,`scroller`,void 0),e([B(`.top.anchor`)],$.prototype,`topAnchor`,void 0),e([B(`.bottom.anchor`)],$.prototype,`bottomAnchor`,void 0),e([B(`.focus-trap`)],$.prototype,`firstFocusTrap`,void 0),e([R()],$.prototype,`hasHeadline`,void 0),e([R()],$.prototype,`hasActions`,void 0),e([R()],$.prototype,`hasIcon`,void 0);function Ft(e){let t=`:not(:disabled,[disabled])`;return e.matches(`:is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])`+t+`:not([tabindex^=\"-\"])`)?!0:!e.localName.includes(`-`)||!e.matches(t)?!1:e.shadowRoot?.delegatesFocus??!1}var It=s`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:\"\";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}}\n`,Lt=class extends ${};Lt.styles=[It],customElements.define(`ew-dialog`,Lt);var Rt=s`\n  :host {\n    --roboto-font: Roboto, system-ui;\n    --text-color: rgba(0, 0, 0, 0.6);\n    --danger-color: #db4437;\n\n    --md-sys-color-primary: #03a9f4;\n    --md-sys-color-on-primary: #fff;\n    --md-ref-typeface-brand: var(--roboto-font);\n    --md-ref-typeface-plain: var(--roboto-font);\n\n    --md-sys-color-surface: #fff;\n    --md-sys-color-surface-container: #fff;\n    --md-sys-color-surface-container-high: #fff;\n    --md-sys-color-surface-container-highest: #f5f5f5;\n    --md-sys-color-secondary-container: #e0e0e0;\n\n    --md-sys-typescale-headline-font: var(--roboto-font);\n    --md-sys-typescale-title-font: var(--roboto-font);\n  }\n\n  a {\n    color: var(--md-sys-color-primary);\n  }\n`;export{je as A,I as C,O as D,Ne as E,s as M,e as N,xe as O,L as S,k as T,Be as _,bt as a,B as b,X as c,W as d,Ze as f,Je as g,Xe as h,Q as i,be as j,D as k,vt as l,Ye as m,At as n,xt as o,U as p,kt as r,yt as s,Rt as t,pt as u,ze as v,F as w,R as x,Re as y};"
  },
  {
    "path": "docs/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/logo.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Brainslug Tools</title>\n    <script type=\"module\" crossorigin src=\"/assets/index-CCRny9cW.js\"></script>\n    <link rel=\"stylesheet\" crossorigin href=\"/assets/index-C3ZwmNhv.css\">\n  </head>\n  <body>\n    <div id=\"root\"></div>\n  </body>\n</html>\n"
  },
  {
    "path": "faq.md",
    "content": "# Frequently Asked Questions\n\n### Which ESP device to get?\nWhile technically any device compatible with the ESPHome could work, ESP32s have been tested the most and is what [ESPHome also recommends](https://esphome.io/guides/faq/#recommended). TLDR; ESP32, ESP32-S3 and ESP32-C3.\n\n**Keep in mind that some very cheaply made ESP32s sometimes have flaws where certain components might not work!**\n\nI will try my best to keep the ESP8266 supported as well, but I am not sure how it will behave with version 2 and 3, because that will probably require a bit more RAM. The webserver might also be a bit worse on the ESP8266.\n\n### About the robot errors/alerts\nThe robot status is, by default, fetched once every 2 seconds. If you have logging enabled, this creates many logs for `GetErr` and for D3-D7 `GetState`. If you see the alert/error `UI_ALERT_INVALID`, this means you have no alert/error.\n\n### Valetudo?\nFor those unaware, Valetudo is a cloud replacement for a limited range of vacuum cleaners, and while adding support for the Neato vacuums would be amazing, as it is right now, it is not possible. Valetudo works by overriding the original firmware to disable SSL certificate pinning and replace the hardcoded IP address of the server it connects to. The hardcoded IP address is not a problem for the Neatos but the SSL certificate pinning is, unless there is a way to disable that, is found or a firmware without the SSL certificate pinning is released, a cloud replacement for the Neato robots will never be possible. \n\nAside from that, if the certificate pinning problem is fixed, it would not be part of Valetudo for a couple of reasons:\n- Valetudo requires that the entire package run on the robot, which is not possible with the Neatos, so would need to be a separate docker package like Congatudo\n- They had themselves said Neato and Vorwek is something they are not supporting. See https://dustbuilder.dontvacuum.me/unsupported.txt\n\n### Making your own firmware?\nThe firmware images are encrypted and signed, while it seams that the signing does not really matter, the encrypted firmware images makes it impossible to modify or create your own firmware. \n\n"
  },
  {
    "path": "ha-images.md",
    "content": "\n## Home Assistant card\n\nCleaning running | Cleaning paused\n:-------------------------:|:-------------------------:\n![cleaning](./pics/esphome/cleaning.png) | ![paused](./pics/esphome/paused.png) \n\nBooting | Shutting down\n:-------------------------:|:-------------------------:\n![booting](./pics/esphome/booting.png) | ![shutdown](./pics/esphome/shutdown.png)  \n\nDisconnected | Alert | Error\n:-------------------------:|:-------------------------:|:----\n![disconnected](./pics/esphome/disconnected.png) | ![alert](./pics/esphome/alert-dustbin.png)  | ![error](./pics/esphome/error-undock-failed.png) \n\n\n![advanced-spot-clean](./pics/esphome/advanced-spot-clean.png)\n\n## Webserver interface\nIf you want, you can also control the robot via the esphome webserver interface, this just shows all settings, the log and the buttons to do actions.\n\n![webserver-esphome](./pics/esphome/web_server.png)\n\n"
  },
  {
    "path": "install-esp-device-gen2.md",
    "content": "# Install ESPHome device in a gen2 robot\n\n**Please read the guide fully before doing it yourself!**\n\nYou will have to go a bit back and forth between this guide and where you came from!\n\nThere is no full step by step guide for the gen2 robots, just general information. Info and pictures are taken from https://github.com/Philip2809/neato-brainslug/discussions/72\n\n1. Turn the robot off, remove the battery\n\n2. Take the top cover off to expose the board, there is many yt videos showing how to take it apart\n\n3. Find the debug port on the right side\n![](pics/installs/gen2/debug-port.jpg)\n\n4. Solder wires according to the pinout\n![](pics/installs/gen2/pinout.png)\n![](pics/installs/gen2/soldered-1.jpg)\n![](pics/installs/gen2/soldered-2.jpg)\n\n5. Connect to the ESP device and TEST your configuration, make sure that it works!\n\n6. Install the ESP device inside of the robot where there is space, make sure to cover the ESP device in electrical or kaptop tape to avoid any shorts. \n\n7. Put the robot back togehter, keep the cables in mind and make the hole larger if nedded. \n![](pics/installs/gen2/closed-up.jpg)\n\n8. Once all is back togheter, put the battery back in and turn it on!"
  },
  {
    "path": "install-esp-device-gen3.md",
    "content": "# Install ESPHome device in a gen3 robot\n\n**Please read the guide fully before doing it yourself!**\n\nNow its time to install the ESPHome device in a more permanent way, there is a couple of ways to do this, but for all of these methods it is recommended to use this type of cable:\n| |  | | |\n:-:|:-:|:-:|:-:\n**JST-XH to DuPont** | ![JST-XH to dupont](pics/installs/0_jst-xh.jpg) | Either buy or make this type of cable, it will be used to connect the ESP device to the debug port. You could also use dupont female-female connectors, but you will need the make the hole larger and add some protection for the cables because they would be too stiff and could break when the robot bumps into things. | https://www.aliexpress.com/item/1005006251847933.html\n\n### Make this cable:\nYou will need\n- [One female JST-XH cable](https://www.amazon.com/dp/B0D9R3MP4G) (the one that does not have pins sticking out)\n- A soldering iron\n- 4 pieces of about 10 cm of wire\n- 4 pieces of heath shrink tubing\n- [4x Dupont connector and crimping tool](https://a.co/d/8DN4Z0P) or 4x female DuPont connectors\n\nCut and strip the wires, solder the DuPont cables to the JST-XH cables, if you don't have pre-crimped cables, crimp the first. Use heat shrink to protect your soldering.\n\n### About the JST-XH connector\n\nMake sure the connector plugs in as far back as possible, this is easier for the internall install since you see everything a lot better. Use the following images as a referance on how far it should be plugged in!\n\nWhen you plug it in it might feel like it stops after a little while, but the top part catches the connector, keep pushing | It should be pushed this far back, make sure to be careful, you don't want to break anything!\n:-------------------------:|:-------------------------:\n![not connected to debug port](pics/installs/7_not-connected.jpg) | ![connected to debug port](pics/installs/7_connected.jpg)\n\nThe connector just fits, I needed to press on each side of the connector a little bit at a time, that way it went in correctly, it should be about as deep as shown here | How far back the connector should be pushed with a ruler in **cm**\n:-------------------------:|:-------------------------:\n![not connected to debug port](pics/installs/7_how-far-to-push.jpg) | ![connected to debug port](pics/installs/7_connector-with-ruler.jpg)\n\n#### Bending pins (not recommended)\nYou could, instead of using an JST-XH connector bend the debug pins to allow for dupont connectors to connect.\n\n![bent-pins-dupont](./pics/installs/tom/bend-pins.png)\n\nBending the pins you risk breaking the board, so this method should be avoided.\n\n## Choose the method to install\n\n| Method | State |  | |\n:-:|:-:|:-:|:-:\nExternally | NOT Recommended, least stable, if the tape peals you will get deck debris error | ![cables-via-bumper](./pics/installs/8_cables-via-bumper.jpg) | ![d3-install-outside](./pics/installs/external.jpg)\nBehind bumper cut | Recommended but you will need to cut some plastic | ![](./pics/installs/behind-bumper-cut-1.jpg) | ![](./pics/installs/behind-bumper-cut-2.jpg) \nBehind bumper small ESP | Recommended but you need an small ESP device and solder the connections, not using DuPont on the ESP | ![](./pics/installs/behind-bumper-c3.png) | Or use ANTALIFE's custom pcba cable ![](./pics/installs/pcba-cable.png)\nInternally | Recommended approach | ![jay-jst-xh](./pics/installs/jay/2-install-JST-XH.jpg) | ![jay-installed](./pics/installs/jay/4-installed-and-taped.jpg)\n\n## Step by step\n\n**Warning: before doing anything on the robot, make sure to open the battery compartment and remove the battery. We will include this again step in the step-by-step procedure.**\n\n### What you need\n- Protective cover for your work surface\n- The JST-XH cable\n- The ESP you flashed\n- Hot glue\n- Tape\n- Electrical tape (preferably black)\n- Electrical masking tape / Kapton tape to prevent shorts\n\nInternally:\n- Long T10 Torx bit (Some robots also have T10 security screws)\n- Philips screwdriver\n\nBehind bumper:\n- If you are cutting the plastic, a utility knife\n\n### Let's begin!\n\n1. Put a protective cover over your work surface as there will be some dust coming out of your robot and you don't want that on your kitchen table. A piece of cardboard, plastic or tablecloth will do.\n\n2. Remove the dustbin from the robot.\n\n3. Turn the robot over, so you can see the bottom side of the robot, where the wheels are.\n\n4. Remove the main brush cover by pulling upwards. If you have a side brush, you will need to pull that off too.\n\n5. Remove the main brush.\n\n6. Remove the bumper by pulling it off.\n\n7. Remove the 2 Philips screws marked yellow in the image below and open the battery compartment. Remove the battery and leave it unplugged until told to plug it back in.\n![Neato robot on its back. Screws to remove are marked](pics/installs/jay/1-removing-screws.jpg \"Remove these screws\")\n\nHow do you want to continue?\n- [Internally](#internally)\n- [Behind bumper cutting](#behind-bumper---cutting)\n- [Behind bumper with small ESP (or custom pcba cable)](#behind-bumper---small-esp-device)\n- [Externally](#externally)\n\n### Internally\n\n8. Remove the 6 Torx screws red marked in the image from before. You will need a long T10 Torx bit for that, it might be security torx.\n\n9. Turn the robot back over so you can see space where the dust bin normally sits.\n\n10. Remove two more torx screws as indicated in the image below.\n\n![Neato robot normals ide up. Screws to remove are marked](pics/installs/jay/1a-removing-two-more-screws.jpg \"Remove two more screws\")\n\n11. Remove the top cover by pushing the two tabs at the front.\n\n12. Double check again that you've removed the battery before continuing. There should be no LEDs on at this point.\n\n13. Install the JST-XH cable on the connector on the front-left of the board and then run the wire up tightly across the board, under some other wires, to the right of the board. The connector should be plugged in as far as it goes\n![Close-up of Neato board with JST-XH connector and wire installed](pics/installs/jay/2-install-JST-XH.jpg \"Installing the JST-XH cable\")\n\n14. Find a place for your ESP. It normally fits in the space to the right of the main board.\n\n15. Run the wires up/under existing wires as needed so they don't stick out. \n\n16. Connect the wires to the ESP, making sure you make the right connections, you should have tried what connections works for you since before!\n\n17. Wrap your ESP in masking tape / Kapton tape to prevent shorts. Also make sure to secure the connections to the ESP as there will be a lot of vibration. Either include them in the tape wrap or use some hot glue.\n![ESP installed and taped](pics/installs/jay/4-installed-and-taped.jpg \"Installing and taping the ESP\")\n\n18. Use some electrical tape on the Neato enclosure across the JST-XH cable wires to secure them.\n![Closeup of JST-XH cable with electrical tape on plastic enclosure](pics/installs/jay/5-electrical-tape-1.jpg \"Securing JST-XH cable\")\n\n19. Put back the top cover. Don't turn Neato over just yet.\n\n20. Add another round of electrical tape to further secure the JST-XH cable.\n![Closeup of Neato with electrical tape on plastic enclosure](pics/installs/jay/6-electrical-tape-2.jpg \"Securing JST-XH cable once more\")\n\n21. Put back the two screws you removed earlier.\n\n22. Now, turn Neato back over and put back the 6 Torx screws your removed from the bottom.\n\n23. Reconnect battery and close battery compartment.\n\n24. Turn Neato on and enjoy!\n\n### Behind bumper - cutting\n8. Score the side and bottom of the pastic part under the debug port and break it off\n![](./pics/installs/behind-bumper-cut-1.jpg)\n\n9. Cover up all the exposed metal parts of the mainboard and drop sensor to avoid shorts\n\n10. Connect the JST-XH connector the the debug port and connect/solder the other end to the ESP device - see the section above about the JST-XH connector! Put some hot glue or wrap it very well in tape to make sure it does not disconnect!\n![](pics/installs/9_connected-hot-glue.jpg)\n*For this install you don't need to bend the pins, reused the image, the important is the hot glue*\n\n11. Once the connectors are secure to the ESP device, place it in the cavity and tape it all up!\n![](./pics/installs/behind-bumper-cut-2.jpg)\n\n12. If needed some struts on the bumper may need to be broken out/cut\n![](./pics/installs/behind-bumper-cut-3.jpg)\n\n13. Put the bumper back on, battery back into its place, battery cover on, brush in its place and enjoy!\n\n\n### Behind bumper - small ESP device\n\n8. Either use ANTALIFE's custom pcba cable or:\n    1. Make sure how you want the ESP device to fit\n    2. Connect the JST-XH connector the the debug port and route the cable to the place the ESP device will go, make it as flat as possible, if you can route it behind the plastic - see the section above about the JST-XH connector!\n    3. Solder the cables to the ESP device\n    4. Secure the ESP device in its place and make the cable as flush as possbile, secure it with tape or hot glue\n\nIf using the JST-XH or self made cable, try to route it like this | ANTALIFE's custom pcba cable\n:-------------------------:|:-------------------------:\n![](pics/installs/behind-bumper-c3.png)  | ![](pics/installs/pcba-cable.png)  \n\n9. If needed some struts on the bumper may need to be broken out/cut\n![](./pics/installs/behind-bumper-cut-3.jpg)\n\n10. Put the bumper back on, battery back into its place, battery cover on, brush in its place and enjoy!\n\n\n\n### Externally\n8. Drill a hole in the bumper\n\nBumber front | Bumber back\n:-------------------------:|:-------------------------:\n![bumper-front](./pics/d3/bumper-front.jpg) | ![bumper-back](./pics/d3/bumper-back.jpg)\n\n\nDebug port | Debug port with bumber \n:-------------------------:|:-------------------------:\n![debug-port](./pics/d3/debug-port.jpg) |  ![bumper-with-hole](./pics/d3/bumper-with-hole.jpg)\n\n\n9. Route the JST-XH thour the hole and connect them to the debug port\n![Route the JST-XH throuhg bumper](pics/installs/6_cable-in-bumper.jpg)\n\n\n10. Plug the JST-XH connector into the debug port - see the section above about the JST-XH connector!\n![Plug the JST-XH connector into the debug port](pics/installs/7_plug-cable-in.jpg)\n\n\n11. Put the bumper back on and make sure the cable is out\n\nMake sure the cables come out like this | The cables should reach the handle like this\n:-------------------------:|:-------------------------:\n![not connected to debug port](pics/installs/8_cables-via-bumper.jpg) | ![connected to debug port](pics/installs/8_cables-to-handle.jpg)\n\n12. Connect (and bend the pins) the ESP device to the robot\nDepedning on how your ESP device looks like, you may need, like me, to bend the pins to fit it in a better way, it is to make sure the cables don't interfere with the lidar.\n\nPlace your ESP device down | Connect dupont cables to the pins you want to bend | Bend the pins out towards the side like this, don't use too much force!\n:-------------------------:|:-------------------------:|:-------------------------:\n![bend step 1](pics/installs/9_bend-1.jpg) | ![bend step 2](pics/installs/9_bend-2.jpg) | ![bend step 3](pics/installs/9_bend-3.jpg)\n\nNow you need to connect the cables from the debug port to the ESP device\n\nBased on above, on my ESP device with this adapter cable, I needed to connect like this | Put some hot glue on the connections to make sure they are not going anywhere\n:-------------------------:|:-------------------------:\n![bend step 1](pics/installs/9_connected.jpg)  | ![bend step 1](pics/installs/9_connected-hot-glue.jpg)\n\n\n13. Secure the ESP in the handle area\n\nYou should now have your ESP device connected to the robot like this | Place the ESP device like this; MAKE SURE YOU CAN CLOSE THE DUST BIN!!\n:-------------------------:|:-------------------------:\n![secure step 1](pics/installs/10_step-1.jpg)  | ![secure step 2](pics/installs/10_step-2.jpg)  \n\nPut some tape on the cables, hole and ESP device to keep them in place| Put more tape over the ESP device to secure it and avoid shorts. You can also like me put a dot of hot glue\n:-------------------------:|:-------------------------:\n![secure step 3](pics/installs/10_step-3.jpg)  | ![secure step 4](pics/installs/10_step-4.jpg)  \n\nCover all cable but a little piece (needed for the bumper action to work) with tape to avoid it getting cought on anything.\n\n![Installed externally](./pics/installs/external.jpg)\n\n14. Put the bumper back on, battery back into its place, battery cover on, brush in its place and enjoy!"
  },
  {
    "path": "install-ha.md",
    "content": "# Install with Home Assistant\n\nMy initial, and recommened, way to use this repair. All versions of this repair will be supported via this route, later versions should be much easier since I plan on making it all as one package on HACS. (ESPHome will probably still be required)\n\n![HA Card](pics/setup/ha-card.png)\n\n**Overview of steps:**\n1. Setup HACS and install required add-ons\n2. Import the config to ESPHome\n3. Flash the image to your ESP device\n4. Connect the ESP device to your robot\n5. Add the ESP device to Home Assistant\n6. Setup the Home Assistant card\n7. Install the ESP device on the robot\n8. Enjoy your locally connected robot!\n\nI know this might be quite a bit overwhelming, but the reason there is this many steps is to have it as detailed as possible. Once again, at any point, feel free to ask for help.\n\n## Step 1\n\nWe need to install certain add-ons to the home assistant installation to use all the features of this project.\n\n### Home assistant add-ons\nDonwload \"ESPHome Device Builder\" by\n1. In Home Assistant, go to `Settings` --> `Add-ons` --> `Add-on Store` --> click on `\"ESPHome Device Builder\"`. Or click this button:\n    - [![Open your Home Assistant instance and show the dashboard of an add-on.](https://my.home-assistant.io/badges/supervisor_addon.svg)](https://my.home-assistant.io/redirect/supervisor_addon/?addon=5c53de3b_esphome&repository_url=https%3A%2F%2Fgithub.com%2Fesphome%2Fhome-assistant-addon)\n\n3. Select install.\n4. I would recommend to enable `Add to sidebar` and `Start on boot`. If you decide not to add it to the sidebar, you will need to open ESPHome by coming back to this page and selecting `Open web UI`.\n\n### HACS\nIf you don't already have HACS, [follow this guide](https://www.hacs.xyz/docs/use/) to set it up. Once you have HACS setup, open it and install the following addons: (search with the id number!)\n- `button-card` `146194325`\n    - An button element to place on a dashboard with a lot of configurations to make the card look nice.\n- `browser_mod` `194140521`\n    - Allow for a popup when clicking on settings or holding down the spot clean button.\n    - Don't forget to add the \"Browser Mod\" integration in `Settings` -> `Devices & Services` -> `Add Integration` or click this button: \n        - [![Open your Home Assistant instance and start setting up a new integration.](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=browser_mod)\n    - It will ask you if you want to register your browser as a device, you don't need to do this for it to work.\n\nAfter installing these add-ons, you need to refresh your page, however, some browsers need a hard refresh. This you can do by pressing `Ctrl + Shift + R`. If it still does not want to work you might need to restart Home Assistant.\n\n## Step 2\n\n### ESPHome Secrets\nOpen the ESPHome Builder and click the \"Secrets\" in the top right. Make sure your secrets include at the minimum this:\n```yaml\n# Generate at https://esphome.io/components/api/#api-key\nneato_vacuum_api: \"<API_KEY>\"\n# Generate at https://bitwarden.com/password-generator/\nneato_vacuum_ota: \"<OTA_PASSWORD>\"\n\n# Your Wi-Fi SSID and password\nwifi_ssid: \"<WIFI_SSID>\"\nwifi_password: \"<WIFI_PASSWORD>\"\n```\n\nOnce you have filled this file with your values, save it, and make sure to never share this file if asking for support etc. Remove the `<>` characters, these are used for marking a field of what you should replace.\n\nIf you want to add more devices, best practice is to set the api key and ota password in your secrets file. Your wifi password and ssid should also be kept here. Since the esp device will be strapped to, or inside the robot OTA (over the air) updates is quite important for this use case.\n\n### Config file\n[Download the ESPHome config file](https://github.com/philip2809/neato-brainslug/releases/latest/download/ha-esphome.yaml)\n\nOnce back at the ESPHome main page, click the big green button in the bottom left to add a new device. Read the information, but for now, click \"Continue\" and either import the file you downloaded, or start with an empty configuration and paste the contents in. Open the file in edit mode in case it does not automatically open in edit mode.\n\n**The following two steps might be hard to do, feel free to ask for help in the discord or discussions.**\n\nIt should look something like this:\n![esphome config file](pics/setup/esphome-config-file.png)\n\nWhatever text is in green, has the `#` in the begining is not used, the `#` marks the line as a comment, so whatever config you want needs to be in white, add a `#` to the begining of the line you don't want to include.\n\nHere you can easily change some parts, if you board type is not listed you will need to add something like:\n```yaml\nesp32:\n  variant: ESP32C3 # Change this to whatever you have!\n  framework:\n    type: esp-idf\n```\nto this config, I have included some common boards here.\n\nIf you want change the name, if needed the ip address etc. If you want to use home assistant or just the webserver, if you have an gen3 or gen2 robot. \n\nUART pins it is best to keep at default, 17 and 16 for most boards, the smaller C3 board the default is 7 and 6, however you can choose something else if you want in the config.\n\nIn most cases, the pins labeled `TX` and `RX` cannot be used, as these are used to upload the firmware, you will need to find GPIO pins that support using using UART, on the ESP32 many of the GPIO pins can be used. There is many tutorials for the different boards, here is some common ones:\n- [ESP32](https://randomnerdtutorials.com/esp32-pinout-reference-gpios/)\n- [ESP8266](https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/)\n\n## Step 3\nNow you will need to build and flash the images onto your ESP device! While in the editor, press the \"Install\" button in the top right, since the device is not yet setup, select \"Manual download\", this will build the configuration file to an image you can flash, this might take a while on a fresh system, or not powerful hardware.\n\nOnce the image has been built, select to download in \"Factory format\", save this file on your computer and open [ESPHome Web](https://web.esphome.io/). Since this uses WebSerial you will need to use a chromium based browser. ESPHome has an amazing [guide](https://esphome.io/guides/physical_device_connection/) if this is your first time doing this, but to summerize, if you have an usb-port on your device, connect to it, if not you will need to connect to the `TX`, `RX`, `GND` and `3.3V/5V` with an TTY adapter. Then go into bootloader mode by pressing the \"BOOT\" button, if you don't have one, connect `GPIO0` to `GND`.\n\nOnce in ESPHome Web, connect your device to your computer, while going into bootloader mode, then select it in the list. Once selected, upload the firmware file you downloaded before and wait for it to finish.\n\nOnce the device has connected you need to verify that it works and you can see the web server it is hosting before we continue. For most people one of two links will bring you to the ESP device's web server:\n- [`http://neato-vacuum.local`](http://neato-vacuum.local)\n- [`http://neato-vacuum.lan`](http://neato-vacuum.lan)\n\n**If you changed the name of your device in the config, these links will be different!**\n\nIf neither of these link work, please check that the device actually connected to your wifi and see if you can get the ip-address of the ESP device. If you are still having problems or have trouble finding the ip-address, feel free to ask for help!\n\n## Step 4\nWhen you have navigated to the site of the ESP device it should look something like this:\n![Webserver disconnected](pics/setup/step_4-webserver-disconnected.png)\n\nThis is the webserver of the device. It will show up as not connected since we are not connected to the robot, we are only connected to a power source so that the ESP device can be configured. Now you can connect the device to the robot via the debug port to make sure that it works are you want to! To do this:\n1. Turn the robot off\n2. Take of the bumper of the robot\n3. Connect to the robot - if you have an `gen2` robot, proceed to [the install guide](./install-esp-device-gen2.md)\n    | Robot | ESP |\n    |---|---|\n    |RX|GPIO17 (TX of esp device)|\n    |3.3V|3.3V|\n    |TX|GPIO16 (RX of esp device)|\n    |GND|GND|\n\n    When it comes to UART, TX connects to RX and RX connects to TX. \n\n    ![Connection diagram](pics/setup/step_4-connection-diagram.png)\n4. Turn the robot back on, this should power up the ESP device and you can now go to the webserver interface page we saw before and the data from the robot should now show up!\n    ![Webserver connected](pics/setup/step_4-webserver-connected.png)\n5. Click the different buttons to make sure that it works, if you have a D3-D7, drive it around with the manual mode, however, remeber that the bumper is off!\n\n## Step 5\n\nAfter flashing and connecting the ESP device to the robot we need to add the ESP device into Home Assistant.\n1. Power the robot on if it is off\n2. In Home Assistant navigate to: `Settings` --> `Devices & Services` -- `Click \"Add integration\"` --> `Search \"ESPHome\"`\n3. Enter the hostname or ip address of the ESPHome device\n    - If you haven't change the name of the device in the config, it is most likely `neato-vacuum.local` or `neato-vacuum.lan` depending on your router. It is the same as the link that worked before in step 4.\n    - If you want to use the ip address, find what ip the device got in your router. If you decide to use the ip, make sure to set it static!\n4. Click submit and the device should be added.\n\n## Step 6\nCopy the contents of the Home Assistant card for your vacuum generation (the files are also in the [config](./config/) directory)\n- [`gen2`](https://github.com/philip2809/neato-brainslug/releases/latest/download/ha-card_gen2.yaml)\n- [`gen3`](https://github.com/philip2809/neato-brainslug/releases/latest/download/ha-card_gen3.yaml)\n\n**If you have changed the name in the ESPHome config:**\n1. Paste the content into a text editor\n2. Go to `Developer tools` --> `States` --> `In \"Filter entities\" search for \"_fuel_percent\"`\n3. There should be a result for `sensor.<ENTITY_ID>_fuel_percent`\n    - This entity id is probaly the same as the name you gave but lowercase and dashes changed for underscores.\n4. Replace all instances of `neato_vacuum` with your `<ENTITY_ID>`\n\n\n### Add the card\n1. Press the pen icon in the top right on the desired dashboard\n2. Press `Add card`\n3. Scroll to the buttom and select `Manual`\n4. Paste the contents of the card (if you changed the name, then the version that you changed)\n\n### Vacuum Entity\nYou can also use neato-brainslug as an Home Assistant vacuum entity. The vacuum entity is needed in case you want to use any of the automations or scripts.\n\n![Vacuum entity](pics/setup/ha-step_6-vacuum-entity.png)\n\nSadly vacuum entities can only be added by editing the Home Assistant config files, however, I will walk though the entire proccess!\n1. Going to `Settings` --> `Add-ons` --> `Add-on Store` --> `Open \"File editor\"`.\n    - [![Open your Home Assistant instance and show the dashboard of an add-on.](https://my.home-assistant.io/badges/supervisor_addon.svg)](https://my.home-assistant.io/redirect/supervisor_addon/?addon=core_configurator&repository_url=https%3A%2F%2Fgithub.com%2Fesphome%2Fhome-assistant-addon)\n2. Select install.\n3. I would recommend to enable `Add to sidebar` and `Start on boot`. If you decide not to add it to the sidebar, you will need to come back here to open the file editor.\n4. Open the file editor by clicking on \"Open web UI\" or if you added it to the sidebar, click on it in the sidebar.\n5. Open the main `configuration.yaml` file by clicking on the folder icon in the top left then selecting the `configuration.yaml` file.\n6. Add the following like to this config and then save by pressing the red save button in the top right or press `Ctrl + S`.\n    ```yaml\n    template: !include_dir_merge_list templates/\n    ```\n7. Click on the folder icon again and create a folder called `templates`.\n8. Create a new file in this folder called `vacuums.yaml`.\n9. Copy the contents of the Home Assistant entity for your vacuum generation (the files are also in the [config](./config/) directory)\n- [`gen2`](https://github.com/philip2809/neato-brainslug/releases/latest/download/ha-entity_gen2.yaml)\n- [`gen3`](https://github.com/philip2809/neato-brainslug/releases/latest/download/ha-entity_gen3.yaml)\n    - if you have multiple vacuums, duplicate the config from the `- name:` part and change the ids!\n10. Save the file and make sure the configuration is good by going to `Developer tools` --> `YAML` --> `Click on \"Check configuration\"` --> `If configuration is good, click on \"All YAML configuration\" under \"YAML configuration reloading\"`.\n\n### Schedule automation\nVia Home Assistant you can also schedule your robot, this allows for smarter scheduling since this can check if someone is home (if setup of course), holidays etc. To set this up:\n1. Go to `Settings` --> `Automations & Scenes` --> `Automations` --> Press the big blue `Create automation` in the bottom right corner\n2. Press `Create new automation`\n3. Add a trigger, for example that the vacuum should run every day at 08:00\n4. Send an event to start the vacuum, either via the button esphome created **OR** via the vacuum entity you created\n\n![Home Assistant Schedule Automation](pics/setup/ha-step_6-schedule-automation.png)\n\nYou can add as many triggers you want, any trigger added will cause the automation to run, and then you can add `And if` rules to make sure it is only tirggered when all conditions added there are meet.\n\n### Notifications\nVia Home Assistant you can also get notifications. For now with 1.2 the showcased notification system here is rudamentory, the notifications will be vastly improved with 1.3.\n1. Go to `Settings` --> `Automations & Scenes` --> `Automations` --> Press the big blue `Create automation` in the bottom right corner\n2. Press `Create new automation`\n3. Add a trigger for when the robot error (and alert if you have a gen3 robot and want to) changes\n4. Make it send a notification or a request to a notification service like unifiedpush.\n\n![Home Assistant Notifications Automation](pics/setup/ha-step_6-notifications.png)\n\nFor the notification, I would make the message:\n```yaml\nAlert: {{ state_attr('vacuum.template_neato_vacuum', 'alert') }}\nError: {{ state_attr('vacuum.template_neato_vacuum', 'error') }}\n```\n\nRemove the alert part in case you don't have a gen3 robot. You can also use the esphome sensor directly if you don't want to use the vacuum entity like: `{{ states('sensor.neato_vacuum_robot_error') }}`\n\n## Step 7\n**Before you make a permanent installation, make sure it all works via Home Assistant as you want it to!**\n\nNow lets install the ESP device:\n- [`gen2`](./install-esp-device-gen2.md)\n- [`gen3`](./install-esp-device-gen3.md)\n\n## Step 8\nNow you can enjoy your locally controllable neato vacuum cleaner! Of course there is some quirks with this repair, however we feel they are worth the ability to regain functionality.\n"
  },
  {
    "path": "install-no-ha.md",
    "content": "# Install without Home Assistant\n\nYou can also use this repair without Home Assistant, however future versions of neato-brainslug will require a docker conatiner that is running, easiest installation will be via home assistant.\n\n![Webserver](pics/setup/step_4-webserver-connected.png)\n\n**Overview of steps**\n1. Flash ESP device with prebuilt images\n2. Connect to esp wifi\n3. Configure wifi\n4. Make sure it works\n5. Fix ESP device inside or outside robot\n6. Enjoy a locally connected vacuum & how to install updates\n\n### Step 1\nI have made some prebuilt images for recommended ESP32s, `ESP32`, `ESP32-S3` and `ESP32-C3`, if you have another ESP32 that is not listed here, ask me and I will build you one!\n\nThe easiest way to flash your ESP device is with the [Brainslug Web Flasher](https://brainslug.phma.dev/).\n![Brainslug Web Flasher](pics/setup/brainslug-web-flasher.png)\n\n1. Connect your device with a cable. (Note: many micro usb cables are power only, if one of your cables is not working, try another!)\n2. Select your generation of neato and click \"Connect\"\n3. Select your ESP32 device in the list, if you don't know which one is your ESP, unplug and replug your device to see what shows up!\n4. Wait for it to connect and select \"Install Neato Brainslug\"\n![Webflasher menu](pics/setup/brainslug-web-flasher-menu.png)\n5. Follow the instructions in the web flasher.\n\n**If you get any errors about unsupported devices, then you are not using a recommended ESP32, please ask me for a build in that case!**\n**If you have multiple vacuums you will need prebuild images with different names or it will be annoying to connect to them, please ask for me for a build!** \n\nOnce you have it installed it should go back to this menu:\n![menu flashed with improv](pics/setup/brainslug-web-flasher-menu-flashed.png)\nHere you can also configure the wifi settings if your device is not too exotic, if you cannot configure the wifi here, continue onto step 2.\n\n### Step 2\nWith the device still connected to your computer, go to the wifi settings of your computer or phone and connect to the network hosted by the esp device.\n- SSID: `neato-brainslug`\n- Password: `make-it-suck-again`\n\nOnce you have connected your browser should automatically open a window to \"login\" to the network, you may need to see your notifications on the phone or open the web browser on a computer, but if none of that works, go to [`http://192.168.4.1/`](http://192.168.4.1/) manually. \n\nWhen you are on this site you should see the default captive portal that looks like this:\n![Captive portal on esphome](./pics/setup/noha-step_1-captive-portal.png)\n\nNow you will need to select and enter your wifi details so that the ESP device can connect to it. When you hit save, it will restart and connect to your wifi, if you entered your details incorrectly or it could not connect, the network you just connected to, `neato-brainslug` should show up once again in your wifi settings so you can try again.\n\nOnce the device has connected you need to verify that it works and you can see the web server it is hosting before we continue. For most people one of two links will bring you to the ESP device's web server:\n- [`neato-vacuum.local`](http://neato-vacuum.local)\n- [`neato-vacuum.lan`](http://neato-vacuum.lan)\n\nIf neither of these link work, please check that the device actually connected to your wifi and see if you can get the IP address of the ESP device. If you are still having problems or have trouble finding the IP address, feel free to ask for help.\n\n### Step 4\nWhen you have navigated to the site of the ESP device it should look something like this:\n![Webserver disconnected](pics/setup/step_4-webserver-disconnected.png)\nThis is the webserver of the device. It will show up as not \"loading...\" since we are not connected to the robot, we are only connected to a power source so that the ESP device can be configured. Now you can connect the device to the robot via the debug port to make sure that it works are you want to! To do this:\n1. Turn the robot off\n2. Take of the bumper off the robot\n3. Connect to the robot - if you have an `gen2` robot, proceed to [the install guide](./install-esp-device-gen2.md)\n    | Robot | ESP |\n    |---|---|\n    |RX|GPIO17 (TX of esp device)|\n    |3.3V|3.3V|\n    |TX|GPIO16 (RX of esp device)|\n    |GND|GND|\n\n    When it comes to UART, TX connects to RX and RX connects to TX. \n\n    **ESP32-C3 HAS TX ON GPIO7 and RX ON GPIO6, so in that case just remove the \"1\" from the image below, connect the blue wire to GPIO6 and yellow wire to GPIO7**\n\n    ![Connection diagram](pics/setup/step_4-connection-diagram.png)\n4. Turn the robot back on, this should power up the ESP device and you can now go to the webserver interface page we saw before and the data from the robot should now show up.\n    ![Webserver connected](pics/setup/step_4-webserver-connected.png)\n5. Click the different buttons to make sure that it works, if you have a gen3 robot, drive it around with the manual mode!\n\n### Step 5\nNow lets install the ESP device:\n- [`gen2`](./install-esp-device-gen2.md)\n- [`gen3`](./install-esp-device-gen3.md)\n\n### Step 6\nNow you can enjoy your locally controllable neato vacuum cleaner.\n\nEventually there will be updates, either as new features or stability fixes, however all of this connecting and flashing will no longer be required since ESPHome have support for OTA-updates. To update when a new version comes out, you will need to:\n1. Download the OTA update file for your device, recommended ESP32 devices is here:\n    |`gen2`  | `gen3` |\n    |---|---|\n    | [ESP32](https://github.com/philip2809/neato-brainslug/releases/latest/download/nbs-gen2-esp32.ota.bin) | [ESP32](https://github.com/philip2809/neato-brainslug/releases/latest/download/nbs-gen3-esp32.ota.bin) |\n    | [ESP32-S3](https://github.com/philip2809/neato-brainslug/releases/latest/download/nbs-gen2-esp32s3.ota.bin) | [ESP32-S3](https://github.com/philip2809/neato-brainslug/releases/latest/download/nbs-gen3-esp32s3.ota.bin) |\n    | [ESP32-C3](https://github.com/philip2809/neato-brainslug/releases/latest/download/nbs-gen2-esp32c3.ota.bin) | [ESP32-C3](https://github.com/philip2809/neato-brainslug/releases/latest/download/nbs-gen3-esp32c3.ota.bin) |\n2. Go to the webserver of the device and upload the file under the OTA section, then press \"UPDATE\"\n    ![OTA update](pics/setup/step_6-webserver-ota.png)\n3. Wait for it to update and restart then refresh the page, you should now be on the latest version!\n\n\n\n"
  },
  {
    "path": "manual.md",
    "content": "# Robot manual\nSome of the features of the robot is detailed here. The pictures here show the webserver, but the same applies to the entities exposed in Home Assistant in case that is used. This document will be expanded upon with time, when more info about the robot is found out!\n\n## Buttons and last cleaning\n![](./pics/esphome/webserver/buttons-last-cleaning.png)\n- Use the different buttons for controlling the robot, some robots may not have all functions availible. \n- `gen2` does not have last cleaning data\n\n## Basic data and spot clean\n![](./pics/esphome/webserver/basic-data-spot-clean.png)\n- Basic status of the robot, battery, docked, erros/alerts and the time by ESP device\n- Spot clean a custom area by selecting the size and pressing the spot clean button. `gen2` robots may or may not do this properly\n\n## ESP schedule \n![](./pics/esphome/webserver/esp-schedule.png)\n- Schedule starting the robot running on the ESP device, compares to the NBS time\n\n## Robot settings\n![](./pics/esphome/webserver/robot-settings.png)\n- These are the settings exposed by the robot, the settings is a little different based on your robot generation, but it's a hit or miss based on what setting does anything or if it applies correctly\n- `gen3` robots have the \"Navigation Mode\" option, while it needs to be verified more an idea based on some observations the different modes could mean. The mode needs to be reselected after each restart of the robot\n    - `gentle` - the bot shouldn't push any object that is higher than itself (visible via the lidar).\n    - `deep` - the robot will drive into the corners as deep as it can, drive a bit backwards and then clean the corners in a curve. \n- `Intense clean` - reduced the distance between the lanes\n- `Wall Enable/Follower` - follows all walls one round and starts cleaning 'senseful' areas. No wall follower will follow the wall for a distance and then start cleaning the area before following the wall for the next area.\n\n## Manual driving\n![](./pics/esphome/webserver/manual-driving.png)\n- Only for `gen3` robots, make sure to start manual cleaning before using the buttons.\n\n## Detailed data\n![](./pics/esphome/webserver/detailed-data.png)\n- Detailed data about the robot, text fields generated by the timezone selector and schedule as well as the option to change the log level\n\n## Timezone select and ota/info\n![](./pics/esphome/webserver/timezone-ota.png)\n- If your NBS time is incorrect, select your timezone here, it will update the timezone textfield in the detailed data part\n- Upload OTAs, check ESP firmware type (gen2 or gen3) and toggle the debug logs\n\n## Debug logs\n![](./pics/esphome/webserver/debug-logs.png)\n- When enabled, you will see this at the bottom of the page, change the log level to get more or less detailed logs. As explained in the [faq](faq.md), seeing `GetState`, `GetErr` and `GetCharger` is normal and happens when the ESP reads the status of the robot.\n"
  },
  {
    "path": "research/all_errors_alerts_states.3.2.0.md",
    "content": "## All the states that exist in firmware version 3.2.0\n\nI don't expect much core functionallity has changed, so the list should be about the same for `4.5.3`, however the number have changed! Also `4.5.3` not only has an \"Current UI State is\" but also an \"Current Robot State is\", and I have included what those states probably are.\n\n\n#### Errors/Alerts\nThis list I took from the `4.5.3` firmware with the command `SetUIError list`\n```\n200: UI_ALERT_INVALID\n201: UI_ALERT_RETURN_TO_BASE\n202: UI_ALERT_RETURN_TO_BASE_PWR\n203: UI_ALERT_RETURN_TO_START\n204: UI_ALERT_RETURN_TO_CHARGE\n205: UI_ALERT_DUST_BIN_FULL\n206: UI_ALERT_BUSY_CHARGING\n207: UI_ALERT_OLD_ERROR\n208: UI_ALERT_RECOVERING_LOCATION\n209: UI_ALERT_INFO_THANK_YOU\n210: UI_ALERT_LOG_READ_FAIL\n211: UI_ALERT_LOG_WRITE_FAIL\n212: UI_ALERT_USB_DISCONNECTED\n213: UI_ALERT_SWUPDATE_SUCCESS // diff from gen2\n214: UI_ALERT_SWUPDATE_FAIL\n215: UI_ALERT_LOG_WRITE_SUCCESS\n216: UI_ALERT_TIME_NOT_SET\n217: UI_ALERT_TIME_SET\n218: UI_ALERT_TIMER_SET\n219: UI_ALERT_TIMER_REMOVED\n220: UI_ALERT_ENABLE_TIMER\n221: UI_ALERT_CHARGING_POWER\n222: UI_ALERT_CHARGING_BASE\n223: UI_ALERT_BATTERY_ChargeBaseCommErr\n224: UI_ALERT_CONNECT_CHRG_CABLE\n225: UI_ALERT_WAIT_FOR_POWER_SWITCH_DETECT\n226: UI_ALERT_LINKEDAPP\n227: UI_ALERT_ORIGIN_UNCLEAN\n228: UI_ALERT_LOGUPLOAD_FAIL\n229: UI_ALERT_BRUSH_CHANGE\n230: UI_ALERT_FILTER_CHANGE\n231: UI_ALERT_PERSISTENT_RELOCALIZATION_FAIL\n232: UI_ALERT_TRAINING_MULTIPLE_FLOORPLANS_VALID\n233: UI_ALERT_MULTIPLE_FLOORPLANS_VALID\n234: UI_ALERT_PM_LOAD_FAIL\n235: UI_ALERT_PM_SETUP_FAIL\n236: UI_ALERT_ACQUIRING_PERSISTENT_MAP_IDS\n237: UI_ALERT_CREATING_AND_UPLOADING_MAP\n238: UI_ALERT_PM_START_CLEAN_FAIL\n239: UI_ALERT_NAV_FLOORPLAN_NOT_CREATED\n240: UI_ALERT_NAV_FLOORPLAN_ZONE_UNREACHABLE\n241: UI_ALERT_NAV_FLOORPLAN_ZONE_WRONG_FLOOR\n242: UI_ALERT_TRAINING_MAP_SPARSE\n243: UI_ERROR_CHECK_BATTERY_SWITCH\n244: UI_ERROR_DISCONNECT_CHRG_CABLE\n245: UI_ERROR_DISCONNECT_USB_CABLE\n246: UI_ERROR_SCHED_OFF\n247: UI_ERROR_TIME_NOT_SET\n248: UI_ERROR_DUST_BIN_EMPTIED\n249: UI_ERROR_DUST_BIN_MISSING\n250: UI_ERROR_DUST_BIN_FULL\n251: UI_ERROR_BATTERY_OVERTEMP\n252: UI_ERROR_UNABLE_TO_RETURN_TO_BASE\n253: UI_ERROR_QA_FAIL // diff\n254: UI_ERROR_BUMPER_STUCK\n255: UI_ERROR_PICKED_UP\n256: UI_ERROR_RECONNECT_FAILED\n257: UI_ERROR_LWHEEL_STUCK\n258: UI_ERROR_RWHEEL_STUCK\n259: UI_ERROR_LDS_JAMMED\n260: UI_ERROR_LDS_DISCONNECTED\n261: UI_ERROR_LDS_MISSED_PACKETS\n262: UI_ERROR_LDS_BAD_PACKETS\n263: UI_ERROR_LDS_LASER_OVER_POWER // diff\n264: UI_ERROR_LDS_LASER_UNDER_POWER // diff\n265: UI_ERROR_BRUSH_STUCK\n266: UI_ERROR_BRUSH_OVERLOAD\n267: UI_ERROR_VACUUM_STUCK\n268: UI_ERROR_VACUUM_SLIP\n269: UI_ERROR_BATTERY_CRITICAL\n270: UI_ERROR_BATTERY_OverVolt\n271: UI_ERROR_BATTERY_UnderVolt\n272: UI_ERROR_BATTERY_UnderCurrent\n273: UI_ERROR_BATTERY_Mismatch\n274: UI_ERROR_BATTERY_LithiumAdapterFailure\n275: UI_ERROR_BATTERY_UnderTemp\n276: UI_ERROR_BATTERY_Unplugged\n277: UI_ERROR_BATTERY_NoThermistor\n278: UI_ERROR_BATTERY_BattUnderVoltLithiumSafety\n279: UI_ERROR_BATTERY_InvalidSensor\n280: UI_ERROR_BATTERY_PermanentError // diff\n281: UI_ERROR_BATTERY_Fault // diff\n282: UI_ERROR_NAVIGATION_UndockingFailed\n283: UI_ERROR_NAVIGATION_Falling\n284: UI_ERROR_NAVIGATION_PinkyCommsFail\n285: UI_ERROR_NAVIGATION_NoMotionCommands\n286: UI_ERROR_NAVIGATION_BackDrop_LeftBump\n287: UI_ERROR_NAVIGATION_BackDrop_FrontBump\n288: UI_ERROR_NAVIGATION_BackDrop_WheelExtended\n289: UI_ERROR_NAVIGATION_RightDrop_LeftBump\n290: UI_ERROR_NAVIGATION_NoExitsToGo\n291: UI_ERROR_NAVIGATION_PathProblems_ReturningHome\n292: UI_ERROR_NAVIGATION_NoProgress\n293: UI_ERROR_NAVIGATION_BadMagSensor\n294: UI_ERROR_NAVIGATION_Origin_Unclean\n295: UI_ERROR_NAVIGATION_PathBlocked_GoingToZone // diff\n296: UI_ERROR_SHUTDOWN\n297: UI_ERROR_DFLT_APP\n298: UI_ERROR_CORRUPT_SCB\n299: UI_ERROR_SCB_FLASH_READ\n300: UI_ERROR_SCB_SIGNATURE\n301: UI_ERROR_SCB_LENGTH_MISMATCH\n302: UI_ERROR_SCB_CHECKSUM\n303: UI_ERROR_SCB_VALIDATION\n304: UI_ERROR_SCB_INTERFACE\n305: UI_ERROR_HARDWARE_FAILURE\n306: UI_ERROR_DECK_DEBRIS\n307: UI_ERROR_RDROP_STUCK\n308: UI_ERROR_LDROP_STUCK\n309: UI_ERROR_UNABLE_TO_SEE\n310: UI_ERROR_TILTED_ON_CLEANING_STARTUP\n311: UI_ERROR_SWUPDATE_FILEMISSING\n312: UI_ERROR_FLIGHT_SENSOR_DISCONNECTED // diff\n313: UI_ERROR_WIFIPSWDORROUTERISSUE\n314: UI_ERROR_CONNECTINGTOSERVER\n315: UI_ERROR_TIMEDOUTCONNECTROUTER\n316: LAST_UI_ALERT\n```\n\nFor gen2 robot, confirmed with a couple of codes, but should confirm with more:\n```\n200: UI_ALERT_INVALID\n201: UI_ALERT_RETURN_TO_BASE\n202: UI_ALERT_RETURN_TO_BASE_PWR\n203: UI_ALERT_RETURN_TO_START\n204: UI_ALERT_RETURN_TO_CHARGE\n205: UI_ALERT_DUST_BIN_FULL\n206: UI_ALERT_BUSY_CHARGING\n207: UI_ALERT_OLD_ERROR\n208: UI_ALERT_RECOVERING_LOCATION\n209: UI_ALERT_INFO_THANK_YOU\n210: UI_ALERT_LOG_READ_FAIL\n211: UI_ALERT_LOG_WRITE_FAIL\n212: UI_ALERT_USB_DISCONNECTED\n213: UI_ALERT_SWUPDATE_FAIL\n214: UI_ALERT_LOG_WRITE_SUCCESS\n215: UI_ALERT_TIME_NOT_SET\n216: UI_ALERT_TIME_SET\n217: UI_ALERT_TIMER_SET\n218: UI_ALERT_TIMER_REMOVED\n219: UI_ALERT_ENABLE_TIMER\n220: UI_ALERT_CHARGING_POWER\n221: UI_ALERT_CHARGING_BASE\n222: UI_ALERT_BATTERY_ChargeBaseCommErr\n223: UI_ALERT_CONNECT_CHRG_CABLE\n224: UI_ALERT_WAIT_FOR_POWER_SWITCH_DETECT\n225: UI_ALERT_WAIT_TILL_FULL_CHARGE // does not exist in gen3\n226: UI_ALERT_LINKEDAPP // last alert for gen2, gen3 has quite a bit more\n227: UI_ERROR_CHECK_BATTERY_SWITCH\n228: UI_ERROR_DISCONNECT_CHRG_CABLE\n229: UI_ERROR_DISCONNECT_USB_CABLE\n230: UI_ERROR_SCHED_OFF\n231: UI_ERROR_TIME_NOT_SET\n232: UI_ERROR_DUST_BIN_EMPTIED\n233: UI_ERROR_DUST_BIN_MISSING\n234: UI_ERROR_DUST_BIN_FULL\n235: UI_ERROR_BATTERY_OVERTEMP\n236: UI_ERROR_UNABLE_TO_RETURN_TO_BASE\n237: UI_ERROR_QA\n238: UI_ERROR_BUMPER_STUCK\n239: UI_ERROR_PICKED_UP\n240: UI_ERROR_RECONNECT_FAILED\n241: UI_ERROR_LWHEEL_STUCK\n242: UI_ERROR_RWHEEL_STUCK\n243: UI_ERROR_LDS_JAMMED\n244: UI_ERROR_LDS_DISCONNECTED\n245: UI_ERROR_LDS_MISSED_PACKETS\n246: UI_ERROR_LDS_BAD_PACKETS\n247: UI_ERROR_BRUSH_STUCK\n248: UI_ERROR_BRUSH_OVERLOAD\n249: UI_ERROR_VACUUM_STUCK\n250: UI_ERROR_VACUUM_SLIP\n251: UI_ERROR_BATTERY_CRITICAL\n252: UI_ERROR_BATTERY_OverVolt\n253: UI_ERROR_BATTERY_UnderVolt\n254: UI_ERROR_BATTERY_UnderCurrent\n255: UI_ERROR_BATTERY_Mismatch\n256: UI_ERROR_BATTERY_LithiumAdapterFailure\n257: UI_ERROR_BATTERY_UnderTemp\n258: UI_ERROR_BATTERY_Unplugged\n259: UI_ERROR_BATTERY_NoThermistor\n260: UI_ERROR_BATTERY_BattUnderVoltLithiumSafety\n261: UI_ERROR_BATTERY_InvalidSensor\n262: UI_ERROR_NAVIGATION_UndockingFailed\n263: UI_ERROR_NAVIGATION_Falling\n264: UI_ERROR_NAVIGATION_PinkyCommsFail\n265: UI_ERROR_NAVIGATION_NoMotionCommands\n266: UI_ERROR_NAVIGATION_BackDrop_LeftBump\n267: UI_ERROR_NAVIGATION_BackDrop_FrontBump\n268: UI_ERROR_NAVIGATION_BackDrop_WheelExtended\n269: UI_ERROR_NAVIGATION_RightDrop_LeftBump\n270: UI_ERROR_NAVIGATION_NoExitsToGo\n271: UI_ERROR_NAVIGATION_PathProblems_ReturningHome\n272: UI_ERROR_NAVIGATION_NoProgress\n273: UI_ERROR_NAVIGATION_BadMagSensor\n274: UI_ERROR_NAVIGATION_Origin_Unclean\n275: UI_ERROR_WARNING\n276: UI_ERROR_SHUTDOWN\n277: UI_ERROR_WDT\n278: UI_ERROR_DFLT_APP\n279: UI_ERROR_CORRUPT_SCB\n280: UI_ERROR_SCB_FLASH_READ\n281: UI_ERROR_SCB_SIGNATURE\n282: UI_ERROR_SCB_LENGTH_MISMATCH\n283: UI_ERROR_SCB_CHECKSUM\n284: UI_ERROR_SCB_VALIDATION\n285: UI_ERROR_SCB_INTERFACE\n286: UI_ERROR_HARDWARE_FAILURE\n287: UI_ERROR_DECK_DEBRIS\n288: UI_ERROR_RDROP_STUCK\n289: UI_ERROR_LDROP_STUCK\n290: UI_ERROR_UNABLE_TO_SEE\n291: UI_ERROR_TILTED_ON_CLEANING_STARTUP\n292: UI_ERROR_SWUPDATE_FILEMISSING\n293: UI_ERROR_WIFIPSWDORROUTERISSUE\n294: UI_ERROR_CONNECTINGTOSERVER\n295: UI_ERROR_TIMEDOUTCONNECTROUTER\n296: LAST_UI_ALERT\n```\n\n#### UI States:\n```\nUIMGR_STATE_POWERUP\nUIMGR_STATE_IDLE\nUIMGR_STATE_USERMENU\nUIMGR_STATE_STANDBY\nUIMGR_STATE_STARTSPOTCLEANING\nUIMGR_STATE_SPOTCLEANINGRUNNING\nUIMGR_STATE_STARTHOUSECLEANING\nUIMGR_STATE_HOUSECLEANINGRUNNING\nUIMGR_STATE_HOUSECLEANINGPAUSED\nUIMGR_STATE_SPOTCLEANINGPAUSED\nUIMGR_STATE_DOCKINGRUNNING\nUIMGR_STATE_DOCKINGPAUSED\nUIMGR_STATE_CLEANINGTESTRUNNING\nUIMGR_STATE_CLEANINGSUSPENDED\nUIMGR_STATE_CLEANINGSUSPENDEDMENU\nUIMGR_STATE_TESTMENU\nUIMGR_STATE_MANUALDRIVING\nUIMGR_STATE_TESTMODE\nUIMGR_STATE_INITIALSETUPMENU\nUIMGR_STATE_SMARTDEVICECONTROL\nUIMGR_STATE_USB_LOGCOPY\nUIMGR_STATE_SWUPGRADE\nUIMGR_STATE_OTA_LOGUPLOAD\nUIMGR_STATE_INVALID\n```\n\n#### Robot States:\n```\nST_F3_InteriorCleaning\nST_F1_Undocking\nST_F2_PartialMapManagement\nST_F21_Exploring\nST_F4_BoundaryFollowing\nST_F5_PickedUp\nST_F6_CleaningErrRecovery\nST_F7_CleaningError\nST_G3_InteriorCleaning\nST_G1_Undocking\nST_G2_PartialMapManagement\nST_G21_Exploring\nST_G4_BoundaryFollowing\nST_G5_PickedUp\nST_G6_CleaningErrRecovery\nST_G7_CleaningError\nST_M1_Charging_Cleaning\nST_M2_Charging_StdBy\nST_T3_ProxFollowTest\nST_T6_BoundFollowOnly\nST_T7_TestDocking\nST_T8_TestService\nST_T1_TestObstacleMonitor\nST_T4_TestMotionExecutor\nST_A_Init\nST_C_Standby\nST_F_Cleaning\nST_G_SpotCleaning\nST_K_Critical\nST_L_Safety\nST_M_Charging\nST_P_PopState\nST_T_Test\nST_X_ManNav\n´´´"
  },
  {
    "path": "research/command-experiments.md",
    "content": "# Experimentation with commands\n\nIf all of these experiments prove successful, the robot would be able to be driven via the serial interface fully, meaning a custom program to drive it via serial and use the lidar data to know where to drive would be possible. \n\nConditions needed to make a ROS2, slam_toolbox cleaning possible, and they cannot interfere with each other:\n- Rotate LDS\n- Get LDS Scan periodically\n- Drive\n- Stop at any time, one or two wheels\n- Change direction etc\n- GetDigitalSensors/GetAnalogSensors?\n- Get info about other sensors/state\n\n\nI will need to do more experimatation on this part; but this is a command to drive forward: `SetMotor RWheelDist 3000 LWheelDist 3000 Speed 60`\n\nStop the wheels: `SetMotor LWheelDisable RWheelDisable`\n\nYou can at any time can the speed by sending a new command, stopping the motors can be done as stated with the disable commands, but then you need to enable them again. A faster way would be to just set the distance to 1mm. You cannot the the values to 0, those are ignored.\n\nIf you send a commad with a space in the begninning the robot will say:\n```\nNice try, but I'm not falling for that one again!  :P\n```\n\nI have now tested that you can send commands while reciving data and that the robot will execute them, it does do so. However I have a small problem, via esphome the `GetLdsScan` crashes my esp when the delimiter is set to the endbyte sent by the robot `\\x1A`, it works when setting a line by line reading, so if the fully custom solution does come, then it would not be via esphome. Since the LDS scan takes a while to arrive, at least via the esphome console but that does however go via my ha and network, it was quite a lot faster via direct serial connection, but we would still need to queue the commands, something like like:\n1. GetErr (Could maybe happen every 10th loop)\n2. GetDigitalSensors    (bumper, dustbin & pickup)\n3. GetAnalogSensors     (drop-, mag- and wall-sensor)\n4. GetLdsScan           (lidar)\n- Repeat\n\n`GetMotor` can be used to get current speed and distance traveled from an 0,0 point, however, since we will be setting the speed with the `SetMotor` commands, we already know what the speed is, and the direction we can calculate based what wheel (and its rpm) is spinning.\n\nGetState will no longer be needed as we will be in TestMode so this will always be `UIMGR_STATE_TESTMODE`.\n\nThere is also quite a lot of [hidden commands](./hidden-commands.md).\n\n### Raw commands\n#### Keeping here for remembering\n\n[02:16:45.118][D][uart_debug:158]: <<< \"GetDigitalSensors\\r\\n\"\n[02:16:45.119][D][uart_debug:158]: <<< \"Digital Sensor Name, Value\\r\\n\"\n[02:16:45.119][D][uart_debug:158]: <<< \"SNSR_DC_JACK_IS_IN,0\\r\\n\"\n[02:16:45.119][D][uart_debug:158]: <<< \"SNSR_DUSTBIN_IS_IN,1\\r\\n\"\n[02:16:45.129][D][uart_debug:158]: <<< \"SNSR_LEFT_WHEEL_EXTENDED,0\\r\\n\"\n[02:16:45.145][D][uart_debug:158]: <<< \"SNSR_RIGHT_WHEEL_EXTENDED,0\\r\\n\"\n[02:16:45.157][D][uart_debug:158]: <<< \"LSIDEBIT,0\\r\\n\"\n[02:16:45.171][D][uart_debug:158]: <<< \"LFRONTBIT,0\\r\\n\"\n[02:16:45.185][D][uart_debug:158]: <<< \"LLDSBIT,0\\r\\n\"\n[02:16:45.200][D][uart_debug:158]: <<< \"RSIDEBIT,0\\r\\n\"\n[02:16:45.212][D][uart_debug:158]: <<< \"RFRONTBIT,0\\r\\n\"\n[02:16:45.223][D][uart_debug:158]: <<< \"RLDSBIT,0\\r\\n\"\n\n\n[02:17:58.028][D][uart_debug:158]: <<< \"GetAnalogSensors\\r\\n\"\n[02:17:58.028][D][uart_debug:158]: <<< \"SensorName,Unit,Value\\r\\n\"\n[02:17:58.028][D][uart_debug:158]: <<< \"BatteryVoltage,mV,14585,\\r\\n\"\n[02:17:58.028][D][uart_debug:158]: <<< \"BatteryCurrent,mA,-238,\\r\\n\"\n[02:17:58.041][D][uart_debug:158]: <<< \"BatteryTemperature,mC,22800,\\r\\n\"\n[02:17:58.054][D][uart_debug:158]: <<< \"ExternalVoltage,mV,0,\\r\\n\"\n[02:17:58.069][D][uart_debug:158]: <<< \"AccelerometerX,mG,16,\\r\\n\"\n[02:17:58.081][D][uart_debug:158]: <<< \"AccelerometerY,mG,2,\\r\\n\"\n[02:17:58.096][D][uart_debug:158]: <<< \"AccelerometerZ,mG,963,\\r\\n\"\n[02:17:58.113][D][uart_debug:158]: <<< \"VacuumCurrent,mA,0,\\r\\n\"\n[02:17:58.128][D][uart_debug:158]: <<< \"SideBrushCurrent,mA,0,\\r\\n\"\n[02:17:58.141][D][uart_debug:158]: <<< \"MagSensorLeft,VAL,0,\\r\\n\"\n[02:17:58.156][D][uart_debug:158]: <<< \"MagSensorRight,VAL,0,\\r\\n\"\n[02:17:58.171][D][uart_debug:158]: <<< \"WallSensor,mm,255,\\r\\n\"\n[02:17:58.184][D][uart_debug:158]: <<< \"DropSensorLeft,mm,19,\\r\\n\"\n[02:17:58.200][D][uart_debug:158]: <<< \"DropSensorRight,mm,19,\\r\\n\"\n\n\n[02:44:43.617][D][uart_debug:158]: <<< \"GetMotor\\r\\n\"\n[02:44:43.632][D][uart_debug:158]: <<< \"Parameter,Value\\r\\n\"\n[02:44:43.645][D][uart_debug:158]: <<< \"Brush_RPM,0\\r\\n\"\n[02:44:43.659][D][uart_debug:158]: <<< \"Brush_mA,0\\r\\n\"\n[02:44:43.673][D][uart_debug:158]: <<< \"Vacuum_RPM,0\\r\\n\"\n[02:44:43.686][D][uart_debug:158]: <<< \"Vacuum_mA,0\\r\\n\"\n[02:44:43.701][D][uart_debug:158]: <<< \"LeftWheel_RPM,0\\r\\n\"\n[02:44:43.715][D][uart_debug:158]: <<< \"LeftWheel_Load%,0\\r\\n\"\n[02:44:43.730][D][uart_debug:158]: <<< \"LeftWheel_PositionInMM,-365\\r\\n\"\n[02:44:43.742][D][uart_debug:158]: <<< \"LeftWheel_Speed,0\\r\\n\"\n[02:44:43.757][D][uart_debug:158]: <<< \"RightWheel_RPM,0\\r\\n\"\n[02:44:43.768][D][uart_debug:158]: <<< \"RightWheel_Load%,0\\r\\n\"\n[02:44:43.784][D][uart_debug:158]: <<< \"RightWheel_PositionInMM,-365\\r\\n\"\n[02:44:43.802][D][uart_debug:158]: <<< \"RightWheel_Speed,0\\r\\n\"\n[02:44:43.812][D][uart_debug:158]: <<< \"ROTATION_SPEED,0.00\\r\\n\"\n[02:44:43.830][D][uart_debug:158]: <<< \"SideBrush_mA,0\\r\\n\"\n\n"
  },
  {
    "path": "research/command_mapping.md",
    "content": "### Command mapping for gen3 robots\n\n```csv\nError, Message, Detail message\n223: UI_ALERT_BATTERY_ChargeBaseCommErr, Batter fault, tbd\n239: UI_ALERT_NAV_FLOORPLAN_NOT_CREATED\n240: UI_ALERT_NAV_FLOORPLAN_ZONE_UNREACHABLE\n241: UI_ALERT_NAV_FLOORPLAN_ZONE_WRONG_FLOOR\n249: UI_ERROR_DUST_BIN_MISSING, Put dirt bin back in\n250: UI_ERROR_DUST_BIN_FULL, Please empty my dirt bin and filter, Empty dirt bin & filter and clean drop & wall sensors\n251: UI_ERROR_BATTERY_OVERTEMP, Batter fault, tbd\n255: UI_ERROR_PICKED_UP, Please put me down, tbd\n256: UI_ERROR_RECONNECT_FAILED, Move base to new location, tbd\n257: UI_ERROR_LWHEEL_STUCK, Clean my left wheel, tbd\n258: UI_ERROR_RWHEEL_STUCK, Clean my right wheel, tbd\n259: UI_ERROR_LDS_JAMMED, Press button on robot to continue (1000), tbd\n260: UI_ERROR_LDS_DISCONNECTED, Press button on robot to continue (5000), tbd\n261: UI_ERROR_LDS_MISSED_PACKETS, Reboot me, tbd\n262: UI_ERROR_LDS_BAD_PACKETS, Press button on robot to continue (4000), tbd\n263: UI_ERROR_LDS_LASER_OVER_POWER, Vision error (4101), Please press the start button on the robot to continue. \n264: UI_ERROR_LDS_LASER_UNDER_POWER, Vision error (4102), Please press the start button on the robot to continue. \n265: UI_ERROR_BRUSH_STUCK, Clean my brush\n266: UI_ERROR_BRUSH_OVERLOAD, Clean my brush\n267: UI_ERROR_VACUUM_STUCK, Press button on robot to continue\n269: UI_ERROR_BATTERY_CRITICAL,Battery fault,tbd\n270: UI_ERROR_BATTERY_OverVolt,Battery fault,tbd\n271: UI_ERROR_BATTERY_UnderVolt,Battery fault,tbd\n272: UI_ERROR_BATTERY_UnderCurrent,Battery fault,tbd\n273: UI_ERROR_BATTERY_Mismatch,Battery fault,tbd\n274: UI_ERROR_BATTERY_LithiumAdapterFailure,Battery fault,tbd\n275: UI_ERROR_BATTERY_UnderTemp,Battery fault,tbd\n276: UI_ERROR_BATTERY_Unplugged,Battery fault,tbd\n277: UI_ERROR_BATTERY_NoThermistor,Battery fault,tbd\n278: UI_ERROR_BATTERY_BattUnderVoltLithiumSafety,Battery fault,tbd\n279: UI_ERROR_BATTERY_InvalidSensor,Battery fault,tbd\n280: UI_ERROR_BATTERY_PermanentError,Battery fault,tbd\n281: UI_ERROR_BATTERY_Fault,Battery fault,tbd\n282: UI_ERROR_NAVIGATION_UndockingFailed, Clear my path (2000), tbd\n283: UI_ERROR_NAVIGATION_Falling, Clear my path (2001), tbd\n285: UI_ERROR_NAVIGATION_NoMotionCommands, Clear my path (2003), I'm stuck. Please free me - pick me up and move me no more than 2 feet so I can recover my location.\n286: UI_ERROR_NAVIGATION_BackDrop_LeftBump, Clear my path (2004), tbd\n287: UI_ERROR_NAVIGATION_BackDrop_FrontBump, Clear my path (2005), tbd\n288: UI_ERROR_NAVIGATION_BackDrop_WheelExtended, Clear my path (2006), tbd\n289: UI_ERROR_NAVIGATION_RightDrop_LeftBump, Clear my path (2007), tbd\n290: UI_ERROR_NAVIGATION_NoExitsToGo, Clear my path (2008), tbd\n291: UI_ERROR_NAVIGATION_PathProblems_ReturningHome, tbd\n292: UI_ERROR_NAVIGATION_NoProgress, Clear my path (2010), tbd\n293: UI_ERROR_NAVIGATION_BadMagSensor, Clear my path (2012), tbd\n295: UI_ERROR_NAVIGATION_PathBlocked_GoingToZone, The path to a zone is blocked (2013), tbd\n296: UI_ERROR_SHUTDOWN, Remove me from base to shut down, tbd\n306: UI_ERROR_DECK_DEBRIS, Dust me off, tbd\n307: UI_ERROR_RDROP_STUCK, Clear right drop sensor\n308: UI_ERROR_LDROP_STUCK, Clear left drop sensor\n```"
  },
  {
    "path": "research/findings.md",
    "content": "My findings about the Neato D3 Connected, however should be same/very similar for any Neato connected robot.\n\nI found an old Neato D3 that was broken, the left wheel didn't spin so I opened it up and realized the black cable for the left motor was not connected, it had ripped out of the JST connector. I ordered some new JST connectors since I didn't have any and because I didn't have the correct crimp I soldered an already crimped cable that I got with the set to the cable and connected it to a new JST connector. One connected back to the board it worked perfectly, ran a couple of cleanings in my apartment and it works very well, the left wheels gears is starting to wear off so I am thinking of 3d printing some new ones.\n\nWhen I got the robot I had firmware `4.5.3_189`, the factory firmware on my robot is `3.2.0_305` and I am easily able to switch between them now. Since you always can upgrade to `4.5.3_189` I will be basing this project of that version, and that is that all commands etc will be using unless otherwise noted. Here is the different firmware images availible: https://github.com/RobertSundling/neato-botvac\n\nI was able to update from the factory firmware using the original neato images with the certificates expired, both to update to the latest `4.5.3` but also to update to `4.2.0`. I don't know why exactly this worked for me, I never connected it to the internet. In case you have problems, feel free to ask for help here, and I can make a custom ntp server if needed.\n\nLets clearify a quick thing, I think this is obvious to many, but since I myself got confused lets write it down. The front of the robot is where the bumper is, back is where the charger and excuaset is. If we look at the robot from a top down view seeing in the way that the robot is going to drive forward, the right side is where the button and blinky lights are. Left is the other side.\n\nOnce the bot was working, my journey began. I have split up the different parts into different documents, find them below:\n- [Setup network](./setup-network.md)\n- [Serial interface](./serial.md)\n- [Command experimentations](./command-experiments.md)\n\nUser @algaen has checked out the [serial](./other-robots/serial-D8.md) and [nmap](./other-robots/nmap-D8.md) for their D8 robot, it is probably the same for the D9 and D10 robots, they use a compleatly different board and firmware, sadly not anything that is supported by this project because the serial console is behind a password lock."
  },
  {
    "path": "research/gen4/nmap-D8.md",
    "content": "C:\\Users\\algra>nmap -p0- -v -A -T4 XX.XX.50.100  \nStarting Nmap 7.80 ( https://nmap.org ) at 2025-11-30 10:58 Mountain Standard Time  \nNSE: Loaded 151 scripts for scanning.  \nNSE: Script Pre-scanning.  \nInitiating NSE at 10:58  \nCompleted NSE at 10:58, 0.00s elapsed  \nInitiating NSE at 10:58  \nCompleted NSE at 10:58, 0.00s elapsed  \nInitiating NSE at 10:58  \nCompleted NSE at 10:58, 0.00s elapsed  \nInitiating Ping Scan at 10:58  \nScanning XX.XX.50.100 [4 ports]  \nCompleted Ping Scan at 10:58, 0.47s elapsed (1 total hosts)  \nInitiating Parallel DNS resolution of 1 host. at 10:58  \nCompleted Parallel DNS resolution of 1 host. at 10:58, 0.00s elapsed  \nInitiating SYN Stealth Scan at 10:58  \nScanning Neato-Robot.abcd.ca (XX.XX.50.100) [65536 ports]  \nDiscovered open port 53/tcp on XX.XX.50.100  \nSYN Stealth Scan Timing: About 3.83% done; ETC: 11:11 (0:12:59 remaining)  \nSYN Stealth Scan Timing: About 9.78% done; ETC: 11:08 (0:09:23 remaining)  \nSYN Stealth Scan Timing: About 10.51% done; ETC: 11:12 (0:12:55 remaining)  \nSYN Stealth Scan Timing: About 16.70% done; ETC: 11:10 (0:10:04 remaining)  \nIncreasing send delay for XX.XX.50.100 from 0 to 5 due to max_successful_tryno increase to 5  \nSYN Stealth Scan Timing: About 18.52% done; ETC: 11:12 (0:11:04 remaining)  \nSYN Stealth Scan Timing: About 18.73% done; ETC: 11:14 (0:13:05 remaining)  \nSYN Stealth Scan Timing: About 19.52% done; ETC: 11:16 (0:14:30 remaining)  \nSYN Stealth Scan Timing: About 21.06% done; ETC: 11:18 (0:15:26 remaining)  \nSYN Stealth Scan Timing: About 24.29% done; ETC: 11:20 (0:16:25 remaining)  \nIncreasing send delay for XX.XX.50.100 from 5 to 10 due to max_successful_tryno increase to 6  \nWarning: XX.XX.50.100 giving up on port because retransmission cap hit (6).  \nSYN Stealth Scan Timing: About 43.75% done; ETC: 11:25 (0:15:19 remaining)  \nSYN Stealth Scan Timing: About 52.10% done; ETC: 11:27 (0:13:57 remaining)  \nSYN Stealth Scan Timing: About 58.04% done; ETC: 11:28 (0:12:29 remaining)  \nSYN Stealth Scan Timing: About 64.08% done; ETC: 11:29 (0:10:58 remaining)  \nSYN Stealth Scan Timing: About 69.85% done; ETC: 11:29 (0:09:26 remaining)  \nSYN Stealth Scan Timing: About 75.86% done; ETC: 11:31 (0:07:51 remaining)  \nSYN Stealth Scan Timing: About 81.62% done; ETC: 11:32 (0:06:11 remaining)  \nSYN Stealth Scan Timing: About 87.08% done; ETC: 11:33 (0:04:28 remaining)  \nSYN Stealth Scan Timing: About 92.36% done; ETC: 11:33 (0:02:42 remaining)  \nSYN Stealth Scan Timing: About 97.54% done; ETC: 11:34 (0:00:53 remaining)  \nCompleted SYN Stealth Scan at 11:34, 2174.49s elapsed (65536 total ports)  \nInitiating Service scan at 11:34  \nScanning 1 service on Neato-Robot.abcd.ca (XX.XX.50.100)  \nCompleted Service scan at 11:34, 0.22s elapsed (1 service on 1 host)  \nInitiating OS detection (try #1) against Neato-Robot.abcd.ca (XX.XX.50.100)  \nRetrying OS detection (try #2) against Neato-Robot.abcd.ca (XX.XX.50.100)  \nRetrying OS detection (try #3) against Neato-Robot.abcd.ca (XX.XX.50.100)  \nRetrying OS detection (try #4) against Neato-Robot.abcd.ca (XX.XX.50.100)  \nRetrying OS detection (try #5) against Neato-Robot.abcd.ca (XX.XX.50.100)  \nInitiating Traceroute at 11:34  \nCompleted Traceroute at 11:34, 0.03s elapsed  \nInitiating Parallel DNS resolution of 2 hosts. at 11:34  \nCompleted Parallel DNS resolution of 2 hosts. at 11:34, 0.00s elapsed  \nNSE: Script scanning XX.XX.50.100.  \nInitiating NSE at 11:34  \nCompleted NSE at 11:35, 7.13s elapsed  \nInitiating NSE at 11:35  \nCompleted NSE at 11:35, 0.00s elapsed  \nInitiating NSE at 11:35  \nCompleted NSE at 11:35, 0.00s elapsed  \nNmap scan report for Neato-Robot.abcd.ca (XX.XX.50.100)  \nHost is up (0.039s latency).  \nNot shown: 53770 closed ports, 11765 filtered ports  \nPORT   STATE SERVICE    VERSION  \n53/tcp open  tcpwrapped  \n| dns-nsid:  \n|   id.server: marge.abcd.ca  \n|_  bind.version: unbound 1.24.0  \nNo exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).  \nTCP/IP fingerprint:  \nOS:SCAN(V=7.80%E=4%D=11/30%OT=53%CT=21%CU=40519%PV=Y%DS=2%DC=T%G=Y%TM=692C8  \nOS:E59%P=i686-pc-windows-windows)SEQ(SP=FE%GCD=1%ISR=10E%TI=Z%II=I%TS=21)SE  \nOS:Q(II=I)OPS(O1=M5B4NW7ST11%O2=M5B4NW7ST11%O3=M5B4NW7NNT11%O4=M5B4NW7ST11%  \nOS:O5=M5B4NW7ST11%O6=M5B4ST11)WIN(W1=FECC%W2=FECC%W3=FECC%W4=FECC%W5=FECC%W  \nOS:6=FECC)ECN(R=Y%DF=Y%T=41%W=FECC%O=M5B4NW7SLL%CC=Y%Q=)ECN(R=N)T1(R=Y%DF=Y  \nOS:%T=41%S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=N)T5(R=Y%DF=Y%T=40%W=0%S=  \nOS:Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=N)T7(R=N)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=  \nOS:G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)  \n  \nNetwork Distance: 2 hops  \n  \nTRACEROUTE (using port 80/tcp)  \nHOP RTT      ADDRESS  \n1   0.00 ms  XX.XX.20.1  \n2   26.00 ms Neato-Robot.abcd.ca (XX.XX.50.100)  \n  \nNSE: Script Post-scanning.  \nInitiating NSE at 11:35  \nCompleted NSE at 11:35, 0.00s elapsed  \nInitiating NSE at 11:35  \nCompleted NSE at 11:35, 0.00s elapsed  \nInitiating NSE at 11:35  \nCompleted NSE at 11:35, 0.00s elapsed  \nRead data files from: C:\\Program Files (x86)\\Nmap  \nOS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .  \nNmap done: 1 IP address (1 host up) scanned in 2201.85 seconds  \n           Raw packets sent: 138770 (6.111MB) | Rcvd: 56142 (2.250MB)  \n\nC:\\Users\\algra>"
  },
  {
    "path": "research/gen4/serial-D8.md",
    "content": "The boot sequence differs on the Neato D8 (and presumably D9 / D10).\n\nShutdown sequence:\n\nNeato LEGO Distro Release 1.7.0-2933_10060147_cfae4f98 Neato-Robot ttymxc1\n\nNeato-Robot login:  \n[[1B][0;32m  OK  [1B][0m] Removed slice [1B][0;1;39msystem-getty.slice[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mBluetooth[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mMulti-User System[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mLogin Prompts[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mHost and Network Name Lookups[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mSound Card[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mSystem Time Synchronized[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mSystem Time Set[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mTimers[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mDaily Cleanup of Temporary Directories[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Closed [1B][0;1;39mLoad/Save RF Kill Switch Status /dev/rfkill Watch[1B][0m.  \n         Stopping [1B][0;1;39mSave/Restore Sound Card State[1B][0m...  \n         Stopping [1B][0;1;39mAuto-update Service[1B][0m...  \n         Stopping [1B][0;1;39mD-Bus System Message Bus[1B][0m...  \n         Stopping [1B][0;1;39mCheck and fix Bluetooth function periodically[1B][0m...  \n         Stopping [1B][0;1;39mFlush file cache[1B][0m...  \n         Stopping [1B][0;1;39mPython OTA Upgrade Service[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mPlay 1 second silence file[1B][0m.  \n         Stopping [1B][0;1;39mR         Stopping [1B][0;1;39mSerial Getty on ttymxc1[1B][0m...  \n         Stopping [1B][0;1;39mLogin Service[1B][0m...  \n         Stopping [1B][0;1;39mLoad/Save Random Seed[1B][0m...  \n         Stopping [1B][0;1;39mTEE Supplicant[1B][0m...  \n         Stopping [1B][0;1;39mUSB gadgets[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mAuto-update Service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mD-Bus System Message Bus[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mTEE Supplicant[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mFlush file cache[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mLogin Service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mCheck and fix Bluetooth function periodically[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mUSB gadgets[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mTron Connectivity[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mSerial Getty on ttymxc1[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mSave/Restore Sound Card State[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mLoad/Save Random Seed[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mBluetooth service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Removed slice [1B][0;1;39msystem-serial\\x2dgetty.slice[1B][0m.  \n         Stopping [1B][0;1;39mPython User Event Scheduler Service[1B][0m...  \n         Stopping [1B][0;1;39mPermit User Sessions[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mPython User Event Scheduler Service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mPython OTA Upgrade Service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mPermit User Sessions[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mNetwork[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mRemote File Systems[1B][0m.  \n         Stopping [1B][0;1;39mBattery and Charger Control Service[1B][0m...  \n         Stopping [1B][0;1;39mNetwork Name Resolution[1B][0m...  \n[00][00]NOTICE:  BL31: v2.2(release):rel_imx_5.4.47_2.2.0-0-gc949a888e-dirty  \nNOTICE:  BL31: Built : 08:42:51, Nov  3 2021  \n\nBoot Sequence:\n\nWelcome to [1B][1mNXP i.MX Release Distro 5.4-zeus (zeus)[1B][0m!  \n\n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mDispatch Password â€¦ts to Console Directory Watch[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mPaths[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSlices[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSwap[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mProcess Core Dump Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39minitctl Compatibility Named Pipe[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mJournal Socket (/dev/log)[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mJournal Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mNetwork Service Netlink Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mudev Control Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mudev Kernel Socket[1B][0m.  \n         Mounting [1B][0;1;39mHuge Pages File System[1B][0m...  \n         Mounting [1B][0;1;39mPOSIX Message Queue File System[1B][0m...  \n         Mounting [1B][0;1;39mKernel Debug File System[1B][0m...  \n         Mounting [1B][0;1;39mTemporary Directory (/tmp)[1B][0m...  \n         Mounting [1B][0;1;39m/var/volatile[1B][0m...  \n         Starting [1B][0;1;39mJournal Service[1B][0m...  \n         Mounting [1B][0;1;39mKernel Configuration File System[1B][0m...  \n         Starting [1B][0;1;39mApply Kernel Variables[1B][0m...  \n         Starting [1B][0;1;39mCreate Static Device Nodes in /dev[1B][0m...  \n         Starting [1B][0;1;39mudev Coldplug all Devices[1B][0m...  \n         Starting [1B][0;1;39mUnlock encrypted root filesystem[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Mounted [1B][0;1;39mHuge Pages File System[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Mounted [1B][0;1;39mPOSIX Message Queue File System[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mJournal Service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Mounted [1B][0;1;39mKernel Debug File System[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Mounted [1B][0;1;39mTemporary Directory (/tmp)[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Mounted [1B][0;1;39m/var/volatile[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Mounted [1B][0;1;39mKernel Configuration File System[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mApply Kernel Variables[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mCreate Static Device Nodes in /dev[1B][0m.  \n         Starting [1B][0;1;39mudev Kernel Device Manager[1B][0m...  \n         Starting [1B][0;1;39mLoad/Save Random Seed[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mudev Kernel Device Manager[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mUnlock encrypted root filesystem[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mInitrd Root Device[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Found device [1B][0;1;39m/dev/mapper/encrypted[1B][0m.  \n         Mounting [1B][0;1;39mMount encrypted root filesystem[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mudev Coldplug all Devices[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mLoad/Save Random Seed[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Mounted [1B][0;1;39mMount encrypted root filesystem[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mInitrd Root File System[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mLocal File Systems[1B][0m.  \n         Starting [1B][0;1;39mReload Configuration from the Real Root[1B][0m...  \n         Starting [1B][0;1;39mCreate Volatile Files and Directories[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mCreate Volatile Files and Directories[1B][0m.  \n         Starting [1B][0;1;39mRun pending postinsts[1B][0m...  \n         Starting [1B][0;1;39mNetwork Time Synchronization[1B][0m...  \n         Starting [1B][0;1;39mUpdate UTMP about System Boot/Shutdown[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mUpdate UTMP about System Boot/Shutdown[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mReload Configuration from the Real Root[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mRun pending postinsts[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mInitrd File Systems[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mNetwork Time Synchronization[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSystem Initialization[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mDaily Cleanup of Temporary Directories[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSystem Time Set[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSystem Time Synchronized[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mTimers[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mD-Bus System Message Bus Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSockets[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mBasic System[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mInitrd Default Target[1B][0m.  \n         Starting [1B][0;1;39mCleaning Up and Shutting Down Daemons[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mCleaning Up and Shutting Down Daemons[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mInitrd Default Target[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mInitrd Root Device[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mSystem Time Synchronized[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mSystem Time Set[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mTimers[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mDaily Cleanup of Temporary Directories[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Closed [1B][0;1;39mProcess Core Dump Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mBasic System[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mPaths[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mDispatch Password â€¦ts to Console Directory Watch[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mSlices[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mSockets[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Closed [1B][0;1;39mD-Bus System Message Bus Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mSystem Initialization[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mSwap[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Closed [1B][0;1;39minitctl Compatibility Named Pipe[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Closed [1B][0;1;39mNetwork Service Netlink Socket[1B][0m.  \n         Stopping [1B][0;1;39mLoad/Save Random Seed[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mApply Kernel Variables[1B][0m.  \n         Stopping [1B][0;1;39mNetwork Time Synchronization[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mudev Coldplug all Devices[1B][0m.  \n         Stopping [1B][0;1;39mudev Kernel Device Manager[1B][0m...  \n         Stopping [1B][0;1;39mUpdate UTMP about System Boot/Shutdown[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mNetwork Time Synchronization[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mLoad/Save Random Seed[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mudev Kernel Device Manager[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mUpdate UTMP about System Boot/Shutdown[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Closed [1B][0;1;39mudev Control Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Closed [1B][0;1;39mudev Kernel Socket[1B][0m.  \n         Starting [1B][0;1;39mCleanup udevd DB[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mCreate Static Device Nodes in /dev[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mCreate Volatile Files and Directories[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mLocal File Systems[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mCleanup udevd DB[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSwitch Root[1B][0m.  \n         Starting [1B][0;1;39mSwitch Root[1B][0m...  \n\nWelcome to [1B][1mNXP i.MX Release Distro 5.4-zeus (zeus)[1B][0m!  \n\n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mSwitch Root[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Created slice [1B][0;1;39msystem-getty.slice[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Created slice [1B][0;1;39msystem-serial\\x2dgetty.slice[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Created slice [1B][0;1;39msystem-systemd\\x2dfsck.slice[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Created slice [1B][0;1;39msystem-wpa_supplicant.slice[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Created slice [1B][0;1;39mUser and Session Slice[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mDispatch Password â€¦ts to Console Directory Watch[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mForward Password Râ€¦uests to Wall Directory Watch[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mSwitch Root[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mInitrd File Systems[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Stopped target [1B][0;1;39mInitrd Root File System[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mPaths[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mRemote File Systems[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSlices[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSwap[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mProcess Core Dump Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39minitctl Compatibility Named Pipe[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mNetwork Service Netlink Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mudev Control Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mudev Kernel Socket[1B][0m.  \n         Starting [1B][0;1;39mCreate list of stâ€¦odes for the current kernel[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Stopped [1B][0;1;39mJournal Service[1B][0m.  \n         Starting [1B][0;1;39mJournal Service[1B][0m...  \n         Starting [1B][0;1;39mLoad Kernel Modules[1B][0m...  \n         Starting [1B][0;1;39mRemount Root and Kernel File Systems[1B][0m...  \n         Starting [1B][0;1;39mudev Coldplug all Devices[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mCreate list of staâ€¦ nodes for the current kernel[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mJournal Service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mRemount Root and Kernel File Systems[1B][0m.  \n         Starting [1B][0;1;39mLoad/Save Random Seed[1B][0m...  \n         Starting [1B][0;1;39mCreate Static Device Nodes in /dev[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mLoad/Save Random Seed[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mCreate Static Device Nodes in /dev[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mLocal File Systems (Pre)[1B][0m.  \n         Starting [1B][0;1;39mFile System Check on /dev/mmcblk2p5[1B][0m...  \n         Starting [1B][0;1;39mudev Kernel Device Manager[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mudev Kernel Device Manager[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mFile System Check on /dev/mmcblk2p5[1B][0m.  \n         Mounting [1B][0;1;39m/user[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Mounted [1B][0;1;39m/user[1B][0m.  \n[   12.855894] 000: hifDeviceInserted: Dumping clocks (50000000,400000000)  \n         Mounting [1B][0;1;39m/var/log[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Mounted [1B][0;1;39m/var/log[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mLocal File Systems[1B][0m.  \n         Starting [1B][0;1;39mFlush Journal to Persistent Storage[1B][0m...  \n[   13.102802] 000: ol_download_firmware: chip_id:0x5020001 board_id:0x0  \n[   13.124915] 000: __ol_transfer_bin_file: Failed to get :-22  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mudev Coldplug all Devices[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mFlush Journal to Persistent Storage[1B][0m.  \n[   13.998755] 000: ENTER sme_set_btc_coex_dutycycle = 30  \n         Starting [1B][0;1;39mCreate Volatile Files and Directories[1B][0m...[   13.998759] 000: ENTER   sme_set_btc_coex_dutycycle =30  \n\n[   14.106682] 000: debugfs: Directory '30050000.sai' with parent 'tfa9896-audio' already present!  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mLoad Kernel Modules[1B][0m.  \n         Starting [1B][0;1;39mApply Kernel Variables[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mApply Kernel Variables[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mCreate Volatile Files and Directories[1B][0m.  \n         Starting [1B][0;1;39mNetwork Service[1B][0m...  \n         Starting [1B][0;1;39mNetwork Time Synchronization[1B][0m...  \n         Starting [1B][0;1;39mUpdate UTMP about System Boot/Shutdown[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mUpdate UTMP about System Boot/Shutdown[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mNetwork Service[1B][0m.  \n         Starting [1B][0;1;39mNetwork Name Resolution[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mNetwork Time Synchronization[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSystem Initialization[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mDaily Cleanup of Temporary Directories[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSystem Time Set[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSystem Time Synchronized[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mTimers[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mD-Bus System Message Bus Socket[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSockets[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mBasic System[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mAuto-update Service[1B][0m.  \n         Starting [1B][0;1;39mBluetooth service[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mD-Bus System Message Bus[1B][0m.  \n         Starting [1B][0;1;39mFlush file cache[1B][0m...  \n         Starting [1B][0;1;39mPlay 1 second silence file[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mUser Space Regulatory Firmware Loading[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mUser Space SDMA Firmware Loading[1B][0m.  \n         Starting [1B][0;1;39mLogin Service[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mTEE Supplicant[1B][0m.  \n         Starting [1B][0;1;39mSW upgrade service[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mNetwork Name Resolution[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mFlush file cache[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mPlay 1 second silence file[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mHost and Network Name Lookups[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mSW upgrade service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mMCU SPI Communication Service[1B][0m.  \n         Starting [1B][0;1;39mDatabase Files Setup Service[1B][0m...  \n         Starting [1B][0;1;39mSetup dev permission[1B][0m...  \n         Starting [1B][0;1;39mSet host name[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mLogin Service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mSet host name[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mBluetooth service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mCheck and fix Bluetooth function periodically[1B][0m.  \n         Mounting [1B][0;1;39mTemporary Directory (/tmp)[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Mounted [1B][0;1;39mTemporary Directory (/tmp)[1B][0m.  \n         Starting [1B][0;1;39mHostname Service[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mHostname Service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mSetup dev permission[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mLDS Driver Service[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Listening on [1B][0;1;39mLoad/Save RF â€¦itch Status /dev/rfkill Watch[1B][0m.  \n         Starting [1B][0;1;39mLoad/Save RF Kill Switch Status[1B][0m...  \n         Starting [1B][0;1;39mSave/Restore Sound Card State[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mLoad/Save RF Kill Switch Status[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mBluetooth[1B][0m.  \n[   26.805560] 000: tfa98xx_set_volume(): tfa98xx_set_volume  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mSave/Restore Sound Card State[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Found device [1B][0;1;39m/sys/subsystem/net/devices/wlan0[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mSound Card[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mWPA supplicant daeâ€¦ (interface-specific version)[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Reached target [1B][0;1;39mNetwork[1B][0m.  \n         Starting [1B][0;1;39mPermit User Sessions[1B][0m...  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mPermit User Sessions[1B][0m.  \n[[1B][0;32m  OK  [1B][0m] Started [1B][0;1;39mSerial Getty on ttymxc1[1B][0m.  \n         Starting [1B][0;1;39mUSB gadgets[1B][0m...  \n[   28.030253] 000: tfa98xx_set_volume(): tfa98xx_set_volume  \n\n\nNeato LEGO Distro Release 1.7.0-2933_10060147_cfae4f98 Neato-Robot ttymxc1  \n\nNeato-Robot login:   \n"
  },
  {
    "path": "research/hidden-commands.md",
    "content": "### Some of the hidden commands for gen3 robots\n\n```\nLog\n    Text - write this text to log\n    Flush - flush entires\n\nSetUIError\n    brief - Sets a UI State Machine Error/Alert\n    clearall - Clears all UI Alerts and Errors\n    list - Lists all UI Alerts and Errors\n    clearalert - Clears the specified UI Alert or Error\n    setalert - Sets the specified UI Alert or Error\n\nCopyDumps - Copy All core dumps to emmc and pack them.\n\nGetActiveServices - Displays all running services\n\nGetLoggingType - Displays the type of log (QA, NavPen, or Production)\n\nGetRobotPassword - Returns the robot's saved random password\n\nGetState - Gets the state of the UI Finite State Machine\n\n(NOTE: No idea how it works, what it does)\nRunUSMFGTest - Run Ultrasonic MFG Test.\n\nGetI2CBlowerInfo - Get I2C Blower Registers <complete list>(TestMode Only)\n\n(NOTE: No idea how to actually see the data)\nGetDatabase - show database tables.\n    Database options are: All, Factory, Robot, Runtime, Statistics, System or CleanStats.\n\nRestoreDefaults - Restore user settings to default.\n\nGetRobotPos - Returns Robot position.\n    Raw - Return Odometry.\n    Smooth - Return smoothed/Localized position.\n\nUSBLogCopy - Copies all logs onto a USB drive.\n\n(NOTE: Needs some security key, I don't know how it works)\nCalibrateSensor - Automatically calibrates sensors and stores the values into SCB.\n\n(NOTE: Needs some security key, I don't know how it works)\nCalibrateAccelerometer - Calibrates the Accelerometer's X/Y Positions.\n\n(NOTE: Just says \"Not supported yet...\")\nGetStats - show system statistics. \n\n(NOTE: I don't know how it works)\nSetApp - Sets the alert/error to be sent to app .\n    Alert\n\nUpdateSW - Returns SwUpdate stuff.\n    GetStatus - Returns Status of SW Update \n    Verify - Returns Status of SW Update \n    Terminate - Flag to force a shutdown of the SoftwareManager \n\nTestPWM\n\n\nGetWifiStatus\n    mfgtest - Do MFG Test to determine if the WIFI chip is there\n    registry - show WIFI registries\n    ? - show wifi log file\n    sloginfo - show sloginfo info\n    Pattern - display sysloginfo info which matches specified pattern\n    Pattern2 - display sysloginfo info which matches both specified patterns.Pattern must be specified. For example, getwifis sloginfo pattern ROSIE pattern2 REPLY\n    Exclude - display sysloginfo info which doesn't contain specified pattern.Pattern must be specifed.For example, getwifis sloginfo pattern ROSIE exclude REPLY\n    wpacfg - show /emmc/wpa_supplicant.cfg file\n    ? - Key to unlock sloginfo retrieval command\n\n    copy sloginfo content to /emmc/black_box/sloginfo.txt and clear sloginfo. For example: getwifis sloginfo clear 1\n\nClean\n    House \n        (Optional) Equivalent to pressing 'Start' button once.\n        Starts a house cleaning.\n        (House cleaning mode is the default cleaning mode.)\n        (Choose only 1 of House,Spot,Stop)\n    Spot\n        (Optional) Starts a spot clean. (Not available with AutoCycle)\n        (Choose only 1 of House,Spot,Stop)\n    Persistent\n        (Optional) Equivalent to starting a persistent cleaning from the Smart App.\n    Width\n        (Optional) Spot Width in CM (100-400)(-1=use default).\n    Height\n        (Optional) Spot Height in CM (100-400)(-1=use default).\n    AutoCycle\n        Auto cycle Mode. (Shutdown will clear. 'Clean Stop' will also clear.) (Not available with Spot clean.)\n    MinCharge\n        (Optional) Minimum charge level to trigger a recharge(-1 = use default(50%)).\n    Stop\n        Stop Cleaning.\n        (Choose only 1 of House,Spot,Stop)\n    CleaningEnable\n        Enables the brush and vacuum during cleaning.\n        (Choose only 1 of House,Spot,Stop,NavTest,CleaningEnable,CleaningDisable,IEC1mTest)\n    CleaningDisable\n        Disables the brush and vacuum during cleaning.\n        (Choose only 1 of House,Spot,Stop,NavTest,CleaningEnable,CleaningDisable,IEC1mTest)\n    IEC1mTest\n        Runs the IEC cleaning test.\n        (Choose only 1 of House,Spot,Stop,NavTest,CleaningEnable,CleaningDisable,IEC1mTest)\n    MaxModeEnable\n        Enable max cleaning mode.\n    MaxModeDisable\n        Disable max cleaning mode.\n\nClearFiles\n    BB - (Optional) Clears Managed Logs in BlackBox Directory.\n    All - (Optional) Additionally clears unmanaged files (Crash, ...) in the specified directories.\n    Life - ??\n```\n\n### Other Hidden commands\n```\nNewBattery\n    (NOTE: Exact function unknown, but some users report this can fix an issue where a new battery isn't being charged)\n    Tells the robot a new battery has been installed.\n```\n\n### Hidden gems looking at the decompiled code:\n```\nYOU OVERFLOWED A 64-bit NUMBER!  WHAT WERE YOU THINKING???\n\nNice try, but I'm not falling for that one again!  :P\n\nInvalid SCB blower value. How did we get here?!\n```\n"
  },
  {
    "path": "research/serial.md",
    "content": "\n\n## Serial interface\nThere seams to be two different serial interfaces on the robot. One you can connect via the usb port where the dustbin resides, and blocks. The other one with jumper wires or soldering. Here you can connect via a TTY adapter. \n\n### On different robots\n\n**NOTE: Verified robots are D3, D5, D7. It should be the same for the other D4 and D6**\n\n#### D3/D4\nI suspect that the D4 looks the same as the D3, because from some research the only difference was their battery and maybe filter.\n\n![pcb-top-annotated](/pics/d3/pcb-top-annotated.png)\n![pcb-top](/pics/d3/pcb-top.jpg)\n![pcb-bottom](/pics/d3/pcb-bottom.jpg)\n\n#### D5/D6\nInside looks practically identical to D3. It has the extra sidebrush motor that is missing in the D3. [source](https://www.youtube.com/watch?v=OqgD7zuyLuA) \n\n![d5](/pics/other-robots/d5.png)\n#### D7\nLooks once again practically identical to the D3. It has the extra sidebrush motor and the status leds are from a separate board. [source](https://www.youtube.com/watch?v=i-CzfMNqBFw)\n\n![d7](/pics/other-robots/d7.png)\n\n### Pinout for D3\nBut I am very very certain it is the same for D3/D4/D5/D6/D7.\n\nThe pinout looks like this:\n\n![pinout on d3](/pics/d3/pinout.png)\n![pinout connected](/pics/d3/pinout-connected.png)\n\n(The pin labled 3.3V? is a 3.3V pin)\n\nmy setup\n![my setup](/pics/d3/pinout-tty-setup.jpg)\n\n#### D70/D75/D80/D85\nThese use a compleatly different pcb and they have the serial debug strips on the left side of the chassi. \n\nd80\n![d80](/pics/other-robots/d80.png)\nd85\n![d85](/pics/other-robots/d85.png)\n\n[source d80](https://www.youtube.com/watch?v=oIHImYWqOh4)\n[source d85](https://www.youtube.com/watch?v=DixC1pDCsh8)\n\nI suspect the D70 and D75 look the same.\n\nThe pinout for these should be like this:\n![pinout for d70/d75/d80/85](/pics/other-robots/pinout.d70-d75-d80-d85.png)\n\n[source](https://github.com/jeroenterheerdt/neato-serial/issues/3#issuecomment-510543522)\n\n### Connecting\nConnecting to a USB TTY Adapter you only need to connect ground and RX to the robot TX to the output, to be able to send commands, you connect the TX to the robot RX. \n\nConnecting to the serial interface with screen:\n`screen /dev/ttyUSB0 115200`\n\nShows some logs of the robot starting up, including a boot menu if the robot was fully shut down and you press enter twice.\n\nThe serial interface on the `3.2.0` version: (the `4.5.3` version I will add later)\n```\nARCHES Board (04.0x90c973a5)\nPress enter twice within the next 2 seconds for boot menu\nEnter Key Detected!\nEnter Key Detected!\n**Commands:\n\nPress 'M' to load IFS from main image flash partition\nPress 'F' to load IFS from factory image flash partition\nPress 'X' for serial download, using XModem-1k\nPress '1' for XModem-1k download at 1Mb/s\nPress '3' for XModem-1k download at 3Mb/s\nPress 'S' to scan existing memory without download\n-- Compressed Image Mode ('c' to toggle)--\ninitialize_sdmmc finished. sdmmc.sdmmc_pbase=481D8000\n\n\n\nBooting Main Image\n```\n\nIf it just was sleeping or not fullt shut down.\n```\nARCHES Board (04.0x90c973a5)\n\nNot factory boot...\ninitialize_sdmmc finished. sdmmc.sdmmc_pbase=481D8000\n\n\n\nBooting Main Image\n```\n\nThen it starts up, you can now enter commands! The commands listed by the `Help` command are as follows:\n```\nHelp - Without any argument, this prints a list of all possible cmds.\nWith a command name, it prints the help for that particular command\nClean - Starts a cleaning by simulating press of start button.\nClearFiles - Erases Black Box, and other Logs\nDiagTest - Executes different test modes. Once set, press Start button to engage. (Test modes are mutually exclusive.)\nGenerateRobotLinkCode - Generate and send robot linking code to server.\nGetConfiguredWifiNetworks - Get the list of configured wifi networks.\nGetRobotLinkCode - Get the robot linking code\nCancelRobotLink - Cancel link request.\nSetNTPTime - Set system time using the NTP servers (WIFI must be up for this to work)\nGetAccel - Get the Accelerometer readings.\nGetAnalogSensors - Get the A2D readings for the analog sensors.\nGetButtons - Get the state of the UI Buttons.\nGetCalInfo - Prints out the cal info from the System Control Block.\nGetCharger - Get the diagnostic data for the charging system.\nGetDigitalSensors - Get the state of the digital sensors.\nGetErr - Get Error Message.\nGetLDSScan - Get scan packet from LDS.\nGetMotors - Get the diagnostic data for the motors.\nGetSensor - Gets the sensors status ON/OFF (Wall Follower and Ultra Sound Only)\nGetTime - Get Current Scheduler Time.\nGetVersion - Get the version information for the system software and hardware.\nGetWarranty - Get the warranty data.\nGetWifiInfo - Get a list of available wifi networks.\nGetWifiStatus - Get the current status of the wifi.\nGetUserSettings - Get the user settings.\nGetUsage - Get usage settings\nPlaySound - Play the specified sound in the robot.\nSetBatteryTest - Sets California Energy Commission 10-CFR-430 Battery Charging System Test mode.\nSetButton - Simulates a button press.\nSetFuelGauge - Set Fuel Gauge Level.\nSetIEC - Sets the IEC Cleaning Test parameters\nSetLCD - Sets the LCD to the specified display. (TestMode Only)\nSetLED - Sets the specified LED to on,off,blink, or dim. (TestMode Only)\nSetLDSRotation - Sets LDS rotation on or off. Can only be run in TestMode.\nSetMotor - Sets the specified motor to run in a direction at a requested speed. (TestMode Only)\nSetSystemMode - Set the operation mode of the robot. (TestMode Only)\nSetTime - Sets the current day, hour, and minute for the scheduler clock.\nSetUserSettings - Sets user settings\nSetUsage - Sets usage settings\nSetWifi - SetWifi variables\nTestMode - Sets TestMode on or off. Some commands can only be run in TestMode.\nUpload - Uploads new program to the robot.\n```\n\nNow the commandline is not case-sensetive and it also checks if the string you written is part of a command or parameter for a command. If it is an only match it will \"autocomplete\" the command for you, if multiple matches then it will list what it could be. Thanks to this functionality I have discovered some commands that is not documented in the `Help` command:\n```\nGetActiveServices\nGetLoggingType\nGetState\n```\n\nCommands that was in the old programming manual but I don't know how to use:\n```\nGetSysLog\n```\n\nSince then I have found more [hidden commands](./hidden-commands.md)!\n\n#### Differences I found in 3.2.0 and 4.5.3\n\n3.2.0 has more options for `SetSystemMode`:\n```\nSetSystemMode - Set the operation mode of the robot. (TestMode Only)\n    Shutdown - Shut down the robot. (mutually exclusive of other options)\n    Hibernate - Start hibernate operation.(mutually exclusive of other options)\n    Standby - Start standby operation. (mutually exclusive of other options)\n    PowerCycle - Power cycles the entire system. (mutually exclusive of other options)\n```\n\n#### Logs when doing a factory reset:\n```\nARCHES Board (04.0x90c973a5)\nPress enter twice within the next 2 seconds for boot menu\n\nDustbin open , Right Side Bumper and Right Front Bumper closed....\nBooting Factory Image...Loading FACTORY SECURE/ENCRYPTED image ...\ninitialize_sdmmc finished. sdmmc.sdmmc_pbase=481D8000\n\n\n\nFactory Mode: Restoring Image.\n32768+0 records in\n32768+0 records out\n32768+0 records in\n32768+0 records out\nInitializing UI\ncp: Can't open source file.  (/emmc/uiFactory)\nResetting wifi\n/etc/factory_reset.sh[69]: [: missing ]\nReset Security\nReset complete. Rebooting\nShutting down daemons...\nShutting down filesystems...\n```\n\n#### Shutdown the robot fully\n```\nTestMode on\nSetSystemMode Shutdown\n```\n\n(This could be written as `t on` and `setsy sh`)\n\n"
  },
  {
    "path": "research/setup-network.md",
    "content": "\n\n## Setup network\n\nIf factory reset (by loading the factory IFS or holding the front right and right bumper switches while turning it off (This method worked once for them, next time it didn't)) or by holding the left bumper switch while turning the robot off, the next time it turns on it will go into pairing mode. It will host a network called `Neato-{serial-number}` (on my factory firmware it is `neato-{serial-number}`).\n\nConnecting to this network, the ip range will be `192.168.219.XXX` with the robot at `192.168.219.1`. (on my factory firmware it is at `192.168.0.1`). \n\nAn nmap scan reveals that port 4443 and port 8081 is open of the robot. (on my factory firmware it is only port 4443 that is open). I am not sure why, but running nmap seams to crash the webserver and to connect to it again I need to restart the robot.\n\nI looked first at how the app connects to the robot, and had some issues when trying to use pcapdroid to decrypt the payload, I got SSL protocol not supported, I tried to connect via curl, same error. I am not exactly sure why; but after some debuggning I think it requires a TLS 1.0 handshake and modern curl/mitmproxy/python is not happy for that. Sending curl requests with `--ciphers ALL:@SECLEVEL=0` solves the issues with TLS.\n\nThe endpoints important to the setup is:\n```\nGET /info\nGET /wifi_networks\nPUT /robot/initialize\nGET /robot/wifi_networks/new/progress\nPUT /robot/access_point/shutdown\n```\n\nThe app sends `authorization` headers but I think that it is pointless, I have just been sending random data on this header during all my testing. I will be testing to remove headers that might be unnessecery.\n\nLets look at the request body and response body.\nGET /info\n```json\n{\n    \"serial\": \"serial-number\",\n    \"model\": \"BotVacD3Connected\",\n    \"firmware\": \"4.5.3-189\", // 3.2.0-305 for my factory firmware\n    \"name\": \"name-of-robot\", // empty string if factory reset\n    \"easyWifiConnectVersion\": \"advanced-3\" // basic-3 for my factory firmware\n}\n```\n\nGET /wifi_networks\n```json\n[\n    {\n        \"ssid\": \"wifi ssid\",\n        \"strength\": 3 // seams to be from 1-3, 3 being strongest\n    }\n    [...]\n]\n```\n\nPUT /robot/initialize\nrequest:\n```json\n{\n    \"name\": \"name to give robot\",\n    \"password\": \"password of wifi to connect to\",\n    \"server_urls\": {\n        \"beehive\": \"beehive\", // .neatocloud.com will be autoapended\n        \"ntp\": \"pool.ntp.org\",\n        \"nucleo\": \"nucleo\" // .neatocloud.com will be autoapended\n    },\n    \"ssid\": \"ssid of wifi to connect to\",\n    \"timezone\": \"Europe/Stockholm\",\n    \"user_id\": \"userid\", // hash of some kind?\n    \"utc_offset\": \"UTC+1:00UTC+2:00\"\n}\n```\nresponse is just an empty object.\n\nGET /robot/wifi_networks/new/progress\n```json\n{\n    \"type\": \"primary\",\n    \"step\": 1/2/3/4, // 1 - connecting to wifi, 2 - connecting to internet, 3 - connecting to neato cloud, 4 - connecting robot\n}\n```\n\nThere seams to be 2 more endpoints:\n```\nPUT /robot/wifi\nPUT /robot/wifi_networks/primary\n```\n\nhowever I am not sure how these work, might be used by older firmware versions, havn't tried to do the setup via app then mitm it with the factory firmware yet.\n\n### mitmproxy to look at data\nYou will need mitmproxy 4.0.4 (other versions may also work). I would recommend downloading their binary with the correct python version bundeled from:\nhttps://www.mitmproxy.org/downloads/#4.0.4/\n\nRun mitmproxy with:\n`mitmproxy --listen-host 0.0.0.0 --listen-port 8080 --ssl-insecure`\n\nOpen port 8080, I just open all temporarly:\n`iptables -I INPUT -j ACCEPT`\n\nConnect the pc running mitmproxy to the robot AP first, then connect the phone to the robot AP and set the proxy settings as follows:\n```\nServer: 192.168.219.9\nPort: 8080\n```\n\nOf couse, check your exact ip in case you are on another firmware version or it is not working.\n\n\n## Once connected to wifi\n\nOnce connected to wifi the robot will do the following:\n1. Check internet connactivity by pinging 8.8.8.8\n2. Get NTP servers from pool and update the time\n3. Contact the \"beehive\" url (with `.neatocloud.com` appended)\n\nRewriting the DNS in my router to an local openssl server to see if the robot is checking certificates gave: `SSL3 alert read:fatal:unknown CA`, meaning the cloud replacment method is not possible without removing secure boot and changing the CA list.\n"
  },
  {
    "path": "status.md",
    "content": "# Project status\n\n### Roadmap & current state\n\n- Version 1. Current state of the project gives you basic local control\n    - Neato cleaning logic\n    - Will always maintain and get support\n    - Occasional updates based on feature requests or bugs\n- Version 2. Currently a work in progress, all the features in a non-ideal way (ETA: March 2026, if all stars align)\n    - ROS2 & Neato hybrid\n        - Neato cleaning logic\n        - ROS2 for nogo-lines and zone cleaning, (return to dock?)\n            - NOTE: Big limitation - if it goes outside of its area, all we can do is \"move it back\"\n- Version 3. End goal of project, any lidar vacuum should be supported as long as a \"driver\" for each vacuum is created. (ETA: future)\n    - Fully custom cleaning logic and navigation via ROS2\n    - There might be limitations on how good this can be, relying on a serial interface, how fast commands can happen, etc\n    - Would work with a fully custom-made robot\n\n### Version 1\n\n#### Version 1.2\n- Add support for Connected, D70-D85, XV-series\n- Event based commands, return to dock and manual driving for D3-D7\n- Full non-home assistant version\n- Rework docs, add faq\n- Add Home Assistant entity and automations/scripts\n\n#### Version 1.3 - planned\n- Custom state managment based on ui-state, robot-state and sensors\n- Gen2 robots error strings\n- If possible: push notifications for non-ha install\n- Improve notifications\n\n#### Not sure if 1.3 or 1.4\n- Set schedule of gen1 and gen2 robots via esphome\n\n#### Version 1.4 - planned\n- Translations\n- Use esphome package stuff to fetch from github directly\n\n\n### Version 2\n\n#### Version 2.0 - in dev\nThe first version of version 2, will be the latest version of version 1 but will also be sending all the data to a ROS2 server to do SLAM that then can give commands to stop and move the robot"
  },
  {
    "path": "supported-esp32.md",
    "content": "## Supported ESP-32 Boards\n\nIt is hard to provide link of what to buy since everyone is located at different places so instead I have opted to give some guidelines when buying ESP32 devices.\n\n- Stick to the ESPHome recommendations `ESP32`, `ESP32S3` and `ESP32C3` devices\n- Pay at least 6-8 €/£/$ for your esp device\n- Avoid SuperMini devices as they often have the antenna too close to the rest of the electronics\n- Perferably it should have a shield\n- Avoid ceramic antennas\n\nSheilded with pcb antenna (black part sticking out) | Unsheilded with ceramic antenna (red rectangle)\n:-------------------------:|:-------------------------:\n![sheilded](pics/setup/sheilded.png) |  ![unsheilded](pics/setup/unsheilded.png)\n\n\nThis is not in any terms any perfect guidelines, but mainly what we have learned from all the users in the discord and here on github!\n\n## More technical/examples\n\nAntenna too close: https://www.reddit.com/r/esp32/comments/1dsh3b5/warning_some_c3_super_mini_boards_have_a_design/\n\nThere seems to be two major issues with bad ESP designs and the neato robots\n1. Smaller/Cheaper ESP boards lack proper brownout protection\n    - A brownout means that the voltage drops and if the ESP does not have proper protection against this, the device will restart\n2. Antenna is placed too close to the rest of the electronics, causing interferance or refusal to work\n\n"
  },
  {
    "path": "webserver/.prettierrc.json",
    "content": "{\n  \"html.format.wrapAttributes\": \"auto\",\n  \"html.format.wrapLineLength\": 0,\n  \"printWidth\": 80\n}\n"
  },
  {
    "path": "webserver/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2021 wilberforce\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "webserver/README.md",
    "content": "# webserver\n\nCode taken from https://github.com/esphome/esphome-webserver and neato style built upon the v3 style. Currently this folder includes the minimum needed to run `pnpm build` to build and `PROXY_TARGET=http://<robot-ip> pnpm start` in the neato package folder.\n\nWill need to be updated with the upstream, planned after 1.2"
  },
  {
    "path": "webserver/package.json",
    "content": "{\n  \"name\": \"esphome-webserver\",\n  \"version\": \"3.0.0\",\n  \"license\": \"MIT\",\n  \"workspaces\": [\n    \"packages/*\"\n  ],\n  \"scripts\": {\n    \"build\": \"npm run build:packages\",\n    \"build:packages\": \"npm run build --workspaces --if-present\",\n    \"deploy\": \"npm run deploy --workspaces --if-present\"\n  }\n}\n"
  },
  {
    "path": "webserver/packages/neato/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n    <link rel=\"icon\" href=\"data:image\" />\n    <meta charset=\"UTF-8\">\n  </head>\n  <body>\n    <esp-app></esp-app>\n  </body>\n</html>\n\n"
  },
  {
    "path": "webserver/packages/neato/package.json",
    "content": "{\n  \"name\": \"@esphome-webserver/neato\",\n  \"version\": \"3.0.0\",\n  \"scripts\": {\n    \"start\": \"npm run dev\",\n    \"dev\": \"vite\",\n    \"xbuild\": \"vite build --emptyOutDir\",\n    \"build\": \"vite build --emptyOutDir\",\n    \"serve\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"chart.js\": \"^4.4.1\",\n    \"http-proxy-middleware\": \"^2.0.1\",\n    \"iconify-icon\": \"^1.0.8\",\n    \"lit\": \"^2.0.2\"\n  },\n  \"devDependencies\": {\n    \"rollup-plugin-copy\": \"^3.4.0\",\n    \"rollup-plugin-gzip\": \"^3.0.0\",\n    \"rollup-plugin-minify-html-template-literals\": \"^1.2.0\",\n    \"@rollup/plugin-node-resolve\": \"^13.0.6\",\n    \"@rollup/plugin-replace\": \"^3.0.0\",\n    \"@types/node\": \"^15.12.1\",\n    \"rollup-plugin-strip-banner\": \"^2.0.0\",\n    \"typescript\": \"^4.1.3\",\n    \"vite\": \"^2.3.6\",\n    \"vite-plugin-html\": \"^2.1.1\",\n    \"vite-plugin-package-version\": \"^1.0.2\",\n    \"vite-plugin-singlefile\": \"^0.5.1\"\n  }\n}\n"
  },
  {
    "path": "webserver/packages/neato/selector.html",
    "content": "<style>\n  body {\n    margin: 0;\n    min-height: 100vh;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    font-family: system-ui, sans-serif;\n    background: #1c1c1c;\n    color: #eee;\n    padding: 16px;\n  }\n\n  .container {\n    text-align: center;\n    max-width: 400px;\n    width: 100%;\n  }\n\n  h1 {\n    font-weight: 400;\n    font-size: 1.8rem;\n    margin-bottom: 24px;\n    color: #f5f5f5;\n  }\n\n  .buttons {\n    display: flex;\n    flex-direction: column;\n    gap: 16px;\n  }\n\n  .buttons-row {\n    display: flex;\n    gap: 12px;\n    justify-content: center;\n  }\n\n  button {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    gap: 8px;\n    padding: 16px 24px;\n    font-size: 1rem;\n    font-weight: 500;\n    border: 1px solid #333;\n    border-radius: 10px;\n    cursor: pointer;\n    background: #2c2c2c;\n    color: #f5f5f5;\n    transition: all 0.2s;\n    box-shadow: 0 2px 4px rgba(0,0,0,0.3);\n    min-height: 48px;\n  }\n\n  button:hover {\n    background: #3a3a3a;\n    box-shadow: 0 4px 8px rgba(0,0,0,0.4);\n  }\n\n  .neato {\n    font-size: 1.2rem;\n    padding: 18px 28px;\n    background: #0077cc;\n    border: 1px solid #005fa3;\n  }\n\n  .neato:hover {\n    background: #005fa3;\n  }\n\n  .esphome {\n    background: #444;\n    border: 1px solid #555;\n    flex: 1;\n  }\n\n  .esphome:hover {\n    background: #555;\n  }\n\n  .custom-link {\n    display: flex;\n    gap: 8px;\n    margin-top: 16px;\n  }\n\n  .custom-link input {\n    flex: 1;\n    padding: 12px;\n    border-radius: 8px;\n    border: 1px solid #555;\n    background: #2c2c2c;\n    color: #fff;\n    font-size: 1rem;\n  }\n\n  .custom-link input:focus {\n    outline: none;\n    border-color: #0077cc;\n  }\n\n  .custom-link button {\n    padding: 12px 16px;\n    border-radius: 8px;\n    border: none;\n    background: #0077cc;\n    color: #fff;\n    font-weight: 500;\n  }\n\n  .custom-link button:hover {\n    background: #005fa3;\n  }\n\n  .footer-text {\n    margin-top: 20px;\n    font-size: 0.9rem;\n    color: #aaa;\n    line-height: 1.4;\n  }\n\n  .remember {\n    margin-top: 12px;\n    display: flex;\n    align-items: flex-start;\n    gap: 10px;\n    font-size: 0.9rem;\n    color: #ddd;\n    text-align: left;\n  }\n\n  .remember input {\n    margin-top: 3px;\n    transform: scale(1.15);\n  }\n\n  @media (max-width: 480px) {\n    .buttons-row {\n      flex-direction: column;\n    }\n  }\n</style>\n\n<div class=\"container\">\n  <h1>Which webserver would you like to see?</h1>\n\n  <div class=\"buttons\">\n    <button class=\"neato\" id=\"btnNeato\">Neato-Brainslug</button>\n\n    <div class=\"buttons-row\">\n      <button class=\"esphome\" data-pick=\"2\">ESPHome v2</button>\n      <button class=\"esphome\" data-pick=\"3\">ESPHome v3</button>\n    </div>\n\n    <div class=\"custom-link\">\n      <input type=\"text\" id=\"customUrl\" placeholder=\"Enter custom URL\" />\n      <button id=\"btnCustom\">Go</button>\n    </div>\n  </div>\n\n  <div class=\"footer-text\">\n    The selected mode will only be shown until the site is reloaded (except for the custom neato brainslug interface). \n    If you choose the remember the selected interface, you will need to clear your cookies/localStorage to get back here!\n  </div>\n\n  <label class=\"remember\">\n    <input type=\"checkbox\" id=\"rememberChoice\">\n    <span>\n      Remember my selection (not needed for brainslug interface)\n    </span>\n  </label>\n</div>"
  },
  {
    "path": "webserver/packages/neato/src/api.ts",
    "content": "import { entityConfig } from \"./types\";\nimport { getBasePath } from \"./utils\";\n\nwindow.apiBasePath = getBasePath();\n\n\nexport function restAction(entity: entityConfig, action: string) {\n    fetch(`${window.apiBasePath}/${entity.domain}/${entity.id}/${action}`, {\n        method: \"POST\",\n        headers: {\n            'Content-Type': 'application/x-www-form-urlencoded'\n        },\n    })\n}\n\nexport function pressButton(entity: entityConfig) {\n    restAction(entity, \"press\");\n}\n\nexport function setText(entity: entityConfig, val: string) {\n    restAction(entity, `set?value=${encodeURIComponent(val)}`)\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/css/app.ts",
    "content": "import { css } from \"lit\";\n\nexport default css`\n\n  .main-grid {\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    width: 100%;\n    padding-bottom: 2rem;\n  }\n\n  \n  .main-buttons {\n    display: grid;\n    gap: 1rem;\n    justify-content: center;\n    grid-template-columns: auto auto auto auto;\n    align-content: center;\n    align-items: center;\n    justify-content: center;\n  }\n  \n  @media (max-width: 1024px) {\n    .main-grid {\n      grid-template-columns: 1fr;\n    }\n\n    .main-buttons {\n      gap: 0.5rem;\n      grid-template-columns: auto auto auto;\n    }\n  }\n\n  .flex-grid-half {\n    display: grid;\n    grid-template-columns: 700px 2fr;\n  }\n  .flex-grid-half.expanded_entity,\n  .flex-grid-half.expanded_logs {\n    grid-template-columns: 1fr;\n  }\n  .flex-grid-half .col {\n    margin: 8px;\n  }\n  .flex-grid-half .col:nth-child(2) {\n    overflow: hidden;\n  }\n  .flex-grid-half.expanded_logs .col:nth-child(1) {\n    display: none;\n  }\n  .flex-grid-half.expanded_entity .col:nth-child(2) {\n    display: none;\n  }\n\n  @media (max-width: 1024px) {\n    .flex-grid,\n    .flex-grid-half {\n      display: block;\n    }\n    .flex-grid-half .col {\n      width: 100% !important;\n      margin: 0 0 10px 0 !important;\n      display: block !important;\n    }\n  }\n\n  * {\n    box-sizing: border-box;\n  }\n  .flex-grid {\n    margin: 0 0 20px 0;\n  }\n  h1 {\n    text-align: center;\n    width: 100%;\n    line-height: 1.1em;\n    margin-block: 0.25em;\n  }\n  header div {\n    text-align: center;\n    width: 100%;\n  }\n  header #logo,\n  header iconify-icon {\n    float: right;\n    font-size: 2.5rem;\n    color: rgba(127, 127, 127, 0.5);\n  }\n  header #logo {\n    float: left;\n    color: rgba(127, 127, 127, 0.5);\n  }\n  .connected {\n    color: rgba(0, 157, 16, 0.75);\n  }\n  esp-logo {\n    float: left;\n    line-height: 1em;\n    font-size: initial;\n  }\n  form {\n    display: flex;\n    justify-content: space-between;\n    background-color: rgba(127, 127, 127, 0.05);\n    border-radius: 12px;\n    border-width: 1px;\n    border-style: solid;\n    border-color: rgba(127, 127, 127, 0.12);\n  }\n  form .btn {\n    margin-right: 0px;\n  }\n\n  .helper {\n      width: 75%;\n      padding: 1rem;\n      margin: .3rem 0;\n      background-color: rgba(127, 127, 127, 0.3);\n      border-radius: 0.5rem;\n    }\n  \n`;\n"
  },
  {
    "path": "webserver/packages/neato/src/css/button.ts",
    "content": "import { css } from \"lit\";\n\nexport default css`\n  button,\n  .btn {\n    cursor: pointer;\n    border-radius: 4px;\n    color: rgb(3, 169, 244);\n    border: none;\n    background-color: unset;\n    padding: 8px;\n    font-weight: 500;\n    font-size: 12.25px;\n    letter-spacing: 1.09375px;\n    text-transform: uppercase;\n    margin-right: -8px;\n  }\n\n  button:active,\n  .btn:active {\n    background-image: rgba(127, 127, 127, 0.2);\n    transition-duration: 1s;\n  }\n\n  button:hover,\n  .btn:hover {\n    background-color: rgba(127, 127, 127, 0.2);\n    transition-duration: 1s;\n  }\n\n  .abuttonIsState {\n    background-color: #28a745;\n    color: white;\n    border: none;\n    padding: 10px 20px;\n    font-size: 16px;\n    border-radius: 4px;\n    transition: background-color 0.3s ease;\n  }\n`;\n"
  },
  {
    "path": "webserver/packages/neato/src/css/esp-entity-table.ts",
    "content": "import { css } from \"lit\";\n\nexport default css`\n  :host {\n    position: relative;\n  }\n  select {\n    background-color: inherit;\n    color: inherit;\n    width: 100%;\n    border-radius: 4px;\n  }\n  option {\n    color: currentColor;\n    background-color: var(--primary-color, currentColor);\n  }\n  input[type=\"range\"],\n  input[type=\"text\"] {\n    width: calc(100% - 3rem);\n    height: 0.75rem;\n  }\n  .range {\n    text-align: center;\n  }\n  .entity-row {\n    display: flex;\n    align-items: center;\n    flex-direction: row;\n    transition: all 0.3s ease-out 0s;\n    min-height: 40px;\n    position: relative;\n  }\n  .entity-row.expanded {\n    min-height: 240px;\n  }\n  .entity-row:nth-child(2n) {\n    background-color: rgba(90, 90, 90, 0.1);\n  }\n  .entity-row iconify-icon {\n    vertical-align: middle;\n  }\n  .entity-row > :nth-child(1) {\n    flex: 0 0 40px;\n    color: #44739e;\n    line-height: 40px;\n    text-align: center;\n  }\n  .entity-row > :nth-child(2) {\n    flex: 1 1 40%;\n    margin-left: 16px;\n    margin-right: 8px;\n    text-wrap: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n  }\n  .entity-row > :nth-child(3) {\n    flex: 1 1 50%;\n    margin-right: 8px;\n    margin-left: 20px;\n    text-align: right;\n    display: flex;\n    justify-content: space-between;\n    white-space: normal;\n    overflow-wrap: anywhere;\n    word-break: break-word;\n  }\n  .entity-row > :nth-child(3) > :only-child {\n    margin-left: auto;\n  }\n  .binary_sensor_off {\n    color: rgba(127, 127, 127, 0.7);\n  }\n  .singlebutton-row button {\n    margin: auto;\n    display: flex;\n  }\n  .climate-wrap{\n    width: 100%;\n    margin: 10px 0 10px 0;\n  }\n  .climate-row {\n    width: 100%;\n    display: inline-flex;\n    flex-wrap: wrap;\n    text-align: left;\n  }\n  .climate-row > select{\n    width: 50%;\n  }\n  .climate-row > label{\n    align-content: center;\n    width: 150px;\n  }\n    \n  input[type=\"color\"]::-webkit-color-swatch-wrapper {\n    padding: 0 !important;\n  }\n`;\n"
  },
  {
    "path": "webserver/packages/neato/src/css/input.ts",
    "content": "import { css } from \"lit\";\n\nexport default css`\n  input[type=\"text\"] {\n    width: 100% !important;\n    height: 1rem !important;\n  }\n`;\n"
  },
  {
    "path": "webserver/packages/neato/src/css/reset.ts",
    "content": "import { css } from \"lit\";\n\nexport default css`\n  :host, button, select, input {\n    font-family: ui-monospace, system-ui, \"Helvetica\", \"Roboto\",\n      \"Oxygen\", \"Ubuntu\", sans-serif;\n    --primary-color: #03a9f4;\n    transition: all 350ms !important;\n  }\n`;\n"
  },
  {
    "path": "webserver/packages/neato/src/css/tab.ts",
    "content": "import { css } from \"lit\";\n\nexport default css`\n  .tab-header {\n    display: inline-flex;\n    max-width:90%;\n    font-weight: 400;\n    padding-inline: 1.5em;\n    padding-top: 0.5em;\n    padding-bottom: 0.5em;\n    align-items: center;\n    border-radius: 12px 12px 0px 0px;\n    background-color: rgba(127, 127, 127, 0.3);\n    margin-top: 1em;\n    user-select: none;\n  }\n  .tab-container {\n    border: 2px solid rgba(127, 127, 127, 0.3);\n    border-radius: 0px 12px 12px 12px;\n  }\n`;\n"
  },
  {
    "path": "webserver/packages/neato/src/custom-button.ts",
    "content": "import { html, css, LitElement, PropertyValues } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators.js\";\nimport cssReset from \"./css/reset\";\nimport { pressButton } from \"./api\";\nimport { entityStore } from \"./entity-store\";\nimport { entityConfig } from \"./types\";\n\n\n\n@customElement(\"custom-button\")\nexport class CustomButton extends LitElement {\n  @property({ type: String })\n  click = \"\";\n  @property({ type: String })\n  press = \"\";\n  @property({ type: String })\n  release = \"\";\n  @property({ type: String })\n  icon = \"\";\n  @property({ type: String })\n  name = \"\";\n\n  @query(\"#custom-button\")\n  customButtom!: HTMLDivElement;\n\n  private unsubscribe?: () => void;\n  private entities: {\n    click?: entityConfig,\n    press?: entityConfig,\n    release?: entityConfig,\n  } = {}\n\n\n\n  connectedCallback() {\n    super.connectedCallback();\n    this.unsubscribe = entityStore.subscribe((entity) => {\n      // only re-render when *its* entity changes\n      if (entity.unique_id === this.click) this.entities.click = entity;\n      if (entity.unique_id === this.press) this.entities.press = entity;\n      if (entity.unique_id === this.release) this.entities.release = entity;\n      this.requestUpdate();\n    });\n  }\n\n  disconnectedCallback() {\n    this.unsubscribe?.();\n    super.disconnectedCallback();\n  }\n\n  get entityIds() {\n    let i = [];\n    if (this.click) i.push(this.click);\n    if (this.press) i.push(this.press);\n    if (this.release) i.push(this.release);\n    return i;\n  }\n\n\n  onClick() {\n    if (this.entities.click) pressButton(this.entities.click);\n  }\n\n  onMouseDown() {\n    if (this.entities.press) pressButton(this.entities.press);\n  }\n\n  onMouseUp() {\n    if (this.entities.release) pressButton(this.entities.release);\n  }\n\n  protected updated(_changedProperties: PropertyValues): void {\n    if (!this.customButtom) return;\n    if (this.press) {\n      this.customButtom.removeEventListener(\"touchstart\", this.onMouseDown.bind(this))\n      this.customButtom.addEventListener(\"touchstart\", this.onMouseDown.bind(this))\n    }\n\n    if (this.release) {\n      this.customButtom.removeEventListener(\"touchend\", this.onMouseUp.bind(this))\n      this.customButtom.addEventListener(\"touchend\", this.onMouseUp.bind(this))\n    }\n  }\n\n  render() {\n    // loaded.length !== to_load.length --> show loading...\n    if (Object.keys(this.entities).length !== this.entityIds.length) {\n      return html`\n        <div class=\"cb loading\">\n          <iconify-icon icon=\"mdi:progress-clock\" height=\"24px\"></iconify-icon>\n          loading…\n        </div>\n      `;\n    }\n\n    return html`\n      <div class=\"cb\" @click=${this.onClick} @mousedown=${this.onMouseDown} @mouseup=${this.onMouseUp} id=\"custom-button\">\n        <iconify-icon\n          icon=${this.icon || this.entities.click?.icon || this.entities.press?.icon || this.entities.release?.icon}\n          height=\"24px\">\n        </iconify-icon>\n        <span>${this.name || this.entities.click?.name || this.entities.press?.name || this.entities.release?.name}</span>\n      </div>\n    `;\n  }\n\n  static get styles() {\n    return [\n      cssReset,\n      css`\n        .cb {\n          border: .1rem solid gray;\n          border-radius: .5rem;\n          display: flex;\n          flex-direction: column;\n          align-items: center;\n          justify-content: center;\n          gap: 5px;\n          padding: 1rem;\n          width: 6rem;\n        }\n\n        .cb span {\n          text-overflow: ellipsis;\n          white-space: nowrap;\n          overflow: hidden;\n        }\n\n        .cb:hover {\n          background-color: rgba(255, 255, 255, 0.1);\n          cursor: pointer;\n        }\n\n          @media (max-width: 1024px) {\n            .cb {\n              font-size: 0.8rem;\n              width: 5.3rem;\n            }\n          }\n      `,\n    ];\n  }\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/custom-table.ts",
    "content": "import { html, css, LitElement, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport cssReset from \"./css/reset\";\nimport { pressButton } from \"./api\";\nimport { Button_Gen3 } from \"./neato-enums\";\nimport { entityStore } from \"./entity-store\";\nimport { entityConfig } from \"./types\";\nimport cssEntityTable from \"./css/esp-entity-table\";\n\nexport const stateOn = \"ON\";\nexport const stateOff = \"OFF\";\n\ninterface RestAction {\n  restAction(entity?: entityConfig, action?: string): void;\n}\n\n@customElement(\"custom-table\")\nexport class CustomTable extends LitElement implements RestAction {\n  @property({ type: String })\n  entityIds: string[] = []\n\n  @property()\n  customNames: { [key: string]: string } = {}\n\n  @property()\n  customValues: { [key: string]: (value: string) => string } = {}\n\n\n  private unsubscribe?: () => void;\n  private entities: entityConfig[] = [];\n\n  private _actionRenderer = new ActionRenderer();\n\n\n  connectedCallback() {\n    super.connectedCallback();\n    this.unsubscribe = entityStore.subscribe((entity) => {\n      // only re-render when *its* entity changes\n      if (this.entityIds.some(id => id === entity.unique_id)) {\n        this.entities.push(entity);\n        this.entities.sort(\n          (a, b) =>\n            this.entityIds.indexOf(a.unique_id) -\n            this.entityIds.indexOf(b.unique_id)\n        );\n\n        this.requestUpdate();\n      }\n    });\n  }\n\n  disconnectedCallback() {\n    this.unsubscribe?.();\n    super.disconnectedCallback();\n  }\n\n\n  render() {\n    if (!this.entities.length) {\n      return html`loading…`;\n    }\n\n  return html`\n    <div>\n      ${this.entities.map((component) => html`\n        <div class=\"entity-row\" .domain=\"${component.domain}\">\n          <div>\n            ${component.icon\n              ? html`\n                <iconify-icon\n                  icon=\"${component.icon}\"\n                  height=\"24px\"\n                ></iconify-icon>\n              `\n              : nothing}\n          </div>\n\n          <div>${this.customNames?.[component.unique_id] || component.name}</div>\n\n          <div style=\"${component.domain === \"number\" ? \"overflow-wrap: unset;word-break: unset;\" : \"\"}\">\n            ${component.has_action\n              ? this.control(component)\n              : html`<div>${this.customValues?.[component.unique_id] ? this.customValues?.[component.unique_id](component.state) : component.state}</div>`}\n          </div>\n        </div>\n      `)}\n\n    </div>\n  `;\n  }\n\n   hasAction(entity: entityConfig): boolean {\n    return `render_${entity.domain}` in this._actionRenderer;\n  }\n\n  control(entity: entityConfig) {\n    this._actionRenderer.entity = entity;\n    this._actionRenderer.actioner = this;\n    return this._actionRenderer.exec(\n      `render_${entity.domain}` as ActionRendererMethodKey\n    );\n  }\n\n  restAction(entity: entityConfig, action: string) {\n    fetch(`${window.apiBasePath}/${entity.domain}/${entity.id}/${action}`, {\n      method: \"POST\",\n      headers:{\n        'Content-Type': 'application/x-www-form-urlencoded'\n      },\n    }).then((r) => {\n      console.log(r);\n    });\n  }\n\n\n  static get styles() {\n    return [\n      cssReset,\n      cssEntityTable,\n    ];\n  }\n\n}\n\n\n\ntype ActionRendererNonCallable = \"entity\" | \"actioner\" | \"exec\";\nexport type ActionRendererMethodKey = keyof Omit<\n  ActionRenderer,\n  ActionRendererNonCallable\n>;\n\nexport class ActionRenderer {\n  public entity?: entityConfig;\n  public actioner?: RestAction;\n\n  exec(method: ActionRendererMethodKey) {\n    if (!this[method] || typeof this[method] !== \"function\") {\n      console.log(`ActionRenderer.${method} is not callable`);\n      return;\n    }\n    return this[method]();\n  }\n\n  private _actionButton(entity: entityConfig, label: string, action: string, isCurrentState: boolean = false) {\n    if (!entity) return;\n    let a = action || label.toLowerCase();\n    return html`<button\n      class=\"${isCurrentState ? 'abuttonIsState' : 'abutton'}\"\n      ?disabled=${isCurrentState}\n      @click=${() => this.actioner?.restAction(entity, a)}\n    >\n      ${label}\n    </button>`;\n  }\n\n  private _datetime(\n    entity: entityConfig,\n    type: string,\n    action: string,\n    opt: string,\n    value: string,\n  ) {\n    return html`\n      <input \n        type=\"${type}\" \n        name=\"${entity.unique_id}\"\n        id=\"${entity.unique_id}\"\n        .value=\"${value}\"\n        @change=\"${(e: Event) => {\n          const val = (<HTMLTextAreaElement>e.target)?.value;\n          this.actioner?.restAction(\n            entity,\n            `${action}?${opt}=${val.replace('T', ' ')}`\n          );\n        }}\"\n      />\n    `;\n  }\n\n  private _switch(entity: entityConfig) {\n    return html`<esp-switch\n      color=\"var(--primary-color,currentColor)\"\n      .state=${entity.state}\n      @state=\"${(e: CustomEvent) => {\n        let act = \"turn_\" + e.detail.state;\n        this.actioner?.restAction(entity, act.toLowerCase());\n      }}\"\n    ></esp-switch>`;\n  }\n\n  private _select(\n    entity: entityConfig,\n    action: string,\n    opt: string,\n    options: string[] | number[],\n    val: string | number | undefined\n  ) {\n    return html`<select\n      @change=\"${(e: Event) => {\n        const val = (<HTMLTextAreaElement>e.target)?.value;\n        this.actioner?.restAction(\n          entity,\n          `${action}?${opt}=${encodeURIComponent(val)}`\n        );\n      }}\"\n    >\n      ${options.map(\n        (option) =>\n          html`\n            <option value=\"${option}\" ?selected=\"${option == val}\">\n              ${option}\n            </option>\n          `\n      )}\n    </select>`;\n  }\n\n  private _range(\n    entity: entityConfig,\n    action: string,\n    opt: string,\n    value: string | number,\n    min?: string | undefined,\n    max?: string | undefined,\n    step = 1\n  ) {\n    if(entity.mode == 1) {\n      return html`<div class=\"range\">\n        <label>${min || 0}</label>\n        <input\n          type=\"${entity.mode == 1 ? \"number\" : \"range\"}\"\n          name=\"${entity.unique_id}\"\n          id=\"${entity.unique_id}\"\n          step=\"${step}\"\n          min=\"${min || Math.min(0, value as number)}\"\n          max=\"${max || Math.max(10, value as number)}\"\n          .value=\"${value}\"\n          @change=\"${(e: Event) => {\n            const val = (<HTMLTextAreaElement>e.target)?.value;\n            this.actioner?.restAction(entity, `${action}?${opt}=${val}`);\n          }}\"\n        />\n        <label>${max || 100}</label>\n      </div>`;      \n    } else {\n      return html`    \n      <esp-range-slider\n        name=\"${entity.unique_id}\"\n        step=\"${step}\"\n        min=\"${min}\"\n        max=\"${max}\"\n        .value=\"${value}\"\n        @state=\"${(e: CustomEvent) => {\n            const val = (<HTMLTextAreaElement>e.target)?.value;\n            this.actioner?.restAction(entity, `${action}?${opt}=${e.detail.state}`);\n          }}\"\n      ></esp-range-slider>`;\n    }\n\n  }\n\n  private _textinput(\n    entity: entityConfig,\n    action: string,\n    opt: string,\n    value: string | number,\n    min: number | undefined,\n    max: number | undefined,\n    pattern: string | undefined\n  ) {\n    return html`\n      <input\n        type=\"${entity.mode == 1 ? \"password\" : \"text\"}\"\n        name=\"${entity.unique_id}\"\n        id=\"${entity.unique_id}\"\n        minlength=\"${min || Math.min(0, value as number)}\"\n        maxlength=\"${max || Math.max(255, value as number)}\"\n        pattern=\"${pattern || \"\"}\"\n        .value=\"${value!}\"\n        @change=\"${(e: Event) => {\n          const val = (<HTMLTextAreaElement>e.target)?.value;\n          this.actioner?.restAction(\n            entity,\n            `${action}?${opt}=${encodeURIComponent(val)}`\n          );\n        }}\"\n      />\n    `;\n  }\n\n  private _colorpicker(entity: entityConfig, action: string, value: any) {\n    function u16tohex(d: number) {\n      return Number(d).toString(16).padStart(2, \"0\");\n    }\n    function rgb_to_str(rgbhex: string) {\n      const rgb = rgbhex\n        .match(/[0-9a-f]{2}/gi)\n        ?.map((x) => parseInt(x, 16)) || [0, 0, 0];\n      return `r=${rgb[0]}&g=${rgb[1]}&b=${rgb[2]}`;\n    }\n\n    return html`<div class=\"colorpicker\">\n      <input\n        type=\"color\"\n        name=\"${entity.unique_id}\"\n        id=\"${entity.unique_id}\"\n        value=\"#${u16tohex(value?.r)}${u16tohex(value?.g)}${u16tohex(value?.b)}\"\n        @change=\"${(e: Event) => {\n          const val = (<HTMLTextAreaElement>e.target)?.value;\n          this.actioner?.restAction(entity, `${action}?${rgb_to_str(val)}`);\n        }}\"\n      />\n    </div>`;\n  }\n\n  render_binary_sensor() {\n    if (!this.entity) return;\n    const isOn = this.entity.state == stateOn;\n    return html`<iconify-icon\n      class=\"binary_sensor_${this.entity.state?.toLowerCase()}\"\n      icon=\"mdi:checkbox-${isOn ? \"marked-circle\" : \"blank-circle-outline\"}\"\n      height=\"24px\"\n    ></iconify-icon>`;\n  }\n\n  render_date() {\n    if (!this.entity) return;\n    return html`\n      ${this._datetime(\n        this.entity,\n        \"date\",\n        \"set\",\n        \"value\",\n        this.entity.value,\n      )}\n    `;\n  }\n\n  render_time() {\n    if (!this.entity) return;\n    return html`\n      ${this._datetime(\n        this.entity,\n        \"time\",\n        \"set\",\n        \"value\",\n        this.entity.value,\n      )}\n    `;\n  }\n\n  render_datetime() {\n    if (!this.entity) return;\n    return html`\n      ${this._datetime(\n        this.entity,\n        \"datetime-local\",\n        \"set\",\n        \"value\",\n        this.entity.value,\n      )}\n    `;\n  }\n\n  render_switch() {\n    if (!this.entity) return;\n    if (this.entity.assumed_state)\n      return html`${this._actionButton(this.entity, \"❌\", \"turn_off\")}\n      ${this._actionButton(this.entity, \"✔️\", \"turn_on\")}`;\n    else return this._switch(this.entity);\n  }\n\n  render_fan() {\n    if (!this.entity) return;\n    return [\n      this.entity.speed,\n      \" \",\n      this.entity.speed_level,\n      this._switch(this.entity),\n      this.entity.speed_count\n        ? this._range(\n            this.entity,\n            `turn_${this.entity.state.toLowerCase()}`,\n            \"speed_level\",\n            this.entity.speed_level ? this.entity.speed_level : 0,\n            0,\n            this.entity.speed_count,\n            1\n          )\n        : \"\",\n    ];\n  }\n\n  render_light() {\n    if (!this.entity) return;\n    return [\n      html`<div class=\"entity\" style=\"\n      width: 100%;\">\n        ${this._switch(this.entity)}\n        ${this.entity.brightness\n          ? this._range(\n              this.entity,\n              \"turn_on\",\n              \"brightness\",\n              this.entity.brightness,\n              0,\n              255,\n              1\n            )\n          : \"\"}\n        ${this.entity.color_mode === \"rgb\" || this.entity.color_mode === \"rgbw\"\n          ? this._colorpicker(this.entity, \"turn_on\", this.entity?.color)\n          : \"\"}\n        ${this.entity.effects?.filter((v) => v != \"None\").length\n          ? this._select(\n              this.entity,\n              \"turn_on\",\n              \"effect\",\n              this.entity.effects || [],\n              this.entity.effect\n            )\n          : \"\"}\n      </div> `,\n    ];\n  }\n\n  render_lock() {\n    if (!this.entity) return;\n    return html`${this._actionButton(this.entity, \"🔐\", \"lock\", this.entity.state === \"LOCKED\")}\n    ${this._actionButton(this.entity, \"🔓\", \"unlock\", this.entity.state === \"UNLOCKED\")}\n    ${this._actionButton(this.entity, \"↑\", \"open\")} `;\n  }\n\n  render_cover() {\n    if (!this.entity) return;\n    return html`${this._actionButton(this.entity, \"↑\", \"open\", this.entity.state === \"OPEN\")}\n    ${this._actionButton(this.entity, \"☐\", \"stop\")}\n    ${this._actionButton(this.entity, \"↓\", \"close\", this.entity.state === \"CLOSED\")}`;\n  }\n\n  render_button() {\n    if (!this.entity) return;\n    return html`${this._actionButton(this.entity, \"PRESS\", \"press\")}`;\n  }\n\n  render_select() {\n    if (!this.entity) return;\n    return this._select(\n      this.entity,\n      \"set\",\n      \"option\",\n      this.entity.option || [],\n      this.entity.value\n    );\n  }\n\n  render_number() {\n    if (!this.entity) return;\n    return html`\n      ${this._range(\n        this.entity,\n        \"set\",\n        \"value\",\n        this.entity.value,\n        this.entity.min_value,\n        this.entity.max_value,\n        this.entity.step\n      )}\n      ${this.entity.uom}\n    `;\n  }\n\n  render_text() {\n    if (!this.entity) return;\n    return this._textinput(\n      this.entity,\n      \"set\",\n      \"value\",\n      this.entity.value,\n      this.entity.min_length,\n      this.entity.max_length,\n      this.entity.pattern\n    );\n  }\n\n  render_climate() {\n    if (!this.entity) return;\n    let target_temp_slider, target_temp_label, target_temp;\n    let current_temp = html`<div class=\"climate-row\" style=\"padding-bottom: 10px\";>\n                              <label>Current:&nbsp;${this.entity.current_temperature} °C</label>\n                            </div>`;\n    \n    if (\n      this.entity.target_temperature_low !== undefined &&\n      this.entity.target_temperature_high !== undefined\n    ) {\n      target_temp = html`\n        <div class=\"climate-row\">\n          <label>Target Low:&nbsp;</label>\n          ${this._range(\n            this.entity,\n            \"set\",\n            \"target_temperature_low\",\n            this.entity.target_temperature_low,\n            this.entity.min_temp,\n            this.entity.max_temp,\n            this.entity.step\n          )}\n        </div>\n        <div class=\"climate-row\">\n          <label>Target High:&nbsp;</label>\n          ${this._range(\n            this.entity,\n            \"set\",\n            \"target_temperature_high\",\n            this.entity.target_temperature_high,\n            this.entity.min_temp,\n            this.entity.max_temp,\n            this.entity.step\n          )}\n        </div>`;\n    } else {\n      target_temp = html`\n        <div class=\"climate-row\">\n          <label>Target:&nbsp;</label>\n          ${this._range(\n            this.entity,\n            \"set\",\n            \"target_temperature\",\n            this.entity.target_temperature!!,\n            this.entity.min_temp,\n            this.entity.max_temp,\n            this.entity.step\n          )}\n        </div>`;\n    }\n    let modes = html``;\n    if ((this.entity.modes ? this.entity.modes.length : 0) > 0) {\n      modes = html`\n        <div class=\"climate-row\">\n          <label>Mode:&nbsp;</label>\n          ${this._select(\n            this.entity,\n            \"set\",\n            \"mode\",\n            this.entity.modes || [],\n            this.entity.mode || \"\"\n          )}\n        </div>`;\n    }\n    return html`\n      <div class=\"climate-wrap\">\n        ${current_temp} ${target_temp} ${modes}\n      </div>\n    `;\n  }\n  render_valve() {\n    if (!this.entity) return;\n    return html`${this._actionButton(this.entity, \"OPEN\", \"open\", this.entity.state === \"OPEN\")}\n    ${this._actionButton(this.entity, \"☐\", \"stop\")}\n    ${this._actionButton(this.entity, \"CLOSE\", \"close\", this.entity.state === \"CLOSED\")}`;\n  }\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/entity-store.ts",
    "content": "// entity-store.ts\n\nimport { entityConfig } from \"./types\";\n\nclass EntityStore {\n  private entities = new Map<string, entityConfig>();\n  private listeners = new Set<(entity: entityConfig) => void>();\n\n  set(entity: entityConfig) {\n    this.entities.set(entity.unique_id, entity);\n    this.notify(entity);\n  }\n\n  get(entityId: string) {\n    return this.entities.get(entityId);\n  }\n\n  subscribe(cb: (entity: entityConfig) => void) {\n    this.listeners.add(cb);\n    return () => this.listeners.delete(cb);\n  }\n\n  private notify(entity: entityConfig) {\n    for (const cb of this.listeners) cb(entity);\n  }\n}\n\nexport const entityStore = new EntityStore();\n"
  },
  {
    "path": "webserver/packages/neato/src/esp-app.ts",
    "content": "import { LitElement, html, css, PropertyValues, nothing } from \"lit\";\nimport { customElement, state, query } from \"lit/decorators.js\";\n\nimport './api';\nimport \"./esp-log\";\nimport \"./custom-button\";\nimport \"./custom-table\";\nimport \"./esp-switch\";\nimport \"./esp-range-slider\";\nimport \"./esp-schedule\";\nimport \"./timezone-selector\";\nimport \"./manual-driving\";\nimport \"iconify-icon\";\nimport cssReset from \"./css/reset\";\nimport cssButton from \"./css/button\";\nimport cssApp from \"./css/app\";\nimport cssTab from \"./css/tab\";\nimport { BinarySensor, Button, Button_Gen2, Button_Gen3, ESPNumber, ESPText, Select, Select_gen3, Sensor, Switch, Switch_gen2, TextSensor } from \"./neato-enums\";\nimport { entityStore } from \"./entity-store\";\nimport { ActionRenderer } from \"./custom-table\";\nimport { getBasePath } from \"./utils\";\n\nwindow.source = new EventSource(getBasePath() + \"/events\");\nwindow.entities = [];\nconst _unknown_state_events: { [key: string]: number } = {};\n\nwindow.source?.addEventListener('state', (e: Event) => {\n  const messageEvent = e as MessageEvent;\n  const data = JSON.parse(messageEvent.data.replace(/[\\u0000-\\u001F\\u007F-\\u009F]/g, \"\"));\n  let idx = window.entities.findIndex((x) => x.unique_id === data.id);\n  if (idx != -1 && data.id) {\n    if (typeof data.value === 'number') {\n      let history = [...window.entities[idx].value_numeric_history];\n      history.push(data.value);\n      window.entities[idx].value_numeric_history = history.splice(-50);\n    }\n\n    delete data.id;\n    delete data.domain;\n    delete data.unique_id;\n    Object.assign(window.entities[idx], data);\n  } else {\n    // is it a `detail_all` event already?\n    if (data?.name) {\n      addEntity(data);\n    } else {\n      if (_unknown_state_events[data.id]) {\n        _unknown_state_events[data.id]++;\n      } else {\n        _unknown_state_events[data.id] = 1;\n      }\n      // ignore the first few events, maybe the esp will send a detail_all\n      // event soon\n      if (_unknown_state_events[data.id] < 1) {\n        return;\n      }\n\n      let parts = data.id.split('-');\n      let domain = parts[0];\n      let id = parts.slice(1).join('-');\n\n      fetch(`${window.apiBasePath}/${domain}/${id}?detail=all`, {\n        method: 'GET',\n      })\n        .then((r) => {\n          console.log(r);\n          if (!r.ok) {\n            throw new Error(`HTTP error! Status: ${r.status}`);\n          }\n          return r.json();\n        })\n        .then((data) => {\n          console.log(data);\n          addEntity(data);\n        })\n        .catch((error) => {\n          console.error('Fetch error:', error);\n        });\n    }\n  }\n});\n\n\nfunction addEntity(data: any) {\n  console.log(data);\n  let idx = window.entities.findIndex((x) => x.unique_id === data.id);\n  if (idx === -1 && data.id) {\n    // Dynamically add discovered..\n    let parts = data.id.split(\"-\");\n    let entity = {\n      ...data,\n      domain: parts[0],\n      unique_id: data.id,\n      id: parts.slice(1).join(\"-\"),\n      entity_category: data.entity_category,\n      value_numeric_history: [data.value],\n    };\n    entity.has_action = `render_${entity.domain}` in ActionRenderer.prototype\n\n    window.entities.push(entity);\n    entityStore.set(entity);\n  }\n\n}\n\ninterface Config {\n  ota: boolean;\n  log: boolean;\n  title: string;\n  comment: string;\n  lang: string;\n}\n\ninterface NBSConfig {\n  type: \"gen1\" | \"gen2\" | \"gen3\";\n  version: string;\n  comment: string;\n}\n\nfunction getRelativeTime(diff: number) {\n  const mark = Math.sign(diff);\n\n  if (diff === 0) return new Intl.RelativeTimeFormat(\"en\").format(0, \"second\");\n\n  const times = [\n    { type: \"year\", seconds: 12 * 30 * 24 * 60 * 60 * 1000 },\n    { type: \"month\", seconds: 30 * 24 * 60 * 60 * 1000 },\n    { type: \"week\", seconds: 7 * 24 * 60 * 60 * 1000 },\n    { type: \"day\", seconds: 24 * 60 * 60 * 1000 },\n    { type: \"hour\", seconds: 60 * 60 * 1000 },\n    { type: \"minute\", seconds: 60 * 1000 },\n    { type: \"second\", seconds: 1000 },\n  ];\n\n  let result = \"\";\n  const timeformat = new Intl.RelativeTimeFormat(\"en\");\n  let count = 0;\n  for (let t of times) {\n    const segment = Math.trunc(Math.abs(diff / t.seconds));\n    if (segment > 0) {\n      const part = timeformat.format(\n        segment * mark,\n        t.type as Intl.RelativeTimeFormatUnit\n      );\n      diff -= segment * t.seconds * mark;\n      // remove \"ago\" from the first segment - if not the only one\n      result +=\n        count === 0 && t.type != \"second\" ? part.replace(\" ago\", \" \") : part;\n      if (count++ >= 1) break; // do not display detail after two segments\n    }\n  }\n  return result;\n}\n\n@customElement(\"esp-app\")\nexport default class EspApp extends LitElement {\n  @state() scheme: string = \"\";\n  @state() ping: number = 0;\n  @state() connected: boolean = true;\n  @state() lastUpdate: number = 0;\n  @query(\"#beat\")\n  beat!: HTMLSpanElement;\n\n  @state() showLog: boolean = localStorage.showLog === \"true\";\n\n  version: String = import.meta.env.PACKAGE_VERSION;\n  config: Config = { ota: false, log: true, title: \"\", comment: \"\", lang: \"\" };\n  nbsconfig?: NBSConfig;\n\n  darkQuery: MediaQueryList = window.matchMedia(\"(prefers-color-scheme: dark)\");\n\n  frames = [{}, { color: \"rgba(0, 196, 21, 0.75)\" }, {}];\n\n  constructor() {\n    super();\n    const conf = document.querySelector(\"script#config\");\n    console.log(conf);\n    if (conf) this.setConfig(JSON.parse(conf.innerText));\n  }\n\n  setConfig(config: Config) {\n    if (!(\"log\" in config)) {\n      (config as any).log = this.config.log;\n    }\n    this.config = config;\n\n    document.title = config.title;\n    document.documentElement.lang = config.lang;\n\n    const [type, version, comment] = config.comment.split(\"|\");\n    this.nbsconfig = { type: type as NBSConfig[\"type\"], version, comment };\n  }\n\n  firstUpdated(changedProperties: PropertyValues) {\n    super.firstUpdated(changedProperties);\n    document.getElementsByTagName(\"head\")[0].innerHTML +=\n      '<meta name=viewport content=\"width=device-width, initial-scale=1,user-scalable=no\">';\n    const l = <HTMLLinkElement>document.querySelector(\"link[rel~='icon']\"); // Set favicon to house\n    l.href =\n      'data:image/svg+xml,<svg width=\"32\" height=\"32\" xmlns=\"http://www.w3.org/2000/svg\"><style>path{stroke-width:1;fill:black;stroke:black;stroke-linecap:round;stroke-linejoin:round}@media (prefers-color-scheme:dark){path{fill:white;stroke:white}}</style><path d=\"M1.3 18H5v10h21.8V18h3.7l-3.7-3.7V7.8h-2.4V12l-8.7-8.7L1.3 18Z\"/></svg>';\n    this.scheme = this.schemeDefault();\n    window.source.addEventListener(\"ping\", (e: MessageEvent) => {\n      if (e.data?.length) {\n        const data = JSON.parse(e.data);\n        if (data.title !== undefined) {\n          this.setConfig(data);\n          this.requestUpdate();\n        }\n      }\n      this._updateUptime(e);\n      this.lastUpdate = Date.now();\n    });\n    window.source.addEventListener(\"log\", (e: MessageEvent) => {\n      this._updateUptime(e);\n      this.lastUpdate = Date.now();\n    });\n    window.source.addEventListener(\"state\", (e: MessageEvent) => {\n      this.lastUpdate = Date.now();\n    });\n    window.source.addEventListener(\"error\", (e: Event) => {\n      console.dir(e);\n      //console.log(\"Lost event stream!\")\n      this.connected = false;\n      this.requestUpdate();\n    });\n    setInterval(() => {\n      this.connected = !!this.ping && Date.now() - this.lastUpdate < 15000;\n    }, 5000);\n    document.addEventListener('entity-tab-header-double-clicked', (e) => {\n      const mainElement = this.shadowRoot?.querySelector('main.flex-grid-half');\n      mainElement?.classList.toggle('expanded_entity');\n    });\n    document.addEventListener('log-tab-header-double-clicked', (e) => {\n      const mainElement = this.shadowRoot?.querySelector('main.flex-grid-half');\n      mainElement?.classList.toggle('expanded_logs');\n    });\n  }\n\n  schemeDefault() {\n    return this.darkQuery.matches ? \"dark\" : \"light\";\n  }\n\n  updated(changedProperties: Map<string, unknown>) {\n    super.updated(changedProperties);\n    if (changedProperties.has(\"scheme\")) {\n      let el = document.documentElement;\n      document.documentElement.style.setProperty(\"color-scheme\", this.scheme);\n    }\n    if (changedProperties.has(\"ping\")) {\n      if (!!this.ping) this.beat.animate(this.frames, 1000);\n    }\n  }\n\n  uptime() {\n    return `${getRelativeTime(-this.ping | 0)}`;\n  }\n\n  renderOta() {\n    if (this.config.ota) {\n      let basePath = getBasePath();\n      return html`\n        <form\n          method=\"POST\"\n          action=\"${basePath}/update\"\n          enctype=\"multipart/form-data\"\n        >\n          <input class=\"btn\" type=\"file\" name=\"update\" accept=\"application/octet-stream\" />\n          <input class=\"btn\" type=\"submit\" value=\"Update\" />\n        </form>`;\n    }\n  }\n\n  renderLog() {\n    if (!this.config.log || !this.showLog) return nothing;\n\n    return html`\n    <section id=\"col_logs\" class=\"col\">\n      <esp-log rows=\"50\" .scheme=\"${this.scheme}\"></esp-log>\n    </section>\n  `;\n  }\n\n\n  renderTitle() {\n    return html`\n      <h1>${this.config.title || html`&nbsp;`}</h1>\n<div>\n        ${[this.nbsconfig?.comment, `started ${this.uptime()}`, this.nbsconfig?.version]\n        .filter((n) => n)\n        .map((e) => `${e}`)\n        .join(\" · \")}\n      </div>\n    `;\n  }\n\n  /**\n   * \n   *      \n   */\n\n  render() {\n    return html`\n     <header>\n        <iconify-icon\n          .icon=\"${!!this.connected ? \"mdi:circle\" : \"mdi:circle-off-outline\"}\"\n          .title=\"${this.uptime()}\"\n          class=\"top-icon ${!!this.connected ? \"connected\" : \"\"}\"\n          id=\"beat\"\n        ></iconify-icon>\n        <a\n          href=\"#\"\n          id=\"scheme\"\n          @click=\"${() => {\n        this.scheme = this.scheme !== \"dark\" ? \"dark\" : \"light\";\n      }}\"\n        >\n          <iconify-icon\n            icon=\"mdi:theme-light-dark\"\n            class=\"top-icon\"\n          ></iconify-icon>\n        </a>\n\n\n\n        ${this.renderTitle()}\n      </header>\n\n    <div class=\"main-grid\">\n      <div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center;\">\n        <div style=\"display:flex;gap:1rem;flex-direction:column;width:100%;\">\n        <div class=\"main-buttons\">\n          <custom-button click=\"${Button.house_clean}\"></custom-button>\n          <custom-button click=\"${Button.spot_clean}\"></custom-button>\n          <custom-button click=\"${Button.locate_robot}\"></custom-button>\n          ${this.nbsconfig?.type === \"gen3\" ? html`<custom-button click=\"${Button_Gen3.send_to_base}\"></custom-button>` : nothing}\n          ${this.nbsconfig?.type === \"gen2\" ? html`<custom-button click=\"${Button_Gen2.send_to_start}\"></custom-button>` : nothing}\n\n          <custom-button click=\"${Button.pause_cleaning}\"></custom-button>\n          <custom-button click=\"${Button.resume_cleaning}\"></custom-button>\n          <custom-button click=\"${Button.stop_cleaning}\"></custom-button>\n          <custom-button click=\"${Button.update_status}\"></custom-button>\n\n          <custom-button click=\"${Button.shutdown}\"></custom-button>\n          <custom-button click=\"${Button.powercycle}\"></custom-button>\n          <custom-button click=\"${Button.reboot_esp}\"></custom-button>\n          <custom-button name=\"Clear Errors\" click=\"${Button.clear_errors}\"></custom-button>\n\n        </div>\n\n          ${this.nbsconfig?.type === \"gen3\" ? html`\n              <hr style=\"width: 100%;\">\n      <custom-table .entityIds=\"${[\n          TextSensor.last_cleaning_time,\n          TextSensor.last_cleaning_type,\n          Sensor.last_cleaning_duration\n        ]}\"></custom-table> \n              ` : nothing}\n\n      </div>\n\n      </div>\n      <div style=\"display:flex;justify-content:center;flex-direction:column;\">\n        <custom-table \n          .entityIds=\"${[\n        Sensor.fuel_percent,\n        BinarySensor.ext_power_present,\n        TextSensor.ui_state,\n        TextSensor.robot_error,\n        TextSensor.robot_alert,\n        TextSensor.nbs_time,\n      ]}\" \n      .customNames=\"${{ [BinarySensor.ext_power_present]: \"Docked\" }}\"\n          .customValues=\"${{ \n            [TextSensor.robot_error]: (value: string) => value.startsWith(\"200\") ? \"No errors\" : value,\n            [TextSensor.robot_alert]: (value: string) => value.startsWith(\"200\") ? \"No alerts\" : value,\n           }}\"\n      ></custom-table>\n        <hr style=\"width: 100%;\">\n        <custom-table .entityIds=\"${[ESPNumber.spot_clean_height, ESPNumber.spot_clean_width]}\"></custom-table>\n        <custom-button name=\"Spot Clean\" click=\"${Button_Gen3.spot_clean__height___width_}\" style=\"align-self:center;\"></custom-button>\n      </div>\n    </div>\n\n\n    \n    <div class=\"main-grid\">\n      <div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center;\">\n        \n        ${this.nbsconfig?.type === \"gen2\" ? html`<custom-table style=\"width:50%\" .entityIds=\"${[Switch_gen2.robot_schedule]}\"></custom-table>` : nothing}\n        <esp-schedule style=\"width:50%\"></esp-schedule>\n\n      </div>\n      <div style=\"display:flex;justify-content:center;flex-direction:column;\">\n        <custom-table .entityIds=\"${[\n        Select_gen3.navigation_mode,\n        Switch.test_mode,\n        Switch.eco_mode,\n        Switch.play_extra_sounds,\n\n        Switch.click_sounds,\n        Switch.melody_sounds,\n        Switch.warning_sounds,\n        Switch.bin_full_detect,\n        ...(this.nbsconfig?.type === \"gen2\" ? [\n          Switch_gen2.autoshutdown,\n          Switch_gen2.stealthled\n        ] : []),\n        Switch.led,\n        Switch.wall_enable,\n        Switch.intenseclean,\n        Switch.wifi,\n      ]}\"></custom-table>\n\n      </div>\n    </div>\n\n\n    <div class=\"main-grid\">\n      <div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center;\">\n          ${this.nbsconfig?.type === \"gen3\" ? html`<manual-driving></manual-driving>` : nothing}\n\n            \n\n      </div>\n      <div style=\"display:flex;justify-content:center;flex-direction:column;\">\n\n      <custom-table .entityIds=\"${[\n        TextSensor.model,\n        TextSensor.software,\n        TextSensor.serial_number,\n        BinarySensor.battery_failure,\n        BinarySensor.battery_over_temp,\n        Sensor.battery_cycles,\n        Sensor.battery_voltage_v,\n        Sensor.battery_temp_c_avg,\n        ESPText.timezone,\n        ESPText.schedule,\n        Select.logger\n      ]}\"></custom-table>\n      </div>\n    </div>\n\n\n\n    <div class=\"main-grid\">\n      <div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center;\">\n        <timezone-selector></timezone-selector>\n\n      </div>\n      <div style=\"display:flex;justify-content:center;flex-direction:column;align-items:center;\">\n\n      <span class=\"helper\">\n        The manual for the Webserver can be found <a href=\"https://github.com/Philip2809/neato-brainslug/blob/main/manual.md\" target=\"_blank\">here</a>.\n      </span>\n      \n\n              <!-- <span class=\"helper\">\n              If you want to use the default ESPHome Webserver or a beta version by pasting a custom link, press <a href=\"\" onclick=\"localStorage.pickWebserver = '0';location.reload();\">here</a>.\n            </span> -->\n\n      <span class=\"helper\">\n        When new updates for Neato Brainslug is out, you can easily update your device by uploading the OTA file here!\n      </span>\n        ${this.renderOta()}\n\n        <span class=\"helper\" style=\"display: flex;align-items: center;\">\n          <code>Type: ${this.nbsconfig?.type}</code> &nbsp; &nbsp; &nbsp;\n          Toggle the debug logs:&nbsp;\n              <a\n            href=\"#\"\n            title=\"Toggle log\"\n            @click=\"${() => {\n        this.showLog = !this.showLog;\n        localStorage.showLog = String(this.showLog);\n      }}\"\n                >\n            <iconify-icon\n              style=\"font-size:2rem;color:rgba(177, 177, 177, 0.8);\"\n              icon=\"mdi:console\"\n              class=\"top-icon\"\n            ></iconify-icon>\n          </a>\n\n        </span>\n\n\n      </div>\n    </div>\n\n\n\n      \n\n      \n\n        ${this.renderLog()}\n    `;\n  }\n\n  private _updateUptime(e: MessageEvent) {\n    if (e.lastEventId) {\n      this.ping = parseInt(e.lastEventId);\n      this.connected = true;\n      this.requestUpdate();\n    }\n  }\n\n  static get styles() {\n    return [cssReset, cssButton, cssApp, cssTab];\n  }\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/esp-log.ts",
    "content": "import { html, css, LitElement } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport cssTab from \"./css/tab\";\n\ninterface recordConfig {\n  type: string;\n  level: string;\n  tag: string;\n  detail: string;\n  when: string;\n}\n\n@customElement(\"esp-log\")\nexport class DebugLog extends LitElement {\n  @property({ type: Number }) rows = 10;\n  @property({ type: String }) scheme = \"\";\n  @state() logs: recordConfig[] = [];\n\n  constructor() {\n    super();\n  }\n\n  connectedCallback() {\n    super.connectedCallback();\n    window.source?.addEventListener(\"log\", this.handleLog);\n  }\n\n  disconnectedCallback(): void {\n    window.source?.removeEventListener(\"log\", this.handleLog);\n    super.disconnectedCallback();\n  }\n\n  handleLog = (e: Event) => {\n    const messageEvent = e as MessageEvent;\n    const d: String = messageEvent.data;\n\n    const types: Record<string, string> = {\n      \"\u001b[1;31m\": \"e\",\n      \"\u001b[0;33m\": \"w\",\n      \"\u001b[0;32m\": \"i\",\n      \"\u001b[0;35m\": \"c\",\n      \"\u001b[0;36m\": \"d\",\n      \"\u001b[0;37m\": \"v\",\n    };\n\n    // Extract the type from the color code\n    const type = types[d.slice(0, 7)];\n    if (!type) {\n      // No color code, skip\n      return;\n    }\n\n    // Extract content without color codes and ANSI termination\n    const content = d.slice(7, d.length - 4);\n\n    // Split by newlines to handle multi-line messages\n    const lines = content.split('\\n');\n\n    // Process the first line to extract metadata\n    const firstLine = lines[0];\n    const parts = firstLine.slice(3).split(\":\");\n    const tag = parts.slice(0, 2).join(\":\");\n    const firstDetail = firstLine.slice(5 + tag.length);\n    const level = firstLine.slice(0, 3);\n    const when = new Date().toTimeString().split(\" \")[0];\n\n\n    // Create a log record for each line\n    lines.forEach((line, index) => {\n      console.log(\"ESP_LOG\", line);\n      const record = {\n        type: type,\n        level: level,\n        tag: tag,\n        detail: index === 0 ? firstDetail : line,\n        when: when,\n      } as recordConfig;\n      this.logs.push(record);\n    });\n\n    this.logs = this.logs.slice(-this.rows);\n  }\n\n  render() {\n    return html`\n      <div \n        class=\"tab-header\"\n        @dblclick=\"${this._handleTabHeaderDblClick}\"\n      >\n        Debug Log\n      </div>\n      <div class=\"tab-container\">\n        <div class=\"logs\" color-scheme=\"${this.scheme}\">\n          <div class=\"thead trow\">\n            <div>Time</div>\n            <div>Level</div>\n            <div>Tag</div>\n            <div>Message</div>\n          </div>\n          <div class=\"tbody\">\n            ${this.logs.map(\n      (log: recordConfig) =>\n        html`\n              <div class=\"trow ${log.type}\">\n                <div>${log.when}</div>\n                <div>${log.level}</div>\n                <div>${log.tag}</div>\n                <div>${log.detail}</div>\n              </td>\n            `\n    )}\n          </div>\n        </div>\n      </div>\n    `;\n  }\n\n  _handleTabHeaderDblClick(e: Event) {\n    const doubleClickEvent = new CustomEvent('log-tab-header-double-clicked', {\n      bubbles: true,\n      composed: true,\n    });\n    e.target?.dispatchEvent(doubleClickEvent);\n  }\n\n  static get styles() {\n    return [\n      cssTab,\n      css`\n        .thead,\n        .tbody .trow:nth-child(2n) {\n          background-color: rgba(127, 127, 127, 0.05);\n        }\n        .trow div {\n          font-family: monospace;\n          width: 100%;\n          line-height: 1.2rem;\n        }\n        .trow {\n          display: flex;\n        }\n        .thead {\n          line-height: 1rem;\n        }\n        .thead .trow {\n          text-align: left;\n          padding: 0.25rem 0.5rem;\n        }\n        .trow {\n          display: flex;\n        }\n        .trow > div {\n          align-self: flex-start;\n          padding-right: 0.25em;\n          flex: 2 0;\n          min-width: 70px;\n\n        }\n        .trow > div:nth-child(2) {\n          flex: 1 0;          \n          overflow: hidden;\n          text-overflow: ellipsis;\n          max-width: 40px;\n        }\n        .trow > div:nth-child(3) {\n          flex: 3 0;\n          overflow: hidden;\n          text-overflow: ellipsis;\n        }\n        .trow > div:last-child {\n          flex: 15 0;\n          padding-right: 0em;\n          overflow: hidden;\n          text-overflow: ellipsis;\n        }\n        pre {\n          margin: 0;\n        }\n        .v {\n          color: #888888;\n        }\n        .d {\n          color: #00dddd;\n        }\n        .c {\n          color: magenta;\n        }\n        .i {\n          color: limegreen;\n        }\n        .w {\n          color: yellow;\n        }\n        .e {\n          color: red;\n          font-weight: bold;\n        }\n        .logs[color-scheme=\"light\"] {\n          font-weight: bold;\n        }\n        .logs[color-scheme=\"light\"] .w {\n          color: #cccc00;\n        }\n        .logs[color-scheme=\"dark\"] .d {\n          color: #00aaaa;\n        }\n        .logs {\n          overflow-x: auto;\n          border-radius: 12px;\n          border-width: 1px;\n          border-style: solid;\n          border-color: rgba(127, 127, 127, 0.12);\n          transition: all 0.3s ease-out 0s;\n          font-size: 14px;\n          padding: 16px;\n        }\n        @media (max-width: 1024px) {\n          .trow > div:nth-child(2) {\n            display: none !important;\n          }\n        }\n      `,\n    ];\n  }\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/esp-range-slider.ts",
    "content": "import { html, css, LitElement } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport cssReset from \"./css/reset\";\n\nconst inputRangeID: string = \"range\";\nconst currentValueID: string = \"rangeValue\";\nconst pressTimeToShowPopup = 500;\n\n@customElement(\"esp-range-slider\")\nexport class EspRangeSlider extends LitElement {\n  private inputRange: HTMLInputElement | null = null;\n  private currentValue: HTMLInputElement | null = null;\n\n  private longPressTimer: ReturnType<typeof setTimeout> | null = null;\n  private isPopupInputVisible: boolean = false;\n\n  @property({ type: String }) value = 0;\n  @property({ type: String }) min = 0;\n  @property({ type: String }) max = 0;\n  @property({ type: String }) step = 0;\n  @property({ type: String }) name = \"\";\n\n  protected firstUpdated(\n    _changedProperties: Map<string | number | symbol, unknown>\n  ): void {\n    this.inputRange = this.shadowRoot?.getElementById(\n      inputRangeID\n    ) as HTMLInputElement;\n\n    this.currentValue = this.shadowRoot?.getElementById(\n      currentValueID\n    ) as HTMLInputElement;\n    document.addEventListener('mousedown', (event) => {\n      if(!document.querySelector('.popup-number-input')) {\n        return;\n      }\n      const isClickedOutside = !document.querySelector('.popup-number-input')?.contains(event.target as Node);      \n      if (isClickedOutside && this.isPopupInputVisible) {\n        this.deletePopupInput();\n      }\n    });    \n  }  \n  \n  protected updated(): void {\n    this.updateCurrentValueOverlay();\n  }\n\n  onMouseDownCurrentValue(event: MouseEvent): void {\n    this.longPressTimer = setTimeout(() => {\n      this.showPopupInput(event.pageX, event.pageY);\n    }, pressTimeToShowPopup); \n  }\n  \n  onMouseUpCurrentValue(event: MouseEvent): void {\n    if (this.longPressTimer && !this.isPopupInputVisible) {\n      clearTimeout(this.longPressTimer);\n      this.longPressTimer = null;\n    }\n  }\n  \n  onTouchStartCurrentValue(event: TouchEvent): void {\n    this.longPressTimer = setTimeout(() => {      \n      this.showPopupInput(event.touches[0].pageX,event.touches[0].pageY);\n    }, pressTimeToShowPopup); \n  }\n  \n  onTouchEndCurrentValue(event: TouchEvent): void {\n    if (this.longPressTimer && !this.isPopupInputVisible) {\n      clearTimeout(this.longPressTimer);\n      this.longPressTimer = null;\n    }\n  }\n  \n  deletePopupInput(): void {\n    const popupInputElement = document.querySelector('.popup-number-input');\n    if (popupInputElement) {\n      popupInputElement.remove();\n    }\n    this.isPopupInputVisible = false;\n  }\n\n  showPopupInput(x: number, y: number): void {\n    const popupInputElement = document.createElement('input');\n    popupInputElement.type = 'number'; \n    popupInputElement.value = this.inputRange.value;\n    popupInputElement.min = this.inputRange.min;\n    popupInputElement.max = this.inputRange.max;\n    popupInputElement.step = this.inputRange.step;\n    popupInputElement.classList.add('popup-number-input');\n\n    const styles = `\n    position: absolute;\n    left: ${x}px;\n    top: ${y}px;\n    width: 50px;\n    -webkit-appearance: none;\n    margin: 0;\n    `;  \n    popupInputElement.setAttribute('style', styles);\n    document.body.appendChild(popupInputElement);\n\n    popupInputElement.addEventListener('contextmenu', (event) => {\n      event.preventDefault();\n    });\n\n    popupInputElement.addEventListener('change', (ev: Event) =>{\n      let input = ev.target as HTMLInputElement;\n      this.inputRange.value = input?.value;\n\n      var event = new Event('input');    \n      this.inputRange?.dispatchEvent(event);\n      var event = new Event('change');    \n      this.inputRange?.dispatchEvent(event);\n    });\n\n    popupInputElement.addEventListener('keydown', (event) => {\n      if (event.key === 'Enter') {\n        this.deletePopupInput();\n      }\n    });\n\n    popupInputElement.focus();\n    this.isPopupInputVisible = true;\n  }\n\n  updateCurrentValueOverlay(): void {\n    const newValueAsPercent = Number( (this.inputRange.value - this.inputRange.min) * 100 / (this.inputRange.max - this.inputRange.min) ),\n    newPosition = 10 - (newValueAsPercent * 0.2);\n    this.currentValue.innerHTML = `<span>${this.inputRange?.value}</span>`;\n    this.currentValue.style.left = `calc(${newValueAsPercent}% + (${newPosition}px))`;\n\n    const spanTooltip = this.currentValue?.querySelector('span');\n    spanTooltip?.addEventListener('mousedown', this.onMouseDownCurrentValue.bind(this));\n    spanTooltip?.addEventListener('mouseup', this.onMouseUpCurrentValue.bind(this));\n    spanTooltip?.addEventListener('touchstart', this.onTouchStartCurrentValue.bind(this));\n    spanTooltip?.addEventListener('touchend', this.onTouchEndCurrentValue.bind(this));\n\n    spanTooltip?.addEventListener('contextmenu', (event) => {\n      event.preventDefault();\n    });\n  }\n\n  onInputEvent(ev: Event): void {\n    this.updateCurrentValueOverlay();\n  }\n\n  onInputChangeEvent(ev: Event): void {\n    this.sendState(this.inputRange?.value);\n  }\n\n  sendState(value: string|undefined): void {\n    let event = new CustomEvent(\"state\", {\n      detail: {\n        state: value,\n        id: this.id,\n      },\n    });\n    this.dispatchEvent(event); \n  }\n\n  render() {\n    return html`\n      <div class=\"range-wrap\">\n        <label>${this.min || 0}</label>\n        <div class=\"slider-wrap\">\n          <div class=\"range-value\" id=\"rangeValue\"></div>\n            <input\n              id=\"${inputRangeID}\"\n              type=\"range\"\n              name=\"${this.name}\"\n              step=\"${this.step}\"\n              min=\"${this.min || Math.min(0, this.value)}\"\n              max=\"${this.max || Math.max(10, this.value)}\"\n              .value=\"${this.value}\"\n              @input=\"${this.onInputEvent}\"\n              @change=\"${this.onInputChangeEvent}\"\n            />\n        </div>\n        <label style=\"text-align: left;\">${this.max || 100}</label>\n      </div>\n    `;\n  }\n\n  static get styles() {\n    return [\n      cssReset,\n      css`\n        :host {\n          min-width: 150px;\n          flex: 1;\n        }\n        input[type=range] {\n          background: transparent;\n          -webkit-appearance: none;\n          appearance: none;\n          margin: 20px 0;\n          width: 100%;\n          touch-action: none;\n        }\n        input[type=range]:focus {\n          outline: none;\n        }\n        input[type=range]::-webkit-slider-runnable-track {\n          width: 100%;\n          height: 4px;\n          cursor: pointer;\n          animate: 0.2s;\n          background: #03a9f4;\n          border-radius: 25px;\n        }\n        input[type=range]::-moz-range-track {\n          width: 100%;\n          height: 4px;\n          cursor: pointer;\n          animate: 0.2s;\n          background: #03a9f4;\n          border-radius: 25px;\n        }\n        input[type=range]::-ms-track {\n          background: transparent;\n          width: 100%;\n          height: 4px;\n          cursor: pointer;\n          animate: 0.2s;\n          background: transparent;\n          border-color: transparent;\n          color: transparent;\n        }\n        input[type=range]::-ms-fill-lower {\n          background: #03a9f4;\n          border-radius: 25px;\n        }\n        input[type=range]::-ms-fill-upper {\n          background: #03a9f4;\n          border-radius: 25px;\n        }\n        input[type=range]::-webkit-slider-thumb {\n          height: 20px;\n          width: 20px;\n          border-radius: 50%;\n          background: #fff;\n          box-shadow: 0 0 4px 0 rgba(0,0,0, 1);\n          cursor: pointer;\n          -webkit-appearance: none;\n          margin-top: -8px;\n        }\n        input[type=range]::-moz-range-thumb {\n          height: 20px;\n          width: 20px;\n          border-radius: 50%;\n          background: #fff;\n          box-shadow: 0 0 4px 0 rgba(0,0,0, 1);\n          cursor: pointer;\n          border: none;\n        }\n        input[type=range]::-ms-thumb {\n          height: 20px;\n          width: 20px;\n          border-radius: 50%;\n          background: #fff;\n          box-shadow: 0 0 4px 0 rgba(0,0,0, 1);\n          cursor: pointer;\n          border: none;\n        }\n        input[type=range]:focus::-webkit-slider-runnable-track {\n          background: #03a9f4;\n        }\n        input[type=range]:focus::-moz-range-track {\n          background: #03a9f4;\n        }\n        input[type=range]:focus::-ms-fill-lower {\n          background: #03a9f4;\n        }\n        input[type=range]:focus::-ms-fill-upper {\n          background: #03a9f4;\n        }\n        .range-wrap {\n          display: flex;\n          align-items: center;\n        }\n        .slider-wrap {\n          flex-grow: 1;\n          margin: 0px 15px;\n          position: relative;\n        }\n        .range-value {\n          position: absolute;\n          top: -50%;\n        }\n        .range-value span {\n          padding: 0 3px 0 3px;\n          height: 19px;\n          line-height: 18px;\n          text-align: center;\n          background: #03a9f4;\n          color: #fff;\n          font-size: 11px;\n          display: block;\n          position: absolute;\n          left: 50%;\n          transform: translate(-50%, +80%);\n          border-radius: 6px;\n        }\n        @-moz-document url-prefix() {\n          .range-value span {\n            transform: translate(-50%, +150%);\n          }\n        }\n        .range-value span:before {\n          content: \"\";\n          position: absolute;\n          width: 0;\n          height: 0;\n          border-top: 10px solid #03a9f4;\n          border-left: 5px solid transparent;\n          border-right: 5px solid transparent;\n          top: 100%;\n          left: 50%;\n          margin-left: -5px;\n          margin-top: -1px;\n          pointer-events: none;\n        }\n      `,\n    ];\n  }\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/esp-schedule.ts",
    "content": "import { LitElement, html, css } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { entityConfig } from \"./types\";\nimport { entityStore } from \"./entity-store\";\nimport { setText } from \"./api\";\n\n@customElement(\"esp-schedule\")\nexport class WeeklySchedule extends LitElement {\n    static styles = css`\n  :host {\n    display: block;\n    /* max-width: 420px; */\n  }\n\n  .row {\n    display: grid;\n    grid-template-columns: 44px 1fr auto;\n    align-items: center;\n    gap: 10px;\n    padding: 6px 0;\n  }\n\n  .row.global {\n    grid-template-columns: 1fr auto;\n    padding-bottom: 10px;\n    border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n    margin-bottom: 8px;\n  }\n\n  label {\n    font-size: 0.95rem;\n    font-weight: bold;\n  }\n\n  .day-disabled label {\n    opacity: 0.5;\n  }\n\n  input[type=\"text\"] {\n    background: #2b2b2b;\n    color: #fff;\n    border: 1px solid #444;\n    border-radius: 8px;\n    padding: 6px 8px;\n    font-size: 0.9rem;\n    width: 70px;\n    text-align: center;\n  }\n\n  input[type=\"text\"]:disabled {\n    opacity: 0.4;\n  }\n\n  .time {\n    display: flex;\n    align-items: center;\n    gap: 6px;\n  }\n\n  .time input {\n    width: 36px;\n    padding: 6px 4px;\n    text-align: center;\n    font-size: 0.9rem;\n  }\n\n  .hour,\n  .minute {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n  }\n\n  .sep {\n    opacity: 0.6;\n  }\n\n  .arrow {\n    border: none;\n    background: transparent;\n    color: #aaa;\n    font-size: 10px;\n    line-height: 10px;\n    cursor: pointer;\n  }\n\n  .arrow:hover {\n    color: #6aa9ff;\n  }\n\n  .arrow:disabled {\n    opacity: 0.3;\n    cursor: default;\n  }\n\n  .switch {\n    position: relative;\n    width: 44px;\n    height: 24px;\n    border-radius: 999px;\n    background: #555;\n    cursor: pointer;\n    transition: background 0.2s ease;\n  }\n\n  .switch::after {\n    content: \"\";\n    position: absolute;\n    top: 2px;\n    left: 2px;\n    width: 20px;\n    height: 20px;\n    border-radius: 50%;\n    background: #fff;\n    transition: transform 0.2s ease;\n  }\n\n  .switch.on {\n    background: #3b82f6;\n  }\n\n  .switch.on::after {\n    transform: translateX(20px);\n  }\n`;\n    \n@property({ type: String }) entityId = \"text-scheduleset\";\n    private unsubscribe?: () => void;\n    private entity?: entityConfig;\n\n    connectedCallback() {\n        super.connectedCallback();\n        this.unsubscribe = entityStore.subscribe(() => {\n            const entity = entityStore.get(this.entityId);\n            if (entity) {\n                this.entity = entity;\n                this.setFromString(this.entity.value);\n            }\n        });\n    }\n\n    disconnectedCallback() {\n        this.unsubscribe?.();\n        super.disconnectedCallback();\n    }\n\n    private days = [\n        \"Sunday\",\n        \"Monday\",\n        \"Tuesday\",\n        \"Wednesday\",\n        \"Thursday\",\n        \"Friday\",\n        \"Saturday\",\n    ];\n\n    @state() globalEnabled = true;\n    @state() dayEnabled = Array(7).fill(true);\n    @state() values = Array(7).fill(0); // 0–143\n\n    private buildFlags(): number {\n        let flags = this.globalEnabled ? 1 : 0;\n        this.dayEnabled.forEach((en, i) => {\n            if (en) flags |= 1 << (i + 1);\n        });\n        return flags;\n    }\n\n    private scheduleString(): string {\n        const flags = this.buildFlags();\n        return [\n            flags,\n            ...this.values,\n        ].join(\",\");\n    }\n\n    private emit() {\n        const value = this.scheduleString();\n        console.log(value);\n\n        if (!this.entity) return;\n        this.requestUpdate();\n        setText(this.entity, value);\n    }\n\n    setFromString(str: string) {\n        const parts = str.split(\",\").map(s => Number(s.trim()));\n\n        // safety check\n        if (parts.length !== 8 || parts.some(isNaN)) return;\n\n        const flags = parts[0];\n        this.globalEnabled = (flags & 0x01) === 0x01; // first bit\n\n        for (let i = 0; i < 7; i++) {\n            this.dayEnabled[i] = ((flags >> (i + 1)) & 0x01) === 0x01;\n            this.values[i] = this.clampValue(parts[i + 1]);\n        }\n\n        this.requestUpdate();\n    }\n\n    clampValue(v: number) {\n        if (isNaN(v)) return 0;\n        if (v < 0) return 0;\n        if (v > 143) return 143;\n        return v;\n    }\n\n    private valueToHM(v: number) {\n        return {\n            h: Math.floor(v / 6),\n            m: (v % 6) * 10,\n        };\n    }\n\n    private pad2(n: number): string {\n        return String(n).padStart(2, \"0\");\n    }\n\n    private roundMinute(m: number): number {\n        m = Math.round(m / 10) * 10;\n        if (m < 0) return 0;\n        if (m > 50) return 50;\n        return m;\n    }\n\n    private hmToValue(h: number, m: number): number | null {\n        if (h < 0 || h > 23) return null;\n        m = this.roundMinute(m);\n        return h * 6 + m / 10;\n    }\n\n    private adjustMinute(i: number, delta: number) {\n        const { h, m } = this.valueToHM(this.values[i]);\n        let nm = m + delta;\n\n        if (nm > 50) nm = 50;\n        if (nm < 0) nm = 0;\n\n        const v = this.hmToValue(h, nm);\n        if (v !== null) {\n            this.values[i] = v;\n            this.emit();\n        }\n    }\n\n    private adjustHour(i: number, delta: number) {\n        const { h, m } = this.valueToHM(this.values[i]);\n        let nh = h + delta;\n\n        if (nh < 0) nh = 23;\n        if (nh > 23) nh = 0;\n\n        const v = this.hmToValue(nh, m);\n        if (v !== null) {\n            this.values[i] = v;\n            this.emit();\n        }\n    }\n\n    render() {\n        if (!this.entity) return html `<span>loading...</span>`\n        return html`\n        <div class=\"row global\">\n            <label>ESP Schedule</label>\n            <div class=\"switch ${this.globalEnabled ? \" on\" : \"\"}\" @click=${() => {\n                this.globalEnabled = !this.globalEnabled;\n                this.emit();\n            }}></div>\n            </div>\n\n            ${this.days.map((day, i) => html`\n                <div class=\"row ${(!this.dayEnabled[i] || !this.globalEnabled) ? \" day-disabled\" : \"\"}\">\n                    <div class=\"switch ${this.dayEnabled[i] ? \" on\" : \"\"}\" @click=${() => {\n                    this.dayEnabled[i] = !this.dayEnabled[i];\n                    this.emit();\n                }}></div>\n                <label>${day}</label>\n\n                <div class=\"time\">\n                    <div class=\"hour\">\n                        <button class=\"arrow\" @click=${() => this.adjustHour(i, +1)} ?disabled=${!this.dayEnabled[i] || !this.globalEnabled}>▲</button>\n                        <input type=\"text\" inputmode=\"numeric\" maxlength=\"2\" readonly .value=${this.pad2(this.valueToHM(this.values[i]).h)}\n                            ?disabled=${!this.dayEnabled[i] || !this.globalEnabled} @blur=${(e: any) => {\n                    let h = Number(e.target.value);\n                    if (isNaN(h)) h = 0;\n                    if (h < 0) h = 0; if (h > 23) h = 23;\n\n                    const { m } = this.valueToHM(this.values[i]);\n                    const v = this.hmToValue(h, m);\n                    if (v !== null) {\n                        this.values[i] = v;\n                        e.target.value = this.pad2(h);\n                        this.emit();\n                    }\n                }}/>\n                        <button class=\"arrow\" @click=${() => this.adjustHour(i, -1)}    ?disabled=${!this.dayEnabled[i] || !this.globalEnabled}>▼</button>\n                    </div>\n\n\n                    <span class=\"sep\">:</span>\n                    <div class=\"minute\">\n                        <button class=\"arrow\" @click=${() => this.adjustMinute(i, +10)} ?disabled=${!this.dayEnabled[i] || !this.globalEnabled}>▲</button>\n                        <input type=\"text\" inputmode=\"numeric\" maxlength=\"2\" readonly .value=${this.pad2(this.valueToHM(this.values[i]).m)}\n                            ?disabled=${!this.dayEnabled[i] || !this.globalEnabled} @blur=${(e: any) => {\n                    let m = Number(e.target.value);\n                    if (isNaN(m)) m = 0;\n\n                    const { h } = this.valueToHM(this.values[i]);\n                    const v = this.hmToValue(h, m);\n                    if (v !== null) {\n                        const { m: rounded } = this.valueToHM(v);\n                        this.values[i] = v;\n                        e.target.value = this.pad2(rounded);\n                        this.emit();\n                    }\n                }}/>\n                        <button class=\"arrow\" @click=${() => this.adjustMinute(i, -10)} ?disabled=${!this.dayEnabled[i] || !this.globalEnabled}>▼</button>\n                    </div>\n                </div>\n            </div>\n        `)}`;\n    }\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/esp-switch.ts",
    "content": "import { html, css, LitElement } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport cssReset from \"./css/reset\";\nimport { stateOff, stateOn } from \"./custom-table\";\n\nconst checkboxID: string = \"checkbox-lever\";\n\n@customElement(\"esp-switch\")\nexport class EspSwitch extends LitElement {\n  private checkbox: HTMLInputElement | null = null;\n\n  // Use arrays - or slots\n  @property({ type: String }) stateOn = stateOn;\n  @property({ type: String }) stateOff = stateOff;\n  @property({ type: String }) state = stateOff;\n  @property({ type: String }) color = \"currentColor\";\n  @property({ type: Boolean }) disabled = false;\n\n  protected firstUpdated(\n    _changedProperties: Map<string | number | symbol, unknown>\n  ): void {\n    this.checkbox = this.shadowRoot?.getElementById(\n      checkboxID\n    ) as HTMLInputElement;\n  }\n\n  private isOn(): boolean {\n    return this.state === this.stateOn;\n  }\n\n  toggle(ev: Event): void {\n    const newState = this.isOn() ? this.stateOff : this.stateOn;\n    let event = new CustomEvent(\"state\", {\n      detail: {\n        state: newState,\n        id: this.id,\n      },\n    });\n    this.dispatchEvent(event);\n  }\n\n  render() {\n    return html`\n      <div class=\"sw\">\n        <label>\n          <input\n            id=\"${checkboxID}\"\n            type=\"checkbox\"\n            .checked=\"${this.isOn()}\"\n            .disabled=\"${this.disabled}\"\n            @click=\"${this.toggle}\"\n          />\n          <span style=\"color:${this.color}\" class=\"lever\"></span>\n        </label>\n      </div>\n    `;\n  }\n\n  static get styles() {\n    return [\n      cssReset,\n      css`\n        .sw,\n        .sw * {\n          -webkit-tap-highlight-color: transparent;\n          user-select: none;\n          cursor: pointer;\n        }\n\n        input[type=\"checkbox\"] {\n          opacity: 0;\n          width: 0;\n          height: 0;\n        }\n\n        input[type=\"checkbox\"]:checked + .lever {\n          background-color: currentColor;\n          background-image: linear-gradient(\n            0deg,\n            rgba(255, 255, 255, 0.5) 0%,\n            rgba(255, 255, 255, 0.5) 100%\n          );\n        }\n\n        input[type=\"checkbox\"]:checked + .lever:before,\n        input[type=\"checkbox\"]:checked + .lever:after {\n          left: 18px;\n        }\n\n        input[type=\"checkbox\"]:checked + .lever:after {\n          background-color: currentColor;\n        }\n\n        input[type=\"checkbox\"]:not(:checked) + .lever:after {\n          background-color: rgba(127, 127, 127, 0.5);\n        }\n\n        .lever {\n          content: \"\";\n          display: inline-block;\n          position: relative;\n          width: 36px;\n          height: 14px;\n          background-image: linear-gradient(\n            0deg,\n            rgba(127, 127, 127, 0.5) 0%,\n            rgba(127, 127, 127, 0.5) 100%\n          );\n          background-color: inherit;\n          border-radius: 15px;\n          transition: background 0.3s ease;\n          vertical-align: middle;\n        }\n\n        .lever:before,\n        .lever:after {\n          content: \"\";\n          position: absolute;\n          display: inline-block;\n          width: 20px;\n          height: 20px;\n          border-radius: 50%;\n          left: 0;\n          top: -3px;\n          transition: left 0.3s ease, background 0.3s ease, box-shadow 0.1s ease,\n            transform 0.1s ease;\n        }\n\n        .lever:before {\n          background-color: currentColor;\n          background-image: linear-gradient(\n            0deg,\n            rgba(255, 255, 255, 0.9) 0%,\n            rgba(255, 255, 255, 0.9) 100%\n          );\n        }\n\n        .lever:after {\n          background-color: #f1f1f1;\n          box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),\n            0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n            0px 1px 5px 0px rgba(0, 0, 0, 0.12);\n        }\n\n        input[type=\"checkbox\"]:checked:not(:disabled) ~ .lever:active::before,\n        input[type=\"checkbox\"]:checked:not(:disabled).tabbed:focus\n          ~ .lever::before {\n          transform: scale(2.4);\n          background-color: rgba(255, 255, 255, 0.9) 0%;\n          background-image: linear-gradient(\n            0deg,\n            rgba(255, 255, 255, 0.9) 0%,\n            rgba(255, 255, 255, 0.9) 100%\n          );\n        }\n\n        input[type=\"checkbox\"]:not(:disabled) ~ .lever:active:before,\n        input[type=\"checkbox\"]:not(:disabled).tabbed:focus ~ .lever::before {\n          transform: scale(2.4);\n          background-color: rgba(0, 0, 0, 0.08);\n        }\n\n        input[type=\"checkbox\"][disabled] + .lever {\n          cursor: default;\n          background-color: rgba(0, 0, 0, 0.12);\n        }\n\n        input[type=\"checkbox\"][disabled] + .lever:after,\n        input[type=\"checkbox\"][disabled]:checked + .lever:after {\n          background-color: #949494;\n        }\n      `,\n    ];\n  }\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/main.css",
    "content": "/* First, declare your dark mode colors */\n:root {\n  --c-bg: #fff;\n  --c-text: #000;\n  --c-primary: #26a69a;\n  --color:0, 100%;\n  --l:50%;\n  --color-primary: #26a69a;\n\n  --color-primary-darker: hsl(var(--color),calc(var(--l) - 5%));\n  --color-primary-darkest: hsl(var(--color),calc(var(--l) - 10%));\n  --color-text: #5b3e81;\n  --color-text-rgb: 47, 6, 100;\n  --color-primary-lighter: rgba(var(--color-text-rgb), 50%);\n  --color-slider-thingy: 38, 166, 154;\n\n  --primary-color: hsla(323, 18%, 49%, 0.924);\n  --dark-primary-color: #0288d1;\n  --light-primary-color: #b3e5fC;\n  --c-pri-rgb: 3, 169, 244;\n  --c-pri: rgba(var(--c-pri-rgb),100%);\n  --c-pri-l: rgba(var(--c-pri-rgb), 50%);\n  --c-pri-d: hsl(var(--c-pri-rgb),calc(var(--l) - 5%);\n  --color-primary-lighter2: rgba(var(--c-pri), 50%));\n\n  font-size: 62.5%!important;\n}\n@media (prefers-color-scheme: dark) {\n  :root {\n    --c-bg: #1c1c1c;\n    --c-text: #fff;\n  }\n}\n\nhtml[color-scheme=\"dark\"] img {\n  filter: invert(100%);\n}\n\n/* For browsers that don’t support `color-scheme` and therefore\n   don't handle system dark mode for you automatically\n   (Firefox), handle it for them. */\n@supports not (color-scheme: light dark) {\n  html {\n    background: var(--c-bg);\n    color: var(--c-text);\n  }\n}\n\n/* For browsers that support automatic dark/light mode\n   As well as system colors, set those */\n@supports (color-scheme: light dark)\n  and (background-color: Canvas)\n  and (color: CanvasText) {\n  :root {\n    --c-bg: Canvas;\n    --c-text: ButtonText;\n  }\n}\n\n/* For Safari on iOS. Hacky, but it works. */\n@supports (background-color: -apple-system-control-background)\n  and (color: text) {\n  :root {\n    --c-bg: -apple-system-control-background;\n    --c-text: text;\n  }\n}\n\nhtml {\n    color-scheme: light dark;\n    font-family: ui-monospace, system-ui, \"Helvetica\", \"Arial Narrow\", \"Roboto\", \"Oxygen\", \"Ubuntu\", sans-serif;\n}\n\nhtml button, html .btn {\n  cursor: pointer;\n  border-radius: 1rem;\n  background-color: inherit;\n  background-image: linear-gradient(0deg, rgba(127, 127, 127, 0.5) 0%, rgba(127, 127, 127, 0.5) 100%);\n  color: inherit;\n  border: 1px solid rgba(127, 127, 127, 0.5);\n  height: 1.2rem;\n}\n\nhtml * {\n  transition-property: color;\n  transition-duration: 450ms !important;\n  transition-timing-function: ease !important;\n  transition-delay: 0s !important;\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/main.ts",
    "content": "import './neato-entry';\n\n// const pickerHTML =  '<style>body{margin:0;min-height:100vh;display:flex;align-items:center;justify-content:center;font-family:system-ui,sans-serif;background:#1c1c1c;color:#eee;padding:16px}.container{text-align:center;max-width:400px;width:100%}h1{font-weight:400;font-size:1.4rem;margin-bottom:24px;color:#f5f5f5}.buttons{display:flex;flex-direction:column;gap:16px}.buttons-row{display:flex;gap:12px;justify-content:center}button{display:flex;align-items:center;justify-content:center;gap:8px;padding:16px 24px;font-size:1rem;font-weight:500;border:1px solid #333;border-radius:10px;cursor:pointer;background:#2c2c2c;color:#f5f5f5;transition:all .2s;box-shadow:0 2px 4px rgba(0,0,0,.3);min-height:48px}button:hover{background:#3a3a3a;box-shadow:0 4px 8px rgba(0,0,0,.4)}.neato{font-size:1.2rem;padding:18px 28px;background:#07c;border:1px solid #005fa3}.neato:hover{background:#005fa3}.esphome{background:#444;border:1px solid #555;flex:1}.esphome:hover{background:#555}.custom-link{display:flex;gap:8px;margin-top:16px}.custom-link input{flex:1;padding:12px;border-radius:8px;border:1px solid #555;background:#2c2c2c;color:#fff;font-size:1rem}.custom-link input:focus{outline:0;border-color:#07c}.custom-link button{padding:12px 16px;border-radius:8px;border:none;background:#07c;color:#fff;font-weight:500}.custom-link button:hover{background:#005fa3}.footer-text{margin-top:20px;font-size:.9rem;color:#aaa;line-height:1.4}.remember{margin-top:12px;display:flex;align-items:flex-start;gap:10px;font-size:.9rem;color:#ddd;text-align:left}.remember input{margin-top:3px;transform:scale(1.15)}@media (max-width:480px){.buttons-row{flex-direction:column}}</style><div class=\"container\"><h1>Which webserver would you like to see?</h1><div class=\"buttons\"><button class=\"neato\"id=\"btnNeato\">Neato-Brainslug</button><div class=\"buttons-row\"><button class=\"esphome\"data-pick=\"2\">ESPHome v2</button> <button class=\"esphome\"data-pick=\"3\">ESPHome v3</button></div><div class=\"custom-link\"><input id=\"customUrl\"placeholder=\"Enter custom URL\"> <button id=\"btnCustom\">Go</button></div></div><div class=\"footer-text\">The selected mode will only be shown until the site is reloaded (except for the custom neato brainslug interface). If you choose the remember the selected interface, you will need to clear your cookies/localStorage to get back here!</div><label class=\"remember\"><input id=\"rememberChoice\"type=\"checkbox\"> <span>Remember my selection (not needed for brainslug interface)</span></label></div>';\n\n// const urls: Record<string, string> = {\n//     \"2\": \"https://oi.esphome.io/v2/www.js\",\n//     \"3\": \"https://oi.esphome.io/v3/www.js\",\n// };\n\n// function resetHTML() {\n//     document.head.innerHTML = '<meta charset=\"UTF-8\"><link rel=\"icon\" href=\"data:;\">';\n//     document.body.innerHTML = '<esp-app></esp-app>';\n// }\n\n// function loadCustomJS(js: string) {\n//     resetHTML();\n//     const script = document.createElement(\"script\");\n//     script.src = js;\n//     document.body.appendChild(script);\n// }\n\n// async function loadNeato() {\n//     resetHTML();\n//     await import('./neato-entry');\n// }\n\n// function showPicker() {\n// document.head.innerHTML = '<meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1\">';\n//     document.body.innerHTML = pickerHTML;\n\n//     // 3️⃣ Hook buttons\n//     document.getElementById(\"btnNeato\")!.addEventListener(\"click\", () => {\n//         localStorage.removeItem(\"pickWebserver\")\n//         loadNeato();\n//     });\n\n//     document.querySelectorAll(\".esphome\").forEach(btn => {\n//         btn.addEventListener(\"click\", () => {\n//             const pick = (btn as HTMLElement).dataset.pick!;\n//             const remember = (document.getElementById(\"rememberChoice\") as HTMLInputElement)?.checked;\n//             if (remember) localStorage.pickWebserver = pick;\n            \n//             loadCustomJS(urls[pick]);\n//         });\n//     });\n\n//     document.getElementById(\"btnCustom\")!.addEventListener(\"click\", () => {\n//         const url = (document.getElementById(\"customUrl\") as HTMLInputElement).value;\n//         if (!url) return alert(\"Please enter a URL\");\n//         const remember = (document.getElementById(\"rememberChoice\") as HTMLInputElement)?.checked;\n//         if (remember) localStorage.pickWebserver = url; // optional: store full URL\n//         loadCustomJS(url);\n//     });\n// }\n\n\n// // If nothing, load neato\n// // If \"0\" we show picker, if \"2\" or \"3\" load those versions\n// // if anything else, load that url\n// if (!localStorage.pickWebserver) loadNeato();\n// else if (localStorage.pickWebserver === \"0\") showPicker();\n// else if (localStorage.pickWebserver === \"2\") loadCustomJS(urls[\"2\"]);\n// else if (localStorage.pickWebserver === \"3\") loadCustomJS(urls[\"3\"]);\n// else loadCustomJS(localStorage.pickWebserver);\n"
  },
  {
    "path": "webserver/packages/neato/src/manual-driving.ts",
    "content": "import { LitElement, html, css } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport { Button_Gen3 } from \"./neato-enums\";\n\n@customElement(\"manual-driving\")\nexport class ManualDriving extends LitElement {\n  static styles = css`\n\n  .manual-driving {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    flex-direction: column;\n  }\n\n  .manual-driving span {\n    width: 75%;\n    padding: 1rem;\n    margin: 1.5rem 0;\n    background-color: rgba(127, 127, 127, 0.3);\n    border-radius: 0.5rem;\n  }\n\n`;\n\n  render() {\n    return html`\n\n    <div class=\"manual-driving\">\n\n    <span class=\"helper\">\n      You need to turn manual cleaning on by pressing \"Start\", once the vacuum is in manual cleaning mode you can hold down the different actions! Timeout will stop the current action.\n    </span>\n        <div style=\"display:flex;gap:1rem;flex-direction:column;\">\n                <div style=\"display:flex;gap:1rem\">\n                  <custom-button name=\"Arc Left\" press=\"${Button_Gen3.manual_drive_arc_left_down}\" release=\"${Button_Gen3.manual_drive_arc_left_up}\"></custom-button>\n                  <custom-button name=\"Forward\" press=\"${Button_Gen3.manual_drive_forward_down}\" release=\"${Button_Gen3.manual_drive_forward_up}\"></custom-button>\n                  <custom-button name=\"Arc Right\" press=\"${Button_Gen3.manual_drive_arc_right_down}\" release=\"${Button_Gen3.manual_drive_arc_right_up}\"></custom-button>\n                </div>\n        \n                <div style=\"display:flex;gap:1rem\">\n                  <custom-button name=\"Left\" press=\"${Button_Gen3.manual_drive_turn_left_down}\" release=\"${Button_Gen3.manual_drive_turn_left_up}\"></custom-button>\n                  <custom-button name=\"Timeout\" click=\"${Button_Gen3.manual_drive_button_timeout}\"></custom-button>\n                  <custom-button name=\"Right\" press=\"${Button_Gen3.manual_drive_turn_right_down}\" release=\"${Button_Gen3.manual_drive_turn_right_up}\"></custom-button>\n                </div>\n        \n                <div style=\"display:flex;gap:1rem\">\n                  <custom-button name=\"Start\" click=\"${Button_Gen3.start_manual_cleaning}\"></custom-button>\n                  <custom-button name=\"Backward\" press=\"${Button_Gen3.manual_drive_backwards_down}\" release=\"${Button_Gen3.manual_drive_backwards_up}\"></custom-button>\n                  <custom-button name=\"Stop\" click=\"${Button_Gen3.stop_cleaning}\"></custom-button>\n                </div>        \n              </div>\n\n    </div>\n        \n    \n        `\n  }\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/neato-entry.ts",
    "content": "import \"./esp-app\"\n\n"
  },
  {
    "path": "webserver/packages/neato/src/neato-enums.ts",
    "content": "export const Button = {\n    house_clean: \"button-house_clean\",\n    spot_clean: \"button-spot_clean\",\n    spot_clean__height___width_: \"button-spot_clean__height___width_\",\n    stop_cleaning: \"button-stop_cleaning\",\n    pause_cleaning: \"button-pause_cleaning\",\n    resume_cleaning: \"button-resume_cleaning\",\n    locate_robot: \"button-locate_robot\",\n    update_status: \"button-update_status\",\n    clear_errors: \"button-clear_errors\",\n    shutdown: \"button-shutdown\",\n    powercycle: \"button-powercycle\",\n    reboot_esp: \"button-reboot_esp\",\n}\n\nexport const Button_Gen3 = {\n    ...Button,\n    send_to_base: \"button-send_to_base\",\n\n    start_manual_cleaning: \"button-start_manual_cleaning\",\n    manual_drive_forward_up: \"button-manual_drive_forward_up\",\n    manual_drive_backwards_up: \"button-manual_drive_backwards_up\",\n    manual_drive_turn_left_up: \"button-manual_drive_turn_left_up\",\n    manual_drive_turn_right_up: \"button-manual_drive_turn_right_up\",\n    manual_drive_arc_left_up: \"button-manual_drive_arc_left_up\",\n    manual_drive_arc_right_up: \"button-manual_drive_arc_right_up\",\n    manual_drive_forward_down: \"button-manual_drive_forward_down\",\n    manual_drive_backwards_down: \"button-manual_drive_backwards_down\",\n    manual_drive_turn_left_down: \"button-manual_drive_turn_left_down\",\n    manual_drive_turn_right_down: \"button-manual_drive_turn_right_down\",\n    manual_drive_arc_left_down: \"button-manual_drive_arc_left_down\",\n    manual_drive_arc_right_down: \"button-manual_drive_arc_right_down\",\n    manual_drive_button_timeout: \"button-manual_drive_button_timeout\",\n}\n\nexport const Button_Gen2 = {\n    ...Button,\n    send_to_start: \"button-send_to_start\",\n}\n\n\n\nexport const Select = {\n    logger: \"select-logger_select\",\n}\n\nexport const Select_gen3 = {\n    ...Select,\n    navigation_mode: \"select-navigation_mode\",\n}\n\n\n\nexport const BinarySensor = {\n    usb_connected: \"binary_sensor-usb_connected\",\n    battery_over_temp: \"binary_sensor-battery_over_temp\",\n    charging_active: \"binary_sensor-charging_active\",\n    charging_enabled: \"binary_sensor-charging_enabled\",\n    confident_on_fuel: \"binary_sensor-confident_on_fuel\",\n    on_reserved_fuel: \"binary_sensor-on_reserved_fuel\",\n    empty_fuel: \"binary_sensor-empty_fuel\",\n    battery_failure: \"binary_sensor-battery_failure\",\n    ext_power_present: \"binary_sensor-ext_power_present\",\n    thermistor_present: \"binary_sensor-thermistor_present\",\n}\n\nexport const Sensor = {\n    fuel_percent: \"sensor-fuel_percent\",\n    battery_temp_c_avg: \"sensor-battery_temp_c_avg\",\n    battery_voltage_v: \"sensor-battery_voltage_v\",\n    external_voltage_v: \"sensor-external_voltage_v\",\n    charger_mah: \"sensor-charger_mah\",\n    discharge_mah: \"sensor-discharge_mah\",\n    filter_change_time: \"sensor-filter_change_time\",\n    brush_change_time: \"sensor-brush_change_time\",\n    dirt_bin_alert_reminder: \"sensor-dirt_bin_alert_reminder\", \n    current_dirt_bin_runtime: \"sensor-current_dirt_bin_runtime\",\n    number_of_full_dust_bin_cleanings: \"sensor-number_of_full_dust_bin_cleanings\",\n    battery_cycles: \"sensor-battery_cycles\",\n    last_cleaning_duration: \"sensor-last_cleaning_duration\",\n}\n\nexport const ESPNumber = {\n    spot_clean_width: \"number-spot_clean_width\",\n    spot_clean_height: \"number-spot_clean_height\",\n}\n\nexport const ESPText = {\n    timezone: \"text-timezone\",\n    schedule: \"text-scheduleset\",\n}\n\nexport const Switch = {\n    test_mode: \"switch-test_mode\",\n    play_extra_sounds: \"switch-play_extra_sounds\",\n\n    click_sounds: \"switch-click_sounds\",\n    led: \"switch-led\",\n    wall_enable: \"switch-wall_enable\", \n    eco_mode: \"switch-eco_mode\", \n    intenseclean: \"switch-intenseclean\", \n    wifi: \"switch-wifi\", \n    melody_sounds: \"switch-melody_sounds\", \n    warning_sounds: \"switch-warning_sounds\", \n    bin_full_detect: \"switch-bin_full_detect\", \n}\n\nexport const Switch_gen2 = {\n    ...Switch,\n    stealthled: \"switch-stealthled\",\n    autoshutdown: \"switch-autoshutdown\",\n    robot_schedule: \"switch-robot_schedule\"\n}\n\nexport const TextSensor = {\n    last_cleaning_time: \"text_sensor-last_cleaning_time\",\n    last_cleaning_type: \"text_sensor-last_cleaning_type\",\n    robot_error: \"text_sensor-robot_error\",\n    robot_alert: \"text_sensor-robot_alert\",\n    serial_number: \"text_sensor-serial_number\",\n    model: \"text_sensor-model\",\n    software: \"text_sensor-software\",\n    ui_state: \"text_sensor-ui_state\",\n    nbs_time: \"text_sensor-nbs_time\",\n}"
  },
  {
    "path": "webserver/packages/neato/src/timezone-selector.ts",
    "content": "import { LitElement, html, css } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { setText } from \"./api\";\nimport { entityStore } from \"./entity-store\";\nimport { entityConfig } from \"./types\";\n\n@customElement(\"timezone-selector\")\nexport class TimezoneSelector extends LitElement {\n  @property({ type: String })\n  value: string = \"\";\n\n  @state()\n  query: string = \"\";\n\n  @state()\n  filtered: string[] = [];\n\n  @state()\n  selected: string = \"\";\n\n  @property({ type: String }) entityId = \"text-timezone\";\n  private unsubscribe?: () => void;\n  private entity?: entityConfig;\n\n  connectedCallback() {\n    super.connectedCallback();\n    this.unsubscribe = entityStore.subscribe((entity) => {\n      if (entity.unique_id === this.entityId) {\n        this.entity = entity;\n        this.requestUpdate();\n      }\n    });\n  }\n\n  disconnectedCallback() {\n    this.unsubscribe?.();\n    super.disconnectedCallback();\n  }\n\n  firstUpdated() {\n    this.filtered = Object.keys(this.zones);\n    if (this.value) this.select(this.value);\n  }\n\n  updated() {\n    // if external code changes \"value\"\n    if (this.value && this.value !== this.selected) {\n      this.select(this.value);\n    }\n  }\n\n  filter() {\n    const q = this.query.toLowerCase();\n    this.filtered = Object.keys(this.zones).filter(k =>\n      k.toLowerCase().includes(q)\n    );\n  }\n\n  select(zone: string) {\n    this.selected = zone;\n    this.query = zone;\n    this.dispatchEvent(new CustomEvent(\"timezone-changed\", {\n      detail: zone\n    }));\n\n    if (this.entity) setText(this.entity, this.zones[zone]);\n  }\n\n\n  render() {\n    if (!this.entity) return html`loading...`\n    return html`\n      <span>In case the \"NBS Time\" is not the correct timezone, select your timezone here.</span>\n      <div class=\"wrap\">\n        <input\n          type=\"text\"\n          .value=${this.query}\n          @input=${(e: any) => {\n        this.query = e.target.value;\n        this.filter();\n      }}\n          placeholder=\"Type to search timezones…\"\n        />\n\n        <div class=\"list\">\n          ${this.filtered.slice(0, 50).map(zone => html`\n            <div\n              class=\"item ${zone === this.selected ? \"sel\" : \"\"}\"\n              @click=${() => this.select(zone)}\n            >\n              <span>${zone}</span>\n              <span class=\"code\">${this.zones[zone]}</span>\n            </div>\n          `)}\n        </div>\n      </div>\n    `;\n  }\n\n  static styles = css`\n    .wrap {\n      margin-top: 1rem;\n      display: flex;\n      flex-direction: column;\n      gap: 8px;\n    }\n\n    input {\n      padding: 10px;\n      border-radius: 8px;\n      border: 1px solid #444;\n    }\n\n    .list {\n      max-height: 240px;\n      overflow: auto;\n      border: 1px solid #444;\n      border-radius: 8px;\n    }\n\n    .item {\n      display: flex;\n      justify-content: space-between;\n      padding: 8px;\n      cursor: pointer;\n    }\n\n    .item:hover {\n      background: rgba(127, 127, 127, 0.7);\n    }\n\n    .item.sel {\n      background: rgba(82, 82, 82, 0.7);\n    }\n\n    .code {\n      opacity: 0.6;\n      font-size: 0.8rem;\n    }\n  `;\n\n  zones: Record<string, string> = {\n    \"Africa/Abidjan\": \"GMT0\",\n    \"Africa/Accra\": \"GMT0\",\n    \"Africa/Addis_Ababa\": \"EAT-3\",\n    \"Africa/Algiers\": \"CET-1\",\n    \"Africa/Asmara\": \"EAT-3\",\n    \"Africa/Bamako\": \"GMT0\",\n    \"Africa/Bangui\": \"WAT-1\",\n    \"Africa/Banjul\": \"GMT0\",\n    \"Africa/Bissau\": \"GMT0\",\n    \"Africa/Blantyre\": \"CAT-2\",\n    \"Africa/Brazzaville\": \"WAT-1\",\n    \"Africa/Bujumbura\": \"CAT-2\",\n    \"Africa/Cairo\": \"EET-2EEST,M4.5.5/0,M10.5.4/24\",\n    \"Africa/Casablanca\": \"<+01>-1\",\n    \"Africa/Ceuta\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Africa/Conakry\": \"GMT0\",\n    \"Africa/Dakar\": \"GMT0\",\n    \"Africa/Dar_es_Salaam\": \"EAT-3\",\n    \"Africa/Djibouti\": \"EAT-3\",\n    \"Africa/Douala\": \"WAT-1\",\n    \"Africa/El_Aaiun\": \"<+01>-1\",\n    \"Africa/Freetown\": \"GMT0\",\n    \"Africa/Gaborone\": \"CAT-2\",\n    \"Africa/Harare\": \"CAT-2\",\n    \"Africa/Johannesburg\": \"SAST-2\",\n    \"Africa/Juba\": \"CAT-2\",\n    \"Africa/Kampala\": \"EAT-3\",\n    \"Africa/Khartoum\": \"CAT-2\",\n    \"Africa/Kigali\": \"CAT-2\",\n    \"Africa/Kinshasa\": \"WAT-1\",\n    \"Africa/Lagos\": \"WAT-1\",\n    \"Africa/Libreville\": \"WAT-1\",\n    \"Africa/Lome\": \"GMT0\",\n    \"Africa/Luanda\": \"WAT-1\",\n    \"Africa/Lubumbashi\": \"CAT-2\",\n    \"Africa/Lusaka\": \"CAT-2\",\n    \"Africa/Malabo\": \"WAT-1\",\n    \"Africa/Maputo\": \"CAT-2\",\n    \"Africa/Maseru\": \"SAST-2\",\n    \"Africa/Mbabane\": \"SAST-2\",\n    \"Africa/Mogadishu\": \"EAT-3\",\n    \"Africa/Monrovia\": \"GMT0\",\n    \"Africa/Nairobi\": \"EAT-3\",\n    \"Africa/Ndjamena\": \"WAT-1\",\n    \"Africa/Niamey\": \"WAT-1\",\n    \"Africa/Nouakchott\": \"GMT0\",\n    \"Africa/Ouagadougou\": \"GMT0\",\n    \"Africa/Porto-Novo\": \"WAT-1\",\n    \"Africa/Sao_Tome\": \"GMT0\",\n    \"Africa/Tripoli\": \"EET-2\",\n    \"Africa/Tunis\": \"CET-1\",\n    \"Africa/Windhoek\": \"CAT-2\",\n    \"America/Adak\": \"HST10HDT,M3.2.0,M11.1.0\",\n    \"America/Anchorage\": \"AKST9AKDT,M3.2.0,M11.1.0\",\n    \"America/Anguilla\": \"AST4\",\n    \"America/Antigua\": \"AST4\",\n    \"America/Araguaina\": \"<-03>3\",\n    \"America/Argentina/Buenos_Aires\": \"<-03>3\",\n    \"America/Argentina/Catamarca\": \"<-03>3\",\n    \"America/Argentina/Cordoba\": \"<-03>3\",\n    \"America/Argentina/Jujuy\": \"<-03>3\",\n    \"America/Argentina/La_Rioja\": \"<-03>3\",\n    \"America/Argentina/Mendoza\": \"<-03>3\",\n    \"America/Argentina/Rio_Gallegos\": \"<-03>3\",\n    \"America/Argentina/Salta\": \"<-03>3\",\n    \"America/Argentina/San_Juan\": \"<-03>3\",\n    \"America/Argentina/San_Luis\": \"<-03>3\",\n    \"America/Argentina/Tucuman\": \"<-03>3\",\n    \"America/Argentina/Ushuaia\": \"<-03>3\",\n    \"America/Aruba\": \"AST4\",\n    \"America/Asuncion\": \"<-03>3\",\n    \"America/Atikokan\": \"EST5\",\n    \"America/Bahia\": \"<-03>3\",\n    \"America/Bahia_Banderas\": \"CST6\",\n    \"America/Barbados\": \"AST4\",\n    \"America/Belem\": \"<-03>3\",\n    \"America/Belize\": \"CST6\",\n    \"America/Blanc-Sablon\": \"AST4\",\n    \"America/Boa_Vista\": \"<-04>4\",\n    \"America/Bogota\": \"<-05>5\",\n    \"America/Boise\": \"MST7MDT,M3.2.0,M11.1.0\",\n    \"America/Cambridge_Bay\": \"MST7MDT,M3.2.0,M11.1.0\",\n    \"America/Campo_Grande\": \"<-04>4\",\n    \"America/Cancun\": \"EST5\",\n    \"America/Caracas\": \"<-04>4\",\n    \"America/Cayenne\": \"<-03>3\",\n    \"America/Cayman\": \"EST5\",\n    \"America/Chicago\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Chihuahua\": \"CST6\",\n    \"America/Costa_Rica\": \"CST6\",\n    \"America/Creston\": \"MST7\",\n    \"America/Cuiaba\": \"<-04>4\",\n    \"America/Curacao\": \"AST4\",\n    \"America/Danmarkshavn\": \"GMT0\",\n    \"America/Dawson\": \"MST7\",\n    \"America/Dawson_Creek\": \"MST7\",\n    \"America/Denver\": \"MST7MDT,M3.2.0,M11.1.0\",\n    \"America/Detroit\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Dominica\": \"AST4\",\n    \"America/Edmonton\": \"MST7MDT,M3.2.0,M11.1.0\",\n    \"America/Eirunepe\": \"<-05>5\",\n    \"America/El_Salvador\": \"CST6\",\n    \"America/Fort_Nelson\": \"MST7\",\n    \"America/Fortaleza\": \"<-03>3\",\n    \"America/Glace_Bay\": \"AST4ADT,M3.2.0,M11.1.0\",\n    \"America/Godthab\": \"<-02>2<-01>,M3.5.0/-1,M10.5.0/0\",\n    \"America/Goose_Bay\": \"AST4ADT,M3.2.0,M11.1.0\",\n    \"America/Grand_Turk\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Grenada\": \"AST4\",\n    \"America/Guadeloupe\": \"AST4\",\n    \"America/Guatemala\": \"CST6\",\n    \"America/Guayaquil\": \"<-05>5\",\n    \"America/Guyana\": \"<-04>4\",\n    \"America/Halifax\": \"AST4ADT,M3.2.0,M11.1.0\",\n    \"America/Havana\": \"CST5CDT,M3.2.0/0,M11.1.0/1\",\n    \"America/Hermosillo\": \"MST7\",\n    \"America/Indiana/Indianapolis\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Indiana/Knox\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Indiana/Marengo\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Indiana/Petersburg\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Indiana/Tell_City\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Indiana/Vevay\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Indiana/Vincennes\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Indiana/Winamac\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Inuvik\": \"MST7MDT,M3.2.0,M11.1.0\",\n    \"America/Iqaluit\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Jamaica\": \"EST5\",\n    \"America/Juneau\": \"AKST9AKDT,M3.2.0,M11.1.0\",\n    \"America/Kentucky/Louisville\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Kentucky/Monticello\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Kralendijk\": \"AST4\",\n    \"America/La_Paz\": \"<-04>4\",\n    \"America/Lima\": \"<-05>5\",\n    \"America/Los_Angeles\": \"PST8PDT,M3.2.0,M11.1.0\",\n    \"America/Lower_Princes\": \"AST4\",\n    \"America/Maceio\": \"<-03>3\",\n    \"America/Managua\": \"CST6\",\n    \"America/Manaus\": \"<-04>4\",\n    \"America/Marigot\": \"AST4\",\n    \"America/Martinique\": \"AST4\",\n    \"America/Matamoros\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Mazatlan\": \"MST7\",\n    \"America/Menominee\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Merida\": \"CST6\",\n    \"America/Metlakatla\": \"AKST9AKDT,M3.2.0,M11.1.0\",\n    \"America/Mexico_City\": \"CST6\",\n    \"America/Miquelon\": \"<-03>3<-02>,M3.2.0,M11.1.0\",\n    \"America/Moncton\": \"AST4ADT,M3.2.0,M11.1.0\",\n    \"America/Monterrey\": \"CST6\",\n    \"America/Montevideo\": \"<-03>3\",\n    \"America/Montreal\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Montserrat\": \"AST4\",\n    \"America/Nassau\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/New_York\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Nipigon\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Nome\": \"AKST9AKDT,M3.2.0,M11.1.0\",\n    \"America/Noronha\": \"<-02>2\",\n    \"America/North_Dakota/Beulah\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/North_Dakota/Center\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/North_Dakota/New_Salem\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Nuuk\": \"<-02>2<-01>,M3.5.0/-1,M10.5.0/0\",\n    \"America/Ojinaga\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Panama\": \"EST5\",\n    \"America/Pangnirtung\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Paramaribo\": \"<-03>3\",\n    \"America/Phoenix\": \"MST7\",\n    \"America/Port-au-Prince\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Port_of_Spain\": \"AST4\",\n    \"America/Porto_Velho\": \"<-04>4\",\n    \"America/Puerto_Rico\": \"AST4\",\n    \"America/Punta_Arenas\": \"<-03>3\",\n    \"America/Rainy_River\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Rankin_Inlet\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Recife\": \"<-03>3\",\n    \"America/Regina\": \"CST6\",\n    \"America/Resolute\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Rio_Branco\": \"<-05>5\",\n    \"America/Santarem\": \"<-03>3\",\n    \"America/Santiago\": \"<-04>4<-03>,M9.1.6/24,M4.1.6/24\",\n    \"America/Santo_Domingo\": \"AST4\",\n    \"America/Sao_Paulo\": \"<-03>3\",\n    \"America/Scoresbysund\": \"<-02>2<-01>,M3.5.0/-1,M10.5.0/0\",\n    \"America/Sitka\": \"AKST9AKDT,M3.2.0,M11.1.0\",\n    \"America/St_Barthelemy\": \"AST4\",\n    \"America/St_Johns\": \"NST3:30NDT,M3.2.0,M11.1.0\",\n    \"America/St_Kitts\": \"AST4\",\n    \"America/St_Lucia\": \"AST4\",\n    \"America/St_Thomas\": \"AST4\",\n    \"America/St_Vincent\": \"AST4\",\n    \"America/Swift_Current\": \"CST6\",\n    \"America/Tegucigalpa\": \"CST6\",\n    \"America/Thule\": \"AST4ADT,M3.2.0,M11.1.0\",\n    \"America/Thunder_Bay\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Tijuana\": \"PST8PDT,M3.2.0,M11.1.0\",\n    \"America/Toronto\": \"EST5EDT,M3.2.0,M11.1.0\",\n    \"America/Tortola\": \"AST4\",\n    \"America/Vancouver\": \"PST8PDT,M3.2.0,M11.1.0\",\n    \"America/Whitehorse\": \"MST7\",\n    \"America/Winnipeg\": \"CST6CDT,M3.2.0,M11.1.0\",\n    \"America/Yakutat\": \"AKST9AKDT,M3.2.0,M11.1.0\",\n    \"America/Yellowknife\": \"MST7MDT,M3.2.0,M11.1.0\",\n    \"Antarctica/Casey\": \"<+08>-8\",\n    \"Antarctica/Davis\": \"<+07>-7\",\n    \"Antarctica/DumontDUrville\": \"<+10>-10\",\n    \"Antarctica/Macquarie\": \"AEST-10AEDT,M10.1.0,M4.1.0/3\",\n    \"Antarctica/Mawson\": \"<+05>-5\",\n    \"Antarctica/McMurdo\": \"NZST-12NZDT,M9.5.0,M4.1.0/3\",\n    \"Antarctica/Palmer\": \"<-03>3\",\n    \"Antarctica/Rothera\": \"<-03>3\",\n    \"Antarctica/Syowa\": \"<+03>-3\",\n    \"Antarctica/Troll\": \"<+00>0<+02>-2,M3.5.0/1,M10.5.0/3\",\n    \"Antarctica/Vostok\": \"<+05>-5\",\n    \"Arctic/Longyearbyen\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Asia/Aden\": \"<+03>-3\",\n    \"Asia/Almaty\": \"<+05>-5\",\n    \"Asia/Amman\": \"<+03>-3\",\n    \"Asia/Anadyr\": \"<+12>-12\",\n    \"Asia/Aqtau\": \"<+05>-5\",\n    \"Asia/Aqtobe\": \"<+05>-5\",\n    \"Asia/Ashgabat\": \"<+05>-5\",\n    \"Asia/Atyrau\": \"<+05>-5\",\n    \"Asia/Baghdad\": \"<+03>-3\",\n    \"Asia/Bahrain\": \"<+03>-3\",\n    \"Asia/Baku\": \"<+04>-4\",\n    \"Asia/Bangkok\": \"<+07>-7\",\n    \"Asia/Barnaul\": \"<+07>-7\",\n    \"Asia/Beirut\": \"EET-2EEST,M3.5.0/0,M10.5.0/0\",\n    \"Asia/Bishkek\": \"<+06>-6\",\n    \"Asia/Brunei\": \"<+08>-8\",\n    \"Asia/Chita\": \"<+09>-9\",\n    \"Asia/Choibalsan\": \"<+08>-8\",\n    \"Asia/Colombo\": \"<+0530>-5:30\",\n    \"Asia/Damascus\": \"<+03>-3\",\n    \"Asia/Dhaka\": \"<+06>-6\",\n    \"Asia/Dili\": \"<+09>-9\",\n    \"Asia/Dubai\": \"<+04>-4\",\n    \"Asia/Dushanbe\": \"<+05>-5\",\n    \"Asia/Famagusta\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Asia/Gaza\": \"EET-2EEST,M3.4.4/50,M10.4.4/50\",\n    \"Asia/Hebron\": \"EET-2EEST,M3.4.4/50,M10.4.4/50\",\n    \"Asia/Ho_Chi_Minh\": \"<+07>-7\",\n    \"Asia/Hong_Kong\": \"HKT-8\",\n    \"Asia/Hovd\": \"<+07>-7\",\n    \"Asia/Irkutsk\": \"<+08>-8\",\n    \"Asia/Jakarta\": \"WIB-7\",\n    \"Asia/Jayapura\": \"WIT-9\",\n    \"Asia/Jerusalem\": \"IST-2IDT,M3.4.4/26,M10.5.0\",\n    \"Asia/Kabul\": \"<+0430>-4:30\",\n    \"Asia/Kamchatka\": \"<+12>-12\",\n    \"Asia/Karachi\": \"PKT-5\",\n    \"Asia/Kathmandu\": \"<+0545>-5:45\",\n    \"Asia/Khandyga\": \"<+09>-9\",\n    \"Asia/Kolkata\": \"IST-5:30\",\n    \"Asia/Krasnoyarsk\": \"<+07>-7\",\n    \"Asia/Kuala_Lumpur\": \"<+08>-8\",\n    \"Asia/Kuching\": \"<+08>-8\",\n    \"Asia/Kuwait\": \"<+03>-3\",\n    \"Asia/Macau\": \"CST-8\",\n    \"Asia/Magadan\": \"<+11>-11\",\n    \"Asia/Makassar\": \"WITA-8\",\n    \"Asia/Manila\": \"PST-8\",\n    \"Asia/Muscat\": \"<+04>-4\",\n    \"Asia/Nicosia\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Asia/Novokuznetsk\": \"<+07>-7\",\n    \"Asia/Novosibirsk\": \"<+07>-7\",\n    \"Asia/Omsk\": \"<+06>-6\",\n    \"Asia/Oral\": \"<+05>-5\",\n    \"Asia/Phnom_Penh\": \"<+07>-7\",\n    \"Asia/Pontianak\": \"WIB-7\",\n    \"Asia/Pyongyang\": \"KST-9\",\n    \"Asia/Qatar\": \"<+03>-3\",\n    \"Asia/Qyzylorda\": \"<+05>-5\",\n    \"Asia/Riyadh\": \"<+03>-3\",\n    \"Asia/Sakhalin\": \"<+11>-11\",\n    \"Asia/Samarkand\": \"<+05>-5\",\n    \"Asia/Seoul\": \"KST-9\",\n    \"Asia/Shanghai\": \"CST-8\",\n    \"Asia/Singapore\": \"<+08>-8\",\n    \"Asia/Srednekolymsk\": \"<+11>-11\",\n    \"Asia/Taipei\": \"CST-8\",\n    \"Asia/Tashkent\": \"<+05>-5\",\n    \"Asia/Tbilisi\": \"<+04>-4\",\n    \"Asia/Tehran\": \"<+0330>-3:30\",\n    \"Asia/Thimphu\": \"<+06>-6\",\n    \"Asia/Tokyo\": \"JST-9\",\n    \"Asia/Tomsk\": \"<+07>-7\",\n    \"Asia/Ulaanbaatar\": \"<+08>-8\",\n    \"Asia/Urumqi\": \"<+06>-6\",\n    \"Asia/Ust-Nera\": \"<+10>-10\",\n    \"Asia/Vientiane\": \"<+07>-7\",\n    \"Asia/Vladivostok\": \"<+10>-10\",\n    \"Asia/Yakutsk\": \"<+09>-9\",\n    \"Asia/Yangon\": \"<+0630>-6:30\",\n    \"Asia/Yekaterinburg\": \"<+05>-5\",\n    \"Asia/Yerevan\": \"<+04>-4\",\n    \"Atlantic/Azores\": \"<-01>1<+00>,M3.5.0/0,M10.5.0/1\",\n    \"Atlantic/Bermuda\": \"AST4ADT,M3.2.0,M11.1.0\",\n    \"Atlantic/Canary\": \"WET0WEST,M3.5.0/1,M10.5.0\",\n    \"Atlantic/Cape_Verde\": \"<-01>1\",\n    \"Atlantic/Faroe\": \"WET0WEST,M3.5.0/1,M10.5.0\",\n    \"Atlantic/Madeira\": \"WET0WEST,M3.5.0/1,M10.5.0\",\n    \"Atlantic/Reykjavik\": \"GMT0\",\n    \"Atlantic/South_Georgia\": \"<-02>2\",\n    \"Atlantic/St_Helena\": \"GMT0\",\n    \"Atlantic/Stanley\": \"<-03>3\",\n    \"Australia/Adelaide\": \"ACST-9:30ACDT,M10.1.0,M4.1.0/3\",\n    \"Australia/Brisbane\": \"AEST-10\",\n    \"Australia/Broken_Hill\": \"ACST-9:30ACDT,M10.1.0,M4.1.0/3\",\n    \"Australia/Currie\": \"AEST-10AEDT,M10.1.0,M4.1.0/3\",\n    \"Australia/Darwin\": \"ACST-9:30\",\n    \"Australia/Eucla\": \"<+0845>-8:45\",\n    \"Australia/Hobart\": \"AEST-10AEDT,M10.1.0,M4.1.0/3\",\n    \"Australia/Lindeman\": \"AEST-10\",\n    \"Australia/Lord_Howe\": \"<+1030>-10:30<+11>-11,M10.1.0,M4.1.0\",\n    \"Australia/Melbourne\": \"AEST-10AEDT,M10.1.0,M4.1.0/3\",\n    \"Australia/Perth\": \"AWST-8\",\n    \"Australia/Sydney\": \"AEST-10AEDT,M10.1.0,M4.1.0/3\",\n    \"Etc/GMT\": \"GMT0\",\n    \"Etc/GMT+0\": \"GMT0\",\n    \"Etc/GMT+1\": \"<-01>1\",\n    \"Etc/GMT+10\": \"<-10>10\",\n    \"Etc/GMT+11\": \"<-11>11\",\n    \"Etc/GMT+12\": \"<-12>12\",\n    \"Etc/GMT+2\": \"<-02>2\",\n    \"Etc/GMT+3\": \"<-03>3\",\n    \"Etc/GMT+4\": \"<-04>4\",\n    \"Etc/GMT+5\": \"<-05>5\",\n    \"Etc/GMT+6\": \"<-06>6\",\n    \"Etc/GMT+7\": \"<-07>7\",\n    \"Etc/GMT+8\": \"<-08>8\",\n    \"Etc/GMT+9\": \"<-09>9\",\n    \"Etc/GMT-0\": \"GMT0\",\n    \"Etc/GMT-1\": \"<+01>-1\",\n    \"Etc/GMT-10\": \"<+10>-10\",\n    \"Etc/GMT-11\": \"<+11>-11\",\n    \"Etc/GMT-12\": \"<+12>-12\",\n    \"Etc/GMT-13\": \"<+13>-13\",\n    \"Etc/GMT-14\": \"<+14>-14\",\n    \"Etc/GMT-2\": \"<+02>-2\",\n    \"Etc/GMT-3\": \"<+03>-3\",\n    \"Etc/GMT-4\": \"<+04>-4\",\n    \"Etc/GMT-5\": \"<+05>-5\",\n    \"Etc/GMT-6\": \"<+06>-6\",\n    \"Etc/GMT-7\": \"<+07>-7\",\n    \"Etc/GMT-8\": \"<+08>-8\",\n    \"Etc/GMT-9\": \"<+09>-9\",\n    \"Etc/GMT0\": \"GMT0\",\n    \"Etc/Greenwich\": \"GMT0\",\n    \"Etc/UCT\": \"UTC0\",\n    \"Etc/UTC\": \"UTC0\",\n    \"Etc/Universal\": \"UTC0\",\n    \"Etc/Zulu\": \"UTC0\",\n    \"Europe/Amsterdam\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Andorra\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Astrakhan\": \"<+04>-4\",\n    \"Europe/Athens\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Belgrade\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Berlin\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Bratislava\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Brussels\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Bucharest\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Budapest\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Busingen\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Chisinau\": \"EET-2EEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Copenhagen\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Dublin\": \"IST-1GMT0,M10.5.0,M3.5.0/1\",\n    \"Europe/Gibraltar\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Guernsey\": \"GMT0BST,M3.5.0/1,M10.5.0\",\n    \"Europe/Helsinki\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Isle_of_Man\": \"GMT0BST,M3.5.0/1,M10.5.0\",\n    \"Europe/Istanbul\": \"<+03>-3\",\n    \"Europe/Jersey\": \"GMT0BST,M3.5.0/1,M10.5.0\",\n    \"Europe/Kaliningrad\": \"EET-2\",\n    \"Europe/Kiev\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Kirov\": \"MSK-3\",\n    \"Europe/Lisbon\": \"WET0WEST,M3.5.0/1,M10.5.0\",\n    \"Europe/Ljubljana\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/London\": \"GMT0BST,M3.5.0/1,M10.5.0\",\n    \"Europe/Luxembourg\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Madrid\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Malta\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Mariehamn\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Minsk\": \"<+03>-3\",\n    \"Europe/Monaco\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Moscow\": \"MSK-3\",\n    \"Europe/Oslo\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Paris\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Podgorica\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Prague\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Riga\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Rome\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Samara\": \"<+04>-4\",\n    \"Europe/San_Marino\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Sarajevo\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Saratov\": \"<+04>-4\",\n    \"Europe/Simferopol\": \"MSK-3\",\n    \"Europe/Skopje\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Sofia\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Stockholm\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Tallinn\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Tirane\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Ulyanovsk\": \"<+04>-4\",\n    \"Europe/Uzhgorod\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Vaduz\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Vatican\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Vienna\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Vilnius\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Volgograd\": \"MSK-3\",\n    \"Europe/Warsaw\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Zagreb\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Europe/Zaporozhye\": \"EET-2EEST,M3.5.0/3,M10.5.0/4\",\n    \"Europe/Zurich\": \"CET-1CEST,M3.5.0,M10.5.0/3\",\n    \"Indian/Antananarivo\": \"EAT-3\",\n    \"Indian/Chagos\": \"<+06>-6\",\n    \"Indian/Christmas\": \"<+07>-7\",\n    \"Indian/Cocos\": \"<+0630>-6:30\",\n    \"Indian/Comoro\": \"EAT-3\",\n    \"Indian/Kerguelen\": \"<+05>-5\",\n    \"Indian/Mahe\": \"<+04>-4\",\n    \"Indian/Maldives\": \"<+05>-5\",\n    \"Indian/Mauritius\": \"<+04>-4\",\n    \"Indian/Mayotte\": \"EAT-3\",\n    \"Indian/Reunion\": \"<+04>-4\",\n    \"Pacific/Apia\": \"<+13>-13\",\n    \"Pacific/Auckland\": \"NZST-12NZDT,M9.5.0,M4.1.0/3\",\n    \"Pacific/Bougainville\": \"<+11>-11\",\n    \"Pacific/Chatham\": \"<+1245>-12:45<+1345>,M9.5.0/2:45,M4.1.0/3:45\",\n    \"Pacific/Chuuk\": \"<+10>-10\",\n    \"Pacific/Easter\": \"<-06>6<-05>,M9.1.6/22,M4.1.6/22\",\n    \"Pacific/Efate\": \"<+11>-11\",\n    \"Pacific/Enderbury\": \"<+13>-13\",\n    \"Pacific/Fakaofo\": \"<+13>-13\",\n    \"Pacific/Fiji\": \"<+12>-12\",\n    \"Pacific/Funafuti\": \"<+12>-12\",\n    \"Pacific/Galapagos\": \"<-06>6\",\n    \"Pacific/Gambier\": \"<-09>9\",\n    \"Pacific/Guadalcanal\": \"<+11>-11\",\n    \"Pacific/Guam\": \"ChST-10\",\n    \"Pacific/Honolulu\": \"HST10\",\n    \"Pacific/Kiritimati\": \"<+14>-14\",\n    \"Pacific/Kosrae\": \"<+11>-11\",\n    \"Pacific/Kwajalein\": \"<+12>-12\",\n    \"Pacific/Majuro\": \"<+12>-12\",\n    \"Pacific/Marquesas\": \"<-0930>9:30\",\n    \"Pacific/Midway\": \"SST11\",\n    \"Pacific/Nauru\": \"<+12>-12\",\n    \"Pacific/Niue\": \"<-11>11\",\n    \"Pacific/Norfolk\": \"<+11>-11<+12>,M10.1.0,M4.1.0/3\",\n    \"Pacific/Noumea\": \"<+11>-11\",\n    \"Pacific/Pago_Pago\": \"SST11\",\n    \"Pacific/Palau\": \"<+09>-9\",\n    \"Pacific/Pitcairn\": \"<-08>8\",\n    \"Pacific/Pohnpei\": \"<+11>-11\",\n    \"Pacific/Port_Moresby\": \"<+10>-10\",\n    \"Pacific/Rarotonga\": \"<-10>10\",\n    \"Pacific/Saipan\": \"ChST-10\",\n    \"Pacific/Tahiti\": \"<-10>10\",\n    \"Pacific/Tarawa\": \"<+12>-12\",\n    \"Pacific/Tongatapu\": \"<+13>-13\",\n    \"Pacific/Wake\": \"<+12>-12\",\n    \"Pacific/Wallis\": \"<+12>-12\"\n  }\n}\n"
  },
  {
    "path": "webserver/packages/neato/src/types.d.ts",
    "content": "\ndeclare global {\n    interface Window {\n        source: EventSource;\n        apiBasePath: string;\n        entities: entityConfig[];\n    }\n}\n\nexport interface entityConfig {\n  unique_id: string;\n  sorting_weight: number;\n  sorting_group?: string;\n  domain: string;\n  id: string;\n  state: string;\n  detail: string;\n  value: string;\n  name: string;\n  entity_category?: number;\n  when: string;\n  icon?: string;\n  option?: string[];\n  assumed_state?: boolean;\n  brightness?: number;\n  color_mode?: string;\n  color: object;\n  target_temperature?: number;\n  target_temperature_low?: number;\n  target_temperature_high?: number;\n  min_temp?: number;\n  max_temp?: number;\n  min_value?: string;\n  max_value?: string;\n  step?: number;\n  min_length?: number;\n  max_length?: number;\n  pattern?: string;\n  current_temperature?: number;\n  modes?: number[];\n  mode?: number;\n  speed_count?: number;\n  speed_level?: number;\n  speed: string;\n  effects?: string[];\n  effect?: string;\n  has_action?: boolean;\n  value_numeric_history: number[];\n  uom?: string;\n  is_disabled_by_default?: boolean;\n}"
  },
  {
    "path": "webserver/packages/neato/src/utils.ts",
    "content": "\n\nexport function getBasePath() {\n  let str = window.location.pathname;\n  return str.endsWith(\"/\") ? str.slice(0, -1) : str;\n}\n\n"
  },
  {
    "path": "webserver/packages/neato/vite.config.ts",
    "content": "import { defineConfig } from \"vite\";\nimport gzipPlugin from \"rollup-plugin-gzip\";\nimport minifyHTML from \"rollup-plugin-minify-html-template-literals\";\nimport { brotliCompressSync } from \"zlib\";\nimport { nodeResolve } from \"@rollup/plugin-node-resolve\";\nimport loadVersion from \"vite-plugin-package-version\";\nimport { viteSingleFile } from \"vite-plugin-singlefile\";\nimport { minifyHtml as ViteMinifyHtml } from \"vite-plugin-html\";\nimport stripBanner from \"rollup-plugin-strip-banner\";\nimport replace from \"@rollup/plugin-replace\";\n\nconst proxy_target = process.env.PROXY_TARGET || \"http://nodemcu.local\";\n\nexport default defineConfig({\n  clearScreen: false,\n  plugins: [\n    {\n      ...nodeResolve({ exportConditions: [\"development\"] }),\n      enforce: \"pre\",\n      apply: \"start\",\n    },\n    stripBanner(),\n    loadVersion(),\n    { ...minifyHTML(), enforce: \"pre\", apply: \"build\" },\n    //\n    {\n      ...ViteMinifyHtml({ removeComments: true }),\n      enforce: \"post\",\n      apply: \"build\",\n    },\n    replace({\n      \"@license\": \"license\",\n      \"Value passed to 'css' function must be a 'css' function result:\":\n        \"use css function\",\n      \"Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\":\n        \"Use unsafeCSS\",\n      delimiters: [\"\", \"\"],\n      preventAssignment: true,\n    }),\n    viteSingleFile(),\n    {\n      ...gzipPlugin({\n        filter: /\\.(js|css|html|svg)$/,\n        additionalFiles: [],\n        customCompression: (content) =>\n          brotliCompressSync(Buffer.from(content)),\n        fileName: \".br\",\n      }),\n      enforce: \"post\",\n      apply: \"build\",\n    },\n    {\n      ...gzipPlugin({ filter: /\\.(js|css|html|svg)$/ }),\n      enforce: \"post\",\n      apply: \"build\",\n    },\n  ],\n  build: {\n    brotliSize: false,\n    // cssCodeSplit: true,\n    outDir: \"../../_static/neato\",\n    // polyfillModulePreload: false,\n    rollupOptions: {\n      output: {\n        inlineDynamicImports: false,\n        manualChunks: (chunk) => {\n          return \"vendor\";\n        }, // create one js bundle,\n        chunkFileNames: \"[name].js\",\n        assetFileNames: \"www[extname]\",\n        entryFileNames: \"www.js\",\n      },\n    },\n  },\n  server: {\n    open: \"/\", // auto open browser in dev mode\n    host: true, // dev on local and network\n    port: 5001,\n    strictPort: true,\n    proxy: {\n      \"/light\": proxy_target,\n      \"/select\": proxy_target,\n      \"/cover\": proxy_target,\n      \"/switch\": proxy_target,\n      \"/button\": proxy_target,\n      \"/fan\": proxy_target,\n      \"/lock\": proxy_target,\n      \"/number\": proxy_target,\n      \"/climate\": proxy_target,\n      \"/events\": proxy_target,\n      \"/text\": proxy_target,\n      \"/date\": proxy_target,\n      \"/time\": proxy_target,\n      \"/valve\": proxy_target,\n    },\n  },\n});\n"
  },
  {
    "path": "webserver/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    /* Visit https://aka.ms/tsconfig.json to read more about this file */\n\n    /* Basic Options */\n    // \"incremental\": true,                         /* Enable incremental compilation */\n    \"target\": \"es2020\",                             /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */\n    \"module\": \"es2020\",                             /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */\n    // \"lib\": [],                                   /* Specify library files to be included in the compilation. */\n    // \"allowJs\": true,                             /* Allow javascript files to be compiled. */\n    // \"checkJs\": true,                             /* Report errors in .js files. */\n    // \"jsx\": \"preserve\",                           /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */\n    // \"declaration\": true,                         /* Generates corresponding '.d.ts' file. */\n    // \"declarationMap\": true,                      /* Generates a sourcemap for each corresponding '.d.ts' file. */\n    // \"sourceMap\": true,                           /* Generates corresponding '.map' file. */\n    // \"outFile\": \"./\",                             /* Concatenate and emit output to single file. */\n    // \"outDir\": \"./\",                              /* Redirect output structure to the directory. */\n    // \"rootDir\": \"./\",                             /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */\n    // \"composite\": true,                           /* Enable project compilation */\n    // \"tsBuildInfoFile\": \"./\",                     /* Specify file to store incremental compilation information */\n    // \"removeComments\": true,                      /* Do not emit comments to output. */\n    // \"noEmit\": true,                              /* Do not emit outputs. */\n    // \"importHelpers\": true,                       /* Import emit helpers from 'tslib'. */\n    // \"downlevelIteration\": true,                  /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */\n    // \"isolatedModules\": true,                     /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */\n\n    /* Strict Type-Checking Options */\n    \"strict\": true,                                 /* Enable all strict type-checking options. */\n    // \"noImplicitAny\": true,                       /* Raise error on expressions and declarations with an implied 'any' type. */\n    // \"strictNullChecks\": true,                    /* Enable strict null checks. */\n    // \"strictFunctionTypes\": true,                 /* Enable strict checking of function types. */\n    // \"strictBindCallApply\": true,                 /* Enable strict 'bind', 'call', and 'apply' methods on functions. */\n    // \"strictPropertyInitialization\": true,        /* Enable strict checking of property initialization in classes. */\n    // \"noImplicitThis\": true,                      /* Raise error on 'this' expressions with an implied 'any' type. */\n    // \"alwaysStrict\": true,                        /* Parse in strict mode and emit \"use strict\" for each source file. */\n\n    /* Additional Checks */\n    // \"noUnusedLocals\": true,                      /* Report errors on unused locals. */\n    // \"noUnusedParameters\": true,                  /* Report errors on unused parameters. */\n    // \"noImplicitReturns\": true,                   /* Report error when not all code paths in function return a value. */\n    // \"noFallthroughCasesInSwitch\": true,          /* Report errors for fallthrough cases in switch statement. */\n    // \"noUncheckedIndexedAccess\": true,            /* Include 'undefined' in index signature results */\n    // \"noPropertyAccessFromIndexSignature\": true,  /* Require undeclared properties from index signatures to use element accesses. */\n\n    /* Module Resolution Options */\n    \"moduleResolution\": \"node\",                  /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */\n    // \"baseUrl\": \"./\",                             /* Base directory to resolve non-absolute module names. */\n    // \"paths\": {},                                 /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */\n    // \"rootDirs\": [],                              /* List of root folders whose combined content represents the structure of the project at runtime. */\n    // \"typeRoots\": [],                             /* List of folders to include type definitions from. */\n    // \"types\": [],                                 /* Type declaration files to be included in compilation. */\n    // \"allowSyntheticDefaultImports\": true,        /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */\n    \"esModuleInterop\": true,                        /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */\n    // \"preserveSymlinks\": true,                    /* Do not resolve the real path of symlinks. */\n    // \"allowUmdGlobalAccess\": true,                /* Allow accessing UMD globals from modules. */\n\n    /* Source Map Options */\n    // \"sourceRoot\": \"\",                            /* Specify the location where debugger should locate TypeScript files instead of source locations. */\n    // \"mapRoot\": \"\",                               /* Specify the location where debugger should locate map files instead of generated locations. */\n    // \"inlineSourceMap\": true,                     /* Emit a single file with source maps instead of having a separate file. */\n    // \"inlineSources\": true,                       /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */\n\n    /* Experimental Options */\n    \"experimentalDecorators\": true,              /* Enables experimental support for ES7 decorators. */\n    // \"emitDecoratorMetadata\": true,               /* Enables experimental support for emitting type metadata for decorators. */\n\n    /* Advanced Options */\n    \"skipLibCheck\": true,                           /* Skip type checking of declaration files. */\n    \"forceConsistentCasingInFileNames\": true        /* Disallow inconsistently-cased references to the same file. */\n  }\n}\n"
  }
]