your-ai-workflow-firebase-os 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/ContactPopup-C8ZOI56C.cjs +1 -0
- package/dist/{ContactPopup-Bq5VDKwI.js → ContactPopup-D-TmjGqf.js} +1 -1
- package/dist/SetupPayments-9oZfz1lT.cjs +1 -0
- package/dist/{SetupPayments-Cl8IeFj4.js → SetupPayments-CHQ6HMAy.js} +815 -572
- package/dist/SetupPayments-D5N6MZaU.cjs +371 -0
- package/dist/aiRules-BcIgERD3.js +3 -0
- package/dist/{aiRules-_GwpyowD.cjs → aiRules-CEqtYOgo.cjs} +20 -6
- package/dist/renderer.cjs.js +1 -1
- package/dist/renderer.es.js +1 -1
- package/dist/server.cjs.js +5 -5
- package/dist/server.es.js +106 -102
- package/dist/src/server/index.d.ts +13 -0
- package/dist/vite.cjs.js +7 -7
- package/dist/vite.es.js +60 -56
- package/dist/your-ai-workflow-firebase-os.cjs.js +15 -14
- package/dist/your-ai-workflow-firebase-os.css +1 -1
- package/dist/your-ai-workflow-firebase-os.es.js +4781 -4632
- package/package.json +1 -1
- package/dist/ContactPopup-BOCo64bf.cjs +0 -1
- package/dist/SetupPayments-ANhXnBnD.cjs +0 -1
- package/dist/SetupPayments-NibB-MUL.cjs +0 -371
- package/dist/aiRules-DdCE4JQy.js +0 -3
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ That's it. **One component. Zero configuration files.**
|
|
|
33
33
|
| 📁 **File Storage** | An admin-only Assets screen for public images, plus a drive preset any page can be built on |
|
|
34
34
|
| 📬 **Forms** | Created with their pages on `/pages` — say what a form should ask and the AI builds it with the page; see and hand-edit every form afterwards on `/forms`. Questions can ask for a file — a CV, a photo, a receipt — and the upload works signed out |
|
|
35
35
|
| 📥 **Inbox** | Every form entry in one list at `/inbox`, filtered "From anyone" or "From signed-in users"; an attached file opens from the entry by its own name |
|
|
36
|
-
| 💳 **Payments** | Stripe checkout in one line — `<PayButton>` for one-off payments and subscriptions
|
|
36
|
+
| 💳 **Payments** | Stripe checkout in one line — the owner describes what they sell on `/payments`, picks the pages that sell it (or creates one on the spot) and pastes ONE generated prompt; the assistant builds those pages with `<PayButton>` for one-off payments and subscriptions. A Go live switch walks the test→live change (live price ids collected, test ids kept, and the id-swap prompt for the assistant generated), buyers get a built-in `/billing` page that appears after their first purchase, and every cancel/switch/invoice screen is Stripe's own billing portal |
|
|
37
37
|
| ✉️ **Email** | Resend in one line — `emailOwner()` and `emailPerson()` send from a closed set of templates (never an address a page typed), receipts and sale alerts send themselves off a Pay button's settings, and `/email` shows what the app can send and where owner mail goes |
|
|
38
38
|
| 📖 **Guide** | A walkthrough at `/guide` with the sentences to paste into your assistant |
|
|
39
39
|
| 📊 **Dashboard** | Personalised user dashboard |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-DYteiM-1.cjs`),t=require(`./assetUpload-yZ5bNDUH.cjs`);let n=require(`react`);n=e.i(n,1);let r=require(`firebase/firestore`),i=require(`react/jsx-runtime`),a=require(`react-router-dom`),o=require(`react-dom`);var s=e.n({contactFormConfig:()=>c}),c={systemName:`contact`,formType:`public`,redirectTo:`/`,title:`Get in Touch`,buttonName:`Contact Us`,submitText:`Send Message`,fields:[{name:`name`,type:`text`,label:`Full Name`,placeholder:`John Doe`,required:!0},{name:`email`,type:`email`,label:`Email Address`,placeholder:`john@example.com`,required:!0},{name:`phone`,type:`tel`,label:`Phone Number`,placeholder:`+1 (555) 000-0000`,required:!1},{name:`questions`,type:`textarea`,label:`Your Questions`,placeholder:`How can we help you?`,required:!0}]},l=e.n({supportFormConfig:()=>u}),u={systemName:`support`,formType:`private`,redirectTo:`/dashboard`,title:`Request Assistance`,buttonName:`Get Assistance`,submitText:`Submit Request`,fields:[{name:`topic`,type:`text`,label:`Topic`,placeholder:`E.g. Password reset issue`,required:!0},{name:`contactEmail`,type:`email`,label:`Contact Email`,placeholder:`your@email.com`,required:!0},{name:`description`,type:`textarea`,label:`Description`,placeholder:`Please describe your issue in detail...`,required:!0}]};function d(e,t){if(typeof t!=`object`||!t)return t;let n={...e};for(let r of Object.keys(t))t[r]instanceof Object&&r in e&&e[r]instanceof Object&&!Array.isArray(t[r])?n[r]=d(e[r],t[r]):n[r]=t[r];return n}var f=typeof window<`u`?n.useLayoutEffect:n.useEffect,p=(0,n.createContext)(void 0);function m({children:e,scopeSelector:a}){let o=t.qt(),s=(0,n.useMemo)(()=>o?.themeConfig||t.Qt,[o?.themeConfig]),[c,l]=(0,n.useState)(()=>{if(typeof window>`u`)return s.defaultTheme||`system`;let e=localStorage.getItem(`theme-mode`),t=localStorage.getItem(`last-seen-default-theme`);return s.defaultTheme&&s.defaultTheme!==t?(localStorage.setItem(`last-seen-default-theme`,s.defaultTheme),localStorage.removeItem(`theme-mode`),s.defaultTheme):e||s.defaultTheme||`system`}),[u,m]=(0,n.useState)(()=>{if(typeof window>`u`)return s.defaultTheme===`light`?`light`:`dark`;let e=localStorage.getItem(`theme-mode`),t=localStorage.getItem(`last-seen-default-theme`),n=e||s.defaultTheme||`system`;return s.defaultTheme&&s.defaultTheme!==t&&(n=s.defaultTheme),n===`system`?window.matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`:n}),[h,g]=(0,n.useState)(()=>{try{let e=localStorage.getItem(`theme_config_cache`);if(e)return JSON.parse(e)}catch{}return s}),[_,v]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{if(!localStorage.getItem(`theme_config_cache`)){g(s);let e=localStorage.getItem(`last-seen-default-theme`);s.defaultTheme&&s.defaultTheme!==e&&(localStorage.setItem(`last-seen-default-theme`,s.defaultTheme),localStorage.removeItem(`theme-mode`),l(s.defaultTheme))}},[s]),(0,n.useEffect)(()=>{if(!t.Yt){g(s);return}let e=(0,r.onSnapshot)((0,r.doc)(t.Yt,`sys_configs`,`theme`),e=>{if(e.exists()){let t=e.data();delete t.fontStyles,delete t.fontCustomization,delete t.fontFamily;let n=d(s,t);g(n),localStorage.setItem(`theme_config_cache`,JSON.stringify(n));let r=localStorage.getItem(`last-seen-default-theme`);n.defaultTheme&&n.defaultTheme!==r&&(localStorage.setItem(`last-seen-default-theme`,n.defaultTheme),l(n.defaultTheme))}else g(s),localStorage.removeItem(`theme_config_cache`),localStorage.removeItem(`theme-mode`),s.defaultTheme&&(localStorage.setItem(`last-seen-default-theme`,s.defaultTheme),l(s.defaultTheme))});return()=>e()},[s]),(0,n.useEffect)(()=>{let e=e=>{c===`system`&&m(e.matches?`light`:`dark`)},t=window.matchMedia(`(prefers-color-scheme: light)`);return c===`system`?(m(t.matches?`light`:`dark`),t.addEventListener(`change`,e)):m(c),()=>t.removeEventListener(`change`,e)},[c]),f(()=>{let e=(a?document.querySelector(a):document.documentElement)||document.documentElement,t=u===`dark`?h.colors.dark:h.colors.light;e.style.setProperty(`--bg-color`,t.background),e.style.setProperty(`--bg-secondary-color`,t.backgroundSecondary||t.background),e.style.setProperty(`--fg-color`,t.foreground),e.style.setProperty(`--accent-color`,t.accent);let n=u===`dark`;e.style.setProperty(`--panel-bg`,t.panelBg||`color-mix(in srgb, ${t.accent} ${n?`5%`:`4%`}, transparent)`),e.style.setProperty(`--panel-border`,t.panelBorder||`color-mix(in srgb, ${t.accent} 15%, transparent)`);let r=(e,t)=>!e||e.length===0?t||`transparent`:e.length===1?e[0]:`linear-gradient(135deg, ${e.map((t,n)=>`${t} ${Math.round(n/(e.length-1)*100)}%`).join(`, `)})`,i=`linear-gradient(135deg, color-mix(in oklab, ${t.accent} ${n?`70%`:`78%`}, black) 0%, ${t.accent} 100%)`,o=`linear-gradient(135deg, color-mix(in oklab, ${t.accent} ${n?`80%`:`85%`}, black) 0%, color-mix(in oklab, ${t.accent} 72%, white) 100%)`;e.style.setProperty(`--button-bg`,r(t.buttonGradient,i)),e.style.setProperty(`--button-fg`,t.buttonText||`#ffffff`),e.style.setProperty(`--button-hover-bg`,r(t.buttonHoverGradient||t.buttonGradient,o)),e.style.setProperty(`--text-gradient`,r(t.textGradient,`linear-gradient(135deg, ${t.foreground} 0%, ${t.accent} 100%)`)),e.style.setProperty(`--glow-color`,t.glowColor||`color-mix(in srgb, ${t.accent} ${n?`40%`:`30%`}, transparent)`),e.style.setProperty(`--notification-icon-color`,t.notificationIconColor||t.accent);let s=t.secondaryButton?.bg||(u===`dark`?`rgba(255, 255, 255, 0.05)`:`rgba(0, 0, 0, 0.03)`),l=t.secondaryButton?.border||(u===`dark`?`rgba(255, 255, 255, 0.1)`:`rgba(0, 0, 0, 0.06)`),d=t.secondaryButton?.text||t.foreground;if(e.style.setProperty(`--btn-sec-bg`,s),e.style.setProperty(`--btn-sec-border`,l),e.style.setProperty(`--btn-sec-text`,d),e.style.setProperty(`--selection-bg`,t.selectionBg||`color-mix(in srgb, var(--accent-color) 40%, transparent)`),e.style.setProperty(`--selection-text`,t.selectionText||`#ffffff`),e.setAttribute(`data-theme`,u),localStorage.setItem(`theme-mode`,c),h.cornerRounding===`custom`&&h.cornerRadii?(e.style.setProperty(`--btn-radius`,`${parseFloat(String(h.cornerRadii.buttonRadius))||0}rem`),e.style.setProperty(`--card-radius`,`${parseFloat(String(h.cornerRadii.cardRadius))||0}rem`),e.style.setProperty(`--input-radius`,`${parseFloat(String(h.cornerRadii.inputRadius))||0}rem`),e.style.setProperty(`--modal-radius`,`${parseFloat(String(h.cornerRadii.modalRadius))||0}rem`)):(e.style.setProperty(`--btn-radius`,`0.75rem`),e.style.setProperty(`--card-radius`,`1.5rem`),e.style.setProperty(`--input-radius`,`0.75rem`),e.style.setProperty(`--modal-radius`,`1.5rem`)),!document.getElementById(`inter-font`)){let e=document.createElement(`link`);e.id=`inter-font`,e.rel=`stylesheet`,e.href=`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap`,document.head.appendChild(e)}e.style.fontSize=`16px`,e.style.setProperty(`--weight-h1`,`800`),e.style.setProperty(`--weight-h2`,`700`),e.style.setProperty(`--weight-h3`,`700`),e.style.setProperty(`--leading-normal`,`1.5`);let f=document.querySelector(`link[rel*='icon']`);f||(f=document.createElement(`link`),f.rel=`icon`,document.head.appendChild(f)),h.faviconUrl&&(f.href=h.faviconUrl),h.appName&&(document.title=h.appName)},[u,c,h]),(0,i.jsx)(p.Provider,{value:{theme:u,setTheme:e=>l(e),toggleTheme:()=>{l(u===`light`?`dark`:`light`)},isSystem:c===`system`,setIsSystem:e=>l(e?`system`:u),config:h,activeConfig:h},children:_?e:null})}var h=()=>{let e=(0,n.useContext)(p);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e},g=e=>e?.formType===`private`||e?.submitPage===`requests`?`user_requests`:`user_submissions`,_={contact:c,support:u};function v(...e){return t.c(t.l(e))}var y=n.default.forwardRef(({className:e,label:n,error:r,currencySymbol:a,type:o,...s},c)=>{let l=o===`currency`;return(0,i.jsxs)(`div`,{className:`flex flex-col w-full relative`,children:[n&&(0,i.jsx)(`label`,{className:`text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1`,children:n}),(0,i.jsxs)(`div`,{className:`relative flex items-center`,children:[l&&a&&(0,i.jsx)(`span`,{className:`absolute left-4 font-bold text-foreground/70 z-10 pointer-events-none text-[15px]`,children:a}),(0,i.jsx)(`input`,{ref:c,type:l?`number`:o,className:v(`block h-12 w-full text-[15px] text-foreground py-2`,l&&a?`pl-8 pr-4`:`px-4`,`transition-all duration-300 placeholder:text-foreground/40`,`focus:outline-none focus:border-accent glow-focus`,`disabled:cursor-not-allowed disabled:opacity-50 glass-panel`,r&&`border-red-500/50 focus:border-red-500/50`,e),style:{borderRadius:`var(--input-radius, 0.75rem)`},...s})]}),r&&(0,i.jsx)(t.u.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:`text-xs text-red-500 font-medium`,children:r})]})});y.displayName=`Input`;function b(...e){return t.c(t.l(e))}var x=n.default.forwardRef(({className:e,variant:n=`primary`,isLoading:r,children:a,...o},s)=>(0,i.jsxs)(t.u.button,{ref:s,whileHover:{scale:1.02,y:-2},whileTap:{scale:.98},className:b(`relative inline-flex items-center justify-center px-5 py-2 text-sm font-medium transition-all duration-300 overflow-hidden group`,{primary:`btn-primary !border-none`,secondary:`btn-secondary !border-none`,ghost:`bg-transparent hover:bg-black/5 dark:hover:bg-white/5 text-foreground/60 hover:text-foreground transition-all duration-300 !border-none`}[n],e),style:{borderRadius:`var(--btn-radius, 0.75rem)`},disabled:r||o.disabled,...o,children:[r?(0,i.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,i.jsxs)(`svg`,{className:`w-5 h-5 animate-spin text-current`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,i.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,i.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]})}):null,(0,i.jsx)(`span`,{className:b(`inline-flex items-center justify-center gap-2`,r&&`opacity-0`),children:a})]}));x.displayName=`Button`;var S=n.default.lazy(()=>Promise.resolve().then(()=>require(`./PhoneInputField-BdzUG4Wx.cjs`)).then(e=>e.n)),C=/^[^\s@,;]+@[^\s@,;.]+(\.[^\s@,;.]+)*\.[a-z]{2,}$/i;function w({field:e,value:r,error:a,onChange:o}){let[s,c]=(0,n.useState)(!1),[l,u]=(0,n.useState)(``),d=(0,n.useRef)(null),f=async e=>{if(!(!e||s)){c(!0),u(``);try{o(await t.i(e,t.Jt.currentUser))}catch(e){u(e?.code===`storage/unauthorized`?`That kind of file is not accepted. Try a PDF, a document or a picture.`:t.r(e))}c(!1),d.current&&(d.current.value=``)}},p=a||l;return(0,i.jsxs)(`div`,{className:`flex flex-col w-full relative`,children:[(0,i.jsx)(`label`,{className:`text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1`,children:e.label}),(0,i.jsxs)(`label`,{className:`flex items-center gap-3 w-full rounded-xl px-4 py-3 glass-panel transition-all duration-300 cursor-pointer hover:border-accent ${s?`opacity-60 pointer-events-none`:``}`,style:{borderRadius:`var(--input-radius, 0.75rem)`},children:[s?(0,i.jsx)(t.Z,{className:`w-4 h-4 animate-spin text-accent shrink-0`}):(0,i.jsx)(t.U,{className:`w-4 h-4 shrink-0 ${r?`text-accent`:`text-foreground/40`}`}),(0,i.jsx)(`span`,{className:`flex-1 min-w-0 truncate text-[15px] ${r?`text-foreground`:`text-foreground/40`}`,children:s?`Uploading...`:r?t.n(r):e.placeholder||`Attach a file`}),!s&&(0,i.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[12.5px] font-bold text-foreground/60 shrink-0`,children:[(0,i.jsx)(t.St,{className:`w-3.5 h-3.5`}),(0,i.jsx)(`span`,{className:`max-sm:hidden`,children:r?`Replace`:`Upload`})]}),(0,i.jsx)(`input`,{ref:d,type:`file`,accept:e.accept,"aria-label":e.label,disabled:s,onChange:e=>f(e.target.files?.[0]),className:`hidden`})]}),!!r&&!s&&(0,i.jsxs)(`button`,{type:`button`,onClick:()=>{u(``),o(``)},"aria-label":`Remove ${e.label}`,className:`absolute right-2 -top-1 p-1.5 rounded-lg text-foreground/40 hover:text-red-500 hover:bg-red-500/10 transition-colors cursor-pointer flex items-center gap-1 text-[11.5px] font-bold`,children:[(0,i.jsx)(t.h,{className:`w-3.5 h-3.5`}),` Remove`]}),p&&(0,i.jsx)(`span`,{className:`text-xs text-red-500 font-medium mt-1.5 ml-1`,children:p})]})}function T({onClose:e,formId:s,formConfig:l,isInline:d}){let[f,p]=(0,n.useState)({}),[m,h]=(0,n.useState)(`idle`),[_,v]=(0,n.useState)(``),[b,T]=(0,n.useState)({}),E=(0,n.useRef)(null),[D,O]=(0,n.useState)(l||null),[k,A]=(0,n.useState)(!l),j=(0,a.useNavigate)(),M=t.qt(),N=e=>{let t=(typeof window<`u`?window.__FBOS_FORMS__:null)||{};return M?.defaultConfigs?.[e]||M?.defaultConfigs?.[`${e}Form`]||t[e]||(e===`contact`?c:e===`support`?u:null)};(0,n.useEffect)(()=>{if(l){O(l),A(!1);return}if(!s){O(N(`contact`)),A(!1);return}if(!localStorage.getItem(`fbos_custom_form_${s}`)){let e=N(s);if(e){O(e),A(!1);return}}try{let e=localStorage.getItem(`fbos_form_${s}`);e&&(O(JSON.parse(e)),A(!1))}catch{}(async()=>{try{let e=await(0,r.getDoc)((0,r.doc)(t.Yt,`sys_forms`,s));if(e.exists()){let t={...e.data(),id:e.id};O(t),localStorage.setItem(`fbos_form_${s}`,JSON.stringify(t))}else{let e=N(s);e&&(O(e),localStorage.removeItem(`fbos_custom_form_${s}`))}}catch(e){console.error(`Failed to load form config:`,e);let t=N(s);t&&O(t)}finally{A(!1)}})()},[s,l]),(0,n.useEffect)(()=>{D&&D.fields&&p(e=>{let n={...e},r=!1;return D.fields.forEach(e=>{(e.name===`contactEmail`||e.type===`email`)&&!n[e.name]&&t.Jt.currentUser?.email&&(n[e.name]=t.Jt.currentUser.email,r=!0)}),r?n:e})},[D]),(0,n.useEffect)(()=>{function t(t){E.current&&!E.current.contains(t.target)&&e?.()}return document.addEventListener(`mousedown`,t),()=>document.removeEventListener(`mousedown`,t)},[e]),(0,n.useEffect)(()=>{if(d)return;let t=t=>{t.key===`Escape`&&e?.()};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e,d]),(0,n.useEffect)(()=>{if(!d)return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=`unset`}},[d]);let P=async n=>{n.preventDefault();let i=(D?.fields||[]).filter(e=>e.type===`email`),a={},o={};if(i.forEach(e=>{let t=String(f[e.name]??``).trim();t&&(o[e.name]=t,C.test(t)||(a[e.name]=`That does not look like an email address — check for a typo, e.g. jane@example.com`))}),(D?.fields||[]).filter(e=>e.type===`file`&&e.required&&!f[e.name]).forEach(e=>{a[e.name]=`Please attach a file before sending.`}),Object.keys(a).length>0){T(a);return}T({}),h(`loading`),v(``);try{let n=g(D),i=t.Jt.currentUser?{uid:t.Jt.currentUser.uid,submitterName:t.Jt.currentUser.displayName||``,submitterEmail:t.Jt.currentUser.email||``,submitterAvatar:t.Jt.currentUser.photoURL||``}:{uid:`guest`};await(0,r.addDoc)((0,r.collection)(t.Yt,n),{...f,...o,...i,formId:s||D?.systemName||D?.title||`unknown`,submittedAt:(0,r.serverTimestamp)()}),h(`success`),setTimeout(()=>{D?.redirectTo&&!l&&(D.redirectTo.startsWith(`/`)?j(D.redirectTo):window.location.href=D.redirectTo),e?.(),h(`idle`),p({})},3e3)}catch(e){console.error(`Submission error:`,e),h(`error`),v(`We could not send your message right now. Please try again.`)}},[F,I]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{let e;return k||!D&&!l?e=setTimeout(()=>I(!0),150):I(!1),()=>clearTimeout(e)},[k,D,l]),k||!D)return F?d?(0,i.jsx)(`div`,{className:`w-full flex items-center justify-center py-[10vh]`,children:(0,i.jsxs)(`div`,{className:`p-4 rounded-2xl glass-panel border border-[var(--panel-border)]/40 bg-background/80 shadow-md flex items-center gap-3`,children:[(0,i.jsx)(t.Z,{className:`w-4 h-4 animate-spin text-accent`}),(0,i.jsx)(`span`,{className:`text-[12px] font-medium text-foreground/60 tracking-wide`,children:`Loading form...`})]})}):(0,o.createPortal)((0,i.jsx)(`div`,{className:`fixed inset-0 z-[100] flex items-center justify-center bg-background/10 backdrop-blur-sm`,children:(0,i.jsxs)(`div`,{className:`p-4 rounded-2xl glass-panel border border-[var(--panel-border)]/40 bg-background/80 shadow-xl flex items-center gap-3`,children:[(0,i.jsx)(t.Z,{className:`w-4 h-4 animate-spin text-accent`}),(0,i.jsx)(`span`,{className:`text-[12px] font-medium text-foreground/60 tracking-wide`,children:`Loading form...`})]})}),document.body):null;let L=(0,i.jsx)(`div`,{className:`relative z-10 w-full`,children:m===`success`?(0,i.jsxs)(t.u.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`flex flex-col items-center justify-center py-8 text-center`,children:[(0,i.jsx)(`div`,{className:`w-16 h-16 rounded-full bg-green-500/10 border border-green-500/20 flex items-center justify-center text-green-500 mb-4`,children:(0,i.jsx)(t.Dt,{className:`w-8 h-8`})}),(0,i.jsx)(`h4`,{className:`text-lg font-bold text-foreground mb-2`,children:`Message Sent!`}),(0,i.jsx)(`p`,{className:`text-[14px] text-foreground/60 leading-relaxed`,children:`Thank you for your interest. We'll get back to you shortly.`})]}):m===`loading`?(0,i.jsxs)(t.u.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,i.jsx)(t.Z,{className:`w-10 h-10 animate-spin text-accent mb-4`}),(0,i.jsx)(`h4`,{className:`text-lg font-bold text-foreground tracking-tight`,children:`Processing`}),(0,i.jsx)(`p`,{className:`text-[13px] text-foreground/50 mt-1`,children:`Please wait a moment...`})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`div`,{className:`mb-6 text-center`,children:[(0,i.jsx)(`h3`,{className:`text-2xl sm:text-3xl font-extrabold mb-2 text-foreground tracking-tight break-words`,children:D.title}),D.description&&(0,i.jsx)(`p`,{className:`text-[14px] md:text-[15px] font-medium text-foreground/60 tracking-wide leading-relaxed`,children:D.description})]}),m===`error`&&(0,i.jsxs)(t.u.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:`mb-4 p-3 sm:p-4 rounded-xl bg-red-500/10 border border-red-500/20 flex items-start gap-3`,children:[(0,i.jsx)(t.Ot,{className:`w-5 h-5 text-red-500 shrink-0 mt-0.5`}),(0,i.jsx)(`p`,{className:`text-[14px] font-medium text-red-500/90`,children:_})]}),(0,i.jsxs)(`form`,{onSubmit:P,className:`flex flex-col gap-4 sm:gap-5 w-full`,children:[[...D.fields||[]].sort((e,t)=>{let n=e.type===`checkbox`,r=t.type===`checkbox`;return n&&!r?1:!n&&r?-1:0}).map((e,r)=>{if(e.type===`tel`)return(0,i.jsx)(n.Suspense,{fallback:(0,i.jsx)(`div`,{className:`h-12 w-full glass-panel animate-pulse rounded-xl`}),children:(0,i.jsx)(S,{field:e,value:f[e.name]||``,onChange:t=>p({...f,[e.name]:t})})},r);if(e.type===`file`)return(0,i.jsx)(w,{field:e,value:f[e.name]||``,error:b[e.name],onChange:t=>{p({...f,[e.name]:t}),b[e.name]&&T(t=>{let n={...t};return delete n[e.name],n})}},r);if(e.type===`textarea`)return(0,i.jsxs)(`div`,{className:`flex flex-col w-full relative`,children:[(0,i.jsx)(`label`,{className:`text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1`,children:e.label}),(0,i.jsx)(`textarea`,{required:e.required,rows:3,placeholder:e.placeholder,value:f[e.name]||``,onChange:t=>p({...f,[e.name]:t.target.value}),className:`flex w-full rounded-xl text-[15px] text-foreground px-4 py-3 transition-all duration-300 placeholder:text-foreground/40 focus:outline-none focus:border-accent glow-focus disabled:cursor-not-allowed disabled:opacity-50 glass-panel min-h-[100px] resize-none`})]},r);if(e.type===`select`)return(0,i.jsx)(`div`,{className:`w-full`,children:(0,i.jsx)(t.s,{label:e.label,direction:`auto`,value:f[e.name]||``,options:[{value:``,label:(0,i.jsx)(`span`,{className:`text-foreground/40`,children:`Select an option...`})},...(e.options||[]).map(e=>({value:e,label:e}))],onChange:t=>p({...f,[e.name]:t})})},r);if(e.type===`checkbox`)return(0,i.jsxs)(`label`,{className:`flex items-center gap-3 w-full cursor-pointer group py-2`,children:[(0,i.jsxs)(`div`,{className:`relative flex items-center justify-center w-5 h-5 rounded border border-foreground/20 bg-background/50 group-hover:border-accent transition-colors`,children:[(0,i.jsx)(`input`,{type:`checkbox`,required:e.required,checked:!!f[e.name],onChange:t=>p({...f,[e.name]:t.target.checked}),className:`absolute opacity-0 w-full h-full cursor-pointer`}),f[e.name]&&(0,i.jsx)(`span`,{className:`w-2.5 h-2.5 bg-accent rounded-sm shrink-0`})]}),(0,i.jsx)(`span`,{className:`text-[14px] font-medium text-foreground/80 leading-snug group-hover:text-foreground transition-colors`,children:e.label})]},r);if(e.type===`date`){let n=f[e.name]||``;return(0,i.jsxs)(`div`,{className:`flex flex-col w-full relative`,children:[(0,i.jsx)(`label`,{className:`text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1`,children:e.label}),(0,i.jsxs)(`div`,{className:`relative flex items-center`,children:[(0,i.jsx)(`input`,{type:`date`,required:e.required,value:n,onChange:t=>p({...f,[e.name]:t.target.value}),className:`date-field block h-12 w-full text-[15px] pl-4 pr-11 py-2 transition-all duration-300 focus:outline-none focus:border-accent glow-focus disabled:cursor-not-allowed disabled:opacity-50 glass-panel ${n?`text-foreground`:`text-foreground/40`}`,style:{borderRadius:`var(--input-radius, 0.75rem)`}}),(0,i.jsx)(t.Ft,{className:`w-4 h-4 text-foreground/50 absolute right-4 pointer-events-none`})]})]},r)}return e.type===`age`?(0,i.jsx)(y,{label:e.label,required:e.required,type:`number`,min:0,max:120,placeholder:e.placeholder||`Age (Max 120)`,value:f[e.name]||``,onChange:t=>{let n=t.target.value;if(n===``)p({...f,[e.name]:``});else{let t=Math.max(0,Math.min(120,parseInt(n,10)));p({...f,[e.name]:isNaN(t)?``:String(t)})}}},r):e.type===`currency`||e.type===`number`&&e.name===`budget`?(0,i.jsxs)(`div`,{className:`flex flex-col w-full relative`,children:[(0,i.jsx)(`label`,{className:`text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1`,children:e.label}),(0,i.jsxs)(`div`,{className:`relative flex items-center justify-center`,children:[(0,i.jsx)(`span`,{className:`absolute left-4 text-foreground/70 font-bold flex items-center h-full z-10 pointer-events-none text-[15px]`,children:e.currencySymbol||`$`}),(0,i.jsx)(`input`,{required:e.required,type:`number`,placeholder:e.placeholder,value:f[e.name]||``,onChange:t=>p({...f,[e.name]:t.target.value}),className:`block h-12 w-full text-[15px] text-foreground pl-8 pr-4 py-2 transition-all duration-300 placeholder:text-foreground/40 focus:outline-none focus:border-accent glow-focus disabled:cursor-not-allowed disabled:opacity-50 glass-panel`,style:{borderRadius:`var(--input-radius, 0.75rem)`}})]})]},r):(0,i.jsx)(y,{label:e.label,required:e.required,type:e.type,placeholder:e.placeholder,currencySymbol:e.currencySymbol,error:b[e.name],value:f[e.name]||``,onChange:t=>{p({...f,[e.name]:t.target.value}),b[e.name]&&T(t=>{let n={...t};return delete n[e.name],n})}},r)}),(0,i.jsx)(`div`,{className:`pt-2`,children:(0,i.jsx)(x,{type:`submit`,className:`w-full px-6 md:px-8 py-3 md:py-3.5 rounded-xl font-semibold tracking-wide btn-primary text-[15px] shadow-xl transition-all duration-300 hover:-translate-y-1 active:scale-95 flex items-center justify-center`,isLoading:!1,children:D.submitText||D.buttonName||`Submit`})})]})]})});return d?(0,i.jsxs)(`div`,{className:`w-full flex justify-center flex-col items-center`,children:[(0,i.jsx)(`div`,{className:`w-full max-w-[500px] mb-6 px-2`,children:(0,i.jsxs)(`button`,{onClick:()=>window.history.back(),className:`flex items-center gap-2 text-foreground/40 hover:text-foreground font-medium transition-colors w-fit group`,children:[(0,i.jsx)(t.Vt,{className:`w-4 h-4 group-hover:-translate-x-1 transition-transform`}),`Go Back`]})}),(0,i.jsxs)(t.u.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`w-full max-w-[500px] p-6 sm:p-8 lg:p-10 rounded-3xl md:rounded-3xl glass-form relative glow-hover shadow-[0_8px_32px_rgba(0,0,0,0.08)] z-10 mx-auto`,children:[(0,i.jsx)(`div`,{className:`absolute -inset-[1px] bg-gradient-to-br from-[var(--primary-glow)] to-transparent opacity-30 blur-[20px] rounded-3xl md:rounded-3xl -z-10`}),L]})]}):(0,o.createPortal)((0,i.jsxs)(`div`,{className:`fixed inset-0 z-[100] flex items-start justify-center p-4 py-20 md:py-10 h-[-webkit-fill-available] md:h-screen w-screen overflow-y-auto no-scrollbar`,children:[(0,i.jsx)(t.u.div,{onClick:e,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:`fixed inset-0 bg-background/60 backdrop-blur-xl cursor-pointer`}),(0,i.jsxs)(t.u.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},ref:E,className:`w-full max-w-[500px] p-6 sm:p-8 lg:p-10 rounded-3xl md:rounded-3xl glass-popover relative shadow-[0_8px_32px_rgba(0,0,0,0.08)] z-10 mx-auto my-auto border border-[var(--panel-border)] shrink-0`,children:[(0,i.jsx)(`div`,{className:`absolute -inset-[1px] bg-gradient-to-br from-[var(--primary-glow)] to-transparent opacity-30 blur-[20px] rounded-3xl md:rounded-3xl -z-10`}),L]})]}),document.body)}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return s}});
|
|
@@ -149,7 +149,7 @@ function K({ children: e, scopeSelector: t }) {
|
|
|
149
149
|
theme: s,
|
|
150
150
|
setTheme: (e) => o(e),
|
|
151
151
|
toggleTheme: () => {
|
|
152
|
-
o(
|
|
152
|
+
o(s === "light" ? "dark" : "light");
|
|
153
153
|
},
|
|
154
154
|
isSystem: i === "system",
|
|
155
155
|
setIsSystem: (e) => o(e ? "system" : s),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-DYteiM-1.cjs`);const e=require(`./SetupPayments-D5N6MZaU.cjs`);exports.EmailSetupSteps=e.t,exports.StripeSetupSteps=e.r;
|