diff --git a/Makefile b/Makefile index 887930e..9a05159 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ BROWSER ?= firefox -.PHONY: test-browser-all test-browser-kvstore test-browser-vault test-browser-evm-client build-wasm-app +.PHONY: test-browser-all test-browser-kvstore test-browser-vault test-browser-evm-client build-wasm-app build-hero-vault-extension test-browser-all: test-browser-kvstore test-browser-vault test-browser-evm-client @@ -25,18 +25,7 @@ test-browser-evm-client: build-wasm-app: cd wasm_app && wasm-pack build --target web -# Build everything: wasm, copy, then extension -build-extension-all: build-wasm-app - cd extension && npm run build - -# Build everything: wasm, copy, then extension -build-vault-browser-ext: - cd wasm_app && wasm-pack build --target web --out-dir ../vault_browser_ext/wasm_app/pkg - cp vault_browser_ext/wasm_app/pkg/wasm_app.js vault_browser_ext/public/wasm/ - cp vault_browser_ext/wasm_app/pkg/wasm_app_bg.wasm vault_browser_ext/public/wasm/ - cd vault_browser_ext && npm install && npm run build - cp vault_browser_ext/manifest.json vault_browser_ext/dist/ - cp vault_browser_ext/*.png vault_browser_ext/dist/ - mkdir -p vault_browser_ext/dist/src - cp vault_browser_ext/sandbox.html vault_browser_ext/dist/ - cp vault_browser_ext/sandbox.js vault_browser_ext/dist/ \ No newline at end of file +# Build Hero Vault extension: wasm, copy, then extension +build-hero-vault-extension: + cd wasm_app && wasm-pack build --target web + cd hero_vault_extension && npm run build \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..6da007b --- /dev/null +++ b/build.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Main build script for Hero Vault Extension +# This script handles the complete build process in one step + +set -e # Exit on any error + +# Colors for better readability +GREEN="\033[0;32m" +BLUE="\033[0;34m" +RESET="\033[0m" + +echo -e "${BLUE}=== Building Hero Vault Extension ===${RESET}" + +# Step 1: Build the WASM package +echo -e "${BLUE}Building WASM package...${RESET}" +cd "$(dirname "$0")/wasm_app" || exit 1 +wasm-pack build --target web +echo -e "${GREEN}✓ WASM build successful!${RESET}" + +# Step 2: Build the frontend extension +echo -e "${BLUE}Building frontend extension...${RESET}" +cd ../hero_vault_extension || exit 1 + +# Copy WASM files to the extension's public directory +echo "Copying WASM files..." +mkdir -p public/wasm +cp ../wasm_app/pkg/wasm_app* public/wasm/ +cp ../wasm_app/pkg/*.d.ts public/wasm/ +cp ../wasm_app/pkg/package.json public/wasm/ + +# Build the extension without TypeScript checking +echo "Building extension..." +export NO_TYPECHECK=true +npm run build + +# Ensure the background script is properly built +echo "Building background script..." +node scripts/build-background.js +echo -e "${GREEN}✓ Frontend build successful!${RESET}" + +echo -e "${GREEN}=== Build Complete ===${RESET}" +echo "Extension is ready in: $(pwd)/dist" +echo "" +echo -e "${BLUE}To load the extension in Chrome:${RESET}" +echo "1. Go to chrome://extensions/" +echo "2. Enable Developer mode (toggle in top-right)" +echo "3. Click 'Load unpacked'" +echo "4. Select the 'dist' directory: $(pwd)/dist" diff --git a/extension/README.md b/extension/README.md deleted file mode 100644 index e8cd45c..0000000 --- a/extension/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Modular Vault Browser Extension - -A cross-browser (Manifest V3) extension for secure cryptographic operations and Rhai scripting, powered by Rust/WASM. - -## Features -- Session/keypair management -- Cryptographic signing, encryption, and EVM actions -- Secure WASM integration (signing only accessible from extension scripts) -- React-based popup UI with dark mode -- Future: WebSocket integration for remote scripting - -## Structure -- `manifest.json`: Extension manifest (MV3, Chrome/Firefox) -- `popup/`: React UI for user interaction -- `background/`: Service worker for session, keypair, and WASM logic -- `assets/`: Icons and static assets - -## Dev Workflow -1. Build Rust WASM: `wasm-pack build --target web --out-dir ../extension/wasm` -2. Install JS deps: `npm install` (from `extension/`) -3. Build popup: `npm run build` -4. Load `/extension` as an unpacked extension in your browser - ---- - -## Security -- WASM cryptographic APIs are only accessible from extension scripts (not content scripts or web pages). -- All sensitive actions require explicit user approval. - ---- - -## TODO -- Implement background logic for session/keypair -- Integrate popup UI with WASM APIs -- Add WebSocket support (Phase 2) diff --git a/extension/background/index.js b/extension/background/index.js deleted file mode 100644 index 9f62297..0000000 --- a/extension/background/index.js +++ /dev/null @@ -1,81 +0,0 @@ -// Background service worker for Modular Vault Extension -// Handles state persistence between popup sessions - -console.log('Background service worker started'); - -// Store session state locally for quicker access -let sessionState = { - currentKeyspace: null, - keypairs: [], - selectedKeypair: null -}; - -// Initialize state from storage -chrome.storage.local.get(['currentKeyspace', 'keypairs', 'selectedKeypair']) - .then(state => { - sessionState = { - currentKeyspace: state.currentKeyspace || null, - keypairs: state.keypairs || [], - selectedKeypair: state.selectedKeypair || null - }; - console.log('Session state loaded from storage:', sessionState); - }) - .catch(error => { - console.error('Failed to load session state:', error); - }); - -// Handle messages from the popup -chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { - console.log('Background received message:', message.action, message.type || ''); - - // Update session state - if (message.action === 'update_session') { - try { - const { type, data } = message; - - // Update our local state - if (type === 'keyspace') { - sessionState.currentKeyspace = data; - } else if (type === 'keypair_selected') { - sessionState.selectedKeypair = data; - } else if (type === 'keypair_added') { - sessionState.keypairs = [...sessionState.keypairs, data]; - } else if (type === 'keypairs_loaded') { - // Replace the entire keypair list with what came from the vault - console.log('Updating keypairs from vault:', data); - sessionState.keypairs = data; - } else if (type === 'session_locked') { - // When locking, we don't need to maintain keypairs in memory anymore - // since they'll be reloaded from the vault when unlocking - sessionState = { - currentKeyspace: null, - keypairs: [], // Clear keypairs from memory since they're in the vault - selectedKeypair: null - }; - } - - // Persist to storage - chrome.storage.local.set(sessionState) - .then(() => { - console.log('Updated session state in storage:', sessionState); - sendResponse({ success: true }); - }) - .catch(error => { - console.error('Failed to persist session state:', error); - sendResponse({ success: false, error: error.message }); - }); - - return true; // Keep connection open for async response - } catch (error) { - console.error('Error in update_session message handler:', error); - sendResponse({ success: false, error: error.message }); - return true; - } - } - - // Get session state - if (message.action === 'get_session') { - sendResponse(sessionState); - return false; // No async response needed - } -}); diff --git a/extension/build.js b/extension/build.js deleted file mode 100644 index 795a889..0000000 --- a/extension/build.js +++ /dev/null @@ -1,84 +0,0 @@ -// Simple build script for browser extension -const fs = require('fs'); -const path = require('path'); - -// Paths -const sourceDir = __dirname; -const distDir = path.join(sourceDir, 'dist'); - -// Make sure the dist directory exists -if (!fs.existsSync(distDir)) { - fs.mkdirSync(distDir, { recursive: true }); -} - -// Helper function to copy a file -function copyFile(src, dest) { - // Create destination directory if it doesn't exist - const destDir = path.dirname(dest); - if (!fs.existsSync(destDir)) { - fs.mkdirSync(destDir, { recursive: true }); - } - - // Copy the file - fs.copyFileSync(src, dest); - console.log(`Copied: ${path.relative(sourceDir, src)} -> ${path.relative(sourceDir, dest)}`); -} - -// Helper function to copy an entire directory -function copyDir(src, dest) { - // Create destination directory - if (!fs.existsSync(dest)) { - fs.mkdirSync(dest, { recursive: true }); - } - - // Get list of files - const files = fs.readdirSync(src); - - // Copy each file - for (const file of files) { - const srcPath = path.join(src, file); - const destPath = path.join(dest, file); - - const stat = fs.statSync(srcPath); - - if (stat.isDirectory()) { - // Recursively copy directories - copyDir(srcPath, destPath); - } else { - // Copy file - copyFile(srcPath, destPath); - } - } -} - -// Copy manifest -copyFile( - path.join(sourceDir, 'manifest.json'), - path.join(distDir, 'manifest.json') -); - -// Copy assets -copyDir( - path.join(sourceDir, 'assets'), - path.join(distDir, 'assets') -); - -// Copy popup files -copyDir( - path.join(sourceDir, 'popup'), - path.join(distDir, 'popup') -); - -// Copy background script -copyDir( - path.join(sourceDir, 'background'), - path.join(distDir, 'background') -); - -// Copy WebAssembly files -copyDir( - path.join(sourceDir, 'wasm'), - path.join(distDir, 'wasm') -); - -console.log('Build complete! Extension files copied to dist directory.'); diff --git a/extension/dist/assets/popup.js b/extension/dist/assets/popup.js deleted file mode 100644 index ab191c3..0000000 --- a/extension/dist/assets/popup.js +++ /dev/null @@ -1,70 +0,0 @@ -(function(Lc){"use strict";var qi=document.createElement("style");qi.textContent=`body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;margin:0;padding:0;background-color:#202124;color:#e8eaed}.container{width:350px;padding:15px}h1{font-size:18px;margin:0 0 15px;border-bottom:1px solid #3c4043;padding-bottom:10px}h2{font-size:16px;margin:10px 0}.form-section{margin-bottom:20px;background-color:#292a2d;border-radius:8px;padding:15px}.form-group{margin-bottom:10px}label{display:block;margin-bottom:5px;font-size:13px;color:#9aa0a6}input,textarea{width:100%;padding:8px;border:1px solid #3c4043;border-radius:4px;background-color:#202124;color:#e8eaed;box-sizing:border-box}textarea{min-height:60px;resize:vertical}button{background-color:#8ab4f8;color:#202124;border:none;border-radius:4px;padding:8px 16px;font-weight:500;cursor:pointer;transition:background-color .3s}button:hover{background-color:#669df6}button.small{padding:4px 8px;font-size:12px}.button-group{display:flex;gap:10px}.status{margin:10px 0;padding:8px;background-color:#292a2d;border-radius:4px;font-size:13px}.list{margin-top:10px;max-height:150px;overflow-y:auto}.list-item{display:flex;justify-content:space-between;align-items:center;padding:8px;border-bottom:1px solid #3c4043}.list-item.selected{background-color:#8ab4f81a}.hidden{display:none}.session-info{margin-top:15px}body{margin:0;font-family:Inter,Arial,sans-serif;background:#181c20;color:#f3f6fa}.App{padding:1.5rem;min-width:320px;max-width:400px;background:#23272e;border-radius:12px;box-shadow:0 4px 24px #0003}h1{font-size:1.5rem;margin-bottom:.5rem}p{color:#b0bac9;margin-bottom:1.5rem}.status{margin-bottom:1rem} -`,document.head.appendChild(qi);function Tc(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const Oc=Tc(Lc),Ip="";var bi={exports:{}},pr={},eu={exports:{}},R={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var kt=Symbol.for("react.element"),jc=Symbol.for("react.portal"),Rc=Symbol.for("react.fragment"),Mc=Symbol.for("react.strict_mode"),Dc=Symbol.for("react.profiler"),Ic=Symbol.for("react.provider"),Fc=Symbol.for("react.context"),Ac=Symbol.for("react.forward_ref"),Uc=Symbol.for("react.suspense"),$c=Symbol.for("react.memo"),Wc=Symbol.for("react.lazy"),nu=Symbol.iterator;function Bc(e){return e===null||typeof e!="object"?null:(e=nu&&e[nu]||e["@@iterator"],typeof e=="function"?e:null)}var tu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ru=Object.assign,lu={};function Vn(e,n,t){this.props=e,this.context=n,this.refs=lu,this.updater=t||tu}Vn.prototype.isReactComponent={},Vn.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},Vn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ou(){}ou.prototype=Vn.prototype;function Ol(e,n,t){this.props=e,this.context=n,this.refs=lu,this.updater=t||tu}var jl=Ol.prototype=new ou;jl.constructor=Ol,ru(jl,Vn.prototype),jl.isPureReactComponent=!0;var iu=Array.isArray,uu=Object.prototype.hasOwnProperty,Rl={current:null},su={key:!0,ref:!0,__self:!0,__source:!0};function au(e,n,t){var r,l={},o=null,i=null;if(n!=null)for(r in n.ref!==void 0&&(i=n.ref),n.key!==void 0&&(o=""+n.key),n)uu.call(n,r)&&!su.hasOwnProperty(r)&&(l[r]=n[r]);var u=arguments.length-2;if(u===1)l.children=t;else if(1>>1,q=x[Q];if(0>>1;Ql(Ji,j))Bnl(Tl,Ji)?(x[Q]=Tl,x[Bn]=j,Q=Bn):(x[Q]=Ji,x[Wn]=j,Q=Wn);else if(Bnl(Tl,j))x[Q]=Tl,x[Bn]=j,Q=Bn;else break e}}return O}function l(x,O){var j=x.sortIndex-O.sortIndex;return j!==0?j:x.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],f=[],g=1,m=null,p=3,v=!1,_=!1,w=!1,F=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(x){for(var O=t(f);O!==null;){if(O.callback===null)r(f);else if(O.startTime<=x)r(f),O.sortIndex=O.expirationTime,n(s,O);else break;O=t(f)}}function y(x){if(w=!1,d(x),!_)if(t(s)!==null)_=!0,Gi(S);else{var O=t(f);O!==null&&Zi(y,O.startTime-x)}}function S(x,O){_=!1,w&&(w=!1,c(N),N=-1),v=!0;var j=p;try{for(d(O),m=t(s);m!==null&&(!(m.expirationTime>O)||x&&!de());){var Q=m.callback;if(typeof Q=="function"){m.callback=null,p=m.priorityLevel;var q=Q(m.expirationTime<=O);O=e.unstable_now(),typeof q=="function"?m.callback=q:m===t(s)&&r(s),d(O)}else r(s);m=t(s)}if(m!==null)var Ll=!0;else{var Wn=t(f);Wn!==null&&Zi(y,Wn.startTime-O),Ll=!1}return Ll}finally{m=null,p=j,v=!1}}var E=!1,C=null,N=-1,z=5,L=-1;function de(){return!(e.unstable_now()-Lx||125Q?(x.sortIndex=j,n(f,x),t(s)===null&&x===t(f)&&(w?(c(N),N=-1):w=!0,Zi(y,j-Q))):(x.sortIndex=q,n(s,x),_||v||(_=!0,Gi(S))),x},e.unstable_shouldYield=de,e.unstable_wrapCallback=function(x){var O=p;return function(){var j=p;p=O;try{return x.apply(this,arguments)}finally{p=j}}}})(gu),mu.exports=gu;var bc=mu.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var ef=b,we=bc;function h(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Il=Object.prototype.hasOwnProperty,nf=/^[: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]*$/,hu={},vu={};function tf(e){return Il.call(vu,e)?!0:Il.call(hu,e)?!1:nf.test(e)?vu[e]=!0:(hu[e]=!0,!1)}function rf(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lf(e,n,t,r){if(n===null||typeof n>"u"||rf(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ae(e,n,t,r,l,o,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=o,this.removeEmptyString=i}var ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ee[e]=new ae(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];ee[n]=new ae(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ee[e]=new ae(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ee[e]=new ae(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ee[e]=new ae(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){ee[e]=new ae(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){ee[e]=new ae(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){ee[e]=new ae(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){ee[e]=new ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fl=/[\-:]([a-z])/g;function Al(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(Fl,Al);ee[n]=new ae(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Fl,Al);ee[n]=new ae(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Fl,Al);ee[n]=new ae(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){ee[e]=new ae(e,1,!1,e.toLowerCase(),null,!1,!1)}),ee.xlinkHref=new ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){ee[e]=new ae(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ul(e,n,t,r){var l=ee.hasOwnProperty(n)?ee[n]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var s=` -`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{Yl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?Et(e):""}function of(e){switch(e.tag){case 5:return Et(e.type);case 16:return Et("Lazy");case 13:return Et("Suspense");case 19:return Et("SuspenseList");case 0:case 2:case 15:return e=Xl(e.type,!1),e;case 11:return e=Xl(e.type.render,!1),e;case 1:return e=Xl(e.type,!0),e;default:return""}}function Gl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Qn:return"Fragment";case Hn:return"Portal";case Wl:return"Profiler";case $l:return"StrictMode";case Vl:return"Suspense";case Kl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _u:return(e.displayName||"Context")+".Consumer";case wu:return(e._context.displayName||"Context")+".Provider";case Bl:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hl:return n=e.displayName||null,n!==null?n:Gl(e.type)||"Memo";case tn:n=e._payload,e=e._init;try{return Gl(e(n))}catch{}}return null}function uf(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Gl(n);case 8:return n===$l?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function rn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xu(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function sf(e){var n=xu(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,o=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function vr(e){e._valueTracker||(e._valueTracker=sf(e))}function Eu(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=xu(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function wr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Zl(e,n){var t=n.checked;return W({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function Cu(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=rn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Nu(e,n){n=n.checked,n!=null&&Ul(e,"checked",n,!1)}function Jl(e,n){Nu(e,n);var t=rn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?ql(e,n.type,t):n.hasOwnProperty("defaultValue")&&ql(e,n.type,rn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Pu(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function ql(e,n,t){(n!=="number"||wr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var Ct=Array.isArray;function Yn(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=_r.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Nt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var Pt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},af=["Webkit","ms","Moz","O"];Object.keys(Pt).forEach(function(e){af.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Pt[n]=Pt[e]})});function Ru(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||Pt.hasOwnProperty(e)&&Pt[e]?(""+n).trim():n+"px"}function Mu(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=Ru(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var cf=W({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function no(e,n){if(n){if(cf[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(h(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(h(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(h(61))}if(n.style!=null&&typeof n.style!="object")throw Error(h(62))}}function to(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";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 ro=null;function lo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oo=null,Xn=null,Gn=null;function Du(e){if(e=Gt(e)){if(typeof oo!="function")throw Error(h(280));var n=e.stateNode;n&&(n=Vr(n),oo(e.stateNode,e.type,n))}}function Iu(e){Xn?Gn?Gn.push(e):Gn=[e]:Xn=e}function Fu(){if(Xn){var e=Xn,n=Gn;if(Gn=Xn=null,Du(e),n)for(e=0;e>>=0,e===0?32:31-(kf(e)/Sf|0)|0}var Cr=64,Nr=4194304;function Ot(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pr(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=t&268435455;if(i!==0){var u=i&~l;u!==0?r=Ot(u):(o&=i,o!==0&&(r=Ot(o)))}else i=t&~l,i!==0?r=Ot(i):o!==0&&(r=Ot(o));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,o=n&-n,l>=o||l===16&&(o&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function jt(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Oe(n),e[n]=t}function Nf(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=$t),fs=String.fromCharCode(32),ds=!1;function ps(e,n){switch(e){case"keyup":return ed.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ms(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qn=!1;function td(e,n){switch(e){case"compositionend":return ms(n);case"keypress":return n.which!==32?null:(ds=!0,fs);case"textInput":return e=n.data,e===fs&&ds?null:e;default:return null}}function rd(e,n){if(qn)return e==="compositionend"||!Eo&&ps(e,n)?(e=os(),jr=vo=an=null,qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=ks(t)}}function xs(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?xs(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Es(){for(var e=window,n=wr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=wr(e.document)}return n}function Po(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function dd(e){var n=Es(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&xs(t.ownerDocument.documentElement,t)){if(r!==null&&Po(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Ss(t,o);var i=Ss(t,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(n),e.extend(i.node,i.offset)):(n.setEnd(i.node,i.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,bn=null,zo=null,Kt=null,Lo=!1;function Cs(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Lo||bn==null||bn!==wr(r)||(r=bn,"selectionStart"in r&&Po(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}),Kt&&Vt(Kt,r)||(Kt=r,r=$r(zo,"onSelect"),0lt||(e.current=Wo[lt],Wo[lt]=null,lt--)}function I(e,n){lt++,Wo[lt]=e.current,e.current=n}var pn={},le=dn(pn),pe=dn(!1),Pn=pn;function ot(e,n){var t=e.type.contextTypes;if(!t)return pn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in t)l[o]=n[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function me(e){return e=e.childContextTypes,e!=null}function Kr(){U(pe),U(le)}function $s(e,n,t){if(le.current!==pn)throw Error(h(168));I(le,n),I(pe,t)}function Ws(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(h(108,uf(e)||"Unknown",l));return W({},t,r)}function Hr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pn,Pn=le.current,I(le,e),I(pe,pe.current),!0}function Bs(e,n,t){var r=e.stateNode;if(!r)throw Error(h(169));t?(e=Ws(e,n,Pn),r.__reactInternalMemoizedMergedChildContext=e,U(pe),U(le),I(le,e)):U(pe),I(pe,t)}var Ye=null,Qr=!1,Bo=!1;function Vs(e){Ye===null?Ye=[e]:Ye.push(e)}function Ed(e){Qr=!0,Vs(e)}function mn(){if(!Bo&&Ye!==null){Bo=!0;var e=0,n=D;try{var t=Ye;for(D=1;e>=i,l-=i,Xe=1<<32-Oe(n)+l|t<N?(z=C,C=null):z=C.sibling;var L=p(c,C,d[N],y);if(L===null){C===null&&(C=z);break}e&&C&&L.alternate===null&&n(c,C),a=o(L,a,N),E===null?S=L:E.sibling=L,E=L,C=z}if(N===d.length)return t(c,C),$&&Ln(c,N),S;if(C===null){for(;NN?(z=C,C=null):z=C.sibling;var de=p(c,C,L.value,y);if(de===null){C===null&&(C=z);break}e&&C&&de.alternate===null&&n(c,C),a=o(de,a,N),E===null?S=de:E.sibling=de,E=de,C=z}if(L.done)return t(c,C),$&&Ln(c,N),S;if(C===null){for(;!L.done;N++,L=d.next())L=m(c,L.value,y),L!==null&&(a=o(L,a,N),E===null?S=L:E.sibling=L,E=L);return $&&Ln(c,N),S}for(C=r(c,C);!L.done;N++,L=d.next())L=v(C,c,N,L.value,y),L!==null&&(e&&L.alternate!==null&&C.delete(L.key===null?N:L.key),a=o(L,a,N),E===null?S=L:E.sibling=L,E=L);return e&&C.forEach(function(fr){return n(c,fr)}),$&&Ln(c,N),S}function F(c,a,d,y){if(typeof d=="object"&&d!==null&&d.type===Qn&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case hr:e:{for(var S=d.key,E=a;E!==null;){if(E.key===S){if(S=d.type,S===Qn){if(E.tag===7){t(c,E.sibling),a=l(E,d.props.children),a.return=c,c=a;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===tn&&Gs(S)===E.type){t(c,E.sibling),a=l(E,d.props),a.ref=Zt(c,E,d),a.return=c,c=a;break e}t(c,E);break}else n(c,E);E=E.sibling}d.type===Qn?(a=Fn(d.props.children,c.mode,y,d.key),a.return=c,c=a):(y=_l(d.type,d.key,d.props,null,c.mode,y),y.ref=Zt(c,a,d),y.return=c,c=y)}return i(c);case Hn:e:{for(E=d.key;a!==null;){if(a.key===E)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){t(c,a.sibling),a=l(a,d.children||[]),a.return=c,c=a;break e}else{t(c,a);break}else n(c,a);a=a.sibling}a=Ui(d,c.mode,y),a.return=c,c=a}return i(c);case tn:return E=d._init,F(c,a,E(d._payload),y)}if(Ct(d))return _(c,a,d,y);if(xt(d))return w(c,a,d,y);Zr(c,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(t(c,a.sibling),a=l(a,d),a.return=c,c=a):(t(c,a),a=Ai(d,c.mode,y),a.return=c,c=a),i(c)):t(c,a)}return F}var at=Zs(!0),Js=Zs(!1),Jr=dn(null),qr=null,ct=null,Xo=null;function Go(){Xo=ct=qr=null}function Zo(e){var n=Jr.current;U(Jr),e._currentValue=n}function Jo(e,n,t){for(;e!==null;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===t)break;e=e.return}}function ft(e,n){qr=e,Xo=ct=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(ge=!0),e.firstContext=null)}function Pe(e){var n=e._currentValue;if(Xo!==e)if(e={context:e,memoizedValue:n,next:null},ct===null){if(qr===null)throw Error(h(308));ct=e,qr.dependencies={lanes:0,firstContext:e}}else ct=ct.next=e;return n}var Tn=null;function qo(e){Tn===null?Tn=[e]:Tn.push(e)}function qs(e,n,t,r){var l=n.interleaved;return l===null?(t.next=t,qo(n)):(t.next=l.next,l.next=t),n.interleaved=t,Ze(e,r)}function Ze(e,n){e.lanes|=n;var t=e.alternate;for(t!==null&&(t.lanes|=n),t=e,e=e.return;e!==null;)e.childLanes|=n,t=e.alternate,t!==null&&(t.childLanes|=n),t=e,e=e.return;return t.tag===3?t.stateNode:null}var gn=!1;function bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bs(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Je(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function yn(e,n,t){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,M&2){var l=r.pending;return l===null?n.next=n:(n.next=l.next,l.next=n),r.pending=n,Ze(e,t)}return l=r.interleaved,l===null?(n.next=n,qo(r)):(n.next=l.next,l.next=n),r.interleaved=n,Ze(e,t)}function br(e,n,t){if(n=n.updateQueue,n!==null&&(n=n.shared,(t&4194240)!==0)){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,po(e,t)}}function ea(e,n){var t=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,t===r)){var l=null,o=null;if(t=t.firstBaseUpdate,t!==null){do{var i={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};o===null?l=o=i:o=o.next=i,t=t.next}while(t!==null);o===null?l=o=n:o=o.next=n}else l=o=n;t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=t;return}e=t.lastBaseUpdate,e===null?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}function el(e,n,t,r){var l=e.updateQueue;gn=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var s=u,f=s.next;s.next=null,i===null?o=f:i.next=f,i=s;var g=e.alternate;g!==null&&(g=g.updateQueue,u=g.lastBaseUpdate,u!==i&&(u===null?g.firstBaseUpdate=f:u.next=f,g.lastBaseUpdate=s))}if(o!==null){var m=l.baseState;i=0,g=f=s=null,u=o;do{var p=u.lane,v=u.eventTime;if((r&p)===p){g!==null&&(g=g.next={eventTime:v,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var _=e,w=u;switch(p=n,v=t,w.tag){case 1:if(_=w.payload,typeof _=="function"){m=_.call(v,m,p);break e}m=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=w.payload,p=typeof _=="function"?_.call(v,m,p):_,p==null)break e;m=W({},m,p);break e;case 2:gn=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[u]:p.push(u))}else v={eventTime:v,lane:p,tag:u.tag,payload:u.payload,callback:u.callback,next:null},g===null?(f=g=v,s=m):g=g.next=v,i|=p;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;p=u,u=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(1);if(g===null&&(s=m),l.baseState=s,l.firstBaseUpdate=f,l.lastBaseUpdate=g,n=l.shared.interleaved,n!==null){l=n;do i|=l.lane,l=l.next;while(l!==n)}else o===null&&(l.shared.lanes=0);Rn|=i,e.lanes=i,e.memoizedState=m}}function na(e,n,t){if(e=n.effects,n.effects=null,e!==null)for(n=0;nt?t:4,e(!0);var r=li.transition;li.transition={};try{e(!1),n()}finally{D=t,li.transition=r}}function _a(){return ze().memoizedState}function zd(e,n,t){var r=_n(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},ka(e))Sa(n,t);else if(t=qs(e,n,t,r),t!==null){var l=fe();Fe(t,e,r,l),xa(t,n,r)}}function Ld(e,n,t){var r=_n(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(ka(e))Sa(n,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=n.lastRenderedReducer,o!==null))try{var i=n.lastRenderedState,u=o(i,t);if(l.hasEagerState=!0,l.eagerState=u,je(u,i)){var s=n.interleaved;s===null?(l.next=l,qo(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=qs(e,n,l,r),t!==null&&(l=fe(),Fe(t,e,r,l),xa(t,n,r))}}function ka(e){var n=e.alternate;return e===V||n!==null&&n===V}function Sa(e,n){er=rl=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function xa(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,po(e,t)}}var il={readContext:Pe,useCallback:oe,useContext:oe,useEffect:oe,useImperativeHandle:oe,useInsertionEffect:oe,useLayoutEffect:oe,useMemo:oe,useReducer:oe,useRef:oe,useState:oe,useDebugValue:oe,useDeferredValue:oe,useTransition:oe,useMutableSource:oe,useSyncExternalStore:oe,useId:oe,unstable_isNewReconciler:!1},Td={readContext:Pe,useCallback:function(e,n){return Be().memoizedState=[e,n===void 0?null:n],e},useContext:Pe,useEffect:da,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,ll(4194308,4,ga.bind(null,n,e),t)},useLayoutEffect:function(e,n){return ll(4194308,4,e,n)},useInsertionEffect:function(e,n){return ll(4,2,e,n)},useMemo:function(e,n){var t=Be();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=Be();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=zd.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var n=Be();return e={current:e},n.memoizedState=e},useState:ca,useDebugValue:fi,useDeferredValue:function(e){return Be().memoizedState=e},useTransition:function(){var e=ca(!1),n=e[0];return e=Pd.bind(null,e[1]),Be().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=V,l=Be();if($){if(t===void 0)throw Error(h(407));t=t()}else{if(t=n(),J===null)throw Error(h(349));jn&30||oa(r,n,t)}l.memoizedState=t;var o={value:t,getSnapshot:n};return l.queue=o,da(ua.bind(null,r,o,e),[e]),r.flags|=2048,rr(9,ia.bind(null,r,o,t,n),void 0,null),t},useId:function(){var e=Be(),n=J.identifierPrefix;if($){var t=Ge,r=Xe;t=(r&~(1<<32-Oe(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=nr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(t,{is:r.is}):(e=i.createElement(t),t==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,t),e[$e]=n,e[Xt]=r,Va(e,n,!1,!1),n.stateNode=e;e:{switch(i=to(t,r),t){case"dialog":A("cancel",e),A("close",e),l=r;break;case"iframe":case"object":case"embed":A("load",e),l=r;break;case"video":case"audio":for(l=0;lyt&&(n.flags|=128,r=!0,lr(o,!1),n.lanes=4194304)}else{if(!r)if(e=nl(i),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),lr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!$)return ie(n),null}else 2*H()-o.renderingStartTime>yt&&t!==1073741824&&(n.flags|=128,r=!0,lr(o,!1),n.lanes=4194304);o.isBackwards?(i.sibling=n.child,n.child=i):(t=o.last,t!==null?t.sibling=i:n.child=i,o.last=i)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=H(),n.sibling=null,t=B.current,I(B,r?t&1|2:t&1),n):(ie(n),null);case 22:case 23:return Di(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?xe&1073741824&&(ie(n),n.subtreeFlags&6&&(n.flags|=8192)):ie(n),null;case 24:return null;case 25:return null}throw Error(h(156,n.tag))}function Ad(e,n){switch(Ko(n),n.tag){case 1:return me(n.type)&&Kr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return dt(),U(pe),U(le),ri(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return ni(n),null;case 13:if(U(B),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(h(340));st()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return U(B),null;case 4:return dt(),null;case 10:return Zo(n.type._context),null;case 22:case 23:return Di(),null;case 24:return null;default:return null}}var cl=!1,ue=!1,Ud=typeof WeakSet=="function"?WeakSet:Set,k=null;function mt(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){K(e,n,r)}else t.current=null}function xi(e,n,t){try{t()}catch(r){K(e,n,r)}}var Qa=!1;function $d(e,n){if(Do=Tr,e=Es(),Po(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{t.nodeType,o.nodeType}catch{t=null;break e}var i=0,u=-1,s=-1,f=0,g=0,m=e,p=null;n:for(;;){for(var v;m!==t||l!==0&&m.nodeType!==3||(u=i+l),m!==o||r!==0&&m.nodeType!==3||(s=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)p=m,m=v;for(;;){if(m===e)break n;if(p===t&&++f===l&&(u=i),p===o&&++g===r&&(s=i),(v=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=v}t=u===-1||s===-1?null:{start:u,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(Io={focusedElem:e,selectionRange:t},Tr=!1,k=n;k!==null;)if(n=k,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,k=e;else for(;k!==null;){n=k;try{var _=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var w=_.memoizedProps,F=_.memoizedState,c=n.stateNode,a=c.getSnapshotBeforeUpdate(n.elementType===n.type?w:Me(n.type,w),F);c.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(h(163))}}catch(y){K(n,n.return,y)}if(e=n.sibling,e!==null){e.return=n.return,k=e;break}k=n.return}return _=Qa,Qa=!1,_}function or(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&xi(n,t,o)}l=l.next}while(l!==r)}}function fl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function Ei(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Ya(e){var n=e.alternate;n!==null&&(e.alternate=null,Ya(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[$e],delete n[Xt],delete n[$o],delete n[Sd],delete n[xd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Xa(e){return e.tag===5||e.tag===3||e.tag===4}function Ga(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xa(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ci(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Br));else if(r!==4&&(e=e.child,e!==null))for(Ci(e,n,t),e=e.sibling;e!==null;)Ci(e,n,t),e=e.sibling}function Ni(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ni(e,n,t),e=e.sibling;e!==null;)Ni(e,n,t),e=e.sibling}var ne=null,De=!1;function hn(e,n,t){for(t=t.child;t!==null;)Za(e,n,t),t=t.sibling}function Za(e,n,t){if(Ue&&typeof Ue.onCommitFiberUnmount=="function")try{Ue.onCommitFiberUnmount(Er,t)}catch{}switch(t.tag){case 5:ue||mt(t,n);case 6:var r=ne,l=De;ne=null,hn(e,n,t),ne=r,De=l,ne!==null&&(De?(e=ne,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):ne.removeChild(t.stateNode));break;case 18:ne!==null&&(De?(e=ne,t=t.stateNode,e.nodeType===8?Uo(e.parentNode,t):e.nodeType===1&&Uo(e,t),Ft(e)):Uo(ne,t.stateNode));break;case 4:r=ne,l=De,ne=t.stateNode.containerInfo,De=!0,hn(e,n,t),ne=r,De=l;break;case 0:case 11:case 14:case 15:if(!ue&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&xi(t,n,i),l=l.next}while(l!==r)}hn(e,n,t);break;case 1:if(!ue&&(mt(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(u){K(t,n,u)}hn(e,n,t);break;case 21:hn(e,n,t);break;case 22:t.mode&1?(ue=(r=ue)||t.memoizedState!==null,hn(e,n,t),ue=r):hn(e,n,t);break;default:hn(e,n,t)}}function Ja(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new Ud),n.forEach(function(r){var l=Gd.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function Ie(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=H()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Bd(r/1960))-r,10e?16:e,wn===null)var r=!1;else{if(e=wn,wn=null,yl=0,M&6)throw Error(h(331));var l=M;for(M|=4,k=e.current;k!==null;){var o=k,i=o.child;if(k.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sH()-Li?Dn(e,0):zi|=t),he(e,n)}function cc(e,n){n===0&&(e.mode&1?(n=Nr,Nr<<=1,!(Nr&130023424)&&(Nr=4194304)):n=1);var t=fe();e=Ze(e,n),e!==null&&(jt(e,n,t),he(e,t))}function Xd(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),cc(e,t)}function Gd(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(h(314))}r!==null&&r.delete(n),cc(e,t)}var fc;fc=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||pe.current)ge=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return ge=!1,Id(e,n,t);ge=!!(e.flags&131072)}else ge=!1,$&&n.flags&1048576&&Ks(n,Xr,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;al(e,n),e=n.pendingProps;var l=ot(n,le.current);ft(n,t),l=ii(null,n,r,e,l,t);var o=ui();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,me(r)?(o=!0,Hr(n)):o=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,bo(n),l.updater=ul,n.stateNode=l,l._reactInternals=n,pi(n,r,e,t),n=hi(null,n,r,!0,o,t)):(n.tag=0,$&&o&&Vo(n),ce(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(al(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=Jd(r),e=Me(r,e),l){case 0:n=yi(null,n,r,e,t);break e;case 1:n=Fa(null,n,r,e,t);break e;case 11:n=ja(null,n,r,e,t);break e;case 14:n=Ra(null,n,r,Me(r.type,e),t);break e}throw Error(h(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Me(r,l),yi(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Me(r,l),Fa(e,n,r,l,t);case 3:e:{if(Aa(n),e===null)throw Error(h(387));r=n.pendingProps,o=n.memoizedState,l=o.element,bs(e,n),el(n,r,null,t);var i=n.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},n.updateQueue.baseState=o,n.memoizedState=o,n.flags&256){l=pt(Error(h(423)),n),n=Ua(e,n,r,t,l);break e}else if(r!==l){l=pt(Error(h(424)),n),n=Ua(e,n,r,t,l);break e}else for(Se=fn(n.stateNode.containerInfo.firstChild),ke=n,$=!0,Re=null,t=Js(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(st(),r===l){n=qe(e,n,t);break e}ce(e,n,r,t)}n=n.child}return n;case 5:return ta(n),e===null&&Qo(n),r=n.type,l=n.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Fo(r,l)?i=null:o!==null&&Fo(r,o)&&(n.flags|=32),Ia(e,n),ce(e,n,i,t),n.child;case 6:return e===null&&Qo(n),null;case 13:return $a(e,n,t);case 4:return ei(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=at(n,null,r,t):ce(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Me(r,l),ja(e,n,r,l,t);case 7:return ce(e,n,n.pendingProps,t),n.child;case 8:return ce(e,n,n.pendingProps.children,t),n.child;case 12:return ce(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,o=n.memoizedProps,i=l.value,I(Jr,r._currentValue),r._currentValue=i,o!==null)if(je(o.value,i)){if(o.children===l.children&&!pe.current){n=qe(e,n,t);break e}}else for(o=n.child,o!==null&&(o.return=n);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Je(-1,t&-t),s.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var g=f.pending;g===null?s.next=s:(s.next=g.next,g.next=s),f.pending=s}}o.lanes|=t,s=o.alternate,s!==null&&(s.lanes|=t),Jo(o.return,t,n),u.lanes|=t;break}s=s.next}}else if(o.tag===10)i=o.type===n.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(h(341));i.lanes|=t,u=i.alternate,u!==null&&(u.lanes|=t),Jo(i,t,n),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===n){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ce(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,ft(n,t),l=Pe(l),r=r(l),n.flags|=1,ce(e,n,r,t),n.child;case 14:return r=n.type,l=Me(r,n.pendingProps),l=Me(r.type,l),Ra(e,n,r,l,t);case 15:return Ma(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Me(r,l),al(e,n),n.tag=1,me(r)?(e=!0,Hr(n)):e=!1,ft(n,t),Ca(n,r,l),pi(n,r,l,t),hi(null,n,r,!0,e,t);case 19:return Ba(e,n,t);case 22:return Da(e,n,t)}throw Error(h(156,n.tag))};function dc(e,n){return Hu(e,n)}function Zd(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Te(e,n,t,r){return new Zd(e,n,t,r)}function Fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jd(e){if(typeof e=="function")return Fi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bl)return 11;if(e===Hl)return 14}return 2}function Sn(e,n){var t=e.alternate;return t===null?(t=Te(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function _l(e,n,t,r,l,o){var i=2;if(r=e,typeof e=="function")Fi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Qn:return Fn(t.children,l,o,n);case $l:i=8,l|=8;break;case Wl:return e=Te(12,t,n,l|2),e.elementType=Wl,e.lanes=o,e;case Vl:return e=Te(13,t,n,l),e.elementType=Vl,e.lanes=o,e;case Kl:return e=Te(19,t,n,l),e.elementType=Kl,e.lanes=o,e;case ku:return kl(t,l,o,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wu:i=10;break e;case _u:i=9;break e;case Bl:i=11;break e;case Hl:i=14;break e;case tn:i=16,r=null;break e}throw Error(h(130,e==null?e:typeof e,""))}return n=Te(i,t,n,l),n.elementType=e,n.type=r,n.lanes=o,n}function Fn(e,n,t,r){return e=Te(7,e,r,n),e.lanes=t,e}function kl(e,n,t,r){return e=Te(22,e,r,n),e.elementType=ku,e.lanes=t,e.stateNode={isHidden:!1},e}function Ai(e,n,t){return e=Te(6,e,null,n),e.lanes=t,e}function Ui(e,n,t){return n=Te(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function qd(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fo(0),this.expirationTimes=fo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function $i(e,n,t,r,l,o,i,u,s){return e=new qd(e,n,t,u,s),n===1?(n=1,o===!0&&(n|=8)):n=0,o=Te(3,null,null,n),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},bo(o),e}function bd(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vc)}catch(e){console.error(e)}}vc(),pu.exports=ve;var lp=pu.exports,wc,_c=lp;wc=_c.createRoot,_c.hydrateRoot;function op({keyspaces:e,onUnlock:n,onCreate:t,locked:r,onLock:l,currentKeyspace:o}){const[i,u]=b.useState(e[0]||""),[s,f]=b.useState(""),[g,m]=b.useState("");return r?T.jsxs("div",{className:"keyspace-manager",children:[T.jsx("label",{children:"Keyspace:"}),T.jsx("select",{value:i,onChange:p=>u(p.target.value),children:e.map(p=>T.jsx("option",{value:p,children:p},p))}),T.jsx("button",{onClick:()=>n(i,s),disabled:!i||!s,children:"Unlock"}),T.jsxs("div",{style:{marginTop:"0.5rem"},children:[T.jsx("input",{placeholder:"New keyspace name",value:g,onChange:p=>m(p.target.value)}),T.jsx("input",{placeholder:"Password",type:"password",value:s,onChange:p=>f(p.target.value)}),T.jsx("button",{onClick:()=>t(g,s),disabled:!g||!s,children:"Create"})]})]}):T.jsxs("div",{className:"keyspace-manager",children:[T.jsxs("span",{children:["Keyspace: ",T.jsx("b",{children:o})]}),T.jsx("button",{onClick:l,style:{marginLeft:8},children:"Lock Session"})]})}function ip({keypairs:e,onSelect:n,onCreate:t,selectedKeypair:r}){const[l,o]=b.useState(!1);return T.jsxs("div",{className:"keypair-manager",children:[T.jsx("label",{children:"Keypair:"}),T.jsxs("select",{value:r||"",onChange:i=>n(i.target.value),children:[T.jsx("option",{value:"",disabled:!0,children:"Select keypair"}),e.map(i=>T.jsx("option",{value:i.id,children:i.label},i.id))]}),T.jsx("button",{onClick:()=>o(!0),style:{marginLeft:8},children:"Create New"}),l&&T.jsxs("div",{style:{marginTop:"0.5rem"},children:[T.jsx("button",{onClick:()=>{t(),o(!1)},children:"Create Secp256k1 Keypair"}),T.jsx("button",{onClick:()=>o(!1),style:{marginLeft:8},children:"Cancel"})]}),r&&T.jsxs("div",{style:{marginTop:"0.5rem"},children:[T.jsxs("span",{children:["Public Key: ",T.jsx("code",{children:e.find(i=>i.id===r)?.publicKey})]}),T.jsx("button",{onClick:()=>navigator.clipboard.writeText(e.find(i=>i.id===r)?.publicKey),style:{marginLeft:8},children:"Copy"})]})]})}function up({onSign:e,signature:n,loading:t}){const[r,l]=b.useState("");return T.jsxs("div",{className:"sign-message",children:[T.jsx("label",{children:"Message to sign:"}),T.jsx("input",{type:"text",placeholder:"Enter plaintext message",value:r,onChange:o=>l(o.target.value),style:{width:"100%",marginBottom:8}}),T.jsx("button",{onClick:()=>e(r),disabled:!r||t,children:t?"Signing...":"Sign"}),n&&T.jsxs("div",{style:{marginTop:"0.5rem"},children:[T.jsxs("span",{children:["Signature: ",T.jsx("code",{children:n})]}),T.jsx("button",{onClick:()=>navigator.clipboard.writeText(n),style:{marginLeft:8},children:"Copy"})]})]})}let P;function An(e){const n=P.__externref_table_alloc();return P.__wbindgen_export_2.set(n,e),n}function re(e,n){try{return e.apply(this,n)}catch(t){const r=An(t);P.__wbindgen_exn_store(r)}}const kc=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&kc.decode();let cr=null;function vt(){return(cr===null||cr.byteLength===0)&&(cr=new Uint8Array(P.memory.buffer)),cr}function xn(e,n){return e=e>>>0,kc.decode(vt().subarray(e,e+n))}function en(e){return e==null}function sp(e,n){return e=e>>>0,vt().subarray(e/1,e/1+n)}let Ee=0;const zl=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},ap=typeof zl.encodeInto=="function"?function(e,n){return zl.encodeInto(e,n)}:function(e,n){const t=zl.encode(e);return n.set(t),{read:e.length,written:t.length}};function nn(e,n,t){if(t===void 0){const u=zl.encode(e),s=n(u.length,1)>>>0;return vt().subarray(s,s+u.length).set(u),Ee=u.length,s}let r=e.length,l=n(r,1)>>>0;const o=vt();let i=0;for(;i127)break;o[l+i]=u}if(i!==r){i!==0&&(e=e.slice(i)),l=t(l,r,r=i+e.length*3,1)>>>0;const u=vt().subarray(l+i,l+r),s=ap(e,u);i+=s.written,l=t(l,r,i,1)>>>0}return Ee=i,l}let Un=null;function wt(){return(Un===null||Un.buffer.detached===!0||Un.buffer.detached===void 0&&Un.buffer!==P.memory.buffer)&&(Un=new DataView(P.memory.buffer)),Un}const Sc=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>{P.__wbindgen_export_5.get(e.dtor)(e.a,e.b)});function Ki(e,n,t,r){const l={a:e,b:n,cnt:1,dtor:t},o=(...i)=>{l.cnt++;const u=l.a;l.a=0;try{return r(u,l.b,...i)}finally{--l.cnt===0?(P.__wbindgen_export_5.get(l.dtor)(u,l.b),Sc.unregister(l)):l.a=u}};return o.original=l,Sc.register(o,l,l),o}function Hi(e){const n=typeof e;if(n=="number"||n=="boolean"||e==null)return`${e}`;if(n=="string")return`"${e}"`;if(n=="symbol"){const l=e.description;return l==null?"Symbol":`Symbol(${l})`}if(n=="function"){const l=e.name;return typeof l=="string"&&l.length>0?`Function(${l})`:"Function"}if(Array.isArray(e)){const l=e.length;let o="[";l>0&&(o+=Hi(e[0]));for(let i=1;i1)r=t[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message} -${e.stack}`:r}function cp(){P.init_rhai_env()}function Qi(e){const n=P.__wbindgen_export_2.get(e);return P.__externref_table_dealloc(e),n}function fp(e){const n=nn(e,P.__wbindgen_malloc,P.__wbindgen_realloc),t=Ee,r=P.run_rhai(n,t);if(r[2])throw Qi(r[1]);return Qi(r[0])}function dp(e,n){const t=nn(e,P.__wbindgen_malloc,P.__wbindgen_realloc),r=Ee,l=nn(n,P.__wbindgen_malloc,P.__wbindgen_realloc),o=Ee;return P.init_session(t,r,l,o)}function pp(){P.lock_session()}function mp(e){const n=nn(e,P.__wbindgen_malloc,P.__wbindgen_realloc),t=Ee,r=P.select_keypair(n,t);if(r[1])throw Qi(r[0])}function gp(){return P.list_keypairs()}function yp(e,n){var t=en(e)?0:nn(e,P.__wbindgen_malloc,P.__wbindgen_realloc),r=Ee,l=en(n)?0:nn(n,P.__wbindgen_malloc,P.__wbindgen_realloc),o=Ee;return P.add_keypair(t,r,l,o)}function hp(e,n){const t=n(e.length*1,1)>>>0;return vt().set(e,t/1),Ee=e.length,t}function vp(e){const n=hp(e,P.__wbindgen_malloc),t=Ee;return P.sign(n,t)}function wp(e,n,t){P.closure77_externref_shim(e,n,t)}function _p(e,n,t){P.closure126_externref_shim(e,n,t)}function kp(e,n,t){P.closure188_externref_shim(e,n,t)}function Sp(e,n,t,r){P.closure213_externref_shim(e,n,t,r)}const xp=["readonly","readwrite","versionchange","readwriteflush","cleanup"];async function Ep(e,n){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,n)}catch(r){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const t=await e.arrayBuffer();return await WebAssembly.instantiate(t,n)}else{const t=await WebAssembly.instantiate(e,n);return t instanceof WebAssembly.Instance?{instance:t,module:e}:t}}function xc(){const e={};return e.wbg={},e.wbg.__wbg_buffer_609cc3eee51ed158=function(n){return n.buffer},e.wbg.__wbg_call_672a4d21634d4a24=function(){return re(function(n,t){return n.call(t)},arguments)},e.wbg.__wbg_call_7cccdd69e0791ae2=function(){return re(function(n,t,r){return n.call(t,r)},arguments)},e.wbg.__wbg_createObjectStore_d2f9e1016f4d81b9=function(){return re(function(n,t,r,l){return n.createObjectStore(xn(t,r),l)},arguments)},e.wbg.__wbg_crypto_574e78ad8b13b65f=function(n){return n.crypto},e.wbg.__wbg_error_524f506f44df1645=function(n){console.error(n)},e.wbg.__wbg_error_ff4ddaabdfc5dbb3=function(){return re(function(n){const t=n.error;return en(t)?0:An(t)},arguments)},e.wbg.__wbg_getRandomValues_3c9c0d586e575a16=function(){return re(function(n,t){globalThis.crypto.getRandomValues(sp(n,t))},arguments)},e.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return re(function(n,t){n.getRandomValues(t)},arguments)},e.wbg.__wbg_get_4f73335ab78445db=function(n,t,r){const l=t[r>>>0];var o=en(l)?0:nn(l,P.__wbindgen_malloc,P.__wbindgen_realloc),i=Ee;wt().setInt32(n+4*1,i,!0),wt().setInt32(n+4*0,o,!0)},e.wbg.__wbg_get_67b2ba62fc30de12=function(){return re(function(n,t){return Reflect.get(n,t)},arguments)},e.wbg.__wbg_get_8da03f81f6a1111e=function(){return re(function(n,t){return n.get(t)},arguments)},e.wbg.__wbg_instanceof_IdbDatabase_a3ef009ca00059f9=function(n){let t;try{t=n instanceof IDBDatabase}catch{t=!1}return t},e.wbg.__wbg_instanceof_IdbFactory_12eaba3366f4302f=function(n){let t;try{t=n instanceof IDBFactory}catch{t=!1}return t},e.wbg.__wbg_instanceof_IdbOpenDbRequest_a3416e156c9db893=function(n){let t;try{t=n instanceof IDBOpenDBRequest}catch{t=!1}return t},e.wbg.__wbg_instanceof_IdbRequest_4813c3f207666aa4=function(n){let t;try{t=n instanceof IDBRequest}catch{t=!1}return t},e.wbg.__wbg_length_52b6c4580c5ec934=function(n){return n.length},e.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(n){return n.msCrypto},e.wbg.__wbg_new_23a2665fac83c611=function(n,t){try{var r={a:n,b:t},l=(i,u)=>{const s=r.a;r.a=0;try{return Sp(s,r.b,i,u)}finally{r.a=s}};return new Promise(l)}finally{r.a=r.b=0}},e.wbg.__wbg_new_405e22f390576ce2=function(){return new Object},e.wbg.__wbg_new_78feb108b6472713=function(){return new Array},e.wbg.__wbg_new_a12002a7f91c75be=function(n){return new Uint8Array(n)},e.wbg.__wbg_newnoargs_105ed471475aaf50=function(n,t){return new Function(xn(n,t))},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(n,t,r){return new Uint8Array(n,t>>>0,r>>>0)},e.wbg.__wbg_newwithlength_a381634e90c276d4=function(n){return new Uint8Array(n>>>0)},e.wbg.__wbg_node_905d3e251edff8a2=function(n){return n.node},e.wbg.__wbg_objectStoreNames_9bb1ab04a7012aaf=function(n){return n.objectStoreNames},e.wbg.__wbg_objectStore_21878d46d25b64b6=function(){return re(function(n,t,r){return n.objectStore(xn(t,r))},arguments)},e.wbg.__wbg_open_88b1390d99a7c691=function(){return re(function(n,t,r){return n.open(xn(t,r))},arguments)},e.wbg.__wbg_open_e0c0b2993eb596e1=function(){return re(function(n,t,r,l){return n.open(xn(t,r),l>>>0)},arguments)},e.wbg.__wbg_process_dc0fbacc7c1c06f7=function(n){return n.process},e.wbg.__wbg_push_737cfc8c1432c2c6=function(n,t){return n.push(t)},e.wbg.__wbg_put_066faa31a6a88f5b=function(){return re(function(n,t,r){return n.put(t,r)},arguments)},e.wbg.__wbg_put_9ef5363941008835=function(){return re(function(n,t){return n.put(t)},arguments)},e.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(n){queueMicrotask(n)},e.wbg.__wbg_queueMicrotask_d3219def82552485=function(n){return n.queueMicrotask},e.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return re(function(n,t){n.randomFillSync(t)},arguments)},e.wbg.__wbg_require_60cc747a6bc5215a=function(){return re(function(){return module.require},arguments)},e.wbg.__wbg_resolve_4851785c9c5f573d=function(n){return Promise.resolve(n)},e.wbg.__wbg_result_f29afabdf2c05826=function(){return re(function(n){return n.result},arguments)},e.wbg.__wbg_set_65595bdd868b3009=function(n,t,r){n.set(t,r>>>0)},e.wbg.__wbg_setonerror_d7e3056cc6e56085=function(n,t){n.onerror=t},e.wbg.__wbg_setonsuccess_afa464ee777a396d=function(n,t){n.onsuccess=t},e.wbg.__wbg_setonupgradeneeded_fcf7ce4f2eb0cb5f=function(n,t){n.onupgradeneeded=t},e.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const n=typeof global>"u"?null:global;return en(n)?0:An(n)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const n=typeof globalThis>"u"?null:globalThis;return en(n)?0:An(n)},e.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const n=typeof self>"u"?null:self;return en(n)?0:An(n)},e.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const n=typeof window>"u"?null:window;return en(n)?0:An(n)},e.wbg.__wbg_subarray_aa9065fa9dc5df96=function(n,t,r){return n.subarray(t>>>0,r>>>0)},e.wbg.__wbg_target_0a62d9d79a2a1ede=function(n){const t=n.target;return en(t)?0:An(t)},e.wbg.__wbg_then_44b73946d2fb3e7d=function(n,t){return n.then(t)},e.wbg.__wbg_transaction_d6d07c3c9963c49e=function(){return re(function(n,t,r){return n.transaction(t,xp[r])},arguments)},e.wbg.__wbg_versions_c01dfd4722a88165=function(n){return n.versions},e.wbg.__wbindgen_cb_drop=function(n){const t=n.original;return t.cnt--==1?(t.a=0,!0):!1},e.wbg.__wbindgen_closure_wrapper284=function(n,t,r){return Ki(n,t,78,wp)},e.wbg.__wbindgen_closure_wrapper493=function(n,t,r){return Ki(n,t,127,_p)},e.wbg.__wbindgen_closure_wrapper762=function(n,t,r){return Ki(n,t,189,kp)},e.wbg.__wbindgen_debug_string=function(n,t){const r=Hi(t),l=nn(r,P.__wbindgen_malloc,P.__wbindgen_realloc),o=Ee;wt().setInt32(n+4*1,o,!0),wt().setInt32(n+4*0,l,!0)},e.wbg.__wbindgen_init_externref_table=function(){const n=P.__wbindgen_export_2,t=n.grow(4);n.set(0,void 0),n.set(t+0,void 0),n.set(t+1,null),n.set(t+2,!0),n.set(t+3,!1)},e.wbg.__wbindgen_is_function=function(n){return typeof n=="function"},e.wbg.__wbindgen_is_null=function(n){return n===null},e.wbg.__wbindgen_is_object=function(n){const t=n;return typeof t=="object"&&t!==null},e.wbg.__wbindgen_is_string=function(n){return typeof n=="string"},e.wbg.__wbindgen_is_undefined=function(n){return n===void 0},e.wbg.__wbindgen_json_parse=function(n,t){return JSON.parse(xn(n,t))},e.wbg.__wbindgen_json_serialize=function(n,t){const r=t,l=JSON.stringify(r===void 0?null:r),o=nn(l,P.__wbindgen_malloc,P.__wbindgen_realloc),i=Ee;wt().setInt32(n+4*1,i,!0),wt().setInt32(n+4*0,o,!0)},e.wbg.__wbindgen_memory=function(){return P.memory},e.wbg.__wbindgen_string_new=function(n,t){return xn(n,t)},e.wbg.__wbindgen_throw=function(n,t){throw new Error(xn(n,t))},e.env=Oc,e}function Ec(e,n){return P=e.exports,Yi.__wbindgen_wasm_module=n,Un=null,cr=null,P.__wbindgen_start(),P}function Cp(e){if(P!==void 0)return P;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const n=xc();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));const t=new WebAssembly.Instance(e,n);return Ec(t,e)}async function Yi(e){if(P!==void 0)return P;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof e>"u"&&(e=new URL("/assets/wasm_app_bg.wasm",self.location));const n=xc();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:t,module:r}=await Ep(await e,n);return Ec(t,r)}const Np=Object.freeze(Object.defineProperty({__proto__:null,add_keypair:yp,default:Yi,initSync:Cp,init_rhai_env:cp,init_session:dp,list_keypairs:gp,lock_session:pp,run_rhai:fp,select_keypair:mp,sign:vp},Symbol.toStringTag,{value:"Module"}));let Ae=null;const $n={loading:!1,initialized:!1,error:null};async function Pp(){if(!($n.initialized||$n.loading)){$n.loading=!0;try{await Yi(),window.wasm_app=Np,console.log("Available WebAssembly functions:"),console.log("init_rhai_env:",typeof window.init_rhai_env,typeof(window.wasm_app&&window.wasm_app.init_rhai_env)),console.log("init_session:",typeof window.init_session,typeof(window.wasm_app&&window.wasm_app.init_session)),console.log("lock_session:",typeof window.lock_session,typeof(window.wasm_app&&window.wasm_app.lock_session)),console.log("add_keypair:",typeof window.add_keypair,typeof(window.wasm_app&&window.wasm_app.add_keypair)),console.log("select_keypair:",typeof window.select_keypair,typeof(window.wasm_app&&window.wasm_app.select_keypair)),console.log("sign:",typeof window.sign,typeof(window.wasm_app&&window.wasm_app.sign)),console.log("run_rhai:",typeof window.run_rhai,typeof(window.wasm_app&&window.wasm_app.run_rhai)),console.log("list_keypairs:",typeof window.list_keypairs,typeof(window.wasm_app&&window.wasm_app.list_keypairs)),Ae={init_rhai_env:window.init_rhai_env||window.wasm_app&&window.wasm_app.init_rhai_env,init_session:window.init_session||window.wasm_app&&window.wasm_app.init_session,lock_session:window.lock_session||window.wasm_app&&window.wasm_app.lock_session,add_keypair:window.add_keypair||window.wasm_app&&window.wasm_app.add_keypair,select_keypair:window.select_keypair||window.wasm_app&&window.wasm_app.select_keypair,sign:window.sign||window.wasm_app&&window.wasm_app.sign,run_rhai:window.run_rhai||window.wasm_app&&window.wasm_app.run_rhai,list_keypairs:window.list_keypairs||window.wasm_app&&window.wasm_app.list_keypairs,list_keypairs_debug:window.list_keypairs_debug||window.wasm_app&&window.wasm_app.list_keypairs_debug,check_indexeddb:window.check_indexeddb||window.wasm_app&&window.wasm_app.check_indexeddb},console.log("Registered WebAssembly module functions:");for(const[e,n]of Object.entries(Ae))console.log(`${e}: ${typeof n}`,n?"Available":"Missing");typeof Ae.init_rhai_env=="function"&&Ae.init_rhai_env(),$n.initialized=!0,console.log("WASM module loaded and initialized successfully")}catch(e){console.error("Failed to load WASM module:",e),$n.error=e.message||"Unknown error loading WebAssembly module"}finally{$n.loading=!1}}}function zp(){return{...$n}}function _t(){return Ae}async function Xi(){const e=_t();if(!e)throw new Error("WebAssembly module not loaded");try{console.log("🔍 Debugging vault state...");const n=` - let has_session = vault::has_active_session(); - let keyspace = ""; - if has_session { - keyspace = vault::get_current_keyspace(); - } - - // Return info about the session - { - "has_session": has_session, - "keyspace": keyspace - } - `;console.log("Checking session status...");const t=await e.run_rhai(n);if(console.log("Session status:",t),t&&t.has_session){const r=` - // Get all keypairs for the current keyspace - let keypairs = vault::list_keypairs(); - - // Add diagnostic information - let diagnostic = { - "keypair_count": keypairs.len(), - "keyspace": vault::get_current_keyspace(), - "keypairs": keypairs - }; - - diagnostic - `;console.log("Fetching keypair details...");const l=await e.run_rhai(r);return console.log("Keypair diagnostic:",l),l}return t}catch(n){return console.error("Error in debug function:",n),{error:n.toString()}}}async function Lp(){console.log("==============================================="),console.log("Starting getKeypairsFromVault...");const e=_t();if(!e)throw console.error("WebAssembly module not loaded!"),new Error("WebAssembly module not loaded");console.log("WebAssembly module:",e),console.log("Module functions available:",Object.keys(e)),await Cc()||console.warn("IndexedDB is not available or not working properly");try{if(typeof e.list_keypairs_debug=="function"){console.log("Using debug function to diagnose keypair loading issues...");const t=await e.list_keypairs_debug();if(console.log("Debug keypair listing result:",t),Array.isArray(t)&&t.length>0)return console.log("Debug function returned keypairs:",t),t;console.log("Debug function did not return keypairs, continuing with normal flow...")}}catch(t){console.error("Error in debug function:",t)}try{console.log("-----------------------------------------------"),console.log("Running diagnostics to check vault state..."),await Xi(),console.log("Diagnostics complete"),console.log("-----------------------------------------------"),console.log("Checking if list_keypairs function is available:",typeof e.list_keypairs);for(const l in e)console.log(`Module function: ${l} = ${typeof e[l]}`);if(typeof e.list_keypairs!="function"){console.error("list_keypairs function is not available in the WebAssembly module!"),console.log("Available functions:",Object.keys(e)),console.log("Falling back to using Rhai script for listing keypairs...");const l=` - // Get all keypairs from the current keyspace - let keypairs = vault::list_keypairs(); - keypairs - `,o=await e.run_rhai(l);return console.log("Retrieved keypairs from vault using Rhai:",o),o}console.log("Calling WebAssembly list_keypairs function...");const t=await e.list_keypairs();console.log("Retrieved keypairs from vault:",t),console.log("Raw keypair list type:",typeof t),console.log("Is array?",Array.isArray(t)),console.log("Raw keypair list:",t);const r=Array.isArray(t)?t.map(l=>{let o={};if(l.metadata)try{typeof l.metadata=="string"?o=JSON.parse(l.metadata):o=l.metadata}catch(i){console.warn("Failed to parse keypair metadata:",i)}return{id:l.id,label:o.label||`Key-${l.id.substring(0,4)}`}}):[];return console.log("Formatted keypairs for UI:",r),new Promise(l=>{chrome.runtime.sendMessage({action:"update_session",type:"keypairs_loaded",data:r},o=>{console.log("Background response to keypairs update:",o),l(r)})})}catch(t){return console.error("Error fetching keypairs from vault:",t),[]}}async function Cc(){if(console.log("Checking IndexedDB availability..."),!window.indexedDB)return console.error("IndexedDB is not available in this browser"),!1;const e=_t();if(!e||typeof e.check_indexeddb!="function")return console.error("WebAssembly module or check_indexeddb function not available"),!1;try{const n=await e.check_indexeddb();return console.log("IndexedDB check result:",n),!0}catch(n){return console.error("IndexedDB check failed:",n),!1}}async function Nc(e,n){const t=_t();if(!t)throw new Error("WebAssembly module not loaded");try{console.log(`Initializing session for keyspace: ${e}`),await Cc()||console.warn("IndexedDB is not available or not working properly. Keypairs might not persist."),await t.init_session(e,n),console.log("Session initialized successfully");const l=await new Promise(i=>{chrome.storage.local.get([`keypairs:${e}`],u=>{i(u[`keypairs:${e}`]||[])})});if(console.log(`Found ${l.length} stored keypairs for keyspace ${e}`),l.length>0){console.log("Importing stored keypairs into WebAssembly session...");const i=await t.list_keypairs();console.log("Current keypairs in WebAssembly vault:",i);const u=new Set(i.map(s=>s.id));for(const s of l)if(u.has(s.id))console.log(`Keypair ${s.id} already exists in vault, skipping import`);else{console.log(`Importing keypair ${s.id} into WebAssembly vault...`);const f=JSON.stringify({label:s.label||`Key-${s.id.substring(0,8)}`,imported:!0,importDate:new Date().toISOString()});try{const g=s.type||"Secp256k1";await t.add_keypair(g,f),console.log(`Created keypair of type ${g} with label ${s.label}`)}catch(g){console.warn(`Failed to import keypair ${s.id}:`,g)}}}await t.init_session(e,n);const o=await Lp();return await new Promise(i=>{chrome.runtime.sendMessage({action:"update_session",type:"keypairs_loaded",data:o},u=>{console.log("Updated keypairs in background service worker"),i()})}),o}catch(r){throw console.error("Failed to initialize session:",r),r}}async function Tp(){const e=_t();if(!e)throw new Error("WebAssembly module not loaded");try{console.log("Locking session..."),await Xi(),e.lock_session(),console.log("Session locked in WebAssembly module"),await new Promise((t,r)=>{chrome.runtime.sendMessage({action:"update_session",type:"session_locked"},l=>{l&&l.success?(console.log("Background service worker updated for locked session"),t()):(console.error("Failed to update session state in background:",l?.error),r(new Error(l?.error||"Failed to update session state")))})});const n=await Xi();console.log("Session status after locking:",n)}catch(n){throw console.error("Error locking session:",n),n}}async function Op(e="Secp256k1",n=null){const t=_t();if(!t)throw new Error("WebAssembly module not loaded");try{const l=(await Pc()).currentKeyspace;if(!l)throw new Error("No active keyspace");const o=n||`${e}-Key-${Date.now().toString(16).slice(-4)}`,i=JSON.stringify({label:o,created:new Date().toISOString(),type:e});console.log(`Adding new keypair of type ${e} with label ${o}`),console.log("Keypair metadata:",i);const u=await t.add_keypair(e,i);console.log(`Keypair created with ID: ${u} in WebAssembly vault`);const s={id:u,label:o,type:e,created:new Date().toISOString()},f=await t.list_keypairs();console.log("Current keypairs in vault after addition:",f);const g=f.map(m=>{let p={};if(m.metadata)try{typeof m.metadata=="string"?p=JSON.parse(m.metadata):p=m.metadata}catch(v){console.warn("Failed to parse keypair metadata:",v)}return{id:m.id,label:p.label||`Key-${m.id.substring(0,8)}`,type:m.type||"Secp256k1",created:p.created||new Date().toISOString()}});return await new Promise(m=>{chrome.storage.local.set({[`keypairs:${l}`]:g},()=>{console.log(`Saved ${g.length} keypairs to Chrome storage for keyspace ${l}`),m()})}),await new Promise((m,p)=>{chrome.runtime.sendMessage({action:"update_session",type:"keypair_added",data:s},async v=>{if(v&&v.success)console.log("Background service worker updated with new keypair"),m(s);else{const _=v?.error||"Failed to update session state";console.error("Error updating background state:",_),p(new Error(_))}})}),await new Promise(m=>{chrome.runtime.sendMessage({action:"update_session",type:"keypairs_loaded",data:g},()=>{console.log("Updated complete keypair list in background with vault state"),m()})}),s}catch(r){throw console.error("Error adding keypair:",r),r}}async function jp(e){if(!Ae||!Ae.select_keypair)throw new Error("WASM module not loaded");await Ae.select_keypair(e),await new Promise((n,t)=>{chrome.runtime.sendMessage({action:"update_session",type:"keypair_selected",data:e},r=>{r&&r.success?n():t(r&&r.error?r.error:"Failed to update session state")})})}async function Rp(e){if(!Ae||!Ae.sign)throw new Error("WASM module not loaded");const t=new TextEncoder().encode(e);return await Ae.sign(t)}async function Pc(){return new Promise(e=>{chrome.runtime.sendMessage({action:"get_session"},n=>{e(n||{currentKeyspace:null,keypairs:[],selectedKeypair:null})})})}function Mp(){const[e,n]=b.useState({loading:!1,initialized:!1,error:null}),[t,r]=b.useState(!0),[l,o]=b.useState([]),[i,u]=b.useState(""),[s,f]=b.useState([]),[g,m]=b.useState(""),[p,v]=b.useState(""),[_,w]=b.useState(!1),[F,c]=b.useState("");b.useEffect(()=>{async function z(){try{c("Loading WebAssembly module..."),await Pp(),n(zp()),c("WebAssembly module loaded"),await a()}catch(L){console.error("Failed to load WebAssembly:",L),c("Error loading WebAssembly: "+(L.message||"Unknown error"))}}z()},[]);async function a(){const z=await Pc();u(z.currentKeyspace||""),f(z.keypairs||[]),m(z.selectedKeypair||""),r(!z.currentKeyspace),z.keypairs&&z.keypairs.length>0?o([z.currentKeyspace]):o([z.currentKeyspace].filter(Boolean))}const d=async(z,L)=>{if(!e.initialized){c("WebAssembly module not loaded");return}w(!0),c("Unlocking...");try{await Nc(z,L),u(z),r(!1),c("Session unlocked!"),await a()}catch(de){c("Unlock failed: "+de)}w(!1)},y=async(z,L)=>{if(!e.initialized){c("WebAssembly module not loaded");return}w(!0),c("Creating keyspace...");try{await Nc(z,L),u(z),r(!1),c("Keyspace created and unlocked!"),await a()}catch(de){c("Create failed: "+de)}w(!1)},S=async()=>{if(!e.initialized){c("WebAssembly module not loaded");return}w(!0),c("Locking...");try{await Tp(),r(!0),u(""),f([]),m(""),c("Session locked."),await a()}catch(z){c("Lock failed: "+z)}w(!1)},E=async z=>{if(!e.initialized){c("WebAssembly module not loaded");return}w(!0),c("Selecting keypair...");try{await jp(z),m(z),c("Keypair selected."),await a()}catch(L){c("Select failed: "+L)}w(!1)},C=async()=>{if(!e.initialized){c("WebAssembly module not loaded");return}w(!0),c("Creating keypair...");try{const z=await Op();c("Keypair created. ID: "+z),await a()}catch(z){c("Create failed: "+z)}w(!1)},N=async z=>{if(!e.initialized){c("WebAssembly module not loaded");return}w(!0),c("Signing message...");try{if(!g)throw new Error("No keypair selected");const L=await Rp(z);v(L),c("Message signed!")}catch(L){c("Signing failed: "+L),v("")}w(!1)};return T.jsxs("div",{className:"App",children:[T.jsx("h1",{children:"Modular Vault Extension"}),e.error&&T.jsxs("div",{className:"error",children:["WebAssembly Error: ",e.error]}),T.jsx(op,{keyspaces:l,onUnlock:d,onCreate:y,locked:t,onLock:S,currentKeyspace:i}),!t&&T.jsxs(T.Fragment,{children:[T.jsx(ip,{keypairs:s,onSelect:E,onCreate:C,selectedKeypair:g}),g&&T.jsx(up,{onSign:N,signature:p,loading:_})]}),T.jsx("div",{className:"status",style:{marginTop:"1rem",minHeight:24},children:F})]})}const Fp="";wc(document.getElementById("root")).render(T.jsx(Mp,{}))})(__wbg_star0); diff --git a/extension/dist/assets/wasm_app_bg.wasm b/extension/dist/assets/wasm_app_bg.wasm deleted file mode 100644 index 4b43bce..0000000 Binary files a/extension/dist/assets/wasm_app_bg.wasm and /dev/null differ diff --git a/extension/dist/background/index.js b/extension/dist/background/index.js deleted file mode 100644 index 9f62297..0000000 --- a/extension/dist/background/index.js +++ /dev/null @@ -1,81 +0,0 @@ -// Background service worker for Modular Vault Extension -// Handles state persistence between popup sessions - -console.log('Background service worker started'); - -// Store session state locally for quicker access -let sessionState = { - currentKeyspace: null, - keypairs: [], - selectedKeypair: null -}; - -// Initialize state from storage -chrome.storage.local.get(['currentKeyspace', 'keypairs', 'selectedKeypair']) - .then(state => { - sessionState = { - currentKeyspace: state.currentKeyspace || null, - keypairs: state.keypairs || [], - selectedKeypair: state.selectedKeypair || null - }; - console.log('Session state loaded from storage:', sessionState); - }) - .catch(error => { - console.error('Failed to load session state:', error); - }); - -// Handle messages from the popup -chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { - console.log('Background received message:', message.action, message.type || ''); - - // Update session state - if (message.action === 'update_session') { - try { - const { type, data } = message; - - // Update our local state - if (type === 'keyspace') { - sessionState.currentKeyspace = data; - } else if (type === 'keypair_selected') { - sessionState.selectedKeypair = data; - } else if (type === 'keypair_added') { - sessionState.keypairs = [...sessionState.keypairs, data]; - } else if (type === 'keypairs_loaded') { - // Replace the entire keypair list with what came from the vault - console.log('Updating keypairs from vault:', data); - sessionState.keypairs = data; - } else if (type === 'session_locked') { - // When locking, we don't need to maintain keypairs in memory anymore - // since they'll be reloaded from the vault when unlocking - sessionState = { - currentKeyspace: null, - keypairs: [], // Clear keypairs from memory since they're in the vault - selectedKeypair: null - }; - } - - // Persist to storage - chrome.storage.local.set(sessionState) - .then(() => { - console.log('Updated session state in storage:', sessionState); - sendResponse({ success: true }); - }) - .catch(error => { - console.error('Failed to persist session state:', error); - sendResponse({ success: false, error: error.message }); - }); - - return true; // Keep connection open for async response - } catch (error) { - console.error('Error in update_session message handler:', error); - sendResponse({ success: false, error: error.message }); - return true; - } - } - - // Get session state - if (message.action === 'get_session') { - sendResponse(sessionState); - return false; // No async response needed - } -}); diff --git a/extension/dist/manifest.json b/extension/dist/manifest.json deleted file mode 100644 index 31480f1..0000000 --- a/extension/dist/manifest.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "manifest_version": 3, - "name": "Modular Vault Extension", - "version": "0.1.0", - "description": "Cross-browser modular vault for cryptographic operations and scripting.", - "action": { - "default_popup": "popup/index.html", - "default_icon": { - "16": "assets/icon-16.png", - "32": "assets/icon-32.png", - "48": "assets/icon-48.png", - "128": "assets/icon-128.png" - } - }, - "background": { - "service_worker": "background/index.js", - "type": "module" - }, - "permissions": [ - "storage", - "scripting" - ], - "host_permissions": [], - "icons": { - "16": "assets/icon-16.png", - "32": "assets/icon-32.png", - "48": "assets/icon-48.png", - "128": "assets/icon-128.png" - }, - "web_accessible_resources": [ - { - "resources": ["wasm/*.wasm", "wasm/*.js"], - "matches": [""] - } - ] -} diff --git a/extension/dist/popup/popup.css b/extension/dist/popup/popup.css deleted file mode 100644 index 64a05e8..0000000 --- a/extension/dist/popup/popup.css +++ /dev/null @@ -1,117 +0,0 @@ -/* Basic styles for the extension popup */ -body { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - margin: 0; - padding: 0; - background-color: #202124; - color: #e8eaed; -} - -.container { - width: 350px; - padding: 15px; -} - -h1 { - font-size: 18px; - margin: 0 0 15px 0; - border-bottom: 1px solid #3c4043; - padding-bottom: 10px; -} - -h2 { - font-size: 16px; - margin: 10px 0; -} - -.form-section { - margin-bottom: 20px; - background-color: #292a2d; - border-radius: 8px; - padding: 15px; -} - -.form-group { - margin-bottom: 10px; -} - -label { - display: block; - margin-bottom: 5px; - font-size: 13px; - color: #9aa0a6; -} - -input, textarea { - width: 100%; - padding: 8px; - border: 1px solid #3c4043; - border-radius: 4px; - background-color: #202124; - color: #e8eaed; - box-sizing: border-box; -} - -textarea { - min-height: 60px; - resize: vertical; -} - -button { - background-color: #8ab4f8; - color: #202124; - border: none; - border-radius: 4px; - padding: 8px 16px; - font-weight: 500; - cursor: pointer; - transition: background-color 0.3s; -} - -button:hover { - background-color: #669df6; -} - -button.small { - padding: 4px 8px; - font-size: 12px; -} - -.button-group { - display: flex; - gap: 10px; -} - -.status { - margin: 10px 0; - padding: 8px; - background-color: #292a2d; - border-radius: 4px; - font-size: 13px; -} - -.list { - margin-top: 10px; - max-height: 150px; - overflow-y: auto; -} - -.list-item { - display: flex; - justify-content: space-between; - align-items: center; - padding: 8px; - border-bottom: 1px solid #3c4043; -} - -.list-item.selected { - background-color: rgba(138, 180, 248, 0.1); -} - -.hidden { - display: none; -} - -.session-info { - margin-top: 15px; -} diff --git a/extension/dist/wasm/wasm_app.js b/extension/dist/wasm/wasm_app.js deleted file mode 100644 index 10f8ade..0000000 --- a/extension/dist/wasm/wasm_app.js +++ /dev/null @@ -1,765 +0,0 @@ -import * as __wbg_star0 from 'env'; - -let wasm; - -function addToExternrefTable0(obj) { - const idx = wasm.__externref_table_alloc(); - wasm.__wbindgen_export_2.set(idx, obj); - return idx; -} - -function handleError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - const idx = addToExternrefTable0(e); - wasm.__wbindgen_exn_store(idx); - } -} - -const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); - -if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; - -let cachedUint8ArrayMemory0 = null; - -function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function isLikeNone(x) { - return x === undefined || x === null; -} - -function getArrayU8FromWasm0(ptr, len) { - ptr = ptr >>> 0; - return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); -} - -let WASM_VECTOR_LEN = 0; - -const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); - -const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' - ? function (arg, view) { - return cachedTextEncoder.encodeInto(arg, view); -} - : function (arg, view) { - const buf = cachedTextEncoder.encode(arg); - view.set(buf); - return { - read: arg.length, - written: buf.length - }; -}); - -function passStringToWasm0(arg, malloc, realloc) { - - if (realloc === undefined) { - const buf = cachedTextEncoder.encode(arg); - const ptr = malloc(buf.length, 1) >>> 0; - getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); - WASM_VECTOR_LEN = buf.length; - return ptr; - } - - let len = arg.length; - let ptr = malloc(len, 1) >>> 0; - - const mem = getUint8ArrayMemory0(); - - let offset = 0; - - for (; offset < len; offset++) { - const code = arg.charCodeAt(offset); - if (code > 0x7F) break; - mem[ptr + offset] = code; - } - - if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } - ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; - const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); - const ret = encodeString(arg, view); - - offset += ret.written; - ptr = realloc(ptr, len, offset, 1) >>> 0; - } - - WASM_VECTOR_LEN = offset; - return ptr; -} - -let cachedDataViewMemory0 = null; - -function getDataViewMemory0() { - if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { - cachedDataViewMemory0 = new DataView(wasm.memory.buffer); - } - return cachedDataViewMemory0; -} - -const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') - ? { register: () => {}, unregister: () => {} } - : new FinalizationRegistry(state => { - wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b) -}); - -function makeMutClosure(arg0, arg1, dtor, f) { - const state = { a: arg0, b: arg1, cnt: 1, dtor }; - const real = (...args) => { - // First up with a closure we increment the internal reference - // count. This ensures that the Rust closure environment won't - // be deallocated while we're invoking it. - state.cnt++; - const a = state.a; - state.a = 0; - try { - return f(a, state.b, ...args); - } finally { - if (--state.cnt === 0) { - wasm.__wbindgen_export_5.get(state.dtor)(a, state.b); - CLOSURE_DTORS.unregister(state); - } else { - state.a = a; - } - } - }; - real.original = state; - CLOSURE_DTORS.register(real, state, state); - return real; -} - -function debugString(val) { - // primitive types - const type = typeof val; - if (type == 'number' || type == 'boolean' || val == null) { - return `${val}`; - } - if (type == 'string') { - return `"${val}"`; - } - if (type == 'symbol') { - const description = val.description; - if (description == null) { - return 'Symbol'; - } else { - return `Symbol(${description})`; - } - } - if (type == 'function') { - const name = val.name; - if (typeof name == 'string' && name.length > 0) { - return `Function(${name})`; - } else { - return 'Function'; - } - } - // objects - if (Array.isArray(val)) { - const length = val.length; - let debug = '['; - if (length > 0) { - debug += debugString(val[0]); - } - for(let i = 1; i < length; i++) { - debug += ', ' + debugString(val[i]); - } - debug += ']'; - return debug; - } - // Test for built-in - const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); - let className; - if (builtInMatches && builtInMatches.length > 1) { - className = builtInMatches[1]; - } else { - // Failed to match the standard '[object ClassName]' - return toString.call(val); - } - if (className == 'Object') { - // we're a user defined class or Object - // JSON.stringify avoids problems with cycles, and is generally much - // easier than looping through ownProperties of `val`. - try { - return 'Object(' + JSON.stringify(val) + ')'; - } catch (_) { - return 'Object'; - } - } - // errors - if (val instanceof Error) { - return `${val.name}: ${val.message}\n${val.stack}`; - } - // TODO we could test for more things here, like `Set`s and `Map`s. - return className; -} -/** - * Initialize the scripting environment (must be called before run_rhai) - */ -export function init_rhai_env() { - wasm.init_rhai_env(); -} - -function takeFromExternrefTable0(idx) { - const value = wasm.__wbindgen_export_2.get(idx); - wasm.__externref_table_dealloc(idx); - return value; -} -/** - * Securely run a Rhai script in the extension context (must be called only after user approval) - * @param {string} script - * @returns {any} - */ -export function run_rhai(script) { - const ptr0 = passStringToWasm0(script, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.run_rhai(ptr0, len0); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return takeFromExternrefTable0(ret[0]); -} - -/** - * Initialize session with keyspace and password - * @param {string} keyspace - * @param {string} password - * @returns {Promise} - */ -export function init_session(keyspace, password) { - const ptr0 = passStringToWasm0(keyspace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.init_session(ptr0, len0, ptr1, len1); - return ret; -} - -/** - * Lock the session (zeroize password and session) - */ -export function lock_session() { - wasm.lock_session(); -} - -/** - * Get all keypairs from the current session - * Returns an array of keypair objects with id, type, and metadata - * Select keypair for the session - * @param {string} key_id - */ -export function select_keypair(key_id) { - const ptr0 = passStringToWasm0(key_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.select_keypair(ptr0, len0); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } -} - -/** - * List keypairs in the current session's keyspace - * @returns {Promise} - */ -export function list_keypairs() { - const ret = wasm.list_keypairs(); - return ret; -} - -/** - * Add a keypair to the current keyspace - * @param {string | null} [key_type] - * @param {string | null} [metadata] - * @returns {Promise} - */ -export function add_keypair(key_type, metadata) { - var ptr0 = isLikeNone(key_type) ? 0 : passStringToWasm0(key_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - var ptr1 = isLikeNone(metadata) ? 0 : passStringToWasm0(metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - const ret = wasm.add_keypair(ptr0, len0, ptr1, len1); - return ret; -} - -function passArray8ToWasm0(arg, malloc) { - const ptr = malloc(arg.length * 1, 1) >>> 0; - getUint8ArrayMemory0().set(arg, ptr / 1); - WASM_VECTOR_LEN = arg.length; - return ptr; -} -/** - * Sign message with current session - * @param {Uint8Array} message - * @returns {Promise} - */ -export function sign(message) { - const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.sign(ptr0, len0); - return ret; -} - -function __wbg_adapter_32(arg0, arg1, arg2) { - wasm.closure77_externref_shim(arg0, arg1, arg2); -} - -function __wbg_adapter_35(arg0, arg1, arg2) { - wasm.closure126_externref_shim(arg0, arg1, arg2); -} - -function __wbg_adapter_38(arg0, arg1, arg2) { - wasm.closure188_externref_shim(arg0, arg1, arg2); -} - -function __wbg_adapter_123(arg0, arg1, arg2, arg3) { - wasm.closure213_externref_shim(arg0, arg1, arg2, arg3); -} - -const __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"]; - -async function __wbg_load(module, imports) { - if (typeof Response === 'function' && module instanceof Response) { - if (typeof WebAssembly.instantiateStreaming === 'function') { - try { - return await WebAssembly.instantiateStreaming(module, imports); - - } catch (e) { - if (module.headers.get('Content-Type') != 'application/wasm') { - console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); - - } else { - throw e; - } - } - } - - const bytes = await module.arrayBuffer(); - return await WebAssembly.instantiate(bytes, imports); - - } else { - const instance = await WebAssembly.instantiate(module, imports); - - if (instance instanceof WebAssembly.Instance) { - return { instance, module }; - - } else { - return instance; - } - } -} - -function __wbg_get_imports() { - const imports = {}; - imports.wbg = {}; - imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) { - const ret = arg0.buffer; - return ret; - }; - imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) { - const ret = arg0.call(arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.call(arg1, arg2); - return ret; - }, arguments) }; - imports.wbg.__wbg_createObjectStore_d2f9e1016f4d81b9 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - const ret = arg0.createObjectStore(getStringFromWasm0(arg1, arg2), arg3); - return ret; - }, arguments) }; - imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) { - const ret = arg0.crypto; - return ret; - }; - imports.wbg.__wbg_error_524f506f44df1645 = function(arg0) { - console.error(arg0); - }; - imports.wbg.__wbg_error_ff4ddaabdfc5dbb3 = function() { return handleError(function (arg0) { - const ret = arg0.error; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) { - globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1)); - }, arguments) }; - imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) { - arg0.getRandomValues(arg1); - }, arguments) }; - imports.wbg.__wbg_get_4f73335ab78445db = function(arg0, arg1, arg2) { - const ret = arg1[arg2 >>> 0]; - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) { - const ret = Reflect.get(arg0, arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_get_8da03f81f6a1111e = function() { return handleError(function (arg0, arg1) { - const ret = arg0.get(arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_instanceof_IdbDatabase_a3ef009ca00059f9 = function(arg0) { - let result; - try { - result = arg0 instanceof IDBDatabase; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_IdbFactory_12eaba3366f4302f = function(arg0) { - let result; - try { - result = arg0 instanceof IDBFactory; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_IdbOpenDbRequest_a3416e156c9db893 = function(arg0) { - let result; - try { - result = arg0 instanceof IDBOpenDBRequest; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_IdbRequest_4813c3f207666aa4 = function(arg0) { - let result; - try { - result = arg0 instanceof IDBRequest; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_length_52b6c4580c5ec934 = function(arg0) { - const ret = arg0.length; - return ret; - }; - imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) { - const ret = arg0.msCrypto; - return ret; - }; - imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) { - try { - var state0 = {a: arg0, b: arg1}; - var cb0 = (arg0, arg1) => { - const a = state0.a; - state0.a = 0; - try { - return __wbg_adapter_123(a, state0.b, arg0, arg1); - } finally { - state0.a = a; - } - }; - const ret = new Promise(cb0); - return ret; - } finally { - state0.a = state0.b = 0; - } - }; - imports.wbg.__wbg_new_405e22f390576ce2 = function() { - const ret = new Object(); - return ret; - }; - imports.wbg.__wbg_new_78feb108b6472713 = function() { - const ret = new Array(); - return ret; - }; - imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) { - const ret = new Uint8Array(arg0); - return ret; - }; - imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) { - const ret = new Function(getStringFromWasm0(arg0, arg1)); - return ret; - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) { - const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) { - const ret = new Uint8Array(arg0 >>> 0); - return ret; - }; - imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) { - const ret = arg0.node; - return ret; - }; - imports.wbg.__wbg_objectStoreNames_9bb1ab04a7012aaf = function(arg0) { - const ret = arg0.objectStoreNames; - return ret; - }; - imports.wbg.__wbg_objectStore_21878d46d25b64b6 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.objectStore(getStringFromWasm0(arg1, arg2)); - return ret; - }, arguments) }; - imports.wbg.__wbg_open_88b1390d99a7c691 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.open(getStringFromWasm0(arg1, arg2)); - return ret; - }, arguments) }; - imports.wbg.__wbg_open_e0c0b2993eb596e1 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0); - return ret; - }, arguments) }; - imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) { - const ret = arg0.process; - return ret; - }; - imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) { - const ret = arg0.push(arg1); - return ret; - }; - imports.wbg.__wbg_put_066faa31a6a88f5b = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.put(arg1, arg2); - return ret; - }, arguments) }; - imports.wbg.__wbg_put_9ef5363941008835 = function() { return handleError(function (arg0, arg1) { - const ret = arg0.put(arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) { - queueMicrotask(arg0); - }; - imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) { - const ret = arg0.queueMicrotask; - return ret; - }; - imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) { - arg0.randomFillSync(arg1); - }, arguments) }; - imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () { - const ret = module.require; - return ret; - }, arguments) }; - imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) { - const ret = Promise.resolve(arg0); - return ret; - }; - imports.wbg.__wbg_result_f29afabdf2c05826 = function() { return handleError(function (arg0) { - const ret = arg0.result; - return ret; - }, arguments) }; - imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) { - arg0.set(arg1, arg2 >>> 0); - }; - imports.wbg.__wbg_setonerror_d7e3056cc6e56085 = function(arg0, arg1) { - arg0.onerror = arg1; - }; - imports.wbg.__wbg_setonsuccess_afa464ee777a396d = function(arg0, arg1) { - arg0.onsuccess = arg1; - }; - imports.wbg.__wbg_setonupgradeneeded_fcf7ce4f2eb0cb5f = function(arg0, arg1) { - arg0.onupgradeneeded = arg1; - }; - imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() { - const ret = typeof global === 'undefined' ? null : global; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() { - const ret = typeof globalThis === 'undefined' ? null : globalThis; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() { - const ret = typeof self === 'undefined' ? null : self; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() { - const ret = typeof window === 'undefined' ? null : window; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) { - const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_target_0a62d9d79a2a1ede = function(arg0) { - const ret = arg0.target; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) { - const ret = arg0.then(arg1); - return ret; - }; - imports.wbg.__wbg_transaction_d6d07c3c9963c49e = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.transaction(arg1, __wbindgen_enum_IdbTransactionMode[arg2]); - return ret; - }, arguments) }; - imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) { - const ret = arg0.versions; - return ret; - }; - imports.wbg.__wbindgen_cb_drop = function(arg0) { - const obj = arg0.original; - if (obj.cnt-- == 1) { - obj.a = 0; - return true; - } - const ret = false; - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper284 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 78, __wbg_adapter_32); - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper493 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 127, __wbg_adapter_35); - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper762 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 189, __wbg_adapter_38); - return ret; - }; - imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { - const ret = debugString(arg1); - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbindgen_init_externref_table = function() { - const table = wasm.__wbindgen_export_2; - const offset = table.grow(4); - table.set(0, undefined); - table.set(offset + 0, undefined); - table.set(offset + 1, null); - table.set(offset + 2, true); - table.set(offset + 3, false); - ; - }; - imports.wbg.__wbindgen_is_function = function(arg0) { - const ret = typeof(arg0) === 'function'; - return ret; - }; - imports.wbg.__wbindgen_is_null = function(arg0) { - const ret = arg0 === null; - return ret; - }; - imports.wbg.__wbindgen_is_object = function(arg0) { - const val = arg0; - const ret = typeof(val) === 'object' && val !== null; - return ret; - }; - imports.wbg.__wbindgen_is_string = function(arg0) { - const ret = typeof(arg0) === 'string'; - return ret; - }; - imports.wbg.__wbindgen_is_undefined = function(arg0) { - const ret = arg0 === undefined; - return ret; - }; - imports.wbg.__wbindgen_json_parse = function(arg0, arg1) { - const ret = JSON.parse(getStringFromWasm0(arg0, arg1)); - return ret; - }; - imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) { - const obj = arg1; - const ret = JSON.stringify(obj === undefined ? null : obj); - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbindgen_memory = function() { - const ret = wasm.memory; - return ret; - }; - imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return ret; - }; - imports.wbg.__wbindgen_throw = function(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); - }; - imports['env'] = __wbg_star0; - - return imports; -} - -function __wbg_init_memory(imports, memory) { - -} - -function __wbg_finalize_init(instance, module) { - wasm = instance.exports; - __wbg_init.__wbindgen_wasm_module = module; - cachedDataViewMemory0 = null; - cachedUint8ArrayMemory0 = null; - - - wasm.__wbindgen_start(); - return wasm; -} - -function initSync(module) { - if (wasm !== undefined) return wasm; - - - if (typeof module !== 'undefined') { - if (Object.getPrototypeOf(module) === Object.prototype) { - ({module} = module) - } else { - console.warn('using deprecated parameters for `initSync()`; pass a single object instead') - } - } - - const imports = __wbg_get_imports(); - - __wbg_init_memory(imports); - - if (!(module instanceof WebAssembly.Module)) { - module = new WebAssembly.Module(module); - } - - const instance = new WebAssembly.Instance(module, imports); - - return __wbg_finalize_init(instance, module); -} - -async function __wbg_init(module_or_path) { - if (wasm !== undefined) return wasm; - - - if (typeof module_or_path !== 'undefined') { - if (Object.getPrototypeOf(module_or_path) === Object.prototype) { - ({module_or_path} = module_or_path) - } else { - console.warn('using deprecated parameters for the initialization function; pass a single object instead') - } - } - - if (typeof module_or_path === 'undefined') { - module_or_path = new URL('wasm_app_bg.wasm', import.meta.url); - } - const imports = __wbg_get_imports(); - - if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { - module_or_path = fetch(module_or_path); - } - - __wbg_init_memory(imports); - - const { instance, module } = await __wbg_load(await module_or_path, imports); - - return __wbg_finalize_init(instance, module); -} - -export { initSync }; -export default __wbg_init; diff --git a/extension/dist/wasm/wasm_app_bg.wasm b/extension/dist/wasm/wasm_app_bg.wasm deleted file mode 100644 index 4b43bce..0000000 Binary files a/extension/dist/wasm/wasm_app_bg.wasm and /dev/null differ diff --git a/extension/manifest.json b/extension/manifest.json deleted file mode 100644 index 31480f1..0000000 --- a/extension/manifest.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "manifest_version": 3, - "name": "Modular Vault Extension", - "version": "0.1.0", - "description": "Cross-browser modular vault for cryptographic operations and scripting.", - "action": { - "default_popup": "popup/index.html", - "default_icon": { - "16": "assets/icon-16.png", - "32": "assets/icon-32.png", - "48": "assets/icon-48.png", - "128": "assets/icon-128.png" - } - }, - "background": { - "service_worker": "background/index.js", - "type": "module" - }, - "permissions": [ - "storage", - "scripting" - ], - "host_permissions": [], - "icons": { - "16": "assets/icon-16.png", - "32": "assets/icon-32.png", - "48": "assets/icon-48.png", - "128": "assets/icon-128.png" - }, - "web_accessible_resources": [ - { - "resources": ["wasm/*.wasm", "wasm/*.js"], - "matches": [""] - } - ] -} diff --git a/extension/package-lock.json b/extension/package-lock.json deleted file mode 100644 index c11b36f..0000000 --- a/extension/package-lock.json +++ /dev/null @@ -1,1474 +0,0 @@ -{ - "name": "modular-vault-extension", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "modular-vault-extension", - "version": "0.1.0", - "dependencies": { - "@vitejs/plugin-react": "^4.4.1", - "react": "^18.3.1", - "react-dom": "^18.3.1" - }, - "devDependencies": { - "vite": "^4.5.0", - "vite-plugin-top-level-await": "^1.4.0", - "vite-plugin-wasm": "^3.4.1" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.2.tgz", - "integrity": "sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.1.tgz", - "integrity": "sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==", - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.1", - "@babel/helper-compilation-targets": "^7.27.1", - "@babel/helper-module-transforms": "^7.27.1", - "@babel/helpers": "^7.27.1", - "@babel/parser": "^7.27.1", - "@babel/template": "^7.27.1", - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.1.tgz", - "integrity": "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==", - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.27.1", - "@babel/types": "^7.27.1", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", - "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.27.2", - "@babel/helper-validator-option": "^7.27.1", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", - "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz", - "integrity": "sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g==", - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", - "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", - "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.1.tgz", - "integrity": "sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ==", - "license": "MIT", - "dependencies": { - "@babel/template": "^7.27.1", - "@babel/types": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.2.tgz", - "integrity": "sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.27.1" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", - "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", - "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", - "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.2", - "@babel/types": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.1.tgz", - "integrity": "sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.1", - "@babel/parser": "^7.27.1", - "@babel/template": "^7.27.1", - "@babel/types": "^7.27.1", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz", - "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", - "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", - "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", - "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", - "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", - "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", - "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", - "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", - "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", - "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", - "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", - "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", - "cpu": [ - "loong64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", - "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", - "cpu": [ - "mips64el" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", - "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", - "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", - "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", - "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", - "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", - "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", - "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", - "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", - "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", - "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@rollup/plugin-virtual": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-virtual/-/plugin-virtual-3.0.2.tgz", - "integrity": "sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@swc/core": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.11.24.tgz", - "integrity": "sha512-MaQEIpfcEMzx3VWWopbofKJvaraqmL6HbLlw2bFZ7qYqYw3rkhM0cQVEgyzbHtTWwCwPMFZSC2DUbhlZgrMfLg==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.21" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-darwin-arm64": "1.11.24", - "@swc/core-darwin-x64": "1.11.24", - "@swc/core-linux-arm-gnueabihf": "1.11.24", - "@swc/core-linux-arm64-gnu": "1.11.24", - "@swc/core-linux-arm64-musl": "1.11.24", - "@swc/core-linux-x64-gnu": "1.11.24", - "@swc/core-linux-x64-musl": "1.11.24", - "@swc/core-win32-arm64-msvc": "1.11.24", - "@swc/core-win32-ia32-msvc": "1.11.24", - "@swc/core-win32-x64-msvc": "1.11.24" - }, - "peerDependencies": { - "@swc/helpers": ">=0.5.17" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@swc/core-darwin-arm64": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.11.24.tgz", - "integrity": "sha512-dhtVj0PC1APOF4fl5qT2neGjRLgHAAYfiVP8poJelhzhB/318bO+QCFWAiimcDoyMgpCXOhTp757gnoJJrheWA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-darwin-x64": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.11.24.tgz", - "integrity": "sha512-H/3cPs8uxcj2Fe3SoLlofN5JG6Ny5bl8DuZ6Yc2wr7gQFBmyBkbZEz+sPVgsID7IXuz7vTP95kMm1VL74SO5AQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.11.24.tgz", - "integrity": "sha512-PHJgWEpCsLo/NGj+A2lXZ2mgGjsr96ULNW3+T3Bj2KTc8XtMUkE8tmY2Da20ItZOvPNC/69KroU7edyo1Flfbw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.11.24.tgz", - "integrity": "sha512-C2FJb08+n5SD4CYWCTZx1uR88BN41ZieoHvI8A55hfVf2woT8+6ZiBzt74qW2g+ntZ535Jts5VwXAKdu41HpBg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.11.24.tgz", - "integrity": "sha512-ypXLIdszRo0re7PNNaXN0+2lD454G8l9LPK/rbfRXnhLWDBPURxzKlLlU/YGd2zP98wPcVooMmegRSNOKfvErw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.11.24.tgz", - "integrity": "sha512-IM7d+STVZD48zxcgo69L0yYptfhaaE9cMZ+9OoMxirNafhKKXwoZuufol1+alEFKc+Wbwp+aUPe/DeWC/Lh3dg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-musl": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.11.24.tgz", - "integrity": "sha512-DZByJaMVzSfjQKKQn3cqSeqwy6lpMaQDQQ4HPlch9FWtDx/dLcpdIhxssqZXcR2rhaQVIaRQsCqwV6orSDGAGw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.11.24.tgz", - "integrity": "sha512-Q64Ytn23y9aVDKN5iryFi8mRgyHw3/kyjTjT4qFCa8AEb5sGUuSj//AUZ6c0J7hQKMHlg9do5Etvoe61V98/JQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.11.24.tgz", - "integrity": "sha512-9pKLIisE/Hh2vJhGIPvSoTK4uBSPxNVyXHmOrtdDot4E1FUUI74Vi8tFdlwNbaj8/vusVnb8xPXsxF1uB0VgiQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.11.24", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.11.24.tgz", - "integrity": "sha512-sybnXtOsdB+XvzVFlBVGgRHLqp3yRpHK7CrmpuDKszhj/QhmsaZzY/GHSeALlMtLup13M0gqbcQvsTNlAHTg3w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", - "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/@swc/types": { - "version": "0.1.21", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.21.tgz", - "integrity": "sha512-2YEtj5HJVbKivud9N4bpPBAyZhj4S2Ipe5LkUG94alTpr7in/GU/EARgPAd3BwU+YOmFVJC2+kjqhGRi3r0ZpQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", - "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", - "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@vitejs/plugin-react": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.4.1.tgz", - "integrity": "sha512-IpEm5ZmeXAP/osiBXVVP5KjFMzbWOonMs0NaQQl+xYnUAcq4oHUBsF2+p4MgKWG4YMmFYJU8A6sxRPuowllm6w==", - "license": "MIT", - "dependencies": { - "@babel/core": "^7.26.10", - "@babel/plugin-transform-react-jsx-self": "^7.25.9", - "@babel/plugin-transform-react-jsx-source": "^7.25.9", - "@types/babel__core": "^7.20.5", - "react-refresh": "^0.17.0" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "peerDependencies": { - "vite": "^4.2.0 || ^5.0.0 || ^6.0.0" - } - }, - "node_modules/browserslist": { - "version": "4.24.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz", - "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001716", - "electron-to-chromium": "^1.5.149", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.3" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001718", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", - "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "license": "MIT" - }, - "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.155", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.155.tgz", - "integrity": "sha512-ps5KcGGmwL8VaeJlvlDlu4fORQpv3+GIcF5I3f9tUKUlJ/wsysh6HU8P5L1XWRYeXfA0oJd4PyM8ds8zTFf6Ng==", - "license": "ISC" - }, - "node_modules/esbuild": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", - "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.18.20", - "@esbuild/android-arm64": "0.18.20", - "@esbuild/android-x64": "0.18.20", - "@esbuild/darwin-arm64": "0.18.20", - "@esbuild/darwin-x64": "0.18.20", - "@esbuild/freebsd-arm64": "0.18.20", - "@esbuild/freebsd-x64": "0.18.20", - "@esbuild/linux-arm": "0.18.20", - "@esbuild/linux-arm64": "0.18.20", - "@esbuild/linux-ia32": "0.18.20", - "@esbuild/linux-loong64": "0.18.20", - "@esbuild/linux-mips64el": "0.18.20", - "@esbuild/linux-ppc64": "0.18.20", - "@esbuild/linux-riscv64": "0.18.20", - "@esbuild/linux-s390x": "0.18.20", - "@esbuild/linux-x64": "0.18.20", - "@esbuild/netbsd-x64": "0.18.20", - "@esbuild/openbsd-x64": "0.18.20", - "@esbuild/sunos-x64": "0.18.20", - "@esbuild/win32-arm64": "0.18.20", - "@esbuild/win32-ia32": "0.18.20", - "@esbuild/win32-x64": "0.18.20" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.8", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" - }, - "peerDependencies": { - "react": "^18.3.1" - } - }, - "node_modules/react-refresh": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", - "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/rollup": { - "version": "3.29.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", - "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", - "license": "MIT", - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/vite": { - "version": "4.5.14", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.14.tgz", - "integrity": "sha512-+v57oAaoYNnO3hIu5Z/tJRZjq5aHM2zDve9YZ8HngVHbhk66RStobhb1sqPMIPEleV6cNKYK4eGrAbE9Ulbl2g==", - "license": "MIT", - "dependencies": { - "esbuild": "^0.18.10", - "postcss": "^8.4.27", - "rollup": "^3.27.1" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/vite-plugin-top-level-await": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/vite-plugin-top-level-await/-/vite-plugin-top-level-await-1.5.0.tgz", - "integrity": "sha512-r/DtuvHrSqUVk23XpG2cl8gjt1aATMG5cjExXL1BUTcSNab6CzkcPua9BPEc9fuTP5UpwClCxUe3+dNGL0yrgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/plugin-virtual": "^3.0.2", - "@swc/core": "^1.10.16", - "uuid": "^10.0.0" - }, - "peerDependencies": { - "vite": ">=2.8" - } - }, - "node_modules/vite-plugin-wasm": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/vite-plugin-wasm/-/vite-plugin-wasm-3.4.1.tgz", - "integrity": "sha512-ja3nSo2UCkVeitltJGkS3pfQHAanHv/DqGatdI39ja6McgABlpsZ5hVgl6wuR8Qx5etY3T5qgDQhOWzc5RReZA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "vite": "^2 || ^3 || ^4 || ^5 || ^6" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "license": "ISC" - } - } -} diff --git a/extension/package.json b/extension/package.json deleted file mode 100644 index 20e4478..0000000 --- a/extension/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "modular-vault-extension", - "version": "0.1.0", - "description": "Cross-browser modular vault extension with secure WASM integration and React UI.", - "private": true, - "scripts": { - "dev": "vite --mode development", - "build": "vite build", - "build:ext": "node build.js" - }, - "dependencies": { - "@vitejs/plugin-react": "^4.4.1", - "react": "^18.3.1", - "react-dom": "^18.3.1" - }, - "devDependencies": { - "vite": "^4.5.0", - "vite-plugin-top-level-await": "^1.4.0", - "vite-plugin-wasm": "^3.4.1" - } -} diff --git a/extension/popup/App.jsx b/extension/popup/App.jsx deleted file mode 100644 index d1bc887..0000000 --- a/extension/popup/App.jsx +++ /dev/null @@ -1,219 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import KeyspaceManager from './KeyspaceManager'; -import KeypairManager from './KeypairManager'; -import SignMessage from './SignMessage'; -import * as wasmHelper from './WasmHelper'; - -function App() { - const [wasmState, setWasmState] = useState({ - loading: false, - initialized: false, - error: null - }); - const [locked, setLocked] = useState(true); - const [keyspaces, setKeyspaces] = useState([]); - const [currentKeyspace, setCurrentKeyspace] = useState(''); - const [keypairs, setKeypairs] = useState([]); // [{id, label, publicKey}] - const [selectedKeypair, setSelectedKeypair] = useState(''); - const [signature, setSignature] = useState(''); - const [loading, setLoading] = useState(false); - const [status, setStatus] = useState(''); - - // Load WebAssembly on component mount - useEffect(() => { - async function initWasm() { - try { - setStatus('Loading WebAssembly module...'); - await wasmHelper.loadWasmModule(); - setWasmState(wasmHelper.getWasmState()); - setStatus('WebAssembly module loaded'); - // Load session state - await refreshStatus(); - } catch (error) { - console.error('Failed to load WebAssembly:', error); - setStatus('Error loading WebAssembly: ' + (error.message || 'Unknown error')); - } - } - - initWasm(); - }, []); - - // Fetch status from background on mount - async function refreshStatus() { - const state = await wasmHelper.getSessionState(); - setCurrentKeyspace(state.currentKeyspace || ''); - setKeypairs(state.keypairs || []); - setSelectedKeypair(state.selectedKeypair || ''); - setLocked(!state.currentKeyspace); - - // For demo: collect all keyspaces from storage - if (state.keypairs && state.keypairs.length > 0) { - setKeyspaces([state.currentKeyspace]); - } else { - setKeyspaces([state.currentKeyspace].filter(Boolean)); - } - } - - // Session unlock/create - const handleUnlock = async (keyspace, password) => { - if (!wasmState.initialized) { - setStatus('WebAssembly module not loaded'); - return; - } - - setLoading(true); - setStatus('Unlocking...'); - try { - await wasmHelper.initSession(keyspace, password); - setCurrentKeyspace(keyspace); - setLocked(false); - setStatus('Session unlocked!'); - await refreshStatus(); - } catch (e) { - setStatus('Unlock failed: ' + e); - } - setLoading(false); - }; - - const handleCreateKeyspace = async (keyspace, password) => { - if (!wasmState.initialized) { - setStatus('WebAssembly module not loaded'); - return; - } - - setLoading(true); - setStatus('Creating keyspace...'); - try { - await wasmHelper.initSession(keyspace, password); - setCurrentKeyspace(keyspace); - setLocked(false); - setStatus('Keyspace created and unlocked!'); - await refreshStatus(); - } catch (e) { - setStatus('Create failed: ' + e); - } - setLoading(false); - }; - - const handleLock = async () => { - if (!wasmState.initialized) { - setStatus('WebAssembly module not loaded'); - return; - } - - setLoading(true); - setStatus('Locking...'); - try { - await wasmHelper.lockSession(); - setLocked(true); - setCurrentKeyspace(''); - setKeypairs([]); - setSelectedKeypair(''); - setStatus('Session locked.'); - await refreshStatus(); - } catch (e) { - setStatus('Lock failed: ' + e); - } - setLoading(false); - }; - - const handleSelectKeypair = async (id) => { - if (!wasmState.initialized) { - setStatus('WebAssembly module not loaded'); - return; - } - - setLoading(true); - setStatus('Selecting keypair...'); - try { - await wasmHelper.selectKeypair(id); - setSelectedKeypair(id); - setStatus('Keypair selected.'); - await refreshStatus(); - } catch (e) { - setStatus('Select failed: ' + e); - } - setLoading(false); - }; - - const handleCreateKeypair = async () => { - if (!wasmState.initialized) { - setStatus('WebAssembly module not loaded'); - return; - } - - setLoading(true); - setStatus('Creating keypair...'); - try { - const keyId = await wasmHelper.addKeypair(); - setStatus('Keypair created. ID: ' + keyId); - await refreshStatus(); - } catch (e) { - setStatus('Create failed: ' + e); - } - setLoading(false); - }; - - const handleSign = async (message) => { - if (!wasmState.initialized) { - setStatus('WebAssembly module not loaded'); - return; - } - - setLoading(true); - setStatus('Signing message...'); - try { - if (!selectedKeypair) { - throw new Error('No keypair selected'); - } - const sig = await wasmHelper.sign(message); - setSignature(sig); - setStatus('Message signed!'); - } catch (e) { - setStatus('Signing failed: ' + e); - setSignature(''); - } - setLoading(false); - }; - - return ( -
-

Modular Vault Extension

- {wasmState.error && ( -
- WebAssembly Error: {wasmState.error} -
- )} - - {!locked && ( - <> - - {selectedKeypair && ( - - )} - - )} -
- {status} -
-
- ); -} - -export default App; diff --git a/extension/popup/KeypairManager.jsx b/extension/popup/KeypairManager.jsx deleted file mode 100644 index a589d78..0000000 --- a/extension/popup/KeypairManager.jsx +++ /dev/null @@ -1,30 +0,0 @@ -import React, { useState } from 'react'; - -export default function KeypairManager({ keypairs, onSelect, onCreate, selectedKeypair }) { - const [creating, setCreating] = useState(false); - - return ( -
- - - - {creating && ( -
- - -
- )} - {selectedKeypair && ( -
- Public Key: {keypairs.find(kp => kp.id === selectedKeypair)?.publicKey} - -
- )} -
- ); -} diff --git a/extension/popup/KeyspaceManager.jsx b/extension/popup/KeyspaceManager.jsx deleted file mode 100644 index 577a00a..0000000 --- a/extension/popup/KeyspaceManager.jsx +++ /dev/null @@ -1,30 +0,0 @@ -import React, { useState } from 'react'; - -export default function KeyspaceManager({ keyspaces, onUnlock, onCreate, locked, onLock, currentKeyspace }) { - const [selected, setSelected] = useState(keyspaces[0] || ''); - const [password, setPassword] = useState(''); - const [newKeyspace, setNewKeyspace] = useState(''); - - if (locked) { - return ( -
- - - -
- setNewKeyspace(e.target.value)} /> - setPassword(e.target.value)} /> - -
-
- ); - } - return ( -
- Keyspace: {currentKeyspace} - -
- ); -} diff --git a/extension/popup/SignMessage.jsx b/extension/popup/SignMessage.jsx deleted file mode 100644 index 1859009..0000000 --- a/extension/popup/SignMessage.jsx +++ /dev/null @@ -1,27 +0,0 @@ -import React, { useState } from 'react'; - -export default function SignMessage({ onSign, signature, loading }) { - const [message, setMessage] = useState(''); - - return ( -
- - setMessage(e.target.value)} - style={{width: '100%', marginBottom: 8}} - /> - - {signature && ( -
- Signature: {signature} - -
- )} -
- ); -} diff --git a/extension/popup/WasmHelper.js b/extension/popup/WasmHelper.js deleted file mode 100644 index 334cb06..0000000 --- a/extension/popup/WasmHelper.js +++ /dev/null @@ -1,623 +0,0 @@ -import init, * as wasmModuleImport from '@wasm/wasm_app.js'; - -/** - * Browser extension-friendly WebAssembly loader and helper functions - * This handles loading the WebAssembly module without relying on ES modules - */ - -// Global reference to the loaded WebAssembly module -let wasmModule = null; - -// Initialization state -const state = { - loading: false, - initialized: false, - error: null -}; - -/** - * Load the WebAssembly module - * @returns {Promise} - */ -export async function loadWasmModule() { - if (state.initialized || state.loading) { - return; - } - state.loading = true; - try { - await init(); - window.wasm_app = wasmModuleImport; - - // Debug logging for available functions in the WebAssembly module - console.log('Available WebAssembly functions:'); - console.log('init_rhai_env:', typeof window.init_rhai_env, typeof (window.wasm_app && window.wasm_app.init_rhai_env)); - console.log('init_session:', typeof window.init_session, typeof (window.wasm_app && window.wasm_app.init_session)); - console.log('lock_session:', typeof window.lock_session, typeof (window.wasm_app && window.wasm_app.lock_session)); - console.log('add_keypair:', typeof window.add_keypair, typeof (window.wasm_app && window.wasm_app.add_keypair)); - console.log('select_keypair:', typeof window.select_keypair, typeof (window.wasm_app && window.wasm_app.select_keypair)); - console.log('sign:', typeof window.sign, typeof (window.wasm_app && window.wasm_app.sign)); - console.log('run_rhai:', typeof window.run_rhai, typeof (window.wasm_app && window.wasm_app.run_rhai)); - console.log('list_keypairs:', typeof window.list_keypairs, typeof (window.wasm_app && window.wasm_app.list_keypairs)); - - // Store reference to all the exported functions - wasmModule = { - init_rhai_env: window.init_rhai_env || (window.wasm_app && window.wasm_app.init_rhai_env), - init_session: window.init_session || (window.wasm_app && window.wasm_app.init_session), - lock_session: window.lock_session || (window.wasm_app && window.wasm_app.lock_session), - add_keypair: window.add_keypair || (window.wasm_app && window.wasm_app.add_keypair), - select_keypair: window.select_keypair || (window.wasm_app && window.wasm_app.select_keypair), - sign: window.sign || (window.wasm_app && window.wasm_app.sign), - run_rhai: window.run_rhai || (window.wasm_app && window.wasm_app.run_rhai), - list_keypairs: window.list_keypairs || (window.wasm_app && window.wasm_app.list_keypairs), - list_keypairs_debug: window.list_keypairs_debug || (window.wasm_app && window.wasm_app.list_keypairs_debug), - check_indexeddb: window.check_indexeddb || (window.wasm_app && window.wasm_app.check_indexeddb) - }; - - // Log what was actually registered - console.log('Registered WebAssembly module functions:'); - for (const [key, value] of Object.entries(wasmModule)) { - console.log(`${key}: ${typeof value}`, value ? 'Available' : 'Missing'); - } - - // Initialize the WASM environment - if (typeof wasmModule.init_rhai_env === 'function') { - wasmModule.init_rhai_env(); - } - state.initialized = true; - console.log('WASM module loaded and initialized successfully'); - } catch (error) { - console.error('Failed to load WASM module:', error); - state.error = error.message || 'Unknown error loading WebAssembly module'; - } finally { - state.loading = false; - } -} - -/** - * Get the current state of the WebAssembly module - * @returns {{loading: boolean, initialized: boolean, error: string|null}} - */ -export function getWasmState() { - return { ...state }; -} - -/** - * Get the WebAssembly module - * @returns {object|null} The WebAssembly module or null if not loaded - */ -export function getWasmModule() { - return wasmModule; -} - -/** - * Debug function to check the vault state - * @returns {Promise} State information - */ -export async function debugVaultState() { - const module = getWasmModule(); - if (!module) { - throw new Error('WebAssembly module not loaded'); - } - - try { - console.log('🔍 Debugging vault state...'); - - // Check if we have a valid session using Rhai script - const sessionCheck = ` - let has_session = vault::has_active_session(); - let keyspace = ""; - if has_session { - keyspace = vault::get_current_keyspace(); - } - - // Return info about the session - { - "has_session": has_session, - "keyspace": keyspace - } - `; - - console.log('Checking session status...'); - const sessionStatus = await module.run_rhai(sessionCheck); - console.log('Session status:', sessionStatus); - - // Get keypair info if we have a session - if (sessionStatus && sessionStatus.has_session) { - const keypairsScript = ` - // Get all keypairs for the current keyspace - let keypairs = vault::list_keypairs(); - - // Add diagnostic information - let diagnostic = { - "keypair_count": keypairs.len(), - "keyspace": vault::get_current_keyspace(), - "keypairs": keypairs - }; - - diagnostic - `; - - console.log('Fetching keypair details...'); - const keypairDiagnostic = await module.run_rhai(keypairsScript); - console.log('Keypair diagnostic:', keypairDiagnostic); - - return keypairDiagnostic; - } - - return sessionStatus; - } catch (error) { - console.error('Error in debug function:', error); - return { error: error.toString() }; - } -} - -/** - * Get keypairs from the vault - * @returns {Promise} List of keypairs - */ -export async function getKeypairsFromVault() { - console.log('==============================================='); - console.log('Starting getKeypairsFromVault...'); - const module = getWasmModule(); - if (!module) { - console.error('WebAssembly module not loaded!'); - throw new Error('WebAssembly module not loaded'); - } - console.log('WebAssembly module:', module); - console.log('Module functions available:', Object.keys(module)); - - // Check if IndexedDB is available and working - const isIndexedDBAvailable = await checkIndexedDBAvailability(); - if (!isIndexedDBAvailable) { - console.warn('IndexedDB is not available or not working properly'); - // We'll continue, but this is likely why keypairs aren't persisting - } - - // Force re-initialization of the current session if needed - try { - // This checks if we have the debug function available - if (typeof module.list_keypairs_debug === 'function') { - console.log('Using debug function to diagnose keypair loading issues...'); - const debugResult = await module.list_keypairs_debug(); - console.log('Debug keypair listing result:', debugResult); - if (Array.isArray(debugResult) && debugResult.length > 0) { - console.log('Debug function returned keypairs:', debugResult); - // If debug function worked but regular function doesn't, use its result - return debugResult; - } else { - console.log('Debug function did not return keypairs, continuing with normal flow...'); - } - } - } catch (err) { - console.error('Error in debug function:', err); - // Continue with normal flow even if the debug function fails - } - - try { - console.log('-----------------------------------------------'); - console.log('Running diagnostics to check vault state...'); - // Run diagnostic first to log vault state - await debugVaultState(); - console.log('Diagnostics complete'); - console.log('-----------------------------------------------'); - - console.log('Checking if list_keypairs function is available:', typeof module.list_keypairs); - for (const key in module) { - console.log(`Module function: ${key} = ${typeof module[key]}`); - } - if (typeof module.list_keypairs !== 'function') { - console.error('list_keypairs function is not available in the WebAssembly module!'); - console.log('Available functions:', Object.keys(module)); - // Fall back to Rhai script - console.log('Falling back to using Rhai script for listing keypairs...'); - const script = ` - // Get all keypairs from the current keyspace - let keypairs = vault::list_keypairs(); - keypairs - `; - const keypairList = await module.run_rhai(script); - console.log('Retrieved keypairs from vault using Rhai:', keypairList); - return keypairList; - } - - console.log('Calling WebAssembly list_keypairs function...'); - // Use the direct list_keypairs function from WebAssembly instead of Rhai script - const keypairList = await module.list_keypairs(); - console.log('Retrieved keypairs from vault:', keypairList); - - console.log('Raw keypair list type:', typeof keypairList); - console.log('Is array?', Array.isArray(keypairList)); - console.log('Raw keypair list:', keypairList); - - // Format keypairs for UI - const formattedKeypairs = Array.isArray(keypairList) ? keypairList.map(kp => { - // Parse metadata if available - let metadata = {}; - if (kp.metadata) { - try { - if (typeof kp.metadata === 'string') { - metadata = JSON.parse(kp.metadata); - } else { - metadata = kp.metadata; - } - } catch (e) { - console.warn('Failed to parse keypair metadata:', e); - } - } - - return { - id: kp.id, - label: metadata.label || `Key-${kp.id.substring(0, 4)}` - }; - }) : []; - - console.log('Formatted keypairs for UI:', formattedKeypairs); - - // Update background service worker - return new Promise((resolve) => { - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'keypairs_loaded', - data: formattedKeypairs - }, (response) => { - console.log('Background response to keypairs update:', response); - resolve(formattedKeypairs); - }); - }); - } catch (error) { - console.error('Error fetching keypairs from vault:', error); - return []; - } -} - -/** - * Check if IndexedDB is available and working - * @returns {Promise} True if IndexedDB is working - */ -export async function checkIndexedDBAvailability() { - console.log('Checking IndexedDB availability...'); - - // First check if IndexedDB is available in the browser - if (!window.indexedDB) { - console.error('IndexedDB is not available in this browser'); - return false; - } - - const module = getWasmModule(); - if (!module || typeof module.check_indexeddb !== 'function') { - console.error('WebAssembly module or check_indexeddb function not available'); - return false; - } - - try { - const result = await module.check_indexeddb(); - console.log('IndexedDB check result:', result); - return true; - } catch (error) { - console.error('IndexedDB check failed:', error); - return false; - } -} - -/** - * Initialize a session with the given keyspace and password - * @param {string} keyspace - * @param {string} password - * @returns {Promise} List of keypairs after initialization - */ -export async function initSession(keyspace, password) { - const module = getWasmModule(); - if (!module) { - throw new Error('WebAssembly module not loaded'); - } - - try { - console.log(`Initializing session for keyspace: ${keyspace}`); - - // Check if IndexedDB is working - const isIndexedDBAvailable = await checkIndexedDBAvailability(); - if (!isIndexedDBAvailable) { - console.warn('IndexedDB is not available or not working properly. Keypairs might not persist.'); - // Continue anyway as we might fall back to memory storage - } - - // Initialize the session using the WASM module - await module.init_session(keyspace, password); - console.log('Session initialized successfully'); - - // Check if we have stored keypairs for this keyspace in Chrome storage - const storedKeypairs = await new Promise(resolve => { - chrome.storage.local.get([`keypairs:${keyspace}`], result => { - resolve(result[`keypairs:${keyspace}`] || []); - }); - }); - - console.log(`Found ${storedKeypairs.length} stored keypairs for keyspace ${keyspace}`); - - // Import stored keypairs into the WebAssembly session if they don't exist already - if (storedKeypairs.length > 0) { - console.log('Importing stored keypairs into WebAssembly session...'); - - // First get current keypairs from the vault directly - const wasmKeypairs = await module.list_keypairs(); - console.log('Current keypairs in WebAssembly vault:', wasmKeypairs); - - // Get the IDs of existing keypairs in the vault - const existingIds = new Set(wasmKeypairs.map(kp => kp.id)); - - // Import keypairs that don't already exist in the vault - for (const keypair of storedKeypairs) { - if (!existingIds.has(keypair.id)) { - console.log(`Importing keypair ${keypair.id} into WebAssembly vault...`); - - // Create metadata for the keypair - const metadata = JSON.stringify({ - label: keypair.label || `Key-${keypair.id.substring(0, 8)}`, - imported: true, - importDate: new Date().toISOString() - }); - - // For adding existing keypairs, we'd normally need the private key - // Since we can't retrieve it, we'll create a new one with the same label - // This is a placeholder - in a real implementation, you'd need to use the actual keys - try { - const keyType = keypair.type || 'Secp256k1'; - await module.add_keypair(keyType, metadata); - console.log(`Created keypair of type ${keyType} with label ${keypair.label}`); - } catch (err) { - console.warn(`Failed to import keypair ${keypair.id}:`, err); - // Continue with other keypairs even if one fails - } - } else { - console.log(`Keypair ${keypair.id} already exists in vault, skipping import`); - } - } - } - - // Initialize session using WASM (await the async function) - await module.init_session(keyspace, password); - - // Get keypairs from the vault after session is ready - const currentKeypairs = await getKeypairsFromVault(); - - // Update keypairs in background service worker - await new Promise(resolve => { - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'keypairs_loaded', - data: currentKeypairs - }, response => { - console.log('Updated keypairs in background service worker'); - resolve(); - }); - }); - - return currentKeypairs; - } catch (error) { - console.error('Failed to initialize session:', error); - throw error; - } -} - -/** - * Lock the current session - * @returns {Promise} - */ -export async function lockSession() { - const module = getWasmModule(); - if (!module) { - throw new Error('WebAssembly module not loaded'); - } - - try { - console.log('Locking session...'); - - // First run diagnostics to see what we have before locking - await debugVaultState(); - - // Call the WASM lock_session function - module.lock_session(); - console.log('Session locked in WebAssembly module'); - - // Update session state in background - await new Promise((resolve, reject) => { - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'session_locked' - }, (response) => { - if (response && response.success) { - console.log('Background service worker updated for locked session'); - resolve(); - } else { - console.error('Failed to update session state in background:', response?.error); - reject(new Error(response?.error || 'Failed to update session state')); - } - }); - }); - - // Verify session is locked properly - const sessionStatus = await debugVaultState(); - console.log('Session status after locking:', sessionStatus); - } catch (error) { - console.error('Error locking session:', error); - throw error; - } -} - -/** - * Add a new keypair - * @param {string} keyType The type of key to create (default: 'Secp256k1') - * @param {string} label Optional custom label for the keypair - * @returns {Promise<{id: string, label: string}>} The created keypair info - */ -export async function addKeypair(keyType = 'Secp256k1', label = null) { - const module = getWasmModule(); - if (!module) { - throw new Error('WebAssembly module not loaded'); - } - - try { - // Get current keyspace - const sessionState = await getSessionState(); - const keyspace = sessionState.currentKeyspace; - if (!keyspace) { - throw new Error('No active keyspace'); - } - - // Generate default label if not provided - const keyLabel = label || `${keyType}-Key-${Date.now().toString(16).slice(-4)}`; - - // Create metadata JSON - const metadata = JSON.stringify({ - label: keyLabel, - created: new Date().toISOString(), - type: keyType - }); - - console.log(`Adding new keypair of type ${keyType} with label ${keyLabel}`); - console.log('Keypair metadata:', metadata); - - // Call the WASM add_keypair function with metadata - // This will add the keypair to the WebAssembly vault - const keyId = await module.add_keypair(keyType, metadata); - console.log(`Keypair created with ID: ${keyId} in WebAssembly vault`); - - // Create keypair object for UI and storage - const newKeypair = { - id: keyId, - label: keyLabel, - type: keyType, - created: new Date().toISOString() - }; - - // Get the latest keypairs from the WebAssembly vault to ensure consistency - const vaultKeypairs = await module.list_keypairs(); - console.log('Current keypairs in vault after addition:', vaultKeypairs); - - // Format the vault keypairs for storage - const formattedVaultKeypairs = vaultKeypairs.map(kp => { - // Parse metadata if available - let metadata = {}; - if (kp.metadata) { - try { - if (typeof kp.metadata === 'string') { - metadata = JSON.parse(kp.metadata); - } else { - metadata = kp.metadata; - } - } catch (e) { - console.warn('Failed to parse keypair metadata:', e); - } - } - - return { - id: kp.id, - label: metadata.label || `Key-${kp.id.substring(0, 8)}`, - type: kp.type || 'Secp256k1', - created: metadata.created || new Date().toISOString() - }; - }); - - // Save the formatted keypairs to Chrome storage - await new Promise(resolve => { - chrome.storage.local.set({ [`keypairs:${keyspace}`]: formattedVaultKeypairs }, () => { - console.log(`Saved ${formattedVaultKeypairs.length} keypairs to Chrome storage for keyspace ${keyspace}`); - resolve(); - }); - }); - - // Update session state in background with the new keypair information - await new Promise((resolve, reject) => { - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'keypair_added', - data: newKeypair - }, async (response) => { - if (response && response.success) { - console.log('Background service worker updated with new keypair'); - resolve(newKeypair); - } else { - const error = response?.error || 'Failed to update session state'; - console.error('Error updating background state:', error); - reject(new Error(error)); - } - }); - }); - - // Also update the complete keypair list in background with the current vault state - await new Promise(resolve => { - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'keypairs_loaded', - data: formattedVaultKeypairs - }, () => { - console.log('Updated complete keypair list in background with vault state'); - resolve(); - }); - }); - - return newKeypair; - } catch (error) { - console.error('Error adding keypair:', error); - throw error; - } -} - -/** - * Select a keypair - * @param {string} keyId The ID of the keypair to select - * @returns {Promise} - */ -export async function selectKeypair(keyId) { - if (!wasmModule || !wasmModule.select_keypair) { - throw new Error('WASM module not loaded'); - } - - // Call the WASM select_keypair function - await wasmModule.select_keypair(keyId); - - // Update session state in background - await new Promise((resolve, reject) => { - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'keypair_selected', - data: keyId - }, (response) => { - if (response && response.success) { - resolve(); - } else { - reject(response && response.error ? response.error : 'Failed to update session state'); - } - }); - }); -} - -/** - * Sign a message with the selected keypair - * @param {string} message The message to sign - * @returns {Promise} The signature as a hex string - */ -export async function sign(message) { - if (!wasmModule || !wasmModule.sign) { - throw new Error('WASM module not loaded'); - } - - // Convert message to Uint8Array - const encoder = new TextEncoder(); - const messageBytes = encoder.encode(message); - - // Call the WASM sign function - return await wasmModule.sign(messageBytes); -} - -/** - * Get the current session state - * @returns {Promise<{currentKeyspace: string|null, keypairs: Array, selectedKeypair: string|null}>} - */ -export async function getSessionState() { - return new Promise((resolve) => { - chrome.runtime.sendMessage({ action: 'get_session' }, (response) => { - resolve(response || { currentKeyspace: null, keypairs: [], selectedKeypair: null }); - }); - }); -} diff --git a/extension/popup/WasmLoader.jsx b/extension/popup/WasmLoader.jsx deleted file mode 100644 index 6381067..0000000 --- a/extension/popup/WasmLoader.jsx +++ /dev/null @@ -1,88 +0,0 @@ -import React, { useState, useEffect, createContext, useContext } from 'react'; - -// Create a context to share the WASM module across components -export const WasmContext = createContext(null); - -// Hook to access WASM module -export function useWasm() { - return useContext(WasmContext); -} - -// Component that loads and initializes the WASM module -export function WasmProvider({ children }) { - const [wasmModule, setWasmModule] = useState(null); - const [loading, setLoading] = useState(true); - const [error, setError] = useState(null); - - useEffect(() => { - async function loadWasm() { - try { - setLoading(true); - - // Instead of using dynamic imports which require correct MIME types, - // we'll use fetch to load the JavaScript file as text and eval it - const wasmJsPath = chrome.runtime.getURL('wasm/wasm_app.js'); - console.log('Loading WASM JS from:', wasmJsPath); - - // Load the JavaScript file - const jsResponse = await fetch(wasmJsPath); - if (!jsResponse.ok) { - throw new Error(`Failed to load WASM JS: ${jsResponse.status} ${jsResponse.statusText}`); - } - - // Get the JavaScript code as text - const jsCode = await jsResponse.text(); - - // Create a function to execute the code in an isolated scope - let wasmModuleExports = {}; - const moduleFunction = new Function('exports', jsCode + '\nreturn { initSync, default: __wbg_init, init_rhai_env, init_session, lock_session, add_keypair, select_keypair, sign, run_rhai };'); - - // Execute the function to get the exports - const wasmModule = moduleFunction(wasmModuleExports); - - // Initialize WASM with the binary - const wasmBinaryPath = chrome.runtime.getURL('wasm/wasm_app_bg.wasm'); - console.log('Initializing WASM with binary:', wasmBinaryPath); - - const binaryResponse = await fetch(wasmBinaryPath); - if (!binaryResponse.ok) { - throw new Error(`Failed to load WASM binary: ${binaryResponse.status} ${binaryResponse.statusText}`); - } - - const wasmBinary = await binaryResponse.arrayBuffer(); - - // Initialize the WASM module - await wasmModule.default(wasmBinary); - - // Initialize the WASM environment - if (typeof wasmModule.init_rhai_env === 'function') { - wasmModule.init_rhai_env(); - } - - console.log('WASM module loaded successfully'); - setWasmModule(wasmModule); - setLoading(false); - } catch (error) { - console.error('Failed to load WASM module:', error); - setError(error.message || 'Failed to load WebAssembly module'); - setLoading(false); - } - } - - loadWasm(); - }, []); - - if (loading) { - return
Loading WebAssembly module...
; - } - - if (error) { - return
Error: {error}
; - } - - return ( - - {children} - - ); -} diff --git a/extension/popup/debug_rhai.js b/extension/popup/debug_rhai.js deleted file mode 100644 index 48c09e4..0000000 --- a/extension/popup/debug_rhai.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Debug helper for WebAssembly Vault with Rhai scripts - */ - -// Helper to try various Rhai scripts for debugging -export const RHAI_SCRIPTS = { - // Check if there's an active session - CHECK_SESSION: ` - let has_session = false; - let current_keyspace = ""; - - // Try to access functions expected to exist in the vault namespace - if (isdef(vault) && isdef(vault::has_active_session)) { - has_session = vault::has_active_session(); - if (has_session && isdef(vault::get_current_keyspace)) { - current_keyspace = vault::get_current_keyspace(); - } - } - - { - "has_session": has_session, - "keyspace": current_keyspace, - "available_functions": [ - isdef(vault::list_keypairs) ? "list_keypairs" : null, - isdef(vault::add_keypair) ? "add_keypair" : null, - isdef(vault::has_active_session) ? "has_active_session" : null, - isdef(vault::get_current_keyspace) ? "get_current_keyspace" : null - ] - } - `, - - // Explicitly get keypairs for the current keyspace using session data - LIST_KEYPAIRS: ` - let result = {"error": "Not initialized"}; - - if (isdef(vault) && isdef(vault::has_active_session) && vault::has_active_session()) { - let keyspace = vault::get_current_keyspace(); - - // Try to list the keypairs from the current session - if (isdef(vault::get_keypairs_from_session)) { - result = { - "keyspace": keyspace, - "keypairs": vault::get_keypairs_from_session() - }; - } else { - result = { - "error": "vault::get_keypairs_from_session is not defined", - "keyspace": keyspace - }; - } - } - - result - `, - - // Use Rhai to inspect the Vault storage directly (for advanced debugging) - INSPECT_VAULT_STORAGE: ` - let result = {"error": "Not accessible"}; - - if (isdef(vault) && isdef(vault::inspect_storage)) { - result = vault::inspect_storage(); - } - - result - ` -}; - -// Run all debug scripts and collect results -export async function runDiagnostics(wasmModule) { - if (!wasmModule || !wasmModule.run_rhai) { - throw new Error('WebAssembly module not loaded or run_rhai not available'); - } - - const results = {}; - - for (const [name, script] of Object.entries(RHAI_SCRIPTS)) { - try { - console.log(`Running Rhai diagnostic script: ${name}`); - results[name] = await wasmModule.run_rhai(script); - console.log(`Result from ${name}:`, results[name]); - } catch (error) { - console.error(`Error running script ${name}:`, error); - results[name] = { error: error.toString() }; - } - } - - return results; -} diff --git a/extension/popup/main.js.bak b/extension/popup/main.js.bak deleted file mode 100644 index 2620404..0000000 --- a/extension/popup/main.js.bak +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; -import { createRoot } from 'react-dom/client'; -import App from './App'; -import './style.css'; - -// Render the React app -const root = createRoot(document.getElementById('root')); -root.render(); diff --git a/extension/popup/main.jsx b/extension/popup/main.jsx deleted file mode 100644 index 2620404..0000000 --- a/extension/popup/main.jsx +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; -import { createRoot } from 'react-dom/client'; -import App from './App'; -import './style.css'; - -// Render the React app -const root = createRoot(document.getElementById('root')); -root.render(); diff --git a/extension/popup/popup.css b/extension/popup/popup.css deleted file mode 100644 index 64a05e8..0000000 --- a/extension/popup/popup.css +++ /dev/null @@ -1,117 +0,0 @@ -/* Basic styles for the extension popup */ -body { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - margin: 0; - padding: 0; - background-color: #202124; - color: #e8eaed; -} - -.container { - width: 350px; - padding: 15px; -} - -h1 { - font-size: 18px; - margin: 0 0 15px 0; - border-bottom: 1px solid #3c4043; - padding-bottom: 10px; -} - -h2 { - font-size: 16px; - margin: 10px 0; -} - -.form-section { - margin-bottom: 20px; - background-color: #292a2d; - border-radius: 8px; - padding: 15px; -} - -.form-group { - margin-bottom: 10px; -} - -label { - display: block; - margin-bottom: 5px; - font-size: 13px; - color: #9aa0a6; -} - -input, textarea { - width: 100%; - padding: 8px; - border: 1px solid #3c4043; - border-radius: 4px; - background-color: #202124; - color: #e8eaed; - box-sizing: border-box; -} - -textarea { - min-height: 60px; - resize: vertical; -} - -button { - background-color: #8ab4f8; - color: #202124; - border: none; - border-radius: 4px; - padding: 8px 16px; - font-weight: 500; - cursor: pointer; - transition: background-color 0.3s; -} - -button:hover { - background-color: #669df6; -} - -button.small { - padding: 4px 8px; - font-size: 12px; -} - -.button-group { - display: flex; - gap: 10px; -} - -.status { - margin: 10px 0; - padding: 8px; - background-color: #292a2d; - border-radius: 4px; - font-size: 13px; -} - -.list { - margin-top: 10px; - max-height: 150px; - overflow-y: auto; -} - -.list-item { - display: flex; - justify-content: space-between; - align-items: center; - padding: 8px; - border-bottom: 1px solid #3c4043; -} - -.list-item.selected { - background-color: rgba(138, 180, 248, 0.1); -} - -.hidden { - display: none; -} - -.session-info { - margin-top: 15px; -} diff --git a/extension/popup/style.css b/extension/popup/style.css deleted file mode 100644 index 91d4571..0000000 --- a/extension/popup/style.css +++ /dev/null @@ -1,26 +0,0 @@ -body { - margin: 0; - font-family: 'Inter', Arial, sans-serif; - background: #181c20; - color: #f3f6fa; -} - -.App { - padding: 1.5rem; - min-width: 320px; - max-width: 400px; - background: #23272e; - border-radius: 12px; - box-shadow: 0 4px 24px rgba(0,0,0,0.2); -} -h1 { - font-size: 1.5rem; - margin-bottom: 0.5rem; -} -p { - color: #b0bac9; - margin-bottom: 1.5rem; -} -.status { - margin-bottom: 1rem; -} diff --git a/extension/popup/wasm.js b/extension/popup/wasm.js deleted file mode 100644 index daa357c..0000000 --- a/extension/popup/wasm.js +++ /dev/null @@ -1,317 +0,0 @@ -// WebAssembly API functions for accessing WASM operations directly -// and synchronizing state with background service worker - -// Get session state from the background service worker -export function getStatus() { - return new Promise((resolve) => { - chrome.runtime.sendMessage({ action: 'get_session' }, (response) => { - resolve(response); - }); - }); -} - -// Debug function to examine vault state using Rhai scripts -export async function debugVaultState(wasmModule) { - if (!wasmModule) { - throw new Error('WASM module not loaded'); - } - - try { - console.log('🔍 Debugging vault state...'); - - // First check if we have a valid session - const sessionCheck = ` - let has_session = vault::has_active_session(); - let keyspace = ""; - if has_session { - keyspace = vault::get_current_keyspace(); - } - - // Return info about the session - { - "has_session": has_session, - "keyspace": keyspace - } - `; - - console.log('Checking session status...'); - const sessionStatus = await wasmModule.run_rhai(sessionCheck); - console.log('Session status:', sessionStatus); - - // Only try to get keypairs if we have an active session - if (sessionStatus && sessionStatus.has_session) { - // Get information about all keypairs - const keypairsScript = ` - // Get all keypairs for the current keyspace - let keypairs = vault::list_keypairs(); - - // Add more diagnostic information - let diagnostic = { - "keypair_count": keypairs.len(), - "keyspace": vault::get_current_keyspace(), - "keypairs": keypairs - }; - - diagnostic - `; - - console.log('Fetching keypair details...'); - const keypairDiagnostic = await wasmModule.run_rhai(keypairsScript); - console.log('Keypair diagnostic:', keypairDiagnostic); - - return keypairDiagnostic; - } else { - console.log('No active session, cannot fetch keypairs'); - return { error: 'No active session' }; - } - } catch (error) { - console.error('Error in debug function:', error); - return { error: error.toString() }; - } -} - -// Fetch all keypairs from the WebAssembly vault -export async function getKeypairsFromVault(wasmModule) { - if (!wasmModule) { - throw new Error('WASM module not loaded'); - } - - try { - // First run diagnostics for debugging - await debugVaultState(wasmModule); - - console.log('Calling list_keypairs WebAssembly binding...'); - - // Use our new direct WebAssembly binding instead of Rhai script - const keypairList = await wasmModule.list_keypairs(); - console.log('Retrieved keypairs from vault:', keypairList); - - // Transform the keypairs into the expected format - // The WebAssembly binding returns an array of objects with id, type, and metadata - const formattedKeypairs = Array.isArray(keypairList) ? keypairList.map(kp => { - // Parse metadata if it's a string - let metadata = {}; - if (kp.metadata) { - try { - if (typeof kp.metadata === 'string') { - metadata = JSON.parse(kp.metadata); - } else { - metadata = kp.metadata; - } - } catch (e) { - console.warn('Failed to parse keypair metadata:', e); - } - } - - return { - id: kp.id, - label: metadata.label || `${kp.type}-Key-${kp.id.substring(0, 4)}` - }; - }) : []; - - console.log('Formatted keypairs:', formattedKeypairs); - - // Update the keypairs in the background service worker - return new Promise((resolve) => { - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'keypairs_loaded', - data: formattedKeypairs - }, (response) => { - if (response && response.success) { - console.log('Successfully updated keypairs in background'); - resolve(formattedKeypairs); - } else { - console.error('Failed to update keypairs in background:', response?.error); - resolve([]); - } - }); - }); - } catch (error) { - console.error('Error fetching keypairs from vault:', error); - return []; - } -} - -// Initialize session with the WASM module -export function initSession(wasmModule, keyspace, password) { - return new Promise(async (resolve, reject) => { - if (!wasmModule) { - reject('WASM module not loaded'); - return; - } - - try { - // Call the WASM init_session function - console.log(`Initializing session for keyspace: ${keyspace}`); - await wasmModule.init_session(keyspace, password); - - // Update the session state in the background service worker - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'keyspace', - data: keyspace - }, async (response) => { - if (response && response.success) { - try { - // After successful session initialization, fetch keypairs from the vault - console.log('Session initialized, fetching keypairs from vault...'); - const keypairs = await getKeypairsFromVault(wasmModule); - console.log('Keypairs loaded:', keypairs); - resolve(keypairs); - } catch (fetchError) { - console.error('Error fetching keypairs:', fetchError); - // Even if fetching keypairs fails, the session is initialized - resolve([]); - } - } else { - reject(response && response.error ? response.error : 'Failed to update session state'); - } - }); - } catch (error) { - console.error('Session initialization error:', error); - reject(error.message || 'Failed to initialize session'); - } - }); -} - -// Lock the session using the WASM module -export function lockSession(wasmModule) { - return new Promise(async (resolve, reject) => { - if (!wasmModule) { - reject('WASM module not loaded'); - return; - } - - try { - // Call the WASM lock_session function - wasmModule.lock_session(); - - // Update the session state in the background service worker - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'session_locked' - }, (response) => { - if (response && response.success) { - resolve(); - } else { - reject(response && response.error ? response.error : 'Failed to update session state'); - } - }); - } catch (error) { - reject(error.message || 'Failed to lock session'); - } - }); -} - -// Add a keypair using the WASM module -export function addKeypair(wasmModule, keyType = 'Secp256k1', label = null) { - return new Promise(async (resolve, reject) => { - if (!wasmModule) { - reject('WASM module not loaded'); - return; - } - - try { - // Create a default label if none provided - const keyLabel = label || `${keyType}-Key-${Date.now().toString(16).slice(-4)}`; - - // Create metadata JSON for the keypair - const metadata = JSON.stringify({ - label: keyLabel, - created: new Date().toISOString(), - type: keyType - }); - - console.log(`Adding new keypair of type ${keyType} with label ${keyLabel}`); - - // Call the WASM add_keypair function with metadata - const keyId = await wasmModule.add_keypair(keyType, metadata); - console.log(`Keypair created with ID: ${keyId}`); - - // Create keypair object with ID and label - const newKeypair = { - id: keyId, - label: keyLabel - }; - - // Update the session state in the background service worker - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'keypair_added', - data: newKeypair - }, (response) => { - if (response && response.success) { - // After adding a keypair, refresh the whole list from the vault - getKeypairsFromVault(wasmModule) - .then(() => { - console.log('Keypair list refreshed from vault'); - resolve(keyId); - }) - .catch(refreshError => { - console.warn('Error refreshing keypair list:', refreshError); - // Still resolve with the key ID since the key was created - resolve(keyId); - }); - } else { - reject(response && response.error ? response.error : 'Failed to update session state'); - } - }); - } catch (error) { - console.error('Error adding keypair:', error); - reject(error.message || 'Failed to add keypair'); - } - }); -} - -// Select a keypair using the WASM module -export function selectKeypair(wasmModule, keyId) { - return new Promise(async (resolve, reject) => { - if (!wasmModule) { - reject('WASM module not loaded'); - return; - } - - try { - // Call the WASM select_keypair function - await wasmModule.select_keypair(keyId); - - // Update the session state in the background service worker - chrome.runtime.sendMessage({ - action: 'update_session', - type: 'keypair_selected', - data: keyId - }, (response) => { - if (response && response.success) { - resolve(); - } else { - reject(response && response.error ? response.error : 'Failed to update session state'); - } - }); - } catch (error) { - reject(error.message || 'Failed to select keypair'); - } - }); -} - -// Sign a message using the WASM module -export function sign(wasmModule, message) { - return new Promise(async (resolve, reject) => { - if (!wasmModule) { - reject('WASM module not loaded'); - return; - } - - try { - // Convert message to Uint8Array for WASM - const encoder = new TextEncoder(); - const messageBytes = encoder.encode(message); - - // Call the WASM sign function - const signature = await wasmModule.sign(messageBytes); - resolve(signature); - } catch (error) { - reject(error.message || 'Failed to sign message'); - } - }); -} diff --git a/extension/public/background/index.js b/extension/public/background/index.js deleted file mode 100644 index 781c532..0000000 --- a/extension/public/background/index.js +++ /dev/null @@ -1,102 +0,0 @@ -// Background service worker for Modular Vault Extension -// Handles session, keypair, and WASM logic - -// We need to use dynamic imports for service workers in MV3 -let wasmModule; -let init; -let wasm; -let wasmReady = false; - -// Initialize WASM on startup with dynamic import -async function loadWasm() { - try { - // Using importScripts for service worker - const wasmUrl = chrome.runtime.getURL('wasm/wasm_app.js'); - wasmModule = await import(wasmUrl); - init = wasmModule.default; - wasm = wasmModule; - - // Initialize WASM with explicit WASM file path - await init(chrome.runtime.getURL('wasm/wasm_app_bg.wasm')); - wasmReady = true; - console.log('WASM initialized in background'); - } catch (error) { - console.error('Failed to initialize WASM:', error); - } -} - -// Start loading WASM -loadWasm(); - -chrome.runtime.onMessage.addListener(async (request, sender, sendResponse) => { - if (!wasmReady) { - sendResponse({ error: 'WASM not ready' }); - return true; - } - // Session unlock/create - if (request.action === 'init_session') { - try { - const result = await wasm.init_session(request.keyspace, request.password); - // Persist current session info - await chrome.storage.local.set({ currentKeyspace: request.keyspace }); - sendResponse({ ok: true }); - } catch (e) { - sendResponse({ error: e.message }); - } - return true; - } - // Lock session - if (request.action === 'lock_session') { - try { - wasm.lock_session(); - await chrome.storage.local.set({ currentKeyspace: null }); - sendResponse({ ok: true }); - } catch (e) { - sendResponse({ error: e.message }); - } - return true; - } - // Add keypair - if (request.action === 'add_keypair') { - try { - const keyId = await wasm.add_keypair('Secp256k1', null); - let keypairs = (await chrome.storage.local.get(['keypairs'])).keypairs || []; - keypairs.push({ id: keyId, label: `Secp256k1-${keypairs.length + 1}` }); - await chrome.storage.local.set({ keypairs }); - sendResponse({ keyId }); - } catch (e) { - sendResponse({ error: e.message }); - } - return true; - } - // Select keypair - if (request.action === 'select_keypair') { - try { - await wasm.select_keypair(request.keyId); - await chrome.storage.local.set({ selectedKeypair: request.keyId }); - sendResponse({ ok: true }); - } catch (e) { - sendResponse({ error: e.message }); - } - return true; - } - // Sign - if (request.action === 'sign') { - try { - // Convert plaintext to Uint8Array - const encoder = new TextEncoder(); - const msgBytes = encoder.encode(request.message); - const signature = await wasm.sign(msgBytes); - sendResponse({ signature }); - } catch (e) { - sendResponse({ error: e.message }); - } - return true; - } - // Query status - if (request.action === 'get_status') { - const { currentKeyspace, keypairs, selectedKeypair } = await chrome.storage.local.get(['currentKeyspace', 'keypairs', 'selectedKeypair']); - sendResponse({ currentKeyspace, keypairs: keypairs || [], selectedKeypair }); - return true; - } -}); diff --git a/extension/public/wasm/wasm_app.js b/extension/public/wasm/wasm_app.js deleted file mode 100644 index 10f8ade..0000000 --- a/extension/public/wasm/wasm_app.js +++ /dev/null @@ -1,765 +0,0 @@ -import * as __wbg_star0 from 'env'; - -let wasm; - -function addToExternrefTable0(obj) { - const idx = wasm.__externref_table_alloc(); - wasm.__wbindgen_export_2.set(idx, obj); - return idx; -} - -function handleError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - const idx = addToExternrefTable0(e); - wasm.__wbindgen_exn_store(idx); - } -} - -const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); - -if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; - -let cachedUint8ArrayMemory0 = null; - -function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function isLikeNone(x) { - return x === undefined || x === null; -} - -function getArrayU8FromWasm0(ptr, len) { - ptr = ptr >>> 0; - return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); -} - -let WASM_VECTOR_LEN = 0; - -const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); - -const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' - ? function (arg, view) { - return cachedTextEncoder.encodeInto(arg, view); -} - : function (arg, view) { - const buf = cachedTextEncoder.encode(arg); - view.set(buf); - return { - read: arg.length, - written: buf.length - }; -}); - -function passStringToWasm0(arg, malloc, realloc) { - - if (realloc === undefined) { - const buf = cachedTextEncoder.encode(arg); - const ptr = malloc(buf.length, 1) >>> 0; - getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); - WASM_VECTOR_LEN = buf.length; - return ptr; - } - - let len = arg.length; - let ptr = malloc(len, 1) >>> 0; - - const mem = getUint8ArrayMemory0(); - - let offset = 0; - - for (; offset < len; offset++) { - const code = arg.charCodeAt(offset); - if (code > 0x7F) break; - mem[ptr + offset] = code; - } - - if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } - ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; - const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); - const ret = encodeString(arg, view); - - offset += ret.written; - ptr = realloc(ptr, len, offset, 1) >>> 0; - } - - WASM_VECTOR_LEN = offset; - return ptr; -} - -let cachedDataViewMemory0 = null; - -function getDataViewMemory0() { - if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { - cachedDataViewMemory0 = new DataView(wasm.memory.buffer); - } - return cachedDataViewMemory0; -} - -const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') - ? { register: () => {}, unregister: () => {} } - : new FinalizationRegistry(state => { - wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b) -}); - -function makeMutClosure(arg0, arg1, dtor, f) { - const state = { a: arg0, b: arg1, cnt: 1, dtor }; - const real = (...args) => { - // First up with a closure we increment the internal reference - // count. This ensures that the Rust closure environment won't - // be deallocated while we're invoking it. - state.cnt++; - const a = state.a; - state.a = 0; - try { - return f(a, state.b, ...args); - } finally { - if (--state.cnt === 0) { - wasm.__wbindgen_export_5.get(state.dtor)(a, state.b); - CLOSURE_DTORS.unregister(state); - } else { - state.a = a; - } - } - }; - real.original = state; - CLOSURE_DTORS.register(real, state, state); - return real; -} - -function debugString(val) { - // primitive types - const type = typeof val; - if (type == 'number' || type == 'boolean' || val == null) { - return `${val}`; - } - if (type == 'string') { - return `"${val}"`; - } - if (type == 'symbol') { - const description = val.description; - if (description == null) { - return 'Symbol'; - } else { - return `Symbol(${description})`; - } - } - if (type == 'function') { - const name = val.name; - if (typeof name == 'string' && name.length > 0) { - return `Function(${name})`; - } else { - return 'Function'; - } - } - // objects - if (Array.isArray(val)) { - const length = val.length; - let debug = '['; - if (length > 0) { - debug += debugString(val[0]); - } - for(let i = 1; i < length; i++) { - debug += ', ' + debugString(val[i]); - } - debug += ']'; - return debug; - } - // Test for built-in - const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); - let className; - if (builtInMatches && builtInMatches.length > 1) { - className = builtInMatches[1]; - } else { - // Failed to match the standard '[object ClassName]' - return toString.call(val); - } - if (className == 'Object') { - // we're a user defined class or Object - // JSON.stringify avoids problems with cycles, and is generally much - // easier than looping through ownProperties of `val`. - try { - return 'Object(' + JSON.stringify(val) + ')'; - } catch (_) { - return 'Object'; - } - } - // errors - if (val instanceof Error) { - return `${val.name}: ${val.message}\n${val.stack}`; - } - // TODO we could test for more things here, like `Set`s and `Map`s. - return className; -} -/** - * Initialize the scripting environment (must be called before run_rhai) - */ -export function init_rhai_env() { - wasm.init_rhai_env(); -} - -function takeFromExternrefTable0(idx) { - const value = wasm.__wbindgen_export_2.get(idx); - wasm.__externref_table_dealloc(idx); - return value; -} -/** - * Securely run a Rhai script in the extension context (must be called only after user approval) - * @param {string} script - * @returns {any} - */ -export function run_rhai(script) { - const ptr0 = passStringToWasm0(script, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.run_rhai(ptr0, len0); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return takeFromExternrefTable0(ret[0]); -} - -/** - * Initialize session with keyspace and password - * @param {string} keyspace - * @param {string} password - * @returns {Promise} - */ -export function init_session(keyspace, password) { - const ptr0 = passStringToWasm0(keyspace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.init_session(ptr0, len0, ptr1, len1); - return ret; -} - -/** - * Lock the session (zeroize password and session) - */ -export function lock_session() { - wasm.lock_session(); -} - -/** - * Get all keypairs from the current session - * Returns an array of keypair objects with id, type, and metadata - * Select keypair for the session - * @param {string} key_id - */ -export function select_keypair(key_id) { - const ptr0 = passStringToWasm0(key_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.select_keypair(ptr0, len0); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } -} - -/** - * List keypairs in the current session's keyspace - * @returns {Promise} - */ -export function list_keypairs() { - const ret = wasm.list_keypairs(); - return ret; -} - -/** - * Add a keypair to the current keyspace - * @param {string | null} [key_type] - * @param {string | null} [metadata] - * @returns {Promise} - */ -export function add_keypair(key_type, metadata) { - var ptr0 = isLikeNone(key_type) ? 0 : passStringToWasm0(key_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - var ptr1 = isLikeNone(metadata) ? 0 : passStringToWasm0(metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - const ret = wasm.add_keypair(ptr0, len0, ptr1, len1); - return ret; -} - -function passArray8ToWasm0(arg, malloc) { - const ptr = malloc(arg.length * 1, 1) >>> 0; - getUint8ArrayMemory0().set(arg, ptr / 1); - WASM_VECTOR_LEN = arg.length; - return ptr; -} -/** - * Sign message with current session - * @param {Uint8Array} message - * @returns {Promise} - */ -export function sign(message) { - const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.sign(ptr0, len0); - return ret; -} - -function __wbg_adapter_32(arg0, arg1, arg2) { - wasm.closure77_externref_shim(arg0, arg1, arg2); -} - -function __wbg_adapter_35(arg0, arg1, arg2) { - wasm.closure126_externref_shim(arg0, arg1, arg2); -} - -function __wbg_adapter_38(arg0, arg1, arg2) { - wasm.closure188_externref_shim(arg0, arg1, arg2); -} - -function __wbg_adapter_123(arg0, arg1, arg2, arg3) { - wasm.closure213_externref_shim(arg0, arg1, arg2, arg3); -} - -const __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"]; - -async function __wbg_load(module, imports) { - if (typeof Response === 'function' && module instanceof Response) { - if (typeof WebAssembly.instantiateStreaming === 'function') { - try { - return await WebAssembly.instantiateStreaming(module, imports); - - } catch (e) { - if (module.headers.get('Content-Type') != 'application/wasm') { - console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); - - } else { - throw e; - } - } - } - - const bytes = await module.arrayBuffer(); - return await WebAssembly.instantiate(bytes, imports); - - } else { - const instance = await WebAssembly.instantiate(module, imports); - - if (instance instanceof WebAssembly.Instance) { - return { instance, module }; - - } else { - return instance; - } - } -} - -function __wbg_get_imports() { - const imports = {}; - imports.wbg = {}; - imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) { - const ret = arg0.buffer; - return ret; - }; - imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) { - const ret = arg0.call(arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.call(arg1, arg2); - return ret; - }, arguments) }; - imports.wbg.__wbg_createObjectStore_d2f9e1016f4d81b9 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - const ret = arg0.createObjectStore(getStringFromWasm0(arg1, arg2), arg3); - return ret; - }, arguments) }; - imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) { - const ret = arg0.crypto; - return ret; - }; - imports.wbg.__wbg_error_524f506f44df1645 = function(arg0) { - console.error(arg0); - }; - imports.wbg.__wbg_error_ff4ddaabdfc5dbb3 = function() { return handleError(function (arg0) { - const ret = arg0.error; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) { - globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1)); - }, arguments) }; - imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) { - arg0.getRandomValues(arg1); - }, arguments) }; - imports.wbg.__wbg_get_4f73335ab78445db = function(arg0, arg1, arg2) { - const ret = arg1[arg2 >>> 0]; - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) { - const ret = Reflect.get(arg0, arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_get_8da03f81f6a1111e = function() { return handleError(function (arg0, arg1) { - const ret = arg0.get(arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_instanceof_IdbDatabase_a3ef009ca00059f9 = function(arg0) { - let result; - try { - result = arg0 instanceof IDBDatabase; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_IdbFactory_12eaba3366f4302f = function(arg0) { - let result; - try { - result = arg0 instanceof IDBFactory; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_IdbOpenDbRequest_a3416e156c9db893 = function(arg0) { - let result; - try { - result = arg0 instanceof IDBOpenDBRequest; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_IdbRequest_4813c3f207666aa4 = function(arg0) { - let result; - try { - result = arg0 instanceof IDBRequest; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_length_52b6c4580c5ec934 = function(arg0) { - const ret = arg0.length; - return ret; - }; - imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) { - const ret = arg0.msCrypto; - return ret; - }; - imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) { - try { - var state0 = {a: arg0, b: arg1}; - var cb0 = (arg0, arg1) => { - const a = state0.a; - state0.a = 0; - try { - return __wbg_adapter_123(a, state0.b, arg0, arg1); - } finally { - state0.a = a; - } - }; - const ret = new Promise(cb0); - return ret; - } finally { - state0.a = state0.b = 0; - } - }; - imports.wbg.__wbg_new_405e22f390576ce2 = function() { - const ret = new Object(); - return ret; - }; - imports.wbg.__wbg_new_78feb108b6472713 = function() { - const ret = new Array(); - return ret; - }; - imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) { - const ret = new Uint8Array(arg0); - return ret; - }; - imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) { - const ret = new Function(getStringFromWasm0(arg0, arg1)); - return ret; - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) { - const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) { - const ret = new Uint8Array(arg0 >>> 0); - return ret; - }; - imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) { - const ret = arg0.node; - return ret; - }; - imports.wbg.__wbg_objectStoreNames_9bb1ab04a7012aaf = function(arg0) { - const ret = arg0.objectStoreNames; - return ret; - }; - imports.wbg.__wbg_objectStore_21878d46d25b64b6 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.objectStore(getStringFromWasm0(arg1, arg2)); - return ret; - }, arguments) }; - imports.wbg.__wbg_open_88b1390d99a7c691 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.open(getStringFromWasm0(arg1, arg2)); - return ret; - }, arguments) }; - imports.wbg.__wbg_open_e0c0b2993eb596e1 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0); - return ret; - }, arguments) }; - imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) { - const ret = arg0.process; - return ret; - }; - imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) { - const ret = arg0.push(arg1); - return ret; - }; - imports.wbg.__wbg_put_066faa31a6a88f5b = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.put(arg1, arg2); - return ret; - }, arguments) }; - imports.wbg.__wbg_put_9ef5363941008835 = function() { return handleError(function (arg0, arg1) { - const ret = arg0.put(arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) { - queueMicrotask(arg0); - }; - imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) { - const ret = arg0.queueMicrotask; - return ret; - }; - imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) { - arg0.randomFillSync(arg1); - }, arguments) }; - imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () { - const ret = module.require; - return ret; - }, arguments) }; - imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) { - const ret = Promise.resolve(arg0); - return ret; - }; - imports.wbg.__wbg_result_f29afabdf2c05826 = function() { return handleError(function (arg0) { - const ret = arg0.result; - return ret; - }, arguments) }; - imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) { - arg0.set(arg1, arg2 >>> 0); - }; - imports.wbg.__wbg_setonerror_d7e3056cc6e56085 = function(arg0, arg1) { - arg0.onerror = arg1; - }; - imports.wbg.__wbg_setonsuccess_afa464ee777a396d = function(arg0, arg1) { - arg0.onsuccess = arg1; - }; - imports.wbg.__wbg_setonupgradeneeded_fcf7ce4f2eb0cb5f = function(arg0, arg1) { - arg0.onupgradeneeded = arg1; - }; - imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() { - const ret = typeof global === 'undefined' ? null : global; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() { - const ret = typeof globalThis === 'undefined' ? null : globalThis; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() { - const ret = typeof self === 'undefined' ? null : self; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() { - const ret = typeof window === 'undefined' ? null : window; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) { - const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_target_0a62d9d79a2a1ede = function(arg0) { - const ret = arg0.target; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) { - const ret = arg0.then(arg1); - return ret; - }; - imports.wbg.__wbg_transaction_d6d07c3c9963c49e = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.transaction(arg1, __wbindgen_enum_IdbTransactionMode[arg2]); - return ret; - }, arguments) }; - imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) { - const ret = arg0.versions; - return ret; - }; - imports.wbg.__wbindgen_cb_drop = function(arg0) { - const obj = arg0.original; - if (obj.cnt-- == 1) { - obj.a = 0; - return true; - } - const ret = false; - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper284 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 78, __wbg_adapter_32); - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper493 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 127, __wbg_adapter_35); - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper762 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 189, __wbg_adapter_38); - return ret; - }; - imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { - const ret = debugString(arg1); - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbindgen_init_externref_table = function() { - const table = wasm.__wbindgen_export_2; - const offset = table.grow(4); - table.set(0, undefined); - table.set(offset + 0, undefined); - table.set(offset + 1, null); - table.set(offset + 2, true); - table.set(offset + 3, false); - ; - }; - imports.wbg.__wbindgen_is_function = function(arg0) { - const ret = typeof(arg0) === 'function'; - return ret; - }; - imports.wbg.__wbindgen_is_null = function(arg0) { - const ret = arg0 === null; - return ret; - }; - imports.wbg.__wbindgen_is_object = function(arg0) { - const val = arg0; - const ret = typeof(val) === 'object' && val !== null; - return ret; - }; - imports.wbg.__wbindgen_is_string = function(arg0) { - const ret = typeof(arg0) === 'string'; - return ret; - }; - imports.wbg.__wbindgen_is_undefined = function(arg0) { - const ret = arg0 === undefined; - return ret; - }; - imports.wbg.__wbindgen_json_parse = function(arg0, arg1) { - const ret = JSON.parse(getStringFromWasm0(arg0, arg1)); - return ret; - }; - imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) { - const obj = arg1; - const ret = JSON.stringify(obj === undefined ? null : obj); - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbindgen_memory = function() { - const ret = wasm.memory; - return ret; - }; - imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return ret; - }; - imports.wbg.__wbindgen_throw = function(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); - }; - imports['env'] = __wbg_star0; - - return imports; -} - -function __wbg_init_memory(imports, memory) { - -} - -function __wbg_finalize_init(instance, module) { - wasm = instance.exports; - __wbg_init.__wbindgen_wasm_module = module; - cachedDataViewMemory0 = null; - cachedUint8ArrayMemory0 = null; - - - wasm.__wbindgen_start(); - return wasm; -} - -function initSync(module) { - if (wasm !== undefined) return wasm; - - - if (typeof module !== 'undefined') { - if (Object.getPrototypeOf(module) === Object.prototype) { - ({module} = module) - } else { - console.warn('using deprecated parameters for `initSync()`; pass a single object instead') - } - } - - const imports = __wbg_get_imports(); - - __wbg_init_memory(imports); - - if (!(module instanceof WebAssembly.Module)) { - module = new WebAssembly.Module(module); - } - - const instance = new WebAssembly.Instance(module, imports); - - return __wbg_finalize_init(instance, module); -} - -async function __wbg_init(module_or_path) { - if (wasm !== undefined) return wasm; - - - if (typeof module_or_path !== 'undefined') { - if (Object.getPrototypeOf(module_or_path) === Object.prototype) { - ({module_or_path} = module_or_path) - } else { - console.warn('using deprecated parameters for the initialization function; pass a single object instead') - } - } - - if (typeof module_or_path === 'undefined') { - module_or_path = new URL('wasm_app_bg.wasm', import.meta.url); - } - const imports = __wbg_get_imports(); - - if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { - module_or_path = fetch(module_or_path); - } - - __wbg_init_memory(imports); - - const { instance, module } = await __wbg_load(await module_or_path, imports); - - return __wbg_finalize_init(instance, module); -} - -export { initSync }; -export default __wbg_init; diff --git a/extension/public/wasm/wasm_app_bg.wasm b/extension/public/wasm/wasm_app_bg.wasm deleted file mode 100644 index 4b43bce..0000000 Binary files a/extension/public/wasm/wasm_app_bg.wasm and /dev/null differ diff --git a/extension/vite.config.js b/extension/vite.config.js deleted file mode 100644 index ea88e43..0000000 --- a/extension/vite.config.js +++ /dev/null @@ -1,122 +0,0 @@ -import { defineConfig } from 'vite'; -import react from '@vitejs/plugin-react'; -import wasm from 'vite-plugin-wasm'; -import topLevelAwait from 'vite-plugin-top-level-await'; -import { resolve } from 'path'; -import fs from 'fs'; -import { Plugin } from 'vite'; - -// Custom plugin to copy extension files directly to the dist directory -const copyExtensionFiles = () => { - return { - name: 'copy-extension-files', - closeBundle() { - // Create the wasm directory in dist if it doesn't exist - const wasmDistDir = resolve(__dirname, 'dist/wasm'); - if (!fs.existsSync(wasmDistDir)) { - fs.mkdirSync(wasmDistDir, { recursive: true }); - } - - // Copy the wasm.js file - const wasmJsSource = resolve(__dirname, 'wasm/wasm_app.js'); - const wasmJsDest = resolve(wasmDistDir, 'wasm_app.js'); - fs.copyFileSync(wasmJsSource, wasmJsDest); - - // Copy the wasm binary file from the pkg output - const wasmBinSource = resolve(__dirname, '../wasm_app/pkg/wasm_app_bg.wasm'); - const wasmBinDest = resolve(wasmDistDir, 'wasm_app_bg.wasm'); - fs.copyFileSync(wasmBinSource, wasmBinDest); - - // Create background directory and copy the background script - const bgDistDir = resolve(__dirname, 'dist/background'); - if (!fs.existsSync(bgDistDir)) { - fs.mkdirSync(bgDistDir, { recursive: true }); - } - - const bgSource = resolve(__dirname, 'background/index.js'); - const bgDest = resolve(bgDistDir, 'index.js'); - fs.copyFileSync(bgSource, bgDest); - - // Create popup directory and copy the popup files - const popupDistDir = resolve(__dirname, 'dist/popup'); - if (!fs.existsSync(popupDistDir)) { - fs.mkdirSync(popupDistDir, { recursive: true }); - } - - - - // Copy CSS file - const cssSource = resolve(__dirname, 'popup/popup.css'); - const cssDest = resolve(popupDistDir, 'popup.css'); - fs.copyFileSync(cssSource, cssDest); - - // Also copy the manifest.json file - const manifestSource = resolve(__dirname, 'manifest.json'); - const manifestDest = resolve(__dirname, 'dist/manifest.json'); - fs.copyFileSync(manifestSource, manifestDest); - - // Copy assets directory - const assetsDistDir = resolve(__dirname, 'dist/assets'); - if (!fs.existsSync(assetsDistDir)) { - fs.mkdirSync(assetsDistDir, { recursive: true }); - } - - // Copy icon files - const iconSizes = [16, 32, 48, 128]; - iconSizes.forEach(size => { - const iconSource = resolve(__dirname, `assets/icon-${size}.png`); - const iconDest = resolve(assetsDistDir, `icon-${size}.png`); - if (fs.existsSync(iconSource)) { - fs.copyFileSync(iconSource, iconDest); - } - }); - - - console.log('Extension files copied to dist directory'); - } - }; - -}; - -import path from 'path'; - -export default defineConfig({ - resolve: { - alias: { - '@wasm': path.resolve(__dirname, '../wasm_app/pkg') - } - }, - - plugins: [ - react(), - wasm(), - topLevelAwait(), - copyExtensionFiles() - ], - build: { - outDir: 'dist', - emptyOutDir: true, - // Simplify the build output for browser extension - rollupOptions: { - input: { - popup: resolve(__dirname, 'popup/index.html') - }, - output: { - // Use a simpler output format without hash values - entryFileNames: 'assets/[name].js', - chunkFileNames: 'assets/[name]-[hash].js', - assetFileNames: 'assets/[name].[ext]', - // Make sure output is compatible with browser extensions - format: 'iife', - // Don't generate separate code-split chunks - manualChunks: undefined - } - } - }, - // Provide a simple dev server config - server: { - fs: { - allow: ['../'] - } - } -}); diff --git a/hero_vault_extension/README.md b/hero_vault_extension/README.md new file mode 100644 index 0000000..15cc9a3 --- /dev/null +++ b/hero_vault_extension/README.md @@ -0,0 +1,88 @@ +# SAL Modular Cryptographic Browser Extension + +A modern, secure browser extension for interacting with the SAL modular Rust cryptographic stack, enabling key management, cryptographic operations, and secure Rhai script execution. + +## Features + +### Session & Key Management +- Create and unlock encrypted keyspaces with password protection +- Create, select, and manage multiple keypairs (Ed25519, Secp256k1) +- Clear session state visualization and management + +### Cryptographic Operations +- Sign and verify messages using selected keypair +- Encrypt and decrypt messages using asymmetric cryptography +- Support for symmetric encryption using password-derived keys + +### Scripting (Rhai) +- Execute Rhai scripts securely within the extension +- Explicit user approval for all script executions +- Script history and audit trail + +### WebSocket Integration +- Connect to WebSocket servers using keypair's public key +- Receive, review, and approve/reject incoming scripts +- Support for both local and remote script execution + +### Security +- Dark mode UI with modern, responsive design +- Session auto-lock after configurable inactivity period +- Explicit user approval for all sensitive operations +- No persistent storage of passwords or private keys in plaintext + +## Architecture + +The extension is built with a modern tech stack: + +- **Frontend**: React with TypeScript, Material-UI +- **State Management**: Zustand +- **Backend**: WebAssembly (WASM) modules compiled from Rust +- **Storage**: Chrome extension storage API with encryption +- **Networking**: WebSocket for server communication + +## Development Setup + +1. Install dependencies: + ``` + cd sal_extension + npm install + ``` + +2. Build the extension: + ``` + npm run build + ``` + +3. Load the extension in Chrome/Edge: + - Navigate to `chrome://extensions/` + - Enable "Developer mode" + - Click "Load unpacked" and select the `dist` directory + +4. For development with hot-reload: + ``` + npm run watch + ``` + +## Integration with WASM + +The extension uses WebAssembly modules compiled from Rust to perform cryptographic operations securely. The WASM modules are loaded in the extension's background script and provide a secure API for the frontend. + +Key WASM functions exposed: +- `init_session` - Unlock a keyspace with password +- `create_keyspace` - Create a new keyspace +- `add_keypair` - Create a new keypair +- `select_keypair` - Select a keypair for use +- `sign` - Sign a message with the selected keypair +- `run_rhai` - Execute a Rhai script securely + +## Security Considerations + +- The extension follows the principle of least privilege +- All sensitive operations require explicit user approval +- Passwords are never stored persistently, only kept in memory during an active session +- Session state is automatically cleared when the extension is locked +- WebSocket connections are authenticated using the user's public key + +## License + +[MIT License](LICENSE) diff --git a/hero_vault_extension/dist/assets/index-11057528.css b/hero_vault_extension/dist/assets/index-11057528.css new file mode 100644 index 0000000..6e9da15 --- /dev/null +++ b/hero_vault_extension/dist/assets/index-11057528.css @@ -0,0 +1 @@ +:root{font-family:Roboto,system-ui,sans-serif;line-height:1.5;font-weight:400;color-scheme:dark}body{margin:0;min-width:360px;min-height:520px;overflow-x:hidden}#root{width:100%;height:100%}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:rgba(255,255,255,.05);border-radius:3px}::-webkit-scrollbar-thumb{background:rgba(255,255,255,.2);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.3)} diff --git a/hero_vault_extension/dist/assets/index-b58c7e43.js b/hero_vault_extension/dist/assets/index-b58c7e43.js new file mode 100644 index 0000000..a2e1eed --- /dev/null +++ b/hero_vault_extension/dist/assets/index-b58c7e43.js @@ -0,0 +1,205 @@ +function eb(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var mg={exports:{}},Yl={},hg={exports:{}},de={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xs=Symbol.for("react.element"),tb=Symbol.for("react.portal"),nb=Symbol.for("react.fragment"),rb=Symbol.for("react.strict_mode"),ob=Symbol.for("react.profiler"),ib=Symbol.for("react.provider"),sb=Symbol.for("react.context"),ab=Symbol.for("react.forward_ref"),lb=Symbol.for("react.suspense"),cb=Symbol.for("react.memo"),ub=Symbol.for("react.lazy"),Cm=Symbol.iterator;function db(e){return e===null||typeof e!="object"?null:(e=Cm&&e[Cm]||e["@@iterator"],typeof e=="function"?e:null)}var vg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gg=Object.assign,yg={};function Ci(e,t,n){this.props=e,this.context=t,this.refs=yg,this.updater=n||vg}Ci.prototype.isReactComponent={};Ci.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ci.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xg(){}xg.prototype=Ci.prototype;function dp(e,t,n){this.props=e,this.context=t,this.refs=yg,this.updater=n||vg}var pp=dp.prototype=new xg;pp.constructor=dp;gg(pp,Ci.prototype);pp.isPureReactComponent=!0;var wm=Array.isArray,bg=Object.prototype.hasOwnProperty,fp={current:null},Sg={key:!0,ref:!0,__self:!0,__source:!0};function Cg(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)bg.call(t,r)&&!Sg.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,se=T[q];if(0>>1;qo(K,W))reo(ke,K)?(T[q]=ke,T[re]=W,q=re):(T[q]=K,T[X]=W,q=X);else if(reo(ke,W))T[q]=ke,T[re]=W,q=re;else break e}}return I}function o(T,I){var W=T.sortIndex-I.sortIndex;return W!==0?W:T.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,p=null,f=3,x=!1,b=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(T){for(var I=n(c);I!==null;){if(I.callback===null)r(c);else if(I.startTime<=T)r(c),I.sortIndex=I.expirationTime,t(l,I);else break;I=n(c)}}function C(T){if(y=!1,g(T),!b)if(n(l)!==null)b=!0,L(k);else{var I=n(c);I!==null&&B(C,I.startTime-T)}}function k(T,I){b=!1,y&&(y=!1,h(P),P=-1),x=!0;var W=f;try{for(g(I),p=n(l);p!==null&&(!(p.expirationTime>I)||T&&!j());){var q=p.callback;if(typeof q=="function"){p.callback=null,f=p.priorityLevel;var se=q(p.expirationTime<=I);I=e.unstable_now(),typeof se=="function"?p.callback=se:p===n(l)&&r(l),g(I)}else r(l);p=n(l)}if(p!==null)var ce=!0;else{var X=n(c);X!==null&&B(C,X.startTime-I),ce=!1}return ce}finally{p=null,f=W,x=!1}}var $=!1,E=null,P=-1,_=5,R=-1;function j(){return!(e.unstable_now()-R<_)}function A(){if(E!==null){var T=e.unstable_now();R=T;var I=!0;try{I=E(!0,T)}finally{I?M():($=!1,E=null)}}else $=!1}var M;if(typeof v=="function")M=function(){v(A)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,N=O.port2;O.port1.onmessage=A,M=function(){N.postMessage(null)}}else M=function(){w(A,0)};function L(T){E=T,$||($=!0,M())}function B(T,I){P=w(function(){T(e.unstable_now())},I)}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(T){T.callback=null},e.unstable_continueExecution=function(){b||x||(b=!0,L(k))},e.unstable_forceFrameRate=function(T){0>T||125q?(T.sortIndex=W,t(c,T),n(l)===null&&T===n(c)&&(y?(h(P),P=-1):y=!0,B(C,W-q))):(T.sortIndex=se,t(l,T),b||x||(b=!0,L(k))),T},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(T){var I=f;return function(){var W=f;f=I;try{return T.apply(this,arguments)}finally{f=W}}}})(Pg);$g.exports=Pg;var Cb=$g.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var wb=m,rn=Cb;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zu=Object.prototype.hasOwnProperty,kb=/^[: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]*$/,Em={},$m={};function Eb(e){return Zu.call($m,e)?!0:Zu.call(Em,e)?!1:kb.test(e)?$m[e]=!0:(Em[e]=!0,!1)}function $b(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Pb(e,t,n,r){if(t===null||typeof t>"u"||$b(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Lt(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){wt[e]=new Lt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];wt[t]=new Lt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){wt[e]=new Lt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wt[e]=new Lt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){wt[e]=new Lt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){wt[e]=new Lt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){wt[e]=new Lt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){wt[e]=new Lt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){wt[e]=new Lt(e,5,!1,e.toLowerCase(),null,!1,!1)});var hp=/[\-:]([a-z])/g;function vp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(hp,vp);wt[t]=new Lt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(hp,vp);wt[t]=new Lt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(hp,vp);wt[t]=new Lt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){wt[e]=new Lt(e,1,!1,e.toLowerCase(),null,!1,!1)});wt.xlinkHref=new Lt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){wt[e]=new Lt(e,1,!1,e.toLowerCase(),null,!0,!0)});function gp(e,t,n,r){var o=wt.hasOwnProperty(t)?wt[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` +`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{au=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ji(e):""}function Rb(e){switch(e.tag){case 5:return Ji(e.type);case 16:return Ji("Lazy");case 13:return Ji("Suspense");case 19:return Ji("SuspenseList");case 0:case 2:case 15:return e=lu(e.type,!1),e;case 11:return e=lu(e.type.render,!1),e;case 1:return e=lu(e.type,!0),e;default:return""}}function nd(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bo:return"Fragment";case zo:return"Portal";case Ju:return"Profiler";case yp:return"StrictMode";case ed:return"Suspense";case td:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Mg:return(e.displayName||"Context")+".Consumer";case Tg:return(e._context.displayName||"Context")+".Provider";case xp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bp:return t=e.displayName||null,t!==null?t:nd(e.type)||"Memo";case Er:t=e._payload,e=e._init;try{return nd(e(t))}catch{}}return null}function Tb(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return nd(t);case 8:return t===yp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Wr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Og(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mb(e){var t=Og(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ma(e){e._valueTracker||(e._valueTracker=Mb(e))}function _g(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Og(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ul(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function rd(e,t){var n=t.checked;return He({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Rm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Wr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ig(e,t){t=t.checked,t!=null&&gp(e,"checked",t,!1)}function od(e,t){Ig(e,t);var n=Wr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?id(e,t.type,n):t.hasOwnProperty("defaultValue")&&id(e,t.type,Wr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function id(e,t,n){(t!=="number"||ul(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var es=Array.isArray;function Qo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ha.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var os={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},jb=["Webkit","ms","Moz","O"];Object.keys(os).forEach(function(e){jb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),os[t]=os[e]})});function zg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||os.hasOwnProperty(e)&&os[e]?(""+t).trim():t+"px"}function Bg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=zg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Ob=He({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ld(e,t){if(t){if(Ob[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function cd(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 ud=null;function Sp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dd=null,Zo=null,Jo=null;function Om(e){if(e=Js(e)){if(typeof dd!="function")throw Error(F(280));var t=e.stateNode;t&&(t=ec(t),dd(e.stateNode,e.type,t))}}function Dg(e){Zo?Jo?Jo.push(e):Jo=[e]:Zo=e}function Fg(){if(Zo){var e=Zo,t=Jo;if(Jo=Zo=null,Om(e),t)for(e=0;e>>=0,e===0?32:31-(Ub(e)/Vb|0)|0}var va=64,ga=4194304;function ts(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ml(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=ts(a):(i&=s,i!==0&&(r=ts(i)))}else s=n&~o,s!==0?r=ts(s):i!==0&&(r=ts(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Qs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-zn(t),e[t]=n}function qb(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ss),Fm=String.fromCharCode(32),Wm=!1;function ay(e,t){switch(e){case"keyup":return CS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ly(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Do=!1;function kS(e,t){switch(e){case"compositionend":return ly(t);case"keypress":return t.which!==32?null:(Wm=!0,Fm);case"textInput":return e=t.data,e===Fm&&Wm?null:e;default:return null}}function ES(e,t){if(Do)return e==="compositionend"||!Tp&&ay(e,t)?(e=iy(),Ha=$p=Tr=null,Do=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Km(n)}}function py(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?py(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fy(){for(var e=window,t=ul();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ul(e.document)}return t}function Mp(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")}function IS(e){var t=fy(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&py(n.ownerDocument.documentElement,n)){if(r!==null&&Mp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Gm(n,i);var s=Gm(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Fo=null,gd=null,ls=null,yd=!1;function qm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yd||Fo==null||Fo!==ul(r)||(r=Fo,"selectionStart"in r&&Mp(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}),ls&&Rs(ls,r)||(ls=r,r=gl(gd,"onSelect"),0Vo||(e.current=kd[Vo],kd[Vo]=null,Vo--)}function Ne(e,t){Vo++,kd[Vo]=e.current,e.current=t}var Ur={},Mt=Hr(Ur),Ut=Hr(!1),uo=Ur;function ai(e,t){var n=e.type.contextTypes;if(!n)return Ur;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Vt(e){return e=e.childContextTypes,e!=null}function xl(){ze(Ut),ze(Mt)}function th(e,t,n){if(Mt.current!==Ur)throw Error(F(168));Ne(Mt,t),Ne(Ut,n)}function Cy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(F(108,Tb(e)||"Unknown",o));return He({},n,r)}function bl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ur,uo=Mt.current,Ne(Mt,e),Ne(Ut,Ut.current),!0}function nh(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=Cy(e,t,uo),r.__reactInternalMemoizedMergedChildContext=e,ze(Ut),ze(Mt),Ne(Mt,e)):ze(Ut),Ne(Ut,n)}var or=null,tc=!1,Cu=!1;function wy(e){or===null?or=[e]:or.push(e)}function KS(e){tc=!0,wy(e)}function Kr(){if(!Cu&&or!==null){Cu=!0;var e=0,t=Me;try{var n=or;for(Me=1;e>=s,o-=s,sr=1<<32-zn(t)+o|n<P?(_=E,E=null):_=E.sibling;var R=f(h,E,g[P],C);if(R===null){E===null&&(E=_);break}e&&E&&R.alternate===null&&t(h,E),v=i(R,v,P),$===null?k=R:$.sibling=R,$=R,E=_}if(P===g.length)return n(h,E),We&&Yr(h,P),k;if(E===null){for(;PP?(_=E,E=null):_=E.sibling;var j=f(h,E,R.value,C);if(j===null){E===null&&(E=_);break}e&&E&&j.alternate===null&&t(h,E),v=i(j,v,P),$===null?k=j:$.sibling=j,$=j,E=_}if(R.done)return n(h,E),We&&Yr(h,P),k;if(E===null){for(;!R.done;P++,R=g.next())R=p(h,R.value,C),R!==null&&(v=i(R,v,P),$===null?k=R:$.sibling=R,$=R);return We&&Yr(h,P),k}for(E=r(h,E);!R.done;P++,R=g.next())R=x(E,h,P,R.value,C),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?P:R.key),v=i(R,v,P),$===null?k=R:$.sibling=R,$=R);return e&&E.forEach(function(A){return t(h,A)}),We&&Yr(h,P),k}function w(h,v,g,C){if(typeof g=="object"&&g!==null&&g.type===Bo&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case fa:e:{for(var k=g.key,$=v;$!==null;){if($.key===k){if(k=g.type,k===Bo){if($.tag===7){n(h,$.sibling),v=o($,g.props.children),v.return=h,h=v;break e}}else if($.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Er&&ih(k)===$.type){n(h,$.sibling),v=o($,g.props),v.ref=Fi(h,$,g),v.return=h,h=v;break e}n(h,$);break}else t(h,$);$=$.sibling}g.type===Bo?(v=so(g.props.children,h.mode,C,g.key),v.return=h,h=v):(C=Ja(g.type,g.key,g.props,null,h.mode,C),C.ref=Fi(h,v,g),C.return=h,h=C)}return s(h);case zo:e:{for($=g.key;v!==null;){if(v.key===$)if(v.tag===4&&v.stateNode.containerInfo===g.containerInfo&&v.stateNode.implementation===g.implementation){n(h,v.sibling),v=o(v,g.children||[]),v.return=h,h=v;break e}else{n(h,v);break}else t(h,v);v=v.sibling}v=Mu(g,h.mode,C),v.return=h,h=v}return s(h);case Er:return $=g._init,w(h,v,$(g._payload),C)}if(es(g))return b(h,v,g,C);if(Ai(g))return y(h,v,g,C);ka(h,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,v!==null&&v.tag===6?(n(h,v.sibling),v=o(v,g),v.return=h,h=v):(n(h,v),v=Tu(g,h.mode,C),v.return=h,h=v),s(h)):n(h,v)}return w}var ci=Py(!0),Ry=Py(!1),wl=Hr(null),kl=null,Go=null,Ip=null;function Np(){Ip=Go=kl=null}function Ap(e){var t=wl.current;ze(wl),e._currentValue=t}function Pd(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ti(e,t){kl=e,Ip=Go=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Wt=!0),e.firstContext=null)}function kn(e){var t=e._currentValue;if(Ip!==e)if(e={context:e,memoizedValue:t,next:null},Go===null){if(kl===null)throw Error(F(308));Go=e,kl.dependencies={lanes:0,firstContext:e}}else Go=Go.next=e;return t}var eo=null;function Lp(e){eo===null?eo=[e]:eo.push(e)}function Ty(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Lp(t)):(n.next=o.next,o.next=n),t.interleaved=n,fr(e,r)}function fr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $r=!1;function zp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function My(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function cr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Lr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Se&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,fr(e,n)}return o=r.interleaved,o===null?(t.next=t,Lp(r)):(t.next=o.next,o.next=t),r.interleaved=t,fr(e,n)}function Ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wp(e,n)}}function sh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function El(e,t,n,r){var o=e.updateQueue;$r=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var p=o.baseState;s=0,u=c=l=null,a=i;do{var f=a.lane,x=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var b=e,y=a;switch(f=t,x=n,y.tag){case 1:if(b=y.payload,typeof b=="function"){p=b.call(x,p,f);break e}p=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=y.payload,f=typeof b=="function"?b.call(x,p,f):b,f==null)break e;p=He({},p,f);break e;case 2:$r=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else x={eventTime:x,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=x,l=p):u=u.next=x,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(1);if(u===null&&(l=p),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);mo|=s,e.lanes=s,e.memoizedState=p}}function ah(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ku.transition;ku.transition={};try{e(!1),t()}finally{Me=n,ku.transition=r}}function Gy(){return En().memoizedState}function XS(e,t,n){var r=Br(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},qy(e))Yy(t,n);else if(n=Ty(e,t,n,r),n!==null){var o=It();Bn(n,e,r,o),Xy(n,t,r)}}function QS(e,t,n){var r=Br(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(qy(e))Yy(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Fn(a,s)){var l=t.interleaved;l===null?(o.next=o,Lp(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Ty(e,t,o,r),n!==null&&(o=It(),Bn(n,e,r,o),Xy(n,t,r))}}function qy(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Yy(e,t){cs=Pl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wp(e,n)}}var Rl={readContext:kn,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useInsertionEffect:kt,useLayoutEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useMutableSource:kt,useSyncExternalStore:kt,useId:kt,unstable_isNewReconciler:!1},ZS={readContext:kn,useCallback:function(e,t){return Un().memoizedState=[e,t===void 0?null:t],e},useContext:kn,useEffect:ch,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ya(4194308,4,Wy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ya(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ya(4,2,e,t)},useMemo:function(e,t){var n=Un();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Un();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=XS.bind(null,Ve,e),[r.memoizedState,e]},useRef:function(e){var t=Un();return e={current:e},t.memoizedState=e},useState:lh,useDebugValue:Kp,useDeferredValue:function(e){return Un().memoizedState=e},useTransition:function(){var e=lh(!1),t=e[0];return e=YS.bind(null,e[1]),Un().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ve,o=Un();if(We){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),mt===null)throw Error(F(349));fo&30||Iy(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,ch(Ay.bind(null,r,i,e),[e]),r.flags|=2048,As(9,Ny.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Un(),t=mt.identifierPrefix;if(We){var n=ar,r=sr;n=(r&~(1<<32-zn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Is++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Kn]=t,e[js]=r,s0(e,t,!1,!1),t.stateNode=e;e:{switch(s=cd(n,r),n){case"dialog":Ae("cancel",e),Ae("close",e),o=r;break;case"iframe":case"object":case"embed":Ae("load",e),o=r;break;case"video":case"audio":for(o=0;opi&&(t.flags|=128,r=!0,Wi(i,!1),t.lanes=4194304)}else{if(!r)if(e=$l(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!We)return Et(t),null}else 2*Ze()-i.renderingStartTime>pi&&n!==1073741824&&(t.flags|=128,r=!0,Wi(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ze(),t.sibling=null,n=Ue.current,Ne(Ue,r?n&1|2:n&1),t):(Et(t),null);case 22:case 23:return Zp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Zt&1073741824&&(Et(t),t.subtreeFlags&6&&(t.flags|=8192)):Et(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function sC(e,t){switch(Op(t),t.tag){case 1:return Vt(t.type)&&xl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ui(),ze(Ut),ze(Mt),Fp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Dp(t),null;case 13:if(ze(Ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(Ue),null;case 4:return ui(),null;case 10:return Ap(t.type._context),null;case 22:case 23:return Zp(),null;case 24:return null;default:return null}}var $a=!1,Rt=!1,aC=typeof WeakSet=="function"?WeakSet:Set,G=null;function qo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function Ad(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var bh=!1;function lC(e,t){if(xd=hl,e=fy(),Mp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,p=e,f=null;t:for(;;){for(var x;p!==n||o!==0&&p.nodeType!==3||(a=s+o),p!==i||r!==0&&p.nodeType!==3||(l=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(x=p.firstChild)!==null;)f=p,p=x;for(;;){if(p===e)break t;if(f===n&&++c===o&&(a=s),f===i&&++u===r&&(l=s),(x=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=x}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(bd={focusedElem:e,selectionRange:n},hl=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var y=b.memoizedProps,w=b.memoizedState,h=t.stateNode,v=h.getSnapshotBeforeUpdate(t.elementType===t.type?y:Nn(t.type,y),w);h.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(C){Qe(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return b=bh,bh=!1,b}function us(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Ad(t,n,i)}o=o.next}while(o!==r)}}function oc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ld(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function c0(e){var t=e.alternate;t!==null&&(e.alternate=null,c0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kn],delete t[js],delete t[wd],delete t[VS],delete t[HS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function u0(e){return e.tag===5||e.tag===3||e.tag===4}function Sh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||u0(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yl));else if(r!==4&&(e=e.child,e!==null))for(zd(e,t,n),e=e.sibling;e!==null;)zd(e,t,n),e=e.sibling}function Bd(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&&(e=e.child,e!==null))for(Bd(e,t,n),e=e.sibling;e!==null;)Bd(e,t,n),e=e.sibling}var bt=null,An=!1;function br(e,t,n){for(n=n.child;n!==null;)d0(e,t,n),n=n.sibling}function d0(e,t,n){if(qn&&typeof qn.onCommitFiberUnmount=="function")try{qn.onCommitFiberUnmount(Xl,n)}catch{}switch(n.tag){case 5:Rt||qo(n,t);case 6:var r=bt,o=An;bt=null,br(e,t,n),bt=r,An=o,bt!==null&&(An?(e=bt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):bt.removeChild(n.stateNode));break;case 18:bt!==null&&(An?(e=bt,n=n.stateNode,e.nodeType===8?Su(e.parentNode,n):e.nodeType===1&&Su(e,n),$s(e)):Su(bt,n.stateNode));break;case 4:r=bt,o=An,bt=n.stateNode.containerInfo,An=!0,br(e,t,n),bt=r,An=o;break;case 0:case 11:case 14:case 15:if(!Rt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Ad(n,t,s),o=o.next}while(o!==r)}br(e,t,n);break;case 1:if(!Rt&&(qo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Qe(n,t,a)}br(e,t,n);break;case 21:br(e,t,n);break;case 22:n.mode&1?(Rt=(r=Rt)||n.memoizedState!==null,br(e,t,n),Rt=r):br(e,t,n);break;default:br(e,t,n)}}function Ch(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new aC),t.forEach(function(r){var o=gC.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function In(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Ze()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*uC(r/1960))-r,10e?16:e,Mr===null)var r=!1;else{if(e=Mr,Mr=null,jl=0,Se&6)throw Error(F(331));var o=Se;for(Se|=4,G=e.current;G!==null;){var i=G,s=i.child;if(G.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lZe()-Xp?io(e,0):Yp|=n),Ht(e,t)}function x0(e,t){t===0&&(e.mode&1?(t=ga,ga<<=1,!(ga&130023424)&&(ga=4194304)):t=1);var n=It();e=fr(e,t),e!==null&&(Qs(e,t,n),Ht(e,n))}function vC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),x0(e,n)}function gC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),x0(e,n)}var b0;b0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ut.current)Wt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Wt=!1,oC(e,t,n);Wt=!!(e.flags&131072)}else Wt=!1,We&&t.flags&1048576&&ky(t,Cl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Xa(e,t),e=t.pendingProps;var o=ai(t,Mt.current);ti(t,n),o=Up(null,t,r,e,o,n);var i=Vp();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Vt(r)?(i=!0,bl(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,zp(t),o.updater=rc,t.stateNode=o,o._reactInternals=t,Td(t,r,e,n),t=Od(null,t,r,!0,i,n)):(t.tag=0,We&&i&&jp(t),_t(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Xa(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=xC(r),e=Nn(r,e),o){case 0:t=jd(null,t,r,e,n);break e;case 1:t=gh(null,t,r,e,n);break e;case 11:t=hh(null,t,r,e,n);break e;case 14:t=vh(null,t,r,Nn(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nn(r,o),jd(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nn(r,o),gh(e,t,r,o,n);case 3:e:{if(r0(t),e===null)throw Error(F(387));r=t.pendingProps,i=t.memoizedState,o=i.element,My(e,t),El(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=di(Error(F(423)),t),t=yh(e,t,r,n,o);break e}else if(r!==o){o=di(Error(F(424)),t),t=yh(e,t,r,n,o);break e}else for(en=Ar(t.stateNode.containerInfo.firstChild),tn=t,We=!0,Ln=null,n=Ry(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(li(),r===o){t=mr(e,t,n);break e}_t(e,t,r,n)}t=t.child}return t;case 5:return jy(t),e===null&&$d(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Sd(r,o)?s=null:i!==null&&Sd(r,i)&&(t.flags|=32),n0(e,t),_t(e,t,s,n),t.child;case 6:return e===null&&$d(t),null;case 13:return o0(e,t,n);case 4:return Bp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ci(t,null,r,n):_t(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nn(r,o),hh(e,t,r,o,n);case 7:return _t(e,t,t.pendingProps,n),t.child;case 8:return _t(e,t,t.pendingProps.children,n),t.child;case 12:return _t(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Ne(wl,r._currentValue),r._currentValue=s,i!==null)if(Fn(i.value,s)){if(i.children===o.children&&!Ut.current){t=mr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=cr(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Pd(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(F(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Pd(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}_t(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ti(t,n),o=kn(o),r=r(o),t.flags|=1,_t(e,t,r,n),t.child;case 14:return r=t.type,o=Nn(r,t.pendingProps),o=Nn(r.type,o),vh(e,t,r,o,n);case 15:return e0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nn(r,o),Xa(e,t),t.tag=1,Vt(r)?(e=!0,bl(t)):e=!1,ti(t,n),Qy(t,r,o),Td(t,r,o,n),Od(null,t,r,!0,e,n);case 19:return i0(e,t,n);case 22:return t0(e,t,n)}throw Error(F(156,t.tag))};function S0(e,t){return qg(e,t)}function yC(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.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 bn(e,t,n,r){return new yC(e,t,n,r)}function ef(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xC(e){if(typeof e=="function")return ef(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xp)return 11;if(e===bp)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=bn(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&14680064,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}function Ja(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")ef(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Bo:return so(n.children,o,i,t);case yp:s=8,o|=8;break;case Ju:return e=bn(12,n,t,o|2),e.elementType=Ju,e.lanes=i,e;case ed:return e=bn(13,n,t,o),e.elementType=ed,e.lanes=i,e;case td:return e=bn(19,n,t,o),e.elementType=td,e.lanes=i,e;case jg:return sc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Tg:s=10;break e;case Mg:s=9;break e;case xp:s=11;break e;case bp:s=14;break e;case Er:s=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=bn(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function so(e,t,n,r){return e=bn(7,e,r,t),e.lanes=n,e}function sc(e,t,n,r){return e=bn(22,e,r,t),e.elementType=jg,e.lanes=n,e.stateNode={isHidden:!1},e}function Tu(e,t,n){return e=bn(6,e,null,t),e.lanes=n,e}function Mu(e,t,n){return t=bn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bC(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=uu(0),this.expirationTimes=uu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uu(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function tf(e,t,n,r,o,i,s,a,l){return e=new bC(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=bn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zp(i),e}function SC(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(E0)}catch(e){console.error(e)}}E0(),Eg.exports=an;var sf=Eg.exports;const Ta=up(sf);var Mh=sf;Qu.createRoot=Mh.createRoot,Qu.hydrateRoot=Mh.hydrateRoot;function vo(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n0?St(Ei,--qt):0,mi--,rt===10&&(mi=1,pc--),rt}function nn(){return rt=qt2||Bs(rt)>3?"":" "}function FC(e,t){for(;--t&&nn()&&!(rt<48||rt>102||rt>57&&rt<65||rt>70&&rt<97););return ta(e,el()+(t<6&&Xn()==32&&nn()==32))}function Hd(e){for(;nn();)switch(rt){case e:return qt;case 34:case 39:e!==34&&e!==39&&Hd(rt);break;case 40:e===41&&Hd(e);break;case 92:nn();break}return qt}function WC(e,t){for(;nn()&&e+rt!==47+10;)if(e+rt===42+42&&Xn()===47)break;return"/*"+ta(t,qt-1)+"*"+dc(e===47?e:nn())}function UC(e){for(;!Bs(Xn());)nn();return ta(e,qt)}function VC(e){return j0(nl("",null,null,null,[""],e=M0(e),0,[0],e))}function nl(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,p=s,f=0,x=0,b=0,y=1,w=1,h=1,v=0,g="",C=o,k=i,$=r,E=g;w;)switch(b=v,v=nn()){case 40:if(b!=108&&St(E,p-1)==58){Vd(E+=$e(tl(v),"&","&\f"),"&\f")!=-1&&(h=-1);break}case 34:case 39:case 91:E+=tl(v);break;case 9:case 10:case 13:case 32:E+=DC(b);break;case 92:E+=FC(el()-1,7);continue;case 47:switch(Xn()){case 42:case 47:Ma(HC(WC(nn(),el()),t,n),l);break;default:E+="/"}break;case 123*y:a[c++]=Vn(E)*h;case 125*y:case 59:case 0:switch(v){case 0:case 125:w=0;case 59+u:h==-1&&(E=$e(E,/\f/g,"")),x>0&&Vn(E)-p&&Ma(x>32?Oh(E+";",r,n,p-1):Oh($e(E," ","")+";",r,n,p-2),l);break;case 59:E+=";";default:if(Ma($=jh(E,t,n,c,u,o,a,g,C=[],k=[],p),i),v===123)if(u===0)nl(E,t,$,$,C,i,p,a,k);else switch(f===99&&St(E,3)===110?100:f){case 100:case 108:case 109:case 115:nl(e,$,$,r&&Ma(jh(e,$,$,0,0,o,a,g,o,C=[],p),k),o,k,p,a,r?C:k);break;default:nl(E,$,$,$,[""],k,0,a,k)}}c=u=x=0,y=h=1,g=E="",p=s;break;case 58:p=1+Vn(E),x=b;default:if(y<1){if(v==123)--y;else if(v==125&&y++==0&&BC()==125)continue}switch(E+=dc(v),v*y){case 38:h=u>0?1:(E+="\f",-1);break;case 44:a[c++]=(Vn(E)-1)*h,h=1;break;case 64:Xn()===45&&(E+=tl(nn())),f=Xn(),u=p=Vn(g=E+=UC(el())),v++;break;case 45:b===45&&Vn(E)==2&&(y=0)}}return i}function jh(e,t,n,r,o,i,s,a,l,c,u){for(var p=o-1,f=o===0?i:[""],x=cf(f),b=0,y=0,w=0;b0?f[h]+" "+v:$e(v,/&\f/g,f[h])))&&(l[w++]=g);return fc(e,t,n,o===0?af:a,l,c,u)}function HC(e,t,n){return fc(e,t,n,$0,dc(zC()),zs(e,2,-2),0)}function Oh(e,t,n,r){return fc(e,t,n,lf,zs(e,0,r),zs(e,r+1,-1),r)}function ri(e,t){for(var n="",r=cf(e),o=0;o6)switch(St(e,t+1)){case 109:if(St(e,t+4)!==45)break;case 102:return $e(e,/(.+:)(.+)-([^]+)/,"$1"+Ee+"$2-$3$1"+Il+(St(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Vd(e,"stretch")?_0($e(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(St(e,t+1)!==115)break;case 6444:switch(St(e,Vn(e)-3-(~Vd(e,"!important")&&10))){case 107:return $e(e,":",":"+Ee)+e;case 101:return $e(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ee+(St(e,14)===45?"inline-":"")+"box$3$1"+Ee+"$2$3$1"+$t+"$2box$3")+e}break;case 5936:switch(St(e,t+11)){case 114:return Ee+e+$t+$e(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ee+e+$t+$e(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ee+e+$t+$e(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ee+e+$t+e+e}return e}var ew=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case lf:t.return=_0(t.value,t.length);break;case P0:return ri([Vi(t,{value:$e(t.value,"@","@"+Ee)})],o);case af:if(t.length)return LC(t.props,function(i){switch(AC(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ri([Vi(t,{props:[$e(i,/:(read-\w+)/,":"+Il+"$1")]})],o);case"::placeholder":return ri([Vi(t,{props:[$e(i,/:(plac\w+)/,":"+Ee+"input-$1")]}),Vi(t,{props:[$e(i,/:(plac\w+)/,":"+Il+"$1")]}),Vi(t,{props:[$e(i,/:(plac\w+)/,$t+"input-$1")]})],o)}return""})}},tw=[ew],I0=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var w=y.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||tw,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var w=y.getAttribute("data-emotion").split(" "),h=1;h=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var pw={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},fw=!1,mw=/[A-Z]|^ms/g,hw=/_EMO_([^_]+?)_([^]*?)_EMO_/g,D0=function(t){return t.charCodeAt(1)===45},Ih=function(t){return t!=null&&typeof t!="boolean"},ju=O0(function(e){return D0(e)?e:e.replace(mw,"-$&").toLowerCase()}),Nh=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(hw,function(r,o,i){return Hn={name:o,styles:i,next:Hn},o})}return pw[t]!==1&&!D0(t)&&typeof n=="number"&&n!==0?n+"px":n},vw="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ds(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Hn={name:o.name,styles:o.styles,next:Hn},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)Hn={name:s.name,styles:s.styles,next:Hn},s=s.next;var a=i.styles+";";return a}return gw(e,t,n)}case"function":{if(e!==void 0){var l=Hn,c=n(e);return Hn=l,Ds(e,t,c)}break}}var u=n;if(t==null)return u;var p=t[u];return p!==void 0?p:u}function gw(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o96?Tw:Mw},Fh=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},jw=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return ff(n,r,o),W0(function(){return mf(n,r,o)}),null},Ow=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,s;n!==void 0&&(i=n.label,s=n.target);var a=Fh(t,n,r),l=a||Dh(o),c=!l("as");return function(){var u=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&p.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)p.push.apply(p,u);else{var f=u[0];p.push(f[0]);for(var x=u.length,b=1;bt(Nw(o)?n:o):t;return d.jsx(Ew,{styles:r})}/** + * @mui/styled-engine v5.16.14 + * + * @license MIT + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function gf(e,t){return Gd(e,t)}const K0=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Aw=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:H0,StyledEngineProvider:Iw,ThemeContext:$i,css:Ec,default:gf,internal_processStyles:K0,keyframes:Pi},Symbol.toStringTag,{value:"Module"}));function ir(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function G0(e){if(m.isValidElement(e)||!ir(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=G0(e[n])}),t}function Nt(e,t,n={clone:!0}){const r=n.clone?S({},e):e;return ir(e)&&ir(t)&&Object.keys(t).forEach(o=>{m.isValidElement(t[o])?r[o]=t[o]:ir(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&ir(e[o])?r[o]=Nt(e[o],t[o],n):n.clone?r[o]=ir(t[o])?G0(t[o]):t[o]:r[o]=t[o]}),r}const Lw=Object.freeze(Object.defineProperty({__proto__:null,default:Nt,isPlainObject:ir},Symbol.toStringTag,{value:"Module"})),zw=["values","unit","step"],Bw=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>S({},n,{[r.key]:r.val}),{})};function q0(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=U(e,zw),i=Bw(t),s=Object.keys(i);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,x){const b=s.indexOf(x);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(b!==-1&&typeof t[s[b]]=="number"?t[s[b]]:x)-r/100}${n})`}function u(f){return s.indexOf(f)+1`@media (min-width:${yf[e]}px)`};function Yt(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||Wh;return t.reduce((s,a,l)=>(s[i.up(i.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const i=r.breakpoints||Wh;return Object.keys(t).reduce((s,a)=>{if(Object.keys(i.values||yf).indexOf(a)!==-1){const l=i.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function Y0(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function X0(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Ww(e,...t){const n=Y0(e),r=[n,...t].reduce((o,i)=>Nt(o,i),{});return X0(Object.keys(n),r)}function Uw(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function ao({values:e,breakpoints:t,base:n}){const r=n||Uw(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((s,a,l)=>(Array.isArray(e)?(s[a]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[i],i=a):s[a]=e,s),{})}function z(e){if(typeof e!="string")throw new Error(vo(7));return e.charAt(0).toUpperCase()+e.slice(1)}const Vw=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"}));function $c(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Nl(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=$c(e,n)||r,t&&(o=t(o,r,e)),o}function et(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,c=$c(l,r)||{};return Yt(s,a,p=>{let f=Nl(c,o,p);return p===f&&typeof p=="string"&&(f=Nl(c,o,`${t}${p==="default"?"":z(p)}`,p)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function Hw(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Kw={m:"margin",p:"padding"},Gw={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Uh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},qw=Hw(e=>{if(e.length>2)if(Uh[e])e=Uh[e];else return[e];const[t,n]=e.split(""),r=Kw[t],o=Gw[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),xf=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],bf=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...xf,...bf];function na(e,t,n,r){var o;const i=(o=$c(e,t,!1))!=null?o:n;return typeof i=="number"?s=>typeof s=="string"?s:i*s:Array.isArray(i)?s=>typeof s=="string"?s:i[s]:typeof i=="function"?i:()=>{}}function Sf(e){return na(e,"spacing",8)}function go(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function Yw(e,t){return n=>e.reduce((r,o)=>(r[o]=go(t,n),r),{})}function Xw(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=qw(n),i=Yw(o,r),s=e[n];return Yt(e,s,i)}function Q0(e,t){const n=Sf(e.theme);return Object.keys(e).map(r=>Xw(e,t,r,n)).reduce(fs,{})}function Ye(e){return Q0(e,xf)}Ye.propTypes={};Ye.filterProps=xf;function Xe(e){return Q0(e,bf)}Xe.propTypes={};Xe.filterProps=bf;function Qw(e=8){if(e.mui)return e;const t=Sf({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(i=>{const s=t(i);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function Pc(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?fs(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function vn(e){return typeof e!="number"?e:`${e}px solid`}function Mn(e,t){return et({prop:e,themeKey:"borders",transform:t})}const Zw=Mn("border",vn),Jw=Mn("borderTop",vn),ek=Mn("borderRight",vn),tk=Mn("borderBottom",vn),nk=Mn("borderLeft",vn),rk=Mn("borderColor"),ok=Mn("borderTopColor"),ik=Mn("borderRightColor"),sk=Mn("borderBottomColor"),ak=Mn("borderLeftColor"),lk=Mn("outline",vn),ck=Mn("outlineColor"),Rc=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=na(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:go(t,r)});return Yt(e,e.borderRadius,n)}return null};Rc.propTypes={};Rc.filterProps=["borderRadius"];Pc(Zw,Jw,ek,tk,nk,rk,ok,ik,sk,ak,Rc,lk,ck);const Tc=e=>{if(e.gap!==void 0&&e.gap!==null){const t=na(e.theme,"spacing",8),n=r=>({gap:go(t,r)});return Yt(e,e.gap,n)}return null};Tc.propTypes={};Tc.filterProps=["gap"];const Mc=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=na(e.theme,"spacing",8),n=r=>({columnGap:go(t,r)});return Yt(e,e.columnGap,n)}return null};Mc.propTypes={};Mc.filterProps=["columnGap"];const jc=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=na(e.theme,"spacing",8),n=r=>({rowGap:go(t,r)});return Yt(e,e.rowGap,n)}return null};jc.propTypes={};jc.filterProps=["rowGap"];const uk=et({prop:"gridColumn"}),dk=et({prop:"gridRow"}),pk=et({prop:"gridAutoFlow"}),fk=et({prop:"gridAutoColumns"}),mk=et({prop:"gridAutoRows"}),hk=et({prop:"gridTemplateColumns"}),vk=et({prop:"gridTemplateRows"}),gk=et({prop:"gridTemplateAreas"}),yk=et({prop:"gridArea"});Pc(Tc,Mc,jc,uk,dk,pk,fk,mk,hk,vk,gk,yk);function oi(e,t){return t==="grey"?t:e}const xk=et({prop:"color",themeKey:"palette",transform:oi}),bk=et({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:oi}),Sk=et({prop:"backgroundColor",themeKey:"palette",transform:oi});Pc(xk,bk,Sk);function Jt(e){return e<=1&&e!==0?`${e*100}%`:e}const Ck=et({prop:"width",transform:Jt}),Cf=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o;const i=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||yf[n];return i?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Jt(n)}};return Yt(e,e.maxWidth,t)}return null};Cf.filterProps=["maxWidth"];const wk=et({prop:"minWidth",transform:Jt}),kk=et({prop:"height",transform:Jt}),Ek=et({prop:"maxHeight",transform:Jt}),$k=et({prop:"minHeight",transform:Jt});et({prop:"size",cssProperty:"width",transform:Jt});et({prop:"size",cssProperty:"height",transform:Jt});const Pk=et({prop:"boxSizing"});Pc(Ck,Cf,wk,kk,Ek,$k,Pk);const Rk={border:{themeKey:"borders",transform:vn},borderTop:{themeKey:"borders",transform:vn},borderRight:{themeKey:"borders",transform:vn},borderBottom:{themeKey:"borders",transform:vn},borderLeft:{themeKey:"borders",transform:vn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:vn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Rc},color:{themeKey:"palette",transform:oi},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:oi},backgroundColor:{themeKey:"palette",transform:oi},p:{style:Xe},pt:{style:Xe},pr:{style:Xe},pb:{style:Xe},pl:{style:Xe},px:{style:Xe},py:{style:Xe},padding:{style:Xe},paddingTop:{style:Xe},paddingRight:{style:Xe},paddingBottom:{style:Xe},paddingLeft:{style:Xe},paddingX:{style:Xe},paddingY:{style:Xe},paddingInline:{style:Xe},paddingInlineStart:{style:Xe},paddingInlineEnd:{style:Xe},paddingBlock:{style:Xe},paddingBlockStart:{style:Xe},paddingBlockEnd:{style:Xe},m:{style:Ye},mt:{style:Ye},mr:{style:Ye},mb:{style:Ye},ml:{style:Ye},mx:{style:Ye},my:{style:Ye},margin:{style:Ye},marginTop:{style:Ye},marginRight:{style:Ye},marginBottom:{style:Ye},marginLeft:{style:Ye},marginX:{style:Ye},marginY:{style:Ye},marginInline:{style:Ye},marginInlineStart:{style:Ye},marginInlineEnd:{style:Ye},marginBlock:{style:Ye},marginBlockStart:{style:Ye},marginBlockEnd:{style:Ye},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Tc},rowGap:{style:jc},columnGap:{style:Mc},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Jt},maxWidth:{style:Cf},minWidth:{transform:Jt},height:{transform:Jt},maxHeight:{transform:Jt},minHeight:{transform:Jt},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},ra=Rk;function Tk(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Mk(e,t){return typeof e=="function"?e(t):e}function Z0(){function e(n,r,o,i){const s={[n]:r,theme:o},a=i[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:p}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=$c(o,c)||{};return p?p(s):Yt(s,r,b=>{let y=Nl(f,u,b);return b===y&&typeof b=="string"&&(y=Nl(f,u,`${n}${b==="default"?"":z(b)}`,b)),l===!1?y:{[l]:y}})}function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const s=(r=i.unstable_sxConfig)!=null?r:ra;function a(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=Y0(i.breakpoints),p=Object.keys(u);let f=u;return Object.keys(c).forEach(x=>{const b=Mk(c[x],i);if(b!=null)if(typeof b=="object")if(s[x])f=fs(f,e(x,b,i,s));else{const y=Yt({theme:i},b,w=>({[x]:w}));Tk(y,b)?f[x]=t({sx:b,theme:i}):f=fs(f,y)}else f=fs(f,e(x,b,i,s))}),X0(p,f)}return Array.isArray(o)?o.map(a):a(o)}return t}const J0=Z0();J0.filterProps=["sx"];const oa=J0;function ex(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const jk=["breakpoints","palette","spacing","shape"];function Ri(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,s=U(e,jk),a=q0(n),l=Qw(o);let c=Nt({breakpoints:a,direction:"ltr",components:{},palette:S({mode:"light"},r),spacing:l,shape:S({},Fw,i)},s);return c.applyStyles=ex,c=t.reduce((u,p)=>Nt(u,p),c),c.unstable_sxConfig=S({},ra,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(p){return oa({sx:p,theme:this})},c}const Ok=Object.freeze(Object.defineProperty({__proto__:null,default:Ri,private_createBreakpoints:q0,unstable_applyStyles:ex},Symbol.toStringTag,{value:"Module"}));function _k(e){return Object.keys(e).length===0}function tx(e=null){const t=m.useContext($i);return!t||_k(t)?e:t}const Ik=Ri();function Oc(e=Ik){return tx(e)}function Nk({styles:e,themeId:t,defaultTheme:n={}}){const r=Oc(n),o=typeof e=="function"?e(t&&r[t]||r):e;return d.jsx(H0,{styles:o})}const Ak=["sx"],Lk=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:ra;return Object.keys(e).forEach(i=>{o[i]?r.systemProps[i]=e[i]:r.otherProps[i]=e[i]}),r};function ia(e){const{sx:t}=e,n=U(e,Ak),{systemProps:r,otherProps:o}=Lk(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...s)=>{const a=t(...s);return ir(a)?S({},r,a):r}:i=S({},r,t),S({},o,{sx:i})}const zk=Object.freeze(Object.defineProperty({__proto__:null,default:oa,extendSxProp:ia,unstable_createStyleFunctionSx:Z0,unstable_defaultSxConfig:ra},Symbol.toStringTag,{value:"Module"})),Vh=e=>e,Bk=()=>{let e=Vh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Vh}}},Dk=Bk(),wf=Dk;function nx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ta!=="theme"&&a!=="sx"&&a!=="as"})(oa);return m.forwardRef(function(l,c){const u=Oc(n),p=ia(l),{className:f,component:x="div"}=p,b=U(p,Fk);return d.jsx(i,S({as:x,ref:c,className:V(f,o?o(r):r),theme:t&&u[t]||u},b))})}const Uk={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function te(e,t,n="Mui"){const r=Uk[t];return r?`${n}-${r}`:`${wf.generate(e)}-${t}`}function ne(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=te(e,o,n)}),r}var rx={exports:{}},Ie={};/** + * @license React + * react-is.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var kf=Symbol.for("react.transitional.element"),Ef=Symbol.for("react.portal"),_c=Symbol.for("react.fragment"),Ic=Symbol.for("react.strict_mode"),Nc=Symbol.for("react.profiler"),Ac=Symbol.for("react.consumer"),Lc=Symbol.for("react.context"),zc=Symbol.for("react.forward_ref"),Bc=Symbol.for("react.suspense"),Dc=Symbol.for("react.suspense_list"),Fc=Symbol.for("react.memo"),Wc=Symbol.for("react.lazy"),Vk=Symbol.for("react.view_transition"),Hk=Symbol.for("react.client.reference");function jn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case kf:switch(e=e.type,e){case _c:case Nc:case Ic:case Bc:case Dc:case Vk:return e;default:switch(e=e&&e.$$typeof,e){case Lc:case zc:case Wc:case Fc:return e;case Ac:return e;default:return t}}case Ef:return t}}}Ie.ContextConsumer=Ac;Ie.ContextProvider=Lc;Ie.Element=kf;Ie.ForwardRef=zc;Ie.Fragment=_c;Ie.Lazy=Wc;Ie.Memo=Fc;Ie.Portal=Ef;Ie.Profiler=Nc;Ie.StrictMode=Ic;Ie.Suspense=Bc;Ie.SuspenseList=Dc;Ie.isContextConsumer=function(e){return jn(e)===Ac};Ie.isContextProvider=function(e){return jn(e)===Lc};Ie.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===kf};Ie.isForwardRef=function(e){return jn(e)===zc};Ie.isFragment=function(e){return jn(e)===_c};Ie.isLazy=function(e){return jn(e)===Wc};Ie.isMemo=function(e){return jn(e)===Fc};Ie.isPortal=function(e){return jn(e)===Ef};Ie.isProfiler=function(e){return jn(e)===Nc};Ie.isStrictMode=function(e){return jn(e)===Ic};Ie.isSuspense=function(e){return jn(e)===Bc};Ie.isSuspenseList=function(e){return jn(e)===Dc};Ie.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===_c||e===Nc||e===Ic||e===Bc||e===Dc||typeof e=="object"&&e!==null&&(e.$$typeof===Wc||e.$$typeof===Fc||e.$$typeof===Lc||e.$$typeof===Ac||e.$$typeof===zc||e.$$typeof===Hk||e.getModuleId!==void 0)};Ie.typeOf=jn;rx.exports=Ie;var Hh=rx.exports;const Kk=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function ox(e){const t=`${e}`.match(Kk);return t&&t[1]||""}function ix(e,t=""){return e.displayName||e.name||ox(e)||t}function Kh(e,t,n){const r=ix(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function Gk(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return ix(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Hh.ForwardRef:return Kh(e,e.render,"ForwardRef");case Hh.Memo:return Kh(e,e.type,"memo");default:return}}}const qk=Object.freeze(Object.defineProperty({__proto__:null,default:Gk,getFunctionName:ox},Symbol.toStringTag,{value:"Module"})),Yk=["ownerState"],Xk=["variants"],Qk=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Zk(e){return Object.keys(e).length===0}function Jk(e){return typeof e=="string"&&e.charCodeAt(0)>96}function _u(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const e2=Ri(),t2=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function ja({defaultTheme:e,theme:t,themeId:n}){return Zk(t)?e:t[n]||t}function n2(e){return e?(t,n)=>n[e]:null}function rl(e,t){let{ownerState:n}=t,r=U(t,Yk);const o=typeof e=="function"?e(S({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>rl(i,S({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let a=U(o,Xk);return i.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(S({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style(S({ownerState:n},r,n)):l.style))}),a}return o}function r2(e={}){const{themeId:t,defaultTheme:n=e2,rootShouldForwardProp:r=_u,slotShouldForwardProp:o=_u}=e,i=s=>oa(S({},s,{theme:ja(S({},s,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(s,a={})=>{K0(s,k=>k.filter($=>!($!=null&&$.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:p,overridesResolver:f=n2(t2(c))}=a,x=U(a,Qk),b=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,y=p||!1;let w,h=_u;c==="Root"||c==="root"?h=r:c?h=o:Jk(s)&&(h=void 0);const v=gf(s,S({shouldForwardProp:h,label:w},x)),g=k=>typeof k=="function"&&k.__emotion_real!==k||ir(k)?$=>rl(k,S({},$,{theme:ja({theme:$.theme,defaultTheme:n,themeId:t})})):k,C=(k,...$)=>{let E=g(k);const P=$?$.map(g):[];l&&f&&P.push(j=>{const A=ja(S({},j,{defaultTheme:n,themeId:t}));if(!A.components||!A.components[l]||!A.components[l].styleOverrides)return null;const M=A.components[l].styleOverrides,O={};return Object.entries(M).forEach(([N,L])=>{O[N]=rl(L,S({},j,{theme:A}))}),f(j,O)}),l&&!b&&P.push(j=>{var A;const M=ja(S({},j,{defaultTheme:n,themeId:t})),O=M==null||(A=M.components)==null||(A=A[l])==null?void 0:A.variants;return rl({variants:O},S({},j,{theme:M}))}),y||P.push(i);const _=P.length-$.length;if(Array.isArray(k)&&_>0){const j=new Array(_).fill("");E=[...k,...j],E.raw=[...k.raw,...j]}const R=v(E,...P);return s.muiName&&(R.muiName=s.muiName),R};return v.withConfig&&(C.withConfig=v.withConfig),C}}const o2=r2(),sx=o2;function Fs(e,t){const n=S({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=S({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},!i||!Object.keys(i)?n[r]=o:!o||!Object.keys(o)?n[r]=i:(n[r]=S({},i),Object.keys(o).forEach(s=>{n[r][s]=Fs(o[s],i[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function i2(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Fs(t.components[n].defaultProps,r)}function ax({props:e,name:t,defaultTheme:n,themeId:r}){let o=Oc(n);return r&&(o=o[r]||o),i2({theme:o,name:t,props:e})}const s2=typeof window<"u"?m.useLayoutEffect:m.useEffect,on=s2;function a2(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const l2=Object.freeze(Object.defineProperty({__proto__:null,default:a2},Symbol.toStringTag,{value:"Module"}));function Yd(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function sa(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function c2(e,t){return()=>null}function ms(e,t){var n,r;return m.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function it(e){return e&&e.ownerDocument||document}function Zn(e){return it(e).defaultView||window}function u2(e,t){return()=>null}function Al(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let Gh=0;function d2(e){const[t,n]=m.useState(e),r=e||t;return m.useEffect(()=>{t==null&&(Gh+=1,n(`mui-${Gh}`))},[t]),r}const qh=cl["useId".toString()];function aa(e){if(qh!==void 0){const t=qh();return e??t}return d2(e)}function p2(e,t,n,r,o){return null}function Ws({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=m.useRef(e!==void 0),[i,s]=m.useState(t),a=o?e:i,l=m.useCallback(c=>{o||s(c)},[]);return[a,l]}function Tt(e){const t=m.useRef(e);return on(()=>{t.current=e}),m.useRef((...n)=>(0,t.current)(...n)).current}function Ke(...e){return m.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Al(n,t)})},e)}const Yh={};function f2(e,t){const n=m.useRef(Yh);return n.current===Yh&&(n.current=e(t)),n}const m2=[];function h2(e){m.useEffect(e,m2)}class la{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new la}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function no(){const e=f2(la.create).current;return h2(e.disposeEffect),e}let Uc=!0,Xd=!1;const v2=new la,g2={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function y2(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&g2[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function x2(e){e.metaKey||e.altKey||e.ctrlKey||(Uc=!0)}function Iu(){Uc=!1}function b2(){this.visibilityState==="hidden"&&Xd&&(Uc=!0)}function S2(e){e.addEventListener("keydown",x2,!0),e.addEventListener("mousedown",Iu,!0),e.addEventListener("pointerdown",Iu,!0),e.addEventListener("touchstart",Iu,!0),e.addEventListener("visibilitychange",b2,!0)}function C2(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Uc||y2(t)}function $f(){const e=m.useCallback(o=>{o!=null&&S2(o.ownerDocument)},[]),t=m.useRef(!1);function n(){return t.current?(Xd=!0,v2.start(100,()=>{Xd=!1}),t.current=!1,!0):!1}function r(o){return C2(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function lx(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let To;function cx(){if(To)return To;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),To="reverse",e.scrollLeft>0?To="default":(e.scrollLeft=1,e.scrollLeft===0&&(To="negative")),document.body.removeChild(e),To}function w2(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(cx()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function oe(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((i,s)=>{if(s){const a=t(s);a!==""&&i.push(a),n&&n[s]&&i.push(n[s])}return i},[]).join(" ")}),r}function hi(e){return typeof e=="string"}function Xo(e,t,n){return e===void 0||hi(e)?t:S({},t,{ownerState:S({},t.ownerState,n)})}function Ll(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Xh(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function ux(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const x=V(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),b=S({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),y=S({},n,o,r);return x.length>0&&(y.className=x),Object.keys(b).length>0&&(y.style=b),{props:y,internalRef:void 0}}const s=Ll(S({},o,r)),a=Xh(r),l=Xh(o),c=t(s),u=V(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),p=S({},c==null?void 0:c.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),f=S({},c,n,l,a);return u.length>0&&(f.className=u),Object.keys(p).length>0&&(f.style=p),{props:f,internalRef:c.ref}}function dx(e,t,n){return typeof e=="function"?e(t,n):e}const k2=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function $n(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=e,s=U(e,k2),a=i?{}:dx(r,o),{props:l,internalRef:c}=ux(S({},s,{externalSlotProps:a})),u=Ke(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return Xo(n,S({},l,{ref:u}),o)}function Co(e){if(parseInt(m.version,10)>=19){var t;return(e==null||(t=e.props)==null?void 0:t.ref)||null}return(e==null?void 0:e.ref)||null}const E2=m.createContext(null),px=E2;function fx(){return m.useContext(px)}const $2=typeof Symbol=="function"&&Symbol.for,P2=$2?Symbol.for("mui.nested"):"__THEME_NESTED__";function R2(e,t){return typeof t=="function"?t(e):S({},e,t)}function T2(e){const{children:t,theme:n}=e,r=fx(),o=m.useMemo(()=>{const i=r===null?n:R2(r,n);return i!=null&&(i[P2]=r!==null),i},[n,r]);return d.jsx(px.Provider,{value:o,children:t})}const M2=["value"],mx=m.createContext();function j2(e){let{value:t}=e,n=U(e,M2);return d.jsx(mx.Provider,S({value:t??!0},n))}const Vc=()=>{const e=m.useContext(mx);return e??!1},hx=m.createContext(void 0);function O2({value:e,children:t}){return d.jsx(hx.Provider,{value:e,children:t})}function _2(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Fs(o.defaultProps,r):!o.styleOverrides&&!o.variants?Fs(o,r):r}function I2({props:e,name:t}){const n=m.useContext(hx);return _2({props:e,name:t,theme:{components:n}})}const Qh={};function Zh(e,t,n,r=!1){return m.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),s=e?S({},t,{[e]:i}):i;return r?()=>s:s}return e?S({},t,{[e]:n}):S({},t,n)},[e,t,n,r])}function N2(e){const{children:t,theme:n,themeId:r}=e,o=tx(Qh),i=fx()||Qh,s=Zh(r,o,n),a=Zh(r,i,n,!0),l=s.direction==="rtl";return d.jsx(T2,{theme:a,children:d.jsx($i.Provider,{value:s,children:d.jsx(j2,{value:l,children:d.jsx(O2,{value:s==null?void 0:s.components,children:t})})})})}const A2=["className","component","disableGutters","fixed","maxWidth","classes"],L2=Ri(),z2=sx("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${z(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),B2=e=>ax({props:e,name:"MuiContainer",defaultTheme:L2}),D2=(e,t)=>{const n=l=>te(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:s}=e,a={root:["root",s&&`maxWidth${z(String(s))}`,o&&"fixed",i&&"disableGutters"]};return oe(a,n,r)};function F2(e={}){const{createStyledComponent:t=z2,useThemeProps:n=B2,componentName:r="MuiContainer"}=e,o=t(({theme:s,ownerState:a})=>S({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!a.disableGutters&&{paddingLeft:s.spacing(2),paddingRight:s.spacing(2),[s.breakpoints.up("sm")]:{paddingLeft:s.spacing(3),paddingRight:s.spacing(3)}}),({theme:s,ownerState:a})=>a.fixed&&Object.keys(s.breakpoints.values).reduce((l,c)=>{const u=c,p=s.breakpoints.values[u];return p!==0&&(l[s.breakpoints.up(u)]={maxWidth:`${p}${s.breakpoints.unit}`}),l},{}),({theme:s,ownerState:a})=>S({},a.maxWidth==="xs"&&{[s.breakpoints.up("xs")]:{maxWidth:Math.max(s.breakpoints.values.xs,444)}},a.maxWidth&&a.maxWidth!=="xs"&&{[s.breakpoints.up(a.maxWidth)]:{maxWidth:`${s.breakpoints.values[a.maxWidth]}${s.breakpoints.unit}`}}));return m.forwardRef(function(a,l){const c=n(a),{className:u,component:p="div",disableGutters:f=!1,fixed:x=!1,maxWidth:b="lg"}=c,y=U(c,A2),w=S({},c,{component:p,disableGutters:f,fixed:x,maxWidth:b}),h=D2(w,r);return d.jsx(o,S({as:p,ownerState:w,className:V(h.root,u),ref:l},y))})}const W2=["component","direction","spacing","divider","children","className","useFlexGap"],U2=Ri(),V2=sx("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function H2(e){return ax({props:e,name:"MuiStack",defaultTheme:U2})}function K2(e,t){const n=m.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],q2=({ownerState:e,theme:t})=>{let n=S({display:"flex",flexDirection:"column"},Yt({theme:t},ao({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=Sf(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=ao({values:e.direction,base:o}),s=ao({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const f=c>0?i[u[c-1]]:"column";i[l]=f}}),n=Nt(n,Yt({theme:t},s,(l,c)=>e.useFlexGap?{gap:go(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${G2(c?i[c]:e.direction)}`]:go(r,l)}}))}return n=Ww(t.breakpoints,n),n};function Y2(e={}){const{createStyledComponent:t=V2,useThemeProps:n=H2,componentName:r="MuiStack"}=e,o=()=>oe({root:["root"]},l=>te(r,l),{}),i=t(q2);return m.forwardRef(function(l,c){const u=n(l),p=ia(u),{component:f="div",direction:x="column",spacing:b=0,divider:y,children:w,className:h,useFlexGap:v=!1}=p,g=U(p,W2),C={direction:x,spacing:b,useFlexGap:v},k=o();return d.jsx(i,S({as:f,ownerState:C,ref:c,className:V(k.root,h)},g,{children:y?K2(w,y):w}))})}function X2(e,t){return S({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var tt={},vx={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(vx);var st=vx.exports;const Q2=vr($C),Z2=vr(l2);var gx=st;Object.defineProperty(tt,"__esModule",{value:!0});var Pe=tt.alpha=Sx;tt.blend=uE;tt.colorChannel=void 0;var zl=tt.darken=Rf;tt.decomposeColor=Pn;var J2=tt.emphasize=Cx,eE=tt.getContrastRatio=iE;tt.getLuminance=Dl;tt.hexToRgb=yx;tt.hslToRgb=bx;var Bl=tt.lighten=Tf;tt.private_safeAlpha=sE;tt.private_safeColorChannel=void 0;tt.private_safeDarken=aE;tt.private_safeEmphasize=cE;tt.private_safeLighten=lE;tt.recomposeColor=Ti;tt.rgbToHex=oE;var Jh=gx(Q2),tE=gx(Z2);function Pf(e,t=0,n=1){return(0,tE.default)(e,t,n)}function yx(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function nE(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Pn(e){if(e.type)return e;if(e.charAt(0)==="#")return Pn(yx(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,Jh.default)(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error((0,Jh.default)(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const xx=e=>{const t=Pn(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};tt.colorChannel=xx;const rE=(e,t)=>{try{return xx(e)}catch{return e}};tt.private_safeColorChannel=rE;function Ti(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function oE(e){if(e.indexOf("#")===0)return e;const{values:t}=Pn(e);return`#${t.map((n,r)=>nE(r===3?Math.round(255*n):n)).join("")}`}function bx(e){e=Pn(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),s=(c,u=(c+n/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),Ti({type:a,values:l})}function Dl(e){e=Pn(e);let t=e.type==="hsl"||e.type==="hsla"?Pn(bx(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function iE(e,t){const n=Dl(e),r=Dl(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Sx(e,t){return e=Pn(e),t=Pf(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Ti(e)}function sE(e,t,n){try{return Sx(e,t)}catch{return e}}function Rf(e,t){if(e=Pn(e),t=Pf(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Ti(e)}function aE(e,t,n){try{return Rf(e,t)}catch{return e}}function Tf(e,t){if(e=Pn(e),t=Pf(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Ti(e)}function lE(e,t,n){try{return Tf(e,t)}catch{return e}}function Cx(e,t=.15){return Dl(e)>.5?Rf(e,t):Tf(e,t)}function cE(e,t,n){try{return Cx(e,t)}catch{return e}}function uE(e,t,n,r=1){const o=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),i=Pn(e),s=Pn(t),a=[o(i.values[0],s.values[0]),o(i.values[1],s.values[1]),o(i.values[2],s.values[2])];return Ti({type:"rgb",values:a})}const dE={black:"#000",white:"#fff"},Us=dE,pE={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},fE=pE,mE={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Mo=mE,hE={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},jo=hE,vE={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Hi=vE,gE={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Oo=gE,yE={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},_o=yE,xE={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Io=xE,bE=["mode","contrastThreshold","tonalOffset"],ev={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Us.white,default:Us.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Nu={text:{primary:Us.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Us.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function tv(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Bl(e.main,o):t==="dark"&&(e.dark=zl(e.main,i)))}function SE(e="light"){return e==="dark"?{main:Oo[200],light:Oo[50],dark:Oo[400]}:{main:Oo[700],light:Oo[400],dark:Oo[800]}}function CE(e="light"){return e==="dark"?{main:Mo[200],light:Mo[50],dark:Mo[400]}:{main:Mo[500],light:Mo[300],dark:Mo[700]}}function wE(e="light"){return e==="dark"?{main:jo[500],light:jo[300],dark:jo[700]}:{main:jo[700],light:jo[400],dark:jo[800]}}function kE(e="light"){return e==="dark"?{main:_o[400],light:_o[300],dark:_o[700]}:{main:_o[700],light:_o[500],dark:_o[900]}}function EE(e="light"){return e==="dark"?{main:Io[400],light:Io[300],dark:Io[700]}:{main:Io[800],light:Io[500],dark:Io[900]}}function $E(e="light"){return e==="dark"?{main:Hi[400],light:Hi[300],dark:Hi[700]}:{main:"#ed6c02",light:Hi[500],dark:Hi[900]}}function PE(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=U(e,bE),i=e.primary||SE(t),s=e.secondary||CE(t),a=e.error||wE(t),l=e.info||kE(t),c=e.success||EE(t),u=e.warning||$E(t);function p(y){return eE(y,Nu.text.primary)>=n?Nu.text.primary:ev.text.primary}const f=({color:y,name:w,mainShade:h=500,lightShade:v=300,darkShade:g=700})=>{if(y=S({},y),!y.main&&y[h]&&(y.main=y[h]),!y.hasOwnProperty("main"))throw new Error(vo(11,w?` (${w})`:"",h));if(typeof y.main!="string")throw new Error(vo(12,w?` (${w})`:"",JSON.stringify(y.main)));return tv(y,"light",v,r),tv(y,"dark",g,r),y.contrastText||(y.contrastText=p(y.main)),y},x={dark:Nu,light:ev};return Nt(S({common:S({},Us),mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:fE,contrastThreshold:n,getContrastText:p,augmentColor:f,tonalOffset:r},x[t]),o)}const RE=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function TE(e){return Math.round(e*1e5)/1e5}const nv={textTransform:"uppercase"},rv='"Roboto", "Helvetica", "Arial", sans-serif';function ME(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=rv,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:p}=n,f=U(n,RE),x=o/14,b=p||(h=>`${h/c*x}rem`),y=(h,v,g,C,k)=>S({fontFamily:r,fontWeight:h,fontSize:b(v),lineHeight:g},r===rv?{letterSpacing:`${TE(C/v)}em`}:{},k,u),w={h1:y(i,96,1.167,-1.5),h2:y(i,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(a,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(a,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(a,14,1.75,.4,nv),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,nv),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Nt(S({htmlFontSize:c,pxToRem:b,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},w),f,{clone:!1})}const jE=.2,OE=.14,_E=.12;function Fe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${jE})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${OE})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${_E})`].join(",")}const IE=["none",Fe(0,2,1,-1,0,1,1,0,0,1,3,0),Fe(0,3,1,-2,0,2,2,0,0,1,5,0),Fe(0,3,3,-2,0,3,4,0,0,1,8,0),Fe(0,2,4,-1,0,4,5,0,0,1,10,0),Fe(0,3,5,-1,0,5,8,0,0,1,14,0),Fe(0,3,5,-1,0,6,10,0,0,1,18,0),Fe(0,4,5,-2,0,7,10,1,0,2,16,1),Fe(0,5,5,-3,0,8,10,1,0,3,14,2),Fe(0,5,6,-3,0,9,12,1,0,3,16,2),Fe(0,6,6,-3,0,10,14,1,0,4,18,3),Fe(0,6,7,-4,0,11,15,1,0,4,20,3),Fe(0,7,8,-4,0,12,17,2,0,5,22,4),Fe(0,7,8,-4,0,13,19,2,0,5,24,4),Fe(0,7,9,-4,0,14,21,2,0,5,26,4),Fe(0,8,9,-5,0,15,22,2,0,6,28,5),Fe(0,8,10,-5,0,16,24,2,0,6,30,5),Fe(0,8,11,-5,0,17,26,2,0,6,32,5),Fe(0,9,11,-5,0,18,28,2,0,7,34,6),Fe(0,9,12,-6,0,19,29,2,0,7,36,6),Fe(0,10,13,-6,0,20,31,3,0,8,38,7),Fe(0,10,13,-6,0,21,33,3,0,8,40,7),Fe(0,10,14,-6,0,22,35,3,0,8,42,7),Fe(0,11,14,-7,0,23,36,3,0,9,44,8),Fe(0,11,15,-7,0,24,38,3,0,9,46,8)],NE=IE,AE=["duration","easing","delay"],LE={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},zE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ov(e){return`${Math.round(e)}ms`}function BE(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function DE(e){const t=S({},LE,e.easing),n=S({},zE,e.duration);return S({getAutoHeightDuration:BE,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0}=i;return U(i,AE),(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof s=="string"?s:ov(s)} ${a} ${typeof l=="string"?l:ov(l)}`).join(",")}},e,{easing:t,duration:n})}const FE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},WE=FE,UE=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Mf(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,s=U(e,UE);if(e.vars&&e.generateCssVars===void 0)throw new Error(vo(18));const a=PE(r),l=Ri(e);let c=Nt(l,{mixins:X2(l.breakpoints,n),palette:a,shadows:NE.slice(),typography:ME(a,i),transitions:DE(o),zIndex:S({},WE)});return c=Nt(c,s),c=t.reduce((u,p)=>Nt(u,p),c),c.unstable_sxConfig=S({},ra,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(p){return oa({sx:p,theme:this})},c}const VE=Mf(),jf=VE;function wo(){const e=Oc(jf);return e[fi]||e}var ca={},Au={exports:{}},iv;function HE(){return iv||(iv=1,function(e){function t(n,r){if(n==null)return{};var o={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(r.indexOf(i)!==-1)continue;o[i]=n[i]}return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Au)),Au.exports}const wx=vr(Aw),KE=vr(Lw),GE=vr(Vw),qE=vr(qk),YE=vr(Ok),XE=vr(zk);var Mi=st;Object.defineProperty(ca,"__esModule",{value:!0});var QE=ca.default=u$;ca.shouldForwardProp=ol;ca.systemDefaultTheme=void 0;var pn=Mi(V0()),Qd=Mi(HE()),sv=o$(wx),ZE=KE;Mi(GE);Mi(qE);var JE=Mi(YE),e$=Mi(XE);const t$=["ownerState"],n$=["variants"],r$=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function kx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(kx=function(r){return r?n:t})(e)}function o$(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=kx(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function i$(e){return Object.keys(e).length===0}function s$(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ol(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const a$=ca.systemDefaultTheme=(0,JE.default)(),l$=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Oa({defaultTheme:e,theme:t,themeId:n}){return i$(t)?e:t[n]||t}function c$(e){return e?(t,n)=>n[e]:null}function il(e,t){let{ownerState:n}=t,r=(0,Qd.default)(t,t$);const o=typeof e=="function"?e((0,pn.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>il(i,(0,pn.default)({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let a=(0,Qd.default)(o,n$);return i.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,pn.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,pn.default)({ownerState:n},r,n)):l.style))}),a}return o}function u$(e={}){const{themeId:t,defaultTheme:n=a$,rootShouldForwardProp:r=ol,slotShouldForwardProp:o=ol}=e,i=s=>(0,e$.default)((0,pn.default)({},s,{theme:Oa((0,pn.default)({},s,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(s,a={})=>{(0,sv.internal_processStyles)(s,k=>k.filter($=>!($!=null&&$.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:p,overridesResolver:f=c$(l$(c))}=a,x=(0,Qd.default)(a,r$),b=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,y=p||!1;let w,h=ol;c==="Root"||c==="root"?h=r:c?h=o:s$(s)&&(h=void 0);const v=(0,sv.default)(s,(0,pn.default)({shouldForwardProp:h,label:w},x)),g=k=>typeof k=="function"&&k.__emotion_real!==k||(0,ZE.isPlainObject)(k)?$=>il(k,(0,pn.default)({},$,{theme:Oa({theme:$.theme,defaultTheme:n,themeId:t})})):k,C=(k,...$)=>{let E=g(k);const P=$?$.map(g):[];l&&f&&P.push(j=>{const A=Oa((0,pn.default)({},j,{defaultTheme:n,themeId:t}));if(!A.components||!A.components[l]||!A.components[l].styleOverrides)return null;const M=A.components[l].styleOverrides,O={};return Object.entries(M).forEach(([N,L])=>{O[N]=il(L,(0,pn.default)({},j,{theme:A}))}),f(j,O)}),l&&!b&&P.push(j=>{var A;const M=Oa((0,pn.default)({},j,{defaultTheme:n,themeId:t})),O=M==null||(A=M.components)==null||(A=A[l])==null?void 0:A.variants;return il({variants:O},(0,pn.default)({},j,{theme:M}))}),y||P.push(i);const _=P.length-$.length;if(Array.isArray(k)&&_>0){const j=new Array(_).fill("");E=[...k,...j],E.raw=[...k.raw,...j]}const R=v(E,...P);return s.muiName&&(R.muiName=s.muiName),R};return v.withConfig&&(C.withConfig=v.withConfig),C}}function Ex(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const d$=e=>Ex(e)&&e!=="classes",un=d$,p$=QE({themeId:fi,defaultTheme:jf,rootShouldForwardProp:un}),D=p$,f$=["theme"];function m$(e){let{theme:t}=e,n=U(e,f$);const r=t[fi];let o=r||t;return typeof t!="function"&&(r&&!r.vars?o=S({},r,{vars:null}):t&&!t.vars&&(o=S({},t,{vars:null}))),d.jsx(N2,S({},n,{themeId:r?fi:void 0,theme:o}))}const h$=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},av=h$;function ie(e){return I2(e)}function $x(e){return d.jsx(Nk,S({},e,{defaultTheme:jf,themeId:fi}))}const v$=(e,t)=>S({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),g$=e=>S({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),y$=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,a])=>{var l;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let o=S({html:v$(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:S({margin:0},g$(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const i=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return i&&(o=[o,i]),o};function x$(e){const t=ie({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return d.jsxs(m.Fragment,{children:[d.jsx($x,{styles:o=>y$(o,r)}),n]})}function b$(e){return te("MuiSvgIcon",e)}ne("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const S$=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],C$=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${z(t)}`,`fontSize${z(n)}`]};return oe(o,b$,r)},w$=D("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${z(n.color)}`],t[`fontSize${z(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,i,s,a,l,c,u,p,f,x,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(s=i.pxToRem)==null?void 0:s.call(i,20))||"1.25rem",medium:((a=e.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=e.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:(p=(f=(e.vars||e).palette)==null||(f=f[t.color])==null?void 0:f.main)!=null?p:{action:(x=(e.vars||e).palette)==null||(x=x.action)==null?void 0:x.active,disabled:(b=(e.vars||e).palette)==null||(b=b.action)==null?void 0:b.disabled,inherit:void 0}[t.color]}}),Px=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:p,viewBox:f="0 0 24 24"}=r,x=U(r,S$),b=m.isValidElement(o)&&o.type==="svg",y=S({},r,{color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:b}),w={};u||(w.viewBox=f);const h=C$(y);return d.jsxs(w$,S({as:a,className:V(h.root,i),focusable:"false",color:c,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:n},w,x,b&&o.props,{ownerState:y,children:[b?o.props.children:o,p?d.jsx("title",{children:p}):null]}))});Px.muiName="SvgIcon";const lv=Px;function nr(e,t){function n(r,o){return d.jsx(lv,S({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return n.muiName=lv.muiName,m.memo(m.forwardRef(n))}const k$={configure:e=>{wf.configure(e)}},E$=Object.freeze(Object.defineProperty({__proto__:null,capitalize:z,createChainedFunction:Yd,createSvgIcon:nr,debounce:sa,deprecatedPropType:c2,isMuiElement:ms,ownerDocument:it,ownerWindow:Zn,requirePropFactory:u2,setRef:Al,unstable_ClassNameGenerator:k$,unstable_useEnhancedEffect:on,unstable_useId:aa,unsupportedProp:p2,useControlled:Ws,useEventCallback:Tt,useForkRef:Ke,useIsFocusVisible:$f},Symbol.toStringTag,{value:"Module"}));function Zd(e,t){return Zd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Zd(e,t)}function Rx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Zd(e,t)}const cv={disabled:!1},Fl=xn.createContext(null);var $$=function(t){return t.scrollTop},rs="unmounted",Qr="exited",Zr="entering",Ao="entered",Jd="exiting",yr=function(e){Rx(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var s=o,a=s&&!s.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?a?(l=Qr,i.appearStatus=Zr):l=Ao:r.unmountOnExit||r.mountOnEnter?l=rs:l=Qr,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===rs?{status:Qr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==Zr&&s!==Ao&&(i=Zr):(s===Zr||s===Ao)&&(i=Jd)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:a}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Zr){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Ta.findDOMNode(this);s&&$$(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qr&&this.setState({status:rs})},n.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[Ta.findDOMNode(this),a],c=l[0],u=l[1],p=this.getTimeouts(),f=a?p.appear:p.enter;if(!o&&!s||cv.disabled){this.safeSetState({status:Ao},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Zr},function(){i.props.onEntering(c,u),i.onTransitionEnd(f,function(){i.safeSetState({status:Ao},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Ta.findDOMNode(this);if(!i||cv.disabled){this.safeSetState({status:Qr},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Jd},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Qr},function(){o.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:Ta.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===rs)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=U(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return xn.createElement(Fl.Provider,{value:null},typeof s=="function"?s(o,a):xn.cloneElement(xn.Children.only(s),a))},t}(xn.Component);yr.contextType=Fl;yr.propTypes={};function No(){}yr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:No,onEntering:No,onEntered:No,onExit:No,onExiting:No,onExited:No};yr.UNMOUNTED=rs;yr.EXITED=Qr;yr.ENTERING=Zr;yr.ENTERED=Ao;yr.EXITING=Jd;const Tx=yr;function P$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Of(e,t){var n=function(i){return t&&m.isValidElement(i)?t(i):i},r=Object.create(null);return e&&m.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function R$(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var l in t){if(r[l])for(s=0;se.scrollTop;function Wl(e,t){var n,r;const{timeout:o,easing:i,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof i=="object"?i[t.mode]:i,delay:s.transitionDelay}}function I$(e){return te("MuiPaper",e)}ne("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const N$=["className","component","elevation","square","variant"],A$=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return oe(i,I$,o)},L$=D("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return S({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&S({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Pe("#fff",av(t.elevation))}, ${Pe("#fff",av(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),z$=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=U(r,N$),u=S({},r,{component:i,elevation:s,square:a,variant:l}),p=A$(u);return d.jsx(L$,S({as:i,ownerState:u,className:V(p.root,o),ref:n},c))}),Le=z$,B$=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],D$=["component","slots","slotProps"],F$=["component"];function uv(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:s,internalForwardedProps:a}=t,l=U(t,B$),{component:c,slots:u={[e]:void 0},slotProps:p={[e]:void 0}}=i,f=U(i,D$),x=u[e]||r,b=dx(p[e],o),y=ux(S({className:n},l,{externalForwardedProps:e==="root"?f:void 0,externalSlotProps:b})),{props:{component:w},internalRef:h}=y,v=U(y.props,F$),g=Ke(h,b==null?void 0:b.ref,t.ref),C=s?s(v):{},k=S({},o,C),$=e==="root"?w||c:w,E=Xo(x,S({},e==="root"&&!c&&!u[e]&&a,e!=="root"&&!u[e]&&a,v,$&&{as:$},{ref:g}),k);return Object.keys(C).forEach(P=>{delete E[P]}),[x,E]}function W$(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:l,timeout:c}=e,[u,p]=m.useState(!1),f=V(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),x={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},b=V(n.child,u&&n.childLeaving,r&&n.childPulsate);return!a&&!u&&p(!0),m.useEffect(()=>{if(!a&&l!=null){const y=setTimeout(l,c);return()=>{clearTimeout(y)}}},[l,a,c]),d.jsx("span",{className:f,style:x,children:d.jsx("span",{className:b})})}const U$=ne("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),fn=U$,V$=["center","classes","className"];let Hc=e=>e,dv,pv,fv,mv;const ep=550,H$=80,K$=Pi(dv||(dv=Hc` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),G$=Pi(pv||(pv=Hc` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),q$=Pi(fv||(fv=Hc` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),Y$=D("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),X$=D(W$,{name:"MuiTouchRipple",slot:"Ripple"})(mv||(mv=Hc` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`),fn.rippleVisible,K$,ep,({theme:e})=>e.transitions.easing.easeInOut,fn.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,fn.child,fn.childLeaving,G$,ep,({theme:e})=>e.transitions.easing.easeInOut,fn.childPulsate,q$,({theme:e})=>e.transitions.easing.easeInOut),Q$=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,a=U(r,V$),[l,c]=m.useState([]),u=m.useRef(0),p=m.useRef(null);m.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);const f=m.useRef(!1),x=no(),b=m.useRef(null),y=m.useRef(null),w=m.useCallback(C=>{const{pulsate:k,rippleX:$,rippleY:E,rippleSize:P,cb:_}=C;c(R=>[...R,d.jsx(X$,{classes:{ripple:V(i.ripple,fn.ripple),rippleVisible:V(i.rippleVisible,fn.rippleVisible),ripplePulsate:V(i.ripplePulsate,fn.ripplePulsate),child:V(i.child,fn.child),childLeaving:V(i.childLeaving,fn.childLeaving),childPulsate:V(i.childPulsate,fn.childPulsate)},timeout:ep,pulsate:k,rippleX:$,rippleY:E,rippleSize:P},u.current)]),u.current+=1,p.current=_},[i]),h=m.useCallback((C={},k={},$=()=>{})=>{const{pulsate:E=!1,center:P=o||k.pulsate,fakeElement:_=!1}=k;if((C==null?void 0:C.type)==="mousedown"&&f.current){f.current=!1;return}(C==null?void 0:C.type)==="touchstart"&&(f.current=!0);const R=_?null:y.current,j=R?R.getBoundingClientRect():{width:0,height:0,left:0,top:0};let A,M,O;if(P||C===void 0||C.clientX===0&&C.clientY===0||!C.clientX&&!C.touches)A=Math.round(j.width/2),M=Math.round(j.height/2);else{const{clientX:N,clientY:L}=C.touches&&C.touches.length>0?C.touches[0]:C;A=Math.round(N-j.left),M=Math.round(L-j.top)}if(P)O=Math.sqrt((2*j.width**2+j.height**2)/3),O%2===0&&(O+=1);else{const N=Math.max(Math.abs((R?R.clientWidth:0)-A),A)*2+2,L=Math.max(Math.abs((R?R.clientHeight:0)-M),M)*2+2;O=Math.sqrt(N**2+L**2)}C!=null&&C.touches?b.current===null&&(b.current=()=>{w({pulsate:E,rippleX:A,rippleY:M,rippleSize:O,cb:$})},x.start(H$,()=>{b.current&&(b.current(),b.current=null)})):w({pulsate:E,rippleX:A,rippleY:M,rippleSize:O,cb:$})},[o,w,x]),v=m.useCallback(()=>{h({},{pulsate:!0})},[h]),g=m.useCallback((C,k)=>{if(x.clear(),(C==null?void 0:C.type)==="touchend"&&b.current){b.current(),b.current=null,x.start(0,()=>{g(C,k)});return}b.current=null,c($=>$.length>0?$.slice(1):$),p.current=k},[x]);return m.useImperativeHandle(n,()=>({pulsate:v,start:h,stop:g}),[v,h,g]),d.jsx(Y$,S({className:V(fn.root,i.root,s),ref:y},a,{children:d.jsx(_$,{component:null,exit:!0,children:l})}))}),Z$=Q$;function J$(e){return te("MuiButtonBase",e)}const eP=ne("MuiButtonBase",["root","disabled","focusVisible"]),tP=eP,nP=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],rP=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,s=oe({root:["root",t&&"disabled",n&&"focusVisible"]},J$,o);return n&&r&&(s.root+=` ${r}`),s},oP=D("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${tP.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),iP=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:p=!1,focusRipple:f=!1,LinkComponent:x="a",onBlur:b,onClick:y,onContextMenu:w,onDragLeave:h,onFocus:v,onFocusVisible:g,onKeyDown:C,onKeyUp:k,onMouseDown:$,onMouseLeave:E,onMouseUp:P,onTouchEnd:_,onTouchMove:R,onTouchStart:j,tabIndex:A=0,TouchRippleProps:M,touchRippleRef:O,type:N}=r,L=U(r,nP),B=m.useRef(null),T=m.useRef(null),I=Ke(T,O),{isFocusVisibleRef:W,onFocus:q,onBlur:se,ref:ce}=$f(),[X,K]=m.useState(!1);c&&X&&K(!1),m.useImperativeHandle(o,()=>({focusVisible:()=>{K(!0),B.current.focus()}}),[]);const[re,ke]=m.useState(!1);m.useEffect(()=>{ke(!0)},[]);const ve=re&&!u&&!c;m.useEffect(()=>{X&&f&&!u&&re&&T.current.pulsate()},[u,f,X,re]);function he(Z,Ge,zt=p){return Tt(Xt=>(Ge&&Ge(Xt),!zt&&T.current&&T.current[Z](Xt),!0))}const Be=he("start",$),ae=he("stop",w),Re=he("stop",h),le=he("stop",P),pe=he("stop",Z=>{X&&Z.preventDefault(),E&&E(Z)}),ue=he("start",j),gt=he("stop",_),_e=he("stop",R),Oe=he("stop",Z=>{se(Z),W.current===!1&&K(!1),b&&b(Z)},!1),at=Tt(Z=>{B.current||(B.current=Z.currentTarget),q(Z),W.current===!0&&(K(!0),g&&g(Z)),v&&v(Z)}),Te=()=>{const Z=B.current;return l&&l!=="button"&&!(Z.tagName==="A"&&Z.href)},ge=m.useRef(!1),nt=Tt(Z=>{f&&!ge.current&&X&&T.current&&Z.key===" "&&(ge.current=!0,T.current.stop(Z,()=>{T.current.start(Z)})),Z.target===Z.currentTarget&&Te()&&Z.key===" "&&Z.preventDefault(),C&&C(Z),Z.target===Z.currentTarget&&Te()&&Z.key==="Enter"&&!c&&(Z.preventDefault(),y&&y(Z))}),De=Tt(Z=>{f&&Z.key===" "&&T.current&&X&&!Z.defaultPrevented&&(ge.current=!1,T.current.stop(Z,()=>{T.current.pulsate(Z)})),k&&k(Z),y&&Z.target===Z.currentTarget&&Te()&&Z.key===" "&&!Z.defaultPrevented&&y(Z)});let be=l;be==="button"&&(L.href||L.to)&&(be=x);const lt={};be==="button"?(lt.type=N===void 0?"button":N,lt.disabled=c):(!L.href&&!L.to&&(lt.role="button"),c&&(lt["aria-disabled"]=c));const pt=Ke(n,ce,B),yt=S({},r,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:p,focusRipple:f,tabIndex:A,focusVisible:X}),ye=rP(yt);return d.jsxs(oP,S({as:be,className:V(ye.root,a),ownerState:yt,onBlur:Oe,onClick:y,onContextMenu:ae,onFocus:at,onKeyDown:nt,onKeyUp:De,onMouseDown:Be,onMouseLeave:pe,onMouseUp:le,onDragLeave:Re,onTouchEnd:gt,onTouchMove:_e,onTouchStart:ue,ref:pt,tabIndex:c?-1:A,type:N},lt,L,{children:[s,ve?d.jsx(Z$,S({ref:I,center:i},M)):null]}))}),Jn=iP;function sP(e){return te("MuiAlert",e)}const aP=ne("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),hv=aP;function lP(e){return te("MuiIconButton",e)}const cP=ne("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),uP=cP,dP=["edge","children","className","color","disabled","disableFocusRipple","size"],pP=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${z(r)}`,o&&`edge${z(o)}`,`size${z(i)}`]};return oe(s,lP,t)},fP=D(Jn,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${z(n.color)}`],n.edge&&t[`edge${z(n.edge)}`],t[`size${z(n.size)}`]]}})(({theme:e,ownerState:t})=>S({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return S({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&S({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":S({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${uP.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),mP=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium"}=r,p=U(r,dP),f=S({},r,{edge:o,color:a,disabled:l,disableFocusRipple:c,size:u}),x=pP(f);return d.jsx(fP,S({className:V(x.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},p,{ownerState:f,children:i}))}),Fr=mP,hP=nr(d.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),vP=nr(d.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),gP=nr(d.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),yP=nr(d.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),xP=nr(d.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),bP=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],SP=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${z(n||r)}`,`${t}${z(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return oe(i,sP,o)},CP=D(Le,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${z(n.color||n.severity)}`]]}})(({theme:e})=>{const t=e.palette.mode==="light"?zl:Bl,n=e.palette.mode==="light"?Bl:zl;return S({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${hv.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${hv.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.dark).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:S({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)})}))]})}),wP=D("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),kP=D("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),vv=D("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),gv={success:d.jsx(hP,{fontSize:"inherit"}),warning:d.jsx(vP,{fontSize:"inherit"}),error:d.jsx(gP,{fontSize:"inherit"}),info:d.jsx(yP,{fontSize:"inherit"})},EP=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiAlert"}),{action:o,children:i,className:s,closeText:a="Close",color:l,components:c={},componentsProps:u={},icon:p,iconMapping:f=gv,onClose:x,role:b="alert",severity:y="success",slotProps:w={},slots:h={},variant:v="standard"}=r,g=U(r,bP),C=S({},r,{color:l,severity:y,variant:v,colorSeverity:l||y}),k=SP(C),$={slots:S({closeButton:c.CloseButton,closeIcon:c.CloseIcon},h),slotProps:S({},u,w)},[E,P]=uv("closeButton",{elementType:Fr,externalForwardedProps:$,ownerState:C}),[_,R]=uv("closeIcon",{elementType:xP,externalForwardedProps:$,ownerState:C});return d.jsxs(CP,S({role:b,elevation:0,ownerState:C,className:V(k.root,s),ref:n},g,{children:[p!==!1?d.jsx(wP,{ownerState:C,className:k.icon,children:p||f[y]||gv[y]}):null,d.jsx(kP,{ownerState:C,className:k.message,children:i}),o!=null?d.jsx(vv,{ownerState:C,className:k.action,children:o}):null,o==null&&x?d.jsx(vv,{ownerState:C,className:k.action,children:d.jsx(E,S({size:"small","aria-label":a,title:a,color:"inherit",onClick:x},P,{children:d.jsx(_,S({fontSize:"small"},R))}))}):null]}))}),Ft=EP;function $P(e){return te("MuiTypography",e)}ne("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const PP=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],RP=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=e,a={root:["root",i,e.align!=="inherit"&&`align${z(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return oe(a,$P,s)},TP=D("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${z(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>S({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),yv={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},MP={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},jP=e=>MP[e]||e,OP=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiTypography"}),o=jP(r.color),i=ia(S({},r,{color:o})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:p=!1,variant:f="body1",variantMapping:x=yv}=i,b=U(i,PP),y=S({},i,{align:s,color:o,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:p,variant:f,variantMapping:x}),w=l||(p?"p":x[f]||yv[f])||"span",h=RP(y);return d.jsx(TP,S({as:w,ref:n,ownerState:y,className:V(h.root,a)},b))}),Q=OP;function _P(e){return te("MuiAppBar",e)}ne("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const IP=["className","color","enableColorOnDark","position"],NP=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${z(t)}`,`position${z(n)}`]};return oe(o,_P,r)},_a=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,AP=D(Le,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${z(n.position)}`],t[`color${z(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return S({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&S({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&S({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&S({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:_a(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:_a(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:_a(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:_a(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},!["inherit","transparent"].includes(t.color)&&{backgroundColor:"var(--AppBar-background)"},{color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),LP=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,l=U(r,IP),c=S({},r,{color:i,position:a,enableColorOnDark:s}),u=NP(c);return d.jsx(AP,S({square:!0,component:"header",ownerState:c,elevation:4,className:V(u.root,o,a==="fixed"&&"mui-fixed"),ref:n},l))}),zP=LP;var If={};Object.defineProperty(If,"__esModule",{value:!0});var jx=If.default=void 0,BP=FP(m),DP=wx;function Ox(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Ox=function(r){return r?n:t})(e)}function FP(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Ox(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function WP(e){return Object.keys(e).length===0}function UP(e=null){const t=BP.useContext(DP.ThemeContext);return!t||WP(t)?e:t}jx=If.default=UP;var Kt="top",Rn="bottom",Tn="right",Gt="left",Nf="auto",ua=[Kt,Rn,Tn,Gt],vi="start",Vs="end",VP="clippingParents",_x="viewport",Ki="popper",HP="reference",xv=ua.reduce(function(e,t){return e.concat([t+"-"+vi,t+"-"+Vs])},[]),Ix=[].concat(ua,[Nf]).reduce(function(e,t){return e.concat([t,t+"-"+vi,t+"-"+Vs])},[]),KP="beforeRead",GP="read",qP="afterRead",YP="beforeMain",XP="main",QP="afterMain",ZP="beforeWrite",JP="write",eR="afterWrite",tR=[KP,GP,qP,YP,XP,QP,ZP,JP,eR];function er(e){return e?(e.nodeName||"").toLowerCase():null}function sn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function yo(e){var t=sn(e).Element;return e instanceof t||e instanceof Element}function wn(e){var t=sn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Af(e){if(typeof ShadowRoot>"u")return!1;var t=sn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function nR(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!wn(i)||!er(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function rR(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!wn(o)||!er(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const oR={name:"applyStyles",enabled:!0,phase:"write",fn:nR,effect:rR,requires:["computeStyles"]};function Qn(e){return e.split("-")[0]}var lo=Math.max,Ul=Math.min,gi=Math.round;function tp(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nx(){return!/^((?!chrome|android).)*safari/i.test(tp())}function yi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&wn(e)&&(o=e.offsetWidth>0&&gi(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&gi(r.height)/e.offsetHeight||1);var s=yo(e)?sn(e):window,a=s.visualViewport,l=!Nx()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/o,u=(r.top+(l&&a?a.offsetTop:0))/i,p=r.width/o,f=r.height/i;return{width:p,height:f,top:u,right:c+p,bottom:u+f,left:c,x:c,y:u}}function Lf(e){var t=yi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Ax(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Af(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function hr(e){return sn(e).getComputedStyle(e)}function iR(e){return["table","td","th"].indexOf(er(e))>=0}function Gr(e){return((yo(e)?e.ownerDocument:e.document)||window.document).documentElement}function Kc(e){return er(e)==="html"?e:e.assignedSlot||e.parentNode||(Af(e)?e.host:null)||Gr(e)}function bv(e){return!wn(e)||hr(e).position==="fixed"?null:e.offsetParent}function sR(e){var t=/firefox/i.test(tp()),n=/Trident/i.test(tp());if(n&&wn(e)){var r=hr(e);if(r.position==="fixed")return null}var o=Kc(e);for(Af(o)&&(o=o.host);wn(o)&&["html","body"].indexOf(er(o))<0;){var i=hr(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function da(e){for(var t=sn(e),n=bv(e);n&&iR(n)&&hr(n).position==="static";)n=bv(n);return n&&(er(n)==="html"||er(n)==="body"&&hr(n).position==="static")?t:n||sR(e)||t}function zf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function hs(e,t,n){return lo(e,Ul(t,n))}function aR(e,t,n){var r=hs(e,t,n);return r>n?n:r}function Lx(){return{top:0,right:0,bottom:0,left:0}}function zx(e){return Object.assign({},Lx(),e)}function Bx(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var lR=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,zx(typeof t!="number"?t:Bx(t,ua))};function cR(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Qn(n.placement),l=zf(a),c=[Gt,Tn].indexOf(a)>=0,u=c?"height":"width";if(!(!i||!s)){var p=lR(o.padding,n),f=Lf(i),x=l==="y"?Kt:Gt,b=l==="y"?Rn:Tn,y=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],w=s[l]-n.rects.reference[l],h=da(i),v=h?l==="y"?h.clientHeight||0:h.clientWidth||0:0,g=y/2-w/2,C=p[x],k=v-f[u]-p[b],$=v/2-f[u]/2+g,E=hs(C,$,k),P=l;n.modifiersData[r]=(t={},t[P]=E,t.centerOffset=E-$,t)}}function uR(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Ax(t.elements.popper,o)&&(t.elements.arrow=o))}const dR={name:"arrow",enabled:!0,phase:"main",fn:cR,effect:uR,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xi(e){return e.split("-")[1]}var pR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fR(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:gi(n*o)/o||0,y:gi(r*o)/o||0}}function Sv(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,p=e.isFixed,f=s.x,x=f===void 0?0:f,b=s.y,y=b===void 0?0:b,w=typeof u=="function"?u({x,y}):{x,y};x=w.x,y=w.y;var h=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),g=Gt,C=Kt,k=window;if(c){var $=da(n),E="clientHeight",P="clientWidth";if($===sn(n)&&($=Gr(n),hr($).position!=="static"&&a==="absolute"&&(E="scrollHeight",P="scrollWidth")),$=$,o===Kt||(o===Gt||o===Tn)&&i===Vs){C=Rn;var _=p&&$===k&&k.visualViewport?k.visualViewport.height:$[E];y-=_-r.height,y*=l?1:-1}if(o===Gt||(o===Kt||o===Rn)&&i===Vs){g=Tn;var R=p&&$===k&&k.visualViewport?k.visualViewport.width:$[P];x-=R-r.width,x*=l?1:-1}}var j=Object.assign({position:a},c&&pR),A=u===!0?fR({x,y},sn(n)):{x,y};if(x=A.x,y=A.y,l){var M;return Object.assign({},j,(M={},M[C]=v?"0":"",M[g]=h?"0":"",M.transform=(k.devicePixelRatio||1)<=1?"translate("+x+"px, "+y+"px)":"translate3d("+x+"px, "+y+"px, 0)",M))}return Object.assign({},j,(t={},t[C]=v?y+"px":"",t[g]=h?x+"px":"",t.transform="",t))}function mR(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Qn(t.placement),variation:xi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Sv(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Sv(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const hR={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:mR,data:{}};var Ia={passive:!0};function vR(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,a=s===void 0?!0:s,l=sn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,Ia)}),a&&l.addEventListener("resize",n.update,Ia),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Ia)}),a&&l.removeEventListener("resize",n.update,Ia)}}const gR={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vR,data:{}};var yR={left:"right",right:"left",bottom:"top",top:"bottom"};function sl(e){return e.replace(/left|right|bottom|top/g,function(t){return yR[t]})}var xR={start:"end",end:"start"};function Cv(e){return e.replace(/start|end/g,function(t){return xR[t]})}function Bf(e){var t=sn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Df(e){return yi(Gr(e)).left+Bf(e).scrollLeft}function bR(e,t){var n=sn(e),r=Gr(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=Nx();(c||!c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+Df(e),y:l}}function SR(e){var t,n=Gr(e),r=Bf(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=lo(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=lo(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+Df(e),l=-r.scrollTop;return hr(o||n).direction==="rtl"&&(a+=lo(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function Ff(e){var t=hr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Dx(e){return["html","body","#document"].indexOf(er(e))>=0?e.ownerDocument.body:wn(e)&&Ff(e)?e:Dx(Kc(e))}function vs(e,t){var n;t===void 0&&(t=[]);var r=Dx(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=sn(r),s=o?[i].concat(i.visualViewport||[],Ff(r)?r:[]):r,a=t.concat(s);return o?a:a.concat(vs(Kc(s)))}function np(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function CR(e,t){var n=yi(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function wv(e,t,n){return t===_x?np(bR(e,n)):yo(t)?CR(t,n):np(SR(Gr(e)))}function wR(e){var t=vs(Kc(e)),n=["absolute","fixed"].indexOf(hr(e).position)>=0,r=n&&wn(e)?da(e):e;return yo(r)?t.filter(function(o){return yo(o)&&Ax(o,r)&&er(o)!=="body"}):[]}function kR(e,t,n,r){var o=t==="clippingParents"?wR(e):[].concat(t),i=[].concat(o,[n]),s=i[0],a=i.reduce(function(l,c){var u=wv(e,c,r);return l.top=lo(u.top,l.top),l.right=Ul(u.right,l.right),l.bottom=Ul(u.bottom,l.bottom),l.left=lo(u.left,l.left),l},wv(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Fx(e){var t=e.reference,n=e.element,r=e.placement,o=r?Qn(r):null,i=r?xi(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(o){case Kt:l={x:s,y:t.y-n.height};break;case Rn:l={x:s,y:t.y+t.height};break;case Tn:l={x:t.x+t.width,y:a};break;case Gt:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=o?zf(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case vi:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Vs:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Hs(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,s=i===void 0?e.strategy:i,a=n.boundary,l=a===void 0?VP:a,c=n.rootBoundary,u=c===void 0?_x:c,p=n.elementContext,f=p===void 0?Ki:p,x=n.altBoundary,b=x===void 0?!1:x,y=n.padding,w=y===void 0?0:y,h=zx(typeof w!="number"?w:Bx(w,ua)),v=f===Ki?HP:Ki,g=e.rects.popper,C=e.elements[b?v:f],k=kR(yo(C)?C:C.contextElement||Gr(e.elements.popper),l,u,s),$=yi(e.elements.reference),E=Fx({reference:$,element:g,strategy:"absolute",placement:o}),P=np(Object.assign({},g,E)),_=f===Ki?P:$,R={top:k.top-_.top+h.top,bottom:_.bottom-k.bottom+h.bottom,left:k.left-_.left+h.left,right:_.right-k.right+h.right},j=e.modifiersData.offset;if(f===Ki&&j){var A=j[o];Object.keys(R).forEach(function(M){var O=[Tn,Rn].indexOf(M)>=0?1:-1,N=[Kt,Rn].indexOf(M)>=0?"y":"x";R[M]+=A[N]*O})}return R}function ER(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Ix:l,u=xi(r),p=u?a?xv:xv.filter(function(b){return xi(b)===u}):ua,f=p.filter(function(b){return c.indexOf(b)>=0});f.length===0&&(f=p);var x=f.reduce(function(b,y){return b[y]=Hs(e,{placement:y,boundary:o,rootBoundary:i,padding:s})[Qn(y)],b},{});return Object.keys(x).sort(function(b,y){return x[b]-x[y]})}function $R(e){if(Qn(e)===Nf)return[];var t=sl(e);return[Cv(e),t,Cv(t)]}function PR(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,p=n.rootBoundary,f=n.altBoundary,x=n.flipVariations,b=x===void 0?!0:x,y=n.allowedAutoPlacements,w=t.options.placement,h=Qn(w),v=h===w,g=l||(v||!b?[sl(w)]:$R(w)),C=[w].concat(g).reduce(function(X,K){return X.concat(Qn(K)===Nf?ER(t,{placement:K,boundary:u,rootBoundary:p,padding:c,flipVariations:b,allowedAutoPlacements:y}):K)},[]),k=t.rects.reference,$=t.rects.popper,E=new Map,P=!0,_=C[0],R=0;R=0,N=O?"width":"height",L=Hs(t,{placement:j,boundary:u,rootBoundary:p,altBoundary:f,padding:c}),B=O?M?Tn:Gt:M?Rn:Kt;k[N]>$[N]&&(B=sl(B));var T=sl(B),I=[];if(i&&I.push(L[A]<=0),a&&I.push(L[B]<=0,L[T]<=0),I.every(function(X){return X})){_=j,P=!1;break}E.set(j,I)}if(P)for(var W=b?3:1,q=function(K){var re=C.find(function(ke){var ve=E.get(ke);if(ve)return ve.slice(0,K).every(function(he){return he})});if(re)return _=re,"break"},se=W;se>0;se--){var ce=q(se);if(ce==="break")break}t.placement!==_&&(t.modifiersData[r]._skip=!0,t.placement=_,t.reset=!0)}}const RR={name:"flip",enabled:!0,phase:"main",fn:PR,requiresIfExists:["offset"],data:{_skip:!1}};function kv(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ev(e){return[Kt,Tn,Rn,Gt].some(function(t){return e[t]>=0})}function TR(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=Hs(t,{elementContext:"reference"}),a=Hs(t,{altBoundary:!0}),l=kv(s,r),c=kv(a,o,i),u=Ev(l),p=Ev(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}const MR={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:TR};function jR(e,t,n){var r=Qn(e),o=[Gt,Kt].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Gt,Tn].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function OR(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,s=Ix.reduce(function(u,p){return u[p]=jR(p,t.rects,i),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const _R={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:OR};function IR(e){var t=e.state,n=e.name;t.modifiersData[n]=Fx({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const NR={name:"popperOffsets",enabled:!0,phase:"read",fn:IR,data:{}};function AR(e){return e==="x"?"y":"x"}function LR(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,p=n.padding,f=n.tether,x=f===void 0?!0:f,b=n.tetherOffset,y=b===void 0?0:b,w=Hs(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:u}),h=Qn(t.placement),v=xi(t.placement),g=!v,C=zf(h),k=AR(C),$=t.modifiersData.popperOffsets,E=t.rects.reference,P=t.rects.popper,_=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if($){if(i){var M,O=C==="y"?Kt:Gt,N=C==="y"?Rn:Tn,L=C==="y"?"height":"width",B=$[C],T=B+w[O],I=B-w[N],W=x?-P[L]/2:0,q=v===vi?E[L]:P[L],se=v===vi?-P[L]:-E[L],ce=t.elements.arrow,X=x&&ce?Lf(ce):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Lx(),re=K[O],ke=K[N],ve=hs(0,E[L],X[L]),he=g?E[L]/2-W-ve-re-R.mainAxis:q-ve-re-R.mainAxis,Be=g?-E[L]/2+W+ve+ke+R.mainAxis:se+ve+ke+R.mainAxis,ae=t.elements.arrow&&da(t.elements.arrow),Re=ae?C==="y"?ae.clientTop||0:ae.clientLeft||0:0,le=(M=j==null?void 0:j[C])!=null?M:0,pe=B+he-le-Re,ue=B+Be-le,gt=hs(x?Ul(T,pe):T,B,x?lo(I,ue):I);$[C]=gt,A[C]=gt-B}if(a){var _e,Oe=C==="x"?Kt:Gt,at=C==="x"?Rn:Tn,Te=$[k],ge=k==="y"?"height":"width",nt=Te+w[Oe],De=Te-w[at],be=[Kt,Gt].indexOf(h)!==-1,lt=(_e=j==null?void 0:j[k])!=null?_e:0,pt=be?nt:Te-E[ge]-P[ge]-lt+R.altAxis,yt=be?Te+E[ge]+P[ge]-lt-R.altAxis:De,ye=x&&be?aR(pt,Te,yt):hs(x?pt:nt,Te,x?yt:De);$[k]=ye,A[k]=ye-Te}t.modifiersData[r]=A}}const zR={name:"preventOverflow",enabled:!0,phase:"main",fn:LR,requiresIfExists:["offset"]};function BR(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function DR(e){return e===sn(e)||!wn(e)?Bf(e):BR(e)}function FR(e){var t=e.getBoundingClientRect(),n=gi(t.width)/e.offsetWidth||1,r=gi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function WR(e,t,n){n===void 0&&(n=!1);var r=wn(t),o=wn(t)&&FR(t),i=Gr(t),s=yi(e,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((er(t)!=="body"||Ff(i))&&(a=DR(t)),wn(t)?(l=yi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Df(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function UR(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function VR(e){var t=UR(e);return tR.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function HR(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function KR(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var $v={placement:"bottom",modifiers:[],strategy:"absolute"};function Pv(){for(var e=arguments.length,t=new Array(e),n=0;n{i||a(XR(o)||document.body)},[o,i]),on(()=>{if(s&&!i)return Al(n,s),()=>{Al(n,null)}},[n,s,i]),i){if(m.isValidElement(r)){const c={ref:l};return m.cloneElement(r,c)}return d.jsx(m.Fragment,{children:r})}return d.jsx(m.Fragment,{children:s&&sf.createPortal(r,s)})}),Wx=QR;function ZR(e){return te("MuiPopper",e)}ne("MuiPopper",["root"]);const JR=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],eT=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function tT(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function rp(e){return typeof e=="function"?e():e}function nT(e){return e.nodeType!==void 0}const rT=e=>{const{classes:t}=e;return oe({root:["root"]},ZR,t)},oT={},iT=m.forwardRef(function(t,n){var r;const{anchorEl:o,children:i,direction:s,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:p,popperRef:f,slotProps:x={},slots:b={},TransitionProps:y}=t,w=U(t,JR),h=m.useRef(null),v=Ke(h,n),g=m.useRef(null),C=Ke(g,f),k=m.useRef(C);on(()=>{k.current=C},[C]),m.useImperativeHandle(f,()=>g.current,[]);const $=tT(u,s),[E,P]=m.useState($),[_,R]=m.useState(rp(o));m.useEffect(()=>{g.current&&g.current.forceUpdate()}),m.useEffect(()=>{o&&R(rp(o))},[o]),on(()=>{if(!_||!c)return;const N=T=>{P(T.placement)};let L=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:T})=>{N(T)}}];l!=null&&(L=L.concat(l)),p&&p.modifiers!=null&&(L=L.concat(p.modifiers));const B=YR(_,h.current,S({placement:$},p,{modifiers:L}));return k.current(B),()=>{B.destroy(),k.current(null)}},[_,a,l,c,p,$]);const j={placement:E};y!==null&&(j.TransitionProps=y);const A=rT(t),M=(r=b.root)!=null?r:"div",O=$n({elementType:M,externalSlotProps:x.root,externalForwardedProps:w,additionalProps:{role:"tooltip",ref:v},ownerState:t,className:A.root});return d.jsx(M,S({},O,{children:typeof i=="function"?i(j):i}))}),sT=m.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:p="bottom",popperOptions:f=oT,popperRef:x,style:b,transition:y=!1,slotProps:w={},slots:h={}}=t,v=U(t,eT),[g,C]=m.useState(!0),k=()=>{C(!1)},$=()=>{C(!0)};if(!l&&!u&&(!y||g))return null;let E;if(i)E=i;else if(r){const R=rp(r);E=R&&nT(R)?it(R).body:it(null).body}const P=!u&&l&&(!y||g)?"none":void 0,_=y?{in:u,onEnter:k,onExited:$}:void 0;return d.jsx(Wx,{disablePortal:a,container:E,children:d.jsx(iT,S({anchorEl:r,direction:s,disablePortal:a,modifiers:c,ref:n,open:y?!g:u,placement:p,popperOptions:f,popperRef:x,slotProps:w,slots:h},v,{style:S({position:"fixed",top:0,left:0,display:P},b),TransitionProps:_,children:o}))})}),aT=sT,lT=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],cT=D(aT,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),uT=m.forwardRef(function(t,n){var r;const o=jx(),i=ie({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:l,componentsProps:c,container:u,disablePortal:p,keepMounted:f,modifiers:x,open:b,placement:y,popperOptions:w,popperRef:h,transition:v,slots:g,slotProps:C}=i,k=U(i,lT),$=(r=g==null?void 0:g.root)!=null?r:l==null?void 0:l.Root,E=S({anchorEl:s,container:u,disablePortal:p,keepMounted:f,modifiers:x,open:b,placement:y,popperOptions:w,popperRef:h,transition:v},k);return d.jsx(cT,S({as:a,direction:o==null?void 0:o.direction,slots:{root:$},slotProps:C??c},E,{ref:n}))}),Ux=uT,dT=nr(d.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function pT(e){return te("MuiChip",e)}const fT=ne("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),we=fT,mT=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],hT=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:s,clickable:a,variant:l}=e,c={root:["root",l,n&&"disabled",`size${z(r)}`,`color${z(o)}`,a&&"clickable",a&&`clickableColor${z(o)}`,s&&"deletable",s&&`deletableColor${z(o)}`,`${l}${z(o)}`],label:["label",`label${z(r)}`],avatar:["avatar",`avatar${z(r)}`,`avatarColor${z(o)}`],icon:["icon",`icon${z(r)}`,`iconColor${z(i)}`],deleteIcon:["deleteIcon",`deleteIcon${z(r)}`,`deleteIconColor${z(o)}`,`deleteIcon${z(l)}Color${z(o)}`]};return oe(c,pT,t)},vT=D("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:s,size:a,variant:l}=n;return[{[`& .${we.avatar}`]:t.avatar},{[`& .${we.avatar}`]:t[`avatar${z(a)}`]},{[`& .${we.avatar}`]:t[`avatarColor${z(r)}`]},{[`& .${we.icon}`]:t.icon},{[`& .${we.icon}`]:t[`icon${z(a)}`]},{[`& .${we.icon}`]:t[`iconColor${z(o)}`]},{[`& .${we.deleteIcon}`]:t.deleteIcon},{[`& .${we.deleteIcon}`]:t[`deleteIcon${z(a)}`]},{[`& .${we.deleteIcon}`]:t[`deleteIconColor${z(r)}`]},{[`& .${we.deleteIcon}`]:t[`deleteIcon${z(l)}Color${z(r)}`]},t.root,t[`size${z(a)}`],t[`color${z(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${z(r)})`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${z(r)}`],t[l],t[`${l}${z(r)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return S({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${we.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${we.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${we.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${we.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${we.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${we.icon}`]:S({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&S({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},t.color!=="default"&&{color:"inherit"})),[`& .${we.deleteIcon}`]:S({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Pe(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Pe(e.palette.text.primary,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:Pe(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${we.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Pe(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${we.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>S({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Pe(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${we.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Pe(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${we.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>S({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${we.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${we.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${we.avatar}`]:{marginLeft:4},[`& .${we.avatarSmall}`]:{marginLeft:2},[`& .${we.icon}`]:{marginLeft:4},[`& .${we.iconSmall}`]:{marginLeft:2},[`& .${we.deleteIcon}`]:{marginRight:5},[`& .${we.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Pe(e.palette[t.color].main,.7)}`,[`&.${we.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${we.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Pe(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${we.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Pe(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),gT=D("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${z(r)}`]]}})(({ownerState:e})=>S({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function Rv(e){return e.key==="Backspace"||e.key==="Delete"}const yT=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:p,label:f,onClick:x,onDelete:b,onKeyDown:y,onKeyUp:w,size:h="medium",variant:v="filled",tabIndex:g,skipFocusWhenDisabled:C=!1}=r,k=U(r,mT),$=m.useRef(null),E=Ke($,n),P=I=>{I.stopPropagation(),b&&b(I)},_=I=>{I.currentTarget===I.target&&Rv(I)&&I.preventDefault(),y&&y(I)},R=I=>{I.currentTarget===I.target&&(b&&Rv(I)?b(I):I.key==="Escape"&&$.current&&$.current.blur()),w&&w(I)},j=s!==!1&&x?!0:s,A=j||b?Jn:l||"div",M=S({},r,{component:A,disabled:u,size:h,color:a,iconColor:m.isValidElement(p)&&p.props.color||a,onDelete:!!b,clickable:j,variant:v}),O=hT(M),N=A===Jn?S({component:l||"div",focusVisibleClassName:O.focusVisible},b&&{disableRipple:!0}):{};let L=null;b&&(L=c&&m.isValidElement(c)?m.cloneElement(c,{className:V(c.props.className,O.deleteIcon),onClick:P}):d.jsx(dT,{className:V(O.deleteIcon),onClick:P}));let B=null;o&&m.isValidElement(o)&&(B=m.cloneElement(o,{className:V(O.avatar,o.props.className)}));let T=null;return p&&m.isValidElement(p)&&(T=m.cloneElement(p,{className:V(O.icon,p.props.className)})),d.jsxs(vT,S({as:A,className:V(O.root,i),disabled:j&&u?!0:void 0,onClick:x,onKeyDown:_,onKeyUp:R,ref:E,tabIndex:C&&u?-1:g,ownerState:M},N,k,{children:[B||T,d.jsx(gT,{className:V(O.label),ownerState:M,children:f}),L]}))}),yn=yT,xT=["onChange","maxRows","minRows","style","value"];function Na(e){return parseInt(e,10)||0}const bT={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function ST(e){for(const t in e)return!1;return!0}function Tv(e){return ST(e)||e.outerHeightStyle===0&&!e.overflowing}const CT=m.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:s,value:a}=t,l=U(t,xT),{current:c}=m.useRef(a!=null),u=m.useRef(null),p=Ke(n,u),f=m.useRef(null),x=m.useRef(null),b=m.useCallback(()=>{const g=u.current,C=x.current;if(!g||!C)return;const $=Zn(g).getComputedStyle(g);if($.width==="0px")return{outerHeightStyle:0,overflowing:!1};C.style.width=$.width,C.value=g.value||t.placeholder||"x",C.value.slice(-1)===` +`&&(C.value+=" ");const E=$.boxSizing,P=Na($.paddingBottom)+Na($.paddingTop),_=Na($.borderBottomWidth)+Na($.borderTopWidth),R=C.scrollHeight;C.value="x";const j=C.scrollHeight;let A=R;i&&(A=Math.max(Number(i)*j,A)),o&&(A=Math.min(Number(o)*j,A)),A=Math.max(A,j);const M=A+(E==="border-box"?P+_:0),O=Math.abs(A-R)<=1;return{outerHeightStyle:M,overflowing:O}},[o,i,t.placeholder]),y=Tt(()=>{const g=u.current,C=b();if(!g||!C||Tv(C))return!1;const k=C.outerHeightStyle;return f.current!=null&&f.current!==k}),w=m.useCallback(()=>{const g=u.current,C=b();if(!g||!C||Tv(C))return;const k=C.outerHeightStyle;f.current!==k&&(f.current=k,g.style.height=`${k}px`),g.style.overflow=C.overflowing?"hidden":""},[b]),h=m.useRef(-1);on(()=>{const g=sa(w),C=u==null?void 0:u.current;if(!C)return;const k=Zn(C);k.addEventListener("resize",g);let $;return typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{y()&&($.unobserve(C),cancelAnimationFrame(h.current),w(),h.current=requestAnimationFrame(()=>{$.observe(C)}))}),$.observe(C)),()=>{g.clear(),cancelAnimationFrame(h.current),k.removeEventListener("resize",g),$&&$.disconnect()}},[b,w,y]),on(()=>{w()});const v=g=>{c||w(),r&&r(g)};return d.jsxs(m.Fragment,{children:[d.jsx("textarea",S({value:a,onChange:v,ref:p,rows:i,style:s},l)),d.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:x,tabIndex:-1,style:S({},bT.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),wT=CT;function ji({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const kT=m.createContext(void 0),Wf=kT;function ko(){return m.useContext(Wf)}function Mv(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Vl(e,t=!1){return e&&(Mv(e.value)&&e.value!==""||t&&Mv(e.defaultValue)&&e.defaultValue!=="")}function ET(e){return e.startAdornment}function $T(e){return te("MuiInputBase",e)}const PT=ne("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),bi=PT,RT=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Gc=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${z(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},qc=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},TT=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:p,size:f,startAdornment:x,type:b}=e,y={root:["root",`color${z(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",f&&f!=="medium"&&`size${z(f)}`,u&&"multiline",x&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",p&&"readOnly"],input:["input",r&&"disabled",b==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",x&&"inputAdornedStart",i&&"inputAdornedEnd",p&&"readOnly"]};return oe(y,$T,t)},Yc=D("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Gc})(({theme:e,ownerState:t})=>S({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${bi.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&S({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),Xc=D("input",{name:"MuiInputBase",slot:"Input",overridesResolver:qc})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=S({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return S({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${bi.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${bi.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),MT=d.jsx($x,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),jT=m.forwardRef(function(t,n){var r;const o=ie({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:p,disabled:f,disableInjectingGlobalStyles:x,endAdornment:b,fullWidth:y=!1,id:w,inputComponent:h="input",inputProps:v={},inputRef:g,maxRows:C,minRows:k,multiline:$=!1,name:E,onBlur:P,onChange:_,onClick:R,onFocus:j,onKeyDown:A,onKeyUp:M,placeholder:O,readOnly:N,renderSuffix:L,rows:B,slotProps:T={},slots:I={},startAdornment:W,type:q="text",value:se}=o,ce=U(o,RT),X=v.value!=null?v.value:se,{current:K}=m.useRef(X!=null),re=m.useRef(),ke=m.useCallback(ye=>{},[]),ve=Ke(re,g,v.ref,ke),[he,Be]=m.useState(!1),ae=ko(),Re=ji({props:o,muiFormControl:ae,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Re.focused=ae?ae.focused:he,m.useEffect(()=>{!ae&&f&&he&&(Be(!1),P&&P())},[ae,f,he,P]);const le=ae&&ae.onFilled,pe=ae&&ae.onEmpty,ue=m.useCallback(ye=>{Vl(ye)?le&&le():pe&&pe()},[le,pe]);on(()=>{K&&ue({value:X})},[X,ue,K]);const gt=ye=>{if(Re.disabled){ye.stopPropagation();return}j&&j(ye),v.onFocus&&v.onFocus(ye),ae&&ae.onFocus?ae.onFocus(ye):Be(!0)},_e=ye=>{P&&P(ye),v.onBlur&&v.onBlur(ye),ae&&ae.onBlur?ae.onBlur(ye):Be(!1)},Oe=(ye,...Z)=>{if(!K){const Ge=ye.target||re.current;if(Ge==null)throw new Error(vo(1));ue({value:Ge.value})}v.onChange&&v.onChange(ye,...Z),_&&_(ye,...Z)};m.useEffect(()=>{ue(re.current)},[]);const at=ye=>{re.current&&ye.currentTarget===ye.target&&re.current.focus(),R&&R(ye)};let Te=h,ge=v;$&&Te==="input"&&(B?ge=S({type:void 0,minRows:B,maxRows:B},ge):ge=S({type:void 0,maxRows:C,minRows:k},ge),Te=wT);const nt=ye=>{ue(ye.animationName==="mui-auto-fill-cancel"?re.current:{value:"x"})};m.useEffect(()=>{ae&&ae.setAdornedStart(!!W)},[ae,W]);const De=S({},o,{color:Re.color||"primary",disabled:Re.disabled,endAdornment:b,error:Re.error,focused:Re.focused,formControl:ae,fullWidth:y,hiddenLabel:Re.hiddenLabel,multiline:$,size:Re.size,startAdornment:W,type:q}),be=TT(De),lt=I.root||c.Root||Yc,pt=T.root||u.root||{},yt=I.input||c.Input||Xc;return ge=S({},ge,(r=T.input)!=null?r:u.input),d.jsxs(m.Fragment,{children:[!x&&MT,d.jsxs(lt,S({},pt,!hi(lt)&&{ownerState:S({},De,pt.ownerState)},{ref:n,onClick:at},ce,{className:V(be.root,pt.className,l,N&&"MuiInputBase-readOnly"),children:[W,d.jsx(Wf.Provider,{value:null,children:d.jsx(yt,S({ownerState:De,"aria-invalid":Re.error,"aria-describedby":i,autoComplete:s,autoFocus:a,defaultValue:p,disabled:Re.disabled,id:w,onAnimationStart:nt,name:E,placeholder:O,readOnly:N,required:Re.required,rows:B,value:X,onKeyDown:A,onKeyUp:M,type:q},ge,!hi(yt)&&{as:Te,ownerState:S({},De,ge.ownerState)},{ref:ve,className:V(be.input,ge.className,N&&"MuiInputBase-readOnly"),onBlur:_e,onChange:Oe,onFocus:gt}))}),b,L?L(S({},Re,{startAdornment:W})):null]}))]})}),Uf=jT;function OT(e){return te("MuiInput",e)}const _T=S({},bi,ne("MuiInput",["root","underline","input"])),Gi=_T;function IT(e){return te("MuiOutlinedInput",e)}const NT=S({},bi,ne("MuiOutlinedInput",["root","notchedOutline","input"])),Sr=NT;function AT(e){return te("MuiFilledInput",e)}const LT=S({},bi,ne("MuiFilledInput",["root","underline","input"])),qr=LT,zT=nr(d.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),BT=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],DT={entering:{opacity:1},entered:{opacity:1}},FT=m.forwardRef(function(t,n){const r=wo(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:p,onEntering:f,onExit:x,onExited:b,onExiting:y,style:w,timeout:h=o,TransitionComponent:v=Tx}=t,g=U(t,BT),C=m.useRef(null),k=Ke(C,Co(a),n),$=O=>N=>{if(O){const L=C.current;N===void 0?O(L):O(L,N)}},E=$(f),P=$((O,N)=>{Mx(O);const L=Wl({style:w,timeout:h,easing:l},{mode:"enter"});O.style.webkitTransition=r.transitions.create("opacity",L),O.style.transition=r.transitions.create("opacity",L),u&&u(O,N)}),_=$(p),R=$(y),j=$(O=>{const N=Wl({style:w,timeout:h,easing:l},{mode:"exit"});O.style.webkitTransition=r.transitions.create("opacity",N),O.style.transition=r.transitions.create("opacity",N),x&&x(O)}),A=$(b),M=O=>{i&&i(C.current,O)};return d.jsx(v,S({appear:s,in:c,nodeRef:C,onEnter:P,onEntered:_,onEntering:E,onExit:j,onExited:A,onExiting:R,addEndListener:M,timeout:h},g,{children:(O,N)=>m.cloneElement(a,S({style:S({opacity:0,visibility:O==="exited"&&!c?"hidden":void 0},DT[O],w,a.props.style),ref:k},N))}))}),Vx=FT;function WT(e){return te("MuiBackdrop",e)}ne("MuiBackdrop",["root","invisible"]);const UT=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],VT=e=>{const{classes:t,invisible:n}=e;return oe({root:["root",n&&"invisible"]},WT,t)},HT=D("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>S({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),KT=m.forwardRef(function(t,n){var r,o,i;const s=ie({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:p={},invisible:f=!1,open:x,slotProps:b={},slots:y={},TransitionComponent:w=Vx,transitionDuration:h}=s,v=U(s,UT),g=S({},s,{component:c,invisible:f}),C=VT(g),k=(r=b.root)!=null?r:p.root;return d.jsx(w,S({in:x,timeout:h},v,{children:d.jsx(HT,S({"aria-hidden":!0},k,{as:(o=(i=y.root)!=null?i:u.Root)!=null?o:c,className:V(C.root,l,k==null?void 0:k.className),ownerState:S({},g,k==null?void 0:k.ownerState),classes:C,ref:n,children:a}))}))}),Hx=KT;function GT(e){return te("MuiBottomNavigation",e)}ne("MuiBottomNavigation",["root"]);const qT=["children","className","component","onChange","showLabels","value"],YT=e=>{const{classes:t}=e;return oe({root:["root"]},GT,t)},XT=D("div",{name:"MuiBottomNavigation",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",height:56,backgroundColor:(e.vars||e).palette.background.paper})),QT=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiBottomNavigation"}),{children:o,className:i,component:s="div",onChange:a,showLabels:l=!1,value:c}=r,u=U(r,qT),p=S({},r,{component:s,showLabels:l}),f=YT(p);return d.jsx(XT,S({as:s,className:V(f.root,i),ref:n,ownerState:p},u,{children:m.Children.map(o,(x,b)=>{if(!m.isValidElement(x))return null;const y=x.props.value===void 0?b:x.props.value;return m.cloneElement(x,{selected:y===c,showLabel:x.props.showLabel!==void 0?x.props.showLabel:l,value:y,onChange:a})})}))}),ZT=QT;function JT(e){return te("MuiBottomNavigationAction",e)}const eM=ne("MuiBottomNavigationAction",["root","iconOnly","selected","label"]),Kx=eM,tM=["className","icon","label","onChange","onClick","selected","showLabel","value"],nM=e=>{const{classes:t,showLabel:n,selected:r}=e;return oe({root:["root",!n&&!r&&"iconOnly",r&&"selected"],label:["label",!n&&!r&&"iconOnly",r&&"selected"]},JT,t)},rM=D(Jn,{name:"MuiBottomNavigationAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.showLabel&&!n.selected&&t.iconOnly]}})(({theme:e,ownerState:t})=>S({transition:e.transitions.create(["color","padding-top"],{duration:e.transitions.duration.short}),padding:"0px 12px",minWidth:80,maxWidth:168,color:(e.vars||e).palette.text.secondary,flexDirection:"column",flex:"1"},!t.showLabel&&!t.selected&&{paddingTop:14},!t.showLabel&&!t.selected&&!t.label&&{paddingTop:0},{[`&.${Kx.selected}`]:{color:(e.vars||e).palette.primary.main}})),oM=D("span",{name:"MuiBottomNavigationAction",slot:"Label",overridesResolver:(e,t)=>t.label})(({theme:e,ownerState:t})=>S({fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s"},!t.showLabel&&!t.selected&&{opacity:0,transitionDelay:"0s"},{[`&.${Kx.selected}`]:{fontSize:e.typography.pxToRem(14)}})),iM=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiBottomNavigationAction"}),{className:o,icon:i,label:s,onChange:a,onClick:l,value:c}=r,u=U(r,tM),p=r,f=nM(p),x=b=>{a&&a(b,c),l&&l(b)};return d.jsxs(rM,S({ref:n,className:V(f.root,o),focusRipple:!0,onClick:x,ownerState:p},u,{children:[i,d.jsx(oM,{className:f.label,ownerState:p,children:s})]}))}),Aa=iM,sM=ne("MuiBox",["root"]),aM=sM,lM=Mf(),cM=Wk({themeId:fi,defaultTheme:lM,defaultClassName:aM.root,generateClassName:wf.generate}),ee=cM;function uM(e){return te("MuiButton",e)}const dM=ne("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),La=dM,pM=m.createContext({}),fM=pM,mM=m.createContext(void 0),hM=mM,vM=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],gM=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:s}=e,a={root:["root",i,`${i}${z(t)}`,`size${z(o)}`,`${i}Size${z(o)}`,`color${z(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${z(o)}`],endIcon:["icon","endIcon",`iconSize${z(o)}`]},l=oe(a,uM,s);return S({},s,l)},Gx=e=>S({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),yM=D(Jn,{shouldForwardProp:e=>un(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${z(n.color)}`],t[`size${z(n.size)}`],t[`${n.variant}Size${z(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return S({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":S({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":S({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${La.focusVisible}`]:S({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${La.disabled}`]:S({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Pe(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${La.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${La.disabled}`]:{boxShadow:"none"}}),xM=D("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${z(n.size)}`]]}})(({ownerState:e})=>S({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},Gx(e))),bM=D("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${z(n.size)}`]]}})(({ownerState:e})=>S({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},Gx(e))),SM=m.forwardRef(function(t,n){const r=m.useContext(fM),o=m.useContext(hM),i=Fs(r,t),s=ie({props:i,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:p=!1,disableElevation:f=!1,disableFocusRipple:x=!1,endIcon:b,focusVisibleClassName:y,fullWidth:w=!1,size:h="medium",startIcon:v,type:g,variant:C="text"}=s,k=U(s,vM),$=S({},s,{color:l,component:c,disabled:p,disableElevation:f,disableFocusRipple:x,fullWidth:w,size:h,type:g,variant:C}),E=gM($),P=v&&d.jsx(xM,{className:E.startIcon,ownerState:$,children:v}),_=b&&d.jsx(bM,{className:E.endIcon,ownerState:$,children:b}),R=o||"";return d.jsxs(yM,S({ownerState:$,className:V(r.className,E.root,u,R),component:c,disabled:p,focusRipple:!x,focusVisibleClassName:V(E.focusVisible,y),ref:n,type:g},k,{classes:E,children:[P,a,_]}))}),Je=SM;function CM(e){return te("MuiCard",e)}ne("MuiCard",["root"]);const wM=["className","raised"],kM=e=>{const{classes:t}=e;return oe({root:["root"]},CM,t)},EM=D(Le,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),$M=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiCard"}),{className:o,raised:i=!1}=r,s=U(r,wM),a=S({},r,{raised:i}),l=kM(a);return d.jsx(EM,S({className:V(l.root,o),elevation:i?8:void 0,ref:n,ownerState:a},s))}),op=$M;function PM(e){return te("MuiCardContent",e)}ne("MuiCardContent",["root"]);const RM=["className","component"],TM=e=>{const{classes:t}=e;return oe({root:["root"]},PM,t)},MM=D("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),jM=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiCardContent"}),{className:o,component:i="div"}=r,s=U(r,RM),a=S({},r,{component:i}),l=TM(a);return d.jsx(MM,S({as:i,className:V(l.root,o),ownerState:a,ref:n},s))}),ip=jM;function OM(e){return te("PrivateSwitchBase",e)}ne("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const _M=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],IM=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${z(o)}`],input:["input"]};return oe(i,OM,t)},NM=D(Jn)(({ownerState:e})=>S({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),AM=D("input",{shouldForwardProp:un})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),LM=m.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:p,id:f,inputProps:x,inputRef:b,name:y,onBlur:w,onChange:h,onFocus:v,readOnly:g,required:C=!1,tabIndex:k,type:$,value:E}=t,P=U(t,_M),[_,R]=Ws({controlled:o,default:!!a,name:"SwitchBase",state:"checked"}),j=ko(),A=I=>{v&&v(I),j&&j.onFocus&&j.onFocus(I)},M=I=>{w&&w(I),j&&j.onBlur&&j.onBlur(I)},O=I=>{if(I.nativeEvent.defaultPrevented)return;const W=I.target.checked;R(W),h&&h(I,W)};let N=l;j&&typeof N>"u"&&(N=j.disabled);const L=$==="checkbox"||$==="radio",B=S({},t,{checked:_,disabled:N,disableFocusRipple:c,edge:u}),T=IM(B);return d.jsxs(NM,S({component:"span",className:V(T.root,s),centerRipple:!0,focusRipple:!c,disabled:N,tabIndex:null,role:void 0,onFocus:A,onBlur:M,ownerState:B,ref:n},P,{children:[d.jsx(AM,S({autoFocus:r,checked:o,defaultChecked:a,className:T.input,disabled:N,id:L?f:void 0,name:y,onChange:O,readOnly:g,ref:b,required:C,ownerState:B,tabIndex:k,type:$},$==="checkbox"&&E===void 0?{}:{value:E},x)),_?i:p]}))}),zM=LM;function BM(e){return te("MuiCircularProgress",e)}ne("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const DM=["className","color","disableShrink","size","style","thickness","value","variant"];let Qc=e=>e,jv,Ov,_v,Iv;const Cr=44,FM=Pi(jv||(jv=Qc` + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +`)),WM=Pi(Ov||(Ov=Qc` + 0% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -15px; + } + + 100% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -125px; + } +`)),UM=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${z(r)}`],svg:["svg"],circle:["circle",`circle${z(n)}`,o&&"circleDisableShrink"]};return oe(i,BM,t)},VM=D("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${z(n.color)}`]]}})(({ownerState:e,theme:t})=>S({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&Ec(_v||(_v=Qc` + animation: ${0} 1.4s linear infinite; + `),FM)),HM=D("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),KM=D("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${z(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>S({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&Ec(Iv||(Iv=Qc` + animation: ${0} 1.4s ease-in-out infinite; + `),WM)),GM=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:s=!1,size:a=40,style:l,thickness:c=3.6,value:u=0,variant:p="indeterminate"}=r,f=U(r,DM),x=S({},r,{color:i,disableShrink:s,size:a,thickness:c,value:u,variant:p}),b=UM(x),y={},w={},h={};if(p==="determinate"){const v=2*Math.PI*((Cr-c)/2);y.strokeDasharray=v.toFixed(3),h["aria-valuenow"]=Math.round(u),y.strokeDashoffset=`${((100-u)/100*v).toFixed(3)}px`,w.transform="rotate(-90deg)"}return d.jsx(VM,S({className:V(b.root,o),style:S({width:a,height:a},w,l),ownerState:x,ref:n,role:"progressbar"},h,f,{children:d.jsx(HM,{className:b.svg,ownerState:x,viewBox:`${Cr/2} ${Cr/2} ${Cr} ${Cr}`,children:d.jsx(KM,{className:b.circle,style:y,ownerState:x,cx:Cr,cy:Cr,r:(Cr-c)/2,fill:"none",strokeWidth:c})})}))}),Gn=GM;function Nv(e){return e.substring(2).toLowerCase()}function qM(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=Ke(Co(t),a),p=Tt(b=>{const y=c.current;c.current=!1;const w=it(a.current);if(!l.current||!a.current||"clientX"in b&&qM(b,w))return;if(s.current){s.current=!1;return}let h;b.composedPath?h=b.composedPath().indexOf(a.current)>-1:h=!w.documentElement.contains(b.target)||a.current.contains(b.target),!h&&(n||!y)&&o(b)}),f=b=>y=>{c.current=!0;const w=t.props[b];w&&w(y)},x={ref:u};return i!==!1&&(x[i]=f(i)),m.useEffect(()=>{if(i!==!1){const b=Nv(i),y=it(a.current),w=()=>{s.current=!0};return y.addEventListener(b,p),y.addEventListener("touchmove",w),()=>{y.removeEventListener(b,p),y.removeEventListener("touchmove",w)}}},[p,i]),r!==!1&&(x[r]=f(r)),m.useEffect(()=>{if(r!==!1){const b=Nv(r),y=it(a.current);return y.addEventListener(b,p),()=>{y.removeEventListener(b,p)}}},[p,r]),d.jsx(m.Fragment,{children:m.cloneElement(t,x)})}const XM=F2({createStyledComponent:D("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${z(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>ie({props:e,name:"MuiContainer"})}),QM=XM;function ZM(e){const t=it(e);return t.body===e?Zn(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function gs(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Av(e){return parseInt(Zn(e).getComputedStyle(e).paddingRight,10)||0}function JM(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function Lv(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,s=>{const a=i.indexOf(s)===-1,l=!JM(s);a&&l&&gs(s,o)})}function Lu(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function ej(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(ZM(r)){const s=lx(it(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Av(r)+s}px`;const a=it(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${Av(l)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=it(r).body;else{const s=r.parentElement,a=Zn(r);i=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:s,property:a})=>{i?s.style.setProperty(a,i):s.style.removeProperty(a)})}}function tj(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class nj{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&gs(t.modalRef,!1);const o=tj(n);Lv(n,t.mount,t.modalRef,o,!0);const i=Lu(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Lu(this.containers,i=>i.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=ej(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Lu(this.containers,s=>s.modals.indexOf(t)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&gs(t.modalRef,n),Lv(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&gs(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const rj=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function oj(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function ij(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function sj(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||ij(e))}function aj(e){const t=[],n=[];return Array.from(e.querySelectorAll(rj)).forEach((r,o)=>{const i=oj(r);i===-1||!sj(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function lj(){return!0}function cj(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=aj,isEnabled:s=lj,open:a}=e,l=m.useRef(!1),c=m.useRef(null),u=m.useRef(null),p=m.useRef(null),f=m.useRef(null),x=m.useRef(!1),b=m.useRef(null),y=Ke(Co(t),b),w=m.useRef(null);m.useEffect(()=>{!a||!b.current||(x.current=!n)},[n,a]),m.useEffect(()=>{if(!a||!b.current)return;const g=it(b.current);return b.current.contains(g.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex","-1"),x.current&&b.current.focus()),()=>{o||(p.current&&p.current.focus&&(l.current=!0,p.current.focus()),p.current=null)}},[a]),m.useEffect(()=>{if(!a||!b.current)return;const g=it(b.current),C=E=>{w.current=E,!(r||!s()||E.key!=="Tab")&&g.activeElement===b.current&&E.shiftKey&&(l.current=!0,u.current&&u.current.focus())},k=()=>{const E=b.current;if(E===null)return;if(!g.hasFocus()||!s()||l.current){l.current=!1;return}if(E.contains(g.activeElement)||r&&g.activeElement!==c.current&&g.activeElement!==u.current)return;if(g.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!x.current)return;let P=[];if((g.activeElement===c.current||g.activeElement===u.current)&&(P=i(b.current)),P.length>0){var _,R;const j=!!((_=w.current)!=null&&_.shiftKey&&((R=w.current)==null?void 0:R.key)==="Tab"),A=P[0],M=P[P.length-1];typeof A!="string"&&typeof M!="string"&&(j?M.focus():A.focus())}else E.focus()};g.addEventListener("focusin",k),g.addEventListener("keydown",C,!0);const $=setInterval(()=>{g.activeElement&&g.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval($),g.removeEventListener("focusin",k),g.removeEventListener("keydown",C,!0)}},[n,r,o,s,a,i]);const h=g=>{p.current===null&&(p.current=g.relatedTarget),x.current=!0,f.current=g.target;const C=t.props.onFocus;C&&C(g)},v=g=>{p.current===null&&(p.current=g.relatedTarget),x.current=!0};return d.jsxs(m.Fragment,{children:[d.jsx("div",{tabIndex:a?0:-1,onFocus:v,ref:c,"data-testid":"sentinelStart"}),m.cloneElement(t,{ref:y,onFocus:h}),d.jsx("div",{tabIndex:a?0:-1,onFocus:v,ref:u,"data-testid":"sentinelEnd"})]})}function uj(e){return typeof e=="function"?e():e}function dj(e){return e?e.props.hasOwnProperty("in"):!1}const pj=new nj;function fj(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=pj,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:p}=e,f=m.useRef({}),x=m.useRef(null),b=m.useRef(null),y=Ke(b,p),[w,h]=m.useState(!u),v=dj(l);let g=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(g=!1);const C=()=>it(x.current),k=()=>(f.current.modalRef=b.current,f.current.mount=x.current,f.current),$=()=>{o.mount(k(),{disableScrollLock:r}),b.current&&(b.current.scrollTop=0)},E=Tt(()=>{const L=uj(t)||C().body;o.add(k(),L),b.current&&$()}),P=m.useCallback(()=>o.isTopModal(k()),[o]),_=Tt(L=>{x.current=L,L&&(u&&P()?$():b.current&&gs(b.current,g))}),R=m.useCallback(()=>{o.remove(k(),g)},[g,o]);m.useEffect(()=>()=>{R()},[R]),m.useEffect(()=>{u?E():(!v||!i)&&R()},[u,R,v,i,E]);const j=L=>B=>{var T;(T=L.onKeyDown)==null||T.call(L,B),!(B.key!=="Escape"||B.which===229||!P())&&(n||(B.stopPropagation(),c&&c(B,"escapeKeyDown")))},A=L=>B=>{var T;(T=L.onClick)==null||T.call(L,B),B.target===B.currentTarget&&c&&c(B,"backdropClick")};return{getRootProps:(L={})=>{const B=Ll(e);delete B.onTransitionEnter,delete B.onTransitionExited;const T=S({},B,L);return S({role:"presentation"},T,{onKeyDown:j(T),ref:y})},getBackdropProps:(L={})=>{const B=L;return S({"aria-hidden":!0},B,{onClick:A(B),open:u})},getTransitionProps:()=>{const L=()=>{h(!1),s&&s()},B=()=>{h(!0),a&&a(),i&&R()};return{onEnter:Yd(L,l==null?void 0:l.props.onEnter),onExited:Yd(B,l==null?void 0:l.props.onExited)}},rootRef:y,portalRef:_,isTopModal:P,exited:w,hasTransition:v}}function mj(e){return te("MuiModal",e)}ne("MuiModal",["root","hidden","backdrop"]);const hj=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],vj=e=>{const{open:t,exited:n,classes:r}=e;return oe({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},mj,r)},gj=D("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>S({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),yj=D(Hx,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),xj=m.forwardRef(function(t,n){var r,o,i,s,a,l;const c=ie({name:"MuiModal",props:t}),{BackdropComponent:u=yj,BackdropProps:p,className:f,closeAfterTransition:x=!1,children:b,container:y,component:w,components:h={},componentsProps:v={},disableAutoFocus:g=!1,disableEnforceFocus:C=!1,disableEscapeKeyDown:k=!1,disablePortal:$=!1,disableRestoreFocus:E=!1,disableScrollLock:P=!1,hideBackdrop:_=!1,keepMounted:R=!1,onBackdropClick:j,open:A,slotProps:M,slots:O}=c,N=U(c,hj),L=S({},c,{closeAfterTransition:x,disableAutoFocus:g,disableEnforceFocus:C,disableEscapeKeyDown:k,disablePortal:$,disableRestoreFocus:E,disableScrollLock:P,hideBackdrop:_,keepMounted:R}),{getRootProps:B,getBackdropProps:T,getTransitionProps:I,portalRef:W,isTopModal:q,exited:se,hasTransition:ce}=fj(S({},L,{rootRef:n})),X=S({},L,{exited:se}),K=vj(X),re={};if(b.props.tabIndex===void 0&&(re.tabIndex="-1"),ce){const{onEnter:le,onExited:pe}=I();re.onEnter=le,re.onExited=pe}const ke=(r=(o=O==null?void 0:O.root)!=null?o:h.Root)!=null?r:gj,ve=(i=(s=O==null?void 0:O.backdrop)!=null?s:h.Backdrop)!=null?i:u,he=(a=M==null?void 0:M.root)!=null?a:v.root,Be=(l=M==null?void 0:M.backdrop)!=null?l:v.backdrop,ae=$n({elementType:ke,externalSlotProps:he,externalForwardedProps:N,getSlotProps:B,additionalProps:{ref:n,as:w},ownerState:X,className:V(f,he==null?void 0:he.className,K==null?void 0:K.root,!X.open&&X.exited&&(K==null?void 0:K.hidden))}),Re=$n({elementType:ve,externalSlotProps:Be,additionalProps:p,getSlotProps:le=>T(S({},le,{onClick:pe=>{j&&j(pe),le!=null&&le.onClick&&le.onClick(pe)}})),className:V(Be==null?void 0:Be.className,p==null?void 0:p.className,K==null?void 0:K.backdrop),ownerState:X});return!R&&!A&&(!ce||se)?null:d.jsx(Wx,{ref:W,container:y,disablePortal:$,children:d.jsxs(ke,S({},ae,{children:[!_&&u?d.jsx(ve,S({},Re)):null,d.jsx(cj,{disableEnforceFocus:C,disableAutoFocus:g,disableRestoreFocus:E,isEnabled:q,open:A,children:m.cloneElement(b,re)})]}))})}),qx=xj;function bj(e){return te("MuiDialog",e)}const Sj=ne("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),zu=Sj,Cj=m.createContext({}),Yx=Cj,wj=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],kj=D(Hx,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Ej=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,s={root:["root"],container:["container",`scroll${z(n)}`],paper:["paper",`paperScroll${z(n)}`,`paperWidth${z(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return oe(s,bj,t)},$j=D(qx,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Pj=D("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${z(n.scroll)}`]]}})(({ownerState:e})=>S({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),Rj=D(Le,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${z(n.scroll)}`],t[`paperWidth${z(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>S({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${zu.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${zu.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${zu.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Tj=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiDialog"}),o=wo(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:l,BackdropProps:c,children:u,className:p,disableEscapeKeyDown:f=!1,fullScreen:x=!1,fullWidth:b=!1,maxWidth:y="sm",onBackdropClick:w,onClick:h,onClose:v,open:g,PaperComponent:C=Le,PaperProps:k={},scroll:$="paper",TransitionComponent:E=Vx,transitionDuration:P=i,TransitionProps:_}=r,R=U(r,wj),j=S({},r,{disableEscapeKeyDown:f,fullScreen:x,fullWidth:b,maxWidth:y,scroll:$}),A=Ej(j),M=m.useRef(),O=T=>{M.current=T.target===T.currentTarget},N=T=>{h&&h(T),M.current&&(M.current=null,w&&w(T),v&&v(T,"backdropClick"))},L=aa(a),B=m.useMemo(()=>({titleId:L}),[L]);return d.jsx($j,S({className:V(A.root,p),closeAfterTransition:!0,components:{Backdrop:kj},componentsProps:{backdrop:S({transitionDuration:P,as:l},c)},disableEscapeKeyDown:f,onClose:v,open:g,ref:n,onClick:N,ownerState:j},R,{children:d.jsx(E,S({appear:!0,in:g,timeout:P,role:"presentation"},_,{children:d.jsx(Pj,{className:V(A.container),onMouseDown:O,ownerState:j,children:d.jsx(Rj,S({as:C,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":L},k,{className:V(A.paper,k.className),ownerState:j,children:d.jsx(Yx.Provider,{value:B,children:u})}))})}))}))}),Vf=Tj;function Mj(e){return te("MuiDialogActions",e)}ne("MuiDialogActions",["root","spacing"]);const jj=["className","disableSpacing"],Oj=e=>{const{classes:t,disableSpacing:n}=e;return oe({root:["root",!n&&"spacing"]},Mj,t)},_j=D("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>S({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),Ij=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1}=r,s=U(r,jj),a=S({},r,{disableSpacing:i}),l=Oj(a);return d.jsx(_j,S({className:V(l.root,o),ownerState:a,ref:n},s))}),Hf=Ij;function Nj(e){return te("MuiDialogContent",e)}ne("MuiDialogContent",["root","dividers"]);function Aj(e){return te("MuiDialogTitle",e)}const Lj=ne("MuiDialogTitle",["root"]),zj=Lj,Bj=["className","dividers"],Dj=e=>{const{classes:t,dividers:n}=e;return oe({root:["root",n&&"dividers"]},Nj,t)},Fj=D("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>S({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${zj.root} + &`]:{paddingTop:0}})),Wj=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1}=r,s=U(r,Bj),a=S({},r,{dividers:i}),l=Dj(a);return d.jsx(Fj,S({className:V(l.root,o),ownerState:a,ref:n},s))}),Kf=Wj,Uj=["className","id"],Vj=e=>{const{classes:t}=e;return oe({root:["root"]},Aj,t)},Hj=D(Q,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),Kj=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiDialogTitle"}),{className:o,id:i}=r,s=U(r,Uj),a=r,l=Vj(a),{titleId:c=i}=m.useContext(Yx);return d.jsx(Hj,S({component:"h2",className:V(l.root,o),ownerState:a,ref:n,variant:"h6",id:i??c},s))}),Gf=Kj;function Gj(e){return te("MuiDivider",e)}const qj=ne("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),zv=qj,Yj=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Xj=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:s,textAlign:a,variant:l}=e;return oe({root:["root",t&&"absolute",l,i&&"light",s==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},Gj,r)},Qj=D("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>S({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Pe(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>S({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>S({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>S({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>S({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Zj=D("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>S({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),Xx=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:s,component:a=i?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:p=a!=="hr"?"separator":void 0,textAlign:f="center",variant:x="fullWidth"}=r,b=U(r,Yj),y=S({},r,{absolute:o,component:a,flexItem:l,light:c,orientation:u,role:p,textAlign:f,variant:x}),w=Xj(y);return d.jsx(Qj,S({as:a,className:V(w.root,s),role:p,ref:n,ownerState:y},b,{children:i?d.jsx(Zj,{className:w.wrapper,ownerState:y,children:i}):null}))});Xx.muiSkipListHighlight=!0;const Dn=Xx,Jj=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],eO=e=>{const{classes:t,disableUnderline:n}=e,o=oe({root:["root",!n&&"underline"],input:["input"]},AT,t);return S({},t,o)},tO=D(Yc,{shouldForwardProp:e=>un(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Gc(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return S({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${qr.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${qr.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${qr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${qr.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${qr.disabled}, .${qr.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${qr.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&S({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),nO=D(Xc,{name:"MuiFilledInput",slot:"Input",overridesResolver:qc})(({theme:e,ownerState:t})=>S({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),Qx=m.forwardRef(function(t,n){var r,o,i,s;const a=ie({props:t,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:p="input",multiline:f=!1,slotProps:x,slots:b={},type:y="text"}=a,w=U(a,Jj),h=S({},a,{fullWidth:u,inputComponent:p,multiline:f,type:y}),v=eO(a),g={root:{ownerState:h},input:{ownerState:h}},C=x??c?Nt(g,x??c):g,k=(r=(o=b.root)!=null?o:l.Root)!=null?r:tO,$=(i=(s=b.input)!=null?s:l.Input)!=null?i:nO;return d.jsx(Uf,S({slots:{root:k,input:$},componentsProps:C,fullWidth:u,inputComponent:p,multiline:f,ref:n,type:y},w,{classes:v}))});Qx.muiName="Input";const Zx=Qx;function rO(e){return te("MuiFormControl",e)}ne("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const oO=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],iO=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${z(n)}`,r&&"fullWidth"]};return oe(o,rO,t)},sO=D("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>S({},t.root,t[`margin${z(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>S({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),aO=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiFormControl"}),{children:o,className:i,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:p=!1,hiddenLabel:f=!1,margin:x="none",required:b=!1,size:y="medium",variant:w="outlined"}=r,h=U(r,oO),v=S({},r,{color:s,component:a,disabled:l,error:c,fullWidth:p,hiddenLabel:f,margin:x,required:b,size:y,variant:w}),g=iO(v),[C,k]=m.useState(()=>{let M=!1;return o&&m.Children.forEach(o,O=>{if(!ms(O,["Input","Select"]))return;const N=ms(O,["Select"])?O.props.input:O;N&&ET(N.props)&&(M=!0)}),M}),[$,E]=m.useState(()=>{let M=!1;return o&&m.Children.forEach(o,O=>{ms(O,["Input","Select"])&&(Vl(O.props,!0)||Vl(O.props.inputProps,!0))&&(M=!0)}),M}),[P,_]=m.useState(!1);l&&P&&_(!1);const R=u!==void 0&&!l?u:P;let j;const A=m.useMemo(()=>({adornedStart:C,setAdornedStart:k,color:s,disabled:l,error:c,filled:$,focused:R,fullWidth:p,hiddenLabel:f,size:y,onBlur:()=>{_(!1)},onEmpty:()=>{E(!1)},onFilled:()=>{E(!0)},onFocus:()=>{_(!0)},registerEffect:j,required:b,variant:w}),[C,s,l,c,$,R,p,f,j,b,y,w]);return d.jsx(Wf.Provider,{value:A,children:d.jsx(sO,S({as:a,ownerState:v,className:V(g.root,i),ref:n},h,{children:o}))})}),Jx=aO,lO=Y2({createStyledComponent:D("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>ie({props:e,name:"MuiStack"})}),cO=lO;function uO(e){return te("MuiFormHelperText",e)}const dO=ne("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),Bv=dO;var Dv;const pO=["children","className","component","disabled","error","filled","focused","margin","required","variant"],fO=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:s,focused:a,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&`size${z(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return oe(c,uO,t)},mO=D("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${z(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>S({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Bv.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Bv.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),hO=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:s="p"}=r,a=U(r,pO),l=ko(),c=ji({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=S({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),p=fO(u);return d.jsx(mO,S({as:s,ownerState:u,className:V(p.root,i),ref:n},a,{children:o===" "?Dv||(Dv=d.jsx("span",{className:"notranslate",children:"​"})):o}))}),vO=hO;function gO(e){return te("MuiFormLabel",e)}const yO=ne("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),ys=yO,xO=["children","className","color","component","disabled","error","filled","focused","required"],bO=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:s,required:a}=e,l={root:["root",`color${z(n)}`,o&&"disabled",i&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",i&&"error"]};return oe(l,gO,t)},SO=D("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>S({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>S({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${ys.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${ys.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ys.error}`]:{color:(e.vars||e).palette.error.main}})),CO=D("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${ys.error}`]:{color:(e.vars||e).palette.error.main}})),wO=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiFormLabel"}),{children:o,className:i,component:s="label"}=r,a=U(r,xO),l=ko(),c=ji({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=S({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),p=bO(u);return d.jsxs(SO,S({as:s,ownerState:u,className:V(p.root,i),ref:n},a,{children:[o,c.required&&d.jsxs(CO,{ownerState:u,"aria-hidden":!0,className:p.asterisk,children:[" ","*"]})]}))}),kO=wO,EO=m.createContext(),Fv=EO;function $O(e){return te("MuiGrid",e)}const PO=[0,1,2,3,4,5,6,7,8,9,10],RO=["column-reverse","column","row-reverse","row"],TO=["nowrap","wrap-reverse","wrap"],qi=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],MO=ne("MuiGrid",["root","container","item","zeroMinWidth",...PO.map(e=>`spacing-xs-${e}`),...RO.map(e=>`direction-xs-${e}`),...TO.map(e=>`wrap-xs-${e}`),...qi.map(e=>`grid-xs-${e}`),...qi.map(e=>`grid-sm-${e}`),...qi.map(e=>`grid-md-${e}`),...qi.map(e=>`grid-lg-${e}`),...qi.map(e=>`grid-xl-${e}`)]),Ks=MO,jO=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function ii(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function OO({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(n===!0)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=ao({values:t.columns,breakpoints:e.breakpoints.values}),a=typeof s=="object"?s[o]:s;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let c={};if(t.container&&t.item&&t.columnSpacing!==0){const u=e.spacing(t.columnSpacing);if(u!=="0px"){const p=`calc(${l} + ${ii(u)})`;c={flexBasis:p,maxWidth:p}}}i=S({flexBasis:l,flexGrow:0,maxWidth:l},c)}return e.breakpoints.values[o]===0?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r},{})}function _O({theme:e,ownerState:t}){const n=ao({values:t.direction,breakpoints:e.breakpoints.values});return Yt({theme:e},n,r=>{const o={flexDirection:r};return r.indexOf("column")===0&&(o[`& > .${Ks.item}`]={maxWidth:"none"}),o})}function e1({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(o=>{n===""&&t[o]!==0&&(n=o)});const r=Object.keys(e).sort((o,i)=>e[o]-e[i]);return r.slice(0,r.indexOf(n))}function IO({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&r!==0){const i=ao({values:r,breakpoints:e.breakpoints.values});let s;typeof i=="object"&&(s=e1({breakpoints:e.breakpoints.values,values:i})),o=Yt({theme:e},i,(a,l)=>{var c;const u=e.spacing(a);return u!=="0px"?{marginTop:`-${ii(u)}`,[`& > .${Ks.item}`]:{paddingTop:ii(u)}}:(c=s)!=null&&c.includes(l)?{}:{marginTop:0,[`& > .${Ks.item}`]:{paddingTop:0}}})}return o}function NO({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&r!==0){const i=ao({values:r,breakpoints:e.breakpoints.values});let s;typeof i=="object"&&(s=e1({breakpoints:e.breakpoints.values,values:i})),o=Yt({theme:e},i,(a,l)=>{var c;const u=e.spacing(a);return u!=="0px"?{width:`calc(100% + ${ii(u)})`,marginLeft:`-${ii(u)}`,[`& > .${Ks.item}`]:{paddingLeft:ii(u)}}:(c=s)!=null&&c.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${Ks.item}`]:{paddingLeft:0}}})}return o}function AO(e,t,n={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach(o=>{const i=e[o];Number(i)>0&&r.push(n[`spacing-${o}-${String(i)}`])}),r}const LO=D("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=AO(s,c,t));const p=[];return c.forEach(f=>{const x=n[f];x&&p.push(t[`grid-${f}-${String(x)}`])}),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,o!=="row"&&t[`direction-xs-${String(o)}`],a!=="wrap"&&t[`wrap-xs-${String(a)}`],...p]}})(({ownerState:e})=>S({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},e.wrap!=="wrap"&&{flexWrap:e.wrap}),_O,IO,NO,OO);function zO(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const n=[];return t.forEach(r=>{const o=e[r];if(Number(o)>0){const i=`spacing-${r}-${String(o)}`;n.push(i)}}),n}const BO=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:s,zeroMinWidth:a,breakpoints:l}=e;let c=[];n&&(c=zO(i,l));const u=[];l.forEach(f=>{const x=e[f];x&&u.push(`grid-${f}-${String(x)}`)});const p={root:["root",n&&"container",o&&"item",a&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...u]};return oe(p,$O,t)},DO=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiGrid"}),{breakpoints:o}=wo(),i=ia(r),{className:s,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:p="row",item:f=!1,rowSpacing:x,spacing:b=0,wrap:y="wrap",zeroMinWidth:w=!1}=i,h=U(i,jO),v=x||b,g=l||b,C=m.useContext(Fv),k=u?a||12:C,$={},E=S({},h);o.keys.forEach(R=>{h[R]!=null&&($[R]=h[R],delete E[R])});const P=S({},i,{columns:k,container:u,direction:p,item:f,rowSpacing:v,columnSpacing:g,wrap:y,zeroMinWidth:w,spacing:b},$,{breakpoints:o.keys}),_=BO(P);return d.jsx(Fv.Provider,{value:k,children:d.jsx(LO,S({ownerState:P,className:V(_.root,s),as:c,ref:n},E))})}),Bu=DO,FO=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function sp(e){return`scale(${e}, ${e**2})`}const WO={entering:{opacity:1,transform:sp(1)},entered:{opacity:1,transform:"none"}},Du=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),t1=m.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:p,onExited:f,onExiting:x,style:b,timeout:y="auto",TransitionComponent:w=Tx}=t,h=U(t,FO),v=no(),g=m.useRef(),C=wo(),k=m.useRef(null),$=Ke(k,Co(i),n),E=N=>L=>{if(N){const B=k.current;L===void 0?N(B):N(B,L)}},P=E(u),_=E((N,L)=>{Mx(N);const{duration:B,delay:T,easing:I}=Wl({style:b,timeout:y,easing:s},{mode:"enter"});let W;y==="auto"?(W=C.transitions.getAutoHeightDuration(N.clientHeight),g.current=W):W=B,N.style.transition=[C.transitions.create("opacity",{duration:W,delay:T}),C.transitions.create("transform",{duration:Du?W:W*.666,delay:T,easing:I})].join(","),l&&l(N,L)}),R=E(c),j=E(x),A=E(N=>{const{duration:L,delay:B,easing:T}=Wl({style:b,timeout:y,easing:s},{mode:"exit"});let I;y==="auto"?(I=C.transitions.getAutoHeightDuration(N.clientHeight),g.current=I):I=L,N.style.transition=[C.transitions.create("opacity",{duration:I,delay:B}),C.transitions.create("transform",{duration:Du?I:I*.666,delay:Du?B:B||I*.333,easing:T})].join(","),N.style.opacity=0,N.style.transform=sp(.75),p&&p(N)}),M=E(f),O=N=>{y==="auto"&&v.start(g.current||0,N),r&&r(k.current,N)};return d.jsx(w,S({appear:o,in:a,nodeRef:k,onEnter:_,onEntered:R,onEntering:P,onExit:A,onExited:M,onExiting:j,addEndListener:O,timeout:y==="auto"?null:y},h,{children:(N,L)=>m.cloneElement(i,S({style:S({opacity:0,transform:sp(.75),visibility:N==="exited"&&!a?"hidden":void 0},WO[N],b,i.props.style),ref:$},L))}))});t1.muiSupportAuto=!0;const Hl=t1,UO=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],VO=e=>{const{classes:t,disableUnderline:n}=e,o=oe({root:["root",!n&&"underline"],input:["input"]},OT,t);return S({},t,o)},HO=D(Yc,{shouldForwardProp:e=>un(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Gc(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),S({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Gi.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Gi.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Gi.disabled}, .${Gi.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Gi.disabled}:before`]:{borderBottomStyle:"dotted"}})}),KO=D(Xc,{name:"MuiInput",slot:"Input",overridesResolver:qc})({}),n1=m.forwardRef(function(t,n){var r,o,i,s;const a=ie({props:t,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:p=!1,inputComponent:f="input",multiline:x=!1,slotProps:b,slots:y={},type:w="text"}=a,h=U(a,UO),v=VO(a),C={root:{ownerState:{disableUnderline:l}}},k=b??u?Nt(b??u,C):C,$=(r=(o=y.root)!=null?o:c.Root)!=null?r:HO,E=(i=(s=y.input)!=null?s:c.Input)!=null?i:KO;return d.jsx(Uf,S({slots:{root:$,input:E},slotProps:k,fullWidth:p,inputComponent:f,multiline:x,ref:n,type:w},h,{classes:v}))});n1.muiName="Input";const r1=n1;function GO(e){return te("MuiInputLabel",e)}ne("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const qO=["disableAnimation","margin","shrink","variant","className"],YO=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:s,required:a}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${z(r)}`,s],asterisk:[a&&"asterisk"]},c=oe(l,GO,t);return S({},t,c)},XO=D(kO,{shouldForwardProp:e=>un(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ys.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(({theme:e,ownerState:t})=>S({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&S({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&S({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&S({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),QO=m.forwardRef(function(t,n){const r=ie({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,shrink:i,className:s}=r,a=U(r,qO),l=ko();let c=i;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=ji({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),p=S({},r,{disableAnimation:o,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),f=YO(p);return d.jsx(XO,S({"data-shrink":c,ownerState:p,ref:n,className:V(f.root,s)},a,{classes:f}))}),o1=QO,ZO=m.createContext({}),ur=ZO;function JO(e){return te("MuiList",e)}ne("MuiList",["root","padding","dense","subheader"]);const e_=["children","className","component","dense","disablePadding","subheader"],t_=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return oe({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},JO,t)},n_=D("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>S({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),r_=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=U(r,e_),p=m.useMemo(()=>({dense:a}),[a]),f=S({},r,{component:s,dense:a,disablePadding:l}),x=t_(f);return d.jsx(ur.Provider,{value:p,children:d.jsxs(n_,S({as:s,className:V(x.root,i),ref:n,ownerState:f},u,{children:[c,o]}))})}),xo=r_;function o_(e){return te("MuiListItem",e)}const i_=ne("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Lo=i_,s_=ne("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),a_=s_;function l_(e){return te("MuiListItemSecondaryAction",e)}ne("MuiListItemSecondaryAction",["root","disableGutters"]);const c_=["className"],u_=e=>{const{disableGutters:t,classes:n}=e;return oe({root:["root",t&&"disableGutters"]},l_,n)},d_=D("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>S({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),i1=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiListItemSecondaryAction"}),{className:o}=r,i=U(r,c_),s=m.useContext(ur),a=S({},r,{disableGutters:s.disableGutters}),l=u_(a);return d.jsx(d_,S({className:V(l.root,o),ownerState:a,ref:n},i))});i1.muiName="ListItemSecondaryAction";const Kl=i1,p_=["className"],f_=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],m_=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},h_=e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=e;return oe({root:["root",o&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",i&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},o_,r)},v_=D("div",{name:"MuiListItem",slot:"Root",overridesResolver:m_})(({theme:e,ownerState:t})=>S({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&S({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${a_.root}`]:{paddingRight:48}},{[`&.${Lo.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Lo.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Pe(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Lo.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Pe(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Lo.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Lo.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Pe(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Pe(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),g_=D("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),y_=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiListItem"}),{alignItems:o="center",autoFocus:i=!1,button:s=!1,children:a,className:l,component:c,components:u={},componentsProps:p={},ContainerComponent:f="li",ContainerProps:{className:x}={},dense:b=!1,disabled:y=!1,disableGutters:w=!1,disablePadding:h=!1,divider:v=!1,focusVisibleClassName:g,secondaryAction:C,selected:k=!1,slotProps:$={},slots:E={}}=r,P=U(r.ContainerProps,p_),_=U(r,f_),R=m.useContext(ur),j=m.useMemo(()=>({dense:b||R.dense||!1,alignItems:o,disableGutters:w}),[o,R.dense,b,w]),A=m.useRef(null);on(()=>{i&&A.current&&A.current.focus()},[i]);const M=m.Children.toArray(a),O=M.length&&ms(M[M.length-1],["ListItemSecondaryAction"]),N=S({},r,{alignItems:o,autoFocus:i,button:s,dense:j.dense,disabled:y,disableGutters:w,disablePadding:h,divider:v,hasSecondaryAction:O,selected:k}),L=h_(N),B=Ke(A,n),T=E.root||u.Root||v_,I=$.root||p.root||{},W=S({className:V(L.root,I.className,l),disabled:y},_);let q=c||"li";return s&&(W.component=c||"div",W.focusVisibleClassName=V(Lo.focusVisible,g),q=Jn),O?(q=!W.component&&!c?"div":q,f==="li"&&(q==="li"?q="div":W.component==="li"&&(W.component="div")),d.jsx(ur.Provider,{value:j,children:d.jsxs(g_,S({as:f,className:V(L.container,x),ref:B,ownerState:N},P,{children:[d.jsx(T,S({},I,!hi(T)&&{as:q,ownerState:S({},N,I.ownerState)},W,{children:M})),M.pop()]}))})):d.jsx(ur.Provider,{value:j,children:d.jsxs(T,S({},I,{as:q,ref:B},!hi(T)&&{ownerState:S({},N,I.ownerState)},W,{children:[M,C&&d.jsx(Kl,{children:C})]}))})}),lr=y_;function x_(e){return te("MuiListItemIcon",e)}const b_=ne("MuiListItemIcon",["root","alignItemsFlexStart"]),Wv=b_,S_=["className"],C_=e=>{const{alignItems:t,classes:n}=e;return oe({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},x_,n)},w_=D("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>S({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),k_=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiListItemIcon"}),{className:o}=r,i=U(r,S_),s=m.useContext(ur),a=S({},r,{alignItems:s.alignItems}),l=C_(a);return d.jsx(w_,S({className:V(l.root,o),ownerState:a,ref:n},i))}),Fu=k_;function E_(e){return te("MuiListItemText",e)}const $_=ne("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Gl=$_,P_=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],R_=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return oe({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},E_,t)},T_=D("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Gl.primary}`]:t.primary},{[`& .${Gl.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>S({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),M_=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:p}=r,f=U(r,P_),{dense:x}=m.useContext(ur);let b=l??o,y=u;const w=S({},r,{disableTypography:s,inset:a,primary:!!b,secondary:!!y,dense:x}),h=R_(w);return b!=null&&b.type!==Q&&!s&&(b=d.jsx(Q,S({variant:x?"body2":"body1",className:h.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:b}))),y!=null&&y.type!==Q&&!s&&(y=d.jsx(Q,S({variant:"body2",className:h.secondary,color:"text.secondary",display:"block"},p,{children:y}))),d.jsxs(T_,S({className:V(h.root,i),ownerState:w,ref:n},f,{children:[b,y]}))}),Sn=M_,j_=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Wu(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Uv(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function s1(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function Yi(e,t,n,r,o,i){let s=!1,a=o(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!s1(a,i)||l)a=o(e,a,n);else return a.focus(),!0}return!1}const O_=m.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:p="selectedMenu"}=t,f=U(t,j_),x=m.useRef(null),b=m.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});on(()=>{o&&x.current.focus()},[o]),m.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(g,{direction:C})=>{const k=!x.current.style.width;if(g.clientHeight{const C=x.current,k=g.key,$=it(C).activeElement;if(k==="ArrowDown")g.preventDefault(),Yi(C,$,c,l,Wu);else if(k==="ArrowUp")g.preventDefault(),Yi(C,$,c,l,Uv);else if(k==="Home")g.preventDefault(),Yi(C,null,c,l,Wu);else if(k==="End")g.preventDefault(),Yi(C,null,c,l,Uv);else if(k.length===1){const E=b.current,P=k.toLowerCase(),_=performance.now();E.keys.length>0&&(_-E.lastTime>500?(E.keys=[],E.repeating=!0,E.previousKeyMatched=!0):E.repeating&&P!==E.keys[0]&&(E.repeating=!1)),E.lastTime=_,E.keys.push(P);const R=$&&!E.repeating&&s1($,E);E.previousKeyMatched&&(R||Yi(C,$,!1,l,Wu,E))?g.preventDefault():E.previousKeyMatched=!1}u&&u(g)},w=Ke(x,n);let h=-1;m.Children.forEach(s,(g,C)=>{if(!m.isValidElement(g)){h===C&&(h+=1,h>=s.length&&(h=-1));return}g.props.disabled||(p==="selectedMenu"&&g.props.selected||h===-1)&&(h=C),h===C&&(g.props.disabled||g.props.muiSkipListHighlight||g.type.muiSkipListHighlight)&&(h+=1,h>=s.length&&(h=-1))});const v=m.Children.map(s,(g,C)=>{if(C===h){const k={};return i&&(k.autoFocus=!0),g.props.tabIndex===void 0&&p==="selectedMenu"&&(k.tabIndex=0),m.cloneElement(g,k)}return g});return d.jsx(xo,S({role:"menu",ref:w,className:a,onKeyDown:y,tabIndex:o?0:-1},f,{children:v}))}),__=O_;function I_(e){return te("MuiPopover",e)}ne("MuiPopover",["root","paper"]);const N_=["onEntering"],A_=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],L_=["slotProps"];function Vv(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Hv(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function Kv(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Uu(e){return typeof e=="function"?e():e}const z_=e=>{const{classes:t}=e;return oe({root:["root"],paper:["paper"]},I_,t)},B_=D(qx,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),a1=D(Le,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),D_=m.forwardRef(function(t,n){var r,o,i;const s=ie({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:p="anchorEl",children:f,className:x,container:b,elevation:y=8,marginThreshold:w=16,open:h,PaperProps:v={},slots:g,slotProps:C,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:$=Hl,transitionDuration:E="auto",TransitionProps:{onEntering:P}={},disableScrollLock:_=!1}=s,R=U(s.TransitionProps,N_),j=U(s,A_),A=(r=C==null?void 0:C.paper)!=null?r:v,M=m.useRef(),O=Ke(M,A.ref),N=S({},s,{anchorOrigin:c,anchorReference:p,elevation:y,marginThreshold:w,externalPaperSlotProps:A,transformOrigin:k,TransitionComponent:$,transitionDuration:E,TransitionProps:R}),L=z_(N),B=m.useCallback(()=>{if(p==="anchorPosition")return u;const le=Uu(l),ue=(le&&le.nodeType===1?le:it(M.current).body).getBoundingClientRect();return{top:ue.top+Vv(ue,c.vertical),left:ue.left+Hv(ue,c.horizontal)}},[l,c.horizontal,c.vertical,u,p]),T=m.useCallback(le=>({vertical:Vv(le,k.vertical),horizontal:Hv(le,k.horizontal)}),[k.horizontal,k.vertical]),I=m.useCallback(le=>{const pe={width:le.offsetWidth,height:le.offsetHeight},ue=T(pe);if(p==="none")return{top:null,left:null,transformOrigin:Kv(ue)};const gt=B();let _e=gt.top-ue.vertical,Oe=gt.left-ue.horizontal;const at=_e+pe.height,Te=Oe+pe.width,ge=Zn(Uu(l)),nt=ge.innerHeight-w,De=ge.innerWidth-w;if(w!==null&&_ent){const be=at-nt;_e-=be,ue.vertical+=be}if(w!==null&&OeDe){const be=Te-De;Oe-=be,ue.horizontal+=be}return{top:`${Math.round(_e)}px`,left:`${Math.round(Oe)}px`,transformOrigin:Kv(ue)}},[l,p,B,T,w]),[W,q]=m.useState(h),se=m.useCallback(()=>{const le=M.current;if(!le)return;const pe=I(le);pe.top!==null&&(le.style.top=pe.top),pe.left!==null&&(le.style.left=pe.left),le.style.transformOrigin=pe.transformOrigin,q(!0)},[I]);m.useEffect(()=>(_&&window.addEventListener("scroll",se),()=>window.removeEventListener("scroll",se)),[l,_,se]);const ce=(le,pe)=>{P&&P(le,pe),se()},X=()=>{q(!1)};m.useEffect(()=>{h&&se()}),m.useImperativeHandle(a,()=>h?{updatePosition:()=>{se()}}:null,[h,se]),m.useEffect(()=>{if(!h)return;const le=sa(()=>{se()}),pe=Zn(l);return pe.addEventListener("resize",le),()=>{le.clear(),pe.removeEventListener("resize",le)}},[l,h,se]);let K=E;E==="auto"&&!$.muiSupportAuto&&(K=void 0);const re=b||(l?it(Uu(l)).body:void 0),ke=(o=g==null?void 0:g.root)!=null?o:B_,ve=(i=g==null?void 0:g.paper)!=null?i:a1,he=$n({elementType:ve,externalSlotProps:S({},A,{style:W?A.style:S({},A.style,{opacity:0})}),additionalProps:{elevation:y,ref:O},ownerState:N,className:V(L.paper,A==null?void 0:A.className)}),Be=$n({elementType:ke,externalSlotProps:(C==null?void 0:C.root)||{},externalForwardedProps:j,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:re,open:h},ownerState:N,className:V(L.root,x)}),{slotProps:ae}=Be,Re=U(Be,L_);return d.jsx(ke,S({},Re,!hi(ke)&&{slotProps:ae,disableScrollLock:_},{children:d.jsx($,S({appear:!0,in:h,onEntering:ce,onExited:X,timeout:K},R,{children:d.jsx(ve,S({},he,{children:f}))}))}))}),F_=D_;function W_(e){return te("MuiMenu",e)}ne("MuiMenu",["root","paper","list"]);const U_=["onEntering"],V_=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],H_={vertical:"top",horizontal:"right"},K_={vertical:"top",horizontal:"left"},G_=e=>{const{classes:t}=e;return oe({root:["root"],paper:["paper"],list:["list"]},W_,t)},q_=D(F_,{shouldForwardProp:e=>un(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Y_=D(a1,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),X_=D(__,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Q_=m.forwardRef(function(t,n){var r,o;const i=ie({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:p,open:f,PaperProps:x={},PopoverClasses:b,transitionDuration:y="auto",TransitionProps:{onEntering:w}={},variant:h="selectedMenu",slots:v={},slotProps:g={}}=i,C=U(i.TransitionProps,U_),k=U(i,V_),$=Vc(),E=S({},i,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:w,PaperProps:x,transitionDuration:y,TransitionProps:C,variant:h}),P=G_(E),_=s&&!c&&f,R=m.useRef(null),j=(T,I)=>{R.current&&R.current.adjustStyleForScrollbar(T,{direction:$?"rtl":"ltr"}),w&&w(T,I)},A=T=>{T.key==="Tab"&&(T.preventDefault(),p&&p(T,"tabKeyDown"))};let M=-1;m.Children.map(a,(T,I)=>{m.isValidElement(T)&&(T.props.disabled||(h==="selectedMenu"&&T.props.selected||M===-1)&&(M=I))});const O=(r=v.paper)!=null?r:Y_,N=(o=g.paper)!=null?o:x,L=$n({elementType:v.root,externalSlotProps:g.root,ownerState:E,className:[P.root,l]}),B=$n({elementType:O,externalSlotProps:N,ownerState:E,className:P.paper});return d.jsx(q_,S({onClose:p,anchorOrigin:{vertical:"bottom",horizontal:$?"right":"left"},transformOrigin:$?H_:K_,slots:{paper:O,root:v.root},slotProps:{root:L,paper:B},open:f,ref:n,transitionDuration:y,TransitionProps:S({onEntering:j},C),ownerState:E},k,{classes:b,children:d.jsx(X_,S({onKeyDown:A,actions:R,autoFocus:s&&(M===-1||c),autoFocusItem:_,variant:h},u,{className:V(P.list,u.className),children:a}))}))}),l1=Q_;function Z_(e){return te("MuiMenuItem",e)}const J_=ne("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Xi=J_,eI=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],tI=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},nI=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=e,l=oe({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Z_,s);return S({},s,l)},rI=D(Jn,{shouldForwardProp:e=>un(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:tI})(({theme:e,ownerState:t})=>S({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Xi.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Pe(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Xi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Pe(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Xi.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Pe(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Pe(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Xi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Xi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${zv.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${zv.inset}`]:{marginLeft:52},[`& .${Gl.root}`]:{marginTop:0,marginBottom:0},[`& .${Gl.inset}`]:{paddingLeft:36},[`& .${Wv.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&S({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Wv.root} svg`]:{fontSize:"1.25rem"}}))),oI=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:p,className:f}=r,x=U(r,eI),b=m.useContext(ur),y=m.useMemo(()=>({dense:s||b.dense||!1,disableGutters:l}),[b.dense,s,l]),w=m.useRef(null);on(()=>{o&&w.current&&w.current.focus()},[o]);const h=S({},r,{dense:y.dense,divider:a,disableGutters:l}),v=nI(r),g=Ke(w,n);let C;return r.disabled||(C=p!==void 0?p:-1),d.jsx(ur.Provider,{value:y,children:d.jsx(rI,S({ref:g,role:u,tabIndex:C,component:i,focusVisibleClassName:V(v.focusVisible,c),className:V(v.root,f)},x,{ownerState:h,classes:v}))})}),xs=oI;function iI(e){return te("MuiNativeSelect",e)}const sI=ne("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),qf=sI,aI=["className","disabled","error","IconComponent","inputRef","variant"],lI=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${z(n)}`,i&&"iconOpen",r&&"disabled"]};return oe(a,iI,t)},c1=({ownerState:e,theme:t})=>S({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":S({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${qf.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),cI=D("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:un,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${qf.multiple}`]:t.multiple}]}})(c1),u1=({ownerState:e,theme:t})=>S({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${qf.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),uI=D("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${z(n.variant)}`],n.open&&t.iconOpen]}})(u1),dI=m.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:s,inputRef:a,variant:l="standard"}=t,c=U(t,aI),u=S({},t,{disabled:o,variant:l,error:i}),p=lI(u);return d.jsxs(m.Fragment,{children:[d.jsx(cI,S({ownerState:u,className:V(p.select,r),disabled:o,ref:a||n},c)),t.multiple?null:d.jsx(uI,{as:s,ownerState:u,className:p.icon})]})}),pI=dI;var Gv;const fI=["children","classes","className","label","notched"],mI=D("fieldset",{shouldForwardProp:un})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),hI=D("legend",{shouldForwardProp:un})(({ownerState:e,theme:t})=>S({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&S({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function vI(e){const{className:t,label:n,notched:r}=e,o=U(e,fI),i=n!=null&&n!=="",s=S({},e,{notched:r,withLabel:i});return d.jsx(mI,S({"aria-hidden":!0,className:t,ownerState:s},o,{children:d.jsx(hI,{ownerState:s,children:i?d.jsx("span",{children:n}):Gv||(Gv=d.jsx("span",{className:"notranslate",children:"​"}))})}))}const gI=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],yI=e=>{const{classes:t}=e,r=oe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},IT,t);return S({},t,r)},xI=D(Yc,{shouldForwardProp:e=>un(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Gc})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return S({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Sr.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Sr.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Sr.focused} .${Sr.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Sr.error} .${Sr.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Sr.disabled} .${Sr.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&S({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),bI=D(vI,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),SI=D(Xc,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:qc})(({theme:e,ownerState:t})=>S({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),d1=m.forwardRef(function(t,n){var r,o,i,s,a;const l=ie({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:p="input",label:f,multiline:x=!1,notched:b,slots:y={},type:w="text"}=l,h=U(l,gI),v=yI(l),g=ko(),C=ji({props:l,muiFormControl:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),k=S({},l,{color:C.color||"primary",disabled:C.disabled,error:C.error,focused:C.focused,formControl:g,fullWidth:u,hiddenLabel:C.hiddenLabel,multiline:x,size:C.size,type:w}),$=(r=(o=y.root)!=null?o:c.Root)!=null?r:xI,E=(i=(s=y.input)!=null?s:c.Input)!=null?i:SI;return d.jsx(Uf,S({slots:{root:$,input:E},renderSuffix:P=>d.jsx(bI,{ownerState:k,className:v.notchedOutline,label:f!=null&&f!==""&&C.required?a||(a=d.jsxs(m.Fragment,{children:[f," ","*"]})):f,notched:typeof b<"u"?b:!!(P.startAdornment||P.filled||P.focused)}),fullWidth:u,inputComponent:p,multiline:x,ref:n,type:w},h,{classes:S({},v,{notchedOutline:null})}))});d1.muiName="Input";const p1=d1;function CI(e){return te("MuiSelect",e)}const wI=ne("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Qi=wI;var qv;const kI=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],EI=D("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Qi.select}`]:t.select},{[`&.${Qi.select}`]:t[n.variant]},{[`&.${Qi.error}`]:t.error},{[`&.${Qi.multiple}`]:t.multiple}]}})(c1,{[`&.${Qi.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),$I=D("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${z(n.variant)}`],n.open&&t.iconOpen]}})(u1),PI=D("input",{shouldForwardProp:e=>Ex(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Yv(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function RI(e){return e==null||typeof e=="string"&&!e.trim()}const TI=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${z(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return oe(a,CI,t)},MI=m.forwardRef(function(t,n){var r;const{"aria-describedby":o,"aria-label":i,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:p,disabled:f,displayEmpty:x,error:b=!1,IconComponent:y,inputRef:w,labelId:h,MenuProps:v={},multiple:g,name:C,onBlur:k,onChange:$,onClose:E,onFocus:P,onOpen:_,open:R,readOnly:j,renderValue:A,SelectDisplayProps:M={},tabIndex:O,value:N,variant:L="standard"}=t,B=U(t,kI),[T,I]=Ws({controlled:N,default:p,name:"Select"}),[W,q]=Ws({controlled:R,default:u,name:"Select"}),se=m.useRef(null),ce=m.useRef(null),[X,K]=m.useState(null),{current:re}=m.useRef(R!=null),[ke,ve]=m.useState(),he=Ke(n,w),Be=m.useCallback(J=>{ce.current=J,J&&K(J)},[]),ae=X==null?void 0:X.parentNode;m.useImperativeHandle(he,()=>({focus:()=>{ce.current.focus()},node:se.current,value:T}),[T]),m.useEffect(()=>{u&&W&&X&&!re&&(ve(a?null:ae.clientWidth),ce.current.focus())},[X,a]),m.useEffect(()=>{s&&ce.current.focus()},[s]),m.useEffect(()=>{if(!h)return;const J=it(ce.current).getElementById(h);if(J){const Ce=()=>{getSelection().isCollapsed&&ce.current.focus()};return J.addEventListener("click",Ce),()=>{J.removeEventListener("click",Ce)}}},[h]);const Re=(J,Ce)=>{J?_&&_(Ce):E&&E(Ce),re||(ve(a?null:ae.clientWidth),q(J))},le=J=>{J.button===0&&(J.preventDefault(),ce.current.focus(),Re(!0,J))},pe=J=>{Re(!1,J)},ue=m.Children.toArray(l),gt=J=>{const Ce=ue.find(H=>H.props.value===J.target.value);Ce!==void 0&&(I(Ce.props.value),$&&$(J,Ce))},_e=J=>Ce=>{let H;if(Ce.currentTarget.hasAttribute("tabindex")){if(g){H=Array.isArray(T)?T.slice():[];const Y=T.indexOf(J.props.value);Y===-1?H.push(J.props.value):H.splice(Y,1)}else H=J.props.value;if(J.props.onClick&&J.props.onClick(Ce),T!==H&&(I(H),$)){const Y=Ce.nativeEvent||Ce,fe=new Y.constructor(Y.type,Y);Object.defineProperty(fe,"target",{writable:!0,value:{value:H,name:C}}),$(fe,J)}g||Re(!1,Ce)}},Oe=J=>{j||[" ","ArrowUp","ArrowDown","Enter"].indexOf(J.key)!==-1&&(J.preventDefault(),Re(!0,J))},at=X!==null&&W,Te=J=>{!at&&k&&(Object.defineProperty(J,"target",{writable:!0,value:{value:T,name:C}}),k(J))};delete B["aria-invalid"];let ge,nt;const De=[];let be=!1;(Vl({value:T})||x)&&(A?ge=A(T):be=!0);const lt=ue.map(J=>{if(!m.isValidElement(J))return null;let Ce;if(g){if(!Array.isArray(T))throw new Error(vo(2));Ce=T.some(H=>Yv(H,J.props.value)),Ce&&be&&De.push(J.props.children)}else Ce=Yv(T,J.props.value),Ce&&be&&(nt=J.props.children);return m.cloneElement(J,{"aria-selected":Ce?"true":"false",onClick:_e(J),onKeyUp:H=>{H.key===" "&&H.preventDefault(),J.props.onKeyUp&&J.props.onKeyUp(H)},role:"option",selected:Ce,value:void 0,"data-value":J.props.value})});be&&(g?De.length===0?ge=null:ge=De.reduce((J,Ce,H)=>(J.push(Ce),H{const{classes:t}=e;return t},Yf={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>un(e)&&e!=="variant",slot:"Root"},NI=D(r1,Yf)(""),AI=D(p1,Yf)(""),LI=D(Zx,Yf)(""),f1=m.forwardRef(function(t,n){const r=ie({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=zT,id:p,input:f,inputProps:x,label:b,labelId:y,MenuProps:w,multiple:h=!1,native:v=!1,onClose:g,onOpen:C,open:k,renderValue:$,SelectDisplayProps:E,variant:P="outlined"}=r,_=U(r,OI),R=v?pI:jI,j=ko(),A=ji({props:r,muiFormControl:j,states:["variant","error"]}),M=A.variant||P,O=S({},r,{variant:M,classes:s}),N=II(O),L=U(N,_I),B=f||{standard:d.jsx(NI,{ownerState:O}),outlined:d.jsx(AI,{label:b,ownerState:O}),filled:d.jsx(LI,{ownerState:O})}[M],T=Ke(n,Co(B));return d.jsx(m.Fragment,{children:m.cloneElement(B,S({inputComponent:R,inputProps:S({children:i,error:A.error,IconComponent:u,variant:M,type:void 0,multiple:h},v?{id:p}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:y,MenuProps:w,onClose:g,onOpen:C,open:k,renderValue:$,SelectDisplayProps:S({id:p},E)},x,{classes:x?Nt(L,x.classes):L},f?f.props.inputProps:{})},(h&&v||c)&&M==="outlined"?{notched:!0}:{},{ref:T,className:V(B.props.className,a,N.root)},!f&&{variant:M},_))})});f1.muiName="Select";const m1=f1;function zI(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,s=no();m.useEffect(()=>{if(!o)return;function h(v){v.defaultPrevented||(v.key==="Escape"||v.key==="Esc")&&(r==null||r(v,"escapeKeyDown"))}return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[o,r]);const a=Tt((h,v)=>{r==null||r(h,v)}),l=Tt(h=>{!r||h==null||s.start(h,()=>{a(null,"timeout")})});m.useEffect(()=>(o&&l(t),s.clear),[o,t,l,s]);const c=h=>{r==null||r(h,"clickaway")},u=s.clear,p=m.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),f=h=>v=>{const g=h.onBlur;g==null||g(v),p()},x=h=>v=>{const g=h.onFocus;g==null||g(v),u()},b=h=>v=>{const g=h.onMouseEnter;g==null||g(v),u()},y=h=>v=>{const g=h.onMouseLeave;g==null||g(v),p()};return m.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",p),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",p),window.removeEventListener("blur",u)}},[n,o,p,u]),{getRootProps:(h={})=>{const v=S({},Ll(e),Ll(h));return S({role:"presentation"},h,v,{onBlur:f(v),onFocus:x(v),onMouseEnter:b(v),onMouseLeave:y(v)})},onClickAway:c}}function BI(e){return te("MuiSnackbarContent",e)}ne("MuiSnackbarContent",["root","message","action"]);const DI=["action","className","message","role"],FI=e=>{const{classes:t}=e;return oe({root:["root"],action:["action"],message:["message"]},BI,t)},WI=D(Le,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=J2(e.palette.background.default,t);return S({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),UI=D("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),VI=D("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),HI=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:s,role:a="alert"}=r,l=U(r,DI),c=r,u=FI(c);return d.jsxs(WI,S({role:a,square:!0,elevation:6,className:V(u.root,i),ownerState:c,ref:n},l,{children:[d.jsx(UI,{className:u.message,ownerState:c,children:s}),o?d.jsx(VI,{className:u.action,ownerState:c,children:o}):null]}))}),KI=HI;function GI(e){return te("MuiSnackbar",e)}ne("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const qI=["onEnter","onExited"],YI=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],XI=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${z(n.vertical)}${z(n.horizontal)}`]};return oe(r,GI,t)},Xv=D("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${z(n.anchorOrigin.vertical)}${z(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return S({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:S({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),QI=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiSnackbar"}),o=wo(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:p,ClickAwayListenerProps:f,ContentProps:x,disableWindowBlurListener:b=!1,message:y,open:w,TransitionComponent:h=Hl,transitionDuration:v=i,TransitionProps:{onEnter:g,onExited:C}={}}=r,k=U(r.TransitionProps,qI),$=U(r,YI),E=S({},r,{anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:b,TransitionComponent:h,transitionDuration:v}),P=XI(E),{getRootProps:_,onClickAway:R}=zI(S({},E)),[j,A]=m.useState(!0),M=$n({elementType:Xv,getSlotProps:_,externalForwardedProps:$,ownerState:E,additionalProps:{ref:n},className:[P.root,p]}),O=L=>{A(!0),C&&C(L)},N=(L,B)=>{A(!1),g&&g(L,B)};return!w&&j?null:d.jsx(YM,S({onClickAway:R},f,{children:d.jsx(Xv,S({},M,{children:d.jsx(h,S({appear:!0,in:w,timeout:v,direction:a==="top"?"down":"up",onEnter:N,onExited:O},k,{children:u||d.jsx(KI,S({message:y,action:s},x))}))}))}))}),ZI=QI;function JI(e){return te("MuiTooltip",e)}const e4=ne("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),jr=e4,t4=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function n4(e){return Math.round(e*1e5)/1e5}const r4=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${z(i.split("-")[0])}`],arrow:["arrow"]};return oe(s,JI,t)},o4=D(Ux,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>S({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${jr.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${jr.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${jr.arrow}`]:S({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${jr.arrow}`]:S({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),i4=D("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${z(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>S({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Pe(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${n4(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${jr.popper}[data-popper-placement*="left"] &`]:S({transformOrigin:"right center"},t.isRtl?S({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):S({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${jr.popper}[data-popper-placement*="right"] &`]:S({transformOrigin:"left center"},t.isRtl?S({marginRight:"14px"},t.touch&&{marginRight:"24px"}):S({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${jr.popper}[data-popper-placement*="top"] &`]:S({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${jr.popper}[data-popper-placement*="bottom"] &`]:S({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),s4=D("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Pe(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let za=!1;const Qv=new la;let Zi={x:0,y:0};function Ba(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const a4=m.forwardRef(function(t,n){var r,o,i,s,a,l,c,u,p,f,x,b,y,w,h,v,g,C,k;const $=ie({props:t,name:"MuiTooltip"}),{arrow:E=!1,children:P,components:_={},componentsProps:R={},describeChild:j=!1,disableFocusListener:A=!1,disableHoverListener:M=!1,disableInteractive:O=!1,disableTouchListener:N=!1,enterDelay:L=100,enterNextDelay:B=0,enterTouchDelay:T=700,followCursor:I=!1,id:W,leaveDelay:q=0,leaveTouchDelay:se=1500,onClose:ce,onOpen:X,open:K,placement:re="bottom",PopperComponent:ke,PopperProps:ve={},slotProps:he={},slots:Be={},title:ae,TransitionComponent:Re=Hl,TransitionProps:le}=$,pe=U($,t4),ue=m.isValidElement(P)?P:d.jsx("span",{children:P}),gt=wo(),_e=Vc(),[Oe,at]=m.useState(),[Te,ge]=m.useState(null),nt=m.useRef(!1),De=O||I,be=no(),lt=no(),pt=no(),yt=no(),[ye,Z]=Ws({controlled:K,default:!1,name:"Tooltip",state:"open"});let Ge=ye;const zt=aa(W),Xt=m.useRef(),J=Tt(()=>{Xt.current!==void 0&&(document.body.style.WebkitUserSelect=Xt.current,Xt.current=void 0),yt.clear()});m.useEffect(()=>J,[J]);const Ce=me=>{Qv.clear(),za=!0,Z(!0),X&&!Ge&&X(me)},H=Tt(me=>{Qv.start(800+q,()=>{za=!1}),Z(!1),ce&&Ge&&ce(me),be.start(gt.transitions.duration.shortest,()=>{nt.current=!1})}),Y=me=>{nt.current&&me.type!=="touchstart"||(Oe&&Oe.removeAttribute("title"),lt.clear(),pt.clear(),L||za&&B?lt.start(za?B:L,()=>{Ce(me)}):Ce(me))},fe=me=>{lt.clear(),pt.start(q,()=>{H(me)})},{isFocusVisibleRef:xe,onBlur:qe,onFocus:xt,ref:dn}=$f(),[,xr]=m.useState(!1),On=me=>{qe(me),xe.current===!1&&(xr(!1),fe(me))},Po=me=>{Oe||at(me.currentTarget),xt(me),xe.current===!0&&(xr(!0),Y(me))},gm=me=>{nt.current=!0;const Qt=ue.props;Qt.onTouchStart&&Qt.onTouchStart(me)},H1=me=>{gm(me),pt.clear(),be.clear(),J(),Xt.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",yt.start(T,()=>{document.body.style.WebkitUserSelect=Xt.current,Y(me)})},K1=me=>{ue.props.onTouchEnd&&ue.props.onTouchEnd(me),J(),pt.start(se,()=>{H(me)})};m.useEffect(()=>{if(!Ge)return;function me(Qt){(Qt.key==="Escape"||Qt.key==="Esc")&&H(Qt)}return document.addEventListener("keydown",me),()=>{document.removeEventListener("keydown",me)}},[H,Ge]);const G1=Ke(Co(ue),dn,at,n);!ae&&ae!==0&&(Ge=!1);const nu=m.useRef(),q1=me=>{const Qt=ue.props;Qt.onMouseMove&&Qt.onMouseMove(me),Zi={x:me.clientX,y:me.clientY},nu.current&&nu.current.update()},_i={},ru=typeof ae=="string";j?(_i.title=!Ge&&ru&&!M?ae:null,_i["aria-describedby"]=Ge?zt:null):(_i["aria-label"]=ru?ae:null,_i["aria-labelledby"]=Ge&&!ru?zt:null);const _n=S({},_i,pe,ue.props,{className:V(pe.className,ue.props.className),onTouchStart:gm,ref:G1},I?{onMouseMove:q1}:{}),Ii={};N||(_n.onTouchStart=H1,_n.onTouchEnd=K1),M||(_n.onMouseOver=Ba(Y,_n.onMouseOver),_n.onMouseLeave=Ba(fe,_n.onMouseLeave),De||(Ii.onMouseOver=Y,Ii.onMouseLeave=fe)),A||(_n.onFocus=Ba(Po,_n.onFocus),_n.onBlur=Ba(On,_n.onBlur),De||(Ii.onFocus=Po,Ii.onBlur=On));const Y1=m.useMemo(()=>{var me;let Qt=[{name:"arrow",enabled:!!Te,options:{element:Te,padding:4}}];return(me=ve.popperOptions)!=null&&me.modifiers&&(Qt=Qt.concat(ve.popperOptions.modifiers)),S({},ve.popperOptions,{modifiers:Qt})},[Te,ve]),Ni=S({},$,{isRtl:_e,arrow:E,disableInteractive:De,placement:re,PopperComponentProp:ke,touch:nt.current}),ou=r4(Ni),ym=(r=(o=Be.popper)!=null?o:_.Popper)!=null?r:o4,xm=(i=(s=(a=Be.transition)!=null?a:_.Transition)!=null?s:Re)!=null?i:Hl,bm=(l=(c=Be.tooltip)!=null?c:_.Tooltip)!=null?l:i4,Sm=(u=(p=Be.arrow)!=null?p:_.Arrow)!=null?u:s4,X1=Xo(ym,S({},ve,(f=he.popper)!=null?f:R.popper,{className:V(ou.popper,ve==null?void 0:ve.className,(x=(b=he.popper)!=null?b:R.popper)==null?void 0:x.className)}),Ni),Q1=Xo(xm,S({},le,(y=he.transition)!=null?y:R.transition),Ni),Z1=Xo(bm,S({},(w=he.tooltip)!=null?w:R.tooltip,{className:V(ou.tooltip,(h=(v=he.tooltip)!=null?v:R.tooltip)==null?void 0:h.className)}),Ni),J1=Xo(Sm,S({},(g=he.arrow)!=null?g:R.arrow,{className:V(ou.arrow,(C=(k=he.arrow)!=null?k:R.arrow)==null?void 0:C.className)}),Ni);return d.jsxs(m.Fragment,{children:[m.cloneElement(ue,_n),d.jsx(ym,S({as:ke??Ux,placement:re,anchorEl:I?{getBoundingClientRect:()=>({top:Zi.y,left:Zi.x,right:Zi.x,bottom:Zi.y,width:0,height:0})}:Oe,popperRef:nu,open:Oe?Ge:!1,id:zt,transition:!0},Ii,X1,{popperOptions:Y1,children:({TransitionProps:me})=>d.jsx(xm,S({timeout:gt.transitions.duration.shorter},me,Q1,{children:d.jsxs(bm,S({},Z1,{children:[ae,E?d.jsx(Sm,S({},J1,{ref:ge})):null]}))}))}))]})}),Vu=a4;function l4(e){return te("MuiSwitch",e)}const c4=ne("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Ot=c4,u4=["className","color","edge","size","sx"],d4=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:s}=e,a={root:["root",n&&`edge${z(n)}`,`size${z(r)}`],switchBase:["switchBase",`color${z(o)}`,i&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=oe(a,l4,t);return S({},t,l)},p4=D("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${z(n.edge)}`],t[`size${z(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Ot.thumb}`]:{width:16,height:16},[`& .${Ot.switchBase}`]:{padding:4,[`&.${Ot.checked}`]:{transform:"translateX(16px)"}}}}]}),f4=D(zM,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Ot.input}`]:t.input},n.color!=="default"&&t[`color${z(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Ot.checked}`]:{transform:"translateX(20px)"},[`&.${Ot.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Ot.checked} + .${Ot.track}`]:{opacity:.5},[`&.${Ot.disabled} + .${Ot.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Ot.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${Ot.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ot.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Bl(e.palette[t].main,.62):zl(e.palette[t].main,.55)}`}},[`&.${Ot.checked} + .${Ot.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),m4=D("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),h4=D("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),v4=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:s=!1,size:a="medium",sx:l}=r,c=U(r,u4),u=S({},r,{color:i,edge:s,size:a}),p=d4(u),f=d.jsx(h4,{className:p.thumb,ownerState:u});return d.jsxs(p4,{className:V(p.root,o),sx:l,ownerState:u,children:[d.jsx(f4,S({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u},c,{classes:S({},p,{root:p.switchBase})})),d.jsx(m4,{className:p.track,ownerState:u})]})}),Hu=v4;function g4(e){return te("MuiTab",e)}const y4=ne("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),wr=y4,x4=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],b4=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:s,selected:a,disabled:l}=e,c={root:["root",i&&s&&"labelIcon",`textColor${z(n)}`,r&&"fullWidth",o&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return oe(c,g4,t)},S4=D(Jn,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${z(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${wr.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>S({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${wr.iconWrapper}`]:S({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${wr.selected}`]:{opacity:1},[`&.${wr.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${wr.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${wr.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${wr.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${wr.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),C4=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:p,onChange:f,onClick:x,onFocus:b,selected:y,selectionFollowsFocus:w,textColor:h="inherit",value:v,wrapped:g=!1}=r,C=U(r,x4),k=S({},r,{disabled:i,disableFocusRipple:s,selected:y,icon:!!l,iconPosition:c,label:!!p,fullWidth:a,textColor:h,wrapped:g}),$=b4(k),E=l&&p&&m.isValidElement(l)?m.cloneElement(l,{className:V($.iconWrapper,l.props.className)}):l,P=R=>{!y&&f&&f(R,v),x&&x(R)},_=R=>{w&&!y&&f&&f(R,v),b&&b(R)};return d.jsxs(S4,S({focusRipple:!s,className:V($.root,o),ref:n,role:"tab","aria-selected":y,disabled:i,onClick:P,onFocus:_,ownerState:k,tabIndex:y?0:-1},C,{children:[c==="top"||c==="start"?d.jsxs(m.Fragment,{children:[E,p]}):d.jsxs(m.Fragment,{children:[p,E]}),u]}))}),oo=C4;function w4(e){return te("MuiToolbar",e)}ne("MuiToolbar",["root","gutters","regular","dense"]);const k4=["className","component","disableGutters","variant"],E4=e=>{const{classes:t,disableGutters:n,variant:r}=e;return oe({root:["root",!n&&"gutters",r]},w4,t)},$4=D("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>S({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),P4=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:s=!1,variant:a="regular"}=r,l=U(r,k4),c=S({},r,{component:i,disableGutters:s,variant:a}),u=E4(c);return d.jsx($4,S({as:i,className:V(u.root,o),ref:n,ownerState:c},l))}),R4=P4,T4=nr(d.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),M4=nr(d.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function j4(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function O4(e,t,n,r={},o=()=>{}){const{ease:i=j4,duration:s=300}=r;let a=null;const l=t[e];let c=!1;const u=()=>{c=!0},p=f=>{if(c){o(new Error("Animation cancelled"));return}a===null&&(a=f);const x=Math.min(1,(f-a)/s);if(t[e]=i(x)*(n-l)+l,x>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(p)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(p),u)}const _4=["onChange"],I4={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function N4(e){const{onChange:t}=e,n=U(e,_4),r=m.useRef(),o=m.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return on(()=>{const s=sa(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),a=Zn(o.current);return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[t]),m.useEffect(()=>{i(),t(r.current)},[t]),d.jsx("div",S({style:I4},n,{ref:o}))}function A4(e){return te("MuiTabScrollButton",e)}const L4=ne("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),z4=L4,B4=["className","slots","slotProps","direction","orientation","disabled"],D4=e=>{const{classes:t,orientation:n,disabled:r}=e;return oe({root:["root",n,r&&"disabled"]},A4,t)},F4=D(Jn,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>S({width:40,flexShrink:0,opacity:.8,[`&.${z4.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),W4=m.forwardRef(function(t,n){var r,o;const i=ie({props:t,name:"MuiTabScrollButton"}),{className:s,slots:a={},slotProps:l={},direction:c}=i,u=U(i,B4),p=Vc(),f=S({isRtl:p},i),x=D4(f),b=(r=a.StartScrollButtonIcon)!=null?r:T4,y=(o=a.EndScrollButtonIcon)!=null?o:M4,w=$n({elementType:b,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f}),h=$n({elementType:y,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f});return d.jsx(F4,S({component:"div",className:V(x.root,s),ref:n,role:null,ownerState:f,tabIndex:null},u,{children:c==="left"?d.jsx(b,S({},w)):d.jsx(y,S({},h))}))}),U4=W4;function V4(e){return te("MuiTabs",e)}const H4=ne("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ku=H4,K4=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Zv=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Jv=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Da=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},G4=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:s,scrollButtonsHideMobile:a,classes:l}=e;return oe({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},V4,l)},q4=D("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ku.scrollButtons}`]:t.scrollButtons},{[`& .${Ku.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>S({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${Ku.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Y4=D("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>S({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),X4=D("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>S({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Q4=D("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>S({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Z4=D(N4)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),eg={},J4=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiTabs"}),o=wo(),i=Vc(),{"aria-label":s,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:p,component:f="div",allowScrollButtonsMobile:x=!1,indicatorColor:b="primary",onChange:y,orientation:w="horizontal",ScrollButtonComponent:h=U4,scrollButtons:v="auto",selectionFollowsFocus:g,slots:C={},slotProps:k={},TabIndicatorProps:$={},TabScrollButtonProps:E={},textColor:P="primary",value:_,variant:R="standard",visibleScrollbar:j=!1}=r,A=U(r,K4),M=R==="scrollable",O=w==="vertical",N=O?"scrollTop":"scrollLeft",L=O?"top":"left",B=O?"bottom":"right",T=O?"clientHeight":"clientWidth",I=O?"height":"width",W=S({},r,{component:f,allowScrollButtonsMobile:x,indicatorColor:b,orientation:w,vertical:O,scrollButtons:v,textColor:P,variant:R,visibleScrollbar:j,fixed:!M,hideScrollbar:M&&!j,scrollableX:M&&!O,scrollableY:M&&O,centered:c&&!M,scrollButtonsHideMobile:!x}),q=G4(W),se=$n({elementType:C.StartScrollButtonIcon,externalSlotProps:k.startScrollButtonIcon,ownerState:W}),ce=$n({elementType:C.EndScrollButtonIcon,externalSlotProps:k.endScrollButtonIcon,ownerState:W}),[X,K]=m.useState(!1),[re,ke]=m.useState(eg),[ve,he]=m.useState(!1),[Be,ae]=m.useState(!1),[Re,le]=m.useState(!1),[pe,ue]=m.useState({overflow:"hidden",scrollbarWidth:0}),gt=new Map,_e=m.useRef(null),Oe=m.useRef(null),at=()=>{const H=_e.current;let Y;if(H){const xe=H.getBoundingClientRect();Y={clientWidth:H.clientWidth,scrollLeft:H.scrollLeft,scrollTop:H.scrollTop,scrollLeftNormalized:w2(H,i?"rtl":"ltr"),scrollWidth:H.scrollWidth,top:xe.top,bottom:xe.bottom,left:xe.left,right:xe.right}}let fe;if(H&&_!==!1){const xe=Oe.current.children;if(xe.length>0){const qe=xe[gt.get(_)];fe=qe?qe.getBoundingClientRect():null}}return{tabsMeta:Y,tabMeta:fe}},Te=Tt(()=>{const{tabsMeta:H,tabMeta:Y}=at();let fe=0,xe;if(O)xe="top",Y&&H&&(fe=Y.top-H.top+H.scrollTop);else if(xe=i?"right":"left",Y&&H){const xt=i?H.scrollLeftNormalized+H.clientWidth-H.scrollWidth:H.scrollLeft;fe=(i?-1:1)*(Y[xe]-H[xe]+xt)}const qe={[xe]:fe,[I]:Y?Y[I]:0};if(isNaN(re[xe])||isNaN(re[I]))ke(qe);else{const xt=Math.abs(re[xe]-qe[xe]),dn=Math.abs(re[I]-qe[I]);(xt>=1||dn>=1)&&ke(qe)}}),ge=(H,{animation:Y=!0}={})=>{Y?O4(N,_e.current,H,{duration:o.transitions.duration.standard}):_e.current[N]=H},nt=H=>{let Y=_e.current[N];O?Y+=H:(Y+=H*(i?-1:1),Y*=i&&cx()==="reverse"?-1:1),ge(Y)},De=()=>{const H=_e.current[T];let Y=0;const fe=Array.from(Oe.current.children);for(let xe=0;xeH){xe===0&&(Y=H);break}Y+=qe[T]}return Y},be=()=>{nt(-1*De())},lt=()=>{nt(De())},pt=m.useCallback(H=>{ue({overflow:null,scrollbarWidth:H})},[]),yt=()=>{const H={};H.scrollbarSizeListener=M?d.jsx(Z4,{onChange:pt,className:V(q.scrollableX,q.hideScrollbar)}):null;const fe=M&&(v==="auto"&&(ve||Be)||v===!0);return H.scrollButtonStart=fe?d.jsx(h,S({slots:{StartScrollButtonIcon:C.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:se},orientation:w,direction:i?"right":"left",onClick:be,disabled:!ve},E,{className:V(q.scrollButtons,E.className)})):null,H.scrollButtonEnd=fe?d.jsx(h,S({slots:{EndScrollButtonIcon:C.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ce},orientation:w,direction:i?"left":"right",onClick:lt,disabled:!Be},E,{className:V(q.scrollButtons,E.className)})):null,H},ye=Tt(H=>{const{tabsMeta:Y,tabMeta:fe}=at();if(!(!fe||!Y)){if(fe[L]Y[B]){const xe=Y[N]+(fe[B]-Y[B]);ge(xe,{animation:H})}}}),Z=Tt(()=>{M&&v!==!1&&le(!Re)});m.useEffect(()=>{const H=sa(()=>{_e.current&&Te()});let Y;const fe=xt=>{xt.forEach(dn=>{dn.removedNodes.forEach(xr=>{var On;(On=Y)==null||On.unobserve(xr)}),dn.addedNodes.forEach(xr=>{var On;(On=Y)==null||On.observe(xr)})}),H(),Z()},xe=Zn(_e.current);xe.addEventListener("resize",H);let qe;return typeof ResizeObserver<"u"&&(Y=new ResizeObserver(H),Array.from(Oe.current.children).forEach(xt=>{Y.observe(xt)})),typeof MutationObserver<"u"&&(qe=new MutationObserver(fe),qe.observe(Oe.current,{childList:!0})),()=>{var xt,dn;H.clear(),xe.removeEventListener("resize",H),(xt=qe)==null||xt.disconnect(),(dn=Y)==null||dn.disconnect()}},[Te,Z]),m.useEffect(()=>{const H=Array.from(Oe.current.children),Y=H.length;if(typeof IntersectionObserver<"u"&&Y>0&&M&&v!==!1){const fe=H[0],xe=H[Y-1],qe={root:_e.current,threshold:.99},xt=Po=>{he(!Po[0].isIntersecting)},dn=new IntersectionObserver(xt,qe);dn.observe(fe);const xr=Po=>{ae(!Po[0].isIntersecting)},On=new IntersectionObserver(xr,qe);return On.observe(xe),()=>{dn.disconnect(),On.disconnect()}}},[M,v,Re,u==null?void 0:u.length]),m.useEffect(()=>{K(!0)},[]),m.useEffect(()=>{Te()}),m.useEffect(()=>{ye(eg!==re)},[ye,re]),m.useImperativeHandle(l,()=>({updateIndicator:Te,updateScrollButtons:Z}),[Te,Z]);const Ge=d.jsx(Q4,S({},$,{className:V(q.indicator,$.className),ownerState:W,style:S({},re,$.style)}));let zt=0;const Xt=m.Children.map(u,H=>{if(!m.isValidElement(H))return null;const Y=H.props.value===void 0?zt:H.props.value;gt.set(Y,zt);const fe=Y===_;return zt+=1,m.cloneElement(H,S({fullWidth:R==="fullWidth",indicator:fe&&!X&&Ge,selected:fe,selectionFollowsFocus:g,onChange:y,textColor:P,value:Y},zt===1&&_===!1&&!H.props.tabIndex?{tabIndex:0}:{}))}),J=H=>{const Y=Oe.current,fe=it(Y).activeElement;if(fe.getAttribute("role")!=="tab")return;let qe=w==="horizontal"?"ArrowLeft":"ArrowUp",xt=w==="horizontal"?"ArrowRight":"ArrowDown";switch(w==="horizontal"&&i&&(qe="ArrowRight",xt="ArrowLeft"),H.key){case qe:H.preventDefault(),Da(Y,fe,Jv);break;case xt:H.preventDefault(),Da(Y,fe,Zv);break;case"Home":H.preventDefault(),Da(Y,null,Zv);break;case"End":H.preventDefault(),Da(Y,null,Jv);break}},Ce=yt();return d.jsxs(q4,S({className:V(q.root,p),ownerState:W,ref:n,as:f},A,{children:[Ce.scrollButtonStart,Ce.scrollbarSizeListener,d.jsxs(Y4,{className:q.scroller,ownerState:W,style:{overflow:pe.overflow,[O?`margin${i?"Left":"Right"}`:"marginBottom"]:j?void 0:-pe.scrollbarWidth},ref:_e,children:[d.jsx(X4,{"aria-label":s,"aria-labelledby":a,"aria-orientation":w==="vertical"?"vertical":null,className:q.flexContainer,ownerState:W,onKeyDown:J,ref:Oe,role:"tablist",children:Xt}),X&&Ge]}),Ce.scrollButtonEnd]}))}),h1=J4;function eN(e){return te("MuiTextField",e)}ne("MuiTextField",["root"]);const tN=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],nN={standard:r1,filled:Zx,outlined:p1},rN=e=>{const{classes:t}=e;return oe({root:["root"]},eN,t)},oN=D(Jx,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),iN=m.forwardRef(function(t,n){const r=ie({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:p=!1,FormHelperTextProps:f,fullWidth:x=!1,helperText:b,id:y,InputLabelProps:w,inputProps:h,InputProps:v,inputRef:g,label:C,maxRows:k,minRows:$,multiline:E=!1,name:P,onBlur:_,onChange:R,onFocus:j,placeholder:A,required:M=!1,rows:O,select:N=!1,SelectProps:L,type:B,value:T,variant:I="outlined"}=r,W=U(r,tN),q=S({},r,{autoFocus:i,color:l,disabled:u,error:p,fullWidth:x,multiline:E,required:M,select:N,variant:I}),se=rN(q),ce={};I==="outlined"&&(w&&typeof w.shrink<"u"&&(ce.notched=w.shrink),ce.label=C),N&&((!L||!L.native)&&(ce.id=void 0),ce["aria-describedby"]=void 0);const X=aa(y),K=b&&X?`${X}-helper-text`:void 0,re=C&&X?`${X}-label`:void 0,ke=nN[I],ve=d.jsx(ke,S({"aria-describedby":K,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:x,multiline:E,name:P,rows:O,maxRows:k,minRows:$,type:B,value:T,id:X,inputRef:g,onBlur:_,onChange:R,onFocus:j,placeholder:A,inputProps:h},ce,v));return d.jsxs(oN,S({className:V(se.root,a),disabled:u,error:p,fullWidth:x,ref:n,required:M,color:l,variant:I,ownerState:q},W,{children:[C!=null&&C!==""&&d.jsx(o1,S({htmlFor:X,id:re},w,{children:C})),N?d.jsx(m1,S({"aria-describedby":K,id:X,labelId:re,value:T,input:ve},L,{children:s})):ve,b&&d.jsx(vO,S({id:K},f,{children:b}))]}))}),Pt=iN;/** + * @remix-run/router v1.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Gs(){return Gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Xf(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function aN(){return Math.random().toString(36).substr(2,8)}function ng(e,t){return{usr:e.state,key:e.key,idx:t}}function ap(e,t,n,r){return n===void 0&&(n=null),Gs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Eo(t):t,{state:n,key:t&&t.key||r||aN()})}function v1(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Eo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function lN(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Or.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(Gs({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function p(){a=Or.Pop;let w=u(),h=w==null?null:w-c;c=w,l&&l({action:a,location:y.location,delta:h})}function f(w,h){a=Or.Push;let v=ap(y.location,w,h);n&&n(v,w),c=u()+1;let g=ng(v,c),C=y.createHref(v);try{s.pushState(g,"",C)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(C)}i&&l&&l({action:a,location:y.location,delta:1})}function x(w,h){a=Or.Replace;let v=ap(y.location,w,h);n&&n(v,w),c=u();let g=ng(v,c),C=y.createHref(v);s.replaceState(g,"",C),i&&l&&l({action:a,location:y.location,delta:0})}function b(w){let h=o.location.origin!=="null"?o.location.origin:o.location.href,v=typeof w=="string"?w:v1(w);return v=v.replace(/ $/,"%20"),dt(h,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,h)}let y={get action(){return a},get location(){return e(o,s)},listen(w){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(tg,p),l=w,()=>{o.removeEventListener(tg,p),l=null}},createHref(w){return t(o,w)},createURL:b,encodeLocation(w){let h=b(w);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:f,replace:x,go(w){return s.go(w)}};return y}var rg;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(rg||(rg={}));function cN(e,t,n){return n===void 0&&(n="/"),uN(e,t,n,!1)}function uN(e,t,n,r){let o=typeof t=="string"?Eo(t):t,i=x1(o.pathname||"/",n);if(i==null)return null;let s=g1(e);dN(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(dt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=co([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(dt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),g1(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:yN(c,i.index),routesMeta:u})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of y1(i.path))o(i,s,l)}),t}function y1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=y1(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function dN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:xN(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const pN=/^:[\w-]+$/,fN=3,mN=2,hN=1,vN=10,gN=-2,og=e=>e==="*";function yN(e,t){let n=e.split("/"),r=n.length;return n.some(og)&&(r+=gN),t&&(r+=mN),n.filter(o=>!og(o)).reduce((o,i)=>o+(pN.test(i)?fN:i===""?hN:vN),r)}function xN(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function bN(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},i="/",s=[];for(let a=0;a{let{paramName:f,isOptional:x}=u;if(f==="*"){let y=a[p]||"";s=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const b=a[p];return x&&!b?c[f]=void 0:c[f]=(b||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}function SN(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Xf(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function CN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function x1(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)||"/"}function wN(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Eo(e):e;return{pathname:n?n.startsWith("/")?n:kN(n,t):t,search:TN(r),hash:MN(o)}}function kN(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Gu(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 and the router will parse it for you.'}function EN(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function $N(e,t){let n=EN(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function PN(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Eo(e):(o=Gs({},e),dt(!o.pathname||!o.pathname.includes("?"),Gu("?","pathname","search",o)),dt(!o.pathname||!o.pathname.includes("#"),Gu("#","pathname","hash",o)),dt(!o.search||!o.search.includes("#"),Gu("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=n;else{let p=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),p-=1;o.pathname=f.join("/")}a=p>=0?t[p]:"/"}let l=wN(o,a),c=s&&s!=="/"&&s.endsWith("/"),u=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const co=e=>e.join("/").replace(/\/\/+/g,"/"),RN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),TN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,MN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function jN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const b1=["post","put","patch","delete"];new Set(b1);const ON=["get",...b1];new Set(ON);/** + * React Router v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function qs(){return qs=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),m.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let p=PN(c,JSON.parse(s),i,u.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:co([t,p.pathname])),(u.replace?r.replace:r.push)(p,u.state,u)},[t,r,s,i,e])}function NN(e,t){return AN(e,t)}function AN(e,t,n,r){eu()||dt(!1);let{navigator:o}=m.useContext(Zc),{matches:i}=m.useContext(Oi),s=i[i.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=Zf(),u;if(t){var p;let w=typeof t=="string"?Eo(t):t;l==="/"||(p=w.pathname)!=null&&p.startsWith(l)||dt(!1),u=w}else u=c;let f=u.pathname||"/",x=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");x="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let b=cN(e,{pathname:x}),y=FN(b&&b.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:co([l,o.encodeLocation?o.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:co([l,o.encodeLocation?o.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return t&&y?m.createElement(Jc.Provider,{value:{location:qs({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Or.Pop}},y):y}function LN(){let e=HN(),t=jN(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:o},n):null,i)}const zN=m.createElement(LN,null);class BN extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?m.createElement(Oi.Provider,{value:this.props.routeContext},m.createElement(S1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function DN(e){let{routeContext:t,match:n,children:r}=e,o=m.useContext(Qf);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(Oi.Provider,{value:t},r)}function FN(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(o=n)==null?void 0:o.errors;if(a!=null){let u=s.findIndex(p=>p.route.id&&(a==null?void 0:a[p.route.id])!==void 0);u>=0||dt(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,p,f)=>{let x,b=!1,y=null,w=null;n&&(x=a&&p.route.id?a[p.route.id]:void 0,y=p.route.errorElement||zN,l&&(c<0&&f===0?(GN("route-fallback",!1),b=!0,w=null):c===f&&(b=!0,w=p.route.hydrateFallbackElement||null)));let h=t.concat(s.slice(0,f+1)),v=()=>{let g;return x?g=y:b?g=w:p.route.Component?g=m.createElement(p.route.Component,null):p.route.element?g=p.route.element:g=u,m.createElement(DN,{match:p,routeContext:{outlet:u,matches:h,isDataRoute:n!=null},children:g})};return n&&(p.route.ErrorBoundary||p.route.errorElement||f===0)?m.createElement(BN,{location:n.location,revalidation:n.revalidation,component:y,error:x,children:v(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):v()},null)}var w1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(w1||{}),ql=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ql||{});function WN(e){let t=m.useContext(Qf);return t||dt(!1),t}function UN(e){let t=m.useContext(_N);return t||dt(!1),t}function VN(e){let t=m.useContext(Oi);return t||dt(!1),t}function k1(e){let t=VN(),n=t.matches[t.matches.length-1];return n.route.id||dt(!1),n.route.id}function HN(){var e;let t=m.useContext(S1),n=UN(ql.UseRouteError),r=k1(ql.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function KN(){let{router:e}=WN(w1.UseNavigateStable),t=k1(ql.UseNavigateStable),n=m.useRef(!1);return C1(()=>{n.current=!0}),m.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,qs({fromRouteId:t},i)))},[e,t])}const sg={};function GN(e,t,n){!t&&!sg[e]&&(sg[e]=!0)}function qN(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function kr(e){dt(!1)}function YN(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Or.Pop,navigator:i,static:s=!1,future:a}=e;eu()&&dt(!1);let l=t.replace(/^\/*/,"/"),c=m.useMemo(()=>({basename:l,navigator:i,static:s,future:qs({v7_relativeSplatPath:!1},a)}),[l,a,i,s]);typeof r=="string"&&(r=Eo(r));let{pathname:u="/",search:p="",hash:f="",state:x=null,key:b="default"}=r,y=m.useMemo(()=>{let w=x1(u,l);return w==null?null:{location:{pathname:w,search:p,hash:f,state:x,key:b},navigationType:o}},[l,u,p,f,x,b,o]);return y==null?null:m.createElement(Zc.Provider,{value:c},m.createElement(Jc.Provider,{children:n,value:y}))}function XN(e){let{children:t,location:n}=e;return NN(lp(t),n)}new Promise(()=>{});function lp(e,t){t===void 0&&(t=[]);let n=[];return m.Children.forEach(e,(r,o)=>{if(!m.isValidElement(r))return;let i=[...t,o];if(r.type===m.Fragment){n.push.apply(n,lp(r.props.children,i));return}r.type!==kr&&dt(!1),!r.props.index||!r.props.children||dt(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=lp(r.props.children,i)),n.push(s)}),n}/** + * React Router DOM v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */const QN="6";try{window.__reactRouterVersion=QN}catch{}const ZN="startTransition",ag=cl[ZN];function JN(e){let{basename:t,children:n,future:r,window:o}=e,i=m.useRef();i.current==null&&(i.current=sN({window:o,v5Compat:!0}));let s=i.current,[a,l]=m.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},u=m.useCallback(p=>{c&&ag?ag(()=>l(p)):l(p)},[l,c]);return m.useLayoutEffect(()=>s.listen(u),[s,u]),m.useEffect(()=>qN(r),[r]),m.createElement(YN,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var lg;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lg||(lg={}));var cg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(cg||(cg={}));const ug=e=>{let t;const n=new Set,r=(u,p)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const x=t;t=p??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(b=>b(t,x))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{n.clear()}},c=t=e(r,o,l);return l},e5=e=>e?ug(e):ug;var E1={exports:{}},$1={},P1={exports:{}},R1={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Si=m;function t5(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var n5=typeof Object.is=="function"?Object.is:t5,r5=Si.useState,o5=Si.useEffect,i5=Si.useLayoutEffect,s5=Si.useDebugValue;function a5(e,t){var n=t(),r=r5({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return i5(function(){o.value=n,o.getSnapshot=t,qu(o)&&i({inst:o})},[e,n,t]),o5(function(){return qu(o)&&i({inst:o}),e(function(){qu(o)&&i({inst:o})})},[e]),s5(n),n}function qu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!n5(e,n)}catch{return!0}}function l5(e,t){return t()}var c5=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l5:a5;R1.useSyncExternalStore=Si.useSyncExternalStore!==void 0?Si.useSyncExternalStore:c5;P1.exports=R1;var u5=P1.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var tu=m,d5=u5;function p5(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var f5=typeof Object.is=="function"?Object.is:p5,m5=d5.useSyncExternalStore,h5=tu.useRef,v5=tu.useEffect,g5=tu.useMemo,y5=tu.useDebugValue;$1.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=h5(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=g5(function(){function l(x){if(!c){if(c=!0,u=x,x=r(x),o!==void 0&&s.hasValue){var b=s.value;if(o(b,x))return p=b}return p=x}if(b=p,f5(u,x))return b;var y=r(x);return o!==void 0&&o(b,y)?(u=x,b):(u=x,p=y)}var c=!1,u,p,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=m5(e,i[0],i[1]);return v5(function(){s.hasValue=!0,s.value=a},[a]),y5(a),a};E1.exports=$1;var x5=E1.exports;const b5=up(x5),{useDebugValue:S5}=xn,{useSyncExternalStoreWithSelector:C5}=b5;const w5=e=>e;function k5(e,t=w5,n){const r=C5(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return S5(r),r}const dg=e=>{const t=typeof e=="function"?e5(e):e,n=(r,o)=>k5(t,r,o);return Object.assign(n,t),n},T1=e=>e?dg(e):dg,E5="modulepreload",$5=function(e){return"/"+e},pg={},P5=function(t,n,r){if(!n||n.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=$5(i),i in pg)return;pg[i]=!0;const s=i.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!r)for(let u=o.length-1;u>=0;u--){const p=o[u];if(p.href===i&&(!s||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":E5,s||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),s)return new Promise((u,p)=>{c.addEventListener("load",u),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})};let bs=null,Yu=!1,Fa=null;const R5=async()=>bs?Promise.resolve():(Yu&&Fa||(Yu=!0,Fa=new Promise(async(e,t)=>{try{try{const n=await P5(()=>import("./wasm_app-bd9134aa.js"),[]);await n.default(),bs=n,console.log("WASM module initialized successfully"),e()}catch(n){console.error("Failed to initialize WASM module:",n),t(n)}}finally{Yu=!1}})),Fa),Bt=async()=>{if(bs||await R5(),!bs)throw new Error("WASM module failed to initialize");return bs},al=e=>new TextEncoder().encode(e),T5=e=>new TextDecoder().decode(e),M5=()=>typeof chrome<"u"&&!!chrome.runtime&&!!chrome.runtime.id,jt={pendingScripts:[],scriptResults:[]},gn=()=>M5()?chrome:{runtime:{sendMessage:e=>(console.log("Mock sendMessage called with:",e),e.type==="SESSION_STATUS"?Promise.resolve({active:!1}):e.type==="CREATE_KEYSPACE"?(jt.currentKeyspace=e.keyspace,Promise.resolve({success:!0})):e.type==="UNLOCK_SESSION"?(jt.currentKeyspace=e.keyspace,Promise.resolve({success:!0})):e.type==="LOCK_SESSION"?(delete jt.currentKeyspace,Promise.resolve({success:!0})):Promise.resolve({success:!1})),getURL:e=>e},storage:{local:{get:e=>{if(console.log("Mock storage.local.get called with:",e),typeof e=="string")return e==="pendingScripts"&&!jt[e]&&(jt[e]=[]),e==="scriptResults"&&!jt[e]&&(jt[e]=[]),Promise.resolve({[e]:jt[e]});if(Array.isArray(e)){const t={};return e.forEach(n=>{n==="pendingScripts"&&!jt[n]&&(jt[n]=[]),n==="scriptResults"&&!jt[n]&&(jt[n]=[]),t[n]=jt[n]}),Promise.resolve(t)}return Promise.resolve(jt)},set:e=>(console.log("Mock storage.local.set called with:",e),Object.keys(e).forEach(t=>{jt[t]=e[t]}),Promise.resolve())}}},tr=T1((e,t)=>({isSessionUnlocked:!1,currentKeyspace:null,currentKeypair:null,availableKeypairs:[],isWebSocketConnected:!1,webSocketUrl:null,isWasmLoaded:!1,initWasm:async()=>{try{return e({isWasmLoaded:!0}),!0}catch(n){return console.error("Failed to initialize WASM module:",n),!1}},checkSessionStatus:async()=>{try{const r=await gn().runtime.sendMessage({type:"SESSION_STATUS"});if(r&&r.active)try{const o=await Bt();if(o.is_unlocked()){try{const s=await o.current_keypair_metadata(),a=JSON.parse(s);e({isSessionUnlocked:!0,currentKeypair:a}),await t().listKeypairs()}catch{e({isSessionUnlocked:!0})}return!0}}catch(o){console.error("WASM error checking session status:",o)}return e({isSessionUnlocked:!1}),!1}catch(n){return console.error("Failed to check session status:",n),e({isSessionUnlocked:!1}),!1}},unlockSession:async(n,r)=>{try{const o=await Bt();await o.init_session(n,r),o.init_rhai_env(),await gn().runtime.sendMessage({type:"SESSION_UNLOCK"}),e({isSessionUnlocked:!0,currentKeyspace:n,currentKeypair:null});const s=await t().listKeypairs();return e({availableKeypairs:s}),!0}catch(o){return console.error("Failed to unlock session:",o),!1}},lockSession:async()=>{try{return(await Bt()).lock_session(),await gn().runtime.sendMessage({type:"SESSION_LOCK"}),e({isSessionUnlocked:!1,currentKeyspace:null,currentKeypair:null,availableKeypairs:[],isWebSocketConnected:!1,webSocketUrl:null}),!0}catch(n){return console.error("Failed to lock session:",n),!1}},createKeyspace:async(n,r)=>{try{const o=await Bt();return await o.create_keyspace(n,r),o.init_rhai_env(),await gn().runtime.sendMessage({type:"SESSION_UNLOCK"}),e({isSessionUnlocked:!0,currentKeyspace:n,currentKeypair:null,availableKeypairs:[]}),!0}catch(o){return console.error("Failed to create keyspace:",o),!1}},listKeypairs:async()=>{try{console.log("Listing keypairs from WASM module");const n=await Bt();console.log("WASM module loaded, calling list_keypairs");let r;try{r=await n.list_keypairs(),console.log("Raw keypairs JSON from WASM:",r)}catch(s){throw console.error("Error calling list_keypairs:",s),new Error(`Failed to list keypairs: ${s.message||s}`)}let o;try{o=JSON.parse(r),console.log("Parsed keypairs object:",o)}catch(s){throw console.error("Error parsing keypairs JSON:",s),new Error(`Failed to parse keypairs JSON: ${s.message}`)}const i=o.map((s,a)=>{var l,c,u;return console.log(`Processing keypair at index ${a}:`,s),{id:s.id,type:s.key_type||"Unknown",name:(l=s.metadata)==null?void 0:l.name,description:(c=s.metadata)==null?void 0:c.description,createdAt:((u=s.metadata)==null?void 0:u.created_at)||Date.now()}});return console.log("Formatted keypairs for UI:",i),e({availableKeypairs:i}),i}catch(n){return console.error("Failed to list keypairs:",n),[]}},selectKeypair:async n=>{try{console.log("Selecting keypair with ID:",n);const{availableKeypairs:r}=t();console.log("Available keypairs:",JSON.stringify(r));const o=await Bt();console.log("WASM module loaded, attempting to select keypair");try{await o.select_keypair(n),console.log("Successfully selected keypair in WASM")}catch(s){throw console.error("Error in WASM select_keypair:",s),new Error(`select_keypair error: ${s.message||s}`)}const i=r.find(s=>s.id===n);if(i)console.log("Found keypair in available list, setting as current"),e({currentKeypair:i});else{console.log("Keypair not found in available list, creating new entry from available data");const s=r.find(a=>a.id===n);if(s)e({currentKeypair:s});else{const a={id:n,type:"Unknown",name:`Keypair ${n.substring(0,8)}...`,createdAt:Date.now()};e({currentKeypair:a})}}return!0}catch(r){throw console.error("Failed to select keypair:",r),r}},createKeypair:async(n,r)=>{try{const o=await Bt(),i=r?JSON.stringify({name:r.name,description:r.description,created_at:Date.now()}):void 0,s=await o.add_keypair(n,i);return await t().listKeypairs(),s}catch(o){throw console.error("Failed to create keypair:",o),o}},connectWebSocket:async n=>{try{const r=await Bt(),{currentKeypair:o}=t();if(!o)throw new Error("No keypair selected");const i=await r.current_keypair_public_key(),s=Array.from(i).map(c=>c.toString(16).padStart(2,"0")).join(""),l=await gn().runtime.sendMessage({type:"CONNECT_WEBSOCKET",serverUrl:n,publicKey:s});if(l&&l.success)return e({isWebSocketConnected:!0,webSocketUrl:n}),!0;throw new Error((l==null?void 0:l.error)||"Failed to connect to WebSocket server")}catch(r){return console.error("Failed to connect to WebSocket:",r),!1}},disconnectWebSocket:async()=>{try{const r=await gn().runtime.sendMessage({type:"DISCONNECT_WEBSOCKET"});if(r&&r.success)return e({isWebSocketConnected:!1,webSocketUrl:null}),!0;throw new Error((r==null?void 0:r.error)||"Failed to disconnect from WebSocket server")}catch(n){return console.error("Failed to disconnect from WebSocket:",n),!1}},executeScript:async n=>{try{return await(await Bt()).run_rhai(n)}catch(r){throw console.error("Failed to execute script:",r),r}},signMessage:async n=>{try{const r=await Bt(),o=al(n);return await r.sign(o)}catch(r){throw console.error("Failed to sign message:",r),r}}})),j5=()=>{const e=$o(),{isSessionUnlocked:t,unlockSession:n,createKeyspace:r}=tr(),[o,i]=m.useState(""),[s,a]=m.useState(""),[l,c]=m.useState(!1),[u,p]=m.useState(null),[f,x]=m.useState("unlock"),b=async y=>{y.preventDefault(),p(null),c(!0);try{let w=!1;f==="unlock"?w=await n(o,s):w=await r(o,s),w?e("/keypair"):p(f==="unlock"?"Failed to unlock keyspace. Check your password and try again.":"Failed to create keyspace. Please try again.")}catch(w){p(w.message||"An unexpected error occurred")}finally{c(!1)}};return t?d.jsxs(ee,{sx:{textAlign:"center",py:4},children:[d.jsx(Q,{variant:"h5",gutterBottom:!0,children:"Welcome to Hero Vault"}),d.jsx(Q,{variant:"body1",color:"text.secondary",paragraph:!0,children:"Your session is unlocked. You can now use the extension features."}),d.jsxs(cO,{direction:"row",spacing:2,justifyContent:"center",mt:3,children:[d.jsx(Je,{variant:"contained",color:"primary",onClick:()=>e("/keypair"),children:"Manage Keys"}),d.jsx(Je,{variant:"outlined",color:"secondary",onClick:()=>e("/script"),children:"Run Scripts"})]})]}):d.jsxs(ee,{sx:{maxWidth:400,mx:"auto",py:2},children:[d.jsx(Q,{variant:"h5",align:"center",gutterBottom:!0,children:"Hero Vault"}),d.jsx(op,{variant:"outlined",sx:{mt:3},children:d.jsxs(ip,{children:[d.jsx(Q,{variant:"h6",gutterBottom:!0,children:f==="unlock"?"Unlock Keyspace":"Create New Keyspace"}),u&&d.jsx(Ft,{severity:"error",sx:{mb:2},children:u}),d.jsxs("form",{onSubmit:b,children:[d.jsx(Pt,{label:"Keyspace Name",value:o,onChange:y=>i(y.target.value),fullWidth:!0,margin:"normal",required:!0,disabled:l}),d.jsx(Pt,{label:"Password",type:"password",value:s,onChange:y=>a(y.target.value),fullWidth:!0,margin:"normal",required:!0,disabled:l}),d.jsxs(ee,{sx:{mt:3,display:"flex",justifyContent:"space-between"},children:[d.jsx(Je,{variant:"text",onClick:()=>x(f==="unlock"?"create":"unlock"),disabled:l,children:f==="unlock"?"Create New Keyspace":"Unlock Existing"}),d.jsx(Je,{type:"submit",variant:"contained",color:"primary",disabled:l||!o||!s,children:l?d.jsx(Gn,{size:24,color:"inherit"}):f==="unlock"?"Unlock":"Create"})]})]})]})})]})};var Jf={},Xu={};const O5=vr(E$);var fg;function vt(){return fg||(fg=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=O5}(Xu)),Xu}var _5=st;Object.defineProperty(Jf,"__esModule",{value:!0});var Ys=Jf.default=void 0,I5=_5(vt()),N5=d;Ys=Jf.default=(0,I5.default)((0,N5.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");var em={},A5=st;Object.defineProperty(em,"__esModule",{value:!0});var M1=em.default=void 0,L5=A5(vt()),z5=d;M1=em.default=(0,L5.default)((0,z5.jsx)("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11z"}),"Security");const B5=()=>{const e=$o(),{isSessionUnlocked:t,currentKeyspace:n,currentKeypair:r,lockSession:o}=tr(),[i,s]=m.useState([]),[a,l]=m.useState(!1);m.useEffect(()=>{t||e("/")},[t,e]),m.useEffect(()=>{t&&(async()=>{try{l(!0);const p=await chrome.storage.local.get("sessionActivities");p.sessionActivities&&s(p.sessionActivities)}catch(p){console.error("Failed to load session activities:",p)}finally{l(!1)}})()},[t]);const c=async()=>{try{await o(),e("/")}catch(u){console.error("Failed to lock session:",u)}};return t?d.jsxs(ee,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[d.jsx(Q,{variant:"h6",gutterBottom:!0,children:"Session Management"}),d.jsxs(Bu,{container:!0,spacing:2,sx:{mb:3},children:[d.jsx(Bu,{item:!0,xs:12,sm:6,children:d.jsx(op,{variant:"outlined",children:d.jsxs(ip,{children:[d.jsx(Q,{color:"text.secondary",gutterBottom:!0,children:"Current Keyspace"}),d.jsx(Q,{variant:"h5",component:"div",children:n||"None"})]})})}),d.jsx(Bu,{item:!0,xs:12,sm:6,children:d.jsx(op,{variant:"outlined",children:d.jsxs(ip,{children:[d.jsx(Q,{color:"text.secondary",gutterBottom:!0,children:"Selected Keypair"}),d.jsx(Q,{variant:"h5",component:"div",children:(r==null?void 0:r.name)||(r==null?void 0:r.id)||"None"}),r&&d.jsxs(Q,{variant:"body2",color:"text.secondary",children:["Type: ",r.type]})]})})})]}),d.jsxs(ee,{sx:{display:"flex",justifyContent:"space-between",mb:2},children:[d.jsx(Q,{variant:"subtitle1",children:"Session Activity"}),d.jsx(Je,{variant:"outlined",color:"error",startIcon:d.jsx(Ys,{}),onClick:c,children:"Lock Session"})]}),a?d.jsx(ee,{sx:{display:"flex",justifyContent:"center",py:4},children:d.jsx(Gn,{})}):i.length===0?d.jsx(Le,{sx:{p:3,textAlign:"center"},children:d.jsx(Q,{variant:"body1",color:"text.secondary",children:"No session activity recorded yet."})}):d.jsx(Le,{variant:"outlined",sx:{flexGrow:1,overflow:"auto"},children:d.jsx(xo,{disablePadding:!0,children:i.map((u,p)=>d.jsxs(ee,{children:[p>0&&d.jsx(Dn,{}),d.jsx(lr,{children:d.jsx(Sn,{primary:d.jsx(ee,{sx:{display:"flex",alignItems:"center",gap:1},children:d.jsx(Q,{variant:"subtitle2",children:u.action})}),secondary:d.jsxs(d.Fragment,{children:[d.jsx(Q,{variant:"body2",color:"text.secondary",children:new Date(u.timestamp).toLocaleString()}),u.details&&d.jsx(Q,{variant:"body2",color:"text.secondary",children:u.details})]})})})]},u.id))})}),d.jsx(ee,{sx:{mt:3},children:d.jsx(Ft,{severity:"info",icon:d.jsx(M1,{}),children:"Your session is active. All cryptographic operations and script executions require explicit approval."})})]}):null};var tm={},D5=st;Object.defineProperty(tm,"__esModule",{value:!0});var j1=tm.default=void 0,F5=D5(vt()),W5=d;j1=tm.default=(0,F5.default)((0,W5.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");var nm={},U5=st;Object.defineProperty(nm,"__esModule",{value:!0});var O1=nm.default=void 0,V5=U5(vt()),H5=d;O1=nm.default=(0,V5.default)((0,H5.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");const K5=()=>{const e=$o(),{isSessionUnlocked:t,availableKeypairs:n,currentKeypair:r,listKeypairs:o,selectKeypair:i,createKeypair:s}=tr(),[a,l]=m.useState(!0),[c,u]=m.useState(null),[p,f]=m.useState(!1),[x,b]=m.useState(""),[y,w]=m.useState("Secp256k1"),[h,v]=m.useState(""),[g,C]=m.useState(!1);m.useEffect(()=>{t||e("/")},[t,e]),m.useEffect(()=>{t&&(async()=>{try{l(!0),await o()}catch(P){u(P.message||"Failed to load keypairs")}finally{l(!1)}})()},[t,o]);const k=async E=>{try{l(!0),await i(E)}catch(P){u(P.message||"Failed to select keypair")}finally{l(!1)}},$=async()=>{try{C(!0),u(null),await s(y,{name:x,description:h}),f(!1),b(""),v(""),await o()}catch(E){u(E.message||"Failed to create keypair")}finally{C(!1)}};return t?d.jsxs(ee,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[d.jsxs(ee,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[d.jsx(Q,{variant:"h6",children:"Keypair Management"}),d.jsx(Je,{variant:"contained",startIcon:d.jsx(j1,{}),onClick:()=>f(!0),disabled:a,children:"Create New"})]}),c&&d.jsx(Ft,{severity:"error",sx:{mb:2},children:c}),a?d.jsx(ee,{sx:{display:"flex",justifyContent:"center",py:4},children:d.jsx(Gn,{})}):n.length===0?d.jsx(Le,{sx:{p:3,textAlign:"center"},children:d.jsx(Q,{variant:"body1",color:"text.secondary",children:"No keypairs found. Create your first keypair to get started."})}):d.jsx(Le,{variant:"outlined",sx:{flexGrow:1,overflow:"auto"},children:d.jsx(xo,{disablePadding:!0,children:n.map((E,P)=>d.jsxs(ee,{children:[P>0&&d.jsx(Dn,{}),d.jsxs(lr,{button:!0,selected:(r==null?void 0:r.id)===E.id,onClick:()=>k(E.id),children:[d.jsx(Sn,{primary:d.jsxs(ee,{sx:{display:"flex",alignItems:"center",gap:1},children:[E.name||E.id,d.jsx(yn,{label:E.type,size:"small",color:"primary",variant:"outlined"})]}),secondary:d.jsxs(Q,{variant:"body2",color:"text.secondary",children:[E.description||"No description",d.jsx("br",{}),"Created: ",new Date(E.createdAt).toLocaleString()]})}),d.jsx(Kl,{children:(r==null?void 0:r.id)===E.id&&d.jsx(Fr,{edge:"end",disabled:!0,children:d.jsx(O1,{color:"success"})})})]})]},E.id))})}),d.jsxs(Vf,{open:p,onClose:()=>f(!1),maxWidth:"sm",fullWidth:!0,children:[d.jsx(Gf,{children:"Create New Keypair"}),d.jsxs(Kf,{children:[d.jsx(Pt,{label:"Name",value:x,onChange:E=>b(E.target.value),fullWidth:!0,margin:"normal",disabled:g}),d.jsxs(Jx,{fullWidth:!0,margin:"normal",children:[d.jsx(o1,{children:"Type"}),d.jsxs(m1,{value:y,onChange:E=>w(E.target.value),disabled:g,children:[d.jsx(xs,{value:"Ed25519",children:"Ed25519"}),d.jsx(xs,{value:"Secp256k1",children:"Secp256k1 (Ethereum)"})]})]}),d.jsx(Pt,{label:"Description",value:h,onChange:E=>v(E.target.value),fullWidth:!0,margin:"normal",multiline:!0,rows:2,disabled:g})]}),d.jsxs(Hf,{children:[d.jsx(Je,{onClick:()=>f(!1),disabled:g,children:"Cancel"}),d.jsx(Je,{onClick:$,color:"primary",variant:"contained",disabled:g||!x,children:g?d.jsx(Gn,{size:24}):"Create"})]})]})]}):null};var rm={},G5=st;Object.defineProperty(rm,"__esModule",{value:!0});var cp=rm.default=void 0,q5=G5(vt()),Y5=d;cp=rm.default=(0,q5.default)((0,Y5.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");var om={},X5=st;Object.defineProperty(om,"__esModule",{value:!0});var _1=om.default=void 0,Q5=X5(vt()),Z5=d;_1=om.default=(0,Q5.default)((0,Z5.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");const J5=()=>{const e=$o(),{isSessionUnlocked:t,currentKeypair:n}=tr(),[r,o]=m.useState(0),[i,s]=m.useState(""),[a,l]=m.useState(!1),[c,u]=m.useState(null),[p,f]=m.useState(null),[x,b]=m.useState([]),[y,w]=m.useState([]),[h,v]=m.useState(null),[g,C]=m.useState(!1),[k,$]=m.useState(null);m.useEffect(()=>{t||e("/")},[t,e]),m.useEffect(()=>{t&&(async()=>{try{const N=await gn().storage.local.get("pendingScripts");N.pendingScripts&&w(N.pendingScripts)}catch(O){console.error("Failed to load pending scripts:",O)}})()},[t]),m.useEffect(()=>{t&&(async()=>{try{const N=await gn().storage.local.get("scriptResults");N.scriptResults&&b(N.scriptResults)}catch(O){console.error("Failed to load script results:",O)}})()},[t]);const E=(M,O)=>{o(O)},P=async()=>{if(i.trim()){l(!0),$(null),u(null),f(null);try{const M=await tr.getState().executeScript(i);u(M),f(!0);const N=[{id:`script-${Date.now()}`,timestamp:Date.now(),script:i,result:M,success:!0},...x].slice(0,20);b(N),await gn().storage.local.set({scriptResults:N})}catch(M){$(M.message||"Failed to execute script"),f(!1),u("Execution failed")}finally{l(!1)}}},_=M=>{v(M),C(!0)},R=async()=>{if(!h)return;C(!1),s(h.script),o(0);const M=y.filter(N=>N.id!==h.id);w(M),await gn().storage.local.set({pendingScripts:M}),v(null)},j=async()=>{if(!h)return;const M=y.filter(N=>N.id!==h.id);w(M),await gn().storage.local.set({pendingScripts:M}),C(!1),v(null)},A=async()=>{b([]),await gn().storage.local.set({scriptResults:[]})};return t?d.jsxs(ee,{sx:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[d.jsx(ee,{sx:{borderBottom:1,borderColor:"divider"},children:d.jsxs(h1,{value:r,onChange:E,"aria-label":"script tabs",variant:"scrollable",scrollButtons:"auto",allowScrollButtonsMobile:!0,sx:{minHeight:"48px"},children:[d.jsx(oo,{label:"Execute",sx:{minHeight:"48px",py:0}}),d.jsx(oo,{label:d.jsxs(ee,{sx:{display:"flex",alignItems:"center"},children:["Pending",y.length>0&&d.jsx(yn,{label:y.length,size:"small",color:"primary",sx:{ml:1}})]}),sx:{minHeight:"48px",py:0}}),d.jsx(oo,{label:"History",sx:{minHeight:"48px",py:0}})]})}),r===0&&d.jsx(ee,{sx:{p:2,flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden",height:"calc(100% - 48px)"},children:d.jsxs(ee,{sx:{display:"flex",flexDirection:"column",overflow:"auto",height:"100%",pb:2},children:[!n&&d.jsx(Ft,{severity:"warning",sx:{mb:2},children:"No keypair selected. Select a keypair to enable script execution with signing capabilities."}),k&&d.jsx(Ft,{severity:"error",sx:{mb:2},children:k}),d.jsx(Pt,{label:"Rhai Script",multiline:!0,rows:6,value:i,onChange:M=>s(M.target.value),fullWidth:!0,variant:"outlined",placeholder:"Enter your Rhai script here...",sx:{mb:2},disabled:a}),d.jsx(ee,{sx:{display:"flex",justifyContent:"flex-end",mb:2},children:d.jsx(Je,{variant:"contained",color:"primary",startIcon:d.jsx(cp,{}),onClick:P,disabled:a||!i.trim(),children:a?d.jsx(Gn,{size:24}):"Execute"})}),c&&d.jsxs(Le,{variant:"outlined",sx:{p:2,bgcolor:p?"success.dark":"error.dark",color:"white",overflowY:"auto",mb:2,minHeight:"100px",maxHeight:"200px"},children:[d.jsx(Q,{variant:"subtitle2",gutterBottom:!0,children:"Execution Result:"}),d.jsx(Q,{variant:"body2",component:"pre",sx:{whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"monospace"},children:c})]})]})}),r===1&&d.jsx(ee,{sx:{p:2,flexGrow:1,display:"flex",flexDirection:"column"},children:y.length===0?d.jsx(Le,{sx:{p:3,textAlign:"center"},children:d.jsx(Q,{variant:"body1",color:"text.secondary",children:"No pending scripts. Incoming scripts from connected WebSocket servers will appear here."})}):d.jsx(Le,{variant:"outlined",sx:{flexGrow:1,overflow:"auto"},children:d.jsx(xo,{disablePadding:!0,children:y.map((M,O)=>d.jsxs(ee,{children:[O>0&&d.jsx(Dn,{}),d.jsxs(lr,{children:[d.jsx(Sn,{primary:M.title,secondary:d.jsxs(d.Fragment,{children:[d.jsx(Q,{variant:"body2",color:"text.secondary",children:M.description||"No description"}),d.jsx(ee,{sx:{mt:.5},children:M.tags.map(N=>d.jsx(yn,{label:N,size:"small",color:N==="remote"?"secondary":"primary",variant:"outlined",sx:{mr:.5}},N))})]})}),d.jsx(Kl,{children:d.jsx(Fr,{edge:"end",onClick:()=>_(M),"aria-label":"view script",children:d.jsx(_1,{})})})]})]},M.id))})})}),r===2&&d.jsx(ee,{sx:{p:2,flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden",height:"calc(100% - 48px)"},children:d.jsxs(ee,{sx:{display:"flex",flexDirection:"column",overflow:"auto",height:"100%",pb:2},children:[d.jsx(ee,{sx:{display:"flex",justifyContent:"flex-end",mb:2},children:d.jsx(Je,{variant:"outlined",color:"error",size:"small",onClick:A,disabled:x.length===0,children:"Clear History"})}),x.length===0?d.jsx(Le,{sx:{p:3,textAlign:"center"},children:d.jsx(Q,{variant:"body1",color:"text.secondary",children:"No script execution history yet."})}):d.jsx(Le,{variant:"outlined",sx:{flexGrow:1,overflow:"auto"},children:d.jsx(xo,{disablePadding:!0,children:x.map((M,O)=>d.jsxs(ee,{children:[O>0&&d.jsx(Dn,{}),d.jsxs(lr,{children:[d.jsx(Sn,{primary:d.jsxs(ee,{sx:{display:"flex",alignItems:"center",gap:1},children:[d.jsx(Q,{variant:"subtitle2",children:new Date(M.timestamp).toLocaleString()}),d.jsx(yn,{label:M.success?"Success":"Failed",size:"small",color:M.success?"success":"error",variant:"outlined"})]}),secondary:d.jsx(Q,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"280px"},children:M.script})}),d.jsx(Kl,{children:d.jsx(Fr,{edge:"end",onClick:()=>{s(M.script),o(0)},"aria-label":"reuse script",children:d.jsx(cp,{})})})]})]},M.id))})})]})}),d.jsxs(Vf,{open:g,onClose:()=>C(!1),maxWidth:"md",fullWidth:!0,children:[d.jsx(Gf,{children:(h==null?void 0:h.title)||"Script Details"}),d.jsx(Kf,{children:h&&d.jsxs(d.Fragment,{children:[d.jsx(Q,{variant:"subtitle2",gutterBottom:!0,children:"Description:"}),d.jsx(Q,{variant:"body2",paragraph:!0,children:h.description||"No description provided"}),d.jsx(ee,{sx:{mb:2},children:h.tags.map(M=>d.jsx(yn,{label:M,size:"small",color:M==="remote"?"secondary":"primary",sx:{mr:.5}},M))}),d.jsx(Q,{variant:"subtitle2",gutterBottom:!0,children:"Script Content:"}),d.jsx(Le,{variant:"outlined",sx:{p:2,bgcolor:"background.paper",maxHeight:"300px",overflow:"auto"},children:d.jsx(Q,{variant:"body2",component:"pre",sx:{whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"monospace"},children:h.script})}),d.jsx(Ft,{severity:"warning",sx:{mt:2},children:d.jsx(Q,{variant:"body2",children:h.tags.includes("remote")?"This is a remote script. If approved, your signature will be sent to the server and the script may execute remotely.":"This script will execute locally in your browser extension if approved."})})]})}),d.jsxs(Hf,{children:[d.jsx(Je,{onClick:j,color:"error",variant:"outlined",children:"Reject"}),d.jsx(Je,{onClick:R,color:"primary",variant:"contained",children:"Approve"})]})]})]}):null};var im={},e3=st;Object.defineProperty(im,"__esModule",{value:!0});var I1=im.default=void 0,t3=e3(vt()),n3=d;I1=im.default=(0,t3.default)((0,n3.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");var sm={},r3=st;Object.defineProperty(sm,"__esModule",{value:!0});var N1=sm.default=void 0,o3=r3(vt()),i3=d;N1=sm.default=(0,o3.default)((0,i3.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info");const s3=()=>{const[e,t]=m.useState({darkMode:!0,autoLockTimeout:15,confirmCryptoOperations:!0,showScriptNotifications:!0}),[n,r]=m.useState(!1),[o,i]=m.useState(""),[s,a]=m.useState(!1),[l,c]=m.useState("");m.useEffect(()=>{(async()=>{try{const x=await chrome.storage.local.get("settings");x.settings&&t(x.settings)}catch(x){console.error("Failed to load settings:",x)}})()},[]);const u=(f,x)=>{const b={...e,[f]:x};t(b),chrome.storage.local.set({settings:b}).then(()=>{c("Settings saved"),a(!0)}).catch(y=>{console.error("Failed to save settings:",y),c("Failed to save settings"),a(!0)})},p=()=>{if(o!=="CLEAR ALL DATA"){c("Please type the confirmation text exactly"),a(!0);return}chrome.storage.local.clear().then(()=>{c("All data cleared successfully"),a(!0),r(!1),i(""),t({darkMode:!0,autoLockTimeout:15,confirmCryptoOperations:!0,showScriptNotifications:!0})}).catch(f=>{console.error("Failed to clear data:",f),c("Failed to clear data"),a(!0)})};return d.jsxs(ee,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[d.jsx(Q,{variant:"h6",gutterBottom:!0,children:"Settings"}),d.jsx(Le,{variant:"outlined",sx:{flexGrow:1,overflow:"auto"},children:d.jsxs(xo,{disablePadding:!0,children:[d.jsxs(lr,{children:[d.jsx(Sn,{primary:"Dark Mode",secondary:"Use dark theme for the extension"}),d.jsx(Hu,{edge:"end",checked:e.darkMode,onChange:f=>u("darkMode",f.target.checked)})]}),d.jsx(Dn,{}),d.jsxs(lr,{children:[d.jsx(Sn,{primary:"Auto-Lock Timeout",secondary:`Automatically lock session after ${e.autoLockTimeout} minutes of inactivity`}),d.jsx(ee,{sx:{width:120},children:d.jsx(Pt,{type:"number",size:"small",value:e.autoLockTimeout,onChange:f=>{const x=parseInt(f.target.value);!isNaN(x)&&x>=1&&u("autoLockTimeout",x)},InputProps:{inputProps:{min:1,max:60}}})})]}),d.jsx(Dn,{}),d.jsxs(lr,{children:[d.jsx(Sn,{primary:"Confirm Cryptographic Operations",secondary:"Always ask for confirmation before signing or encrypting"}),d.jsx(Hu,{edge:"end",checked:e.confirmCryptoOperations,onChange:f=>u("confirmCryptoOperations",f.target.checked)})]}),d.jsx(Dn,{}),d.jsxs(lr,{children:[d.jsx(Sn,{primary:"Script Notifications",secondary:"Show notifications when new scripts are received"}),d.jsx(Hu,{edge:"end",checked:e.showScriptNotifications,onChange:f=>u("showScriptNotifications",f.target.checked)})]})]})}),d.jsxs(ee,{sx:{mt:3},children:[d.jsx(Ft,{severity:"info",icon:d.jsx(N1,{}),sx:{mb:2},children:d.jsx(Q,{variant:"body2",children:"The extension stores all cryptographic keys in encrypted form. Your password is never stored and is only kept in memory while the session is unlocked."})}),d.jsx(Je,{variant:"outlined",color:"error",startIcon:d.jsx(I1,{}),onClick:()=>r(!0),fullWidth:!0,children:"Clear All Data"})]}),d.jsxs(Vf,{open:n,onClose:()=>r(!1),children:[d.jsx(Gf,{children:"Clear All Extension Data"}),d.jsxs(Kf,{children:[d.jsx(Q,{variant:"body1",paragraph:!0,children:"This will permanently delete all your keyspaces, keypairs, and settings. This action cannot be undone."}),d.jsx(Q,{variant:"body2",color:"error",paragraph:!0,children:'Type "CLEAR ALL DATA" to confirm:'}),d.jsx(Pt,{value:o,onChange:f=>i(f.target.value),fullWidth:!0,variant:"outlined",placeholder:"CLEAR ALL DATA"})]}),d.jsxs(Hf,{children:[d.jsx(Je,{onClick:()=>r(!1),children:"Cancel"}),d.jsx(Je,{onClick:p,color:"error",disabled:o!=="CLEAR ALL DATA",children:"Clear All Data"})]})]}),d.jsx(ZI,{open:s,autoHideDuration:3e3,onClose:()=>a(!1),message:l})]})},a3=()=>{const e=$o(),{isSessionUnlocked:t,currentKeypair:n,isWebSocketConnected:r,webSocketUrl:o,connectWebSocket:i,disconnectWebSocket:s}=tr(),[a,l]=m.useState(""),[c,u]=m.useState(!1),[p,f]=m.useState(null),[x,b]=m.useState([]);m.useEffect(()=>{t||e("/")},[t,e]),m.useEffect(()=>{t&&(async()=>{try{const g=await chrome.storage.local.get("connectionHistory");g.connectionHistory&&b(g.connectionHistory)}catch(g){console.error("Failed to load connection history:",g)}})()},[t]);const y=async()=>{if(!(!a.trim()||!n)){u(!0),f(null);try{if(await i(a)){const C=[{id:`conn-${Date.now()}`,url:a,timestamp:Date.now(),status:"connected"},...x].slice(0,10);b(C),await chrome.storage.local.set({connectionHistory:C})}else throw new Error("Failed to connect to WebSocket server")}catch(v){f(v.message||"Failed to connect to WebSocket server")}finally{u(!1)}}},w=async()=>{try{if(await s()&&o){const g=x.map(C=>C.url===o&&C.status==="connected"?{...C,status:"disconnected"}:C);b(g),await chrome.storage.local.set({connectionHistory:g})}}catch(v){f(v.message||"Failed to disconnect from WebSocket server")}},h=v=>{l(v)};return t?d.jsxs(ee,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[d.jsx(Q,{variant:"h6",gutterBottom:!0,children:"WebSocket Connection"}),!n&&d.jsx(Ft,{severity:"warning",sx:{mb:2},children:"No keypair selected. Select a keypair before connecting to a WebSocket server."}),p&&d.jsx(Ft,{severity:"error",sx:{mb:2},children:p}),d.jsxs(Le,{variant:"outlined",sx:{p:2,mb:2},children:[d.jsxs(ee,{sx:{mb:2},children:[d.jsx(Q,{variant:"subtitle2",gutterBottom:!0,children:"Connection Status:"}),d.jsx(yn,{label:r?"Connected":"Disconnected",color:r?"success":"default",variant:"outlined"}),r&&o&&d.jsxs(Q,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["Connected to: ",o]})]}),d.jsxs(ee,{sx:{display:"flex",gap:1},children:[d.jsx(Pt,{label:"WebSocket Server URL",placeholder:"wss://example.com/ws",value:a,onChange:v=>l(v.target.value),fullWidth:!0,disabled:c||r||!n}),r?d.jsx(Je,{variant:"outlined",color:"error",onClick:w,children:"Disconnect"}):d.jsx(Je,{variant:"contained",color:"primary",onClick:y,disabled:c||!a.trim()||!n,children:c?d.jsx(Gn,{size:24}):"Connect"})]})]}),d.jsx(Q,{variant:"subtitle1",gutterBottom:!0,children:"Connection History"}),x.length===0?d.jsx(Le,{sx:{p:3,textAlign:"center"},children:d.jsx(Q,{variant:"body1",color:"text.secondary",children:"No connection history yet."})}):d.jsx(Le,{variant:"outlined",sx:{flexGrow:1,overflow:"auto"},children:d.jsx(xo,{disablePadding:!0,children:x.map((v,g)=>d.jsxs(ee,{children:[g>0&&d.jsx(Dn,{}),d.jsx(lr,{button:!0,onClick:()=>h(v.url),disabled:r,children:d.jsx(Sn,{primary:d.jsxs(ee,{sx:{display:"flex",alignItems:"center",gap:1},children:[d.jsx(Q,{variant:"subtitle2",children:v.url}),d.jsx(yn,{label:v.status,size:"small",color:v.status==="connected"?"success":"default",variant:"outlined"})]}),secondary:d.jsx(Q,{variant:"body2",color:"text.secondary",children:new Date(v.timestamp).toLocaleString()})})})]},v.id))})})]}):null};var am={},l3=st;Object.defineProperty(am,"__esModule",{value:!0});var ll=am.default=void 0,c3=l3(vt()),u3=d;ll=am.default=(0,c3.default)((0,u3.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy");function d3(e){const t=Array.from(e).map(n=>String.fromCharCode(n)).join("");return btoa(t)}function p3(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r({isEncrypting:!1,isDecrypting:!1,isSigning:!1,isVerifying:!1,error:null,encryptData:async n=>{try{e({isEncrypting:!0,error:null});const r=await Bt(),o=al(n),i=await r.encrypt_data(o);return d3(i)}catch(r){throw e({error:r.message||"Failed to encrypt data"}),r}finally{e({isEncrypting:!1})}},decryptData:async n=>{try{e({isDecrypting:!0,error:null});const r=await Bt(),o=p3(n),i=await r.decrypt_data(o);return T5(i)}catch(r){throw e({error:r.message||"Failed to decrypt data"}),r}finally{e({isDecrypting:!1})}},signMessage:async n=>{try{e({isSigning:!0,error:null});const r=await Bt(),o=al(n);return await r.sign(o)}catch(r){throw e({error:r.message||"Failed to sign message"}),r}finally{e({isSigning:!1})}},verifySignature:async(n,r)=>{try{e({isVerifying:!0,error:null});const o=await Bt(),i=al(n);return await o.verify(i,r)}catch(o){throw e({error:o.message||"Failed to verify signature"}),o}finally{e({isVerifying:!1})}},clearError:()=>e({error:null})})),m3=()=>{const e=$o(),{isSessionUnlocked:t,currentKeypair:n}=tr(),{encryptData:r,decryptData:o,signMessage:i,verifySignature:s,isEncrypting:a,isDecrypting:l,isSigning:c,isVerifying:u,error:p,clearError:f}=f3(),[x,b]=m.useState(0),[y,w]=m.useState(null),[h,v]=m.useState(""),[g,C]=m.useState(""),[k,$]=m.useState(""),[E,P]=m.useState(""),[_,R]=m.useState(""),[j,A]=m.useState(""),[M,O]=m.useState(""),[N,L]=m.useState(""),[B,T]=m.useState(null);m.useEffect(()=>{t||e("/")},[t,e]);const I=(K,re)=>{b(re),f(),w(null)},W=async()=>{try{const K=await r(h);C(K)}catch{}},q=async()=>{try{const K=await o(k);P(K)}catch{}},se=async()=>{try{const K=await i(_);A(K)}catch{}},ce=async()=>{try{const K=await s(M,N);T(K)}catch{T(!1)}},X=(K,re)=>{navigator.clipboard.writeText(K).then(()=>{w(`${re} copied to clipboard!`),setTimeout(()=>w(null),2e3)},()=>{w("Failed to copy!")})};return t?d.jsxs(ee,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[d.jsx(Q,{variant:"h6",sx:{mb:2},children:"Cryptographic Operations"}),p&&d.jsx(Ft,{severity:"error",sx:{mb:2},children:p}),y&&d.jsx(Ft,{severity:"success",sx:{mb:2},children:y}),d.jsxs(Le,{sx:{flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[d.jsx(ee,{sx:{borderBottom:1,borderColor:"divider"},children:d.jsxs(h1,{value:x,onChange:I,variant:"scrollable",scrollButtons:"auto",allowScrollButtonsMobile:!0,sx:{minHeight:"48px"},children:[d.jsx(oo,{label:"Encrypt",sx:{minWidth:"80px",minHeight:"48px",py:0}}),d.jsx(oo,{label:"Decrypt",sx:{minWidth:"80px",minHeight:"48px",py:0}}),d.jsx(oo,{label:"Sign",sx:{minWidth:"80px",minHeight:"48px",py:0}}),d.jsx(oo,{label:"Verify",sx:{minWidth:"80px",minHeight:"48px",py:0}})]})}),d.jsxs(ee,{sx:{p:2,flexGrow:1,overflow:"auto",height:"calc(100% - 48px)"},children:[x===0&&d.jsxs(ee,{children:[d.jsx(Q,{variant:"subtitle1",gutterBottom:!0,children:"Encrypt Data"}),d.jsx(Q,{variant:"body2",color:"text.secondary",paragraph:!0,children:"Data will be encrypted using ChaCha20-Poly1305 with a key derived from your keyspace password."}),d.jsx(Pt,{label:"Data to Encrypt",multiline:!0,rows:4,fullWidth:!0,value:h,onChange:K=>v(K.target.value),margin:"normal"}),d.jsx(Je,{variant:"contained",onClick:W,disabled:!h||a,sx:{mt:2},children:a?d.jsx(Gn,{size:24}):"Encrypt"}),g&&d.jsxs(ee,{sx:{mt:3},children:[d.jsx(Dn,{sx:{my:2}}),d.jsx(Q,{variant:"subtitle1",children:"Encrypted Result"}),d.jsxs(ee,{sx:{position:"relative"},children:[d.jsx(Pt,{label:"Encrypted Data (Base64)",multiline:!0,rows:4,fullWidth:!0,value:g,InputProps:{readOnly:!0},margin:"normal"}),d.jsx(Vu,{title:"Copy to clipboard",children:d.jsx(Fr,{sx:{position:"absolute",top:8,right:8},onClick:()=>X(g,"Encrypted data"),children:d.jsx(ll,{fontSize:"small"})})})]})]})]}),x===1&&d.jsxs(ee,{children:[d.jsx(Q,{variant:"subtitle1",gutterBottom:!0,children:"Decrypt Data"}),d.jsx(Q,{variant:"body2",color:"text.secondary",paragraph:!0,children:"Paste encrypted data (in Base64 format) to decrypt it using your keyspace password."}),d.jsx(Pt,{label:"Encrypted Data (Base64)",multiline:!0,rows:4,fullWidth:!0,value:k,onChange:K=>$(K.target.value),margin:"normal"}),d.jsx(Je,{variant:"contained",onClick:q,disabled:!k||l,sx:{mt:2},children:l?d.jsx(Gn,{size:24}):"Decrypt"}),E&&d.jsxs(ee,{sx:{mt:3},children:[d.jsx(Dn,{sx:{my:2}}),d.jsx(Q,{variant:"subtitle1",children:"Decrypted Result"}),d.jsxs(ee,{sx:{position:"relative"},children:[d.jsx(Pt,{label:"Decrypted Data",multiline:!0,rows:4,fullWidth:!0,value:E,InputProps:{readOnly:!0},margin:"normal"}),d.jsx(Vu,{title:"Copy to clipboard",children:d.jsx(Fr,{sx:{position:"absolute",top:8,right:8},onClick:()=>X(E,"Decrypted data"),children:d.jsx(ll,{fontSize:"small"})})})]})]})]}),x===2&&d.jsxs(ee,{children:[d.jsx(Q,{variant:"subtitle1",gutterBottom:!0,children:"Sign Message"}),n?d.jsxs(Ft,{severity:"info",sx:{mb:2},children:["Signing with keypair: ",n.name||n.id.substring(0,8),"..."]}):d.jsx(Ft,{severity:"warning",sx:{mb:2},children:"Please select a keypair from the Keypair page before signing messages."}),d.jsx(Pt,{label:"Message to Sign",multiline:!0,rows:4,fullWidth:!0,value:_,onChange:K=>R(K.target.value),margin:"normal",disabled:!n}),d.jsx(Je,{variant:"contained",onClick:se,disabled:!_||!n||c,sx:{mt:2},children:c?d.jsx(Gn,{size:24}):"Sign Message"}),j&&d.jsxs(ee,{sx:{mt:3},children:[d.jsx(Dn,{sx:{my:2}}),d.jsx(Q,{variant:"subtitle1",children:"Signature"}),d.jsxs(ee,{sx:{position:"relative"},children:[d.jsx(Pt,{label:"Signature (Hex)",multiline:!0,rows:4,fullWidth:!0,value:j,InputProps:{readOnly:!0},margin:"normal"}),d.jsx(Vu,{title:"Copy to clipboard",children:d.jsx(Fr,{sx:{position:"absolute",top:8,right:8},onClick:()=>X(j,"Signature"),children:d.jsx(ll,{fontSize:"small"})})})]})]})]}),x===3&&d.jsxs(ee,{children:[d.jsx(Q,{variant:"subtitle1",gutterBottom:!0,children:"Verify Signature"}),d.jsx(Q,{variant:"body2",color:"text.secondary",paragraph:!0,children:"Verify that a message was signed by the currently selected keypair."}),d.jsx(Pt,{label:"Message",multiline:!0,rows:4,fullWidth:!0,value:M,onChange:K=>O(K.target.value),margin:"normal"}),d.jsx(Pt,{label:"Signature (Hex)",multiline:!0,rows:2,fullWidth:!0,value:N,onChange:K=>L(K.target.value),margin:"normal"}),d.jsx(Je,{variant:"contained",onClick:ce,disabled:!M||!N||u,sx:{mt:2},children:u?d.jsx(Gn,{size:24}):"Verify Signature"}),B!==null&&d.jsx(ee,{sx:{mt:3},children:d.jsx(Ft,{severity:B?"success":"error",children:B?"Signature is valid! The message was signed by the expected keypair.":"Invalid signature. The message may have been tampered with or signed by a different keypair."})})]})]})]})]}):null};var lm={},h3=st;Object.defineProperty(lm,"__esModule",{value:!0});var A1=lm.default=void 0,v3=h3(vt()),g3=d;A1=lm.default=(0,v3.default)((0,g3.jsx)("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z"}),"LockOpen");var cm={},y3=st;Object.defineProperty(cm,"__esModule",{value:!0});var L1=cm.default=void 0,x3=y3(vt()),b3=d;L1=cm.default=(0,x3.default)((0,b3.jsx)("path",{d:"M12 4C7.31 4 3.07 5.9 0 8.98L12 21 24 8.98C20.93 5.9 16.69 4 12 4"}),"SignalWifiStatusbar4Bar");var um={},S3=st;Object.defineProperty(um,"__esModule",{value:!0});var z1=um.default=void 0,C3=S3(vt()),w3=d;z1=um.default=(0,C3.default)((0,w3.jsx)("path",{d:"M23.64 7c-.45-.34-4.93-4-11.64-4-1.5 0-2.89.19-4.15.48L18.18 13.8zm-6.6 8.22L3.27 1.44 2 2.72l2.05 2.06C1.91 5.76.59 6.82.36 7l11.63 14.49.01.01.01-.01 3.9-4.86 3.32 3.32 1.27-1.27z"}),"SignalWifiOff");const k3=()=>{const{isSessionUnlocked:e,currentKeyspace:t,currentKeypair:n,isWebSocketConnected:r,lockSession:o}=tr(),i=async()=>{e&&await o()};return d.jsx(zP,{position:"static",color:"primary",elevation:0,children:d.jsxs(R4,{children:[d.jsx(Q,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Hero Vault"}),d.jsxs(ee,{sx:{display:"flex",gap:1,alignItems:"center"},children:[r?d.jsx(yn,{icon:d.jsx(L1,{fontSize:"small"}),label:"Connected",size:"small",color:"success",variant:"outlined"}):d.jsx(yn,{icon:d.jsx(z1,{fontSize:"small"}),label:"Offline",size:"small",color:"default",variant:"outlined"}),e?d.jsx(yn,{icon:d.jsx(A1,{fontSize:"small"}),label:t||"Unlocked",size:"small",color:"primary",variant:"outlined"}):d.jsx(yn,{icon:d.jsx(Ys,{fontSize:"small"}),label:"Locked",size:"small",color:"error",variant:"outlined"}),e&&n&&d.jsx(yn,{label:n.name||n.id,size:"small",color:"secondary",variant:"outlined"}),e&&d.jsx(Fr,{edge:"end",color:"inherit",onClick:i,size:"small","aria-label":"lock session",children:d.jsx(Ys,{})})]})]})})};var dm={},E3=st;Object.defineProperty(dm,"__esModule",{value:!0});var B1=dm.default=void 0,$3=E3(vt()),P3=d;B1=dm.default=(0,$3.default)((0,P3.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var pm={},R3=st;Object.defineProperty(pm,"__esModule",{value:!0});var D1=pm.default=void 0,T3=R3(vt()),M3=d;D1=pm.default=(0,T3.default)((0,M3.jsx)("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home");var fm={},j3=st;Object.defineProperty(fm,"__esModule",{value:!0});var F1=fm.default=void 0,O3=j3(vt()),_3=d;F1=fm.default=(0,O3.default)((0,_3.jsx)("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"VpnKey");var mm={},I3=st;Object.defineProperty(mm,"__esModule",{value:!0});var W1=mm.default=void 0,N3=I3(vt()),A3=d;W1=mm.default=(0,N3.default)((0,A3.jsx)("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code");var hm={},L3=st;Object.defineProperty(hm,"__esModule",{value:!0});var U1=hm.default=void 0,z3=L3(vt()),B3=d;U1=hm.default=(0,z3.default)((0,B3.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var vm={},D3=st;Object.defineProperty(vm,"__esModule",{value:!0});var V1=vm.default=void 0,F3=D3(vt()),W3=d;V1=vm.default=(0,F3.default)((0,W3.jsx)("path",{d:"m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9m8 8 3 3 3-3c-1.65-1.66-4.34-1.66-6 0m-4-4 2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13"}),"Wifi");const U3=()=>{const e=$o(),t=Zf(),{isSessionUnlocked:n}=tr(),r=t.pathname.substring(1)||"home",[o,i]=m.useState(null),s=!!o,a=u=>{i(u.currentTarget)},l=()=>{i(null)},c=u=>{e(`/${u==="home"?"":u}`),l()};return d.jsx(Le,{sx:{position:"static",bottom:0,left:0,right:0},elevation:3,children:d.jsxs(ee,{sx:{display:"flex",width:"100%"},children:[d.jsxs(ZT,{showLabels:!0,value:r,onChange:(u,p)=>{e(`/${p==="home"?"":p}`)},sx:{flexGrow:1},children:[d.jsx(Aa,{label:"Home",value:"home",icon:d.jsx(D1,{})}),d.jsx(Aa,{label:"Keys",value:"keypair",icon:d.jsx(F1,{}),disabled:!n}),d.jsx(Aa,{label:"Crypto",value:"crypto",icon:d.jsx(Ys,{}),disabled:!n}),d.jsx(Aa,{label:"More",value:"more",icon:d.jsx(B1,{}),onClick:a})]}),d.jsxs(l1,{anchorEl:o,open:s,onClose:l,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},children:[d.jsxs(xs,{onClick:()=>c("script"),disabled:!n,selected:r==="script",children:[d.jsx(Fu,{children:d.jsx(W1,{fontSize:"small"})}),d.jsx(Sn,{children:"Scripts"})]}),d.jsxs(xs,{onClick:()=>c("websocket"),disabled:!n,selected:r==="websocket",children:[d.jsx(Fu,{children:d.jsx(V1,{fontSize:"small"})}),d.jsx(Sn,{children:"WebSocket"})]}),d.jsxs(xs,{onClick:()=>c("settings"),selected:r==="settings",children:[d.jsx(Fu,{children:d.jsx(U1,{fontSize:"small"})}),d.jsx(Sn,{children:"Settings"})]})]})]})})};function V3(){const{checkSessionStatus:e,initWasm:t}=tr(),[n,r]=m.useState(!0),[o,i]=m.useState(null);return m.useEffect(()=>{(async()=>{try{if(!await t())throw new Error("Failed to initialize WASM module");await e()}catch(a){console.error("Initialization error:",a),i(a.message||"Failed to initialize the extension")}finally{r(!1)}})()},[e,t]),n?d.jsx(ee,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:"Loading..."}):o?d.jsx(ee,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100vh",p:3,textAlign:"center"},children:d.jsxs(Le,{sx:{p:3,maxWidth:400},children:[d.jsx("h6",{style:{color:"red",marginBottom:"8px"},children:"WASM Module Failed to Initialize"}),d.jsx("p",{style:{marginBottom:"16px"},children:"The WASM module could not be loaded. Please try reloading the extension."}),d.jsxs("p",{style:{fontSize:"0.875rem",color:"gray"},children:["Error: ",o," Please contact support if the problem persists."]})]})}):d.jsx(JN,{children:d.jsxs(ee,{sx:{display:"flex",flexDirection:"column",height:"100vh"},children:[d.jsx(k3,{}),d.jsx(QM,{component:"main",sx:{flexGrow:1,overflow:"auto",py:2},children:d.jsx(Le,{elevation:3,sx:{p:2,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:d.jsxs(XN,{children:[d.jsx(kr,{path:"/",element:d.jsx(j5,{})}),d.jsx(kr,{path:"/session",element:d.jsx(B5,{})}),d.jsx(kr,{path:"/keypair",element:d.jsx(K5,{})}),d.jsx(kr,{path:"/crypto",element:d.jsx(m3,{})}),d.jsx(kr,{path:"/script",element:d.jsx(J5,{})}),d.jsx(kr,{path:"/websocket",element:d.jsx(a3,{})}),d.jsx(kr,{path:"/settings",element:d.jsx(s3,{})})]})})}),d.jsx(U3,{})]})})}const H3=Mf({palette:{mode:"dark",primary:{main:"#6200ee"},secondary:{main:"#03dac6"},background:{default:"#121212",paper:"#1e1e1e"}},typography:{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',h1:{fontSize:"1.5rem",fontWeight:600},h2:{fontSize:"1.25rem",fontWeight:600},h3:{fontSize:"1.125rem",fontWeight:600}},components:{MuiButton:{styleOverrides:{root:{borderRadius:8,textTransform:"none"}}},MuiPaper:{styleOverrides:{root:{borderRadius:8}}}}});Qu.createRoot(document.getElementById("root")).render(d.jsx(xn.StrictMode,{children:d.jsxs(m$,{theme:H3,children:[d.jsx(x$,{}),d.jsx(V3,{})]})})); diff --git a/hero_vault_extension/dist/assets/simple-background.ts-e63275e1.js b/hero_vault_extension/dist/assets/simple-background.ts-e63275e1.js new file mode 100644 index 0000000..fabc71e --- /dev/null +++ b/hero_vault_extension/dist/assets/simple-background.ts-e63275e1.js @@ -0,0 +1 @@ +console.log("Background script initialized");let i=!1,e=null;chrome.runtime.onMessage.addListener((o,l,r)=>{if(console.log("Background received message:",o.type),o.type==="SESSION_STATUS")return r({active:i}),!0;if(o.type==="SESSION_UNLOCK")return i=!0,r({success:!0}),!0;if(o.type==="SESSION_LOCK")return i=!1,e&&(e.close(),e=null),r({success:!0}),!0;if(o.type==="CONNECT_WEBSOCKET"&&o.serverUrl&&o.publicKey){try{e&&e.close(),e=new WebSocket(o.serverUrl),e.onopen=()=>{console.log("WebSocket connection established"),e&&e.send(JSON.stringify({type:"IDENTIFY",publicKey:o.publicKey}))},e.onmessage=c=>{try{const t=JSON.parse(c.data);console.log("WebSocket message received:",t),chrome.runtime.sendMessage({type:"WEBSOCKET_MESSAGE",data:t}).catch(n=>{console.error("Failed to forward WebSocket message:",n)})}catch(t){console.error("Failed to parse WebSocket message:",t)}},e.onerror=c=>{console.error("WebSocket error:",c)},e.onclose=()=>{console.log("WebSocket connection closed"),e=null},r({success:!0})}catch(c){console.error("Failed to connect to WebSocket:",c),r({success:!1,error:c.message})}return!0}return o.type==="DISCONNECT_WEBSOCKET"?(e?(e.close(),e=null,r({success:!0})):r({success:!1,error:"No active WebSocket connection"}),!0):!1});chrome.notifications&&chrome.notifications.onClicked&&chrome.notifications.onClicked.addListener(o=>{chrome.action.openPopup()}); diff --git a/hero_vault_extension/dist/assets/wasm_app-bd9134aa.js b/hero_vault_extension/dist/assets/wasm_app-bd9134aa.js new file mode 100644 index 0000000..c276a20 --- /dev/null +++ b/hero_vault_extension/dist/assets/wasm_app-bd9134aa.js @@ -0,0 +1,2 @@ +let o;function l(n){const e=o.__externref_table_alloc();return o.__wbindgen_export_2.set(e,n),e}function u(n,e){try{return n.apply(this,e)}catch(t){const r=l(t);o.__wbindgen_exn_store(r)}}const T=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&T.decode();let h=null;function m(){return(h===null||h.byteLength===0)&&(h=new Uint8Array(o.memory.buffer)),h}function w(n,e){return n=n>>>0,T.decode(m().subarray(n,n+e))}function b(n){return n==null}function R(n,e){return n=n>>>0,m().subarray(n/1,n/1+e)}let s=0;const S=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},D=typeof S.encodeInto=="function"?function(n,e){return S.encodeInto(n,e)}:function(n,e){const t=S.encode(n);return e.set(t),{read:n.length,written:t.length}};function f(n,e,t){if(t===void 0){const a=S.encode(n),g=e(a.length,1)>>>0;return m().subarray(g,g+a.length).set(a),s=a.length,g}let r=n.length,c=e(r,1)>>>0;const i=m();let _=0;for(;_127)break;i[c+_]=a}if(_!==r){_!==0&&(n=n.slice(_)),c=t(c,r,r=_+n.length*3,1)>>>0;const a=m().subarray(c+_,c+r),g=D(n,a);_+=g.written,c=t(c,r,_,1)>>>0}return s=_,c}let d=null;function p(){return(d===null||d.buffer.detached===!0||d.buffer.detached===void 0&&d.buffer!==o.memory.buffer)&&(d=new DataView(o.memory.buffer)),d}const O=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>{o.__wbindgen_export_5.get(n.dtor)(n.a,n.b)});function k(n,e,t,r){const c={a:n,b:e,cnt:1,dtor:t},i=(..._)=>{c.cnt++;const a=c.a;c.a=0;try{return r(a,c.b,..._)}finally{--c.cnt===0?(o.__wbindgen_export_5.get(c.dtor)(a,c.b),O.unregister(c)):c.a=a}};return i.original=c,O.register(i,c,c),i}function A(n){const e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){const c=n.description;return c==null?"Symbol":`Symbol(${c})`}if(e=="function"){const c=n.name;return typeof c=="string"&&c.length>0?`Function(${c})`:"Function"}if(Array.isArray(n)){const c=n.length;let i="[";c>0&&(i+=A(n[0]));for(let _=1;_1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message} +${n.stack}`:r}function B(){o.init_rhai_env()}function y(n){const e=o.__wbindgen_export_2.get(n);return o.__externref_table_dealloc(n),e}function N(n){const e=f(n,o.__wbindgen_malloc,o.__wbindgen_realloc),t=s,r=o.run_rhai(e,t);if(r[2])throw y(r[1]);return y(r[0])}function v(n,e){const t=f(n,o.__wbindgen_malloc,o.__wbindgen_realloc),r=s,c=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),i=s;return o.create_keyspace(t,r,c,i)}function V(n,e){const t=f(n,o.__wbindgen_malloc,o.__wbindgen_realloc),r=s,c=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),i=s;return o.init_session(t,r,c,i)}function C(){o.lock_session()}function $(){const n=o.current_keypair_metadata();if(n[2])throw y(n[1]);return y(n[0])}function z(){const n=o.current_keypair_public_key();if(n[2])throw y(n[1]);return y(n[0])}function P(){return o.is_unlocked()!==0}function J(n){const e=f(n,o.__wbindgen_malloc,o.__wbindgen_realloc),t=s,r=o.select_keypair(e,t);if(r[1])throw y(r[0])}function G(){return o.list_keypairs()}function H(n,e){var t=b(n)?0:f(n,o.__wbindgen_malloc,o.__wbindgen_realloc),r=s,c=b(e)?0:f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),i=s;return o.add_keypair(t,r,c,i)}function x(n,e){const t=e(n.length*1,1)>>>0;return m().set(n,t/1),s=n.length,t}function K(n){const e=x(n,o.__wbindgen_malloc),t=s;return o.sign(e,t)}function Q(n,e){const t=x(n,o.__wbindgen_malloc),r=s,c=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),i=s;return o.verify(t,r,c,i)}function X(n){const e=x(n,o.__wbindgen_malloc),t=s;return o.encrypt_data(e,t)}function Y(n){const e=x(n,o.__wbindgen_malloc),t=s;return o.decrypt_data(e,t)}function W(n,e,t){o.closure100_externref_shim(n,e,t)}function M(n,e,t){o.closure143_externref_shim(n,e,t)}function E(n,e,t){o.closure223_externref_shim(n,e,t)}function F(n,e,t,r){o.closure1882_externref_shim(n,e,t,r)}const q=["readonly","readwrite","versionchange","readwriteflush","cleanup"];async function L(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{const t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function j(){const n={};return n.wbg={},n.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return u(function(e,t){return e.call(t)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return u(function(e,t,r){return e.call(t,r)},arguments)},n.wbg.__wbg_createObjectStore_d2f9e1016f4d81b9=function(){return u(function(e,t,r,c){return e.createObjectStore(w(t,r),c)},arguments)},n.wbg.__wbg_crypto_574e78ad8b13b65f=function(e){return e.crypto},n.wbg.__wbg_error_524f506f44df1645=function(e){console.error(e)},n.wbg.__wbg_error_ff4ddaabdfc5dbb3=function(){return u(function(e){const t=e.error;return b(t)?0:l(t)},arguments)},n.wbg.__wbg_getRandomValues_3c9c0d586e575a16=function(){return u(function(e,t){globalThis.crypto.getRandomValues(R(e,t))},arguments)},n.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return u(function(e,t){e.getRandomValues(t)},arguments)},n.wbg.__wbg_getTime_46267b1c24877e30=function(e){return e.getTime()},n.wbg.__wbg_get_4f73335ab78445db=function(e,t,r){const c=t[r>>>0];var i=b(c)?0:f(c,o.__wbindgen_malloc,o.__wbindgen_realloc),_=s;p().setInt32(e+4*1,_,!0),p().setInt32(e+4*0,i,!0)},n.wbg.__wbg_get_67b2ba62fc30de12=function(){return u(function(e,t){return Reflect.get(e,t)},arguments)},n.wbg.__wbg_get_8da03f81f6a1111e=function(){return u(function(e,t){return e.get(t)},arguments)},n.wbg.__wbg_instanceof_IdbDatabase_a3ef009ca00059f9=function(e){let t;try{t=e instanceof IDBDatabase}catch{t=!1}return t},n.wbg.__wbg_instanceof_IdbFactory_12eaba3366f4302f=function(e){let t;try{t=e instanceof IDBFactory}catch{t=!1}return t},n.wbg.__wbg_instanceof_IdbOpenDbRequest_a3416e156c9db893=function(e){let t;try{t=e instanceof IDBOpenDBRequest}catch{t=!1}return t},n.wbg.__wbg_instanceof_IdbRequest_4813c3f207666aa4=function(e){let t;try{t=e instanceof IDBRequest}catch{t=!1}return t},n.wbg.__wbg_length_52b6c4580c5ec934=function(e){return e.length},n.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(e){return e.msCrypto},n.wbg.__wbg_new0_f788a2397c7ca929=function(){return new Date},n.wbg.__wbg_new_23a2665fac83c611=function(e,t){try{var r={a:e,b:t},c=(_,a)=>{const g=r.a;r.a=0;try{return F(g,r.b,_,a)}finally{r.a=g}};return new Promise(c)}finally{r.a=r.b=0}},n.wbg.__wbg_new_405e22f390576ce2=function(){return new Object},n.wbg.__wbg_new_78feb108b6472713=function(){return new Array},n.wbg.__wbg_new_a12002a7f91c75be=function(e){return new Uint8Array(e)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(e,t){return new Function(w(e,t))},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(e,t,r){return new Uint8Array(e,t>>>0,r>>>0)},n.wbg.__wbg_newwithlength_a381634e90c276d4=function(e){return new Uint8Array(e>>>0)},n.wbg.__wbg_node_905d3e251edff8a2=function(e){return e.node},n.wbg.__wbg_now_d18023d54d4e5500=function(e){return e.now()},n.wbg.__wbg_objectStoreNames_9bb1ab04a7012aaf=function(e){return e.objectStoreNames},n.wbg.__wbg_objectStore_21878d46d25b64b6=function(){return u(function(e,t,r){return e.objectStore(w(t,r))},arguments)},n.wbg.__wbg_open_88b1390d99a7c691=function(){return u(function(e,t,r){return e.open(w(t,r))},arguments)},n.wbg.__wbg_open_e0c0b2993eb596e1=function(){return u(function(e,t,r,c){return e.open(w(t,r),c>>>0)},arguments)},n.wbg.__wbg_process_dc0fbacc7c1c06f7=function(e){return e.process},n.wbg.__wbg_push_737cfc8c1432c2c6=function(e,t){return e.push(t)},n.wbg.__wbg_put_066faa31a6a88f5b=function(){return u(function(e,t,r){return e.put(t,r)},arguments)},n.wbg.__wbg_put_9ef5363941008835=function(){return u(function(e,t){return e.put(t)},arguments)},n.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(e){queueMicrotask(e)},n.wbg.__wbg_queueMicrotask_d3219def82552485=function(e){return e.queueMicrotask},n.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return u(function(e,t){e.randomFillSync(t)},arguments)},n.wbg.__wbg_require_60cc747a6bc5215a=function(){return u(function(){return module.require},arguments)},n.wbg.__wbg_resolve_4851785c9c5f573d=function(e){return Promise.resolve(e)},n.wbg.__wbg_result_f29afabdf2c05826=function(){return u(function(e){return e.result},arguments)},n.wbg.__wbg_set_65595bdd868b3009=function(e,t,r){e.set(t,r>>>0)},n.wbg.__wbg_setonerror_d7e3056cc6e56085=function(e,t){e.onerror=t},n.wbg.__wbg_setonsuccess_afa464ee777a396d=function(e,t){e.onsuccess=t},n.wbg.__wbg_setonupgradeneeded_fcf7ce4f2eb0cb5f=function(e,t){e.onupgradeneeded=t},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const e=typeof global>"u"?null:global;return b(e)?0:l(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const e=typeof globalThis>"u"?null:globalThis;return b(e)?0:l(e)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const e=typeof self>"u"?null:self;return b(e)?0:l(e)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const e=typeof window>"u"?null:window;return b(e)?0:l(e)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(e,t,r){return e.subarray(t>>>0,r>>>0)},n.wbg.__wbg_target_0a62d9d79a2a1ede=function(e){const t=e.target;return b(t)?0:l(t)},n.wbg.__wbg_then_44b73946d2fb3e7d=function(e,t){return e.then(t)},n.wbg.__wbg_transaction_d6d07c3c9963c49e=function(){return u(function(e,t,r){return e.transaction(t,q[r])},arguments)},n.wbg.__wbg_versions_c01dfd4722a88165=function(e){return e.versions},n.wbg.__wbindgen_cb_drop=function(e){const t=e.original;return t.cnt--==1?(t.a=0,!0):!1},n.wbg.__wbindgen_closure_wrapper312=function(e,t,r){return k(e,t,101,W)},n.wbg.__wbindgen_closure_wrapper533=function(e,t,r){return k(e,t,144,M)},n.wbg.__wbindgen_closure_wrapper844=function(e,t,r){return k(e,t,224,E)},n.wbg.__wbindgen_debug_string=function(e,t){const r=A(t),c=f(r,o.__wbindgen_malloc,o.__wbindgen_realloc),i=s;p().setInt32(e+4*1,i,!0),p().setInt32(e+4*0,c,!0)},n.wbg.__wbindgen_init_externref_table=function(){const e=o.__wbindgen_export_2,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},n.wbg.__wbindgen_is_function=function(e){return typeof e=="function"},n.wbg.__wbindgen_is_null=function(e){return e===null},n.wbg.__wbindgen_is_object=function(e){const t=e;return typeof t=="object"&&t!==null},n.wbg.__wbindgen_is_string=function(e){return typeof e=="string"},n.wbg.__wbindgen_is_undefined=function(e){return e===void 0},n.wbg.__wbindgen_json_parse=function(e,t){return JSON.parse(w(e,t))},n.wbg.__wbindgen_json_serialize=function(e,t){const r=t,c=JSON.stringify(r===void 0?null:r),i=f(c,o.__wbindgen_malloc,o.__wbindgen_realloc),_=s;p().setInt32(e+4*1,_,!0),p().setInt32(e+4*0,i,!0)},n.wbg.__wbindgen_memory=function(){return o.memory},n.wbg.__wbindgen_string_new=function(e,t){return w(e,t)},n.wbg.__wbindgen_throw=function(e,t){throw new Error(w(e,t))},n}function I(n,e){return o=n.exports,U.__wbindgen_wasm_module=e,d=null,h=null,o.__wbindgen_start(),o}function Z(n){if(o!==void 0)return o;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const e=j();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));const t=new WebAssembly.Instance(n,e);return I(t,n)}async function U(n){if(o!==void 0)return o;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/wasm/wasm_app_bg.wasm",self.location));const e=j();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:t,module:r}=await L(await n,e);return I(t,r)}export{H as add_keypair,v as create_keyspace,$ as current_keypair_metadata,z as current_keypair_public_key,Y as decrypt_data,U as default,X as encrypt_data,Z as initSync,B as init_rhai_env,V as init_session,P as is_unlocked,G as list_keypairs,C as lock_session,N as run_rhai,J as select_keypair,K as sign,Q as verify}; diff --git a/hero_vault_extension/dist/background.js b/hero_vault_extension/dist/background.js new file mode 100644 index 0000000..22d3f80 --- /dev/null +++ b/hero_vault_extension/dist/background.js @@ -0,0 +1,61 @@ + + // Background Service Worker for SAL Modular Cryptographic Extension + // This is a simplified version that only handles messaging + + console.log('Background script initialized'); + + // Store active WebSocket connection + let activeWebSocket = null; + let sessionActive = false; + + // Listen for messages from popup or content scripts + chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { + console.log('Background received message:', message.type); + + if (message.type === 'SESSION_STATUS') { + sendResponse({ active: sessionActive }); + return true; + } + + if (message.type === 'SESSION_UNLOCK') { + sessionActive = true; + sendResponse({ success: true }); + return true; + } + + if (message.type === 'SESSION_LOCK') { + sessionActive = false; + if (activeWebSocket) { + activeWebSocket.close(); + activeWebSocket = null; + } + sendResponse({ success: true }); + return true; + } + + if (message.type === 'CONNECT_WEBSOCKET') { + // Simplified WebSocket handling + sendResponse({ success: true }); + return true; + } + + if (message.type === 'DISCONNECT_WEBSOCKET') { + if (activeWebSocket) { + activeWebSocket.close(); + activeWebSocket = null; + sendResponse({ success: true }); + } else { + sendResponse({ success: false, error: 'No active WebSocket connection' }); + } + return true; + } + + return false; + }); + + // Initialize notification setup + chrome.notifications.onClicked.addListener((notificationId) => { + // Open the extension popup when a notification is clicked + chrome.action.openPopup(); + }); + \ No newline at end of file diff --git a/extension/assets/icon-128.png b/hero_vault_extension/dist/icons/icon-128.png similarity index 100% rename from extension/assets/icon-128.png rename to hero_vault_extension/dist/icons/icon-128.png diff --git a/extension/assets/icon-16.png b/hero_vault_extension/dist/icons/icon-16.png similarity index 100% rename from extension/assets/icon-16.png rename to hero_vault_extension/dist/icons/icon-16.png diff --git a/extension/assets/icon-32.png b/hero_vault_extension/dist/icons/icon-32.png similarity index 100% rename from extension/assets/icon-32.png rename to hero_vault_extension/dist/icons/icon-32.png diff --git a/extension/assets/icon-48.png b/hero_vault_extension/dist/icons/icon-48.png similarity index 100% rename from extension/assets/icon-48.png rename to hero_vault_extension/dist/icons/icon-48.png diff --git a/extension/popup/index.html b/hero_vault_extension/dist/index.html similarity index 54% rename from extension/popup/index.html rename to hero_vault_extension/dist/index.html index b0c5014..f582d3c 100644 --- a/extension/popup/index.html +++ b/hero_vault_extension/dist/index.html @@ -3,12 +3,12 @@ - Modular Vault Extension - + Hero Vault + +
- - + diff --git a/hero_vault_extension/dist/manifest.json b/hero_vault_extension/dist/manifest.json new file mode 100644 index 0000000..20e2fdb --- /dev/null +++ b/hero_vault_extension/dist/manifest.json @@ -0,0 +1,26 @@ +{ + "manifest_version": 3, + "name": "Hero Vault", + "version": "1.0.0", + "description": "A secure browser extension for cryptographic operations and Rhai script execution", + "action": { + "default_popup": "index.html", + "default_title": "Hero Vault" + }, + "icons": { + "16": "icons/icon-16.png", + "48": "icons/icon-48.png", + "128": "icons/icon-128.png" + }, + "permissions": [ + "storage", + "unlimitedStorage" + ], + "background": { + "service_worker": "service-worker-loader.js", + "type": "module" + }, + "content_security_policy": { + "extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'" + } +} diff --git a/hero_vault_extension/dist/service-worker-loader.js b/hero_vault_extension/dist/service-worker-loader.js new file mode 100644 index 0000000..59dbef0 --- /dev/null +++ b/hero_vault_extension/dist/service-worker-loader.js @@ -0,0 +1 @@ +import './assets/simple-background.ts-e63275e1.js'; diff --git a/extension/dist/popup/index.html b/hero_vault_extension/index.html similarity index 62% rename from extension/dist/popup/index.html rename to hero_vault_extension/index.html index 36c7f39..be70816 100644 --- a/extension/dist/popup/index.html +++ b/hero_vault_extension/index.html @@ -3,13 +3,10 @@ - Modular Vault Extension - - + Hero Vault
- - + diff --git a/hero_vault_extension/package-lock.json b/hero_vault_extension/package-lock.json new file mode 100644 index 0000000..151bc09 --- /dev/null +++ b/hero_vault_extension/package-lock.json @@ -0,0 +1,4862 @@ +{ + "name": "sal-extension", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "sal-extension", + "version": "1.0.0", + "dependencies": { + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", + "@mui/icons-material": "^5.14.3", + "@mui/material": "^5.14.3", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-router-dom": "^6.14.2", + "zustand": "^4.4.0" + }, + "devDependencies": { + "@crxjs/vite-plugin": "^2.0.0-beta.18", + "@types/chrome": "^0.0.243", + "@types/node": "^20.4.5", + "@types/react": "^18.2.15", + "@types/react-dom": "^18.2.7", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "@vitejs/plugin-react": "^4.0.3", + "esbuild": "^0.25.4", + "eslint": "^8.45.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.3", + "prettier": "^3.0.0", + "sass": "^1.64.1", + "typescript": "^5.0.2", + "vite": "^4.4.5" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.2.tgz", + "integrity": "sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.1.tgz", + "integrity": "sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.27.1", + "@babel/helper-compilation-targets": "^7.27.1", + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helpers": "^7.27.1", + "@babel/parser": "^7.27.1", + "@babel/template": "^7.27.1", + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.1.tgz", + "integrity": "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==", + "dependencies": { + "@babel/parser": "^7.27.1", + "@babel/types": "^7.27.1", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz", + "integrity": "sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.1.tgz", + "integrity": "sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.2.tgz", + "integrity": "sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==", + "dependencies": { + "@babel/types": "^7.27.1" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", + "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", + "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.1.tgz", + "integrity": "sha512-1x3D2xEk2fRo3PAhwQwu5UubzgiVWSXTBfWpVd2Mx2AzRqJuDJCsgaDVZ7HB5iGzDW1Hl1sWN2mFyKjmR9uAog==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.1.tgz", + "integrity": "sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.27.1", + "@babel/parser": "^7.27.1", + "@babel/template": "^7.27.1", + "@babel/types": "^7.27.1", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz", + "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@crxjs/vite-plugin": { + "version": "2.0.0-beta.33", + "resolved": "https://registry.npmjs.org/@crxjs/vite-plugin/-/vite-plugin-2.0.0-beta.33.tgz", + "integrity": "sha512-sSVKX6d4LBfScK6QZ9Qqs94LZ25uY0yTxoe4EOVqQfYvxb7AhnVo/YCvzeT113BRzhFA3IBCmAhTUASXS2aPKw==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^4.1.2", + "@webcomponents/custom-elements": "^1.5.0", + "acorn-walk": "^8.2.0", + "cheerio": "^1.0.0-rc.10", + "convert-source-map": "^1.7.0", + "debug": "^4.3.3", + "es-module-lexer": "^0.10.0", + "fast-glob": "^3.2.11", + "fs-extra": "^10.0.1", + "jsesc": "^3.0.2", + "magic-string": "^0.30.12", + "picocolors": "^1.0.0", + "react-refresh": "^0.13.0", + "rollup": "2.79.2", + "rxjs": "7.5.7" + } + }, + "node_modules/@emotion/babel-plugin": { + "version": "11.13.5", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz", + "integrity": "sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==", + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/serialize": "^1.3.3", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.14.0.tgz", + "integrity": "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==", + "dependencies": { + "@emotion/memoize": "^0.9.0", + "@emotion/sheet": "^1.4.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", + "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==" + }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz", + "integrity": "sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw==", + "dependencies": { + "@emotion/memoize": "^0.9.0" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", + "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==" + }, + "node_modules/@emotion/react": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", + "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/cache": "^11.14.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz", + "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==", + "dependencies": { + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/unitless": "^0.10.0", + "@emotion/utils": "^1.4.2", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", + "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==" + }, + "node_modules/@emotion/styled": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.0.tgz", + "integrity": "sha512-XxfOnXFffatap2IyCeJyNov3kiDQWoR08gPUQxvbL7fxKryGBKUZUkG6Hz48DZwVrJSVh9sJboyV1Ds4OW6SgA==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/is-prop-valid": "^1.3.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2" + }, + "peerDependencies": { + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/unitless": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", + "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==" + }, + "node_modules/@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.2.0.tgz", + "integrity": "sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg==", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@emotion/utils": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz", + "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", + "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==" + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz", + "integrity": "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.4.tgz", + "integrity": "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz", + "integrity": "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.4.tgz", + "integrity": "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz", + "integrity": "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", + "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz", + "integrity": "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz", + "integrity": "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz", + "integrity": "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz", + "integrity": "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz", + "integrity": "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz", + "integrity": "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz", + "integrity": "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz", + "integrity": "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz", + "integrity": "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz", + "integrity": "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz", + "integrity": "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz", + "integrity": "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz", + "integrity": "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz", + "integrity": "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz", + "integrity": "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz", + "integrity": "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz", + "integrity": "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz", + "integrity": "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", + "integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@mui/core-downloads-tracker": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.17.1.tgz", + "integrity": "sha512-OcZj+cs6EfUD39IoPBOgN61zf1XFVY+imsGoBDwXeSq2UHJZE3N59zzBOVjclck91Ne3e9gudONOeILvHCIhUA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + } + }, + "node_modules/@mui/icons-material": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.17.1.tgz", + "integrity": "sha512-CN86LocjkunFGG0yPlO4bgqHkNGgaEOEc3X/jG5Bzm401qYw79/SaLrofA7yAKCCXAGdIGnLoMHohc3+ubs95A==", + "dependencies": { + "@babel/runtime": "^7.23.9" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@mui/material": "^5.0.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.17.1.tgz", + "integrity": "sha512-2B33kQf+GmPnrvXXweWAx+crbiUEsxCdCN979QDYnlH9ox4pd+0/IBriWLV+l6ORoBF60w39cWjFnJYGFdzXcw==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/core-downloads-tracker": "^5.17.1", + "@mui/system": "^5.17.1", + "@mui/types": "~7.2.15", + "@mui/utils": "^5.17.1", + "@popperjs/core": "^2.11.8", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1", + "react-is": "^19.0.0", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/private-theming": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.17.1.tgz", + "integrity": "sha512-XMxU0NTYcKqdsG8LRmSoxERPXwMbp16sIXPcLVgLGII/bVNagX0xaheWAwFv8+zDK7tI3ajllkuD3GZZE++ICQ==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/utils": "^5.17.1", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "5.16.14", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.16.14.tgz", + "integrity": "sha512-UAiMPZABZ7p8mUW4akDV6O7N3+4DatStpXMZwPlt+H/dA0lt67qawN021MNND+4QTpjaiMYxbhKZeQcyWCbuKw==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@emotion/cache": "^11.13.5", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/system": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.17.1.tgz", + "integrity": "sha512-aJrmGfQpyF0U4D4xYwA6ueVtQcEMebET43CUmKMP7e7iFh3sMIF3sBR0l8Urb4pqx1CBjHAaWgB0ojpND4Q3Jg==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/private-theming": "^5.17.1", + "@mui/styled-engine": "^5.16.14", + "@mui/types": "~7.2.15", + "@mui/utils": "^5.17.1", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.24", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.24.tgz", + "integrity": "sha512-3c8tRt/CbWZ+pEg7QpSwbdxOk36EfmhbKf6AGZsD1EcLDLTSZoxxJ86FVtcjxvjuhdyBiWKSTGZFaXCnidO2kw==", + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.17.1.tgz", + "integrity": "sha512-jEZ8FTqInt2WzxDV8bhImWBqeQRD99c/id/fq83H0ER9tFl+sfZlaAoCdznGvbSQQ9ividMxqSV2c7cC1vBcQg==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/types": "~7.2.15", + "@types/prop-types": "^15.7.12", + "clsx": "^2.1.1", + "prop-types": "^15.8.1", + "react-is": "^19.0.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@remix-run/router": { + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.0.tgz", + "integrity": "sha512-O3rHJzAQKamUz1fvE0Qaw0xSFqsA/yafi2iqeE0pvdFtCO1viYx8QL6f3Ln/aCCTLxs68SLf0KPM9eSeM8yBnA==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.9", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.9.tgz", + "integrity": "sha512-e9MeMtVWo186sgvFFJOPGy7/d2j2mZhLJIdVW0C/xDluuOvymEATqz6zKsP0ZmXGzQtqlyjz5sC1sYQUoJG98w==", + "dev": true + }, + "node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", + "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/chrome": { + "version": "0.0.243", + "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.243.tgz", + "integrity": "sha512-4PHv0kxxxpZFHWPBiJJ9TWH8kbx0567j1b2djnhpJjpiSGNI7UKkz7dSEECBtQ0B3N5nQTMwSB/5IopkWGAbEA==", + "dev": true, + "dependencies": { + "@types/filesystem": "*", + "@types/har-format": "*" + } + }, + "node_modules/@types/filesystem": { + "version": "0.0.36", + "resolved": "https://registry.npmjs.org/@types/filesystem/-/filesystem-0.0.36.tgz", + "integrity": "sha512-vPDXOZuannb9FZdxgHnqSwAG/jvdGM8Wq+6N4D/d80z+D4HWH+bItqsZaVRQykAn6WEVeEkLm2oQigyHtgb0RA==", + "dev": true, + "dependencies": { + "@types/filewriter": "*" + } + }, + "node_modules/@types/filewriter": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/filewriter/-/filewriter-0.0.33.tgz", + "integrity": "sha512-xFU8ZXTw4gd358lb2jw25nxY9QAgqn2+bKKjKOYfNCzN4DKCFetK7sPtrlpg66Ywe3vWY9FNxprZawAh9wfJ3g==", + "dev": true + }, + "node_modules/@types/har-format": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@types/har-format/-/har-format-1.2.16.tgz", + "integrity": "sha512-fluxdy7ryD3MV6h8pTfTYpy/xQzCFC7m89nOH9y94cNqJ1mDIDPut7MnRHI3F6qRmh/cT2fUjG1MLdCNb4hE9A==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.17.50", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.50.tgz", + "integrity": "sha512-Mxiq0ULv/zo1OzOhwPqOA13I81CV/W3nvd3ChtQZRT5Cwz3cr0FKo/wMSsbTqL3EXpaBAEQhva2B8ByRkOIh9A==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" + }, + "node_modules/@types/prop-types": { + "version": "15.7.14", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz", + "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==" + }, + "node_modules/@types/react": { + "version": "18.3.22", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.22.tgz", + "integrity": "sha512-vUhG0YmQZ7kL/tmKLrD3g5zXbXXreZXB3pmROW8bg3CnLnpjkRVwUlLne7Ufa2r9yJ8+/6B73RzhAek5TBKh2Q==", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "dev": true, + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", + "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", + "peerDependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/semver": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz", + "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.5.0.tgz", + "integrity": "sha512-JuLWaEqypaJmOJPLWwO335Ig6jSgC1FTONCWAxnqcQthLTK/Yc9aH6hr9z/87xciejbQcnP3GnA1FWUSWeXaeg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.26.10", + "@babel/plugin-transform-react-jsx-self": "^7.25.9", + "@babel/plugin-transform-react-jsx-source": "^7.25.9", + "@rolldown/pluginutils": "1.0.0-beta.9", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0" + } + }, + "node_modules/@vitejs/plugin-react/node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@webcomponents/custom-elements": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@webcomponents/custom-elements/-/custom-elements-1.6.0.tgz", + "integrity": "sha512-CqTpxOlUCPWRNUPZDxT5v2NnHXA4oox612iUGnmTUGQFhZ1Gkj8kirtl/2wcF6MqX7+PqqicZzOCBKKfIn0dww==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-macros": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.24.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz", + "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001716", + "electron-to-chromium": "^1.5.149", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001718", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", + "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cheerio": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", + "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", + "dev": true, + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.1.0", + "encoding-sniffer": "^0.2.0", + "htmlparser2": "^9.1.0", + "parse5": "^7.1.2", + "parse5-htmlparser2-tree-adapter": "^7.0.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^6.19.5", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=18.17" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "node_modules/cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "dev": true, + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.157", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.157.tgz", + "integrity": "sha512-/0ybgsQd1muo8QlnuTpKwtl0oX5YMlUGbm8xyqgDU00motRkKFFbUJySAQBWcY79rVqNLWIWa87BGVGClwAB2w==", + "dev": true + }, + "node_modules/encoding-sniffer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", + "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", + "dev": true, + "dependencies": { + "iconv-lite": "^0.6.3", + "whatwg-encoding": "^3.1.1" + }, + "funding": { + "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-module-lexer": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.10.5.tgz", + "integrity": "sha512-+7IwY/kiGAacQfY+YBhKMvEmyAJnw5grTUgjG85Pe7vcUI/6b7pZjZG8nQ7+48YhzEAEqrEgD2dCz/JIK+AYvw==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz", + "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.4", + "@esbuild/android-arm": "0.25.4", + "@esbuild/android-arm64": "0.25.4", + "@esbuild/android-x64": "0.25.4", + "@esbuild/darwin-arm64": "0.25.4", + "@esbuild/darwin-x64": "0.25.4", + "@esbuild/freebsd-arm64": "0.25.4", + "@esbuild/freebsd-x64": "0.25.4", + "@esbuild/linux-arm": "0.25.4", + "@esbuild/linux-arm64": "0.25.4", + "@esbuild/linux-ia32": "0.25.4", + "@esbuild/linux-loong64": "0.25.4", + "@esbuild/linux-mips64el": "0.25.4", + "@esbuild/linux-ppc64": "0.25.4", + "@esbuild/linux-riscv64": "0.25.4", + "@esbuild/linux-s390x": "0.25.4", + "@esbuild/linux-x64": "0.25.4", + "@esbuild/netbsd-arm64": "0.25.4", + "@esbuild/netbsd-x64": "0.25.4", + "@esbuild/openbsd-arm64": "0.25.4", + "@esbuild/openbsd-x64": "0.25.4", + "@esbuild/sunos-x64": "0.25.4", + "@esbuild/win32-arm64": "0.25.4", + "@esbuild/win32-ia32": "0.25.4", + "@esbuild/win32-x64": "0.25.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/eslint-plugin-react-refresh": { + "version": "0.4.20", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.20.tgz", + "integrity": "sha512-XpbHQ2q5gUF8BGOX4dHe+71qoirYMhApEPZ7sfhF/dNnOF1UXnCMGZf79SFTBO7Bz5YEIT4TMieSlJBWhP9WBA==", + "dev": true, + "peerDependencies": { + "eslint": ">=8.40" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/htmlparser2": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", + "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.1.0", + "entities": "^4.5.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/immutable": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.2.tgz", + "integrity": "sha512-qHKXW1q6liAk1Oys6umoaZbDRqjcjgSrbnrifHsfsttza7zcvRAsL7mMV6xWcyhwQy7Xj5v4hhbr6b+iDYwlmQ==", + "dev": true + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "dev": true, + "optional": true + }, + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "dev": true, + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", + "dev": true, + "dependencies": { + "domhandler": "^5.0.3", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-parser-stream": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", + "dev": true, + "dependencies": { + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5/node_modules/entities": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", + "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-is": { + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.1.0.tgz", + "integrity": "sha512-Oe56aUPnkHyyDxxkvqtd7KkdQP5uIUfHxd5XTb3wE9d/kRnZLmKbDB0GWk919tdQ+mxxPtG6EAs6RMT6i1qtHg==" + }, + "node_modules/react-refresh": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.13.0.tgz", + "integrity": "sha512-XP8A9BT0CpRBD+NYLLeIhld/RqG9+gktUjW1FkE+Vm7OCinbG1SshcK5tb9ls4kzvjZr9mOQc7HYgBngEyPAXg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-router": { + "version": "6.30.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.1.tgz", + "integrity": "sha512-X1m21aEmxGXqENEPG3T6u0Th7g0aS4ZmoNynhbs+Cn+q+QGTLt+d5IQ2bHAXKzKcxGJjxACpVbnYQSCRcfxHlQ==", + "dependencies": { + "@remix-run/router": "1.23.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.30.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.1.tgz", + "integrity": "sha512-llKsgOkZdbPU1Eg3zK8lCn+sjD9wMRZZPuzmdWWX5SUs8OFkN5HnFVC0u5KMeMaC9aoancFI/KoLuKPqN+hxHw==", + "dependencies": { + "@remix-run/router": "1.23.0", + "react-router": "6.30.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "2.79.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", + "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sass": { + "version": "1.89.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.89.0.tgz", + "integrity": "sha512-ld+kQU8YTdGNjOLfRWBzewJpU5cwEv/h5yyqlSeJcj6Yh8U4TDA9UA5FPicqDz/xgRPWRSYIQNiFks21TbA9KQ==", + "dev": true, + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici": { + "version": "6.21.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.3.tgz", + "integrity": "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==", + "dev": true, + "engines": { + "node": ">=18.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/use-sync-external-store": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz", + "integrity": "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/vite": { + "version": "4.5.14", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.14.tgz", + "integrity": "sha512-+v57oAaoYNnO3hIu5Z/tJRZjq5aHM2zDve9YZ8HngVHbhk66RStobhb1sqPMIPEleV6cNKYK4eGrAbE9Ulbl2g==", + "dev": true, + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/vite/node_modules/rollup": { + "version": "3.29.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", + "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "dev": true, + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zustand": { + "version": "4.5.7", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.7.tgz", + "integrity": "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==", + "dependencies": { + "use-sync-external-store": "^1.2.2" + }, + "engines": { + "node": ">=12.7.0" + }, + "peerDependencies": { + "@types/react": ">=16.8", + "immer": ">=9.0.6", + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + } + } + } + } +} diff --git a/hero_vault_extension/package.json b/hero_vault_extension/package.json new file mode 100644 index 0000000..9cda89d --- /dev/null +++ b/hero_vault_extension/package.json @@ -0,0 +1,42 @@ +{ + "name": "hero-vault-extension", + "version": "1.0.0", + "description": "Hero Vault - A secure browser extension for cryptographic operations", + "scripts": { + "dev": "node scripts/copy-wasm.js && vite", + "build": "node scripts/copy-wasm.js && ([ \"$NO_TYPECHECK\" = \"true\" ] || tsc) && vite build", + "watch": "node scripts/copy-wasm.js && tsc && vite build --watch", + "preview": "vite preview", + "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "format": "prettier --write \"src/**/*.{ts,tsx,css,scss}\"", + "copy-wasm": "node scripts/copy-wasm.js" + }, + "dependencies": { + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", + "@mui/icons-material": "^5.14.3", + "@mui/material": "^5.14.3", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-router-dom": "^6.14.2", + "zustand": "^4.4.0" + }, + "devDependencies": { + "@crxjs/vite-plugin": "^2.0.0-beta.18", + "@types/chrome": "^0.0.243", + "@types/node": "^20.4.5", + "@types/react": "^18.2.15", + "@types/react-dom": "^18.2.7", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "@vitejs/plugin-react": "^4.0.3", + "esbuild": "^0.25.4", + "eslint": "^8.45.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.3", + "prettier": "^3.0.0", + "sass": "^1.64.1", + "typescript": "^5.0.2", + "vite": "^4.4.5" + } +} diff --git a/extension/dist/assets/icon-128.png b/hero_vault_extension/public/icons/icon-128.png similarity index 100% rename from extension/dist/assets/icon-128.png rename to hero_vault_extension/public/icons/icon-128.png diff --git a/extension/dist/assets/icon-16.png b/hero_vault_extension/public/icons/icon-16.png similarity index 100% rename from extension/dist/assets/icon-16.png rename to hero_vault_extension/public/icons/icon-16.png diff --git a/extension/dist/assets/icon-32.png b/hero_vault_extension/public/icons/icon-32.png similarity index 100% rename from extension/dist/assets/icon-32.png rename to hero_vault_extension/public/icons/icon-32.png diff --git a/extension/dist/assets/icon-48.png b/hero_vault_extension/public/icons/icon-48.png similarity index 100% rename from extension/dist/assets/icon-48.png rename to hero_vault_extension/public/icons/icon-48.png diff --git a/hero_vault_extension/public/manifest.json b/hero_vault_extension/public/manifest.json new file mode 100644 index 0000000..f56c63f --- /dev/null +++ b/hero_vault_extension/public/manifest.json @@ -0,0 +1,26 @@ +{ + "manifest_version": 3, + "name": "Hero Vault", + "version": "1.0.0", + "description": "A secure browser extension for cryptographic operations and Rhai script execution", + "action": { + "default_popup": "index.html", + "default_title": "Hero Vault" + }, + "icons": { + "16": "icons/icon-16.png", + "48": "icons/icon-48.png", + "128": "icons/icon-128.png" + }, + "permissions": [ + "storage", + "unlimitedStorage" + ], + "background": { + "service_worker": "src/background/simple-background.ts", + "type": "module" + }, + "content_security_policy": { + "extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'" + } +} diff --git a/hero_vault_extension/scripts/build-background.js b/hero_vault_extension/scripts/build-background.js new file mode 100644 index 0000000..acda177 --- /dev/null +++ b/hero_vault_extension/scripts/build-background.js @@ -0,0 +1,85 @@ +/** + * Script to build the background script for the extension + */ +const { build } = require('esbuild'); +const { resolve } = require('path'); +const fs = require('fs'); + +async function buildBackground() { + try { + console.log('Building background script...'); + + // First, create a simplified background script that doesn't import WASM + const backgroundContent = ` + // Background Service Worker for SAL Modular Cryptographic Extension + // This is a simplified version that only handles messaging + + console.log('Background script initialized'); + + // Store active WebSocket connection + let activeWebSocket = null; + let sessionActive = false; + + // Listen for messages from popup or content scripts + chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { + console.log('Background received message:', message.type); + + if (message.type === 'SESSION_STATUS') { + sendResponse({ active: sessionActive }); + return true; + } + + if (message.type === 'SESSION_UNLOCK') { + sessionActive = true; + sendResponse({ success: true }); + return true; + } + + if (message.type === 'SESSION_LOCK') { + sessionActive = false; + if (activeWebSocket) { + activeWebSocket.close(); + activeWebSocket = null; + } + sendResponse({ success: true }); + return true; + } + + if (message.type === 'CONNECT_WEBSOCKET') { + // Simplified WebSocket handling + sendResponse({ success: true }); + return true; + } + + if (message.type === 'DISCONNECT_WEBSOCKET') { + if (activeWebSocket) { + activeWebSocket.close(); + activeWebSocket = null; + sendResponse({ success: true }); + } else { + sendResponse({ success: false, error: 'No active WebSocket connection' }); + } + return true; + } + + return false; + }); + + // Initialize notification setup + chrome.notifications.onClicked.addListener((notificationId) => { + // Open the extension popup when a notification is clicked + chrome.action.openPopup(); + }); + `; + + // Write the simplified background script to a temporary file + fs.writeFileSync(resolve(__dirname, '../dist/background.js'), backgroundContent); + + console.log('Background script built successfully!'); + } catch (error) { + console.error('Error building background script:', error); + process.exit(1); + } +} + +buildBackground(); diff --git a/hero_vault_extension/scripts/copy-wasm.js b/hero_vault_extension/scripts/copy-wasm.js new file mode 100644 index 0000000..314cc0e --- /dev/null +++ b/hero_vault_extension/scripts/copy-wasm.js @@ -0,0 +1,33 @@ +/** + * Script to copy WASM files from wasm_app/pkg to the extension build directory + */ +const fs = require('fs'); +const path = require('path'); + +// Source and destination paths +const sourceDir = path.resolve(__dirname, '../../wasm_app/pkg'); +const destDir = path.resolve(__dirname, '../public/wasm'); + +// Create destination directory if it doesn't exist +if (!fs.existsSync(destDir)) { + fs.mkdirSync(destDir, { recursive: true }); + console.log(`Created directory: ${destDir}`); +} + +// Copy all files from source to destination +try { + const files = fs.readdirSync(sourceDir); + + files.forEach(file => { + const sourcePath = path.join(sourceDir, file); + const destPath = path.join(destDir, file); + + fs.copyFileSync(sourcePath, destPath); + console.log(`Copied: ${file}`); + }); + + console.log('WASM files copied successfully!'); +} catch (error) { + console.error('Error copying WASM files:', error); + process.exit(1); +} diff --git a/hero_vault_extension/src/App.tsx b/hero_vault_extension/src/App.tsx new file mode 100644 index 0000000..ad9ffcf --- /dev/null +++ b/hero_vault_extension/src/App.tsx @@ -0,0 +1,127 @@ +import { useState, useEffect } from 'react'; +import { Box, Container, Paper } from '@mui/material'; +import { Routes, Route, HashRouter } from 'react-router-dom'; + +// Import pages +import HomePage from './pages/HomePage'; +import SessionPage from './pages/SessionPage'; +import KeypairPage from './pages/KeypairPage'; +import ScriptPage from './pages/ScriptPage'; +import SettingsPage from './pages/SettingsPage'; +import WebSocketPage from './pages/WebSocketPage'; +import CryptoPage from './pages/CryptoPage'; + +// Import components +import Header from './components/Header'; +import Navigation from './components/Navigation'; + +// Import session state management +import { useSessionStore } from './store/sessionStore'; + +function App() { + const { checkSessionStatus, initWasm } = useSessionStore(); + const [isLoading, setIsLoading] = useState(true); + const [wasmError, setWasmError] = useState(null); + + // Initialize WASM and check session status on mount + useEffect(() => { + const initializeApp = async () => { + try { + // First initialize WASM module + const wasmInitialized = await initWasm(); + + if (!wasmInitialized) { + throw new Error('Failed to initialize WASM module'); + } + + // Then check session status + await checkSessionStatus(); + } catch (error) { + console.error('Initialization error:', error); + setWasmError((error as Error).message || 'Failed to initialize the extension'); + } finally { + setIsLoading(false); + } + }; + + initializeApp(); + }, [checkSessionStatus, initWasm]); + + if (isLoading) { + return ( + + Loading... + + ); + } + + if (wasmError) { + return ( + + +
+ WASM Module Failed to Initialize +
+

+ The WASM module could not be loaded. Please try reloading the extension. +

+

+ Error: {wasmError} Please contact support if the problem persists. +

+
+
+ ); + } + + return ( + + +
+ + + + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + + + + + + + ); +} + +export default App; diff --git a/hero_vault_extension/src/background/index.ts b/hero_vault_extension/src/background/index.ts new file mode 100644 index 0000000..6dc73a9 --- /dev/null +++ b/hero_vault_extension/src/background/index.ts @@ -0,0 +1,145 @@ +/** + * Background Service Worker for Hero Vault Extension + * + * Responsibilities: + * - Maintain WebSocket connections + * - Handle incoming script requests + * - Manage session state when popup is closed + * - Provide messaging interface for popup/content scripts + * - Initialize WASM module when extension starts + */ + +// Import WASM helper functions +import { initWasm } from '../wasm/wasmHelper'; + +// Initialize WASM module when service worker starts +initWasm().catch(error => { + console.error('Failed to initialize WASM module:', error); +}); + +// Store active WebSocket connection +let activeWebSocket: WebSocket | null = null; +let sessionActive = false; + +// Listen for messages from popup or content scripts +chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => { + if (message.type === 'SESSION_STATUS') { + sendResponse({ active: sessionActive }); + return true; + } + + if (message.type === 'SESSION_UNLOCK') { + sessionActive = true; + sendResponse({ success: true }); + return true; + } + + if (message.type === 'SESSION_LOCK') { + sessionActive = false; + if (activeWebSocket) { + activeWebSocket.close(); + activeWebSocket = null; + } + sendResponse({ success: true }); + return true; + } + + if (message.type === 'CONNECT_WEBSOCKET' && message.serverUrl && message.publicKey) { + connectToWebSocket(message.serverUrl, message.publicKey) + .then(success => sendResponse({ success })) + .catch(error => sendResponse({ success: false, error: error.message })); + return true; // Indicates we'll respond asynchronously + } + + if (message.type === 'DISCONNECT_WEBSOCKET') { + if (activeWebSocket) { + activeWebSocket.close(); + activeWebSocket = null; + sendResponse({ success: true }); + } else { + sendResponse({ success: false, error: 'No active WebSocket connection' }); + } + return true; + } +}); + +/** + * Connect to a WebSocket server with the user's public key + */ +async function connectToWebSocket(serverUrl: string, publicKey: string): Promise { + if (activeWebSocket) { + activeWebSocket.close(); + } + + return new Promise((resolve, reject) => { + try { + const ws = new WebSocket(serverUrl); + + ws.onopen = () => { + // Send authentication message with public key + ws.send(JSON.stringify({ + type: 'AUTH', + publicKey + })); + + activeWebSocket = ws; + resolve(true); + }; + + ws.onerror = (error) => { + console.error('WebSocket error:', error); + reject(new Error('Failed to connect to WebSocket server')); + }; + + ws.onclose = () => { + activeWebSocket = null; + console.log('WebSocket connection closed'); + }; + + ws.onmessage = async (event) => { + try { + const data = JSON.parse(event.data); + + // Handle incoming script requests + if (data.type === 'SCRIPT_REQUEST') { + // Notify the user of the script request + chrome.notifications.create({ + type: 'basic', + iconUrl: 'icons/icon128.png', + title: 'Script Request', + message: `Received script request: ${data.title || 'Untitled Script'}`, + priority: 2 + }); + + // Store the script request for the popup to handle + await chrome.storage.local.set({ + pendingScripts: [ + ...(await chrome.storage.local.get('pendingScripts')).pendingScripts || [], + { + id: data.id, + title: data.title || 'Untitled Script', + description: data.description || '', + script: data.script, + tags: data.tags || [], + timestamp: Date.now() + } + ] + }); + } + } catch (error) { + console.error('Error processing WebSocket message:', error); + } + }; + } catch (error) { + reject(error); + } + }); +} + +// Initialize notification setup +chrome.notifications.onClicked.addListener((_notificationId) => { + // Open the extension popup when a notification is clicked + chrome.action.openPopup(); +}); + +console.log('Hero Vault Extension background service worker initialized'); diff --git a/hero_vault_extension/src/background/simple-background.ts b/hero_vault_extension/src/background/simple-background.ts new file mode 100644 index 0000000..f8b8e96 --- /dev/null +++ b/hero_vault_extension/src/background/simple-background.ts @@ -0,0 +1,115 @@ +/** + * Simplified Background Service Worker for Hero Vault Extension + * + * This is a version that doesn't use WASM to avoid service worker limitations + * with dynamic imports. It only handles basic messaging between components. + */ + +console.log('Background script initialized'); + +// Store session state +let sessionActive = false; +let activeWebSocket: WebSocket | null = null; + +// Listen for messages from popup or content scripts +chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { + console.log('Background received message:', message.type); + + if (message.type === 'SESSION_STATUS') { + sendResponse({ active: sessionActive }); + return true; + } + + if (message.type === 'SESSION_UNLOCK') { + sessionActive = true; + sendResponse({ success: true }); + return true; + } + + if (message.type === 'SESSION_LOCK') { + sessionActive = false; + if (activeWebSocket) { + activeWebSocket.close(); + activeWebSocket = null; + } + sendResponse({ success: true }); + return true; + } + + if (message.type === 'CONNECT_WEBSOCKET' && message.serverUrl && message.publicKey) { + // Simplified WebSocket handling + try { + if (activeWebSocket) { + activeWebSocket.close(); + } + + activeWebSocket = new WebSocket(message.serverUrl); + + activeWebSocket.onopen = () => { + console.log('WebSocket connection established'); + // Send public key to identify this client + if (activeWebSocket) { + activeWebSocket.send(JSON.stringify({ + type: 'IDENTIFY', + publicKey: message.publicKey + })); + } + }; + + activeWebSocket.onmessage = (event) => { + try { + const data = JSON.parse(event.data); + console.log('WebSocket message received:', data); + + // Forward message to popup + chrome.runtime.sendMessage({ + type: 'WEBSOCKET_MESSAGE', + data + }).catch(error => { + console.error('Failed to forward WebSocket message:', error); + }); + } catch (error) { + console.error('Failed to parse WebSocket message:', error); + } + }; + + activeWebSocket.onerror = (error) => { + console.error('WebSocket error:', error); + }; + + activeWebSocket.onclose = () => { + console.log('WebSocket connection closed'); + activeWebSocket = null; + }; + + sendResponse({ success: true }); + } catch (error) { + console.error('Failed to connect to WebSocket:', error); + sendResponse({ success: false, error: error.message }); + } + + return true; + } + + if (message.type === 'DISCONNECT_WEBSOCKET') { + if (activeWebSocket) { + activeWebSocket.close(); + activeWebSocket = null; + sendResponse({ success: true }); + } else { + sendResponse({ success: false, error: 'No active WebSocket connection' }); + } + return true; + } + + // If we don't handle the message, return false + return false; +}); + +// Handle notifications if available +if (chrome.notifications && chrome.notifications.onClicked) { + chrome.notifications.onClicked.addListener((notificationId) => { + // Open the extension popup when a notification is clicked + chrome.action.openPopup(); + }); +} diff --git a/hero_vault_extension/src/components/Header.tsx b/hero_vault_extension/src/components/Header.tsx new file mode 100644 index 0000000..38ecd18 --- /dev/null +++ b/hero_vault_extension/src/components/Header.tsx @@ -0,0 +1,97 @@ +import { AppBar, Toolbar, Typography, IconButton, Box, Chip } from '@mui/material'; +import LockIcon from '@mui/icons-material/Lock'; +import LockOpenIcon from '@mui/icons-material/LockOpen'; +import SignalWifiStatusbar4BarIcon from '@mui/icons-material/SignalWifiStatusbar4Bar'; +import SignalWifiOffIcon from '@mui/icons-material/SignalWifiOff'; +import { useSessionStore } from '../store/sessionStore'; + +const Header = () => { + const { + isSessionUnlocked, + currentKeyspace, + currentKeypair, + isWebSocketConnected, + lockSession + } = useSessionStore(); + + const handleLockClick = async () => { + if (isSessionUnlocked) { + await lockSession(); + } + }; + + return ( + + + + Hero Vault + + + + {/* WebSocket connection status */} + {isWebSocketConnected ? ( + } + label="Connected" + size="small" + color="success" + variant="outlined" + /> + ) : ( + } + label="Offline" + size="small" + color="default" + variant="outlined" + /> + )} + + {/* Session status */} + {isSessionUnlocked ? ( + } + label={currentKeyspace || 'Unlocked'} + size="small" + color="primary" + variant="outlined" + /> + ) : ( + } + label="Locked" + size="small" + color="error" + variant="outlined" + /> + )} + + {/* Current keypair */} + {isSessionUnlocked && currentKeypair && ( + + )} + + {/* Lock button */} + {isSessionUnlocked && ( + + + + )} + + + + ); +}; + +export default Header; diff --git a/hero_vault_extension/src/components/Navigation.tsx b/hero_vault_extension/src/components/Navigation.tsx new file mode 100644 index 0000000..3268159 --- /dev/null +++ b/hero_vault_extension/src/components/Navigation.tsx @@ -0,0 +1,130 @@ +import React, { useState } from 'react'; +import { BottomNavigation, BottomNavigationAction, Paper, Box, IconButton, Menu, MenuItem, ListItemIcon, ListItemText } from '@mui/material'; +import MoreVertIcon from '@mui/icons-material/MoreVert'; +import { useNavigate, useLocation } from 'react-router-dom'; +import HomeIcon from '@mui/icons-material/Home'; +import VpnKeyIcon from '@mui/icons-material/VpnKey'; +import CodeIcon from '@mui/icons-material/Code'; +import SettingsIcon from '@mui/icons-material/Settings'; +import WifiIcon from '@mui/icons-material/Wifi'; +import LockIcon from '@mui/icons-material/Lock'; +import { useSessionStore } from '../store/sessionStore'; + +const Navigation = () => { + const navigate = useNavigate(); + const location = useLocation(); + const { isSessionUnlocked } = useSessionStore(); + + // Get current path without leading slash + const currentPath = location.pathname.substring(1) || 'home'; + + // State for the more menu + const [moreAnchorEl, setMoreAnchorEl] = useState(null); + const isMoreMenuOpen = Boolean(moreAnchorEl); + + const handleMoreClick = (event: React.MouseEvent) => { + setMoreAnchorEl(event.currentTarget); + }; + + const handleMoreClose = () => { + setMoreAnchorEl(null); + }; + + const handleNavigation = (path: string) => { + navigate(`/${path === 'home' ? '' : path}`); + handleMoreClose(); + }; + + return ( + + + { + navigate(`/${newValue === 'home' ? '' : newValue}`); + }} + sx={{ flexGrow: 1 }} + > + } + /> + + } + disabled={!isSessionUnlocked} + /> + + } + disabled={!isSessionUnlocked} + /> + + } + onClick={handleMoreClick} + /> + + + + handleNavigation('script')} + disabled={!isSessionUnlocked} + selected={currentPath === 'script'} + > + + + + Scripts + + + handleNavigation('websocket')} + disabled={!isSessionUnlocked} + selected={currentPath === 'websocket'} + > + + + + WebSocket + + + handleNavigation('settings')} + selected={currentPath === 'settings'} + > + + + + Settings + + + + + ); +}; + +export default Navigation; diff --git a/hero_vault_extension/src/index.css b/hero_vault_extension/src/index.css new file mode 100644 index 0000000..537ae85 --- /dev/null +++ b/hero_vault_extension/src/index.css @@ -0,0 +1,38 @@ +:root { + font-family: 'Roboto', system-ui, sans-serif; + line-height: 1.5; + font-weight: 400; + color-scheme: dark; +} + +body { + margin: 0; + min-width: 360px; + min-height: 520px; + overflow-x: hidden; +} + +#root { + width: 100%; + height: 100%; +} + +/* Scrollbar styling */ +::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +::-webkit-scrollbar-track { + background: rgba(255, 255, 255, 0.05); + border-radius: 3px; +} + +::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.2); + border-radius: 3px; +} + +::-webkit-scrollbar-thumb:hover { + background: rgba(255, 255, 255, 0.3); +} diff --git a/hero_vault_extension/src/main.tsx b/hero_vault_extension/src/main.tsx new file mode 100644 index 0000000..e01b45f --- /dev/null +++ b/hero_vault_extension/src/main.tsx @@ -0,0 +1,64 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { ThemeProvider, createTheme } from '@mui/material/styles'; +import CssBaseline from '@mui/material/CssBaseline'; +import App from './App'; +import './index.css'; + +// Create a dark theme for the extension +const darkTheme = createTheme({ + palette: { + mode: 'dark', + primary: { + main: '#6200ee', + }, + secondary: { + main: '#03dac6', + }, + background: { + default: '#121212', + paper: '#1e1e1e', + }, + }, + typography: { + fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif', + h1: { + fontSize: '1.5rem', + fontWeight: 600, + }, + h2: { + fontSize: '1.25rem', + fontWeight: 600, + }, + h3: { + fontSize: '1.125rem', + fontWeight: 600, + }, + }, + components: { + MuiButton: { + styleOverrides: { + root: { + borderRadius: 8, + textTransform: 'none', + }, + }, + }, + MuiPaper: { + styleOverrides: { + root: { + borderRadius: 8, + }, + }, + }, + }, +}); + +ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( + + + + + + +); diff --git a/hero_vault_extension/src/pages/CryptoPage.tsx b/hero_vault_extension/src/pages/CryptoPage.tsx new file mode 100644 index 0000000..310c226 --- /dev/null +++ b/hero_vault_extension/src/pages/CryptoPage.tsx @@ -0,0 +1,392 @@ +/** + * Cryptographic Operations Page + * + * This page provides a UI for: + * - Encrypting/decrypting data using the keyspace's symmetric cipher + * - Signing/verifying messages using the selected keypair + */ + +import { useState, useEffect } from 'react'; +import type { SyntheticEvent } from '../types'; +import { + Box, + Typography, + TextField, + Button, + Paper, + Tabs, + Tab, + CircularProgress, + Alert, + Divider, + IconButton, + Tooltip, +} from '@mui/material'; +import ContentCopyIcon from '@mui/icons-material/ContentCopy'; +import { useSessionStore } from '../store/sessionStore'; +import { useCryptoStore } from '../store/cryptoStore'; +import { useNavigate } from 'react-router-dom'; + +const CryptoPage = () => { + const navigate = useNavigate(); + const { isSessionUnlocked, currentKeypair } = useSessionStore(); + const { + encryptData, + decryptData, + signMessage, + verifySignature, + isEncrypting, + isDecrypting, + isSigning, + isVerifying, + error, + clearError + } = useCryptoStore(); + + const [activeTab, setActiveTab] = useState(0); + const [copySuccess, setCopySuccess] = useState(null); + + // Encryption state + const [plaintext, setPlaintext] = useState(''); + const [encryptedData, setEncryptedData] = useState(''); + + // Decryption state + const [ciphertext, setCiphertext] = useState(''); + const [decryptedData, setDecryptedData] = useState(''); + + // Signing state + const [messageToSign, setMessageToSign] = useState(''); + const [signature, setSignature] = useState(''); + + // Verification state + const [messageToVerify, setMessageToVerify] = useState(''); + const [signatureToVerify, setSignatureToVerify] = useState(''); + const [isVerified, setIsVerified] = useState(null); + + // Redirect if not unlocked + useEffect(() => { + if (!isSessionUnlocked) { + navigate('/'); + } + }, [isSessionUnlocked, navigate]); + + const handleTabChange = (_event: React.SyntheticEvent, newValue: number) => { + setActiveTab(newValue); + clearError(); + setCopySuccess(null); + }; + + const handleEncrypt = async () => { + try { + const result = await encryptData(plaintext); + setEncryptedData(result); + } catch (err) { + // Error is already handled in the store + } + }; + + const handleDecrypt = async () => { + try { + const result = await decryptData(ciphertext); + setDecryptedData(result); + } catch (err) { + // Error is already handled in the store + } + }; + + const handleSign = async () => { + try { + const result = await signMessage(messageToSign); + setSignature(result); + } catch (err) { + // Error is already handled in the store + } + }; + + const handleVerify = async () => { + try { + const result = await verifySignature(messageToVerify, signatureToVerify); + setIsVerified(result); + } catch (err) { + setIsVerified(false); + // Error is already handled in the store + } + }; + + const copyToClipboard = (text: string, label: string) => { + navigator.clipboard.writeText(text).then( + () => { + setCopySuccess(`${label} copied to clipboard!`); + setTimeout(() => setCopySuccess(null), 2000); + }, + () => { + setCopySuccess('Failed to copy!'); + } + ); + }; + + if (!isSessionUnlocked) { + return null; // Will redirect via useEffect + } + + return ( + + Cryptographic Operations + + {error && ( + + {error} + + )} + + {copySuccess && ( + + {copySuccess} + + )} + + + {/* Tabs with smaller width and scrollable */} + + + + + + + + + + {/* Content area with proper scrolling */} + + {/* Encryption Tab */} + {activeTab === 0 && ( + + Encrypt Data + + Data will be encrypted using ChaCha20-Poly1305 with a key derived from your keyspace password. + + + setPlaintext(e.target.value)} + margin="normal" + /> + + + + {encryptedData && ( + + + Encrypted Result + + + + copyToClipboard(encryptedData, 'Encrypted data')} + > + + + + + + )} + + )} + + {/* Decryption Tab */} + {activeTab === 1 && ( + + Decrypt Data + + Paste encrypted data (in Base64 format) to decrypt it using your keyspace password. + + + setCiphertext(e.target.value)} + margin="normal" + /> + + + + {decryptedData && ( + + + Decrypted Result + + + + copyToClipboard(decryptedData, 'Decrypted data')} + > + + + + + + )} + + )} + + {/* Signing Tab */} + {activeTab === 2 && ( + + Sign Message + + {!currentKeypair ? ( + + Please select a keypair from the Keypair page before signing messages. + + ) : ( + + Signing with keypair: {currentKeypair.name || currentKeypair.id.substring(0, 8)}... + + )} + + setMessageToSign(e.target.value)} + margin="normal" + disabled={!currentKeypair} + /> + + + {signature && ( + + + Signature + + + + copyToClipboard(signature, 'Signature')} + > + + + + + + )} + + )} + + {/* Verification Tab */} + {activeTab === 3 && ( + + Verify Signature + + Verify that a message was signed by the currently selected keypair. + + + setMessageToVerify(e.target.value)} + margin="normal" + /> + setSignatureToVerify(e.target.value)} + margin="normal" + /> + + + {isVerified !== null && ( + + + {isVerified + ? "Signature is valid! The message was signed by the expected keypair." + : "Invalid signature. The message may have been tampered with or signed by a different keypair."} + + + )} + + )} + + + + ); +}; + +export default CryptoPage; diff --git a/hero_vault_extension/src/pages/HomePage.tsx b/hero_vault_extension/src/pages/HomePage.tsx new file mode 100644 index 0000000..f61be51 --- /dev/null +++ b/hero_vault_extension/src/pages/HomePage.tsx @@ -0,0 +1,155 @@ +import { useState } from 'react'; +import { + Box, + Typography, + Button, + TextField, + Card, + CardContent, + Stack, + Alert, + CircularProgress +} from '@mui/material'; +import { useNavigate } from 'react-router-dom'; +import { useSessionStore } from '../store/sessionStore'; + +const HomePage = () => { + const navigate = useNavigate(); + const { isSessionUnlocked, unlockSession, createKeyspace } = useSessionStore(); + + const [keyspace, setKeyspace] = useState(''); + const [password, setPassword] = useState(''); + const [isLoading, setIsLoading] = useState(false); + const [error, setError] = useState(null); + const [mode, setMode] = useState<'unlock' | 'create'>('unlock'); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setError(null); + setIsLoading(true); + + try { + let success = false; + + if (mode === 'unlock') { + success = await unlockSession(keyspace, password); + } else { + success = await createKeyspace(keyspace, password); + } + + if (success) { + // Navigate to keypair page on success + navigate('/keypair'); + } else { + setError(mode === 'unlock' + ? 'Failed to unlock keyspace. Check your password and try again.' + : 'Failed to create keyspace. Please try again.'); + } + } catch (err) { + setError((err as Error).message || 'An unexpected error occurred'); + } finally { + setIsLoading(false); + } + }; + + if (isSessionUnlocked) { + return ( + + + Welcome to Hero Vault + + + Your session is unlocked. You can now use the extension features. + + + + + + + ); + } + + return ( + + + Hero Vault + + + + + + {mode === 'unlock' ? 'Unlock Keyspace' : 'Create New Keyspace'} + + + {error && ( + + {error} + + )} + +
+ setKeyspace(e.target.value)} + fullWidth + margin="normal" + required + disabled={isLoading} + /> + + setPassword(e.target.value)} + fullWidth + margin="normal" + required + disabled={isLoading} + /> + + + + + + + +
+
+
+ ); +}; + +export default HomePage; diff --git a/hero_vault_extension/src/pages/KeypairPage.tsx b/hero_vault_extension/src/pages/KeypairPage.tsx new file mode 100644 index 0000000..f4262a2 --- /dev/null +++ b/hero_vault_extension/src/pages/KeypairPage.tsx @@ -0,0 +1,242 @@ +import { useState, useEffect } from 'react'; +import { + Box, + Typography, + Button, + List, + ListItem, + ListItemText, + ListItemSecondaryAction, + IconButton, + Divider, + Dialog, + DialogTitle, + DialogContent, + DialogActions, + TextField, + FormControl, + InputLabel, + Select, + MenuItem, + CircularProgress, + Paper, + Alert, + Chip +} from '@mui/material'; +import AddIcon from '@mui/icons-material/Add'; +import CheckIcon from '@mui/icons-material/Check'; +import { useSessionStore } from '../store/sessionStore'; +import { useNavigate } from 'react-router-dom'; + +const KeypairPage = () => { + const navigate = useNavigate(); + const { + isSessionUnlocked, + availableKeypairs, + currentKeypair, + listKeypairs, + selectKeypair, + createKeypair + } = useSessionStore(); + + const [isLoading, setIsLoading] = useState(true); + const [error, setError] = useState(null); + const [createDialogOpen, setCreateDialogOpen] = useState(false); + const [newKeypairName, setNewKeypairName] = useState(''); + const [newKeypairType, setNewKeypairType] = useState('Secp256k1'); + const [newKeypairDescription, setNewKeypairDescription] = useState(''); + const [isCreating, setIsCreating] = useState(false); + + // Redirect if not unlocked + useEffect(() => { + if (!isSessionUnlocked) { + navigate('/'); + } + }, [isSessionUnlocked, navigate]); + + // Load keypairs on mount + useEffect(() => { + const loadKeypairs = async () => { + try { + setIsLoading(true); + await listKeypairs(); + } catch (err) { + setError((err as Error).message || 'Failed to load keypairs'); + } finally { + setIsLoading(false); + } + }; + + if (isSessionUnlocked) { + loadKeypairs(); + } + }, [isSessionUnlocked, listKeypairs]); + + const handleSelectKeypair = async (keypairId: string) => { + try { + setIsLoading(true); + await selectKeypair(keypairId); + } catch (err) { + setError((err as Error).message || 'Failed to select keypair'); + } finally { + setIsLoading(false); + } + }; + + const handleCreateKeypair = async () => { + try { + setIsCreating(true); + setError(null); + + await createKeypair(newKeypairType, { + name: newKeypairName, + description: newKeypairDescription + }); + + setCreateDialogOpen(false); + setNewKeypairName(''); + setNewKeypairDescription(''); + + // Refresh the list + await listKeypairs(); + } catch (err) { + setError((err as Error).message || 'Failed to create keypair'); + } finally { + setIsCreating(false); + } + }; + + if (!isSessionUnlocked) { + return null; // Will redirect via useEffect + } + + return ( + + + Keypair Management + + + + {error && ( + + {error} + + )} + + {isLoading ? ( + + + + ) : availableKeypairs.length === 0 ? ( + + + No keypairs found. Create your first keypair to get started. + + + ) : ( + + + {availableKeypairs.map((keypair: any, index: number) => ( + + {index > 0 && } + handleSelectKeypair(keypair.id)} + > + + {keypair.name || keypair.id} + + + } + secondary={ + + {keypair.description || 'No description'} +
+ Created: {new Date(keypair.createdAt).toLocaleString()} +
+ } + /> + + {currentKeypair?.id === keypair.id && ( + + + + )} + + +
+ ))} + + + )} + + {/* Create Keypair Dialog */} + setCreateDialogOpen(false)} maxWidth="sm" fullWidth> + Create New Keypair + + ) => setNewKeypairName(e.target.value)} + fullWidth + margin="normal" + disabled={isCreating} + /> + + + Type + + + + ) => setNewKeypairDescription(e.target.value)} + fullWidth + margin="normal" + multiline + rows={2} + disabled={isCreating} + /> + + + + + + + + ); +}; + +export default KeypairPage; diff --git a/hero_vault_extension/src/pages/ScriptPage.tsx b/hero_vault_extension/src/pages/ScriptPage.tsx new file mode 100644 index 0000000..cc7a769 --- /dev/null +++ b/hero_vault_extension/src/pages/ScriptPage.tsx @@ -0,0 +1,557 @@ +import { useState, useEffect } from 'react'; +import { getChromeApi } from '../utils/chromeApi'; +import { + Box, + Typography, + Button, + TextField, + Paper, + Alert, + CircularProgress, + Divider, + Tabs, + Tab, + List, + ListItem, + ListItemText, + ListItemSecondaryAction, + IconButton, + Dialog, + DialogTitle, + DialogContent, + DialogActions, + Chip +} from '@mui/material'; +import PlayArrowIcon from '@mui/icons-material/PlayArrow'; +import VisibilityIcon from '@mui/icons-material/Visibility'; +// DeleteIcon removed as it's not used +import { useNavigate } from 'react-router-dom'; +import { useSessionStore } from '../store/sessionStore'; + +interface ScriptResult { + id: string; + timestamp: number; + script: string; + result: string; + success: boolean; +} + +interface PendingScript { + id: string; + title: string; + description: string; + script: string; + tags: string[]; + timestamp: number; +} + +const ScriptPage = () => { + const navigate = useNavigate(); + const { isSessionUnlocked, currentKeypair } = useSessionStore(); + + const [tabValue, setTabValue] = useState(0); + const [scriptInput, setScriptInput] = useState(''); + const [isExecuting, setIsExecuting] = useState(false); + const [executionResult, setExecutionResult] = useState(null); + const [executionSuccess, setExecutionSuccess] = useState(null); + const [scriptResults, setScriptResults] = useState([]); + const [pendingScripts, setPendingScripts] = useState([]); + const [selectedPendingScript, setSelectedPendingScript] = useState(null); + const [scriptDialogOpen, setScriptDialogOpen] = useState(false); + const [error, setError] = useState(null); + + // Redirect if not unlocked + useEffect(() => { + if (!isSessionUnlocked) { + navigate('/'); + } + }, [isSessionUnlocked, navigate]); + + // Load pending scripts from storage + useEffect(() => { + const loadPendingScripts = async () => { + try { + const chromeApi = getChromeApi(); + const data = await chromeApi.storage.local.get('pendingScripts'); + if (data.pendingScripts) { + setPendingScripts(data.pendingScripts); + } + } catch (err) { + console.error('Failed to load pending scripts:', err); + } + }; + + if (isSessionUnlocked) { + loadPendingScripts(); + } + }, [isSessionUnlocked]); + + // Load script history from storage + useEffect(() => { + const loadScriptResults = async () => { + try { + const chromeApi = getChromeApi(); + const data = await chromeApi.storage.local.get('scriptResults'); + if (data.scriptResults) { + setScriptResults(data.scriptResults); + } + } catch (err) { + console.error('Failed to load script results:', err); + } + }; + + if (isSessionUnlocked) { + loadScriptResults(); + } + }, [isSessionUnlocked]); + + const handleTabChange = (_: React.SyntheticEvent, newValue: number) => { + setTabValue(newValue); + }; + + const handleExecuteScript = async () => { + if (!scriptInput.trim()) return; + + setIsExecuting(true); + setError(null); + setExecutionResult(null); + setExecutionSuccess(null); + + try { + // Call the WASM run_rhai function via our store + const result = await useSessionStore.getState().executeScript(scriptInput); + + setExecutionResult(result); + setExecutionSuccess(true); + + // Save to history + const newResult: ScriptResult = { + id: `script-${Date.now()}`, + timestamp: Date.now(), + script: scriptInput, + result, + success: true + }; + + const updatedResults = [newResult, ...scriptResults].slice(0, 20); // Keep last 20 + setScriptResults(updatedResults); + + // Save to storage + const chromeApi = getChromeApi(); + await chromeApi.storage.local.set({ scriptResults: updatedResults }); + } catch (err) { + setError((err as Error).message || 'Failed to execute script'); + setExecutionSuccess(false); + setExecutionResult('Execution failed'); + } finally { + setIsExecuting(false); + } + }; + + const handleViewPendingScript = (script: PendingScript) => { + setSelectedPendingScript(script); + setScriptDialogOpen(true); + }; + + const handleApprovePendingScript = async () => { + if (!selectedPendingScript) return; + + setScriptDialogOpen(false); + setScriptInput(selectedPendingScript.script); + setTabValue(0); // Switch to execute tab + + // Remove from pending list + const updatedPendingScripts = pendingScripts.filter( + script => script.id !== selectedPendingScript.id + ); + + setPendingScripts(updatedPendingScripts); + const chromeApi = getChromeApi(); + await chromeApi.storage.local.set({ pendingScripts: updatedPendingScripts }); + setSelectedPendingScript(null); + }; + + const handleRejectPendingScript = async () => { + if (!selectedPendingScript) return; + + // Remove from pending list + const updatedPendingScripts = pendingScripts.filter( + script => script.id !== selectedPendingScript.id + ); + + setPendingScripts(updatedPendingScripts); + const chromeApi = getChromeApi(); + await chromeApi.storage.local.set({ pendingScripts: updatedPendingScripts }); + + setScriptDialogOpen(false); + setSelectedPendingScript(null); + }; + + const handleClearHistory = async () => { + setScriptResults([]); + const chromeApi = getChromeApi(); + await chromeApi.storage.local.set({ scriptResults: [] }); + }; + + if (!isSessionUnlocked) { + return null; // Will redirect via useEffect + } + + return ( + + + + + + Pending + {pendingScripts.length > 0 && ( + + )} + + } + sx={{ minHeight: '48px', py: 0 }} + /> + + + + + {/* Execute Tab */} + {tabValue === 0 && ( + + + {!currentKeypair && ( + + No keypair selected. Select a keypair to enable script execution with signing capabilities. + + )} + + {error && ( + + {error} + + )} + + setScriptInput(e.target.value)} + fullWidth + variant="outlined" + placeholder="Enter your Rhai script here..." + sx={{ mb: 2 }} + disabled={isExecuting} + /> + + + + + + {executionResult && ( + + + Execution Result: + + + {executionResult} + + + )} + + + )} + + {/* Pending Scripts Tab */} + {tabValue === 1 && ( + + {pendingScripts.length === 0 ? ( + + + No pending scripts. Incoming scripts from connected WebSocket servers will appear here. + + + ) : ( + + + {pendingScripts.map((script, index) => ( + + {index > 0 && } + + + + {script.description || 'No description'} + + + {script.tags.map(tag => ( + + ))} + + + } + /> + + handleViewPendingScript(script)} + aria-label="view script" + > + + + + + + ))} + + + )} + + )} + + {/* History Tab */} + {tabValue === 2 && ( + + + + + + + {scriptResults.length === 0 ? ( + + + No script execution history yet. + + + ) : ( + + + {scriptResults.map((result, index) => ( + + {index > 0 && } + + + + {new Date(result.timestamp).toLocaleString()} + + + + } + secondary={ + + {result.script} + + } + /> + + { + setScriptInput(result.script); + setTabValue(0); + }} + aria-label="reuse script" + > + + + + + + ))} + + + )} + + + )} + + {/* Pending Script Dialog */} + setScriptDialogOpen(false)} + maxWidth="md" + fullWidth + > + + {selectedPendingScript?.title || 'Script Details'} + + + {selectedPendingScript && ( + <> + + Description: + + + {selectedPendingScript.description || 'No description provided'} + + + + {selectedPendingScript.tags.map(tag => ( + + ))} + + + + Script Content: + + + + {selectedPendingScript.script} + + + + + + {selectedPendingScript.tags.includes('remote') + ? 'This is a remote script. If approved, your signature will be sent to the server and the script may execute remotely.' + : 'This script will execute locally in your browser extension if approved.'} + + + + )} + + + + + + + + ); +}; + +export default ScriptPage; diff --git a/hero_vault_extension/src/pages/SessionPage.tsx b/hero_vault_extension/src/pages/SessionPage.tsx new file mode 100644 index 0000000..a3b38b7 --- /dev/null +++ b/hero_vault_extension/src/pages/SessionPage.tsx @@ -0,0 +1,191 @@ +import { useState, useEffect } from 'react'; +import { + Box, + Typography, + Button, + Paper, + Alert, + CircularProgress, + List, + ListItem, + ListItemText, + Divider, + Card, + CardContent, + Grid +} from '@mui/material'; +import { useNavigate } from 'react-router-dom'; +import { useSessionStore } from '../store/sessionStore'; +import LockIcon from '@mui/icons-material/Lock'; +import SecurityIcon from '@mui/icons-material/Security'; +// HistoryIcon removed as it's not used + +interface SessionActivity { + id: string; + action: string; + timestamp: number; + details?: string; +} + +const SessionPage = () => { + const navigate = useNavigate(); + const { + isSessionUnlocked, + currentKeyspace, + currentKeypair, + lockSession + } = useSessionStore(); + + const [sessionActivities, setSessionActivities] = useState([]); + const [isLoading, setIsLoading] = useState(false); + + // Redirect if not unlocked + useEffect(() => { + if (!isSessionUnlocked) { + navigate('/'); + } + }, [isSessionUnlocked, navigate]); + + // Load session activities from storage + useEffect(() => { + const loadSessionActivities = async () => { + try { + setIsLoading(true); + const data = await chrome.storage.local.get('sessionActivities'); + if (data.sessionActivities) { + setSessionActivities(data.sessionActivities); + } + } catch (err) { + console.error('Failed to load session activities:', err); + } finally { + setIsLoading(false); + } + }; + + if (isSessionUnlocked) { + loadSessionActivities(); + } + }, [isSessionUnlocked]); + + const handleLockSession = async () => { + try { + await lockSession(); + navigate('/'); + } catch (err) { + console.error('Failed to lock session:', err); + } + }; + + if (!isSessionUnlocked) { + return null; // Will redirect via useEffect + } + + return ( + + + Session Management + + + + + + + + Current Keyspace + + + {currentKeyspace || 'None'} + + + + + + + + + + Selected Keypair + + + {currentKeypair?.name || currentKeypair?.id || 'None'} + + {currentKeypair && ( + + Type: {currentKeypair.type} + + )} + + + + + + + + Session Activity + + + + + + {isLoading ? ( + + + + ) : sessionActivities.length === 0 ? ( + + + No session activity recorded yet. + + + ) : ( + + + {sessionActivities.map((activity, index) => ( + + {index > 0 && } + + + + {activity.action} + + + } + secondary={ + <> + + {new Date(activity.timestamp).toLocaleString()} + + {activity.details && ( + + {activity.details} + + )} + + } + /> + + + ))} + + + )} + + + }> + Your session is active. All cryptographic operations and script executions require explicit approval. + + + + ); +}; + +export default SessionPage; diff --git a/hero_vault_extension/src/pages/SettingsPage.tsx b/hero_vault_extension/src/pages/SettingsPage.tsx new file mode 100644 index 0000000..7d876c6 --- /dev/null +++ b/hero_vault_extension/src/pages/SettingsPage.tsx @@ -0,0 +1,246 @@ +import { useState, useEffect } from 'react'; +import { + Box, + Typography, + Switch, + // FormControlLabel removed as it's not used + Divider, + Paper, + List, + ListItem, + ListItemText, + Button, + Dialog, + DialogTitle, + DialogContent, + DialogActions, + TextField, + Alert, + Snackbar +} from '@mui/material'; +import DeleteIcon from '@mui/icons-material/Delete'; +import InfoIcon from '@mui/icons-material/Info'; + +interface Settings { + darkMode: boolean; + autoLockTimeout: number; // minutes + confirmCryptoOperations: boolean; + showScriptNotifications: boolean; +} + +const SettingsPage = () => { + const [settings, setSettings] = useState({ + darkMode: true, + autoLockTimeout: 15, + confirmCryptoOperations: true, + showScriptNotifications: true + }); + + const [clearDataDialogOpen, setClearDataDialogOpen] = useState(false); + const [confirmText, setConfirmText] = useState(''); + const [snackbarOpen, setSnackbarOpen] = useState(false); + const [snackbarMessage, setSnackbarMessage] = useState(''); + + // Load settings from storage + useEffect(() => { + const loadSettings = async () => { + try { + const data = await chrome.storage.local.get('settings'); + if (data.settings) { + setSettings(data.settings); + } + } catch (err) { + console.error('Failed to load settings:', err); + } + }; + + loadSettings(); + }, []); + + // Save settings when changed + const handleSettingChange = (key: keyof Settings, value: boolean | number) => { + const updatedSettings = { ...settings, [key]: value }; + setSettings(updatedSettings); + + // Save to storage + chrome.storage.local.set({ settings: updatedSettings }) + .then(() => { + setSnackbarMessage('Settings saved'); + setSnackbarOpen(true); + }) + .catch(err => { + console.error('Failed to save settings:', err); + setSnackbarMessage('Failed to save settings'); + setSnackbarOpen(true); + }); + }; + + const handleClearAllData = () => { + if (confirmText !== 'CLEAR ALL DATA') { + setSnackbarMessage('Please type the confirmation text exactly'); + setSnackbarOpen(true); + return; + } + + // Clear all extension data + chrome.storage.local.clear() + .then(() => { + setSnackbarMessage('All data cleared successfully'); + setSnackbarOpen(true); + setClearDataDialogOpen(false); + setConfirmText(''); + + // Reset settings to defaults + setSettings({ + darkMode: true, + autoLockTimeout: 15, + confirmCryptoOperations: true, + showScriptNotifications: true + }); + }) + .catch(err => { + console.error('Failed to clear data:', err); + setSnackbarMessage('Failed to clear data'); + setSnackbarOpen(true); + }); + }; + + return ( + + + Settings + + + + + + + handleSettingChange('darkMode', e.target.checked)} + /> + + + + + + + + { + const value = parseInt(e.target.value); + if (!isNaN(value) && value >= 1) { + handleSettingChange('autoLockTimeout', value); + } + }} + InputProps={{ inputProps: { min: 1, max: 60 } }} + /> + + + + + + + + handleSettingChange('confirmCryptoOperations', e.target.checked)} + /> + + + + + + + handleSettingChange('showScriptNotifications', e.target.checked)} + /> + + + + + + } + sx={{ mb: 2 }} + > + + The extension stores all cryptographic keys in encrypted form. Your password is never stored and is only kept in memory while the session is unlocked. + + + + + + + {/* Clear Data Confirmation Dialog */} + setClearDataDialogOpen(false)}> + Clear All Extension Data + + + This will permanently delete all your keyspaces, keypairs, and settings. This action cannot be undone. + + + Type "CLEAR ALL DATA" to confirm: + + setConfirmText(e.target.value)} + fullWidth + variant="outlined" + placeholder="CLEAR ALL DATA" + /> + + + + + + + + {/* Snackbar for notifications */} + setSnackbarOpen(false)} + message={snackbarMessage} + /> + + ); +}; + +export default SettingsPage; diff --git a/hero_vault_extension/src/pages/WebSocketPage.tsx b/hero_vault_extension/src/pages/WebSocketPage.tsx new file mode 100644 index 0000000..6fff55a --- /dev/null +++ b/hero_vault_extension/src/pages/WebSocketPage.tsx @@ -0,0 +1,248 @@ +import { useState, useEffect } from 'react'; +import { + Box, + Typography, + Button, + TextField, + Paper, + Alert, + CircularProgress, + List, + ListItem, + ListItemText, + Divider, + Chip +} from '@mui/material'; +import { useNavigate } from 'react-router-dom'; +import { useSessionStore } from '../store/sessionStore'; + +interface ConnectionHistory { + id: string; + url: string; + timestamp: number; + status: 'connected' | 'disconnected'; +} + +const WebSocketPage = () => { + const navigate = useNavigate(); + const { + isSessionUnlocked, + currentKeypair, + isWebSocketConnected, + webSocketUrl, + connectWebSocket, + disconnectWebSocket + } = useSessionStore(); + + const [serverUrl, setServerUrl] = useState(''); + const [isConnecting, setIsConnecting] = useState(false); + const [error, setError] = useState(null); + const [connectionHistory, setConnectionHistory] = useState([]); + + // Redirect if not unlocked + useEffect(() => { + if (!isSessionUnlocked) { + navigate('/'); + } + }, [isSessionUnlocked, navigate]); + + // Load connection history from storage + useEffect(() => { + const loadConnectionHistory = async () => { + try { + const data = await chrome.storage.local.get('connectionHistory'); + if (data.connectionHistory) { + setConnectionHistory(data.connectionHistory); + } + } catch (err) { + console.error('Failed to load connection history:', err); + } + }; + + if (isSessionUnlocked) { + loadConnectionHistory(); + } + }, [isSessionUnlocked]); + + const handleConnect = async () => { + if (!serverUrl.trim() || !currentKeypair) return; + + setIsConnecting(true); + setError(null); + + try { + const success = await connectWebSocket(serverUrl); + + if (success) { + // Add to connection history + const newConnection: ConnectionHistory = { + id: `conn-${Date.now()}`, + url: serverUrl, + timestamp: Date.now(), + status: 'connected' + }; + + const updatedHistory = [newConnection, ...connectionHistory].slice(0, 10); // Keep last 10 + setConnectionHistory(updatedHistory); + + // Save to storage + await chrome.storage.local.set({ connectionHistory: updatedHistory }); + } else { + throw new Error('Failed to connect to WebSocket server'); + } + } catch (err) { + setError((err as Error).message || 'Failed to connect to WebSocket server'); + } finally { + setIsConnecting(false); + } + }; + + const handleDisconnect = async () => { + try { + const success = await disconnectWebSocket(); + + if (success && webSocketUrl) { + // Update connection history + const updatedHistory = connectionHistory.map(conn => + conn.url === webSocketUrl && conn.status === 'connected' + ? { ...conn, status: 'disconnected' } + : conn + ); + + setConnectionHistory(updatedHistory); + + // Save to storage + await chrome.storage.local.set({ connectionHistory: updatedHistory }); + } + } catch (err) { + setError((err as Error).message || 'Failed to disconnect from WebSocket server'); + } + }; + + const handleQuickConnect = (url: string) => { + setServerUrl(url); + // Don't auto-connect to avoid unexpected connections + }; + + if (!isSessionUnlocked) { + return null; // Will redirect via useEffect + } + + return ( + + + WebSocket Connection + + + {!currentKeypair && ( + + No keypair selected. Select a keypair before connecting to a WebSocket server. + + )} + + {error && ( + + {error} + + )} + + + + + Connection Status: + + + {isWebSocketConnected && webSocketUrl && ( + + Connected to: {webSocketUrl} + + )} + + + + setServerUrl(e.target.value)} + fullWidth + disabled={isConnecting || isWebSocketConnected || !currentKeypair} + /> + + {isWebSocketConnected ? ( + + ) : ( + + )} + + + + + Connection History + + + {connectionHistory.length === 0 ? ( + + + No connection history yet. + + + ) : ( + + + {connectionHistory.map((conn, index) => ( + + {index > 0 && } + handleQuickConnect(conn.url)} + disabled={isWebSocketConnected} + > + + + {conn.url} + + + + } + secondary={ + + {new Date(conn.timestamp).toLocaleString()} + + } + /> + + + ))} + + + )} + + ); +}; + +export default WebSocketPage; diff --git a/hero_vault_extension/src/store/cryptoStore.ts b/hero_vault_extension/src/store/cryptoStore.ts new file mode 100644 index 0000000..dbe1272 --- /dev/null +++ b/hero_vault_extension/src/store/cryptoStore.ts @@ -0,0 +1,144 @@ +/** + * Crypto Store for Hero Vault Extension + * + * This store manages cryptographic operations such as: + * - Encryption/decryption using the keyspace's symmetric cipher + * - Signing/verification using the selected keypair + */ + +import { create } from 'zustand'; +import { getWasmModule, stringToUint8Array, uint8ArrayToString } from '../wasm/wasmHelper'; + +// Helper functions for Unicode-safe base64 encoding/decoding +function base64Encode(data: Uint8Array): string { + // Convert binary data to a string that only uses the low 8 bits of each character + const binaryString = Array.from(data) + .map(byte => String.fromCharCode(byte)) + .join(''); + + // Use btoa on the binary string + return btoa(binaryString); +} + +function base64Decode(base64: string): Uint8Array { + // Decode base64 to binary string + const binaryString = atob(base64); + + // Convert binary string to Uint8Array + const bytes = new Uint8Array(binaryString.length); + for (let i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + + return bytes; +} + +interface CryptoState { + // State + isEncrypting: boolean; + isDecrypting: boolean; + isSigning: boolean; + isVerifying: boolean; + error: string | null; + + // Actions + encryptData: (data: string) => Promise; + decryptData: (encrypted: string) => Promise; + signMessage: (message: string) => Promise; + verifySignature: (message: string, signature: string) => Promise; + clearError: () => void; +} + +export const useCryptoStore = create()((set, get) => ({ + isEncrypting: false, + isDecrypting: false, + isSigning: false, + isVerifying: false, + error: null, + + encryptData: async (data: string) => { + try { + set({ isEncrypting: true, error: null }); + const wasmModule = await getWasmModule(); + + // Convert input to Uint8Array + const dataBytes = stringToUint8Array(data); + + // Encrypt the data + const encrypted = await wasmModule.encrypt_data(dataBytes); + + // Convert result to base64 for storage/display using our Unicode-safe function + const encryptedBase64 = base64Encode(encrypted); + + return encryptedBase64; + } catch (error) { + set({ error: (error as Error).message || 'Failed to encrypt data' }); + throw error; + } finally { + set({ isEncrypting: false }); + } + }, + + decryptData: async (encrypted: string) => { + try { + set({ isDecrypting: true, error: null }); + const wasmModule = await getWasmModule(); + + // Convert input from base64 using our Unicode-safe function + const encryptedBytes = base64Decode(encrypted); + + // Decrypt the data + const decrypted = await wasmModule.decrypt_data(encryptedBytes); + + // Convert result to string + return uint8ArrayToString(decrypted); + } catch (error) { + set({ error: (error as Error).message || 'Failed to decrypt data' }); + throw error; + } finally { + set({ isDecrypting: false }); + } + }, + + signMessage: async (message: string) => { + try { + set({ isSigning: true, error: null }); + const wasmModule = await getWasmModule(); + + // Convert message to Uint8Array + const messageBytes = stringToUint8Array(message); + + // Sign the message + const signature = await wasmModule.sign(messageBytes); + + return signature; + } catch (error) { + set({ error: (error as Error).message || 'Failed to sign message' }); + throw error; + } finally { + set({ isSigning: false }); + } + }, + + verifySignature: async (message: string, signature: string) => { + try { + set({ isVerifying: true, error: null }); + const wasmModule = await getWasmModule(); + + // Convert inputs + const messageBytes = stringToUint8Array(message); + + // Verify the signature + const isValid = await wasmModule.verify(messageBytes, signature); + + return isValid; + } catch (error) { + set({ error: (error as Error).message || 'Failed to verify signature' }); + throw error; + } finally { + set({ isVerifying: false }); + } + }, + + clearError: () => set({ error: null }) +})); diff --git a/hero_vault_extension/src/store/sessionStore.ts b/hero_vault_extension/src/store/sessionStore.ts new file mode 100644 index 0000000..a3b411c --- /dev/null +++ b/hero_vault_extension/src/store/sessionStore.ts @@ -0,0 +1,416 @@ +import { create } from 'zustand'; +import { getWasmModule, stringToUint8Array } from '../wasm/wasmHelper'; +import { getChromeApi } from '../utils/chromeApi'; + +// Import Chrome types +/// + +interface KeypairMetadata { + id: string; + type: string; + name?: string; + description?: string; + createdAt: number; +} + +interface SessionState { + isSessionUnlocked: boolean; + currentKeyspace: string | null; + currentKeypair: KeypairMetadata | null; + availableKeypairs: KeypairMetadata[]; + isWebSocketConnected: boolean; + webSocketUrl: string | null; + isWasmLoaded: boolean; + + // Actions + initWasm: () => Promise; + checkSessionStatus: () => Promise; + unlockSession: (keyspace: string, password: string) => Promise; + lockSession: () => Promise; + createKeyspace: (keyspace: string, password: string) => Promise; + listKeypairs: () => Promise; + selectKeypair: (keypairId: string) => Promise; + createKeypair: (type: string, metadata?: Record) => Promise; + connectWebSocket: (url: string) => Promise; + disconnectWebSocket: () => Promise; + executeScript: (script: string) => Promise; + signMessage: (message: string) => Promise; +} + +// Create the store +export const useSessionStore = create((set: any, get: any) => ({ + isSessionUnlocked: false, + currentKeyspace: null, + currentKeypair: null, + availableKeypairs: [], + isWebSocketConnected: false, + webSocketUrl: null, + isWasmLoaded: false, + + // Initialize WASM module + initWasm: async () => { + try { + set({ isWasmLoaded: true }); + return true; + } catch (error) { + console.error('Failed to initialize WASM module:', error); + return false; + } + }, + + // Check if a session is currently active + checkSessionStatus: async () => { + try { + // First check with the background service worker + const chromeApi = getChromeApi(); + const response = await chromeApi.runtime.sendMessage({ type: 'SESSION_STATUS' }); + + if (response && response.active) { + // If session is active in the background, check with WASM + try { + const wasmModule = await getWasmModule(); + const isUnlocked = wasmModule.is_unlocked(); + + if (isUnlocked) { + // Get current keypair metadata if available + try { + const keypairMetadata = await wasmModule.current_keypair_metadata(); + const parsedMetadata = JSON.parse(keypairMetadata); + + set({ + isSessionUnlocked: true, + currentKeypair: parsedMetadata + }); + + // Load keypairs + await get().listKeypairs(); + } catch (e) { + // No keypair selected, but session is unlocked + set({ isSessionUnlocked: true }); + } + return true; + } + } catch (wasmError) { + console.error('WASM error checking session status:', wasmError); + } + } + + set({ isSessionUnlocked: false }); + return false; + } catch (error) { + console.error('Failed to check session status:', error); + set({ isSessionUnlocked: false }); + return false; + } + }, + + // Unlock a session with keyspace and password + unlockSession: async (keyspace: string, password: string) => { + try { + const wasmModule = await getWasmModule(); + + // Call the WASM init_session function + await wasmModule.init_session(keyspace, password); + + // Initialize Rhai environment + wasmModule.init_rhai_env(); + + // Notify background service worker + const chromeApi = getChromeApi(); + await chromeApi.runtime.sendMessage({ type: 'SESSION_UNLOCK' }); + + set({ + isSessionUnlocked: true, + currentKeyspace: keyspace, + currentKeypair: null + }); + + // Load keypairs after unlocking + const keypairs = await get().listKeypairs(); + set({ availableKeypairs: keypairs }); + + return true; + } catch (error) { + console.error('Failed to unlock session:', error); + return false; + } + }, + + // Lock the current session + lockSession: async () => { + try { + const wasmModule = await getWasmModule(); + + // Call the WASM lock_session function + wasmModule.lock_session(); + + // Notify background service worker + const chromeApi = getChromeApi(); + await chromeApi.runtime.sendMessage({ type: 'SESSION_LOCK' }); + + set({ + isSessionUnlocked: false, + currentKeyspace: null, + currentKeypair: null, + availableKeypairs: [], + isWebSocketConnected: false, + webSocketUrl: null + }); + + return true; + } catch (error) { + console.error('Failed to lock session:', error); + return false; + } + }, + + // Create a new keyspace + createKeyspace: async (keyspace: string, password: string) => { + try { + const wasmModule = await getWasmModule(); + + // Call the WASM create_keyspace function + await wasmModule.create_keyspace(keyspace, password); + + // Initialize Rhai environment + wasmModule.init_rhai_env(); + + // Notify background service worker + const chromeApi = getChromeApi(); + await chromeApi.runtime.sendMessage({ type: 'SESSION_UNLOCK' }); + + set({ + isSessionUnlocked: true, + currentKeyspace: keyspace, + currentKeypair: null, + availableKeypairs: [] + }); + + return true; + } catch (error) { + console.error('Failed to create keyspace:', error); + return false; + } + }, + + // List all keypairs in the current keyspace + listKeypairs: async () => { + try { + console.log('Listing keypairs from WASM module'); + const wasmModule = await getWasmModule(); + console.log('WASM module loaded, calling list_keypairs'); + + // Call the WASM list_keypairs function + let keypairsJson; + try { + keypairsJson = await wasmModule.list_keypairs(); + console.log('Raw keypairs JSON from WASM:', keypairsJson); + } catch (listError) { + console.error('Error calling list_keypairs:', listError); + throw new Error(`Failed to list keypairs: ${listError.message || listError}`); + } + + let keypairs; + try { + keypairs = JSON.parse(keypairsJson); + console.log('Parsed keypairs object:', keypairs); + } catch (parseError) { + console.error('Error parsing keypairs JSON:', parseError); + throw new Error(`Failed to parse keypairs JSON: ${parseError.message}`); + } + + // Transform the keypairs to our expected format + const formattedKeypairs: KeypairMetadata[] = keypairs.map((keypair: any, index: number) => { + console.log(`Processing keypair at index ${index}:`, keypair); + return { + id: keypair.id, // Use the actual keypair ID from the WASM module + type: keypair.key_type || 'Unknown', + name: keypair.metadata?.name, + description: keypair.metadata?.description, + createdAt: keypair.metadata?.created_at || Date.now() + }; + }); + + console.log('Formatted keypairs for UI:', formattedKeypairs); + set({ availableKeypairs: formattedKeypairs }); + return formattedKeypairs; + } catch (error) { + console.error('Failed to list keypairs:', error); + return []; + } + }, + + // Select a keypair for use + selectKeypair: async (keypairId: string) => { + try { + console.log('Selecting keypair with ID:', keypairId); + + // First, let's log the available keypairs to see what we have + const { availableKeypairs } = get(); + console.log('Available keypairs:', JSON.stringify(availableKeypairs)); + + const wasmModule = await getWasmModule(); + console.log('WASM module loaded, attempting to select keypair'); + + try { + // Call the WASM select_keypair function + await wasmModule.select_keypair(keypairId); + console.log('Successfully selected keypair in WASM'); + } catch (selectError) { + console.error('Error in WASM select_keypair:', selectError); + throw new Error(`select_keypair error: ${selectError.message || selectError}`); + } + + // Find the keypair in our availableKeypairs list + const selectedKeypair = availableKeypairs.find((kp: KeypairMetadata) => kp.id === keypairId); + + if (selectedKeypair) { + console.log('Found keypair in available list, setting as current'); + set({ currentKeypair: selectedKeypair }); + } else { + console.log('Keypair not found in available list, creating new entry from available data'); + // If not found in our list (rare case), create a new entry with what we know + // Since we can't get metadata from WASM, use what we have from the keypair list + const matchingKeypair = availableKeypairs.find(k => k.id === keypairId); + + if (matchingKeypair) { + set({ currentKeypair: matchingKeypair }); + } else { + // Last resort: create a minimal keypair entry + const newKeypair: KeypairMetadata = { + id: keypairId, + type: 'Unknown', + name: `Keypair ${keypairId.substring(0, 8)}...`, + createdAt: Date.now() + }; + + set({ currentKeypair: newKeypair }); + } + } + + return true; + } catch (error) { + console.error('Failed to select keypair:', error); + throw error; // Re-throw to show error in UI + } + }, + + // Create a new keypair + createKeypair: async (type: string, metadata?: Record) => { + try { + const wasmModule = await getWasmModule(); + + // Format metadata for WASM + const metadataJson = metadata ? JSON.stringify({ + name: metadata.name, + description: metadata.description, + created_at: Date.now() + }) : undefined; + + // Call the WASM add_keypair function + const keypairId = await wasmModule.add_keypair(type, metadataJson); + + // Refresh the keypair list + await get().listKeypairs(); + + return keypairId; + } catch (error) { + console.error('Failed to create keypair:', error); + throw error; + } + }, + + // Connect to a WebSocket server + connectWebSocket: async (url: string) => { + try { + const wasmModule = await getWasmModule(); + const { currentKeypair } = get(); + + if (!currentKeypair) { + throw new Error('No keypair selected'); + } + + // Get the public key from WASM + const publicKeyArray = await wasmModule.current_keypair_public_key(); + const publicKeyHex = Array.from(publicKeyArray) + .map(b => b.toString(16).padStart(2, '0')) + .join(''); + + // Connect to WebSocket via background service worker + const chromeApi = getChromeApi(); + const response = await chromeApi.runtime.sendMessage({ + type: 'CONNECT_WEBSOCKET', + serverUrl: url, + publicKey: publicKeyHex + }); + + if (response && response.success) { + set({ + isWebSocketConnected: true, + webSocketUrl: url + }); + return true; + } else { + throw new Error(response?.error || 'Failed to connect to WebSocket server'); + } + } catch (error) { + console.error('Failed to connect to WebSocket:', error); + return false; + } + }, + + // Disconnect from WebSocket server + disconnectWebSocket: async () => { + try { + // Disconnect via background service worker + const chromeApi = getChromeApi(); + const response = await chromeApi.runtime.sendMessage({ + type: 'DISCONNECT_WEBSOCKET' + }); + + if (response && response.success) { + set({ + isWebSocketConnected: false, + webSocketUrl: null + }); + return true; + } else { + throw new Error(response?.error || 'Failed to disconnect from WebSocket server'); + } + } catch (error) { + console.error('Failed to disconnect from WebSocket:', error); + return false; + } + }, + + // Execute a Rhai script + executeScript: async (script: string) => { + try { + const wasmModule = await getWasmModule(); + + // Call the WASM run_rhai function + const result = await wasmModule.run_rhai(script); + return result; + } catch (error) { + console.error('Failed to execute script:', error); + throw error; + } + }, + + // Sign a message with the current keypair + signMessage: async (message: string) => { + try { + const wasmModule = await getWasmModule(); + + // Convert message to Uint8Array + const messageBytes = stringToUint8Array(message); + + // Call the WASM sign function + const signature = await wasmModule.sign(messageBytes); + return signature; + } catch (error) { + console.error('Failed to sign message:', error); + throw error; + } + } +})); diff --git a/hero_vault_extension/src/types.ts b/hero_vault_extension/src/types.ts new file mode 100644 index 0000000..a4fe2ae --- /dev/null +++ b/hero_vault_extension/src/types.ts @@ -0,0 +1,45 @@ +/** + * Common TypeScript types for the Hero Vault Extension + */ + +// React types +export type SyntheticEvent = React.BaseSyntheticEvent; + +// Session types +export interface SessionActivity { + timestamp: number; + action: string; + details?: string; +} + +// Script types +export interface ScriptResult { + id: string; + script: string; + result: string; + timestamp: number; + success: boolean; +} + +export interface PendingScript { + id: string; + name: string; + script: string; +} + +// WebSocket types +export interface ConnectionHistory { + id: string; + url: string; + timestamp: number; + status: 'connected' | 'disconnected' | 'error'; + message?: string; +} + +// Settings types +export interface Settings { + darkMode: boolean; + autoLockTimeout: number; + defaultKeyType: string; + showScriptNotifications: boolean; +} diff --git a/hero_vault_extension/src/types/chrome.d.ts b/hero_vault_extension/src/types/chrome.d.ts new file mode 100644 index 0000000..f7519ba --- /dev/null +++ b/hero_vault_extension/src/types/chrome.d.ts @@ -0,0 +1,5 @@ +/// + +// This file provides type declarations for Chrome extension APIs +// It's needed because we're using the Chrome extension API in a TypeScript project +// The actual implementation is provided by the browser at runtime diff --git a/hero_vault_extension/src/types/declarations.d.ts b/hero_vault_extension/src/types/declarations.d.ts new file mode 100644 index 0000000..7a5a2e2 --- /dev/null +++ b/hero_vault_extension/src/types/declarations.d.ts @@ -0,0 +1,14 @@ +// Type declarations for modules without type definitions + +// React and Material UI +declare module 'react'; +declare module 'react-dom'; +declare module 'react-router-dom'; +declare module '@mui/material'; +declare module '@mui/material/*'; +declare module '@mui/icons-material/*'; + +// Project modules +declare module './pages/*'; +declare module './components/*'; +declare module './store/*'; diff --git a/hero_vault_extension/src/types/wasm.d.ts b/hero_vault_extension/src/types/wasm.d.ts new file mode 100644 index 0000000..c188405 --- /dev/null +++ b/hero_vault_extension/src/types/wasm.d.ts @@ -0,0 +1,16 @@ +declare module '*/wasm_app.js' { + export default function init(): Promise; + export function init_session(keyspace: string, password: string): Promise; + export function create_keyspace(keyspace: string, password: string): Promise; + export function lock_session(): void; + export function is_unlocked(): boolean; + export function add_keypair(key_type: string | undefined, metadata: string | undefined): Promise; + export function list_keypairs(): Promise; + export function select_keypair(key_id: string): Promise; + export function current_keypair_metadata(): Promise; + export function current_keypair_public_key(): Promise; + export function sign(message: Uint8Array): Promise; + export function verify(signature: string, message: Uint8Array): Promise; + export function init_rhai_env(): void; + export function run_rhai(script: string): Promise; +} diff --git a/hero_vault_extension/src/utils/chromeApi.ts b/hero_vault_extension/src/utils/chromeApi.ts new file mode 100644 index 0000000..91c3dbf --- /dev/null +++ b/hero_vault_extension/src/utils/chromeApi.ts @@ -0,0 +1,103 @@ +/** + * Chrome API utilities for Hero Vault Extension + * + * This module provides Chrome API detection and mocks for development mode + */ + +// Check if we're running in a Chrome extension environment +export const isExtensionEnvironment = (): boolean => { + return typeof chrome !== 'undefined' && !!chrome.runtime && !!chrome.runtime.id; +}; + +// Mock storage for development mode +const mockStorage: Record = { + // Initialize with some default values for script storage + pendingScripts: [], + scriptResults: [] +}; + +// Mock Chrome API for development mode +export const getChromeApi = () => { + // If we're in a Chrome extension environment, return the real Chrome API + if (isExtensionEnvironment()) { + return chrome; + } + + // Otherwise, return a mock implementation + return { + runtime: { + sendMessage: (message: any): Promise => { + console.log('Mock sendMessage called with:', message); + + // Mock responses based on message type + if (message.type === 'SESSION_STATUS') { + return Promise.resolve({ active: false }); + } + + if (message.type === 'CREATE_KEYSPACE') { + mockStorage['currentKeyspace'] = message.keyspace; + return Promise.resolve({ success: true }); + } + + if (message.type === 'UNLOCK_SESSION') { + mockStorage['currentKeyspace'] = message.keyspace; + return Promise.resolve({ success: true }); + } + + if (message.type === 'LOCK_SESSION') { + delete mockStorage['currentKeyspace']; + return Promise.resolve({ success: true }); + } + + return Promise.resolve({ success: false }); + }, + getURL: (path: string): string => { + return path; + } + }, + storage: { + local: { + get: (keys: string | string[] | object): Promise> => { + console.log('Mock storage.local.get called with:', keys); + + if (typeof keys === 'string') { + // Handle specific script storage keys + if (keys === 'pendingScripts' && !mockStorage[keys]) { + mockStorage[keys] = []; + } + if (keys === 'scriptResults' && !mockStorage[keys]) { + mockStorage[keys] = []; + } + return Promise.resolve({ [keys]: mockStorage[keys] }); + } + + if (Array.isArray(keys)) { + const result: Record = {}; + keys.forEach(key => { + // Handle specific script storage keys + if (key === 'pendingScripts' && !mockStorage[key]) { + mockStorage[key] = []; + } + if (key === 'scriptResults' && !mockStorage[key]) { + mockStorage[key] = []; + } + result[key] = mockStorage[key]; + }); + return Promise.resolve(result); + } + + return Promise.resolve(mockStorage); + }, + set: (items: Record): Promise => { + console.log('Mock storage.local.set called with:', items); + + Object.keys(items).forEach(key => { + mockStorage[key] = items[key]; + }); + + return Promise.resolve(); + } + } + } + } as typeof chrome; +}; diff --git a/hero_vault_extension/src/wasm/wasmHelper.ts b/hero_vault_extension/src/wasm/wasmHelper.ts new file mode 100644 index 0000000..3a51213 --- /dev/null +++ b/hero_vault_extension/src/wasm/wasmHelper.ts @@ -0,0 +1,139 @@ +/** + * WASM Helper for Hero Vault Extension + * + * This module handles loading and initializing the WASM module, + * and provides a typed interface to the WASM functions. + */ + +// Import types for TypeScript +interface WasmModule { + // Session management + init_session: (keyspace: string, password: string) => Promise; + create_keyspace: (keyspace: string, password: string) => Promise; + lock_session: () => void; + is_unlocked: () => boolean; + + // Keypair management + add_keypair: (key_type: string | undefined, metadata: string | undefined) => Promise; + list_keypairs: () => Promise; + select_keypair: (key_id: string) => Promise; + current_keypair_metadata: () => Promise; + current_keypair_public_key: () => Promise; + + // Cryptographic operations + sign: (message: Uint8Array) => Promise; + verify: (message: Uint8Array, signature: string) => Promise; + encrypt_data: (data: Uint8Array) => Promise; + decrypt_data: (encrypted: Uint8Array) => Promise; + + // Rhai scripting + init_rhai_env: () => void; + run_rhai: (script: string) => Promise; +} + +// Global reference to the WASM module +let wasmModule: WasmModule | null = null; +let isInitializing = false; +let initPromise: Promise | null = null; + +/** + * Initialize the WASM module + * This should be called before any other WASM functions + */ +export const initWasm = async (): Promise => { + if (wasmModule) { + return Promise.resolve(); // Already initialized + } + + if (isInitializing && initPromise) { + return initPromise; // Already initializing + } + + isInitializing = true; + + initPromise = new Promise(async (resolve, reject) => { + try { + try { + // Import the WASM module + // Use a relative path that will be resolved by Vite during build + const wasmImport = await import('../../public/wasm/wasm_app.js'); + + // Initialize the WASM module + await wasmImport.default(); + + // Store the WASM module globally + wasmModule = wasmImport as unknown as WasmModule; + + console.log('WASM module initialized successfully'); + resolve(); + } catch (error) { + console.error('Failed to initialize WASM module:', error); + reject(error); + } + + } finally { + isInitializing = false; + } + }); + + return initPromise; +}; + +/** + * Get the WASM module + * This will initialize the module if it hasn't been initialized yet + */ +export const getWasmModule = async (): Promise => { + if (!wasmModule) { + await initWasm(); + } + + if (!wasmModule) { + throw new Error('WASM module failed to initialize'); + } + + return wasmModule; +}; + +/** + * Check if the WASM module is initialized + */ +export const isWasmInitialized = (): boolean => { + return wasmModule !== null; +}; + +/** + * Helper to convert string to Uint8Array + */ +export const stringToUint8Array = (str: string): Uint8Array => { + const encoder = new TextEncoder(); + return encoder.encode(str); +}; + +/** + * Helper to convert Uint8Array to string + */ +export const uint8ArrayToString = (array: Uint8Array): string => { + const decoder = new TextDecoder(); + return decoder.decode(array); +}; + +/** + * Helper to convert hex string to Uint8Array + */ +export const hexToUint8Array = (hex: string): Uint8Array => { + const bytes = new Uint8Array(hex.length / 2); + for (let i = 0; i < hex.length; i += 2) { + bytes[i / 2] = parseInt(hex.substring(i, i + 2), 16); + } + return bytes; +}; + +/** + * Helper to convert Uint8Array to hex string + */ +export const uint8ArrayToHex = (array: Uint8Array): string => { + return Array.from(array) + .map(b => b.toString(16).padStart(2, '0')) + .join(''); +}; diff --git a/hero_vault_extension/tsconfig.json b/hero_vault_extension/tsconfig.json new file mode 100644 index 0000000..c050dc9 --- /dev/null +++ b/hero_vault_extension/tsconfig.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "strict": false, + "noImplicitAny": false, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noFallthroughCasesInSwitch": true, + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + }, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "typeRoots": ["./node_modules/@types", "./src/types"], + "jsxImportSource": "react" + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/hero_vault_extension/tsconfig.node.json b/hero_vault_extension/tsconfig.node.json new file mode 100644 index 0000000..42872c5 --- /dev/null +++ b/hero_vault_extension/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/hero_vault_extension/vite.config.ts b/hero_vault_extension/vite.config.ts new file mode 100644 index 0000000..f74a8f9 --- /dev/null +++ b/hero_vault_extension/vite.config.ts @@ -0,0 +1,33 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import { crx } from '@crxjs/vite-plugin'; +import { resolve } from 'path'; +import { readFileSync } from 'fs'; +import fs from 'fs'; + +const manifest = JSON.parse( + readFileSync('public/manifest.json', 'utf-8') +); + +export default defineConfig({ + plugins: [ + react(), + crx({ manifest }), + ], + resolve: { + alias: { + '@': resolve(__dirname, 'src'), + }, + }, + build: { + outDir: 'dist', + emptyOutDir: true, + rollupOptions: { + input: { + index: resolve(__dirname, 'index.html'), + }, + }, + }, + // Copy WASM files to the dist directory + publicDir: 'public', +}); diff --git a/vault/src/lib.rs b/vault/src/lib.rs index 4e1914c..5b0c46f 100644 --- a/vault/src/lib.rs +++ b/vault/src/lib.rs @@ -1,34 +1,32 @@ //! vault: Cryptographic keyspace and operations - //! vault: Cryptographic keyspace and operations pub mod data; +pub use crate::data::{KeyEntry, KeyMetadata, KeyType}; pub use crate::session::SessionManager; -pub use crate::data::{KeyType, KeyMetadata, KeyEntry}; -mod error; mod crypto; +mod error; +pub mod rhai_bindings; +mod rhai_sync_helpers; pub mod session; mod utils; -mod rhai_sync_helpers; -pub mod rhai_bindings; #[cfg(target_arch = "wasm32")] pub mod session_singleton; #[cfg(target_arch = "wasm32")] pub mod wasm_helpers; - -pub use kvstore::traits::KVStore; +use crate::crypto::kdf; +use crate::crypto::random_salt; use data::*; use error::VaultError; -use crate::crypto::random_salt; -use crate::crypto::kdf; +pub use kvstore::traits::KVStore; -use crate::crypto::cipher::{encrypt_chacha20, decrypt_chacha20}; +use crate::crypto::cipher::{decrypt_chacha20, encrypt_chacha20}; use signature::SignatureEncoding; // TEMP: File-based debug logger for crypto troubleshooting -use log::{debug}; +use log::debug; /// Vault: Cryptographic keyspace and operations pub struct Vault { @@ -43,8 +41,7 @@ fn encrypt_with_nonce_prepended(key: &[u8], plaintext: &[u8]) -> Result, let nonce = random_salt(12); debug!("nonce: {}", hex::encode(&nonce)); // Always use ChaCha20Poly1305 for encryption - let ct = encrypt_chacha20(key, plaintext, &nonce) - .map_err(|e| VaultError::Crypto(e))?; + let ct = encrypt_chacha20(key, plaintext, &nonce).map_err(|e| VaultError::Crypto(e))?; debug!("ct: {}", hex::encode(&ct)); debug!("key: {}", hex::encode(key)); let mut blob = nonce.clone(); @@ -60,17 +57,28 @@ impl Vault { /// Create a new keyspace with the given name, password, and options. /// Create a new keyspace with the given name and password. Always uses PBKDF2 and ChaCha20Poly1305. -pub async fn create_keyspace(&mut self, name: &str, password: &[u8], tags: Option>) -> Result<(), VaultError> { + pub async fn create_keyspace( + &mut self, + name: &str, + password: &[u8], + tags: Option>, + ) -> Result<(), VaultError> { // Check if keyspace already exists - if self.storage.get(name).await.map_err(|e| VaultError::Storage(format!("{e:?}")))?.is_some() { + if self + .storage + .get(name) + .await + .map_err(|e| VaultError::Storage(format!("{e:?}")))? + .is_some() + { debug!("keyspace '{}' already exists", name); return Err(VaultError::Crypto("Keyspace already exists".to_string())); } debug!("entry: name={}", name); - use crate::crypto::{random_salt, kdf}; - use crate::data::{KeyspaceMetadata, KeyspaceData}; + use crate::crypto::{kdf, random_salt}; + use crate::data::{KeyspaceData, KeyspaceMetadata}; use serde_json; - + // 1. Generate salt let salt = random_salt(16); debug!("salt: {:?}", salt); @@ -112,7 +120,10 @@ pub async fn create_keyspace(&mut self, name: &str, password: &[u8], tags: Optio return Err(VaultError::Serialization(e.to_string())); } }; - self.storage.set(name, &meta_bytes).await.map_err(|e| VaultError::Storage(format!("{e:?}")))?; + self.storage + .set(name, &meta_bytes) + .await + .map_err(|e| VaultError::Storage(format!("{e:?}")))?; debug!("success"); Ok(()) } @@ -121,10 +132,19 @@ pub async fn create_keyspace(&mut self, name: &str, password: &[u8], tags: Optio pub async fn list_keyspaces(&self) -> Result, VaultError> { use serde_json; // 1. List all keys in kvstore - let keys = self.storage.keys().await.map_err(|e| VaultError::Storage(format!("{e:?}")))?; + let keys = self + .storage + .keys() + .await + .map_err(|e| VaultError::Storage(format!("{e:?}")))?; let mut keyspaces = Vec::new(); for key in keys { - if let Some(bytes) = self.storage.get(&key).await.map_err(|e| VaultError::Storage(format!("{e:?}")))? { + if let Some(bytes) = self + .storage + .get(&key) + .await + .map_err(|e| VaultError::Storage(format!("{e:?}")))? + { if let Ok(meta) = serde_json::from_slice::(&bytes) { keyspaces.push(meta); } @@ -136,31 +156,42 @@ pub async fn create_keyspace(&mut self, name: &str, password: &[u8], tags: Optio /// Unlock a keyspace by name and password, returning the decrypted data /// Unlock a keyspace by name and password, returning the decrypted data /// Always uses PBKDF2 and ChaCha20Poly1305. - pub async fn unlock_keyspace(&self, name: &str, password: &[u8]) -> Result { + pub async fn unlock_keyspace( + &self, + name: &str, + password: &[u8], + ) -> Result { debug!("unlock_keyspace entry: name={}", name); // use crate::crypto::kdf; // removed if not needed use serde_json; // 1. Fetch keyspace metadata - let meta_bytes = self.storage.get(name).await.map_err(|e| VaultError::Storage(format!("{e:?}")))?; + let meta_bytes = self + .storage + .get(name) + .await + .map_err(|e| VaultError::Storage(format!("{e:?}")))?; let meta_bytes = meta_bytes.ok_or(VaultError::KeyspaceNotFound(name.to_string()))?; - let metadata: KeyspaceMetadata = serde_json::from_slice(&meta_bytes).map_err(|e| VaultError::Serialization(e.to_string()))?; + let metadata: KeyspaceMetadata = serde_json::from_slice(&meta_bytes) + .map_err(|e| VaultError::Serialization(e.to_string()))?; if metadata.salt.len() != 16 { debug!("salt length {} != 16", metadata.salt.len()); - return Err(VaultError::Crypto("Salt length must be 16 bytes".to_string())); + return Err(VaultError::Crypto( + "Salt length must be 16 bytes".to_string(), + )); } // 2. Derive key let key = kdf::derive_key_pbkdf2(password, &metadata.salt, 32, 10_000); debug!("derived key: {} bytes", key.len()); - + let ciphertext = &metadata.encrypted_blob; if ciphertext.len() < 12 { debug!("ciphertext too short: {}", ciphertext.len()); return Err(VaultError::Crypto("Ciphertext too short".to_string())); } - + let (nonce, ct) = ciphertext.split_at(12); -debug!("nonce: {}", hex::encode(nonce)); -let plaintext = decrypt_chacha20(&key, ct, nonce).map_err(VaultError::Crypto)?; + debug!("nonce: {}", hex::encode(nonce)); + let plaintext = decrypt_chacha20(&key, ct, nonce).map_err(VaultError::Crypto)?; debug!("plaintext decrypted: {} bytes", plaintext.len()); // 4. Deserialize keyspace data let keyspace_data: KeyspaceData = match serde_json::from_slice(&plaintext) { @@ -184,8 +215,14 @@ let plaintext = decrypt_chacha20(&key, ct, nonce).map_err(VaultError::Crypto)?; /// Add a new keypair to a keyspace (generates and stores a new keypair) /// Add a new keypair to a keyspace (generates and stores a new keypair) -/// If key_type is None, defaults to Secp256k1. -pub async fn add_keypair(&mut self, keyspace: &str, password: &[u8], key_type: Option, metadata: Option) -> Result { + /// If key_type is None, defaults to Secp256k1. + pub async fn add_keypair( + &mut self, + keyspace: &str, + password: &[u8], + key_type: Option, + metadata: Option, + ) -> Result { use crate::data::KeyEntry; use rand_core::OsRng; use rand_core::RngCore; @@ -194,7 +231,7 @@ pub async fn add_keypair(&mut self, keyspace: &str, password: &[u8], key_type: O let mut data = self.unlock_keyspace(keyspace, password).await?; // 2. Generate keypair let key_type = key_type.unwrap_or(KeyType::Secp256k1); - let (private_key, public_key, id) = match key_type { + let (private_key, public_key, id) = match key_type { KeyType::Ed25519 => { use ed25519_dalek::{SigningKey, VerifyingKey}; let mut bytes = [0u8; 32]; @@ -205,7 +242,7 @@ pub async fn add_keypair(&mut self, keyspace: &str, password: &[u8], key_type: O let pub_bytes = verifying.to_bytes().to_vec(); let id = hex::encode(&pub_bytes); (priv_bytes, pub_bytes, id) - }, + } KeyType::Secp256k1 => { use k256::ecdsa::SigningKey; @@ -215,7 +252,7 @@ pub async fn add_keypair(&mut self, keyspace: &str, password: &[u8], key_type: O let pub_bytes = pk.to_encoded_point(false).as_bytes().to_vec(); let id = hex::encode(&pub_bytes); (priv_bytes, pub_bytes, id) - }, + } }; // 3. Add to keypairs let entry = KeyEntry { @@ -232,190 +269,291 @@ pub async fn add_keypair(&mut self, keyspace: &str, password: &[u8], key_type: O } /// Remove a keypair by id from a keyspace - pub async fn remove_keypair(&mut self, keyspace: &str, password: &[u8], key_id: &str) -> Result<(), VaultError> { + pub async fn remove_keypair( + &mut self, + keyspace: &str, + password: &[u8], + key_id: &str, + ) -> Result<(), VaultError> { let mut data = self.unlock_keyspace(keyspace, password).await?; data.keypairs.retain(|k| k.id != key_id); self.save_keyspace(keyspace, password, &data).await } /// List all keypairs in a keyspace (public info only) - pub async fn list_keypairs(&self, keyspace: &str, password: &[u8]) -> Result, VaultError> { + pub async fn list_keypairs( + &self, + keyspace: &str, + password: &[u8], + ) -> Result, VaultError> { let data = self.unlock_keyspace(keyspace, password).await?; - Ok(data.keypairs.iter().map(|k| (k.id.clone(), k.key_type.clone())).collect()) + Ok(data + .keypairs + .iter() + .map(|k| (k.id.clone(), k.key_type.clone())) + .collect()) } /// Export a keypair's private and public key by id - pub async fn export_keypair(&self, keyspace: &str, password: &[u8], key_id: &str) -> Result<(Vec, Vec), VaultError> { + pub async fn export_keypair( + &self, + keyspace: &str, + password: &[u8], + key_id: &str, + ) -> Result<(Vec, Vec), VaultError> { let data = self.unlock_keyspace(keyspace, password).await?; - let key = data.keypairs.iter().find(|k| k.id == key_id).ok_or(VaultError::KeyNotFound(key_id.to_string()))?; + let key = data + .keypairs + .iter() + .find(|k| k.id == key_id) + .ok_or(VaultError::KeyNotFound(key_id.to_string()))?; Ok((key.private_key.clone(), key.public_key.clone())) } /// Save the updated keyspace data (helper) - async fn save_keyspace(&mut self, keyspace: &str, password: &[u8], data: &KeyspaceData) -> Result<(), VaultError> { + async fn save_keyspace( + &mut self, + keyspace: &str, + password: &[u8], + data: &KeyspaceData, + ) -> Result<(), VaultError> { debug!("save_keyspace entry: keyspace={}", keyspace); use crate::crypto::kdf; use serde_json; - let meta_bytes = self.storage.get(keyspace).await.map_err(|e| VaultError::Storage(format!("{e:?}")))?; - debug!("got meta_bytes: {}", meta_bytes.as_ref().map(|v| v.len()).unwrap_or(0)); - let meta_bytes = meta_bytes.ok_or(VaultError::KeyspaceNotFound(keyspace.to_string()))?; - let mut metadata: KeyspaceMetadata = serde_json::from_slice(&meta_bytes).map_err(|e| VaultError::Serialization(e.to_string()))?; - debug!("metadata: salt={:?}", metadata.salt); - if metadata.salt.len() != 16 { - debug!("salt length {} != 16", metadata.salt.len()); - return Err(VaultError::Crypto("Salt length must be 16 bytes".to_string())); + let meta_bytes = self + .storage + .get(keyspace) + .await + .map_err(|e| VaultError::Storage(format!("{e:?}")))?; + debug!( + "got meta_bytes: {}", + meta_bytes.as_ref().map(|v| v.len()).unwrap_or(0) + ); + let meta_bytes = meta_bytes.ok_or(VaultError::KeyspaceNotFound(keyspace.to_string()))?; + let mut metadata: KeyspaceMetadata = serde_json::from_slice(&meta_bytes) + .map_err(|e| VaultError::Serialization(e.to_string()))?; + debug!("metadata: salt={:?}", metadata.salt); + if metadata.salt.len() != 16 { + debug!("salt length {} != 16", metadata.salt.len()); + return Err(VaultError::Crypto( + "Salt length must be 16 bytes".to_string(), + )); + } + // 2. Derive key + let key = kdf::derive_key_pbkdf2(password, &metadata.salt, 32, 10_000); + debug!("derived key: {} bytes", key.len()); + // 3. Serialize plaintext + let plaintext = match serde_json::to_vec(data) { + Ok(val) => val, + Err(e) => { + debug!("serde_json data error: {}", e); + return Err(VaultError::Serialization(e.to_string())); + } + }; + debug!("plaintext serialized: {} bytes", plaintext.len()); + // 4. Generate nonce + let nonce = random_salt(12); + debug!("nonce: {}", hex::encode(&nonce)); + // 5. Encrypt + let encrypted_blob = encrypt_with_nonce_prepended(&key, &plaintext)?; + debug!("encrypted_blob: {} bytes", encrypted_blob.len()); + // 6. Store new encrypted blob + metadata.encrypted_blob = encrypted_blob; + let meta_bytes = match serde_json::to_vec(&metadata) { + Ok(val) => val, + Err(e) => { + debug!("serde_json metadata error: {}", e); + return Err(VaultError::Serialization(e.to_string())); + } + }; + self.storage + .set(keyspace, &meta_bytes) + .await + .map_err(|e| VaultError::Storage(format!("{e:?}")))?; + debug!("success"); + Ok(()) } - // 2. Derive key - let key = kdf::derive_key_pbkdf2(password, &metadata.salt, 32, 10_000); - debug!("derived key: {} bytes", key.len()); - // 3. Serialize plaintext - let plaintext = match serde_json::to_vec(data) { - Ok(val) => val, - Err(e) => { - debug!("serde_json data error: {}", e); - return Err(VaultError::Serialization(e.to_string())); - } - }; - debug!("plaintext serialized: {} bytes", plaintext.len()); - // 4. Generate nonce - let nonce = random_salt(12); - debug!("nonce: {}", hex::encode(&nonce)); - // 5. Encrypt - let encrypted_blob = encrypt_with_nonce_prepended(&key, &plaintext)?; - debug!("encrypted_blob: {} bytes", encrypted_blob.len()); - // 6. Store new encrypted blob - metadata.encrypted_blob = encrypted_blob; - let meta_bytes = match serde_json::to_vec(&metadata) { - Ok(val) => val, - Err(e) => { - debug!("serde_json metadata error: {}", e); - return Err(VaultError::Serialization(e.to_string())); - } - }; - self.storage.set(keyspace, &meta_bytes).await.map_err(|e| VaultError::Storage(format!("{e:?}")))?; - debug!("success"); - Ok(()) -} -/// Sign a message with a stored keypair in a keyspace -/// -/// # Arguments -/// * `keyspace` - Keyspace name -/// * `password` - Keyspace password -/// * `key_id` - Keypair ID -/// * `message` - Message to sign -pub async fn sign(&self, keyspace: &str, password: &[u8], key_id: &str, message: &[u8]) -> Result, VaultError> { - let data = self.unlock_keyspace(keyspace, password).await?; - let key = data.keypairs.iter().find(|k| k.id == key_id).ok_or(VaultError::KeyNotFound(key_id.to_string()))?; - match key.key_type { - KeyType::Ed25519 => { - use ed25519_dalek::{SigningKey, Signer}; - let signing = SigningKey::from_bytes(&key.private_key.clone().try_into().map_err(|_| VaultError::Crypto("Invalid Ed25519 private key length".to_string()))?); - let sig = signing.sign(message); - Ok(sig.to_bytes().to_vec()) - } - KeyType::Secp256k1 => { - use k256::ecdsa::{SigningKey, signature::Signer}; - let arr: &[u8; 32] = key.private_key.as_slice().try_into().map_err(|_| VaultError::Crypto("Invalid secp256k1 private key length".to_string()))?; - let sk = SigningKey::from_bytes(arr.into()).map_err(|e| VaultError::Crypto(e.to_string()))?; - let sig: k256::ecdsa::DerSignature = sk.sign(message); - Ok(sig.to_vec()) + /// Sign a message with a stored keypair in a keyspace + /// + /// # Arguments + /// * `keyspace` - Keyspace name + /// * `password` - Keyspace password + /// * `key_id` - Keypair ID + /// * `message` - Message to sign + pub async fn sign( + &self, + keyspace: &str, + password: &[u8], + key_id: &str, + message: &[u8], + ) -> Result, VaultError> { + let data = self.unlock_keyspace(keyspace, password).await?; + let key = data + .keypairs + .iter() + .find(|k| k.id == key_id) + .ok_or(VaultError::KeyNotFound(key_id.to_string()))?; + match key.key_type { + KeyType::Ed25519 => { + use ed25519_dalek::{Signer, SigningKey}; + let signing = + SigningKey::from_bytes(&key.private_key.clone().try_into().map_err(|_| { + VaultError::Crypto("Invalid Ed25519 private key length".to_string()) + })?); + let sig = signing.sign(message); + Ok(sig.to_bytes().to_vec()) + } + KeyType::Secp256k1 => { + use k256::ecdsa::{signature::Signer, SigningKey}; + let arr: &[u8; 32] = key.private_key.as_slice().try_into().map_err(|_| { + VaultError::Crypto("Invalid secp256k1 private key length".to_string()) + })?; + let sk = SigningKey::from_bytes(arr.into()) + .map_err(|e| VaultError::Crypto(e.to_string()))?; + let sig: k256::ecdsa::DerSignature = sk.sign(message); + Ok(sig.to_vec()) + } } } -} -/// Verify a signature with a stored keypair in a keyspace -/// -/// # Arguments -/// * `keyspace` - Keyspace name -/// * `password` - Keyspace password -/// * `key_id` - Keypair ID -/// * `message` - Message that was signed -/// * `signature` - Signature to verify -pub async fn verify(&self, keyspace: &str, password: &[u8], key_id: &str, message: &[u8], signature: &[u8]) -> Result { - let data = self.unlock_keyspace(keyspace, password).await?; - let key = data.keypairs.iter().find(|k| k.id == key_id).ok_or(VaultError::KeyNotFound(key_id.to_string()))?; - match key.key_type { - KeyType::Ed25519 => { - use ed25519_dalek::{VerifyingKey, Signature, Verifier}; - let verifying = VerifyingKey::from_bytes(&key.public_key.clone().try_into().map_err(|_| VaultError::Crypto("Invalid Ed25519 public key length".to_string()))?) - .map_err(|e| VaultError::Crypto(e.to_string()))?; - let sig = Signature::from_bytes(&signature.try_into().map_err(|_| VaultError::Crypto("Invalid Ed25519 signature length".to_string()))?); - Ok(verifying.verify(message, &sig).is_ok()) - } - KeyType::Secp256k1 => { - use k256::ecdsa::{VerifyingKey, Signature, signature::Verifier}; - let pk = VerifyingKey::from_sec1_bytes(&key.public_key).map_err(|e| VaultError::Crypto(e.to_string()))?; - let sig = Signature::from_der(signature).map_err(|e| VaultError::Crypto(e.to_string()))?; - Ok(pk.verify(message, &sig).is_ok()) + /// Verify a signature with a stored keypair in a keyspace + /// + /// # Arguments + /// * `keyspace` - Keyspace name + /// * `password` - Keyspace password + /// * `key_id` - Keypair ID + /// * `message` - Message that was signed + /// * `signature` - Signature to verify + pub async fn verify( + &self, + keyspace: &str, + password: &[u8], + key_id: &str, + message: &[u8], + signature: &[u8], + ) -> Result { + let data = self.unlock_keyspace(keyspace, password).await?; + let key = data + .keypairs + .iter() + .find(|k| k.id == key_id) + .ok_or(VaultError::KeyNotFound(key_id.to_string()))?; + match key.key_type { + KeyType::Ed25519 => { + use ed25519_dalek::{Signature, Verifier, VerifyingKey}; + let verifying = + VerifyingKey::from_bytes(&key.public_key.clone().try_into().map_err(|_| { + VaultError::Crypto("Invalid Ed25519 public key length".to_string()) + })?) + .map_err(|e| VaultError::Crypto(e.to_string()))?; + let sig = Signature::from_bytes(&signature.try_into().map_err(|_| { + VaultError::Crypto("Invalid Ed25519 signature length".to_string()) + })?); + Ok(verifying.verify(message, &sig).is_ok()) + } + KeyType::Secp256k1 => { + use k256::ecdsa::{signature::Verifier, Signature, VerifyingKey}; + let pk = VerifyingKey::from_sec1_bytes(&key.public_key) + .map_err(|e| VaultError::Crypto(e.to_string()))?; + let sig = Signature::from_der(signature) + .map_err(|e| VaultError::Crypto(e.to_string()))?; + Ok(pk.verify(message, &sig).is_ok()) + } } } + + /// Encrypt a message using the keyspace symmetric cipher + /// (for simplicity, uses keyspace password-derived key) + pub async fn encrypt( + &self, + keyspace: &str, + password: &[u8], + plaintext: &[u8], + ) -> Result, VaultError> { + debug!("encrypt"); + + // 1. Load keyspace metadata + let meta_bytes = self + .storage + .get(keyspace) + .await + .map_err(|e| VaultError::Storage(format!("{e:?}")))?; + let meta_bytes = match meta_bytes { + Some(val) => val, + None => { + debug!("keyspace not found"); + return Err(VaultError::Other("Keyspace not found".to_string())); + } + }; + let meta: KeyspaceMetadata = match serde_json::from_slice(&meta_bytes) { + Ok(val) => val, + Err(e) => { + debug!("serialization error: {}", e); + return Err(VaultError::Serialization(e.to_string())); + } + }; + debug!( + "salt={:?} (hex salt: {})", + meta.salt, + hex::encode(&meta.salt) + ); + // 2. Derive key + let key = kdf::derive_key_pbkdf2(password, &meta.salt, 32, 10_000); + // 3. Generate nonce + let nonce = random_salt(12); + debug!("nonce={:?} (hex nonce: {})", nonce, hex::encode(&nonce)); + // 4. Encrypt + let ciphertext = encrypt_chacha20(&key, plaintext, &nonce).map_err(VaultError::Crypto)?; + let mut out = nonce; + out.extend_from_slice(&ciphertext); + Ok(out) + } + + /// Decrypt a message using the keyspace symmetric cipher + /// (for simplicity, uses keyspace password-derived key) + pub async fn decrypt( + &self, + keyspace: &str, + password: &[u8], + ciphertext: &[u8], + ) -> Result, VaultError> { + debug!("decrypt"); + + // 1. Load keyspace metadata + let meta_bytes = self + .storage + .get(keyspace) + .await + .map_err(|e| VaultError::Storage(format!("{e:?}")))?; + let meta_bytes = match meta_bytes { + Some(val) => val, + None => { + debug!("keyspace not found"); + return Err(VaultError::Other("Keyspace not found".to_string())); + } + }; + let meta: KeyspaceMetadata = match serde_json::from_slice(&meta_bytes) { + Ok(val) => val, + Err(e) => { + debug!("serialization error: {}", e); + return Err(VaultError::Serialization(e.to_string())); + } + }; + debug!( + "salt={:?} (hex salt: {})", + meta.salt, + hex::encode(&meta.salt) + ); + // 2. Derive key + let key = kdf::derive_key_pbkdf2(password, &meta.salt, 32, 10_000); + // 3. Extract nonce + let nonce = &ciphertext[..12]; + debug!("nonce={:?} (hex nonce: {})", nonce, hex::encode(nonce)); + // 4. Decrypt + let plaintext = + decrypt_chacha20(&key, &ciphertext[12..], nonce).map_err(VaultError::Crypto)?; + Ok(plaintext) + } } - -/// Encrypt a message using the keyspace symmetric cipher -/// (for simplicity, uses keyspace password-derived key) -pub async fn encrypt(&self, keyspace: &str, password: &[u8], plaintext: &[u8]) -> Result, VaultError> { - debug!("encrypt"); - - // 1. Load keyspace metadata - let meta_bytes = self.storage.get(keyspace).await.map_err(|e| VaultError::Storage(format!("{e:?}")))?; - let meta_bytes = match meta_bytes { - Some(val) => val, - None => { - debug!("keyspace not found"); - return Err(VaultError::Other("Keyspace not found".to_string())); - } - }; - let meta: KeyspaceMetadata = match serde_json::from_slice(&meta_bytes) { - Ok(val) => val, - Err(e) => { - debug!("serialization error: {}", e); - return Err(VaultError::Serialization(e.to_string())); - } - }; - debug!("salt={:?} (hex salt: {})", meta.salt, hex::encode(&meta.salt)); - // 2. Derive key - let key = kdf::derive_key_pbkdf2(password, &meta.salt, 32, 10_000); - // 3. Generate nonce - let nonce = random_salt(12); - debug!("nonce={:?} (hex nonce: {})", nonce, hex::encode(&nonce)); - // 4. Encrypt - let ciphertext = encrypt_chacha20(&key, plaintext, &nonce).map_err(VaultError::Crypto)?; - let mut out = nonce; - out.extend_from_slice(&ciphertext); - Ok(out) -} - -/// Decrypt a message using the keyspace symmetric cipher -/// (for simplicity, uses keyspace password-derived key) -pub async fn decrypt(&self, keyspace: &str, password: &[u8], ciphertext: &[u8]) -> Result, VaultError> { - debug!("decrypt"); - - // 1. Load keyspace metadata - let meta_bytes = self.storage.get(keyspace).await.map_err(|e| VaultError::Storage(format!("{e:?}")))?; - let meta_bytes = match meta_bytes { - Some(val) => val, - None => { - debug!("keyspace not found"); - return Err(VaultError::Other("Keyspace not found".to_string())); - } - }; - let meta: KeyspaceMetadata = match serde_json::from_slice(&meta_bytes) { - Ok(val) => val, - Err(e) => { - debug!("serialization error: {}", e); - return Err(VaultError::Serialization(e.to_string())); - } - }; - debug!("salt={:?} (hex salt: {})", meta.salt, hex::encode(&meta.salt)); - // 2. Derive key - let key = kdf::derive_key_pbkdf2(password, &meta.salt, 32, 10_000); - // 3. Extract nonce - let nonce = &ciphertext[..12]; - debug!("nonce={:?} (hex nonce: {})", nonce, hex::encode(nonce)); - // 4. Decrypt - let plaintext = decrypt_chacha20(&key, &ciphertext[12..], nonce).map_err(VaultError::Crypto)?; - Ok(plaintext) -} -} \ No newline at end of file diff --git a/vault/src/session.rs b/vault/src/session.rs index 7003ae9..dfca9e7 100644 --- a/vault/src/session.rs +++ b/vault/src/session.rs @@ -136,6 +136,38 @@ impl SessionManager { self.vault.sign(name, password, &keypair.id, message).await } + /// Verify a signature using the currently selected keypair + pub async fn verify(&self, message: &[u8], signature: &[u8]) -> Result { + let (name, password, _) = self + .unlocked_keyspace + .as_ref() + .ok_or(VaultError::Crypto("No keyspace unlocked".to_string()))?; + let keypair = self + .current_keypair() + .ok_or(VaultError::Crypto("No keypair selected".to_string()))?; + self.vault.verify(name, password, &keypair.id, message, signature).await + } + + /// Encrypt data using the keyspace symmetric cipher + /// Returns the encrypted data with the nonce prepended + pub async fn encrypt(&self, plaintext: &[u8]) -> Result, VaultError> { + let (name, password, _) = self + .unlocked_keyspace + .as_ref() + .ok_or(VaultError::Crypto("No keyspace unlocked".to_string()))?; + self.vault.encrypt(name, password, plaintext).await + } + + /// Decrypt data using the keyspace symmetric cipher + /// Expects the nonce to be prepended to the ciphertext (as returned by encrypt) + pub async fn decrypt(&self, ciphertext: &[u8]) -> Result, VaultError> { + let (name, password, _) = self + .unlocked_keyspace + .as_ref() + .ok_or(VaultError::Crypto("No keyspace unlocked".to_string()))?; + self.vault.decrypt(name, password, ciphertext).await + } + pub fn get_vault(&self) -> &Vault { &self.vault } @@ -262,6 +294,38 @@ impl SessionManager { self.vault.sign(name, password, &keypair.id, message).await } + /// Verify a signature using the currently selected keypair + pub async fn verify(&self, message: &[u8], signature: &[u8]) -> Result { + let (name, password, _) = self + .unlocked_keyspace + .as_ref() + .ok_or(VaultError::Crypto("No keyspace unlocked".to_string()))?; + let keypair = self + .current_keypair() + .ok_or(VaultError::Crypto("No keypair selected".to_string()))?; + self.vault.verify(name, password, &keypair.id, message, signature).await + } + + /// Encrypt data using the keyspace symmetric cipher + /// Returns the encrypted data with the nonce prepended + pub async fn encrypt(&self, plaintext: &[u8]) -> Result, VaultError> { + let (name, password, _) = self + .unlocked_keyspace + .as_ref() + .ok_or(VaultError::Crypto("No keyspace unlocked".to_string()))?; + self.vault.encrypt(name, password, plaintext).await + } + + /// Decrypt data using the keyspace symmetric cipher + /// Expects the nonce to be prepended to the ciphertext (as returned by encrypt) + pub async fn decrypt(&self, ciphertext: &[u8]) -> Result, VaultError> { + let (name, password, _) = self + .unlocked_keyspace + .as_ref() + .ok_or(VaultError::Crypto("No keyspace unlocked".to_string()))?; + self.vault.decrypt(name, password, ciphertext).await + } + pub fn get_vault(&self) -> &Vault { &self.vault } diff --git a/wasm_app/src/vault_bindings.rs b/wasm_app/src/vault_bindings.rs index 365aee7..304578b 100644 --- a/wasm_app/src/vault_bindings.rs +++ b/wasm_app/src/vault_bindings.rs @@ -221,15 +221,10 @@ pub async fn sign(message: &[u8]) -> Result { // SAFETY: We only use this pointer synchronously within this function, and SESSION_MANAGER outlives this scope. let session_ptr = SESSION_MANAGER.with(|cell| cell.borrow().as_ref().map(|s| s as *const _)); - let password_opt = SESSION_PASSWORD.with(|pw| pw.borrow().clone()); let session: &vault::session::SessionManager = match session_ptr { Some(ptr) => unsafe { &*ptr }, None => return Err(JsValue::from_str("Session not initialized")), }; - let password = match password_opt { - Some(p) => p, - None => return Err(JsValue::from_str("Session password not set")), - }; match session.sign(message).await { Ok(sig_bytes) => { let hex_sig = hex::encode(&sig_bytes); @@ -239,3 +234,72 @@ pub async fn sign(message: &[u8]) -> Result { } } } + +/// Verify a signature with the current session's selected keypair +#[wasm_bindgen] +pub async fn verify(message: &[u8], signature: &str) -> Result { + { + // SAFETY: We only use this pointer synchronously within this function, and SESSION_MANAGER outlives this scope. + let session_ptr = + SESSION_MANAGER.with(|cell| cell.borrow().as_ref().map(|s| s as *const _)); + let session: &vault::session::SessionManager = match session_ptr { + Some(ptr) => unsafe { &*ptr }, + None => return Err(JsValue::from_str("Session not initialized")), + }; + + // Convert hex signature to bytes + let sig_bytes = match hex::decode(signature) { + Ok(bytes) => bytes, + Err(e) => return Err(JsValue::from_str(&format!("Invalid signature format: {e}"))), + }; + + match session.verify(message, &sig_bytes).await { + Ok(is_valid) => Ok(JsValue::from_bool(is_valid)), + Err(e) => Err(JsValue::from_str(&format!("Verify error: {e}"))), + } + } +} + +/// Encrypt data using the current session's keyspace symmetric cipher +#[wasm_bindgen] +pub async fn encrypt_data(data: &[u8]) -> Result { + { + // SAFETY: We only use this pointer synchronously within this function, and SESSION_MANAGER outlives this scope. + let session_ptr = + SESSION_MANAGER.with(|cell| cell.borrow().as_ref().map(|s| s as *const _)); + let session: &vault::session::SessionManager = match session_ptr { + Some(ptr) => unsafe { &*ptr }, + None => return Err(JsValue::from_str("Session not initialized")), + }; + + match session.encrypt(data).await { + Ok(encrypted) => { + // Return as Uint8Array for JavaScript + Ok(Uint8Array::from(&encrypted[..]).into()) + } + Err(e) => Err(JsValue::from_str(&format!("Encryption error: {e}"))), + } + } +} + +/// Decrypt data using the current session's keyspace symmetric cipher +#[wasm_bindgen] +pub async fn decrypt_data(encrypted: &[u8]) -> Result { + { + // SAFETY: We only use this pointer synchronously within this function, and SESSION_MANAGER outlives this scope. + let session_ptr = + SESSION_MANAGER.with(|cell| cell.borrow().as_ref().map(|s| s as *const _)); + let session: &vault::session::SessionManager = match session_ptr { + Some(ptr) => unsafe { &*ptr }, + None => return Err(JsValue::from_str("Session not initialized")), + }; + + match session.decrypt(encrypted).await { + Ok(decrypted) => { + // Return as Uint8Array for JavaScript + Ok(Uint8Array::from(&decrypted[..]).into()) + } + Err(e) => Err(JsValue::from_str(&format!("Decryption error: {e}"))), + } + } +}