From 01405ca8cf08234df3ee63f22c5f0a5ff0bc446c Mon Sep 17 00:00:00 2001 From: abingyyds Date: Sat, 21 Mar 2026 09:04:25 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20dist-site=20=E5=A4=9A=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=20+=20=E4=B8=AD=E8=8B=B1=E5=8F=8C=E8=AF=AD?= =?UTF-8?q?=20i18n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 4 套主题模板:starter/default/dark/minimal - Starter: 毛玻璃 + GradientText + SpotlightCard (原有风格) - Default: Aurora 极光背景 + SplitText + TiltedCard - Dark: Particles 粒子 + DecryptedText 赛博朋克风格 - Minimal: 极简优雅 + FadeContent 淡入动画 - 新增 i18n 中英双语支持 (i18next + browser-languagedetector) - 新增 ThemeProvider 运行时主题切换 (根据 theme_template 字段) - 新增 11 个 react-bits 动画组件 - 所有页面文案国际化 (Login/Register/Dashboard/Tokens/Pricing/Packages) - 新增 README.md + README.zh.md 含主题切换指南 Co-Authored-By: Claude Sonnet 4.6 --- README.md | 144 ++++++- README.zh.md | 120 ++++++ dist/assets/CountUp-Omm8FlHl.js | 1 + dist/assets/CountUp-SCQ6rVWn.js | 1 - dist/assets/Dashboard-B4CiAg5B.js | 1 + dist/assets/Dashboard-Djts405O.js | 1 - dist/assets/Home-CmajF1bj.js | 62 +++ dist/assets/Home-CmqVbe36.js | 1 + dist/assets/Home-D5xeHSSc.js | 1 - dist/assets/Home-Ddxg0eqL.js | 100 +++++ dist/assets/Home-Nw5uuC4J.js | 1 + dist/assets/Layout-CN7Y4VCf.js | 1 + dist/assets/Layout-CmT_3-Vm.js | 1 + dist/assets/Layout-D6FTlC22.js | 1 + dist/assets/Layout-DmfpAhMt.js | 1 + dist/assets/Login-BYKZA2hS.js | 1 - dist/assets/Login-D37tx-Co.js | 1 + dist/assets/Mesh-CwXV3WjE.js | 7 + dist/assets/Packages-CIW8TdH4.js | 1 - dist/assets/Packages-p_b3v2L7.js | 1 + dist/assets/Pricing-BiEw1jsi.js | 1 + dist/assets/Pricing-GrGWcOkj.js | 1 - dist/assets/Register-BQ7Y75Yc.js | 1 - dist/assets/Register-DiQ0J-Zs.js | 1 + ...-lt5CQbhM.js => SpotlightCard-C_ZqQ-j4.js} | 2 +- dist/assets/Tokens-C4dgLqWq.js | 1 + dist/assets/Tokens-DEPVzOT6.js | 1 - dist/assets/index-BBpo0ZPm.css | 1 + dist/assets/index-CDfjgnlx.css | 1 - dist/assets/index-CJw6IpTa.js | 249 ------------ dist/assets/index-Drgd7k5E.js | 249 ++++++++++++ dist/assets/proxy-BOtdvQpP.js | 1 + dist/assets/use-animation-frame-BTI5WVkr.js | 1 + dist/assets/useTranslation-B7WzaWp0.js | 9 + dist/index.html | 4 +- package-lock.json | 113 ++++++ package.json | 8 +- src/App.jsx | 17 +- src/components/bits/Aurora.jsx | 200 ++++++++++ src/components/bits/DecryptedText.jsx | 370 ++++++++++++++++++ src/components/bits/FadeContent.jsx | 52 +++ src/components/bits/GlitchText.jsx | 66 ++++ src/components/bits/Particles.jsx | 242 ++++++++++++ src/components/bits/PixelCard.jsx | 240 ++++++++++++ src/components/bits/RotatingText.jsx | 191 +++++++++ src/components/bits/ScrollFloat.jsx | 48 +++ src/components/bits/SplitText.jsx | 32 ++ src/components/bits/TiltedCard.jsx | 134 +++++++ src/components/bits/Waves.jsx | 319 +++++++++++++++ src/context/ThemeContext.jsx | 46 +++ src/i18n/index.js | 21 + src/i18n/locales/en.json | 159 ++++++++ src/i18n/locales/zh.json | 159 ++++++++ src/main.jsx | 1 + src/pages/Dashboard.jsx | 42 +- src/pages/Login.jsx | 24 +- src/pages/Packages.jsx | 37 +- src/pages/Pricing.jsx | 21 +- src/pages/Register.jsx | 38 +- src/pages/Tokens.jsx | 54 +-- src/themes/dark/Home.jsx | 209 ++++++++++ src/themes/dark/Layout.jsx | 122 ++++++ src/themes/default/Home.jsx | 210 ++++++++++ src/themes/default/Layout.jsx | 151 +++++++ src/themes/minimal/Home.jsx | 188 +++++++++ src/themes/minimal/Layout.jsx | 120 ++++++ src/{pages => themes/starter}/Home.jsx | 84 ++-- src/themes/starter/Layout.jsx | 173 ++++++++ 68 files changed, 4429 insertions(+), 433 deletions(-) create mode 100644 README.zh.md create mode 100644 dist/assets/CountUp-Omm8FlHl.js delete mode 100644 dist/assets/CountUp-SCQ6rVWn.js create mode 100644 dist/assets/Dashboard-B4CiAg5B.js delete mode 100644 dist/assets/Dashboard-Djts405O.js create mode 100644 dist/assets/Home-CmajF1bj.js create mode 100644 dist/assets/Home-CmqVbe36.js delete mode 100644 dist/assets/Home-D5xeHSSc.js create mode 100644 dist/assets/Home-Ddxg0eqL.js create mode 100644 dist/assets/Home-Nw5uuC4J.js create mode 100644 dist/assets/Layout-CN7Y4VCf.js create mode 100644 dist/assets/Layout-CmT_3-Vm.js create mode 100644 dist/assets/Layout-D6FTlC22.js create mode 100644 dist/assets/Layout-DmfpAhMt.js delete mode 100644 dist/assets/Login-BYKZA2hS.js create mode 100644 dist/assets/Login-D37tx-Co.js create mode 100644 dist/assets/Mesh-CwXV3WjE.js delete mode 100644 dist/assets/Packages-CIW8TdH4.js create mode 100644 dist/assets/Packages-p_b3v2L7.js create mode 100644 dist/assets/Pricing-BiEw1jsi.js delete mode 100644 dist/assets/Pricing-GrGWcOkj.js delete mode 100644 dist/assets/Register-BQ7Y75Yc.js create mode 100644 dist/assets/Register-DiQ0J-Zs.js rename dist/assets/{SpotlightCard-lt5CQbhM.js => SpotlightCard-C_ZqQ-j4.js} (92%) create mode 100644 dist/assets/Tokens-C4dgLqWq.js delete mode 100644 dist/assets/Tokens-DEPVzOT6.js create mode 100644 dist/assets/index-BBpo0ZPm.css delete mode 100644 dist/assets/index-CDfjgnlx.css delete mode 100644 dist/assets/index-CJw6IpTa.js create mode 100644 dist/assets/index-Drgd7k5E.js create mode 100644 dist/assets/proxy-BOtdvQpP.js create mode 100644 dist/assets/use-animation-frame-BTI5WVkr.js create mode 100644 dist/assets/useTranslation-B7WzaWp0.js create mode 100644 src/components/bits/Aurora.jsx create mode 100644 src/components/bits/DecryptedText.jsx create mode 100644 src/components/bits/FadeContent.jsx create mode 100644 src/components/bits/GlitchText.jsx create mode 100644 src/components/bits/Particles.jsx create mode 100644 src/components/bits/PixelCard.jsx create mode 100644 src/components/bits/RotatingText.jsx create mode 100644 src/components/bits/ScrollFloat.jsx create mode 100644 src/components/bits/SplitText.jsx create mode 100644 src/components/bits/TiltedCard.jsx create mode 100644 src/components/bits/Waves.jsx create mode 100644 src/context/ThemeContext.jsx create mode 100644 src/i18n/index.js create mode 100644 src/i18n/locales/en.json create mode 100644 src/i18n/locales/zh.json create mode 100644 src/themes/dark/Home.jsx create mode 100644 src/themes/dark/Layout.jsx create mode 100644 src/themes/default/Home.jsx create mode 100644 src/themes/default/Layout.jsx create mode 100644 src/themes/minimal/Home.jsx create mode 100644 src/themes/minimal/Layout.jsx rename src/{pages => themes/starter}/Home.jsx (80%) create mode 100644 src/themes/starter/Layout.jsx diff --git a/README.md b/README.md index 55de1ee..0dfae64 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,10 @@ A beautiful, open-source frontend template for SubRouter distributors. Built wit ## Features +- **4 Built-in Theme Templates** — Starter, Default, Dark (Cyberpunk), Minimal +- **i18n Dual Language** — Chinese / English, auto-detected from browser - Dark-mode-first design with glassmorphism UI -- Animated landing page with gradient text, spotlight cards, and count-up stats +- Animated landing pages with gradient text, spotlight cards, particles, aurora effects - User registration, login, and dashboard - API key management - Model pricing table @@ -26,42 +28,146 @@ npm run dev npm run build ``` +## Theme Templates + +The dist-site includes **4 built-in theme templates**, each with a distinct visual style. The theme is selected by the distributor in the admin panel and served dynamically at runtime. + +### Available Themes + +| Theme | Value | Description | +|-------|-------|-------------| +| **Starter** | `starter` | Original glassmorphism design with gradient text, spotlight cards, and star borders. Indigo/purple color scheme. | +| **Default** | `default` | Aurora animated background with split text animation, tilted cards, and rotating feature text. Colorful gradients. | +| **Dark** | `dark` | Cyberpunk/terminal style with particle background, decrypted text animation, and monospace font. Green accent color. | +| **Minimal** | `minimal` | Clean, elegant design with fade-in animations, numbered feature list, and minimal borders. Maximum whitespace. | + +### How to Switch Themes + +#### Method 1: Admin Panel (Recommended) + +1. Log in to the main SubRouter admin panel +2. Go to **Distributor Settings** (分站设置) +3. Find the **Theme Template** (主题模板) dropdown +4. Select your preferred theme +5. Click **Save** — the change takes effect immediately + +#### Method 2: API + +```bash +# Update theme via API +curl -X PUT /api/distributor/self \ + -H "Content-Type: application/json" \ + -d '{"theme_template": "dark"}' +``` + +Valid values: `starter`, `default`, `dark`, `minimal` + +### How It Works + +All 4 themes are compiled into a single build. The dist-site reads the `theme_template` field from the `/api/dist/site/info` endpoint and dynamically loads the corresponding Layout and Home components at runtime via React lazy loading. Shared pages (Login, Register, Dashboard, Tokens, Pricing, Packages) are the same across all themes. + +## i18n (Internationalization) + +The dist-site supports **Chinese (zh)** and **English (en)** with automatic browser language detection. + +- Translation files: `src/i18n/locales/en.json` and `src/i18n/locales/zh.json` +- Uses [i18next](https://www.i18next.com/) + [react-i18next](https://react.i18next.com/) +- Language auto-detected from `navigator.language` +- Falls back to English if browser language is not supported + +### Adding a New Language + +1. Copy `src/i18n/locales/en.json` to `src/i18n/locales/{lang}.json` +2. Translate all values +3. Import it in `src/i18n/index.js`: + ```js + import fr from './locales/fr.json'; + // Add to resources: + resources: { en, zh, fr }, + ``` + ## Configuration The template automatically fetches site configuration from the backend API: -- **Site info**: `GET /api/dist/site/info` — name, logo, favicon, announcement +- **Site info**: `GET /api/dist/site/info` — name, logo, favicon, announcement, theme_template - **Models**: `GET /api/dist/site/models` — available AI models - **Pricing**: `GET /api/dist/site/pricing` — per-model pricing - **Packages**: `GET /api/dist/site/packages` — subscription packages ## Customization -### Theming -Edit `tailwind.config.js` to customize colors, fonts, and animations. +### Theme Structure -### Components -react-bits animation components are in `src/components/bits/`: -- `GradientText` — Animated gradient text -- `ShinyText` — Sweeping shine effect -- `BlurText` — Words blur-in animation -- `CountUp` — Spring-physics number counter -- `SpotlightCard` — Mouse-following spotlight glow -- `StarBorder` — Animated star-light border +Each theme lives in `src/themes/{theme_name}/` and contains: +- `Layout.jsx` — Header, footer, and navigation +- `Home.jsx` — Landing page with hero section, features, models, packages, CTA -### Pages -- `Home` — Landing page with hero, features, models preview -- `Login` / `Register` — Authentication -- `Dashboard` — User overview with balance, usage, redeem -- `Tokens` — API key management -- `Pricing` — Model pricing table -- `Packages` — Subscription packages +``` +src/themes/ +├── starter/ # Glassmorphism + GradientText + SpotlightCard +├── default/ # Aurora background + SplitText + TiltedCard +├── dark/ # Particles + DecryptedText (cyberpunk) +└── minimal/ # Clean + FadeContent (elegant) +``` + +### react-bits Components + +Available in `src/components/bits/`: + +| Component | Used By | Description | +|-----------|---------|-------------| +| `GradientText` | Starter | Animated gradient text | +| `BlurText` | Starter | Words blur-in animation | +| `ShinyText` | Starter | Sweeping shine effect | +| `SpotlightCard` | Starter, shared pages | Mouse-following spotlight glow | +| `StarBorder` | Starter | Animated star-light border | +| `CountUp` | All themes | Spring-physics number counter | +| `Aurora` | Default | WebGL aurora borealis background | +| `SplitText` | Default | Per-character reveal animation | +| `RotatingText` | Default | Rotating text carousel | +| `TiltedCard` | Default | 3D tilt card on hover | +| `Particles` | Dark | WebGL particle system | +| `DecryptedText` | Dark | Matrix-style text decrypt | +| `GlitchText` | Dark | CSS glitch text effect | +| `FadeContent` | Minimal | Intersection-based fade in | +| `ScrollFloat` | — | Scroll-triggered float animation | +| `PixelCard` | — | Pixelated card effect | +| `Waves` | — | Canvas wave background | + +### Creating a Custom Theme + +1. Create a new directory: `src/themes/my-theme/` +2. Create `Layout.jsx` and `Home.jsx` (copy from an existing theme as a starting point) +3. Register it in `src/context/ThemeContext.jsx`: + ```js + const themeRegistry = { + // ... existing themes + 'my-theme': { + Home: React.lazy(() => import('../themes/my-theme/Home')), + Layout: React.lazy(() => import('../themes/my-theme/Layout')), + }, + }; + ``` +4. Add the option to the admin panel's dropdown in `web/src/pages/Setting/DistributorSettings.jsx` +5. Run `npm run build` + +### Shared Pages + +Pages in `src/pages/` are shared across all themes: +- `Login.jsx` / `Register.jsx` — Authentication +- `Dashboard.jsx` — User overview with balance, usage, redeem +- `Tokens.jsx` — API key management +- `Pricing.jsx` — Model pricing table +- `Packages.jsx` — Subscription packages ## Tech Stack - [React 18](https://react.dev) + [Vite](https://vitejs.dev) - [Tailwind CSS](https://tailwindcss.com) - [motion/react](https://motion.dev) (Framer Motion) +- [i18next](https://www.i18next.com/) + [react-i18next](https://react.i18next.com/) +- [OGL](https://github.com/oframe/ogl) (WebGL for Aurora/Particles) - [react-hot-toast](https://react-hot-toast.com) - [react-bits](https://github.com/DavidHDev/react-bits) animation components diff --git a/README.zh.md b/README.zh.md new file mode 100644 index 0000000..ec78605 --- /dev/null +++ b/README.zh.md @@ -0,0 +1,120 @@ +# SubRouter 分站前端模板 + +SubRouter 分销商的开源前端模板。基于 React、Vite、Tailwind CSS 和 [react-bits](https://github.com/DavidHDev/react-bits) 动画组件构建。 + +## 功能特性 + +- **4 套内置主题模板** — Starter、默认主题、暗色主题(赛博朋克)、极简主题 +- **中英双语** — 根据浏览器语言自动切换 +- 暗色优先的毛玻璃设计 +- 丰富的动画效果:渐变文字、聚光卡片、粒子背景、极光效果 +- 用户注册、登录和控制台 +- API 密钥管理 +- 模型定价表 +- 套餐订阅 +- 完全响应式 +- OpenAI 兼容 API 端点展示 + +## 快速开始 + +```bash +# 安装依赖 +npm install + +# 开发服务器(端口 3001,/api 代理到 localhost:3000) +npm run dev + +# 生产构建 +npm run build +``` + +## 主题模板 + +dist-site 包含 **4 套内置主题模板**,每套有独特的视觉风格。主题由分销商在管理面板中选择,运行时动态加载。 + +### 可用主题 + +| 主题 | 值 | 描述 | +|------|-----|------| +| **Starter** | `starter` | 原始毛玻璃设计,渐变文字、聚光卡片、星光边框。靛蓝/紫色配色。 | +| **默认主题** | `default` | 极光动画背景,文字拆分动画、倾斜卡片、旋转特性文字。多彩渐变。 | +| **暗色主题** | `dark` | 赛博朋克/终端风格,粒子背景、解密文字动画、等宽字体。绿色强调色。 | +| **极简主题** | `minimal` | 简洁优雅设计,淡入动画、编号特性列表、极简边框。最大留白。 | + +### 如何切换主题 + +#### 方式一:管理面板(推荐) + +1. 登录 SubRouter 主管理面板 +2. 进入 **分站设置** +3. 找到 **主题模板** 下拉框 +4. 选择你喜欢的主题 +5. 点击 **保存** — 立即生效 + +#### 方式二:API + +```bash +# 通过 API 更新主题 +curl -X PUT /api/distributor/self \ + -H "Content-Type: application/json" \ + -d '{"theme_template": "dark"}' +``` + +可选值:`starter`、`default`、`dark`、`minimal` + +### 工作原理 + +所有 4 套主题编译到同一个构建中。dist-site 从 `/api/dist/site/info` 接口读取 `theme_template` 字段,通过 React lazy loading 动态加载对应的 Layout 和 Home 组件。共享页面(登录、注册、控制台、令牌、定价、套餐)在所有主题中保持一致。 + +## 国际化(i18n) + +dist-site 支持 **中文 (zh)** 和 **英文 (en)**,自动检测浏览器语言。 + +- 翻译文件:`src/i18n/locales/en.json` 和 `src/i18n/locales/zh.json` +- 使用 [i18next](https://www.i18next.com/) + [react-i18next](https://react.i18next.com/) +- 从 `navigator.language` 自动检测语言 +- 不支持的语言回退到英文 + +### 添加新语言 + +1. 复制 `src/i18n/locales/en.json` 到 `src/i18n/locales/{lang}.json` +2. 翻译所有值 +3. 在 `src/i18n/index.js` 中导入: + ```js + import fr from './locales/fr.json'; + // 添加到 resources: + resources: { en, zh, fr }, + ``` + +## 自定义主题 + +### 创建自定义主题 + +1. 创建新目录:`src/themes/my-theme/` +2. 创建 `Layout.jsx` 和 `Home.jsx`(从现有主题复制) +3. 在 `src/context/ThemeContext.jsx` 中注册: + ```js + const themeRegistry = { + // ... 现有主题 + 'my-theme': { + Home: React.lazy(() => import('../themes/my-theme/Home')), + Layout: React.lazy(() => import('../themes/my-theme/Layout')), + }, + }; + ``` +4. 在管理面板的下拉框 `web/src/pages/Setting/DistributorSettings.jsx` 中添加选项 +5. 运行 `npm run build` + +## 技术栈 + +- [React 18](https://react.dev) + [Vite](https://vitejs.dev) +- [Tailwind CSS](https://tailwindcss.com) +- [motion/react](https://motion.dev) (Framer Motion) +- [i18next](https://www.i18next.com/) + [react-i18next](https://react.i18next.com/) +- [OGL](https://github.com/oframe/ogl) (WebGL 极光/粒子效果) +- [react-hot-toast](https://react-hot-toast.com) +- [react-bits](https://github.com/DavidHDev/react-bits) 动画组件 + +## 许可证 + +MIT diff --git a/dist/assets/CountUp-Omm8FlHl.js b/dist/assets/CountUp-Omm8FlHl.js new file mode 100644 index 0000000..bf230aa --- /dev/null +++ b/dist/assets/CountUp-Omm8FlHl.js @@ -0,0 +1 @@ +import{r as F,j as te}from"./index-Drgd7k5E.js";function kt(t){const e=F.useRef(null);return e.current===null&&(e.current=t()),e.current}const ee=typeof window<"u",se=ee?F.useLayoutEffect:F.useEffect;function ne(t,e){t.indexOf(e)===-1&&t.push(e)}function re(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const U=(t,e,s)=>s>e?e:s{};const dt={},et=t=>t,ie=(t,e)=>s=>e(t(s)),pt=(...t)=>t.reduce(ie),Et=(t,e,s)=>{const r=e-t;return r===0?1:(s-t)/r};class oe{constructor(){this.subscriptions=[]}add(e){return ne(this.subscriptions,e),()=>re(this.subscriptions,e)}notify(e,s,r){const n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](e,s,r);else for(let i=0;it*1e3,N=t=>t/1e3;function Pt(t,e){return e?t*(1e3/e):0}const Nt=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,ae=1e-7,ce=12;function ue(t,e,s,r,n){let i,o,a=0;do o=e+(s-e)/2,i=Nt(o,r,n)-t,i>0?s=o:e=o;while(Math.abs(i)>ae&&++aue(i,0,1,t,s);return i=>i===0||i===1?i:Nt(n(i),e,r)}const Rt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ot=t=>e=>1-t(1-e),Ut=$(.33,1.53,.69,.99),mt=Ot(Ut),le=Rt(mt),fe=t=>t>=1?1:(t*=2)<1?.5*mt(t):.5*(2-Math.pow(2,-10*(t-1))),gt=t=>1-Math.sin(Math.acos(t)),he=Ot(gt),de=Rt(gt),pe=$(.42,0,1,1),me=$(0,0,.58,1),Kt=$(.42,0,.58,1),ge=t=>Array.isArray(t)&&typeof t[0]!="number",ye=t=>Array.isArray(t)&&typeof t[0]=="number",be={linear:et,easeIn:pe,easeInOut:Kt,easeOut:me,circIn:gt,circInOut:de,circOut:he,backIn:mt,backInOut:le,backOut:Ut,anticipate:fe},ve=t=>typeof t=="string",Mt=t=>{if(ye(t)){It(t.length===4);const[e,s,r,n]=t;return $(e,s,r,n)}else if(ve(t))return be[t];return t},J=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Te(t,e){let s=new Set,r=new Set,n=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(c){o.has(c)&&(l.schedule(c),t()),c(a)}const l={schedule:(c,f=!1,d=!1)=>{const x=d&&n?s:r;return f&&o.add(c),x.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,n){i=!0;return}n=!0;const f=s;s=r,r=f,s.forEach(u),s.clear(),n=!1,i&&(i=!1,l.process(c))}};return l}const xe=40;function Me(t,e){let s=!1,r=!0;const n={delta:0,timestamp:0,isProcessing:!1},i=()=>s=!0,o=J.reduce((v,g)=>(v[g]=Te(i),v),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:f,preRender:d,render:M,postRender:x}=o,m=()=>{const v=dt.useManualTiming,g=v?n.timestamp:performance.now();s=!1,v||(n.delta=r?1e3/60:Math.max(Math.min(g-n.timestamp,xe),1)),n.timestamp=g,n.isProcessing=!0,a.process(n),u.process(n),l.process(n),c.process(n),f.process(n),d.process(n),M.process(n),x.process(n),n.isProcessing=!1,s&&e&&(r=!1,t(m))},T=()=>{s=!0,r=!0,n.isProcessing||t(m)};return{schedule:J.reduce((v,g)=>{const y=o[g];return v[g]=(S,C=!1,b=!1)=>(s||T(),y.schedule(S,C,b)),v},{}),cancel:v=>{for(let g=0;g(H===void 0&&k.set(X.isProcessing||dt.useManualTiming?X.timestamp:performance.now()),H),set:t=>{H=t,queueMicrotask(Ae)}},Lt=t=>e=>typeof e=="string"&&e.startsWith(t),Ps=Lt("--"),Se=Lt("var(--"),De=t=>Se(t)?Fe.test(t.split("/*")[0].trim()):!1,Fe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ns(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const yt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},qt={...yt,transform:t=>U(0,1,t)},Rs={...yt,default:1},q=t=>Math.round(t*1e5)/1e5,Wt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function we(t){return t==null}const Ve=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bt=(t,e)=>s=>!!(typeof s=="string"&&Ve.test(s)&&s.startsWith(t)||e&&!we(s)&&Object.prototype.hasOwnProperty.call(s,e)),Bt=(t,e,s)=>r=>{if(typeof r!="string")return r;const[n,i,o,a]=r.match(Wt);return{[t]:parseFloat(n),[e]:parseFloat(i),[s]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ce=t=>U(0,255,t),rt={...yt,transform:t=>Math.round(Ce(t))},O={test:bt("rgb","red"),parse:Bt("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:r=1})=>"rgba("+rt.transform(t)+", "+rt.transform(e)+", "+rt.transform(s)+", "+q(qt.transform(r))+")"};function ke(t){let e="",s="",r="",n="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),r=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),r=t.substring(3,4),n=t.substring(4,5),e+=e,s+=s,r+=r,n+=n),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(r,16),alpha:n?parseInt(n,16)/255:1}}const ut={test:bt("#"),parse:ke,transform:O.transform},z=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Os=z("deg"),W=z("%"),Us=z("px"),Ks=z("vh"),Gs=z("vw"),Ls={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)},G={test:bt("hsl","hue"),parse:Bt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:r=1})=>"hsla("+Math.round(t)+", "+W.transform(q(e))+", "+W.transform(q(s))+", "+q(qt.transform(r))+")"},I={test:t=>O.test(t)||ut.test(t)||G.test(t),parse:t=>O.test(t)?O.parse(t):G.test(t)?G.parse(t):ut.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?O.transform(t):G.transform(t),getAnimatableNone:t=>{const e=I.parse(t);return e.alpha=0,I.transform(e)}},Ie=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ee(t){var e,s;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Wt))==null?void 0:e.length)||0)+(((s=t.match(Ie))==null?void 0:s.length)||0)>0}const _t="number",jt="color",Pe="var",Ne="var(",At="${}",Re=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function j(t){const e=t.toString(),s=[],r={color:[],number:[],var:[]},n=[];let i=0;const a=e.replace(Re,u=>(I.test(u)?(r.color.push(i),n.push(jt),s.push(I.parse(u))):u.startsWith(Ne)?(r.var.push(i),n.push(Pe),s.push(u)):(r.number.push(i),n.push(_t),s.push(parseFloat(u))),++i,At)).split(At);return{values:s,split:a,indexes:r,types:n}}function Oe(t){return j(t).values}function $t({split:t,types:e}){const s=t.length;return r=>{let n="";for(let i=0;itypeof t=="number"?0:I.test(t)?I.getAnimatableNone(t):t,Ge=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:Ke(t);function Le(t){const e=j(t);return $t(e)(e.values.map((r,n)=>Ge(r,e.split[n])))}const qe={test:Ee,parse:Oe,createTransformer:Ue,getAnimatableNone:Le};function it(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function We({hue:t,saturation:e,lightness:s,alpha:r}){t/=360,e/=100,s/=100;let n=0,i=0,o=0;if(!e)n=i=o=s;else{const a=s<.5?s*(1+e):s+e-s*e,u=2*s-a;n=it(u,a,t+1/3),i=it(u,a,t),o=it(u,a,t-1/3)}return{red:Math.round(n*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Q(t,e){return s=>s>0?e:t}const nt=(t,e,s)=>t+(e-t)*s,ot=(t,e,s)=>{const r=t*t,n=s*(e*e-r)+r;return n<0?0:Math.sqrt(n)},Be=[ut,O,G],_e=t=>Be.find(e=>e.test(t));function St(t){const e=_e(t);if(!e)return!1;let s=e.parse(t);return e===G&&(s=We(s)),s}const Dt=(t,e)=>{const s=St(t),r=St(e);if(!s||!r)return Q(t,e);const n={...s};return i=>(n.red=ot(s.red,r.red,i),n.green=ot(s.green,r.green,i),n.blue=ot(s.blue,r.blue,i),n.alpha=nt(s.alpha,r.alpha,i),O.transform(n))},lt=new Set(["none","hidden"]);function je(t,e){return lt.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}function $e(t,e){return s=>nt(t,e,s)}function vt(t){return typeof t=="number"?$e:typeof t=="string"?De(t)?Q:I.test(t)?Dt:Je:Array.isArray(t)?zt:typeof t=="object"?I.test(t)?Dt:ze:Q}function zt(t,e){const s=[...t],r=s.length,n=t.map((i,o)=>vt(i)(i,e[o]));return i=>{for(let o=0;o{for(const i in r)s[i]=r[i](n);return s}}function Ze(t,e){const s=[],r={color:0,var:0,number:0};for(let n=0;n{const s=qe.createTransformer(e),r=j(t),n=j(e);return r.indexes.var.length===n.indexes.var.length&&r.indexes.color.length===n.indexes.color.length&&r.indexes.number.length>=n.indexes.number.length?lt.has(t)&&!n.values.length||lt.has(e)&&!r.values.length?je(t,e):pt(zt(Ze(r,n),n.values),s):Q(t,e)};function Zt(t,e,s){return typeof t=="number"&&typeof e=="number"&&typeof s=="number"?nt(t,e,s):vt(t)(t,e)}const He=t=>{const e=({timestamp:s})=>t(s);return{start:(s=!0)=>st.update(e,s),stop:()=>Gt(e),now:()=>X.isProcessing?X.timestamp:k.now()}},Xe=(t,e,s=10)=>{let r="";const n=Math.max(Math.round(e/s),2);for(let i=0;i=Y?1/0:e}function Qe(t,e=100,s){const r=s({...t,keyframes:[0,e]}),n=Math.min(Tt(r),Y);return{type:"keyframes",ease:i=>r.next(n*i).value/e,duration:N(n)}}const A={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ft(t,e){return t*Math.sqrt(1-e*e)}const Ye=12;function ts(t,e,s){let r=s;for(let n=1;n{const c=l*o,f=c*t,d=c-s,M=ft(l,o),x=Math.exp(-f);return at-d/M*x},i=l=>{const f=l*o*t,d=f*s+s,M=Math.pow(o,2)*Math.pow(l,2)*t,x=Math.exp(-f),m=ft(Math.pow(l,2),o);return(-n(l)+at>0?-1:1)*((d-M)*x)/m}):(n=l=>{const c=Math.exp(-l*t),f=(l-s)*t+1;return-at+c*f},i=l=>{const c=Math.exp(-l*t),f=(s-l)*(t*t);return c*f});const a=5/t,u=ts(n,i,a);if(t=L(t),isNaN(u))return{stiffness:A.stiffness,damping:A.damping,duration:t};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:t}}}const ss=["duration","bounce"],ns=["stiffness","damping","mass"];function Ft(t,e){return e.some(s=>t[s]!==void 0)}function rs(t){let e={velocity:A.velocity,stiffness:A.stiffness,damping:A.damping,mass:A.mass,isResolvedFromDuration:!1,...t};if(!Ft(t,ns)&&Ft(t,ss))if(e.velocity=0,t.visualDuration){const s=t.visualDuration,r=2*Math.PI/(s*1.2),n=r*r,i=2*U(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:A.mass,stiffness:n,damping:i}}else{const s=es({...t,velocity:0});e={...e,...s,mass:A.mass},e.isResolvedFromDuration=!0}return e}function tt(t=A.visualDuration,e=A.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:n}=s;const i=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],a={done:!1,value:i},{stiffness:u,damping:l,mass:c,duration:f,velocity:d,isResolvedFromDuration:M}=rs({...s,velocity:-N(s.velocity||0)}),x=d||0,m=l/(2*Math.sqrt(u*c)),T=o-i,p=N(Math.sqrt(u/c)),w=Math.abs(T)<5;r||(r=w?A.restSpeed.granular:A.restSpeed.default),n||(n=w?A.restDelta.granular:A.restDelta.default);let v,g,y,S,C,b;if(m<1)y=ft(p,m),S=(x+m*p*T)/y,v=h=>{const D=Math.exp(-m*p*h);return o-D*(S*Math.sin(y*h)+T*Math.cos(y*h))},C=m*p*S+T*y,b=m*p*T-S*y,g=h=>Math.exp(-m*p*h)*(C*Math.sin(y*h)+b*Math.cos(y*h));else if(m===1){v=D=>o-Math.exp(-p*D)*(T+(x+p*T)*D);const h=x+p*T;g=D=>Math.exp(-p*D)*(p*h*D-x)}else{const h=p*Math.sqrt(m*m-1);v=P=>{const K=Math.exp(-m*p*P),R=Math.min(h*P,300);return o-K*((x+m*p*T)*Math.sinh(R)+h*T*Math.cosh(R))/h};const D=(x+m*p*T)/h,E=m*p*D-T*h,Z=m*p*T-D*h;g=P=>{const K=Math.exp(-m*p*P),R=Math.min(h*P,300);return K*(E*Math.sinh(R)+Z*Math.cosh(R))}}const V={calculatedDuration:M&&f||null,velocity:h=>L(g(h)),next:h=>{if(!M&&m<1){const E=Math.exp(-m*p*h),Z=Math.sin(y*h),P=Math.cos(y*h),K=o-E*(S*Z+T*P),R=L(E*(C*Z+b*P));return a.done=Math.abs(R)<=r&&Math.abs(o-K)<=n,a.value=a.done?o:K,a}const D=v(h);if(M)a.done=h>=f;else{const E=L(g(h));a.done=Math.abs(E)<=r&&Math.abs(o-D)<=n}return a.value=a.done?o:D,a},toString:()=>{const h=Math.min(Tt(V),Y),D=Xe(E=>V.next(h*E).value,h,30);return h+"ms "+D},toTransition:()=>{}};return V}tt.applyToOptions=t=>{const e=Qe(t,100,tt);return t.ease=e.ease,t.duration=L(e.duration),t.type="keyframes",t};const is=5;function Jt(t,e,s){const r=Math.max(e-is,0);return Pt(s-t(r),e-r)}function ht({keyframes:t,velocity:e=0,power:s=.8,timeConstant:r=325,bounceDamping:n=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const f=t[0],d={done:!1,value:f},M=b=>a!==void 0&&bu,x=b=>a===void 0?u:u===void 0||Math.abs(a-b)-m*Math.exp(-b/r),v=b=>p+w(b),g=b=>{const V=w(b),h=v(b);d.done=Math.abs(V)<=l,d.value=d.done?p:h};let y,S;const C=b=>{M(d.value)&&(y=b,S=tt({keyframes:[d.value,x(d.value)],velocity:Jt(v,b,d.value),damping:n,stiffness:i,restDelta:l,restSpeed:c}))};return C(0),{calculatedDuration:null,next:b=>{let V=!1;return!S&&y===void 0&&(V=!0,g(b),C(b)),y!==void 0&&b>=y?S.next(b-y):(!V&&g(b),d)}}}function os(t,e,s){const r=[],n=s||dt.mix||Zt,i=t.length-1;for(let o=0;oe[0];if(i===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=os(e,r,n),u=a.length,l=c=>{if(o&&c1)for(;fl(U(t[0],t[i-1],c)):l}function as(t,e){const s=t[t.length-1];for(let r=1;r<=e;r++){const n=Et(0,e,r);t.push(nt(s,1,n))}}function cs(t){const e=[0];return as(e,t.length-1),e}function us(t,e){return t.map(s=>s*e)}function ls(t,e){return t.map(()=>e||Kt).splice(0,t.length-1)}function B({duration:t=300,keyframes:e,times:s,ease:r="easeInOut"}){const n=ge(r)?r.map(Mt):Mt(r),i={done:!1,value:e[0]},o=us(s&&s.length===e.length?s:cs(e),t),a=Ht(o,e,{ease:Array.isArray(n)?n:ls(e,n)});return{calculatedDuration:t,next:u=>(i.value=a(u),i.done=u>=t,i)}}const fs=t=>t!==null;function hs(t,{repeat:e,repeatType:s="loop"},r,n=1){const i=t.filter(fs),a=n<0||e&&s!=="loop"&&e%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const ds={decay:ht,inertia:ht,tween:B,keyframes:B,spring:tt};function ps(t){typeof t.type=="string"&&(t.type=ds[t.type])}class ms{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,s){return this.finished.then(e,s)}}const gs=t=>t/100;class ys extends ms{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,n;const{motionValue:s}=this.options;s&&s.updatedAt!==k.now()&&this.tick(k.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(n=(r=this.options).onStop)==null||n.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ps(e);const{type:s=B,repeat:r=0,repeatDelay:n=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const u=s||B;u!==B&&typeof a[0]!="number"&&(this.mixKeyframes=pt(gs,Zt(a[0],a[1])),a=[0,100]);const l=u({...e,keyframes:a});i==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=Tt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=l}updateTime(e){const s=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(e,s=!1){const{generator:r,totalDuration:n,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:M,type:x,onUpdate:m,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),s?this.currentTime=e:this.updateTime(e);const p=this.currentTime-l*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?p<0:p>n;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let v=this.currentTime,g=r;if(f){const b=Math.min(this.currentTime,n)/a;let V=Math.floor(b),h=b%1;!h&&b>=1&&(h=1),h===1&&V--,V=Math.min(V,f+1),!!(V%2)&&(d==="reverse"?(h=1-h,M&&(h-=M/a)):d==="mirror"&&(g=o)),v=U(0,1,h)*a}let y;w?(this.delayState.value=c[0],y=this.delayState):y=g.next(v),i&&!w&&(y.value=i(y.value));let{done:S}=y;!w&&u!==null&&(S=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return C&&x!==ht&&(y.value=hs(c,this.options,T,this.speed)),m&&m(y.value),C&&this.finish(),y}then(e,s){return this.finished.then(e,s)}get duration(){return N(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+N(e)}get time(){return N(this.currentTime)}set time(e){e=L(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const s=this.generator.next(e).value;return Jt(r=>this.generator.next(r).value,e,s)}get speed(){return this.playbackSpeed}set speed(e){const s=this.playbackSpeed!==e;s&&this.driver&&this.updateTime(k.now()),this.playbackSpeed=e,s&&this.driver&&(this.time=N(this.currentTime))}play(){var n,i;if(this.isStopped)return;const{driver:e=He,startTime:s}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(i=(n=this.options).onPlay)==null||i.call(n);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=s??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(k.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(e=this.options).onComplete)==null||s.call(e)}cancel(){var e,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(e=this.options).onCancel)==null||s.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),e.observe(this)}}const wt=30,bs=t=>!isNaN(parseFloat(t)),_={current:void 0};class vs{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const n=k.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=k.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=bs(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){this.events[e]||(this.events[e]=new oe);const r=this.events[e].add(s);return e==="change"?()=>{r(),st.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,s,r){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return _.current&&_.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=k.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>wt)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,wt);return Pt(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=e(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,s;(e=this.dependents)==null||e.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ts(t,e){return new vs(t,e)}const Xt=t=>!!(t&&t.getVelocity);function xs(t,e,s){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const n=document.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(r=>r!=null)}function Ms(...t){const e=!Array.isArray(t[0]),s=e?0:-1,r=t[0+s],n=t[1+s],i=t[2+s],o=t[3+s],a=Ht(n,i,o);return e?a(r):a}function As(t,e,s={}){const r=t.get();let n=null,i=r,o;const a=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,u=()=>{n&&(n.stop(),n=null),t.animation=void 0},l=()=>{const f=Vt(t.get()),d=Vt(i);if(f===d){u();return}const M=n?n.getGeneratorVelocity():t.getVelocity();u(),n=new ys({keyframes:[f,d],velocity:M,type:"spring",restDelta:.001,restSpeed:.01,...s,onUpdate:o})},c=()=>{var f;l(),t.animation=n??void 0,(f=t.events.animationStart)==null||f.notify(),n==null||n.then(()=>{var d;t.animation=void 0,(d=t.events.animationComplete)==null||d.notify()})};if(t.attach((f,d)=>{i=f,o=M=>d(ct(M,a)),st.postRender(c)},u),Xt(e)){let f=s.skipInitialAnimation===!0;const d=e.on("change",x=>{f?(f=!1,t.jump(ct(x,a),!1)):t.set(ct(x,a))}),M=t.on("destroy",d);return()=>{d(),M()}}return u}function ct(t,e){return e?t+e:t}function Vt(t){return typeof t=="number"?t:parseFloat(t)}const Qt=F.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function xt(t){const e=kt(()=>Ts(t)),{isStatic:s}=F.useContext(Qt);if(s){const[,r]=F.useState(t);F.useEffect(()=>e.on("change",r),[])}return e}function Yt(t,e){const s=xt(e()),r=()=>s.set(e());return r(),se(()=>{const n=()=>st.preRender(r,!1,!0),i=t.map(o=>o.on("change",n));return()=>{i.forEach(o=>o()),Gt(r)}}),s}function Ss(t){_.current=[],t();const e=Yt(_.current,t);return _.current=void 0,e}function Ds(t,e,s,r){if(typeof t=="function")return Ss(t);const i=typeof e=="function"?e:Ms(e,s,r),o=Array.isArray(t)?Ct(t,i):Ct([t],([u])=>i(u)),a=Array.isArray(t)?void 0:t.accelerate;return a&&!a.isTransformed&&typeof e!="function"&&Array.isArray(s)&&(r==null?void 0:r.clamp)!==!1&&(o.accelerate={...a,times:e,keyframes:s,isTransformed:!0}),o}function Ct(t,e){const s=kt(()=>[]);return Yt(t,()=>{s.length=0;const r=t.length;for(let n=0;nXt(t)?t.get():t;if(s)return Ds(r);const n=xt(r());return F.useInsertionEffect(()=>As(n,t,e),[n,JSON.stringify(e)]),n}function ws(t,e={}){return Fs(t,{type:"spring",...e})}const Vs={some:0,all:1};function Cs(t,e,{root:s,margin:r,amount:n="some"}={}){const i=xs(t),o=new WeakMap,a=l=>{l.forEach(c=>{const f=o.get(c.target);if(c.isIntersecting!==!!f)if(c.isIntersecting){const d=e(c.target,c);typeof d=="function"?o.set(c.target,d):u.unobserve(c.target)}else typeof f=="function"&&(f(c),o.delete(c.target))})},u=new IntersectionObserver(a,{root:s,rootMargin:r,threshold:typeof n=="number"?n:Vs[n]});return i.forEach(l=>u.observe(l)),()=>u.disconnect()}function ks(t,{root:e,margin:s,amount:r,once:n=!1,initial:i=!1}={}){const[o,a]=F.useState(i);return F.useEffect(()=>{if(!t.current||n&&o)return;const u=()=>(a(!0),n?void 0:()=>a(!1)),l={root:e&&e.current||void 0,margin:s,amount:r};return Cs(t.current,u,l)},[e,t,s,n,r]),o}function qs({to:t,from:e=0,direction:s="up",delay:r=0,duration:n=2,className:i="",startWhen:o=!0,separator:a="",onStart:u,onEnd:l}){const c=F.useRef(null),f=xt(s==="down"?t:e),d=20+40*(1/n),M=100*(1/n),x=ws(f,{damping:d,stiffness:M}),m=ks(c,{once:!0,margin:"0px"}),T=v=>{const g=v.toString();if(g.includes(".")){const y=g.split(".")[1];if(parseInt(y)!==0)return y.length}return 0},p=Math.max(T(e),T(t)),w=F.useCallback(v=>{const g=p>0,y={useGrouping:!!a,minimumFractionDigits:g?p:0,maximumFractionDigits:g?p:0},S=Intl.NumberFormat("en-US",y).format(v);return a?S.replace(/,/g,a):S},[p,a]);return F.useEffect(()=>{c.current&&(c.current.textContent=w(s==="down"?t:e))},[e,t,s,w]),F.useEffect(()=>{if(m&&o){typeof u=="function"&&u();const v=setTimeout(()=>{f.set(s==="down"?e:t)},r*1e3),g=setTimeout(()=>{typeof l=="function"&&l()},r*1e3+n*1e3);return()=>{clearTimeout(v),clearTimeout(g)}}},[m,o,f,s,e,t,r,u,l,n]),F.useEffect(()=>{const v=x.on("change",g=>{c.current&&(c.current.textContent=w(g))});return()=>v()},[x,w]),te.jsx("span",{className:i,ref:c})}export{pt as $,Xt as A,W as B,qs as C,Os as D,Gs as E,Ks as F,Wt as G,Ls as H,qt as I,ys as J,Rs as K,I as L,Qt as M,j as N,Ns as O,Me as P,xs as Q,nt as R,oe as S,Ps as T,Et as U,he as V,ms as W,ne as X,re as Y,X as Z,Es as _,Ds as a,kt as b,Gt as c,se as d,ws as e,st as f,Xe as g,It as h,ye as i,hs as j,et as k,de as l,N as m,yt as n,le as o,Us as p,fe as q,ps as r,L as s,k as t,xt as u,U as v,qe as w,dt as x,De as y,Ts as z}; diff --git a/dist/assets/CountUp-SCQ6rVWn.js b/dist/assets/CountUp-SCQ6rVWn.js deleted file mode 100644 index d044e07..0000000 --- a/dist/assets/CountUp-SCQ6rVWn.js +++ /dev/null @@ -1 +0,0 @@ -import{r as S,j as Qt}from"./index-CJw6IpTa.js";const Hs=S.createContext({});function Qe(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Fo=typeof window<"u",_s=Fo?S.useLayoutEffect:S.useEffect,tn=S.createContext(null);function en(t,e){t.indexOf(e)===-1&&t.push(e)}function te(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Q=(t,e,n)=>n>e?e:n{};const ot={},Xs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ys(t){return typeof t=="object"&&t!==null}const qs=t=>/^0[^.\s]+$/u.test(t);function Zs(t){let e;return()=>(e===void 0&&(e=t()),e)}const z=t=>t,Bo=(t,e)=>n=>e(t(n)),Ot=(...t)=>t.reduce(Bo),Lt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class sn{constructor(){this.subscriptions=[]}add(e){return en(this.subscriptions,e),()=>te(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;rt*1e3,G=t=>t/1e3;function Js(t,e){return e?t*(1e3/e):0}const Qs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Oo=1e-7,jo=12;function No(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Qs(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Oo&&++aNo(r,0,1,t,n);return r=>r===0||r===1?r:Qs(i(r),e,s)}const ti=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ei=t=>e=>1-t(1-e),ni=jt(.33,1.53,.69,.99),on=ei(ni),si=ti(on),ii=t=>t>=1?1:(t*=2)<1?.5*on(t):.5*(2-Math.pow(2,-10*(t-1))),rn=t=>1-Math.sin(Math.acos(t)),oi=ei(rn),ri=ti(rn),Uo=jt(.42,0,1,1),Wo=jt(0,0,.58,1),ai=jt(.42,0,.58,1),Ko=t=>Array.isArray(t)&&typeof t[0]!="number",li=t=>Array.isArray(t)&&typeof t[0]=="number",Go={linear:z,easeIn:Uo,easeInOut:ai,easeOut:Wo,circIn:rn,circInOut:ri,circOut:oi,backIn:on,backInOut:si,backOut:ni,anticipate:ii},zo=t=>typeof t=="string",En=t=>{if(li(t)){nn(t.length===4);const[e,n,s,i]=t;return jt(e,n,s,i)}else if(zo(t))return Go[t];return t},Kt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function $o(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const m=f&&i?n:s;return h&&o.add(c),m.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const Ho=40;function ci(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Kt.reduce((v,T)=>(v[T]=$o(r),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=o,y=()=>{const v=ot.useManualTiming,T=v?i.timestamp:performance.now();n=!1,v||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,Ho),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},p=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:Kt.reduce((v,T)=>{const P=o[T];return v[T]=(M,O=!1,A=!1)=>(n||p(),P.schedule(M,O,A)),v},{}),cancel:v=>{for(let T=0;T(Ht===void 0&&j.set(B.isProcessing||ot.useManualTiming?B.timestamp:performance.now()),Ht),set:t=>{Ht=t,queueMicrotask(_o)}},ui=t=>e=>typeof e=="string"&&e.startsWith(t),hi=ui("--"),Xo=ui("var(--"),an=t=>Xo(t)?Yo.test(t.split("/*")[0].trim()):!1,Yo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Rn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const St={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kt={...St,transform:t=>Q(0,1,t)},Gt={...St,default:1},Ct=t=>Math.round(t*1e5)/1e5,ln=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qo(t){return t==null}const Zo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cn=(t,e)=>n=>!!(typeof n=="string"&&Zo.test(n)&&n.startsWith(t)||e&&!qo(n)&&Object.prototype.hasOwnProperty.call(n,e)),fi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ln);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Jo=t=>Q(0,255,t),de={...St,transform:t=>Math.round(Jo(t))},ht={test:cn("rgb","red"),parse:fi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+de.transform(t)+", "+de.transform(e)+", "+de.transform(n)+", "+Ct(kt.transform(s))+")"};function Qo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const De={test:cn("#"),parse:Qo,transform:ht.transform},Nt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),nt=Nt("deg"),J=Nt("%"),w=Nt("px"),tr=Nt("vh"),er=Nt("vw"),Ln={...J,parse:t=>J.parse(t)/100,transform:t=>J.transform(t*100)},vt={test:cn("hsl","hue"),parse:fi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+J.transform(Ct(e))+", "+J.transform(Ct(n))+", "+Ct(kt.transform(s))+")"},R={test:t=>ht.test(t)||De.test(t)||vt.test(t),parse:t=>ht.test(t)?ht.parse(t):vt.test(t)?vt.parse(t):De.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ht.transform(t):vt.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},nr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function sr(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ln))==null?void 0:e.length)||0)+(((n=t.match(nr))==null?void 0:n.length)||0)>0}const di="number",mi="color",ir="var",or="var(",kn="${}",rr=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function wt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(rr,l=>(R.test(l)?(s.color.push(r),i.push(mi),n.push(R.parse(l))):l.startsWith(or)?(s.var.push(r),i.push(ir),n.push(l)):(s.number.push(r),i.push(di),n.push(parseFloat(l))),++r,kn)).split(kn);return{values:n,split:a,indexes:s,types:i}}function ar(t){return wt(t).values}function pi({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;rtypeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t,ur=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:cr(t);function hr(t){const e=wt(t);return pi(e)(e.values.map((s,i)=>ur(s,e.split[i])))}const _={test:sr,parse:ar,createTransformer:lr,getAnimatableNone:hr};function me(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function fr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=me(l,a,t+1/3),r=me(l,a,t),o=me(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function ee(t,e){return n=>n>0?e:t}const C=(t,e,n)=>t+(e-t)*n,pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},dr=[De,ht,vt],mr=t=>dr.find(e=>e.test(t));function In(t){const e=mr(t);if(!e)return!1;let n=e.parse(t);return e===vt&&(n=fr(n)),n}const Fn=(t,e)=>{const n=In(t),s=In(e);if(!n||!s)return ee(t,e);const i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=C(n.alpha,s.alpha,r),ht.transform(i))},Ee=new Set(["none","hidden"]);function pr(t,e){return Ee.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function gr(t,e){return n=>C(t,e,n)}function un(t){return typeof t=="number"?gr:typeof t=="string"?an(t)?ee:R.test(t)?Fn:xr:Array.isArray(t)?gi:typeof t=="object"?R.test(t)?Fn:yr:ee}function gi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>un(r)(r,e[o]));return r=>{for(let o=0;o{for(const r in s)n[r]=s[r](i);return n}}function vr(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i{const n=_.createTransformer(e),s=wt(t),i=wt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Ee.has(t)&&!i.values.length||Ee.has(e)&&!s.values.length?pr(t,e):Ot(gi(vr(s,i),i.values),n):ee(t,e)};function yi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):un(t)(t,e)}const Tr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>V.update(e,n),stop:()=>tt(e),now:()=>B.isProcessing?B.timestamp:j.now()}},vi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r=ne?1/0:e}function wr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(hn(s),ne);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:G(i)}}const D={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Re(t,e){return t*Math.sqrt(1-e*e)}const Sr=12;function Pr(t,e,n){let s=n;for(let i=1;i{const c=u*o,h=c*t,f=c-n,d=Re(u,o),m=Math.exp(-h);return ge-f/d*m},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,m=Math.exp(-h),y=Re(Math.pow(u,2),o);return(-i(u)+ge>0?-1:1)*((f-d)*m)/y}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-ge+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Pr(i,r,a);if(t=W(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Ar=["duration","bounce"],Vr=["stiffness","damping","mass"];function Bn(t,e){return e.some(n=>t[n]!==void 0)}function Cr(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!Bn(t,Vr)&&Bn(t,Ar))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:r}}else{const n=br({...t,velocity:0});e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function se(t=D.visualDuration,e=D.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Cr({...n,velocity:-G(n.velocity||0)}),m=f||0,y=u/(2*Math.sqrt(l*c)),p=o-r,g=G(Math.sqrt(l/c)),x=Math.abs(p)<5;s||(s=x?D.restSpeed.granular:D.restSpeed.default),i||(i=x?D.restDelta.granular:D.restDelta.default);let v,T,P,M,O,A;if(y<1)P=Re(g,y),M=(m+y*g*p)/P,v=b=>{const E=Math.exp(-y*g*b);return o-E*(M*Math.sin(P*b)+p*Math.cos(P*b))},O=y*g*M+p*P,A=y*g*p-M*P,T=b=>Math.exp(-y*g*b)*(O*Math.sin(P*b)+A*Math.cos(P*b));else if(y===1){v=E=>o-Math.exp(-g*E)*(p+(m+g*p)*E);const b=m+g*p;T=E=>Math.exp(-g*E)*(g*b*E-m)}else{const b=g*Math.sqrt(y*y-1);v=X=>{const et=Math.exp(-y*g*X),Y=Math.min(b*X,300);return o-et*((m+y*g*p)*Math.sinh(Y)+b*p*Math.cosh(Y))/b};const E=(m+y*g*p)/b,U=y*g*E-p*b,at=y*g*p-E*b;T=X=>{const et=Math.exp(-y*g*X),Y=Math.min(b*X,300);return et*(U*Math.sinh(Y)+at*Math.cosh(Y))}}const I={calculatedDuration:d&&h||null,velocity:b=>W(T(b)),next:b=>{if(!d&&y<1){const U=Math.exp(-y*g*b),at=Math.sin(P*b),X=Math.cos(P*b),et=o-U*(M*at+p*X),Y=W(U*(O*at+A*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-et)<=i,a.value=a.done?o:et,a}const E=v(b);if(d)a.done=b>=h;else{const U=W(T(b));a.done=Math.abs(U)<=s&&Math.abs(o-E)<=i}return a.value=a.done?o:E,a},toString:()=>{const b=Math.min(hn(I),ne),E=vi(U=>I.next(b*U).value,b,30);return b+"ms "+E},toTransition:()=>{}};return I}se.applyToOptions=t=>{const e=wr(t,100,se);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const Mr=5;function xi(t,e,n){const s=Math.max(e-Mr,0);return Js(n-t(s),e-s)}function Le({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&Al,m=A=>a===void 0?l:l===void 0||Math.abs(a-A)-y*Math.exp(-A/s),v=A=>g+x(A),T=A=>{const I=x(A),b=v(A);f.done=Math.abs(I)<=u,f.value=f.done?g:b};let P,M;const O=A=>{d(f.value)&&(P=A,M=se({keyframes:[f.value,m(f.value)],velocity:xi(v,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return O(0),{calculatedDuration:null,next:A=>{let I=!1;return!M&&P===void 0&&(I=!0,T(A),O(A)),P!==void 0&&A>=P?M.next(A-P):(!I&&T(A),f)}}}function Dr(t,e,n){const s=[],i=n||ot.mix||yi,r=t.length-1;for(let o=0;oe[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Dr(e,s,i),l=a.length,u=c=>{if(o&&c1)for(;hu(Q(t[0],t[r-1],c)):u}function Er(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Lt(0,e,s);t.push(C(n,1,i))}}function Rr(t){const e=[0];return Er(e,t.length-1),e}function Lr(t,e){return t.map(n=>n*e)}function kr(t,e){return t.map(()=>e||ai).splice(0,t.length-1)}function Mt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ko(s)?s.map(En):En(s),r={done:!1,value:e[0]},o=Lr(n&&n.length===e.length?n:Rr(e),t),a=Ti(o,e,{ease:Array.isArray(i)?i:kr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Ir=t=>t!==null;function le(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Ir),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Fr={decay:Le,inertia:Le,tween:Mt,keyframes:Mt,spring:se};function wi(t){typeof t.type=="string"&&(t.type=Fr[t.type])}class fn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Br=t=>t/100;class It extends fn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;wi(e);const{type:n=Mt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Mt;l!==Mt&&typeof a[0]!="number"&&(this.mixKeyframes=Ot(Br,yi(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=hn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:y,finalKeyframe:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,T=s;if(h){const A=Math.min(this.currentTime,i)/a;let I=Math.floor(A),b=A%1;!b&&A>=1&&(b=1),b===1&&I--,I=Math.min(I,h+1),!!(I%2)&&(f==="reverse"?(b=1-b,d&&(b-=d/a)):f==="mirror"&&(T=o)),v=Q(0,1,b)*a}let P;x?(this.delayState.value=c[0],P=this.delayState):P=T.next(v),r&&!x&&(P.value=r(P.value));let{done:M}=P;!x&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return O&&m!==Le&&(P.value=le(c,this.options,p,this.speed)),y&&y(P.value),O&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return G(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+G(e)}get time(){return G(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return xi(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(j.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=G(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:e=Tr,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(j.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Or(t){for(let e=1;et*180/Math.PI,ke=t=>{const e=ft(Math.atan2(t[1],t[0]));return Ie(e)},jr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ke,rotateZ:ke,skewX:t=>ft(Math.atan(t[1])),skewY:t=>ft(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ie=t=>(t=t%360,t<0&&(t+=360),t),On=ke,jn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Nn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Nr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:jn,scaleY:Nn,scale:t=>(jn(t)+Nn(t))/2,rotateX:t=>Ie(ft(Math.atan2(t[6],t[5]))),rotateY:t=>Ie(ft(Math.atan2(-t[2],t[0]))),rotateZ:On,rotate:On,skewX:t=>ft(Math.atan(t[4])),skewY:t=>ft(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Fe(t){return t.includes("scale")?1:0}function Be(t,e){if(!t||t==="none")return Fe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Nr,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=jr,i=a}if(!i)return Fe(e);const r=s[e],o=i[1].split(",").map(Wr);return typeof r=="function"?r(o):o[r]}const Ur=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Be(n,e)};function Wr(t){return parseFloat(t.trim())}const Pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],bt=new Set(Pt),Un=t=>t===St||t===w,Kr=new Set(["x","y","z"]),Gr=Pt.filter(t=>!Kr.has(t));function zr(t){const e=[];return Gr.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const it={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Be(e,"x"),y:(t,{transform:e})=>Be(e,"y")};it.translateX=it.x;it.translateY=it.y;const dt=new Set;let Oe=!1,je=!1,Ne=!1;function Si(){if(je){const t=Array.from(dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=zr(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}je=!1,Oe=!1,dt.forEach(t=>t.complete(Ne)),dt.clear()}function Pi(){dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(je=!0)})}function $r(){Ne=!0,Pi(),Si(),Ne=!1}class dn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(dt.add(this),Oe||(Oe=!0,V.read(Pi),V.resolveKeyframes(Si))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Or(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),dt.delete(this)}cancel(){this.state==="scheduled"&&(dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Hr=t=>t.startsWith("--");function bi(t,e,n){Hr(e)?t.style.setProperty(e,n):t.style[e]=n}const _r={};function Ai(t,e){const n=Zs(t);return()=>_r[e]??n()}const Xr=Ai(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Vi=Ai(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Wn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vt([0,.65,.55,1]),circOut:Vt([.55,0,1,.45]),backIn:Vt([.31,.01,.66,-.59]),backOut:Vt([.33,1.53,.69,.99])};function Ci(t,e){if(t)return typeof t=="function"?Vi()?vi(t,e):"ease-out":li(t)?Vt(t):Array.isArray(t)?t.map(n=>Ci(n,e)||Wn.easeOut):Wn[t]}function Yr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Ci(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function Mi(t){return typeof t=="function"&&"applyToOptions"in t}function qr({type:t,...e}){return Mi(t)&&Vi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Di extends fn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,nn(typeof e.type!="string");const u=qr(e);this.animation=Yr(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=le(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),bi(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,i;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return G(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+G(e)}get time(){return G(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=W(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Xr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),z):i(this)}}const Ei={anticipate:ii,backInOut:si,circInOut:ri};function Zr(t){return t in Ei}function Jr(t){typeof t.ease=="string"&&Zr(t.ease)&&(t.ease=Ei[t.ease])}const ye=10;class Qr extends Di{constructor(e){Jr(e),wi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new It({...o,autoplay:!1}),l=Math.max(ye,j.now()-this.startTime),u=Q(0,ye,l-ye),c=a.sample(l).value,{name:h}=this.options;r&&h&&bi(r,h,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Kn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function ta(t){const e=t[0];if(t.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function ra(t){var h;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t;if(!(((h=e==null?void 0:e.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=e.owner.getProps();return oa()&&n&&(Ri.has(n)||ia.has(n)&&sa(a))&&(n!=="transform"||!c)&&!u&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const aa=40;class la extends fn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var m;super(),this.stop=()=>{var y,p;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(p=this.keyframeResolver)==null||p.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||dn;this.keyframeResolver=new d(a,(y,p,g)=>this.onKeyframesResolved(y,p,f,!g),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,s,i){var g,x;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=j.now();let h=!0;ea(e,r,o,a)||(h=!1,(ot.instantAnimations||!l)&&(c==null||c(le(e,s,n))),e[0]=e[e.length-1],Ue(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>aa?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=h&&!u&&ra(d),y=(x=(g=d.motionValue)==null?void 0:g.owner)==null?void 0:x.current;let p;if(m)try{p=new Qr({...d,element:y})}catch{p=new It(d)}else p=new It(d);p.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),$r()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function Li(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const ca=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ua(t){const e=ca.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function ki(t,e,n=1){const[s,i]=ua(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Xs(o)?parseFloat(o):o}return an(i)?ki(i,e,n+1):i}const ha={type:"spring",stiffness:500,damping:25,restSpeed:10},fa=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),da={type:"keyframes",duration:.8},ma={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pa=(t,{keyframes:e})=>e.length>2?da:bt.has(t)?t.startsWith("scale")?fa(e[1]):ha:ma;function Ii(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function mn(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Ii(n,t):n}const ga=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function ya(t){for(const e in t)if(!ga.has(e))return!0;return!1}const pn=(t,e,n,s={},i,r)=>o=>{const a=mn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-W(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};ya(a)||Object.assign(c,pa(t,c)),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Ue(c),c.delay===0&&(h=!0)),(ot.instantAnimations||ot.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,Ue(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=le(c.keyframes,a);if(f!==void 0){V.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new It(c):new la(c)};function Gn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function gn(t,e,n,s){if(typeof e=="function"){const[i,r]=Gn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Gn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function mt(t,e,n){const s=t.getProps();return gn(s,e,n!==void 0?n:s.custom,t)}const Fi=new Set(["width","height","top","left","right","bottom",...Pt]),zn=30,va=t=>!isNaN(parseFloat(t)),Dt={current:void 0};class xa{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=j.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=va(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new sn);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Dt.current&&Dt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>zn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,zn);return Js(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function pt(t,e){return new xa(t,e)}const We=t=>Array.isArray(t);function Ta(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,pt(n))}function wa(t){return We(t)?t[t.length-1]||0:t}function Sa(t,e){const n=mt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=wa(r[o]);Ta(t,o,a)}}const k=t=>!!(t&&t.getVelocity);function Pa(t){return!!(k(t)&&t.add)}function Ke(t,e){const n=t.getValue("willChange");if(Pa(n))return n.add(e);if(!n&&ot.WillChange){const s=new ot.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function yn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const ba="framerAppearId",Bi="data-"+yn(ba);function Oi(t){return t.props[Bi]}function Aa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function ji(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Ii(r,l):l;const u=r==null?void 0:r.reduceMotion;s&&(r=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),m=a[f];if(m===void 0||h&&Aa(h,f))continue;const y={delay:n,...mn(r||{},f)},p=d.get();if(p!==void 0&&!d.isAnimating()&&!Array.isArray(m)&&m===p&&!y.velocity){V.update(()=>d.set(m));continue}let g=!1;if(window.MotionHandoffAnimation){const T=Oi(t);if(T){const P=window.MotionHandoffAnimation(T,f,V);P!==null&&(y.startTime=P,g=!0)}}Ke(t,f);const x=u??t.shouldReduceMotion;d.start(pn(f,d,m,x&&Fi.has(f)?{type:!1}:y,t,g));const v=d.animation;v&&c.push(v)}if(o){const f=()=>V.update(()=>{o&&Sa(t,o)});c.length?Promise.all(c).then(f):f()}return c}function Ge(t,e,n={}){var l;const s=mt(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(ji(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return Va(t,e,u,c,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Va(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Ge(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Li(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Ca(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Ge(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Ge(t,e,n);else{const i=typeof e=="function"?mt(t,e,n.custom):e;s=Promise.all(ji(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Ma={test:t=>t==="auto",parse:t=>t},Ni=t=>e=>e.test(t),Ui=[St,w,J,nt,er,tr,Ma],$n=t=>Ui.find(Ni(t));function Da(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||qs(t):!0}const Ea=new Set(["brightness","contrast","saturate","opacity"]);function Ra(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ln)||[];if(!s)return t;const i=n.replace(s,"");let r=Ea.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const La=/\b([a-z-]*)\(.*?\)/gu,ze={..._,getAnimatableNone:t=>{const e=t.match(La);return e?e.map(Ra).join(" "):t}},$e={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Hn={...St,transform:Math.round},ka={rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:nt,skewX:nt,skewY:nt,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:kt,originX:Ln,originY:Ln,originZ:w},vn={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,top:w,right:w,bottom:w,left:w,inset:w,insetBlock:w,insetBlockStart:w,insetBlockEnd:w,insetInline:w,insetInlineStart:w,insetInlineEnd:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,paddingBlock:w,paddingBlockStart:w,paddingBlockEnd:w,paddingInline:w,paddingInlineStart:w,paddingInlineEnd:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,marginBlock:w,marginBlockStart:w,marginBlockEnd:w,marginInline:w,marginInlineStart:w,marginInlineEnd:w,fontSize:w,backgroundPositionX:w,backgroundPositionY:w,...ka,zIndex:Hn,fillOpacity:kt,strokeOpacity:kt,numOctaves:Hn},Ia={...vn,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:ze,WebkitFilter:ze,mask:$e,WebkitMask:$e},Wi=t=>Ia[t],Fa=new Set([ze,$e]);function Ki(t,e){let n=Wi(t);return Fa.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ba=new Set(["auto","none","0"]);function Oa(t,e,n){let s=0,i;for(;s{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function xn(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const Gi=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Na(t){return Ys(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Tn}=ci(queueMicrotask,!1),H={x:!1,y:!1};function zi(){return H.x||H.y}function Ua(t){return t==="x"||t==="y"?H[t]?null:(H[t]=!0,()=>{H[t]=!1}):H.x||H.y?null:(H.x=H.y=!0,()=>{H.x=H.y=!1})}function $i(t,e){const n=xn(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Wa(t){return!(t.pointerType==="touch"||zi())}function Ka(t,e,n={}){const[s,i,r]=$i(t,n);return s.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",m)},h=p=>{u&&(u(p),u=void 0),c()},f=p=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(p))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},m=p=>{if(p.pointerType!=="touch"){if(a){l=!0;return}h(p)}},y=p=>{if(!Wa(p))return;l=!1;const g=e(o,p);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",d,i)}),r}const Hi=(t,e)=>e?t===e?!0:Hi(t,e.parentElement):!1,wn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ga=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function za(t){return Ga.has(t.tagName)||t.isContentEditable===!0}const $a=new Set(["INPUT","SELECT","TEXTAREA"]);function Ha(t){return $a.has(t.tagName)||t.isContentEditable===!0}const _t=new WeakSet;function _n(t){return e=>{e.key==="Enter"&&t(e)}}function ve(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const _a=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=_n(()=>{if(_t.has(n))return;ve(n,"down");const i=_n(()=>{ve(n,"up")}),r=()=>ve(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Xn(t){return wn(t)&&!zi()}const Yn=new WeakSet;function Xa(t,e,n={}){const[s,i,r]=$i(t,n),o=a=>{const l=a.currentTarget;if(!Xn(a)||Yn.has(a))return;_t.add(l),n.stopPropagation&&Yn.add(a);const u=e(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),_t.has(l)&&_t.delete(l),Xn(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||Hi(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Na(a)&&(a.addEventListener("focus",u=>_a(u,i)),!za(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Sn(t){return Ys(t)&&"ownerSVGElement"in t}const Xt=new WeakMap;let st;const _i=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Sn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ya=_i("inline","width","offsetWidth"),qa=_i("block","height","offsetHeight");function Za({target:t,borderBoxSize:e}){var n;(n=Xt.get(t))==null||n.forEach(s=>{s(t,{get width(){return Ya(t,e)},get height(){return qa(t,e)}})})}function Ja(t){t.forEach(Za)}function Qa(){typeof ResizeObserver>"u"||(st=new ResizeObserver(Ja))}function tl(t,e){st||Qa();const n=xn(t);return n.forEach(s=>{let i=Xt.get(s);i||(i=new Set,Xt.set(s,i)),i.add(e),st==null||st.observe(s)}),()=>{n.forEach(s=>{const i=Xt.get(s);i==null||i.delete(e),i!=null&&i.size||st==null||st.unobserve(s)})}}const Yt=new Set;let xt;function el(){xt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Yt.forEach(e=>e(t))},window.addEventListener("resize",xt)}function nl(t){return Yt.add(t),xt||el(),()=>{Yt.delete(t),!Yt.size&&typeof xt=="function"&&(window.removeEventListener("resize",xt),xt=void 0)}}function qn(t,e){return typeof t=="function"?nl(t):tl(t,e)}function sl(t){return Sn(t)&&t.tagName==="svg"}function il(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=Ti(i,r,o);return e?a(s):a}function ol(t,e,n={}){const s=t.get();let i=null,r=s,o;const a=typeof s=="string"?s.replace(/[\d.-]/g,""):void 0,l=()=>{i&&(i.stop(),i=null),t.animation=void 0},u=()=>{const h=Zn(t.get()),f=Zn(r);if(h===f){l();return}const d=i?i.getGeneratorVelocity():t.getVelocity();l(),i=new It({keyframes:[h,f],velocity:d,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:o})},c=()=>{var h;u(),t.animation=i??void 0,(h=t.events.animationStart)==null||h.notify(),i==null||i.then(()=>{var f;t.animation=void 0,(f=t.events.animationComplete)==null||f.notify()})};if(t.attach((h,f)=>{r=h,o=d=>f(xe(d,a)),V.postRender(c)},l),k(e)){let h=n.skipInitialAnimation===!0;const f=e.on("change",m=>{h?(h=!1,t.jump(xe(m,a),!1)):t.set(xe(m,a))}),d=t.on("destroy",f);return()=>{f(),d()}}return l}function xe(t,e){return e?t+e:t}function Zn(t){return typeof t=="number"?t:parseFloat(t)}const rl=[...Ui,R,_],al=t=>rl.find(Ni(t)),Jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tt=()=>({x:Jn(),y:Jn()}),Qn=()=>({min:0,max:0}),L=()=>({x:Qn(),y:Qn()}),ll=new WeakMap;function ce(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ft(t){return typeof t=="string"||Array.isArray(t)}const Pn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bn=["initial",...Pn];function ue(t){return ce(t.animate)||bn.some(e=>Ft(t[e]))}function Xi(t){return!!(ue(t)||t.variants)}function cl(t,e,n){for(const s in e){const i=e[s],r=n[s];if(k(i))t.addValue(s,i);else if(k(r))t.addValue(s,pt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,pt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const He={current:null},Yi={current:!1},ul=typeof window<"u";function hl(){if(Yi.current=!0,!!ul)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>He.current=t.matches;t.addEventListener("change",e),e()}else He.current=!1}const ts=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ie={};function qi(t){ie=t}function fl(){return ie}class dl{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=dn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=j.now();this.renderScheduledAtthis.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Yi.current||hl(),this.shouldReduceMotion=He.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),tt(this.notifyUpdate),tt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Ri.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,h=new Di({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:W(c)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=bt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ie){const n=ie[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=pt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Xs(s)||qs(s))?s=parseFloat(s):!al(s)&&_.test(n)&&(s=Ki(e,n)),this.setBaseTarget(e,k(s)?s.get():s)),k(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=gn(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!k(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new sn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Tn.render(this.render)}}class Zi extends dl{constructor(){super(...arguments),this.KeyframeResolver=ja}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;k(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class rt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Ji({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ml({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function pl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Te(t){return t===void 0||t===1}function _e({scale:t,scaleX:e,scaleY:n}){return!Te(t)||!Te(e)||!Te(n)}function ut(t){return _e(t)||Qi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Qi(t){return es(t.x)||es(t.y)}function es(t){return t&&t!=="0%"}function oe(t,e,n){const s=t-n,i=e*s;return n+i}function ns(t,e,n,s,i){return i!==void 0&&(t=oe(t,i,s)),oe(t,n,s)+e}function Xe(t,e=0,n=1,s,i){t.min=ns(t.min,e,n,s,i),t.max=ns(t.max,e,n,s,i)}function to(t,{x:e,y:n}){Xe(t.x,e.translate,e.scale,e.originPoint),Xe(t.y,n.translate,n.scale,n.originPoint)}const ss=.999999999999,is=1.0000000000001;function gl(t,e,n,s=!1){var a;const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let l=0;lss&&(e.x=1),e.yss&&(e.y=1)}function Z(t,e){t.min+=e,t.max+=e}function os(t,e,n,s,i=.5){const r=C(t.min,t.max,i);Xe(t,e,n,r,s)}function rs(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function qt(t,e,n){const s=n??t;os(t.x,rs(e.x,s.x),e.scaleX,e.scale,e.originX),os(t.y,rs(e.y,s.y),e.scaleY,e.scale,e.originY)}function eo(t,e){return Ji(pl(t.getBoundingClientRect(),e))}function yl(t,e,n){const s=eo(t,n),{scroll:i}=e;return i&&(Z(s.x,i.offset.x),Z(s.y,i.offset.y)),s}const vl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xl=Pt.length;function Tl(t,e,n){let s="",i=!0;for(let r=0;r{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=as(t,e.target.x),s=as(t,e.target.y);return`${n}% ${s}%`}},wl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=_.parse(t);if(i.length>5)return s;const r=_.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=C(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},Ye={borderRadius:{...At,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:At,borderTopRightRadius:At,borderBottomLeftRadius:At,borderBottomRightRadius:At,boxShadow:wl};function so(t,{layout:e,layoutId:n}){return bt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ye[t]||t==="opacity")}function Vn(t,e,n){var o;const s=t.style,i=e==null?void 0:e.style,r={};if(!s)return r;for(const a in s)(k(s[a])||i&&k(i[a])||so(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function Sl(t){return window.getComputedStyle(t)}class Pl extends Zi{constructor(){super(...arguments),this.type="html",this.renderInstance=no}readValueFromInstance(e,n){var s;if(bt.has(n))return(s=this.projection)!=null&&s.isProjecting?Fe(n):Ur(e,n);{const i=Sl(e),r=(hi(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return eo(e,n)}build(e,n,s){An(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Vn(e,n,s)}}const bl={offset:"stroke-dashoffset",array:"stroke-dasharray"},Al={offset:"strokeDashoffset",array:"strokeDasharray"};function Vl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?bl:Al;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Cl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function io(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(An(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox);for(const d of Cl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Vl(h,i,r,o,!1)}const oo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),ro=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ml(t,e,n,s){no(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(oo.has(i)?i:yn(i),e.attrs[i])}function ao(t,e,n){const s=Vn(t,e,n);for(const i in t)if(k(t[i])||k(e[i])){const r=Pt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Dl extends Zi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(bt.has(n)){const s=Wi(n);return s&&s.default||0}return n=oo.has(n)?n:yn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return ao(e,n,s)}build(e,n,s){io(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Ml(e,n,s,i)}mount(e){this.isSVGTag=ro(e.tagName),super.mount(e)}}const El=bn.length;function lo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?lo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;nPromise.all(e.map(({animation:n,options:s})=>Ca(t,n,s)))}function Il(t){let e=kl(t),n=ls(),s=!0,i=!1;const r=u=>(c,h)=>{var d;const f=mt(t,h,u==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:m,transitionEnd:y,...p}=f;c={...c,...p,...y}}return c};function o(u){e=u(t)}function a(u){const{props:c}=t,h=lo(t.parent)||{},f=[],d=new Set;let m={},y=1/0;for(let g=0;gy&&P,b=!1;const E=Array.isArray(T)?T:[T];let U=E.reduce(r(x),{});M===!1&&(U={});const{prevResolvedValues:at={}}=v,X={...at,...U},et=F=>{I=!0,d.has(F)&&(b=!0,d.delete(F)),v.needsAnimating[F]=!0;const K=t.getValue(F);K&&(K.liveStyle=!1)};for(const F in X){const K=U[F],lt=at[F];if(m.hasOwnProperty(F))continue;let gt=!1;We(K)&&We(lt)?gt=!co(K,lt):gt=K!==lt,gt?K!=null?et(F):d.add(F):K!==void 0&&d.has(F)?et(F):v.protectedKeys[F]=!0}v.prevProp=T,v.prevResolvedValues=U,v.isActive&&(m={...m,...U}),(s||i)&&t.blockInitialAnimation&&(I=!1);const Y=O&&A;I&&(!Y||b)&&f.push(...E.map(F=>{const K={type:x};if(typeof F=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:lt}=t,gt=mt(lt,F);if(lt.enteringChildren&>){const{delayChildren:Io}=gt.transition||{};K.delay=Li(lt.enteringChildren,t,Io)}}return{animation:F,options:K}}))}if(d.size){const g={};if(typeof c.initial!="boolean"){const x=mt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(g.transition=x.transition)}d.forEach(x=>{const v=t.getBaseTarget(x),T=t.getValue(x);T&&(T.liveStyle=!0),g[x]=v??null}),f.push({animation:g})}let p=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,i=!1,p?e(f):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var m;return(m=d.animationState)==null?void 0:m.setActive(u,c)}),n[u].isActive=c;const h=a(u);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ls(),i=!0}}}function Fl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!co(e,t):!1}function ct(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ls(){return{animate:ct(!0),whileInView:ct(),whileHover:ct(),whileTap:ct(),whileDrag:ct(),whileFocus:ct(),exit:ct()}}function qe(t,e){t.min=e.min,t.max=e.max}function $(t,e){qe(t.x,e.x),qe(t.y,e.y)}function cs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const uo=1e-4,Bl=1-uo,Ol=1+uo,ho=.01,jl=0-ho,Nl=0+ho;function N(t){return t.max-t.min}function Ul(t,e,n){return Math.abs(t-e)<=n}function us(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Bl&&t.scale<=Ol||isNaN(t.scale))&&(t.scale=1),(t.translate>=jl&&t.translate<=Nl||isNaN(t.translate))&&(t.translate=0)}function Et(t,e,n,s){us(t.x,e.x,n.x,s?s.originX:void 0),us(t.y,e.y,n.y,s?s.originY:void 0)}function hs(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+N(e)}function Wl(t,e,n,s){hs(t.x,e.x,n.x,s==null?void 0:s.x),hs(t.y,e.y,n.y,s==null?void 0:s.y)}function fs(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+N(e)}function re(t,e,n,s){fs(t.x,e.x,n.x,s==null?void 0:s.x),fs(t.y,e.y,n.y,s==null?void 0:s.y)}function ds(t,e,n,s,i){return t-=e,t=oe(t,1/n,s),i!==void 0&&(t=oe(t,1/i,s)),t}function Kl(t,e=0,n=1,s=.5,i,r=t,o=t){if(J.test(e)&&(e=parseFloat(e),e=C(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=C(r.min,r.max,s);t===r&&(a-=e),t.min=ds(t.min,e,n,a,i),t.max=ds(t.max,e,n,a,i)}function ms(t,e,[n,s,i],r,o){Kl(t,e[n],e[s],e[i],e.scale,r,o)}const Gl=["x","scaleX","originX"],zl=["y","scaleY","originY"];function ps(t,e,n,s){ms(t.x,e,Gl,n?n.x:void 0,s?s.x:void 0),ms(t.y,e,zl,n?n.y:void 0,s?s.y:void 0)}function gs(t){return t.translate===0&&t.scale===1}function fo(t){return gs(t.x)&&gs(t.y)}function ys(t,e){return t.min===e.min&&t.max===e.max}function $l(t,e){return ys(t.x,e.x)&&ys(t.y,e.y)}function vs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function mo(t,e){return vs(t.x,e.x)&&vs(t.y,e.y)}function xs(t){return N(t.x)/N(t.y)}function Ts(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function Hl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const po=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],_l=po.length,ws=t=>typeof t=="string"?parseFloat(t):t,Ss=t=>typeof t=="number"||w.test(t);function Xl(t,e,n,s,i,r){i?(t.opacity=C(0,n.opacity??1,Yl(s)),t.opacityExit=C(e.opacity??1,0,ql(s))):r&&(t.opacity=C(e.opacity??1,n.opacity??1,s));for(let o=0;o<_l;o++){const a=po[o];let l=Ps(e,a),u=Ps(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Ss(l)===Ss(u)?(t[a]=Math.max(C(ws(l),ws(u),s),0),(J.test(u)||J.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function Ps(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Yl=go(0,.5,oi),ql=go(.5,.95,z);function go(t,e,n){return s=>se?1:n(Lt(t,e,s))}function Zl(t,e,n){const s=k(t)?t:pt(t);return s.start(pn("",s,e,n)),s.animation}function Bt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Jl=(t,e)=>t.depth-e.depth;class Ql{constructor(){this.children=[],this.isDirty=!1}add(e){en(this.children,e),this.isDirty=!0}remove(e){te(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Jl),this.isDirty=!1,this.children.forEach(e)}}function tc(t,e){const n=j.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(tt(s),t(r-e))};return V.setup(s,!0),()=>tt(s)}function Zt(t){return k(t)?t.get():t}class ec{constructor(){this.members=[]}add(e){en(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(te(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(te(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){var n;for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,n){var i;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=s.options,{layoutDependency:o}=e.options;(r===void 0||r!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,i,r,o;(s=(n=e.options).onExitComplete)==null||s.call(n),(o=(i=e.resumingFrom)==null?void 0:(r=i.options).onExitComplete)==null||o.call(r)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Jt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},we=["","X","Y","Z"],nc=1e3;let sc=0;function Se(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function yo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Oi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&yo(s)}function vo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=sc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(rc),this.nodes.forEach(fc),this.nodes.forEach(dc),this.nodes.forEach(ac)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;V.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=tc(f,250),Jt.hasAnimatedSinceResize&&(Jt.hasAnimatedSinceResize=!1,this.nodes.forEach(Vs)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||vc,{onLayoutAnimationStart:y,onLayoutAnimationComplete:p}=u.getProps(),g=!this.targetLayout||!mo(this.targetLayout,d),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...mn(m,"layout"),onPlay:y,onComplete:p};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x)}else h||Vs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(mc),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&yo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!N(this.snapshot.measuredBox.x)&&!N(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const P=T/1e3;Cs(h.x,o.x,P),Cs(h.y,o.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(re(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),gc(this.relativeTarget,this.relativeTargetOrigin,f,P),v&&$l(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=L()),$(v,this.relativeTarget)),y&&(this.animationValues=c,Xl(c,u,this.latestValues,P,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(tt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{Jt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=pt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Zl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&xo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||L();const h=N(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=N(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}$(a,l),qt(a,c),Et(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ec),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Se("z",o,u,this.animationValues);for(let c=0;c{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(bs),this.root.sharedNodes.clear()}}}function ic(t){t.updateLayout()}function oc(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;if(r==="size")q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=N(f);f.min=s[h].min,f.max=f.min+d});else if(r==="x"||r==="y"){const h=r==="x"?"y":"x";qe(o?e.measuredBox[h]:e.layoutBox[h],s[h])}else xo(r,e.layoutBox,s)&&q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=N(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=Tt();Et(a,s,e.layoutBox);const l=Tt();o?Et(l,t.applyTransform(i,!0),e.measuredBox):Et(l,s,e.layoutBox);const u=!fo(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=t.options.layoutAnchor||void 0,y=L();re(y,e.layoutBox,f.layoutBox,m);const p=L();re(p,s,d.layoutBox,m),mo(y,p)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=y,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function rc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ac(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function lc(t){t.clearSnapshot()}function bs(t){t.clearMeasurements()}function cc(t){t.isLayoutDirty=!0,t.updateLayout()}function As(t){t.isLayoutDirty=!1}function uc(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function hc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Vs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function fc(t){t.resolveTargetDelta()}function dc(t){t.calcProjection()}function mc(t){t.resetSkewAndRotation()}function pc(t){t.removeLeadSnapshot()}function Cs(t,e,n){t.translate=C(e.translate,0,n),t.scale=C(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ms(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function gc(t,e,n,s){Ms(t.x,e.x,n.x,s),Ms(t.y,e.y,n.y,s)}function yc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const vc={duration:.45,ease:[.4,0,.1,1]},Ds=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Es=Ds("applewebkit/")&&!Ds("chrome/")?Math.round:z;function Rs(t){t.min=Es(t.min),t.max=Es(t.max)}function xc(t){Rs(t.x),Rs(t.y)}function xo(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ul(xs(e),xs(n),.2)}function Tc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const wc=vo({attachResizeListener:(t,e)=>Bt(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Pe={current:void 0},To=vo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Pe.current){const t=new wc({});t.mount(window),t.setOptions({layoutScroll:!0}),Pe.current=t}return Pe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Ut=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Sc(t=!0){const e=S.useContext(tn);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=S.useId();S.useEffect(()=>{if(t)return i(r)},[t]);const o=S.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const wo=S.createContext({strict:!1}),Ls={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ks=!1;function Pc(){if(ks)return;const t={};for(const e in Ls)t[e]={isEnabled:n=>Ls[e].some(s=>!!n[s])};qi(t),ks=!0}function So(){return Pc(),fl()}function bc(t){const e=So();for(const n in t)e[n]={...e[n],...t[n]};qi(e)}const Ac=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ae(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ac.has(t)}let Po=t=>!ae(t);function Vc(t){typeof t=="function"&&(Po=e=>e.startsWith("on")?!ae(e):t(e))}try{Vc(require("@emotion/is-prop-valid").default)}catch{}function Cc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||k(t[i])||(Po(i)||n===!0&&ae(i)||!e&&!ae(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const he=S.createContext({});function Mc(t,e){if(ue(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ft(n)?n:void 0,animate:Ft(s)?s:void 0}}return t.inherit!==!1?e:{}}function Dc(t){const{initial:e,animate:n}=Mc(t,S.useContext(he));return S.useMemo(()=>({initial:e,animate:n}),[Is(e),Is(n)])}function Is(t){return Array.isArray(t)?t.join(" "):t}const Cn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bo(t,e,n){for(const s in e)!k(e[s])&&!so(s,n)&&(t[s]=e[s])}function Ec({transformTemplate:t},e){return S.useMemo(()=>{const n=Cn();return An(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Rc(t,e){const n=t.style||{},s={};return bo(s,n,t),Object.assign(s,Ec(t,e)),s}function Lc(t,e){const n={},s=Rc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Ao=()=>({...Cn(),attrs:{}});function kc(t,e,n,s){const i=S.useMemo(()=>{const r=Ao();return io(r,e,ro(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};bo(r,t.style,t),i.style={...r,...i.style}}return i}const Ic=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Mn(t){return typeof t!="string"||t.includes("-")?!1:!!(Ic.indexOf(t)>-1||/[A-Z]/u.test(t))}function Fc(t,e,n,{latestValues:s},i,r=!1,o){const l=(o??Mn(t)?kc:Lc)(e,s,i,t),u=Cc(e,typeof t=="string",r),c=t!==S.Fragment?{...u,...l,ref:n}:{},{children:h}=e,f=S.useMemo(()=>k(h)?h.get():h,[h]);return S.createElement(t,{...c,children:f})}function Bc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Oc(n,s,i,t),renderState:e()}}function Oc(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Zt(r[f]);let{initial:o,animate:a}=t;const l=ue(t),u=Xi(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!ce(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d(e,n)=>{const s=S.useContext(he),i=S.useContext(tn),r=()=>Bc(t,e,s,i);return n?r():Qe(r)},jc=Vo({scrapeMotionValuesFromProps:Vn,createRenderState:Cn}),Nc=Vo({scrapeMotionValuesFromProps:ao,createRenderState:Ao}),Uc=Symbol.for("motionComponentSymbol");function Wc(t,e,n){const s=S.useRef(n);S.useInsertionEffect(()=>{s.current=n});const i=S.useRef(null);return S.useCallback(r=>{var a;r&&((a=t.onMount)==null||a.call(t,r));const o=s.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r);e&&(r?e.mount(r):e.unmount())},[e])}const Co=S.createContext({});function yt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Kc(t,e,n,s,i,r){var v,T;const{visualElement:o}=S.useContext(he),a=S.useContext(wo),l=S.useContext(tn),u=S.useContext(Ut),c=u.reducedMotion,h=u.skipAnimations,f=S.useRef(null),d=S.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,y=S.useContext(Co);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Gc(f.current,n,i,y);const p=S.useRef(!1);S.useInsertionEffect(()=>{m&&p.current&&m.update(n,l)});const g=n[Bi],x=S.useRef(!!g&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,g)));return _s(()=>{d.current=!0,m&&(p.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),S.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var P;(P=window.MotionHandoffMarkAsComplete)==null||P.call(window,g)}),x.current=!1),m.enteringChildren=void 0)}),m}function Gc(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Mo(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&yt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function Mo(t){if(t)return t.options.allowProjection!==!1?t.projection:Mo(t.parent)}function be(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&bc(s);const r=n?n==="svg":Mn(t),o=r?Nc:jc;function a(u,c){let h;const f={...S.useContext(Ut),...u,layoutId:zc(u)},{isStatic:d}=f,m=Dc(u),y=o(u,d);if(!d&&typeof window<"u"){$c();const p=Hc(f);h=p.MeasureLayout,m.visualElement=Kc(t,y,f,i,p.ProjectionNode,r)}return Qt.jsxs(he.Provider,{value:m,children:[h&&m.visualElement?Qt.jsx(h,{visualElement:m.visualElement,...f}):null,Fc(t,u,Wc(y,m.visualElement,c),y,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=S.forwardRef(a);return l[Uc]=t,l}function zc({layoutId:t}){const e=S.useContext(Hs).id;return e&&t!==void 0?e+"-"+t:t}function $c(t,e){S.useContext(wo).strict}function Hc(t){const e=So(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(t)||s!=null&&s.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function _c(t,e){if(typeof Proxy>"u")return be;const n=new Map,s=(r,o)=>be(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,be(o,void 0,t,e)),n.get(o))})}const Xc=(t,e)=>e.isSVG??Mn(t)?new Dl(e):new Pl(e,{allowProjection:t!==S.Fragment});class Yc extends rt{constructor(e){super(e),e.animationState||(e.animationState=Il(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ce(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let qc=0;class Zc extends rt{constructor(){super(...arguments),this.id=qc++,this.isExitComplete=!1}update(){var r;if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=mt(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...h}=l;for(const f in h)(r=this.node.getValue(f))==null||r.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Jc={animation:{Feature:Yc},exit:{Feature:Zc}};function Wt(t){return{point:{x:t.pageX,y:t.pageY}}}const Qc=t=>e=>wn(e)&&t(e,Wt(e));function Rt(t,e,n,s){return Bt(t,e,Qc(n),s)}const Do=({current:t})=>t?t.ownerDocument.defaultView:null,Fs=(t,e)=>Math.abs(t-e);function tu(t,e){const n=Fs(t.x,e.x),s=Fs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Bs=new Set(["auto","scroll"]);class Eo{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=zt(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Ae(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=tu(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:p}=d,{timestamp:g}=B;this.history.push({...p,timestamp:g});const{onStart:x,onMove:v}=this.handlers;m||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=zt(m,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:y,onSessionEnd:p,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Ae(d.type==="pointercancel"?this.lastMoveEventInfo:zt(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(d,x),p&&p(d,x)},!wn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const l=Wt(e),u=zt(l,this.transformPagePoint),{point:c}=u,{timestamp:h}=B;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Ae(u,this.history)),this.removeListeners=Ot(Rt(this.contextWindow,"pointermove",this.handlePointerMove),Rt(this.contextWindow,"pointerup",this.handlePointerUp),Rt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Bs.has(s.overflowX)||Bs.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),V.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),tt(this.updatePoint)}}function zt(t,e){return e?{point:e(t.point)}:t}function Os(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ae({point:t},e){return{point:t,delta:Os(t,Ro(e)),offset:Os(t,eu(e)),velocity:nu(e,.1)}}function eu(t){return t[0]}function Ro(t){return t[t.length-1]}function nu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Ro(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>W(e)*2&&(s=t[1]);const r=G(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function su(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?C(n,t,s.max):Math.min(t,n)),t}function js(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function iu(t,{top:e,left:n,bottom:s,right:i}){return{x:js(t.x,n,i),y:js(t.y,e,s)}}function Ns(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=Lt(e.min,e.max-s,t.min):s>i&&(n=Lt(t.min,t.max-i,e.min)),Q(0,1,n)}function au(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Ze=.35;function lu(t=Ze){return t===!1?t=0:t===!0&&(t=Ze),{x:Us(t,"left","right"),y:Us(t,"top","bottom")}}function Us(t,e,n){return{min:Ws(t,e),max:Ws(t,n)}}function Ws(t,e){return typeof t=="number"?t:t[e]||0}const cu=new WeakMap;class uu{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=L(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(Wt(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:y}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ua(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),q(g=>{let x=this.getAxisMotionValue(g).get()||0;if(J.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const T=v.layout.layoutBox[g];T&&(x=N(T)*(parseFloat(x)/100))}}this.originPoint[g]=x}),y&&V.update(()=>y(h,f),!1,!0),Ke(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:y,onDrag:p}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:g}=f;if(m&&this.currentDirection===null){this.currentDirection=fu(g),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),p&&V.update(()=>p(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Eo(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Do(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&V.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!$t(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=su(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,i=this.constraints;e&&yt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=iu(s.layoutBox,e):this.constraints=!1,this.elastic=lu(n),i!==this.constraints&&!yt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&q(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=au(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!yt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=yl(s,i.root,this.visualElement.getTransformPagePoint());let o=ou(i.layout.layoutBox,r);if(n){const a=n(ml(o));this.hasMutatedConstraints=!!a,a&&(o=Ji(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=q(c=>{if(!$t(c,n,this.currentDirection))return;let h=l&&l[c]||{};(o===!0||o===c)&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ke(this.visualElement,e),s.start(pn(e,s,0,n,this.visualElement,!1))}stopAnimation(){q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){q(n=>{const{drag:s}=this.getProps();if(!$t(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=r.get()||0;r.set(e[n]-C(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!yt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};q(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=ru({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),q(o=>{if(!$t(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(C(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;cu.set(this.visualElement,this);const e=this.visualElement.current,n=Rt(e,"pointerdown",u=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=u.target,d=f!==e&&Ha(f);c&&h&&!d&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();yt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=hu(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),V.read(i);const a=Bt(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(q(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Ze,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Ks(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function hu(t,e,n){const s=qn(t,Ks(n)),i=qn(e,Ks(n));return()=>{s(),i()}}function $t(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function fu(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class du extends rt{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new uu(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ve=t=>(e,n)=>{t&&V.update(()=>t(e,n),!1,!0)};class mu extends rt{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new Eo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Do(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ve(e),onStart:Ve(n),onMove:Ve(s),onEnd:(r,o)=>{delete this.session,i&&V.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Rt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ce=!1;class pu extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),Ce&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Jt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Ce=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||V.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Tn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ce=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Lo(t){const[e,n]=Sc(),s=S.useContext(Hs);return Qt.jsx(pu,{...t,layoutGroup:s,switchLayoutGroup:S.useContext(Co),isPresent:e,safeToRemove:n})}const gu={pan:{Feature:mu},drag:{Feature:du,ProjectionNode:To,MeasureLayout:Lo}};function Gs(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&V.postRender(()=>r(e,Wt(e)))}class yu extends rt{mount(){const{current:e}=this.node;e&&(this.unmount=Ka(e,(n,s)=>(Gs(this.node,s,"Start"),i=>Gs(this.node,i,"End"))))}unmount(){}}class vu extends rt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ot(Bt(this.node.current,"focus",()=>this.onFocus()),Bt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function zs(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&V.postRender(()=>r(e,Wt(e)))}class xu extends rt{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Xa(e,(i,r)=>(zs(this.node,r,"Start"),(o,{success:a})=>zs(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const Je=new WeakMap,Me=new WeakMap,Tu=t=>{const e=Je.get(t.target);e&&e(t)},wu=t=>{t.forEach(Tu)};function Su({root:t,...e}){const n=t||document;Me.has(n)||Me.set(n,{});const s=Me.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(wu,{root:t,...e})),s[i]}function Pu(t,e,n){const s=Su(e);return Je.set(t,n),s.observe(t),()=>{Je.delete(t),s.unobserve(t)}}const bu={some:0,all:1};class Au extends rt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:bu[i]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),d=c?h:f;d&&d(u)};this.stopObserver=Pu(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Vu(e,n))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Vu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Cu={inView:{Feature:Au},tap:{Feature:xu},focus:{Feature:vu},hover:{Feature:yu}},Mu={layout:{ProjectionNode:To,MeasureLayout:Lo}},Du={...Jc,...Cu,...gu,...Mu},Uu=_c(Du,Xc);function Dn(t){const e=Qe(()=>pt(t)),{isStatic:n}=S.useContext(Ut);if(n){const[,s]=S.useState(t);S.useEffect(()=>e.on("change",s),[])}return e}function ko(t,e){const n=Dn(e()),s=()=>n.set(e());return s(),_s(()=>{const i=()=>V.preRender(s,!1,!0),r=t.map(o=>o.on("change",i));return()=>{r.forEach(o=>o()),tt(s)}}),n}function Eu(t){Dt.current=[],t();const e=ko(Dt.current,t);return Dt.current=void 0,e}function Ru(t,e,n,s){if(typeof t=="function")return Eu(t);const r=typeof e=="function"?e:il(e,n,s),o=Array.isArray(t)?$s(t,r):$s([t],([l])=>r(l)),a=Array.isArray(t)?void 0:t.accelerate;return a&&!a.isTransformed&&typeof e!="function"&&Array.isArray(n)&&(s==null?void 0:s.clamp)!==!1&&(o.accelerate={...a,times:e,keyframes:n,isTransformed:!0}),o}function $s(t,e){const n=Qe(()=>[]);return ko(t,()=>{n.length=0;const s=t.length;for(let i=0;ik(t)?t.get():t;if(n)return Ru(s);const i=Dn(s());return S.useInsertionEffect(()=>ol(i,t,e),[i,JSON.stringify(e)]),i}function ku(t,e={}){return Lu(t,{type:"spring",...e})}function Wu(t){const e=S.useRef(0),{isStatic:n}=S.useContext(Ut);S.useEffect(()=>{if(n)return;const s=({timestamp:i,delta:r})=>{e.current||(e.current=i),t(i-e.current,r)};return V.update(s,!0),()=>tt(s)},[t])}const Iu={some:0,all:1};function Fu(t,e,{root:n,margin:s,amount:i="some"}={}){const r=xn(t),o=new WeakMap,a=u=>{u.forEach(c=>{const h=o.get(c.target);if(c.isIntersecting!==!!h)if(c.isIntersecting){const f=e(c.target,c);typeof f=="function"?o.set(c.target,f):l.unobserve(c.target)}else typeof h=="function"&&(h(c),o.delete(c.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:Iu[i]});return r.forEach(u=>l.observe(u)),()=>l.disconnect()}function Bu(t,{root:e,margin:n,amount:s,once:i=!1,initial:r=!1}={}){const[o,a]=S.useState(r);return S.useEffect(()=>{if(!t.current||i&&o)return;const l=()=>(a(!0),i?void 0:()=>a(!1)),u={root:e&&e.current||void 0,margin:n,amount:s};return Fu(t.current,l,u)},[e,t,n,i,s]),o}function Ku({to:t,from:e=0,direction:n="up",delay:s=0,duration:i=2,className:r="",startWhen:o=!0,separator:a="",onStart:l,onEnd:u}){const c=S.useRef(null),h=Dn(n==="down"?t:e),f=20+40*(1/i),d=100*(1/i),m=ku(h,{damping:f,stiffness:d}),y=Bu(c,{once:!0,margin:"0px"}),p=v=>{const T=v.toString();if(T.includes(".")){const P=T.split(".")[1];if(parseInt(P)!==0)return P.length}return 0},g=Math.max(p(e),p(t)),x=S.useCallback(v=>{const T=g>0,P={useGrouping:!!a,minimumFractionDigits:T?g:0,maximumFractionDigits:T?g:0},M=Intl.NumberFormat("en-US",P).format(v);return a?M.replace(/,/g,a):M},[g,a]);return S.useEffect(()=>{c.current&&(c.current.textContent=x(n==="down"?t:e))},[e,t,n,x]),S.useEffect(()=>{if(y&&o){typeof l=="function"&&l();const v=setTimeout(()=>{h.set(n==="down"?e:t)},s*1e3),T=setTimeout(()=>{typeof u=="function"&&u()},s*1e3+i*1e3);return()=>{clearTimeout(v),clearTimeout(T)}}},[y,o,h,n,e,t,s,l,u,i]),S.useEffect(()=>{const v=m.on("change",T=>{c.current&&(c.current.textContent=x(T))});return()=>v()},[m,x]),Qt.jsx("span",{className:r,ref:c})}export{Ku as C,Wu as a,Ru as b,Uu as m,Dn as u}; diff --git a/dist/assets/Dashboard-B4CiAg5B.js b/dist/assets/Dashboard-B4CiAg5B.js new file mode 100644 index 0000000..90e9399 --- /dev/null +++ b/dist/assets/Dashboard-B4CiAg5B.js @@ -0,0 +1 @@ +import{r as n,j as e,u as M,Q as $,L as k,g as _,d as I,z}from"./index-Drgd7k5E.js";import{S}from"./SpotlightCard-C_ZqQ-j4.js";import{u as A,a as F,C as q}from"./CountUp-Omm8FlHl.js";import{m as K}from"./proxy-BOtdvQpP.js";import{u as Q}from"./use-animation-frame-BTI5WVkr.js";import{u as W}from"./useTranslation-B7WzaWp0.js";const B=({text:s,disabled:t=!1,speed:v=2,className:r="",color:m="#b5b5b5",shineColor:p="#ffffff",spread:g=120,yoyo:j=!1,pauseOnHover:d=!1,direction:u="left",delay:w=0})=>{const[N,b]=n.useState(!1),o=A(0),x=n.useRef(0),a=n.useRef(null),l=n.useRef(u==="left"?1:-1),c=v*1e3,R=w*1e3;Q(f=>{if(t||N){a.current=null;return}if(a.current===null){a.current=f;return}const P=f-a.current;if(a.current=f,x.current+=P,j){const h=c+R,y=h*2,i=x.current%y;if(i{l.current=u==="left"?1:-1,x.current=0,o.set(0)},[u]);const D=F(o,f=>`${150-f*2}% center`),U=n.useCallback(()=>{d&&b(!0)},[d]),L=n.useCallback(()=>{d&&b(!1)},[d]),E={backgroundImage:`linear-gradient(${g}deg, ${m} 0%, ${m} 35%, ${p} 50%, ${m} 65%, ${m} 100%)`,backgroundSize:"200% auto",WebkitBackgroundClip:"text",backgroundClip:"text",WebkitTextFillColor:"transparent"};return e.jsx(K.span,{className:`inline-block ${r}`,style:{...E,backgroundPosition:D},onMouseEnter:U,onMouseLeave:L,children:s})};function H(){const{t:s}=W(),{user:t,refreshUser:v}=M(),[r,m]=n.useState(null),[p,g]=n.useState(""),[j,d]=n.useState(!1),u=async()=>{try{const a=await _();a.data.success&&m(a.data.data)}catch{}};n.useEffect(()=>{u()},[]);const w=async a=>{if(a.preventDefault(),!!p.trim()){d(!0);try{(await I(p.trim())).data.success&&(z.success(s("dashboard.redeemSuccess")),g(""),await Promise.all([u(),v()]))}catch{}d(!1)}},N=(r==null?void 0:r.quota)??(t==null?void 0:t.quota)??0,b=(r==null?void 0:r.used_quota)??(t==null?void 0:t.used_quota)??0,o=(r==null?void 0:r.request_count)??(t==null?void 0:t.request_count)??0,x=N/$;return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs("h1",{className:"text-2xl font-heading font-bold text-white mb-1",children:[s("dashboard.welcome")," ",e.jsx(B,{text:(t==null?void 0:t.display_name)||(t==null?void 0:t.username)||"User",className:"!inline",speed:3,color:"#a5b4fc",shineColor:"#e0e7ff"})]}),e.jsx("p",{className:"text-sm text-neutral-400",children:s("dashboard.manageDesc")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-10",children:[e.jsxs(S,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(34,197,94,0.15)",children:[e.jsx("p",{className:"text-sm text-neutral-400 mb-2",children:s("dashboard.balance")}),e.jsxs("div",{className:"text-3xl font-bold text-white",children:["$",e.jsx(q,{from:0,to:x,duration:1.5})]}),e.jsx("p",{className:"text-xs text-neutral-500 mt-1",children:s("dashboard.quotaUnits",{count:N.toLocaleString()})})]}),e.jsxs(S,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(129,140,248,0.15)",children:[e.jsx("p",{className:"text-sm text-neutral-400 mb-2",children:s("dashboard.used")}),e.jsxs("div",{className:"text-3xl font-bold text-white",children:["$",e.jsx(q,{from:0,to:b/$,duration:1.5})]}),e.jsx("p",{className:"text-xs text-neutral-500 mt-1",children:s("dashboard.quotaUnits",{count:b.toLocaleString()})})]}),e.jsxs(S,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(244,114,182,0.15)",children:[e.jsx("p",{className:"text-sm text-neutral-400 mb-2",children:s("dashboard.totalRequests")}),e.jsx("div",{className:"text-3xl font-bold text-white",children:e.jsx(q,{from:0,to:o,duration:1.5})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:s("dashboard.redeemCode")}),e.jsxs("form",{onSubmit:w,className:"flex gap-3",children:[e.jsx("input",{type:"text",value:p,onChange:a=>g(a.target.value),className:"input flex-1",placeholder:s("dashboard.enterCode")}),e.jsx("button",{type:"submit",disabled:j,className:"btn-primary whitespace-nowrap",children:s(j?"dashboard.redeeming":"dashboard.redeem")})]})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:s("dashboard.quickLinks")}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs(k,{to:"/tokens",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-white/[0.06] transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-white group-hover:text-brand-400 transition-colors",children:s("dashboard.apiKeys")}),e.jsx("p",{className:"text-xs text-neutral-500",children:s("dashboard.manageKeys")})]}),e.jsxs(k,{to:"/packages",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-white/[0.06] transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-white group-hover:text-brand-400 transition-colors",children:s("dashboard.packages")}),e.jsx("p",{className:"text-xs text-neutral-500",children:s("dashboard.viewPlans")})]}),e.jsxs(k,{to:"/pricing",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-white/[0.06] transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-white group-hover:text-brand-400 transition-colors",children:s("dashboard.pricing")}),e.jsx("p",{className:"text-xs text-neutral-500",children:s("dashboard.modelPrices")})]}),e.jsxs("div",{className:"glass-sm !rounded-xl px-4 py-3 opacity-50",children:[e.jsx("p",{className:"text-sm font-medium text-white",children:s("dashboard.apiDocs")}),e.jsx("p",{className:"text-xs text-neutral-500",children:s("dashboard.comingSoon")})]})]})]})]})]})}export{H as default}; diff --git a/dist/assets/Dashboard-Djts405O.js b/dist/assets/Dashboard-Djts405O.js deleted file mode 100644 index 06e1600..0000000 --- a/dist/assets/Dashboard-Djts405O.js +++ /dev/null @@ -1 +0,0 @@ -import{r as n,j as e,u as I,Q as $,L as k,e as L,f as A,z as _}from"./index-CJw6IpTa.js";import{S as R}from"./SpotlightCard-lt5CQbhM.js";import{u as z,a as Q,b as W,m as B,C as S}from"./CountUp-SCQ6rVWn.js";const F=({text:s,disabled:v=!1,speed:a=2,className:w="",color:l="#b5b5b5",shineColor:p="#ffffff",spread:f=120,yoyo:g=!1,pauseOnHover:i=!1,direction:m="left",delay:b=0})=>{const[j,N]=n.useState(!1),r=z(0),t=n.useRef(0),d=n.useRef(null),u=n.useRef(m==="left"?1:-1),o=a*1e3,q=b*1e3;Q(h=>{if(v||j){d.current=null;return}if(d.current===null){d.current=h;return}const E=h-d.current;if(d.current=h,t.current+=E,g){const x=o+q,y=x*2,c=t.current%y;if(c{u.current=m==="left"?1:-1,t.current=0,r.set(0)},[m]);const P=W(r,h=>`${150-h*2}% center`),D=n.useCallback(()=>{i&&N(!0)},[i]),M=n.useCallback(()=>{i&&N(!1)},[i]),U={backgroundImage:`linear-gradient(${f}deg, ${l} 0%, ${l} 35%, ${p} 50%, ${l} 65%, ${l} 100%)`,backgroundSize:"200% auto",WebkitBackgroundClip:"text",backgroundClip:"text",WebkitTextFillColor:"transparent"};return e.jsx(B.span,{className:`inline-block ${w}`,style:{...U,backgroundPosition:P},onMouseEnter:D,onMouseLeave:M,children:s})};function J(){const{user:s,refreshUser:v}=I(),[a,w]=n.useState(null),[l,p]=n.useState(""),[f,g]=n.useState(!1),i=async()=>{try{const t=await L();t.data.success&&w(t.data.data)}catch{}};n.useEffect(()=>{i()},[]);const m=async t=>{if(t.preventDefault(),!!l.trim()){g(!0);try{(await A(l.trim())).data.success&&(_.success("Code redeemed successfully!"),p(""),await Promise.all([i(),v()]))}catch{}g(!1)}},b=(a==null?void 0:a.quota)??(s==null?void 0:s.quota)??0,j=(a==null?void 0:a.used_quota)??(s==null?void 0:s.used_quota)??0,N=(a==null?void 0:a.request_count)??(s==null?void 0:s.request_count)??0,r=b/$;return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs("h1",{className:"text-2xl font-heading font-bold text-white mb-1",children:["Welcome, ",e.jsx(F,{text:(s==null?void 0:s.display_name)||(s==null?void 0:s.username)||"User",className:"!inline",speed:3,color:"#a5b4fc",shineColor:"#e0e7ff"})]}),e.jsx("p",{className:"text-sm text-neutral-400",children:"Manage your API usage, keys, and account"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-10",children:[e.jsxs(R,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(34,197,94,0.15)",children:[e.jsx("p",{className:"text-sm text-neutral-400 mb-2",children:"Balance"}),e.jsxs("div",{className:"text-3xl font-bold text-white",children:["$",e.jsx(S,{from:0,to:r,duration:1.5})]}),e.jsxs("p",{className:"text-xs text-neutral-500 mt-1",children:[b.toLocaleString()," quota units"]})]}),e.jsxs(R,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(129,140,248,0.15)",children:[e.jsx("p",{className:"text-sm text-neutral-400 mb-2",children:"Used"}),e.jsxs("div",{className:"text-3xl font-bold text-white",children:["$",e.jsx(S,{from:0,to:j/$,duration:1.5})]}),e.jsxs("p",{className:"text-xs text-neutral-500 mt-1",children:[j.toLocaleString()," quota units"]})]}),e.jsxs(R,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(244,114,182,0.15)",children:[e.jsx("p",{className:"text-sm text-neutral-400 mb-2",children:"Total Requests"}),e.jsx("div",{className:"text-3xl font-bold text-white",children:e.jsx(S,{from:0,to:N,duration:1.5})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"Redeem Code"}),e.jsxs("form",{onSubmit:m,className:"flex gap-3",children:[e.jsx("input",{type:"text",value:l,onChange:t=>p(t.target.value),className:"input flex-1",placeholder:"Enter redemption code"}),e.jsx("button",{type:"submit",disabled:f,className:"btn-primary whitespace-nowrap",children:f?"Redeeming...":"Redeem"})]})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"Quick Links"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs(k,{to:"/tokens",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-white/[0.06] transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-white group-hover:text-brand-400 transition-colors",children:"API Keys"}),e.jsx("p",{className:"text-xs text-neutral-500",children:"Manage your keys"})]}),e.jsxs(k,{to:"/packages",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-white/[0.06] transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-white group-hover:text-brand-400 transition-colors",children:"Packages"}),e.jsx("p",{className:"text-xs text-neutral-500",children:"View plans"})]}),e.jsxs(k,{to:"/pricing",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-white/[0.06] transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-white group-hover:text-brand-400 transition-colors",children:"Pricing"}),e.jsx("p",{className:"text-xs text-neutral-500",children:"Model prices"})]}),e.jsxs("div",{className:"glass-sm !rounded-xl px-4 py-3 opacity-50",children:[e.jsx("p",{className:"text-sm font-medium text-white",children:"API Docs"}),e.jsx("p",{className:"text-xs text-neutral-500",children:"Coming soon"})]})]})]})]})]})}export{J as default}; diff --git a/dist/assets/Home-CmajF1bj.js b/dist/assets/Home-CmajF1bj.js new file mode 100644 index 0000000..faa0936 --- /dev/null +++ b/dist/assets/Home-CmajF1bj.js @@ -0,0 +1,62 @@ +import{r as d,j as t,u as ee,a as te,l as se,k as re,L as F}from"./index-Drgd7k5E.js";import{T as ne,a as Z,V as T,R as oe,G as ae,P as ie,M as le}from"./Mesh-CwXV3WjE.js";import{m as ce}from"./proxy-BOtdvQpP.js";import{C as de}from"./CountUp-Omm8FlHl.js";import{u as me}from"./useTranslation-B7WzaWp0.js";const ue=new Z,he=new T,fe=new T;class xe extends ne{constructor(e,{near:o=.1,far:i=100,fov:c=45,aspect:u=1,left:x,right:h,bottom:r,top:k,zoom:b=1}={}){super(),Object.assign(this,{near:o,far:i,fov:c,aspect:u,left:x,right:h,bottom:r,top:k,zoom:b}),this.projectionMatrix=new Z,this.viewMatrix=new Z,this.projectionViewMatrix=new Z,this.worldPosition=new T,this.type=x||h?"orthographic":"perspective",this.type==="orthographic"?this.orthographic():this.perspective()}perspective({near:e=this.near,far:o=this.far,fov:i=this.fov,aspect:c=this.aspect}={}){return Object.assign(this,{near:e,far:o,fov:i,aspect:c}),this.projectionMatrix.fromPerspective({fov:i*(Math.PI/180),aspect:c,near:e,far:o}),this.type="perspective",this}orthographic({near:e=this.near,far:o=this.far,left:i=this.left||-1,right:c=this.right||1,bottom:u=this.bottom||-1,top:x=this.top||1,zoom:h=this.zoom}={}){return Object.assign(this,{near:e,far:o,left:i,right:c,bottom:u,top:x,zoom:h}),i/=h,c/=h,u/=h,x/=h,this.projectionMatrix.fromOrthogonal({left:i,right:c,bottom:u,top:x,near:e,far:o}),this.type="orthographic",this}updateMatrixWorld(){return super.updateMatrixWorld(),this.viewMatrix.inverse(this.worldMatrix),this.worldMatrix.getTranslation(this.worldPosition),this.projectionViewMatrix.multiply(this.projectionMatrix,this.viewMatrix),this}updateProjectionMatrix(){return this.type==="perspective"?this.perspective():this.orthographic()}lookAt(e){return super.lookAt(e,!0),this}project(e){return e.applyMatrix4(this.viewMatrix),e.applyMatrix4(this.projectionMatrix),this}unproject(e){return e.applyMatrix4(ue.inverse(this.projectionMatrix)),e.applyMatrix4(this.worldMatrix),this}updateFrustum(){this.frustum||(this.frustum=[new T,new T,new T,new T,new T,new T]);const e=this.projectionViewMatrix;this.frustum[0].set(e[3]-e[0],e[7]-e[4],e[11]-e[8]).constant=e[15]-e[12],this.frustum[1].set(e[3]+e[0],e[7]+e[4],e[11]+e[8]).constant=e[15]+e[12],this.frustum[2].set(e[3]+e[1],e[7]+e[5],e[11]+e[9]).constant=e[15]+e[13],this.frustum[3].set(e[3]-e[1],e[7]-e[5],e[11]-e[9]).constant=e[15]-e[13],this.frustum[4].set(e[3]-e[2],e[7]-e[6],e[11]-e[10]).constant=e[15]-e[14],this.frustum[5].set(e[3]+e[2],e[7]+e[6],e[11]+e[10]).constant=e[15]+e[14];for(let o=0;o<6;o++){const i=1/this.frustum[o].distance();this.frustum[o].multiply(i),this.frustum[o].constant*=i}}frustumIntersectsMesh(e,o=e.worldMatrix){if(!e.geometry.attributes.position||((!e.geometry.bounds||e.geometry.bounds.radius===1/0)&&e.geometry.computeBoundingSphere(),!e.geometry.bounds))return!0;const i=he;i.copy(e.geometry.bounds.center),i.applyMatrix4(o);const c=e.geometry.bounds.radius*o.getMaxScaleOnAxis();return this.frustumIntersectsSphere(i,c)}frustumIntersectsSphere(e,o){const i=fe;for(let c=0;c<6;c++){const u=this.frustum[c];if(i.copy(u).dot(e)+u.constant<-o)return!1}return!0}}const pe=["#ffffff","#ffffff","#ffffff"],ge=s=>{s=s.replace(/^#/,""),s.length===3&&(s=s.split("").map(u=>u+u).join(""));const e=parseInt(s,16),o=(e>>16&255)/255,i=(e>>8&255)/255,c=(e&255)/255;return[o,i,c]},ve=` + attribute vec3 position; + attribute vec4 random; + attribute vec3 color; + + uniform mat4 modelMatrix; + uniform mat4 viewMatrix; + uniform mat4 projectionMatrix; + uniform float uTime; + uniform float uSpread; + uniform float uBaseSize; + uniform float uSizeRandomness; + + varying vec4 vRandom; + varying vec3 vColor; + + void main() { + vRandom = random; + vColor = color; + + vec3 pos = position * uSpread; + pos.z *= 10.0; + + vec4 mPos = modelMatrix * vec4(pos, 1.0); + float t = uTime; + mPos.x += sin(t * random.z + 6.28 * random.w) * mix(0.1, 1.5, random.x); + mPos.y += sin(t * random.y + 6.28 * random.x) * mix(0.1, 1.5, random.w); + mPos.z += sin(t * random.w + 6.28 * random.y) * mix(0.1, 1.5, random.z); + + vec4 mvPos = viewMatrix * mPos; + + if (uSizeRandomness == 0.0) { + gl_PointSize = uBaseSize; + } else { + gl_PointSize = (uBaseSize * (1.0 + uSizeRandomness * (random.x - 0.5))) / length(mvPos.xyz); + } + + gl_Position = projectionMatrix * mvPos; + } +`,be=` + precision highp float; + + uniform float uTime; + uniform float uAlphaParticles; + varying vec4 vRandom; + varying vec3 vColor; + + void main() { + vec2 uv = gl_PointCoord.xy; + float d = length(uv - vec2(0.5)); + + if(uAlphaParticles < 0.5) { + if(d > 0.5) { + discard; + } + gl_FragColor = vec4(vColor + 0.2 * sin(uv.yxx + uTime + vRandom.y * 6.28), 1.0); + } else { + float circle = smoothstep(0.5, 0.4, d) * 0.8; + gl_FragColor = vec4(vColor + 0.2 * sin(uv.yxx + uTime + vRandom.y * 6.28), circle); + } + } +`,we=({particleCount:s=200,particleSpread:e=10,speed:o=.1,particleColors:i,moveParticlesOnHover:c=!1,particleHoverFactor:u=1,alphaParticles:x=!1,particleBaseSize:h=100,sizeRandomness:r=1,cameraDistance:k=20,disableRotation:b=!1,pixelRatio:L=1,className:q})=>{const H=d.useRef(null),p=d.useRef({x:0,y:0});return d.useEffect(()=>{const w=H.current;if(!w)return;const M=new oe({dpr:L,depth:!1,alpha:!0}),N=M.gl;w.appendChild(N.canvas),N.clearColor(0,0,0,0);const S=new xe(N,{fov:15});S.position.set(0,0,k);const V=()=>{const g=w.clientWidth,f=w.clientHeight;M.setSize(g,f),S.perspective({aspect:N.canvas.width/N.canvas.height})};window.addEventListener("resize",V,!1),V();const J=g=>{const f=w.getBoundingClientRect(),D=(g.clientX-f.left)/f.width*2-1,E=-((g.clientY-f.top)/f.height*2-1);p.current={x:D,y:E}};c&&w.addEventListener("mousemove",J);const A=s,P=new Float32Array(A*3),R=new Float32Array(A*4),I=new Float32Array(A*3),U=i&&i.length>0?i:pe;for(let g=0;g1||Y===0);const X=Math.cbrt(Math.random());P.set([f*X,D*X,E*X],g*3),R.set([Math.random(),Math.random(),Math.random(),Math.random()],g*4);const O=ge(U[Math.floor(Math.random()*U.length)]);I.set(O,g*3)}const B=new ae(N,{position:{size:3,data:P},random:{size:4,data:R},color:{size:3,data:I}}),$=new ie(N,{vertex:ve,fragment:be,uniforms:{uTime:{value:0},uSpread:{value:e},uBaseSize:{value:h*L},uSizeRandomness:{value:r},uAlphaParticles:{value:x?1:0}},transparent:!0,depthTest:!1}),z=new le(N,{mode:N.POINTS,geometry:B,program:$});let j,_=performance.now(),C=0;const W=g=>{j=requestAnimationFrame(W);const f=g-_;_=g,C+=f*o,$.uniforms.uTime.value=C*.001,c?(z.position.x=-p.current.x*u,z.position.y=-p.current.y*u):(z.position.x=0,z.position.y=0),b||(z.rotation.x=Math.sin(C*2e-4)*.1,z.rotation.y=Math.cos(C*5e-4)*.15,z.rotation.z+=.01*o),M.render({scene:z,camera:S})};return j=requestAnimationFrame(W),()=>{window.removeEventListener("resize",V),c&&w.removeEventListener("mousemove",J),cancelAnimationFrame(j),w.contains(N.canvas)&&w.removeChild(N.canvas)}},[s,e,o,c,u,x,h,r,k,b,L]),t.jsx("div",{ref:H,className:`relative w-full h-full ${q}`})};function je({text:s,speed:e=50,maxIterations:o=10,sequential:i=!1,revealDirection:c="start",useOriginalCharsOnly:u=!1,characters:x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+",className:h="",parentClassName:r="",encryptedClassName:k="",animateOn:b="hover",clickMode:L="once",...q}){const[H,p]=d.useState(s),[w,M]=d.useState(!1),[N,S]=d.useState(new Set),[V,J]=d.useState(!1),[A,P]=d.useState(b!=="click"),[R,I]=d.useState("forward"),U=d.useRef(null),B=d.useRef([]),$=d.useRef(0),z=d.useMemo(()=>u?Array.from(new Set(s.split(""))).filter(a=>a!==" "):x.split(""),[u,s,x]),j=d.useCallback((a,m)=>a.split("").map((v,n)=>v===" "?" ":m.has(n)?a[n]:z[Math.floor(Math.random()*z.length)]).join(""),[z]),_=d.useCallback(a=>{const m=[];if(a<=0)return m;if(c==="start"){for(let l=0;l=0;l--)m.push(l);return m}const v=Math.floor(a/2);let n=0;for(;m.length=0&&l=0&&l{const a=new Set;for(let m=0;m{const v=Array.from(a);for(let n=0;n0;n++){const l=Math.floor(Math.random()*v.length);v.splice(l,1)}return new Set(v)},[]),g=d.useCallback(()=>{const a=new Set;S(a),p(j(s,a)),P(!1)},[s,j]),f=d.useCallback(()=>{i?(B.current=_(s.length),$.current=0,S(new Set)):S(new Set),I("forward"),M(!0)},[i,_,s.length]),D=d.useCallback(()=>{i?(B.current=_(s.length).slice().reverse(),$.current=0,S(C()),p(j(s,C()))):(S(C()),p(j(s,C()))),I("reverse"),M(!0)},[i,_,C,j,s]);d.useEffect(()=>{if(!w)return;let a,m=0;const v=n=>{const l=s.length;switch(c){case"start":return n.size;case"end":return l-1-n.size;case"center":{const y=Math.floor(l/2),G=Math.floor(n.size/2),K=n.size%2===0?y+G:y-G-1;if(K>=0&&K{S(n=>{if(i){if(R==="forward")if(n.size=o&&(clearInterval(a),M(!1),p(s),P(!0)),n;if(R==="reverse"){let l=n;l.size===0&&(l=C());const y=Math.max(1,Math.ceil(s.length/Math.max(1,o))),G=W(l,y);return p(j(s,G)),m++,G.size===0||m>=o?(clearInterval(a),M(!1),P(!1),p(j(s,new Set)),new Set):G}}return n})},e),()=>clearInterval(a)},[w,s,e,o,i,c,j,R,C,W,x,u]);const E=()=>{if(b==="click"){if(L==="once"){if(A)return;I("forward"),f()}L==="toggle"&&(A?D():(I("forward"),f()))}},Y=d.useCallback(()=>{w||(S(new Set),P(!1),p(s),I("forward"),M(!0))},[w,s]),X=d.useCallback(()=>{M(!1),S(new Set),p(s),P(!0),I("forward")},[s]);d.useEffect(()=>{if(b!=="view"&&b!=="inViewHover")return;const a=l=>{l.forEach(y=>{y.isIntersecting&&!V&&(f(),J(!0))})},m={root:null,rootMargin:"0px",threshold:.1},v=new IntersectionObserver(a,m),n=U.current;return n&&v.observe(n),()=>{n&&v.unobserve(n)}},[b,V,f]),d.useEffect(()=>{b==="click"?g():(p(s),P(!0)),S(new Set),I("forward")},[b,s,g]);const O=b==="hover"||b==="inViewHover"?{onMouseEnter:Y,onMouseLeave:X}:b==="click"?{onClick:E}:{};return t.jsxs(ce.span,{ref:U,className:`inline-block whitespace-pre-wrap ${r}`,...O,...q,children:[t.jsx("span",{className:"sr-only",children:H}),t.jsx("span",{"aria-hidden":"true",children:H.split("").map((a,m)=>{const v=N.has(m)||!w&&A;return t.jsx("span",{className:v?h:k,children:a},m)})})]})}function Pe(){const{t:s}=me(),{user:e}=ee(),{site:o}=te(),[i,c]=d.useState([]),[u,x]=d.useState([]);d.useEffect(()=>{se().then(r=>{r.data.success&&c(r.data.data||[])}).catch(()=>{}),re().then(r=>{r.data.success&&x(r.data.data||[])}).catch(()=>{})},[]);const h=i.filter(r=>r.enabled!==!1);return t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-0 h-[800px] overflow-hidden pointer-events-none",children:t.jsx(we,{particleColors:["#00ff88","#00ccff","#ff0055"],particleCount:80,particleSpread:15,speed:.3,particleBaseSize:80,moveParticlesOnHover:!0,alphaParticles:!1,disableRotation:!1})}),t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 pt-28 pb-24",children:[t.jsxs("div",{className:"text-center max-w-4xl mx-auto",children:[t.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full border border-green-500/30 bg-green-500/5 mb-8",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),t.jsx("span",{className:"text-xs font-mono text-green-400 uppercase tracking-wider",children:"System Online"})]}),t.jsx("h1",{className:"text-5xl md:text-7xl font-heading font-extrabold text-white leading-tight mb-4",children:t.jsx(je,{text:(o==null?void 0:o.name)||s("home.defaultHeroTitle"),speed:60,maxIterations:10,revealDirection:"start",className:"text-white",encryptedClassName:"text-green-500/40"})}),t.jsxs("p",{className:"text-lg md:text-xl text-neutral-400 max-w-2xl mx-auto mb-10 font-mono",children:["> ",s("home.heroSubtitle")]}),t.jsx("div",{className:"flex items-center justify-center gap-4",children:e?t.jsx(F,{to:"/dashboard",className:"px-8 py-3.5 rounded-lg bg-green-500 text-black font-bold text-base hover:bg-green-400 transition-all font-mono shadow-lg shadow-green-500/20",children:s("home.goToDashboard")}):t.jsxs(t.Fragment,{children:[t.jsx(F,{to:"/register",className:"px-8 py-3.5 rounded-lg bg-green-500 text-black font-bold text-base hover:bg-green-400 transition-all font-mono shadow-lg shadow-green-500/20",children:s("home.getStarted")}),t.jsx(F,{to:"/pricing",className:"px-8 py-3.5 rounded-lg border border-green-500/30 text-green-400 font-bold text-base hover:bg-green-500/10 transition-all font-mono",children:s("home.viewPricing")})]})})]}),t.jsx("div",{className:"grid grid-cols-3 gap-4 max-w-2xl mx-auto mt-20",children:[{label:s("home.aiModels"),value:h.length||50,suffix:"+",color:"text-green-400 border-green-500/20"},{label:s("home.uptime"),value:99.9,suffix:"%",color:"text-cyan-400 border-cyan-500/20"},{label:s("home.latency"),value:50,suffix:"ms",prefix:"<",color:"text-pink-400 border-pink-500/20"}].map((r,k)=>t.jsxs("div",{className:`text-center p-4 rounded-lg bg-black/60 border ${r.color} font-mono`,children:[t.jsxs("div",{className:`text-3xl font-bold ${r.color.split(" ")[0]}`,children:[r.prefix,t.jsx(de,{from:0,to:r.value,duration:2}),r.suffix]}),t.jsx("p",{className:"text-xs text-neutral-500 mt-1 uppercase tracking-wider",children:r.label})]},k))})]}),t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[t.jsxs("div",{className:"text-center mb-14",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:s("home.whyChooseUs")}),t.jsx("p",{className:"text-neutral-500 font-mono",children:s("home.whyChooseUsDesc")})]}),t.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{icon:"⚡",title:s("home.lightningFast"),desc:s("home.lightningFastDesc"),accent:"green"},{icon:"🛡️",title:s("home.securePrivate"),desc:s("home.securePrivateDesc"),accent:"cyan"},{icon:"📊",title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc"),accent:"pink"}].map((r,k)=>t.jsxs("div",{className:`p-6 rounded-xl bg-black/40 border border-${r.accent}-500/20 hover:border-${r.accent}-500/40 transition-all group`,children:[t.jsx("div",{className:"text-2xl mb-3",children:r.icon}),t.jsx("h3",{className:`text-lg font-semibold text-${r.accent}-400 mb-2 font-mono`,children:r.title}),t.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:r.desc}),t.jsx("div",{className:`h-0.5 w-0 group-hover:w-full bg-${r.accent}-500/50 transition-all duration-500 mt-4`})]},k))})]}),h.length>0&&t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[t.jsxs("div",{className:"text-center mb-12",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:s("home.availableModels")}),t.jsx("p",{className:"text-neutral-500 font-mono",children:s("home.availableModelsDesc",{count:h.length})})]}),t.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-2",children:h.slice(0,12).map((r,k)=>t.jsxs("div",{className:"px-4 py-3 rounded-lg bg-black/40 border border-green-500/10 flex items-center gap-3 hover:border-green-500/30 transition-colors group font-mono",children:[t.jsx("span",{className:"text-green-500 text-xs",children:"$"}),t.jsx("span",{className:"text-sm text-neutral-400 group-hover:text-green-400 transition-colors truncate",children:r.display_name||r.model_name})]},r.id||k))}),h.length>12&&t.jsx("div",{className:"text-center mt-6",children:t.jsxs(F,{to:"/pricing",className:"text-sm text-green-400 hover:text-green-300 transition-colors font-mono",children:[s("home.viewAllModels",{count:h.length})," →"]})})]}),u.length>0&&t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[t.jsxs("div",{className:"text-center mb-12",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:s("home.plansPackages")}),t.jsx("p",{className:"text-neutral-500 font-mono",children:s("home.choosePlan")})]}),t.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:u.filter(r=>r.enabled).slice(0,3).map(r=>t.jsxs("div",{className:"rounded-xl p-6 flex flex-col bg-black/40 border border-green-500/10 hover:border-green-500/30 transition-all",children:[t.jsx("h3",{className:"text-lg font-semibold text-white mb-1 font-mono",children:r.name}),r.description&&t.jsx("p",{className:"text-sm text-neutral-400 mb-4",children:r.description}),t.jsxs("div",{className:"mt-auto pt-4",children:[t.jsxs("span",{className:"text-3xl font-bold text-green-400 font-mono",children:["$",r.price]}),r.original_price>r.price&&t.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",r.original_price]}),r.duration>0&&t.jsx("p",{className:"text-xs text-neutral-600 mt-1 font-mono",children:s("home.days",{count:r.duration})})]}),t.jsx(F,{to:e?"/packages":"/register",className:"mt-4 py-2.5 rounded-lg bg-green-500/10 border border-green-500/30 text-green-400 font-medium text-sm text-center hover:bg-green-500/20 transition-colors font-mono",children:s(e?"home.subscribe":"home.getStarted")})]},r.id))})]}),t.jsx("section",{className:"relative max-w-7xl mx-auto px-6 py-24",children:t.jsxs("div",{className:"rounded-xl p-12 text-center bg-black/60 border border-green-500/20 relative overflow-hidden",children:[t.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-green-500/5 via-transparent to-cyan-500/5"}),t.jsxs("div",{className:"relative z-10",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-4 font-mono",children:s("home.readyToStart")}),t.jsx("p",{className:"text-neutral-400 mb-8 max-w-md mx-auto",children:s("home.readyToStartDesc")}),t.jsx("div",{className:"flex items-center justify-center gap-4",children:e?t.jsx(F,{to:"/dashboard",className:"px-8 py-3 rounded-lg bg-green-500 text-black font-bold hover:bg-green-400 transition-all font-mono",children:s("home.goToDashboard")}):t.jsxs(t.Fragment,{children:[t.jsx(F,{to:"/register",className:"px-8 py-3 rounded-lg bg-green-500 text-black font-bold hover:bg-green-400 transition-all font-mono",children:s("home.createFreeAccount")}),t.jsx(F,{to:"/login",className:"px-8 py-3 rounded-lg border border-green-500/30 text-green-400 font-bold hover:bg-green-500/10 transition-all font-mono",children:s("home.signIn")})]})})]})]})})]})}export{Pe as default}; diff --git a/dist/assets/Home-CmqVbe36.js b/dist/assets/Home-CmqVbe36.js new file mode 100644 index 0000000..def1115 --- /dev/null +++ b/dist/assets/Home-CmqVbe36.js @@ -0,0 +1 @@ +import{r as c,j as e,u as f,a as N,l as v,k as w,L as r}from"./index-Drgd7k5E.js";import{C as p}from"./CountUp-Omm8FlHl.js";import{u as y}from"./useTranslation-B7WzaWp0.js";const o=({children:t,blur:i=!1,duration:n=800,delay:d=0,threshold:x=.1,initialOpacity:m=0,className:h="",...a})=>{const s=c.useRef(null),[l,j]=c.useState(!1);return c.useEffect(()=>{const b=s.current;if(!b)return;const u=new IntersectionObserver(([g])=>{g.isIntersecting&&(j(!0),u.disconnect())},{threshold:x});return u.observe(b),()=>u.disconnect()},[x]),e.jsx("div",{ref:s,className:h,style:{opacity:l?1:m,filter:i?l?"blur(0px)":"blur(10px)":void 0,transform:l?"translateY(0)":"translateY(20px)",transition:`opacity ${n}ms ease-out ${d}ms, filter ${n}ms ease-out ${d}ms, transform ${n}ms ease-out ${d}ms`,willChange:"opacity, filter, transform"},...a,children:t})};function $(){const{t}=y(),{user:i}=f(),{site:n}=N(),[d,x]=c.useState([]),[m,h]=c.useState([]);c.useEffect(()=>{v().then(s=>{s.data.success&&x(s.data.data||[])}).catch(()=>{}),w().then(s=>{s.data.success&&h(s.data.data||[])}).catch(()=>{})},[]);const a=d.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-24",children:[e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(n==null?void 0:n.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:i?e.jsxs(r,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(r,{to:"/register",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.getStarted")," →"]}),e.jsx(r,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.viewPricing")})]})})]})}),e.jsx(o,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 border-t border-neutral-800 pt-10",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(p,{from:0,to:a.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(p,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(p,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-6",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc")},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc")},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc")}].map((s,l)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-neutral-800/60 last:border-0 group",children:[e.jsxs("span",{className:"text-sm font-mono text-neutral-600 mt-0.5",children:["0",l+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-white mb-1 group-hover:text-neutral-300 transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:s.desc})]})]},l))})]})}),a.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:a.length})})]}),a.length>8&&e.jsxs(r,{to:"/pricing",className:"text-sm text-neutral-400 hover:text-white transition-colors",children:[t("home.viewAllModels",{count:a.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:a.slice(0,8).map((s,l)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-neutral-700 transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:s.display_name||s.model_name})},s.id||l))})]})}),m.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:m.filter(s=>s.enabled).slice(0,3).map(s=>e.jsxs("div",{className:"rounded-xl p-6 flex flex-col border border-neutral-800/60 hover:border-neutral-700 transition-colors",children:[e.jsx("h3",{className:"text-base font-semibold text-white",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-neutral-600 mt-1",children:t("home.days",{count:s.duration})})]}),e.jsx(r,{to:i?"/packages":"/register",className:"mt-4 py-2.5 rounded-lg bg-neutral-800 text-white font-medium text-sm text-center hover:bg-neutral-700 transition-colors",children:t(i?"home.subscribe":"home.getStarted")})]},s.id))})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-neutral-800 pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-neutral-500 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsxs(r,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(r,{to:"/register",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.createFreeAccount")," →"]}),e.jsx(r,{to:"/login",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.signIn")})]})})]})})})]})}export{$ as default}; diff --git a/dist/assets/Home-D5xeHSSc.js b/dist/assets/Home-D5xeHSSc.js deleted file mode 100644 index 42d0845..0000000 --- a/dist/assets/Home-D5xeHSSc.js +++ /dev/null @@ -1 +0,0 @@ -import{r as l,j as e,u as L,a as $,g as E,b as T,L as b}from"./index-CJw6IpTa.js";import{u as R,a as V,b as G,m as k,C as z}from"./CountUp-SCQ6rVWn.js";import{S as I}from"./SpotlightCard-lt5CQbhM.js";function B({children:n,className:o="",colors:d=["#5227FF","#FF9FFC","#B19EEF"],animationSpeed:i=8,showBorder:s=!1,direction:r="horizontal",pauseOnHover:a=!1,yoyo:t=!0}){const[j,y]=l.useState(!1),u=R(0),f=l.useRef(0),x=l.useRef(null),h=i*1e3;V(c=>{if(j){x.current=null;return}if(x.current===null){x.current=c;return}const A=c-x.current;if(x.current=c,f.current+=A,t){const M=h*2,m=f.current%M;m{f.current=0,u.set(0)},[i,u,t]);const w=G(u,c=>r==="horizontal"?`${c}% 50%`:r==="vertical"?`50% ${c}%`:`${c}% 50%`),g=l.useCallback(()=>{a&&y(!0)},[a]),S=l.useCallback(()=>{a&&y(!1)},[a]),C=r==="horizontal"?"to right":r==="vertical"?"to bottom":"to bottom right",v=[...d,d[0]].join(", "),N={backgroundImage:`linear-gradient(${C}, ${v})`,backgroundSize:r==="horizontal"?"300% 100%":r==="vertical"?"100% 300%":"300% 300%",backgroundRepeat:"repeat"};return e.jsxs(k.div,{className:`relative mx-auto flex max-w-fit flex-row items-center justify-center rounded-[1.25rem] font-medium backdrop-blur transition-shadow duration-500 overflow-hidden cursor-pointer ${s?"py-1 px-2":""} ${o}`,onMouseEnter:g,onMouseLeave:S,children:[s&&e.jsx(k.div,{className:"absolute inset-0 z-0 pointer-events-none rounded-[1.25rem]",style:{...N,backgroundPosition:w},children:e.jsx("div",{className:"absolute bg-black rounded-[1.25rem] z-[-1]",style:{width:"calc(100% - 2px)",height:"calc(100% - 2px)",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}})}),e.jsx(k.div,{className:"inline-block relative z-2 text-transparent bg-clip-text",style:{...N,backgroundPosition:w,WebkitBackgroundClip:"text"},children:n})]})}const D=(n,o)=>{const d=new Set([...Object.keys(n),...o.flatMap(s=>Object.keys(s))]),i={};return d.forEach(s=>{i[s]=[n[s],...o.map(r=>r[s])]}),i},W=({text:n="",delay:o=200,className:d="",animateBy:i="words",direction:s="top",threshold:r=.1,rootMargin:a="0px",animationFrom:t,animationTo:j,easing:y=x=>x,onAnimationComplete:u,stepDuration:f=.35})=>{const x=i==="words"?n.split(" "):n.split(""),[h,w]=l.useState(!1),g=l.useRef(null);l.useEffect(()=>{if(!g.current)return;const m=new IntersectionObserver(([p])=>{p.isIntersecting&&(w(!0),m.unobserve(g.current))},{threshold:r,rootMargin:a});return m.observe(g.current),()=>m.disconnect()},[r,a]);const S=l.useMemo(()=>s==="top"?{filter:"blur(10px)",opacity:0,y:-50}:{filter:"blur(10px)",opacity:0,y:50},[s]),C=l.useMemo(()=>[{filter:"blur(5px)",opacity:.5,y:s==="top"?5:-5},{filter:"blur(0px)",opacity:1,y:0}],[s]),v=t??S,N=j??C,c=N.length+1,A=f*(c-1),M=Array.from({length:c},(m,p)=>c===1?0:p/(c-1));return e.jsx("p",{ref:g,className:`blur-text ${d} flex flex-wrap`,children:x.map((m,p)=>{const F=D(v,N),P={duration:A,times:M,delay:p*o/1e3};return P.ease=y,e.jsxs(k.span,{className:"inline-block will-change-[transform,filter,opacity]",initial:v,animate:h?F:v,transition:P,onAnimationComplete:p===x.length-1?u:void 0,children:[m===" "?" ":m,i==="words"&&pe.jsxs(n,{className:`relative inline-block overflow-hidden rounded-[20px] ${o}`,style:{padding:`${s}px 0`,...a.style},...a,children:[e.jsx("div",{className:"absolute w-[300%] h-[50%] opacity-70 bottom-[-11px] right-[-250%] rounded-full animate-star-movement-bottom z-0",style:{background:`radial-gradient(circle, ${d}, transparent 10%)`,animationDuration:i}}),e.jsx("div",{className:"absolute w-[300%] h-[50%] opacity-70 top-[-10px] left-[-250%] rounded-full animate-star-movement-top z-0",style:{background:`radial-gradient(circle, ${d}, transparent 10%)`,animationDuration:i}}),e.jsx("div",{className:"relative z-1 bg-gradient-to-b from-black to-gray-900 border border-gray-800 text-white text-center text-[16px] py-[16px] px-[26px] rounded-[20px]",children:r})]});function O(){const{user:n}=L(),{site:o}=$(),[d,i]=l.useState([]),[s,r]=l.useState([]);l.useEffect(()=>{E().then(t=>{t.data.success&&i(t.data.data||[])}).catch(()=>{}),T().then(t=>{t.data.success&&r(t.data.data||[])}).catch(()=>{})},[]);const a=d.filter(t=>t.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[800px] h-[600px] bg-gradient-radial from-brand-600/20 via-purple-600/5 to-transparent blur-3xl"}),e.jsx("div",{className:"absolute top-[400px] right-0 w-[500px] h-[500px] bg-gradient-radial from-pink-600/10 to-transparent blur-3xl"})]}),e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 pt-24 pb-20",children:[e.jsxs("div",{className:"text-center max-w-4xl mx-auto",children:[e.jsx("div",{className:"mb-6",children:e.jsx(B,{colors:["#818cf8","#c084fc","#f472b6","#818cf8"],animationSpeed:6,className:"text-5xl md:text-7xl font-heading font-extrabold leading-tight",children:(o==null?void 0:o.name)||"AI API Platform"})}),e.jsx(W,{text:"Access the world's most powerful AI models through a single API endpoint. Simple, affordable, reliable.",className:"text-lg md:text-xl text-neutral-400 max-w-2xl mx-auto mb-10",delay:50,animateBy:"words"}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:n?e.jsx(b,{to:"/dashboard",children:e.jsx(_,{as:"div",color:"#818cf8",speed:"5s",children:"Go to Dashboard"})}):e.jsxs(e.Fragment,{children:[e.jsx(b,{to:"/register",className:"btn-primary text-base !px-8 !py-3",children:"Get Started Free"}),e.jsx(b,{to:"/pricing",className:"btn-secondary text-base !px-8 !py-3",children:"View Pricing"})]})})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-6 max-w-xl mx-auto mt-20",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-white",children:[e.jsx(z,{from:0,to:a.length||50,duration:2,separator:""}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:"AI Models"})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-white",children:[e.jsx(z,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:"Uptime"})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-white",children:["<",e.jsx(z,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:"Latency"})]})]})]}),e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:"Why Choose Us"}),e.jsx("p",{className:"text-neutral-400",children:"Everything you need to build AI-powered applications"})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[e.jsxs(I,{className:"!bg-neutral-900/60 !border-neutral-800/60",spotlightColor:"rgba(129,140,248,0.15)",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-brand-500/10 flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-6 h-6 text-brand-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:"Lightning Fast"}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:"Optimized routing and caching deliver responses with minimal latency. Load-balanced across multiple providers for maximum reliability."})]}),e.jsxs(I,{className:"!bg-neutral-900/60 !border-neutral-800/60",spotlightColor:"rgba(192,132,252,0.15)",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-purple-500/10 flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-6 h-6 text-purple-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:"Secure & Private"}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:"Enterprise-grade security with encrypted API keys. No request logging by default. Your data stays your data."})]}),e.jsxs(I,{className:"!bg-neutral-900/60 !border-neutral-800/60",spotlightColor:"rgba(244,114,182,0.15)",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-pink-500/10 flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-6 h-6 text-pink-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:"Pay As You Go"}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:"Transparent pricing with no hidden fees. Only pay for what you use. Multiple top-up options and subscription packages available."})]})]})]}),a.length>0&&e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:"Available Models"}),e.jsxs("p",{className:"text-neutral-400",children:["Access ",e.jsx("span",{className:"text-brand-400 font-medium",children:a.length})," AI models through a unified API"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:a.slice(0,12).map((t,j)=>e.jsxs("div",{className:"glass-sm px-4 py-3 flex items-center gap-3 hover:bg-white/[0.06] transition-colors group",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 flex-shrink-0"}),e.jsx("span",{className:"text-sm font-mono text-neutral-300 group-hover:text-white transition-colors truncate",children:t.display_name||t.model_name})]},t.id||j))}),a.length>12&&e.jsx("div",{className:"text-center mt-6",children:e.jsxs(b,{to:"/pricing",className:"text-sm text-brand-400 hover:text-brand-300 transition-colors",children:["View all ",a.length," models →"]})})]}),s.length>0&&e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:"Plans & Packages"}),e.jsx("p",{className:"text-neutral-400",children:"Choose a plan that fits your needs"})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:s.filter(t=>t.enabled).slice(0,3).map(t=>e.jsxs("div",{className:"glass rounded-2xl p-6 flex flex-col hover:border-brand-500/30 transition-colors",children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-1",children:t.name}),t.description&&e.jsx("p",{className:"text-sm text-neutral-400 mb-4",children:t.description}),e.jsxs("div",{className:"mt-auto pt-4",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",t.price]}),t.original_price>t.price&&e.jsxs("span",{className:"text-sm text-neutral-500 line-through",children:["$",t.original_price]})]}),t.duration>0&&e.jsxs("p",{className:"text-xs text-neutral-500 mt-1",children:[t.duration," days"]})]}),e.jsx(b,{to:n?"/packages":"/register",className:"btn-primary text-center mt-4 !py-2",children:n?"Subscribe":"Get Started"})]},t.id))})]}),e.jsx("section",{className:"relative max-w-7xl mx-auto px-6 py-24",children:e.jsxs("div",{className:"glass rounded-3xl p-12 text-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-brand-600/10 via-transparent to-purple-600/10"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-4",children:"Ready to Get Started?"}),e.jsx("p",{className:"text-neutral-400 mb-8 max-w-md mx-auto",children:"Create your account and start building with AI in minutes. No credit card required."}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:n?e.jsx(b,{to:"/dashboard",className:"btn-primary text-base !px-8 !py-3",children:"Go to Dashboard"}):e.jsxs(e.Fragment,{children:[e.jsx(b,{to:"/register",className:"btn-primary text-base !px-8 !py-3",children:"Create Free Account"}),e.jsx(b,{to:"/login",className:"btn-secondary text-base !px-8 !py-3",children:"Sign In"})]})})]})]})})]})}export{O as default}; diff --git a/dist/assets/Home-Ddxg0eqL.js b/dist/assets/Home-Ddxg0eqL.js new file mode 100644 index 0000000..b38f20c --- /dev/null +++ b/dist/assets/Home-Ddxg0eqL.js @@ -0,0 +1,100 @@ +import{r as o,j as t,u as se,a as ne,l as re,k as oe,L as z}from"./index-Drgd7k5E.js";import{G as ae,R as ie,P as le,M as ce}from"./Mesh-CwXV3WjE.js";import{i as O,P as de,u as ue,L as me,m as L}from"./proxy-BOtdvQpP.js";import{M as he,b as J,d as fe,u as _,e as B,C as xe}from"./CountUp-Omm8FlHl.js";import{u as pe}from"./useTranslation-B7WzaWp0.js";function X(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function ge(...e){return n=>{let r=!1;const c=e.map(d=>{const u=X(d,n);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let d=0;d{const{width:w,height:p,top:j,left:v,right:y,bottom:P}=s.current;if(n||u===!1||!a.current||!w||!p)return;const I=r==="left"?`left: ${v}`:`right: ${y}`,i=c==="bottom"?`bottom: ${P}`:`top: ${j}`;a.current.dataset.motionPopId=m;const S=document.createElement("style");h&&(S.nonce=h);const E=d??document.head;return E.appendChild(S),S.sheet&&S.sheet.insertRule(` + [data-motion-pop-id="${m}"] { + position: absolute !important; + width: ${w}px !important; + height: ${p}px !important; + ${I}px !important; + ${i}px !important; + } + `),()=>{var k;(k=a.current)==null||k.removeAttribute("data-motion-pop-id"),E.contains(S)&&E.removeChild(S)}},[n]),t.jsx(be,{isPresent:n,childRef:a,sizeRef:s,pop:u,children:u===!1?e:o.cloneElement(e,{ref:b})})}const ye=({children:e,initial:n,isPresent:r,onExitComplete:c,custom:d,presenceAffectsLayout:u,mode:m,anchorX:a,anchorY:s,root:h})=>{const x=J(Ce),b=o.useId();let g=!0,w=o.useMemo(()=>(g=!1,{id:b,initial:n,isPresent:r,custom:d,onExitComplete:p=>{x.set(p,!0);for(const j of x.values())if(!j)return;c&&c()},register:p=>(x.set(p,!1),()=>x.delete(p))}),[r,x,c]);return u&&g&&(w={...w}),o.useMemo(()=>{x.forEach((p,j)=>x.set(j,!1))},[r]),o.useEffect(()=>{!r&&!x.size&&c&&c()},[r]),e=t.jsx(we,{pop:m==="popLayout",isPresent:r,anchorX:a,anchorY:s,root:h,children:e}),t.jsx(de.Provider,{value:w,children:e})};function Ce(){return new Map}const Y=e=>e.key||"";function V(e){const n=[];return o.Children.forEach(e,r=>{o.isValidElement(r)&&n.push(r)}),n}const je=({children:e,custom:n,initial:r=!0,onExitComplete:c,presenceAffectsLayout:d=!0,mode:u="sync",propagate:m=!1,anchorX:a="left",anchorY:s="top",root:h})=>{const[x,b]=ue(m),g=o.useMemo(()=>V(e),[e]),w=m&&!x?[]:g.map(Y),p=o.useRef(!0),j=o.useRef(g),v=J(()=>new Map),y=o.useRef(new Set),[P,I]=o.useState(g),[i,S]=o.useState(g);fe(()=>{p.current=!1,j.current=g;for(let A=0;A{const f=Y(A),M=m&&!x?!1:g===i||w.includes(f),R=()=>{if(y.current.has(f))return;if(v.has(f))y.current.add(f),v.set(f,!0);else return;let $=!0;v.forEach(T=>{T||($=!1)}),$&&(k==null||k(),S(j.current),m&&(b==null||b()),c&&c())};return t.jsx(ye,{isPresent:M,initial:!p.current||r?void 0:!1,custom:n,presenceAffectsLayout:d,mode:u,root:h,onExitComplete:M?void 0:R,anchorX:a,anchorY:s,children:A},f)})})},W={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff",fuchsia:"#ff00ff",cyan:"#00ffff",yellow:"#ffff00",orange:"#ff8000"};function q(e){e.length===4&&(e=e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n||console.warn(`Unable to convert hex string ${e} to rgb values`),[parseInt(n[1],16)/255,parseInt(n[2],16)/255,parseInt(n[3],16)/255]}function Ne(e){return e=parseInt(e),[(e>>16&255)/255,(e>>8&255)/255,(e&255)/255]}function K(e){return e===void 0?[0,0,0]:arguments.length===3?arguments:isNaN(e)?e[0]==="#"?q(e):W[e.toLowerCase()]?q(W[e.toLowerCase()]):(console.warn("Color format not recognised"),[0,0,0]):Ne(e)}class Z extends Array{constructor(n){return Array.isArray(n)?super(...n):super(...K(...arguments))}get r(){return this[0]}get g(){return this[1]}get b(){return this[2]}set r(n){this[0]=n}set g(n){this[1]=n}set b(n){this[2]=n}set(n){return Array.isArray(n)?this.copy(n):this.copy(K(...arguments))}copy(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this}}class Se extends ae{constructor(n,{attributes:r={}}={}){Object.assign(r,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(n,r)}}const Me=`#version 300 es +in vec2 position; +void main() { + gl_Position = vec4(position, 0.0, 1.0); +} +`,Re=`#version 300 es +precision highp float; + +uniform float uTime; +uniform float uAmplitude; +uniform vec3 uColorStops[3]; +uniform vec2 uResolution; +uniform float uBlend; + +out vec4 fragColor; + +vec3 permute(vec3 x) { + return mod(((x * 34.0) + 1.0) * x, 289.0); +} + +float snoise(vec2 v){ + const vec4 C = vec4( + 0.211324865405187, 0.366025403784439, + -0.577350269189626, 0.024390243902439 + ); + vec2 i = floor(v + dot(v, C.yy)); + vec2 x0 = v - i + dot(i, C.xx); + vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0); + vec4 x12 = x0.xyxy + C.xxzz; + x12.xy -= i1; + i = mod(i, 289.0); + + vec3 p = permute( + permute(i.y + vec3(0.0, i1.y, 1.0)) + + i.x + vec3(0.0, i1.x, 1.0) + ); + + vec3 m = max( + 0.5 - vec3( + dot(x0, x0), + dot(x12.xy, x12.xy), + dot(x12.zw, x12.zw) + ), + 0.0 + ); + m = m * m; + m = m * m; + + vec3 x = 2.0 * fract(p * C.www) - 1.0; + vec3 h = abs(x) - 0.5; + vec3 ox = floor(x + 0.5); + vec3 a0 = x - ox; + m *= 1.79284291400159 - 0.85373472095314 * (a0*a0 + h*h); + + vec3 g; + g.x = a0.x * x0.x + h.x * x0.y; + g.yz = a0.yz * x12.xz + h.yz * x12.yw; + return 130.0 * dot(m, g); +} + +struct ColorStop { + vec3 color; + float position; +}; + +#define COLOR_RAMP(colors, factor, finalColor) { int index = 0; for (int i = 0; i < 2; i++) { ColorStop currentColor = colors[i]; bool isInBetween = currentColor.position <= factor; index = int(mix(float(index), float(i), float(isInBetween))); } ColorStop currentColor = colors[index]; ColorStop nextColor = colors[index + 1]; float range = nextColor.position - currentColor.position; float lerpFactor = (factor - currentColor.position) / range; finalColor = mix(currentColor.color, nextColor.color, lerpFactor); } + +void main() { + vec2 uv = gl_FragCoord.xy / uResolution; + + ColorStop colors[3]; + colors[0] = ColorStop(uColorStops[0], 0.0); + colors[1] = ColorStop(uColorStops[1], 0.5); + colors[2] = ColorStop(uColorStops[2], 1.0); + + vec3 rampColor; + COLOR_RAMP(colors, uv.x, rampColor); + + float height = snoise(vec2(uv.x * 2.0 + uTime * 0.1, uTime * 0.25)) * 0.5 * uAmplitude; + height = exp(height); + height = (uv.y * 2.0 - height + 0.2); + float intensity = 0.6 * height; + + float midPoint = 0.20; + float auroraAlpha = smoothstep(midPoint - uBlend * 0.5, midPoint + uBlend * 0.5, intensity); + + vec3 auroraColor = intensity * rampColor; + + fragColor = vec4(auroraColor * auroraAlpha, auroraAlpha); +} +`;function Ae(e){const{colorStops:n=["#5227FF","#7cff67","#5227FF"],amplitude:r=1,blend:c=.5}=e,d=o.useRef(e);d.current=e;const u=o.useRef(null);return o.useEffect(()=>{const m=u.current;if(!m)return;const a=new ie({alpha:!0,premultipliedAlpha:!0,antialias:!0}),s=a.gl;s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.canvas.style.backgroundColor="transparent";let h;function x(){if(!m)return;const v=m.offsetWidth,y=m.offsetHeight;a.setSize(v,y),h&&(h.uniforms.uResolution.value=[v,y])}window.addEventListener("resize",x);const b=new Se(s);b.attributes.uv&&delete b.attributes.uv;const g=n.map(v=>{const y=new Z(v);return[y.r,y.g,y.b]});h=new le(s,{vertex:Me,fragment:Re,uniforms:{uTime:{value:0},uAmplitude:{value:r},uColorStops:{value:g},uResolution:{value:[m.offsetWidth,m.offsetHeight]},uBlend:{value:c}}});const w=new ce(s,{geometry:b,program:h});m.appendChild(s.canvas);let p=0;const j=v=>{p=requestAnimationFrame(j);const{time:y=v*.01,speed:P=1}=d.current;h.uniforms.uTime.value=y*P*.1,h.uniforms.uAmplitude.value=d.current.amplitude??1,h.uniforms.uBlend.value=d.current.blend??c;const I=d.current.colorStops??n;h.uniforms.uColorStops.value=I.map(i=>{const S=new Z(i);return[S.r,S.g,S.b]}),a.render({scene:w})};return p=requestAnimationFrame(j),x(),()=>{var v;cancelAnimationFrame(p),window.removeEventListener("resize",x),m&&s.canvas.parentNode===m&&m.removeChild(s.canvas),(v=s.getExtension("WEBGL_lose_context"))==null||v.loseContext()}},[r]),t.jsx("div",{ref:u,className:"w-full h-full"})}const Fe=({text:e="",className:n="",delay:r=50})=>{const c=o.useMemo(()=>e.split(""),[e]);return t.jsx("span",{className:n,"aria-label":e,children:c.map((d,u)=>t.jsx(L.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:u*r/1e3,ease:[.25,.46,.45,.94]},style:{display:"inline-block",whiteSpace:d===" "?"pre":"normal"},children:d},`${d}-${u}`))})};function G(...e){return e.filter(Boolean).join(" ")}const Q=o.forwardRef((e,n)=>{const{texts:r,transition:c={type:"spring",damping:25,stiffness:300},initial:d={y:"100%",opacity:0},animate:u={y:0,opacity:1},exit:m={y:"-120%",opacity:0},animatePresenceMode:a="wait",animatePresenceInitial:s=!1,rotationInterval:h=2e3,staggerDuration:x=0,staggerFrom:b="first",loop:g=!0,auto:w=!0,splitBy:p="characters",onNext:j,mainClassName:v,splitLevelClassName:y,elementLevelClassName:P,...I}=e,[i,S]=o.useState(0),E=l=>{if(typeof Intl<"u"&&Intl.Segmenter){const C=new Intl.Segmenter("en",{granularity:"grapheme"});return Array.from(C.segment(l),N=>N.segment)}return Array.from(l)},k=o.useMemo(()=>{const l=r[i];if(p==="characters"){const C=l.split(" ");return C.map((N,F)=>({characters:E(N),needsSpace:F!==C.length-1}))}return p==="words"?l.split(" ").map((C,N,F)=>({characters:[C],needsSpace:N!==F.length-1})):p==="lines"?l.split(` +`).map((C,N,F)=>({characters:[C],needsSpace:N!==F.length-1})):l.split(p).map((C,N,F)=>({characters:[C],needsSpace:N!==F.length-1}))},[r,i,p]),A=o.useCallback((l,C)=>{const N=C;if(b==="first")return l*x;if(b==="last")return(N-1-l)*x;if(b==="center"){const F=Math.floor(N/2);return Math.abs(F-l)*x}if(b==="random"){const F=Math.floor(Math.random()*N);return Math.abs(F-l)*x}return Math.abs(b-l)*x},[b,x]),f=o.useCallback(l=>{S(l),j&&j(l)},[j]),M=o.useCallback(()=>{const l=i===r.length-1?g?0:i:i+1;l!==i&&f(l)},[i,r.length,g,f]),R=o.useCallback(()=>{const l=i===0?g?r.length-1:i:i-1;l!==i&&f(l)},[i,r.length,g,f]),$=o.useCallback(l=>{const C=Math.max(0,Math.min(l,r.length-1));C!==i&&f(C)},[r.length,i,f]),T=o.useCallback(()=>{i!==0&&f(0)},[i,f]);return o.useImperativeHandle(n,()=>({next:M,previous:R,jumpTo:$,reset:T}),[M,R,$,T]),o.useEffect(()=>{if(!w)return;const l=setInterval(M,h);return()=>clearInterval(l)},[M,h,w]),t.jsxs(L.span,{className:G("flex flex-wrap whitespace-pre-wrap relative",v),...I,layout:!0,transition:c,children:[t.jsx("span",{className:"sr-only",children:r[i]}),t.jsx(je,{mode:a,initial:s,children:t.jsx(L.span,{className:G(p==="lines"?"flex flex-col w-full":"flex flex-wrap whitespace-pre-wrap relative"),layout:!0,"aria-hidden":"true",children:k.map((l,C,N)=>{const F=N.slice(0,C).reduce((H,D)=>H+D.characters.length,0);return t.jsxs("span",{className:G("inline-flex",y),children:[l.characters.map((H,D)=>t.jsx(L.span,{initial:d,animate:u,exit:m,transition:{...c,delay:A(F+D,N.reduce((ee,te)=>ee+te.characters.length,0))},className:G("inline-block",P),children:H},D)),l.needsSpace&&t.jsx("span",{className:"whitespace-pre",children:" "})]},C)})},i)})]})});Q.displayName="RotatingText";const U={damping:30,stiffness:100,mass:2};function Pe({imageSrc:e,altText:n="Tilted card image",captionText:r="",containerHeight:c="300px",containerWidth:d="100%",imageHeight:u="300px",imageWidth:m="300px",scaleOnHover:a=1.1,rotateAmplitude:s=14,showMobileWarning:h=!0,showTooltip:x=!0,overlayContent:b=null,displayOverlayContent:g=!1}){const w=o.useRef(null),p=_(0),j=_(0),v=B(_(0),U),y=B(_(0),U),P=B(1,U),I=B(0),i=B(0,{stiffness:350,damping:30,mass:1}),[S,E]=o.useState(0);function k(M){if(!w.current)return;const R=w.current.getBoundingClientRect(),$=M.clientX-R.left-R.width/2,T=M.clientY-R.top-R.height/2,l=T/(R.height/2)*-s,C=$/(R.width/2)*s;v.set(l),y.set(C),p.set(M.clientX-R.left),j.set(M.clientY-R.top);const N=T-S;i.set(-N*.6),E(T)}function A(){P.set(a),I.set(1)}function f(){I.set(0),P.set(1),v.set(0),y.set(0),i.set(0)}return t.jsxs("figure",{ref:w,className:"relative w-full h-full [perspective:800px] flex flex-col items-center justify-center",style:{height:c,width:d},onMouseMove:k,onMouseEnter:A,onMouseLeave:f,children:[h&&t.jsx("div",{className:"absolute top-4 text-center text-sm block sm:hidden",children:"This effect is not optimized for mobile. Check on desktop."}),t.jsxs(L.div,{className:"relative [transform-style:preserve-3d]",style:{width:m,height:u,rotateX:v,rotateY:y,scale:P},children:[t.jsx(L.img,{src:e,alt:n,className:"absolute top-0 left-0 object-cover rounded-[15px] will-change-transform [transform:translateZ(0)]",style:{width:m,height:u}}),g&&b&&t.jsx(L.div,{className:"absolute top-0 left-0 z-[2] will-change-transform [transform:translateZ(30px)]",children:b})]}),x&&t.jsx(L.figcaption,{className:"pointer-events-none absolute left-0 top-0 rounded-[4px] bg-white px-[10px] py-[4px] text-[10px] text-[#2d2d2d] opacity-0 z-[3] hidden sm:block",style:{x:p,y:j,opacity:I,rotate:i},children:r})]})}function Le(){const{t:e}=pe(),{user:n}=se(),{site:r}=ne(),[c,d]=o.useState([]),[u,m]=o.useState([]);o.useEffect(()=>{re().then(s=>{s.data.success&&d(s.data.data||[])}).catch(()=>{}),oe().then(s=>{s.data.success&&m(s.data.data||[])}).catch(()=>{})},[]);const a=c.filter(s=>s.enabled!==!1);return t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-0 h-[700px] overflow-hidden pointer-events-none",children:t.jsx(Ae,{colorStops:["#3A29FF","#FF94B4","#FF3232"],blend:.5,amplitude:1,speed:.5})}),t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 pt-28 pb-24",children:[t.jsxs("div",{className:"text-center max-w-4xl mx-auto",children:[t.jsx("div",{className:"mb-4",children:t.jsx("h1",{className:"text-5xl md:text-7xl font-heading font-extrabold text-white leading-tight",children:t.jsx(Fe,{text:(r==null?void 0:r.name)||e("home.defaultHeroTitle"),delay:80,className:"inline"})})}),t.jsx("div",{className:"flex items-center justify-center gap-2 text-xl md:text-2xl text-neutral-300 mb-10",children:t.jsxs("span",{children:[e("home.heroSubtitle").split(".")[0],"."]})}),t.jsx("div",{className:"flex flex-wrap items-center justify-center gap-3 mb-6",children:t.jsx(Q,{texts:[e("home.lightningFast"),e("home.securePrivate"),e("home.payAsYouGo")],mainClassName:"px-4 py-2 bg-white/10 backdrop-blur-sm rounded-full text-white text-sm font-medium overflow-hidden",staggerFrom:"last",rotationInterval:3e3})}),t.jsx("div",{className:"flex items-center justify-center gap-4 mt-8",children:n?t.jsx(z,{to:"/dashboard",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-base hover:bg-neutral-100 transition-all shadow-xl shadow-white/10",children:e("home.goToDashboard")}):t.jsxs(t.Fragment,{children:[t.jsx(z,{to:"/register",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-base hover:bg-neutral-100 transition-all shadow-xl shadow-white/10",children:e("home.getStarted")}),t.jsx(z,{to:"/pricing",className:"px-8 py-3.5 rounded-2xl border border-white/20 text-white font-semibold text-base hover:bg-white/10 transition-all",children:e("home.viewPricing")})]})})]}),t.jsx("div",{className:"grid grid-cols-3 gap-8 max-w-2xl mx-auto mt-24",children:[{value:a.length||50,suffix:"+",label:e("home.aiModels")},{value:99.9,suffix:"%",label:e("home.uptime")},{value:50,suffix:"ms",label:e("home.latency"),prefix:"<"}].map((s,h)=>t.jsxs("div",{className:"text-center p-4 rounded-2xl bg-white/5 backdrop-blur-sm border border-white/10",children:[t.jsxs("div",{className:"text-3xl font-bold text-white",children:[s.prefix,t.jsx(xe,{from:0,to:s.value,duration:2}),s.suffix]}),t.jsx("p",{className:"text-sm text-neutral-400 mt-1",children:s.label})]},h))})]}),t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[t.jsxs("div",{className:"text-center mb-14",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:e("home.whyChooseUs")}),t.jsx("p",{className:"text-neutral-400",children:e("home.whyChooseUsDesc")})]}),t.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:[{icon:"⚡",title:e("home.lightningFast"),desc:e("home.lightningFastDesc"),color:"from-yellow-500/20 to-orange-500/20"},{icon:"🔒",title:e("home.securePrivate"),desc:e("home.securePrivateDesc"),color:"from-blue-500/20 to-cyan-500/20"},{icon:"💰",title:e("home.payAsYouGo"),desc:e("home.payAsYouGoDesc"),color:"from-green-500/20 to-emerald-500/20"}].map((s,h)=>t.jsx(Pe,{rotateAmplitude:8,scaleOnHover:1.03,borderRadius:"16px",className:"w-full",children:t.jsxs("div",{className:`p-6 rounded-2xl bg-gradient-to-br ${s.color} border border-white/10 h-full`,children:[t.jsx("div",{className:"text-3xl mb-4",children:s.icon}),t.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:s.title}),t.jsx("p",{className:"text-sm text-neutral-300 leading-relaxed",children:s.desc})]})},h))})]}),a.length>0&&t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[t.jsxs("div",{className:"text-center mb-12",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:e("home.availableModels")}),t.jsx("p",{className:"text-neutral-400",children:e("home.availableModelsDesc",{count:a.length})})]}),t.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:a.slice(0,12).map((s,h)=>t.jsxs("div",{className:"px-4 py-3 rounded-xl bg-white/5 border border-white/10 flex items-center gap-3 hover:bg-white/10 transition-colors group",children:[t.jsx("div",{className:"w-2 h-2 rounded-full bg-green-400 flex-shrink-0"}),t.jsx("span",{className:"text-sm font-mono text-neutral-300 group-hover:text-white transition-colors truncate",children:s.display_name||s.model_name})]},s.id||h))}),a.length>12&&t.jsx("div",{className:"text-center mt-6",children:t.jsxs(z,{to:"/pricing",className:"text-sm text-blue-400 hover:text-blue-300 transition-colors",children:[e("home.viewAllModels",{count:a.length})," →"]})})]}),u.length>0&&t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[t.jsxs("div",{className:"text-center mb-12",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:e("home.plansPackages")}),t.jsx("p",{className:"text-neutral-400",children:e("home.choosePlan")})]}),t.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:u.filter(s=>s.enabled).slice(0,3).map((s,h)=>t.jsxs("div",{className:`rounded-2xl p-6 flex flex-col border transition-all hover:scale-[1.02] ${h===1?"bg-white/10 border-white/20 shadow-xl":"bg-white/5 border-white/10"}`,children:[t.jsx("h3",{className:"text-lg font-semibold text-white mb-1",children:s.name}),s.description&&t.jsx("p",{className:"text-sm text-neutral-400 mb-4",children:s.description}),t.jsxs("div",{className:"mt-auto pt-4",children:[t.jsxs("div",{className:"flex items-baseline gap-1",children:[t.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&t.jsxs("span",{className:"text-sm text-neutral-500 line-through",children:["$",s.original_price]})]}),s.duration>0&&t.jsx("p",{className:"text-xs text-neutral-500 mt-1",children:e("home.days",{count:s.duration})})]}),t.jsx(z,{to:n?"/packages":"/register",className:"mt-4 py-2.5 rounded-xl bg-white text-black font-medium text-sm text-center hover:bg-neutral-100 transition-colors",children:e(n?"home.subscribe":"home.getStarted")})]},s.id))})]}),t.jsx("section",{className:"relative max-w-7xl mx-auto px-6 py-24",children:t.jsx("div",{className:"rounded-3xl p-12 text-center relative overflow-hidden bg-gradient-to-br from-blue-600/20 via-purple-600/20 to-pink-600/20 border border-white/10",children:t.jsxs("div",{className:"relative z-10",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-4",children:e("home.readyToStart")}),t.jsx("p",{className:"text-neutral-300 mb-8 max-w-md mx-auto",children:e("home.readyToStartDesc")}),t.jsx("div",{className:"flex items-center justify-center gap-4",children:n?t.jsx(z,{to:"/dashboard",className:"px-8 py-3 rounded-2xl bg-white text-black font-semibold hover:bg-neutral-100 transition-all",children:e("home.goToDashboard")}):t.jsxs(t.Fragment,{children:[t.jsx(z,{to:"/register",className:"px-8 py-3 rounded-2xl bg-white text-black font-semibold hover:bg-neutral-100 transition-all",children:e("home.createFreeAccount")}),t.jsx(z,{to:"/login",className:"px-8 py-3 rounded-2xl border border-white/20 text-white font-semibold hover:bg-white/10 transition-all",children:e("home.signIn")})]})})]})})})]})}export{Le as default}; diff --git a/dist/assets/Home-Nw5uuC4J.js b/dist/assets/Home-Nw5uuC4J.js new file mode 100644 index 0000000..866f381 --- /dev/null +++ b/dist/assets/Home-Nw5uuC4J.js @@ -0,0 +1 @@ +import{r as l,j as e,u as L,a as E,l as P,k as A,L as f}from"./index-Drgd7k5E.js";import{u as R,a as B,C as F}from"./CountUp-Omm8FlHl.js";import{u as I}from"./use-animation-frame-BTI5WVkr.js";import{m as k}from"./proxy-BOtdvQpP.js";import{S as T}from"./SpotlightCard-C_ZqQ-j4.js";import{u as V}from"./useTranslation-B7WzaWp0.js";function _({children:t,className:n="",colors:o=["#5227FF","#FF9FFC","#B19EEF"],animationSpeed:i=8,showBorder:a=!1,direction:r="horizontal",pauseOnHover:c=!1,yoyo:x=!0}){const[s,g]=l.useState(!1),u=R(0),j=l.useRef(0),m=l.useRef(null),p=i*1e3;I(d=>{if(s){m.current=null;return}if(m.current===null){m.current=d;return}const M=d-m.current;if(m.current=d,j.current+=M,x){const z=p*2,h=j.current%z;h{j.current=0,u.set(0)},[i,u,x]);const w=B(u,d=>r==="horizontal"?`${d}% 50%`:r==="vertical"?`50% ${d}%`:`${d}% 50%`),v=l.useCallback(()=>{c&&g(!0)},[c]),S=l.useCallback(()=>{c&&g(!1)},[c]),C=r==="horizontal"?"to right":r==="vertical"?"to bottom":"to bottom right",N=[...o,o[0]].join(", "),y={backgroundImage:`linear-gradient(${C}, ${N})`,backgroundSize:r==="horizontal"?"300% 100%":r==="vertical"?"100% 300%":"300% 300%",backgroundRepeat:"repeat"};return e.jsxs(k.div,{className:`relative mx-auto flex max-w-fit flex-row items-center justify-center rounded-[1.25rem] font-medium backdrop-blur transition-shadow duration-500 overflow-hidden cursor-pointer ${a?"py-1 px-2":""} ${n}`,onMouseEnter:v,onMouseLeave:S,children:[a&&e.jsx(k.div,{className:"absolute inset-0 z-0 pointer-events-none rounded-[1.25rem]",style:{...y,backgroundPosition:w},children:e.jsx("div",{className:"absolute bg-black rounded-[1.25rem] z-[-1]",style:{width:"calc(100% - 2px)",height:"calc(100% - 2px)",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}})}),e.jsx(k.div,{className:"inline-block relative z-2 text-transparent bg-clip-text",style:{...y,backgroundPosition:w,WebkitBackgroundClip:"text"},children:t})]})}const W=(t,n)=>{const o=new Set([...Object.keys(t),...n.flatMap(a=>Object.keys(a))]),i={};return o.forEach(a=>{i[a]=[t[a],...n.map(r=>r[a])]}),i},G=({text:t="",delay:n=200,className:o="",animateBy:i="words",direction:a="top",threshold:r=.1,rootMargin:c="0px",animationFrom:x,animationTo:s,easing:g=m=>m,onAnimationComplete:u,stepDuration:j=.35})=>{const m=i==="words"?t.split(" "):t.split(""),[p,w]=l.useState(!1),v=l.useRef(null);l.useEffect(()=>{if(!v.current)return;const h=new IntersectionObserver(([b])=>{b.isIntersecting&&(w(!0),h.unobserve(v.current))},{threshold:r,rootMargin:c});return h.observe(v.current),()=>h.disconnect()},[r,c]);const S=l.useMemo(()=>a==="top"?{filter:"blur(10px)",opacity:0,y:-50}:{filter:"blur(10px)",opacity:0,y:50},[a]),C=l.useMemo(()=>[{filter:"blur(5px)",opacity:.5,y:a==="top"?5:-5},{filter:"blur(0px)",opacity:1,y:0}],[a]),N=x??S,y=s??C,d=y.length+1,M=j*(d-1),z=Array.from({length:d},(h,b)=>d===1?0:b/(d-1));return e.jsx("p",{ref:v,className:`blur-text ${o} flex flex-wrap`,children:m.map((h,b)=>{const D=W(N,y),$={duration:M,times:z,delay:b*n/1e3};return $.ease=g,e.jsxs(k.span,{className:"inline-block will-change-[transform,filter,opacity]",initial:N,animate:p?D:N,transition:$,onAnimationComplete:b===m.length-1?u:void 0,children:[h===" "?" ":h,i==="words"&&be.jsxs(t,{className:`relative inline-block overflow-hidden rounded-[20px] ${n}`,style:{padding:`${a}px 0`,...c.style},...c,children:[e.jsx("div",{className:"absolute w-[300%] h-[50%] opacity-70 bottom-[-11px] right-[-250%] rounded-full animate-star-movement-bottom z-0",style:{background:`radial-gradient(circle, ${o}, transparent 10%)`,animationDuration:i}}),e.jsx("div",{className:"absolute w-[300%] h-[50%] opacity-70 top-[-10px] left-[-250%] rounded-full animate-star-movement-top z-0",style:{background:`radial-gradient(circle, ${o}, transparent 10%)`,animationDuration:i}}),e.jsx("div",{className:"relative z-1 bg-gradient-to-b from-black to-gray-900 border border-gray-800 text-white text-center text-[16px] py-[16px] px-[26px] rounded-[20px]",children:r})]});function Q(){const{t}=V(),{user:n}=L(),{site:o}=E(),[i,a]=l.useState([]),[r,c]=l.useState([]);l.useEffect(()=>{P().then(s=>{s.data.success&&a(s.data.data||[])}).catch(()=>{}),A().then(s=>{s.data.success&&c(s.data.data||[])}).catch(()=>{})},[]);const x=i.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[800px] h-[600px] bg-gradient-radial from-brand-600/20 via-purple-600/5 to-transparent blur-3xl"}),e.jsx("div",{className:"absolute top-[400px] right-0 w-[500px] h-[500px] bg-gradient-radial from-pink-600/10 to-transparent blur-3xl"})]}),e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 pt-24 pb-20",children:[e.jsxs("div",{className:"text-center max-w-4xl mx-auto",children:[e.jsx("div",{className:"mb-6",children:e.jsx(_,{colors:["#818cf8","#c084fc","#f472b6","#818cf8"],animationSpeed:6,className:"text-5xl md:text-7xl font-heading font-extrabold leading-tight",children:(o==null?void 0:o.name)||t("home.defaultHeroTitle")})}),e.jsx(G,{text:t("home.heroSubtitle"),className:"text-lg md:text-xl text-neutral-400 max-w-2xl mx-auto mb-10",delay:50,animateBy:"words"}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:n?e.jsx(f,{to:"/dashboard",children:e.jsx(U,{as:"div",color:"#818cf8",speed:"5s",children:t("home.goToDashboard")})}):e.jsxs(e.Fragment,{children:[e.jsx(f,{to:"/register",className:"btn-primary text-base !px-8 !py-3",children:t("home.getStarted")}),e.jsx(f,{to:"/pricing",className:"btn-secondary text-base !px-8 !py-3",children:t("home.viewPricing")})]})})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-6 max-w-xl mx-auto mt-20",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-white",children:[e.jsx(F,{from:0,to:x.length||50,duration:2,separator:""}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-white",children:[e.jsx(F,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-white",children:["<",e.jsx(F,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t("home.latency")})]})]})]}),e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-400",children:t("home.whyChooseUsDesc")})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[e.jsxs(T,{className:"!bg-neutral-900/60 !border-neutral-800/60",spotlightColor:"rgba(129,140,248,0.15)",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-brand-500/10 flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-6 h-6 text-brand-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:t("home.lightningFast")}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t("home.lightningFastDesc")})]}),e.jsxs(T,{className:"!bg-neutral-900/60 !border-neutral-800/60",spotlightColor:"rgba(192,132,252,0.15)",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-purple-500/10 flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-6 h-6 text-purple-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:t("home.securePrivate")}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t("home.securePrivateDesc")})]}),e.jsxs(T,{className:"!bg-neutral-900/60 !border-neutral-800/60",spotlightColor:"rgba(244,114,182,0.15)",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-pink-500/10 flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-6 h-6 text-pink-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:t("home.payAsYouGo")}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t("home.payAsYouGoDesc")})]})]})]}),x.length>0&&e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-400",children:t("home.availableModelsDesc",{count:x.length})})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:x.slice(0,12).map((s,g)=>e.jsxs("div",{className:"glass-sm px-4 py-3 flex items-center gap-3 hover:bg-white/[0.06] transition-colors group",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 flex-shrink-0"}),e.jsx("span",{className:"text-sm font-mono text-neutral-300 group-hover:text-white transition-colors truncate",children:s.display_name||s.model_name})]},s.id||g))}),x.length>12&&e.jsx("div",{className:"text-center mt-6",children:e.jsxs(f,{to:"/pricing",className:"text-sm text-brand-400 hover:text-brand-300 transition-colors",children:[t("home.viewAllModels",{count:x.length})," →"]})})]}),r.length>0&&e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-400",children:t("home.choosePlan")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:r.filter(s=>s.enabled).slice(0,3).map(s=>e.jsxs("div",{className:"glass rounded-2xl p-6 flex flex-col hover:border-brand-500/30 transition-colors",children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-1",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-400 mb-4",children:s.description}),e.jsxs("div",{className:"mt-auto pt-4",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-neutral-500 line-through",children:["$",s.original_price]})]}),s.duration>0&&e.jsx("p",{className:"text-xs text-neutral-500 mt-1",children:t("home.days",{count:s.duration})})]}),e.jsx(f,{to:n?"/packages":"/register",className:"btn-primary text-center mt-4 !py-2",children:t(n?"home.subscribe":"home.getStarted")})]},s.id))})]}),e.jsx("section",{className:"relative max-w-7xl mx-auto px-6 py-24",children:e.jsxs("div",{className:"glass rounded-3xl p-12 text-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-brand-600/10 via-transparent to-purple-600/10"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-4",children:t("home.readyToStart")}),e.jsx("p",{className:"text-neutral-400 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:n?e.jsx(f,{to:"/dashboard",className:"btn-primary text-base !px-8 !py-3",children:t("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(f,{to:"/register",className:"btn-primary text-base !px-8 !py-3",children:t("home.createFreeAccount")}),e.jsx(f,{to:"/login",className:"btn-secondary text-base !px-8 !py-3",children:t("home.signIn")})]})})]})]})})]})}export{Q as default}; diff --git a/dist/assets/Layout-CN7Y4VCf.js b/dist/assets/Layout-CN7Y4VCf.js new file mode 100644 index 0000000..d939cde --- /dev/null +++ b/dist/assets/Layout-CN7Y4VCf.js @@ -0,0 +1 @@ +import{u as h,a as u,b,c as p,r as g,j as e,L as l,O as v}from"./index-Drgd7k5E.js";import{u as j}from"./useTranslation-B7WzaWp0.js";function y(){const{t:a}=j(),{user:n,logout:o}=h(),{site:t}=u(),m=b(),x=p(),[i,c]=g.useState(!1),r=(t==null?void 0:t.name)||"AI Platform",d=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0}].filter(s=>!s.auth||n);return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-brand-600/20 border-b border-brand-500/20 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-brand-200",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-black/60 border-b border-white/[0.06]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(l,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:r,className:"h-8 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-brand-500 to-purple-600 flex items-center justify-center text-white font-bold text-sm",children:r.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-brand-400 transition-colors",children:r})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:d.map(s=>e.jsx(f,{to:s.to,active:x.pathname===s.to,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await o(),m("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-300 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:a("nav.login")}),e.jsx(l,{to:"/register",className:"btn-primary text-sm !px-4 !py-1.5",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>c(!i),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),i&&e.jsx("div",{className:"md:hidden border-t border-white/[0.06] bg-black/90 backdrop-blur-xl",children:e.jsxs("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:[d.map(s=>e.jsx(l,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${x.pathname===s.to?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:s.label},s.to)),!n&&e.jsx(l,{to:"/login",onClick:()=>c(!1),className:"px-3 py-2 text-sm text-neutral-400 hover:text-white rounded-lg hover:bg-white/5 transition-colors sm:hidden",children:a("nav.login")})]})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-white/[0.06] mt-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",r,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:a("nav.contact")})})]})})]})}function f({to:a,children:n,active:o}){return e.jsx(l,{to:a,className:`px-3 py-1.5 text-sm rounded-lg transition-all ${o?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:n})}export{y as default}; diff --git a/dist/assets/Layout-CmT_3-Vm.js b/dist/assets/Layout-CmT_3-Vm.js new file mode 100644 index 0000000..d79bd1c --- /dev/null +++ b/dist/assets/Layout-CmT_3-Vm.js @@ -0,0 +1 @@ +import{u as h,a as u,b as p,c as b,r as j,j as e,L as n,O as g}from"./index-Drgd7k5E.js";import{u as f}from"./useTranslation-B7WzaWp0.js";function k(){const{t:s}=f(),{user:l,logout:m}=h(),{site:t}=u(),d=p(),i=b(),[r,c]=j.useState(!1),o=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0}].filter(a=>!a.auth||l);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-neutral-950 text-white",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"border-b border-neutral-800/60 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-neutral-400",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-lg bg-neutral-950/80 border-b border-neutral-800/40",children:[e.jsxs("div",{className:"max-w-5xl mx-auto px-6 h-14 flex items-center justify-between",children:[e.jsxs(n,{to:"/",className:"flex items-center gap-2.5 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:o,className:"h-7 w-auto"}):e.jsx("span",{className:"text-base font-semibold text-white",children:o}),(t==null?void 0:t.logo)&&e.jsx("span",{className:"text-base font-semibold text-white",children:o})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-6",children:x.map(a=>e.jsx(n,{to:a.to,className:`text-sm transition-colors ${i.pathname===a.to?"text-white":"text-neutral-500 hover:text-white"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-4",children:[l?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 hidden sm:block",children:l.display_name||l.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-neutral-500 hover:text-white transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(n,{to:"/login",className:"text-sm text-neutral-500 hover:text-white transition-colors hidden sm:block",children:s("nav.login")}),e.jsx(n,{to:"/register",className:"px-4 py-1.5 rounded-lg bg-white text-neutral-900 text-sm font-medium hover:bg-neutral-200 transition-colors",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1",onClick:()=>c(!r),children:e.jsx("svg",{className:"w-5 h-5 text-neutral-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-neutral-800/40 bg-neutral-950/95",children:e.jsx("nav",{className:"max-w-5xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(n,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded transition-colors ${i.pathname===a.to?"text-white":"text-neutral-500 hover:text-white"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(g,{})}),e.jsx("footer",{className:"border-t border-neutral-800/40 mt-auto",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-6 flex flex-col md:flex-row items-center justify-between gap-3",children:[e.jsxs("p",{className:"text-xs text-neutral-600",children:["© ",new Date().getFullYear()," ",o]}),(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-xs text-neutral-600 hover:text-white transition-colors",children:s("nav.contact")})]})})]})}export{k as default}; diff --git a/dist/assets/Layout-D6FTlC22.js b/dist/assets/Layout-D6FTlC22.js new file mode 100644 index 0000000..5068f60 --- /dev/null +++ b/dist/assets/Layout-D6FTlC22.js @@ -0,0 +1 @@ +import{u as h,a as u,b as p,c as b,r as g,j as e,L as l,O as f}from"./index-Drgd7k5E.js";import{u as j}from"./useTranslation-B7WzaWp0.js";function k(){const{t:s}=j(),{user:n,logout:d}=h(),{site:t}=u(),m=p(),i=b(),[r,c]=g.useState(!1),o=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0}].filter(a=>!a.auth||n);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-[#0a0a1a]",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-gradient-to-r from-blue-600/20 via-purple-600/20 to-pink-600/20 border-b border-white/10 text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-neutral-200",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-2xl bg-[#0a0a1a]/80 border-b border-white/[0.08]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(l,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:o,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-blue-500 via-purple-500 to-pink-500 flex items-center justify-center text-white font-bold text-sm shadow-lg shadow-purple-500/20",children:o.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-blue-400 transition-colors",children:o})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1 bg-white/5 rounded-full px-2 py-1",children:x.map(a=>e.jsx(l,{to:a.to,className:`px-4 py-1.5 text-sm rounded-full transition-all ${i.pathname===a.to?"text-white bg-white/10":"text-neutral-400 hover:text-white"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await d(),m("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-300 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:s("nav.login")}),e.jsx(l,{to:"/register",className:"px-5 py-2 rounded-full bg-white text-black text-sm font-medium hover:bg-neutral-100 transition-all",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-white/[0.08] bg-[#0a0a1a]/95 backdrop-blur-2xl",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(l,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${i.pathname===a.to?"text-blue-400 bg-blue-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(f,{})}),e.jsx("footer",{className:"border-t border-white/[0.08] mt-auto bg-[#0a0a1a]",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",o,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:s("nav.contact")})})]})})]})}export{k as default}; diff --git a/dist/assets/Layout-DmfpAhMt.js b/dist/assets/Layout-DmfpAhMt.js new file mode 100644 index 0000000..9cb5592 --- /dev/null +++ b/dist/assets/Layout-DmfpAhMt.js @@ -0,0 +1 @@ +import{u as h,a as u,b as g,c as b,r as p,j as e,L as s,O as f}from"./index-Drgd7k5E.js";import{u as j}from"./useTranslation-B7WzaWp0.js";function w(){const{t:a}=j(),{user:o,logout:m}=h(),{site:t}=u(),d=g(),c=b(),[l,i]=p.useState(!1),r=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0}].filter(n=>!n.auth||o);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-black text-white",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-green-500/10 border-b border-green-500/20 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-green-300 font-mono",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-black/80 border-b border-green-500/10",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-14 flex items-center justify-between",children:[e.jsxs(s,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:r,className:"h-7 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded-md bg-green-500/20 border border-green-500/30 flex items-center justify-center text-green-400 font-bold font-mono text-sm",children:r.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-green-400 font-mono group-hover:text-green-300 transition-colors",children:r})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:x.map(n=>e.jsx(s,{to:n.to,className:`px-3 py-1.5 text-sm font-mono rounded transition-all ${c.pathname===n.to?"text-green-400 bg-green-500/10":"text-neutral-500 hover:text-green-400"}`,children:n.label},n.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[o?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 font-mono hidden sm:block",children:o.display_name||o.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-neutral-500 hover:text-green-400 font-mono transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(s,{to:"/login",className:"text-sm text-neutral-500 hover:text-green-400 font-mono transition-colors hidden sm:block",children:a("nav.login")}),e.jsx(s,{to:"/register",className:"px-4 py-1.5 rounded-md bg-green-500/10 border border-green-500/30 text-green-400 text-sm font-mono hover:bg-green-500/20 transition-all",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded hover:bg-white/5",onClick:()=>i(!l),children:e.jsx("svg",{className:"w-5 h-5 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),l&&e.jsx("div",{className:"md:hidden border-t border-green-500/10 bg-black/95 backdrop-blur-xl",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(n=>e.jsx(s,{to:n.to,onClick:()=>i(!1),className:`px-3 py-2 text-sm font-mono rounded transition-colors ${c.pathname===n.to?"text-green-400 bg-green-500/10":"text-neutral-500 hover:text-green-400"}`,children:n.label},n.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(f,{})}),e.jsx("footer",{className:"border-t border-green-500/10 mt-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-xs text-neutral-600 font-mono",children:["© ",new Date().getFullYear()," ",r]}),(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-xs text-neutral-600 hover:text-green-400 font-mono transition-colors",children:a("nav.contact")})]})})]})}export{w as default}; diff --git a/dist/assets/Login-BYKZA2hS.js b/dist/assets/Login-BYKZA2hS.js deleted file mode 100644 index 3be7b67..0000000 --- a/dist/assets/Login-BYKZA2hS.js +++ /dev/null @@ -1 +0,0 @@ -import{u as v,a as N,c as w,d as y,r as d,j as e,N as S,L as k,z as x}from"./index-CJw6IpTa.js";function L(){var i,c;const{login:h,user:p}=v(),{site:a}=N(),f=w(),n=y(),[s,l]=d.useState({username:"",password:""}),[r,o]=d.useState(!1);if(p){const t=((c=(i=n.state)==null?void 0:i.from)==null?void 0:c.pathname)||"/dashboard";return e.jsx(S,{to:t,replace:!0})}const b=async t=>{var u,m;if(t.preventDefault(),!s.username||!s.password){x.error("Please fill in all fields");return}o(!0);try{if((await h(s.username,s.password)).success){x.success("Welcome back!");const g=((m=(u=n.state)==null?void 0:u.from)==null?void 0:m.pathname)||"/dashboard";f(g,{replace:!0});return}}catch{}o(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-white mb-2",children:"Welcome Back"}),e.jsxs("p",{className:"text-sm text-neutral-400",children:["Sign in to ",(a==null?void 0:a.name)||"your account"]})]}),e.jsxs("form",{onSubmit:b,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:"Username"}),e.jsx("input",{type:"text",value:s.username,onChange:t=>l({...s,username:t.target.value}),className:"input",placeholder:"Enter your username",autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:"Password"}),e.jsx("input",{type:"password",value:s.password,onChange:t=>l({...s,password:t.target.value}),className:"input",placeholder:"Enter your password",autoComplete:"current-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:r,className:"btn-primary w-full flex items-center justify-center gap-2",children:[r&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),r?"Signing in...":"Sign In"]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-neutral-400",children:["Don't have an account?"," ",e.jsx(k,{to:"/register",className:"text-brand-400 hover:text-brand-300 transition-colors font-medium",children:"Create one"})]})})]})})})}export{L as default}; diff --git a/dist/assets/Login-D37tx-Co.js b/dist/assets/Login-D37tx-Co.js new file mode 100644 index 0000000..228d6f5 --- /dev/null +++ b/dist/assets/Login-D37tx-Co.js @@ -0,0 +1 @@ +import{u as N,a as v,b as y,c as k,r as x,j as e,N as L,L as S,z as p}from"./index-Drgd7k5E.js";import{u as C}from"./useTranslation-B7WzaWp0.js";function A(){var c,m;const{t:s}=C(),{login:h,user:g}=N(),{site:n}=v(),f=y(),l=k(),[t,o]=x.useState({username:"",password:""}),[r,i]=x.useState(!1);if(g){const a=((m=(c=l.state)==null?void 0:c.from)==null?void 0:m.pathname)||"/dashboard";return e.jsx(L,{to:a,replace:!0})}const b=async a=>{var u,d;if(a.preventDefault(),!t.username||!t.password){p.error(s("login.fillAllFields"));return}i(!0);try{if((await h(t.username,t.password)).success){p.success(s("login.welcomeBackToast"));const w=((d=(u=l.state)==null?void 0:u.from)==null?void 0:d.pathname)||"/dashboard";f(w,{replace:!0});return}}catch{}i(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-white mb-2",children:s("login.welcomeBack")}),e.jsx("p",{className:"text-sm text-neutral-400",children:n!=null&&n.name?s("login.signInTo",{name:n.name}):s("login.signInToDefault")})]}),e.jsxs("form",{onSubmit:b,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:s("login.username")}),e.jsx("input",{type:"text",value:t.username,onChange:a=>o({...t,username:a.target.value}),className:"input",placeholder:s("login.enterUsername"),autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:s("login.password")}),e.jsx("input",{type:"password",value:t.password,onChange:a=>o({...t,password:a.target.value}),className:"input",placeholder:s("login.enterPassword"),autoComplete:"current-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:r,className:"btn-primary w-full flex items-center justify-center gap-2",children:[r&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s(r?"login.signingIn":"login.signInBtn")]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-neutral-400",children:[s("login.noAccount")," ",e.jsx(S,{to:"/register",className:"text-brand-400 hover:text-brand-300 transition-colors font-medium",children:s("login.createOne")})]})})]})})})}export{A as default}; diff --git a/dist/assets/Mesh-CwXV3WjE.js b/dist/assets/Mesh-CwXV3WjE.js new file mode 100644 index 0000000..68f3d15 --- /dev/null +++ b/dist/assets/Mesh-CwXV3WjE.js @@ -0,0 +1,7 @@ +function I(e){let t=e[0],s=e[1],i=e[2];return Math.sqrt(t*t+s*s+i*i)}function q(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function ht(e,t,s,i){return e[0]=t,e[1]=s,e[2]=i,e}function U(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e[2]=t[2]+s[2],e}function $(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e[2]=t[2]-s[2],e}function lt(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e[2]=t[2]*s[2],e}function at(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e[2]=t[2]/s[2],e}function D(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e}function ft(e,t){let s=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(s*s+i*i+r*r)}function ct(e,t){let s=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return s*s+i*i+r*r}function X(e){let t=e[0],s=e[1],i=e[2];return t*t+s*s+i*i}function dt(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function gt(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function V(e,t){let s=t[0],i=t[1],r=t[2],n=s*s+i*i+r*r;return n>0&&(n=1/Math.sqrt(n)),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function st(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function k(e,t,s){let i=t[0],r=t[1],n=t[2],h=s[0],l=s[1],a=s[2];return e[0]=r*a-n*l,e[1]=n*h-i*a,e[2]=i*l-r*h,e}function pt(e,t,s,i){let r=t[0],n=t[1],h=t[2];return e[0]=r+i*(s[0]-r),e[1]=n+i*(s[1]-n),e[2]=h+i*(s[2]-h),e}function ut(e,t,s,i,r){const n=Math.exp(-i*r);let h=t[0],l=t[1],a=t[2];return e[0]=s[0]+(h-s[0])*n,e[1]=s[1]+(l-s[1])*n,e[2]=s[2]+(a-s[2])*n,e}function xt(e,t,s){let i=t[0],r=t[1],n=t[2],h=s[3]*i+s[7]*r+s[11]*n+s[15];return h=h||1,e[0]=(s[0]*i+s[4]*r+s[8]*n+s[12])/h,e[1]=(s[1]*i+s[5]*r+s[9]*n+s[13])/h,e[2]=(s[2]*i+s[6]*r+s[10]*n+s[14])/h,e}function ot(e,t,s){let i=t[0],r=t[1],n=t[2],h=s[3]*i+s[7]*r+s[11]*n+s[15];return h=h||1,e[0]=(s[0]*i+s[4]*r+s[8]*n)/h,e[1]=(s[1]*i+s[5]*r+s[9]*n)/h,e[2]=(s[2]*i+s[6]*r+s[10]*n)/h,e}function yt(e,t,s){let i=t[0],r=t[1],n=t[2];return e[0]=i*s[0]+r*s[3]+n*s[6],e[1]=i*s[1]+r*s[4]+n*s[7],e[2]=i*s[2]+r*s[5]+n*s[8],e}function Mt(e,t,s){let i=t[0],r=t[1],n=t[2],h=s[0],l=s[1],a=s[2],f=s[3],c=l*n-a*r,d=a*i-h*n,g=h*r-l*i,p=l*g-a*d,u=a*c-h*g,x=h*d-l*c,o=f*2;return c*=o,d*=o,g*=o,p*=2,u*=2,x*=2,e[0]=i+c+p,e[1]=r+d+u,e[2]=n+g+x,e}const _t=function(){const e=[0,0,0],t=[0,0,0];return function(s,i){q(e,s),q(t,i),V(e,e),V(t,t);let r=st(e,t);return r>1?0:r<-1?Math.PI:Math.acos(r)}}();function mt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}class R extends Array{constructor(t=0,s=t,i=t){return super(t,s,i),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set(t,s=t,i=t){return t.length?this.copy(t):(ht(this,t,s,i),this)}copy(t){return q(this,t),this}add(t,s){return s?U(this,t,s):U(this,this,t),this}sub(t,s){return s?$(this,t,s):$(this,this,t),this}multiply(t){return t.length?lt(this,this,t):D(this,this,t),this}divide(t){return t.length?at(this,this,t):D(this,this,1/t),this}inverse(t=this){return gt(this,t),this}len(){return I(this)}distance(t){return t?ft(this,t):I(this)}squaredLen(){return X(this)}squaredDistance(t){return t?ct(this,t):X(this)}negate(t=this){return dt(this,t),this}cross(t,s){return s?k(this,t,s):k(this,this,t),this}scale(t){return D(this,this,t),this}normalize(){return V(this,this),this}dot(t){return st(this,t)}equals(t){return mt(this,t)}applyMatrix3(t){return yt(this,this,t),this}applyMatrix4(t){return xt(this,this,t),this}scaleRotateMatrix4(t){return ot(this,this,t),this}applyQuaternion(t){return Mt(this,this,t),this}angle(t){return _t(this,t)}lerp(t,s){return pt(this,this,t,s),this}smoothLerp(t,s,i){return ut(this,this,t,s,i),this}clone(){return new R(this[0],this[1],this[2])}fromArray(t,s=0){return this[0]=t[s],this[1]=t[s+1],this[2]=t[s+2],this}toArray(t=[],s=0){return t[s]=this[0],t[s+1]=this[1],t[s+2]=this[2],t}transformDirection(t){const s=this[0],i=this[1],r=this[2];return this[0]=t[0]*s+t[4]*i+t[8]*r,this[1]=t[1]*s+t[5]*i+t[9]*r,this[2]=t[2]*s+t[6]*i+t[10]*r,this.normalize()}}const G=new R;let Et=1,wt=1,W=!1;class Fe{constructor(t,s={}){t.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=t,this.attributes=s,this.id=Et++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let i in s)this.addAttribute(i,s[i])}addAttribute(t,s){if(this.attributes[t]=s,s.id=wt++,s.size=s.size||1,s.type=s.type||(s.data.constructor===Float32Array?this.gl.FLOAT:s.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),s.target=t==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,s.normalized=s.normalized||!1,s.stride=s.stride||0,s.offset=s.offset||0,s.count=s.count||(s.stride?s.data.byteLength/s.stride:s.data.length/s.size),s.divisor=s.instanced||0,s.needsUpdate=!1,s.usage=s.usage||this.gl.STATIC_DRAW,s.buffer||this.updateAttribute(s),s.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==s.count*s.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,s.count*s.divisor);this.instancedCount=s.count*s.divisor}else t==="index"?this.drawRange.count=s.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,s.count))}updateAttribute(t){const s=!t.buffer;s&&(t.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==t.buffer&&(this.gl.bindBuffer(t.target,t.buffer),this.glState.boundBuffer=t.buffer),s?this.gl.bufferData(t.target,t.data,t.usage):this.gl.bufferSubData(t.target,0,t.data),t.needsUpdate=!1}setIndex(t){this.addAttribute("index",t)}setDrawRange(t,s){this.drawRange.start=t,this.drawRange.count=s}setInstancedCount(t){this.instancedCount=t}createVAO(t){this.VAOs[t.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.bindAttributes(t)}bindAttributes(t){t.attributeLocations.forEach((s,{name:i,type:r})=>{if(!this.attributes[i]){console.warn(`active attribute ${i} not being supplied`);return}const n=this.attributes[i];this.gl.bindBuffer(n.target,n.buffer),this.glState.boundBuffer=n.buffer;let h=1;r===35674&&(h=2),r===35675&&(h=3),r===35676&&(h=4);const l=n.size/h,a=h===1?0:h*h*4,f=h===1?0:h*4;for(let c=0;c{const l=this.attributes[h];l.needsUpdate&&this.updateAttribute(l)});let i=2;((r=this.attributes.index)==null?void 0:r.type)===this.gl.UNSIGNED_INT&&(i=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(s,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*i,this.instancedCount):this.gl.renderer.drawArraysInstanced(s,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(s,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*i):this.gl.drawArrays(s,this.drawRange.start,this.drawRange.count)}getPosition(){const t=this.attributes.position;if(t.data)return t;if(!W)return console.warn("No position buffer data found to compute bounds"),W=!0}computeBoundingBox(t){t||(t=this.getPosition());const s=t.data,i=t.size;this.bounds||(this.bounds={min:new R,max:new R,center:new R,scale:new R,radius:1/0});const r=this.bounds.min,n=this.bounds.max,h=this.bounds.center,l=this.bounds.scale;r.set(1/0),n.set(-1/0);for(let a=0,f=s.length;a{let h=this.uniforms[n.uniformName];for(const l of n.nameComponents){if(!h)break;if(l in h)h=h[l];else{if(Array.isArray(h.value))break;h=void 0;break}}if(!h)return j(`Active uniform ${n.name} has not been supplied`);if(h&&h.value===void 0)return j(`${n.name} uniform is missing a value parameter`);if(h.value.texture)return s=s+1,h.value.update(s),N(this.gl,n.type,r,s);if(h.value.length&&h.value[0].texture){const l=[];return h.value.forEach(a=>{s=s+1,a.update(s),l.push(s)}),N(this.gl,n.type,r,l)}N(this.gl,n.type,r,h.value)}),this.applyState(),t&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function N(e,t,s,i){i=i.length?At(i):i;const r=e.renderer.state.uniformLocations.get(s);if(i.length)if(r===void 0||r.length!==i.length)e.renderer.state.uniformLocations.set(s,i.slice(0));else{if(Ft(r,i))return;r.set?r.set(i):zt(r,i),e.renderer.state.uniformLocations.set(s,r)}else{if(r===i)return;e.renderer.state.uniformLocations.set(s,i)}switch(t){case 5126:return i.length?e.uniform1fv(s,i):e.uniform1f(s,i);case 35664:return e.uniform2fv(s,i);case 35665:return e.uniform3fv(s,i);case 35666:return e.uniform4fv(s,i);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return i.length?e.uniform1iv(s,i):e.uniform1i(s,i);case 35671:case 35667:return e.uniform2iv(s,i);case 35672:case 35668:return e.uniform3iv(s,i);case 35673:case 35669:return e.uniform4iv(s,i);case 35674:return e.uniformMatrix2fv(s,!1,i);case 35675:return e.uniformMatrix3fv(s,!1,i);case 35676:return e.uniformMatrix4fv(s,!1,i)}}function Z(e){let t=e.split(` +`);for(let s=0;s100||(console.warn(e),P++,P>100&&console.warn("More than 100 program warnings - stopping logs."))}const v=new R;let St=1;class Se{constructor({canvas:t=document.createElement("canvas"),width:s=300,height:i=150,dpr:r=1,alpha:n=!1,depth:h=!0,stencil:l=!1,antialias:a=!1,premultipliedAlpha:f=!1,preserveDrawingBuffer:c=!1,powerPreference:d="default",autoClear:g=!0,webgl:p=2}={}){const u={alpha:n,depth:h,stencil:l,antialias:a,premultipliedAlpha:f,preserveDrawingBuffer:c,powerPreference:d};this.dpr=r,this.alpha=n,this.color=!0,this.depth=h,this.stencil=l,this.premultipliedAlpha=f,this.autoClear=g,this.id=St++,p===2&&(this.gl=t.getContext("webgl2",u)),this.isWebgl2=!!this.gl,this.gl||(this.gl=t.getContext("webgl",u)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(s,i),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(t,s){this.width=t,this.height=s,this.gl.canvas.width=t*this.dpr,this.gl.canvas.height=s*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:t+"px",height:s+"px"})}setViewport(t,s,i=0,r=0){this.state.viewport.width===t&&this.state.viewport.height===s||(this.state.viewport.width=t,this.state.viewport.height=s,this.state.viewport.x=i,this.state.viewport.y=r,this.gl.viewport(i,r,t,s))}setScissor(t,s,i=0,r=0){this.gl.scissor(i,r,t,s)}enable(t){this.state[t]!==!0&&(this.gl.enable(t),this.state[t]=!0)}disable(t){this.state[t]!==!1&&(this.gl.disable(t),this.state[t]=!1)}setBlendFunc(t,s,i,r){this.state.blendFunc.src===t&&this.state.blendFunc.dst===s&&this.state.blendFunc.srcAlpha===i&&this.state.blendFunc.dstAlpha===r||(this.state.blendFunc.src=t,this.state.blendFunc.dst=s,this.state.blendFunc.srcAlpha=i,this.state.blendFunc.dstAlpha=r,i!==void 0?this.gl.blendFuncSeparate(t,s,i,r):this.gl.blendFunc(t,s))}setBlendEquation(t,s){t=t||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===t&&this.state.blendEquation.modeAlpha===s)&&(this.state.blendEquation.modeRGB=t,this.state.blendEquation.modeAlpha=s,s!==void 0?this.gl.blendEquationSeparate(t,s):this.gl.blendEquation(t))}setCullFace(t){this.state.cullFace!==t&&(this.state.cullFace=t,this.gl.cullFace(t))}setFrontFace(t){this.state.frontFace!==t&&(this.state.frontFace=t,this.gl.frontFace(t))}setDepthMask(t){this.state.depthMask!==t&&(this.state.depthMask=t,this.gl.depthMask(t))}setDepthFunc(t){this.state.depthFunc!==t&&(this.state.depthFunc=t,this.gl.depthFunc(t))}setStencilMask(t){this.state.stencilMask!==t&&(this.state.stencilMask=t,this.gl.stencilMask(t))}setStencilFunc(t,s,i){this.state.stencilFunc===t&&this.state.stencilRef===s&&this.state.stencilFuncMask===i||(this.state.stencilFunc=t||this.gl.ALWAYS,this.state.stencilRef=s||0,this.state.stencilFuncMask=i||0,this.gl.stencilFunc(t||this.gl.ALWAYS,s||0,i||0))}setStencilOp(t,s,i){this.state.stencilFail===t&&this.state.stencilDepthFail===s&&this.state.stencilDepthPass===i||(this.state.stencilFail=t,this.state.stencilDepthFail=s,this.state.stencilDepthPass=i,this.gl.stencilOp(t,s,i))}activeTexture(t){this.state.activeTextureUnit!==t&&(this.state.activeTextureUnit=t,this.gl.activeTexture(this.gl.TEXTURE0+t))}bindFramebuffer({target:t=this.gl.FRAMEBUFFER,buffer:s=null}={}){this.state.framebuffer!==s&&(this.state.framebuffer=s,this.gl.bindFramebuffer(t,s))}getExtension(t,s,i){return s&&this.gl[s]?this.gl[s].bind(this.gl):(this.extensions[t]||(this.extensions[t]=this.gl.getExtension(t)),s?this.extensions[t]?this.extensions[t][i].bind(this.extensions[t]):null:this.extensions[t])}sortOpaque(t,s){return t.renderOrder!==s.renderOrder?t.renderOrder-s.renderOrder:t.program.id!==s.program.id?t.program.id-s.program.id:t.zDepth!==s.zDepth?t.zDepth-s.zDepth:s.id-t.id}sortTransparent(t,s){return t.renderOrder!==s.renderOrder?t.renderOrder-s.renderOrder:t.zDepth!==s.zDepth?s.zDepth-t.zDepth:s.id-t.id}sortUI(t,s){return t.renderOrder!==s.renderOrder?t.renderOrder-s.renderOrder:t.program.id!==s.program.id?t.program.id-s.program.id:s.id-t.id}getRenderList({scene:t,camera:s,frustumCull:i,sort:r}){let n=[];if(s&&i&&s.updateFrustum(),t.traverse(h=>{if(!h.visible)return!0;h.draw&&(i&&h.frustumCulled&&s&&!s.frustumIntersectsMesh(h)||n.push(h))}),r){const h=[],l=[],a=[];n.forEach(f=>{f.program.transparent?f.program.depthTest?l.push(f):a.push(f):h.push(f),f.zDepth=0,!(f.renderOrder!==0||!f.program.depthTest||!s)&&(f.worldMatrix.getTranslation(v),v.applyMatrix4(s.projectionViewMatrix),f.zDepth=v.z)}),h.sort(this.sortOpaque),l.sort(this.sortTransparent),a.sort(this.sortUI),n=h.concat(l,a)}return n}render({scene:t,camera:s,target:i=null,update:r=!0,sort:n=!0,frustumCull:h=!0,clear:l}){i===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(i),this.setViewport(i.width,i.height)),(l||this.autoClear&&l!==!1)&&(this.depth&&(!i||i.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!i||i.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),r&&t.updateMatrixWorld(),s&&s.updateMatrixWorld(),this.getRenderList({scene:t,camera:s,frustumCull:h,sort:n}).forEach(f=>{f.draw({camera:s})})}}function Ct(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Ot(e,t,s,i,r){return e[0]=t,e[1]=s,e[2]=i,e[3]=r,e}function Lt(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=s*s+i*i+r*r+n*n;return h>0&&(h=1/Math.sqrt(h)),e[0]=s*h,e[1]=i*h,e[2]=r*h,e[3]=n*h,e}function Rt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Tt(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function It(e,t,s){s=s*.5;let i=Math.sin(s);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(s),e}function Q(e,t,s){let i=t[0],r=t[1],n=t[2],h=t[3],l=s[0],a=s[1],f=s[2],c=s[3];return e[0]=i*c+h*l+r*f-n*a,e[1]=r*c+h*a+n*l-i*f,e[2]=n*c+h*f+i*a-r*l,e[3]=h*c-i*l-r*a-n*f,e}function Bt(e,t,s){s*=.5;let i=t[0],r=t[1],n=t[2],h=t[3],l=Math.sin(s),a=Math.cos(s);return e[0]=i*a+h*l,e[1]=r*a+n*l,e[2]=n*a-r*l,e[3]=h*a-i*l,e}function Dt(e,t,s){s*=.5;let i=t[0],r=t[1],n=t[2],h=t[3],l=Math.sin(s),a=Math.cos(s);return e[0]=i*a-n*l,e[1]=r*a+h*l,e[2]=n*a+i*l,e[3]=h*a-r*l,e}function Nt(e,t,s){s*=.5;let i=t[0],r=t[1],n=t[2],h=t[3],l=Math.sin(s),a=Math.cos(s);return e[0]=i*a+r*l,e[1]=r*a-i*l,e[2]=n*a+h*l,e[3]=h*a-n*l,e}function Pt(e,t,s,i){let r=t[0],n=t[1],h=t[2],l=t[3],a=s[0],f=s[1],c=s[2],d=s[3],g,p,u,x,o;return p=r*a+n*f+h*c+l*d,p<0&&(p=-p,a=-a,f=-f,c=-c,d=-d),1-p>1e-6?(g=Math.acos(p),u=Math.sin(g),x=Math.sin((1-i)*g)/u,o=Math.sin(i*g)/u):(x=1-i,o=i),e[0]=x*r+o*a,e[1]=x*n+o*f,e[2]=x*h+o*c,e[3]=x*l+o*d,e}function vt(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=s*s+i*i+r*r+n*n,l=h?1/h:0;return e[0]=-s*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e}function qt(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function Vt(e,t){let s=t[0]+t[4]+t[8],i;if(s>0)i=Math.sqrt(s+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[r*3+r]&&(r=2);let n=(r+1)%3,h=(r+2)%3;i=Math.sqrt(t[r*3+r]-t[n*3+n]-t[h*3+h]+1),e[r]=.5*i,i=.5/i,e[3]=(t[n*3+h]-t[h*3+n])*i,e[n]=(t[n*3+r]+t[r*3+n])*i,e[h]=(t[h*3+r]+t[r*3+h])*i}return e}function Ut(e,t,s="YXZ"){let i=Math.sin(t[0]*.5),r=Math.cos(t[0]*.5),n=Math.sin(t[1]*.5),h=Math.cos(t[1]*.5),l=Math.sin(t[2]*.5),a=Math.cos(t[2]*.5);return s==="XYZ"?(e[0]=i*h*a+r*n*l,e[1]=r*n*a-i*h*l,e[2]=r*h*l+i*n*a,e[3]=r*h*a-i*n*l):s==="YXZ"?(e[0]=i*h*a+r*n*l,e[1]=r*n*a-i*h*l,e[2]=r*h*l-i*n*a,e[3]=r*h*a+i*n*l):s==="ZXY"?(e[0]=i*h*a-r*n*l,e[1]=r*n*a+i*h*l,e[2]=r*h*l+i*n*a,e[3]=r*h*a-i*n*l):s==="ZYX"?(e[0]=i*h*a-r*n*l,e[1]=r*n*a+i*h*l,e[2]=r*h*l-i*n*a,e[3]=r*h*a+i*n*l):s==="YZX"?(e[0]=i*h*a+r*n*l,e[1]=r*n*a+i*h*l,e[2]=r*h*l-i*n*a,e[3]=r*h*a-i*n*l):s==="XZY"&&(e[0]=i*h*a-r*n*l,e[1]=r*n*a-i*h*l,e[2]=r*h*l+i*n*a,e[3]=r*h*a+i*n*l),e}const $t=Ct,Xt=Ot,kt=Rt,Gt=Lt;class Wt extends Array{constructor(t=0,s=0,i=0,r=1){super(t,s,i,r),this.onChange=()=>{},this._target=this;const n=["0","1","2","3"];return new Proxy(this,{set(h,l){const a=Reflect.set(...arguments);return a&&n.includes(l)&&h.onChange(),a}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set w(t){this._target[3]=t,this.onChange()}identity(){return Tt(this._target),this.onChange(),this}set(t,s,i,r){return t.length?this.copy(t):(Xt(this._target,t,s,i,r),this.onChange(),this)}rotateX(t){return Bt(this._target,this._target,t),this.onChange(),this}rotateY(t){return Dt(this._target,this._target,t),this.onChange(),this}rotateZ(t){return Nt(this._target,this._target,t),this.onChange(),this}inverse(t=this._target){return vt(this._target,t),this.onChange(),this}conjugate(t=this._target){return qt(this._target,t),this.onChange(),this}copy(t){return $t(this._target,t),this.onChange(),this}normalize(t=this._target){return Gt(this._target,t),this.onChange(),this}multiply(t,s){return s?Q(this._target,t,s):Q(this._target,this._target,t),this.onChange(),this}dot(t){return kt(this._target,t)}fromMatrix3(t){return Vt(this._target,t),this.onChange(),this}fromEuler(t,s){return Ut(this._target,t,t.order),s||this.onChange(),this}fromAxisAngle(t,s){return It(this._target,t,s),this.onChange(),this}slerp(t,s){return Pt(this._target,this._target,t,s),this.onChange(),this}fromArray(t,s=0){return this._target[0]=t[s],this._target[1]=t[s+1],this._target[2]=t[s+2],this._target[3]=t[s+3],this.onChange(),this}toArray(t=[],s=0){return t[s]=this[0],t[s+1]=this[1],t[s+2]=this[2],t[s+3]=this[3],t}}const Yt=1e-6;function Zt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function jt(e,t,s,i,r,n,h,l,a,f,c,d,g,p,u,x,o){return e[0]=t,e[1]=s,e[2]=i,e[3]=r,e[4]=n,e[5]=h,e[6]=l,e[7]=a,e[8]=f,e[9]=c,e[10]=d,e[11]=g,e[12]=p,e[13]=u,e[14]=x,e[15]=o,e}function Qt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Ht(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=t[4],l=t[5],a=t[6],f=t[7],c=t[8],d=t[9],g=t[10],p=t[11],u=t[12],x=t[13],o=t[14],y=t[15],b=s*l-i*h,_=s*a-r*h,M=s*f-n*h,E=i*a-r*l,m=i*f-n*l,A=r*f-n*a,S=c*x-d*u,C=c*o-g*u,F=c*y-p*u,O=d*o-g*x,z=d*y-p*x,L=g*y-p*o,w=b*L-_*z+M*O+E*F-m*C+A*S;return w?(w=1/w,e[0]=(l*L-a*z+f*O)*w,e[1]=(r*z-i*L-n*O)*w,e[2]=(x*A-o*m+y*E)*w,e[3]=(g*m-d*A-p*E)*w,e[4]=(a*F-h*L-f*C)*w,e[5]=(s*L-r*F+n*C)*w,e[6]=(o*M-u*A-y*_)*w,e[7]=(c*A-g*M+p*_)*w,e[8]=(h*z-l*F+f*S)*w,e[9]=(i*F-s*z-n*S)*w,e[10]=(u*m-x*M+y*b)*w,e[11]=(d*M-c*m-p*b)*w,e[12]=(l*C-h*O-a*S)*w,e[13]=(s*O-i*C+r*S)*w,e[14]=(x*_-u*E-o*b)*w,e[15]=(c*E-d*_+g*b)*w,e):null}function it(e){let t=e[0],s=e[1],i=e[2],r=e[3],n=e[4],h=e[5],l=e[6],a=e[7],f=e[8],c=e[9],d=e[10],g=e[11],p=e[12],u=e[13],x=e[14],o=e[15],y=t*h-s*n,b=t*l-i*n,_=t*a-r*n,M=s*l-i*h,E=s*a-r*h,m=i*a-r*l,A=f*u-c*p,S=f*x-d*p,C=f*o-g*p,F=c*x-d*u,O=c*o-g*u,z=d*o-g*x;return y*z-b*O+_*F+M*C-E*S+m*A}function H(e,t,s){let i=t[0],r=t[1],n=t[2],h=t[3],l=t[4],a=t[5],f=t[6],c=t[7],d=t[8],g=t[9],p=t[10],u=t[11],x=t[12],o=t[13],y=t[14],b=t[15],_=s[0],M=s[1],E=s[2],m=s[3];return e[0]=_*i+M*l+E*d+m*x,e[1]=_*r+M*a+E*g+m*o,e[2]=_*n+M*f+E*p+m*y,e[3]=_*h+M*c+E*u+m*b,_=s[4],M=s[5],E=s[6],m=s[7],e[4]=_*i+M*l+E*d+m*x,e[5]=_*r+M*a+E*g+m*o,e[6]=_*n+M*f+E*p+m*y,e[7]=_*h+M*c+E*u+m*b,_=s[8],M=s[9],E=s[10],m=s[11],e[8]=_*i+M*l+E*d+m*x,e[9]=_*r+M*a+E*g+m*o,e[10]=_*n+M*f+E*p+m*y,e[11]=_*h+M*c+E*u+m*b,_=s[12],M=s[13],E=s[14],m=s[15],e[12]=_*i+M*l+E*d+m*x,e[13]=_*r+M*a+E*g+m*o,e[14]=_*n+M*f+E*p+m*y,e[15]=_*h+M*c+E*u+m*b,e}function Kt(e,t,s){let i=s[0],r=s[1],n=s[2],h,l,a,f,c,d,g,p,u,x,o,y;return t===e?(e[12]=t[0]*i+t[4]*r+t[8]*n+t[12],e[13]=t[1]*i+t[5]*r+t[9]*n+t[13],e[14]=t[2]*i+t[6]*r+t[10]*n+t[14],e[15]=t[3]*i+t[7]*r+t[11]*n+t[15]):(h=t[0],l=t[1],a=t[2],f=t[3],c=t[4],d=t[5],g=t[6],p=t[7],u=t[8],x=t[9],o=t[10],y=t[11],e[0]=h,e[1]=l,e[2]=a,e[3]=f,e[4]=c,e[5]=d,e[6]=g,e[7]=p,e[8]=u,e[9]=x,e[10]=o,e[11]=y,e[12]=h*i+c*r+u*n+t[12],e[13]=l*i+d*r+x*n+t[13],e[14]=a*i+g*r+o*n+t[14],e[15]=f*i+p*r+y*n+t[15]),e}function Jt(e,t,s){let i=s[0],r=s[1],n=s[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function te(e,t,s,i){let r=i[0],n=i[1],h=i[2],l=Math.hypot(r,n,h),a,f,c,d,g,p,u,x,o,y,b,_,M,E,m,A,S,C,F,O,z,L,w,T;return Math.abs(l)0?(y=Math.sqrt(o+1)*2,t[3]=.25*y,t[0]=(g-u)/y,t[1]=(p-f)/y,t[2]=(a-c)/y):l>d&&l>x?(y=Math.sqrt(1+l-d-x)*2,t[3]=(g-u)/y,t[0]=.25*y,t[1]=(a+c)/y,t[2]=(p+f)/y):d>x?(y=Math.sqrt(1+d-l-x)*2,t[3]=(p-f)/y,t[0]=(a+c)/y,t[1]=.25*y,t[2]=(g+u)/y):(y=Math.sqrt(1+x-l-d)*2,t[3]=(a-c)/y,t[0]=(p+f)/y,t[1]=(g+u)/y,t[2]=.25*y),t}}();function ie(e,t,s,i){let r=I([e[0],e[1],e[2]]);const n=I([e[4],e[5],e[6]]),h=I([e[8],e[9],e[10]]);it(e)<0&&(r=-r),s[0]=e[12],s[1]=e[13],s[2]=e[14];const a=e.slice(),f=1/r,c=1/n,d=1/h;a[0]*=f,a[1]*=f,a[2]*=f,a[4]*=c,a[5]*=c,a[6]*=c,a[8]*=d,a[9]*=d,a[10]*=d,nt(t,a),i[0]=r,i[1]=n,i[2]=h}function re(e,t,s,i){const r=e,n=t[0],h=t[1],l=t[2],a=t[3],f=n+n,c=h+h,d=l+l,g=n*f,p=n*c,u=n*d,x=h*c,o=h*d,y=l*d,b=a*f,_=a*c,M=a*d,E=i[0],m=i[1],A=i[2];return r[0]=(1-(x+y))*E,r[1]=(p+M)*E,r[2]=(u-_)*E,r[3]=0,r[4]=(p-M)*m,r[5]=(1-(g+y))*m,r[6]=(o+b)*m,r[7]=0,r[8]=(u+_)*A,r[9]=(o-b)*A,r[10]=(1-(g+x))*A,r[11]=0,r[12]=s[0],r[13]=s[1],r[14]=s[2],r[15]=1,r}function ne(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=s+s,l=i+i,a=r+r,f=s*h,c=i*h,d=i*l,g=r*h,p=r*l,u=r*a,x=n*h,o=n*l,y=n*a;return e[0]=1-d-u,e[1]=c+y,e[2]=g-o,e[3]=0,e[4]=c-y,e[5]=1-f-u,e[6]=p+x,e[7]=0,e[8]=g+o,e[9]=p-x,e[10]=1-f-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function he(e,t,s,i,r){let n=1/Math.tan(t/2),h=1/(i-r);return e[0]=n/s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(r+i)*h,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*i*h,e[15]=0,e}function le(e,t,s,i,r,n,h){let l=1/(t-s),a=1/(i-r),f=1/(n-h);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*f,e[11]=0,e[12]=(t+s)*l,e[13]=(r+i)*a,e[14]=(h+n)*f,e[15]=1,e}function ae(e,t,s,i){let r=t[0],n=t[1],h=t[2],l=i[0],a=i[1],f=i[2],c=r-s[0],d=n-s[1],g=h-s[2],p=c*c+d*d+g*g;p===0?g=1:(p=1/Math.sqrt(p),c*=p,d*=p,g*=p);let u=a*g-f*d,x=f*c-l*g,o=l*d-a*c;return p=u*u+x*x+o*o,p===0&&(f?l+=1e-6:a?f+=1e-6:a+=1e-6,u=a*g-f*d,x=f*c-l*g,o=l*d-a*c,p=u*u+x*x+o*o),p=1/Math.sqrt(p),u*=p,x*=p,o*=p,e[0]=u,e[1]=x,e[2]=o,e[3]=0,e[4]=d*o-g*x,e[5]=g*u-c*o,e[6]=c*x-d*u,e[7]=0,e[8]=c,e[9]=d,e[10]=g,e[11]=0,e[12]=r,e[13]=n,e[14]=h,e[15]=1,e}function K(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e[2]=t[2]+s[2],e[3]=t[3]+s[3],e[4]=t[4]+s[4],e[5]=t[5]+s[5],e[6]=t[6]+s[6],e[7]=t[7]+s[7],e[8]=t[8]+s[8],e[9]=t[9]+s[9],e[10]=t[10]+s[10],e[11]=t[11]+s[11],e[12]=t[12]+s[12],e[13]=t[13]+s[13],e[14]=t[14]+s[14],e[15]=t[15]+s[15],e}function J(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e[2]=t[2]-s[2],e[3]=t[3]-s[3],e[4]=t[4]-s[4],e[5]=t[5]-s[5],e[6]=t[6]-s[6],e[7]=t[7]-s[7],e[8]=t[8]-s[8],e[9]=t[9]-s[9],e[10]=t[10]-s[10],e[11]=t[11]-s[11],e[12]=t[12]-s[12],e[13]=t[13]-s[13],e[14]=t[14]-s[14],e[15]=t[15]-s[15],e}function fe(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e[4]=t[4]*s,e[5]=t[5]*s,e[6]=t[6]*s,e[7]=t[7]*s,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12]*s,e[13]=t[13]*s,e[14]=t[14]*s,e[15]=t[15]*s,e}class B extends Array{constructor(t=1,s=0,i=0,r=0,n=0,h=1,l=0,a=0,f=0,c=0,d=1,g=0,p=0,u=0,x=0,o=1){return super(t,s,i,r,n,h,l,a,f,c,d,g,p,u,x,o),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(t){this[12]=t}set y(t){this[13]=t}set z(t){this[14]=t}set w(t){this[15]=t}set(t,s,i,r,n,h,l,a,f,c,d,g,p,u,x,o){return t.length?this.copy(t):(jt(this,t,s,i,r,n,h,l,a,f,c,d,g,p,u,x,o),this)}translate(t,s=this){return Kt(this,s,t),this}rotate(t,s,i=this){return te(this,i,t,s),this}scale(t,s=this){return Jt(this,s,typeof t=="number"?[t,t,t]:t),this}add(t,s){return s?K(this,t,s):K(this,this,t),this}sub(t,s){return s?J(this,t,s):J(this,this,t),this}multiply(t,s){return t.length?s?H(this,t,s):H(this,this,t):fe(this,this,t),this}identity(){return Qt(this),this}copy(t){return Zt(this,t),this}fromPerspective({fov:t,aspect:s,near:i,far:r}={}){return he(this,t,s,i,r),this}fromOrthogonal({left:t,right:s,bottom:i,top:r,near:n,far:h}){return le(this,t,s,i,r,n,h),this}fromQuaternion(t){return ne(this,t),this}setPosition(t){return this.x=t[0],this.y=t[1],this.z=t[2],this}inverse(t=this){return Ht(this,t),this}compose(t,s,i){return re(this,t,s,i),this}decompose(t,s,i){return ie(this,t,s,i),this}getRotation(t){return nt(t,this),this}getTranslation(t){return ee(t,this),this}getScaling(t){return rt(t,this),this}getMaxScaleOnAxis(){return se(this)}lookAt(t,s,i){return ae(this,t,s,i),this}determinant(){return it(this)}fromArray(t,s=0){return this[0]=t[s],this[1]=t[s+1],this[2]=t[s+2],this[3]=t[s+3],this[4]=t[s+4],this[5]=t[s+5],this[6]=t[s+6],this[7]=t[s+7],this[8]=t[s+8],this[9]=t[s+9],this[10]=t[s+10],this[11]=t[s+11],this[12]=t[s+12],this[13]=t[s+13],this[14]=t[s+14],this[15]=t[s+15],this}toArray(t=[],s=0){return t[s]=this[0],t[s+1]=this[1],t[s+2]=this[2],t[s+3]=this[3],t[s+4]=this[4],t[s+5]=this[5],t[s+6]=this[6],t[s+7]=this[7],t[s+8]=this[8],t[s+9]=this[9],t[s+10]=this[10],t[s+11]=this[11],t[s+12]=this[12],t[s+13]=this[13],t[s+14]=this[14],t[s+15]=this[15],t}}function ce(e,t,s="YXZ"){return s==="XYZ"?(e[1]=Math.asin(Math.min(Math.max(t[8],-1),1)),Math.abs(t[8])<.99999?(e[0]=Math.atan2(-t[9],t[10]),e[2]=Math.atan2(-t[4],t[0])):(e[0]=Math.atan2(t[6],t[5]),e[2]=0)):s==="YXZ"?(e[0]=Math.asin(-Math.min(Math.max(t[9],-1),1)),Math.abs(t[9])<.99999?(e[1]=Math.atan2(t[8],t[10]),e[2]=Math.atan2(t[1],t[5])):(e[1]=Math.atan2(-t[2],t[0]),e[2]=0)):s==="ZXY"?(e[0]=Math.asin(Math.min(Math.max(t[6],-1),1)),Math.abs(t[6])<.99999?(e[1]=Math.atan2(-t[2],t[10]),e[2]=Math.atan2(-t[4],t[5])):(e[1]=0,e[2]=Math.atan2(t[1],t[0]))):s==="ZYX"?(e[1]=Math.asin(-Math.min(Math.max(t[2],-1),1)),Math.abs(t[2])<.99999?(e[0]=Math.atan2(t[6],t[10]),e[2]=Math.atan2(t[1],t[0])):(e[0]=0,e[2]=Math.atan2(-t[4],t[5]))):s==="YZX"?(e[2]=Math.asin(Math.min(Math.max(t[1],-1),1)),Math.abs(t[1])<.99999?(e[0]=Math.atan2(-t[9],t[5]),e[1]=Math.atan2(-t[2],t[0])):(e[0]=0,e[1]=Math.atan2(t[8],t[10]))):s==="XZY"&&(e[2]=Math.asin(-Math.min(Math.max(t[4],-1),1)),Math.abs(t[4])<.99999?(e[0]=Math.atan2(t[6],t[5]),e[1]=Math.atan2(t[8],t[0])):(e[0]=Math.atan2(-t[9],t[10]),e[1]=0)),e}const tt=new B;class de extends Array{constructor(t=0,s=t,i=t,r="YXZ"){super(t,s,i),this.order=r,this.onChange=()=>{},this._target=this;const n=["0","1","2"];return new Proxy(this,{set(h,l){const a=Reflect.set(...arguments);return a&&n.includes(l)&&h.onChange(),a}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set(t,s=t,i=t){return t.length?this.copy(t):(this._target[0]=t,this._target[1]=s,this._target[2]=i,this.onChange(),this)}copy(t){return this._target[0]=t[0],this._target[1]=t[1],this._target[2]=t[2],this.onChange(),this}reorder(t){return this._target.order=t,this.onChange(),this}fromRotationMatrix(t,s=this.order){return ce(this._target,t,s),this.onChange(),this}fromQuaternion(t,s=this.order,i){return tt.fromQuaternion(t),this._target.fromRotationMatrix(tt,s),i||this.onChange(),this}fromArray(t,s=0){return this._target[0]=t[s],this._target[1]=t[s+1],this._target[2]=t[s+2],this}toArray(t=[],s=0){return t[s]=this[0],t[s+1]=this[1],t[s+2]=this[2],t}}class ge{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new B,this.worldMatrix=new B,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new R,this.quaternion=new Wt,this.scale=new R(1),this.rotation=new de,this.up=new R(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(t,s=!0){this.parent&&t!==this.parent&&this.parent.removeChild(this,!1),this.parent=t,s&&t&&t.addChild(this,!1)}addChild(t,s=!0){~this.children.indexOf(t)||this.children.push(t),s&&t.setParent(this,!1)}removeChild(t,s=!0){~this.children.indexOf(t)&&this.children.splice(this.children.indexOf(t),1),s&&t.setParent(null,!1)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||t)&&(this.parent===null?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,t=!0);for(let s=0,i=this.children.length;si&&i({mesh:this,camera:t}));let s=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:s}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(i=>i&&i({mesh:this,camera:t}))}}export{Fe as G,Ce as M,ze as P,Se as R,ge as T,R as V,B as a}; diff --git a/dist/assets/Packages-CIW8TdH4.js b/dist/assets/Packages-CIW8TdH4.js deleted file mode 100644 index 6d1c7d5..0000000 --- a/dist/assets/Packages-CIW8TdH4.js +++ /dev/null @@ -1 +0,0 @@ -import{u as k,c as w,r as i,b as C,j as e,L as y,Q as m,s as S,z as L}from"./index-CJw6IpTa.js";import{S as P}from"./SpotlightCard-lt5CQbhM.js";function A(){const{user:l,refreshUser:u}=k(),h=w(),[b,f]=i.useState([]),[j,p]=i.useState(!0),[t,o]=i.useState(null),[n,r]=i.useState(null);i.useEffect(()=>{C().then(s=>{s.data.success&&f(s.data.data||[])}).catch(()=>{}).finally(()=>p(!1))},[]);const g=async s=>{if(!l){h("/register");return}r(s)},N=async()=>{if(!n)return;const s=n.id;o(s);try{(await S(s)).data.success&&(L.success("Subscribed successfully!"),r(null),await u())}catch{}o(null)};if(j)return e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})});const d=b.filter(s=>s.enabled),x=["rgba(129,140,248,0.15)","rgba(192,132,252,0.15)","rgba(244,114,182,0.15)","rgba(34,197,94,0.15)"];return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-3xl font-heading font-bold text-white mb-3",children:"Packages & Plans"}),e.jsx("p",{className:"text-neutral-400 max-w-xl mx-auto",children:"Choose a package that fits your usage. All plans include access to all available models."})]}),d.length===0?e.jsxs("div",{className:"text-center py-12 text-neutral-400",children:[e.jsx("p",{children:"No packages available at the moment."}),e.jsx(y,{to:"/pricing",className:"text-brand-400 hover:text-brand-300 transition-colors mt-2 inline-block",children:"Check model pricing →"})]}):e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:d.map((s,a)=>e.jsx(P,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-0 !rounded-2xl flex flex-col",spotlightColor:x[a%x.length],children:e.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"text-xl font-semibold text-white",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-400 mt-1",children:s.description})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-4xl font-bold text-white",children:["$",Number(s.price).toFixed(2)]}),s.original_price>0&&s.original_price>s.price&&e.jsxs("span",{className:"text-lg text-neutral-500 line-through",children:["$",Number(s.original_price).toFixed(2)]})]}),s.duration>0&&e.jsxs("p",{className:"text-sm text-neutral-500 mt-1",children:[s.duration," days access"]})]}),e.jsxs("ul",{className:"space-y-2 mb-6 flex-1",children:[s.quota_amount>0&&e.jsxs("li",{className:"flex items-center gap-2 text-sm text-neutral-300",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"$",(s.quota_amount/m).toFixed(2)," credit included"]}),s.rate_limit>0&&e.jsxs("li",{className:"flex items-center gap-2 text-sm text-neutral-300",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),s.rate_limit," requests/min"]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-neutral-300",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"All models access"]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-neutral-300",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"OpenAI-compatible API"]})]}),e.jsx("button",{onClick:()=>g(s),disabled:t===s.id,className:"btn-primary w-full text-center",children:t===s.id?"Processing...":l?"Subscribe Now":"Sign Up to Subscribe"})]})},s.id))}),n&&(()=>{const s=((l==null?void 0:l.quota)||0)/m,a=Number(n.price),c=s!t&&r(null),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-sm",onClick:v=>v.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-3",children:"Confirm Subscription"}),e.jsxs("p",{className:"text-sm text-neutral-400 mb-2",children:["Subscribe to ",e.jsx("span",{className:"text-white font-medium",children:n.name})," for"," ",e.jsxs("span",{className:"text-white font-medium",children:["$",a.toFixed(2)]}),"?"]}),e.jsxs("p",{className:"text-sm text-neutral-400 mb-4",children:["Your balance: ",e.jsxs("span",{className:`font-medium ${c?"text-red-400":"text-green-400"}`,children:["$",s.toFixed(2)]})]}),c&&e.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded-xl p-3 mb-4",children:e.jsx("p",{className:"text-sm text-red-300",children:"Insufficient balance. Please top up before subscribing."})}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>r(null),disabled:t,className:"btn-secondary",children:"Cancel"}),e.jsx("button",{onClick:N,disabled:c||t,className:"btn-primary",children:t?"Processing...":"Confirm"})]})]})})})()]})}export{A as default}; diff --git a/dist/assets/Packages-p_b3v2L7.js b/dist/assets/Packages-p_b3v2L7.js new file mode 100644 index 0000000..70a1da1 --- /dev/null +++ b/dist/assets/Packages-p_b3v2L7.js @@ -0,0 +1 @@ +import{u as w,b as y,r as l,k as L,j as e,L as C,Q as u,s as S,z as P}from"./index-Drgd7k5E.js";import{S as B}from"./SpotlightCard-C_ZqQ-j4.js";import{u as _}from"./useTranslation-B7WzaWp0.js";function W(){const{t}=_(),{user:r,refreshUser:h}=w(),p=y(),[b,g]=l.useState([]),[f,j]=l.useState(!0),[a,d]=l.useState(null),[i,c]=l.useState(null);l.useEffect(()=>{L().then(s=>{s.data.success&&g(s.data.data||[])}).catch(()=>{}).finally(()=>j(!1))},[]);const N=async s=>{if(!r){p("/register");return}c(s)},k=async()=>{if(!i)return;const s=i.id;d(s);try{(await S(s)).data.success&&(P.success(t("packages.subscribedSuccess")),c(null),await h())}catch{}d(null)};if(f)return e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})});const x=b.filter(s=>s.enabled),m=["rgba(129,140,248,0.15)","rgba(192,132,252,0.15)","rgba(244,114,182,0.15)","rgba(34,197,94,0.15)"];return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-3xl font-heading font-bold text-white mb-3",children:t("packages.title")}),e.jsx("p",{className:"text-neutral-400 max-w-xl mx-auto",children:t("packages.subtitle")})]}),x.length===0?e.jsxs("div",{className:"text-center py-12 text-neutral-400",children:[e.jsx("p",{children:t("packages.noPackages")}),e.jsxs(C,{to:"/pricing",className:"text-brand-400 hover:text-brand-300 transition-colors mt-2 inline-block",children:[t("packages.checkPricing")," →"]})]}):e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:x.map((s,n)=>e.jsx(B,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-0 !rounded-2xl flex flex-col",spotlightColor:m[n%m.length],children:e.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"text-xl font-semibold text-white",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-400 mt-1",children:s.description})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-4xl font-bold text-white",children:["$",Number(s.price).toFixed(2)]}),s.original_price>0&&s.original_price>s.price&&e.jsxs("span",{className:"text-lg text-neutral-500 line-through",children:["$",Number(s.original_price).toFixed(2)]})]}),s.duration>0&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t("packages.daysAccess",{count:s.duration})})]}),e.jsxs("ul",{className:"space-y-2 mb-6 flex-1",children:[s.quota_amount>0&&e.jsxs("li",{className:"flex items-center gap-2 text-sm text-neutral-300",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),t("packages.creditIncluded",{amount:(s.quota_amount/u).toFixed(2)})]}),s.rate_limit>0&&e.jsxs("li",{className:"flex items-center gap-2 text-sm text-neutral-300",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),t("packages.requestsMin",{count:s.rate_limit})]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-neutral-300",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),t("packages.allModels")]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-neutral-300",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),t("packages.openaiApi")]})]}),e.jsx("button",{onClick:()=>N(s),disabled:a===s.id,className:"btn-primary w-full text-center",children:a===s.id?t("packages.processing"):t(r?"packages.subscribeNow":"packages.signUpToSubscribe")})]})},s.id))}),i&&(()=>{const s=((r==null?void 0:r.quota)||0)/u,n=Number(i.price),o=s!a&&c(null),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-sm",onClick:v=>v.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-3",children:t("packages.confirmTitle")}),e.jsx("p",{className:"text-sm text-neutral-400 mb-2",children:t("packages.confirmDesc",{name:i.name,price:n.toFixed(2)})}),e.jsxs("p",{className:"text-sm text-neutral-400 mb-4",children:[t("packages.yourBalance")," ",e.jsxs("span",{className:`font-medium ${o?"text-red-400":"text-green-400"}`,children:["$",s.toFixed(2)]})]}),o&&e.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded-xl p-3 mb-4",children:e.jsx("p",{className:"text-sm text-red-300",children:t("packages.insufficientBalance")})}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>c(null),disabled:a,className:"btn-secondary",children:t("tokens.cancel")}),e.jsx("button",{onClick:k,disabled:o||a,className:"btn-primary",children:t(a?"packages.processing":"packages.confirm")})]})]})})})()]})}export{W as default}; diff --git a/dist/assets/Pricing-BiEw1jsi.js b/dist/assets/Pricing-BiEw1jsi.js new file mode 100644 index 0000000..e2ee493 --- /dev/null +++ b/dist/assets/Pricing-BiEw1jsi.js @@ -0,0 +1 @@ +import{r as n,l as u,j as e}from"./index-Drgd7k5E.js";import{u as h}from"./useTranslation-B7WzaWp0.js";function f(){const{t:s}=h(),[l,i]=n.useState([]),[a,d]=n.useState(""),[c,o]=n.useState(!0);n.useEffect(()=>{u().then(t=>{t.data.success&&i(t.data.data||[])}).catch(()=>{}).finally(()=>o(!1))},[]);const r=l.filter(t=>t.enabled!==!1).filter(t=>!a||(t.display_name||t.model_name||"").toLowerCase().includes(a.toLowerCase()));return c?e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("h1",{className:"text-3xl font-heading font-bold text-white mb-3",children:s("pricing.title")}),e.jsx("p",{className:"text-neutral-400 max-w-xl mx-auto",children:s("pricing.subtitle")})]}),e.jsx("div",{className:"max-w-md mx-auto mb-8",children:e.jsxs("div",{className:"relative",children:[e.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),e.jsx("input",{type:"text",value:a,onChange:t=>d(t.target.value),className:"input !pl-10",placeholder:s("pricing.searchPlaceholder")})]})}),r.length===0?e.jsx("div",{className:"text-center py-12 text-neutral-400",children:s(a?"pricing.noMatch":"pricing.noModels")}):e.jsx("div",{className:"glass-sm rounded-xl overflow-hidden",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-white/[0.06]",children:[e.jsx("th",{className:"text-left px-5 py-3.5 font-medium text-neutral-400",children:s("pricing.model")}),e.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-neutral-400",children:s("pricing.inputPrice")}),e.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-neutral-400",children:s("pricing.outputPrice")}),e.jsx("th",{className:"text-center px-5 py-3.5 font-medium text-neutral-400",children:s("pricing.status")})]})}),e.jsx("tbody",{children:r.map((t,x)=>e.jsxs("tr",{className:"border-b border-white/[0.04] last:border-0 hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"px-5 py-3.5",children:e.jsx("span",{className:"font-mono text-white",children:t.display_name||t.model_name})}),e.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-neutral-300",children:t.input_price!=null?`$${(Number(t.input_price)*1e3).toFixed(4)}`:"-"}),e.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-neutral-300",children:t.output_price!=null?`$${(Number(t.output_price)*1e3).toFixed(4)}`:"-"}),e.jsx("td",{className:"px-5 py-3.5 text-center",children:e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs border ${t.status==="healthy"?"bg-green-500/10 text-green-400 border-green-500/20":"bg-neutral-500/10 text-neutral-400 border-neutral-500/20"}`,children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${t.status==="healthy"?"bg-green-500":"bg-neutral-500"}`}),t.status==="healthy"?s("pricing.online"):s("pricing.unknown")]})})]},t.model_name||x))})]})})]})}export{f as default}; diff --git a/dist/assets/Pricing-GrGWcOkj.js b/dist/assets/Pricing-GrGWcOkj.js deleted file mode 100644 index 8b06411..0000000 --- a/dist/assets/Pricing-GrGWcOkj.js +++ /dev/null @@ -1 +0,0 @@ -import{r as a,g as x,j as e}from"./index-CJw6IpTa.js";function m(){const[n,r]=a.useState([]),[s,d]=a.useState(""),[o,i]=a.useState(!0);a.useEffect(()=>{x().then(t=>{t.data.success&&r(t.data.data||[])}).catch(()=>{}).finally(()=>i(!1))},[]);const l=n.filter(t=>t.enabled!==!1).filter(t=>!s||(t.display_name||t.model_name||"").toLowerCase().includes(s.toLowerCase()));return o?e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("h1",{className:"text-3xl font-heading font-bold text-white mb-3",children:"Model Pricing"}),e.jsx("p",{className:"text-neutral-400 max-w-xl mx-auto",children:"Transparent, pay-as-you-go pricing for all available models. Prices shown per 1M tokens."})]}),e.jsx("div",{className:"max-w-md mx-auto mb-8",children:e.jsxs("div",{className:"relative",children:[e.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),e.jsx("input",{type:"text",value:s,onChange:t=>d(t.target.value),className:"input !pl-10",placeholder:"Search models..."})]})}),l.length===0?e.jsx("div",{className:"text-center py-12 text-neutral-400",children:s?"No models match your search":"No models available"}):e.jsx("div",{className:"glass-sm rounded-xl overflow-hidden",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-white/[0.06]",children:[e.jsx("th",{className:"text-left px-5 py-3.5 font-medium text-neutral-400",children:"Model"}),e.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-neutral-400",children:"Input / 1M tokens"}),e.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-neutral-400",children:"Output / 1M tokens"}),e.jsx("th",{className:"text-center px-5 py-3.5 font-medium text-neutral-400",children:"Status"})]})}),e.jsx("tbody",{children:l.map((t,c)=>e.jsxs("tr",{className:"border-b border-white/[0.04] last:border-0 hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"px-5 py-3.5",children:e.jsx("span",{className:"font-mono text-white",children:t.display_name||t.model_name})}),e.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-neutral-300",children:t.input_price!=null?`$${(Number(t.input_price)*1e3).toFixed(4)}`:"-"}),e.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-neutral-300",children:t.output_price!=null?`$${(Number(t.output_price)*1e3).toFixed(4)}`:"-"}),e.jsx("td",{className:"px-5 py-3.5 text-center",children:e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs border ${t.status==="healthy"?"bg-green-500/10 text-green-400 border-green-500/20":"bg-neutral-500/10 text-neutral-400 border-neutral-500/20"}`,children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${t.status==="healthy"?"bg-green-500":"bg-neutral-500"}`}),t.status==="healthy"?"Online":"Unknown"]})})]},t.model_name||c))})]})})]})}export{m as default}; diff --git a/dist/assets/Register-BQ7Y75Yc.js b/dist/assets/Register-BQ7Y75Yc.js deleted file mode 100644 index b261a41..0000000 --- a/dist/assets/Register-BQ7Y75Yc.js +++ /dev/null @@ -1 +0,0 @@ -import{u as x,a as h,c as w,r as i,j as e,N as f,L as b,z as t}from"./index-CJw6IpTa.js";function v(){const{register:u,user:c}=x(),{site:l}=h(),d=w(),[s,r]=i.useState({username:"",password:"",password2:"",email:""}),[n,o]=i.useState(!1);if(c)return e.jsx(f,{to:"/dashboard",replace:!0});const m=async a=>{if(a.preventDefault(),!s.username||!s.password){t.error("Please fill in all required fields");return}if(s.password!==s.password2){t.error("Passwords do not match");return}if(s.password.length<8){t.error("Password must be 8-20 characters");return}if(s.password.length>20){t.error("Password must be 8-20 characters");return}o(!0);try{if((await u({username:s.username,password:s.password,email:s.email||void 0})).success){t.success("Account created! Please sign in."),d("/login",{replace:!0});return}}catch{}o(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-white mb-2",children:"Create Account"}),e.jsxs("p",{className:"text-sm text-neutral-400",children:["Get started with ",(l==null?void 0:l.name)||"our platform"]})]}),e.jsxs("form",{onSubmit:m,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:"Username *"}),e.jsx("input",{type:"text",value:s.username,onChange:a=>r({...s,username:a.target.value}),className:"input",placeholder:"Choose a username",autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:"Email"}),e.jsx("input",{type:"email",value:s.email,onChange:a=>r({...s,email:a.target.value}),className:"input",placeholder:"your@email.com (optional)",autoComplete:"email"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:"Password *"}),e.jsx("input",{type:"password",value:s.password,onChange:a=>r({...s,password:a.target.value}),className:"input",placeholder:"8-20 characters",autoComplete:"new-password",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:"Confirm Password *"}),e.jsx("input",{type:"password",value:s.password2,onChange:a=>r({...s,password2:a.target.value}),className:"input",placeholder:"Repeat your password",autoComplete:"new-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:n,className:"btn-primary w-full flex items-center justify-center gap-2",children:[n&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),n?"Creating...":"Create Account"]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-neutral-400",children:["Already have an account?"," ",e.jsx(b,{to:"/login",className:"text-brand-400 hover:text-brand-300 transition-colors font-medium",children:"Sign in"})]})})]})})})}export{v as default}; diff --git a/dist/assets/Register-DiQ0J-Zs.js b/dist/assets/Register-DiQ0J-Zs.js new file mode 100644 index 0000000..9337ac3 --- /dev/null +++ b/dist/assets/Register-DiQ0J-Zs.js @@ -0,0 +1 @@ +import{u as h,a as g,b as w,r as d,j as e,N as f,L as j,z as a}from"./index-Drgd7k5E.js";import{u as b}from"./useTranslation-B7WzaWp0.js";function y(){const{t:s}=b(),{register:c,user:u}=h(),{site:n}=g(),m=w(),[r,i]=d.useState({username:"",password:"",password2:"",email:""}),[l,o]=d.useState(!1);if(u)return e.jsx(f,{to:"/dashboard",replace:!0});const p=async t=>{if(t.preventDefault(),!r.username||!r.password){a.error(s("register.fillRequired"));return}if(r.password!==r.password2){a.error(s("register.passwordMismatch"));return}if(r.password.length<8){a.error(s("register.passwordLength"));return}if(r.password.length>20){a.error(s("register.passwordLength"));return}o(!0);try{if((await c({username:r.username,password:r.password,email:r.email||void 0})).success){a.success(s("register.accountCreated")),m("/login",{replace:!0});return}}catch{}o(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-white mb-2",children:s("register.createAccount")}),e.jsx("p",{className:"text-sm text-neutral-400",children:n!=null&&n.name?s("register.getStartedWith",{name:n.name}):s("register.getStartedDefault")})]}),e.jsxs("form",{onSubmit:p,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:[s("register.username")," *"]}),e.jsx("input",{type:"text",value:r.username,onChange:t=>i({...r,username:t.target.value}),className:"input",placeholder:s("register.chooseUsername"),autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:s("register.email")}),e.jsx("input",{type:"email",value:r.email,onChange:t=>i({...r,email:t.target.value}),className:"input",placeholder:s("register.emailPlaceholder"),autoComplete:"email"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:[s("register.password")," *"]}),e.jsx("input",{type:"password",value:r.password,onChange:t=>i({...r,password:t.target.value}),className:"input",placeholder:s("register.passwordPlaceholder"),autoComplete:"new-password",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:[s("register.confirmPassword")," *"]}),e.jsx("input",{type:"password",value:r.password2,onChange:t=>i({...r,password2:t.target.value}),className:"input",placeholder:s("register.repeatPassword"),autoComplete:"new-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:l,className:"btn-primary w-full flex items-center justify-center gap-2",children:[l&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s(l?"register.creating":"register.createAccountBtn")]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-neutral-400",children:[s("register.hasAccount")," ",e.jsx(j,{to:"/login",className:"text-brand-400 hover:text-brand-300 transition-colors font-medium",children:s("register.signIn")})]})})]})})})}export{y as default}; diff --git a/dist/assets/SpotlightCard-lt5CQbhM.js b/dist/assets/SpotlightCard-C_ZqQ-j4.js similarity index 92% rename from dist/assets/SpotlightCard-lt5CQbhM.js rename to dist/assets/SpotlightCard-C_ZqQ-j4.js index 8b4aaba..9099c03 100644 --- a/dist/assets/SpotlightCard-lt5CQbhM.js +++ b/dist/assets/SpotlightCard-C_ZqQ-j4.js @@ -1 +1 @@ -import{r as t,j as c}from"./index-CJw6IpTa.js";const b=({children:i,className:u="",spotlightColor:l="rgba(255, 255, 255, 0.25)"})=>{const o=t.useRef(null),[d,n]=t.useState(!1),[s,p]=t.useState({x:0,y:0}),[x,e]=t.useState(0),v=r=>{if(!o.current||d)return;const a=o.current.getBoundingClientRect();p({x:r.clientX-a.left,y:r.clientY-a.top})},f=()=>{n(!0),e(.6)},h=()=>{n(!1),e(0)},y=()=>{e(.6)},M=()=>{e(0)};return c.jsxs("div",{ref:o,onMouseMove:v,onFocus:f,onBlur:h,onMouseEnter:y,onMouseLeave:M,className:`relative rounded-3xl border border-neutral-800 bg-neutral-900 overflow-hidden p-8 ${u}`,children:[c.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-500 ease-in-out",style:{opacity:x,background:`radial-gradient(circle at ${s.x}px ${s.y}px, ${l}, transparent 80%)`}}),i]})};export{b as S}; +import{r as t,j as c}from"./index-Drgd7k5E.js";const b=({children:i,className:u="",spotlightColor:l="rgba(255, 255, 255, 0.25)"})=>{const o=t.useRef(null),[d,n]=t.useState(!1),[s,p]=t.useState({x:0,y:0}),[x,e]=t.useState(0),v=r=>{if(!o.current||d)return;const a=o.current.getBoundingClientRect();p({x:r.clientX-a.left,y:r.clientY-a.top})},f=()=>{n(!0),e(.6)},h=()=>{n(!1),e(0)},y=()=>{e(.6)},M=()=>{e(0)};return c.jsxs("div",{ref:o,onMouseMove:v,onFocus:f,onBlur:h,onMouseEnter:y,onMouseLeave:M,className:`relative rounded-3xl border border-neutral-800 bg-neutral-900 overflow-hidden p-8 ${u}`,children:[c.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-500 ease-in-out",style:{opacity:x,background:`radial-gradient(circle at ${s.x}px ${s.y}px, ${l}, transparent 80%)`}}),i]})};export{b as S}; diff --git a/dist/assets/Tokens-C4dgLqWq.js b/dist/assets/Tokens-C4dgLqWq.js new file mode 100644 index 0000000..54aa960 --- /dev/null +++ b/dist/assets/Tokens-C4dgLqWq.js @@ -0,0 +1 @@ +import{r as n,e as z,j as e,z as m,f as D,h as H,i as E}from"./index-Drgd7k5E.js";import{u as L}from"./useTranslation-B7WzaWp0.js";function P(){const{t}=L(),[u,N]=n.useState([]),[g,h]=n.useState(!0),[v,l]=n.useState(!1),[x,p]=n.useState(""),[b,f]=n.useState(!1),[w,j]=n.useState(null),[o,k]=n.useState(null),[i,d]=n.useState(null),r=n.useCallback(async()=>{h(!0);try{const s=await z();s.data.success&&N(s.data.data||[])}catch{}h(!1)},[]);n.useEffect(()=>{r()},[r]);const C=async s=>{var c;if(s.preventDefault(),!x.trim()){m.error(t("tokens.enterName"));return}f(!0);try{const a=await D({name:x.trim()});if(a.data.success){p(""),l(!1);const y=(c=a.data.data)==null?void 0:c.key;y&&k(y),await r()}}catch{}f(!1)},S=async s=>{try{(await H(s.id,{status:s.status===1?2:1})).data.success&&(m.success(s.status===1?t("tokens.tokenDisabled"):t("tokens.tokenEnabled")),await r())}catch{}},T=async()=>{if(i)try{(await E(i.id)).data.success&&(m.success(t("tokens.tokenDeleted")),d(null),await r())}catch{}},K=async s=>{try{await navigator.clipboard.writeText(s)}catch{const a=document.createElement("textarea");a.value=s,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a)}j(s),m.success(t("tokens.copiedToClipboard")),setTimeout(()=>j(null),2e3)};return g?e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"flex items-center justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-white",children:t("tokens.title")}),e.jsx("p",{className:"text-sm text-neutral-400 mt-1",children:t("tokens.subtitle")})]}),e.jsx("button",{onClick:()=>l(!0),className:"btn-primary",children:t("tokens.newKey")})]}),v&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>l(!1),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-md",onClick:s=>s.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:t("tokens.createApiKey")}),e.jsxs("form",{onSubmit:C,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:t("tokens.name")}),e.jsx("input",{type:"text",value:x,onChange:s=>p(s.target.value),className:"input",placeholder:t("tokens.namePlaceholder"),autoFocus:!0,required:!0})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:()=>l(!1),className:"btn-secondary",children:t("tokens.cancel")}),e.jsx("button",{type:"submit",disabled:b,className:"btn-primary",children:t(b?"tokens.creating":"tokens.create")})]})]})]})}),o&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-lg",children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-2",children:t("tokens.newApiKey")}),e.jsx("div",{className:"bg-yellow-500/10 border border-yellow-500/20 rounded-xl p-3 mb-4",children:e.jsx("p",{className:"text-sm text-yellow-300",children:t("tokens.keyWarning")})}),e.jsxs("div",{className:"bg-black/40 rounded-xl p-4 flex items-center gap-3",children:[e.jsx("code",{className:"text-sm font-mono text-green-400 flex-1 break-all select-all",children:o}),e.jsx("button",{onClick:()=>K(o),className:"btn-primary !px-4 !py-1.5 flex-shrink-0",children:t(w===o?"tokens.copied":"tokens.copy")})]}),e.jsx("div",{className:"flex justify-end mt-4",children:e.jsx("button",{onClick:()=>k(null),className:"btn-secondary",children:t("tokens.savedKey")})})]})}),i&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>d(null),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-sm",onClick:s=>s.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-3",children:t("tokens.deleteToken")}),e.jsx("p",{className:"text-sm text-neutral-400 mb-4",children:t("tokens.deleteConfirm",{name:i.name})}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>d(null),className:"btn-secondary",children:t("tokens.cancel")}),e.jsx("button",{onClick:T,className:"px-6 py-2.5 rounded-xl bg-red-600 text-white text-sm font-medium hover:bg-red-500 transition-colors",children:t("tokens.delete")})]})]})}),u.length===0?e.jsxs("div",{className:"glass rounded-2xl p-12 text-center",children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-2xl bg-neutral-800/50 flex items-center justify-center",children:e.jsx("svg",{className:"w-8 h-8 text-neutral-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})})}),e.jsx("p",{className:"text-neutral-400 mb-4",children:t("tokens.noKeys")}),e.jsx("button",{onClick:()=>l(!0),className:"btn-primary",children:t("tokens.createFirst")})]}):e.jsx("div",{className:"space-y-3",children:u.map(s=>e.jsxs("div",{className:"glass-sm rounded-xl p-5 flex items-center gap-4",children:[e.jsx("div",{className:`w-2.5 h-2.5 rounded-full flex-shrink-0 ${s.status===1?"bg-green-500":"bg-neutral-600"}`}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-white",children:s.name}),e.jsx("p",{className:"text-xs font-mono text-neutral-500 mt-1",children:"sk-***"})]}),e.jsx("span",{className:"text-xs text-neutral-500 hidden md:block",children:s.created_time?new Date(s.created_time*1e3).toLocaleDateString():""}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>S(s),className:`px-3 py-1 text-xs rounded-lg border transition-colors ${s.status===1?"border-green-500/30 text-green-400 hover:bg-green-500/10":"border-neutral-600 text-neutral-400 hover:bg-neutral-800"}`,children:s.status===1?t("tokens.enabled"):t("tokens.disabled")}),e.jsx("button",{onClick:()=>d(s),className:"px-3 py-1 text-xs rounded-lg border border-red-500/20 text-red-400 hover:bg-red-500/10 transition-colors",children:t("tokens.delete")})]})]},s.id))}),e.jsxs("div",{className:"glass rounded-2xl p-6 mt-8",children:[e.jsx("h3",{className:"text-sm font-semibold text-white mb-3",children:t("tokens.quickStart")}),e.jsxs("div",{className:"bg-black/40 rounded-xl p-4 font-mono text-sm",children:[e.jsx("p",{className:"text-neutral-500",children:t("tokens.quickStartComment")}),e.jsxs("p",{className:"text-green-400 mt-2",children:["curl ",window.location.origin,"/v1/chat/completions \\"]}),e.jsx("p",{className:"text-neutral-300 pl-4",children:'-H "Authorization: Bearer sk-your-key" \\'}),e.jsx("p",{className:"text-neutral-300 pl-4",children:'-H "Content-Type: application/json" \\'}),e.jsxs("p",{className:"text-neutral-300 pl-4",children:["-d '",'{"model":"gpt-4o","messages":[{"role":"user","content":"Hello!"}]}',"'"]})]})]})]})}export{P as default}; diff --git a/dist/assets/Tokens-DEPVzOT6.js b/dist/assets/Tokens-DEPVzOT6.js deleted file mode 100644 index 7313438..0000000 --- a/dist/assets/Tokens-DEPVzOT6.js +++ /dev/null @@ -1 +0,0 @@ -import{r as a,h as D,j as e,z as o,i as I,k as A,l as P}from"./index-CJw6IpTa.js";function z(){const[x,N]=a.useState([]),[g,u]=a.useState(!0),[v,l]=a.useState(!1),[m,h]=a.useState(""),[p,b]=a.useState(!1),[w,j]=a.useState(null),[c,y]=a.useState(null),[i,d]=a.useState(null),n=a.useCallback(async()=>{u(!0);try{const s=await D();s.data.success&&N(s.data.data||[])}catch{}u(!1)},[]);a.useEffect(()=>{n()},[n]);const k=async s=>{var r;if(s.preventDefault(),!m.trim()){o.error("Please enter a name");return}b(!0);try{const t=await I({name:m.trim()});if(t.data.success){h(""),l(!1);const f=(r=t.data.data)==null?void 0:r.key;f&&y(f),await n()}}catch{}b(!1)},C=async s=>{try{(await A(s.id,{status:s.status===1?2:1})).data.success&&(o.success(s.status===1?"Token disabled":"Token enabled"),await n())}catch{}},T=async()=>{if(i)try{(await P(i.id)).data.success&&(o.success("Token deleted"),d(null),await n())}catch{}},S=async s=>{try{await navigator.clipboard.writeText(s)}catch{const t=document.createElement("textarea");t.value=s,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}j(s),o.success("Copied to clipboard!"),setTimeout(()=>j(null),2e3)};return g?e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"flex items-center justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-white",children:"API Keys"}),e.jsx("p",{className:"text-sm text-neutral-400 mt-1",children:"Manage your API access tokens"})]}),e.jsx("button",{onClick:()=>l(!0),className:"btn-primary",children:"+ New Key"})]}),v&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>l(!1),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-md",onClick:s=>s.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"Create API Key"}),e.jsxs("form",{onSubmit:k,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-neutral-300 mb-1.5",children:"Name"}),e.jsx("input",{type:"text",value:m,onChange:s=>h(s.target.value),className:"input",placeholder:"e.g. my-app-key",autoFocus:!0,required:!0})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:()=>l(!1),className:"btn-secondary",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:p,className:"btn-primary",children:p?"Creating...":"Create"})]})]})]})}),c&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-lg",children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-2",children:"Your New API Key"}),e.jsx("div",{className:"bg-yellow-500/10 border border-yellow-500/20 rounded-xl p-3 mb-4",children:e.jsx("p",{className:"text-sm text-yellow-300",children:"This is the only time you'll see this key. Copy it now and store it securely."})}),e.jsxs("div",{className:"bg-black/40 rounded-xl p-4 flex items-center gap-3",children:[e.jsx("code",{className:"text-sm font-mono text-green-400 flex-1 break-all select-all",children:c}),e.jsx("button",{onClick:()=>S(c),className:"btn-primary !px-4 !py-1.5 flex-shrink-0",children:w===c?"Copied!":"Copy"})]}),e.jsx("div",{className:"flex justify-end mt-4",children:e.jsx("button",{onClick:()=>y(null),className:"btn-secondary",children:"I've saved my key"})})]})}),i&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>d(null),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-sm",onClick:s=>s.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-white mb-3",children:"Delete Token"}),e.jsxs("p",{className:"text-sm text-neutral-400 mb-4",children:["Delete ",e.jsxs("span",{className:"text-white font-medium",children:['"',i.name,'"']}),"? This cannot be undone."]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>d(null),className:"btn-secondary",children:"Cancel"}),e.jsx("button",{onClick:T,className:"px-6 py-2.5 rounded-xl bg-red-600 text-white text-sm font-medium hover:bg-red-500 transition-colors",children:"Delete"})]})]})}),x.length===0?e.jsxs("div",{className:"glass rounded-2xl p-12 text-center",children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-2xl bg-neutral-800/50 flex items-center justify-center",children:e.jsx("svg",{className:"w-8 h-8 text-neutral-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})})}),e.jsx("p",{className:"text-neutral-400 mb-4",children:"No API keys yet"}),e.jsx("button",{onClick:()=>l(!0),className:"btn-primary",children:"Create Your First Key"})]}):e.jsx("div",{className:"space-y-3",children:x.map(s=>e.jsxs("div",{className:"glass-sm rounded-xl p-5 flex items-center gap-4",children:[e.jsx("div",{className:`w-2.5 h-2.5 rounded-full flex-shrink-0 ${s.status===1?"bg-green-500":"bg-neutral-600"}`}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-white",children:s.name}),e.jsx("p",{className:"text-xs font-mono text-neutral-500 mt-1",children:"sk-***"})]}),e.jsx("span",{className:"text-xs text-neutral-500 hidden md:block",children:s.created_time?new Date(s.created_time*1e3).toLocaleDateString():""}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>C(s),className:`px-3 py-1 text-xs rounded-lg border transition-colors ${s.status===1?"border-green-500/30 text-green-400 hover:bg-green-500/10":"border-neutral-600 text-neutral-400 hover:bg-neutral-800"}`,children:s.status===1?"Enabled":"Disabled"}),e.jsx("button",{onClick:()=>d(s),className:"px-3 py-1 text-xs rounded-lg border border-red-500/20 text-red-400 hover:bg-red-500/10 transition-colors",children:"Delete"})]})]},s.id))}),e.jsxs("div",{className:"glass rounded-2xl p-6 mt-8",children:[e.jsx("h3",{className:"text-sm font-semibold text-white mb-3",children:"Quick Start"}),e.jsxs("div",{className:"bg-black/40 rounded-xl p-4 font-mono text-sm",children:[e.jsx("p",{className:"text-neutral-500",children:"# Use your API key with OpenAI-compatible endpoint"}),e.jsxs("p",{className:"text-green-400 mt-2",children:["curl ",window.location.origin,"/v1/chat/completions \\"]}),e.jsx("p",{className:"text-neutral-300 pl-4",children:'-H "Authorization: Bearer sk-your-key" \\'}),e.jsx("p",{className:"text-neutral-300 pl-4",children:'-H "Content-Type: application/json" \\'}),e.jsxs("p",{className:"text-neutral-300 pl-4",children:["-d '",'{"model":"gpt-4o","messages":[{"role":"user","content":"Hello!"}]}',"'"]})]})]})]})}export{z as default}; diff --git a/dist/assets/index-BBpo0ZPm.css b/dist/assets/index-BBpo0ZPm.css new file mode 100644 index 0000000..c458001 --- /dev/null +++ b/dist/assets/index-BBpo0ZPm.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,-apple-system,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,Fira Code,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--brand: 99 102 241}body{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));font-feature-settings:"cv02","cv03","cv04","cv11"}::-moz-selection{background-color:#6366f14d}::selection{background-color:#6366f14d}::-webkit-scrollbar{width:.375rem}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.glass{border-radius:1rem;border-width:1px;border-color:#ffffff0f;background-color:#ffffff08;--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.glass-sm{border-radius:.75rem;border-width:1px;border-color:#ffffff14;background-color:#ffffff0a;--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.btn-primary{border-radius:.75rem;--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1));padding:.625rem 1.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: rgb(79 70 229 / .2);--tw-shadow: var(--tw-shadow-colored);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.btn-primary:active{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.btn-primary:disabled{cursor:not-allowed;opacity:.5}.btn-secondary{border-radius:.75rem;border-width:1px;border-color:#ffffff1a;padding:.625rem 1.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}.btn-secondary:hover{background-color:#ffffff0d}.btn-secondary:active{background-color:#ffffff1a}.btn-secondary:disabled{cursor:not-allowed;opacity:.5}.input{width:100%;border-radius:.75rem;border-width:1px;border-color:#ffffff1a;background-color:#ffffff0a;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.input::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity, 1))}.input::placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity, 1))}.input{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.input:focus{border-color:#6366f199;outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(99 102 241 / .4)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-\[-11px\]{bottom:-11px}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.left-\[-250\%\]{left:-250%}.right-0{right:0}.right-\[-250\%\]{right:-250%}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-\[-10px\]{top:-10px}.top-\[400px\]{top:400px}.isolate{isolation:isolate}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[2\]{z-index:2}.z-\[3\]{z-index:3}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-14{margin-bottom:3.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[4\/5\]{aspect-ratio:4/5}.h-0\.5{height:.125rem}.h-1\.5{height:.375rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[0\.5rem\]{height:.5rem}.h-\[400px\]{height:400px}.h-\[50\%\]{height:50%}.h-\[500px\]{height:500px}.h-\[600px\]{height:600px}.h-\[700px\]{height:700px}.h-\[800px\]{height:800px}.h-full{height:100%}.min-h-\[50vh\]{min-height:50vh}.min-h-\[70vh\]{min-height:70vh}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1\.5{width:.375rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[0\.5rem\]{width:.5rem}.w-\[300\%\]{width:300%}.w-\[300px\]{width:300px}.w-\[500px\]{width:500px}.w-\[800px\]{width:800px}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}@keyframes star-movement-bottom{0%{transform:translate(0);opacity:1}to{transform:translate(-100%);opacity:0}}.animate-star-movement-bottom{animation:star-movement-bottom linear infinite alternate}@keyframes star-movement-top{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}.animate-star-movement-top{animation:star-movement-top linear infinite alternate}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-12{gap:3rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.\!rounded-2xl{border-radius:1rem!important}.\!rounded-xl{border-radius:.75rem!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[1\.25rem\]{border-radius:1.25rem}.rounded-\[15px\]{border-radius:15px}.rounded-\[20px\]{border-radius:20px}.rounded-\[25px\]{border-radius:25px}.rounded-\[4px\]{border-radius:4px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.\!border-neutral-800\/60{border-color:#26262699!important}.border-\[\#27272a\]{--tw-border-opacity: 1;border-color:rgb(39 39 42 / var(--tw-border-opacity, 1))}.border-brand-500\/20{border-color:#6366f133}.border-brand-500\/30{border-color:#6366f14d}.border-cyan-500\/20{border-color:#06b6d433}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-green-500\/10{border-color:#22c55e1a}.border-green-500\/20{border-color:#22c55e33}.border-green-500\/30{border-color:#22c55e4d}.border-neutral-500\/20{border-color:#73737333}.border-neutral-600{--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity, 1))}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-neutral-800\/40{border-color:#26262666}.border-neutral-800\/60{border-color:#26262699}.border-pink-500\/20{border-color:#ec489933}.border-red-500\/20{border-color:#ef444433}.border-white\/10{border-color:#ffffff1a}.border-white\/20{border-color:#fff3}.border-white\/30{border-color:#ffffff4d}.border-white\/\[0\.04\]{border-color:#ffffff0a}.border-white\/\[0\.06\]{border-color:#ffffff0f}.border-white\/\[0\.08\]{border-color:#ffffff14}.border-yellow-500\/20{border-color:#eab30833}.border-t-brand-500{--tw-border-opacity: 1;border-top-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.border-t-white{--tw-border-opacity: 1;border-top-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.\!bg-neutral-900\/60{background-color:#17171799!important}.bg-\[\#0a0a1a\]{--tw-bg-opacity: 1;background-color:rgb(10 10 26 / var(--tw-bg-opacity, 1))}.bg-\[\#0a0a1a\]\/80{background-color:#0a0a1acc}.bg-\[\#0a0a1a\]\/95{background-color:#0a0a1af2}.bg-\[\#160000\]{--tw-bg-opacity: 1;background-color:rgb(22 0 0 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-black\/60{background-color:#0009}.bg-black\/80{background-color:#000c}.bg-black\/90{background-color:#000000e6}.bg-black\/95{background-color:#000000f2}.bg-blue-500\/10{background-color:#3b82f61a}.bg-brand-500\/10{background-color:#6366f11a}.bg-brand-600\/20{background-color:#4f46e533}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-green-500\/5{background-color:#22c55e0d}.bg-neutral-500{--tw-bg-opacity: 1;background-color:rgb(115 115 115 / var(--tw-bg-opacity, 1))}.bg-neutral-500\/10{background-color:#7373731a}.bg-neutral-600{--tw-bg-opacity: 1;background-color:rgb(82 82 82 / var(--tw-bg-opacity, 1))}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.bg-neutral-800\/50{background-color:#26262680}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity, 1))}.bg-neutral-950{--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity, 1))}.bg-neutral-950\/80{background-color:#0a0a0acc}.bg-neutral-950\/95{background-color:#0a0a0af2}.bg-pink-500\/10{background-color:#ec48991a}.bg-purple-500\/10{background-color:#a855f71a}.bg-red-500\/10{background-color:#ef44441a}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/5{background-color:#ffffff0d}.bg-yellow-500\/10{background-color:#eab3081a}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-black{--tw-gradient-from: #000 var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500\/20{--tw-gradient-from: rgb(59 130 246 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-600\/20{--tw-gradient-from: rgb(37 99 235 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand-600\/10{--tw-gradient-from: rgb(79 70 229 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(79 70 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand-600\/20{--tw-gradient-from: rgb(79 70 229 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(79 70 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500\/20{--tw-gradient-from: rgb(34 197 94 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500\/5{--tw-gradient-from: rgb(34 197 94 / .05) var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-600\/10{--tw-gradient-from: rgb(219 39 119 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(219 39 119 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-500\/20{--tw-gradient-from: rgb(234 179 8 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(234 179 8 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-purple-500{--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #a855f7 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600\/20{--tw-gradient-to: rgb(147 51 234 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(147 51 234 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600\/5{--tw-gradient-to: rgb(147 51 234 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(147 51 234 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-cyan-500\/20{--tw-gradient-to: rgb(6 182 212 / .2) var(--tw-gradient-to-position)}.to-cyan-500\/5{--tw-gradient-to: rgb(6 182 212 / .05) var(--tw-gradient-to-position)}.to-emerald-500\/20{--tw-gradient-to: rgb(16 185 129 / .2) var(--tw-gradient-to-position)}.to-gray-900{--tw-gradient-to: #111827 var(--tw-gradient-to-position)}.to-orange-500\/20{--tw-gradient-to: rgb(249 115 22 / .2) var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #ec4899 var(--tw-gradient-to-position)}.to-pink-600\/20{--tw-gradient-to: rgb(219 39 119 / .2) var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #9333ea var(--tw-gradient-to-position)}.to-purple-600\/10{--tw-gradient-to: rgb(147 51 234 / .1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.\!p-6{padding:1.5rem!important}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.\!px-4{padding-left:1rem!important;padding-right:1rem!important}.\!px-8{padding-left:2rem!important;padding-right:2rem!important}.\!py-1\.5{padding-top:.375rem!important;padding-bottom:.375rem!important}.\!py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.\!py-3{padding-top:.75rem!important;padding-bottom:.75rem!important}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[10px\]{padding-left:10px;padding-right:10px}.px-\[26px\]{padding-left:26px;padding-right:26px}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[16px\]{padding-top:16px;padding-bottom:16px}.py-\[4px\]{padding-top:4px;padding-bottom:4px}.\!pl-10{padding-left:2.5rem!important}.pb-20{padding-bottom:5rem}.pb-24{padding-bottom:6rem}.pl-4{padding-left:1rem}.pt-10{padding-top:2.5rem}.pt-16{padding-top:4rem}.pt-24{padding-top:6rem}.pt-28{padding-top:7rem}.pt-32{padding-top:8rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-heading{font-family:Inter,system-ui,-apple-system,sans-serif}.font-mono{font-family:JetBrains Mono,Fira Code,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[16px\]{font-size:16px}.text-\[clamp\(2rem\,10vw\,8rem\)\]{font-size:clamp(2rem,10vw,8rem)}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[1\.1\]{line-height:1.1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#2d2d2d\]{--tw-text-opacity: 1;color:rgb(45 45 45 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-brand-200{--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity, 1))}.text-brand-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-500\/40{color:#22c55e66}.text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity, 1))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.text-neutral-900{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.text-pink-400{--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-green-500\/20{--tw-shadow-color: rgb(34 197 94 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/20{--tw-shadow-color: rgb(168 85 247 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-white\/10{--tw-shadow-color: rgb(255 255 255 / .1);--tw-shadow: var(--tw-shadow-colored)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.ease-\[cubic-bezier\(0\.5\,1\,0\.89\,1\)\]{transition-timing-function:cubic-bezier(.5,1,.89,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.will-change-\[transform\,filter\,opacity\]{will-change:transform,filter,opacity}.will-change-transform{will-change:transform}.\[perspective\:800px\]{perspective:800px}.\[transform-style\:preserve-3d\]{transform-style:preserve-3d}.\[transform\:translateZ\(0\)\]{transform:translateZ(0)}.\[transform\:translateZ\(30px\)\]{transform:translateZ(30px)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:left-\[-10px\]:before{content:var(--tw-content);left:-10px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:overflow-hidden:before{content:var(--tw-content);overflow:hidden}.before\:bg-\[\#060010\]:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(6 0 16 / var(--tw-bg-opacity, 1))}.before\:text-white:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.before\:opacity-0:before{content:var(--tw-content);opacity:0}.before\:content-\[\'\'\]:before{--tw-content: "";content:var(--tw-content)}.before\:content-\[attr\(data-text\)\]:before{--tw-content: attr(data-text);content:var(--tw-content)}.before\:\[clip-path\:inset\(0_0_0_0\)\]:before{content:var(--tw-content);clip-path:inset(0 0 0 0)}.before\:\[text-shadow\:var\(--before-shadow\)\]:before{content:var(--tw-content);text-shadow:var(--before-shadow)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[10px\]:after{content:var(--tw-content);left:10px}.after\:top-0:after{content:var(--tw-content);top:0}.after\:overflow-hidden:after{content:var(--tw-content);overflow:hidden}.after\:bg-\[\#060010\]:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(6 0 16 / var(--tw-bg-opacity, 1))}.after\:text-white:after{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.after\:content-\[attr\(data-text\)\]:after{--tw-content: attr(data-text);content:var(--tw-content)}.after\:\[clip-path\:inset\(0_0_0_0\)\]:after{content:var(--tw-content);clip-path:inset(0 0 0 0)}.after\:\[text-shadow\:var\(--after-shadow\)\]:after{content:var(--tw-content);text-shadow:var(--after-shadow)}.last\:border-0:last-child{border-width:0px}.hover\:scale-\[1\.02\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-brand-500\/30:hover{border-color:#6366f14d}.hover\:border-green-500\/30:hover{border-color:#22c55e4d}.hover\:border-neutral-700:hover{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity, 1))}.hover\:bg-green-400:hover{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.hover\:bg-green-500\/10:hover{background-color:#22c55e1a}.hover\:bg-green-500\/20:hover{background-color:#22c55e33}.hover\:bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-700:hover{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:bg-white\/\[0\.02\]:hover{background-color:#ffffff05}.hover\:bg-white\/\[0\.06\]:hover{background-color:#ffffff0f}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-brand-300:hover{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.hover\:text-green-300:hover{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.hover\:text-green-400:hover{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.hover\:text-neutral-300:hover{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:before\:opacity-100:hover:before{content:var(--tw-content);opacity:1}.hover\:before\:content-\[attr\(data-text\)\]:hover:before{--tw-content: attr(data-text);content:var(--tw-content)}.hover\:before\:\[text-shadow\:var\(--before-shadow\)\]:hover:before{content:var(--tw-content);text-shadow:var(--before-shadow)}.hover\:after\:opacity-100:hover:after{content:var(--tw-content);opacity:1}.hover\:after\:content-\[attr\(data-text\)\]:hover:after{--tw-content: attr(data-text);content:var(--tw-content)}.hover\:after\:\[text-shadow\:var\(--after-shadow\)\]:hover:after{content:var(--tw-content);text-shadow:var(--after-shadow)}.group:hover .group-hover\:w-full{width:100%}.group:hover .group-hover\:text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-brand-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:block{display:block}.sm\:hidden{display:none}}@media (min-width: 768px){.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-7xl{font-size:4.5rem;line-height:1}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} diff --git a/dist/assets/index-CDfjgnlx.css b/dist/assets/index-CDfjgnlx.css deleted file mode 100644 index 57b1ac3..0000000 --- a/dist/assets/index-CDfjgnlx.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,-apple-system,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,Fira Code,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--brand: 99 102 241}body{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));font-feature-settings:"cv02","cv03","cv04","cv11"}::-moz-selection{background-color:#6366f14d}::selection{background-color:#6366f14d}::-webkit-scrollbar{width:.375rem}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}.glass{border-radius:1rem;border-width:1px;border-color:#ffffff0f;background-color:#ffffff08;--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.glass-sm{border-radius:.75rem;border-width:1px;border-color:#ffffff14;background-color:#ffffff0a;--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.btn-primary{border-radius:.75rem;--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1));padding:.625rem 1.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: rgb(79 70 229 / .2);--tw-shadow: var(--tw-shadow-colored);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.btn-primary:active{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.btn-primary:disabled{cursor:not-allowed;opacity:.5}.btn-secondary{border-radius:.75rem;border-width:1px;border-color:#ffffff1a;padding:.625rem 1.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}.btn-secondary:hover{background-color:#ffffff0d}.btn-secondary:active{background-color:#ffffff1a}.btn-secondary:disabled{cursor:not-allowed;opacity:.5}.input{width:100%;border-radius:.75rem;border-width:1px;border-color:#ffffff1a;background-color:#ffffff0a;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.input::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity, 1))}.input::placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity, 1))}.input{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.input:focus{border-color:#6366f199;outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(99 102 241 / .4)}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-\[-11px\]{bottom:-11px}.left-1\/2{left:50%}.left-3{left:.75rem}.left-\[-250\%\]{left:-250%}.right-0{right:0}.right-\[-250\%\]{right:-250%}.top-0{top:0}.top-1\/2{top:50%}.top-\[-10px\]{top:-10px}.top-\[400px\]{top:400px}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[50\%\]{height:50%}.h-\[500px\]{height:500px}.h-\[600px\]{height:600px}.min-h-\[50vh\]{min-height:50vh}.min-h-\[70vh\]{min-height:70vh}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[300\%\]{width:300%}.w-\[500px\]{width:500px}.w-\[800px\]{width:800px}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}@keyframes star-movement-bottom{0%{transform:translate(0);opacity:1}to{transform:translate(-100%);opacity:0}}.animate-star-movement-bottom{animation:star-movement-bottom linear infinite alternate}@keyframes star-movement-top{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}.animate-star-movement-top{animation:star-movement-top linear infinite alternate}.cursor-pointer{cursor:pointer}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.\!rounded-2xl{border-radius:1rem!important}.\!rounded-xl{border-radius:.75rem!important}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[1\.25rem\]{border-radius:1.25rem}.rounded-\[20px\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.\!border-neutral-800\/60{border-color:#26262699!important}.border-brand-500\/20{border-color:#6366f133}.border-brand-500\/30{border-color:#6366f14d}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-green-500\/20{border-color:#22c55e33}.border-green-500\/30{border-color:#22c55e4d}.border-neutral-500\/20{border-color:#73737333}.border-neutral-600{--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity, 1))}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-red-500\/20{border-color:#ef444433}.border-white\/30{border-color:#ffffff4d}.border-white\/\[0\.04\]{border-color:#ffffff0a}.border-white\/\[0\.06\]{border-color:#ffffff0f}.border-yellow-500\/20{border-color:#eab30833}.border-t-brand-500{--tw-border-opacity: 1;border-top-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.border-t-white{--tw-border-opacity: 1;border-top-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.\!bg-neutral-900\/60{background-color:#17171799!important}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-black\/60{background-color:#0009}.bg-black\/90{background-color:#000000e6}.bg-brand-500\/10{background-color:#6366f11a}.bg-brand-600\/20{background-color:#4f46e533}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-neutral-500{--tw-bg-opacity: 1;background-color:rgb(115 115 115 / var(--tw-bg-opacity, 1))}.bg-neutral-500\/10{background-color:#7373731a}.bg-neutral-600{--tw-bg-opacity: 1;background-color:rgb(82 82 82 / var(--tw-bg-opacity, 1))}.bg-neutral-800\/50{background-color:#26262680}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity, 1))}.bg-pink-500\/10{background-color:#ec48991a}.bg-purple-500\/10{background-color:#a855f71a}.bg-red-500\/10{background-color:#ef44441a}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-black{--tw-gradient-from: #000 var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand-600\/10{--tw-gradient-from: rgb(79 70 229 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(79 70 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand-600\/20{--tw-gradient-from: rgb(79 70 229 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(79 70 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-600\/10{--tw-gradient-from: rgb(219 39 119 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(219 39 119 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-purple-600\/5{--tw-gradient-to: rgb(147 51 234 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(147 51 234 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-gray-900{--tw-gradient-to: #111827 var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #9333ea var(--tw-gradient-to-position)}.to-purple-600\/10{--tw-gradient-to: rgb(147 51 234 / .1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.\!p-0{padding:0!important}.\!p-6{padding:1.5rem!important}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.\!px-4{padding-left:1rem!important;padding-right:1rem!important}.\!px-8{padding-left:2rem!important;padding-right:2rem!important}.\!py-1\.5{padding-top:.375rem!important;padding-bottom:.375rem!important}.\!py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.\!py-3{padding-top:.75rem!important;padding-bottom:.75rem!important}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\[26px\]{padding-left:26px;padding-right:26px}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[16px\]{padding-top:16px;padding-bottom:16px}.\!pl-10{padding-left:2.5rem!important}.pb-20{padding-bottom:5rem}.pl-4{padding-left:1rem}.pt-24{padding-top:6rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-heading{font-family:Inter,system-ui,-apple-system,sans-serif}.font-mono{font-family:JetBrains Mono,Fira Code,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[16px\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.text-brand-200{--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity, 1))}.text-brand-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.text-pink-400{--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.will-change-\[transform\,filter\,opacity\]{will-change:transform,filter,opacity}.last\:border-0:last-child{border-width:0px}.hover\:border-brand-500\/30:hover{border-color:#6366f14d}.hover\:bg-green-500\/10:hover{background-color:#22c55e1a}.hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:bg-white\/\[0\.02\]:hover{background-color:#ffffff05}.hover\:bg-white\/\[0\.06\]:hover{background-color:#ffffff0f}.hover\:text-brand-300:hover{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.hover\:text-neutral-300:hover{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-brand-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:block{display:block}.sm\:hidden{display:none}}@media (min-width: 768px){.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:text-7xl{font-size:4.5rem;line-height:1}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} diff --git a/dist/assets/index-CJw6IpTa.js b/dist/assets/index-CJw6IpTa.js deleted file mode 100644 index aa93eb2..0000000 --- a/dist/assets/index-CJw6IpTa.js +++ /dev/null @@ -1,249 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-D5xeHSSc.js","assets/CountUp-SCQ6rVWn.js","assets/SpotlightCard-lt5CQbhM.js","assets/Dashboard-Djts405O.js","assets/Packages-CIW8TdH4.js"])))=>i.map(i=>d[i]); -function Zd(e,t){for(var n=0;nr[l]})}}}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 l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function bd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xa={exports:{}},eo={},Ya={exports:{}},I={};/** - * @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 zr=Symbol.for("react.element"),ep=Symbol.for("react.portal"),tp=Symbol.for("react.fragment"),np=Symbol.for("react.strict_mode"),rp=Symbol.for("react.profiler"),lp=Symbol.for("react.provider"),op=Symbol.for("react.context"),ip=Symbol.for("react.forward_ref"),sp=Symbol.for("react.suspense"),up=Symbol.for("react.memo"),ap=Symbol.for("react.lazy"),du=Symbol.iterator;function cp(e){return e===null||typeof e!="object"?null:(e=du&&e[du]||e["@@iterator"],typeof e=="function"?e:null)}var Ga={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Za=Object.assign,ba={};function $n(e,t,n){this.props=e,this.context=t,this.refs=ba,this.updater=n||Ga}$n.prototype.isReactComponent={};$n.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")};$n.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ec(){}ec.prototype=$n.prototype;function is(e,t,n){this.props=e,this.context=t,this.refs=ba,this.updater=n||Ga}var ss=is.prototype=new ec;ss.constructor=is;Za(ss,$n.prototype);ss.isPureReactComponent=!0;var pu=Array.isArray,tc=Object.prototype.hasOwnProperty,us={current:null},nc={key:!0,ref:!0,__self:!0,__source:!0};function rc(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)tc.call(t,r)&&!nc.hasOwnProperty(r)&&(l[r]=t[r]);var s=arguments.length-2;if(s===1)l.children=n;else if(1>>1,B=_[F];if(0>>1;Fl(fn,z))Vtl(Qr,fn)?(_[F]=Qr,_[Vt]=z,F=Vt):(_[F]=fn,_[je]=z,F=je);else if(Vtl(Qr,z))_[F]=Qr,_[Vt]=z,F=Vt;else break e}}return j}function l(_,j){var z=_.sortIndex-j.sortIndex;return z!==0?z:_.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var u=[],a=[],c=1,f=null,m=3,S=!1,g=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(_){for(var j=n(a);j!==null;){if(j.callback===null)r(a);else if(j.startTime<=_)r(a),j.sortIndex=j.expirationTime,t(u,j);else break;j=n(a)}}function x(_){if(y=!1,h(_),!g)if(n(u)!==null)g=!0,ne(C);else{var j=n(a);j!==null&&cn(x,j.startTime-_)}}function C(_,j){g=!1,y&&(y=!1,p(T),T=-1),S=!0;var z=m;try{for(h(j),f=n(u);f!==null&&(!(f.expirationTime>j)||_&&!ve());){var F=f.callback;if(typeof F=="function"){f.callback=null,m=f.priorityLevel;var B=F(f.expirationTime<=j);j=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(u)&&r(u),h(j)}else r(u);f=n(u)}if(f!==null)var yt=!0;else{var je=n(a);je!==null&&cn(x,je.startTime-j),yt=!1}return yt}finally{f=null,m=z,S=!1}}var O=!1,P=null,T=-1,M=5,A=-1;function ve(){return!(e.unstable_now()-A_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(_){switch(m){case 1:case 2:case 3:var j=3;break;default:j=m}var z=m;m=j;try{return _()}finally{m=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,j){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var z=m;m=_;try{return j()}finally{m=z}},e.unstable_scheduleCallback=function(_,j,z){var F=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0F?(_.sortIndex=z,t(a,_),n(u)===null&&_===n(a)&&(y?(p(T),T=-1):y=!0,cn(x,z-F))):(_.sortIndex=B,t(u,_),g||S||(g=!0,ne(C))),_},e.unstable_shouldYield=ve,e.unstable_wrapCallback=function(_){var j=m;return function(){var z=m;m=j;try{return _.apply(this,arguments)}finally{m=z}}}})(ac);uc.exports=ac;var xp=uc.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 kp=E,Oe=xp;function k(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"),oi=Object.prototype.hasOwnProperty,Cp=/^[: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]*$/,mu={},gu={};function _p(e){return oi.call(gu,e)?!0:oi.call(mu,e)?!1:Cp.test(e)?gu[e]=!0:(mu[e]=!0,!1)}function Rp(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 Pp(e,t,n,r){if(t===null||typeof t>"u"||Rp(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 ye(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var se={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){se[e]=new ye(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];se[t]=new ye(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){se[e]=new ye(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){se[e]=new ye(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){se[e]=new ye(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){se[e]=new ye(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){se[e]=new ye(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){se[e]=new ye(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){se[e]=new ye(e,5,!1,e.toLowerCase(),null,!1,!1)});var cs=/[\-:]([a-z])/g;function fs(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(cs,fs);se[t]=new ye(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(cs,fs);se[t]=new ye(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(cs,fs);se[t]=new ye(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){se[e]=new ye(e,1,!1,e.toLowerCase(),null,!1,!1)});se.xlinkHref=new ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){se[e]=new ye(e,1,!1,e.toLowerCase(),null,!0,!0)});function ds(e,t,n,r){var l=se.hasOwnProperty(t)?se[t]:null;(l!==null?l.type!==0:r||!(2s||l[i]!==o[s]){var u=` -`+l[i].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=s);break}}}finally{Po=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?tr(e):""}function Np(e){switch(e.tag){case 5:return tr(e.type);case 16:return tr("Lazy");case 13:return tr("Suspense");case 19:return tr("SuspenseList");case 0:case 2:case 15:return e=No(e.type,!1),e;case 11:return e=No(e.type.render,!1),e;case 1:return e=No(e.type,!0),e;default:return""}}function ai(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 mn:return"Fragment";case hn:return"Portal";case ii:return"Profiler";case ps:return"StrictMode";case si:return"Suspense";case ui:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dc:return(e.displayName||"Context")+".Consumer";case fc:return(e._context.displayName||"Context")+".Provider";case hs:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ms:return t=e.displayName||null,t!==null?t:ai(e.type)||"Memo";case wt:t=e._payload,e=e._init;try{return ai(e(t))}catch{}}return null}function Op(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 ai(t);case 8:return t===ps?"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 Dt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tp(e){var t=hc(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 l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jr(e){e._valueTracker||(e._valueTracker=Tp(e))}function mc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Pl(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 ci(e,t){var n=t.checked;return q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Dt(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 gc(e,t){t=t.checked,t!=null&&ds(e,"checked",t,!1)}function fi(e,t){gc(e,t);var n=Dt(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")?di(e,t.type,n):t.hasOwnProperty("defaultValue")&&di(e,t.type,Dt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function wu(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 di(e,t,n){(t!=="number"||Pl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var nr=Array.isArray;function Rn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Xr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var or={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},Lp=["Webkit","ms","Moz","O"];Object.keys(or).forEach(function(e){Lp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),or[t]=or[e]})});function Sc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||or.hasOwnProperty(e)&&or[e]?(""+t).trim():t+"px"}function Ec(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Sc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var jp=q({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 mi(e,t){if(t){if(jp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(k(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(k(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(k(61))}if(t.style!=null&&typeof t.style!="object")throw Error(k(62))}}function gi(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 yi=null;function gs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vi=null,Pn=null,Nn=null;function xu(e){if(e=Dr(e)){if(typeof vi!="function")throw Error(k(280));var t=e.stateNode;t&&(t=oo(t),vi(e.stateNode,e.type,t))}}function xc(e){Pn?Nn?Nn.push(e):Nn=[e]:Pn=e}function kc(){if(Pn){var e=Pn,t=Nn;if(Nn=Pn=null,xu(e),t)for(e=0;e>>=0,e===0?32:31-(Vp(e)/Wp|0)|0}var Yr=64,Gr=4194304;function rr(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 Ll(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~l;s!==0?r=rr(s):(o&=i,o!==0&&(r=rr(o)))}else i=n&~l,i!==0?r=rr(i):o!==0&&(r=rr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&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 Ar(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ke(t),e[t]=n}function Jp(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=sr),Lu=" ",ju=!1;function Vc(e,t){switch(e){case"keyup":return xh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gn=!1;function Ch(e,t){switch(e){case"compositionend":return Wc(t);case"keypress":return t.which!==32?null:(ju=!0,Lu);case"textInput":return e=t.data,e===Lu&&ju?null:e;default:return null}}function _h(e,t){if(gn)return e==="compositionend"||!Cs&&Vc(e,t)?(e=Bc(),hl=Es=Ct=null,gn=!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=Du(n)}}function Jc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xc(){for(var e=window,t=Pl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pl(e.document)}return t}function _s(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 Ah(e){var t=Xc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Jc(n.ownerDocument.documentElement,n)){if(r!==null&&_s(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 l=n.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=Fu(n,o);var i=Fu(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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,yn=null,Ci=null,ar=null,_i=!1;function Uu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_i||yn==null||yn!==Pl(r)||(r=yn,"selectionStart"in r&&_s(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}),ar&&Er(ar,r)||(ar=r,r=Al(Ci,"onSelect"),0Sn||(e.current=Li[Sn],Li[Sn]=null,Sn--)}function $(e,t){Sn++,Li[Sn]=e.current,e.current=t}var Ft={},de=Mt(Ft),Ee=Mt(!1),bt=Ft;function zn(e,t){var n=e.type.contextTypes;if(!n)return Ft;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function xe(e){return e=e.childContextTypes,e!=null}function Dl(){V(Ee),V(de)}function Qu(e,t,n){if(de.current!==Ft)throw Error(k(168));$(de,t),$(Ee,n)}function lf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(k(108,Op(e)||"Unknown",l));return q({},n,r)}function Fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ft,bt=de.current,$(de,e),$(Ee,Ee.current),!0}function Ku(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=lf(e,t,bt),r.__reactInternalMemoizedMergedChildContext=e,V(Ee),V(de),$(de,e)):V(Ee),$(Ee,n)}var it=null,io=!1,Ho=!1;function of(e){it===null?it=[e]:it.push(e)}function Kh(e){io=!0,of(e)}function $t(){if(!Ho&&it!==null){Ho=!0;var e=0,t=U;try{var n=it;for(U=1;e>=i,l-=i,st=1<<32-Ke(t)+l|n<T?(M=P,P=null):M=P.sibling;var A=m(p,P,h[T],x);if(A===null){P===null&&(P=M);break}e&&P&&A.alternate===null&&t(p,P),d=o(A,d,T),O===null?C=A:O.sibling=A,O=A,P=M}if(T===h.length)return n(p,P),W&&Wt(p,T),C;if(P===null){for(;TT?(M=P,P=null):M=P.sibling;var ve=m(p,P,A.value,x);if(ve===null){P===null&&(P=M);break}e&&P&&ve.alternate===null&&t(p,P),d=o(ve,d,T),O===null?C=ve:O.sibling=ve,O=ve,P=M}if(A.done)return n(p,P),W&&Wt(p,T),C;if(P===null){for(;!A.done;T++,A=h.next())A=f(p,A.value,x),A!==null&&(d=o(A,d,T),O===null?C=A:O.sibling=A,O=A);return W&&Wt(p,T),C}for(P=r(p,P);!A.done;T++,A=h.next())A=S(P,p,T,A.value,x),A!==null&&(e&&A.alternate!==null&&P.delete(A.key===null?T:A.key),d=o(A,d,T),O===null?C=A:O.sibling=A,O=A);return e&&P.forEach(function(Ye){return t(p,Ye)}),W&&Wt(p,T),C}function w(p,d,h,x){if(typeof h=="object"&&h!==null&&h.type===mn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case qr:e:{for(var C=h.key,O=d;O!==null;){if(O.key===C){if(C=h.type,C===mn){if(O.tag===7){n(p,O.sibling),d=l(O,h.props.children),d.return=p,p=d;break e}}else if(O.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===wt&&Xu(C)===O.type){n(p,O.sibling),d=l(O,h.props),d.ref=Gn(p,O,h),d.return=p,p=d;break e}n(p,O);break}else t(p,O);O=O.sibling}h.type===mn?(d=Gt(h.props.children,p.mode,x,h.key),d.return=p,p=d):(x=xl(h.type,h.key,h.props,null,p.mode,x),x.ref=Gn(p,d,h),x.return=p,p=x)}return i(p);case hn:e:{for(O=h.key;d!==null;){if(d.key===O)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(p,d.sibling),d=l(d,h.children||[]),d.return=p,p=d;break e}else{n(p,d);break}else t(p,d);d=d.sibling}d=Yo(h,p.mode,x),d.return=p,p=d}return i(p);case wt:return O=h._init,w(p,d,O(h._payload),x)}if(nr(h))return g(p,d,h,x);if(Kn(h))return y(p,d,h,x);ll(p,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(p,d.sibling),d=l(d,h),d.return=p,p=d):(n(p,d),d=Xo(h,p.mode,x),d.return=p,p=d),i(p)):n(p,d)}return w}var In=cf(!0),ff=cf(!1),$l=Mt(null),Bl=null,kn=null,Os=null;function Ts(){Os=kn=Bl=null}function Ls(e){var t=$l.current;V($l),e._currentValue=t}function Ai(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 Tn(e,t){Bl=e,Os=kn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Se=!0),e.firstContext=null)}function Ue(e){var t=e._currentValue;if(Os!==e)if(e={context:e,memoizedValue:t,next:null},kn===null){if(Bl===null)throw Error(k(308));kn=e,Bl.dependencies={lanes:0,firstContext:e}}else kn=kn.next=e;return t}var qt=null;function js(e){qt===null?qt=[e]:qt.push(e)}function df(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,js(t)):(n.next=l.next,l.next=n),t.interleaved=n,dt(e,r)}function dt(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 St=!1;function zs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pf(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 at(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Lt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,D&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,dt(e,n)}return l=r.interleaved,l===null?(t.next=t,js(r)):(t.next=l.next,l.next=t),r.interleaved=t,dt(e,n)}function gl(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,vs(e,n)}}function Yu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,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 Hl(e,t,n,r){var l=e.updateQueue;St=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var u=s,a=u.next;u.next=null,i===null?o=a:i.next=a,i=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==i&&(s===null?c.firstBaseUpdate=a:s.next=a,c.lastBaseUpdate=u))}if(o!==null){var f=l.baseState;i=0,c=a=u=null,s=o;do{var m=s.lane,S=s.eventTime;if((r&m)===m){c!==null&&(c=c.next={eventTime:S,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,y=s;switch(m=t,S=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){f=g.call(S,f,m);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,m=typeof g=="function"?g.call(S,f,m):g,m==null)break e;f=q({},f,m);break e;case 2:St=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[s]:m.push(s))}else S={eventTime:S,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(a=c=S,u=f):c=c.next=S,i|=m;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;m=s,s=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(c===null&&(u=f),l.baseState=u,l.firstBaseUpdate=a,l.lastBaseUpdate=c,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);nn|=i,e.lanes=i,e.memoizedState=f}}function Gu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Wo.transition;Wo.transition={};try{e(!1),t()}finally{U=n,Wo.transition=r}}function Tf(){return Me().memoizedState}function Yh(e,t,n){var r=zt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Lf(e))jf(t,n);else if(n=df(e,t,n,r),n!==null){var l=me();qe(n,e,r,l),zf(n,t,r)}}function Gh(e,t,n){var r=zt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Lf(e))jf(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,s=o(i,n);if(l.hasEagerState=!0,l.eagerState=s,Je(s,i)){var u=t.interleaved;u===null?(l.next=l,js(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=df(e,t,l,r),n!==null&&(l=me(),qe(n,e,r,l),zf(n,t,r))}}function Lf(e){var t=e.alternate;return e===K||t!==null&&t===K}function jf(e,t){cr=Wl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vs(e,n)}}var Ql={readContext:Ue,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useInsertionEffect:ue,useLayoutEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useMutableSource:ue,useSyncExternalStore:ue,useId:ue,unstable_isNewReconciler:!1},Zh={readContext:Ue,useCallback:function(e,t){return be().memoizedState=[e,t===void 0?null:t],e},useContext:Ue,useEffect:bu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vl(4194308,4,_f.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vl(4194308,4,e,t)},useInsertionEffect:function(e,t){return vl(4,2,e,t)},useMemo:function(e,t){var n=be();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=be();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=Yh.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=be();return e={current:e},t.memoizedState=e},useState:Zu,useDebugValue:Bs,useDeferredValue:function(e){return be().memoizedState=e},useTransition:function(){var e=Zu(!1),t=e[0];return e=Xh.bind(null,e[1]),be().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,l=be();if(W){if(n===void 0)throw Error(k(407));n=n()}else{if(n=t(),le===null)throw Error(k(349));tn&30||yf(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,bu(wf.bind(null,r,o,e),[e]),r.flags|=2048,Or(9,vf.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=be(),t=le.identifierPrefix;if(W){var n=ut,r=st;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Pr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[et]=t,e[Cr]=r,Vf(e,t,!1,!1),t.stateNode=e;e:{switch(i=gi(n,r),n){case"dialog":H("cancel",e),H("close",e),l=r;break;case"iframe":case"object":case"embed":H("load",e),l=r;break;case"video":case"audio":for(l=0;lUn&&(t.flags|=128,r=!0,Zn(o,!1),t.lanes=4194304)}else{if(!r)if(e=Vl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!W)return ae(t),null}else 2*X()-o.renderingStartTime>Un&&n!==1073741824&&(t.flags|=128,r=!0,Zn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=X(),t.sibling=null,n=Q.current,$(Q,r?n&1|2:n&1),t):(ae(t),null);case 22:case 23:return qs(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Re&1073741824&&(ae(t),t.subtreeFlags&6&&(t.flags|=8192)):ae(t),null;case 24:return null;case 25:return null}throw Error(k(156,t.tag))}function im(e,t){switch(Ps(t),t.tag){case 1:return xe(t.type)&&Dl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dn(),V(Ee),V(de),Ds(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Is(t),null;case 13:if(V(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));An()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Q),null;case 4:return Dn(),null;case 10:return Ls(t.type._context),null;case 22:case 23:return qs(),null;case 24:return null;default:return null}}var il=!1,ce=!1,sm=typeof WeakSet=="function"?WeakSet:Set,N=null;function Cn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){J(e,t,r)}else n.current=null}function Vi(e,t,n){try{n()}catch(r){J(e,t,r)}}var ca=!1;function um(e,t){if(Ri=jl,e=Xc(),_s(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 l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,s=-1,u=-1,a=0,c=0,f=e,m=null;t:for(;;){for(var S;f!==n||l!==0&&f.nodeType!==3||(s=i+l),f!==o||r!==0&&f.nodeType!==3||(u=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(S=f.firstChild)!==null;)m=f,f=S;for(;;){if(f===e)break t;if(m===n&&++a===l&&(s=i),m===o&&++c===r&&(u=i),(S=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=S}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pi={focusedElem:e,selectionRange:n},jl=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,w=g.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ve(t.type,y),w);p.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(k(163))}}catch(x){J(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return g=ca,ca=!1,g}function fr(e,t,n){var r=t.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&&Vi(t,n,o)}l=l.next}while(l!==r)}}function ao(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 Wi(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 Kf(e){var t=e.alternate;t!==null&&(e.alternate=null,Kf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[et],delete t[Cr],delete t[Ti],delete t[Wh],delete t[Qh])),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 qf(e){return e.tag===5||e.tag===3||e.tag===4}function fa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qf(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 Qi(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=Il));else if(r!==4&&(e=e.child,e!==null))for(Qi(e,t,n),e=e.sibling;e!==null;)Qi(e,t,n),e=e.sibling}function Ki(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(Ki(e,t,n),e=e.sibling;e!==null;)Ki(e,t,n),e=e.sibling}var oe=null,We=!1;function vt(e,t,n){for(n=n.child;n!==null;)Jf(e,t,n),n=n.sibling}function Jf(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(to,n)}catch{}switch(n.tag){case 5:ce||Cn(n,t);case 6:var r=oe,l=We;oe=null,vt(e,t,n),oe=r,We=l,oe!==null&&(We?(e=oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):oe.removeChild(n.stateNode));break;case 18:oe!==null&&(We?(e=oe,n=n.stateNode,e.nodeType===8?Bo(e.parentNode,n):e.nodeType===1&&Bo(e,n),wr(e)):Bo(oe,n.stateNode));break;case 4:r=oe,l=We,oe=n.stateNode.containerInfo,We=!0,vt(e,t,n),oe=r,We=l;break;case 0:case 11:case 14:case 15:if(!ce&&(r=n.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)&&Vi(n,t,i),l=l.next}while(l!==r)}vt(e,t,n);break;case 1:if(!ce&&(Cn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){J(n,t,s)}vt(e,t,n);break;case 21:vt(e,t,n);break;case 22:n.mode&1?(ce=(r=ce)||n.memoizedState!==null,vt(e,t,n),ce=r):vt(e,t,n);break;default:vt(e,t,n)}}function da(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new sm),t.forEach(function(r){var l=ym.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Be(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=X()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*cm(r/1960))-r,10e?16:e,_t===null)var r=!1;else{if(e=_t,_t=null,Jl=0,D&6)throw Error(k(331));var l=D;for(D|=4,N=e.current;N!==null;){var o=N,i=o.child;if(N.flags&16){var s=o.deletions;if(s!==null){for(var u=0;uX()-Qs?Yt(e,0):Ws|=n),ke(e,t)}function nd(e,t){t===0&&(e.mode&1?(t=Gr,Gr<<=1,!(Gr&130023424)&&(Gr=4194304)):t=1);var n=me();e=dt(e,t),e!==null&&(Ar(e,t,n),ke(e,n))}function gm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),nd(e,n)}function ym(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(k(314))}r!==null&&r.delete(t),nd(e,n)}var rd;rd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ee.current)Se=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Se=!1,lm(e,t,n);Se=!!(e.flags&131072)}else Se=!1,W&&t.flags&1048576&&sf(t,Ml,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;wl(e,t),e=t.pendingProps;var l=zn(t,de.current);Tn(t,n),l=Us(null,t,r,e,l,n);var o=Ms();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xe(r)?(o=!0,Fl(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,zs(t),l.updater=uo,t.stateNode=l,l._reactInternals=t,Di(t,r,e,n),t=Mi(null,t,r,!0,o,n)):(t.tag=0,W&&o&&Rs(t),he(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(wl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=wm(r),e=Ve(r,e),l){case 0:t=Ui(null,t,r,e,n);break e;case 1:t=sa(null,t,r,e,n);break e;case 11:t=oa(null,t,r,e,n);break e;case 14:t=ia(null,t,r,Ve(r.type,e),n);break e}throw Error(k(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ve(r,l),Ui(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ve(r,l),sa(e,t,r,l,n);case 3:e:{if($f(t),e===null)throw Error(k(387));r=t.pendingProps,o=t.memoizedState,l=o.element,pf(e,t),Hl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=Fn(Error(k(423)),t),t=ua(e,t,r,n,l);break e}else if(r!==l){l=Fn(Error(k(424)),t),t=ua(e,t,r,n,l);break e}else for(Pe=Tt(t.stateNode.containerInfo.firstChild),Ne=t,W=!0,Qe=null,n=ff(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(An(),r===l){t=pt(e,t,n);break e}he(e,t,r,n)}t=t.child}return t;case 5:return hf(t),e===null&&zi(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Ni(r,l)?i=null:o!==null&&Ni(r,o)&&(t.flags|=32),Mf(e,t),he(e,t,i,n),t.child;case 6:return e===null&&zi(t),null;case 13:return Bf(e,t,n);case 4:return As(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=In(t,null,r,n):he(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ve(r,l),oa(e,t,r,l,n);case 7:return he(e,t,t.pendingProps,n),t.child;case 8:return he(e,t,t.pendingProps.children,n),t.child;case 12:return he(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,$($l,r._currentValue),r._currentValue=i,o!==null)if(Je(o.value,i)){if(o.children===l.children&&!Ee.current){t=pt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=at(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?u.next=u:(u.next=c.next,c.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ai(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(k(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Ai(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}he(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Tn(t,n),l=Ue(l),r=r(l),t.flags|=1,he(e,t,r,n),t.child;case 14:return r=t.type,l=Ve(r,t.pendingProps),l=Ve(r.type,l),ia(e,t,r,l,n);case 15:return Ff(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ve(r,l),wl(e,t),t.tag=1,xe(r)?(e=!0,Fl(t)):e=!1,Tn(t,n),Af(t,r,l),Di(t,r,l,n),Mi(null,t,r,!0,e,n);case 19:return Hf(e,t,n);case 22:return Uf(e,t,n)}throw Error(k(156,t.tag))};function ld(e,t){return Tc(e,t)}function vm(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 De(e,t,n,r){return new vm(e,t,n,r)}function Xs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wm(e){if(typeof e=="function")return Xs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hs)return 11;if(e===ms)return 14}return 2}function At(e,t){var n=e.alternate;return n===null?(n=De(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 xl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Xs(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case mn:return Gt(n.children,l,o,t);case ps:i=8,l|=8;break;case ii:return e=De(12,n,t,l|2),e.elementType=ii,e.lanes=o,e;case si:return e=De(13,n,t,l),e.elementType=si,e.lanes=o,e;case ui:return e=De(19,n,t,l),e.elementType=ui,e.lanes=o,e;case pc:return fo(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fc:i=10;break e;case dc:i=9;break e;case hs:i=11;break e;case ms:i=14;break e;case wt:i=16,r=null;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=De(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Gt(e,t,n,r){return e=De(7,e,r,t),e.lanes=n,e}function fo(e,t,n,r){return e=De(22,e,r,t),e.elementType=pc,e.lanes=n,e.stateNode={isHidden:!1},e}function Xo(e,t,n){return e=De(6,e,null,t),e.lanes=n,e}function Yo(e,t,n){return t=De(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Sm(e,t,n,r,l){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=To(0),this.expirationTimes=To(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=To(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ys(e,t,n,r,l,o,i,s,u){return e=new Sm(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=De(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zs(o),e}function Em(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ud)}catch(e){console.error(e)}}ud(),sc.exports=Te;var Rm=sc.exports,Sa=Rm;li.createRoot=Sa.createRoot,li.hydrateRoot=Sa.hydrateRoot;/** - * @remix-run/router v1.23.2 - * - * 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 Lr(){return Lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function eu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Nm(){return Math.random().toString(36).substr(2,8)}function xa(e,t){return{usr:e.state,key:e.key,idx:t}}function Gi(e,t,n,r){return n===void 0&&(n=null),Lr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Vn(t):t,{state:n,key:t&&t.key||r||Nm()})}function Gl(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 Vn(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 Om(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,s=Rt.Pop,u=null,a=c();a==null&&(a=0,i.replaceState(Lr({},i.state,{idx:a}),""));function c(){return(i.state||{idx:null}).idx}function f(){s=Rt.Pop;let w=c(),p=w==null?null:w-a;a=w,u&&u({action:s,location:y.location,delta:p})}function m(w,p){s=Rt.Push;let d=Gi(y.location,w,p);a=c()+1;let h=xa(d,a),x=y.createHref(d);try{i.pushState(h,"",x)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;l.location.assign(x)}o&&u&&u({action:s,location:y.location,delta:1})}function S(w,p){s=Rt.Replace;let d=Gi(y.location,w,p);a=c();let h=xa(d,a),x=y.createHref(d);i.replaceState(h,"",x),o&&u&&u({action:s,location:y.location,delta:0})}function g(w){let p=l.location.origin!=="null"?l.location.origin:l.location.href,d=typeof w=="string"?w:Gl(w);return d=d.replace(/ $/,"%20"),Y(p,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,p)}let y={get action(){return s},get location(){return e(l,i)},listen(w){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Ea,f),u=w,()=>{l.removeEventListener(Ea,f),u=null}},createHref(w){return t(l,w)},createURL:g,encodeLocation(w){let p=g(w);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:m,replace:S,go(w){return i.go(w)}};return y}var ka;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ka||(ka={}));function Tm(e,t,n){return n===void 0&&(n="/"),Lm(e,t,n)}function Lm(e,t,n,r){let l=typeof t=="string"?Vn(t):t,o=tu(l.pathname||"/",n);if(o==null)return null;let i=ad(e);jm(i);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(Y(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let a=It([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(Y(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),ad(o.children,t,c,a)),!(o.path==null&&!o.index)&&t.push({path:a,score:Mm(a,o.index),routesMeta:c})};return e.forEach((o,i)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))l(o,i);else for(let u of cd(o.path))l(o,i,u)}),t}function cd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=cd(r.join("/")),s=[];return s.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&s.push(...i),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function jm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:$m(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const zm=/^:[\w-]+$/,Am=3,Im=2,Dm=1,Fm=10,Um=-2,Ca=e=>e==="*";function Mm(e,t){let n=e.split("/"),r=n.length;return n.some(Ca)&&(r+=Um),t&&(r+=Im),n.filter(l=>!Ca(l)).reduce((l,o)=>l+(zm.test(o)?Am:o===""?Dm:Fm),r)}function $m(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function Bm(e,t,n){let{routesMeta:r}=e,l={},o="/",i=[];for(let s=0;s{let{paramName:m,isOptional:S}=c;if(m==="*"){let y=s[f]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const g=s[f];return S&&!g?a[m]=void 0:a[m]=(g||"").replace(/%2F/g,"/"),a},{}),pathname:o,pathnameBase:i,pattern:e}}function Vm(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),eu(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=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function Wm(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return eu(!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 tu(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)||"/"}const Qm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Km=e=>Qm.test(e);function qm(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Vn(e):e,o;if(n)if(Km(n))o=n;else{if(n.includes("//")){let i=n;n=n.replace(/\/\/+/g,"/"),eu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+n))}n.startsWith("/")?o=_a(n.substring(1),"/"):o=_a(n,t)}else o=t;return{pathname:o,search:Ym(r),hash:Gm(l)}}function _a(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Go(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 Jm(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nu(e,t){let n=Jm(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ru(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Vn(e):(l=Lr({},e),Y(!l.pathname||!l.pathname.includes("?"),Go("?","pathname","search",l)),Y(!l.pathname||!l.pathname.includes("#"),Go("#","pathname","hash",l)),Y(!l.search||!l.search.includes("#"),Go("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,s;if(i==null)s=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),f-=1;l.pathname=m.join("/")}s=f>=0?t[f]:"/"}let u=qm(l,s),a=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(a||c)&&(u.pathname+="/"),u}const It=e=>e.join("/").replace(/\/\/+/g,"/"),Xm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ym=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Gm=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Zm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const fd=["post","put","patch","delete"];new Set(fd);const bm=["get",...fd];new Set(bm);/** - * React Router v6.30.3 - * - * 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 jr(){return jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),E.useCallback(function(a,c){if(c===void 0&&(c={}),!s.current)return;if(typeof a=="number"){r.go(a);return}let f=ru(a,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:It([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,i,o,e])}const rg=E.createContext(null);function lg(e){let t=E.useContext(gt).outlet;return t&&E.createElement(rg.Provider,{value:e},t)}function hd(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=E.useContext(Bt),{matches:l}=E.useContext(gt),{pathname:o}=un(),i=JSON.stringify(nu(l,r.v7_relativeSplatPath));return E.useMemo(()=>ru(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function og(e,t){return ig(e,t)}function ig(e,t,n,r){Wn()||Y(!1);let{navigator:l}=E.useContext(Bt),{matches:o}=E.useContext(gt),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let a=un(),c;if(t){var f;let w=typeof t=="string"?Vn(t):t;u==="/"||(f=w.pathname)!=null&&f.startsWith(u)||Y(!1),c=w}else c=a;let m=c.pathname||"/",S=m;if(u!=="/"){let w=u.replace(/^\//,"").split("/");S="/"+m.replace(/^\//,"").split("/").slice(w.length).join("/")}let g=Tm(e,{pathname:S}),y=fg(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:It([u,l.encodeLocation?l.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?u:It([u,l.encodeLocation?l.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n,r);return t&&y?E.createElement(yo.Provider,{value:{location:jr({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Rt.Pop}},y):y}function sg(){let e=mg(),t=Zm(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:l},n):null,null)}const ug=E.createElement(sg,null);class ag extends E.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?E.createElement(gt.Provider,{value:this.props.routeContext},E.createElement(dd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function cg(e){let{routeContext:t,match:n,children:r}=e,l=E.useContext(lu);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(gt.Provider,{value:t},r)}function fg(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=(l=n)==null?void 0:l.errors;if(s!=null){let c=i.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||Y(!1),i=i.slice(0,Math.min(i.length,c+1))}let u=!1,a=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((c,f,m)=>{let S,g=!1,y=null,w=null;n&&(S=s&&f.route.id?s[f.route.id]:void 0,y=f.route.errorElement||ug,u&&(a<0&&m===0?(yg("route-fallback"),g=!0,w=null):a===m&&(g=!0,w=f.route.hydrateFallbackElement||null)));let p=t.concat(i.slice(0,m+1)),d=()=>{let h;return S?h=y:g?h=w:f.route.Component?h=E.createElement(f.route.Component,null):f.route.element?h=f.route.element:h=c,E.createElement(cg,{match:f,routeContext:{outlet:c,matches:p,isDataRoute:n!=null},children:h})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?E.createElement(ag,{location:n.location,revalidation:n.revalidation,component:y,error:S,children:d(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):d()},null)}var md=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(md||{}),gd=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}(gd||{});function dg(e){let t=E.useContext(lu);return t||Y(!1),t}function pg(e){let t=E.useContext(eg);return t||Y(!1),t}function hg(e){let t=E.useContext(gt);return t||Y(!1),t}function yd(e){let t=hg(),n=t.matches[t.matches.length-1];return n.route.id||Y(!1),n.route.id}function mg(){var e;let t=E.useContext(dd),n=pg(),r=yd();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function gg(){let{router:e}=dg(md.UseNavigateStable),t=yd(gd.UseNavigateStable),n=E.useRef(!1);return pd(()=>{n.current=!0}),E.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,jr({fromRouteId:t},o)))},[e,t])}const Ra={};function yg(e,t,n){Ra[e]||(Ra[e]=!0)}function vg(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function vd(e){let{to:t,replace:n,state:r,relative:l}=e;Wn()||Y(!1);let{future:o,static:i}=E.useContext(Bt),{matches:s}=E.useContext(gt),{pathname:u}=un(),a=ou(),c=ru(t,nu(s,o.v7_relativeSplatPath),u,l==="path"),f=JSON.stringify(c);return E.useEffect(()=>a(JSON.parse(f),{replace:n,state:r,relative:l}),[a,f,l,n,r]),null}function wd(e){return lg(e.context)}function He(e){Y(!1)}function wg(e){let{basename:t="/",children:n=null,location:r,navigationType:l=Rt.Pop,navigator:o,static:i=!1,future:s}=e;Wn()&&Y(!1);let u=t.replace(/^\/*/,"/"),a=E.useMemo(()=>({basename:u,navigator:o,static:i,future:jr({v7_relativeSplatPath:!1},s)}),[u,s,o,i]);typeof r=="string"&&(r=Vn(r));let{pathname:c="/",search:f="",hash:m="",state:S=null,key:g="default"}=r,y=E.useMemo(()=>{let w=tu(c,u);return w==null?null:{location:{pathname:w,search:f,hash:m,state:S,key:g},navigationType:l}},[u,c,f,m,S,g,l]);return y==null?null:E.createElement(Bt.Provider,{value:a},E.createElement(yo.Provider,{children:n,value:y}))}function Sg(e){let{children:t,location:n}=e;return og(Zi(t),n)}new Promise(()=>{});function Zi(e,t){t===void 0&&(t=[]);let n=[];return E.Children.forEach(e,(r,l)=>{if(!E.isValidElement(r))return;let o=[...t,l];if(r.type===E.Fragment){n.push.apply(n,Zi(r.props.children,o));return}r.type!==He&&Y(!1),!r.props.index||!r.props.children||Y(!1);let i={id:r.props.id||o.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&&(i.children=Zi(r.props.children,o)),n.push(i)}),n}/** - * React Router DOM v6.30.3 - * - * 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 bi(){return bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function xg(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kg(e,t){return e.button===0&&(!t||t==="_self")&&!xg(e)}const Cg=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],_g="6";try{window.__reactRouterVersion=_g}catch{}const Rg="startTransition",Pa=mp[Rg];function Pg(e){let{basename:t,children:n,future:r,window:l}=e,o=E.useRef();o.current==null&&(o.current=Pm({window:l,v5Compat:!0}));let i=o.current,[s,u]=E.useState({action:i.action,location:i.location}),{v7_startTransition:a}=r||{},c=E.useCallback(f=>{a&&Pa?Pa(()=>u(f)):u(f)},[u,a]);return E.useLayoutEffect(()=>i.listen(c),[i,c]),E.useEffect(()=>vg(r),[r]),E.createElement(wg,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:i,future:r})}const Ng=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Og=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pn=E.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:s,target:u,to:a,preventScrollReset:c,viewTransition:f}=t,m=Eg(t,Cg),{basename:S}=E.useContext(Bt),g,y=!1;if(typeof a=="string"&&Og.test(a)&&(g=a,Ng))try{let h=new URL(window.location.href),x=a.startsWith("//")?new URL(h.protocol+a):new URL(a),C=tu(x.pathname,S);x.origin===h.origin&&C!=null?a=C+x.search+x.hash:y=!0}catch{}let w=tg(a,{relative:l}),p=Tg(a,{replace:i,state:s,target:u,preventScrollReset:c,relative:l,viewTransition:f});function d(h){r&&r(h),h.defaultPrevented||p(h)}return E.createElement("a",bi({},m,{href:g||w,onClick:y||o?r:d,ref:n,target:u}))});var Na;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Na||(Na={}));var Oa;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Oa||(Oa={}));function Tg(e,t){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i,viewTransition:s}=t===void 0?{}:t,u=ou(),a=un(),c=hd(e,{relative:i});return E.useCallback(f=>{if(kg(f,n)){f.preventDefault();let m=r!==void 0?r:Gl(a)===Gl(c);u(e,{replace:m,state:l,preventScrollReset:o,relative:i,viewTransition:s})}},[a,u,c,r,l,n,e,o,i,s])}let Lg={data:""},jg=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Lg},zg=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Ag=/\/\*[^]*?\*\/| +/g,Ta=/\n+/g,kt=(e,t)=>{let n="",r="",l="";for(let o in e){let i=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+i+";":r+=o[1]=="f"?kt(i,o):o+"{"+kt(i,o[1]=="k"?"":t)+"}":typeof i=="object"?r+=kt(i,t?t.replace(/([^,])+/g,s=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):o):i!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),l+=kt.p?kt.p(o,i):o+":"+i+";")}return n+(t&&l?t+"{"+l+"}":l)+r},lt={},Sd=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Sd(e[n]);return t}return e},Ig=(e,t,n,r,l)=>{let o=Sd(e),i=lt[o]||(lt[o]=(u=>{let a=0,c=11;for(;a>>0;return"go"+c})(o));if(!lt[i]){let u=o!==e?e:(a=>{let c,f,m=[{}];for(;c=zg.exec(a.replace(Ag,""));)c[4]?m.shift():c[3]?(f=c[3].replace(Ta," ").trim(),m.unshift(m[0][f]=m[0][f]||{})):m[0][c[1]]=c[2].replace(Ta," ").trim();return m[0]})(e);lt[i]=kt(l?{["@keyframes "+i]:u}:u,n?"":"."+i)}let s=n&<.g?lt.g:null;return n&&(lt.g=lt[i]),((u,a,c,f)=>{f?a.data=a.data.replace(f,u):a.data.indexOf(u)===-1&&(a.data=c?u+a.data:a.data+u)})(lt[i],t,r,s),i},Dg=(e,t,n)=>e.reduce((r,l,o)=>{let i=t[o];if(i&&i.call){let s=i(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;i=u?"."+u:s&&typeof s=="object"?s.props?"":kt(s,""):s===!1?"":s}return r+l+(i??"")},"");function vo(e){let t=this||{},n=e.call?e(t.p):e;return Ig(n.unshift?n.raw?Dg(n,[].slice.call(arguments,1),t.p):n.reduce((r,l)=>Object.assign(r,l&&l.call?l(t.p):l),{}):n,jg(t.target),t.g,t.o,t.k)}let Ed,es,ts;vo.bind({g:1});let ht=vo.bind({k:1});function Fg(e,t,n,r){kt.p=t,Ed=e,es=n,ts=r}function Ht(e,t){let n=this||{};return function(){let r=arguments;function l(o,i){let s=Object.assign({},o),u=s.className||l.className;n.p=Object.assign({theme:es&&es()},s),n.o=/ *go\d+/.test(u),s.className=vo.apply(n,r)+(u?" "+u:"");let a=e;return e[0]&&(a=s.as||e,delete s.as),ts&&a[0]&&ts(s),Ed(a,s)}return l}}var Ug=e=>typeof e=="function",Zl=(e,t)=>Ug(e)?e(t):e,Mg=(()=>{let e=0;return()=>(++e).toString()})(),xd=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),$g=20,iu="default",kd=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:r}=t;return kd(e,{type:e.toasts.find(i=>i.id===r.id)?1:0,toast:r});case 3:let{toastId:l}=t;return{...e,toasts:e.toasts.map(i=>i.id===l||l===void 0?{...i,dismissed:!0,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},kl=[],Cd={toasts:[],pausedAt:void 0,settings:{toastLimit:$g}},tt={},_d=(e,t=iu)=>{tt[t]=kd(tt[t]||Cd,e),kl.forEach(([n,r])=>{n===t&&r(tt[t])})},Rd=e=>Object.keys(tt).forEach(t=>_d(e,t)),Bg=e=>Object.keys(tt).find(t=>tt[t].toasts.some(n=>n.id===e)),wo=(e=iu)=>t=>{_d(t,e)},Hg={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Vg=(e={},t=iu)=>{let[n,r]=E.useState(tt[t]||Cd),l=E.useRef(tt[t]);E.useEffect(()=>(l.current!==tt[t]&&r(tt[t]),kl.push([t,r]),()=>{let i=kl.findIndex(([s])=>s===t);i>-1&&kl.splice(i,1)}),[t]);let o=n.toasts.map(i=>{var s,u,a;return{...e,...e[i.type],...i,removeDelay:i.removeDelay||((s=e[i.type])==null?void 0:s.removeDelay)||(e==null?void 0:e.removeDelay),duration:i.duration||((u=e[i.type])==null?void 0:u.duration)||(e==null?void 0:e.duration)||Hg[i.type],style:{...e.style,...(a=e[i.type])==null?void 0:a.style,...i.style}}});return{...n,toasts:o}},Wg=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Mg()}),Ur=e=>(t,n)=>{let r=Wg(t,e,n);return wo(r.toasterId||Bg(r.id))({type:2,toast:r}),r.id},ee=(e,t)=>Ur("blank")(e,t);ee.error=Ur("error");ee.success=Ur("success");ee.loading=Ur("loading");ee.custom=Ur("custom");ee.dismiss=(e,t)=>{let n={type:3,toastId:e};t?wo(t)(n):Rd(n)};ee.dismissAll=e=>ee.dismiss(void 0,e);ee.remove=(e,t)=>{let n={type:4,toastId:e};t?wo(t)(n):Rd(n)};ee.removeAll=e=>ee.remove(void 0,e);ee.promise=(e,t,n)=>{let r=ee.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(l=>{let o=t.success?Zl(t.success,l):void 0;return o?ee.success(o,{id:r,...n,...n==null?void 0:n.success}):ee.dismiss(r),l}).catch(l=>{let o=t.error?Zl(t.error,l):void 0;o?ee.error(o,{id:r,...n,...n==null?void 0:n.error}):ee.dismiss(r)}),e};var Qg=1e3,Kg=(e,t="default")=>{let{toasts:n,pausedAt:r}=Vg(e,t),l=E.useRef(new Map).current,o=E.useCallback((f,m=Qg)=>{if(l.has(f))return;let S=setTimeout(()=>{l.delete(f),i({type:4,toastId:f})},m);l.set(f,S)},[]);E.useEffect(()=>{if(r)return;let f=Date.now(),m=n.map(S=>{if(S.duration===1/0)return;let g=(S.duration||0)+S.pauseDuration-(f-S.createdAt);if(g<0){S.visible&&ee.dismiss(S.id);return}return setTimeout(()=>ee.dismiss(S.id,t),g)});return()=>{m.forEach(S=>S&&clearTimeout(S))}},[n,r,t]);let i=E.useCallback(wo(t),[t]),s=E.useCallback(()=>{i({type:5,time:Date.now()})},[i]),u=E.useCallback((f,m)=>{i({type:1,toast:{id:f,height:m}})},[i]),a=E.useCallback(()=>{r&&i({type:6,time:Date.now()})},[r,i]),c=E.useCallback((f,m)=>{let{reverseOrder:S=!1,gutter:g=8,defaultPosition:y}=m||{},w=n.filter(h=>(h.position||y)===(f.position||y)&&h.height),p=w.findIndex(h=>h.id===f.id),d=w.filter((h,x)=>xh.visible).slice(...S?[d+1]:[0,d]).reduce((h,x)=>h+(x.height||0)+g,0)},[n]);return E.useEffect(()=>{n.forEach(f=>{if(f.dismissed)o(f.id,f.removeDelay);else{let m=l.get(f.id);m&&(clearTimeout(m),l.delete(f.id))}})},[n,o]),{toasts:n,handlers:{updateHeight:u,startPause:s,endPause:a,calculateOffset:c}}},qg=ht` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,Jg=ht` -from { - transform: scale(0); - opacity: 0; -} -to { - transform: scale(1); - opacity: 1; -}`,Xg=ht` -from { - transform: scale(0) rotate(90deg); - opacity: 0; -} -to { - transform: scale(1) rotate(90deg); - opacity: 1; -}`,Yg=Ht("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${e=>e.primary||"#ff4b4b"}; - position: relative; - transform: rotate(45deg); - - animation: ${qg} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - - &:after, - &:before { - content: ''; - animation: ${Jg} 0.15s ease-out forwards; - animation-delay: 150ms; - position: absolute; - border-radius: 3px; - opacity: 0; - background: ${e=>e.secondary||"#fff"}; - bottom: 9px; - left: 4px; - height: 2px; - width: 12px; - } - - &:before { - animation: ${Xg} 0.15s ease-out forwards; - animation-delay: 180ms; - transform: rotate(90deg); - } -`,Gg=ht` - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -`,Zg=Ht("div")` - width: 12px; - height: 12px; - box-sizing: border-box; - border: 2px solid; - border-radius: 100%; - border-color: ${e=>e.secondary||"#e0e0e0"}; - border-right-color: ${e=>e.primary||"#616161"}; - animation: ${Gg} 1s linear infinite; -`,bg=ht` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,ey=ht` -0% { - height: 0; - width: 0; - opacity: 0; -} -40% { - height: 0; - width: 6px; - opacity: 1; -} -100% { - opacity: 1; - height: 10px; -}`,ty=Ht("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${e=>e.primary||"#61d345"}; - position: relative; - transform: rotate(45deg); - - animation: ${bg} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - &:after { - content: ''; - box-sizing: border-box; - animation: ${ey} 0.2s ease-out forwards; - opacity: 0; - animation-delay: 200ms; - position: absolute; - border-right: 2px solid; - border-bottom: 2px solid; - border-color: ${e=>e.secondary||"#fff"}; - bottom: 6px; - left: 6px; - height: 10px; - width: 6px; - } -`,ny=Ht("div")` - position: absolute; -`,ry=Ht("div")` - position: relative; - display: flex; - justify-content: center; - align-items: center; - min-width: 20px; - min-height: 20px; -`,ly=ht` -from { - transform: scale(0.6); - opacity: 0.4; -} -to { - transform: scale(1); - opacity: 1; -}`,oy=Ht("div")` - position: relative; - transform: scale(0.6); - opacity: 0.4; - min-width: 20px; - animation: ${ly} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; -`,iy=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?E.createElement(oy,null,t):t:n==="blank"?null:E.createElement(ry,null,E.createElement(Zg,{...r}),n!=="loading"&&E.createElement(ny,null,n==="error"?E.createElement(Yg,{...r}):E.createElement(ty,{...r})))},sy=e=>` -0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} -100% {transform: translate3d(0,0,0) scale(1); opacity:1;} -`,uy=e=>` -0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} -100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} -`,ay="0%{opacity:0;} 100%{opacity:1;}",cy="0%{opacity:1;} 100%{opacity:0;}",fy=Ht("div")` - display: flex; - align-items: center; - background: #fff; - color: #363636; - line-height: 1.3; - will-change: transform; - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); - max-width: 350px; - pointer-events: auto; - padding: 8px 10px; - border-radius: 8px; -`,dy=Ht("div")` - display: flex; - justify-content: center; - margin: 4px 10px; - color: inherit; - flex: 1 1 auto; - white-space: pre-line; -`,py=(e,t)=>{let n=e.includes("top")?1:-1,[r,l]=xd()?[ay,cy]:[sy(n),uy(n)];return{animation:t?`${ht(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${ht(l)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},hy=E.memo(({toast:e,position:t,style:n,children:r})=>{let l=e.height?py(e.position||t||"top-center",e.visible):{opacity:0},o=E.createElement(iy,{toast:e}),i=E.createElement(dy,{...e.ariaProps},Zl(e.message,e));return E.createElement(fy,{className:e.className,style:{...l,...n,...e.style}},typeof r=="function"?r({icon:o,message:i}):E.createElement(E.Fragment,null,o,i))});Fg(E.createElement);var my=({id:e,className:t,style:n,onHeightUpdate:r,children:l})=>{let o=E.useCallback(i=>{if(i){let s=()=>{let u=i.getBoundingClientRect().height;r(e,u)};s(),new MutationObserver(s).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return E.createElement("div",{ref:o,className:t,style:n},l)},gy=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},l=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:xd()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...l}},yy=vo` - z-index: 9999; - > * { - pointer-events: auto; - } -`,al=16,vy=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:l,toasterId:o,containerStyle:i,containerClassName:s})=>{let{toasts:u,handlers:a}=Kg(n,o);return E.createElement("div",{"data-rht-toaster":o||"",style:{position:"fixed",zIndex:9999,top:al,left:al,right:al,bottom:al,pointerEvents:"none",...i},className:s,onMouseEnter:a.startPause,onMouseLeave:a.endPause},u.map(c=>{let f=c.position||t,m=a.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),S=gy(f,m);return E.createElement(my,{id:c.id,key:c.id,onHeightUpdate:a.updateHeight,className:c.visible?yy:"",style:S},c.type==="custom"?Zl(c.message,c):l?l(c):E.createElement(hy,{toast:c,position:f}))}))},Zo=ee;const wy="modulepreload",Sy=function(e){return"/"+e},La={},an=function(t,n,r){let l=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),s=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));l=Promise.allSettled(n.map(u=>{if(u=Sy(u),u in La)return;La[u]=!0;const a=u.endsWith(".css"),c=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const f=document.createElement("link");if(f.rel=a?"stylesheet":wy,a||(f.as="script"),f.crossOrigin="",f.href=u,s&&f.setAttribute("nonce",s),document.head.appendChild(f),a)return new Promise((m,S)=>{f.addEventListener("load",m),f.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return l.then(i=>{for(const s of i||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})};function Pd(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ey}=Object.prototype,{getPrototypeOf:su}=Object,{iterator:So,toStringTag:Nd}=Symbol,Eo=(e=>t=>{const n=Ey.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Xe=e=>(e=e.toLowerCase(),t=>Eo(t)===e),xo=e=>t=>typeof t===e,{isArray:Qn}=Array,Mn=xo("undefined");function Mr(e){return e!==null&&!Mn(e)&&e.constructor!==null&&!Mn(e.constructor)&&Ce(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Od=Xe("ArrayBuffer");function xy(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Od(e.buffer),t}const ky=xo("string"),Ce=xo("function"),Td=xo("number"),$r=e=>e!==null&&typeof e=="object",Cy=e=>e===!0||e===!1,Cl=e=>{if(Eo(e)!=="object")return!1;const t=su(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Nd in e)&&!(So in e)},_y=e=>{if(!$r(e)||Mr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ry=Xe("Date"),Py=Xe("File"),Ny=e=>!!(e&&typeof e.uri<"u"),Oy=e=>e&&typeof e.getParts<"u",Ty=Xe("Blob"),Ly=Xe("FileList"),jy=e=>$r(e)&&Ce(e.pipe);function zy(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ja=zy(),za=typeof ja.FormData<"u"?ja.FormData:void 0,Ay=e=>{let t;return e&&(za&&e instanceof za||Ce(e.append)&&((t=Eo(e))==="formdata"||t==="object"&&Ce(e.toString)&&e.toString()==="[object FormData]"))},Iy=Xe("URLSearchParams"),[Dy,Fy,Uy,My]=["ReadableStream","Request","Response","Headers"].map(Xe),$y=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Br(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,l;if(typeof e!="object"&&(e=[e]),Qn(e))for(r=0,l=e.length;r0;)if(l=n[r],t===l.toLowerCase())return l;return null}const Xt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jd=e=>!Mn(e)&&e!==Xt;function ns(){const{caseless:e,skipUndefined:t}=jd(this)&&this||{},n={},r=(l,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=e&&Ld(n,o)||o;Cl(n[i])&&Cl(l)?n[i]=ns(n[i],l):Cl(l)?n[i]=ns({},l):Qn(l)?n[i]=l.slice():(!t||!Mn(l))&&(n[i]=l)};for(let l=0,o=arguments.length;l(Br(t,(l,o)=>{n&&Ce(l)?Object.defineProperty(e,o,{value:Pd(l,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:l,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Hy=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Vy=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Wy=(e,t,n,r)=>{let l,o,i;const s={};if(t=t||{},e==null)return t;do{for(l=Object.getOwnPropertyNames(e),o=l.length;o-- >0;)i=l[o],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&su(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Qy=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ky=e=>{if(!e)return null;if(Qn(e))return e;let t=e.length;if(!Td(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},qy=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&su(Uint8Array)),Jy=(e,t)=>{const r=(e&&e[So]).call(e);let l;for(;(l=r.next())&&!l.done;){const o=l.value;t.call(e,o[0],o[1])}},Xy=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Yy=Xe("HTMLFormElement"),Gy=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,l){return r.toUpperCase()+l}),Aa=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Zy=Xe("RegExp"),zd=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Br(n,(l,o)=>{let i;(i=t(l,o,e))!==!1&&(r[o]=i||l)}),Object.defineProperties(e,r)},by=e=>{zd(e,(t,n)=>{if(Ce(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ce(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ev=(e,t)=>{const n={},r=l=>{l.forEach(o=>{n[o]=!0})};return Qn(e)?r(e):r(String(e).split(t)),n},tv=()=>{},nv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function rv(e){return!!(e&&Ce(e.append)&&e[Nd]==="FormData"&&e[So])}const lv=e=>{const t=new Array(10),n=(r,l)=>{if($r(r)){if(t.indexOf(r)>=0)return;if(Mr(r))return r;if(!("toJSON"in r)){t[l]=r;const o=Qn(r)?[]:{};return Br(r,(i,s)=>{const u=n(i,l+1);!Mn(u)&&(o[s]=u)}),t[l]=void 0,o}}return r};return n(e,0)},ov=Xe("AsyncFunction"),iv=e=>e&&($r(e)||Ce(e))&&Ce(e.then)&&Ce(e.catch),Ad=((e,t)=>e?setImmediate:t?((n,r)=>(Xt.addEventListener("message",({source:l,data:o})=>{l===Xt&&o===n&&r.length&&r.shift()()},!1),l=>{r.push(l),Xt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ce(Xt.postMessage)),sv=typeof queueMicrotask<"u"?queueMicrotask.bind(Xt):typeof process<"u"&&process.nextTick||Ad,uv=e=>e!=null&&Ce(e[So]),v={isArray:Qn,isArrayBuffer:Od,isBuffer:Mr,isFormData:Ay,isArrayBufferView:xy,isString:ky,isNumber:Td,isBoolean:Cy,isObject:$r,isPlainObject:Cl,isEmptyObject:_y,isReadableStream:Dy,isRequest:Fy,isResponse:Uy,isHeaders:My,isUndefined:Mn,isDate:Ry,isFile:Py,isReactNativeBlob:Ny,isReactNative:Oy,isBlob:Ty,isRegExp:Zy,isFunction:Ce,isStream:jy,isURLSearchParams:Iy,isTypedArray:qy,isFileList:Ly,forEach:Br,merge:ns,extend:By,trim:$y,stripBOM:Hy,inherits:Vy,toFlatObject:Wy,kindOf:Eo,kindOfTest:Xe,endsWith:Qy,toArray:Ky,forEachEntry:Jy,matchAll:Xy,isHTMLForm:Yy,hasOwnProperty:Aa,hasOwnProp:Aa,reduceDescriptors:zd,freezeMethods:by,toObjectSet:ev,toCamelCase:Gy,noop:tv,toFiniteNumber:nv,findKey:Ld,global:Xt,isContextDefined:jd,isSpecCompliantForm:rv,toJSONObject:lv,isAsyncFn:ov,isThenable:iv,setImmediate:Ad,asap:sv,isIterable:uv};let L=class Id extends Error{static from(t,n,r,l,o,i){const s=new Id(t.message,n||t.code,r,l,o);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),i&&Object.assign(s,i),s}constructor(t,n,r,l,o){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),l&&(this.request=l),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:v.toJSONObject(this.config),code:this.code,status:this.status}}};L.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";L.ERR_BAD_OPTION="ERR_BAD_OPTION";L.ECONNABORTED="ECONNABORTED";L.ETIMEDOUT="ETIMEDOUT";L.ERR_NETWORK="ERR_NETWORK";L.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";L.ERR_DEPRECATED="ERR_DEPRECATED";L.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";L.ERR_BAD_REQUEST="ERR_BAD_REQUEST";L.ERR_CANCELED="ERR_CANCELED";L.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";L.ERR_INVALID_URL="ERR_INVALID_URL";const av=null;function rs(e){return v.isPlainObject(e)||v.isArray(e)}function Dd(e){return v.endsWith(e,"[]")?e.slice(0,-2):e}function bo(e,t,n){return e?e.concat(t).map(function(l,o){return l=Dd(l),!n&&o?"["+l+"]":l}).join(n?".":""):t}function cv(e){return v.isArray(e)&&!e.some(rs)}const fv=v.toFlatObject(v,{},null,function(t){return/^is[A-Z]/.test(t)});function ko(e,t,n){if(!v.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=v.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,w){return!v.isUndefined(w[y])});const r=n.metaTokens,l=n.visitor||c,o=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&v.isSpecCompliantForm(t);if(!v.isFunction(l))throw new TypeError("visitor must be a function");function a(g){if(g===null)return"";if(v.isDate(g))return g.toISOString();if(v.isBoolean(g))return g.toString();if(!u&&v.isBlob(g))throw new L("Blob is not supported. Use a Buffer instead.");return v.isArrayBuffer(g)||v.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,y,w){let p=g;if(v.isReactNative(t)&&v.isReactNativeBlob(g))return t.append(bo(w,y,o),a(g)),!1;if(g&&!w&&typeof g=="object"){if(v.endsWith(y,"{}"))y=r?y:y.slice(0,-2),g=JSON.stringify(g);else if(v.isArray(g)&&cv(g)||(v.isFileList(g)||v.endsWith(y,"[]"))&&(p=v.toArray(g)))return y=Dd(y),p.forEach(function(h,x){!(v.isUndefined(h)||h===null)&&t.append(i===!0?bo([y],x,o):i===null?y:y+"[]",a(h))}),!1}return rs(g)?!0:(t.append(bo(w,y,o),a(g)),!1)}const f=[],m=Object.assign(fv,{defaultVisitor:c,convertValue:a,isVisitable:rs});function S(g,y){if(!v.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(g),v.forEach(g,function(p,d){(!(v.isUndefined(p)||p===null)&&l.call(t,p,v.isString(d)?d.trim():d,y,m))===!0&&S(p,y?y.concat(d):[d])}),f.pop()}}if(!v.isObject(e))throw new TypeError("data must be an object");return S(e),t}function Ia(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function uu(e,t){this._pairs=[],e&&ko(e,this,t)}const Fd=uu.prototype;Fd.append=function(t,n){this._pairs.push([t,n])};Fd.toString=function(t){const n=t?function(r){return t.call(this,r,Ia)}:Ia;return this._pairs.map(function(l){return n(l[0])+"="+n(l[1])},"").join("&")};function dv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ud(e,t,n){if(!t)return e;const r=n&&n.encode||dv,l=v.isFunction(n)?{serialize:n}:n,o=l&&l.serialize;let i;if(o?i=o(t,l):i=v.isURLSearchParams(t)?t.toString():new uu(t,l).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Da{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){v.forEach(this.handlers,function(r){r!==null&&t(r)})}}const au={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},pv=typeof URLSearchParams<"u"?URLSearchParams:uu,hv=typeof FormData<"u"?FormData:null,mv=typeof Blob<"u"?Blob:null,gv={isBrowser:!0,classes:{URLSearchParams:pv,FormData:hv,Blob:mv},protocols:["http","https","file","blob","url","data"]},cu=typeof window<"u"&&typeof document<"u",ls=typeof navigator=="object"&&navigator||void 0,yv=cu&&(!ls||["ReactNative","NativeScript","NS"].indexOf(ls.product)<0),vv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wv=cu&&window.location.href||"http://localhost",Sv=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:cu,hasStandardBrowserEnv:yv,hasStandardBrowserWebWorkerEnv:vv,navigator:ls,origin:wv},Symbol.toStringTag,{value:"Module"})),fe={...Sv,...gv};function Ev(e,t){return ko(e,new fe.classes.URLSearchParams,{visitor:function(n,r,l,o){return fe.isNode&&v.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function xv(e){return v.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kv(e){const t={},n=Object.keys(e);let r;const l=n.length;let o;for(r=0;r=n.length;return i=!i&&v.isArray(l)?l.length:i,u?(v.hasOwnProp(l,i)?l[i]=[l[i],r]:l[i]=r,!s):((!l[i]||!v.isObject(l[i]))&&(l[i]=[]),t(n,r,l[i],o)&&v.isArray(l[i])&&(l[i]=kv(l[i])),!s)}if(v.isFormData(e)&&v.isFunction(e.entries)){const n={};return v.forEachEntry(e,(r,l)=>{t(xv(r),l,n,0)}),n}return null}function Cv(e,t,n){if(v.isString(e))try{return(t||JSON.parse)(e),v.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Hr={transitional:au,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",l=r.indexOf("application/json")>-1,o=v.isObject(t);if(o&&v.isHTMLForm(t)&&(t=new FormData(t)),v.isFormData(t))return l?JSON.stringify(Md(t)):t;if(v.isArrayBuffer(t)||v.isBuffer(t)||v.isStream(t)||v.isFile(t)||v.isBlob(t)||v.isReadableStream(t))return t;if(v.isArrayBufferView(t))return t.buffer;if(v.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ev(t,this.formSerializer).toString();if((s=v.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return ko(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||l?(n.setContentType("application/json",!1),Cv(t)):t}],transformResponse:[function(t){const n=this.transitional||Hr.transitional,r=n&&n.forcedJSONParsing,l=this.responseType==="json";if(v.isResponse(t)||v.isReadableStream(t))return t;if(t&&v.isString(t)&&(r&&!this.responseType||l)){const i=!(n&&n.silentJSONParsing)&&l;try{return JSON.parse(t,this.parseReviver)}catch(s){if(i)throw s.name==="SyntaxError"?L.from(s,L.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};v.forEach(["delete","get","head","post","put","patch"],e=>{Hr.headers[e]={}});const _v=v.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rv=e=>{const t={};let n,r,l;return e&&e.split(` -`).forEach(function(i){l=i.indexOf(":"),n=i.substring(0,l).trim().toLowerCase(),r=i.substring(l+1).trim(),!(!n||t[n]&&_v[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Fa=Symbol("internals");function er(e){return e&&String(e).trim().toLowerCase()}function _l(e){return e===!1||e==null?e:v.isArray(e)?e.map(_l):String(e)}function Pv(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Nv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ei(e,t,n,r,l){if(v.isFunction(r))return r.call(this,t,n);if(l&&(t=n),!!v.isString(t)){if(v.isString(r))return t.indexOf(r)!==-1;if(v.isRegExp(r))return r.test(t)}}function Ov(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Tv(e,t){const n=v.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(l,o,i){return this[r].call(this,t,l,o,i)},configurable:!0})})}let _e=class{constructor(t){t&&this.set(t)}set(t,n,r){const l=this;function o(s,u,a){const c=er(u);if(!c)throw new Error("header name must be a non-empty string");const f=v.findKey(l,c);(!f||l[f]===void 0||a===!0||a===void 0&&l[f]!==!1)&&(l[f||u]=_l(s))}const i=(s,u)=>v.forEach(s,(a,c)=>o(a,c,u));if(v.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(v.isString(t)&&(t=t.trim())&&!Nv(t))i(Rv(t),n);else if(v.isObject(t)&&v.isIterable(t)){let s={},u,a;for(const c of t){if(!v.isArray(c))throw TypeError("Object iterator must return a key-value pair");s[a=c[0]]=(u=s[a])?v.isArray(u)?[...u,c[1]]:[u,c[1]]:c[1]}i(s,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=er(t),t){const r=v.findKey(this,t);if(r){const l=this[r];if(!n)return l;if(n===!0)return Pv(l);if(v.isFunction(n))return n.call(this,l,r);if(v.isRegExp(n))return n.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=er(t),t){const r=v.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ei(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let l=!1;function o(i){if(i=er(i),i){const s=v.findKey(r,i);s&&(!n||ei(r,r[s],s,n))&&(delete r[s],l=!0)}}return v.isArray(t)?t.forEach(o):o(t),l}clear(t){const n=Object.keys(this);let r=n.length,l=!1;for(;r--;){const o=n[r];(!t||ei(this,this[o],o,t,!0))&&(delete this[o],l=!0)}return l}normalize(t){const n=this,r={};return v.forEach(this,(l,o)=>{const i=v.findKey(r,o);if(i){n[i]=_l(l),delete n[o];return}const s=t?Ov(o):String(o).trim();s!==o&&delete n[o],n[s]=_l(l),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return v.forEach(this,(r,l)=>{r!=null&&r!==!1&&(n[l]=t&&v.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(l=>r.set(l)),r}static accessor(t){const r=(this[Fa]=this[Fa]={accessors:{}}).accessors,l=this.prototype;function o(i){const s=er(i);r[s]||(Tv(l,i),r[s]=!0)}return v.isArray(t)?t.forEach(o):o(t),this}};_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);v.reduceDescriptors(_e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});v.freezeMethods(_e);function ti(e,t){const n=this||Hr,r=t||n,l=_e.from(r.headers);let o=r.data;return v.forEach(e,function(s){o=s.call(n,o,l.normalize(),t?t.status:void 0)}),l.normalize(),o}function $d(e){return!!(e&&e.__CANCEL__)}let Vr=class extends L{constructor(t,n,r){super(t??"canceled",L.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Bd(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new L("Request failed with status code "+n.status,[L.ERR_BAD_REQUEST,L.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lv(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function jv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let l=0,o=0,i;return t=t!==void 0?t:1e3,function(u){const a=Date.now(),c=r[o];i||(i=a),n[l]=u,r[l]=a;let f=o,m=0;for(;f!==l;)m+=n[f++],f=f%e;if(l=(l+1)%e,l===o&&(o=(o+1)%e),a-i{n=c,l=null,o&&(clearTimeout(o),o=null),e(...a)};return[(...a)=>{const c=Date.now(),f=c-n;f>=r?i(a,c):(l=a,o||(o=setTimeout(()=>{o=null,i(l)},r-f)))},()=>l&&i(l)]}const bl=(e,t,n=3)=>{let r=0;const l=jv(50,250);return zv(o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=i-r,a=l(u),c=i<=s;r=i;const f={loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:a||void 0,estimated:a&&s&&c?(s-i)/a:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},Ua=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ma=e=>(...t)=>v.asap(()=>e(...t)),Av=fe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,fe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Iv=fe.hasStandardBrowserEnv?{write(e,t,n,r,l,o,i){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];v.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),v.isString(r)&&s.push(`path=${r}`),v.isString(l)&&s.push(`domain=${l}`),o===!0&&s.push("secure"),v.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Dv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Fv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Hd(e,t,n){let r=!Dv(t);return e&&(r||n==!1)?Fv(e,t):t}const $a=e=>e instanceof _e?{...e}:e;function ln(e,t){t=t||{};const n={};function r(a,c,f,m){return v.isPlainObject(a)&&v.isPlainObject(c)?v.merge.call({caseless:m},a,c):v.isPlainObject(c)?v.merge({},c):v.isArray(c)?c.slice():c}function l(a,c,f,m){if(v.isUndefined(c)){if(!v.isUndefined(a))return r(void 0,a,f,m)}else return r(a,c,f,m)}function o(a,c){if(!v.isUndefined(c))return r(void 0,c)}function i(a,c){if(v.isUndefined(c)){if(!v.isUndefined(a))return r(void 0,a)}else return r(void 0,c)}function s(a,c,f){if(f in t)return r(a,c);if(f in e)return r(void 0,a)}const u={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(a,c,f)=>l($a(a),$a(c),f,!0)};return v.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const f=v.hasOwnProp(u,c)?u[c]:l,m=f(e[c],t[c],c);v.isUndefined(m)&&f!==s||(n[c]=m)}),n}const Vd=e=>{const t=ln({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:o,headers:i,auth:s}=t;if(t.headers=i=_e.from(i),t.url=Ud(Hd(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),v.isFormData(n)){if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(v.isFunction(n.getHeaders)){const u=n.getHeaders(),a=["content-type","content-length"];Object.entries(u).forEach(([c,f])=>{a.includes(c.toLowerCase())&&i.set(c,f)})}}if(fe.hasStandardBrowserEnv&&(r&&v.isFunction(r)&&(r=r(t)),r||r!==!1&&Av(t.url))){const u=l&&o&&Iv.read(o);u&&i.set(l,u)}return t},Uv=typeof XMLHttpRequest<"u",Mv=Uv&&function(e){return new Promise(function(n,r){const l=Vd(e);let o=l.data;const i=_e.from(l.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:a}=l,c,f,m,S,g;function y(){S&&S(),g&&g(),l.cancelToken&&l.cancelToken.unsubscribe(c),l.signal&&l.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(l.method.toUpperCase(),l.url,!0),w.timeout=l.timeout;function p(){if(!w)return;const h=_e.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:h,config:e,request:w};Bd(function(P){n(P),y()},function(P){r(P),y()},C),w=null}"onloadend"in w?w.onloadend=p:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(p)},w.onabort=function(){w&&(r(new L("Request aborted",L.ECONNABORTED,e,w)),w=null)},w.onerror=function(x){const C=x&&x.message?x.message:"Network Error",O=new L(C,L.ERR_NETWORK,e,w);O.event=x||null,r(O),w=null},w.ontimeout=function(){let x=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const C=l.transitional||au;l.timeoutErrorMessage&&(x=l.timeoutErrorMessage),r(new L(x,C.clarifyTimeoutError?L.ETIMEDOUT:L.ECONNABORTED,e,w)),w=null},o===void 0&&i.setContentType(null),"setRequestHeader"in w&&v.forEach(i.toJSON(),function(x,C){w.setRequestHeader(C,x)}),v.isUndefined(l.withCredentials)||(w.withCredentials=!!l.withCredentials),s&&s!=="json"&&(w.responseType=l.responseType),a&&([m,g]=bl(a,!0),w.addEventListener("progress",m)),u&&w.upload&&([f,S]=bl(u),w.upload.addEventListener("progress",f),w.upload.addEventListener("loadend",S)),(l.cancelToken||l.signal)&&(c=h=>{w&&(r(!h||h.type?new Vr(null,e,w):h),w.abort(),w=null)},l.cancelToken&&l.cancelToken.subscribe(c),l.signal&&(l.signal.aborted?c():l.signal.addEventListener("abort",c)));const d=Lv(l.url);if(d&&fe.protocols.indexOf(d)===-1){r(new L("Unsupported protocol "+d+":",L.ERR_BAD_REQUEST,e));return}w.send(o||null)})},$v=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,l;const o=function(a){if(!l){l=!0,s();const c=a instanceof Error?a:this.reason;r.abort(c instanceof L?c:new Vr(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,o(new L(`timeout of ${t}ms exceeded`,L.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(a=>{a.unsubscribe?a.unsubscribe(o):a.removeEventListener("abort",o)}),e=null)};e.forEach(a=>a.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>v.asap(s),u}},Bv=function*(e,t){let n=e.byteLength;if(n{const l=Hv(e,t);let o=0,i,s=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:a,value:c}=await l.next();if(a){s(),u.close();return}let f=c.byteLength;if(n){let m=o+=f;n(m)}u.enqueue(new Uint8Array(c))}catch(a){throw s(a),a}},cancel(u){return s(u),l.return()}},{highWaterMark:2})},Ha=64*1024,{isFunction:cl}=v,Wv=(({Request:e,Response:t})=>({Request:e,Response:t}))(v.global),{ReadableStream:Va,TextEncoder:Wa}=v.global,Qa=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Qv=e=>{e=v.merge.call({skipUndefined:!0},Wv,e);const{fetch:t,Request:n,Response:r}=e,l=t?cl(t):typeof fetch=="function",o=cl(n),i=cl(r);if(!l)return!1;const s=l&&cl(Va),u=l&&(typeof Wa=="function"?(g=>y=>g.encode(y))(new Wa):async g=>new Uint8Array(await new n(g).arrayBuffer())),a=o&&s&&Qa(()=>{let g=!1;const y=new n(fe.origin,{body:new Va,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!y}),c=i&&s&&Qa(()=>v.isReadableStream(new r("").body)),f={stream:c&&(g=>g.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!f[g]&&(f[g]=(y,w)=>{let p=y&&y[g];if(p)return p.call(y);throw new L(`Response type '${g}' is not supported`,L.ERR_NOT_SUPPORT,w)})});const m=async g=>{if(g==null)return 0;if(v.isBlob(g))return g.size;if(v.isSpecCompliantForm(g))return(await new n(fe.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(v.isArrayBufferView(g)||v.isArrayBuffer(g))return g.byteLength;if(v.isURLSearchParams(g)&&(g=g+""),v.isString(g))return(await u(g)).byteLength},S=async(g,y)=>{const w=v.toFiniteNumber(g.getContentLength());return w??m(y)};return async g=>{let{url:y,method:w,data:p,signal:d,cancelToken:h,timeout:x,onDownloadProgress:C,onUploadProgress:O,responseType:P,headers:T,withCredentials:M="same-origin",fetchOptions:A}=Vd(g),ve=t||fetch;P=P?(P+"").toLowerCase():"text";let Ye=$v([d,h&&h.toAbortSignal()],x),$e=null;const Ge=Ye&&Ye.unsubscribe&&(()=>{Ye.unsubscribe()});let Wr;try{if(O&&a&&w!=="get"&&w!=="head"&&(Wr=await S(T,p))!==0){let F=new n(y,{method:"POST",body:p,duplex:"half"}),B;if(v.isFormData(p)&&(B=F.headers.get("content-type"))&&T.setContentType(B),F.body){const[yt,je]=Ua(Wr,bl(Ma(O)));p=Ba(F.body,Ha,yt,je)}}v.isString(M)||(M=M?"include":"omit");const ne=o&&"credentials"in n.prototype,cn={...A,signal:Ye,method:w.toUpperCase(),headers:T.normalize().toJSON(),body:p,duplex:"half",credentials:ne?M:void 0};$e=o&&new n(y,cn);let _=await(o?ve($e,A):ve(y,cn));const j=c&&(P==="stream"||P==="response");if(c&&(C||j&&Ge)){const F={};["status","statusText","headers"].forEach(fn=>{F[fn]=_[fn]});const B=v.toFiniteNumber(_.headers.get("content-length")),[yt,je]=C&&Ua(B,bl(Ma(C),!0))||[];_=new r(Ba(_.body,Ha,yt,()=>{je&&je(),Ge&&Ge()}),F)}P=P||"text";let z=await f[v.findKey(f,P)||"text"](_,g);return!j&&Ge&&Ge(),await new Promise((F,B)=>{Bd(F,B,{data:z,headers:_e.from(_.headers),status:_.status,statusText:_.statusText,config:g,request:$e})})}catch(ne){throw Ge&&Ge(),ne&&ne.name==="TypeError"&&/Load failed|fetch/i.test(ne.message)?Object.assign(new L("Network Error",L.ERR_NETWORK,g,$e,ne&&ne.response),{cause:ne.cause||ne}):L.from(ne,ne&&ne.code,g,$e,ne&&ne.response)}}},Kv=new Map,Wd=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:l}=t,o=[r,l,n];let i=o.length,s=i,u,a,c=Kv;for(;s--;)u=o[s],a=c.get(u),a===void 0&&c.set(u,a=s?new Map:Qv(t)),c=a;return a};Wd();const fu={http:av,xhr:Mv,fetch:{get:Wd}};v.forEach(fu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ka=e=>`- ${e}`,qv=e=>v.isFunction(e)||e===null||e===!1;function Jv(e,t){e=v.isArray(e)?e:[e];const{length:n}=e;let r,l;const o={};for(let i=0;i`adapter ${u} `+(a===!1?"is not supported by the environment":"is not available in the build"));let s=n?i.length>1?`since : -`+i.map(Ka).join(` -`):" "+Ka(i[0]):"as no adapter specified";throw new L("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return l}const Qd={getAdapter:Jv,adapters:fu};function ni(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vr(null,e)}function qa(e){return ni(e),e.headers=_e.from(e.headers),e.data=ti.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Qd.getAdapter(e.adapter||Hr.adapter,e)(e).then(function(r){return ni(e),r.data=ti.call(e,e.transformResponse,r),r.headers=_e.from(r.headers),r},function(r){return $d(r)||(ni(e),r&&r.response&&(r.response.data=ti.call(e,e.transformResponse,r.response),r.response.headers=_e.from(r.response.headers))),Promise.reject(r)})}const Kd="1.13.6",Co={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Co[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ja={};Co.transitional=function(t,n,r){function l(o,i){return"[Axios v"+Kd+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,s)=>{if(t===!1)throw new L(l(i," has been removed"+(n?" in "+n:"")),L.ERR_DEPRECATED);return n&&!Ja[i]&&(Ja[i]=!0,console.warn(l(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,s):!0}};Co.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Xv(e,t,n){if(typeof e!="object")throw new L("options must be an object",L.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let l=r.length;for(;l-- >0;){const o=r[l],i=t[o];if(i){const s=e[o],u=s===void 0||i(s,o,e);if(u!==!0)throw new L("option "+o+" must be "+u,L.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new L("Unknown option "+o,L.ERR_BAD_OPTION)}}const Rl={assertOptions:Xv,validators:Co},ze=Rl.validators;let Zt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Da,response:new Da}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const o=l.stack?l.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ln(this.defaults,n);const{transitional:r,paramsSerializer:l,headers:o}=n;r!==void 0&&Rl.assertOptions(r,{silentJSONParsing:ze.transitional(ze.boolean),forcedJSONParsing:ze.transitional(ze.boolean),clarifyTimeoutError:ze.transitional(ze.boolean),legacyInterceptorReqResOrdering:ze.transitional(ze.boolean)},!1),l!=null&&(v.isFunction(l)?n.paramsSerializer={serialize:l}:Rl.assertOptions(l,{encode:ze.function,serialize:ze.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Rl.assertOptions(n,{baseUrl:ze.spelling("baseURL"),withXsrfToken:ze.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&v.merge(o.common,o[n.method]);o&&v.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=_e.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(n)===!1)return;u=u&&y.synchronous;const w=n.transitional||au;w&&w.legacyInterceptorReqResOrdering?s.unshift(y.fulfilled,y.rejected):s.push(y.fulfilled,y.rejected)});const a=[];this.interceptors.response.forEach(function(y){a.push(y.fulfilled,y.rejected)});let c,f=0,m;if(!u){const g=[qa.bind(this),void 0];for(g.unshift(...s),g.push(...a),m=g.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](l);r._listeners=null}),this.promise.then=l=>{let o;const i=new Promise(s=>{r.subscribe(s),o=s}).then(l);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,s){r.reason||(r.reason=new Vr(o,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new qd(function(l){t=l}),cancel:t}}};function Gv(e){return function(n){return e.apply(null,n)}}function Zv(e){return v.isObject(e)&&e.isAxiosError===!0}const os={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(os).forEach(([e,t])=>{os[t]=e});function Jd(e){const t=new Zt(e),n=Pd(Zt.prototype.request,t);return v.extend(n,Zt.prototype,t,{allOwnKeys:!0}),v.extend(n,t,null,{allOwnKeys:!0}),n.create=function(l){return Jd(ln(e,l))},n}const G=Jd(Hr);G.Axios=Zt;G.CanceledError=Vr;G.CancelToken=Yv;G.isCancel=$d;G.VERSION=Kd;G.toFormData=ko;G.AxiosError=L;G.Cancel=G.CanceledError;G.all=function(t){return Promise.all(t)};G.spread=Gv;G.isAxiosError=Zv;G.mergeConfig=ln;G.AxiosHeaders=_e;G.formToJSON=e=>Md(v.isHTMLForm(e)?new FormData(e):e);G.getAdapter=Qd.getAdapter;G.HttpStatusCode=os;G.default=G;const{Axios:E0,AxiosError:x0,CanceledError:k0,isCancel:C0,CancelToken:_0,VERSION:R0,all:P0,Cancel:N0,isAxiosError:O0,spread:T0,toFormData:L0,AxiosHeaders:j0,HttpStatusCode:z0,formToJSON:A0,getAdapter:I0,mergeConfig:D0}=G,F0=5e5,pe=G.create({baseURL:"",timeout:3e4,withCredentials:!0,headers:{"Content-Type":"application/json"}});pe.interceptors.request.use(e=>{const t=localStorage.getItem("dist_user_id");return t&&(e.headers["New-Api-User"]=t),e});pe.interceptors.response.use(e=>(e.data&&e.data.success===!1&&e.data.message&&Zo.error(e.data.message),e),e=>{var n,r,l;const t=((r=(n=e.response)==null?void 0:n.data)==null?void 0:r.message)||e.message||"Request failed";return((l=e.response)==null?void 0:l.status)===401?(localStorage.removeItem("dist_user_id"),window.dispatchEvent(new Event("auth:logout")),Zo.error("Session expired, please log in again")):Zo.error(t),Promise.reject(e)});const bv=()=>pe.get("/api/dist/site/info"),U0=()=>pe.get("/api/dist/site/models"),M0=()=>pe.get("/api/dist/site/packages"),e0=e=>pe.post("/api/dist/user/register",e),t0=e=>pe.post("/api/dist/user/login",e),n0=()=>pe.post("/api/dist/user/logout"),ri=()=>pe.get("/api/dist/user/self"),$0=()=>pe.get("/api/dist/user/usage"),B0=()=>pe.get("/api/dist/token/list"),H0=e=>pe.post("/api/dist/token/create",e),V0=(e,t)=>pe.put(`/api/dist/token/${e}`,t),W0=e=>pe.delete(`/api/dist/token/${e}`),Q0=e=>pe.post("/api/dist/topup/redeem",{key:e}),K0=e=>pe.post("/api/dist/package/subscribe",{package_id:e}),Xd=E.createContext(null);function r0({children:e}){const[t,n]=E.useState(null),[r,l]=E.useState(!0),o=E.useCallback(async()=>{try{const a=await ri();if(a.data.success)return n(a.data.data),a.data.data}catch{}return null},[]);E.useEffect(()=>{localStorage.getItem("dist_user_id")?ri().then(c=>{c.data.success?n(c.data.data):localStorage.removeItem("dist_user_id")}).catch(()=>{localStorage.removeItem("dist_user_id")}).finally(()=>l(!1)):l(!1)},[]),E.useEffect(()=>{const a=()=>{n(null)};return window.addEventListener("auth:logout",a),()=>window.removeEventListener("auth:logout",a)},[]);const i=E.useCallback(async(a,c)=>{const f=await t0({username:a,password:c});if(f.data.success){const m=f.data.data;m!=null&&m.id&&localStorage.setItem("dist_user_id",String(m.id));const S=await ri();return S.data.success?n(S.data.data):n(m),{success:!0}}return{success:!1,message:f.data.message}},[]),s=E.useCallback(async a=>{const c=await e0(a);return c.data.success?{success:!0,needsLogin:!0}:{success:!1,message:c.data.message}},[]),u=E.useCallback(async()=>{try{await n0()}catch{}localStorage.removeItem("dist_user_id"),n(null)},[]);return R.jsx(Xd.Provider,{value:{user:t,loading:r,login:i,register:s,logout:u,refreshUser:o},children:e})}function Yd(){const e=E.useContext(Xd);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}const Gd=E.createContext(null);function l0({children:e}){const[t,n]=E.useState(null),[r,l]=E.useState(!0);return E.useEffect(()=>{bv().then(o=>{var i,s;if(o.data.success&&(n(o.data.data),(i=o.data.data)!=null&&i.name&&(document.title=o.data.data.name),(s=o.data.data)!=null&&s.favicon)){const u=document.querySelector("link[rel~='icon']")||document.createElement("link");u.rel="icon",u.href=o.data.data.favicon,document.head.appendChild(u)}}).catch(()=>{}).finally(()=>l(!1))},[]),R.jsx(Gd.Provider,{value:{site:t,loading:r},children:e})}function o0(){const e=E.useContext(Gd);if(!e)throw new Error("useSite must be used within SiteProvider");return e}function i0(){const{user:e,logout:t}=Yd(),{site:n}=o0(),r=ou(),l=un(),[o,i]=E.useState(!1),s=(n==null?void 0:n.name)||"AI Platform",a=[{to:"/",label:"Home",auth:!1},{to:"/pricing",label:"Pricing",auth:!1},{to:"/packages",label:"Packages",auth:!1},{to:"/dashboard",label:"Dashboard",auth:!0},{to:"/tokens",label:"API Keys",auth:!0}].filter(c=>!c.auth||e);return R.jsxs("div",{className:"min-h-screen flex flex-col",children:[(n==null?void 0:n.announcement)&&R.jsx("div",{className:"bg-brand-600/20 border-b border-brand-500/20 text-center py-2 px-4",children:R.jsx("p",{className:"text-sm text-brand-200",children:n.announcement})}),R.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-black/60 border-b border-white/[0.06]",children:[R.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[R.jsxs(pn,{to:"/",className:"flex items-center gap-3 group",children:[n!=null&&n.logo?R.jsx("img",{src:n.logo,alt:s,className:"h-8 w-auto"}):R.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-brand-500 to-purple-600 flex items-center justify-center text-white font-bold text-sm",children:s.charAt(0)}),R.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-brand-400 transition-colors",children:s})]}),R.jsx("nav",{className:"hidden md:flex items-center gap-1",children:a.map(c=>R.jsx(s0,{to:c.to,active:l.pathname===c.to,children:c.label},c.to))}),R.jsxs("div",{className:"flex items-center gap-3",children:[e?R.jsxs("div",{className:"flex items-center gap-3",children:[R.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:e.display_name||e.username}),R.jsx("button",{onClick:async()=>{await t(),r("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:"Logout"})]}):R.jsxs(R.Fragment,{children:[R.jsx(pn,{to:"/login",className:"text-sm text-neutral-300 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:"Login"}),R.jsx(pn,{to:"/register",className:"btn-primary text-sm !px-4 !py-1.5",children:"Sign Up"})]}),R.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>i(!o),"aria-label":"Toggle menu",children:R.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o?R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),o&&R.jsx("div",{className:"md:hidden border-t border-white/[0.06] bg-black/90 backdrop-blur-xl",children:R.jsxs("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:[a.map(c=>R.jsx(pn,{to:c.to,onClick:()=>i(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${l.pathname===c.to?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:c.label},c.to)),!e&&R.jsx(pn,{to:"/login",onClick:()=>i(!1),className:"px-3 py-2 text-sm text-neutral-400 hover:text-white rounded-lg hover:bg-white/5 transition-colors sm:hidden",children:"Login"})]})})]}),R.jsx("main",{className:"flex-1",children:R.jsx(wd,{})}),R.jsx("footer",{className:"border-t border-white/[0.06] mt-auto",children:R.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[R.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",s,"."]}),R.jsx("div",{className:"flex items-center gap-4",children:(n==null?void 0:n.contact_email)&&R.jsx("a",{href:`mailto:${n.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:"Contact"})})]})})]})}function s0({to:e,children:t,active:n}){return R.jsx(pn,{to:e,className:`px-3 py-1.5 text-sm rounded-lg transition-all ${n?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:t})}function u0(){const{user:e,loading:t}=Yd(),n=un();return t?R.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:R.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e?R.jsx(wd,{}):R.jsx(vd,{to:"/login",state:{from:n},replace:!0})}const a0=E.lazy(()=>an(()=>import("./Home-D5xeHSSc.js"),__vite__mapDeps([0,1,2]))),c0=E.lazy(()=>an(()=>import("./Login-BYKZA2hS.js"),[])),f0=E.lazy(()=>an(()=>import("./Register-BQ7Y75Yc.js"),[])),d0=E.lazy(()=>an(()=>import("./Dashboard-Djts405O.js"),__vite__mapDeps([3,2,1]))),p0=E.lazy(()=>an(()=>import("./Tokens-DEPVzOT6.js"),[])),h0=E.lazy(()=>an(()=>import("./Packages-CIW8TdH4.js"),__vite__mapDeps([4,2]))),m0=E.lazy(()=>an(()=>import("./Pricing-GrGWcOkj.js"),[])),g0=()=>R.jsx("div",{className:"flex items-center justify-center min-h-screen",children:R.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})});function y0(){return R.jsx(E.Suspense,{fallback:R.jsx(g0,{}),children:R.jsxs(Sg,{children:[R.jsxs(He,{element:R.jsx(i0,{}),children:[R.jsx(He,{path:"/",element:R.jsx(a0,{})}),R.jsx(He,{path:"/pricing",element:R.jsx(m0,{})}),R.jsx(He,{path:"/packages",element:R.jsx(h0,{})}),R.jsx(He,{path:"/login",element:R.jsx(c0,{})}),R.jsx(He,{path:"/register",element:R.jsx(f0,{})}),R.jsxs(He,{element:R.jsx(u0,{}),children:[R.jsx(He,{path:"/dashboard",element:R.jsx(d0,{})}),R.jsx(He,{path:"/tokens",element:R.jsx(p0,{})})]})]}),R.jsx(He,{path:"*",element:R.jsx(vd,{to:"/",replace:!0})})]})})}li.createRoot(document.getElementById("root")).render(R.jsx(oc.StrictMode,{children:R.jsx(Pg,{children:R.jsx(l0,{children:R.jsxs(r0,{children:[R.jsx(y0,{}),R.jsx(vy,{position:"top-center",toastOptions:{duration:3e3,style:{background:"#1a1a2e",color:"#fff",border:"1px solid rgba(255,255,255,0.08)",borderRadius:"12px",fontSize:"14px"}}})]})})})}));export{pn as L,vd as N,F0 as Q,o0 as a,M0 as b,ou as c,un as d,$0 as e,Q0 as f,U0 as g,B0 as h,H0 as i,R as j,V0 as k,W0 as l,E as r,K0 as s,Yd as u,Zo as z}; diff --git a/dist/assets/index-Drgd7k5E.js b/dist/assets/index-Drgd7k5E.js new file mode 100644 index 0000000..058c6c8 --- /dev/null +++ b/dist/assets/index-Drgd7k5E.js @@ -0,0 +1,249 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-Nw5uuC4J.js","assets/CountUp-Omm8FlHl.js","assets/use-animation-frame-BTI5WVkr.js","assets/proxy-BOtdvQpP.js","assets/SpotlightCard-C_ZqQ-j4.js","assets/useTranslation-B7WzaWp0.js","assets/Layout-CN7Y4VCf.js","assets/Home-Ddxg0eqL.js","assets/Mesh-CwXV3WjE.js","assets/Layout-D6FTlC22.js","assets/Home-CmajF1bj.js","assets/Layout-DmfpAhMt.js","assets/Home-CmqVbe36.js","assets/Layout-CmT_3-Vm.js","assets/Login-D37tx-Co.js","assets/Register-DiQ0J-Zs.js","assets/Dashboard-B4CiAg5B.js","assets/Tokens-C4dgLqWq.js","assets/Packages-p_b3v2L7.js","assets/Pricing-BiEw1jsi.js"])))=>i.map(i=>d[i]); +function Vp(e,t){for(var n=0;nr[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Hp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ic={exports:{}},go={},Dc={exports:{}},z={};/** + * @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 Kr=Symbol.for("react.element"),Kp=Symbol.for("react.portal"),Wp=Symbol.for("react.fragment"),Qp=Symbol.for("react.strict_mode"),qp=Symbol.for("react.profiler"),Jp=Symbol.for("react.provider"),Yp=Symbol.for("react.context"),Gp=Symbol.for("react.forward_ref"),Xp=Symbol.for("react.suspense"),Zp=Symbol.for("react.memo"),eh=Symbol.for("react.lazy"),Aa=Symbol.iterator;function th(e){return e===null||typeof e!="object"?null:(e=Aa&&e[Aa]||e["@@iterator"],typeof e=="function"?e:null)}var Fc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jc=Object.assign,$c={};function Wn(e,t,n){this.props=e,this.context=t,this.refs=$c,this.updater=n||Fc}Wn.prototype.isReactComponent={};Wn.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")};Wn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zc(){}zc.prototype=Wn.prototype;function Rl(e,t,n){this.props=e,this.context=t,this.refs=$c,this.updater=n||Fc}var Ll=Rl.prototype=new zc;Ll.constructor=Rl;jc(Ll,Wn.prototype);Ll.isPureReactComponent=!0;var Ia=Array.isArray,Uc=Object.prototype.hasOwnProperty,_l={current:null},Mc={key:!0,ref:!0,__self:!0,__source:!0};function Bc(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Uc.call(t,r)&&!Mc.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,U=O[D];if(0>>1;Di(ft,F))Gti(ni,ft)?(O[D]=ni,O[Gt]=F,D=Gt):(O[D]=ft,O[we]=F,D=we);else if(Gti(ni,F))O[D]=ni,O[Gt]=F,D=Gt;else break e}}return N}function i(O,N){var F=O.sortIndex-N.sortIndex;return F!==0?F:O.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,f=null,p=3,y=!1,d=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=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(O){for(var N=n(u);N!==null;){if(N.callback===null)r(u);else if(N.startTime<=O)r(u),N.sortIndex=N.expirationTime,t(a,N);else break;N=n(u)}}function k(O){if(v=!1,g(O),!d)if(n(a)!==null)d=!0,B(E);else{var N=n(u);N!==null&&de(k,N.startTime-O)}}function E(O,N){d=!1,v&&(v=!1,m(_),_=-1),y=!0;var F=p;try{for(g(N),f=n(a);f!==null&&(!(f.expirationTime>N)||O&&!fe());){var D=f.callback;if(typeof D=="function"){f.callback=null,p=f.priorityLevel;var U=D(f.expirationTime<=N);N=e.unstable_now(),typeof U=="function"?f.callback=U:f===n(a)&&r(a),g(N)}else r(a);f=n(a)}if(f!==null)var Pe=!0;else{var we=n(u);we!==null&&de(k,we.startTime-N),Pe=!1}return Pe}finally{f=null,p=F,y=!1}}var R=!1,P=null,_=-1,j=5,T=-1;function fe(){return!(e.unstable_now()-TO||125D?(O.sortIndex=F,t(u,O),n(a)===null&&O===n(u)&&(v?(m(_),_=-1):v=!0,de(k,F-D))):(O.sortIndex=U,t(a,O),d||y||(d=!0,B(E))),O},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(O){var N=p;return function(){var F=p;p=N;try{return O.apply(this,arguments)}finally{p=F}}}})(Wc);Kc.exports=Wc;var ph=Kc.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 hh=x,$e=ph;function C(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"),Cs=Object.prototype.hasOwnProperty,mh=/^[: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]*$/,Fa={},ja={};function gh(e){return Cs.call(ja,e)?!0:Cs.call(Fa,e)?!1:mh.test(e)?ja[e]=!0:(Fa[e]=!0,!1)}function yh(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 vh(e,t,n,r){if(t===null||typeof t>"u"||yh(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 Ee(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ce[e]=new Ee(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ce[t]=new Ee(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ce[e]=new Ee(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ce[e]=new Ee(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){ce[e]=new Ee(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ce[e]=new Ee(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ce[e]=new Ee(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ce[e]=new Ee(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ce[e]=new Ee(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nl=/[\-:]([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 t=e.replace(Nl,Al);ce[t]=new Ee(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(Nl,Al);ce[t]=new Ee(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(Nl,Al);ce[t]=new Ee(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ce[e]=new Ee(e,1,!1,e.toLowerCase(),null,!1,!1)});ce.xlinkHref=new Ee("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ce[e]=new Ee(e,1,!1,e.toLowerCase(),null,!0,!0)});function Il(e,t,n,r){var i=ce.hasOwnProperty(t)?ce[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var a=` +`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Vo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ur(e):""}function wh(e){switch(e.tag){case 5:return ur(e.type);case 16:return ur("Lazy");case 13:return ur("Suspense");case 19:return ur("SuspenseList");case 0:case 2:case 15:return e=Ho(e.type,!1),e;case 11:return e=Ho(e.type.render,!1),e;case 1:return e=Ho(e.type,!0),e;default:return""}}function Ls(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 kn:return"Fragment";case Sn:return"Portal";case Ps:return"Profiler";case Dl:return"StrictMode";case Os:return"Suspense";case Rs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jc:return(e.displayName||"Context")+".Consumer";case qc:return(e._context.displayName||"Context")+".Provider";case Fl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jl:return t=e.displayName||null,t!==null?t:Ls(e.type)||"Memo";case Ot:t=e._payload,e=e._init;try{return Ls(e(t))}catch{}}return null}function Sh(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 Ls(t);case 8:return t===Dl?"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 Vt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Gc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kh(e){var t=Gc(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 i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.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 oi(e){e._valueTracker||(e._valueTracker=kh(e))}function Xc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Gc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ui(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 _s(e,t){var n=t.checked;return Y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function za(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vt(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 Zc(e,t){t=t.checked,t!=null&&Il(e,"checked",t,!1)}function Ts(e,t){Zc(e,t);var n=Vt(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")?Ns(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ns(e,t.type,Vt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ua(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 Ns(e,t,n){(t!=="number"||Ui(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cr=Array.isArray;function An(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=si.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Or(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pr={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},xh=["Webkit","ms","Moz","O"];Object.keys(pr).forEach(function(e){xh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pr[t]=pr[e]})});function rf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pr.hasOwnProperty(e)&&pr[e]?(""+t).trim():t+"px"}function of(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=rf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Eh=Y({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 Ds(e,t){if(t){if(Eh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function Fs(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 js=null;function $l(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $s=null,In=null,Dn=null;function ba(e){if(e=qr(e)){if(typeof $s!="function")throw Error(C(280));var t=e.stateNode;t&&(t=ko(t),$s(e.stateNode,e.type,t))}}function sf(e){In?Dn?Dn.push(e):Dn=[e]:In=e}function lf(){if(In){var e=In,t=Dn;if(Dn=In=null,ba(e),t)for(e=0;e>>=0,e===0?32:31-(Dh(e)/Fh|0)|0}var li=64,ai=4194304;function fr(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 Vi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=fr(l):(o&=s,o!==0&&(r=fr(o)))}else s=n&~i,s!==0?r=fr(s):o!==0&&(r=fr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&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 Wr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ze(t),e[t]=n}function Uh(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=mr),Ga=" ",Xa=!1;function Rf(e,t){switch(e){case"keyup":return pm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xn=!1;function mm(e,t){switch(e){case"compositionend":return Lf(t);case"keypress":return t.which!==32?null:(Xa=!0,Ga);case"textInput":return e=t.data,e===Ga&&Xa?null:e;default:return null}}function gm(e,t){if(xn)return e==="compositionend"||!Kl&&Rf(e,t)?(e=Pf(),Oi=bl=Nt=null,xn=!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=nu(n)}}function Af(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Af(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function If(){for(var e=window,t=Ui();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ui(e.document)}return t}function Wl(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 Pm(e){var t=If(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Af(n.ownerDocument.documentElement,n)){if(r!==null&&Wl(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 i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ru(n,o);var s=ru(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>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,En=null,Vs=null,yr=null,Hs=!1;function iu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hs||En==null||En!==Ui(r)||(r=En,"selectionStart"in r&&Wl(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}),yr&&Ar(yr,r)||(yr=r,r=Wi(Vs,"onSelect"),0On||(e.current=Ys[On],Ys[On]=null,On--)}function H(e,t){On++,Ys[On]=e.current,e.current=t}var Ht={},ye=Wt(Ht),_e=Wt(!1),un=Ht;function Un(e,t){var n=e.type.contextTypes;if(!n)return Ht;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Te(e){return e=e.childContextTypes,e!=null}function qi(){W(_e),W(ye)}function fu(e,t,n){if(ye.current!==Ht)throw Error(C(168));H(ye,t),H(_e,n)}function bf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(C(108,Sh(e)||"Unknown",i));return Y({},n,r)}function Ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ht,un=ye.current,H(ye,e),H(_e,_e.current),!0}function du(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=bf(e,t,un),r.__reactInternalMemoizedMergedChildContext=e,W(_e),W(ye),H(ye,e)):W(_e),H(_e,n)}var ht=null,xo=!1,is=!1;function Vf(e){ht===null?ht=[e]:ht.push(e)}function $m(e){xo=!0,Vf(e)}function Qt(){if(!is&&ht!==null){is=!0;var e=0,t=b;try{var n=ht;for(b=1;e>=s,i-=s,mt=1<<32-Ze(t)+i|n<_?(j=P,P=null):j=P.sibling;var T=p(m,P,g[_],k);if(T===null){P===null&&(P=j);break}e&&P&&T.alternate===null&&t(m,P),h=o(T,h,_),R===null?E=T:R.sibling=T,R=T,P=j}if(_===g.length)return n(m,P),Q&&Zt(m,_),E;if(P===null){for(;__?(j=P,P=null):j=P.sibling;var fe=p(m,P,T.value,k);if(fe===null){P===null&&(P=j);break}e&&P&&fe.alternate===null&&t(m,P),h=o(fe,h,_),R===null?E=fe:R.sibling=fe,R=fe,P=j}if(T.done)return n(m,P),Q&&Zt(m,_),E;if(P===null){for(;!T.done;_++,T=g.next())T=f(m,T.value,k),T!==null&&(h=o(T,h,_),R===null?E=T:R.sibling=T,R=T);return Q&&Zt(m,_),E}for(P=r(m,P);!T.done;_++,T=g.next())T=y(P,m,_,T.value,k),T!==null&&(e&&T.alternate!==null&&P.delete(T.key===null?_:T.key),h=o(T,h,_),R===null?E=T:R.sibling=T,R=T);return e&&P.forEach(function(Me){return t(m,Me)}),Q&&Zt(m,_),E}function w(m,h,g,k){if(typeof g=="object"&&g!==null&&g.type===kn&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case ii:e:{for(var E=g.key,R=h;R!==null;){if(R.key===E){if(E=g.type,E===kn){if(R.tag===7){n(m,R.sibling),h=i(R,g.props.children),h.return=m,m=h;break e}}else if(R.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ot&&mu(E)===R.type){n(m,R.sibling),h=i(R,g.props),h.ref=ir(m,R,g),h.return=m,m=h;break e}n(m,R);break}else t(m,R);R=R.sibling}g.type===kn?(h=ln(g.props.children,m.mode,k,g.key),h.return=m,m=h):(k=Di(g.type,g.key,g.props,null,m.mode,k),k.ref=ir(m,h,g),k.return=m,m=k)}return s(m);case Sn:e:{for(R=g.key;h!==null;){if(h.key===R)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),h=i(h,g.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=ds(g,m.mode,k),h.return=m,m=h}return s(m);case Ot:return R=g._init,w(m,h,R(g._payload),k)}if(cr(g))return d(m,h,g,k);if(Zn(g))return v(m,h,g,k);mi(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),h=i(h,g),h.return=m,m=h):(n(m,h),h=fs(g,m.mode,k),h.return=m,m=h),s(m)):n(m,h)}return w}var Bn=Qf(!0),qf=Qf(!1),Xi=Wt(null),Zi=null,_n=null,Yl=null;function Gl(){Yl=_n=Zi=null}function Xl(e){var t=Xi.current;W(Xi),e._currentValue=t}function Zs(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 jn(e,t){Zi=e,Yl=_n=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Le=!0),e.firstContext=null)}function We(e){var t=e._currentValue;if(Yl!==e)if(e={context:e,memoizedValue:t,next:null},_n===null){if(Zi===null)throw Error(C(308));_n=e,Zi.dependencies={lanes:0,firstContext:e}}else _n=_n.next=e;return t}var nn=null;function Zl(e){nn===null?nn=[e]:nn.push(e)}function Jf(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Zl(t)):(n.next=i.next,i.next=n),t.interleaved=n,St(e,r)}function St(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 Rt=!1;function ea(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yf(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 yt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,M&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,St(e,n)}return i=r.interleaved,i===null?(t.next=t,Zl(r)):(t.next=i.next,i.next=t),r.interleaved=t,St(e,n)}function Li(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,Ul(e,n)}}function gu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=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};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 eo(e,t,n,r){var i=e.updateQueue;Rt=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var f=i.baseState;s=0,c=u=a=null,l=o;do{var p=l.lane,y=l.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var d=e,v=l;switch(p=t,y=n,v.tag){case 1:if(d=v.payload,typeof d=="function"){f=d.call(y,f,p);break e}f=d;break e;case 3:d.flags=d.flags&-65537|128;case 0:if(d=v.payload,p=typeof d=="function"?d.call(y,f,p):d,p==null)break e;f=Y({},f,p);break e;case 2:Rt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else y={eventTime:y,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=y,a=f):c=c.next=y,s|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);dn|=s,e.lanes=s,e.memoizedState=f}}function yu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ss.transition;ss.transition={};try{e(!1),t()}finally{b=n,ss.transition=r}}function pd(){return Qe().memoizedState}function Bm(e,t,n){var r=Mt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hd(e))md(t,n);else if(n=Jf(e,t,n,r),n!==null){var i=ke();et(n,e,r,i),gd(n,t,r)}}function bm(e,t,n){var r=Mt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hd(e))md(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,tt(l,s)){var a=t.interleaved;a===null?(i.next=i,Zl(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Jf(e,t,i,r),n!==null&&(i=ke(),et(n,e,r,i),gd(n,t,r))}}function hd(e){var t=e.alternate;return e===J||t!==null&&t===J}function md(e,t){vr=no=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ul(e,n)}}var ro={readContext:We,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},Vm={readContext:We,useCallback:function(e,t){return ot().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:wu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ti(4194308,4,ad.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ti(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ti(4,2,e,t)},useMemo:function(e,t){var n=ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ot();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=Bm.bind(null,J,e),[r.memoizedState,e]},useRef:function(e){var t=ot();return e={current:e},t.memoizedState=e},useState:vu,useDebugValue:aa,useDeferredValue:function(e){return ot().memoizedState=e},useTransition:function(){var e=vu(!1),t=e[0];return e=Mm.bind(null,e[1]),ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=J,i=ot();if(Q){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),le===null)throw Error(C(349));fn&30||ed(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,wu(nd.bind(null,r,o,e),[e]),r.flags|=2048,Mr(9,td.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ot(),t=le.identifierPrefix;if(Q){var n=gt,r=mt;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zr++,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[st]=t,e[Fr]=r,Od(e,t,!1,!1),t.stateNode=e;e:{switch(s=Fs(n,r),n){case"dialog":K("cancel",e),K("close",e),i=r;break;case"iframe":case"object":case"embed":K("load",e),i=r;break;case"video":case"audio":for(i=0;iHn&&(t.flags|=128,r=!0,or(o,!1),t.lanes=4194304)}else{if(!r)if(e=to(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),or(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Q)return he(t),null}else 2*Z()-o.renderingStartTime>Hn&&n!==1073741824&&(t.flags|=128,r=!0,or(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Z(),t.sibling=null,n=q.current,H(q,r?n&1|2:n&1),t):(he(t),null);case 22:case 23:return ha(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?De&1073741824&&(he(t),t.subtreeFlags&6&&(t.flags|=8192)):he(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function Gm(e,t){switch(ql(t),t.tag){case 1:return Te(t.type)&&qi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bn(),W(_e),W(ye),ra(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return na(t),null;case 13:if(W(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));Mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(q),null;case 4:return bn(),null;case 10:return Xl(t.type._context),null;case 22:case 23:return ha(),null;case 24:return null;default:return null}}var yi=!1,me=!1,Xm=typeof WeakSet=="function"?WeakSet:Set,L=null;function Tn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(e,t,r)}else n.current=null}function al(e,t,n){try{n()}catch(r){X(e,t,r)}}var Tu=!1;function Zm(e,t){if(Ks=Hi,e=If(),Wl(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 i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,f=e,p=null;t:for(;;){for(var y;f!==n||i!==0&&f.nodeType!==3||(l=s+i),f!==o||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(y=f.firstChild)!==null;)p=f,f=y;for(;;){if(f===e)break t;if(p===n&&++u===i&&(l=s),p===o&&++c===r&&(a=s),(y=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=y}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ws={focusedElem:e,selectionRange:n},Hi=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var d=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(d!==null){var v=d.memoizedProps,w=d.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ye(t.type,v),w);m.__reactInternalSnapshotBeforeUpdate=h}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(C(163))}}catch(k){X(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return d=Tu,Tu=!1,d}function wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&al(t,n,o)}i=i.next}while(i!==r)}}function Po(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 ul(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 _d(e){var t=e.alternate;t!==null&&(e.alternate=null,_d(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[st],delete t[Fr],delete t[Js],delete t[Fm],delete t[jm])),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 Td(e){return e.tag===5||e.tag===3||e.tag===4}function Nu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Td(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 cl(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=Qi));else if(r!==4&&(e=e.child,e!==null))for(cl(e,t,n),e=e.sibling;e!==null;)cl(e,t,n),e=e.sibling}function fl(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(fl(e,t,n),e=e.sibling;e!==null;)fl(e,t,n),e=e.sibling}var ae=null,Ge=!1;function Pt(e,t,n){for(n=n.child;n!==null;)Nd(e,t,n),n=n.sibling}function Nd(e,t,n){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(yo,n)}catch{}switch(n.tag){case 5:me||Tn(n,t);case 6:var r=ae,i=Ge;ae=null,Pt(e,t,n),ae=r,Ge=i,ae!==null&&(Ge?(e=ae,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ae.removeChild(n.stateNode));break;case 18:ae!==null&&(Ge?(e=ae,n=n.stateNode,e.nodeType===8?rs(e.parentNode,n):e.nodeType===1&&rs(e,n),Tr(e)):rs(ae,n.stateNode));break;case 4:r=ae,i=Ge,ae=n.stateNode.containerInfo,Ge=!0,Pt(e,t,n),ae=r,Ge=i;break;case 0:case 11:case 14:case 15:if(!me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&al(n,t,s),i=i.next}while(i!==r)}Pt(e,t,n);break;case 1:if(!me&&(Tn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){X(n,t,l)}Pt(e,t,n);break;case 21:Pt(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,Pt(e,t,n),me=r):Pt(e,t,n);break;default:Pt(e,t,n)}}function Au(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Xm),t.forEach(function(r){var i=ag.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function qe(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Z()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tg(r/1960))-r,10e?16:e,At===null)var r=!1;else{if(e=At,At=null,so=0,M&6)throw Error(C(331));var i=M;for(M|=4,L=e.current;L!==null;){var o=L,s=o.child;if(L.flags&16){var l=o.deletions;if(l!==null){for(var a=0;aZ()-da?sn(e,0):fa|=n),Ne(e,t)}function Ud(e,t){t===0&&(e.mode&1?(t=ai,ai<<=1,!(ai&130023424)&&(ai=4194304)):t=1);var n=ke();e=St(e,t),e!==null&&(Wr(e,t,n),Ne(e,n))}function lg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ud(e,n)}function ag(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),Ud(e,n)}var Md;Md=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_e.current)Le=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Le=!1,Jm(e,t,n);Le=!!(e.flags&131072)}else Le=!1,Q&&t.flags&1048576&&Hf(t,Gi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ni(e,t),e=t.pendingProps;var i=Un(t,ye.current);jn(t,n),i=oa(null,t,r,e,i,n);var o=sa();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Te(r)?(o=!0,Ji(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ea(t),i.updater=Co,t.stateNode=i,i._reactInternals=t,tl(t,r,e,n),t=il(null,t,r,!0,o,n)):(t.tag=0,Q&&o&&Ql(t),Se(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ni(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=cg(r),e=Ye(r,e),i){case 0:t=rl(null,t,r,e,n);break e;case 1:t=Ru(null,t,r,e,n);break e;case 11:t=Pu(null,t,r,e,n);break e;case 14:t=Ou(null,t,r,Ye(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),rl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),Ru(e,t,r,i,n);case 3:e:{if(Ed(t),e===null)throw Error(C(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Yf(e,t),eo(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Vn(Error(C(423)),t),t=Lu(e,t,r,n,i);break e}else if(r!==i){i=Vn(Error(C(424)),t),t=Lu(e,t,r,n,i);break e}else for(Fe=$t(t.stateNode.containerInfo.firstChild),je=t,Q=!0,Xe=null,n=qf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mn(),r===i){t=kt(e,t,n);break e}Se(e,t,r,n)}t=t.child}return t;case 5:return Gf(t),e===null&&Xs(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Qs(r,i)?s=null:o!==null&&Qs(r,o)&&(t.flags|=32),xd(e,t),Se(e,t,s,n),t.child;case 6:return e===null&&Xs(t),null;case 13:return Cd(e,t,n);case 4:return ta(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bn(t,null,r,n):Se(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),Pu(e,t,r,i,n);case 7:return Se(e,t,t.pendingProps,n),t.child;case 8:return Se(e,t,t.pendingProps.children,n),t.child;case 12:return Se(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,H(Xi,r._currentValue),r._currentValue=s,o!==null)if(tt(o.value,s)){if(o.children===i.children&&!_e.current){t=kt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=yt(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Zs(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(C(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Zs(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Se(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,jn(t,n),i=We(i),r=r(i),t.flags|=1,Se(e,t,r,n),t.child;case 14:return r=t.type,i=Ye(r,t.pendingProps),i=Ye(r.type,i),Ou(e,t,r,i,n);case 15:return Sd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),Ni(e,t),t.tag=1,Te(r)?(e=!0,Ji(t)):e=!1,jn(t,n),yd(t,r,i),tl(t,r,i,n),il(null,t,r,!0,e,n);case 19:return Pd(e,t,n);case 22:return kd(e,t,n)}throw Error(C(156,t.tag))};function Bd(e,t){return hf(e,t)}function ug(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 He(e,t,n,r){return new ug(e,t,n,r)}function ga(e){return e=e.prototype,!(!e||!e.isReactComponent)}function cg(e){if(typeof e=="function")return ga(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fl)return 11;if(e===jl)return 14}return 2}function Bt(e,t){var n=e.alternate;return n===null?(n=He(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 Di(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")ga(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case kn:return ln(n.children,i,o,t);case Dl:s=8,i|=8;break;case Ps:return e=He(12,n,t,i|2),e.elementType=Ps,e.lanes=o,e;case Os:return e=He(13,n,t,i),e.elementType=Os,e.lanes=o,e;case Rs:return e=He(19,n,t,i),e.elementType=Rs,e.lanes=o,e;case Yc:return Ro(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qc:s=10;break e;case Jc:s=9;break e;case Fl:s=11;break e;case jl:s=14;break e;case Ot:s=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=He(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ln(e,t,n,r){return e=He(7,e,r,t),e.lanes=n,e}function Ro(e,t,n,r){return e=He(22,e,r,t),e.elementType=Yc,e.lanes=n,e.stateNode={isHidden:!1},e}function fs(e,t,n){return e=He(6,e,null,t),e.lanes=n,e}function ds(e,t,n){return t=He(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function fg(e,t,n,r,i){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=Wo(0),this.expirationTimes=Wo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ya(e,t,n,r,i,o,s,l,a){return e=new fg(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=He(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ea(o),e}function dg(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kd)}catch(e){console.error(e)}}Kd(),Hc.exports=ze;var yg=Hc.exports,Mu=yg;Es.createRoot=Mu.createRoot,Es.hydrateRoot=Mu.hydrateRoot;/** + * @remix-run/router v1.23.2 + * + * 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 br(){return br=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ka(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function wg(){return Math.random().toString(36).substr(2,8)}function bu(e,t){return{usr:e.state,key:e.key,idx:t}}function gl(e,t,n,r){return n===void 0&&(n=null),br({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Jn(t):t,{state:n,key:t&&t.key||r||wg()})}function uo(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 Jn(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 Sg(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,l=It.Pop,a=null,u=c();u==null&&(u=0,s.replaceState(br({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function f(){l=It.Pop;let w=c(),m=w==null?null:w-u;u=w,a&&a({action:l,location:v.location,delta:m})}function p(w,m){l=It.Push;let h=gl(v.location,w,m);u=c()+1;let g=bu(h,u),k=v.createHref(h);try{s.pushState(g,"",k)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(k)}o&&a&&a({action:l,location:v.location,delta:1})}function y(w,m){l=It.Replace;let h=gl(v.location,w,m);u=c();let g=bu(h,u),k=v.createHref(h);s.replaceState(g,"",k),o&&a&&a({action:l,location:v.location,delta:0})}function d(w){let m=i.location.origin!=="null"?i.location.origin:i.location.href,h=typeof w=="string"?w:uo(w);return h=h.replace(/ $/,"%20"),ee(m,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,m)}let v={get action(){return l},get location(){return e(i,s)},listen(w){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(Bu,f),a=w,()=>{i.removeEventListener(Bu,f),a=null}},createHref(w){return t(i,w)},createURL:d,encodeLocation(w){let m=d(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:y,go(w){return s.go(w)}};return v}var Vu;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Vu||(Vu={}));function kg(e,t,n){return n===void 0&&(n="/"),xg(e,t,n)}function xg(e,t,n,r){let i=typeof t=="string"?Jn(t):t,o=xa(i.pathname||"/",n);if(o==null)return null;let s=Wd(e);Eg(s);let l=null;for(let a=0;l==null&&a{let a={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};a.relativePath.startsWith("/")&&(ee(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=bt([r,a.relativePath]),c=n.concat(a);o.children&&o.children.length>0&&(ee(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Wd(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Tg(u,o.index),routesMeta:c})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let a of Qd(o.path))i(o,s,a)}),t}function Qd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=Qd(r.join("/")),l=[];return l.push(...s.map(a=>a===""?o:[o,a].join("/"))),i&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function Eg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ng(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Cg=/^:[\w-]+$/,Pg=3,Og=2,Rg=1,Lg=10,_g=-2,Hu=e=>e==="*";function Tg(e,t){let n=e.split("/"),r=n.length;return n.some(Hu)&&(r+=_g),t&&(r+=Og),n.filter(i=>!Hu(i)).reduce((i,o)=>i+(Cg.test(o)?Pg:o===""?Rg:Lg),r)}function Ng(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Ag(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let l=0;l{let{paramName:p,isOptional:y}=c;if(p==="*"){let v=l[f]||"";s=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const d=l[f];return y&&!d?u[p]=void 0:u[p]=(d||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:e}}function Dg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ka(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Fg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ka(!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 xa(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)||"/"}const jg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$g=e=>jg.test(e);function zg(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Jn(e):e,o;if(n)if($g(n))o=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),ka(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+n))}n.startsWith("/")?o=Ku(n.substring(1),"/"):o=Ku(n,t)}else o=t;return{pathname:o,search:Bg(r),hash:bg(i)}}function Ku(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function ps(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 Ug(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ea(e,t){let n=Ug(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ca(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Jn(e):(i=br({},e),ee(!i.pathname||!i.pathname.includes("?"),ps("?","pathname","search",i)),ee(!i.pathname||!i.pathname.includes("#"),ps("#","pathname","hash",i)),ee(!i.search||!i.search.includes("#"),ps("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,l;if(s==null)l=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}l=f>=0?t[f]:"/"}let a=zg(i,l),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const bt=e=>e.join("/").replace(/\/\/+/g,"/"),Mg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Bg=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Vg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const qd=["post","put","patch","delete"];new Set(qd);const Hg=["get",...qd];new Set(Hg);/** + * React Router v6.30.3 + * + * 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 Vr(){return Vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),x.useCallback(function(u,c){if(c===void 0&&(c={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=Ca(u,JSON.parse(s),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:bt([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,s,o,e])}const qg=x.createContext(null);function Jg(e){let t=x.useContext(Ct).outlet;return t&&x.createElement(qg.Provider,{value:e},t)}function Xd(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(qt),{matches:i}=x.useContext(Ct),{pathname:o}=Gn(),s=JSON.stringify(Ea(i,r.v7_relativeSplatPath));return x.useMemo(()=>Ca(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function Yg(e,t){return Gg(e,t)}function Gg(e,t,n,r){Yn()||ee(!1);let{navigator:i}=x.useContext(qt),{matches:o}=x.useContext(Ct),s=o[o.length-1],l=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let u=Gn(),c;if(t){var f;let w=typeof t=="string"?Jn(t):t;a==="/"||(f=w.pathname)!=null&&f.startsWith(a)||ee(!1),c=w}else c=u;let p=c.pathname||"/",y=p;if(a!=="/"){let w=a.replace(/^\//,"").split("/");y="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let d=kg(e,{pathname:y}),v=ny(d&&d.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:bt([a,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?a:bt([a,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n,r);return t&&v?x.createElement(Ao.Provider,{value:{location:Vr({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:It.Pop}},v):v}function Xg(){let e=sy(),t=Vg(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,null)}const Zg=x.createElement(Xg,null);class ey extends x.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?x.createElement(Ct.Provider,{value:this.props.routeContext},x.createElement(Jd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ty(e){let{routeContext:t,match:n,children:r}=e,i=x.useContext(Pa);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Ct.Provider,{value:t},r)}function ny(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let c=s.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);c>=0||ee(!1),s=s.slice(0,Math.min(s.length,c+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,f,p)=>{let y,d=!1,v=null,w=null;n&&(y=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||Zg,a&&(u<0&&p===0?(ay("route-fallback"),d=!0,w=null):u===p&&(d=!0,w=f.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,p+1)),h=()=>{let g;return y?g=v:d?g=w:f.route.Component?g=x.createElement(f.route.Component,null):f.route.element?g=f.route.element:g=c,x.createElement(ty,{match:f,routeContext:{outlet:c,matches:m,isDataRoute:n!=null},children:g})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?x.createElement(ey,{location:n.location,revalidation:n.revalidation,component:v,error:y,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):h()},null)}var Zd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Zd||{}),ep=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}(ep||{});function ry(e){let t=x.useContext(Pa);return t||ee(!1),t}function iy(e){let t=x.useContext(Kg);return t||ee(!1),t}function oy(e){let t=x.useContext(Ct);return t||ee(!1),t}function tp(e){let t=oy(),n=t.matches[t.matches.length-1];return n.route.id||ee(!1),n.route.id}function sy(){var e;let t=x.useContext(Jd),n=iy(),r=tp();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ly(){let{router:e}=ry(Zd.UseNavigateStable),t=tp(ep.UseNavigateStable),n=x.useRef(!1);return Yd(()=>{n.current=!0}),x.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Vr({fromRouteId:t},o)))},[e,t])}const Wu={};function ay(e,t,n){Wu[e]||(Wu[e]=!0)}function uy(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function np(e){let{to:t,replace:n,state:r,relative:i}=e;Yn()||ee(!1);let{future:o,static:s}=x.useContext(qt),{matches:l}=x.useContext(Ct),{pathname:a}=Gn(),u=Gd(),c=Ca(t,Ea(l,o.v7_relativeSplatPath),a,i==="path"),f=JSON.stringify(c);return x.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:i}),[u,f,i,n,r]),null}function cy(e){return Jg(e.context)}function Je(e){ee(!1)}function fy(e){let{basename:t="/",children:n=null,location:r,navigationType:i=It.Pop,navigator:o,static:s=!1,future:l}=e;Yn()&&ee(!1);let a=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:a,navigator:o,static:s,future:Vr({v7_relativeSplatPath:!1},l)}),[a,l,o,s]);typeof r=="string"&&(r=Jn(r));let{pathname:c="/",search:f="",hash:p="",state:y=null,key:d="default"}=r,v=x.useMemo(()=>{let w=xa(c,a);return w==null?null:{location:{pathname:w,search:f,hash:p,state:y,key:d},navigationType:i}},[a,c,f,p,y,d,i]);return v==null?null:x.createElement(qt.Provider,{value:u},x.createElement(Ao.Provider,{children:n,value:v}))}function dy(e){let{children:t,location:n}=e;return Yg(yl(t),n)}new Promise(()=>{});function yl(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,i)=>{if(!x.isValidElement(r))return;let o=[...t,i];if(r.type===x.Fragment){n.push.apply(n,yl(r.props.children,o));return}r.type!==Je&&ee(!1),!r.props.index||!r.props.children||ee(!1);let s={id:r.props.id||o.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=yl(r.props.children,o)),n.push(s)}),n}/** + * React Router DOM v6.30.3 + * + * 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 vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function hy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function my(e,t){return e.button===0&&(!t||t==="_self")&&!hy(e)}const gy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],yy="6";try{window.__reactRouterVersion=yy}catch{}const vy="startTransition",Qu=sh[vy];function wy(e){let{basename:t,children:n,future:r,window:i}=e,o=x.useRef();o.current==null&&(o.current=vg({window:i,v5Compat:!0}));let s=o.current,[l,a]=x.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=x.useCallback(f=>{u&&Qu?Qu(()=>a(f)):a(f)},[a,u]);return x.useLayoutEffect(()=>s.listen(c),[s,c]),x.useEffect(()=>uy(r),[r]),x.createElement(fy,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}const Sy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ky=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ow=x.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:l,target:a,to:u,preventScrollReset:c,viewTransition:f}=t,p=py(t,gy),{basename:y}=x.useContext(qt),d,v=!1;if(typeof u=="string"&&ky.test(u)&&(d=u,Sy))try{let g=new URL(window.location.href),k=u.startsWith("//")?new URL(g.protocol+u):new URL(u),E=xa(k.pathname,y);k.origin===g.origin&&E!=null?u=E+k.search+k.hash:v=!0}catch{}let w=Wg(u,{relative:i}),m=xy(u,{replace:s,state:l,target:a,preventScrollReset:c,relative:i,viewTransition:f});function h(g){r&&r(g),g.defaultPrevented||m(g)}return x.createElement("a",vl({},p,{href:d||w,onClick:v||o?r:h,ref:n,target:a}))});var qu;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(qu||(qu={}));var Ju;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ju||(Ju={}));function xy(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:l}=t===void 0?{}:t,a=Gd(),u=Gn(),c=Xd(e,{relative:s});return x.useCallback(f=>{if(my(f,n)){f.preventDefault();let p=r!==void 0?r:uo(u)===uo(c);a(e,{replace:p,state:i,preventScrollReset:o,relative:s,viewTransition:l})}},[u,a,c,r,i,n,e,o,s,l])}let Ey={data:""},Cy=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Ey},Py=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Oy=/\/\*[^]*?\*\/| +/g,Yu=/\n+/g,Tt=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?Tt(s,o):o+"{"+Tt(s,o[1]=="k"?"":t)+"}":typeof s=="object"?r+=Tt(s,t?t.replace(/([^,])+/g,l=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,a=>/&/.test(a)?a.replace(/&/g,l):l?l+" "+a:a)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Tt.p?Tt.p(o,s):o+":"+s+";")}return n+(t&&i?t+"{"+i+"}":i)+r},dt={},rp=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+rp(e[n]);return t}return e},Ry=(e,t,n,r,i)=>{let o=rp(e),s=dt[o]||(dt[o]=(a=>{let u=0,c=11;for(;u>>0;return"go"+c})(o));if(!dt[s]){let a=o!==e?e:(u=>{let c,f,p=[{}];for(;c=Py.exec(u.replace(Oy,""));)c[4]?p.shift():c[3]?(f=c[3].replace(Yu," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][c[1]]=c[2].replace(Yu," ").trim();return p[0]})(e);dt[s]=Tt(i?{["@keyframes "+s]:a}:a,n?"":"."+s)}let l=n&&dt.g?dt.g:null;return n&&(dt.g=dt[s]),((a,u,c,f)=>{f?u.data=u.data.replace(f,a):u.data.indexOf(a)===-1&&(u.data=c?a+u.data:u.data+a)})(dt[s],t,r,l),s},Ly=(e,t,n)=>e.reduce((r,i,o)=>{let s=t[o];if(s&&s.call){let l=s(n),a=l&&l.props&&l.props.className||/^go/.test(l)&&l;s=a?"."+a:l&&typeof l=="object"?l.props?"":Tt(l,""):l===!1?"":l}return r+i+(s??"")},"");function Io(e){let t=this||{},n=e.call?e(t.p):e;return Ry(n.unshift?n.raw?Ly(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Cy(t.target),t.g,t.o,t.k)}let ip,wl,Sl;Io.bind({g:1});let xt=Io.bind({k:1});function _y(e,t,n,r){Tt.p=t,ip=e,wl=n,Sl=r}function Jt(e,t){let n=this||{};return function(){let r=arguments;function i(o,s){let l=Object.assign({},o),a=l.className||i.className;n.p=Object.assign({theme:wl&&wl()},l),n.o=/ *go\d+/.test(a),l.className=Io.apply(n,r)+(a?" "+a:"");let u=e;return e[0]&&(u=l.as||e,delete l.as),Sl&&u[0]&&Sl(l),ip(u,l)}return i}}var Ty=e=>typeof e=="function",co=(e,t)=>Ty(e)?e(t):e,Ny=(()=>{let e=0;return()=>(++e).toString()})(),op=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Ay=20,Oa="default",sp=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:r}=t;return sp(e,{type:e.toasts.find(s=>s.id===r.id)?1:0,toast:r});case 3:let{toastId:i}=t;return{...e,toasts:e.toasts.map(s=>s.id===i||i===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},Fi=[],lp={toasts:[],pausedAt:void 0,settings:{toastLimit:Ay}},lt={},ap=(e,t=Oa)=>{lt[t]=sp(lt[t]||lp,e),Fi.forEach(([n,r])=>{n===t&&r(lt[t])})},up=e=>Object.keys(lt).forEach(t=>ap(e,t)),Iy=e=>Object.keys(lt).find(t=>lt[t].toasts.some(n=>n.id===e)),Do=(e=Oa)=>t=>{ap(t,e)},Dy={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Fy=(e={},t=Oa)=>{let[n,r]=x.useState(lt[t]||lp),i=x.useRef(lt[t]);x.useEffect(()=>(i.current!==lt[t]&&r(lt[t]),Fi.push([t,r]),()=>{let s=Fi.findIndex(([l])=>l===t);s>-1&&Fi.splice(s,1)}),[t]);let o=n.toasts.map(s=>{var l,a,u;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((l=e[s.type])==null?void 0:l.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((a=e[s.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||Dy[s.type],style:{...e.style,...(u=e[s.type])==null?void 0:u.style,...s.style}}});return{...n,toasts:o}},jy=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Ny()}),Yr=e=>(t,n)=>{let r=jy(t,e,n);return Do(r.toasterId||Iy(r.id))({type:2,toast:r}),r.id},ie=(e,t)=>Yr("blank")(e,t);ie.error=Yr("error");ie.success=Yr("success");ie.loading=Yr("loading");ie.custom=Yr("custom");ie.dismiss=(e,t)=>{let n={type:3,toastId:e};t?Do(t)(n):up(n)};ie.dismissAll=e=>ie.dismiss(void 0,e);ie.remove=(e,t)=>{let n={type:4,toastId:e};t?Do(t)(n):up(n)};ie.removeAll=e=>ie.remove(void 0,e);ie.promise=(e,t,n)=>{let r=ie.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let o=t.success?co(t.success,i):void 0;return o?ie.success(o,{id:r,...n,...n==null?void 0:n.success}):ie.dismiss(r),i}).catch(i=>{let o=t.error?co(t.error,i):void 0;o?ie.error(o,{id:r,...n,...n==null?void 0:n.error}):ie.dismiss(r)}),e};var $y=1e3,zy=(e,t="default")=>{let{toasts:n,pausedAt:r}=Fy(e,t),i=x.useRef(new Map).current,o=x.useCallback((f,p=$y)=>{if(i.has(f))return;let y=setTimeout(()=>{i.delete(f),s({type:4,toastId:f})},p);i.set(f,y)},[]);x.useEffect(()=>{if(r)return;let f=Date.now(),p=n.map(y=>{if(y.duration===1/0)return;let d=(y.duration||0)+y.pauseDuration-(f-y.createdAt);if(d<0){y.visible&&ie.dismiss(y.id);return}return setTimeout(()=>ie.dismiss(y.id,t),d)});return()=>{p.forEach(y=>y&&clearTimeout(y))}},[n,r,t]);let s=x.useCallback(Do(t),[t]),l=x.useCallback(()=>{s({type:5,time:Date.now()})},[s]),a=x.useCallback((f,p)=>{s({type:1,toast:{id:f,height:p}})},[s]),u=x.useCallback(()=>{r&&s({type:6,time:Date.now()})},[r,s]),c=x.useCallback((f,p)=>{let{reverseOrder:y=!1,gutter:d=8,defaultPosition:v}=p||{},w=n.filter(g=>(g.position||v)===(f.position||v)&&g.height),m=w.findIndex(g=>g.id===f.id),h=w.filter((g,k)=>kg.visible).slice(...y?[h+1]:[0,h]).reduce((g,k)=>g+(k.height||0)+d,0)},[n]);return x.useEffect(()=>{n.forEach(f=>{if(f.dismissed)o(f.id,f.removeDelay);else{let p=i.get(f.id);p&&(clearTimeout(p),i.delete(f.id))}})},[n,o]),{toasts:n,handlers:{updateHeight:a,startPause:l,endPause:u,calculateOffset:c}}},Uy=xt` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,My=xt` +from { + transform: scale(0); + opacity: 0; +} +to { + transform: scale(1); + opacity: 1; +}`,By=xt` +from { + transform: scale(0) rotate(90deg); + opacity: 0; +} +to { + transform: scale(1) rotate(90deg); + opacity: 1; +}`,by=Jt("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#ff4b4b"}; + position: relative; + transform: rotate(45deg); + + animation: ${Uy} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + + &:after, + &:before { + content: ''; + animation: ${My} 0.15s ease-out forwards; + animation-delay: 150ms; + position: absolute; + border-radius: 3px; + opacity: 0; + background: ${e=>e.secondary||"#fff"}; + bottom: 9px; + left: 4px; + height: 2px; + width: 12px; + } + + &:before { + animation: ${By} 0.15s ease-out forwards; + animation-delay: 180ms; + transform: rotate(90deg); + } +`,Vy=xt` + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +`,Hy=Jt("div")` + width: 12px; + height: 12px; + box-sizing: border-box; + border: 2px solid; + border-radius: 100%; + border-color: ${e=>e.secondary||"#e0e0e0"}; + border-right-color: ${e=>e.primary||"#616161"}; + animation: ${Vy} 1s linear infinite; +`,Ky=xt` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,Wy=xt` +0% { + height: 0; + width: 0; + opacity: 0; +} +40% { + height: 0; + width: 6px; + opacity: 1; +} +100% { + opacity: 1; + height: 10px; +}`,Qy=Jt("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#61d345"}; + position: relative; + transform: rotate(45deg); + + animation: ${Ky} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + &:after { + content: ''; + box-sizing: border-box; + animation: ${Wy} 0.2s ease-out forwards; + opacity: 0; + animation-delay: 200ms; + position: absolute; + border-right: 2px solid; + border-bottom: 2px solid; + border-color: ${e=>e.secondary||"#fff"}; + bottom: 6px; + left: 6px; + height: 10px; + width: 6px; + } +`,qy=Jt("div")` + position: absolute; +`,Jy=Jt("div")` + position: relative; + display: flex; + justify-content: center; + align-items: center; + min-width: 20px; + min-height: 20px; +`,Yy=xt` +from { + transform: scale(0.6); + opacity: 0.4; +} +to { + transform: scale(1); + opacity: 1; +}`,Gy=Jt("div")` + position: relative; + transform: scale(0.6); + opacity: 0.4; + min-width: 20px; + animation: ${Yy} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; +`,Xy=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?x.createElement(Gy,null,t):t:n==="blank"?null:x.createElement(Jy,null,x.createElement(Hy,{...r}),n!=="loading"&&x.createElement(qy,null,n==="error"?x.createElement(by,{...r}):x.createElement(Qy,{...r})))},Zy=e=>` +0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} +100% {transform: translate3d(0,0,0) scale(1); opacity:1;} +`,ev=e=>` +0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} +100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} +`,tv="0%{opacity:0;} 100%{opacity:1;}",nv="0%{opacity:1;} 100%{opacity:0;}",rv=Jt("div")` + display: flex; + align-items: center; + background: #fff; + color: #363636; + line-height: 1.3; + will-change: transform; + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); + max-width: 350px; + pointer-events: auto; + padding: 8px 10px; + border-radius: 8px; +`,iv=Jt("div")` + display: flex; + justify-content: center; + margin: 4px 10px; + color: inherit; + flex: 1 1 auto; + white-space: pre-line; +`,ov=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=op()?[tv,nv]:[Zy(n),ev(n)];return{animation:t?`${xt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${xt(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},sv=x.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?ov(e.position||t||"top-center",e.visible):{opacity:0},o=x.createElement(Xy,{toast:e}),s=x.createElement(iv,{...e.ariaProps},co(e.message,e));return x.createElement(rv,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:o,message:s}):x.createElement(x.Fragment,null,o,s))});_y(x.createElement);var lv=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let o=x.useCallback(s=>{if(s){let l=()=>{let a=s.getBoundingClientRect().height;r(e,a)};l(),new MutationObserver(l).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return x.createElement("div",{ref:o,className:t,style:n},i)},av=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:op()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},uv=Io` + z-index: 9999; + > * { + pointer-events: auto; + } +`,Si=16,cv=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,toasterId:o,containerStyle:s,containerClassName:l})=>{let{toasts:a,handlers:u}=zy(n,o);return x.createElement("div",{"data-rht-toaster":o||"",style:{position:"fixed",zIndex:9999,top:Si,left:Si,right:Si,bottom:Si,pointerEvents:"none",...s},className:l,onMouseEnter:u.startPause,onMouseLeave:u.endPause},a.map(c=>{let f=c.position||t,p=u.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),y=av(f,p);return x.createElement(lv,{id:c.id,key:c.id,onHeightUpdate:u.updateHeight,className:c.visible?uv:"",style:y},c.type==="custom"?co(c.message,c):i?i(c):x.createElement(sv,{toast:c,position:f}))}))},hs=ie;const fv="modulepreload",dv=function(e){return"/"+e},Gu={},Oe=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(n.map(a=>{if(a=dv(a),a in Gu)return;Gu[a]=!0;const u=a.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":fv,u||(f.as="script"),f.crossOrigin="",f.href=a,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((p,y)=>{f.addEventListener("load",p),f.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};function cp(e,t){return function(){return e.apply(t,arguments)}}const{toString:pv}=Object.prototype,{getPrototypeOf:Ra}=Object,{iterator:Fo,toStringTag:fp}=Symbol,jo=(e=>t=>{const n=pv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nt=e=>(e=e.toLowerCase(),t=>jo(t)===e),$o=e=>t=>typeof t===e,{isArray:Xn}=Array,Kn=$o("undefined");function Gr(e){return e!==null&&!Kn(e)&&e.constructor!==null&&!Kn(e.constructor)&&Ae(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const dp=nt("ArrayBuffer");function hv(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&dp(e.buffer),t}const mv=$o("string"),Ae=$o("function"),pp=$o("number"),Xr=e=>e!==null&&typeof e=="object",gv=e=>e===!0||e===!1,ji=e=>{if(jo(e)!=="object")return!1;const t=Ra(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(fp in e)&&!(Fo in e)},yv=e=>{if(!Xr(e)||Gr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},vv=nt("Date"),wv=nt("File"),Sv=e=>!!(e&&typeof e.uri<"u"),kv=e=>e&&typeof e.getParts<"u",xv=nt("Blob"),Ev=nt("FileList"),Cv=e=>Xr(e)&&Ae(e.pipe);function Pv(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Xu=Pv(),Zu=typeof Xu.FormData<"u"?Xu.FormData:void 0,Ov=e=>{let t;return e&&(Zu&&e instanceof Zu||Ae(e.append)&&((t=jo(e))==="formdata"||t==="object"&&Ae(e.toString)&&e.toString()==="[object FormData]"))},Rv=nt("URLSearchParams"),[Lv,_v,Tv,Nv]=["ReadableStream","Request","Response","Headers"].map(nt),Av=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Xn(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const on=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mp=e=>!Kn(e)&&e!==on;function kl(){const{caseless:e,skipUndefined:t}=mp(this)&&this||{},n={},r=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const s=e&&hp(n,o)||o;ji(n[s])&&ji(i)?n[s]=kl(n[s],i):ji(i)?n[s]=kl({},i):Xn(i)?n[s]=i.slice():(!t||!Kn(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i(Zr(t,(i,o)=>{n&&Ae(i)?Object.defineProperty(e,o,{value:cp(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Dv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Fv=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},jv=(e,t,n,r)=>{let i,o,s;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&Ra(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},$v=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},zv=e=>{if(!e)return null;if(Xn(e))return e;let t=e.length;if(!pp(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Uv=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ra(Uint8Array)),Mv=(e,t)=>{const r=(e&&e[Fo]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Bv=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},bv=nt("HTMLFormElement"),Vv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ec=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Hv=nt("RegExp"),gp=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Zr(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},Kv=e=>{gp(e,(t,n)=>{if(Ae(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ae(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Wv=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Xn(e)?r(e):r(String(e).split(t)),n},Qv=()=>{},qv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Jv(e){return!!(e&&Ae(e.append)&&e[fp]==="FormData"&&e[Fo])}const Yv=e=>{const t=new Array(10),n=(r,i)=>{if(Xr(r)){if(t.indexOf(r)>=0)return;if(Gr(r))return r;if(!("toJSON"in r)){t[i]=r;const o=Xn(r)?[]:{};return Zr(r,(s,l)=>{const a=n(s,i+1);!Kn(a)&&(o[l]=a)}),t[i]=void 0,o}}return r};return n(e,0)},Gv=nt("AsyncFunction"),Xv=e=>e&&(Xr(e)||Ae(e))&&Ae(e.then)&&Ae(e.catch),yp=((e,t)=>e?setImmediate:t?((n,r)=>(on.addEventListener("message",({source:i,data:o})=>{i===on&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),on.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ae(on.postMessage)),Zv=typeof queueMicrotask<"u"?queueMicrotask.bind(on):typeof process<"u"&&process.nextTick||yp,e0=e=>e!=null&&Ae(e[Fo]),S={isArray:Xn,isArrayBuffer:dp,isBuffer:Gr,isFormData:Ov,isArrayBufferView:hv,isString:mv,isNumber:pp,isBoolean:gv,isObject:Xr,isPlainObject:ji,isEmptyObject:yv,isReadableStream:Lv,isRequest:_v,isResponse:Tv,isHeaders:Nv,isUndefined:Kn,isDate:vv,isFile:wv,isReactNativeBlob:Sv,isReactNative:kv,isBlob:xv,isRegExp:Hv,isFunction:Ae,isStream:Cv,isURLSearchParams:Rv,isTypedArray:Uv,isFileList:Ev,forEach:Zr,merge:kl,extend:Iv,trim:Av,stripBOM:Dv,inherits:Fv,toFlatObject:jv,kindOf:jo,kindOfTest:nt,endsWith:$v,toArray:zv,forEachEntry:Mv,matchAll:Bv,isHTMLForm:bv,hasOwnProperty:ec,hasOwnProp:ec,reduceDescriptors:gp,freezeMethods:Kv,toObjectSet:Wv,toCamelCase:Vv,noop:Qv,toFiniteNumber:qv,findKey:hp,global:on,isContextDefined:mp,isSpecCompliantForm:Jv,toJSONObject:Yv,isAsyncFn:Gv,isThenable:Xv,setImmediate:yp,asap:Zv,isIterable:e0};let A=class vp extends Error{static from(t,n,r,i,o,s){const l=new vp(t.message,n||t.code,r,i,o);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),s&&Object.assign(l,s),l}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:S.toJSONObject(this.config),code:this.code,status:this.status}}};A.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";A.ERR_BAD_OPTION="ERR_BAD_OPTION";A.ECONNABORTED="ECONNABORTED";A.ETIMEDOUT="ETIMEDOUT";A.ERR_NETWORK="ERR_NETWORK";A.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";A.ERR_DEPRECATED="ERR_DEPRECATED";A.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";A.ERR_BAD_REQUEST="ERR_BAD_REQUEST";A.ERR_CANCELED="ERR_CANCELED";A.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";A.ERR_INVALID_URL="ERR_INVALID_URL";const t0=null;function xl(e){return S.isPlainObject(e)||S.isArray(e)}function wp(e){return S.endsWith(e,"[]")?e.slice(0,-2):e}function ms(e,t,n){return e?e.concat(t).map(function(i,o){return i=wp(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function n0(e){return S.isArray(e)&&!e.some(xl)}const r0=S.toFlatObject(S,{},null,function(t){return/^is[A-Z]/.test(t)});function zo(e,t,n){if(!S.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=S.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!S.isUndefined(w[v])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&S.isSpecCompliantForm(t);if(!S.isFunction(i))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(S.isDate(d))return d.toISOString();if(S.isBoolean(d))return d.toString();if(!a&&S.isBlob(d))throw new A("Blob is not supported. Use a Buffer instead.");return S.isArrayBuffer(d)||S.isTypedArray(d)?a&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function c(d,v,w){let m=d;if(S.isReactNative(t)&&S.isReactNativeBlob(d))return t.append(ms(w,v,o),u(d)),!1;if(d&&!w&&typeof d=="object"){if(S.endsWith(v,"{}"))v=r?v:v.slice(0,-2),d=JSON.stringify(d);else if(S.isArray(d)&&n0(d)||(S.isFileList(d)||S.endsWith(v,"[]"))&&(m=S.toArray(d)))return v=wp(v),m.forEach(function(g,k){!(S.isUndefined(g)||g===null)&&t.append(s===!0?ms([v],k,o):s===null?v:v+"[]",u(g))}),!1}return xl(d)?!0:(t.append(ms(w,v,o),u(d)),!1)}const f=[],p=Object.assign(r0,{defaultVisitor:c,convertValue:u,isVisitable:xl});function y(d,v){if(!S.isUndefined(d)){if(f.indexOf(d)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(d),S.forEach(d,function(m,h){(!(S.isUndefined(m)||m===null)&&i.call(t,m,S.isString(h)?h.trim():h,v,p))===!0&&y(m,v?v.concat(h):[h])}),f.pop()}}if(!S.isObject(e))throw new TypeError("data must be an object");return y(e),t}function tc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function La(e,t){this._pairs=[],e&&zo(e,this,t)}const Sp=La.prototype;Sp.append=function(t,n){this._pairs.push([t,n])};Sp.toString=function(t){const n=t?function(r){return t.call(this,r,tc)}:tc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function i0(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kp(e,t,n){if(!t)return e;const r=n&&n.encode||i0,i=S.isFunction(n)?{serialize:n}:n,o=i&&i.serialize;let s;if(o?s=o(t,i):s=S.isURLSearchParams(t)?t.toString():new La(t,i).toString(r),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class nc{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){S.forEach(this.handlers,function(r){r!==null&&t(r)})}}const _a={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},o0=typeof URLSearchParams<"u"?URLSearchParams:La,s0=typeof FormData<"u"?FormData:null,l0=typeof Blob<"u"?Blob:null,a0={isBrowser:!0,classes:{URLSearchParams:o0,FormData:s0,Blob:l0},protocols:["http","https","file","blob","url","data"]},Ta=typeof window<"u"&&typeof document<"u",El=typeof navigator=="object"&&navigator||void 0,u0=Ta&&(!El||["ReactNative","NativeScript","NS"].indexOf(El.product)<0),c0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",f0=Ta&&window.location.href||"http://localhost",d0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ta,hasStandardBrowserEnv:u0,hasStandardBrowserWebWorkerEnv:c0,navigator:El,origin:f0},Symbol.toStringTag,{value:"Module"})),ge={...d0,...a0};function p0(e,t){return zo(e,new ge.classes.URLSearchParams,{visitor:function(n,r,i,o){return ge.isNode&&S.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function h0(e){return S.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function m0(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&S.isArray(i)?i.length:s,a?(S.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!l):((!i[s]||!S.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&S.isArray(i[s])&&(i[s]=m0(i[s])),!l)}if(S.isFormData(e)&&S.isFunction(e.entries)){const n={};return S.forEachEntry(e,(r,i)=>{t(h0(r),i,n,0)}),n}return null}function g0(e,t,n){if(S.isString(e))try{return(t||JSON.parse)(e),S.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ei={transitional:_a,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=S.isObject(t);if(o&&S.isHTMLForm(t)&&(t=new FormData(t)),S.isFormData(t))return i?JSON.stringify(xp(t)):t;if(S.isArrayBuffer(t)||S.isBuffer(t)||S.isStream(t)||S.isFile(t)||S.isBlob(t)||S.isReadableStream(t))return t;if(S.isArrayBufferView(t))return t.buffer;if(S.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return p0(t,this.formSerializer).toString();if((l=S.isFileList(t))||r.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return zo(l?{"files[]":t}:t,a&&new a,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),g0(t)):t}],transformResponse:[function(t){const n=this.transitional||ei.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(S.isResponse(t)||S.isReadableStream(t))return t;if(t&&S.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(l){if(s)throw l.name==="SyntaxError"?A.from(l,A.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};S.forEach(["delete","get","head","post","put","patch"],e=>{ei.headers[e]={}});const y0=S.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),v0=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&y0[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},rc=Symbol("internals");function lr(e){return e&&String(e).trim().toLowerCase()}function $i(e){return e===!1||e==null?e:S.isArray(e)?e.map($i):String(e)}function w0(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const S0=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function gs(e,t,n,r,i){if(S.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!S.isString(t)){if(S.isString(r))return t.indexOf(r)!==-1;if(S.isRegExp(r))return r.test(t)}}function k0(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function x0(e,t){const n=S.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let Ie=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(l,a,u){const c=lr(a);if(!c)throw new Error("header name must be a non-empty string");const f=S.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||a]=$i(l))}const s=(l,a)=>S.forEach(l,(u,c)=>o(u,c,a));if(S.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(S.isString(t)&&(t=t.trim())&&!S0(t))s(v0(t),n);else if(S.isObject(t)&&S.isIterable(t)){let l={},a,u;for(const c of t){if(!S.isArray(c))throw TypeError("Object iterator must return a key-value pair");l[u=c[0]]=(a=l[u])?S.isArray(a)?[...a,c[1]]:[a,c[1]]:c[1]}s(l,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=lr(t),t){const r=S.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return w0(i);if(S.isFunction(n))return n.call(this,i,r);if(S.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=lr(t),t){const r=S.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||gs(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=lr(s),s){const l=S.findKey(r,s);l&&(!n||gs(r,r[l],l,n))&&(delete r[l],i=!0)}}return S.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||gs(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return S.forEach(this,(i,o)=>{const s=S.findKey(r,o);if(s){n[s]=$i(i),delete n[o];return}const l=t?k0(o):String(o).trim();l!==o&&delete n[o],n[l]=$i(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return S.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&S.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[rc]=this[rc]={accessors:{}}).accessors,i=this.prototype;function o(s){const l=lr(s);r[l]||(x0(i,s),r[l]=!0)}return S.isArray(t)?t.forEach(o):o(t),this}};Ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(Ie.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});S.freezeMethods(Ie);function ys(e,t){const n=this||ei,r=t||n,i=Ie.from(r.headers);let o=r.data;return S.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ep(e){return!!(e&&e.__CANCEL__)}let ti=class extends A{constructor(t,n,r){super(t??"canceled",A.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Cp(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new A("Request failed with status code "+n.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function E0(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function C0(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),c=r[o];s||(s=u),n[i]=a,r[i]=u;let f=o,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s{n=c,i=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?s(u,c):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const fo=(e,t,n=3)=>{let r=0;const i=C0(50,250);return P0(o=>{const s=o.loaded,l=o.lengthComputable?o.total:void 0,a=s-r,u=i(a),c=s<=l;r=s;const f={loaded:s,total:l,progress:l?s/l:void 0,bytes:a,rate:u||void 0,estimated:u&&l&&c?(l-s)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},ic=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},oc=e=>(...t)=>S.asap(()=>e(...t)),O0=ge.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ge.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,R0=ge.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];S.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),S.isString(r)&&l.push(`path=${r}`),S.isString(i)&&l.push(`domain=${i}`),o===!0&&l.push("secure"),S.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function L0(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _0(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Pp(e,t,n){let r=!L0(t);return e&&(r||n==!1)?_0(e,t):t}const sc=e=>e instanceof Ie?{...e}:e;function hn(e,t){t=t||{};const n={};function r(u,c,f,p){return S.isPlainObject(u)&&S.isPlainObject(c)?S.merge.call({caseless:p},u,c):S.isPlainObject(c)?S.merge({},c):S.isArray(c)?c.slice():c}function i(u,c,f,p){if(S.isUndefined(c)){if(!S.isUndefined(u))return r(void 0,u,f,p)}else return r(u,c,f,p)}function o(u,c){if(!S.isUndefined(c))return r(void 0,c)}function s(u,c){if(S.isUndefined(c)){if(!S.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function l(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const a={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,c,f)=>i(sc(u),sc(c),f,!0)};return S.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const f=S.hasOwnProp(a,c)?a[c]:i,p=f(e[c],t[c],c);S.isUndefined(p)&&f!==l||(n[c]=p)}),n}const Op=e=>{const t=hn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:l}=t;if(t.headers=s=Ie.from(s),t.url=kp(Pp(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),S.isFormData(n)){if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(S.isFunction(n.getHeaders)){const a=n.getHeaders(),u=["content-type","content-length"];Object.entries(a).forEach(([c,f])=>{u.includes(c.toLowerCase())&&s.set(c,f)})}}if(ge.hasStandardBrowserEnv&&(r&&S.isFunction(r)&&(r=r(t)),r||r!==!1&&O0(t.url))){const a=i&&o&&R0.read(o);a&&s.set(i,a)}return t},T0=typeof XMLHttpRequest<"u",N0=T0&&function(e){return new Promise(function(n,r){const i=Op(e);let o=i.data;const s=Ie.from(i.headers).normalize();let{responseType:l,onUploadProgress:a,onDownloadProgress:u}=i,c,f,p,y,d;function v(){y&&y(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(i.method.toUpperCase(),i.url,!0),w.timeout=i.timeout;function m(){if(!w)return;const g=Ie.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:g,config:e,request:w};Cp(function(P){n(P),v()},function(P){r(P),v()},E),w=null}"onloadend"in w?w.onloadend=m:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(m)},w.onabort=function(){w&&(r(new A("Request aborted",A.ECONNABORTED,e,w)),w=null)},w.onerror=function(k){const E=k&&k.message?k.message:"Network Error",R=new A(E,A.ERR_NETWORK,e,w);R.event=k||null,r(R),w=null},w.ontimeout=function(){let k=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||_a;i.timeoutErrorMessage&&(k=i.timeoutErrorMessage),r(new A(k,E.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,e,w)),w=null},o===void 0&&s.setContentType(null),"setRequestHeader"in w&&S.forEach(s.toJSON(),function(k,E){w.setRequestHeader(E,k)}),S.isUndefined(i.withCredentials)||(w.withCredentials=!!i.withCredentials),l&&l!=="json"&&(w.responseType=i.responseType),u&&([p,d]=fo(u,!0),w.addEventListener("progress",p)),a&&w.upload&&([f,y]=fo(a),w.upload.addEventListener("progress",f),w.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(c=g=>{w&&(r(!g||g.type?new ti(null,e,w):g),w.abort(),w=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const h=E0(i.url);if(h&&ge.protocols.indexOf(h)===-1){r(new A("Unsupported protocol "+h+":",A.ERR_BAD_REQUEST,e));return}w.send(o||null)})},A0=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,l();const c=u instanceof Error?u:this.reason;r.abort(c instanceof A?c:new ti(c instanceof Error?c.message:c))}};let s=t&&setTimeout(()=>{s=null,o(new A(`timeout of ${t}ms exceeded`,A.ETIMEDOUT))},t);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>S.asap(l),a}},I0=function*(e,t){let n=e.byteLength;if(n{const i=D0(e,t);let o=0,s,l=a=>{s||(s=!0,r&&r(a))};return new ReadableStream({async pull(a){try{const{done:u,value:c}=await i.next();if(u){l(),a.close();return}let f=c.byteLength;if(n){let p=o+=f;n(p)}a.enqueue(new Uint8Array(c))}catch(u){throw l(u),u}},cancel(a){return l(a),i.return()}},{highWaterMark:2})},ac=64*1024,{isFunction:ki}=S,j0=(({Request:e,Response:t})=>({Request:e,Response:t}))(S.global),{ReadableStream:uc,TextEncoder:cc}=S.global,fc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},$0=e=>{e=S.merge.call({skipUndefined:!0},j0,e);const{fetch:t,Request:n,Response:r}=e,i=t?ki(t):typeof fetch=="function",o=ki(n),s=ki(r);if(!i)return!1;const l=i&&ki(uc),a=i&&(typeof cc=="function"?(d=>v=>d.encode(v))(new cc):async d=>new Uint8Array(await new n(d).arrayBuffer())),u=o&&l&&fc(()=>{let d=!1;const v=new n(ge.origin,{body:new uc,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!v}),c=s&&l&&fc(()=>S.isReadableStream(new r("").body)),f={stream:c&&(d=>d.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!f[d]&&(f[d]=(v,w)=>{let m=v&&v[d];if(m)return m.call(v);throw new A(`Response type '${d}' is not supported`,A.ERR_NOT_SUPPORT,w)})});const p=async d=>{if(d==null)return 0;if(S.isBlob(d))return d.size;if(S.isSpecCompliantForm(d))return(await new n(ge.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(S.isArrayBufferView(d)||S.isArrayBuffer(d))return d.byteLength;if(S.isURLSearchParams(d)&&(d=d+""),S.isString(d))return(await a(d)).byteLength},y=async(d,v)=>{const w=S.toFiniteNumber(d.getContentLength());return w??p(v)};return async d=>{let{url:v,method:w,data:m,signal:h,cancelToken:g,timeout:k,onDownloadProgress:E,onUploadProgress:R,responseType:P,headers:_,withCredentials:j="same-origin",fetchOptions:T}=Op(d),fe=t||fetch;P=P?(P+"").toLowerCase():"text";let Me=A0([h,g&&g.toAbortSignal()],k),V=null;const G=Me&&Me.unsubscribe&&(()=>{Me.unsubscribe()});let Yt;try{if(R&&u&&w!=="get"&&w!=="head"&&(Yt=await y(_,m))!==0){let D=new n(v,{method:"POST",body:m,duplex:"half"}),U;if(S.isFormData(m)&&(U=D.headers.get("content-type"))&&_.setContentType(U),D.body){const[Pe,we]=ic(Yt,fo(oc(R)));m=lc(D.body,ac,Pe,we)}}S.isString(j)||(j=j?"include":"omit");const B=o&&"credentials"in n.prototype,de={...T,signal:Me,method:w.toUpperCase(),headers:_.normalize().toJSON(),body:m,duplex:"half",credentials:B?j:void 0};V=o&&new n(v,de);let O=await(o?fe(V,T):fe(v,de));const N=c&&(P==="stream"||P==="response");if(c&&(E||N&&G)){const D={};["status","statusText","headers"].forEach(ft=>{D[ft]=O[ft]});const U=S.toFiniteNumber(O.headers.get("content-length")),[Pe,we]=E&&ic(U,fo(oc(E),!0))||[];O=new r(lc(O.body,ac,Pe,()=>{we&&we(),G&&G()}),D)}P=P||"text";let F=await f[S.findKey(f,P)||"text"](O,d);return!N&&G&&G(),await new Promise((D,U)=>{Cp(D,U,{data:F,headers:Ie.from(O.headers),status:O.status,statusText:O.statusText,config:d,request:V})})}catch(B){throw G&&G(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,d,V,B&&B.response),{cause:B.cause||B}):A.from(B,B&&B.code,d,V,B&&B.response)}}},z0=new Map,Rp=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,l=s,a,u,c=z0;for(;l--;)a=o[l],u=c.get(a),u===void 0&&c.set(a,u=l?new Map:$0(t)),c=u;return u};Rp();const Na={http:t0,xhr:N0,fetch:{get:Rp}};S.forEach(Na,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const dc=e=>`- ${e}`,U0=e=>S.isFunction(e)||e===null||e===!1;function M0(e,t){e=S.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=n?s.length>1?`since : +`+s.map(dc).join(` +`):" "+dc(s[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return i}const Lp={getAdapter:M0,adapters:Na};function vs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ti(null,e)}function pc(e){return vs(e),e.headers=Ie.from(e.headers),e.data=ys.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lp.getAdapter(e.adapter||ei.adapter,e)(e).then(function(r){return vs(e),r.data=ys.call(e,e.transformResponse,r),r.headers=Ie.from(r.headers),r},function(r){return Ep(r)||(vs(e),r&&r.response&&(r.response.data=ys.call(e,e.transformResponse,r.response),r.response.headers=Ie.from(r.response.headers))),Promise.reject(r)})}const _p="1.13.6",Uo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Uo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const hc={};Uo.transitional=function(t,n,r){function i(o,s){return"[Axios v"+_p+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(t===!1)throw new A(i(s," has been removed"+(n?" in "+n:"")),A.ERR_DEPRECATED);return n&&!hc[s]&&(hc[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,l):!0}};Uo.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function B0(e,t,n){if(typeof e!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const l=e[o],a=l===void 0||s(l,o,e);if(a!==!0)throw new A("option "+o+" must be "+a,A.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new A("Unknown option "+o,A.ERR_BAD_OPTION)}}const zi={assertOptions:B0,validators:Uo},Be=zi.validators;let an=class{constructor(t){this.defaults=t||{},this.interceptors={request:new nc,response:new nc}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=hn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&zi.assertOptions(r,{silentJSONParsing:Be.transitional(Be.boolean),forcedJSONParsing:Be.transitional(Be.boolean),clarifyTimeoutError:Be.transitional(Be.boolean),legacyInterceptorReqResOrdering:Be.transitional(Be.boolean)},!1),i!=null&&(S.isFunction(i)?n.paramsSerializer={serialize:i}:zi.assertOptions(i,{encode:Be.function,serialize:Be.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zi.assertOptions(n,{baseUrl:Be.spelling("baseURL"),withXsrfToken:Be.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&S.merge(o.common,o[n.method]);o&&S.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=Ie.concat(s,o);const l=[];let a=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;a=a&&v.synchronous;const w=n.transitional||_a;w&&w.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,p;if(!a){const d=[pc.bind(this),void 0];for(d.unshift(...l),d.push(...u),p=d.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new ti(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Tp(function(i){t=i}),cancel:t}}};function V0(e){return function(n){return e.apply(null,n)}}function H0(e){return S.isObject(e)&&e.isAxiosError===!0}const Cl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cl).forEach(([e,t])=>{Cl[t]=e});function Np(e){const t=new an(e),n=cp(an.prototype.request,t);return S.extend(n,an.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Np(hn(e,i))},n}const te=Np(ei);te.Axios=an;te.CanceledError=ti;te.CancelToken=b0;te.isCancel=Ep;te.VERSION=_p;te.toFormData=zo;te.AxiosError=A;te.Cancel=te.CanceledError;te.all=function(t){return Promise.all(t)};te.spread=V0;te.isAxiosError=H0;te.mergeConfig=hn;te.AxiosHeaders=Ie;te.formToJSON=e=>xp(S.isHTMLForm(e)?new FormData(e):e);te.getAdapter=Lp.getAdapter;te.HttpStatusCode=Cl;te.default=te;const{Axios:uw,AxiosError:cw,CanceledError:fw,isCancel:dw,CancelToken:pw,VERSION:hw,all:mw,Cancel:gw,isAxiosError:yw,spread:vw,toFormData:ww,AxiosHeaders:Sw,HttpStatusCode:kw,formToJSON:xw,getAdapter:Ew,mergeConfig:Cw}=te,Pw=5e5,ve=te.create({baseURL:"",timeout:3e4,withCredentials:!0,headers:{"Content-Type":"application/json"}});ve.interceptors.request.use(e=>{const t=localStorage.getItem("dist_user_id");return t&&(e.headers["New-Api-User"]=t),e});ve.interceptors.response.use(e=>(e.data&&e.data.success===!1&&e.data.message&&hs.error(e.data.message),e),e=>{var n,r,i;const t=((r=(n=e.response)==null?void 0:n.data)==null?void 0:r.message)||e.message||"Request failed";return((i=e.response)==null?void 0:i.status)===401?(localStorage.removeItem("dist_user_id"),window.dispatchEvent(new Event("auth:logout")),hs.error("Session expired, please log in again")):hs.error(t),Promise.reject(e)});const K0=()=>ve.get("/api/dist/site/info"),Ow=()=>ve.get("/api/dist/site/models"),Rw=()=>ve.get("/api/dist/site/packages"),W0=e=>ve.post("/api/dist/user/register",e),Q0=e=>ve.post("/api/dist/user/login",e),q0=()=>ve.post("/api/dist/user/logout"),ws=()=>ve.get("/api/dist/user/self"),Lw=()=>ve.get("/api/dist/user/usage"),_w=()=>ve.get("/api/dist/token/list"),Tw=e=>ve.post("/api/dist/token/create",e),Nw=(e,t)=>ve.put(`/api/dist/token/${e}`,t),Aw=e=>ve.delete(`/api/dist/token/${e}`),Iw=e=>ve.post("/api/dist/topup/redeem",{key:e}),Dw=e=>ve.post("/api/dist/package/subscribe",{package_id:e}),Ap=x.createContext(null);function J0({children:e}){const[t,n]=x.useState(null),[r,i]=x.useState(!0),o=x.useCallback(async()=>{try{const u=await ws();if(u.data.success)return n(u.data.data),u.data.data}catch{}return null},[]);x.useEffect(()=>{localStorage.getItem("dist_user_id")?ws().then(c=>{c.data.success?n(c.data.data):localStorage.removeItem("dist_user_id")}).catch(()=>{localStorage.removeItem("dist_user_id")}).finally(()=>i(!1)):i(!1)},[]),x.useEffect(()=>{const u=()=>{n(null)};return window.addEventListener("auth:logout",u),()=>window.removeEventListener("auth:logout",u)},[]);const s=x.useCallback(async(u,c)=>{const f=await Q0({username:u,password:c});if(f.data.success){const p=f.data.data;p!=null&&p.id&&localStorage.setItem("dist_user_id",String(p.id));const y=await ws();return y.data.success?n(y.data.data):n(p),{success:!0}}return{success:!1,message:f.data.message}},[]),l=x.useCallback(async u=>{const c=await W0(u);return c.data.success?{success:!0,needsLogin:!0}:{success:!1,message:c.data.message}},[]),a=x.useCallback(async()=>{try{await q0()}catch{}localStorage.removeItem("dist_user_id"),n(null)},[]);return $.jsx(Ap.Provider,{value:{user:t,loading:r,login:s,register:l,logout:a,refreshUser:o},children:e})}function Y0(){const e=x.useContext(Ap);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function G0(){const{user:e,loading:t}=Y0(),n=Gn();return t?$.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:$.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e?$.jsx(cy,{}):$.jsx(np,{to:"/login",state:{from:n},replace:!0})}const Ip=x.createContext(null);function X0({children:e}){const[t,n]=x.useState(null),[r,i]=x.useState(!0);return x.useEffect(()=>{K0().then(o=>{var s,l;if(o.data.success&&(n(o.data.data),(s=o.data.data)!=null&&s.name&&(document.title=o.data.data.name),(l=o.data.data)!=null&&l.favicon)){const a=document.querySelector("link[rel~='icon']")||document.createElement("link");a.rel="icon",a.href=o.data.data.favicon,document.head.appendChild(a)}}).catch(()=>{}).finally(()=>i(!1))},[]),$.jsx(Ip.Provider,{value:{site:t,loading:r},children:e})}function Z0(){const e=x.useContext(Ip);if(!e)throw new Error("useSite must be used within SiteProvider");return e}const Dp=x.createContext(null),mc={starter:{Home:it.lazy(()=>Oe(()=>import("./Home-Nw5uuC4J.js"),__vite__mapDeps([0,1,2,3,4,5]))),Layout:it.lazy(()=>Oe(()=>import("./Layout-CN7Y4VCf.js"),__vite__mapDeps([6,5])))},default:{Home:it.lazy(()=>Oe(()=>import("./Home-Ddxg0eqL.js"),__vite__mapDeps([7,8,3,1,5]))),Layout:it.lazy(()=>Oe(()=>import("./Layout-D6FTlC22.js"),__vite__mapDeps([9,5])))},dark:{Home:it.lazy(()=>Oe(()=>import("./Home-CmajF1bj.js"),__vite__mapDeps([10,8,3,1,5]))),Layout:it.lazy(()=>Oe(()=>import("./Layout-DmfpAhMt.js"),__vite__mapDeps([11,5])))},minimal:{Home:it.lazy(()=>Oe(()=>import("./Home-CmqVbe36.js"),__vite__mapDeps([12,1,5]))),Layout:it.lazy(()=>Oe(()=>import("./Layout-CmT_3-Vm.js"),__vite__mapDeps([13,5])))}};function e1({children:e}){const{site:t}=Z0(),n=(t==null?void 0:t.theme_template)||"starter",r=x.useMemo(()=>{const i=mc[n]||mc.starter;return{name:n,...i}},[n]);return $.jsx(Dp.Provider,{value:r,children:e})}function t1(){const e=x.useContext(Dp);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const n1=x.lazy(()=>Oe(()=>import("./Login-D37tx-Co.js"),__vite__mapDeps([14,5]))),r1=x.lazy(()=>Oe(()=>import("./Register-DiQ0J-Zs.js"),__vite__mapDeps([15,5]))),i1=x.lazy(()=>Oe(()=>import("./Dashboard-B4CiAg5B.js"),__vite__mapDeps([16,4,1,3,2,5]))),o1=x.lazy(()=>Oe(()=>import("./Tokens-C4dgLqWq.js"),__vite__mapDeps([17,5]))),s1=x.lazy(()=>Oe(()=>import("./Packages-p_b3v2L7.js"),__vite__mapDeps([18,4,5]))),l1=x.lazy(()=>Oe(()=>import("./Pricing-BiEw1jsi.js"),__vite__mapDeps([19,5]))),a1=()=>$.jsx("div",{className:"flex items-center justify-center min-h-screen",children:$.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})});function u1(){const{Home:e,Layout:t}=t1();return $.jsx(x.Suspense,{fallback:$.jsx(a1,{}),children:$.jsxs(dy,{children:[$.jsxs(Je,{element:$.jsx(t,{}),children:[$.jsx(Je,{path:"/",element:$.jsx(e,{})}),$.jsx(Je,{path:"/pricing",element:$.jsx(l1,{})}),$.jsx(Je,{path:"/packages",element:$.jsx(s1,{})}),$.jsx(Je,{path:"/login",element:$.jsx(n1,{})}),$.jsx(Je,{path:"/register",element:$.jsx(r1,{})}),$.jsxs(Je,{element:$.jsx(G0,{}),children:[$.jsx(Je,{path:"/dashboard",element:$.jsx(i1,{})}),$.jsx(Je,{path:"/tokens",element:$.jsx(o1,{})})]})]}),$.jsx(Je,{path:"*",element:$.jsx(np,{to:"/",replace:!0})})]})})}function c1(){return $.jsx(e1,{children:$.jsx(u1,{})})}const I=e=>typeof e=="string",ar=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},gc=e=>e==null?"":""+e,f1=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},d1=/###/g,yc=e=>e&&e.indexOf("###")>-1?e.replace(d1,"."):e,vc=e=>!e||I(e),xr=(e,t,n)=>{const r=I(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=xr(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),l=xr(e,s,Object);for(;l.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),l=xr(e,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},p1=(e,t,n,r)=>{const{obj:i,k:o}=xr(e,t,Object);i[o]=i[o]||[],i[o].push(n)},po=(e,t)=>{const{obj:n,k:r}=xr(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},h1=(e,t,n)=>{const r=po(e,n);return r!==void 0?r:po(t,n)},Fp=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?I(e[r])||e[r]instanceof String||I(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Fp(e[r],t[r],n):e[r]=t[r]);return e},Xt=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var m1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const g1=e=>I(e)?e.replace(/[&<>"'\/]/g,t=>m1[t]):e;class y1{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const v1=[" ",",","?","!",";"],w1=new y1(20),S1=(e,t,n)=>{t=t||"",n=n||"";const r=v1.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=w1.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},Pl=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o-1&&ae==null?void 0:e.replace(/_/g,"-"),k1={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class ho{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||k1,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(I(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ho(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ho(this.logger,t)}}var at=new ho;class Mo{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,o])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(t,n,r,i={}){var u,c;const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):I(r)&&o?l.push(...r.split(o)):l.push(r)));const a=po(this.data,l);return!a&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),a||!s||!I(r)?a:Pl((c=(u=this.data)==null?void 0:u[t])==null?void 0:c[n],r,o)}addResource(t,n,r,i,o={silent:!1}){const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(l=t.split("."),i=n,n=l[1]),this.addNamespaces(n),wc(this.data,l,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r,i={silent:!1}){for(const o in r)(I(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o,s={silent:!1,skipCopy:!1}){let l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),i=r,r=n,n=l[1]),this.addNamespaces(n);let a=po(this.data,l)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Fp(a,r,o):a={...a,...r},wc(this.data,l,a),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var jp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{var s;t=((s=this.processors[o])==null?void 0:s.process(t,n,r,i))??t}),t}};const $p=Symbol("i18next/PATH_KEY");function x1(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>{var o;return(o=n==null?void 0:n.revoke)==null||o.call(n),i===$p?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Er(e,t){const{[$p]:n}=e(x1()),r=(t==null?void 0:t.keySeparator)??".",i=(t==null?void 0:t.nsSeparator)??":";if(n.length>1&&i){const o=t==null?void 0:t.ns,s=Array.isArray(o)?o:null;if(s&&s.length>1&&s.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}const kc={},Ss=e=>!I(e)&&typeof e!="boolean"&&typeof e!="number";class mo extends Mo{constructor(t,n={}){super(),f1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=at.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const i=this.resolve(t,r);if((i==null?void 0:i.res)===void 0)return!1;const o=Ss(i.res);return!(r.returnObjects===!1&&o)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!S1(t,r,i);if(s&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:I(o)?[o]:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return{key:t,namespaces:I(o)?[o]:o}}translate(t,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=Er(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(V=>typeof V=="function"?Er(V,{...this.options,...i}):String(V));const o=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:l,namespaces:a}=this.extractFromKey(t[t.length-1],i),u=a[a.length-1];let c=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return p?o?{res:`${u}${c}${l}`,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${c}${l}`:o?{res:l,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:l;const y=this.resolve(t,i);let d=y==null?void 0:y.res;const v=(y==null?void 0:y.usedKey)||l,w=(y==null?void 0:y.exactUsedKey)||l,m=["[object Number]","[object Function]","[object RegExp]"],h=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,k=i.count!==void 0&&!I(i.count),E=mo.hasDefaultValue(i),R=k?this.pluralResolver.getSuffix(f,i.count,i):"",P=i.ordinal&&k?this.pluralResolver.getSuffix(f,i.count,{ordinal:!1}):"",_=k&&!i.ordinal&&i.count===0,j=_&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${R}`]||i[`defaultValue${P}`]||i.defaultValue;let T=d;g&&!d&&E&&(T=j);const fe=Ss(T),Me=Object.prototype.toString.apply(T);if(g&&T&&fe&&m.indexOf(Me)<0&&!(I(h)&&Array.isArray(T))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,T,{...i,ns:a}):`key '${l} (${this.language})' returned an object instead of string.`;return o?(y.res=V,y.usedParams=this.getUsedParamsDetails(i),y):V}if(s){const V=Array.isArray(T),G=V?[]:{},Yt=V?w:v;for(const B in T)if(Object.prototype.hasOwnProperty.call(T,B)){const de=`${Yt}${s}${B}`;E&&!d?G[B]=this.translate(de,{...i,defaultValue:Ss(j)?j[B]:void 0,joinArrays:!1,ns:a}):G[B]=this.translate(de,{...i,joinArrays:!1,ns:a}),G[B]===de&&(G[B]=T[B])}d=G}}else if(g&&I(h)&&Array.isArray(d))d=d.join(h),d&&(d=this.extendTranslation(d,t,i,r));else{let V=!1,G=!1;!this.isValidLookup(d)&&E&&(V=!0,d=j),this.isValidLookup(d)||(G=!0,d=l);const B=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&G?void 0:d,de=E&&j!==d&&this.options.updateMissing;if(G||V||de){if(this.logger.log(de?"updateKey":"missingKey",f,u,l,de?j:d),s){const D=this.resolve(l,{...i,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let O=[];const N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&N&&N[0])for(let D=0;D{var ft;const we=E&&Pe!==d?Pe:B;this.options.missingKeyHandler?this.options.missingKeyHandler(D,u,U,we,de,i):(ft=this.backendConnector)!=null&&ft.saveMissing&&this.backendConnector.saveMissing(D,u,U,we,de,i),this.emit("missingKey",D,u,U,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?O.forEach(D=>{const U=this.pluralResolver.getSuffixes(D,i);_&&i[`defaultValue${this.options.pluralSeparator}zero`]&&U.indexOf(`${this.options.pluralSeparator}zero`)<0&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(Pe=>{F([D],l+Pe,i[`defaultValue${Pe}`]||j)})}):F(O,l,j))}d=this.extendTranslation(d,t,i,y,r),G&&d===l&&this.options.appendNamespaceToMissingKey&&(d=`${u}${c}${l}`),(G||V)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${l}`:l,V?d:void 0,i))}return o?(y.res=d,y.usedParams=this.getUsedParamsDetails(i),y):d}extendTranslation(t,n,r,i,o){var a,u;if((a=this.i18nFormat)!=null&&a.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=I(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(c){const y=t.match(this.interpolator.nestingRegexp);f=y&&y.length}let p=r.replace&&!I(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||i.usedLng,r),c){const y=t.match(this.interpolator.nestingRegexp),d=y&&y.length;f(o==null?void 0:o[0])===y[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):this.translate(...y,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,l=I(s)?[s]:s;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(t=jp.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,o,s,l;return I(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(a=>typeof a=="function"?Er(a,{...this.options,...n}):a)),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),c=u.key;i=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=n.count!==void 0&&!I(n.count),y=p&&!n.ordinal&&n.count===0,d=n.context!==void 0&&(I(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(w=>{var m,h;this.isValidLookup(r)||(l=w,!kc[`${v[0]}-${w}`]&&((m=this.utils)!=null&&m.hasLoadedNamespace)&&!((h=this.utils)!=null&&h.hasLoadedNamespace(l))&&(kc[`${v[0]}-${w}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(g=>{var R;if(this.isValidLookup(r))return;s=g;const k=[c];if((R=this.i18nFormat)!=null&&R.addLookupKeys)this.i18nFormat.addLookupKeys(k,c,g,w,n);else{let P;p&&(P=this.pluralResolver.getSuffix(g,n.count,n));const _=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(n.ordinal&&P.indexOf(j)===0&&k.push(c+P.replace(j,this.options.pluralSeparator)),k.push(c+P),y&&k.push(c+_)),d){const T=`${c}${this.options.contextSeparator||"_"}${n.context}`;k.push(T),p&&(n.ordinal&&P.indexOf(j)===0&&k.push(T+P.replace(j,this.options.pluralSeparator)),k.push(T+P),y&&k.push(T+_))}}let E;for(;E=k.pop();)this.isValidLookup(r)||(o=E,r=this.getResource(g,w,E,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,i={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!I(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class xc{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=at.create("languageUtils")}getScriptPartFromCode(t){if(t=Hr(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Hr(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(I(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(s=>{if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&(s.indexOf("-")>0&&o.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===o||s.indexOf(o)===0&&o.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),I(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return I(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):I(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}const Ec={zero:0,one:1,two:2,few:3,many:4,other:5},Cc={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class E1{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=at.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Hr(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Cc;if(!t.match(/-|_/))return Cc;const a=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(a,n)}return this.pluralRulesCache[o]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>Ec[i]-Ec[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,r={}){const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const Pc=(e,t,n,r=".",i=!0)=>{let o=h1(e,t,n);return!o&&i&&I(n)&&(o=Pl(e,n,r),o===void 0&&(o=Pl(t,n,r))),o},ks=e=>e.replace(/\$/g,"$$$$");class Oc{constructor(t={}){var n;this.logger=at.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:l,suffixEscaped:a,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:y,nestingSuffix:d,nestingSuffixEscaped:v,nestingOptionsSeparator:w,maxReplaces:m,alwaysFormat:h}=t.interpolation;this.escape=n!==void 0?n:g1,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Xt(o):s||"{{",this.suffix=l?Xt(l):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=p?Xt(p):y||Xt("$t("),this.nestingSuffix=d?Xt(d):v||Xt(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=m||1e3,this.alwaysFormat=h!==void 0?h:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,i){var y;let o,s,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=d=>{if(d.indexOf(this.formatSeparator)<0){const h=Pc(n,a,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(h,void 0,r,{...i,...n,interpolationkey:d}):h}const v=d.split(this.formatSeparator),w=v.shift().trim(),m=v.join(this.formatSeparator).trim();return this.format(Pc(n,a,w,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...i,...n,interpolationkey:w})};this.resetRegExp();const c=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((y=i==null?void 0:i.interpolation)==null?void 0:y.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>ks(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?ks(this.escape(d)):ks(d)}].forEach(d=>{for(l=0;o=d.regex.exec(t);){const v=o[1].trim();if(s=u(v),s===void 0)if(typeof c=="function"){const m=c(t,o,i);s=I(m)?m:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))s="";else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),s="";else!I(s)&&!this.useRawValueToEscape&&(s=gc(s));const w=d.safeValue(s);if(t=t.replace(o[0],w),f?(d.regex.lastIndex+=s.length,d.regex.lastIndex-=o[0].length):d.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n,r={}){let i,o,s;const l=(a,u)=>{const c=this.nestingOptionsSeparator;if(a.indexOf(c)<0)return a;const f=a.split(new RegExp(`${Xt(c)}[ ]*{`));let p=`{${f[1]}`;a=f[0],p=this.interpolate(p,s);const y=p.match(/'/g),d=p.match(/"/g);(((y==null?void 0:y.length)??0)%2===0&&!d||((d==null?void 0:d.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),u&&(s={...u,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,v),`${a}${c}${p}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,a};for(;i=this.nestingRegexp.exec(t);){let a=[];s={...r},s=s.replace&&!I(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(a=i[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),o=n(l.call(this,i[1].trim(),s),s),o&&i[0]===t&&!I(o))return o;I(o)||(o=gc(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),a.length&&(o=a.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const C1=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[l,...a]=s.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,""),c=l.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Rc=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let l=t[s];return l||(l=e(Hr(r),i),t[s]=l),l(n)}},P1=e=>(t,n,r)=>e(Hr(n),r)(t);class O1{constructor(t={}){this.logger=at.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Rc:P1;this.formats={number:r((i,o)=>{const s=new Intl.NumberFormat(i,{...o});return l=>s.format(l)}),currency:r((i,o)=>{const s=new Intl.NumberFormat(i,{...o,style:"currency"});return l=>s.format(l)}),datetime:r((i,o)=>{const s=new Intl.DateTimeFormat(i,{...o});return l=>s.format(l)}),relativetime:r((i,o)=>{const s=new Intl.RelativeTimeFormat(i,{...o});return l=>s.format(l,o.range||"day")}),list:r((i,o)=>{const s=new Intl.ListFormat(i,{...o});return l=>s.format(l)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Rc(n)}format(t,n,r,i={}){const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){const l=o.findIndex(a=>a.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,a)=>{var f;const{formatName:u,formatOptions:c}=C1(a);if(this.formats[u]){let p=l;try{const y=((f=i==null?void 0:i.formatParams)==null?void 0:f[i.interpolationkey])||{},d=y.locale||y.lng||i.locale||i.lng||r;p=this.formats[u](l,d,{...c,...i,...y})}catch(y){this.logger.warn(y)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const R1=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class L1 extends Mo{constructor(t,n,r,i={}){var o,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=at.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},l={},a={};return t.forEach(u=>{let c=!0;n.forEach(f=>{const p=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,c=!1,s[p]===void 0&&(s[p]=!0),o[p]===void 0&&(o[p]=!0),a[f]===void 0&&(a[f]=!0)))}),c||(l[u]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(a=>{p1(a.loaded,[o],s),R1(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const c=a.loaded[u];c.length&&c.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r,i=0,o=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const l=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(u,c)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(c=>l(null,c)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();I(t)&&(t=this.languageUtils.toResolveHierarchy(t)),I(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,l),this.loaded(t,s,l)})}saveMissing(t,n,r,i,o,s={},l=()=>{}){var a,u,c,f,p;if((u=(a=this.services)==null?void 0:a.utils)!=null&&u.hasLoadedNamespace&&!((f=(c=this.services)==null?void 0:c.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((p=this.backend)!=null&&p.create){const y={...s,isUpdate:o},d=this.backend.create.bind(this.backend);if(d.length<6)try{let v;d.length===5?v=d(t,n,r,i,y):v=d(t,n,r,i),v&&typeof v.then=="function"?v.then(w=>l(null,w)).catch(l):l(null,v)}catch(v){l(v)}else d(t,n,r,i,l,y)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const xs=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),I(e[1])&&(t.defaultValue=e[1]),I(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Lc=e=>{var t,n;return I(e.ns)&&(e.ns=[e.ns]),I(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),I(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},xi=()=>{},_1=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})},zp="__i18next_supportNoticeShown",T1=()=>typeof globalThis<"u"&&!!globalThis[zp],N1=()=>{typeof globalThis<"u"&&(globalThis[zp]=!0)},A1=e=>{var t,n,r,i,o,s,l,a,u,c,f,p,y;return!!(((r=(n=(t=e==null?void 0:e.modules)==null?void 0:t.backend)==null?void 0:n.name)==null?void 0:r.indexOf("Locize"))>0||((l=(s=(o=(i=e==null?void 0:e.modules)==null?void 0:i.backend)==null?void 0:o.constructor)==null?void 0:s.name)==null?void 0:l.indexOf("Locize"))>0||(u=(a=e==null?void 0:e.options)==null?void 0:a.backend)!=null&&u.backends&&e.options.backend.backends.some(d=>{var v,w,m;return((v=d==null?void 0:d.name)==null?void 0:v.indexOf("Locize"))>0||((m=(w=d==null?void 0:d.constructor)==null?void 0:w.name)==null?void 0:m.indexOf("Locize"))>0})||(f=(c=e==null?void 0:e.options)==null?void 0:c.backend)!=null&&f.projectId||(y=(p=e==null?void 0:e.options)==null?void 0:p.backend)!=null&&y.backendOptions&&e.options.backend.backendOptions.some(d=>d==null?void 0:d.projectId))};class Cr extends Mo{constructor(t={},n){if(super(),this.options=Lc(t),this.services={},this.logger=at,this.modules={external:[]},_1(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(I(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=xs();this.options={...r,...this.options,...Lc(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!A1(this)&&!T1()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),N1());const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?at.init(i(this.modules.logger),this.options):at.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=O1;const c=new xc(this.options);this.store=new Sc(this.options.resources,this.options);const f=this.services;f.logger=at,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new E1(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=i(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Oc(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new L1(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(y,...d)=>{this.emit(y,...d)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new mo(this.services,this.options),this.translator.on("*",(y,...d)=>{this.emit(y,...d)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,n||(n=xi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const l=ar(),a=()=>{const u=(c,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(c,f)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),l}loadResources(t,n=xi){var o,s;let r=n;const i=I(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],a=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&l.indexOf(f)<0&&l.push(f)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),(s=(o=this.options.preload)==null?void 0:o.forEach)==null||s.call(o,u=>a(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=ar();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=xi),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&jp.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=ar();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,a)=>{a?this.isLanguageChangingTo===t&&(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(l,(...u)=>this.t(...u))},s=l=>{var c,f;!t&&!l&&this.services.languageDetector&&(l=[]);const a=I(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(a)?a:this.services.languageUtils.getBestMatchFromCodes(I(l)?[l]:l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(f=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||f.call(c,u)),this.loadResources(u,p=>{o(p,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r){const i=(o,s,...l)=>{let a;typeof s!="object"?a=this.options.overloadTranslationOptionHandler([o,s].concat(l)):a={...s},a.lng=a.lng||i.lng,a.lngs=a.lngs||i.lngs,a.ns=a.ns||i.ns,a.keyPrefix!==""&&(a.keyPrefix=a.keyPrefix||r||i.keyPrefix);const u={...this.options,...a},c=this.options.keySeparator||".";let f;return a.keyPrefix&&Array.isArray(o)?f=o.map(p=>(typeof p=="function"&&(p=Er(p,u)),`${a.keyPrefix}${c}${p}`)):(typeof o=="function"&&(o=Er(o,u)),f=a.keyPrefix?`${a.keyPrefix}${c}${o}`:o),this.t(f,a)};return I(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=ar();return this.options.ns?(I(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ar();I(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var i,o;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((o=this.services)==null?void 0:o.languageUtils)||new xc(xs());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Cr(t,n);return r.createInstance=Cr.createInstance,r}cloneInstance(t={},n=xi){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Cr(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const l=Object.keys(this.store.data).reduce((a,u)=>(a[u]={...this.store.data[u]},a[u]=Object.keys(a[u]).reduce((c,f)=>(c[f]={...a[u][f]},c),a[u]),a),{});o.store=new Sc(l,i),o.services.resourceStore=o.store}if(t.interpolation){const a={...xs().interpolation,...this.options.interpolation,...t.interpolation},u={...i,interpolation:a};o.services.interpolator=new Oc(u)}return o.translator=new mo(o.services,i),o.translator.on("*",(l,...a)=>{o.emit(l,...a)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ce=Cr.createInstance();Ce.createInstance;Ce.dir;Ce.init;Ce.loadResources;Ce.reloadResources;Ce.use;Ce.changeLanguage;Ce.getFixedT;Ce.t;Ce.exists;Ce.setDefaultNamespace;Ce.hasLoadedNamespace;Ce.loadNamespaces;Ce.loadLanguages;const I1=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,D1={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},F1=e=>D1[e],j1=e=>e.replace(I1,F1);let Ol={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:j1,transDefaultProps:void 0};const $1=(e={})=>{Ol={...Ol,...e}},Fw=()=>Ol;let Up;const z1=e=>{Up=e},jw=()=>Up,U1={type:"3rdParty",init(e){$1(e.options.react),z1(e)}},{slice:M1,forEach:B1}=[];function b1(e){return B1.call(M1.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function V1(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const _c=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,H1=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!_c.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!_c.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},Tc={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=H1(e,t,i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let l=0;l0&&s[l].substring(0,a)===t&&(n=s[l].substring(a+1))}}return n}},Q1={name:"hash",lookup(e){var i;let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const s=o.substring(1);if(t){const l=s.split("&");for(let a=0;a0&&l[a].substring(0,u)===t&&(r=l[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const l=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?(i=l[typeof n=="number"?n:0])==null?void 0:i.replace("/",""):void 0}}}return r}};let vn=null;const Nc=()=>{if(vn!==null)return vn;try{if(vn=typeof window<"u"&&window.localStorage!==null,!vn)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{vn=!1}return vn};var q1={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Nc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Nc()&&window.localStorage.setItem(n,e)}};let wn=null;const Ac=()=>{if(wn!==null)return wn;try{if(wn=typeof window<"u"&&window.sessionStorage!==null,!wn)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{wn=!1}return wn};var J1={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Ac())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Ac()&&window.sessionStorage.setItem(n,e)}},Y1={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},G1={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},X1={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},Z1={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let Mp=!1;try{document.cookie,Mp=!0}catch{}const Bp=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Mp||Bp.splice(1,1);const ew=()=>({order:Bp,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class bp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=b1(n,this.options||{},ew()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(K1),this.addDetector(W1),this.addDetector(q1),this.addDetector(J1),this.addDetector(Y1),this.addDetector(G1),this.addDetector(X1),this.addDetector(Z1),this.addDetector(Q1)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.filter(r=>r!=null&&!V1(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}bp.type="languageDetector";const tw={"nav.home":"Home","nav.pricing":"Pricing","nav.packages":"Packages","nav.dashboard":"Dashboard","nav.apiKeys":"API Keys","nav.login":"Login","nav.signUp":"Sign Up","nav.logout":"Logout","nav.contact":"Contact","home.heroSubtitle":"Access the world's most powerful AI models through a single API endpoint. Simple, affordable, reliable.","home.getStarted":"Get Started Free","home.viewPricing":"View Pricing","home.goToDashboard":"Go to Dashboard","home.aiModels":"AI Models","home.uptime":"Uptime","home.latency":"Latency","home.whyChooseUs":"Why Choose Us","home.whyChooseUsDesc":"Everything you need to build AI-powered applications","home.lightningFast":"Lightning Fast","home.lightningFastDesc":"Optimized routing and caching deliver responses with minimal latency. Load-balanced across multiple providers for maximum reliability.","home.securePrivate":"Secure & Private","home.securePrivateDesc":"Enterprise-grade security with encrypted API keys. No request logging by default. Your data stays your data.","home.payAsYouGo":"Pay As You Go","home.payAsYouGoDesc":"Transparent pricing with no hidden fees. Only pay for what you use. Multiple top-up options and subscription packages available.","home.availableModels":"Available Models","home.availableModelsDesc":"Access {{count}} AI models through a unified API","home.viewAllModels":"View all {{count}} models","home.plansPackages":"Plans & Packages","home.choosePlan":"Choose a plan that fits your needs","home.subscribe":"Subscribe","home.days":"{{count}} days","home.readyToStart":"Ready to Get Started?","home.readyToStartDesc":"Create your account and start building with AI in minutes. No credit card required.","home.createFreeAccount":"Create Free Account","home.signIn":"Sign In","home.defaultHeroTitle":"AI API Platform","login.welcomeBack":"Welcome Back","login.signInTo":"Sign in to {{name}}","login.signInToDefault":"Sign in to your account","login.username":"Username","login.password":"Password","login.enterUsername":"Enter your username","login.enterPassword":"Enter your password","login.signingIn":"Signing in...","login.signInBtn":"Sign In","login.noAccount":"Don't have an account?","login.createOne":"Create one","login.fillAllFields":"Please fill in all fields","login.welcomeBackToast":"Welcome back!","register.createAccount":"Create Account","register.getStartedWith":"Get started with {{name}}","register.getStartedDefault":"Get started with our platform","register.username":"Username","register.email":"Email","register.password":"Password","register.confirmPassword":"Confirm Password","register.chooseUsername":"Choose a username","register.emailPlaceholder":"your@email.com (optional)","register.passwordPlaceholder":"8-20 characters","register.repeatPassword":"Repeat your password","register.creating":"Creating...","register.createAccountBtn":"Create Account","register.hasAccount":"Already have an account?","register.signIn":"Sign in","register.fillRequired":"Please fill in all required fields","register.passwordMismatch":"Passwords do not match","register.passwordLength":"Password must be 8-20 characters","register.accountCreated":"Account created! Please sign in.","dashboard.welcome":"Welcome,","dashboard.manageDesc":"Manage your API usage, keys, and account","dashboard.balance":"Balance","dashboard.quotaUnits":"{{count}} quota units","dashboard.used":"Used","dashboard.totalRequests":"Total Requests","dashboard.redeemCode":"Redeem Code","dashboard.enterCode":"Enter redemption code","dashboard.redeeming":"Redeeming...","dashboard.redeem":"Redeem","dashboard.redeemSuccess":"Code redeemed successfully!","dashboard.quickLinks":"Quick Links","dashboard.apiKeys":"API Keys","dashboard.manageKeys":"Manage your keys","dashboard.packages":"Packages","dashboard.viewPlans":"View plans","dashboard.pricing":"Pricing","dashboard.modelPrices":"Model prices","dashboard.apiDocs":"API Docs","dashboard.comingSoon":"Coming soon","tokens.title":"API Keys","tokens.subtitle":"Manage your API access tokens","tokens.newKey":"+ New Key","tokens.createApiKey":"Create API Key","tokens.name":"Name","tokens.namePlaceholder":"e.g. my-app-key","tokens.cancel":"Cancel","tokens.creating":"Creating...","tokens.create":"Create","tokens.newApiKey":"Your New API Key","tokens.keyWarning":"This is the only time you'll see this key. Copy it now and store it securely.","tokens.copied":"Copied!","tokens.copy":"Copy","tokens.copiedToClipboard":"Copied to clipboard!","tokens.savedKey":"I've saved my key","tokens.deleteToken":"Delete Token","tokens.deleteConfirm":'Delete "{{name}}"? This cannot be undone.',"tokens.delete":"Delete","tokens.noKeys":"No API keys yet","tokens.createFirst":"Create Your First Key","tokens.enabled":"Enabled","tokens.disabled":"Disabled","tokens.tokenDisabled":"Token disabled","tokens.tokenEnabled":"Token enabled","tokens.tokenDeleted":"Token deleted","tokens.enterName":"Please enter a name","tokens.quickStart":"Quick Start","tokens.quickStartComment":"# Use your API key with OpenAI-compatible endpoint","pricing.title":"Model Pricing","pricing.subtitle":"Transparent, pay-as-you-go pricing for all available models. Prices shown per 1M tokens.","pricing.searchPlaceholder":"Search models...","pricing.noMatch":"No models match your search","pricing.noModels":"No models available","pricing.model":"Model","pricing.inputPrice":"Input / 1M tokens","pricing.outputPrice":"Output / 1M tokens","pricing.status":"Status","pricing.online":"Online","pricing.unknown":"Unknown","packages.title":"Packages & Plans","packages.subtitle":"Choose a package that fits your usage. All plans include access to all available models.","packages.noPackages":"No packages available at the moment.","packages.checkPricing":"Check model pricing","packages.daysAccess":"{{count}} days access","packages.creditIncluded":"${{amount}} credit included","packages.requestsMin":"{{count}} requests/min","packages.allModels":"All models access","packages.openaiApi":"OpenAI-compatible API","packages.subscribeNow":"Subscribe Now","packages.signUpToSubscribe":"Sign Up to Subscribe","packages.processing":"Processing...","packages.confirmTitle":"Confirm Subscription","packages.confirmDesc":"Subscribe to {{name}} for ${{price}}?","packages.yourBalance":"Your balance:","packages.insufficientBalance":"Insufficient balance. Please top up before subscribing.","packages.confirm":"Confirm","packages.subscribedSuccess":"Subscribed successfully!","common.sessionExpired":"Session expired, please log in again","common.requestFailed":"Request failed"},nw={translation:tw},rw={"nav.home":"首页","nav.pricing":"定价","nav.packages":"套餐","nav.dashboard":"控制台","nav.apiKeys":"API 密钥","nav.login":"登录","nav.signUp":"注册","nav.logout":"退出","nav.contact":"联系我们","home.heroSubtitle":"通过单一 API 端点访问全球最强大的 AI 模型。简单、实惠、可靠。","home.getStarted":"免费开始","home.viewPricing":"查看定价","home.goToDashboard":"进入控制台","home.aiModels":"AI 模型","home.uptime":"在线率","home.latency":"延迟","home.whyChooseUs":"为什么选择我们","home.whyChooseUsDesc":"构建 AI 应用所需的一切","home.lightningFast":"极速响应","home.lightningFastDesc":"优化的路由和缓存以最低延迟交付响应。跨多个供应商负载均衡,确保最大可靠性。","home.securePrivate":"安全可靠","home.securePrivateDesc":"企业级安全性,API 密钥加密存储。默认不记录请求日志。您的数据由您掌控。","home.payAsYouGo":"按量付费","home.payAsYouGoDesc":"透明定价,无隐藏费用。按使用量付费。提供多种充值方式和订阅套餐。","home.availableModels":"可用模型","home.availableModelsDesc":"通过统一 API 访问 {{count}} 个 AI 模型","home.viewAllModels":"查看全部 {{count}} 个模型","home.plansPackages":"套餐方案","home.choosePlan":"选择适合您需求的方案","home.subscribe":"订阅","home.days":"{{count}} 天","home.readyToStart":"准备好了吗?","home.readyToStartDesc":"创建账户,几分钟内即可开始使用 AI 构建应用。无需信用卡。","home.createFreeAccount":"免费创建账户","home.signIn":"登录","home.defaultHeroTitle":"AI API 平台","login.welcomeBack":"欢迎回来","login.signInTo":"登录到 {{name}}","login.signInToDefault":"登录您的账户","login.username":"用户名","login.password":"密码","login.enterUsername":"请输入用户名","login.enterPassword":"请输入密码","login.signingIn":"登录中...","login.signInBtn":"登录","login.noAccount":"还没有账户?","login.createOne":"立即注册","login.fillAllFields":"请填写所有字段","login.welcomeBackToast":"欢迎回来!","register.createAccount":"创建账户","register.getStartedWith":"开始使用 {{name}}","register.getStartedDefault":"开始使用我们的平台","register.username":"用户名","register.email":"邮箱","register.password":"密码","register.confirmPassword":"确认密码","register.chooseUsername":"请选择用户名","register.emailPlaceholder":"your@email.com(可选)","register.passwordPlaceholder":"8-20 个字符","register.repeatPassword":"请再次输入密码","register.creating":"创建中...","register.createAccountBtn":"创建账户","register.hasAccount":"已有账户?","register.signIn":"立即登录","register.fillRequired":"请填写所有必填字段","register.passwordMismatch":"两次密码不一致","register.passwordLength":"密码长度需为 8-20 个字符","register.accountCreated":"账户创建成功!请登录。","dashboard.welcome":"欢迎,","dashboard.manageDesc":"管理您的 API 用量、密钥和账户","dashboard.balance":"余额","dashboard.quotaUnits":"{{count}} 额度单位","dashboard.used":"已使用","dashboard.totalRequests":"总请求数","dashboard.redeemCode":"兑换码","dashboard.enterCode":"请输入兑换码","dashboard.redeeming":"兑换中...","dashboard.redeem":"兑换","dashboard.redeemSuccess":"兑换码兑换成功!","dashboard.quickLinks":"快捷入口","dashboard.apiKeys":"API 密钥","dashboard.manageKeys":"管理您的密钥","dashboard.packages":"套餐","dashboard.viewPlans":"查看方案","dashboard.pricing":"定价","dashboard.modelPrices":"模型价格","dashboard.apiDocs":"API 文档","dashboard.comingSoon":"即将推出","tokens.title":"API 密钥","tokens.subtitle":"管理您的 API 访问令牌","tokens.newKey":"+ 新建密钥","tokens.createApiKey":"创建 API 密钥","tokens.name":"名称","tokens.namePlaceholder":"例如 my-app-key","tokens.cancel":"取消","tokens.creating":"创建中...","tokens.create":"创建","tokens.newApiKey":"您的新 API 密钥","tokens.keyWarning":"这是您唯一一次看到此密钥的机会。请立即复制并安全保存。","tokens.copied":"已复制!","tokens.copy":"复制","tokens.copiedToClipboard":"已复制到剪贴板!","tokens.savedKey":"我已保存密钥","tokens.deleteToken":"删除令牌","tokens.deleteConfirm":'删除 "{{name}}"?此操作不可撤销。',"tokens.delete":"删除","tokens.noKeys":"暂无 API 密钥","tokens.createFirst":"创建您的第一个密钥","tokens.enabled":"已启用","tokens.disabled":"已禁用","tokens.tokenDisabled":"令牌已禁用","tokens.tokenEnabled":"令牌已启用","tokens.tokenDeleted":"令牌已删除","tokens.enterName":"请输入名称","tokens.quickStart":"快速开始","tokens.quickStartComment":"# 使用 OpenAI 兼容端点调用 API","pricing.title":"模型定价","pricing.subtitle":"透明的按量付费定价。价格以每百万 token 计。","pricing.searchPlaceholder":"搜索模型...","pricing.noMatch":"没有匹配的模型","pricing.noModels":"暂无可用模型","pricing.model":"模型","pricing.inputPrice":"输入 / 百万 token","pricing.outputPrice":"输出 / 百万 token","pricing.status":"状态","pricing.online":"在线","pricing.unknown":"未知","packages.title":"套餐方案","packages.subtitle":"选择适合您用量的套餐。所有方案均可访问全部可用模型。","packages.noPackages":"暂无可用套餐。","packages.checkPricing":"查看模型定价","packages.daysAccess":"{{count}} 天有效期","packages.creditIncluded":"含 ${{amount}} 额度","packages.requestsMin":"{{count}} 次请求/分钟","packages.allModels":"全部模型可用","packages.openaiApi":"OpenAI 兼容 API","packages.subscribeNow":"立即订阅","packages.signUpToSubscribe":"注册后订阅","packages.processing":"处理中...","packages.confirmTitle":"确认订阅","packages.confirmDesc":"订阅 {{name}},价格 ${{price}}?","packages.yourBalance":"您的余额:","packages.insufficientBalance":"余额不足,请先充值。","packages.confirm":"确认","packages.subscribedSuccess":"订阅成功!","common.sessionExpired":"会话已过期,请重新登录","common.requestFailed":"请求失败"},iw={translation:rw};Ce.use(bp).use(U1).init({load:"languageOnly",resources:{en:nw,zh:iw},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["navigator","htmlTag","querystring"],caches:["localStorage"]}});Es.createRoot(document.getElementById("root")).render($.jsx(it.StrictMode,{children:$.jsx(wy,{children:$.jsx(X0,{children:$.jsxs(J0,{children:[$.jsx(c1,{}),$.jsx(cv,{position:"top-center",toastOptions:{duration:3e3,style:{background:"#1a1a2e",color:"#fff",border:"1px solid rgba(255,255,255,0.08)",borderRadius:"12px",fontSize:"14px"}}})]})})})}));export{ow as L,np as N,cy as O,Pw as Q,Z0 as a,Gd as b,Gn as c,Iw as d,_w as e,Tw as f,Lw as g,Nw as h,Aw as i,$ as j,Rw as k,Ow as l,Fw as m,jw as n,x as r,Dw as s,Y0 as u,hs as z}; diff --git a/dist/assets/proxy-BOtdvQpP.js b/dist/assets/proxy-BOtdvQpP.js new file mode 100644 index 0000000..e7506c9 --- /dev/null +++ b/dist/assets/proxy-BOtdvQpP.js @@ -0,0 +1 @@ +import{r as w,j as Yt}from"./index-Drgd7k5E.js";import{n as ve,p,f as S,g as Ss,i as Vs,W as Jn,h as As,j as xe,m as Tt,s as X,k as W,l as Cs,o as bs,q as Es,r as Ds,J as bt,t as et,v as Te,w as F,x as ct,y as Qn,z as nt,A as b,B as ht,D as O,E as Ms,F as Rs,G as Ls,H as He,I as _t,K as yt,L as B,N as Bs,O as ze,P as ks,Q as ti,c as Z,S as ei,R as V,T as ni,U as Zt,V as Is,X as ii,Y as qt,Z as M,_ as jt,b as js,M as si,d as Fs,$ as oi}from"./CountUp-Omm8FlHl.js";const ri=w.createContext({}),we=w.createContext(null),ai=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function li(t){return typeof t=="object"&&t!==null}const ui=t=>/^0[^.\s]+$/u.test(t);function ci(t){let e;return()=>(e===void 0&&(e=t()),e)}function Os(t){for(let e=1;et*180/Math.PI,Jt=t=>{const e=$(Math.atan2(t[1],t[0]));return Qt(e)},Ns={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Jt,rotateZ:Jt,skewX:t=>$(Math.atan(t[1])),skewY:t=>$(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Qt=t=>(t=t%360,t<0&&(t+=360),t),Ge=Jt,$e=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Xe=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Us={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:$e,scaleY:Xe,scale:t=>($e(t)+Xe(t))/2,rotateX:t=>Qt($(Math.atan2(t[6],t[5]))),rotateY:t=>Qt($(Math.atan2(-t[2],t[0]))),rotateZ:Ge,rotate:Ge,skewX:t=>$(Math.atan(t[4])),skewY:t=>$(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function te(t){return t.includes("scale")?1:0}function ee(t,e){if(!t||t==="none")return te(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Us,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Ns,s=a}if(!s)return te(e);const r=i[e],o=s[1].split(",").map(Ks);return typeof r=="function"?r(o):o[r]}const Ws=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ee(n,e)};function Ks(t){return parseFloat(t.trim())}const it=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],st=new Set(it),Ye=t=>t===ve||t===p,Hs=new Set(["x","y","z"]),zs=it.filter(t=>!Hs.has(t));function Gs(t){const e=[];return zs.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const U={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ee(e,"x"),y:(t,{transform:e})=>ee(e,"y")};U.translateX=U.x;U.translateY=U.y;const Y=new Set;let ne=!1,ie=!1,se=!1;function hi(){if(ie){const t=Array.from(Y).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const s=Gs(i);s.length&&(n.set(i,s),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{var a;(a=i.getValue(r))==null||a.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}ie=!1,ne=!1,Y.forEach(t=>t.complete(se)),Y.clear()}function fi(){Y.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ie=!0)})}function $s(){se=!0,fi(),hi(),se=!1}class Pe{constructor(e,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Y.add(this),ne||(ne=!0,S.read(fi),S.resolveKeyframes(hi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:s}=this;if(e[0]===null){const r=s==null?void 0:s.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&r===void 0&&s.set(e[0])}Os(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Y.delete(this)}cancel(){this.state==="scheduled"&&(Y.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Xs=t=>t.startsWith("--");function di(t,e,n){Xs(e)?t.style.setProperty(e,n):t.style[e]=n}const Ys={};function mi(t,e){const n=ci(t);return()=>Ys[e]??n()}const _s=mi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),pi=mi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),at=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,_e={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:at([0,.65,.55,1]),circOut:at([.55,0,1,.45]),backIn:at([.31,.01,.66,-.59]),backOut:at([.33,1.53,.69,.99])};function gi(t,e){if(t)return typeof t=="function"?pi()?Ss(t,e):"ease-out":Vs(t)?at(t):Array.isArray(t)?t.map(n=>gi(n,e)||_e.easeOut):_e[t]}function Zs(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=gi(a,s);Array.isArray(h)&&(u.easing=h);const f={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function yi(t){return typeof t=="function"&&"applyToOptions"in t}function qs({type:t,...e}){return yi(t)&&pi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class vi extends Jn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,As(typeof e.type!="string");const c=qs(e);this.animation=Zs(n,i,s,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=xe(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),di(n,i,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,i,s;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((s=(i=this.animation).commitStyles)==null||s.call(i))}get duration(){var n,i;const e=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.call(n).duration)||0;return Tt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Tt(e)}get time(){return Tt(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=X(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:i,observe:s}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&_s()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),W):s(this)}}const xi={anticipate:Es,backInOut:bs,circInOut:Cs};function Js(t){return t in xi}function Qs(t){typeof t.ease=="string"&&Js(t.ease)&&(t.ease=xi[t.ease])}const Ft=10;class to extends vi{constructor(e){Qs(e),Ds(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new bt({...o,autoplay:!1}),l=Math.max(Ft,et.now()-this.startTime),c=Te(0,Ft,l-Ft),u=a.sample(l).value,{name:h}=this.options;r&&h&&di(r,h,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const Ze=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(F.test(t)||t==="0")&&!t.startsWith("url("));function eo(t){const e=t[0];if(t.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function ao(t){var h;const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o,keyframes:a}=t;if(!(((h=e==null?void 0:e.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return ro()&&n&&(Ti.has(n)||oo.has(n)&&so(a))&&(n!=="transform"||!u)&&!c&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const lo=40;class uo extends Jn{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){var m;super(),this.stop=()=>{var x,g;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=et.now();const f={autoplay:e,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},d=(u==null?void 0:u.KeyframeResolver)||Pe;this.keyframeResolver=new d(a,(x,g,T)=>this.onKeyframesResolved(x,g,f,!T),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,i,s){var T,y;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=et.now();let h=!0;no(e,r,o,a)||(h=!1,(ct.instantAnimations||!l)&&(u==null||u(xe(e,i,n))),e[0]=e[e.length-1],oe(i),i.repeat=0);const d={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>lo?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=h&&!c&&ao(d),x=(y=(T=d.motionValue)==null?void 0:T.owner)==null?void 0:y.current;let g;if(m)try{g=new to({...d,element:x})}catch{g=new bt(d)}else g=new bt(d);g.finished.then(()=>{this.notifyFinished()}).catch(W),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),$s()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function wi(t,e,n,i=0,s=1){const r=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const co=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ho(t){const e=co.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Pi(t,e,n=1){const[i,s]=ho(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const o=r.trim();return ai(o)?parseFloat(o):o}return Qn(s)?Pi(s,e,n+1):s}const fo={type:"spring",stiffness:500,damping:25,restSpeed:10},mo=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),po={type:"keyframes",duration:.8},go={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},yo=(t,{keyframes:e})=>e.length>2?po:st.has(t)?t.startsWith("scale")?mo(e[1]):fo:go;function Si(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Se(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Si(n,t):n}const vo=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function xo(t){for(const e in t)if(!vo.has(e))return!0;return!1}const Ve=(t,e,n,i={},s,r)=>o=>{const a=Se(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-X(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};xo(a)||Object.assign(u,yo(t,u)),u.duration&&(u.duration=X(u.duration)),u.repeatDelay&&(u.repeatDelay=X(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(oe(u),u.delay===0&&(h=!0)),(ct.instantAnimations||ct.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,oe(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=xe(u.keyframes,a);if(f!==void 0){S.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new bt(u):new uo(u)};function qe(t){const e=[{},{}];return t==null||t.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function Ae(t,e,n,i){if(typeof e=="function"){const[s,r]=qe(i);e=e(n!==void 0?n:t.custom,s,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,r]=qe(i);e=e(n!==void 0?n:t.custom,s,r)}return e}function _(t,e,n){const i=t.getProps();return Ae(i,e,n!==void 0?n:i.custom,t)}const Vi=new Set(["width","height","top","left","right","bottom",...it]),re=t=>Array.isArray(t);function To(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,nt(n))}function wo(t){return re(t)?t[t.length-1]||0:t}function Po(t,e){const n=_(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=wo(r[o]);To(t,o,a)}}function So(t){return!!(b(t)&&t.add)}function ae(t,e){const n=t.getValue("willChange");if(So(n))return n.add(e);if(!n&&ct.WillChange){const i=new ct.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function Ce(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Vo="framerAppearId",Ai="data-"+Ce(Vo);function Ci(t){return t.props[Ai]}function Ao({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function bi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Si(r,l):l;const c=r==null?void 0:r.reduceMotion;i&&(r=i);const u=[],h=s&&t.animationState&&t.animationState.getState()[s];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),m=a[f];if(m===void 0||h&&Ao(h,f))continue;const x={delay:n,...Se(r||{},f)},g=d.get();if(g!==void 0&&!d.isAnimating()&&!Array.isArray(m)&&m===g&&!x.velocity){S.update(()=>d.set(m));continue}let T=!1;if(window.MotionHandoffAnimation){const P=Ci(t);if(P){const E=window.MotionHandoffAnimation(P,f,S);E!==null&&(x.startTime=E,T=!0)}}ae(t,f);const y=c??t.shouldReduceMotion;d.start(Ve(f,d,m,y&&Vi.has(f)?{type:!1}:x,t,T));const v=d.animation;v&&u.push(v)}if(o){const f=()=>S.update(()=>{o&&Po(t,o)});u.length?Promise.all(u).then(f):f()}return u}function le(t,e,n={}){var l;const i=_(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(bi(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=s;return Co(t,e,c,u,h,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[r,o]:[o,r];return c().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function Co(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(le(l,e,{...o,delay:n+(typeof i=="function"?0:i)+wi(t.variantChildren,l,i,s,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function bo(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(r=>le(t,r,n));i=Promise.all(s)}else if(typeof e=="string")i=le(t,e,n);else{const s=typeof e=="function"?_(t,e,n.custom):e;i=Promise.all(bi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Eo={test:t=>t==="auto",parse:t=>t},Ei=t=>e=>e.test(t),Di=[ve,p,ht,O,Ms,Rs,Eo],Je=t=>Di.find(Ei(t));function Do(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ui(t):!0}const Mo=new Set(["brightness","contrast","saturate","opacity"]);function Ro(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(Ls)||[];if(!i)return t;const s=n.replace(i,"");let r=Mo.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const Lo=/\b([a-z-]*)\(.*?\)/gu,ue={...F,getAnimatableNone:t=>{const e=t.match(Lo);return e?e.map(Ro).join(" "):t}},ce={...F,getAnimatableNone:t=>{const e=F.parse(t);return F.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},Qe={...ve,transform:Math.round},Bo={rotate:O,rotateX:O,rotateY:O,rotateZ:O,scale:yt,scaleX:yt,scaleY:yt,scaleZ:yt,skew:O,skewX:O,skewY:O,distance:p,translateX:p,translateY:p,translateZ:p,x:p,y:p,z:p,perspective:p,transformPerspective:p,opacity:_t,originX:He,originY:He,originZ:p},be={borderWidth:p,borderTopWidth:p,borderRightWidth:p,borderBottomWidth:p,borderLeftWidth:p,borderRadius:p,borderTopLeftRadius:p,borderTopRightRadius:p,borderBottomRightRadius:p,borderBottomLeftRadius:p,width:p,maxWidth:p,height:p,maxHeight:p,top:p,right:p,bottom:p,left:p,inset:p,insetBlock:p,insetBlockStart:p,insetBlockEnd:p,insetInline:p,insetInlineStart:p,insetInlineEnd:p,padding:p,paddingTop:p,paddingRight:p,paddingBottom:p,paddingLeft:p,paddingBlock:p,paddingBlockStart:p,paddingBlockEnd:p,paddingInline:p,paddingInlineStart:p,paddingInlineEnd:p,margin:p,marginTop:p,marginRight:p,marginBottom:p,marginLeft:p,marginBlock:p,marginBlockStart:p,marginBlockEnd:p,marginInline:p,marginInlineStart:p,marginInlineEnd:p,fontSize:p,backgroundPositionX:p,backgroundPositionY:p,...Bo,zIndex:Qe,fillOpacity:_t,strokeOpacity:_t,numOctaves:Qe},ko={...be,color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:ue,WebkitFilter:ue,mask:ce,WebkitMask:ce},Mi=t=>ko[t],Io=new Set([ue,ce]);function Ri(t,e){let n=Mi(t);return Io.has(n)||(n=F),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const jo=new Set(["auto","none","0"]);function Fo(t,e,n){let i=0,s;for(;i{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Li=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function No(t){return li(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Ee}=ks(queueMicrotask,!1),k={x:!1,y:!1};function Bi(){return k.x||k.y}function Uo(t){return t==="x"||t==="y"?k[t]?null:(k[t]=!0,()=>{k[t]=!1}):k.x||k.y?null:(k.x=k.y=!0,()=>{k.x=k.y=!1})}function ki(t,e){const n=ti(t),i=new AbortController,s={passive:!0,...e,signal:i.signal};return[n,s,()=>i.abort()]}function Wo(t){return!(t.pointerType==="touch"||Bi())}function Ko(t,e,n={}){const[i,s,r]=ki(t,n);return i.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",m)},h=g=>{c&&(c(g),c=void 0),u()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(g))},d=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},m=g=>{if(g.pointerType!=="touch"){if(a){l=!0;return}h(g)}},x=g=>{if(!Wo(g))return;l=!1;const T=e(o,g);typeof T=="function"&&(c=T,o.addEventListener("pointerleave",m,s))};o.addEventListener("pointerenter",x,s),o.addEventListener("pointerdown",d,s)}),r}const Ii=(t,e)=>e?t===e?!0:Ii(t,e.parentElement):!1,De=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ho=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function zo(t){return Ho.has(t.tagName)||t.isContentEditable===!0}const Go=new Set(["INPUT","SELECT","TEXTAREA"]);function $o(t){return Go.has(t.tagName)||t.isContentEditable===!0}const wt=new WeakSet;function tn(t){return e=>{e.key==="Enter"&&t(e)}}function Ot(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Xo=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=tn(()=>{if(wt.has(n))return;Ot(n,"down");const s=tn(()=>{Ot(n,"up")}),r=()=>Ot(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function en(t){return De(t)&&!Bi()}const nn=new WeakSet;function Yo(t,e,n={}){const[i,s,r]=ki(t,n),o=a=>{const l=a.currentTarget;if(!en(a)||nn.has(a))return;wt.add(l),n.stopPropagation&&nn.add(a);const c=e(l,a),u=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),wt.has(l)&&wt.delete(l),en(d)&&typeof c=="function"&&c(d,{success:m})},h=d=>{u(d,l===window||l===document||n.useGlobalTarget||Ii(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),No(a)&&(a.addEventListener("focus",c=>Xo(c,s)),!zo(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Me(t){return li(t)&&"ownerSVGElement"in t}const Pt=new WeakMap;let N;const ji=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Me(i)&&"getBBox"in i?i.getBBox()[e]:i[n],_o=ji("inline","width","offsetWidth"),Zo=ji("block","height","offsetHeight");function qo({target:t,borderBoxSize:e}){var n;(n=Pt.get(t))==null||n.forEach(i=>{i(t,{get width(){return _o(t,e)},get height(){return Zo(t,e)}})})}function Jo(t){t.forEach(qo)}function Qo(){typeof ResizeObserver>"u"||(N=new ResizeObserver(Jo))}function tr(t,e){N||Qo();const n=ti(t);return n.forEach(i=>{let s=Pt.get(i);s||(s=new Set,Pt.set(i,s)),s.add(e),N==null||N.observe(i)}),()=>{n.forEach(i=>{const s=Pt.get(i);s==null||s.delete(e),s!=null&&s.size||N==null||N.unobserve(i)})}}const St=new Set;let Q;function er(){Q=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};St.forEach(e=>e(t))},window.addEventListener("resize",Q)}function nr(t){return St.add(t),Q||er(),()=>{St.delete(t),!St.size&&typeof Q=="function"&&(window.removeEventListener("resize",Q),Q=void 0)}}function sn(t,e){return typeof t=="function"?nr(t):tr(t,e)}function ir(t){return Me(t)&&t.tagName==="svg"}const sr=[...Di,B,F],or=t=>sr.find(Ei(t)),on=()=>({translate:0,scale:1,origin:0,originPoint:0}),tt=()=>({x:on(),y:on()}),rn=()=>({min:0,max:0}),A=()=>({x:rn(),y:rn()}),rr=new WeakMap;function Lt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ft(t){return typeof t=="string"||Array.isArray(t)}const Re=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Le=["initial",...Re];function Bt(t){return Lt(t.animate)||Le.some(e=>ft(t[e]))}function Fi(t){return!!(Bt(t)||t.variants)}function ar(t,e,n){for(const i in e){const s=e[i],r=n[i];if(b(s))t.addValue(i,s);else if(b(r))t.addValue(i,nt(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(i);t.addValue(i,nt(o!==void 0?o:s,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const he={current:null},Oi={current:!1},lr=typeof window<"u";function ur(){if(Oi.current=!0,!!lr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>he.current=t.matches;t.addEventListener("change",e),e()}else he.current=!1}const an=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Et={};function Ni(t){Et=t}function cr(){return Et}class hr{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Pe,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=et.now();this.renderScheduledAtthis.bindToMotionValue(r,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Oi.current||ur(),this.shouldReduceMotion=he.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),Z(this.notifyUpdate),Z(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const i=this.features[n];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Ti.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,h=new vi({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:X(u)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const i=st.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&S.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Et){const n=Et[e];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):A()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;in.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=nt(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(ai(i)||ui(i))?i=parseFloat(i):!or(i)&&F.test(n)&&(i=Ri(e,n)),this.setBaseTarget(e,b(i)?i.get():i)),b(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var r;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=Ae(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(i=o[e])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!b(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ei),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Ee.render(this.render)}}class Ui extends hr{constructor(){super(...arguments),this.KeyframeResolver=Oo}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const i=e.style;return i?i[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;b(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class K{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Wi({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function fr({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function dr(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Nt(t){return t===void 0||t===1}function fe({scale:t,scaleX:e,scaleY:n}){return!Nt(t)||!Nt(e)||!Nt(n)}function G(t){return fe(t)||Ki(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ki(t){return ln(t.x)||ln(t.y)}function ln(t){return t&&t!=="0%"}function Dt(t,e,n){const i=t-n,s=e*i;return n+s}function un(t,e,n,i,s){return s!==void 0&&(t=Dt(t,s,i)),Dt(t,n,i)+e}function de(t,e=0,n=1,i,s){t.min=un(t.min,e,n,i,s),t.max=un(t.max,e,n,i,s)}function Hi(t,{x:e,y:n}){de(t.x,e.translate,e.scale,e.originPoint),de(t.y,n.translate,n.scale,n.originPoint)}const cn=.999999999999,hn=1.0000000000001;function mr(t,e,n,i=!1){var a;const s=n.length;if(!s)return;e.x=e.y=1;let r,o;for(let l=0;lcn&&(e.x=1),e.ycn&&(e.y=1)}function j(t,e){t.min+=e,t.max+=e}function fn(t,e,n,i,s=.5){const r=V(t.min,t.max,s);de(t,e,n,r,i)}function dn(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Vt(t,e,n){const i=n??t;fn(t.x,dn(e.x,i.x),e.scaleX,e.scale,e.originX),fn(t.y,dn(e.y,i.y),e.scaleY,e.scale,e.originY)}function zi(t,e){return Wi(dr(t.getBoundingClientRect(),e))}function pr(t,e,n){const i=zi(t,n),{scroll:s}=e;return s&&(j(i.x,s.offset.x),j(i.y,s.offset.y)),i}const gr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yr=it.length;function vr(t,e,n){let i="",s=!0;for(let r=0;r{if(!e.target)return t;if(typeof t=="string")if(p.test(t))t=parseFloat(t);else return t;const n=mn(t,e.target.x),i=mn(t,e.target.y);return`${n}% ${i}%`}},xr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=F.parse(t);if(s.length>5)return i;const r=F.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const c=V(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),r(s)}},me={borderRadius:{...rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomLeftRadius:rt,borderBottomRightRadius:rt,boxShadow:xr};function $i(t,{layout:e,layoutId:n}){return st.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!me[t]||t==="opacity")}function ke(t,e,n){var o;const i=t.style,s=e==null?void 0:e.style,r={};if(!i)return r;for(const a in i)(b(i[a])||s&&b(s[a])||$i(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=i[a]);return r}function Tr(t){return window.getComputedStyle(t)}class wr extends Ui{constructor(){super(...arguments),this.type="html",this.renderInstance=Gi}readValueFromInstance(e,n){var i;if(st.has(n))return(i=this.projection)!=null&&i.isProjecting?te(n):Ws(e,n);{const s=Tr(e),r=(ni(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return zi(e,n)}build(e,n,i){Be(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return ke(e,n,i)}}const Pr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Sr={offset:"strokeDashoffset",array:"strokeDasharray"};function Vr(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?Pr:Sr;t[r.offset]=`${-i}`,t[r.array]=`${e} ${n}`}const Ar=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Xi(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(Be(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox);for(const d of Ar)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),i!==void 0&&(h.scale=i),s!==void 0&&Vr(h,s,r,o,!1)}const Yi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),_i=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Cr(t,e,n,i){Gi(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(Yi.has(s)?s:Ce(s),e.attrs[s])}function Zi(t,e,n){const i=ke(t,e,n);for(const s in t)if(b(t[s])||b(e[s])){const r=it.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=t[s]}return i}class br extends Ui{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=A}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(st.has(n)){const i=Mi(n);return i&&i.default||0}return n=Yi.has(n)?n:Ce(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return Zi(e,n,i)}build(e,n,i){Xi(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){Cr(e,n,i,s)}mount(e){this.isSVGTag=_i(e.tagName),super.mount(e)}}const Er=Le.length;function qi(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?qi(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;nPromise.all(e.map(({animation:n,options:i})=>bo(t,n,i)))}function Lr(t){let e=Rr(t),n=pn(),i=!0,s=!1;const r=c=>(u,h)=>{var d;const f=_(t,h,c==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:m,transitionEnd:x,...g}=f;u={...u,...g,...x}}return u};function o(c){e=c(t)}function a(c){const{props:u}=t,h=qi(t.parent)||{},f=[],d=new Set;let m={},x=1/0;for(let T=0;Tx&&E,Oe=!1;const Ne=Array.isArray(P)?P:[P];let ot=Ne.reduce(r(y),{});pt===!1&&(ot={});const{prevResolvedValues:Ue={}}=v,ws={...Ue,...ot},We=C=>{It=!0,d.has(C)&&(Oe=!0,d.delete(C)),v.needsAnimating[C]=!0;const R=t.getValue(C);R&&(R.liveStyle=!1)};for(const C in ws){const R=ot[C],H=Ue[C];if(m.hasOwnProperty(C))continue;let q=!1;re(R)&&re(H)?q=!Ji(R,H):q=R!==H,q?R!=null?We(C):d.add(C):R!==void 0&&d.has(C)?We(C):v.protectedKeys[C]=!0}v.prevProp=P,v.prevResolvedValues=ot,v.isActive&&(m={...m,...ot}),(i||s)&&t.blockInitialAnimation&&(It=!1);const Ke=gt&&Fe;It&&(!Ke||Oe)&&f.push(...Ne.map(C=>{const R={type:y};if(typeof C=="string"&&(i||s)&&!Ke&&t.manuallyAnimateOnMount&&t.parent){const{parent:H}=t,q=_(H,C);if(H.enteringChildren&&q){const{delayChildren:Ps}=q.transition||{};R.delay=wi(H.enteringChildren,t,Ps)}}return{animation:C,options:R}}))}if(d.size){const T={};if(typeof u.initial!="boolean"){const y=_(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(T.transition=y.transition)}d.forEach(y=>{const v=t.getBaseTarget(y),P=t.getValue(y);P&&(P.liveStyle=!0),T[y]=v??null}),f.push({animation:T})}let g=!!f.length;return i&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),i=!1,s=!1,g?e(f):Promise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var m;return(m=d.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const h=a(c);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=pn(),s=!0}}}function Br(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ji(e,t):!1}function z(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pn(){return{animate:z(!0),whileInView:z(),whileHover:z(),whileTap:z(),whileDrag:z(),whileFocus:z(),exit:z()}}function pe(t,e){t.min=e.min,t.max=e.max}function L(t,e){pe(t.x,e.x),pe(t.y,e.y)}function gn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Qi=1e-4,kr=1-Qi,Ir=1+Qi,ts=.01,jr=0-ts,Fr=0+ts;function D(t){return t.max-t.min}function Or(t,e,n){return Math.abs(t-e)<=n}function yn(t,e,n,i=.5){t.origin=i,t.originPoint=V(e.min,e.max,t.origin),t.scale=D(n)/D(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=kr&&t.scale<=Ir||isNaN(t.scale))&&(t.scale=1),(t.translate>=jr&&t.translate<=Fr||isNaN(t.translate))&&(t.translate=0)}function lt(t,e,n,i){yn(t.x,e.x,n.x,i?i.originX:void 0),yn(t.y,e.y,n.y,i?i.originY:void 0)}function vn(t,e,n,i=0){const s=i?V(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+D(e)}function Nr(t,e,n,i){vn(t.x,e.x,n.x,i==null?void 0:i.x),vn(t.y,e.y,n.y,i==null?void 0:i.y)}function xn(t,e,n,i=0){const s=i?V(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+D(e)}function Mt(t,e,n,i){xn(t.x,e.x,n.x,i==null?void 0:i.x),xn(t.y,e.y,n.y,i==null?void 0:i.y)}function Tn(t,e,n,i,s){return t-=e,t=Dt(t,1/n,i),s!==void 0&&(t=Dt(t,1/s,i)),t}function Ur(t,e=0,n=1,i=.5,s,r=t,o=t){if(ht.test(e)&&(e=parseFloat(e),e=V(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=V(r.min,r.max,i);t===r&&(a-=e),t.min=Tn(t.min,e,n,a,s),t.max=Tn(t.max,e,n,a,s)}function wn(t,e,[n,i,s],r,o){Ur(t,e[n],e[i],e[s],e.scale,r,o)}const Wr=["x","scaleX","originX"],Kr=["y","scaleY","originY"];function Pn(t,e,n,i){wn(t.x,e,Wr,n?n.x:void 0,i?i.x:void 0),wn(t.y,e,Kr,n?n.y:void 0,i?i.y:void 0)}function Sn(t){return t.translate===0&&t.scale===1}function es(t){return Sn(t.x)&&Sn(t.y)}function Vn(t,e){return t.min===e.min&&t.max===e.max}function Hr(t,e){return Vn(t.x,e.x)&&Vn(t.y,e.y)}function An(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ns(t,e){return An(t.x,e.x)&&An(t.y,e.y)}function Cn(t){return D(t.x)/D(t.y)}function bn(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function I(t){return[t("x"),t("y")]}function zr(t,e,n){let i="";const s=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),h&&(i+=`rotateX(${h}deg) `),f&&(i+=`rotateY(${f}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const is=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Gr=is.length,En=t=>typeof t=="string"?parseFloat(t):t,Dn=t=>typeof t=="number"||p.test(t);function $r(t,e,n,i,s,r){s?(t.opacity=V(0,n.opacity??1,Xr(i)),t.opacityExit=V(e.opacity??1,0,Yr(i))):r&&(t.opacity=V(e.opacity??1,n.opacity??1,i));for(let o=0;oie?1:n(Zt(t,e,i))}function _r(t,e,n){const i=b(t)?t:nt(t);return i.start(Ve("",i,e,n)),i.animation}function dt(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Zr=(t,e)=>t.depth-e.depth;class qr{constructor(){this.children=[],this.isDirty=!1}add(e){ii(this.children,e),this.isDirty=!0}remove(e){qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Zr),this.isDirty=!1,this.children.forEach(e)}}function Jr(t,e){const n=et.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(Z(i),t(r-e))};return S.setup(i,!0),()=>Z(i)}function At(t){return b(t)?t.get():t}class Qr{constructor(){this.members=[]}add(e){ii(this.members,e);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===e||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(qt(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(qt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){var n;for(let i=this.members.indexOf(e)-1;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(e,n){var s;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=i.options,{layoutDependency:o}=e.options;(r===void 0||r!==o)&&(e.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),(s=e.root)!=null&&s.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,i,s,r,o;(i=(n=e.options).onExitComplete)==null||i.call(n),(o=(s=e.resumingFrom)==null?void 0:(r=s.options).onExitComplete)==null||o.call(r)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Ct={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ut=["","X","Y","Z"],ta=1e3;let ea=0;function Wt(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function os(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ci(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",S,!(s||r))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&os(i)}function rs({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=ea++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(sa),this.nodes.forEach(ca),this.nodes.forEach(ha),this.nodes.forEach(oa)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;S.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,u&&u(),u=Jr(f,250),Ct.hasAnimatedSinceResize&&(Ct.hasAnimatedSinceResize=!1,this.nodes.forEach(Bn)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||ga,{onLayoutAnimationStart:x,onLayoutAnimationComplete:g}=c.getProps(),T=!this.targetLayout||!ns(this.targetLayout,d),y=!h&&f;if(this.options.layoutRoot||this.resumeFrom||y||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Se(m,"layout"),onPlay:x,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,y)}else h||Bn(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Z(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(fa),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&os(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!D(this.snapshot.measuredBox.x)&&!D(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const E=P/1e3;kn(h.x,o.x,E),kn(h.y,o.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ma(this.relativeTarget,this.relativeTargetOrigin,f,E),v&&Hr(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=A()),L(v,this.relativeTarget)),x&&(this.animationValues=u,$r(u,c,this.latestValues,E,y,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=S.update(()=>{Ct.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=nt(0)),this.motionValue.jump(0,!1),this.currentAnimation=_r(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ta),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&as(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||A();const h=D(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=D(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}L(a,l),Vt(a,u),lt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Qr),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Wt("z",o,c,this.animationValues);for(let u=0;u{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Rn),this.root.sharedNodes.clear()}}}function na(t){t.updateLayout()}function ia(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;if(r==="size")I(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=D(f);f.min=i[h].min,f.max=f.min+d});else if(r==="x"||r==="y"){const h=r==="x"?"y":"x";pe(o?e.measuredBox[h]:e.layoutBox[h],i[h])}else as(r,e.layoutBox,i)&&I(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=D(i[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=tt();lt(a,i,e.layoutBox);const l=tt();o?lt(l,t.applyTransform(s,!0),e.measuredBox):lt(l,i,e.layoutBox);const c=!es(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=t.options.layoutAnchor||void 0,x=A();Mt(x,e.layoutBox,f.layoutBox,m);const g=A();Mt(g,i,d.layoutBox,m),ns(x,g)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=x,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function sa(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function oa(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ra(t){t.clearSnapshot()}function Rn(t){t.clearMeasurements()}function aa(t){t.isLayoutDirty=!0,t.updateLayout()}function Ln(t){t.isLayoutDirty=!1}function la(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ua(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Bn(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ca(t){t.resolveTargetDelta()}function ha(t){t.calcProjection()}function fa(t){t.resetSkewAndRotation()}function da(t){t.removeLeadSnapshot()}function kn(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function In(t,e,n,i){t.min=V(e.min,n.min,i),t.max=V(e.max,n.max,i)}function ma(t,e,n,i){In(t.x,e.x,n.x,i),In(t.y,e.y,n.y,i)}function pa(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const ga={duration:.45,ease:[.4,0,.1,1]},jn=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Fn=jn("applewebkit/")&&!jn("chrome/")?Math.round:W;function On(t){t.min=Fn(t.min),t.max=Fn(t.max)}function ya(t){On(t.x),On(t.y)}function as(t,e,n){return t==="position"||t==="preserve-aspect"&&!Or(Cn(e),Cn(n),.2)}function va(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const xa=rs({attachResizeListener:(t,e)=>dt(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Kt={current:void 0},ls=rs({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Kt.current){const t=new xa({});t.mount(window),t.setOptions({layoutScroll:!0}),Kt.current=t}return Kt.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});function Ta(t=!0){const e=w.useContext(we);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=e,r=w.useId();w.useEffect(()=>{if(t)return s(r)},[t]);const o=w.useCallback(()=>t&&i&&i(r),[r,i,t]);return!n&&i?[!1,o]:[!0]}const us=w.createContext({strict:!1}),Nn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Un=!1;function wa(){if(Un)return;const t={};for(const e in Nn)t[e]={isEnabled:n=>Nn[e].some(i=>!!n[i])};Ni(t),Un=!0}function cs(){return wa(),cr()}function Pa(t){const e=cs();for(const n in t)e[n]={...e[n],...t[n]};Ni(e)}const Sa=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Rt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Sa.has(t)}let hs=t=>!Rt(t);function Va(t){typeof t=="function"&&(hs=e=>e.startsWith("on")?!Rt(e):t(e))}try{Va(require("@emotion/is-prop-valid").default)}catch{}function Aa(t,e,n){const i={};for(const s in t)s==="values"&&typeof t.values=="object"||b(t[s])||(hs(s)||n===!0&&Rt(s)||!e&&!Rt(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const kt=w.createContext({});function Ca(t,e){if(Bt(t)){const{initial:n,animate:i}=t;return{initial:n===!1||ft(n)?n:void 0,animate:ft(i)?i:void 0}}return t.inherit!==!1?e:{}}function ba(t){const{initial:e,animate:n}=Ca(t,w.useContext(kt));return w.useMemo(()=>({initial:e,animate:n}),[Wn(e),Wn(n)])}function Wn(t){return Array.isArray(t)?t.join(" "):t}const Ie=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function fs(t,e,n){for(const i in e)!b(e[i])&&!$i(i,n)&&(t[i]=e[i])}function Ea({transformTemplate:t},e){return w.useMemo(()=>{const n=Ie();return Be(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Da(t,e){const n=t.style||{},i={};return fs(i,n,t),Object.assign(i,Ea(t,e)),i}function Ma(t,e){const n={},i=Da(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const ds=()=>({...Ie(),attrs:{}});function Ra(t,e,n,i){const s=w.useMemo(()=>{const r=ds();return Xi(r,e,_i(i),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};fs(r,t.style,t),s.style={...r,...s.style}}return s}const La=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function je(t){return typeof t!="string"||t.includes("-")?!1:!!(La.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ba(t,e,n,{latestValues:i},s,r=!1,o){const l=(o??je(t)?Ra:Ma)(e,i,s,t),c=Aa(e,typeof t=="string",r),u=t!==w.Fragment?{...c,...l,ref:n}:{},{children:h}=e,f=w.useMemo(()=>b(h)?h.get():h,[h]);return w.createElement(t,{...u,children:f})}function ka({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:Ia(n,i,s,t),renderState:e()}}function Ia(t,e,n,i){const s={},r=i(t,{});for(const f in r)s[f]=At(r[f]);let{initial:o,animate:a}=t;const l=Bt(t),c=Fi(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!Lt(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d(e,n)=>{const i=w.useContext(kt),s=w.useContext(we),r=()=>ka(t,e,i,s);return n?r():js(r)},ja=ms({scrapeMotionValuesFromProps:ke,createRenderState:Ie}),Fa=ms({scrapeMotionValuesFromProps:Zi,createRenderState:ds}),Oa=Symbol.for("motionComponentSymbol");function Na(t,e,n){const i=w.useRef(n);w.useInsertionEffect(()=>{i.current=n});const s=w.useRef(null);return w.useCallback(r=>{var a;r&&((a=t.onMount)==null||a.call(t,r));const o=i.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(r);else o&&(o.current=r);e&&(r?e.mount(r):e.unmount())},[e])}const ps=w.createContext({});function J(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ua(t,e,n,i,s,r){var v,P;const{visualElement:o}=w.useContext(kt),a=w.useContext(us),l=w.useContext(we),c=w.useContext(si),u=c.reducedMotion,h=c.skipAnimations,f=w.useRef(null),d=w.useRef(!1);i=i||a.renderer,!f.current&&i&&(f.current=i(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,x=w.useContext(ps);m&&!m.projection&&s&&(m.type==="html"||m.type==="svg")&&Wa(f.current,n,s,x);const g=w.useRef(!1);w.useInsertionEffect(()=>{m&&g.current&&m.update(n,l)});const T=n[Ai],y=w.useRef(!!T&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,T))&&((P=window.MotionHasOptimisedAnimation)==null?void 0:P.call(window,T)));return Fs(()=>{d.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),y.current&&m.animationState&&m.animationState.animateChanges())}),w.useEffect(()=>{m&&(!y.current&&m.animationState&&m.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)==null||E.call(window,T)}),y.current=!1),m.enteringChildren=void 0)}),m}function Wa(t,e,n,i){const{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:gs(t.parent)),t.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&J(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function gs(t){if(t)return t.options.allowProjection!==!1?t.projection:gs(t.parent)}function Ht(t,{forwardMotionProps:e=!1,type:n}={},i,s){i&&Pa(i);const r=n?n==="svg":je(t),o=r?Fa:ja;function a(c,u){let h;const f={...w.useContext(si),...c,layoutId:Ka(c)},{isStatic:d}=f,m=ba(c),x=o(c,d);if(!d&&typeof window<"u"){Ha();const g=za(f);h=g.MeasureLayout,m.visualElement=Ua(t,x,f,s,g.ProjectionNode,r)}return Yt.jsxs(kt.Provider,{value:m,children:[h&&m.visualElement?Yt.jsx(h,{visualElement:m.visualElement,...f}):null,Ba(t,c,Na(x,m.visualElement,u),x,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=w.forwardRef(a);return l[Oa]=t,l}function Ka({layoutId:t}){const e=w.useContext(ri).id;return e&&t!==void 0?e+"-"+t:t}function Ha(t,e){w.useContext(us).strict}function za(t){const e=cs(),{drag:n,layout:i}=e;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(t)||i!=null&&i.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Ga(t,e){if(typeof Proxy>"u")return Ht;const n=new Map,i=(r,o)=>Ht(r,o,t,e),s=(r,o)=>i(r,o);return new Proxy(s,{get:(r,o)=>o==="create"?i:(n.has(o)||n.set(o,Ht(o,void 0,t,e)),n.get(o))})}const $a=(t,e)=>e.isSVG??je(t)?new br(e):new wr(e,{allowProjection:t!==w.Fragment});class Xa extends K{constructor(e){super(e),e.animationState||(e.animationState=Lr(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Lt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let Ya=0;class _a extends K{constructor(){super(...arguments),this.id=Ya++,this.isExitComplete=!1}update(){var r;if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;if(e&&i===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=_(this.node,o,a);if(l){const{transition:c,transitionEnd:u,...h}=l;for(const f in h)(r=this.node.getValue(f))==null||r.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Za={animation:{Feature:Xa},exit:{Feature:_a}};function mt(t){return{point:{x:t.pageX,y:t.pageY}}}const qa=t=>e=>De(e)&&t(e,mt(e));function ut(t,e,n,i){return dt(t,e,qa(n),i)}const ys=({current:t})=>t?t.ownerDocument.defaultView:null,Kn=(t,e)=>Math.abs(t-e);function Ja(t,e){const n=Kn(t.x,e.x),i=Kn(t.y,e.y);return Math.sqrt(n**2+i**2)}const Hn=new Set(["auto","scroll"]);class vs{constructor(e,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=vt(this.lastRawMoveEventInfo,this.transformPagePoint));const d=zt(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,x=Ja(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!x)return;const{point:g}=d,{timestamp:T}=M;this.history.push({...g,timestamp:T});const{onStart:y,onMove:v}=this.handlers;m||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=vt(m,this.transformPagePoint),S.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:x,onSessionEnd:g,resumeAnimation:T}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=zt(d.type==="pointercancel"?this.lastMoveEventInfo:vt(m,this.transformPagePoint),this.history);this.startEvent&&x&&x(d,y),g&&g(d,y)},!De(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=s||window;const l=mt(e),c=vt(l,this.transformPagePoint),{point:u}=c,{timestamp:h}=M;this.history=[{...u,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,zt(c,this.history)),this.removeListeners=oi(ut(this.contextWindow,"pointermove",this.handlePointerMove),ut(this.contextWindow,"pointerup",this.handlePointerUp),ut(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const i=getComputedStyle(n);(Hn.has(i.overflowX)||Hn.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const i=e===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:s.x-n.x,y:s.y-n.y};r.x===0&&r.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,s),S.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Z(this.updatePoint)}}function vt(t,e){return e?{point:e(t.point)}:t}function zn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function zt({point:t},e){return{point:t,delta:zn(t,xs(e)),offset:zn(t,Qa(e)),velocity:tl(e,.1)}}function Qa(t){return t[0]}function xs(t){return t[t.length-1]}function tl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=xs(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>X(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>X(e)*2&&(i=t[1]);const r=Tt(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function el(t,{min:e,max:n},i){return e!==void 0&&tn&&(t=i?V(n,t,i.max):Math.min(t,n)),t}function Gn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function nl(t,{top:e,left:n,bottom:i,right:s}){return{x:Gn(t.x,n,s),y:Gn(t.y,e,i)}}function $n(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.mini?n=Zt(e.min,e.max-i,t.min):i>s&&(n=Zt(t.min,t.max-s,e.min)),Te(0,1,n)}function ol(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const ge=.35;function rl(t=ge){return t===!1?t=0:t===!0&&(t=ge),{x:Xn(t,"left","right"),y:Xn(t,"top","bottom")}}function Xn(t,e,n){return{min:Yn(t,e),max:Yn(t,n)}}function Yn(t,e){return typeof t=="number"?t:t[e]||0}const al=new WeakMap;class ll{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=A(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(mt(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:x}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Uo(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),I(T=>{let y=this.getAxisMotionValue(T).get()||0;if(ht.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const P=v.layout.layoutBox[T];P&&(y=D(P)*(parseFloat(y)/100))}}this.originPoint[T]=y}),x&&S.update(()=>x(h,f),!1,!0),ae(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:x,onDrag:g}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:T}=f;if(m&&this.currentDirection===null){this.currentDirection=cl(T),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",f.point,T),this.updateAxis("y",f.point,T),this.visualElement.render(),g&&S.update(()=>g(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new vs(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:ys(this.visualElement),element:this.visualElement.current})}stop(e,n){const i=e||this.latestPointerEvent,s=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!s||!i)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&S.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,i){const{drag:s}=this.getProps();if(!i||!xt(e,s,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=el(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,s=this.constraints;e&&J(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=nl(i.layoutBox,e):this.constraints=!1,this.elastic=rl(n),s!==this.constraints&&!J(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&I(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=ol(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!J(e))return!1;const i=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const r=pr(i,s.root,this.visualElement.getTransformPagePoint());let o=il(s.layout.layoutBox,r);if(n){const a=n(fr(o));this.hasMutatedConstraints=!!a,a&&(o=Wi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=I(u=>{if(!xt(u,n,this.currentDirection))return;let h=l&&l[u]||{};(o===!0||o===u)&&(h={min:0,max:0});const f=s?200:1e6,d=s?40:1e7,m={type:"inertia",velocity:i?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return ae(this.visualElement,e),i.start(Ve(e,i,0,n,this.visualElement,!1))}stopAnimation(){I(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){I(n=>{const{drag:i}=this.getProps();if(!xt(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=r.get()||0;r.set(e[n]-V(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!J(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};I(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=sl({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),I(o=>{if(!xt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(V(l,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;al.set(this.visualElement,this);const e=this.visualElement.current,n=ut(e,"pointerdown",c=>{const{drag:u,dragListener:h=!0}=this.getProps(),f=c.target,d=f!==e&&$o(f);u&&h&&!d&&this.start(c)});let i;const s=()=>{const{dragConstraints:c}=this.getProps();J(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),i||(i=ul(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),S.read(s);const a=dt(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(I(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=c[h].translate,f.set(f.get()+c[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:o=ge,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function _n(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function ul(t,e,n){const i=sn(t,_n(n)),s=sn(e,_n(n));return()=>{i(),s()}}function xt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function cl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class hl extends K{constructor(e){super(e),this.removeGroupControls=W,this.removeListeners=W,this.controls=new ll(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||W}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Gt=t=>(e,n)=>{t&&S.update(()=>t(e,n),!1,!0)};class fl extends K{constructor(){super(...arguments),this.removePointerDownListener=W}onPointerDown(e){this.session=new vs(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ys(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Gt(e),onStart:Gt(n),onMove:Gt(i),onEnd:(r,o)=>{delete this.session,s&&S.postRender(()=>s(r,o))}}}mount(){this.removePointerDownListener=ut(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let $t=!1;class dl extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),i&&i.register&&s&&i.register(r),$t&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ct.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:s,isPresent:r}=this.props,{projection:o}=i;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),$t=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||S.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:i}=e;i&&(i.options.layoutAnchor=n,i.root.didUpdate(),Ee.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=e;$t=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ts(t){const[e,n]=Ta(),i=w.useContext(ri);return Yt.jsx(dl,{...t,layoutGroup:i,switchLayoutGroup:w.useContext(ps),isPresent:e,safeToRemove:n})}const ml={pan:{Feature:fl},drag:{Feature:hl,ProjectionNode:ls,MeasureLayout:Ts}};function Zn(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,r=i[s];r&&S.postRender(()=>r(e,mt(e)))}class pl extends K{mount(){const{current:e}=this.node;e&&(this.unmount=Ko(e,(n,i)=>(Zn(this.node,i,"Start"),s=>Zn(this.node,s,"End"))))}unmount(){}}class gl extends K{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oi(dt(this.node.current,"focus",()=>this.onFocus()),dt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function qn(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),r=i[s];r&&S.postRender(()=>r(e,mt(e)))}class yl extends K{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=Yo(e,(s,r)=>(qn(this.node,r,"Start"),(o,{success:a})=>qn(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const ye=new WeakMap,Xt=new WeakMap,vl=t=>{const e=ye.get(t.target);e&&e(t)},xl=t=>{t.forEach(vl)};function Tl({root:t,...e}){const n=t||document;Xt.has(n)||Xt.set(n,{});const i=Xt.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(xl,{root:t,...e})),i[s]}function wl(t,e,n){const i=Tl(e);return ye.set(t,n),i.observe(t),()=>{ye.delete(t),i.unobserve(t)}}const Pl={some:0,all:1};class Sl extends K{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:Pl[s]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),d=u?h:f;d&&d(c)};this.stopObserver=wl(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Vl(e,n))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Vl({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Al={inView:{Feature:Sl},tap:{Feature:yl},focus:{Feature:gl},hover:{Feature:pl}},Cl={layout:{ProjectionNode:ls,MeasureLayout:Ts}},bl={...Za,...Al,...ml,...Cl},Ll=Ga(bl,$a);export{ri as L,we as P,No as i,Ll as m,Ta as u}; diff --git a/dist/assets/use-animation-frame-BTI5WVkr.js b/dist/assets/use-animation-frame-BTI5WVkr.js new file mode 100644 index 0000000..cb63fed --- /dev/null +++ b/dist/assets/use-animation-frame-BTI5WVkr.js @@ -0,0 +1 @@ +import{r as e}from"./index-Drgd7k5E.js";import{M as a,f as u,c}from"./CountUp-Omm8FlHl.js";function p(r){const t=e.useRef(0),{isStatic:o}=e.useContext(a);e.useEffect(()=>{if(o)return;const n=({timestamp:i,delta:s})=>{t.current||(t.current=i),r(i-t.current,s)};return u.update(n,!0),()=>c(n)},[r])}export{p as u}; diff --git a/dist/assets/useTranslation-B7WzaWp0.js b/dist/assets/useTranslation-B7WzaWp0.js new file mode 100644 index 0000000..55fe9d1 --- /dev/null +++ b/dist/assets/useTranslation-B7WzaWp0.js @@ -0,0 +1,9 @@ +import{r as l,m as q,n as B}from"./index-Drgd7k5E.js";const H=(e,t,r,i)=>{var n,d,y,g;const s=[r,{code:t,...i||{}}];if((d=(n=e==null?void 0:e.services)==null?void 0:n.logger)!=null&&d.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);p(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(g=(y=e==null?void 0:e.services)==null?void 0:y.logger)!=null&&g.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},z={},U=(e,t,r,i)=>{p(r)&&z[r]||(p(r)&&(z[r]=new Date),H(e,t,r,i))},F=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},O=(e,t,r)=>{e.loadNamespaces(t,F(e,r))},A=(e,t,r,i)=>{if(p(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return O(e,r,i);r.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,F(e,i))},J=(e,t,r={})=>!t.languages||!t.languages.length?(U(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(i,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}),p=e=>typeof e=="string",K=e=>typeof e=="object"&&e!==null,Q=l.createContext();class V{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var M={exports:{}},$={};/** + * @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 S=l;function Z(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ee=typeof Object.is=="function"?Object.is:Z,te=S.useState,ne=S.useEffect,re=S.useLayoutEffect,ae=S.useDebugValue;function se(e,t){var r=t(),i=te({inst:{value:r,getSnapshot:t}}),s=i[0].inst,n=i[1];return re(function(){s.value=r,s.getSnapshot=t,C(s)&&n({inst:s})},[e,r,t]),ne(function(){return C(s)&&n({inst:s}),e(function(){C(s)&&n({inst:s})})},[e]),ae(r),r}function C(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ee(e,r)}catch{return!0}}function oe(e,t){return t()}var ce=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oe:se;$.useSyncExternalStore=S.useSyncExternalStore!==void 0?S.useSyncExternalStore:ce;M.exports=$;var ue=M.exports;const ie=(e,t)=>{if(p(t))return t;if(K(t)&&p(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const r=e[e.length-1];return typeof r=="function"?"":r}return e},le={t:ie,ready:!1},fe=()=>()=>{},ge=(e,t={})=>{var j,b,P;const{i18n:r}=t,{i18n:i,defaultNS:s}=l.useContext(Q)||{},n=r||i||B();n&&!n.reportNamespaces&&(n.reportNamespaces=new V),n||U(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const d=l.useMemo(()=>{var a;return{...q(),...(a=n==null?void 0:n.options)==null?void 0:a.react,...t}},[n,t]),{useSuspense:y,keyPrefix:g}=d,x=s||((j=n==null?void 0:n.options)==null?void 0:j.defaultNS),_=p(x)?[x]:x||["translation"],f=l.useMemo(()=>_,_);(P=(b=n==null?void 0:n.reportNamespaces)==null?void 0:b.addUsedNamespaces)==null||P.call(b,f);const L=l.useRef(0),G=l.useCallback(a=>{if(!n)return fe;const{bindI18n:o,bindI18nStore:c}=d,u=()=>{L.current+=1,a()};return o&&n.on(o,u),c&&n.store.on(c,u),()=>{o&&o.split(" ").forEach(v=>n.off(v,u)),c&&c.split(" ").forEach(v=>n.store.off(v,u))}},[n,d]),R=l.useRef(),I=l.useCallback(()=>{if(!n)return le;const a=!!(n.isInitialized||n.initializedStoreOnce)&&f.every(Y=>J(Y,n,d)),o=t.lng||n.language,c=L.current,u=R.current;if(u&&u.ready===a&&u.lng===o&&u.keyPrefix===g&&u.revision===c)return u;const k={t:n.getFixedT(o,d.nsMode==="fallback"?f:f[0],g),ready:a,lng:o,keyPrefix:g,revision:c};return R.current=k,k},[n,f,g,d,t.lng]),[W,D]=l.useState(0),{t:N,ready:m}=ue.useSyncExternalStore(G,I,I);l.useEffect(()=>{if(n&&!m&&!y){const a=()=>D(o=>o+1);t.lng?A(n,t.lng,f,a):O(n,f,a)}},[n,t.lng,f,m,y,W]);const h=n||{},w=l.useRef(null),E=l.useRef(),T=a=>{const o=Object.getOwnPropertyDescriptors(a);o.__original&&delete o.__original;const c=Object.create(Object.getPrototypeOf(a),o);if(!Object.prototype.hasOwnProperty.call(c,"__original"))try{Object.defineProperty(c,"__original",{value:a,writable:!1,enumerable:!1,configurable:!1})}catch{}return c},X=l.useMemo(()=>{const a=h,o=a==null?void 0:a.language;let c=a;a&&(w.current&&w.current.__original===a?E.current!==o?(c=T(a),w.current=c,E.current=o):c=w.current:(c=T(a),w.current=c,E.current=o));const u=[N,c,m];return u.t=N,u.i18n=c,u.ready=m,u},[N,h,m,h.resolvedLanguage,h.language,h.languages]);if(n&&y&&!m)throw new Promise(a=>{const o=()=>a();t.lng?A(n,t.lng,f,o):O(n,f,o)});return X};export{ge as u}; diff --git a/dist/index.html b/dist/index.html index 94e3002..f74729b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -7,8 +7,8 @@ AI Platform - - + +
diff --git a/package-lock.json b/package-lock.json index b75d88e..fa842ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,10 +10,14 @@ "license": "MIT", "dependencies": { "axios": "^1.7.0", + "i18next": "^25.9.0", + "i18next-browser-languagedetector": "^8.2.1", "motion": "^12.0.0", + "ogl": "^1.0.11", "react": "^18.3.0", "react-dom": "^18.3.0", "react-hot-toast": "^2.4.1", + "react-i18next": "^16.5.8", "react-router-dom": "^6.26.0" }, "devDependencies": { @@ -272,6 +276,15 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.29.2", + "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.29.2.tgz", + "integrity": "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.28.6", "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.28.6.tgz", @@ -1971,6 +1984,55 @@ "node": ">= 0.4" } }, + "node_modules/html-parse-stringify": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz", + "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==", + "license": "MIT", + "dependencies": { + "void-elements": "3.1.0" + } + }, + "node_modules/i18next": { + "version": "25.9.0", + "resolved": "https://registry.npmmirror.com/i18next/-/i18next-25.9.0.tgz", + "integrity": "sha512-mJ4rVRNWOTkqh5xnaGR6iMFT5vEw3Y2MTJhcjinR/7u8cRv6dAfC0ofuePh5fVPxoh395p6JdrJTStCcNW66gg==", + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.6" + }, + "peerDependencies": { + "typescript": "^5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/i18next-browser-languagedetector": { + "version": "8.2.1", + "resolved": "https://registry.npmmirror.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-8.2.1.tgz", + "integrity": "sha512-bZg8+4bdmaOiApD7N7BPT9W8MLZG+nPTOFlLiJiT8uzKXFjhxw4v2ierCXOwB5sFDMtuA5G4kgYZ0AznZxQ/cw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.2" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -2287,6 +2349,12 @@ "node": ">= 6" } }, + "node_modules/ogl": { + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/ogl/-/ogl-1.0.11.tgz", + "integrity": "sha512-kUpC154AFfxi16pmZUK4jk3J+8zxwTWGPo03EoYA8QPbzikHoaC82n6pNTbd+oEaJonaE8aPWBlX7ad9zrqLsA==", + "license": "Unlicense" + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz", @@ -2566,6 +2634,33 @@ "react-dom": ">=16" } }, + "node_modules/react-i18next": { + "version": "16.5.8", + "resolved": "https://registry.npmmirror.com/react-i18next/-/react-i18next-16.5.8.tgz", + "integrity": "sha512-2ABeHHlakxVY+LSirD+OiERxFL6+zip0PaHo979bgwzeHg27Sqc82xxXWIrSFmfWX0ZkrvXMHwhsi/NGUf5VQg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.4", + "html-parse-stringify": "^3.0.1", + "use-sync-external-store": "^1.6.0" + }, + "peerDependencies": { + "i18next": ">= 25.6.2", + "react": ">= 16.8.0", + "typescript": "^5" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, "node_modules/react-refresh": { "version": "0.17.0", "resolved": "https://registry.npmmirror.com/react-refresh/-/react-refresh-0.17.0.tgz", @@ -2963,6 +3058,15 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/use-sync-external-store": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", + "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -3030,6 +3134,15 @@ } } }, + "node_modules/void-elements": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/void-elements/-/void-elements-3.1.0.tgz", + "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", diff --git a/package.json b/package.json index e781442..e5257b4 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,15 @@ }, "dependencies": { "axios": "^1.7.0", + "i18next": "^25.9.0", + "i18next-browser-languagedetector": "^8.2.1", "motion": "^12.0.0", + "ogl": "^1.0.11", "react": "^18.3.0", "react-dom": "^18.3.0", - "react-router-dom": "^6.26.0", - "react-hot-toast": "^2.4.1" + "react-hot-toast": "^2.4.1", + "react-i18next": "^16.5.8", + "react-router-dom": "^6.26.0" }, "devDependencies": { "@types/react": "^18.3.0", diff --git a/src/App.jsx b/src/App.jsx index 982ecb9..68b4afb 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,9 +1,8 @@ import React, { lazy, Suspense } from 'react'; import { Routes, Route, Navigate } from 'react-router-dom'; -import Layout from './components/Layout'; import AuthGuard from './components/AuthGuard'; +import { ThemeProvider, useTheme } from './context/ThemeContext'; -const Home = lazy(() => import('./pages/Home')); const Login = lazy(() => import('./pages/Login')); const Register = lazy(() => import('./pages/Register')); const Dashboard = lazy(() => import('./pages/Dashboard')); @@ -17,11 +16,13 @@ const Loading = () => ( ); -export default function App() { +function ThemedRoutes() { + const { Home, Layout } = useTheme(); + return ( }> - {/* Public pages with layout */} + {/* Public pages with themed layout */} }> } /> } /> @@ -41,3 +42,11 @@ export default function App() { ); } + +export default function App() { + return ( + + + + ); +} diff --git a/src/components/bits/Aurora.jsx b/src/components/bits/Aurora.jsx new file mode 100644 index 0000000..36cd943 --- /dev/null +++ b/src/components/bits/Aurora.jsx @@ -0,0 +1,200 @@ +import { Renderer, Program, Mesh, Color, Triangle } from 'ogl'; +import { useEffect, useRef } from 'react'; + +const VERT = `#version 300 es +in vec2 position; +void main() { + gl_Position = vec4(position, 0.0, 1.0); +} +`; + +const FRAG = `#version 300 es +precision highp float; + +uniform float uTime; +uniform float uAmplitude; +uniform vec3 uColorStops[3]; +uniform vec2 uResolution; +uniform float uBlend; + +out vec4 fragColor; + +vec3 permute(vec3 x) { + return mod(((x * 34.0) + 1.0) * x, 289.0); +} + +float snoise(vec2 v){ + const vec4 C = vec4( + 0.211324865405187, 0.366025403784439, + -0.577350269189626, 0.024390243902439 + ); + vec2 i = floor(v + dot(v, C.yy)); + vec2 x0 = v - i + dot(i, C.xx); + vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0); + vec4 x12 = x0.xyxy + C.xxzz; + x12.xy -= i1; + i = mod(i, 289.0); + + vec3 p = permute( + permute(i.y + vec3(0.0, i1.y, 1.0)) + + i.x + vec3(0.0, i1.x, 1.0) + ); + + vec3 m = max( + 0.5 - vec3( + dot(x0, x0), + dot(x12.xy, x12.xy), + dot(x12.zw, x12.zw) + ), + 0.0 + ); + m = m * m; + m = m * m; + + vec3 x = 2.0 * fract(p * C.www) - 1.0; + vec3 h = abs(x) - 0.5; + vec3 ox = floor(x + 0.5); + vec3 a0 = x - ox; + m *= 1.79284291400159 - 0.85373472095314 * (a0*a0 + h*h); + + vec3 g; + g.x = a0.x * x0.x + h.x * x0.y; + g.yz = a0.yz * x12.xz + h.yz * x12.yw; + return 130.0 * dot(m, g); +} + +struct ColorStop { + vec3 color; + float position; +}; + +#define COLOR_RAMP(colors, factor, finalColor) { \ + int index = 0; \ + for (int i = 0; i < 2; i++) { \ + ColorStop currentColor = colors[i]; \ + bool isInBetween = currentColor.position <= factor; \ + index = int(mix(float(index), float(i), float(isInBetween))); \ + } \ + ColorStop currentColor = colors[index]; \ + ColorStop nextColor = colors[index + 1]; \ + float range = nextColor.position - currentColor.position; \ + float lerpFactor = (factor - currentColor.position) / range; \ + finalColor = mix(currentColor.color, nextColor.color, lerpFactor); \ +} + +void main() { + vec2 uv = gl_FragCoord.xy / uResolution; + + ColorStop colors[3]; + colors[0] = ColorStop(uColorStops[0], 0.0); + colors[1] = ColorStop(uColorStops[1], 0.5); + colors[2] = ColorStop(uColorStops[2], 1.0); + + vec3 rampColor; + COLOR_RAMP(colors, uv.x, rampColor); + + float height = snoise(vec2(uv.x * 2.0 + uTime * 0.1, uTime * 0.25)) * 0.5 * uAmplitude; + height = exp(height); + height = (uv.y * 2.0 - height + 0.2); + float intensity = 0.6 * height; + + float midPoint = 0.20; + float auroraAlpha = smoothstep(midPoint - uBlend * 0.5, midPoint + uBlend * 0.5, intensity); + + vec3 auroraColor = intensity * rampColor; + + fragColor = vec4(auroraColor * auroraAlpha, auroraAlpha); +} +`; + +export default function Aurora(props) { + const { colorStops = ['#5227FF', '#7cff67', '#5227FF'], amplitude = 1.0, blend = 0.5 } = props; + const propsRef = useRef(props); + propsRef.current = props; + + const ctnDom = useRef(null); + + useEffect(() => { + const ctn = ctnDom.current; + if (!ctn) return; + + const renderer = new Renderer({ + alpha: true, + premultipliedAlpha: true, + antialias: true + }); + const gl = renderer.gl; + gl.clearColor(0, 0, 0, 0); + gl.enable(gl.BLEND); + gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); + gl.canvas.style.backgroundColor = 'transparent'; + + let program; + + function resize() { + if (!ctn) return; + const width = ctn.offsetWidth; + const height = ctn.offsetHeight; + renderer.setSize(width, height); + if (program) { + program.uniforms.uResolution.value = [width, height]; + } + } + window.addEventListener('resize', resize); + + const geometry = new Triangle(gl); + if (geometry.attributes.uv) { + delete geometry.attributes.uv; + } + + const colorStopsArray = colorStops.map(hex => { + const c = new Color(hex); + return [c.r, c.g, c.b]; + }); + + program = new Program(gl, { + vertex: VERT, + fragment: FRAG, + uniforms: { + uTime: { value: 0 }, + uAmplitude: { value: amplitude }, + uColorStops: { value: colorStopsArray }, + uResolution: { value: [ctn.offsetWidth, ctn.offsetHeight] }, + uBlend: { value: blend } + } + }); + + const mesh = new Mesh(gl, { geometry, program }); + ctn.appendChild(gl.canvas); + + let animateId = 0; + const update = t => { + animateId = requestAnimationFrame(update); + const { time = t * 0.01, speed = 1.0 } = propsRef.current; + program.uniforms.uTime.value = time * speed * 0.1; + program.uniforms.uAmplitude.value = propsRef.current.amplitude ?? 1.0; + program.uniforms.uBlend.value = propsRef.current.blend ?? blend; + const stops = propsRef.current.colorStops ?? colorStops; + program.uniforms.uColorStops.value = stops.map(hex => { + const c = new Color(hex); + return [c.r, c.g, c.b]; + }); + renderer.render({ scene: mesh }); + }; + animateId = requestAnimationFrame(update); + + resize(); + + return () => { + cancelAnimationFrame(animateId); + window.removeEventListener('resize', resize); + if (ctn && gl.canvas.parentNode === ctn) { + ctn.removeChild(gl.canvas); + } + gl.getExtension('WEBGL_lose_context')?.loseContext(); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [amplitude]); + + return
; +} diff --git a/src/components/bits/DecryptedText.jsx b/src/components/bits/DecryptedText.jsx new file mode 100644 index 0000000..34b4f90 --- /dev/null +++ b/src/components/bits/DecryptedText.jsx @@ -0,0 +1,370 @@ +import { useEffect, useState, useRef, useMemo, useCallback } from 'react'; +import { motion } from 'motion/react'; + +export default function DecryptedText({ + text, + speed = 50, + maxIterations = 10, + sequential = false, + revealDirection = 'start', + useOriginalCharsOnly = false, + characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+', + className = '', + parentClassName = '', + encryptedClassName = '', + animateOn = 'hover', + clickMode = 'once', + ...props +}) { + const [displayText, setDisplayText] = useState(text); + const [isAnimating, setIsAnimating] = useState(false); + const [revealedIndices, setRevealedIndices] = useState(new Set()); + const [hasAnimated, setHasAnimated] = useState(false); + const [isDecrypted, setIsDecrypted] = useState(animateOn !== 'click'); + const [direction, setDirection] = useState('forward'); + + const containerRef = useRef(null); + const orderRef = useRef([]); + const pointerRef = useRef(0); + + const availableChars = useMemo(() => { + return useOriginalCharsOnly + ? Array.from(new Set(text.split(''))).filter(char => char !== ' ') + : characters.split(''); + }, [useOriginalCharsOnly, text, characters]); + + const shuffleText = useCallback( + (originalText, currentRevealed) => { + return originalText + .split('') + .map((char, i) => { + if (char === ' ') return ' '; + if (currentRevealed.has(i)) return originalText[i]; + return availableChars[Math.floor(Math.random() * availableChars.length)]; + }) + .join(''); + }, + [availableChars] + ); + + const computeOrder = useCallback( + len => { + const order = []; + if (len <= 0) return order; + if (revealDirection === 'start') { + for (let i = 0; i < len; i++) order.push(i); + return order; + } + if (revealDirection === 'end') { + for (let i = len - 1; i >= 0; i--) order.push(i); + return order; + } + // center + const middle = Math.floor(len / 2); + let offset = 0; + while (order.length < len) { + if (offset % 2 === 0) { + const idx = middle + offset / 2; + if (idx >= 0 && idx < len) order.push(idx); + } else { + const idx = middle - Math.ceil(offset / 2); + if (idx >= 0 && idx < len) order.push(idx); + } + offset++; + } + return order.slice(0, len); + }, + [revealDirection] + ); + + const fillAllIndices = useCallback(() => { + const s = new Set(); + for (let i = 0; i < text.length; i++) s.add(i); + return s; + }, [text]); + + const removeRandomIndices = useCallback((set, count) => { + const arr = Array.from(set); + for (let i = 0; i < count && arr.length > 0; i++) { + const idx = Math.floor(Math.random() * arr.length); + arr.splice(idx, 1); + } + return new Set(arr); + }, []); + + const encryptInstantly = useCallback(() => { + const emptySet = new Set(); + setRevealedIndices(emptySet); + setDisplayText(shuffleText(text, emptySet)); + setIsDecrypted(false); + }, [text, shuffleText]); + + const triggerDecrypt = useCallback(() => { + if (sequential) { + orderRef.current = computeOrder(text.length); + pointerRef.current = 0; + setRevealedIndices(new Set()); + } else { + setRevealedIndices(new Set()); + } + setDirection('forward'); + setIsAnimating(true); + }, [sequential, computeOrder, text.length]); + + const triggerReverse = useCallback(() => { + if (sequential) { + // compute forward order then reverse it: we'll remove indices in that order + orderRef.current = computeOrder(text.length).slice().reverse(); + pointerRef.current = 0; + setRevealedIndices(fillAllIndices()); // start fully revealed + setDisplayText(shuffleText(text, fillAllIndices())); + } else { + // non-seq: start from fully revealed as well + setRevealedIndices(fillAllIndices()); + setDisplayText(shuffleText(text, fillAllIndices())); + } + setDirection('reverse'); + setIsAnimating(true); + }, [sequential, computeOrder, fillAllIndices, shuffleText, text]); + + useEffect(() => { + if (!isAnimating) return; + + let interval; + let currentIteration = 0; + + const getNextIndex = revealedSet => { + const textLength = text.length; + switch (revealDirection) { + case 'start': + return revealedSet.size; + case 'end': + return textLength - 1 - revealedSet.size; + case 'center': { + const middle = Math.floor(textLength / 2); + const offset = Math.floor(revealedSet.size / 2); + const nextIndex = revealedSet.size % 2 === 0 ? middle + offset : middle - offset - 1; + + if (nextIndex >= 0 && nextIndex < textLength && !revealedSet.has(nextIndex)) { + return nextIndex; + } + for (let i = 0; i < textLength; i++) { + if (!revealedSet.has(i)) return i; + } + return 0; + } + default: + return revealedSet.size; + } + }; + + interval = setInterval(() => { + setRevealedIndices(prevRevealed => { + if (sequential) { + // Forward + if (direction === 'forward') { + if (prevRevealed.size < text.length) { + const nextIndex = getNextIndex(prevRevealed); + const newRevealed = new Set(prevRevealed); + newRevealed.add(nextIndex); + setDisplayText(shuffleText(text, newRevealed)); + return newRevealed; + } else { + clearInterval(interval); + setIsAnimating(false); + setIsDecrypted(true); + return prevRevealed; + } + } + + // Reverse + if (direction === 'reverse') { + if (pointerRef.current < orderRef.current.length) { + const idxToRemove = orderRef.current[pointerRef.current++]; + const newRevealed = new Set(prevRevealed); + newRevealed.delete(idxToRemove); + setDisplayText(shuffleText(text, newRevealed)); + if (newRevealed.size === 0) { + clearInterval(interval); + setIsAnimating(false); + setIsDecrypted(false); + } + return newRevealed; + } else { + clearInterval(interval); + setIsAnimating(false); + setIsDecrypted(false); + return prevRevealed; + } + } + } else { + // Non-Sequential + if (direction === 'forward') { + setDisplayText(shuffleText(text, prevRevealed)); + currentIteration++; + if (currentIteration >= maxIterations) { + clearInterval(interval); + setIsAnimating(false); + setDisplayText(text); + setIsDecrypted(true); + } + return prevRevealed; + } + + // Non-Sequential Reverse + if (direction === 'reverse') { + let currentSet = prevRevealed; + if (currentSet.size === 0) { + currentSet = fillAllIndices(); + } + const removeCount = Math.max(1, Math.ceil(text.length / Math.max(1, maxIterations))); + const nextSet = removeRandomIndices(currentSet, removeCount); + setDisplayText(shuffleText(text, nextSet)); + currentIteration++; + if (nextSet.size === 0 || currentIteration >= maxIterations) { + clearInterval(interval); + setIsAnimating(false); + setIsDecrypted(false); + // ensure final scrambled state + setDisplayText(shuffleText(text, new Set())); + return new Set(); + } + return nextSet; + } + } + return prevRevealed; + }); + }, speed); + + return () => clearInterval(interval); + }, [ + isAnimating, + text, + speed, + maxIterations, + sequential, + revealDirection, + shuffleText, + direction, + fillAllIndices, + removeRandomIndices, + characters, + useOriginalCharsOnly + ]); + + /* Click Behaviour */ + const handleClick = () => { + if (animateOn !== 'click') return; + + if (clickMode === 'once') { + if (isDecrypted) return; + setDirection('forward'); + triggerDecrypt(); + } + + if (clickMode === 'toggle') { + if (isDecrypted) { + triggerReverse(); + } else { + setDirection('forward'); + triggerDecrypt(); + } + } + }; + + /* Hover Behaviour */ + const triggerHoverDecrypt = useCallback(() => { + if (isAnimating) return; + + // Reset animation state cleanly + setRevealedIndices(new Set()); + setIsDecrypted(false); + setDisplayText(text); + + setDirection('forward'); + setIsAnimating(true); + }, [isAnimating, text]); + + const resetToPlainText = useCallback(() => { + setIsAnimating(false); + setRevealedIndices(new Set()); + setDisplayText(text); + setIsDecrypted(true); + setDirection('forward'); + }, [text]); + + useEffect(() => { + if (animateOn !== 'view' && animateOn !== 'inViewHover') return; + + const observerCallback = entries => { + entries.forEach(entry => { + if (entry.isIntersecting && !hasAnimated) { + triggerDecrypt(); + setHasAnimated(true); + } + }); + }; + + const observerOptions = { + root: null, + rootMargin: '0px', + threshold: 0.1 + }; + + const observer = new IntersectionObserver(observerCallback, observerOptions); + const currentRef = containerRef.current; + if (currentRef) { + observer.observe(currentRef); + } + + return () => { + if (currentRef) observer.unobserve(currentRef); + }; + }, [animateOn, hasAnimated, triggerDecrypt]); + + useEffect(() => { + if (animateOn === 'click') { + encryptInstantly(); + } else { + setDisplayText(text); + setIsDecrypted(true); + } + setRevealedIndices(new Set()); + setDirection('forward'); + }, [animateOn, text, encryptInstantly]); + + const animateProps = + animateOn === 'hover' || animateOn === 'inViewHover' + ? { + onMouseEnter: triggerHoverDecrypt, + onMouseLeave: resetToPlainText + } + : animateOn === 'click' + ? { + onClick: handleClick + } + : {}; + + return ( + + {displayText} + + + + ); +} diff --git a/src/components/bits/FadeContent.jsx b/src/components/bits/FadeContent.jsx new file mode 100644 index 0000000..72c785d --- /dev/null +++ b/src/components/bits/FadeContent.jsx @@ -0,0 +1,52 @@ +import { useRef, useEffect, useState } from 'react'; + +const FadeContent = ({ + children, + blur = false, + duration = 800, + delay = 0, + threshold = 0.1, + initialOpacity = 0, + className = '', + ...props +}) => { + const ref = useRef(null); + const [visible, setVisible] = useState(false); + + useEffect(() => { + const el = ref.current; + if (!el) return; + + const observer = new IntersectionObserver( + ([entry]) => { + if (entry.isIntersecting) { + setVisible(true); + observer.disconnect(); + } + }, + { threshold } + ); + + observer.observe(el); + return () => observer.disconnect(); + }, [threshold]); + + return ( +
+ {children} +
+ ); +}; + +export default FadeContent; diff --git a/src/components/bits/GlitchText.jsx b/src/components/bits/GlitchText.jsx new file mode 100644 index 0000000..9cc8d51 --- /dev/null +++ b/src/components/bits/GlitchText.jsx @@ -0,0 +1,66 @@ +const GlitchText = ({ children, speed = 0.5, enableShadows = true, enableOnHover = false, className = '' }) => { + const inlineStyles = { + '--after-duration': `${speed * 3}s`, + '--before-duration': `${speed * 2}s`, + '--after-shadow': enableShadows ? '-5px 0 red' : 'none', + '--before-shadow': enableShadows ? '5px 0 cyan' : 'none' + }; + + const baseClasses = 'text-white text-[clamp(2rem,10vw,8rem)] font-black relative mx-auto select-none cursor-pointer'; + + const pseudoClasses = !enableOnHover + ? 'after:content-[attr(data-text)] after:absolute after:top-0 after:left-[10px] after:text-white after:bg-[#060010] after:overflow-hidden after:[clip-path:inset(0_0_0_0)] after:[text-shadow:var(--after-shadow)] after:animate-glitch-after ' + + 'before:content-[attr(data-text)] before:absolute before:top-0 before:left-[-10px] before:text-white before:bg-[#060010] before:overflow-hidden before:[clip-path:inset(0_0_0_0)] before:[text-shadow:var(--before-shadow)] before:animate-glitch-before' + : "after:content-[''] after:absolute after:top-0 after:left-[10px] after:text-white after:bg-[#060010] after:overflow-hidden after:[clip-path:inset(0_0_0_0)] after:opacity-0 " + + "before:content-[''] before:absolute before:top-0 before:left-[-10px] before:text-white before:bg-[#060010] before:overflow-hidden before:[clip-path:inset(0_0_0_0)] before:opacity-0 " + + 'hover:after:content-[attr(data-text)] hover:after:opacity-100 hover:after:[text-shadow:var(--after-shadow)] hover:after:animate-glitch-after ' + + 'hover:before:content-[attr(data-text)] hover:before:opacity-100 hover:before:[text-shadow:var(--before-shadow)] hover:before:animate-glitch-before'; + + const combinedClasses = `${baseClasses} ${pseudoClasses} ${className}`; + + return ( +
+ {children} +
+ ); +}; + +export default GlitchText; + +// tailwind.config.js +// module.exports = { +// theme: { +// extend: { +// keyframes: { +// glitch: { +// "0%": { "clip-path": "inset(20% 0 50% 0)" }, +// "5%": { "clip-path": "inset(10% 0 60% 0)" }, +// "10%": { "clip-path": "inset(15% 0 55% 0)" }, +// "15%": { "clip-path": "inset(25% 0 35% 0)" }, +// "20%": { "clip-path": "inset(30% 0 40% 0)" }, +// "25%": { "clip-path": "inset(40% 0 20% 0)" }, +// "30%": { "clip-path": "inset(10% 0 60% 0)" }, +// "35%": { "clip-path": "inset(15% 0 55% 0)" }, +// "40%": { "clip-path": "inset(25% 0 35% 0)" }, +// "45%": { "clip-path": "inset(30% 0 40% 0)" }, +// "50%": { "clip-path": "inset(20% 0 50% 0)" }, +// "55%": { "clip-path": "inset(10% 0 60% 0)" }, +// "60%": { "clip-path": "inset(15% 0 55% 0)" }, +// "65%": { "clip-path": "inset(25% 0 35% 0)" }, +// "70%": { "clip-path": "inset(30% 0 40% 0)" }, +// "75%": { "clip-path": "inset(40% 0 20% 0)" }, +// "80%": { "clip-path": "inset(20% 0 50% 0)" }, +// "85%": { "clip-path": "inset(10% 0 60% 0)" }, +// "90%": { "clip-path": "inset(15% 0 55% 0)" }, +// "95%": { "clip-path": "inset(25% 0 35% 0)" }, +// "100%": { "clip-path": "inset(30% 0 40% 0)" }, +// }, +// }, +// animation: { +// "glitch-after": "glitch var(--after-duration) infinite linear alternate-reverse", +// "glitch-before": "glitch var(--before-duration) infinite linear alternate-reverse", +// }, +// }, +// }, +// plugins: [], +// }; diff --git a/src/components/bits/Particles.jsx b/src/components/bits/Particles.jsx new file mode 100644 index 0000000..1835117 --- /dev/null +++ b/src/components/bits/Particles.jsx @@ -0,0 +1,242 @@ +import { useEffect, useRef } from 'react'; +import { Renderer, Camera, Geometry, Program, Mesh } from 'ogl'; + +const defaultColors = ['#ffffff', '#ffffff', '#ffffff']; + +const hexToRgb = hex => { + hex = hex.replace(/^#/, ''); + if (hex.length === 3) { + hex = hex + .split('') + .map(c => c + c) + .join(''); + } + const int = parseInt(hex, 16); + const r = ((int >> 16) & 255) / 255; + const g = ((int >> 8) & 255) / 255; + const b = (int & 255) / 255; + return [r, g, b]; +}; + +const vertex = /* glsl */ ` + attribute vec3 position; + attribute vec4 random; + attribute vec3 color; + + uniform mat4 modelMatrix; + uniform mat4 viewMatrix; + uniform mat4 projectionMatrix; + uniform float uTime; + uniform float uSpread; + uniform float uBaseSize; + uniform float uSizeRandomness; + + varying vec4 vRandom; + varying vec3 vColor; + + void main() { + vRandom = random; + vColor = color; + + vec3 pos = position * uSpread; + pos.z *= 10.0; + + vec4 mPos = modelMatrix * vec4(pos, 1.0); + float t = uTime; + mPos.x += sin(t * random.z + 6.28 * random.w) * mix(0.1, 1.5, random.x); + mPos.y += sin(t * random.y + 6.28 * random.x) * mix(0.1, 1.5, random.w); + mPos.z += sin(t * random.w + 6.28 * random.y) * mix(0.1, 1.5, random.z); + + vec4 mvPos = viewMatrix * mPos; + + if (uSizeRandomness == 0.0) { + gl_PointSize = uBaseSize; + } else { + gl_PointSize = (uBaseSize * (1.0 + uSizeRandomness * (random.x - 0.5))) / length(mvPos.xyz); + } + + gl_Position = projectionMatrix * mvPos; + } +`; + +const fragment = /* glsl */ ` + precision highp float; + + uniform float uTime; + uniform float uAlphaParticles; + varying vec4 vRandom; + varying vec3 vColor; + + void main() { + vec2 uv = gl_PointCoord.xy; + float d = length(uv - vec2(0.5)); + + if(uAlphaParticles < 0.5) { + if(d > 0.5) { + discard; + } + gl_FragColor = vec4(vColor + 0.2 * sin(uv.yxx + uTime + vRandom.y * 6.28), 1.0); + } else { + float circle = smoothstep(0.5, 0.4, d) * 0.8; + gl_FragColor = vec4(vColor + 0.2 * sin(uv.yxx + uTime + vRandom.y * 6.28), circle); + } + } +`; + +const Particles = ({ + particleCount = 200, + particleSpread = 10, + speed = 0.1, + particleColors, + moveParticlesOnHover = false, + particleHoverFactor = 1, + alphaParticles = false, + particleBaseSize = 100, + sizeRandomness = 1, + cameraDistance = 20, + disableRotation = false, + pixelRatio = 1, + className +}) => { + const containerRef = useRef(null); + const mouseRef = useRef({ x: 0, y: 0 }); + + useEffect(() => { + const container = containerRef.current; + if (!container) return; + + const renderer = new Renderer({ + dpr: pixelRatio, + depth: false, + alpha: true + }); + const gl = renderer.gl; + container.appendChild(gl.canvas); + gl.clearColor(0, 0, 0, 0); + + const camera = new Camera(gl, { fov: 15 }); + camera.position.set(0, 0, cameraDistance); + + const resize = () => { + const width = container.clientWidth; + const height = container.clientHeight; + renderer.setSize(width, height); + camera.perspective({ aspect: gl.canvas.width / gl.canvas.height }); + }; + window.addEventListener('resize', resize, false); + resize(); + + const handleMouseMove = e => { + const rect = container.getBoundingClientRect(); + const x = ((e.clientX - rect.left) / rect.width) * 2 - 1; + const y = -(((e.clientY - rect.top) / rect.height) * 2 - 1); + mouseRef.current = { x, y }; + }; + + if (moveParticlesOnHover) { + container.addEventListener('mousemove', handleMouseMove); + } + + const count = particleCount; + const positions = new Float32Array(count * 3); + const randoms = new Float32Array(count * 4); + const colors = new Float32Array(count * 3); + const palette = particleColors && particleColors.length > 0 ? particleColors : defaultColors; + + for (let i = 0; i < count; i++) { + let x, y, z, len; + do { + x = Math.random() * 2 - 1; + y = Math.random() * 2 - 1; + z = Math.random() * 2 - 1; + len = x * x + y * y + z * z; + } while (len > 1 || len === 0); + const r = Math.cbrt(Math.random()); + positions.set([x * r, y * r, z * r], i * 3); + randoms.set([Math.random(), Math.random(), Math.random(), Math.random()], i * 4); + const col = hexToRgb(palette[Math.floor(Math.random() * palette.length)]); + colors.set(col, i * 3); + } + + const geometry = new Geometry(gl, { + position: { size: 3, data: positions }, + random: { size: 4, data: randoms }, + color: { size: 3, data: colors } + }); + + const program = new Program(gl, { + vertex, + fragment, + uniforms: { + uTime: { value: 0 }, + uSpread: { value: particleSpread }, + uBaseSize: { value: particleBaseSize * pixelRatio }, + uSizeRandomness: { value: sizeRandomness }, + uAlphaParticles: { value: alphaParticles ? 1 : 0 } + }, + transparent: true, + depthTest: false + }); + + const particles = new Mesh(gl, { mode: gl.POINTS, geometry, program }); + + let animationFrameId; + let lastTime = performance.now(); + let elapsed = 0; + + const update = t => { + animationFrameId = requestAnimationFrame(update); + const delta = t - lastTime; + lastTime = t; + elapsed += delta * speed; + + program.uniforms.uTime.value = elapsed * 0.001; + + if (moveParticlesOnHover) { + particles.position.x = -mouseRef.current.x * particleHoverFactor; + particles.position.y = -mouseRef.current.y * particleHoverFactor; + } else { + particles.position.x = 0; + particles.position.y = 0; + } + + if (!disableRotation) { + particles.rotation.x = Math.sin(elapsed * 0.0002) * 0.1; + particles.rotation.y = Math.cos(elapsed * 0.0005) * 0.15; + particles.rotation.z += 0.01 * speed; + } + + renderer.render({ scene: particles, camera }); + }; + + animationFrameId = requestAnimationFrame(update); + + return () => { + window.removeEventListener('resize', resize); + if (moveParticlesOnHover) { + container.removeEventListener('mousemove', handleMouseMove); + } + cancelAnimationFrame(animationFrameId); + if (container.contains(gl.canvas)) { + container.removeChild(gl.canvas); + } + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [ + particleCount, + particleSpread, + speed, + moveParticlesOnHover, + particleHoverFactor, + alphaParticles, + particleBaseSize, + sizeRandomness, + cameraDistance, + disableRotation, + pixelRatio + ]); + + return
; +}; + +export default Particles; diff --git a/src/components/bits/PixelCard.jsx b/src/components/bits/PixelCard.jsx new file mode 100644 index 0000000..5a741c9 --- /dev/null +++ b/src/components/bits/PixelCard.jsx @@ -0,0 +1,240 @@ +import { useEffect, useRef } from 'react'; + +class Pixel { + constructor(canvas, context, x, y, color, speed, delay) { + this.width = canvas.width; + this.height = canvas.height; + this.ctx = context; + this.x = x; + this.y = y; + this.color = color; + this.speed = this.getRandomValue(0.1, 0.9) * speed; + this.size = 0; + this.sizeStep = Math.random() * 0.4; + this.minSize = 0.5; + this.maxSizeInteger = 2; + this.maxSize = this.getRandomValue(this.minSize, this.maxSizeInteger); + this.delay = delay; + this.counter = 0; + this.counterStep = Math.random() * 4 + (this.width + this.height) * 0.01; + this.isIdle = false; + this.isReverse = false; + this.isShimmer = false; + } + + getRandomValue(min, max) { + return Math.random() * (max - min) + min; + } + + draw() { + const centerOffset = this.maxSizeInteger * 0.5 - this.size * 0.5; + this.ctx.fillStyle = this.color; + this.ctx.fillRect(this.x + centerOffset, this.y + centerOffset, this.size, this.size); + } + + appear() { + this.isIdle = false; + if (this.counter <= this.delay) { + this.counter += this.counterStep; + return; + } + if (this.size >= this.maxSize) { + this.isShimmer = true; + } + if (this.isShimmer) { + this.shimmer(); + } else { + this.size += this.sizeStep; + } + this.draw(); + } + + disappear() { + this.isShimmer = false; + this.counter = 0; + if (this.size <= 0) { + this.isIdle = true; + return; + } else { + this.size -= 0.1; + } + this.draw(); + } + + shimmer() { + if (this.size >= this.maxSize) { + this.isReverse = true; + } else if (this.size <= this.minSize) { + this.isReverse = false; + } + if (this.isReverse) { + this.size -= this.speed; + } else { + this.size += this.speed; + } + } +} + +function getEffectiveSpeed(value, reducedMotion) { + const min = 0; + const max = 100; + const throttle = 0.001; + const parsed = parseInt(value, 10); + + if (parsed <= min || reducedMotion) { + return min; + } else if (parsed >= max) { + return max * throttle; + } else { + return parsed * throttle; + } +} + +const VARIANTS = { + default: { + activeColor: null, + gap: 5, + speed: 35, + colors: '#f8fafc,#f1f5f9,#cbd5e1', + noFocus: false + }, + blue: { + activeColor: '#e0f2fe', + gap: 10, + speed: 25, + colors: '#e0f2fe,#7dd3fc,#0ea5e9', + noFocus: false + }, + yellow: { + activeColor: '#fef08a', + gap: 3, + speed: 20, + colors: '#fef08a,#fde047,#eab308', + noFocus: false + }, + pink: { + activeColor: '#fecdd3', + gap: 6, + speed: 80, + colors: '#fecdd3,#fda4af,#e11d48', + noFocus: true + } +}; + +export default function PixelCard({ variant = 'default', gap, speed, colors, noFocus, className = '', children }) { + const containerRef = useRef(null); + const canvasRef = useRef(null); + const pixelsRef = useRef([]); + const animationRef = useRef(null); + const timePreviousRef = useRef(performance.now()); + const reducedMotion = useRef(window.matchMedia('(prefers-reduced-motion: reduce)').matches).current; + + const variantCfg = VARIANTS[variant] || VARIANTS.default; + const finalGap = gap ?? variantCfg.gap; + const finalSpeed = speed ?? variantCfg.speed; + const finalColors = colors ?? variantCfg.colors; + const finalNoFocus = noFocus ?? variantCfg.noFocus; + + const initPixels = () => { + if (!containerRef.current || !canvasRef.current) return; + + const rect = containerRef.current.getBoundingClientRect(); + const width = Math.floor(rect.width); + const height = Math.floor(rect.height); + const ctx = canvasRef.current.getContext('2d'); + + canvasRef.current.width = width; + canvasRef.current.height = height; + canvasRef.current.style.width = `${width}px`; + canvasRef.current.style.height = `${height}px`; + + const colorsArray = finalColors.split(','); + const pxs = []; + for (let x = 0; x < width; x += parseInt(finalGap, 10)) { + for (let y = 0; y < height; y += parseInt(finalGap, 10)) { + const color = colorsArray[Math.floor(Math.random() * colorsArray.length)]; + + const dx = x - width / 2; + const dy = y - height / 2; + const distance = Math.sqrt(dx * dx + dy * dy); + const delay = reducedMotion ? 0 : distance; + + pxs.push(new Pixel(canvasRef.current, ctx, x, y, color, getEffectiveSpeed(finalSpeed, reducedMotion), delay)); + } + } + pixelsRef.current = pxs; + }; + + const doAnimate = fnName => { + animationRef.current = requestAnimationFrame(() => doAnimate(fnName)); + const timeNow = performance.now(); + const timePassed = timeNow - timePreviousRef.current; + const timeInterval = 1000 / 60; + + if (timePassed < timeInterval) return; + timePreviousRef.current = timeNow - (timePassed % timeInterval); + + const ctx = canvasRef.current?.getContext('2d'); + if (!ctx || !canvasRef.current) return; + + ctx.clearRect(0, 0, canvasRef.current.width, canvasRef.current.height); + + let allIdle = true; + for (let i = 0; i < pixelsRef.current.length; i++) { + const pixel = pixelsRef.current[i]; + pixel[fnName](); + if (!pixel.isIdle) { + allIdle = false; + } + } + if (allIdle) { + cancelAnimationFrame(animationRef.current); + } + }; + + const handleAnimation = name => { + cancelAnimationFrame(animationRef.current); + animationRef.current = requestAnimationFrame(() => doAnimate(name)); + }; + + const onMouseEnter = () => handleAnimation('appear'); + const onMouseLeave = () => handleAnimation('disappear'); + const onFocus = e => { + if (e.currentTarget.contains(e.relatedTarget)) return; + handleAnimation('appear'); + }; + const onBlur = e => { + if (e.currentTarget.contains(e.relatedTarget)) return; + handleAnimation('disappear'); + }; + + useEffect(() => { + initPixels(); + const observer = new ResizeObserver(() => { + initPixels(); + }); + if (containerRef.current) { + observer.observe(containerRef.current); + } + return () => { + observer.disconnect(); + cancelAnimationFrame(animationRef.current); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [finalGap, finalSpeed, finalColors, finalNoFocus]); + + return ( +
+ + {children} +
+ ); +} diff --git a/src/components/bits/RotatingText.jsx b/src/components/bits/RotatingText.jsx new file mode 100644 index 0000000..59efe82 --- /dev/null +++ b/src/components/bits/RotatingText.jsx @@ -0,0 +1,191 @@ +'use client'; + +import { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useState } from 'react'; +import { motion, AnimatePresence } from 'motion/react'; + +function cn(...classes) { + return classes.filter(Boolean).join(' '); +} + +const RotatingText = forwardRef((props, ref) => { + const { + texts, + transition = { type: 'spring', damping: 25, stiffness: 300 }, + initial = { y: '100%', opacity: 0 }, + animate = { y: 0, opacity: 1 }, + exit = { y: '-120%', opacity: 0 }, + animatePresenceMode = 'wait', + animatePresenceInitial = false, + rotationInterval = 2000, + staggerDuration = 0, + staggerFrom = 'first', + loop = true, + auto = true, + splitBy = 'characters', + onNext, + mainClassName, + splitLevelClassName, + elementLevelClassName, + ...rest + } = props; + + const [currentTextIndex, setCurrentTextIndex] = useState(0); + + const splitIntoCharacters = text => { + if (typeof Intl !== 'undefined' && Intl.Segmenter) { + const segmenter = new Intl.Segmenter('en', { granularity: 'grapheme' }); + return Array.from(segmenter.segment(text), segment => segment.segment); + } + return Array.from(text); + }; + + const elements = useMemo(() => { + const currentText = texts[currentTextIndex]; + if (splitBy === 'characters') { + const words = currentText.split(' '); + return words.map((word, i) => ({ + characters: splitIntoCharacters(word), + needsSpace: i !== words.length - 1 + })); + } + if (splitBy === 'words') { + return currentText.split(' ').map((word, i, arr) => ({ + characters: [word], + needsSpace: i !== arr.length - 1 + })); + } + if (splitBy === 'lines') { + return currentText.split('\n').map((line, i, arr) => ({ + characters: [line], + needsSpace: i !== arr.length - 1 + })); + } + + return currentText.split(splitBy).map((part, i, arr) => ({ + characters: [part], + needsSpace: i !== arr.length - 1 + })); + }, [texts, currentTextIndex, splitBy]); + + const getStaggerDelay = useCallback( + (index, totalChars) => { + const total = totalChars; + if (staggerFrom === 'first') return index * staggerDuration; + if (staggerFrom === 'last') return (total - 1 - index) * staggerDuration; + if (staggerFrom === 'center') { + const center = Math.floor(total / 2); + return Math.abs(center - index) * staggerDuration; + } + if (staggerFrom === 'random') { + const randomIndex = Math.floor(Math.random() * total); + return Math.abs(randomIndex - index) * staggerDuration; + } + return Math.abs(staggerFrom - index) * staggerDuration; + }, + [staggerFrom, staggerDuration] + ); + + const handleIndexChange = useCallback( + newIndex => { + setCurrentTextIndex(newIndex); + if (onNext) onNext(newIndex); + }, + [onNext] + ); + + const next = useCallback(() => { + const nextIndex = currentTextIndex === texts.length - 1 ? (loop ? 0 : currentTextIndex) : currentTextIndex + 1; + if (nextIndex !== currentTextIndex) { + handleIndexChange(nextIndex); + } + }, [currentTextIndex, texts.length, loop, handleIndexChange]); + + const previous = useCallback(() => { + const prevIndex = currentTextIndex === 0 ? (loop ? texts.length - 1 : currentTextIndex) : currentTextIndex - 1; + if (prevIndex !== currentTextIndex) { + handleIndexChange(prevIndex); + } + }, [currentTextIndex, texts.length, loop, handleIndexChange]); + + const jumpTo = useCallback( + index => { + const validIndex = Math.max(0, Math.min(index, texts.length - 1)); + if (validIndex !== currentTextIndex) { + handleIndexChange(validIndex); + } + }, + [texts.length, currentTextIndex, handleIndexChange] + ); + + const reset = useCallback(() => { + if (currentTextIndex !== 0) { + handleIndexChange(0); + } + }, [currentTextIndex, handleIndexChange]); + + useImperativeHandle( + ref, + () => ({ + next, + previous, + jumpTo, + reset + }), + [next, previous, jumpTo, reset] + ); + + useEffect(() => { + if (!auto) return; + const intervalId = setInterval(next, rotationInterval); + return () => clearInterval(intervalId); + }, [next, rotationInterval, auto]); + + return ( + + {texts[currentTextIndex]} + + + + + ); +}); + +RotatingText.displayName = 'RotatingText'; +export default RotatingText; diff --git a/src/components/bits/ScrollFloat.jsx b/src/components/bits/ScrollFloat.jsx new file mode 100644 index 0000000..7254001 --- /dev/null +++ b/src/components/bits/ScrollFloat.jsx @@ -0,0 +1,48 @@ +import { useRef, useEffect, useState } from 'react'; + +const ScrollFloat = ({ + children, + className = '', + scrollContainerRef, + animationDuration = 1, + ease = 'ease-out', + stagger = 0.03, +}) => { + const ref = useRef(null); + const [visible, setVisible] = useState(false); + + useEffect(() => { + const el = ref.current; + if (!el) return; + + const observer = new IntersectionObserver( + ([entry]) => { + if (entry.isIntersecting) { + setVisible(true); + observer.disconnect(); + } + }, + { threshold: 0.1, root: scrollContainerRef?.current || null } + ); + + observer.observe(el); + return () => observer.disconnect(); + }, [scrollContainerRef]); + + return ( + + {children} + + ); +}; + +export default ScrollFloat; diff --git a/src/components/bits/SplitText.jsx b/src/components/bits/SplitText.jsx new file mode 100644 index 0000000..ceb1c29 --- /dev/null +++ b/src/components/bits/SplitText.jsx @@ -0,0 +1,32 @@ +import { useMemo } from 'react'; +import { motion } from 'motion/react'; + +const SplitText = ({ + text = '', + className = '', + delay = 50, +}) => { + const chars = useMemo(() => text.split(''), [text]); + + return ( + + {chars.map((char, i) => ( + + {char} + + ))} + + ); +}; + +export default SplitText; diff --git a/src/components/bits/TiltedCard.jsx b/src/components/bits/TiltedCard.jsx new file mode 100644 index 0000000..018181c --- /dev/null +++ b/src/components/bits/TiltedCard.jsx @@ -0,0 +1,134 @@ +import { useRef, useState } from 'react'; +import { motion, useMotionValue, useSpring } from 'motion/react'; + +const springValues = { + damping: 30, + stiffness: 100, + mass: 2 +}; + +export default function TiltedCard({ + imageSrc, + altText = 'Tilted card image', + captionText = '', + containerHeight = '300px', + containerWidth = '100%', + imageHeight = '300px', + imageWidth = '300px', + scaleOnHover = 1.1, + rotateAmplitude = 14, + showMobileWarning = true, + showTooltip = true, + overlayContent = null, + displayOverlayContent = false +}) { + const ref = useRef(null); + const x = useMotionValue(0); + const y = useMotionValue(0); + const rotateX = useSpring(useMotionValue(0), springValues); + const rotateY = useSpring(useMotionValue(0), springValues); + const scale = useSpring(1, springValues); + const opacity = useSpring(0); + const rotateFigcaption = useSpring(0, { + stiffness: 350, + damping: 30, + mass: 1 + }); + + const [lastY, setLastY] = useState(0); + + function handleMouse(e) { + if (!ref.current) return; + + const rect = ref.current.getBoundingClientRect(); + const offsetX = e.clientX - rect.left - rect.width / 2; + const offsetY = e.clientY - rect.top - rect.height / 2; + + const rotationX = (offsetY / (rect.height / 2)) * -rotateAmplitude; + const rotationY = (offsetX / (rect.width / 2)) * rotateAmplitude; + + rotateX.set(rotationX); + rotateY.set(rotationY); + + x.set(e.clientX - rect.left); + y.set(e.clientY - rect.top); + + const velocityY = offsetY - lastY; + rotateFigcaption.set(-velocityY * 0.6); + setLastY(offsetY); + } + + function handleMouseEnter() { + scale.set(scaleOnHover); + opacity.set(1); + } + + function handleMouseLeave() { + opacity.set(0); + scale.set(1); + rotateX.set(0); + rotateY.set(0); + rotateFigcaption.set(0); + } + + return ( +
+ {showMobileWarning && ( +
+ This effect is not optimized for mobile. Check on desktop. +
+ )} + + + + + {displayOverlayContent && overlayContent && ( + + {overlayContent} + + )} + + + {showTooltip && ( + + {captionText} + + )} +
+ ); +} diff --git a/src/components/bits/Waves.jsx b/src/components/bits/Waves.jsx new file mode 100644 index 0000000..6927880 --- /dev/null +++ b/src/components/bits/Waves.jsx @@ -0,0 +1,319 @@ +import { useRef, useEffect } from 'react'; + +class Grad { + constructor(x, y, z) { + this.x = x; + this.y = y; + this.z = z; + } + dot2(x, y) { + return this.x * x + this.y * y; + } +} + +class Noise { + constructor(seed = 0) { + this.grad3 = [ + new Grad(1, 1, 0), + new Grad(-1, 1, 0), + new Grad(1, -1, 0), + new Grad(-1, -1, 0), + new Grad(1, 0, 1), + new Grad(-1, 0, 1), + new Grad(1, 0, -1), + new Grad(-1, 0, -1), + new Grad(0, 1, 1), + new Grad(0, -1, 1), + new Grad(0, 1, -1), + new Grad(0, -1, -1) + ]; + this.p = [ + 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, + 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, 88, + 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166, 77, 146, 158, 231, 83, + 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54, 65, 25, 63, 161, 1, 216, + 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, 135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186, + 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58, + 17, 182, 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9, + 129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246, 97, 228, 251, 34, 242, 193, + 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249, 14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157, + 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, + 195, 78, 66, 215, 61, 156, 180 + ]; + this.perm = new Array(512); + this.gradP = new Array(512); + this.seed(seed); + } + seed(seed) { + if (seed > 0 && seed < 1) seed *= 65536; + seed = Math.floor(seed); + if (seed < 256) seed |= seed << 8; + for (let i = 0; i < 256; i++) { + let v = i & 1 ? this.p[i] ^ (seed & 255) : this.p[i] ^ ((seed >> 8) & 255); + this.perm[i] = this.perm[i + 256] = v; + this.gradP[i] = this.gradP[i + 256] = this.grad3[v % 12]; + } + } + fade(t) { + return t * t * t * (t * (t * 6 - 15) + 10); + } + lerp(a, b, t) { + return (1 - t) * a + t * b; + } + perlin2(x, y) { + let X = Math.floor(x), + Y = Math.floor(y); + x -= X; + y -= Y; + X &= 255; + Y &= 255; + const n00 = this.gradP[X + this.perm[Y]].dot2(x, y); + const n01 = this.gradP[X + this.perm[Y + 1]].dot2(x, y - 1); + const n10 = this.gradP[X + 1 + this.perm[Y]].dot2(x - 1, y); + const n11 = this.gradP[X + 1 + this.perm[Y + 1]].dot2(x - 1, y - 1); + const u = this.fade(x); + return this.lerp(this.lerp(n00, n10, u), this.lerp(n01, n11, u), this.fade(y)); + } +} + +const Waves = ({ + lineColor = 'black', + backgroundColor = 'transparent', + waveSpeedX = 0.0125, + waveSpeedY = 0.005, + waveAmpX = 32, + waveAmpY = 16, + xGap = 10, + yGap = 32, + friction = 0.925, + tension = 0.005, + maxCursorMove = 100, + style = {}, + className = '' +}) => { + const containerRef = useRef(null); + const canvasRef = useRef(null); + const ctxRef = useRef(null); + const boundingRef = useRef({ width: 0, height: 0, left: 0, top: 0 }); + const noiseRef = useRef(new Noise(Math.random())); + const linesRef = useRef([]); + const mouseRef = useRef({ + x: -10, + y: 0, + lx: 0, + ly: 0, + sx: 0, + sy: 0, + v: 0, + vs: 0, + a: 0, + set: false + }); + + const configRef = useRef({ + lineColor, + waveSpeedX, + waveSpeedY, + waveAmpX, + waveAmpY, + friction, + tension, + maxCursorMove, + xGap, + yGap + }); + const frameIdRef = useRef(null); + + useEffect(() => { + configRef.current = { + lineColor, + waveSpeedX, + waveSpeedY, + waveAmpX, + waveAmpY, + friction, + tension, + maxCursorMove, + xGap, + yGap + }; + }, [lineColor, waveSpeedX, waveSpeedY, waveAmpX, waveAmpY, friction, tension, maxCursorMove, xGap, yGap]); + + useEffect(() => { + const canvas = canvasRef.current; + const container = containerRef.current; + ctxRef.current = canvas.getContext('2d'); + + function setSize() { + boundingRef.current = container.getBoundingClientRect(); + canvas.width = boundingRef.current.width; + canvas.height = boundingRef.current.height; + } + + function setLines() { + const { width, height } = boundingRef.current; + linesRef.current = []; + const oWidth = width + 200, + oHeight = height + 30; + const { xGap, yGap } = configRef.current; + const totalLines = Math.ceil(oWidth / xGap); + const totalPoints = Math.ceil(oHeight / yGap); + const xStart = (width - xGap * totalLines) / 2; + const yStart = (height - yGap * totalPoints) / 2; + for (let i = 0; i <= totalLines; i++) { + const pts = []; + for (let j = 0; j <= totalPoints; j++) { + pts.push({ + x: xStart + xGap * i, + y: yStart + yGap * j, + wave: { x: 0, y: 0 }, + cursor: { x: 0, y: 0, vx: 0, vy: 0 } + }); + } + linesRef.current.push(pts); + } + } + + function movePoints(time) { + const lines = linesRef.current, + mouse = mouseRef.current, + noise = noiseRef.current; + const { waveSpeedX, waveSpeedY, waveAmpX, waveAmpY, friction, tension, maxCursorMove } = configRef.current; + lines.forEach(pts => { + pts.forEach(p => { + const move = noise.perlin2((p.x + time * waveSpeedX) * 0.002, (p.y + time * waveSpeedY) * 0.0015) * 12; + p.wave.x = Math.cos(move) * waveAmpX; + p.wave.y = Math.sin(move) * waveAmpY; + + const dx = p.x - mouse.sx, + dy = p.y - mouse.sy; + const dist = Math.hypot(dx, dy), + l = Math.max(175, mouse.vs); + if (dist < l) { + const s = 1 - dist / l; + const f = Math.cos(dist * 0.001) * s; + p.cursor.vx += Math.cos(mouse.a) * f * l * mouse.vs * 0.00065; + p.cursor.vy += Math.sin(mouse.a) * f * l * mouse.vs * 0.00065; + } + + p.cursor.vx += (0 - p.cursor.x) * tension; + p.cursor.vy += (0 - p.cursor.y) * tension; + p.cursor.vx *= friction; + p.cursor.vy *= friction; + p.cursor.x += p.cursor.vx * 2; + p.cursor.y += p.cursor.vy * 2; + p.cursor.x = Math.min(maxCursorMove, Math.max(-maxCursorMove, p.cursor.x)); + p.cursor.y = Math.min(maxCursorMove, Math.max(-maxCursorMove, p.cursor.y)); + }); + }); + } + + function moved(point, withCursor = true) { + const x = point.x + point.wave.x + (withCursor ? point.cursor.x : 0); + const y = point.y + point.wave.y + (withCursor ? point.cursor.y : 0); + return { x: Math.round(x * 10) / 10, y: Math.round(y * 10) / 10 }; + } + + function drawLines() { + const { width, height } = boundingRef.current; + const ctx = ctxRef.current; + ctx.clearRect(0, 0, width, height); + ctx.beginPath(); + ctx.strokeStyle = configRef.current.lineColor; + linesRef.current.forEach(points => { + let p1 = moved(points[0], false); + ctx.moveTo(p1.x, p1.y); + points.forEach((p, idx) => { + const isLast = idx === points.length - 1; + p1 = moved(p, !isLast); + const p2 = moved(points[idx + 1] || points[points.length - 1], !isLast); + ctx.lineTo(p1.x, p1.y); + if (isLast) ctx.moveTo(p2.x, p2.y); + }); + }); + ctx.stroke(); + } + + function tick(t) { + const mouse = mouseRef.current; + mouse.sx += (mouse.x - mouse.sx) * 0.1; + mouse.sy += (mouse.y - mouse.sy) * 0.1; + const dx = mouse.x - mouse.lx, + dy = mouse.y - mouse.ly; + const d = Math.hypot(dx, dy); + mouse.v = d; + mouse.vs += (d - mouse.vs) * 0.1; + mouse.vs = Math.min(100, mouse.vs); + mouse.lx = mouse.x; + mouse.ly = mouse.y; + mouse.a = Math.atan2(dy, dx); + container.style.setProperty('--x', `${mouse.sx}px`); + container.style.setProperty('--y', `${mouse.sy}px`); + + movePoints(t); + drawLines(); + frameIdRef.current = requestAnimationFrame(tick); + } + + function onResize() { + setSize(); + setLines(); + } + function onMouseMove(e) { + updateMouse(e.clientX, e.clientY); + } + function onTouchMove(e) { + const touch = e.touches[0]; + updateMouse(touch.clientX, touch.clientY); + } + function updateMouse(x, y) { + const mouse = mouseRef.current, + b = boundingRef.current; + mouse.x = x - b.left; + mouse.y = y - b.top; + if (!mouse.set) { + mouse.sx = mouse.x; + mouse.sy = mouse.y; + mouse.lx = mouse.x; + mouse.ly = mouse.y; + mouse.set = true; + } + } + + setSize(); + setLines(); + frameIdRef.current = requestAnimationFrame(tick); + window.addEventListener('resize', onResize); + window.addEventListener('mousemove', onMouseMove); + window.addEventListener('touchmove', onTouchMove, { passive: false }); + + return () => { + window.removeEventListener('resize', onResize); + window.removeEventListener('mousemove', onMouseMove); + window.removeEventListener('touchmove', onTouchMove); + cancelAnimationFrame(frameIdRef.current); + }; + }, []); + + return ( +
+
+ +
+ ); +}; + +export default Waves; diff --git a/src/context/ThemeContext.jsx b/src/context/ThemeContext.jsx new file mode 100644 index 0000000..c565853 --- /dev/null +++ b/src/context/ThemeContext.jsx @@ -0,0 +1,46 @@ +import React, { createContext, useContext, useMemo } from 'react'; +import { useSite } from './SiteContext'; + +const ThemeContext = createContext(null); + +// Theme registry — lazy-loaded per-theme Home & Layout components +const themeRegistry = { + starter: { + Home: React.lazy(() => import('../themes/starter/Home')), + Layout: React.lazy(() => import('../themes/starter/Layout')), + }, + default: { + Home: React.lazy(() => import('../themes/default/Home')), + Layout: React.lazy(() => import('../themes/default/Layout')), + }, + dark: { + Home: React.lazy(() => import('../themes/dark/Home')), + Layout: React.lazy(() => import('../themes/dark/Layout')), + }, + minimal: { + Home: React.lazy(() => import('../themes/minimal/Home')), + Layout: React.lazy(() => import('../themes/minimal/Layout')), + }, +}; + +export function ThemeProvider({ children }) { + const { site } = useSite(); + const themeName = site?.theme_template || 'starter'; + + const theme = useMemo(() => { + const t = themeRegistry[themeName] || themeRegistry.starter; + return { name: themeName, ...t }; + }, [themeName]); + + return ( + + {children} + + ); +} + +export function useTheme() { + const ctx = useContext(ThemeContext); + if (!ctx) throw new Error('useTheme must be used within ThemeProvider'); + return ctx; +} diff --git a/src/i18n/index.js b/src/i18n/index.js new file mode 100644 index 0000000..821dd50 --- /dev/null +++ b/src/i18n/index.js @@ -0,0 +1,21 @@ +import i18n from 'i18next'; +import { initReactI18next } from 'react-i18next'; +import LanguageDetector from 'i18next-browser-languagedetector'; +import en from './locales/en.json'; +import zh from './locales/zh.json'; + +i18n + .use(LanguageDetector) + .use(initReactI18next) + .init({ + load: 'languageOnly', + resources: { en, zh }, + fallbackLng: 'en', + interpolation: { escapeValue: false }, + detection: { + order: ['navigator', 'htmlTag', 'querystring'], + caches: ['localStorage'], + }, + }); + +export default i18n; diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json new file mode 100644 index 0000000..7f3ff9a --- /dev/null +++ b/src/i18n/locales/en.json @@ -0,0 +1,159 @@ +{ + "translation": { + "nav.home": "Home", + "nav.pricing": "Pricing", + "nav.packages": "Packages", + "nav.dashboard": "Dashboard", + "nav.apiKeys": "API Keys", + "nav.login": "Login", + "nav.signUp": "Sign Up", + "nav.logout": "Logout", + "nav.contact": "Contact", + + "home.heroSubtitle": "Access the world's most powerful AI models through a single API endpoint. Simple, affordable, reliable.", + "home.getStarted": "Get Started Free", + "home.viewPricing": "View Pricing", + "home.goToDashboard": "Go to Dashboard", + "home.aiModels": "AI Models", + "home.uptime": "Uptime", + "home.latency": "Latency", + "home.whyChooseUs": "Why Choose Us", + "home.whyChooseUsDesc": "Everything you need to build AI-powered applications", + "home.lightningFast": "Lightning Fast", + "home.lightningFastDesc": "Optimized routing and caching deliver responses with minimal latency. Load-balanced across multiple providers for maximum reliability.", + "home.securePrivate": "Secure & Private", + "home.securePrivateDesc": "Enterprise-grade security with encrypted API keys. No request logging by default. Your data stays your data.", + "home.payAsYouGo": "Pay As You Go", + "home.payAsYouGoDesc": "Transparent pricing with no hidden fees. Only pay for what you use. Multiple top-up options and subscription packages available.", + "home.availableModels": "Available Models", + "home.availableModelsDesc": "Access {{count}} AI models through a unified API", + "home.viewAllModels": "View all {{count}} models", + "home.plansPackages": "Plans & Packages", + "home.choosePlan": "Choose a plan that fits your needs", + "home.subscribe": "Subscribe", + "home.days": "{{count}} days", + "home.readyToStart": "Ready to Get Started?", + "home.readyToStartDesc": "Create your account and start building with AI in minutes. No credit card required.", + "home.createFreeAccount": "Create Free Account", + "home.signIn": "Sign In", + "home.defaultHeroTitle": "AI API Platform", + + "login.welcomeBack": "Welcome Back", + "login.signInTo": "Sign in to {{name}}", + "login.signInToDefault": "Sign in to your account", + "login.username": "Username", + "login.password": "Password", + "login.enterUsername": "Enter your username", + "login.enterPassword": "Enter your password", + "login.signingIn": "Signing in...", + "login.signInBtn": "Sign In", + "login.noAccount": "Don't have an account?", + "login.createOne": "Create one", + "login.fillAllFields": "Please fill in all fields", + "login.welcomeBackToast": "Welcome back!", + + "register.createAccount": "Create Account", + "register.getStartedWith": "Get started with {{name}}", + "register.getStartedDefault": "Get started with our platform", + "register.username": "Username", + "register.email": "Email", + "register.password": "Password", + "register.confirmPassword": "Confirm Password", + "register.chooseUsername": "Choose a username", + "register.emailPlaceholder": "your@email.com (optional)", + "register.passwordPlaceholder": "8-20 characters", + "register.repeatPassword": "Repeat your password", + "register.creating": "Creating...", + "register.createAccountBtn": "Create Account", + "register.hasAccount": "Already have an account?", + "register.signIn": "Sign in", + "register.fillRequired": "Please fill in all required fields", + "register.passwordMismatch": "Passwords do not match", + "register.passwordLength": "Password must be 8-20 characters", + "register.accountCreated": "Account created! Please sign in.", + + "dashboard.welcome": "Welcome,", + "dashboard.manageDesc": "Manage your API usage, keys, and account", + "dashboard.balance": "Balance", + "dashboard.quotaUnits": "{{count}} quota units", + "dashboard.used": "Used", + "dashboard.totalRequests": "Total Requests", + "dashboard.redeemCode": "Redeem Code", + "dashboard.enterCode": "Enter redemption code", + "dashboard.redeeming": "Redeeming...", + "dashboard.redeem": "Redeem", + "dashboard.redeemSuccess": "Code redeemed successfully!", + "dashboard.quickLinks": "Quick Links", + "dashboard.apiKeys": "API Keys", + "dashboard.manageKeys": "Manage your keys", + "dashboard.packages": "Packages", + "dashboard.viewPlans": "View plans", + "dashboard.pricing": "Pricing", + "dashboard.modelPrices": "Model prices", + "dashboard.apiDocs": "API Docs", + "dashboard.comingSoon": "Coming soon", + + "tokens.title": "API Keys", + "tokens.subtitle": "Manage your API access tokens", + "tokens.newKey": "+ New Key", + "tokens.createApiKey": "Create API Key", + "tokens.name": "Name", + "tokens.namePlaceholder": "e.g. my-app-key", + "tokens.cancel": "Cancel", + "tokens.creating": "Creating...", + "tokens.create": "Create", + "tokens.newApiKey": "Your New API Key", + "tokens.keyWarning": "This is the only time you'll see this key. Copy it now and store it securely.", + "tokens.copied": "Copied!", + "tokens.copy": "Copy", + "tokens.copiedToClipboard": "Copied to clipboard!", + "tokens.savedKey": "I've saved my key", + "tokens.deleteToken": "Delete Token", + "tokens.deleteConfirm": "Delete \"{{name}}\"? This cannot be undone.", + "tokens.delete": "Delete", + "tokens.noKeys": "No API keys yet", + "tokens.createFirst": "Create Your First Key", + "tokens.enabled": "Enabled", + "tokens.disabled": "Disabled", + "tokens.tokenDisabled": "Token disabled", + "tokens.tokenEnabled": "Token enabled", + "tokens.tokenDeleted": "Token deleted", + "tokens.enterName": "Please enter a name", + "tokens.quickStart": "Quick Start", + "tokens.quickStartComment": "# Use your API key with OpenAI-compatible endpoint", + + "pricing.title": "Model Pricing", + "pricing.subtitle": "Transparent, pay-as-you-go pricing for all available models. Prices shown per 1M tokens.", + "pricing.searchPlaceholder": "Search models...", + "pricing.noMatch": "No models match your search", + "pricing.noModels": "No models available", + "pricing.model": "Model", + "pricing.inputPrice": "Input / 1M tokens", + "pricing.outputPrice": "Output / 1M tokens", + "pricing.status": "Status", + "pricing.online": "Online", + "pricing.unknown": "Unknown", + + "packages.title": "Packages & Plans", + "packages.subtitle": "Choose a package that fits your usage. All plans include access to all available models.", + "packages.noPackages": "No packages available at the moment.", + "packages.checkPricing": "Check model pricing", + "packages.daysAccess": "{{count}} days access", + "packages.creditIncluded": "${{amount}} credit included", + "packages.requestsMin": "{{count}} requests/min", + "packages.allModels": "All models access", + "packages.openaiApi": "OpenAI-compatible API", + "packages.subscribeNow": "Subscribe Now", + "packages.signUpToSubscribe": "Sign Up to Subscribe", + "packages.processing": "Processing...", + "packages.confirmTitle": "Confirm Subscription", + "packages.confirmDesc": "Subscribe to {{name}} for ${{price}}?", + "packages.yourBalance": "Your balance:", + "packages.insufficientBalance": "Insufficient balance. Please top up before subscribing.", + "packages.confirm": "Confirm", + "packages.subscribedSuccess": "Subscribed successfully!", + + "common.sessionExpired": "Session expired, please log in again", + "common.requestFailed": "Request failed" + } +} diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json new file mode 100644 index 0000000..379485a --- /dev/null +++ b/src/i18n/locales/zh.json @@ -0,0 +1,159 @@ +{ + "translation": { + "nav.home": "首页", + "nav.pricing": "定价", + "nav.packages": "套餐", + "nav.dashboard": "控制台", + "nav.apiKeys": "API 密钥", + "nav.login": "登录", + "nav.signUp": "注册", + "nav.logout": "退出", + "nav.contact": "联系我们", + + "home.heroSubtitle": "通过单一 API 端点访问全球最强大的 AI 模型。简单、实惠、可靠。", + "home.getStarted": "免费开始", + "home.viewPricing": "查看定价", + "home.goToDashboard": "进入控制台", + "home.aiModels": "AI 模型", + "home.uptime": "在线率", + "home.latency": "延迟", + "home.whyChooseUs": "为什么选择我们", + "home.whyChooseUsDesc": "构建 AI 应用所需的一切", + "home.lightningFast": "极速响应", + "home.lightningFastDesc": "优化的路由和缓存以最低延迟交付响应。跨多个供应商负载均衡,确保最大可靠性。", + "home.securePrivate": "安全可靠", + "home.securePrivateDesc": "企业级安全性,API 密钥加密存储。默认不记录请求日志。您的数据由您掌控。", + "home.payAsYouGo": "按量付费", + "home.payAsYouGoDesc": "透明定价,无隐藏费用。按使用量付费。提供多种充值方式和订阅套餐。", + "home.availableModels": "可用模型", + "home.availableModelsDesc": "通过统一 API 访问 {{count}} 个 AI 模型", + "home.viewAllModels": "查看全部 {{count}} 个模型", + "home.plansPackages": "套餐方案", + "home.choosePlan": "选择适合您需求的方案", + "home.subscribe": "订阅", + "home.days": "{{count}} 天", + "home.readyToStart": "准备好了吗?", + "home.readyToStartDesc": "创建账户,几分钟内即可开始使用 AI 构建应用。无需信用卡。", + "home.createFreeAccount": "免费创建账户", + "home.signIn": "登录", + "home.defaultHeroTitle": "AI API 平台", + + "login.welcomeBack": "欢迎回来", + "login.signInTo": "登录到 {{name}}", + "login.signInToDefault": "登录您的账户", + "login.username": "用户名", + "login.password": "密码", + "login.enterUsername": "请输入用户名", + "login.enterPassword": "请输入密码", + "login.signingIn": "登录中...", + "login.signInBtn": "登录", + "login.noAccount": "还没有账户?", + "login.createOne": "立即注册", + "login.fillAllFields": "请填写所有字段", + "login.welcomeBackToast": "欢迎回来!", + + "register.createAccount": "创建账户", + "register.getStartedWith": "开始使用 {{name}}", + "register.getStartedDefault": "开始使用我们的平台", + "register.username": "用户名", + "register.email": "邮箱", + "register.password": "密码", + "register.confirmPassword": "确认密码", + "register.chooseUsername": "请选择用户名", + "register.emailPlaceholder": "your@email.com(可选)", + "register.passwordPlaceholder": "8-20 个字符", + "register.repeatPassword": "请再次输入密码", + "register.creating": "创建中...", + "register.createAccountBtn": "创建账户", + "register.hasAccount": "已有账户?", + "register.signIn": "立即登录", + "register.fillRequired": "请填写所有必填字段", + "register.passwordMismatch": "两次密码不一致", + "register.passwordLength": "密码长度需为 8-20 个字符", + "register.accountCreated": "账户创建成功!请登录。", + + "dashboard.welcome": "欢迎,", + "dashboard.manageDesc": "管理您的 API 用量、密钥和账户", + "dashboard.balance": "余额", + "dashboard.quotaUnits": "{{count}} 额度单位", + "dashboard.used": "已使用", + "dashboard.totalRequests": "总请求数", + "dashboard.redeemCode": "兑换码", + "dashboard.enterCode": "请输入兑换码", + "dashboard.redeeming": "兑换中...", + "dashboard.redeem": "兑换", + "dashboard.redeemSuccess": "兑换码兑换成功!", + "dashboard.quickLinks": "快捷入口", + "dashboard.apiKeys": "API 密钥", + "dashboard.manageKeys": "管理您的密钥", + "dashboard.packages": "套餐", + "dashboard.viewPlans": "查看方案", + "dashboard.pricing": "定价", + "dashboard.modelPrices": "模型价格", + "dashboard.apiDocs": "API 文档", + "dashboard.comingSoon": "即将推出", + + "tokens.title": "API 密钥", + "tokens.subtitle": "管理您的 API 访问令牌", + "tokens.newKey": "+ 新建密钥", + "tokens.createApiKey": "创建 API 密钥", + "tokens.name": "名称", + "tokens.namePlaceholder": "例如 my-app-key", + "tokens.cancel": "取消", + "tokens.creating": "创建中...", + "tokens.create": "创建", + "tokens.newApiKey": "您的新 API 密钥", + "tokens.keyWarning": "这是您唯一一次看到此密钥的机会。请立即复制并安全保存。", + "tokens.copied": "已复制!", + "tokens.copy": "复制", + "tokens.copiedToClipboard": "已复制到剪贴板!", + "tokens.savedKey": "我已保存密钥", + "tokens.deleteToken": "删除令牌", + "tokens.deleteConfirm": "删除 \"{{name}}\"?此操作不可撤销。", + "tokens.delete": "删除", + "tokens.noKeys": "暂无 API 密钥", + "tokens.createFirst": "创建您的第一个密钥", + "tokens.enabled": "已启用", + "tokens.disabled": "已禁用", + "tokens.tokenDisabled": "令牌已禁用", + "tokens.tokenEnabled": "令牌已启用", + "tokens.tokenDeleted": "令牌已删除", + "tokens.enterName": "请输入名称", + "tokens.quickStart": "快速开始", + "tokens.quickStartComment": "# 使用 OpenAI 兼容端点调用 API", + + "pricing.title": "模型定价", + "pricing.subtitle": "透明的按量付费定价。价格以每百万 token 计。", + "pricing.searchPlaceholder": "搜索模型...", + "pricing.noMatch": "没有匹配的模型", + "pricing.noModels": "暂无可用模型", + "pricing.model": "模型", + "pricing.inputPrice": "输入 / 百万 token", + "pricing.outputPrice": "输出 / 百万 token", + "pricing.status": "状态", + "pricing.online": "在线", + "pricing.unknown": "未知", + + "packages.title": "套餐方案", + "packages.subtitle": "选择适合您用量的套餐。所有方案均可访问全部可用模型。", + "packages.noPackages": "暂无可用套餐。", + "packages.checkPricing": "查看模型定价", + "packages.daysAccess": "{{count}} 天有效期", + "packages.creditIncluded": "含 ${{amount}} 额度", + "packages.requestsMin": "{{count}} 次请求/分钟", + "packages.allModels": "全部模型可用", + "packages.openaiApi": "OpenAI 兼容 API", + "packages.subscribeNow": "立即订阅", + "packages.signUpToSubscribe": "注册后订阅", + "packages.processing": "处理中...", + "packages.confirmTitle": "确认订阅", + "packages.confirmDesc": "订阅 {{name}},价格 ${{price}}?", + "packages.yourBalance": "您的余额:", + "packages.insufficientBalance": "余额不足,请先充值。", + "packages.confirm": "确认", + "packages.subscribedSuccess": "订阅成功!", + + "common.sessionExpired": "会话已过期,请重新登录", + "common.requestFailed": "请求失败" + } +} diff --git a/src/main.jsx b/src/main.jsx index ad74004..c73c461 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -5,6 +5,7 @@ import { Toaster } from 'react-hot-toast'; import App from './App'; import { AuthProvider } from './context/AuthContext'; import { SiteProvider } from './context/SiteContext'; +import './i18n'; import './index.css'; ReactDOM.createRoot(document.getElementById('root')).render( diff --git a/src/pages/Dashboard.jsx b/src/pages/Dashboard.jsx index 85050f2..99d59de 100644 --- a/src/pages/Dashboard.jsx +++ b/src/pages/Dashboard.jsx @@ -1,5 +1,6 @@ import React, { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; import { useAuth } from '../context/AuthContext'; import { getUserUsage, redeemCode, Q, quotaToDollar } from '../api'; import SpotlightCard from '../components/bits/SpotlightCard'; @@ -8,6 +9,7 @@ import ShinyText from '../components/bits/ShinyText'; import toast from 'react-hot-toast'; export default function Dashboard() { + const { t } = useTranslation(); const { user, refreshUser } = useAuth(); const [usage, setUsage] = useState(null); const [redeemInput, setRedeemInput] = useState(''); @@ -29,7 +31,7 @@ export default function Dashboard() { try { const res = await redeemCode(redeemInput.trim()); if (res.data.success) { - toast.success('Code redeemed successfully!'); + toast.success(t('dashboard.redeemSuccess')); setRedeemInput(''); // Refresh both usage AND user data to update balance await Promise.all([loadUsage(), refreshUser()]); @@ -49,31 +51,31 @@ export default function Dashboard() { {/* Welcome */}

- Welcome, + {t('dashboard.welcome')}

-

Manage your API usage, keys, and account

+

{t('dashboard.manageDesc')}

{/* Stats Cards */}
-

Balance

+

{t('dashboard.balance')}

$
-

{quota.toLocaleString()} quota units

+

{t('dashboard.quotaUnits', { count: quota.toLocaleString() })}

-

Used

+

{t('dashboard.used')}

$
-

{usedQuota.toLocaleString()} quota units

+

{t('dashboard.quotaUnits', { count: usedQuota.toLocaleString() })}

-

Total Requests

+

{t('dashboard.totalRequests')}

@@ -84,40 +86,40 @@ export default function Dashboard() {
{/* Redeem Code */}
-

Redeem Code

+

{t('dashboard.redeemCode')}

setRedeemInput(e.target.value)} className="input flex-1" - placeholder="Enter redemption code" + placeholder={t('dashboard.enterCode')} />
{/* Quick Links */}
-

Quick Links

+

{t('dashboard.quickLinks')}

-

API Keys

-

Manage your keys

+

{t('dashboard.apiKeys')}

+

{t('dashboard.manageKeys')}

-

Packages

-

View plans

+

{t('dashboard.packages')}

+

{t('dashboard.viewPlans')}

-

Pricing

-

Model prices

+

{t('dashboard.pricing')}

+

{t('dashboard.modelPrices')}

-

API Docs

-

Coming soon

+

{t('dashboard.apiDocs')}

+

{t('dashboard.comingSoon')}

diff --git a/src/pages/Login.jsx b/src/pages/Login.jsx index 4cb8fe9..f60e77e 100644 --- a/src/pages/Login.jsx +++ b/src/pages/Login.jsx @@ -1,10 +1,12 @@ import React, { useState } from 'react'; import { Link, Navigate, useNavigate, useLocation } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; import { useAuth } from '../context/AuthContext'; import { useSite } from '../context/SiteContext'; import toast from 'react-hot-toast'; export default function Login() { + const { t } = useTranslation(); const { login, user } = useAuth(); const { site } = useSite(); const navigate = useNavigate(); @@ -21,14 +23,14 @@ export default function Login() { const handleSubmit = async (e) => { e.preventDefault(); if (!form.username || !form.password) { - toast.error('Please fill in all fields'); + toast.error(t('login.fillAllFields')); return; } setLoading(true); try { const result = await login(form.username, form.password); if (result.success) { - toast.success('Welcome back!'); + toast.success(t('login.welcomeBackToast')); const from = location.state?.from?.pathname || '/dashboard'; navigate(from, { replace: true }); return; // component may unmount — skip setLoading @@ -45,34 +47,34 @@ export default function Login() {
-

Welcome Back

+

{t('login.welcomeBack')}

- Sign in to {site?.name || 'your account'} + {site?.name ? t('login.signInTo', { name: site.name }) : t('login.signInToDefault')}

- + setForm({ ...form, username: e.target.value })} className="input" - placeholder="Enter your username" + placeholder={t('login.enterUsername')} autoComplete="username" required />
- + setForm({ ...form, password: e.target.value })} className="input" - placeholder="Enter your password" + placeholder={t('login.enterPassword')} autoComplete="current-password" required /> @@ -86,15 +88,15 @@ export default function Login() { {loading && (
)} - {loading ? 'Signing in...' : 'Sign In'} + {loading ? t('login.signingIn') : t('login.signInBtn')}

- Don't have an account?{' '} + {t('login.noAccount')}{' '} - Create one + {t('login.createOne')}

diff --git a/src/pages/Packages.jsx b/src/pages/Packages.jsx index eb5299b..24d5d97 100644 --- a/src/pages/Packages.jsx +++ b/src/pages/Packages.jsx @@ -1,11 +1,13 @@ import React, { useState, useEffect } from 'react'; import { Link, useNavigate } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; import { useAuth } from '../context/AuthContext'; import { getSitePackages, subscribePackage, Q } from '../api'; import SpotlightCard from '../components/bits/SpotlightCard'; import toast from 'react-hot-toast'; export default function Packages() { + const { t } = useTranslation(); const { user, refreshUser } = useAuth(); const navigate = useNavigate(); const [packages, setPackages] = useState([]); @@ -36,7 +38,7 @@ export default function Packages() { try { const res = await subscribePackage(pkgId); if (res.data.success) { - toast.success('Subscribed successfully!'); + toast.success(t('packages.subscribedSuccess')); setConfirmPkg(null); // Refresh user data to update balance await refreshUser(); @@ -65,17 +67,17 @@ export default function Packages() { return (
-

Packages & Plans

+

{t('packages.title')}

- Choose a package that fits your usage. All plans include access to all available models. + {t('packages.subtitle')}

{enabled.length === 0 ? (
-

No packages available at the moment.

+

{t('packages.noPackages')}

- Check model pricing → + {t('packages.checkPricing')} →
) : ( @@ -104,7 +106,7 @@ export default function Packages() { )}
{pkg.duration > 0 && ( -

{pkg.duration} days access

+

{t('packages.daysAccess', { count: pkg.duration })}

)}
@@ -115,7 +117,7 @@ export default function Packages() { - ${(pkg.quota_amount / Q).toFixed(2)} credit included + {t('packages.creditIncluded', { amount: (pkg.quota_amount / Q).toFixed(2) })} )} {pkg.rate_limit > 0 && ( @@ -123,20 +125,20 @@ export default function Packages() { - {pkg.rate_limit} requests/min + {t('packages.requestsMin', { count: pkg.rate_limit })} )}
  • - All models access + {t('packages.allModels')}
  • - OpenAI-compatible API + {t('packages.openaiApi')}
  • @@ -146,7 +148,7 @@ export default function Packages() { disabled={subscribing === pkg.id} className="btn-primary w-full text-center" > - {subscribing === pkg.id ? 'Processing...' : user ? 'Subscribe Now' : 'Sign Up to Subscribe'} + {subscribing === pkg.id ? t('packages.processing') : user ? t('packages.subscribeNow') : t('packages.signUpToSubscribe')}
    @@ -162,23 +164,22 @@ export default function Packages() { return (
    !subscribing && setConfirmPkg(null)}>
    e.stopPropagation()}> -

    Confirm Subscription

    +

    {t('packages.confirmTitle')}

    - Subscribe to {confirmPkg.name} for{' '} - ${pkgPrice.toFixed(2)}? + {t('packages.confirmDesc', { name: confirmPkg.name, price: pkgPrice.toFixed(2) })}

    - Your balance: ${userBalance.toFixed(2)} + {t('packages.yourBalance')} ${userBalance.toFixed(2)}

    {insufficient && (
    -

    Insufficient balance. Please top up before subscribing.

    +

    {t('packages.insufficientBalance')}

    )}
    - +
    diff --git a/src/pages/Pricing.jsx b/src/pages/Pricing.jsx index d6bd6ab..b9d9e4a 100644 --- a/src/pages/Pricing.jsx +++ b/src/pages/Pricing.jsx @@ -1,13 +1,14 @@ import React, { useState, useEffect } from 'react'; +import { useTranslation } from 'react-i18next'; import { getSiteModels } from '../api'; export default function Pricing() { + const { t } = useTranslation(); const [models, setModels] = useState([]); const [search, setSearch] = useState(''); const [loading, setLoading] = useState(true); useEffect(() => { - // /api/dist/site/pricing returns same data as /api/dist/site/models — only need one call getSiteModels() .then((r) => { if (r.data.success) setModels(r.data.data || []); @@ -34,9 +35,9 @@ export default function Pricing() { return (
    -

    Model Pricing

    +

    {t('pricing.title')}

    - Transparent, pay-as-you-go pricing for all available models. Prices shown per 1M tokens. + {t('pricing.subtitle')}

    @@ -51,24 +52,24 @@ export default function Pricing() { value={search} onChange={(e) => setSearch(e.target.value)} className="input !pl-10" - placeholder="Search models..." + placeholder={t('pricing.searchPlaceholder')} />
    {filtered.length === 0 ? (
    - {search ? 'No models match your search' : 'No models available'} + {search ? t('pricing.noMatch') : t('pricing.noModels')}
    ) : (
    - - - - + + + + @@ -90,7 +91,7 @@ export default function Pricing() { : 'bg-neutral-500/10 text-neutral-400 border-neutral-500/20' }`}> - {m.status === 'healthy' ? 'Online' : 'Unknown'} + {m.status === 'healthy' ? t('pricing.online') : t('pricing.unknown')} diff --git a/src/pages/Register.jsx b/src/pages/Register.jsx index 211509f..bfcf177 100644 --- a/src/pages/Register.jsx +++ b/src/pages/Register.jsx @@ -1,10 +1,12 @@ import React, { useState } from 'react'; import { Link, Navigate, useNavigate } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; import { useAuth } from '../context/AuthContext'; import { useSite } from '../context/SiteContext'; import toast from 'react-hot-toast'; export default function Register() { + const { t } = useTranslation(); const { register, user } = useAuth(); const { site } = useSite(); const navigate = useNavigate(); @@ -19,19 +21,19 @@ export default function Register() { const handleSubmit = async (e) => { e.preventDefault(); if (!form.username || !form.password) { - toast.error('Please fill in all required fields'); + toast.error(t('register.fillRequired')); return; } if (form.password !== form.password2) { - toast.error('Passwords do not match'); + toast.error(t('register.passwordMismatch')); return; } if (form.password.length < 8) { - toast.error('Password must be 8-20 characters'); + toast.error(t('register.passwordLength')); return; } if (form.password.length > 20) { - toast.error('Password must be 8-20 characters'); + toast.error(t('register.passwordLength')); return; } setLoading(true); @@ -42,7 +44,7 @@ export default function Register() { email: form.email || undefined, }); if (result.success) { - toast.success('Account created! Please sign in.'); + toast.success(t('register.accountCreated')); navigate('/login', { replace: true }); return; // component may unmount — skip setLoading } @@ -58,59 +60,59 @@ export default function Register() {
    -

    Create Account

    +

    {t('register.createAccount')}

    - Get started with {site?.name || 'our platform'} + {site?.name ? t('register.getStartedWith', { name: site.name }) : t('register.getStartedDefault')}

    - + setForm({ ...form, username: e.target.value })} className="input" - placeholder="Choose a username" + placeholder={t('register.chooseUsername')} autoComplete="username" required />
    - + setForm({ ...form, email: e.target.value })} className="input" - placeholder="your@email.com (optional)" + placeholder={t('register.emailPlaceholder')} autoComplete="email" />
    - + setForm({ ...form, password: e.target.value })} className="input" - placeholder="8-20 characters" + placeholder={t('register.passwordPlaceholder')} autoComplete="new-password" required />
    - + setForm({ ...form, password2: e.target.value })} className="input" - placeholder="Repeat your password" + placeholder={t('register.repeatPassword')} autoComplete="new-password" required /> @@ -124,15 +126,15 @@ export default function Register() { {loading && (
    )} - {loading ? 'Creating...' : 'Create Account'} + {loading ? t('register.creating') : t('register.createAccountBtn')}

    - Already have an account?{' '} + {t('register.hasAccount')}{' '} - Sign in + {t('register.signIn')}

    diff --git a/src/pages/Tokens.jsx b/src/pages/Tokens.jsx index d606684..05f9e7f 100644 --- a/src/pages/Tokens.jsx +++ b/src/pages/Tokens.jsx @@ -1,8 +1,10 @@ import React, { useState, useEffect, useCallback } from 'react'; +import { useTranslation } from 'react-i18next'; import { getTokens, createToken, updateToken, deleteToken } from '../api'; import toast from 'react-hot-toast'; export default function Tokens() { + const { t } = useTranslation(); const [tokens, setTokens] = useState([]); const [loading, setLoading] = useState(true); const [showCreate, setShowCreate] = useState(false); @@ -27,7 +29,7 @@ export default function Tokens() { const handleCreate = async (e) => { e.preventDefault(); if (!createName.trim()) { - toast.error('Please enter a name'); + toast.error(t('tokens.enterName')); return; } setCreating(true); @@ -53,7 +55,7 @@ export default function Tokens() { status: token.status === 1 ? 2 : 1, }); if (res.data.success) { - toast.success(token.status === 1 ? 'Token disabled' : 'Token enabled'); + toast.success(token.status === 1 ? t('tokens.tokenDisabled') : t('tokens.tokenEnabled')); await load(); } } catch (e) { /* interceptor */ } @@ -64,7 +66,7 @@ export default function Tokens() { try { const res = await deleteToken(deleteConfirm.id); if (res.data.success) { - toast.success('Token deleted'); + toast.success(t('tokens.tokenDeleted')); setDeleteConfirm(null); await load(); } @@ -85,7 +87,7 @@ export default function Tokens() { document.body.removeChild(ta); } setCopiedId(text); - toast.success('Copied to clipboard!'); + toast.success(t('tokens.copiedToClipboard')); setTimeout(() => setCopiedId(null), 2000); }; @@ -101,11 +103,11 @@ export default function Tokens() {
    -

    API Keys

    -

    Manage your API access tokens

    +

    {t('tokens.title')}

    +

    {t('tokens.subtitle')}

    @@ -113,26 +115,26 @@ export default function Tokens() { {showCreate && (
    setShowCreate(false)}>
    e.stopPropagation()}> -

    Create API Key

    +

    {t('tokens.createApiKey')}

    - + setCreateName(e.target.value)} className="input" - placeholder="e.g. my-app-key" + placeholder={t('tokens.namePlaceholder')} autoFocus required />
    @@ -144,10 +146,10 @@ export default function Tokens() { {newKey && (
    -

    Your New API Key

    +

    {t('tokens.newApiKey')}

    - This is the only time you'll see this key. Copy it now and store it securely. + {t('tokens.keyWarning')}

    @@ -158,12 +160,12 @@ export default function Tokens() { onClick={() => handleCopy(newKey)} className="btn-primary !px-4 !py-1.5 flex-shrink-0" > - {copiedId === newKey ? 'Copied!' : 'Copy'} + {copiedId === newKey ? t('tokens.copied') : t('tokens.copy')}
    @@ -174,14 +176,14 @@ export default function Tokens() { {deleteConfirm && (
    setDeleteConfirm(null)}>
    e.stopPropagation()}> -

    Delete Token

    +

    {t('tokens.deleteToken')}

    - Delete "{deleteConfirm.name}"? This cannot be undone. + {t('tokens.deleteConfirm', { name: deleteConfirm.name })}

    - +
    @@ -196,9 +198,9 @@ export default function Tokens() {
    -

    No API keys yet

    +

    {t('tokens.noKeys')}

    ) : ( @@ -231,13 +233,13 @@ export default function Tokens() { : 'border-neutral-600 text-neutral-400 hover:bg-neutral-800' }`} > - {token.status === 1 ? 'Enabled' : 'Disabled'} + {token.status === 1 ? t('tokens.enabled') : t('tokens.disabled')}
    @@ -247,9 +249,9 @@ export default function Tokens() { {/* API Usage Note */}
    -

    Quick Start

    +

    {t('tokens.quickStart')}

    -

    # Use your API key with OpenAI-compatible endpoint

    +

    {t('tokens.quickStartComment')}

    curl {window.location.origin}/v1/chat/completions \

    diff --git a/src/themes/dark/Home.jsx b/src/themes/dark/Home.jsx new file mode 100644 index 0000000..56efd04 --- /dev/null +++ b/src/themes/dark/Home.jsx @@ -0,0 +1,209 @@ +import React, { useState, useEffect } from 'react'; +import { Link } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { useAuth } from '../../context/AuthContext'; +import { useSite } from '../../context/SiteContext'; +import { getSiteModels, getSitePackages } from '../../api'; +import Particles from '../../components/bits/Particles'; +import DecryptedText from '../../components/bits/DecryptedText'; +import CountUp from '../../components/bits/CountUp'; + +export default function DarkHome() { + const { t } = useTranslation(); + const { user } = useAuth(); + const { site } = useSite(); + const [models, setModels] = useState([]); + const [packages, setPackages] = useState([]); + + useEffect(() => { + getSiteModels().then(r => { if (r.data.success) setModels(r.data.data || []); }).catch(() => {}); + getSitePackages().then(r => { if (r.data.success) setPackages(r.data.data || []); }).catch(() => {}); + }, []); + + const enabledModels = models.filter(m => m.enabled !== false); + + return ( +
    + {/* Particles Background */} +
    + +
    + + {/* Hero Section */} +
    +
    + {/* Terminal-style header */} +
    + + System Online +
    + +

    + +

    + +

    + {'> '}{t('home.heroSubtitle')} +

    + +
    + {user ? ( + + {t('home.goToDashboard')} + + ) : ( + <> + + {t('home.getStarted')} + + + {t('home.viewPricing')} + + + )} +
    +
    + + {/* Stats — terminal style */} +
    + {[ + { label: t('home.aiModels'), value: enabledModels.length || 50, suffix: '+', color: 'text-green-400 border-green-500/20' }, + { label: t('home.uptime'), value: 99.9, suffix: '%', color: 'text-cyan-400 border-cyan-500/20' }, + { label: t('home.latency'), value: 50, suffix: 'ms', prefix: '<', color: 'text-pink-400 border-pink-500/20' }, + ].map((s, i) => ( +
    +
    + {s.prefix}{s.suffix} +
    +

    {s.label}

    +
    + ))} +
    +
    + + {/* Features Section */} +
    +
    +

    {t('home.whyChooseUs')}

    +

    {t('home.whyChooseUsDesc')}

    +
    + +
    + {[ + { icon: '⚡', title: t('home.lightningFast'), desc: t('home.lightningFastDesc'), accent: 'green' }, + { icon: '🛡️', title: t('home.securePrivate'), desc: t('home.securePrivateDesc'), accent: 'cyan' }, + { icon: '📊', title: t('home.payAsYouGo'), desc: t('home.payAsYouGoDesc'), accent: 'pink' }, + ].map((f, i) => ( +
    +
    {f.icon}
    +

    {f.title}

    +

    {f.desc}

    +
    +
    + ))} +
    +
    + + {/* Models Preview */} + {enabledModels.length > 0 && ( +
    +
    +

    {t('home.availableModels')}

    +

    {t('home.availableModelsDesc', { count: enabledModels.length })}

    +
    + +
    + {enabledModels.slice(0, 12).map((m, i) => ( +
    + $ + + {m.display_name || m.model_name} + +
    + ))} +
    + + {enabledModels.length > 12 && ( +
    + + {t('home.viewAllModels', { count: enabledModels.length })} → + +
    + )} +
    + )} + + {/* Packages */} + {packages.length > 0 && ( +
    +
    +

    {t('home.plansPackages')}

    +

    {t('home.choosePlan')}

    +
    + +
    + {packages.filter(p => p.enabled).slice(0, 3).map((pkg) => ( +
    +

    {pkg.name}

    + {pkg.description &&

    {pkg.description}

    } +
    + ${pkg.price} + {pkg.original_price > pkg.price && ( + ${pkg.original_price} + )} + {pkg.duration > 0 &&

    {t('home.days', { count: pkg.duration })}

    } +
    + + {user ? t('home.subscribe') : t('home.getStarted')} + +
    + ))} +
    +
    + )} + + {/* CTA */} +
    +
    +
    +
    +

    {t('home.readyToStart')}

    +

    {t('home.readyToStartDesc')}

    +
    + {user ? ( + + {t('home.goToDashboard')} + + ) : ( + <> + + {t('home.createFreeAccount')} + + + {t('home.signIn')} + + + )} +
    +
    +
    +
    +
    + ); +} diff --git a/src/themes/dark/Layout.jsx b/src/themes/dark/Layout.jsx new file mode 100644 index 0000000..e2663b7 --- /dev/null +++ b/src/themes/dark/Layout.jsx @@ -0,0 +1,122 @@ +import React, { useState } from 'react'; +import { Outlet, Link, useNavigate, useLocation } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { useAuth } from '../../context/AuthContext'; +import { useSite } from '../../context/SiteContext'; + +export default function DarkLayout() { + const { t } = useTranslation(); + const { user, logout } = useAuth(); + const { site } = useSite(); + const navigate = useNavigate(); + const location = useLocation(); + const [mobileMenuOpen, setMobileMenuOpen] = useState(false); + + const siteName = site?.name || 'AI Platform'; + + const navItems = [ + { to: '/', label: t('nav.home'), auth: false }, + { to: '/pricing', label: t('nav.pricing'), auth: false }, + { to: '/packages', label: t('nav.packages'), auth: false }, + { to: '/dashboard', label: t('nav.dashboard'), auth: true }, + { to: '/tokens', label: t('nav.apiKeys'), auth: true }, + ]; + + const visibleNavItems = navItems.filter((n) => !n.auth || user); + + return ( +
    + {/* Announcement Banner */} + {site?.announcement && ( +
    +

    {site.announcement}

    +
    + )} + + {/* Header — cyberpunk style */} +
    +
    + + {site?.logo ? ( + {siteName} + ) : ( +
    + {siteName.charAt(0)} +
    + )} + + {siteName} + + + + + +
    + {user ? ( +
    + {user.display_name || user.username} + +
    + ) : ( + <> + + {t('nav.login')} + + + {t('nav.signUp')} + + + )} + +
    +
    + + {mobileMenuOpen && ( +
    + +
    + )} +
    + +
    + + +
    + ); +} diff --git a/src/themes/default/Home.jsx b/src/themes/default/Home.jsx new file mode 100644 index 0000000..06280a2 --- /dev/null +++ b/src/themes/default/Home.jsx @@ -0,0 +1,210 @@ +import React, { useState, useEffect } from 'react'; +import { Link } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { useAuth } from '../../context/AuthContext'; +import { useSite } from '../../context/SiteContext'; +import { getSiteModels, getSitePackages } from '../../api'; +import Aurora from '../../components/bits/Aurora'; +import SplitText from '../../components/bits/SplitText'; +import RotatingText from '../../components/bits/RotatingText'; +import TiltedCard from '../../components/bits/TiltedCard'; +import CountUp from '../../components/bits/CountUp'; + +export default function DefaultHome() { + const { t } = useTranslation(); + const { user } = useAuth(); + const { site } = useSite(); + const [models, setModels] = useState([]); + const [packages, setPackages] = useState([]); + + useEffect(() => { + getSiteModels().then(r => { if (r.data.success) setModels(r.data.data || []); }).catch(() => {}); + getSitePackages().then(r => { if (r.data.success) setPackages(r.data.data || []); }).catch(() => {}); + }, []); + + const enabledModels = models.filter(m => m.enabled !== false); + + return ( +
    + {/* Aurora Background */} +
    + +
    + + {/* Hero Section */} +
    +
    +
    +

    + +

    +
    + +
    + {t('home.heroSubtitle').split('.')[0]}. +
    + +
    + +
    + +
    + {user ? ( + + {t('home.goToDashboard')} + + ) : ( + <> + + {t('home.getStarted')} + + + {t('home.viewPricing')} + + + )} +
    +
    + + {/* Stats */} +
    + {[ + { value: enabledModels.length || 50, suffix: '+', label: t('home.aiModels') }, + { value: 99.9, suffix: '%', label: t('home.uptime') }, + { value: 50, suffix: 'ms', label: t('home.latency'), prefix: '<' }, + ].map((stat, i) => ( +
    +
    + {stat.prefix}{stat.suffix} +
    +

    {stat.label}

    +
    + ))} +
    +
    + + {/* Features Section */} +
    +
    +

    {t('home.whyChooseUs')}

    +

    {t('home.whyChooseUsDesc')}

    +
    + +
    + {[ + { icon: '⚡', title: t('home.lightningFast'), desc: t('home.lightningFastDesc'), color: 'from-yellow-500/20 to-orange-500/20' }, + { icon: '🔒', title: t('home.securePrivate'), desc: t('home.securePrivateDesc'), color: 'from-blue-500/20 to-cyan-500/20' }, + { icon: '💰', title: t('home.payAsYouGo'), desc: t('home.payAsYouGoDesc'), color: 'from-green-500/20 to-emerald-500/20' }, + ].map((f, i) => ( + +
    +
    {f.icon}
    +

    {f.title}

    +

    {f.desc}

    +
    +
    + ))} +
    +
    + + {/* Models Preview */} + {enabledModels.length > 0 && ( +
    +
    +

    {t('home.availableModels')}

    +

    {t('home.availableModelsDesc', { count: enabledModels.length })}

    +
    + +
    + {enabledModels.slice(0, 12).map((m, i) => ( +
    +
    + + {m.display_name || m.model_name} + +
    + ))} +
    + + {enabledModels.length > 12 && ( +
    + + {t('home.viewAllModels', { count: enabledModels.length })} → + +
    + )} +
    + )} + + {/* Packages Preview */} + {packages.length > 0 && ( +
    +
    +

    {t('home.plansPackages')}

    +

    {t('home.choosePlan')}

    +
    + +
    + {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => ( +
    +

    {pkg.name}

    + {pkg.description &&

    {pkg.description}

    } +
    +
    + ${pkg.price} + {pkg.original_price > pkg.price && ( + ${pkg.original_price} + )} +
    + {pkg.duration > 0 &&

    {t('home.days', { count: pkg.duration })}

    } +
    + + {user ? t('home.subscribe') : t('home.getStarted')} + +
    + ))} +
    +
    + )} + + {/* CTA Section */} +
    +
    +
    +

    {t('home.readyToStart')}

    +

    {t('home.readyToStartDesc')}

    +
    + {user ? ( + + {t('home.goToDashboard')} + + ) : ( + <> + + {t('home.createFreeAccount')} + + + {t('home.signIn')} + + + )} +
    +
    +
    +
    +
    + ); +} diff --git a/src/themes/default/Layout.jsx b/src/themes/default/Layout.jsx new file mode 100644 index 0000000..ded242e --- /dev/null +++ b/src/themes/default/Layout.jsx @@ -0,0 +1,151 @@ +import React, { useState } from 'react'; +import { Outlet, Link, useNavigate, useLocation } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { useAuth } from '../../context/AuthContext'; +import { useSite } from '../../context/SiteContext'; + +export default function DefaultLayout() { + const { t } = useTranslation(); + const { user, logout } = useAuth(); + const { site } = useSite(); + const navigate = useNavigate(); + const location = useLocation(); + const [mobileMenuOpen, setMobileMenuOpen] = useState(false); + + const siteName = site?.name || 'AI Platform'; + + const navItems = [ + { to: '/', label: t('nav.home'), auth: false }, + { to: '/pricing', label: t('nav.pricing'), auth: false }, + { to: '/packages', label: t('nav.packages'), auth: false }, + { to: '/dashboard', label: t('nav.dashboard'), auth: true }, + { to: '/tokens', label: t('nav.apiKeys'), auth: true }, + ]; + + const visibleNavItems = navItems.filter((n) => !n.auth || user); + + return ( +
    + {/* Announcement Banner */} + {site?.announcement && ( +
    +

    {site.announcement}

    +
    + )} + + {/* Header */} +
    +
    + {/* Logo */} + + {site?.logo ? ( + {siteName} + ) : ( +
    + {siteName.charAt(0)} +
    + )} + + {siteName} + + + + {/* Desktop Nav */} + + + {/* Auth + Mobile toggle */} +
    + {user ? ( +
    + + {user.display_name || user.username} + + +
    + ) : ( + <> + + {t('nav.login')} + + + {t('nav.signUp')} + + + )} + + +
    +
    + + {mobileMenuOpen && ( +
    + +
    + )} +
    + +
    + +
    + + +
    + ); +} diff --git a/src/themes/minimal/Home.jsx b/src/themes/minimal/Home.jsx new file mode 100644 index 0000000..79fbe28 --- /dev/null +++ b/src/themes/minimal/Home.jsx @@ -0,0 +1,188 @@ +import React, { useState, useEffect } from 'react'; +import { Link } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { useAuth } from '../../context/AuthContext'; +import { useSite } from '../../context/SiteContext'; +import { getSiteModels, getSitePackages } from '../../api'; +import CountUp from '../../components/bits/CountUp'; +import FadeContent from '../../components/bits/FadeContent'; + +export default function MinimalHome() { + const { t } = useTranslation(); + const { user } = useAuth(); + const { site } = useSite(); + const [models, setModels] = useState([]); + const [packages, setPackages] = useState([]); + + useEffect(() => { + getSiteModels().then(r => { if (r.data.success) setModels(r.data.data || []); }).catch(() => {}); + getSitePackages().then(r => { if (r.data.success) setPackages(r.data.data || []); }).catch(() => {}); + }, []); + + const enabledModels = models.filter(m => m.enabled !== false); + + return ( +
    + {/* Hero Section — clean and minimal */} +
    + +
    +

    + {site?.name || t('home.defaultHeroTitle')} +

    +

    + {t('home.heroSubtitle')} +

    + +
    + {user ? ( + + {t('home.goToDashboard')} → + + ) : ( + <> + + {t('home.getStarted')} → + + + {t('home.viewPricing')} + + + )} +
    +
    +
    + + {/* Stats — simple inline */} + +
    +
    +
    + + +
    +

    {t('home.aiModels')}

    +
    +
    +
    + % +
    +

    {t('home.uptime')}

    +
    +
    +
    + <ms +
    +

    {t('home.latency')}

    +
    +
    +
    +
    + + {/* Features — two-column layout */} +
    + +

    {t('home.whyChooseUs')}

    +

    {t('home.whyChooseUsDesc')}

    + +
    + {[ + { title: t('home.lightningFast'), desc: t('home.lightningFastDesc') }, + { title: t('home.securePrivate'), desc: t('home.securePrivateDesc') }, + { title: t('home.payAsYouGo'), desc: t('home.payAsYouGoDesc') }, + ].map((f, i) => ( +
    + 0{i + 1} +
    +

    {f.title}

    +

    {f.desc}

    +
    +
    + ))} +
    +
    +
    + + {/* Models — simple list */} + {enabledModels.length > 0 && ( +
    + +
    +
    +

    {t('home.availableModels')}

    +

    {t('home.availableModelsDesc', { count: enabledModels.length })}

    +
    + {enabledModels.length > 8 && ( + + {t('home.viewAllModels', { count: enabledModels.length })} → + + )} +
    + +
    + {enabledModels.slice(0, 8).map((m, i) => ( +
    + {m.display_name || m.model_name} +
    + ))} +
    +
    +
    + )} + + {/* Packages — clean cards */} + {packages.length > 0 && ( +
    + +

    {t('home.plansPackages')}

    +

    {t('home.choosePlan')}

    + +
    + {packages.filter(p => p.enabled).slice(0, 3).map((pkg) => ( +
    +

    {pkg.name}

    + {pkg.description &&

    {pkg.description}

    } +
    + ${pkg.price} + {pkg.original_price > pkg.price && ( + ${pkg.original_price} + )} + {pkg.duration > 0 &&

    {t('home.days', { count: pkg.duration })}

    } +
    + + {user ? t('home.subscribe') : t('home.getStarted')} + +
    + ))} +
    +
    +
    + )} + + {/* CTA — simple */} +
    + +
    +

    {t('home.readyToStart')}

    +

    {t('home.readyToStartDesc')}

    +
    + {user ? ( + + {t('home.goToDashboard')} → + + ) : ( + <> + + {t('home.createFreeAccount')} → + + + {t('home.signIn')} + + + )} +
    +
    +
    +
    +
    + ); +} diff --git a/src/themes/minimal/Layout.jsx b/src/themes/minimal/Layout.jsx new file mode 100644 index 0000000..bcf639d --- /dev/null +++ b/src/themes/minimal/Layout.jsx @@ -0,0 +1,120 @@ +import React, { useState } from 'react'; +import { Outlet, Link, useNavigate, useLocation } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { useAuth } from '../../context/AuthContext'; +import { useSite } from '../../context/SiteContext'; + +export default function MinimalLayout() { + const { t } = useTranslation(); + const { user, logout } = useAuth(); + const { site } = useSite(); + const navigate = useNavigate(); + const location = useLocation(); + const [mobileMenuOpen, setMobileMenuOpen] = useState(false); + + const siteName = site?.name || 'AI Platform'; + + const navItems = [ + { to: '/', label: t('nav.home'), auth: false }, + { to: '/pricing', label: t('nav.pricing'), auth: false }, + { to: '/packages', label: t('nav.packages'), auth: false }, + { to: '/dashboard', label: t('nav.dashboard'), auth: true }, + { to: '/tokens', label: t('nav.apiKeys'), auth: true }, + ]; + + const visibleNavItems = navItems.filter((n) => !n.auth || user); + + return ( +
    + {/* Announcement */} + {site?.announcement && ( +
    +

    {site.announcement}

    +
    + )} + + {/* Header — minimal */} +
    +
    + + {site?.logo ? ( + {siteName} + ) : ( + {siteName} + )} + {site?.logo && ( + {siteName} + )} + + + + +
    + {user ? ( +
    + {user.display_name || user.username} + +
    + ) : ( + <> + + {t('nav.login')} + + + {t('nav.signUp')} + + + )} + +
    +
    + + {mobileMenuOpen && ( +
    + +
    + )} +
    + +
    + + +
    + ); +} diff --git a/src/pages/Home.jsx b/src/themes/starter/Home.jsx similarity index 80% rename from src/pages/Home.jsx rename to src/themes/starter/Home.jsx index d04a001..7443917 100644 --- a/src/pages/Home.jsx +++ b/src/themes/starter/Home.jsx @@ -1,16 +1,18 @@ import React, { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; -import { useAuth } from '../context/AuthContext'; -import { useSite } from '../context/SiteContext'; -import { getSiteModels, getSitePackages } from '../api'; -import GradientText from '../components/bits/GradientText'; -import BlurText from '../components/bits/BlurText'; -import SpotlightCard from '../components/bits/SpotlightCard'; -import CountUp from '../components/bits/CountUp'; -import StarBorder from '../components/bits/StarBorder'; -import ShinyText from '../components/bits/ShinyText'; +import { useTranslation } from 'react-i18next'; +import { useAuth } from '../../context/AuthContext'; +import { useSite } from '../../context/SiteContext'; +import { getSiteModels, getSitePackages } from '../../api'; +import GradientText from '../../components/bits/GradientText'; +import BlurText from '../../components/bits/BlurText'; +import SpotlightCard from '../../components/bits/SpotlightCard'; +import CountUp from '../../components/bits/CountUp'; +import StarBorder from '../../components/bits/StarBorder'; +import ShinyText from '../../components/bits/ShinyText'; -export default function Home() { +export default function StarterHome() { + const { t } = useTranslation(); const { user } = useAuth(); const { site } = useSite(); const [models, setModels] = useState([]); @@ -40,12 +42,12 @@ export default function Home() { animationSpeed={6} className="text-5xl md:text-7xl font-heading font-extrabold leading-tight" > - {site?.name || 'AI API Platform'} + {site?.name || t('home.defaultHeroTitle')}
    - Go to Dashboard + {t('home.goToDashboard')} ) : ( <> - Get Started Free + {t('home.getStarted')} - View Pricing + {t('home.viewPricing')} )} @@ -77,19 +79,19 @@ export default function Home() {
    +
    -

    AI Models

    +

    {t('home.aiModels')}

    %
    -

    Uptime

    +

    {t('home.uptime')}

    <ms
    -

    Latency

    +

    {t('home.latency')}

    @@ -97,8 +99,8 @@ export default function Home() { {/* Features Section */}
    -

    Why Choose Us

    -

    Everything you need to build AI-powered applications

    +

    {t('home.whyChooseUs')}

    +

    {t('home.whyChooseUsDesc')}

    @@ -108,10 +110,8 @@ export default function Home() {
    -

    Lightning Fast

    -

    - Optimized routing and caching deliver responses with minimal latency. Load-balanced across multiple providers for maximum reliability. -

    +

    {t('home.lightningFast')}

    +

    {t('home.lightningFastDesc')}

    @@ -120,10 +120,8 @@ export default function Home() {
    -

    Secure & Private

    -

    - Enterprise-grade security with encrypted API keys. No request logging by default. Your data stays your data. -

    +

    {t('home.securePrivate')}

    +

    {t('home.securePrivateDesc')}

    @@ -132,10 +130,8 @@ export default function Home() {
    -

    Pay As You Go

    -

    - Transparent pricing with no hidden fees. Only pay for what you use. Multiple top-up options and subscription packages available. -

    +

    {t('home.payAsYouGo')}

    +

    {t('home.payAsYouGoDesc')}

    @@ -144,9 +140,9 @@ export default function Home() { {enabledModels.length > 0 && (
    -

    Available Models

    +

    {t('home.availableModels')}

    - Access {enabledModels.length} AI models through a unified API + {t('home.availableModelsDesc', { count: enabledModels.length })}

    @@ -167,7 +163,7 @@ export default function Home() { {enabledModels.length > 12 && (
    - View all {enabledModels.length} models → + {t('home.viewAllModels', { count: enabledModels.length })} →
    )} @@ -178,8 +174,8 @@ export default function Home() { {packages.length > 0 && (
    -

    Plans & Packages

    -

    Choose a plan that fits your needs

    +

    {t('home.plansPackages')}

    +

    {t('home.choosePlan')}

    @@ -197,14 +193,14 @@ export default function Home() { )}
    {pkg.duration > 0 && ( -

    {pkg.duration} days

    +

    {t('home.days', { count: pkg.duration })}

    )}
    - {user ? 'Subscribe' : 'Get Started'} + {user ? t('home.subscribe') : t('home.getStarted')} ))} @@ -218,23 +214,23 @@ export default function Home() {

    - Ready to Get Started? + {t('home.readyToStart')}

    - Create your account and start building with AI in minutes. No credit card required. + {t('home.readyToStartDesc')}

    {user ? ( - Go to Dashboard + {t('home.goToDashboard')} ) : ( <> - Create Free Account + {t('home.createFreeAccount')} - Sign In + {t('home.signIn')} )} diff --git a/src/themes/starter/Layout.jsx b/src/themes/starter/Layout.jsx new file mode 100644 index 0000000..647ee84 --- /dev/null +++ b/src/themes/starter/Layout.jsx @@ -0,0 +1,173 @@ +import React, { useState } from 'react'; +import { Outlet, Link, useNavigate, useLocation } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { useAuth } from '../../context/AuthContext'; +import { useSite } from '../../context/SiteContext'; + +export default function StarterLayout() { + const { t } = useTranslation(); + const { user, logout } = useAuth(); + const { site } = useSite(); + const navigate = useNavigate(); + const location = useLocation(); + const [mobileMenuOpen, setMobileMenuOpen] = useState(false); + + const siteName = site?.name || 'AI Platform'; + + const navItems = [ + { to: '/', label: t('nav.home'), auth: false }, + { to: '/pricing', label: t('nav.pricing'), auth: false }, + { to: '/packages', label: t('nav.packages'), auth: false }, + { to: '/dashboard', label: t('nav.dashboard'), auth: true }, + { to: '/tokens', label: t('nav.apiKeys'), auth: true }, + ]; + + const visibleNavItems = navItems.filter((n) => !n.auth || user); + + return ( +
    + {/* Announcement Banner */} + {site?.announcement && ( +
    +

    {site.announcement}

    +
    + )} + + {/* Header */} +
    +
    + {/* Logo */} + + {site?.logo ? ( + {siteName} + ) : ( +
    + {siteName.charAt(0)} +
    + )} + + {siteName} + + + + {/* Desktop Nav */} + + + {/* Auth + Mobile toggle */} +
    + {user ? ( +
    + + {user.display_name || user.username} + + +
    + ) : ( + <> + + {t('nav.login')} + + + {t('nav.signUp')} + + + )} + + {/* Mobile hamburger */} + +
    +
    + + {/* Mobile Nav Dropdown */} + {mobileMenuOpen && ( +
    + +
    + )} +
    + + {/* Content */} +
    + +
    + + {/* Footer */} + +
    + ); +} + +function NavLink({ to, children, active }) { + return ( + + {children} + + ); +}
    ModelInput / 1M tokensOutput / 1M tokensStatus{t('pricing.model')}{t('pricing.inputPrice')}{t('pricing.outputPrice')}{t('pricing.status')}