diff --git a/.env.local b/.env.local
index bcbe3ae7..0e688027 100644
--- a/.env.local
+++ b/.env.local
@@ -16,4 +16,5 @@ STRIPE_PRO_PRICE_ID=price_demo_pro
# API Configuration
NODE_ENV=development
PORT=3001
-FRONTEND_URL=http://localhost:5174
+FRONTEND_URL=http://localhost:5173
+VITE_API_BASE_URL=http://localhost:3001
diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md
index 0f2b7332..5317ec71 100644
--- a/DEPLOYMENT.md
+++ b/DEPLOYMENT.md
@@ -41,6 +41,7 @@ This guide will help you deploy ContentFlow to production and start generating r
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
VITE_STRIPE_PUBLISHABLE_KEY=pk_live_...
+ VITE_API_BASE_URL=https://your-api-domain.vercel.app
```
3. **Configure Domain** (Optional)
diff --git a/VERCEL_DEPLOYMENT_GUIDE.md b/VERCEL_DEPLOYMENT_GUIDE.md
new file mode 100644
index 00000000..40f20aad
--- /dev/null
+++ b/VERCEL_DEPLOYMENT_GUIDE.md
@@ -0,0 +1,134 @@
+# 🚀 Fixed Vercel Deployment Guide
+
+## Issues that were fixed:
+- ❌ Hardcoded `localhost:3001` URLs in all components
+- ❌ CORS only allowing localhost origins
+- ❌ Missing production environment variable configuration
+- ❌ CSS import order causing build warnings
+- ❌ No dynamic API URL resolution
+
+## ✅ What's now fixed:
+- ✅ Dynamic API URL configuration
+- ✅ Production-ready CORS settings
+- ✅ Clean builds without warnings
+- ✅ Environment-based URL resolution
+- ✅ Proper Vercel configuration
+
+## 📝 Deployment Steps:
+
+### 1. Deploy Frontend to Vercel
+
+1. **Connect your GitHub repo to Vercel:**
+ - Go to [vercel.com](https://vercel.com)
+ - Click "Import Project"
+ - Select your `contentflow` repository
+ - Framework: **React** (Vite)
+ - Build Command: `npm run build`
+ - Output Directory: `dist`
+
+2. **Set Environment Variables in Vercel Dashboard:**
+ ```
+ VITE_SUPABASE_URL=https://your-project.supabase.co
+ VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
+ VITE_STRIPE_PUBLISHABLE_KEY=pk_test_your_key
+ VITE_API_BASE_URL=https://your-api-domain.vercel.app
+ ```
+
+3. **Deploy** - Vercel will build and deploy automatically
+
+### 2. Deploy API to Vercel (Separate Project)
+
+1. **Create new Vercel project for API:**
+ - Import the same GitHub repo
+ - Set **Root Directory** to `api`
+ - Framework: **Node.js**
+ - Build Command: `npm install`
+ - Output Directory: `./`
+
+2. **Set API Environment Variables:**
+ ```
+ OPENAI_API_KEY=sk-your-openai-key
+ VITE_SUPABASE_URL=https://your-project.supabase.co
+ SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
+ STRIPE_SECRET_KEY=sk_test_your_key
+ STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
+ STRIPE_CREATOR_PRICE_ID=price_your_creator_id
+ STRIPE_PRO_PRICE_ID=price_your_pro_id
+ FRONTEND_URL=https://your-frontend-domain.vercel.app
+ NODE_ENV=production
+ ```
+
+### 3. Update Frontend Environment Variable
+
+After API is deployed, update the frontend's `VITE_API_BASE_URL`:
+- Go to your frontend Vercel project settings
+- Update `VITE_API_BASE_URL=https://your-actual-api-domain.vercel.app`
+- Redeploy the frontend
+
+### 4. Test the Deployment
+
+1. **Check Frontend:** Visit your frontend URL
+2. **Check API Health:** Visit `https://your-api-domain.vercel.app/api/health`
+3. **Test CORS:** API now accepts requests from your frontend domain
+
+## 🔧 Key Technical Fixes Applied:
+
+### Dynamic API Configuration
+```javascript
+// src/config/api.js - NEW FILE
+export const getApiBaseUrl = () => {
+ if (import.meta.env.PROD) {
+ return import.meta.env.VITE_API_BASE_URL || 'https://contentflow-api.vercel.app'
+ }
+ return import.meta.env.VITE_API_BASE_URL || 'http://localhost:3001'
+}
+```
+
+### Flexible CORS Configuration
+```javascript
+// api/server.js - UPDATED
+const allowedOrigins = [
+ 'http://localhost:5173',
+ 'http://localhost:3000',
+ 'https://contentflow.vercel.app',
+ 'https://contentflow-frontend.vercel.app'
+]
+
+if (process.env.FRONTEND_URL) {
+ allowedOrigins.push(process.env.FRONTEND_URL)
+}
+```
+
+### Fixed Components
+All components now use centralized API configuration:
+- ✅ SubscriptionManager.jsx
+- ✅ AdminDashboard.jsx
+- ✅ Dashboard.jsx
+- ✅ ContentHistory.jsx
+- ✅ PromoBanner.jsx
+
+## 🚨 Important Notes:
+
+1. **Two Separate Vercel Projects Required:**
+ - Frontend project (root directory)
+ - API project (api/ subdirectory)
+
+2. **Environment Variables are Critical:**
+ - Frontend needs `VITE_API_BASE_URL` pointing to API
+ - API needs `FRONTEND_URL` pointing to frontend
+
+3. **Build Order:**
+ - Deploy API first to get its URL
+ - Then deploy frontend with API URL configured
+
+## 🎯 No More "SAME ERROR"!
+
+The common deployment errors were:
+- ❌ `localhost:3001` not accessible in production
+- ❌ CORS blocking requests between domains
+- ❌ Missing environment variables
+- ❌ CSS build warnings
+
+All of these are now **FIXED** ✅
+
+Your deployment should now work smoothly! 🚀
\ No newline at end of file
diff --git a/api/server.js b/api/server.js
index d9b2758c..715da069 100644
--- a/api/server.js
+++ b/api/server.js
@@ -20,8 +20,29 @@ export const supabase = createClient(
)
// Middleware
+const allowedOrigins = [
+ 'http://localhost:5173',
+ 'http://localhost:3000',
+ 'https://contentflow.vercel.app',
+ 'https://contentflow-frontend.vercel.app'
+]
+
+// Add environment variable for frontend URL if provided
+if (process.env.FRONTEND_URL) {
+ allowedOrigins.push(process.env.FRONTEND_URL)
+}
+
app.use(cors({
- origin: ['http://localhost:5173', 'http://localhost:3000'],
+ origin: function (origin, callback) {
+ // Allow requests with no origin (like mobile apps or curl requests)
+ if (!origin) return callback(null, true)
+
+ if (allowedOrigins.indexOf(origin) !== -1) {
+ callback(null, true)
+ } else {
+ callback(new Error('Not allowed by CORS'))
+ }
+ },
credentials: true
}))
app.use(express.json({ limit: '10mb' }))
diff --git a/api/vercel.json b/api/vercel.json
index 55c47628..c5237352 100644
--- a/api/vercel.json
+++ b/api/vercel.json
@@ -20,6 +20,7 @@
"STRIPE_WEBHOOK_SECRET": "@stripe_webhook_secret",
"STRIPE_CREATOR_PRICE_ID": "@stripe_creator_price_id",
"STRIPE_PRO_PRICE_ID": "@stripe_pro_price_id",
- "FRONTEND_URL": "@frontend_url"
+ "FRONTEND_URL": "@frontend_url",
+ "NODE_ENV": "production"
}
}
diff --git a/dist/assets/index-BTgx3oLx.js b/dist/assets/index-BTgx3oLx.js
deleted file mode 100644
index 215f06fe..00000000
--- a/dist/assets/index-BTgx3oLx.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import{r as e,a as t}from"./vendor-T8osx3Jj.js";import{r as n,Z as r,A as o,C as a,T as i,a as s,b as l,H as u,c,S as d,L as m,P as f,d as p,e as h,f as b,g,M as v,V as y,h as x,i as N,R as w,j as k,k as S,l as E,E as j,m as D,U as C,n as P,F as T,o as R,p as _}from"./ui-CZBkdTqY.js";import{c as V}from"./supabase-Ch0sirx8.js";import{L,r as A,u as O,R as M,B as I,a as z,b as F,N as H}from"./router-Dyxtdz5J.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var U,W,B={exports:{}},$={};function q(){return U||(U=1,
-/**
- * @license React
- * react-jsx-dev-runtime.development.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.
- */
-function(){function t(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===S?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case f:return"Fragment";case h:return"Profiler";case p:return"StrictMode";case y:return"Suspense";case x:return"SuspenseList";case k:return"Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case m:return"Portal";case g:return(e.displayName||"Context")+".Provider";case b:return(e._context.displayName||"Context")+".Consumer";case v:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(n=e.displayName||null)?n:t(e.type)||"Memo";case w:n=e._payload,e=e._init;try{return t(e(n))}catch(r){}}return null}function n(e){return""+e}function r(e){try{n(e);var t=!1}catch(a){t=!0}if(t){var r=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function o(e){if(e===f)return"<>";if("object"==typeof e&&null!==e&&e.$$typeof===w)return"<...>";try{var n=t(e);return n?"<"+n+">":"<...>"}catch(r){return"<...>"}}function a(){return Error("react-stack-top-frame")}function i(){var e=t(this.type);return P[e]||(P[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,n,o,a,s,c,m,f){var p,h=n.children;if(void 0!==h)if(a)if(D(h)){for(a=0;a\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,h,b,h),_[h+a]=!0)}if(h=null,void 0!==o&&(r(o),h=""+o),function(e){if(j.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(r(n.key),h=""+n.key),"key"in n)for(var g in o={},n)"key"!==g&&(o[g]=n[g]);else o=n;return h&&function(e,t){function n(){u||(u=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,t,n,r,o,a,s,l){return n=a.ref,e={$$typeof:d,type:e,key:t,props:a,_owner:o},null!==(void 0!==n?n:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:i}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:s}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,h,c,0,null===(p=E.A)?null:p.getOwner(),o,m,f)}function l(e){"object"==typeof e&&null!==e&&e.$$typeof===d&&e._store&&(e._store.validated=1)}var u,c=e(),d=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),S=Symbol.for("react.client.reference"),E=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,D=Array.isArray,C=console.createTask?console.createTask:function(){return null},P={},T=(c={"react-stack-bottom-frame":function(e){return e()}})["react-stack-bottom-frame"].bind(c,a)(),R=C(o(a)),_={};$.Fragment=f,$.jsxDEV=function(e,t,n,r,a,i){var l=1e4>E.recentlyCreatedOwnerStacks++;return s(e,t,n,r,0,i,l?Error("react-stack-top-frame"):T,l?C(o(e)):R)}}()),$}var K,Y,G,Q,X=(W||(W=1,B.exports=q()),B.exports),Z={exports:{}},J={},ee={exports:{}},te={};function ne(){return Y||(Y=1,ee.exports=(K||(K=1,e=te,
-/**
- * @license React
- * scheduler.development.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.
- */
-function(){function t(){if(N=!1,E){var t=e.unstable_now();C=t;var n=!0;try{e:{y=!1,x&&(x=!1,k(j),j=-1),v=!0;var a=g;try{t:{for(i(t),b=r(f);null!==b&&!(b.expirationTime>t&&l());){var c=b.callback;if("function"==typeof c){b.callback=null,g=b.priorityLevel;var d=c(b.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof d){b.callback=d,i(t),n=!0;break t}b===r(f)&&o(f),i(t)}else o(f);b=r(f)}if(null!==b)n=!0;else{var m=r(p);null!==m&&u(s,m.startTime-t),n=!1}}break e}finally{b=null,g=a,v=!1}n=void 0}}finally{n?P():E=!1}}}function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(!(0>>1;ra(l,n))ua(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(ua(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}function i(e){for(var t=r(p);null!==t;){if(null===t.callback)o(p);else{if(!(t.startTime<=e))break;o(p),t.sortIndex=t.expirationTime,n(f,t)}t=r(p)}}function s(e){if(x=!1,i(e),!y)if(null!==r(f))y=!0,E||(E=!0,P());else{var t=r(p);null!==t&&u(s,t.startTime-e)}}function l(){return!(!N&&e.unstable_now()-Ce||125i?(t.sortIndex=a,n(p,t),null===r(f)&&t===r(p)&&(x?(k(j),j=-1):x=!0,u(s,a-i))):(t.sortIndex=l,n(f,t),y||v||(y=!0,E||(E=!0,P()))),t},e.unstable_shouldYield=l,e.unstable_wrapCallback=function(e){var t=g;return function(){var n=g;g=t;try{return e.apply(this,arguments)}finally{g=n}}},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),te)),ee.exports;var e}function re(){return G||(G=1,
-/**
- * @license React
- * react-dom-client.development.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.
- */
-function(){function n(e,t){for(e=e.memoizedState;null!==e&&0=t.length)return o;var a=t[n],i=Xc(e)?e.slice():_c({},e);return i[a]=r(e[a],t,n+1,o),i}function o(e,t,n){if(t.length===n.length){for(var r=0;rrd?console.error("Unexpected pop."):(t!==nd[rd]&&console.error("Unexpected Fiber popped."),e.current=td[rd],td[rd]=null,nd[rd]=null,rd--)}function P(e,t,n){rd++,td[rd]=e.current,nd[rd]=n,e.current=t}function T(e){return null===e&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function R(e,t){P(id,t,e),P(ad,e,e),P(od,null,e);var n=t.nodeType;switch(n){case 9:case 11:n=9===n?"#document":"#fragment",t=(t=t.documentElement)&&(t=t.namespaceURI)?tu(t):Hy;break;default:if(n=t.tagName,t=t.namespaceURI)t=nu(t=tu(t),n);else switch(n){case"svg":t=Uy;break;case"math":t=Wy;break;default:t=Hy}}n={context:t,ancestorInfo:n=vt(null,n=n.toLowerCase())},C(od,e),P(od,n,e)}function _(e){C(od,e),C(ad,e),C(id,e)}function V(){return T(od.current)}function L(e){null!==e.memoizedState&&P(sd,e,e);var t=T(od.current),n=e.type,r=nu(t.context,n);t!==(r={context:r,ancestorInfo:n=vt(t.ancestorInfo,n)})&&(P(ad,e,e),P(od,r,e))}function A(e){ad.current===e&&(C(od,e),C(ad,e)),sd.current===e&&(C(sd,e),kx._currentValue=wx)}function O(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function M(e){try{return I(e),!1}catch(t){return!0}}function I(e){return""+e}function z(e,t){if(M(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",t,O(e)),I(e)}function F(e,t){if(M(e))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",t,O(e)),I(e)}function H(e){if(M(e))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",O(e)),I(e)}function U(e){if("function"==typeof xd&&Nd(e),kd&&"function"==typeof kd.setStrictMode)try{kd.setStrictMode(wd,e)}catch(t){Ed||(Ed=!0,console.error("React instrumentation encountered an error: %s",t))}}function W(e){Sd=e}function B(){null!==Sd&&"function"==typeof Sd.markCommitStopped&&Sd.markCommitStopped()}function $(e){null!==Sd&&"function"==typeof Sd.markComponentRenderStarted&&Sd.markComponentRenderStarted(e)}function q(){null!==Sd&&"function"==typeof Sd.markComponentRenderStopped&&Sd.markComponentRenderStopped()}function K(e){null!==Sd&&"function"==typeof Sd.markRenderStarted&&Sd.markRenderStarted(e)}function Y(){null!==Sd&&"function"==typeof Sd.markRenderStopped&&Sd.markRenderStopped()}function G(e,t){null!==Sd&&"function"==typeof Sd.markStateUpdateScheduled&&Sd.markStateUpdateScheduled(e,t)}function Q(e){return 1&e?"SyncHydrationLane":2&e?"Sync":4&e?"InputContinuousHydration":8&e?"InputContinuous":16&e?"DefaultHydration":32&e?"Default":128&e?"TransitionHydration":4194048&e?"Transition":62914560&e?"Retry":67108864&e?"SelectiveHydration":134217728&e?"IdleHydration":268435456&e?"Idle":536870912&e?"Offscreen":1073741824&e?"Deferred":void 0}function X(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194048&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function Z(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var o=0,a=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~a)?o=X(r):0!==(i&=s)?o=X(i):n||0!==(n=s&~e)&&(o=X(n)):0!==(s=r&~a)?o=X(s):0!==i?o=X(i):n||0!==(n=r&~e)&&(o=X(n)),0===o?0:0!==t&&t!==o&&0===(t&a)&&((a=o&-o)>=(n=t&-t)||32===a&&4194048&n)?t:o}function ee(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function te(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function re(){var e=Td;return!(4194048&(Td<<=1))&&(Td=256),e}function oe(){var e=Rd;return!(62914560&(Rd<<=1))&&(Rd=4194304),e}function ae(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ie(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function se(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Dd(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194090&n}function le(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Dd(n),o=1<)":-1--i||u[a]!==c[i]){var d="\n"+u[a].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),"function"==typeof e&&nm.set(e,d),d}}while(1<=a&&0<=i);break}}}finally{tm=!1,Zc.H=r,function(){if(0===--Zd){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_c({},e,{value:wc}),info:_c({},e,{value:kc}),warn:_c({},e,{value:Sc}),error:_c({},e,{value:Ec}),group:_c({},e,{value:jc}),groupCollapsed:_c({},e,{value:Dc}),groupEnd:_c({},e,{value:Cc})})}0>Zd&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=n}return u=(u=e?e.displayName||e.name:"")?Pe(u):"","function"==typeof e&&nm.set(e,u),u}function Re(e){var t=Error.prepareStackTrace;return Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=t,e.startsWith("Error: react-stack-top-frame\n")&&(e=e.slice(29)),-1!==(t=e.indexOf("\n"))&&(e=e.slice(t+1)),-1!==(t=e.indexOf("react-stack-bottom-frame"))&&(t=e.lastIndexOf("\n",t)),-1===t?"":e=e.slice(0,t)}function _e(e){switch(e.tag){case 26:case 27:case 5:return Pe(e.type);case 16:return Pe("Lazy");case 13:return Pe("Suspense");case 19:return Pe("SuspenseList");case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Pe("Activity");default:return""}}function Ve(e){try{var t="";do{t+=_e(e);var n=e._debugInfo;if(n)for(var r=n.length-1;0<=r;r--){var o=n[r];if("string"==typeof o.name){var a=t,i=o.env;t=a+Pe(o.name+(i?" ["+i+"]":""))}}e=e.return}while(e);return t}catch(s){return"\nError generating stack: "+s.message+"\n"+s.stack}}function Le(e){return(e=e?e.displayName||e.name:"")?Pe(e):""}function Ae(){if(null===rm)return null;var e=rm._debugOwner;return null!=e?E(e):null}function Oe(){if(null===rm)return"";var e=rm;try{var t="";switch(6===e.tag&&(e=e.return),e.tag){case 26:case 27:case 5:t+=Pe(e.type);break;case 13:t+=Pe("Suspense");break;case 19:t+=Pe("SuspenseList");break;case 31:t+=Pe("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||""!==t||(t+=Le(e.type));break;case 11:e._debugOwner||""!==t||(t+=Le(e.type.render))}for(;e;)if("number"==typeof e.tag){var n=e;e=n._debugOwner;var r=n._debugStack;e&&r&&("string"!=typeof r&&(n._debugStack=r=Re(r)),""!==r&&(t+="\n"+r))}else{if(null==e.debugStack)break;var o=e.debugStack;(e=e.owner)&&o&&(t+="\n"+Re(o))}var a=t}catch(i){a="\nError generating stack: "+i.message+"\n"+i.stack}return a}function Me(e,t,n,r,o,a,i){var s=rm;Ie(e);try{return null!==e&&e._debugTask?e._debugTask.run(t.bind(null,n,r,o,a,i)):t(n,r,o,a,i)}finally{Ie(s)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function Ie(e){Zc.getCurrentStack=null===e?null:Oe,om=!1,rm=e}function ze(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return H(e),e;default:return""}}function Fe(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function He(e){e._valueTracker||(e._valueTracker=function(e){var t=Fe(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);H(e[t]);var r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){H(e),r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){H(e),r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ue(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Fe(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function We(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Be(e){return e.replace(am,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function $e(e,t){void 0===t.checked||void 0===t.defaultChecked||sm||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Ae()||"A component",t.type),sm=!0),void 0===t.value||void 0===t.defaultValue||im||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Ae()||"A component",t.type),im=!0)}function qe(e,t,n,r,o,a,i,s){e.name="",null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?(z(i,"type"),e.type=i):e.removeAttribute("type"),null!=t?"number"===i?(0===t&&""===e.value||e.value!=t)&&(e.value=""+ze(t)):e.value!==""+ze(t)&&(e.value=""+ze(t)):"submit"!==i&&"reset"!==i||e.removeAttribute("value"),null!=t?Ye(e,i,ze(t)):null!=n?Ye(e,i,ze(n)):null!=r&&e.removeAttribute("value"),null==o&&null!=a&&(e.defaultChecked=!!a),null!=o&&(e.checked=o&&"function"!=typeof o&&"symbol"!=typeof o),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?(z(s,"name"),e.name=""+ze(s)):e.removeAttribute("name")}function Ke(e,t,n,r,o,a,i,s){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(z(a,"type"),e.type=a),null!=t||null!=n){if(("submit"===a||"reset"===a)&&null==t)return;n=null!=n?""+ze(n):"",t=null!=t?""+ze(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:o)&&"symbol"!=typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(z(i,"name"),e.name=i)}function Ye(e,t,n){"number"===t&&We(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ge(e,t){null==t.value&&("object"==typeof t.children&&null!==t.children?Tc.Children.forEach(t.children,function(e){null==e||"string"==typeof e||"number"==typeof e||"bigint"==typeof e||um||(um=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to