@bailierich/booking-components 2.1.1 → 2.1.2

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';var jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react'),Ge=require('react'),framerMotion=require('framer-motion'),supabaseJs=require('@supabase/supabase-js'),reactDom=require('react-dom');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Ge__default=/*#__PURE__*/_interopDefault(Ge);function tn({logoUrl:e,fallbackText:t,size:r="medium",alignment:a="center",colors:o,enableInlineEditing:i=false,sectionId:n=""}){let l={small:80,medium:120,large:160}[r];return jsxRuntime.jsx("div",{className:`container mx-auto px-4 flex ${a==="center"?"justify-center":a==="right"?"justify-end":"justify-start"}`,children:e?jsxRuntime.jsx("img",{src:e,alt:t||"Logo",className:"object-contain",style:{height:`${l}px`,width:"auto"}}):t?jsxRuntime.jsx("div",{className:"flex items-center justify-center rounded-full font-bold",style:{width:`${l}px`,height:`${l}px`,backgroundColor:o.primary,color:"#FFFFFF",fontSize:`${l*.4}px`},children:t.slice(0,2).toUpperCase()}):jsxRuntime.jsx("div",{className:"rounded-full",style:{width:`${l}px`,height:`${l}px`,backgroundColor:o.primary,opacity:.2}})})}function nn({name:e,title:t,bio:r,showName:a=true,showTitle:o=true,showBio:i=true,colors:n,typography:s,enableInlineEditing:l=false,sectionId:c=""}){return jsxRuntime.jsxs("div",{className:"container mx-auto px-4 text-center",children:[a&&jsxRuntime.jsx("h1",{className:"text-4xl font-bold mb-3",style:{fontFamily:s.headingFont,color:n.text},...l&&{"data-editable":true,"data-section-id":c,"data-field-path":"settings.name"},children:e||"Your Name"}),o&&jsxRuntime.jsx("p",{className:"text-lg opacity-80 mb-2",...l&&{"data-editable":true,"data-section-id":c,"data-field-path":"settings.title"},children:t||"Beauty Professional"}),i&&jsxRuntime.jsx("p",{className:"text-base opacity-70 max-w-md mx-auto",...l&&{"data-editable":true,"data-section-id":c,"data-field-path":"settings.bio"},children:r||"Transform your look \u2728"})]})}function on({text:e,url:t,style:r="gradient",size:a="large",colors:o,enableInlineEditing:i=false,sectionId:n=""}){let s=()=>{let c="";switch(a){case "small":c="p-3 text-base";break;case "medium":c="p-4 text-lg";break;case "large":c="p-5 text-xl";break;default:c="p-5 text-xl";}let d="";switch(r){case "gradient":d="rounded-full";break;case "solid":d="rounded-lg";break;case "outline":d="rounded-full border-2";break;default:d="rounded-full";}return `block max-w-2xl mx-auto ${c} ${d} text-center font-semibold transition-all hover:scale-105 hover:shadow-xl`},l=()=>{switch(r){case "gradient":return {background:`linear-gradient(135deg, ${o.primary} 0%, ${o.secondary} 100%)`,color:"#FFFFFF"};case "solid":return {backgroundColor:o.primary,color:"#FFFFFF"};case "outline":return {backgroundColor:"transparent",borderColor:o.primary,color:o.primary};default:return {backgroundColor:o.primary,color:"#FFFFFF"}}};return jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsx("a",{href:t||"/book",className:s(),style:l(),...i&&{"data-editable":true,"data-section-id":n,"data-field-path":"settings.text"},children:e||"\u{1F485} Book Now"})})}function sn({links:e,style:t="pill",colors:r,enableInlineEditing:a=false,sectionId:o=""}){let i=()=>{let s="block w-full p-4 text-center font-medium transition-all hover:scale-105";switch(t){case "pill":return `${s} rounded-full`;case "square":return `${s} rounded-md`;case "outline":return `${s} rounded-full border-2`;default:return `${s} rounded-lg`}},n=s=>s?{backgroundColor:"transparent",borderColor:r.primary,color:r.primary}:{backgroundColor:r.linkBackground||r.primary,color:r.linkText||"#FFFFFF"};return jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsx("div",{className:"max-w-2xl mx-auto space-y-3",children:e.map((s,l)=>jsxRuntime.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:i(),style:n(t==="outline"),...a&&{"data-editable":true,"data-section-id":o,"data-field-path":`settings.links.${l}.label`},children:s.label},s.id))})})}function ln({platforms:e,socialLinks:t={},style:r="filled",size:a="large",position:o="center",invertIcons:i=false,colors:n,enableInlineEditing:s=false,sectionId:l=""}){let c=g=>{let b=g.replace("#",""),v=parseInt(b.substr(0,2),16),w=parseInt(b.substr(2,2),16),f=parseInt(b.substr(4,2),16);return (.299*v+.587*w+.114*f)/255>.5?"#000000":"#FFFFFF"},d=g=>{let b=a==="small"?20:a==="medium"?24:28;switch(g){case "instagram":return jsxRuntime.jsx(lucideReact.Instagram,{size:b});case "facebook":return jsxRuntime.jsx(lucideReact.Facebook,{size:b});case "tiktok":return jsxRuntime.jsx(lucideReact.Music,{size:b});case "twitter":return jsxRuntime.jsx(lucideReact.Twitter,{size:b});case "youtube":return jsxRuntime.jsx(lucideReact.Youtube,{size:b});case "pinterest":return jsxRuntime.jsx(lucideReact.PinIcon,{size:b});default:return jsxRuntime.jsx(lucideReact.Instagram,{size:b})}},u=()=>{let g="";switch(a){case "small":g="w-10 h-10 text-lg";break;case "medium":g="w-12 h-12 text-xl";break;case "large":g="w-14 h-14 text-2xl";break;default:g="w-14 h-14 text-2xl";}let b="";switch(r){case "filled":b="rounded-full";break;case "outline":b="rounded-full border-2";break;case "ghost":b="rounded-full";break;default:b="rounded-full";}return `${g} ${b} flex items-center justify-center hover:scale-110 transition-transform`},p=()=>{switch(r){case "filled":return {backgroundColor:n.primary,color:c(n.primary||"#BCB4FF")};case "outline":return {backgroundColor:"transparent",borderColor:n.primary,color:n.primary};case "ghost":return {backgroundColor:"rgba(0,0,0,0.05)",color:n.primary};default:return {backgroundColor:n.primary,color:c(n.primary||"#BCB4FF")}}};return o==="left-vertical"||o==="right-vertical"?jsxRuntime.jsx("div",{className:`fixed top-6 z-40 flex flex-col gap-3 ${o==="left-vertical"?"left-4":"right-4"}`,children:e.map(g=>{let b=t[g]||`https://${g}.com/`;return jsxRuntime.jsx("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:u(),style:{...p(),filter:i?"invert(1)":"none"},title:g.charAt(0).toUpperCase()+g.slice(1),children:d(g)},g)})}):jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-8 text-center",children:jsxRuntime.jsx("div",{className:"flex items-center justify-center gap-4",children:e.map(g=>{let b=t[g]||`https://${g}.com/`;return jsxRuntime.jsx("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:u(),style:{...p(),filter:i?"invert(1)":"none"},title:g.charAt(0).toUpperCase()+g.slice(1),children:d(g)},g)})})})}function cn({headline:e,subheadline:t,heroImage:r,ctaButton:a,layout:o="split",imagePosition:i="right",contentDisplay:n="side",colors:s,typography:l,enableInlineEditing:c=false,sectionId:d=""}){let u=jsxRuntime.jsxs("div",{className:o==="full"?"text-center max-w-4xl z-10":"text-left",children:[jsxRuntime.jsx("h1",{className:o==="full"?"text-5xl md:text-6xl font-bold mb-6":"text-5xl font-bold mb-4",style:{fontFamily:l.headingFont,color:o==="full"&&r?"#FFFFFF":s.text,textShadow:o==="full"&&r?"0 2px 10px rgba(0,0,0,0.3)":"none"},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.headline"},children:e||"Welcome"}),t&&jsxRuntime.jsx("p",{className:o==="full"?"text-xl md:text-2xl opacity-90 mb-12":"text-xl opacity-80 mb-8",style:{color:o==="full"&&r?"#FFFFFF":s.text,textShadow:o==="full"&&r?"0 2px 10px rgba(0,0,0,0.3)":"none"},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.subheadline"},children:t}),a&&jsxRuntime.jsx("a",{href:a.url||"#",className:"inline-block px-8 py-4 rounded-lg font-semibold text-lg transition-all hover:scale-105 shadow-lg",style:{backgroundColor:s.primary,color:"#FFFFFF"},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.ctaButton.text"},children:a.text||"Get Started"})]}),p=r?jsxRuntime.jsx("div",{className:"w-full h-full rounded-2xl overflow-hidden",children:jsxRuntime.jsx("img",{src:r,alt:e||"Hero",className:"w-full h-full object-cover"})}):jsxRuntime.jsx("div",{className:"w-full h-full rounded-2xl flex items-center justify-center",style:{backgroundColor:s.primary,opacity:.1},children:jsxRuntime.jsx("span",{className:"text-sm opacity-50",children:"Add hero image"})});return o==="full"?jsxRuntime.jsxs("div",{className:"relative py-20 md:py-24 px-4 flex items-center justify-center",style:{backgroundImage:r?`url(${r})`:"none",backgroundSize:"cover",backgroundPosition:"center",backgroundColor:r?"transparent":s.primary,opacity:r?1:.1},children:[r&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-black/40"}),u]}):n==="overlay"?jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:"relative max-w-6xl mx-auto rounded-2xl overflow-hidden",style:{height:"500px"},children:[r?jsxRuntime.jsx("img",{src:r,alt:e||"Hero",className:"absolute inset-0 w-full h-full object-cover"}):jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backgroundColor:s.primary,opacity:.1}}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-black/60 to-black/20"}),jsxRuntime.jsx("div",{className:`relative h-full flex items-center ${i==="left"?"justify-end":"justify-start"} px-12`,children:jsxRuntime.jsx("div",{className:"max-w-lg",style:{color:"#FFFFFF",textShadow:"0 2px 10px rgba(0,0,0,0.3)"},children:u})})]})}):jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center max-w-6xl mx-auto",children:[i==="left"&&jsxRuntime.jsx("div",{className:"aspect-[4/3]",children:p}),jsxRuntime.jsx("div",{children:u}),i==="right"&&jsxRuntime.jsx("div",{className:"aspect-[4/3]",children:p})]})})}function dn({title:e,content:t,image:r,layout:a="centered",colors:o,typography:i,enableInlineEditing:n=false,sectionId:s=""}){return a==="centered"?jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[jsxRuntime.jsx("h2",{className:"text-3xl font-bold mb-6",style:{fontFamily:i.headingFont,color:o.text},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.title"},children:e||"About Us"}),jsxRuntime.jsx("p",{className:"text-lg opacity-80",...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.content"},children:t||"Tell your story here..."})]})}):a==="split"?jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:"max-w-6xl mx-auto grid md:grid-cols-2 gap-12 items-center",children:[jsxRuntime.jsx("div",{className:"aspect-square rounded-2xl overflow-hidden",children:r?jsxRuntime.jsx("img",{src:r,alt:e||"About",className:"w-full h-full object-cover"}):jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{backgroundColor:o.primary,opacity:.2},children:jsxRuntime.jsx("span",{className:"text-sm opacity-50",children:"Add image"})})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:"text-3xl font-bold mb-6",style:{fontFamily:i.headingFont,color:o.text},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.title"},children:e||"About Us"}),jsxRuntime.jsx("p",{className:"text-lg opacity-80 leading-relaxed",...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.content"},children:t||"Tell your story here..."})]})]})}):jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-4xl font-bold mb-8 text-left",style:{fontFamily:i.headingFont,color:o.text},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.title"},children:e||"About Us"}),jsxRuntime.jsx("p",{className:"text-xl opacity-80 leading-relaxed columns-2 gap-12",...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.content"},children:t||"Tell your story here..."})]})})}function un({title:e,services:t=[],layout:r="grid",columns:a=3,showPrices:o=true,showDuration:i=true,colors:n,typography:s,enableInlineEditing:l=false,sectionId:c=""}){let d={2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},u=t.length>0?t:[{id:1,name:"Haircut & Style",description:"Professional cut and styling",price:75,duration:60},{id:2,name:"Color Treatment",description:"Full color or highlights",price:150,duration:120},{id:3,name:"Deep Conditioning",description:"Restorative treatment",price:50,duration:45}],p=()=>{switch(r){case "grid":return `grid ${d[a]} gap-8`;case "list":return "flex flex-col gap-4 max-w-3xl mx-auto";case "carousel":return "flex overflow-x-auto snap-x gap-6 pb-4";default:return `grid ${d[a]} gap-8`}};return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:s.headingFont,color:n.text},...l&&{"data-editable":true,"data-section-id":c,"data-field-path":"settings.title"},children:e||"Our Services"}),jsxRuntime.jsx("div",{className:p(),children:u.map(g=>jsxRuntime.jsxs("div",{className:`p-6 rounded-lg border hover:scale-105 transition-transform shadow-lg ${r==="carousel"?"snap-center flex-shrink-0 w-80":""} ${r==="list"?"flex items-center gap-6":""}`,style:{backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:`${n.primary}20`},children:[r==="list"&&jsxRuntime.jsx("div",{className:"flex-shrink-0 w-24 h-24 rounded-lg",style:{backgroundColor:n.primary,opacity:.2}}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("h3",{className:"text-xl font-semibold mb-3",style:{color:"#1a1a1a"},children:g.name}),jsxRuntime.jsx("p",{className:"text-sm opacity-80 mb-4",style:{color:"#333333"},children:g.description}),jsxRuntime.jsxs("div",{className:`flex ${r==="list"?"gap-4":"justify-between"} items-center`,children:[o&&jsxRuntime.jsxs("p",{className:"font-bold text-lg",style:{color:n.primary},children:["$",g.price]}),i&&jsxRuntime.jsxs("p",{className:"text-sm opacity-70",style:{color:"#666666"},children:[g.duration," min"]})]})]})]},g.id))})]})})}function mn({title:e,images:t=[],columns:r=3,colors:a,typography:o,enableInlineEditing:i=false,sectionId:n=""}){let s={2:"grid-cols-2",3:"grid-cols-2 md:grid-cols-3",4:"grid-cols-2 md:grid-cols-4"},l=t.length>0?t:[1,2,3,4,5,6].map(c=>({id:c,url:void 0}));return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:o.headingFont,color:a.text},...i&&{"data-editable":true,"data-section-id":n,"data-field-path":"settings.title"},children:e||"Gallery"}),jsxRuntime.jsx("div",{className:`grid ${s[r]} gap-4`,children:l.map((c,d)=>jsxRuntime.jsx("div",{className:"relative aspect-square overflow-hidden rounded-lg group",children:c.url?jsxRuntime.jsx("img",{src:c.url,alt:c.alt||"",className:"w-full h-full object-cover transition-transform group-hover:scale-110"}):jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center transition-transform group-hover:scale-110",style:{backgroundColor:a.primary,opacity:.2},children:jsxRuntime.jsx("span",{className:"text-sm opacity-50",children:"Add image"})})},c.id||d))})]})})}function gn({title:e,testimonials:t=[],layout:r="grid",colors:a,typography:o,enableInlineEditing:i=false,sectionId:n=""}){let s=r==="carousel"?"flex overflow-x-auto snap-x gap-6 pb-4":"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",l=t.length>0?t:[{id:1,text:"Amazing service! I love my new look.",author:"Sarah M.",rating:5},{id:2,text:"Professional and friendly staff.",author:"Jessica L.",rating:5},{id:3,text:"Best salon in town!",author:"Emily R.",rating:5}];return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:o.headingFont,color:a.text},...i&&{"data-editable":true,"data-section-id":n,"data-field-path":"settings.title"},children:e||"What Our Clients Say"}),jsxRuntime.jsx("div",{className:s,children:l.map(c=>jsxRuntime.jsxs("div",{className:`p-6 rounded-lg bg-white/10 backdrop-blur-sm ${r==="carousel"?"snap-center flex-shrink-0 w-80":""}`,children:[jsxRuntime.jsx("div",{className:"flex gap-1 mb-4",children:[...Array(5)].map((d,u)=>jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:u<c.rating?a.primary||"#8B5CF6":"#E5E7EB",viewBox:"0 0 20 20",children:jsxRuntime.jsx("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})},u))}),jsxRuntime.jsxs("p",{className:"mb-4 italic",style:{color:a.text},children:['"',c.text,'"']}),jsxRuntime.jsx("p",{className:"font-semibold",style:{color:a.text},children:c.author})]},c.id))})]})})}function fn({title:e,members:t=[],colors:r,typography:a,enableInlineEditing:o=false,sectionId:i=""}){let n=t.length>0?t:[{id:1,name:"Sarah Johnson",role:"Master Stylist",bio:"Expert in color and styling with 10+ years experience"},{id:2,name:"Michael Chen",role:"Senior Stylist",bio:"Specializing in precision cuts and modern styles"},{id:3,name:"Emma Davis",role:"Stylist",bio:"Passionate about creating beautiful transformations"}];return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:a.headingFont,color:r.text},...o&&{"data-editable":true,"data-section-id":i,"data-field-path":"settings.title"},children:e||"Meet Our Team"}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:n.map(s=>jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("div",{className:"w-32 h-32 rounded-full mx-auto mb-4",style:{backgroundColor:r.primary,opacity:.2}}),jsxRuntime.jsx("h3",{className:"text-xl font-semibold mb-2",style:{color:r.text},children:s.name}),jsxRuntime.jsx("p",{className:"text-sm mb-3",style:{color:r.primary},children:s.role}),jsxRuntime.jsx("p",{className:"text-sm opacity-80",style:{color:r.text},children:s.bio})]},s.id))})]})})}function yn({title:e,email:t="contact@example.com",phone:r="(555) 123-4567",address:a="123 Main Street, City, State 12345",showForm:o=true,colors:i,typography:n,enableInlineEditing:s=false,sectionId:l=""}){return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:n.headingFont,color:i.text},...s&&{"data-editable":true,"data-section-id":l,"data-field-path":"settings.title"},children:e||"Get In Touch"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12",children:[jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:i.primary},children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),jsxRuntime.jsx("span",{style:{color:i.text},children:t})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:i.primary},children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})}),jsxRuntime.jsx("span",{style:{color:i.text},children:r})]}),jsxRuntime.jsxs("div",{className:"flex items-start gap-4",children:[jsxRuntime.jsxs("svg",{className:"w-6 h-6 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:i.primary},children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),jsxRuntime.jsx("span",{style:{color:i.text},children:a})]})]}),o&&jsxRuntime.jsxs("form",{className:"space-y-4",children:[jsxRuntime.jsx("input",{type:"text",placeholder:"Name",className:"w-full px-4 py-3 rounded-lg bg-white/10 backdrop-blur-sm border border-white/20",style:{color:i.text}}),jsxRuntime.jsx("input",{type:"email",placeholder:"Email",className:"w-full px-4 py-3 rounded-lg bg-white/10 backdrop-blur-sm border border-white/20",style:{color:i.text}}),jsxRuntime.jsx("textarea",{placeholder:"Message",rows:4,className:"w-full px-4 py-3 rounded-lg bg-white/10 backdrop-blur-sm border border-white/20",style:{color:i.text}}),jsxRuntime.jsx("button",{type:"submit",className:"w-full px-6 py-3 rounded-lg font-semibold transition-all hover:scale-105",style:{backgroundColor:i.primary,color:"#FFFFFF"},children:"Send Message"})]})]})]})})}function bn({brandName:e,logoUrl:t,style:r="both",alignment:a="left",sticky:o=true,colors:i,typography:n,enableInlineEditing:s=false,sectionId:l=""}){let c=a==="center"?"justify-center":a==="right"?"justify-end":"justify-start";return jsxRuntime.jsx("header",{className:`${o?"sticky top-0 z-50 backdrop-blur-sm":""} border-b`,style:{backgroundColor:o?"rgba(255, 255, 255, 0.8)":"transparent",borderColor:i.primary},children:jsxRuntime.jsx("div",{className:`container mx-auto px-4 py-4 flex items-center ${c}`,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[(r==="logo"||r==="both")&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:t?jsxRuntime.jsx("img",{src:t,alt:e||"Logo",className:"h-10 w-auto object-contain"}):jsxRuntime.jsx("div",{className:"w-10 h-10 rounded-full",style:{backgroundColor:i.primary,opacity:.2}})}),(r==="text"||r==="both"||!r)&&jsxRuntime.jsx("h1",{className:"text-2xl font-bold",style:{fontFamily:n.headingFont,color:i.text},...s&&{"data-editable":true,"data-section-id":l,"data-field-path":"settings.brandName"},children:e||"Your Brand"})]})})})}function xn({links:e,style:t="horizontal",colors:r,enableInlineEditing:a=false,sectionId:o=""}){let i=(n,s)=>{if(s.startsWith("#")){n.preventDefault();let l=s.substring(1),c=document.querySelector(`[data-section-id="${l}"]`);c&&c.scrollIntoView({behavior:"smooth",block:"start"});}};return jsxRuntime.jsx("nav",{className:"container mx-auto px-4 py-4",children:jsxRuntime.jsx("div",{className:`flex ${t==="vertical"?"flex-col space-y-2":"flex-row space-x-6 justify-center"}`,children:e.map((n,s)=>jsxRuntime.jsx("a",{href:n.url,onClick:l=>i(l,n.url),className:"text-base font-medium transition-colors hover:opacity-70",style:{color:r.text},...n.linkType==="external"&&!n.url.startsWith("#")?{target:"_blank",rel:"noopener noreferrer"}:{},...a&&{"data-editable":true,"data-section-id":o,"data-field-path":`settings.links.${s}.label`},children:n.label},n.id))})})}function vn({footerText:e,alignment:t="center",showSocial:r=true,showContact:a=true,showLinks:o=true,colors:i,enableInlineEditing:n=false,sectionId:s=""}){let l=t==="center"?"text-center":t==="right"?"text-right":"text-left";return jsxRuntime.jsx("footer",{className:"border-t py-8",style:{borderColor:i.primary},children:jsxRuntime.jsx("div",{className:`container mx-auto px-4 ${l}`,children:jsxRuntime.jsxs("div",{className:"space-y-4",children:[r&&jsxRuntime.jsx("div",{className:`flex gap-4 ${t==="center"?"justify-center":t==="right"?"justify-end":"justify-start"}`,children:["instagram","facebook","twitter"].map(c=>jsxRuntime.jsx("a",{href:`https://${c}.com/`,className:"w-8 h-8 rounded-full flex items-center justify-center transition-transform hover:scale-110",style:{backgroundColor:i.primary,color:"#FFFFFF"},children:c[0].toUpperCase()},c))}),a&&jsxRuntime.jsx("div",{className:"text-sm opacity-70",style:{color:i.text},children:jsxRuntime.jsx("p",{children:"contact@example.com | (555) 123-4567"})}),o&&jsxRuntime.jsxs("div",{className:`flex gap-4 text-sm ${t==="center"?"justify-center":t==="right"?"justify-end":"justify-start"}`,children:[jsxRuntime.jsx("a",{href:"/privacy",className:"hover:opacity-70",style:{color:i.text},children:"Privacy"}),jsxRuntime.jsx("a",{href:"/terms",className:"hover:opacity-70",style:{color:i.text},children:"Terms"})]}),jsxRuntime.jsx("p",{className:"text-sm opacity-60",style:{color:i.text},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.footerText"},children:e||"\xA9 2025 Your Business"})]})})})}function wn({headline:e,description:t,image:r,buttonText:a,buttonUrl:o,layout:i="image-right",showButton:n=true,colors:s,typography:l,enableInlineEditing:c=false,sectionId:d=""}){let u=jsxRuntime.jsx("div",{className:"w-full h-full aspect-video rounded-lg overflow-hidden bg-gray-100",children:r?jsxRuntime.jsx("img",{src:r,alt:e||"Feature image",className:"w-full h-full object-cover"}):jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{backgroundColor:s.primary,opacity:.2},children:jsxRuntime.jsx("span",{className:"text-sm opacity-50",children:"Add image"})})}),p=jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h2",{className:"text-3xl font-bold",style:{fontFamily:l.headingFont,color:s.text},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.headline"},children:e||"Feature Headline"}),jsxRuntime.jsx("p",{className:"text-lg opacity-80",style:{color:s.text},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.description"},children:t||"Feature description goes here..."}),n&&jsxRuntime.jsx("a",{href:o||"#",className:"inline-block px-6 py-3 rounded-lg font-semibold transition-all hover:scale-105",style:{backgroundColor:s.primary,color:"#FFFFFF"},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.buttonText"},children:a||"Learn More"})]});return jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:`grid md:grid-cols-2 gap-12 items-center ${i==="image-top"?"grid-cols-1":""}`,children:[i==="image-left"&&u,p,i==="image-right"&&u,i==="image-top"&&u]})})}function Cn({title:e,comparisons:t=[],colors:r,typography:a,enableInlineEditing:o=false,sectionId:i=""}){let n=t.length>0?t:[{id:1,title:"Hair Transformation",beforeImage:"",afterImage:""}];return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:a.headingFont,color:r.text},...o&&{"data-editable":true,"data-section-id":i,"data-field-path":"settings.title"},children:e||"Results"}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:n.map((s,l)=>jsxRuntime.jsxs("div",{className:"space-y-4",children:[s.title&&jsxRuntime.jsx("h3",{className:"text-xl font-semibold text-center",style:{color:r.text},children:s.title}),jsxRuntime.jsxs("div",{className:"relative aspect-[4/3] rounded-lg overflow-hidden",children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backgroundColor:r.primary,opacity:.1}}),jsxRuntime.jsx("div",{className:"absolute top-4 left-4 bg-black/50 text-white px-3 py-1 rounded text-sm",children:"Before"}),jsxRuntime.jsx("div",{className:"absolute top-4 right-4 bg-black/50 text-white px-3 py-1 rounded text-sm",children:"After"})]})]},s.id||l))})]})})}function Sn({title:e,plans:t=[],colors:r,typography:a,enableInlineEditing:o=false,sectionId:i=""}){let n=t.length>0?t:[{id:1,name:"Basic",price:50,features:["Service 1","Service 2"]},{id:2,name:"Premium",price:100,features:["Service 1","Service 2","Service 3"],featured:true},{id:3,name:"Deluxe",price:150,features:["All Services","Priority Booking"]}];return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:a.headingFont,color:r.text},...o&&{"data-editable":true,"data-section-id":i,"data-field-path":"settings.title"},children:e||"Pricing"}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:n.map(s=>jsxRuntime.jsxs("div",{className:`p-8 rounded-lg border-2 ${s.featured?"scale-105 shadow-xl":""}`,style:{borderColor:s.featured?r.primary:"rgba(255,255,255,0.1)",backgroundColor:s.featured?`${r.primary}15`:"rgba(255,255,255,0.05)"},children:[jsxRuntime.jsx("h3",{className:"text-2xl font-bold mb-2 text-center",style:{color:r.text},children:s.name}),jsxRuntime.jsx("div",{className:"text-center mb-6",children:jsxRuntime.jsxs("span",{className:"text-4xl font-bold",style:{color:r.primary},children:["$",s.price]})}),jsxRuntime.jsx("ul",{className:"space-y-3 mb-6",children:s.features.map((l,c)=>jsxRuntime.jsxs("li",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:r.primary},children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),jsxRuntime.jsx("span",{style:{color:r.text},children:l})]},c))}),jsxRuntime.jsx("button",{className:"w-full px-6 py-3 rounded-lg font-semibold transition-all hover:scale-105",style:{backgroundColor:s.featured?r.primary:"rgba(255,255,255,0.1)",color:s.featured?"#FFFFFF":r.text},children:"Choose Plan"})]},s.id))})]})})}function Fn({username:e,colors:t,enableInlineEditing:r=false,sectionId:a=""}){return jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-8",children:jsxRuntime.jsxs("div",{className:"max-w-4xl mx-auto",children:[jsxRuntime.jsxs("p",{className:"text-center text-sm opacity-60 mb-4",children:["Instagram Feed: ",e||"@handle"]}),jsxRuntime.jsx("div",{className:"grid grid-cols-3 gap-1",children:[1,2,3,4,5,6].map(o=>jsxRuntime.jsx("div",{className:"aspect-square rounded",style:{backgroundColor:t.primary,opacity:.2}},o))})]})})}function In({name:e,subheading:t,bio:r,links:a=[],bookingButtonText:o,bookingButtonUrl:i,showBookingButton:n=true,position:s="bottom-left",cardWidth:l="medium",cardColor:c="#FFFFFF",colors:d,typography:u,enableInlineEditing:p=false,sectionId:g=""}){let b=(N,C)=>{let h=parseInt(N.slice(1,3),16),k=parseInt(N.slice(3,5),16),S=parseInt(N.slice(5,7),16);return `rgba(${h}, ${k}, ${S}, ${C})`},v={small:"280px",medium:"320px",large:"400px"},w={"bottom-left":"bottom-0 left-0","bottom-right":"bottom-0 right-0","bottom-center":"bottom-0 left-1/2 -translate-x-1/2"},f=s==="bottom-left"?"text-left":s==="bottom-right"?"text-right":"text-center",x=s==="bottom-left"?"justify-start":s==="bottom-right"?"justify-end":"justify-center",y=()=>s==="bottom-left"?"rounded-tr-3xl rounded-tl-none":s==="bottom-right"?"rounded-tl-3xl rounded-tr-none":"rounded-t-3xl";return jsxRuntime.jsx("div",{className:`fixed z-50 ${w[s]}`,style:{width:v[l]},children:jsxRuntime.jsxs("div",{className:`${y()} shadow-2xl border-t border-x`,style:{backgroundColor:b(c,.9),borderColor:b(c,.3),boxShadow:"0 -10px 40px rgba(0, 0, 0, 0.1)"},children:[jsxRuntime.jsx("div",{className:`px-8 pt-8 pb-3 ${f}`,children:jsxRuntime.jsx("h3",{className:"text-2xl font-bold",style:{fontFamily:u.headingFont,color:d.text},...p&&{"data-editable":true,"data-section-id":g,"data-field-path":"settings.name"},children:e||"Your Name"})}),jsxRuntime.jsx("div",{className:"mb-6",children:t?jsxRuntime.jsxs("div",{className:`flex items-center gap-3 px-8 ${x}`,children:[jsxRuntime.jsx("span",{className:"text-xs font-medium whitespace-nowrap",style:{color:d.primary},...p&&{"data-editable":true,"data-section-id":g,"data-field-path":"settings.subheading"},children:t}),jsxRuntime.jsx("div",{className:"flex-1 h-px",style:{backgroundColor:d.primary,opacity:.3}})]}):jsxRuntime.jsx("div",{className:"w-full h-px",style:{backgroundColor:d.primary,opacity:.3}})}),jsxRuntime.jsxs("div",{className:`px-8 pb-8 ${f}`,children:[jsxRuntime.jsx("p",{className:"text-sm opacity-80 mb-4",style:{color:d.text},...p&&{"data-editable":true,"data-section-id":g,"data-field-path":"settings.bio"},children:r||"Transforming beauty, one client at a time \u2728"}),a.length>0&&jsxRuntime.jsx("div",{className:"space-y-2 mb-4",children:a.map((N,C)=>jsxRuntime.jsx("a",{href:N.url,target:"_blank",rel:"noopener noreferrer",className:"block text-sm font-medium hover:opacity-70 transition-opacity",style:{color:d.primary},...p&&{"data-editable":true,"data-section-id":g,"data-field-path":`settings.links.${C}.label`},children:N.label},N.id))}),n&&jsxRuntime.jsx("a",{href:i||"/book",className:"block w-full py-3 px-4 rounded-xl text-center font-semibold transition-all hover:scale-105 hover:shadow-lg",style:{backgroundColor:d.primary,color:d.buttonText||"#FFFFFF"},...p&&{"data-editable":true,"data-section-id":g,"data-field-path":"settings.bookingButtonText"},children:o||"Book Appointment"})]})]})})}function En({config:e,colors:t,BookingFlowComponent:r,enableInlineEditing:a=false,sectionId:o=""}){return r?jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsx(r,{config:e,colors:t})}):jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsx("div",{className:"max-w-4xl mx-auto text-center",children:jsxRuntime.jsxs("div",{className:"p-12 rounded-2xl border-2 border-dashed",style:{borderColor:t.primary,opacity:.5},children:[jsxRuntime.jsx("div",{className:"text-6xl mb-4",children:"\u{1F4C5}"}),jsxRuntime.jsx("h3",{className:"text-2xl font-bold mb-3",style:{color:t.text},children:"Booking Flow"}),jsxRuntime.jsx("p",{className:"text-base opacity-70",style:{color:t.text},children:"Pass a BookingFlowComponent prop to render your custom booking flow here."})]})})})}function Rn({videoUrl:e,aspectRatio:t="16:9",autoplay:r=false,loop:a=false,muted:o=true,controls:i=true,allowFullScreen:n=true,coverImage:s,maxWidth:l="large",alignment:c="center",borderRadius:d=12,colors:u,enableInlineEditing:p=false,sectionId:g=""}){let v=(y=>{let N=y.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]+)/);if(N){let h=N[1],k=new URLSearchParams({...r?{autoplay:"1"}:{},...a?{loop:"1",playlist:h}:{},...o?{mute:"1"}:{},...i?{}:{controls:"0"}});return {type:"youtube",embedUrl:`https://www.youtube.com/embed/${h}?${k.toString()}`}}let C=y.match(/(?:vimeo\.com\/)(\d+)/);if(C){let h=C[1],k=new URLSearchParams({...r?{autoplay:"1"}:{},...a?{loop:"1"}:{},...o?{muted:"1"}:{},...i?{}:{controls:"0"}});return {type:"vimeo",embedUrl:`https://player.vimeo.com/video/${h}?${k.toString()}`}}return y.match(/\.(mp4|webm|ogg)$/i)?{type:"direct",embedUrl:y}:null})(e),w={"16:9":"56.25%","4:3":"75%","1:1":"100%","9:16":"177.78%"},f={full:"max-w-full",large:"max-w-6xl",medium:"max-w-4xl",small:"max-w-2xl"},x=c==="center"?"mx-auto":c==="right"?"ml-auto":"mr-auto";return jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsx("div",{className:`${f[l]} ${x}`,children:jsxRuntime.jsx("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:w[t],borderRadius:`${d}px`},children:v?v.type==="direct"?jsxRuntime.jsx("video",{src:v.embedUrl,autoPlay:r,loop:a,muted:o,controls:i,poster:s,className:"absolute top-0 left-0 w-full h-full object-cover"}):jsxRuntime.jsx("iframe",{src:v.embedUrl,className:"absolute top-0 left-0 w-full h-full",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:n,title:"Video"}):jsxRuntime.jsx("div",{className:"absolute top-0 left-0 w-full h-full flex items-center justify-center",style:{backgroundColor:`${u.primary}20`},children:jsxRuntime.jsxs("div",{className:"text-center px-4",children:[jsxRuntime.jsxs("svg",{className:"w-16 h-16 mx-auto mb-4",fill:"none",stroke:u.primary,viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]}),jsxRuntime.jsx("p",{style:{color:u.text,opacity:.6},children:e?"Invalid video URL":"Add a video URL to display"})]})})})})})}function Pn({text:e="SCROLL TEXT",scrollDirection:t="left",scrollSpeed:r="medium",orientation:a="horizontal",dividerIcon:o="bullet",customIcon:i,textSize:n="medium",textColor:s,fontWeight:l="bold",backgroundColor:c,backgroundGradient:d,pauseOnHover:u=true,colors:p,typography:g,enableInlineEditing:b=false,sectionId:v=""}){let[w,f]=Ge.useState(false),y={bullet:"\u2022",star:"\u2605",diamond:"\u25C6",custom:i||"\u2022",none:""}[o],C=typeof r=="number"?r:{slow:60,medium:30,fast:15}[r],h={small:"text-xl md:text-2xl",medium:"text-2xl md:text-4xl",large:"text-3xl md:text-5xl",xl:"text-4xl md:text-6xl"},k={light:"font-light",normal:"font-normal",bold:"font-bold"},S={horizontal:"0deg","diagonal-left":"-5deg","diagonal-right":"5deg"},I=y?`${e} ${y} `.repeat(20):`${e} `.repeat(20);return jsxRuntime.jsxs("div",{className:"relative overflow-hidden py-3",style:{...d?{background:d}:{backgroundColor:c||"transparent"},transform:`rotate(${S[a]})`},onMouseEnter:()=>u&&f(true),onMouseLeave:()=>u&&f(false),children:[jsxRuntime.jsx("style",{children:`
1
+ 'use strict';var jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react'),Ge=require('react'),framerMotion=require('framer-motion'),supabaseJs=require('@supabase/supabase-js'),reactDom=require('react-dom');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Ge__default=/*#__PURE__*/_interopDefault(Ge);function tn({logoUrl:e,fallbackText:t,size:r="medium",alignment:a="center",colors:o,enableInlineEditing:i=false,sectionId:n=""}){let l={small:80,medium:120,large:160}[r];return jsxRuntime.jsx("div",{className:`container mx-auto px-4 flex ${a==="center"?"justify-center":a==="right"?"justify-end":"justify-start"}`,children:e?jsxRuntime.jsx("img",{src:e,alt:t||"Logo",className:"object-contain",style:{height:`${l}px`,width:"auto"}}):t?jsxRuntime.jsx("div",{className:"flex items-center justify-center rounded-full font-bold",style:{width:`${l}px`,height:`${l}px`,backgroundColor:o.primary,color:"#FFFFFF",fontSize:`${l*.4}px`},children:t.slice(0,2).toUpperCase()}):jsxRuntime.jsx("div",{className:"rounded-full",style:{width:`${l}px`,height:`${l}px`,backgroundColor:o.primary,opacity:.2}})})}function nn({name:e,title:t,bio:r,showName:a=true,showTitle:o=true,showBio:i=true,colors:n,typography:s,enableInlineEditing:l=false,sectionId:c=""}){return jsxRuntime.jsxs("div",{className:"container mx-auto px-4 text-center",children:[a&&jsxRuntime.jsx("h1",{className:"text-4xl font-bold mb-3",style:{fontFamily:s.headingFont,color:n.text},...l&&{"data-editable":true,"data-section-id":c,"data-field-path":"settings.name"},children:e||"Your Name"}),o&&jsxRuntime.jsx("p",{className:"text-lg opacity-80 mb-2",...l&&{"data-editable":true,"data-section-id":c,"data-field-path":"settings.title"},children:t||"Beauty Professional"}),i&&jsxRuntime.jsx("p",{className:"text-base opacity-70 max-w-md mx-auto",...l&&{"data-editable":true,"data-section-id":c,"data-field-path":"settings.bio"},children:r||"Transform your look \u2728"})]})}function on({text:e,url:t,style:r="gradient",size:a="large",colors:o,enableInlineEditing:i=false,sectionId:n=""}){let s=()=>{let c="";switch(a){case "small":c="p-3 text-base";break;case "medium":c="p-4 text-lg";break;case "large":c="p-5 text-xl";break;default:c="p-5 text-xl";}let d="";switch(r){case "gradient":d="rounded-full";break;case "solid":d="rounded-lg";break;case "outline":d="rounded-full border-2";break;default:d="rounded-full";}return `block max-w-2xl mx-auto ${c} ${d} text-center font-semibold transition-all hover:scale-105 hover:shadow-xl`},l=()=>{switch(r){case "gradient":return {background:`linear-gradient(135deg, ${o.primary} 0%, ${o.secondary} 100%)`,color:"#FFFFFF"};case "solid":return {backgroundColor:o.primary,color:"#FFFFFF"};case "outline":return {backgroundColor:"transparent",borderColor:o.primary,color:o.primary};default:return {backgroundColor:o.primary,color:"#FFFFFF"}}};return jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsx("a",{href:t||"/book",className:s(),style:l(),...i&&{"data-editable":true,"data-section-id":n,"data-field-path":"settings.text"},children:e||"\u{1F485} Book Now"})})}function sn({links:e,style:t="pill",colors:r,enableInlineEditing:a=false,sectionId:o=""}){let i=()=>{let s="block w-full p-4 text-center font-medium transition-all hover:scale-105";switch(t){case "pill":return `${s} rounded-full`;case "square":return `${s} rounded-md`;case "outline":return `${s} rounded-full border-2`;default:return `${s} rounded-lg`}},n=s=>s?{backgroundColor:"transparent",borderColor:r.primary,color:r.primary}:{backgroundColor:r.linkBackground||r.primary,color:r.linkText||"#FFFFFF"};return jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsx("div",{className:"max-w-2xl mx-auto space-y-3",children:e.map((s,l)=>jsxRuntime.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:i(),style:n(t==="outline"),...a&&{"data-editable":true,"data-section-id":o,"data-field-path":`settings.links.${l}.label`},children:s.label},s.id))})})}function ln({platforms:e,socialLinks:t={},style:r="filled",size:a="large",position:o="center",invertIcons:i=false,colors:n,enableInlineEditing:s=false,sectionId:l=""}){let c=g=>{let b=g.replace("#",""),v=parseInt(b.substr(0,2),16),w=parseInt(b.substr(2,2),16),f=parseInt(b.substr(4,2),16);return (.299*v+.587*w+.114*f)/255>.5?"#000000":"#FFFFFF"},d=g=>{let b=a==="small"?20:a==="medium"?24:28;switch(g){case "instagram":return jsxRuntime.jsx(lucideReact.Instagram,{size:b});case "facebook":return jsxRuntime.jsx(lucideReact.Facebook,{size:b});case "tiktok":return jsxRuntime.jsx(lucideReact.Music,{size:b});case "twitter":return jsxRuntime.jsx(lucideReact.Twitter,{size:b});case "youtube":return jsxRuntime.jsx(lucideReact.Youtube,{size:b});case "pinterest":return jsxRuntime.jsx(lucideReact.PinIcon,{size:b});default:return jsxRuntime.jsx(lucideReact.Instagram,{size:b})}},u=()=>{let g="";switch(a){case "small":g="w-10 h-10 text-lg";break;case "medium":g="w-12 h-12 text-xl";break;case "large":g="w-14 h-14 text-2xl";break;default:g="w-14 h-14 text-2xl";}let b="";switch(r){case "filled":b="rounded-full";break;case "outline":b="rounded-full border-2";break;case "ghost":b="rounded-full";break;default:b="rounded-full";}return `${g} ${b} flex items-center justify-center hover:scale-110 transition-transform`},p=()=>{switch(r){case "filled":return {backgroundColor:n.primary,color:c(n.primary||"#BCB4FF")};case "outline":return {backgroundColor:"transparent",borderColor:n.primary,color:n.primary};case "ghost":return {backgroundColor:"rgba(0,0,0,0.05)",color:n.primary};default:return {backgroundColor:n.primary,color:c(n.primary||"#BCB4FF")}}};return o==="left-vertical"||o==="right-vertical"?jsxRuntime.jsx("div",{className:`fixed top-6 z-40 flex flex-col gap-3 ${o==="left-vertical"?"left-4":"right-4"}`,children:e.map(g=>{let b=t[g]||`https://${g}.com/`;return jsxRuntime.jsx("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:u(),style:{...p(),filter:i?"invert(1)":"none"},title:g.charAt(0).toUpperCase()+g.slice(1),children:d(g)},g)})}):jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-8 text-center",children:jsxRuntime.jsx("div",{className:"flex items-center justify-center gap-4",children:e.map(g=>{let b=t[g]||`https://${g}.com/`;return jsxRuntime.jsx("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:u(),style:{...p(),filter:i?"invert(1)":"none"},title:g.charAt(0).toUpperCase()+g.slice(1),children:d(g)},g)})})})}function cn({headline:e,subheadline:t,heroImage:r,ctaButton:a,layout:o="split",imagePosition:i="right",contentDisplay:n="side",colors:s,typography:l,enableInlineEditing:c=false,sectionId:d=""}){let u=jsxRuntime.jsxs("div",{className:o==="full"?"text-center max-w-4xl z-10":"text-left",children:[jsxRuntime.jsx("h1",{className:o==="full"?"text-5xl md:text-6xl font-bold mb-6":"text-5xl font-bold mb-4",style:{fontFamily:l.headingFont,color:o==="full"&&r?"#FFFFFF":s.text,textShadow:o==="full"&&r?"0 2px 10px rgba(0,0,0,0.3)":"none"},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.headline"},children:e||"Welcome"}),t&&jsxRuntime.jsx("p",{className:o==="full"?"text-xl md:text-2xl opacity-90 mb-12":"text-xl opacity-80 mb-8",style:{color:o==="full"&&r?"#FFFFFF":s.text,textShadow:o==="full"&&r?"0 2px 10px rgba(0,0,0,0.3)":"none"},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.subheadline"},children:t}),a&&jsxRuntime.jsx("a",{href:a.url||"#",className:"inline-block px-8 py-4 rounded-lg font-semibold text-lg transition-all hover:scale-105 shadow-lg",style:{backgroundColor:s.primary,color:"#FFFFFF"},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.ctaButton.text"},children:a.text||"Get Started"})]}),p=r?jsxRuntime.jsx("div",{className:"w-full h-full rounded-2xl overflow-hidden",children:jsxRuntime.jsx("img",{src:r,alt:e||"Hero",className:"w-full h-full object-cover"})}):jsxRuntime.jsx("div",{className:"w-full h-full rounded-2xl flex items-center justify-center",style:{backgroundColor:s.primary,opacity:.1},children:jsxRuntime.jsx("span",{className:"text-sm opacity-50",children:"Add hero image"})});return o==="full"?jsxRuntime.jsxs("div",{className:"relative py-20 md:py-24 px-4 flex items-center justify-center",style:{backgroundImage:r?`url(${r})`:"none",backgroundSize:"cover",backgroundPosition:"center",backgroundColor:r?"transparent":s.primary,opacity:r?1:.1},children:[r&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-black/40"}),u]}):n==="overlay"?jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:"relative max-w-6xl mx-auto rounded-2xl overflow-hidden",style:{height:"500px"},children:[r?jsxRuntime.jsx("img",{src:r,alt:e||"Hero",className:"absolute inset-0 w-full h-full object-cover"}):jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backgroundColor:s.primary,opacity:.1}}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-black/60 to-black/20"}),jsxRuntime.jsx("div",{className:`relative h-full flex items-center ${i==="left"?"justify-end":"justify-start"} px-12`,children:jsxRuntime.jsx("div",{className:"max-w-lg",style:{color:"#FFFFFF",textShadow:"0 2px 10px rgba(0,0,0,0.3)"},children:u})})]})}):jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center max-w-6xl mx-auto",children:[i==="left"&&jsxRuntime.jsx("div",{className:"aspect-[4/3]",children:p}),jsxRuntime.jsx("div",{children:u}),i==="right"&&jsxRuntime.jsx("div",{className:"aspect-[4/3]",children:p})]})})}function dn({title:e,content:t,image:r,layout:a="centered",colors:o,typography:i,enableInlineEditing:n=false,sectionId:s=""}){return a==="centered"?jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[jsxRuntime.jsx("h2",{className:"text-3xl font-bold mb-6",style:{fontFamily:i.headingFont,color:o.text},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.title"},children:e||"About Us"}),jsxRuntime.jsx("p",{className:"text-lg opacity-80",...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.content"},children:t||"Tell your story here..."})]})}):a==="split"?jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:"max-w-6xl mx-auto grid md:grid-cols-2 gap-12 items-center",children:[jsxRuntime.jsx("div",{className:"aspect-square rounded-2xl overflow-hidden",children:r?jsxRuntime.jsx("img",{src:r,alt:e||"About",className:"w-full h-full object-cover"}):jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{backgroundColor:o.primary,opacity:.2},children:jsxRuntime.jsx("span",{className:"text-sm opacity-50",children:"Add image"})})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:"text-3xl font-bold mb-6",style:{fontFamily:i.headingFont,color:o.text},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.title"},children:e||"About Us"}),jsxRuntime.jsx("p",{className:"text-lg opacity-80 leading-relaxed",...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.content"},children:t||"Tell your story here..."})]})]})}):jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-4xl font-bold mb-8 text-left",style:{fontFamily:i.headingFont,color:o.text},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.title"},children:e||"About Us"}),jsxRuntime.jsx("p",{className:"text-xl opacity-80 leading-relaxed columns-2 gap-12",...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.content"},children:t||"Tell your story here..."})]})})}function un({title:e,services:t=[],layout:r="grid",columns:a=3,showPrices:o=true,showDuration:i=true,colors:n,typography:s,enableInlineEditing:l=false,sectionId:c=""}){let d={2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},u=t.length>0?t:[{id:1,name:"Haircut & Style",description:"Professional cut and styling",price:75,duration:60},{id:2,name:"Color Treatment",description:"Full color or highlights",price:150,duration:120},{id:3,name:"Deep Conditioning",description:"Restorative treatment",price:50,duration:45}],p=()=>{switch(r){case "grid":return `grid ${d[a]} gap-8`;case "list":return "flex flex-col gap-4 max-w-3xl mx-auto";case "carousel":return "flex overflow-x-auto snap-x gap-6 pb-4";default:return `grid ${d[a]} gap-8`}};return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:s.headingFont,color:n.text},...l&&{"data-editable":true,"data-section-id":c,"data-field-path":"settings.title"},children:e||"Our Services"}),jsxRuntime.jsx("div",{className:p(),children:u.map(g=>jsxRuntime.jsxs("div",{className:`p-6 rounded-lg border hover:scale-105 transition-transform shadow-lg ${r==="carousel"?"snap-center flex-shrink-0 w-80":""} ${r==="list"?"flex items-center gap-6":""}`,style:{backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:`${n.primary}20`},children:[r==="list"&&jsxRuntime.jsx("div",{className:"flex-shrink-0 w-24 h-24 rounded-lg",style:{backgroundColor:n.primary,opacity:.2}}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("h3",{className:"text-xl font-semibold mb-3",style:{color:"#1a1a1a"},children:g.name}),jsxRuntime.jsx("p",{className:"text-sm opacity-80 mb-4",style:{color:"#333333"},children:g.description}),jsxRuntime.jsxs("div",{className:`flex ${r==="list"?"gap-4":"justify-between"} items-center`,children:[o&&jsxRuntime.jsxs("p",{className:"font-bold text-lg",style:{color:n.primary},children:["$",g.price]}),i&&jsxRuntime.jsxs("p",{className:"text-sm opacity-70",style:{color:"#666666"},children:[g.duration," min"]})]})]})]},g.id))})]})})}function mn({title:e,images:t=[],columns:r=3,colors:a,typography:o,enableInlineEditing:i=false,sectionId:n=""}){let s={2:"grid-cols-2",3:"grid-cols-2 md:grid-cols-3",4:"grid-cols-2 md:grid-cols-4"},l=t.length>0?t:[1,2,3,4,5,6].map(c=>({id:c,url:void 0}));return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:o.headingFont,color:a.text},...i&&{"data-editable":true,"data-section-id":n,"data-field-path":"settings.title"},children:e||"Gallery"}),jsxRuntime.jsx("div",{className:`grid ${s[r]} gap-4`,children:l.map((c,d)=>jsxRuntime.jsx("div",{className:"relative aspect-square overflow-hidden rounded-lg group",children:c.url?jsxRuntime.jsx("img",{src:c.url,alt:c.alt||"",className:"w-full h-full object-cover transition-transform group-hover:scale-110"}):jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center transition-transform group-hover:scale-110",style:{backgroundColor:a.primary,opacity:.2},children:jsxRuntime.jsx("span",{className:"text-sm opacity-50",children:"Add image"})})},c.id||d))})]})})}function gn({title:e,testimonials:t=[],layout:r="grid",colors:a,typography:o,enableInlineEditing:i=false,sectionId:n=""}){let s=r==="carousel"?"flex overflow-x-auto snap-x gap-6 pb-4":"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",l=t.length>0?t:[{id:1,text:"Amazing service! I love my new look.",author:"Sarah M.",rating:5},{id:2,text:"Professional and friendly staff.",author:"Jessica L.",rating:5},{id:3,text:"Best salon in town!",author:"Emily R.",rating:5}];return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:o.headingFont,color:a.text},...i&&{"data-editable":true,"data-section-id":n,"data-field-path":"settings.title"},children:e||"What Our Clients Say"}),jsxRuntime.jsx("div",{className:s,children:l.map(c=>jsxRuntime.jsxs("div",{className:`p-6 rounded-lg bg-white/10 backdrop-blur-sm ${r==="carousel"?"snap-center flex-shrink-0 w-80":""}`,children:[jsxRuntime.jsx("div",{className:"flex gap-1 mb-4",children:[...Array(5)].map((d,u)=>jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:u<c.rating?a.primary||"#8B5CF6":"#E5E7EB",viewBox:"0 0 20 20",children:jsxRuntime.jsx("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})},u))}),jsxRuntime.jsxs("p",{className:"mb-4 italic",style:{color:a.text},children:['"',c.text,'"']}),jsxRuntime.jsx("p",{className:"font-semibold",style:{color:a.text},children:c.author})]},c.id))})]})})}function fn({title:e,members:t=[],colors:r,typography:a,enableInlineEditing:o=false,sectionId:i=""}){let n=t.length>0?t:[{id:1,name:"Sarah Johnson",role:"Master Stylist",bio:"Expert in color and styling with 10+ years experience"},{id:2,name:"Michael Chen",role:"Senior Stylist",bio:"Specializing in precision cuts and modern styles"},{id:3,name:"Emma Davis",role:"Stylist",bio:"Passionate about creating beautiful transformations"}];return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:a.headingFont,color:r.text},...o&&{"data-editable":true,"data-section-id":i,"data-field-path":"settings.title"},children:e||"Meet Our Team"}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:n.map(s=>jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("div",{className:"w-32 h-32 rounded-full mx-auto mb-4",style:{backgroundColor:r.primary,opacity:.2}}),jsxRuntime.jsx("h3",{className:"text-xl font-semibold mb-2",style:{color:r.text},children:s.name}),jsxRuntime.jsx("p",{className:"text-sm mb-3",style:{color:r.primary},children:s.role}),jsxRuntime.jsx("p",{className:"text-sm opacity-80",style:{color:r.text},children:s.bio})]},s.id))})]})})}function yn({title:e,email:t="contact@example.com",phone:r="(555) 123-4567",address:a="123 Main Street, City, State 12345",showForm:o=true,colors:i,typography:n,enableInlineEditing:s=false,sectionId:l=""}){return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:n.headingFont,color:i.text},...s&&{"data-editable":true,"data-section-id":l,"data-field-path":"settings.title"},children:e||"Get In Touch"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12",children:[jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:i.primary},children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),jsxRuntime.jsx("span",{style:{color:i.text},children:t})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:i.primary},children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})}),jsxRuntime.jsx("span",{style:{color:i.text},children:r})]}),jsxRuntime.jsxs("div",{className:"flex items-start gap-4",children:[jsxRuntime.jsxs("svg",{className:"w-6 h-6 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:i.primary},children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),jsxRuntime.jsx("span",{style:{color:i.text},children:a})]})]}),o&&jsxRuntime.jsxs("form",{className:"space-y-4",children:[jsxRuntime.jsx("input",{type:"text",placeholder:"Name",className:"w-full px-4 py-3 rounded-lg bg-white/10 backdrop-blur-sm border border-white/20",style:{color:i.text}}),jsxRuntime.jsx("input",{type:"email",placeholder:"Email",className:"w-full px-4 py-3 rounded-lg bg-white/10 backdrop-blur-sm border border-white/20",style:{color:i.text}}),jsxRuntime.jsx("textarea",{placeholder:"Message",rows:4,className:"w-full px-4 py-3 rounded-lg bg-white/10 backdrop-blur-sm border border-white/20",style:{color:i.text}}),jsxRuntime.jsx("button",{type:"submit",className:"w-full px-6 py-3 rounded-lg font-semibold transition-all hover:scale-105",style:{backgroundColor:i.primary,color:"#FFFFFF"},children:"Send Message"})]})]})]})})}function bn({brandName:e,logoUrl:t,style:r="both",alignment:a="left",sticky:o=true,colors:i,typography:n,enableInlineEditing:s=false,sectionId:l=""}){let c=a==="center"?"justify-center":a==="right"?"justify-end":"justify-start";return jsxRuntime.jsx("header",{className:`${o?"sticky top-0 z-50 backdrop-blur-sm":""} border-b`,style:{backgroundColor:o?"rgba(255, 255, 255, 0.8)":"transparent",borderColor:i.primary},children:jsxRuntime.jsx("div",{className:`container mx-auto px-4 py-4 flex items-center ${c}`,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[(r==="logo"||r==="both")&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:t?jsxRuntime.jsx("img",{src:t,alt:e||"Logo",className:"h-10 w-auto object-contain"}):jsxRuntime.jsx("div",{className:"w-10 h-10 rounded-full",style:{backgroundColor:i.primary,opacity:.2}})}),(r==="text"||r==="both"||!r)&&jsxRuntime.jsx("h1",{className:"text-2xl font-bold",style:{fontFamily:n.headingFont,color:i.text},...s&&{"data-editable":true,"data-section-id":l,"data-field-path":"settings.brandName"},children:e||"Your Brand"})]})})})}function xn({links:e,style:t="horizontal",colors:r,enableInlineEditing:a=false,sectionId:o=""}){let i=(n,s)=>{if(s.startsWith("#")){n.preventDefault();let l=s.substring(1),c=document.querySelector(`[data-section-id="${l}"]`);c&&c.scrollIntoView({behavior:"smooth",block:"start"});}};return jsxRuntime.jsx("nav",{className:"container mx-auto px-4 py-4",children:jsxRuntime.jsx("div",{className:`flex ${t==="vertical"?"flex-col space-y-2":"flex-row space-x-6 justify-center"}`,children:e.map((n,s)=>jsxRuntime.jsx("a",{href:n.url,onClick:l=>i(l,n.url),className:"text-base font-medium transition-colors hover:opacity-70",style:{color:r.text},...n.linkType==="external"&&!n.url.startsWith("#")?{target:"_blank",rel:"noopener noreferrer"}:{},...a&&{"data-editable":true,"data-section-id":o,"data-field-path":`settings.links.${s}.label`},children:n.label},n.id))})})}function vn({footerText:e,alignment:t="center",showSocial:r=true,showContact:a=true,showLinks:o=true,colors:i,enableInlineEditing:n=false,sectionId:s=""}){let l=t==="center"?"text-center":t==="right"?"text-right":"text-left";return jsxRuntime.jsx("footer",{className:"border-t py-8",style:{borderColor:i.primary},children:jsxRuntime.jsx("div",{className:`container mx-auto px-4 ${l}`,children:jsxRuntime.jsxs("div",{className:"space-y-4",children:[r&&jsxRuntime.jsx("div",{className:`flex gap-4 ${t==="center"?"justify-center":t==="right"?"justify-end":"justify-start"}`,children:["instagram","facebook","twitter"].map(c=>jsxRuntime.jsx("a",{href:`https://${c}.com/`,className:"w-8 h-8 rounded-full flex items-center justify-center transition-transform hover:scale-110",style:{backgroundColor:i.primary,color:"#FFFFFF"},children:c[0].toUpperCase()},c))}),a&&jsxRuntime.jsx("div",{className:"text-sm opacity-70",style:{color:i.text},children:jsxRuntime.jsx("p",{children:"contact@example.com | (555) 123-4567"})}),o&&jsxRuntime.jsxs("div",{className:`flex gap-4 text-sm ${t==="center"?"justify-center":t==="right"?"justify-end":"justify-start"}`,children:[jsxRuntime.jsx("a",{href:"/privacy",className:"hover:opacity-70",style:{color:i.text},children:"Privacy"}),jsxRuntime.jsx("a",{href:"/terms",className:"hover:opacity-70",style:{color:i.text},children:"Terms"})]}),jsxRuntime.jsx("p",{className:"text-sm opacity-60",style:{color:i.text},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.footerText"},children:e||"\xA9 2025 Your Business"})]})})})}function wn({headline:e,description:t,image:r,buttonText:a,buttonUrl:o,layout:i="image-right",showButton:n=true,colors:s,typography:l,enableInlineEditing:c=false,sectionId:d=""}){let u=jsxRuntime.jsx("div",{className:"w-full h-full aspect-video rounded-lg overflow-hidden bg-gray-100",children:r?jsxRuntime.jsx("img",{src:r,alt:e||"Feature image",className:"w-full h-full object-cover"}):jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{backgroundColor:s.primary,opacity:.2},children:jsxRuntime.jsx("span",{className:"text-sm opacity-50",children:"Add image"})})}),p=jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h2",{className:"text-3xl font-bold",style:{fontFamily:l.headingFont,color:s.text},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.headline"},children:e||"Feature Headline"}),jsxRuntime.jsx("p",{className:"text-lg opacity-80",style:{color:s.text},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.description"},children:t||"Feature description goes here..."}),n&&jsxRuntime.jsx("a",{href:o||"#",className:"inline-block px-6 py-3 rounded-lg font-semibold transition-all hover:scale-105",style:{backgroundColor:s.primary,color:"#FFFFFF"},...c&&{"data-editable":true,"data-section-id":d,"data-field-path":"settings.buttonText"},children:a||"Learn More"})]});return jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsxs("div",{className:`grid md:grid-cols-2 gap-12 items-center ${i==="image-top"?"grid-cols-1":""}`,children:[i==="image-left"&&u,p,i==="image-right"&&u,i==="image-top"&&u]})})}function Cn({title:e,comparisons:t=[],colors:r,typography:a,enableInlineEditing:o=false,sectionId:i=""}){let n=t.length>0?t:[{id:1,title:"Hair Transformation",beforeImage:"",afterImage:""}];return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:a.headingFont,color:r.text},...o&&{"data-editable":true,"data-section-id":i,"data-field-path":"settings.title"},children:e||"Results"}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:n.map((s,l)=>jsxRuntime.jsxs("div",{className:"space-y-4",children:[s.title&&jsxRuntime.jsx("h3",{className:"text-xl font-semibold text-center",style:{color:r.text},children:s.title}),jsxRuntime.jsxs("div",{className:"relative aspect-[4/3] rounded-lg overflow-hidden",children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backgroundColor:r.primary,opacity:.1}}),jsxRuntime.jsx("div",{className:"absolute top-4 left-4 bg-black/50 text-white px-3 py-1 rounded text-sm",children:"Before"}),jsxRuntime.jsx("div",{className:"absolute top-4 right-4 bg-black/50 text-white px-3 py-1 rounded text-sm",children:"After"})]})]},s.id||l))})]})})}function Sn({title:e,plans:t=[],colors:r,typography:a,enableInlineEditing:o=false,sectionId:i=""}){let n=t.length>0?t:[{id:1,name:"Basic",price:50,features:["Service 1","Service 2"]},{id:2,name:"Premium",price:100,features:["Service 1","Service 2","Service 3"],featured:true},{id:3,name:"Deluxe",price:150,features:["All Services","Priority Booking"]}];return jsxRuntime.jsx("section",{className:"py-16 px-6",children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto",children:[jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12",style:{fontFamily:a.headingFont,color:r.text},...o&&{"data-editable":true,"data-section-id":i,"data-field-path":"settings.title"},children:e||"Pricing"}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:n.map(s=>jsxRuntime.jsxs("div",{className:`p-8 rounded-lg border-2 ${s.featured?"scale-105 shadow-xl":""}`,style:{borderColor:s.featured?r.primary:"rgba(255,255,255,0.1)",backgroundColor:s.featured?`${r.primary}15`:"rgba(255,255,255,0.05)"},children:[jsxRuntime.jsx("h3",{className:"text-2xl font-bold mb-2 text-center",style:{color:r.text},children:s.name}),jsxRuntime.jsx("div",{className:"text-center mb-6",children:jsxRuntime.jsxs("span",{className:"text-4xl font-bold",style:{color:r.primary},children:["$",s.price]})}),jsxRuntime.jsx("ul",{className:"space-y-3 mb-6",children:s.features.map((l,c)=>jsxRuntime.jsxs("li",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:r.primary},children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),jsxRuntime.jsx("span",{style:{color:r.text},children:l})]},c))}),jsxRuntime.jsx("button",{className:"w-full px-6 py-3 rounded-lg font-semibold transition-all hover:scale-105",style:{backgroundColor:s.featured?r.primary:"rgba(255,255,255,0.1)",color:s.featured?"#FFFFFF":r.text},children:"Choose Plan"})]},s.id))})]})})}function Fn({username:e,colors:t,enableInlineEditing:r=false,sectionId:a=""}){return jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-8",children:jsxRuntime.jsxs("div",{className:"max-w-4xl mx-auto",children:[jsxRuntime.jsxs("p",{className:"text-center text-sm opacity-60 mb-4",children:["Instagram Feed: ",e||"@handle"]}),jsxRuntime.jsx("div",{className:"grid grid-cols-3 gap-1",children:[1,2,3,4,5,6].map(o=>jsxRuntime.jsx("div",{className:"aspect-square rounded",style:{backgroundColor:t.primary,opacity:.2}},o))})]})})}function In({name:e,subheading:t,bio:r,links:a=[],bookingButtonText:o,bookingButtonUrl:i,showBookingButton:n=true,position:s="bottom-left",cardWidth:l="medium",cardColor:c="#FFFFFF",colors:d,typography:u,enableInlineEditing:p=false,sectionId:g=""}){let b=(N,C)=>{let h=parseInt(N.slice(1,3),16),k=parseInt(N.slice(3,5),16),S=parseInt(N.slice(5,7),16);return `rgba(${h}, ${k}, ${S}, ${C})`},v={small:"280px",medium:"320px",large:"400px"},w={"bottom-left":"bottom-0 left-0","bottom-right":"bottom-0 right-0","bottom-center":"bottom-0 left-1/2 -translate-x-1/2"},f=s==="bottom-left"?"text-left":s==="bottom-right"?"text-right":"text-center",x=s==="bottom-left"?"justify-start":s==="bottom-right"?"justify-end":"justify-center",y=()=>s==="bottom-left"?"rounded-tr-3xl rounded-tl-none":s==="bottom-right"?"rounded-tl-3xl rounded-tr-none":"rounded-t-3xl";return jsxRuntime.jsx("div",{className:`fixed z-50 ${w[s]}`,style:{width:v[l]},children:jsxRuntime.jsxs("div",{className:`${y()} shadow-2xl border-t border-x`,style:{backgroundColor:b(c,.9),borderColor:b(c,.3),boxShadow:"0 -10px 40px rgba(0, 0, 0, 0.1)"},children:[jsxRuntime.jsx("div",{className:`px-8 pt-8 pb-3 ${f}`,children:jsxRuntime.jsx("h3",{className:"text-2xl font-bold",style:{fontFamily:u.headingFont,color:d.text},...p&&{"data-editable":true,"data-section-id":g,"data-field-path":"settings.name"},children:e||"Your Name"})}),jsxRuntime.jsx("div",{className:"mb-6",children:t?jsxRuntime.jsxs("div",{className:`flex items-center gap-3 px-8 ${x}`,children:[jsxRuntime.jsx("span",{className:"text-xs font-medium whitespace-nowrap",style:{color:d.primary},...p&&{"data-editable":true,"data-section-id":g,"data-field-path":"settings.subheading"},children:t}),jsxRuntime.jsx("div",{className:"flex-1 h-px",style:{backgroundColor:d.primary,opacity:.3}})]}):jsxRuntime.jsx("div",{className:"w-full h-px",style:{backgroundColor:d.primary,opacity:.3}})}),jsxRuntime.jsxs("div",{className:`px-8 pb-8 ${f}`,children:[jsxRuntime.jsx("p",{className:"text-sm opacity-80 mb-4",style:{color:d.text},...p&&{"data-editable":true,"data-section-id":g,"data-field-path":"settings.bio"},children:r||"Transforming beauty, one client at a time \u2728"}),a.length>0&&jsxRuntime.jsx("div",{className:"space-y-2 mb-4",children:a.map((N,C)=>jsxRuntime.jsx("a",{href:N.url,target:"_blank",rel:"noopener noreferrer",className:"block text-sm font-medium hover:opacity-70 transition-opacity",style:{color:d.primary},...p&&{"data-editable":true,"data-section-id":g,"data-field-path":`settings.links.${C}.label`},children:N.label},N.id))}),n&&jsxRuntime.jsx("a",{href:i||"/book",className:"block w-full py-3 px-4 rounded-xl text-center font-semibold transition-all hover:scale-105 hover:shadow-lg",style:{backgroundColor:d.primary,color:d.buttonText||"#FFFFFF"},...p&&{"data-editable":true,"data-section-id":g,"data-field-path":"settings.bookingButtonText"},children:o||"Book Appointment"})]})]})})}function En({config:e,colors:t,BookingFlowComponent:r,enableInlineEditing:a=false,sectionId:o=""}){return r?jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsx(r,{config:e,colors:t})}):jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsx("div",{className:"max-w-4xl mx-auto text-center",children:jsxRuntime.jsxs("div",{className:"p-12 rounded-2xl border-2 border-dashed",style:{borderColor:t.primary,opacity:.5},children:[jsxRuntime.jsx("div",{className:"text-6xl mb-4",children:"\u{1F4C5}"}),jsxRuntime.jsx("h3",{className:"text-2xl font-bold mb-3",style:{color:t.text},children:"Booking Flow"}),jsxRuntime.jsx("p",{className:"text-base opacity-70",style:{color:t.text},children:"Pass a BookingFlowComponent prop to render your custom booking flow here."})]})})})}function Rn({videoUrl:e,aspectRatio:t="16:9",autoplay:r=false,loop:a=false,muted:o=true,controls:i=true,allowFullScreen:n=true,coverImage:s,maxWidth:l="large",alignment:c="center",borderRadius:d=12,colors:u,enableInlineEditing:p=false,sectionId:g=""}){let v=(y=>{let N=y.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]+)/);if(N){let h=N[1],k=new URLSearchParams({...r?{autoplay:"1"}:{},...a?{loop:"1",playlist:h}:{},...o?{mute:"1"}:{},...i?{}:{controls:"0"}});return {type:"youtube",embedUrl:`https://www.youtube.com/embed/${h}?${k.toString()}`}}let C=y.match(/(?:vimeo\.com\/)(\d+)/);if(C){let h=C[1],k=new URLSearchParams({...r?{autoplay:"1"}:{},...a?{loop:"1"}:{},...o?{muted:"1"}:{},...i?{}:{controls:"0"}});return {type:"vimeo",embedUrl:`https://player.vimeo.com/video/${h}?${k.toString()}`}}return y.match(/\.(mp4|webm|ogg)$/i)?{type:"direct",embedUrl:y}:null})(e),w={"16:9":"56.25%","4:3":"75%","1:1":"100%","9:16":"177.78%"},f={full:"max-w-full",large:"max-w-6xl",medium:"max-w-4xl",small:"max-w-2xl"},x=c==="center"?"mx-auto":c==="right"?"ml-auto":"mr-auto";return jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsx("div",{className:`${f[l]} ${x}`,children:jsxRuntime.jsx("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:w[t],borderRadius:`${d}px`},children:v?v.type==="direct"?jsxRuntime.jsx("video",{src:v.embedUrl,autoPlay:r,loop:a,muted:o,controls:i,poster:s,className:"absolute top-0 left-0 w-full h-full object-cover"}):jsxRuntime.jsx("iframe",{src:v.embedUrl,className:"absolute top-0 left-0 w-full h-full",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:n,title:"Video"}):jsxRuntime.jsx("div",{className:"absolute top-0 left-0 w-full h-full flex items-center justify-center",style:{backgroundColor:`${u.primary}20`},children:jsxRuntime.jsxs("div",{className:"text-center px-4",children:[jsxRuntime.jsxs("svg",{className:"w-16 h-16 mx-auto mb-4",fill:"none",stroke:u.primary,viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]}),jsxRuntime.jsx("p",{style:{color:u.text,opacity:.6},children:e?"Invalid video URL":"Add a video URL to display"})]})})})})})}function Pn({text:e="SCROLL TEXT",scrollDirection:t="left",scrollSpeed:r="medium",orientation:a="horizontal",dividerIcon:o="bullet",customIcon:i,textSize:n="medium",textColor:s,fontWeight:l="bold",backgroundColor:c,backgroundGradient:d,pauseOnHover:u=true,colors:p,typography:g,enableInlineEditing:b=false,sectionId:v=""}){let[w,f]=Ge.useState(false),y={bullet:"\u2022",star:"\u2605",diamond:"\u25C6",custom:i||"\u2022",none:""}[o],C=typeof r=="number"?r:{slow:60,medium:30,fast:15}[r],h={small:"text-xl md:text-2xl",medium:"text-2xl md:text-4xl",large:"text-3xl md:text-5xl",xl:"text-4xl md:text-6xl"},k={light:"font-light",normal:"font-normal",bold:"font-bold"},S={horizontal:"0deg","diagonal-left":"-5deg","diagonal-right":"5deg"},I=y?`${e} ${y} `.repeat(20):`${e} `.repeat(20);return jsxRuntime.jsxs("div",{className:"relative overflow-hidden py-3",style:{...d?{background:d}:{backgroundColor:c||"transparent"},transform:`rotate(${S[a]})`},onMouseEnter:()=>u&&f(true),onMouseLeave:()=>u&&f(false),children:[jsxRuntime.jsx("style",{children:`
2
2
  @keyframes scroll-${t} {
3
3
  0% {
4
4
  transform: translateX(${t==="left"?"0%":"-50%"});
@@ -7,7 +7,7 @@
7
7
  transform: translateX(${t==="left"?"-50%":"0%"});
8
8
  }
9
9
  }
10
- `}),jsxRuntime.jsxs("div",{className:`flex items-center whitespace-nowrap ${h[n]} ${k[l]} uppercase tracking-wider`,style:{fontFamily:g?.headingFont||"inherit",color:s||p.text,animation:`scroll-${t} ${C}s linear infinite`,animationPlayState:w?"paused":"running"},children:[jsxRuntime.jsx("span",{className:"inline-block",children:I}),jsxRuntime.jsx("span",{className:"inline-block","aria-hidden":"true",children:I})]})]})}function An({address:e,displayType:t="both",mapHeight:r="medium",mapStyle:a="roadmap",zoom:o=15,showMarker:i=true,borderRadius:n=12,directionsButtonText:s="Get Directions",colors:l,typography:c,enableInlineEditing:d=false,sectionId:u=""}){let g={small:300,medium:400,large:500}[r],b=encodeURIComponent(e),v=`https://www.google.com/maps/dir/?api=1&destination=${b}`,f=`https://www.google.com/maps/embed/v1/place?key=${undefined?.VITE_GOOGLE_MAPS_API_KEY||typeof globalThis<"u"&&globalThis.process?.env?.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY||""}&q=${b}&zoom=${o}&maptype=${a}`;return jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsxs("div",{className:"max-w-4xl mx-auto",children:[(t==="map-only"||t==="both")&&e&&jsxRuntime.jsx("div",{className:"w-full overflow-hidden mb-6",style:{height:`${g}px`,borderRadius:`${n}px`},children:jsxRuntime.jsx("iframe",{src:f,className:"w-full h-full",style:{border:0},allowFullScreen:true,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Location Map"})}),(t==="address-only"||t==="both")&&jsxRuntime.jsx("div",{className:"p-6 rounded-lg border",style:{backgroundColor:`${l.primary}10`,borderColor:`${l.primary}30`,borderRadius:`${n}px`},children:jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[jsxRuntime.jsx("div",{className:"flex-1",children:jsxRuntime.jsxs("div",{className:"flex items-start gap-3",children:[jsxRuntime.jsxs("svg",{className:"w-5 h-5 mt-0.5 flex-shrink-0",fill:"none",stroke:l.primary,viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium mb-1",style:{color:l.text,fontFamily:c?.bodyFont||"inherit"},...d&&{"data-editable":true,"data-section-id":u,"data-field-path":"settings.address"},children:e||"Add your address"}),e&&jsxRuntime.jsx("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-sm underline hover:no-underline",style:{color:l.primary},children:"View in Google Maps \uFFFD"})]})]})}),e&&jsxRuntime.jsx("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 rounded-lg font-semibold transition-all hover:opacity-90 text-center",style:{backgroundColor:l.primary,color:"#FFFFFF"},children:s})]})}),!e&&jsxRuntime.jsxs("div",{className:"p-12 rounded-lg border-2 border-dashed text-center",style:{borderColor:`${l.primary}30`,borderRadius:`${n}px`},children:[jsxRuntime.jsxs("svg",{className:"w-12 h-12 mx-auto mb-4",fill:"none",stroke:l.primary,viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),jsxRuntime.jsx("p",{style:{color:l.text,opacity:.6},children:"Add your business address to display a map"})]})]})})}function Mn({imageUrl:e,altText:t="",caption:r,maxWidth:a="large",alignment:o="center",aspectRatio:i="auto",borderRadius:n=12,linkUrl:s,openInNewTab:l=true,colors:c,typography:d,enableInlineEditing:u=false,sectionId:p=""}){let g={full:"max-w-full",large:"max-w-6xl",medium:"max-w-4xl",small:"max-w-2xl"},b={auto:null,"16:9":"56.25%","4:3":"75%","1:1":"100%","3:2":"66.67%"},v=o==="center"?"mx-auto":o==="right"?"ml-auto":"mr-auto",w=jsxRuntime.jsxs("div",{className:`${g[a]} ${v}`,children:[jsxRuntime.jsx("div",{className:"relative w-full overflow-hidden",style:{borderRadius:`${n}px`,...b[i]&&{paddingBottom:b[i]}},children:e?jsxRuntime.jsx("img",{src:e,alt:t||"Image",className:i==="auto"?"w-full h-auto":"absolute top-0 left-0 w-full h-full object-cover",style:{borderRadius:`${n}px`}}):jsxRuntime.jsx("div",{className:"flex items-center justify-center bg-gray-100",style:{backgroundColor:`${c.primary}10`,borderRadius:`${n}px`,minHeight:i==="auto"?"300px":void 0},children:jsxRuntime.jsxs("div",{className:"text-center px-4",children:[jsxRuntime.jsx("svg",{className:"w-16 h-16 mx-auto mb-4",fill:"none",stroke:c.primary,viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),jsxRuntime.jsx("p",{style:{color:c.text,opacity:.6},children:"Add an image URL to display"})]})})}),r&&e&&jsxRuntime.jsx("p",{className:"mt-3 text-sm text-center",style:{color:c.text,opacity:.7,fontFamily:d?.bodyFont||"inherit"},...u&&{"data-editable":true,"data-section-id":p,"data-field-path":"settings.caption"},children:r})]});return jsxRuntime.jsx("div",{className:a==="full"?"w-full":"container mx-auto px-4",children:s&&e?jsxRuntime.jsx("a",{href:s,target:l?"_blank":"_self",rel:l?"noopener noreferrer":void 0,className:"block",children:w}):w})}function Xa({faq:e,index:t,colors:r,typography:a,enableInlineEditing:o,sectionId:i}){let[n,s]=Ge.useState(false);return jsxRuntime.jsxs("div",{className:"border-b border-opacity-10",style:{borderColor:r.text},children:[jsxRuntime.jsxs("button",{onClick:()=>s(!n),className:"w-full py-4 px-6 flex items-center justify-between text-left hover:bg-opacity-5 transition-colors",style:{backgroundColor:n?`${r.primary}10`:"transparent"},children:[jsxRuntime.jsx("span",{className:"font-semibold text-lg pr-4",style:{color:r.text,fontFamily:a?.headingFont||"inherit"},...o&&{"data-editable":true,"data-section-id":i,"data-field-path":`settings.faqs.${t}.question`},children:e.question||"Add question..."}),jsxRuntime.jsx("svg",{className:"w-5 h-5 flex-shrink-0 transition-transform",style:{color:r.primary,transform:n?"rotate(180deg)":"rotate(0deg)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),n&&jsxRuntime.jsx("div",{className:"px-6 pb-4 pt-2",style:{color:r.text,opacity:.8,fontFamily:a?.bodyFont||"inherit"},...o&&{"data-editable":true,"data-section-id":i,"data-field-path":`settings.faqs.${t}.answer`},children:e.answer||"Add answer..."})]})}function $n({title:e="Frequently Asked Questions",faqs:t=[],layout:r="accordion",maxWidth:a="large",colors:o,typography:i,enableInlineEditing:n=false,sectionId:s=""}){return jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsxs("div",{className:`${{full:"max-w-full",large:"max-w-4xl",medium:"max-w-3xl",small:"max-w-2xl"}[a]} mx-auto`,children:[e&&jsxRuntime.jsx("h2",{className:"text-3xl font-bold text-center mb-8",style:{color:o.text,fontFamily:i?.headingFont||"inherit"},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.title"},children:e}),t.length>0?jsxRuntime.jsx("div",{className:"rounded-lg overflow-hidden",style:{border:`1px solid ${o.text}20`,backgroundColor:`${o.primary}05`},children:t.map((c,d)=>r==="accordion"?jsxRuntime.jsx(Xa,{faq:c,index:d,colors:o,typography:i,enableInlineEditing:n,sectionId:s},d):jsxRuntime.jsxs("div",{className:"border-b border-opacity-10 last:border-b-0 p-6",style:{borderColor:o.text},children:[jsxRuntime.jsx("h3",{className:"font-semibold text-lg mb-2",style:{color:o.text,fontFamily:i?.headingFont||"inherit"},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":`settings.faqs.${d}.question`},children:c.question||"Add question..."}),jsxRuntime.jsx("p",{style:{color:o.text,opacity:.8,fontFamily:i?.bodyFont||"inherit"},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":`settings.faqs.${d}.answer`},children:c.answer||"Add answer..."})]},d))}):jsxRuntime.jsxs("div",{className:"p-12 rounded-lg border-2 border-dashed text-center",style:{borderColor:`${o.primary}30`,backgroundColor:`${o.primary}05`},children:[jsxRuntime.jsx("svg",{className:"w-12 h-12 mx-auto mb-4",fill:"none",stroke:o.primary,viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),jsxRuntime.jsx("p",{style:{color:o.text,opacity:.6},children:"Add FAQ items to get started"})]})]})})}function Bn({brandName:e="Your Brand",logoUrl:t,showLogo:r=true,showBrandName:a=true,links:o=[],ctaText:i,ctaUrl:n,sticky:s=true,transparentOnTop:l=false,colors:c,typography:d,enableInlineEditing:u=false,sectionId:p=""}){let[g,b]=Ge.useState(false),[v,w]=Ge.useState(false),[f,x]=Ge.useState("");Ge.useEffect(()=>{let h=()=>{w(window.scrollY>20);};return window.addEventListener("scroll",h),()=>window.removeEventListener("scroll",h)},[]),Ge.useEffect(()=>{let h=()=>{let k=o.filter(I=>I.url.startsWith("#")).map(I=>document.querySelector(`[data-section-id="${I.url.substring(1)}"]`)).filter(Boolean),S="";k.forEach(I=>{if(I){let R=I.getBoundingClientRect();R.top<=100&&R.bottom>=100&&(S=I.getAttribute("data-section-id")||"");}}),x(S);};return window.addEventListener("scroll",h),()=>window.removeEventListener("scroll",h)},[o]);let y=(h,k)=>{if(k.startsWith("#")){h.preventDefault();let S=k.substring(1),I=document.querySelector(`[data-section-id="${S}"]`);I&&I.scrollIntoView({behavior:"smooth",block:"start"}),b(false);}},N=l&&!v;return jsxRuntime.jsx("nav",{className:`${s?"sticky top-0 z-50":""} ${N?"bg-transparent":s?"bg-white/80 backdrop-blur-md border-b":"bg-white border-b"} transition-all duration-300`,style:{borderColor:N?"transparent":`${c.primary}20`},children:jsxRuntime.jsxs("div",{className:"container mx-auto px-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between h-16 md:h-20",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[r&&t&&jsxRuntime.jsx("img",{src:t,alt:e,className:"h-8 md:h-10 w-auto object-contain"}),a&&jsxRuntime.jsx("h1",{className:"text-xl md:text-2xl font-bold",style:{fontFamily:d?.headingFont||"inherit",color:c.text},...u&&{"data-editable":true,"data-section-id":p,"data-field-path":"settings.brandName"},children:e})]}),jsxRuntime.jsxs("div",{className:"hidden md:flex items-center gap-8",children:[o.map((h,k)=>{let S=h.url.startsWith("#")&&h.url.substring(1)===f;return jsxRuntime.jsxs("a",{href:h.url,onClick:I=>y(I,h.url),className:"relative text-base font-medium transition-colors group",style:{color:S?c.primary:c.text,fontFamily:d?.bodyFont||"inherit"},...h.linkType==="external"&&!h.url.startsWith("#")?{target:"_blank",rel:"noopener noreferrer"}:{},...u&&{"data-editable":true,"data-section-id":p,"data-field-path":`settings.links.${k}.label`},children:[h.label,jsxRuntime.jsx("span",{className:`absolute -bottom-1 left-0 h-0.5 transition-all ${S?"w-full":"w-0 group-hover:w-full"}`,style:{backgroundColor:c.primary}})]},h.id)}),i&&n&&jsxRuntime.jsx("a",{href:n,className:"px-6 py-2.5 rounded-full font-semibold transition-all hover:opacity-90 hover:scale-105",style:{backgroundColor:c.primary,color:c.buttonText||"#FFFFFF",fontFamily:d?.bodyFont||"inherit"},children:i})]}),jsxRuntime.jsx("button",{onClick:()=>b(!g),className:"md:hidden p-2 rounded-lg transition-colors hover:bg-black/5","aria-label":"Toggle menu",children:jsxRuntime.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:c.text,viewBox:"0 0 24 24",children:g?jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]}),jsxRuntime.jsx("div",{className:`md:hidden overflow-hidden transition-all duration-300 ${g?"max-h-96 pb-4":"max-h-0"}`,children:jsxRuntime.jsxs("div",{className:"flex flex-col space-y-3 pt-4 border-t",style:{borderColor:`${c.primary}20`},children:[o.map((h,k)=>{let S=h.url.startsWith("#")&&h.url.substring(1)===f;return jsxRuntime.jsx("a",{href:h.url,onClick:I=>y(I,h.url),className:"text-base font-medium py-2 px-4 rounded-lg transition-colors",style:{color:S?c.primary:c.text,backgroundColor:S?`${c.primary}10`:"transparent",fontFamily:d?.bodyFont||"inherit"},...h.linkType==="external"&&!h.url.startsWith("#")?{target:"_blank",rel:"noopener noreferrer"}:{},children:h.label},h.id)}),i&&n&&jsxRuntime.jsx("a",{href:n,className:"px-6 py-3 rounded-full font-semibold text-center transition-all hover:opacity-90",style:{backgroundColor:c.primary,color:c.buttonText||"#FFFFFF",fontFamily:d?.bodyFont||"inherit"},children:i})]})})]})})}function zn({title:e,content:t,alignment:r="left",maxWidth:a="medium",textSize:o="medium",backgroundColor:i,textColor:n,paddingY:s="medium",colors:l,typography:c,enableInlineEditing:d=false,sectionId:u=""}){let p={full:"max-w-full",large:"max-w-6xl",medium:"max-w-4xl",small:"max-w-2xl"},g={left:"text-left",center:"text-center",right:"text-right"},b={small:"text-sm",medium:"text-base",large:"text-lg"};return jsxRuntime.jsx("div",{className:{none:"py-0",small:"py-8",medium:"py-16",large:"py-24"}[s],style:{backgroundColor:i||"transparent"},children:jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsxs("div",{className:`${p[a]} mx-auto ${g[r]}`,children:[e&&jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",style:{color:n||l.text,fontFamily:c?.headingFont||"inherit"},...d&&{"data-editable":true,"data-section-id":u,"data-field-path":"settings.title"},children:e}),jsxRuntime.jsx("div",{className:`${b[o]} leading-relaxed whitespace-pre-wrap`,style:{color:n||l.text,fontFamily:c?.bodyFont||"inherit"},...d&&{"data-editable":true,"data-section-id":u,"data-field-path":"settings.content"},children:t||"Add your text content here..."})]})})})}function $c(e,t=false){if(t)return .15;switch(e){case "fast":return .2;case "slow":return .5;default:return .3}}function Ja(e=50){return {enter:t=>({x:t==="forward"?e:-e,opacity:0}),center:{x:0,opacity:1},exit:t=>({x:t==="forward"?-e:e,opacity:0})}}function Qa(){return {enter:()=>({opacity:0,scale:.95}),center:{opacity:1,scale:1},exit:()=>({opacity:0,scale:.95})}}function Lc(e,t){return e==="fade"?Qa():Ja(t)}var rr={easing:[.4,0,.2,1],spring:{type:"spring",damping:30,stiffness:300},staggerChildren:{staggerChildren:.05,delayChildren:.1},cardHover:{scale:1.02,transition:{duration:.2}},buttonHover:{scale:1.05,transition:{duration:.2}},fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},slideUp:{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"}},scaleIn:{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9}},slideInLeft:{initial:{opacity:0,x:-10},animate:{opacity:1,x:0}},slideInRight:{initial:{opacity:0,x:10},animate:{opacity:1,x:0}},backdrop:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}};function Bc(){return typeof window>"u"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function zc(e,t=.1,r=.05){return Array.from({length:e},(a,o)=>({initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:t+o*r,ease:rr.easing}}))}function ge(e=0,t=.3){return {initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:t,delay:e,ease:rr.easing}}}function On({services:e,categories:t=[],selectedService:r,onServiceSelect:a,settings:o,colors:i}){let[n,s]=Ge.useState(null),[l,c]=Ge.useState(new Set(t.length>0?[t[0].id]:[])),d=o.serviceLayout||"grid",u=o.columns||2,p=o.headerContent?.value||"Choose Your Service",g=o.subheaderContent?.value||"Select the service you'd like to book",b=o.showPricing!==false,v=o.showDuration!==false,w=o.showDescription!==false,f=o.enableCategories===true,x=o.categoryStyle||"dropdown",y=o.policyImages||[],N=o.policyText||null,C=o.imageSpacing||"small",h={none:"0px",small:"8px",medium:"16px",large:"24px"},k=o.imageBorderRadius||"0px",S={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"}[u]||"grid-cols-2",I=f&&n?e.filter(m=>m.category===n):e,R=(m,F)=>{let M=r===m.id;return jsxRuntime.jsx("button",{onClick:()=>a(m.id),className:`w-full ${F==="grid"?"h-full":""} p-4 rounded-lg border-2 transition-all text-left ${F==="grid"?"flex flex-col":""} ${M?"border-current shadow-lg":"border-gray-200 hover:border-gray-300"}`,style:{borderColor:M?i.primary:void 0,backgroundColor:M?`${i.primary}10`:void 0},children:F==="grid"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("p",{className:"font-semibold mb-1",children:m.name}),w&&jsxRuntime.jsx("p",{className:"text-xs opacity-70 mb-2 flex-1",children:m.description}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center text-sm mt-auto",children:[b&&jsxRuntime.jsxs("span",{className:"font-bold",style:{color:i.primary},children:["$",m.price]}),v&&jsxRuntime.jsxs("span",{className:"opacity-60",children:[m.duration," min"]})]})]}):jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"font-semibold mb-1",children:m.name}),w&&jsxRuntime.jsx("p",{className:"text-sm opacity-70",children:m.description})]}),jsxRuntime.jsxs("div",{className:"text-right ml-4",children:[b&&jsxRuntime.jsxs("p",{className:"font-bold",style:{color:i.primary},children:["$",m.price]}),v&&jsxRuntime.jsxs("p",{className:"text-sm opacity-60",children:[m.duration," min"]})]})]})},m.id)};return jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs(framerMotion.motion.div,{...ge(.05),className:"text-center sm:text-left",children:[jsxRuntime.jsx("h2",{className:"text-xl sm:text-2xl font-bold mb-2",style:{color:i.primary},children:p}),jsxRuntime.jsx("p",{className:"text-sm opacity-70",children:g})]}),y&&y.length>0&&jsxRuntime.jsx("div",{className:"w-full flex flex-col",style:{gap:h[C]},children:y.slice(0,3).map((m,F)=>jsxRuntime.jsx("div",{className:"w-full overflow-hidden",style:{aspectRatio:"720 / 300",borderRadius:k},children:jsxRuntime.jsx("img",{src:m.url,alt:m.alt||`Policy image ${F+1}`,className:"w-full h-full object-cover"})},F))}),(!y||y.length===0)&&N&&jsxRuntime.jsx("div",{className:"w-full p-4 rounded-lg border",style:{backgroundColor:`${i.primary}10`,borderColor:`${i.primary}30`},dangerouslySetInnerHTML:{__html:N}}),f&&t.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[x==="dropdown"&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:"block text-sm font-medium mb-2",children:"Service Category"}),jsxRuntime.jsxs("select",{value:n||"all",onChange:m=>s(m.target.value==="all"?null:m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:border-transparent transition-all",style:{"--tw-ring-color":i.primary},children:[jsxRuntime.jsx("option",{value:"all",children:"All Services"}),t.map(m=>jsxRuntime.jsx("option",{value:m.id,children:m.name},m.id))]})]}),x==="tabs"&&jsxRuntime.jsxs("div",{className:"flex gap-2 flex-wrap",children:[jsxRuntime.jsx("button",{onClick:()=>s(null),className:`px-4 py-2 rounded-lg transition-all text-sm font-medium ${n===null?"text-white shadow-lg":"border border-gray-300 hover:border-gray-400"}`,style:{backgroundColor:n===null?i.primary:void 0},children:"All Services"}),t.map(m=>jsxRuntime.jsx("button",{onClick:()=>s(m.id),className:`px-4 py-2 rounded-lg transition-all text-sm font-medium ${n===m.id?"text-white shadow-lg":"border border-gray-300 hover:border-gray-400"}`,style:{backgroundColor:n===m.id?i.primary:void 0},children:m.name},m.id))]}),x==="pills"&&jsxRuntime.jsxs("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-hide",children:[jsxRuntime.jsx("button",{onClick:()=>s(null),className:`px-5 py-2 rounded-full transition-all text-sm font-medium whitespace-nowrap ${n===null?"text-white shadow-md":"bg-gray-100 hover:bg-gray-200"}`,style:{backgroundColor:n===null?i.primary:void 0},children:"All"}),t.map(m=>jsxRuntime.jsx("button",{onClick:()=>s(m.id),className:`px-5 py-2 rounded-full transition-all text-sm font-medium whitespace-nowrap ${n===m.id?"text-white shadow-md":"bg-gray-100 hover:bg-gray-200"}`,style:{backgroundColor:n===m.id?i.primary:void 0},children:m.name},m.id))]}),x==="chips"&&jsxRuntime.jsxs("div",{className:"flex gap-2 flex-wrap",children:[jsxRuntime.jsxs("button",{onClick:()=>s(null),className:`px-3 py-1.5 rounded-lg transition-all text-xs font-medium flex items-center gap-1.5 ${n===null?"text-white":"border border-gray-300 bg-white hover:border-gray-400"}`,style:{backgroundColor:n===null?i.primary:void 0,borderColor:n===null?i.primary:void 0},children:[n===null&&jsxRuntime.jsx("span",{className:"text-[10px]",children:"\u2713"}),"All"]}),t.map(m=>jsxRuntime.jsxs("button",{onClick:()=>s(m.id),className:`px-3 py-1.5 rounded-lg transition-all text-xs font-medium flex items-center gap-1.5 ${n===m.id?"text-white":"border border-gray-300 bg-white hover:border-gray-400"}`,style:{backgroundColor:n===m.id?i.primary:void 0,borderColor:n===m.id?i.primary:void 0},children:[n===m.id&&jsxRuntime.jsx("span",{className:"text-[10px]",children:"\u2713"}),m.name]},m.id))]})]}),f&&x==="accordion"?jsxRuntime.jsx("div",{className:"space-y-4",children:t.map(m=>{let F=l.has(m.id),M=e.filter(A=>A.category===m.id);return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("button",{onClick:()=>{let A=new Set(l);F?A.delete(m.id):A.add(m.id),c(A);},className:"w-full flex items-center justify-between py-2 border-b-2 transition-all group",style:{borderColor:F?i.primary:"#e5e7eb"},children:[jsxRuntime.jsx("span",{className:"font-semibold text-left transition-colors",style:{color:F?i.primary:void 0},children:m.name}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:`w-4 h-4 transition-all ${F?"rotate-180":""}`,style:{color:F?i.primary:"#9ca3af"}})]}),F&&jsxRuntime.jsx("div",{className:`mt-4 ${d==="grid"?`grid ${S} gap-3`:"space-y-3"}`,children:M.map(A=>R(A,d))})]},m.id)})}):d==="grid"?jsxRuntime.jsx("div",{className:`grid ${S} gap-3`,children:I.map(m=>R(m,"grid"))}):jsxRuntime.jsx("div",{className:"space-y-3",children:I.map(m=>R(m,"list"))})]})}function oi(){let e=[],t=new Date;t.setHours(0,0,0,0);for(let r=0;r<3;r++){let a=new Date(t.getFullYear(),t.getMonth()+r,1),o=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();for(let i=1;i<=o;i++){if(new Date(a.getFullYear(),a.getMonth(),i)<t||Math.random()>.6)continue;let s=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(i).padStart(2,"0")}`;e.push(s);}}return e}var ko={avoid:{bg:"#FEE2E2",text:"#991B1B",label:"Avoid"},caution:{bg:"#FEF3C7",text:"#92400E",label:"Caution"},optimal:{bg:"#D1FAE5",text:"#065F46",label:"Optimal"},neutral:{bg:"#F3F4F6",text:"#4B5563",label:"Neutral"}};function nr({availableDates:e,selectedDate:t,onDateSelect:r,settings:a,colors:o,cyclePhases:i,selectedService:n,addons:s=[],selectedAddons:l=[],onAddonsChange:c,addonPlacement:d="date_selection"}){console.log("[DateSelection] Addon Debug:",{addonsLength:s.length,hasOnAddonsChange:!!c,addonPlacement:d,showAddons:d!=="separate_step"&&s.length>0&&!!c,addons:s,selectedService:n});let u=a.calendarView||"month",p=a.headerContent?.value||"Select a Date",g=!e||e.length===0,b=Ge.useMemo(()=>g?oi():e,[g,e]),v=Ge.useMemo(()=>{let D=new Date;if(D.setHours(0,0,0,0),b.length>0){let T=b.find(P=>new Date(P)>=D);if(T){let P=new Date(T);return `${P.getFullYear()}-${String(P.getMonth()+1).padStart(2,"0")}`}}return `${D.getFullYear()}-${String(D.getMonth()+1).padStart(2,"0")}`},[b]),[w,f]=Ge.useState(v),x=Ge.useMemo(()=>new Set(b),[b]),[y,N]=w.split("-").map(Number),h=["January","February","March","April","May","June","July","August","September","October","November","December"][N-1],k=Ge.useMemo(()=>{let D=new Date(y,N-1,1),T=new Date(y,N,0),P=D.getDay(),z=T.getDate(),K=[];for(let Y=0;Y<P;Y++)K.push(null);for(let Y=1;Y<=z;Y++){let Te=`${y}-${String(N).padStart(2,"0")}-${String(Y).padStart(2,"0")}`,U=new Date(Te),ie=new Date;ie.setHours(0,0,0,0),K.push({day:Y,dateStr:Te,isAvailable:x.has(Te)&&U>=ie});}return K},[y,N,x]),S=Ge.useMemo(()=>{let D=new Date(y,N-2,1),T=`${D.getFullYear()}-${String(D.getMonth()+1).padStart(2,"0")}`;return b.some(P=>P.startsWith(T))},[b,y,N]),I=Ge.useMemo(()=>{let D=new Date(y,N,1),T=`${D.getFullYear()}-${String(D.getMonth()+1).padStart(2,"0")}`;return b.some(P=>P.startsWith(T))},[b,y,N]),R=()=>{if(!S)return;let D=new Date(y,N-2,1);f(`${D.getFullYear()}-${String(D.getMonth()+1).padStart(2,"0")}`);},m=()=>{if(!I)return;let D=new Date(y,N,1);f(`${D.getFullYear()}-${String(D.getMonth()+1).padStart(2,"0")}`);},F=i&&Object.keys(i).length>0,M=()=>{let D=n?.price||0;return l.length>0&&s.length>0&&l.forEach(T=>{let P=s.find(z=>z.id===T);P&&(D+=P.addonPrice||P.price||0);}),D},A=D=>{if(!c)return;let T=l.includes(D);c(T?l.filter(P=>P!==D):[...l,D]);};return jsxRuntime.jsxs("div",{className:"space-y-6",children:[n&&jsxRuntime.jsx(framerMotion.motion.div,{...ge(.05),className:"bg-gradient-to-br from-white to-gray-50/30 rounded-xl border border-gray-200/80 p-6 shadow-sm hover:shadow-md transition-shadow",children:jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2 mb-3",children:jsxRuntime.jsx("h3",{className:"text-sm font-semibold tracking-wide uppercase",style:{color:o.primary},children:"Your Selection"})}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("p",{className:"font-bold text-lg text-gray-900",children:n.name}),n.description&&jsxRuntime.jsx("p",{className:"text-sm text-gray-600 leading-relaxed",children:n.description}),n.duration&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-gray-500",children:[jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),jsxRuntime.jsxs("span",{children:[n.duration," minutes"]})]})]})]}),jsxRuntime.jsxs("div",{className:"text-right",children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-500 mb-1 font-medium",children:"Price"}),jsxRuntime.jsxs("div",{className:"text-2xl font-bold",style:{color:o.primary},children:["$",n.price]})]})]})}),d!=="separate_step"&&s.length>0&&c&&jsxRuntime.jsxs(framerMotion.motion.div,{...ge(.1),className:"bg-white rounded-xl border border-gray-200/80 p-6 shadow-sm hover:shadow-md transition-shadow",children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2 mb-4",children:jsxRuntime.jsx("h3",{className:"text-sm font-semibold tracking-wide uppercase",style:{color:o.primary},children:"Enhance Your Experience"})}),jsxRuntime.jsx("div",{className:"space-y-3",children:s.map(D=>{let T=l.includes(D.id),P=D.addonPrice||D.price||0;return jsxRuntime.jsxs("label",{className:"flex items-start gap-4 p-4 rounded-xl border-2 cursor-pointer transition-all group",style:{borderColor:T?o.primary:"#E5E7EB",backgroundColor:T?`${o.primary}08`:"transparent",boxShadow:T?`0 0 0 3px ${o.primary}15`:"none"},children:[jsxRuntime.jsx("div",{className:"flex items-center pt-0.5",children:jsxRuntime.jsx("input",{type:"checkbox",checked:T,onChange:()=>A(D.id),className:"w-5 h-5 rounded border-2 border-gray-300 cursor-pointer",style:{accentColor:o.primary}})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-3 mb-1",children:[jsxRuntime.jsx("span",{className:"font-semibold text-base text-gray-900 group-hover:text-gray-700 transition-colors",children:D.name}),jsxRuntime.jsxs("span",{className:"text-base font-bold whitespace-nowrap flex-shrink-0",style:{color:o.primary},children:["+$",P]})]}),D.description&&jsxRuntime.jsx("p",{className:"text-sm text-gray-600 leading-relaxed",children:D.description})]})]},D.id)})}),l.length>0&&jsxRuntime.jsx("div",{className:"mt-6 pt-5 border-t-2 border-gray-100",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-500 mb-1 font-medium uppercase tracking-wide",children:"New Total"}),jsxRuntime.jsxs("div",{className:"text-sm text-gray-600",children:["Service + ",l.length," add-on",l.length>1?"s":""]})]}),jsxRuntime.jsxs("div",{className:"text-3xl font-bold",style:{color:o.primary},children:["$",M()]})]})})]}),jsxRuntime.jsx(framerMotion.motion.h2,{...ge(.15),className:"text-xl sm:text-2xl font-bold text-center sm:text-left",style:{color:o.primary},children:p}),F&&jsxRuntime.jsx(framerMotion.motion.div,{...ge(.1),className:"bg-white rounded-lg border border-gray-200 px-4 py-3",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 text-xs",children:[jsxRuntime.jsx("span",{className:"font-medium flex items-center",style:{color:o.primary},children:"Cycle Calendar:"}),jsxRuntime.jsx("div",{className:"flex items-center gap-3",children:Object.entries(ko).map(([D,T])=>jsxRuntime.jsxs("div",{className:"flex items-center space-x-1.5",children:[jsxRuntime.jsx("div",{className:"w-3 h-3 rounded border border-gray-300",style:{backgroundColor:T.bg}}),jsxRuntime.jsx("span",{children:T.label})]},D))})]})}),u==="month"?jsxRuntime.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsxRuntime.jsx("button",{className:`p-2 rounded transition-colors ${S?"hover:bg-gray-100":"opacity-30 cursor-not-allowed"}`,onClick:R,disabled:!S,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"w-4 h-4"})}),jsxRuntime.jsxs("p",{className:"font-semibold",children:[h," ",y]}),jsxRuntime.jsx("button",{className:`p-2 rounded transition-colors ${I?"hover:bg-gray-100":"opacity-30 cursor-not-allowed"}`,onClick:m,disabled:!I,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-4 h-4"})})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(D=>jsxRuntime.jsx("div",{className:"text-center text-xs font-medium py-2 opacity-60",children:D},D)),k.map((D,T)=>{if(!D)return jsxRuntime.jsx("div",{},`empty-${T}`);let{day:P,dateStr:z,isAvailable:K}=D,Y=t===z,Te=i?.[z],U=Te?ko[Te]:null;return jsxRuntime.jsx("button",{onClick:()=>K&&r(z),disabled:!K,className:`aspect-square rounded-lg text-sm transition-all ${Y?"text-white shadow-lg font-semibold":K?"hover:scale-105 cursor-pointer":"bg-gray-50 text-gray-300 cursor-not-allowed opacity-40"}`,style:{backgroundColor:Y?o.primary:U?.bg||void 0,color:Y?"white":U?.text||void 0},children:P},z)})]})]}):jsxRuntime.jsx("div",{className:"grid grid-cols-5 gap-3",children:b.slice(0,5).map(D=>{let T=new Date(D),P=T.getDate(),K=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][T.getDay()],Y=t===D;return jsxRuntime.jsxs("button",{onClick:()=>r(D),className:`p-4 rounded-lg border-2 transition-all text-center ${Y?"border-current text-white":"border-gray-200 hover:border-gray-300"}`,style:{borderColor:Y?o.primary:void 0,backgroundColor:Y?o.primary:void 0},children:[jsxRuntime.jsx("p",{className:"text-xs mb-1 opacity-75",children:K}),jsxRuntime.jsx("p",{className:"text-2xl font-semibold",children:P})]},D)})})]})}function Hn({availableTimes:e,selectedTime:t,onTimeSelect:r,settings:a,serviceDuration:o,colors:i,selectedService:n,selectedDate:s,selectedAddons:l=[],addons:c=[]}){let d=a.timeFormat||"12h",u=a.showDuration!==false,p=a.headerContent?.value||"Pick a Time",g=a.columns||3,b=()=>{let x=n?.price||0;return l.length>0&&c.length>0&&l.forEach(y=>{let N=c.find(C=>C.id===y);N&&(x+=N.addonPrice||N.price||0);}),x},v=x=>new Date(x+"T00:00:00").toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"}),w=x=>{let y=x.trim().split(" "),[N,C]=y[0].split(":"),h=parseInt(N),k=C||"00";if(y.length>1){let S=y[1];return d==="24h"?(S==="PM"&&h!==12?h+=12:S==="AM"&&h===12&&(h=0),`${String(h).padStart(2,"0")}:${k}`):x}if(d==="12h"){let S=h>=12?"PM":"AM";return `${h===0?12:h>12?h-12:h}:${k} ${S}`}return `${String(h).padStart(2,"0")}:${k}`},f={2:"grid-cols-2",3:"grid-cols-2 sm:grid-cols-3",4:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"}[g]||"grid-cols-3";return jsxRuntime.jsxs("div",{className:"space-y-6",children:[n&&s&&jsxRuntime.jsxs(framerMotion.motion.div,{...ge(.05),className:"bg-gradient-to-br from-white to-gray-50/30 rounded-xl border border-gray-200/80 p-6 shadow-sm hover:shadow-md transition-shadow",children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2 mb-4",children:jsxRuntime.jsx("h3",{className:"text-sm font-semibold tracking-wide uppercase",style:{color:i.primary},children:"Your Booking"})}),jsxRuntime.jsxs("div",{className:"mb-3",children:[jsxRuntime.jsx("p",{className:"font-bold text-lg text-gray-900",children:n.name}),n.duration&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-gray-500 mt-1",children:[jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),jsxRuntime.jsxs("span",{children:[n.duration," minutes"]})]})]}),l.length>0&&c.length>0&&jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("p",{className:"text-sm font-bold text-gray-900 mb-2",children:"Add-ons"}),jsxRuntime.jsx("div",{className:"space-y-2",children:l.map(x=>{let y=c.find(N=>N.id===x);return y?jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm text-gray-700 font-medium",children:y.name}),jsxRuntime.jsxs("span",{className:"text-sm font-semibold text-gray-900",children:["$",y.addonPrice||y.price||0]})]},x):null})})]}),jsxRuntime.jsx("div",{className:"border-t border-gray-200 -mx-6 mb-4"}),jsxRuntime.jsx("div",{className:"bg-gray-50/50 -mx-6 px-6 py-4 mb-4",children:jsxRuntime.jsx("div",{className:"flex items-center justify-between",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("svg",{className:"w-5 h-5",style:{color:i.primary},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),jsxRuntime.jsx("span",{className:"font-bold text-base text-gray-900",children:v(s)})]})})}),jsxRuntime.jsx("div",{className:"border-t border-gray-200 -mx-6 mb-4"}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-base font-bold text-gray-900",children:"Total"}),jsxRuntime.jsxs("span",{className:"text-2xl font-bold",style:{color:i.primary},children:["$",b()]})]})]}),jsxRuntime.jsx(framerMotion.motion.h2,{...ge(n&&s?.15:.05),className:"text-xl sm:text-2xl font-bold text-center sm:text-left",style:{color:i.primary},children:p}),jsxRuntime.jsx(framerMotion.motion.div,{className:`grid ${f} gap-3`,initial:{opacity:0},animate:{opacity:1},transition:{duration:.3,delay:n&&s?.2:.1},children:e.map((x,y)=>{let N=t===x;return jsxRuntime.jsxs(framerMotion.motion.button,{onClick:()=>r(x),className:`p-3 rounded-lg border-2 transition-all text-center hover:scale-105 ${N?"border-current text-white shadow-lg":"border-gray-200 hover:border-gray-300"}`,style:{borderColor:N?i.primary:void 0,backgroundColor:N?i.primary:void 0},initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2,delay:.15+y*.03,ease:"easeOut"},children:[jsxRuntime.jsx("p",{className:"font-medium",children:w(x)}),u&&o&&jsxRuntime.jsxs("p",{className:"text-xs mt-1 opacity-75",children:[o," min"]})]},x)})})]})}function Wn({addons:e,selectedAddons:t,onAddonsChange:r,settings:a,colors:o}){let i=a.headerContent?.value||"Add Extras",n=a.subheaderContent?.value||"Enhance your experience with these optional add-ons",s=a.showPricing!==false,l=a.showDuration!==false,c=d=>{let u=t.includes(d)?t.filter(p=>p!==d):[...t,d];r(u);};return jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs(framerMotion.motion.div,{...ge(.05),className:"text-center sm:text-left",children:[jsxRuntime.jsx("h2",{className:"text-xl sm:text-2xl font-bold mb-2",style:{color:o.primary},children:i}),jsxRuntime.jsx("p",{className:"text-sm opacity-70",children:n})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:e.map((d,u)=>{let p=t.includes(d.id);return jsxRuntime.jsxs(framerMotion.motion.button,{onClick:()=>c(d.id),className:`p-4 rounded-lg border-2 transition-all text-left relative ${p?"border-current shadow-lg":"border-gray-200 hover:border-gray-300"}`,style:{borderColor:p?o.primary:void 0,backgroundColor:p?`${o.primary}10`:void 0},initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.1+u*.05},children:[p&&jsxRuntime.jsx("div",{className:"absolute top-3 right-3 w-6 h-6 rounded-full flex items-center justify-center text-white text-sm",style:{backgroundColor:o.primary},children:"\u2713"}),jsxRuntime.jsx("p",{className:"font-semibold mb-1 pr-8",children:d.name}),jsxRuntime.jsx("p",{className:"text-xs opacity-70 mb-3",children:d.description}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s&&jsxRuntime.jsxs("span",{className:"font-bold",style:{color:o.primary},children:["+$",d.price]}),l&&jsxRuntime.jsxs("span",{className:"opacity-60",children:["+",d.duration," min"]})]})]},d.id)})}),t.length>0&&jsxRuntime.jsxs(framerMotion.motion.div,{className:"bg-gray-50 rounded-lg p-4 mt-4",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},children:[jsxRuntime.jsx("p",{className:"text-sm font-medium mb-2",children:"Selected Add-ons:"}),jsxRuntime.jsx("div",{className:"space-y-1",children:t.map(d=>{let u=e.find(p=>p.id===d);return u?jsxRuntime.jsxs("div",{className:"flex justify-between text-sm",children:[jsxRuntime.jsx("span",{children:u.name}),jsxRuntime.jsxs("span",{className:"font-medium",style:{color:o.primary},children:["+$",u.price]})]},d):null})})]})]})}function jn({isOpen:e,onClose:t,title:r,children:a,isRequired:o=false,maxHeight:i="80vh"}){return Ge.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset";}),[e]),Ge.useEffect(()=>{if(!o&&e){let n=s=>{s.key==="Escape"&&t();};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)}},[e,o,t]),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(framerMotion.motion.div,{...rr.backdrop,onClick:o?void 0:t,className:"fixed inset-0 bg-black/50 z-50",style:{backdropFilter:"blur(4px)"}}),jsxRuntime.jsxs(framerMotion.motion.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:rr.spring,className:"fixed bottom-0 left-0 right-0 bg-white rounded-t-2xl shadow-2xl z-50",style:{maxHeight:i},children:[jsxRuntime.jsx("div",{className:"flex justify-center pt-3 pb-2",children:jsxRuntime.jsx("div",{className:"w-12 h-1 bg-gray-300 rounded-full"})}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-6 pb-4 border-b border-gray-200",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[r&&jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:r}),o&&jsxRuntime.jsx("span",{className:"text-xs font-medium px-2 py-0.5 bg-amber-100 text-amber-800 rounded",children:"Required"})]}),!o&&jsxRuntime.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors","aria-label":"Close",children:jsxRuntime.jsx(lucideReact.X,{className:"w-5 h-5"})})]}),jsxRuntime.jsx("div",{className:"overflow-y-auto",style:{maxHeight:`calc(${i} - 120px)`},children:jsxRuntime.jsx("div",{className:"px-6 py-6",children:a})})]})]})})}function Vn({contactInfo:e,onContactInfoChange:t,settings:r,optInModules:a=[],onOptInData:o,colors:i,isPreview:n=false}){let[s,l]=Ge.useState(false),[c,d]=Ge.useState(null),[u,p]=Ge.useState(()=>{let m={};return a.forEach(F=>{F.defaultChecked&&(m[F.id]=true);}),m}),[g,b]=Ge.useState({}),[v,w]=Ge.useState({}),f=Ge.useRef(false);Ge.useEffect(()=>{f.current||(f.current=true,a.forEach(m=>{m.defaultChecked&&m.renderCustomForm&&o&&m.renderCustomForm(()=>{},F=>o(m.id,F),i);}));},[]);let x=r.headerContent?.value||"Your Information",y=m=>m?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(m)?null:"Please enter a valid email address":"Email is required",N=m=>m?m.replace(/\D/g,"").length<10?"Please enter a valid phone number":null:"Phone number is required",C=m=>!m||m.trim().length===0?"Name is required":m.trim().length<2?"Name must be at least 2 characters":null,h=(m,F)=>{switch(m){case "email":return y(F);case "phone":return N(F);case "name":return C(F);default:return null}},k=[{label:"Name *",type:"text",placeholder:"Your full name",field:"name"},{label:"Email *",type:"email",placeholder:"your@email.com",field:"email"},{label:"Phone *",type:"tel",placeholder:"(555) 123-4567",field:"phone"},{label:"Notes (optional)",type:"textarea",placeholder:"Any special requests or notes...",field:"notes"}],S=(m,F)=>{if(t({...e,[m]:F}),!n&&v[m]){let M=h(m,F);b(A=>({...A,[m]:M||""}));}},I=m=>{if(n)return;w(A=>({...A,[m]:true}));let F=e[m]||"",M=h(m,F);b(A=>({...A,[m]:M||""}));},R=(m,F)=>{if(p(M=>({...M,[m.id]:F})),F){if(m.renderCustomForm){let M=false;if(m.renderCustomForm(()=>{},D=>{o&&o(m.id,D),M=true;},i)===null&&M)return}d(m),l(true);}else o&&o(m.id,null);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx(framerMotion.motion.h2,{...ge(.05),className:"text-xl sm:text-2xl font-bold text-center sm:text-left",style:{color:i.primary},children:x}),jsxRuntime.jsxs("div",{className:"space-y-3",children:[k.map((m,F)=>jsxRuntime.jsxs(framerMotion.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.3,delay:.1+F*.05,ease:"easeOut"},children:[jsxRuntime.jsx("label",{className:"block text-sm font-medium mb-1",children:m.label}),m.type==="textarea"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("textarea",{className:`w-full px-3 py-2 border rounded-lg focus:ring-2 focus:border-transparent resize-none transition-all ${!n&&g[m.field]&&v[m.field]?"border-red-500":"border-gray-300"}`,style:{"--tw-ring-color":i.primary},rows:3,placeholder:m.placeholder,value:e[m.field]||"",onChange:M=>S(m.field,M.target.value),onBlur:()=>I(m.field)}),!n&&g[m.field]&&v[m.field]&&jsxRuntime.jsx("p",{className:"text-red-500 text-xs mt-1",children:g[m.field]})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:m.type,className:`w-full px-3 py-2 border rounded-lg focus:ring-2 focus:border-transparent transition-all ${!n&&g[m.field]&&v[m.field]?"border-red-500":"border-gray-300"}`,style:{"--tw-ring-color":i.primary},placeholder:m.placeholder,value:e[m.field]||"",onChange:M=>S(m.field,M.target.value),onBlur:()=>I(m.field)}),!n&&g[m.field]&&v[m.field]&&jsxRuntime.jsx("p",{className:"text-red-500 text-xs mt-1",children:g[m.field]})]})]},m.label)),a.length>0&&jsxRuntime.jsx(framerMotion.motion.div,{className:"pt-3 border-t border-gray-200 space-y-3",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.3},children:a.map(m=>jsxRuntime.jsxs("label",{className:"flex items-start gap-3 cursor-pointer group",children:[jsxRuntime.jsx("input",{type:"checkbox",checked:u[m.id]||false,onChange:F=>R(m,F.target.checked),className:"mt-1 w-4 h-4 rounded border-gray-300",style:{accentColor:i.primary}}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("span",{className:"text-sm font-medium",children:[m.label,m.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.description&&jsxRuntime.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:m.description})]})]},m.id))})]})]}),c&&jsxRuntime.jsx(jn,{isOpen:s,onClose:()=>l(false),title:c.formTitle||"Additional Information",isRequired:c.required,children:c.renderCustomForm?c.renderCustomForm(()=>l(false),m=>{o&&o(c.id,m);},i):jsxRuntime.jsxs("div",{className:"space-y-4",children:[c.formFields?.map(m=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:"block text-sm font-medium mb-1",children:[m.label,m.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.type==="textarea"?jsxRuntime.jsx("textarea",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:border-transparent resize-none",style:{"--tw-ring-color":i.primary},rows:3,placeholder:m.placeholder}):m.type==="select"&&m.options?jsxRuntime.jsx("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:border-transparent",style:{"--tw-ring-color":i.primary},children:m.options.map(F=>jsxRuntime.jsx("option",{value:F.value,children:F.label},F.value))}):jsxRuntime.jsx("input",{type:m.type,className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:border-transparent",style:{"--tw-ring-color":i.primary},placeholder:m.placeholder})]},m.id)),jsxRuntime.jsx("button",{onClick:()=>{o&&c&&o(c.id,{}),l(false);},className:"w-full py-3 rounded-lg text-white font-medium transition-all hover:opacity-90",style:{backgroundColor:i.primary},children:"Save & Continue"})]})})]})}function Yn({service:e,addons:t=[],selectedDate:r,selectedTime:a,paymentProvider:o,paymentConfig:i,onConfirm:n,colors:s,isPreview:l=false}){let c=e?.price||0,d=t.reduce((y,N)=>y+(N.addonPrice||N.price||0),0),u=c+d,p=e?.duration||0,g=t.reduce((y,N)=>y+(N.duration||0),0),b=p+g,v=i.depositPercentage||20,w=(u*(v/100)).toFixed(2),f=u.toFixed(2),x=(parseFloat(f)-parseFloat(w)).toFixed(2);return jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx(framerMotion.motion.h2,{...ge(.05),className:"text-xl font-bold text-center",style:{color:s.primary},children:"Confirm & Pay"}),jsxRuntime.jsx(framerMotion.motion.div,{className:"bg-gray-50 rounded-lg p-4",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.1},children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[e&&jsxRuntime.jsxs("div",{className:"flex justify-between items-center text-sm",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium",children:e.name}),jsxRuntime.jsxs("p",{className:"text-xs opacity-70",children:[b," min total"]})]}),jsxRuntime.jsxs("span",{className:"font-bold",style:{color:s.primary},children:["$",c]})]}),t.length>0&&jsxRuntime.jsx("div",{className:"space-y-1 text-xs",children:t.map(y=>jsxRuntime.jsxs("div",{className:"flex justify-between opacity-70",children:[jsxRuntime.jsxs("span",{children:["+ ",y.name]}),jsxRuntime.jsxs("span",{children:["+$",y.addonPrice||y.price||0]})]},y.id))}),r&&jsxRuntime.jsxs("div",{className:"flex justify-between items-center text-sm pt-2 border-t border-gray-200",children:[jsxRuntime.jsx("span",{className:"opacity-70",children:new Date(r+"T00:00:00").toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}),jsxRuntime.jsx("span",{children:a})]}),jsxRuntime.jsxs("div",{className:"pt-2 mt-2 border-t border-gray-200 flex justify-between items-center",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"Due Today"}),jsxRuntime.jsxs("span",{className:"text-lg font-bold",style:{color:s.primary},children:["$",w]})]})]})}),jsxRuntime.jsx(framerMotion.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.2},children:l?jsxRuntime.jsxs("div",{className:"border border-gray-200 rounded-lg p-4 bg-white",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"h-10 bg-gray-50 border border-gray-200 rounded flex items-center px-3",children:jsxRuntime.jsx("span",{className:"text-xs text-gray-400",children:"Card Number"})}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[jsxRuntime.jsx("div",{className:"h-10 bg-gray-50 border border-gray-200 rounded flex items-center px-3",children:jsxRuntime.jsx("span",{className:"text-xs text-gray-400",children:"MM/YY"})}),jsxRuntime.jsx("div",{className:"h-10 bg-gray-50 border border-gray-200 rounded flex items-center px-3",children:jsxRuntime.jsx("span",{className:"text-xs text-gray-400",children:"CVV"})})]})]}),jsxRuntime.jsxs("div",{className:"mt-3 flex items-center justify-center gap-1",children:[jsxRuntime.jsx("svg",{className:"w-3 h-3 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),jsxRuntime.jsxs("span",{className:"text-xs text-gray-400",children:["Powered by ",o==="square"?"Square":"Stripe"]})]})]}):jsxRuntime.jsx("div",{className:"border border-gray-200 rounded-lg p-4 bg-white",children:jsxRuntime.jsxs("div",{className:"text-center py-8 text-sm text-gray-500",children:[jsxRuntime.jsxs("div",{className:"animate-pulse",children:["Initializing ",o==="square"?"Square":"Stripe"," payment..."]}),jsxRuntime.jsx("div",{className:"mt-4 text-xs text-gray-400",children:"Please wait while we securely load the payment form"})]})})}),jsxRuntime.jsx(framerMotion.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.3},children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsxs("label",{className:"flex items-start gap-2 cursor-pointer",children:[jsxRuntime.jsx("input",{type:"checkbox",className:"mt-0.5 w-4 h-4 rounded border-gray-300",style:{accentColor:s.primary}}),jsxRuntime.jsxs("span",{className:"text-xs",children:["I agree to the ",jsxRuntime.jsx("a",{href:"#",className:"underline",style:{color:s.primary},children:"cancellation policy"})," and understand the $",x," balance is due at appointment."]})]}),jsxRuntime.jsxs("label",{className:"flex items-start gap-2 cursor-pointer",children:[jsxRuntime.jsx("input",{type:"checkbox",className:"mt-0.5 w-4 h-4 rounded border-gray-300",style:{accentColor:s.primary}}),jsxRuntime.jsxs("span",{className:"text-xs",children:["I agree to the ",jsxRuntime.jsx("a",{href:"#",className:"underline",style:{color:s.primary},children:"terms of service"}),"."]})]})]})})]})}var Io={avoid:{phase:"avoid",color:"#EF4444",bgColor:"#FEF2F2",label:"Avoid",icon:"\u{1F534}",description:"Period - avoid waxing"},caution:{phase:"caution",color:"#F59E0B",bgColor:"#FFFBEB",label:"Caution",icon:"\u{1F7E1}",description:"End of period - proceed with caution"},optimal:{phase:"optimal",color:"#10B981",bgColor:"#F0FDF4",label:"Optimal",icon:"\u{1F7E2}",description:"Best time for waxing"},neutral:{phase:"neutral",color:"#6B7280",bgColor:"#F9FAFB",label:"Neutral",icon:"\u26AA",description:"Okay but not optimal"},unknown:{phase:"unknown",color:"#9CA3AF",bgColor:"#F3F4F6",label:"Unknown",icon:"\u2753",description:"No cycle data available"}};function pi({availableDates:e,selectedDate:t,onDateSelect:r,settings:a,colors:o,fetchCycleData:i,selectedClient:n,onCycleWarning:s,cycleAwareEnabled:l}){let[c,d]=Ge.useState({}),[u,p]=Ge.useState(false),[g,b]=Ge.useState(null),v=Ge.useMemo(()=>l!==void 0?l:!!(n?.cycle_opt_in&&i),[l,n?.cycle_opt_in,i]);Ge.useEffect(()=>{if(!v||!i||!n){d({});return}e.length!==0&&(p(true),b(null),i(n,e).then(f=>{d(f);}).catch(f=>{console.error("[CycleAwareDateSelection] Error fetching cycle data:",f),b(f.message||"Failed to load cycle data"),d({});}).finally(()=>{p(false);}));},[v,i,n,e]);let w=Ge.useCallback(f=>{let x=c[f];x?.phase==="avoid"&&s&&s(x,f),r(f,x);},[c,r,s]);return jsxRuntime.jsxs("div",{className:"cycle-aware-date-selection space-y-4",children:[v&&Object.keys(c).length>0&&jsxRuntime.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[jsxRuntime.jsxs("h4",{className:"font-medium mb-3 flex items-center",style:{color:o.primary},children:[jsxRuntime.jsx("span",{className:"mr-2",children:"\u{1F4C5}"}),"Your Cycle Calendar"]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-3 text-sm",children:Object.entries(Io).map(([f,x])=>f!=="unknown"&&jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full border border-gray-300",style:{backgroundColor:x.color}}),jsxRuntime.jsx("span",{children:x.label})]},f))}),jsxRuntime.jsx("p",{className:"text-xs opacity-70 mt-2",children:"Green dates are optimal for comfortable waxing appointments"})]}),v&&u&&jsxRuntime.jsx("div",{className:"text-center py-2 text-sm opacity-70",children:"Loading cycle predictions..."}),v&&g&&jsxRuntime.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-3",children:jsxRuntime.jsxs("p",{className:"text-yellow-800 text-sm",children:["Unable to load cycle predictions: ",g]})}),jsxRuntime.jsx(nr,{availableDates:e,selectedDate:t,onDateSelect:w,settings:a,colors:o}),v&&t&&c[t]?.phase==="avoid"&&jsxRuntime.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:jsxRuntime.jsxs("div",{className:"flex items-start space-x-3",children:[jsxRuntime.jsx("span",{className:"text-red-500 text-xl",children:"\u26A0\uFE0F"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h4",{className:"font-medium text-red-800 mb-1",children:"This date falls during your predicted period"}),jsxRuntime.jsx("p",{className:"text-red-700 text-sm mb-3",children:"Waxing during this time may be more uncomfortable than usual. Would you like to see better alternatives?"}),jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx("button",{className:"px-3 py-1 bg-red-100 text-red-700 rounded text-sm hover:bg-red-200 transition-colors",onClick:()=>{let f=e.filter(x=>c[x]?.phase==="optimal");f.length>0&&w(f[0]);},children:"Show optimal dates"}),jsxRuntime.jsx("button",{className:"px-3 py-1 text-red-600 text-sm hover:underline",children:"Continue anyway"})]})]})]})})]})}var gi={enabled:true,duration:6e5,warningThreshold:12e4,maxExtensions:2,extensionDuration:3e5,showActions:true,showWarning:true};function Tr({holdStatus:e,config:t,colors:r,onExtend:a,onRelease:o,onWarning:i,onExpired:n,className:s=""}){let[l,c]=Ge.useState(Date.now()),[d,u]=Ge.useState(false),[p,g]=Ge.useState(false),[b,v]=Ge.useState(false),w={...gi,...t};Ge.useEffect(()=>{if(!e)return;let F=setInterval(()=>{c(Date.now());},1e3);return ()=>clearInterval(F)},[e]);let f=e?Math.max(0,e.expiresAt-l):0,x=f===0&&e!==null,y=f<=w.warningThreshold&&f>0;Ge.useEffect(()=>{y&&!d&&i&&e&&(u(true),i(f));},[y,d,i,e,f]),Ge.useEffect(()=>{x&&e&&n&&n();},[x,e,n]),Ge.useEffect(()=>{u(false);},[e?.holdKey]);let N=Ge.useCallback(async()=>{if(!(!a||!e||p))try{g(!0),await a(),u(!1);}catch(F){console.error("[HoldTimer] Failed to extend hold:",F);}finally{g(false);}},[a,e,p]),C=Ge.useCallback(async()=>{if(!(!o||!e||b))try{v(!0),await o();}catch(F){console.error("[HoldTimer] Failed to release hold:",F);}finally{v(false);}},[o,e,b]);if(!e||!w.enabled)return null;let h=Math.floor(f/6e4),k=Math.floor(f%6e4/1e3),S=`${h}:${k.toString().padStart(2,"0")}`,I="rgba(139, 92, 246, 0.1)",R="rgba(139, 92, 246, 0.3)",m=r.primary;return x?(I="rgba(239, 68, 68, 0.1)",R="rgba(239, 68, 68, 0.3)",m="#EF4444"):y&&w.showWarning&&(I=`${r.secondary}1A`,R=`${r.secondary}4D`,m=r.secondary),jsxRuntime.jsx("div",{className:`rounded-lg p-4 text-center ${s}`,style:{backgroundColor:I,borderWidth:"1px",borderStyle:"solid",borderColor:R},children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsxRuntime.jsx("div",{className:"flex flex-col items-center gap-2 mb-4",children:x?jsxRuntime.jsxs("div",{style:{color:m},className:"font-medium text-base",children:[jsxRuntime.jsx("span",{children:"Time expired - "}),jsxRuntime.jsx("button",{onClick:C,disabled:b,className:"underline hover:no-underline focus:outline-none focus:ring-2 focus:ring-offset-2 inline disabled:opacity-50",style:{color:m},children:b?"Releasing...":"select a new time"})]}):jsxRuntime.jsxs("div",{style:{color:m},className:"font-medium text-base",children:["Your time slot is reserved for ",S]})}),w.showActions&&!x&&jsxRuntime.jsxs("div",{className:"flex justify-center gap-2",children:[a&&e.canExtend&&jsxRuntime.jsxs("button",{onClick:N,disabled:!e.canExtend||p,className:"px-4 py-2 text-sm font-medium rounded transition-all active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed text-white",style:{backgroundColor:r.primary},"aria-label":`Extend hold (${e.maxExtensions-e.extensions} extensions remaining)`,children:[p?"Extending...":"Extend",!p&&e.maxExtensions-e.extensions>0&&jsxRuntime.jsxs("span",{className:"ml-1",children:["(",e.maxExtensions-e.extensions,")"]})]}),o&&jsxRuntime.jsx("button",{onClick:C,disabled:b,className:"px-4 py-2 text-sm font-medium rounded border transition-all active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",style:{borderColor:"rgba(255, 255, 255, 0.2)",color:r.text||"#000000"},"aria-label":"Release hold and return to time selection",children:b?"Releasing...":"Release"})]}),!x&&!e.canExtend&&e.extensions>=e.maxExtensions&&jsxRuntime.jsx("div",{className:"mt-3 pt-3 border-t border-white/10 text-center",children:jsxRuntime.jsxs("div",{className:"text-sm",style:{color:r.secondary},children:["Maximum extensions reached - complete booking now or"," ",jsxRuntime.jsx("button",{onClick:C,disabled:b,className:"hover:underline focus:outline-none focus:underline disabled:opacity-50",style:{color:r.primary},children:b?"releasing...":"select a different time"})]})})]})})}function Ro({config:e,colors:t,services:r=[],categories:a=[],dates:o=[],times:i=[],addons:n=[],paymentProvider:s,paymentConfig:l,isPreview:c=false,onComplete:d,onStepChange:u,onServiceSelect:p,onDateSelect:g,onContactInfoChange:b,validateStep:v,holdTimer:w,stepOrder:f,optInModules:x=[],onOptInData:y,customPaymentForm:N,cyclePhases:C}){let[h,k]=Ge.useState(0),[S,I]=Ge.useState("forward"),[R,m]=Ge.useState(null),[F,M]=Ge.useState(null),[A,D]=Ge.useState(null),[T,P]=Ge.useState([]),[z,K]=Ge.useState({}),[Y,Te]=Ge.useState({}),[U,ie]=Ge.useState(null),Xe=t.bookingText||t.text||"#000000",ot=e.transitions||{},ve=ot.style||"slide",At=ot.speed||"normal",je=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,fe=e.background||{type:"color",value:"#FFFFFF"},O={service:{id:"service",name:"Service",enabled:e.steps?.service_selection?.enabled!==false,settings:e.steps?.service_selection?.settings||{}},date:{id:"date",name:"Date",enabled:e.steps?.date_selection?.enabled!==false,settings:e.steps?.date_selection?.settings||{}},time:{id:"time",name:"Time",enabled:e.steps?.time_selection?.enabled!==false,settings:e.steps?.time_selection?.settings||{}},addons:{id:"addons",name:"Add-ons",enabled:e.steps?.addon_selection?.enabled===true,settings:e.steps?.addon_selection?.settings||{}},details:{id:"details",name:"Details",enabled:e.steps?.contact_form?.enabled!==false,settings:e.steps?.contact_form?.settings||{}},confirm:{id:"confirm",name:"Confirm",enabled:e.steps?.confirmation?.enabled===true,settings:e.steps?.confirmation?.settings||{}}},Ne=f||["service","date","time","addons","details","confirm"],J=Ne.map(E=>O[E]).filter(E=>E&&E.enabled);console.log("[BookingFlow] Step configuration:",{customStepOrder:f,orderedStepIds:Ne,allSteps:J.map(E=>E.id),currentStepIndex:h,currentStepId:J[h]?.id});let re=J[h],at=()=>fe.type==="gradient"?{background:fe.value}:fe.type==="image"?{backgroundImage:`url(${fe.value})`,backgroundSize:"cover",backgroundPosition:"center"}:{backgroundColor:fe.value},it=()=>{if(je)return .15;switch(At){case "fast":return .2;case "slow":return .5;default:return .3}},fr=()=>ve==="fade"?{enter:()=>({opacity:0,scale:.95}),center:{opacity:1,scale:1},exit:()=>({opacity:0,scale:.95})}:{enter:()=>({x:S==="forward"?50:-50,opacity:0}),center:{x:0,opacity:1},exit:()=>({x:S==="forward"?-50:50,opacity:0})},Kt=()=>{let E=re?.id;if(v)return v(E,{service:R,date:F,time:A,addons:T,contact:z});switch(E){case "service":return R!==null;case "date":return F!==null;case "time":return A!==null;case "details":if(c)return true;let W=z?.name&&z.name.trim().length>=2,_=z?.email&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(z.email),ye=z?.phone&&z.phone.replace(/\D/g,"").length>=10;return W&&_&&ye;default:return true}},$t=E=>E<h,Ce=E=>{I(E>h?"forward":"backward"),k(E),u&&u(E,J[E]?.id);},bt=()=>{h<J.length-1&&Ce(h+1);},Lt=async()=>{if(h===0)return;let E=h-1;if(J[E]?.id==="time"&&U&&w?.releaseHold)try{await w.releaseHold(U.holdId),ie(null),D(null);}catch(_){console.error("[BookingFlow] Failed to release hold:",_);}Ce(E);},yr=async E=>{if(D(E),w?.enabled&&w.createHold&&F&&R)try{let W=r.find(ye=>ye.id===R),_=await w.createHold({date:F,time:E,serviceId:R,serviceDuration:W?.duration||60});ie(_);}catch(W){console.error("[BookingFlow] Failed to create hold:",W);return}bt();},br=()=>{ie(null),D(null);let E=J.findIndex(W=>W.id==="time");E>=0&&Ce(E);},Jt=async()=>{d&&d({service:R,date:F,time:A,addons:T,contact:z,optIn:Y});},Zr=()=>{if(!re)return null;let E={settings:re.settings,colors:t},W=r.find(_=>_.id===R);switch(re.id){case "service":return jsxRuntime.jsx(On,{...E,services:r,categories:a,selectedService:R,onServiceSelect:se=>{m(se),p&&p(se);}});case "date":return jsxRuntime.jsx(nr,{...E,availableDates:o,selectedDate:F,onDateSelect:se=>{M(se),g&&g(se);},cyclePhases:C,selectedService:W,addons:n,selectedAddons:T,onAddonsChange:P,addonPlacement:e.steps?.addon_selection?.settings?.placement||"date_selection"});case "time":return jsxRuntime.jsx(Hn,{...E,availableTimes:i,selectedTime:A,onTimeSelect:yr,serviceDuration:W?.duration||60,selectedService:W,selectedDate:F,selectedAddons:T,addons:n});case "addons":return jsxRuntime.jsx(Wn,{...E,addons:n,selectedAddons:T,onAddonsChange:P});case "details":return jsxRuntime.jsx(Vn,{...E,contactInfo:z,onContactInfoChange:se=>{K(se),b&&b(se);},optInModules:x,onOptInData:y});case "confirm":let _=n.filter(se=>T.includes(se.id)),ye=_.reduce((se,Pe)=>se+(Pe.addonPrice||Pe.price||0),0),hr=(W?.price||0)+ye,xr=_.reduce((se,Pe)=>Pe.affectsDuration&&Pe.additionalDuration?se+Pe.additionalDuration:se,W?.duration||60);return N?jsxRuntime.jsx(N,{bookingData:{service:R,serviceName:W?.name,date:F,time:A,addons:T,contact:z,amount:W?.price||0,duration:xr,clientName:z?.name,clientEmail:z?.email,clientPhone:z?.phone,pendingBooking:{customerClientId:null,serviceId:R,date:F,time:A,notes:z?.notes||"",selectedAddons:_,addonServices:T,addonTotalCost:ye,totalAmount:hr,duration:xr}},onPaymentSuccess:Jt,onPaymentError:Pe=>{console.error("[BookingFlow] Payment error:",Pe);}}):jsxRuntime.jsx(Yn,{...E,service:W,addons:_,selectedDate:F||"",selectedTime:A||"",paymentProvider:s||"square",paymentConfig:l||{depositPercentage:20},isPreview:c,onConfirm:Jt});default:return null}},st=()=>{let E=e.progressBar?.style||"dots";return E==="bar"?jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-2",children:[jsxRuntime.jsxs("span",{className:"text-sm font-medium",children:["Step ",h+1," of ",J.length]}),jsxRuntime.jsx("span",{className:"text-xs opacity-60",children:re?.name})]}),jsxRuntime.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:jsxRuntime.jsx(framerMotion.motion.div,{className:"h-full rounded-full",style:{backgroundColor:t.primary},initial:{width:0},animate:{width:`${(h+1)/J.length*100}%`},transition:{duration:.3,ease:"easeOut"}})})]}):E==="minimal"?jsxRuntime.jsxs("div",{className:"mb-6 text-center",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",style:{color:t.primary},children:re?.name}),jsxRuntime.jsxs("p",{className:"text-xs opacity-60 mt-1",children:["Step ",h+1," of ",J.length]})]}):jsxRuntime.jsx("div",{className:"flex justify-center mb-4 overflow-x-auto py-2",children:jsxRuntime.jsx("div",{className:"flex items-center space-x-1.5 px-4 min-w-max",children:J.map((W,_)=>jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx(framerMotion.motion.div,{className:`w-6 h-6 rounded-full flex items-center justify-center font-medium text-xs transition-all flex-shrink-0 ${_===h?"text-white shadow-md":$t(_)?"text-white":"bg-gray-200 text-gray-500"}`,style:{backgroundColor:_<=h?t.primary:void 0},animate:{scale:_===h?1.05:1},transition:{duration:.2},children:$t(_)?"\u2713":_+1}),_<J.length-1&&jsxRuntime.jsx(framerMotion.motion.div,{className:`w-4 h-0.5 mx-1 transition-all flex-shrink-0 ${_<h?"":"bg-gray-200"}`,style:{backgroundColor:_<h?t.primary:void 0},initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.3,delay:.1}})]},W.id))})})};return jsxRuntime.jsxs("div",{className:"w-full max-w-4xl mx-auto p-6 rounded-2xl shadow-xl",style:{...at(),color:Xe},children:[st(),w?.enabled&&U&&re?.id!=="time"&&jsxRuntime.jsx(Tr,{holdStatus:U,config:w.config,colors:t,onExtend:async()=>{if(w.extendHold&&U)try{let E=await w.extendHold(U.holdId);ie(E);}catch(E){console.error("[BookingFlow] Failed to extend hold:",E);}},onRelease:async()=>{if(w.releaseHold&&U)try{await w.releaseHold(U.holdId),ie(null),D(null);let E=J.findIndex(W=>W.id==="time");E>=0&&Ce(E);}catch(E){console.error("[BookingFlow] Failed to release hold:",E);}},onExpired:br,className:"mb-6"}),jsxRuntime.jsx("div",{className:"mb-6 min-h-[300px] relative overflow-hidden",children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",custom:S,children:jsxRuntime.jsx(framerMotion.motion.div,{custom:S,variants:fr(),initial:"enter",animate:"center",exit:"exit",transition:{duration:it(),ease:[.4,0,.2,1]},children:Zr()},h)})}),!(re?.id==="confirm"&&N)&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-gray-200",children:[jsxRuntime.jsx("button",{onClick:Lt,disabled:h===0,className:"px-4 py-2 rounded-lg border border-gray-300 disabled:opacity-30 disabled:cursor-not-allowed hover:bg-gray-50 transition-all text-sm font-medium",children:"Back"}),h<J.length-1?jsxRuntime.jsx("button",{onClick:bt,disabled:!Kt(),className:"px-6 py-2 rounded-lg text-white disabled:opacity-50 disabled:cursor-not-allowed hover:opacity-90 transition-all text-sm font-medium shadow-md",style:{backgroundColor:t.primary},children:"Next"}):jsxRuntime.jsx("button",{onClick:Jt,disabled:!Kt(),className:"px-6 py-2 rounded-lg text-white disabled:opacity-50 disabled:cursor-not-allowed hover:opacity-90 transition-all text-sm font-medium shadow-md",style:{backgroundColor:t.primary},children:re?.id==="confirm"?"Pay & Confirm":"Complete"})]})]})}function yi({section:e,theme:t,BookingFlowComponent:r,config:a,enableInlineEditing:o=false}){let{type:i,settings:n}=e,s=e.id;i==="video_section"&&console.log("\u{1F3AC} Rendering video_section:",{type:i,settings:n,sectionId:s});let l=t?.colors||{primary:"#BCB4FF",secondary:"#CAC426",text:"#000000"},c=t?.typography||{headingFont:"Geist Sans",bodyFont:"Inter",bodySize:"16px"};switch(i){case "logo":return jsxRuntime.jsx(tn,{logoUrl:n.logoUrl,fallbackText:n.fallbackText,size:n.size,alignment:n.alignment,colors:l,enableInlineEditing:o,sectionId:s});case "header":return jsxRuntime.jsx(nn,{name:n.name,title:n.title,bio:n.bio,showName:n.showName,showTitle:n.showTitle,showBio:n.showBio,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "featured_link":return jsxRuntime.jsx(on,{text:n.text,url:n.url,style:n.style,size:n.size,colors:l,enableInlineEditing:o,sectionId:s});case "link_list":return jsxRuntime.jsx(sn,{links:n.links||[],style:n.style,colors:l,enableInlineEditing:o,sectionId:s});case "social_bar":return jsxRuntime.jsx(ln,{platforms:n.platforms||[],socialLinks:n.socialLinks,style:n.style,size:n.size,position:n.position,invertIcons:n.invertIcons,colors:l,enableInlineEditing:o,sectionId:s});case "instagram_feed":return jsxRuntime.jsx(Fn,{username:n.username,colors:l,enableInlineEditing:o,sectionId:s});case "minimal_header":return jsxRuntime.jsx(bn,{brandName:n.brandName,logoUrl:n.logoUrl,style:n.style,alignment:n.alignment,sticky:n.sticky,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "minimal_navigation":return jsxRuntime.jsx(xn,{links:n.links||[],style:n.style,colors:l,enableInlineEditing:o,sectionId:s});case "feature_content":return jsxRuntime.jsx(wn,{headline:n.headline,description:n.description,image:n.image,buttonText:n.buttonText,buttonUrl:n.buttonUrl,showButton:n.showButton,layout:n.layout,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "minimal_footer":return jsxRuntime.jsx(vn,{alignment:n.alignment,showSocial:n.showSocial,showContact:n.showContact,showLinks:n.showLinks,footerText:n.footerText,colors:l,enableInlineEditing:o,sectionId:s});case "hero":return jsxRuntime.jsx(cn,{headline:n.headline,subheadline:n.subheadline,heroImage:n.heroImage,ctaButton:n.ctaButton,layout:n.layout,imagePosition:n.imagePosition,contentDisplay:n.contentDisplay,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "about":return jsxRuntime.jsx(dn,{title:n.title,content:n.content,image:n.image,layout:n.layout,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "services_preview":return jsxRuntime.jsx(un,{title:n.title,services:n.services,layout:n.layout,columns:n.columns,showPrices:n.showPrices,showDuration:n.showDuration,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "gallery":return jsxRuntime.jsx(mn,{title:n.title,images:n.images||[],columns:n.columns,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "testimonials":return jsxRuntime.jsx(gn,{title:n.title,testimonials:n.testimonials,layout:n.layout,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "team":return jsxRuntime.jsx(fn,{title:n.title,members:n.members,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "contact":return jsxRuntime.jsx(yn,{title:n.title,showForm:n.showForm,email:n.email,phone:n.phone,address:n.address,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "before_after":return jsxRuntime.jsx(Cn,{title:n.title,comparisons:n.comparisons,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "pricing_table":return jsxRuntime.jsx(Sn,{title:n.title,plans:n.plans,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "booking":return jsxRuntime.jsx(En,{config:a||{},colors:l,BookingFlowComponent:r,enableInlineEditing:o,sectionId:s});case "fixed_info_card":return jsxRuntime.jsx(In,{name:n.name,subheading:n.subheading,bio:n.bio,links:n.links||[],bookingButtonText:n.bookingButtonText,bookingButtonUrl:n.bookingButtonUrl,showBookingButton:n.showBookingButton,position:n.position,cardWidth:n.cardWidth,cardColor:n.cardColor,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "video_section":return jsxRuntime.jsx(Rn,{videoUrl:n.videoUrl,aspectRatio:n.aspectRatio,autoplay:n.autoplay,loop:n.loop,muted:n.muted,controls:n.controls,allowFullScreen:n.allowFullScreen,coverImage:n.coverImage,maxWidth:n.maxWidth,alignment:n.alignment,borderRadius:n.borderRadius,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "scrolling_text_divider":return jsxRuntime.jsx(Pn,{text:n.text,scrollDirection:n.scrollDirection,scrollSpeed:n.scrollSpeed,orientation:n.orientation,dividerIcon:n.dividerIcon,customIcon:n.customIcon,textSize:n.textSize,textColor:n.textColor,fontWeight:n.fontWeight,backgroundColor:n.backgroundColor,backgroundGradient:n.backgroundGradient,pauseOnHover:n.pauseOnHover,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "location_map":return jsxRuntime.jsx(An,{address:n.address,displayType:n.displayType,mapHeight:n.mapHeight,mapStyle:n.mapStyle,zoom:n.zoom,showMarker:n.showMarker,borderRadius:n.borderRadius,directionsButtonText:n.directionsButtonText,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "image_section":return jsxRuntime.jsx(Mn,{imageUrl:n.imageUrl,altText:n.altText,caption:n.caption,maxWidth:n.maxWidth,alignment:n.alignment,aspectRatio:n.aspectRatio,borderRadius:n.borderRadius,linkUrl:n.linkUrl,openInNewTab:n.openInNewTab,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "faq_section":return jsxRuntime.jsx($n,{title:n.title,faqs:n.faqs,layout:n.layout,maxWidth:n.maxWidth,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "navbar":return jsxRuntime.jsx(Bn,{brandName:n.brandName,logoUrl:n.logoUrl,showLogo:n.showLogo,showBrandName:n.showBrandName,links:n.links,ctaText:n.ctaText,ctaUrl:n.ctaUrl,sticky:n.sticky,transparentOnTop:n.transparentOnTop,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "text_section":return jsxRuntime.jsx(zn,{title:n.title,content:n.content,alignment:n.alignment,maxWidth:n.maxWidth,textSize:n.textSize,backgroundColor:n.backgroundColor,textColor:n.textColor,paddingY:n.paddingY,colors:l,typography:c,enableInlineEditing:o,sectionId:s});default:return jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsx("div",{className:"max-w-4xl mx-auto p-8 rounded-lg border-2 border-dashed text-center",style:{borderColor:l.primary,opacity:.5},children:jsxRuntime.jsxs("p",{className:"text-lg",style:{color:l.text},children:["Unknown section type: ",i]})})})}}var Xn=null;function xi(){if(!Xn){let e=undefined.VITE_SUPABASE_URL||process.env.NEXT_PUBLIC_SUPABASE_URL,t=undefined.VITE_SUPABASE_ANON_KEY||process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;if(!e||!t)throw new Error("Supabase URL and Anon Key must be provided");Xn=supabaseJs.createClient(e,t);}return Xn}var nt={bucket:"form-uploads",limits:{maxSize:5*1024*1024,allowedTypes:["image/jpeg","image/png","image/webp","image/jpg"]}};async function To(e,t,r){if(console.log("\u{1F4E6} uploadFormImage called:",{fileName:e.name,clientId:t,formId:r}),e.size>nt.limits.maxSize)throw new Error(`File size exceeds maximum of ${nt.limits.maxSize/1024/1024}MB`);if(!nt.limits.allowedTypes.includes(e.type))throw new Error(`File type ${e.type} not allowed. Accepted types: JPG, PNG, WebP`);console.log("\u{1F3A8} Starting image optimization...");let a=await vi(e);console.log("\u2705 Image optimized:",{originalSize:e.size,optimizedSize:a.size});let o=Date.now();e.name.split(".").pop()?.toLowerCase()||"jpg";let n=e.name.replace(/[^a-zA-Z0-9.-]/g,"_").substring(0,50),s=`${o}_${n}`,l=`${t}/${r}/${s}`;console.log("\u2601\uFE0F Uploading to Supabase:",{filePath:l,bucket:nt.bucket});let c=xi(),{data:d,error:u}=await c.storage.from(nt.bucket).upload(l,a,{cacheControl:"3600",upsert:false,contentType:a.type});if(console.log("\u{1F4E4} Upload result:",{data:d,error:u}),u)throw console.error("\u274C Supabase upload error:",u),new Error(`Upload failed: ${u.message}`);console.log("\u2705 Upload successful, getting public URL...");let{data:{publicUrl:p}}=c.storage.from(nt.bucket).getPublicUrl(l);return console.log("\u2705 Public URL obtained:",p),{url:p,path:l,filename:e.name,size:a.size,type:a.type}}async function vi(e,t=1920,r=.85){console.log("\u{1F5BC}\uFE0F optimizeImage: Starting optimization");let a=e.type==="image/png"||e.type==="image/webp",o=a?e.type:"image/jpeg";return console.log("\u{1F5BC}\uFE0F optimizeImage: Output type:",o,"Transparency:",a),new Promise((i,n)=>{let s=setTimeout(()=>{console.error("\u23F1\uFE0F optimizeImage: Timeout after 30 seconds"),n(new Error("Image optimization timed out"));},3e4),l=new Image,c=document.createElement("canvas"),d=c.getContext("2d",{alpha:a});if(!d){clearTimeout(s),console.error("\u274C optimizeImage: Canvas context not available"),n(new Error("Canvas context not available"));return}console.log("\u{1F5BC}\uFE0F optimizeImage: Created canvas and context"),l.onload=()=>{console.log("\u{1F5BC}\uFE0F optimizeImage: Image loaded",{width:l.width,height:l.height});try{let u=Math.min(t/l.width,1);c.width=l.width*u,c.height=l.height*u,console.log("\u{1F5BC}\uFE0F optimizeImage: Resizing to",{width:c.width,height:c.height}),a&&d.clearRect(0,0,c.width,c.height),d.drawImage(l,0,0,c.width,c.height),console.log("\u{1F5BC}\uFE0F optimizeImage: Image drawn, converting to blob..."),c.toBlob(p=>{if(clearTimeout(s),!p){console.error("\u274C optimizeImage: Blob conversion failed"),n(new Error("Image optimization failed"));return}console.log("\u2705 optimizeImage: Blob created",{size:p.size,type:o});let g=new File([p],e.name,{type:o,lastModified:Date.now()});console.log("\u2705 optimizeImage: Optimization complete"),i(g);},o,r);}catch(u){clearTimeout(s),console.error("\u274C optimizeImage: Error during processing",u),n(u);}},l.onerror=u=>{clearTimeout(s),console.error("\u274C optimizeImage: Failed to load image",u),n(new Error("Failed to load image"));},console.log("\u{1F5BC}\uFE0F optimizeImage: Creating object URL and loading image..."),l.src=URL.createObjectURL(e);})}function Po(e){return e.size>nt.limits.maxSize?{valid:false,error:`File size exceeds maximum of ${nt.limits.maxSize/1024/1024}MB`}:nt.limits.allowedTypes.includes(e.type)?{valid:true}:{valid:false,error:"File type not allowed. Accepted: JPG, PNG, WebP"}}function Ar({field:e,value:t,error:r,onChange:a,businessId:o,formId:i,styling:n}){let s=Ge.useRef(null),[l,c]=Ge.useState(false),[d,u]=Ge.useState(null),p=n?.labelColor||"#374151",g=n?.fieldStyle||"outlined",v=(()=>{let f="w-full px-4 py-2 transition-all focus:outline-none";if(r)return `${f} bg-red-50 border border-red-300 rounded-lg focus:ring-2 focus:ring-red-500`;switch(g){case "filled":return `${f} bg-gray-100 border border-transparent rounded-lg focus:bg-white focus:ring-2 focus:ring-gray-900 focus:border-transparent`;case "underlined":return `${f} bg-transparent border-0 border-b-2 border-gray-300 rounded-none focus:border-gray-900 focus:ring-0 px-0`;case "minimal":return `${f} bg-transparent border border-gray-200 rounded-lg focus:border-gray-400 focus:ring-1 focus:ring-gray-300`;case "outlined":default:return `${f} bg-white border-2 border-gray-300 rounded-lg focus:border-gray-900 focus:ring-2 focus:ring-gray-900`}})(),w="block text-sm font-medium mb-1";if(e.type==="text"||e.type==="email"||e.type==="tel")return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsx("input",{type:e.type,id:e.id,name:e.id,value:t||"",onChange:f=>a(f.target.value),placeholder:e.placeholder,required:e.required,className:v,style:{color:p}}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]});if(e.type==="textarea")return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsx("textarea",{id:e.id,name:e.id,value:t||"",onChange:f=>a(f.target.value),placeholder:e.placeholder,required:e.required,rows:4,className:v,style:{color:p}}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]});if(e.type==="date")return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsx("input",{type:"date",id:e.id,name:e.id,value:t||"",onChange:f=>a(f.target.value),required:e.required,className:v,style:{color:p}}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]});if(e.type==="select"&&e.options)return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsxs("select",{id:e.id,name:e.id,value:t||"",onChange:f=>a(f.target.value),required:e.required,className:v,style:{color:p},children:[jsxRuntime.jsx("option",{value:"",children:"Select an option..."}),e.options.map(f=>jsxRuntime.jsx("option",{value:f.value,children:f.label},f.value))]}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]});if(e.type==="radio"&&e.options)return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsx("div",{className:"space-y-2 mt-2",children:e.options.map(f=>jsxRuntime.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[jsxRuntime.jsx("input",{type:"radio",name:e.id,value:f.value,checked:t===f.value,onChange:x=>a(x.target.value),required:e.required,className:"w-4 h-4 text-gray-900 focus:ring-gray-900 focus:ring-2"}),jsxRuntime.jsx("span",{className:"text-sm",style:{color:n?.labelColor||"#000000"},children:f.label})]},f.value))}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]});if(e.type==="checkbox"&&e.options){let f=Array.isArray(t)?t:[],x=y=>{let N=f.includes(y)?f.filter(C=>C!==y):[...f,y];a(N);};return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsx("div",{className:"space-y-2 mt-2",children:e.options.map(y=>jsxRuntime.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[jsxRuntime.jsx("input",{type:"checkbox",name:`${e.id}[]`,value:y.value,checked:f.includes(y.value),onChange:()=>x(y.value),className:"w-4 h-4 text-gray-900 focus:ring-gray-900 focus:ring-2 rounded"}),jsxRuntime.jsx("span",{className:"text-sm",style:{color:n?.labelColor||"#000000"},children:y.label})]},y.value))}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]})}if(e.type==="photo"){let f=async x=>{let y=x.target.files?.[0];if(!y)return;u(null);let N=Po(y);if(!N.valid){u(N.error||"Invalid file"),s.current&&(s.current.value="");return}if(!o||!i){u("Missing required configuration for file upload"),s.current&&(s.current.value="");return}c(true);try{let C=await To(y,o,i);a({url:C.url,filename:C.filename,size:C.size,type:C.type,uploadedAt:new Date().toISOString()}),u(null);}catch(C){console.error("Photo upload error:",C),u(C instanceof Error?C.message:"Upload failed"),s.current&&(s.current.value="");}finally{c(false);}};return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsxs("div",{className:"mt-1",children:[jsxRuntime.jsx("input",{ref:s,type:"file",id:e.id,name:e.id,accept:"image/*",onChange:f,required:e.required,disabled:l,className:`block w-full text-sm text-gray-500
10
+ `}),jsxRuntime.jsxs("div",{className:`flex items-center whitespace-nowrap ${h[n]} ${k[l]} uppercase tracking-wider`,style:{fontFamily:g?.headingFont||"inherit",color:s||p.text,animation:`scroll-${t} ${C}s linear infinite`,animationPlayState:w?"paused":"running"},children:[jsxRuntime.jsx("span",{className:"inline-block",children:I}),jsxRuntime.jsx("span",{className:"inline-block","aria-hidden":"true",children:I})]})]})}function An({address:e,displayType:t="both",mapHeight:r="medium",mapStyle:a="roadmap",zoom:o=15,showMarker:i=true,borderRadius:n=12,directionsButtonText:s="Get Directions",colors:l,typography:c,enableInlineEditing:d=false,sectionId:u=""}){let g={small:300,medium:400,large:500}[r],b=encodeURIComponent(e),v=`https://www.google.com/maps/dir/?api=1&destination=${b}`,f=`https://www.google.com/maps/embed/v1/place?key=${undefined?.VITE_GOOGLE_MAPS_API_KEY||typeof globalThis<"u"&&globalThis.process?.env?.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY||""}&q=${b}&zoom=${o}&maptype=${a}`;return jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsxs("div",{className:"max-w-4xl mx-auto",children:[(t==="map-only"||t==="both")&&e&&jsxRuntime.jsx("div",{className:"w-full overflow-hidden mb-6",style:{height:`${g}px`,borderRadius:`${n}px`},children:jsxRuntime.jsx("iframe",{src:f,className:"w-full h-full",style:{border:0},allowFullScreen:true,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Location Map"})}),(t==="address-only"||t==="both")&&jsxRuntime.jsx("div",{className:"p-6 rounded-lg border",style:{backgroundColor:`${l.primary}10`,borderColor:`${l.primary}30`,borderRadius:`${n}px`},children:jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[jsxRuntime.jsx("div",{className:"flex-1",children:jsxRuntime.jsxs("div",{className:"flex items-start gap-3",children:[jsxRuntime.jsxs("svg",{className:"w-5 h-5 mt-0.5 flex-shrink-0",fill:"none",stroke:l.primary,viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium mb-1",style:{color:l.text,fontFamily:c?.bodyFont||"inherit"},...d&&{"data-editable":true,"data-section-id":u,"data-field-path":"settings.address"},children:e||"Add your address"}),e&&jsxRuntime.jsx("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-sm underline hover:no-underline",style:{color:l.primary},children:"View in Google Maps \uFFFD"})]})]})}),e&&jsxRuntime.jsx("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 rounded-lg font-semibold transition-all hover:opacity-90 text-center",style:{backgroundColor:l.primary,color:"#FFFFFF"},children:s})]})}),!e&&jsxRuntime.jsxs("div",{className:"p-12 rounded-lg border-2 border-dashed text-center",style:{borderColor:`${l.primary}30`,borderRadius:`${n}px`},children:[jsxRuntime.jsxs("svg",{className:"w-12 h-12 mx-auto mb-4",fill:"none",stroke:l.primary,viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),jsxRuntime.jsx("p",{style:{color:l.text,opacity:.6},children:"Add your business address to display a map"})]})]})})}function Mn({imageUrl:e,altText:t="",caption:r,maxWidth:a="large",alignment:o="center",aspectRatio:i="auto",borderRadius:n=12,linkUrl:s,openInNewTab:l=true,colors:c,typography:d,enableInlineEditing:u=false,sectionId:p=""}){let g={full:"max-w-full",large:"max-w-6xl",medium:"max-w-4xl",small:"max-w-2xl"},b={auto:null,"16:9":"56.25%","4:3":"75%","1:1":"100%","3:2":"66.67%"},v=o==="center"?"mx-auto":o==="right"?"ml-auto":"mr-auto",w=jsxRuntime.jsxs("div",{className:`${g[a]} ${v}`,children:[jsxRuntime.jsx("div",{className:"relative w-full overflow-hidden",style:{borderRadius:`${n}px`,...b[i]&&{paddingBottom:b[i]}},children:e?jsxRuntime.jsx("img",{src:e,alt:t||"Image",className:i==="auto"?"w-full h-auto":"absolute top-0 left-0 w-full h-full object-cover",style:{borderRadius:`${n}px`}}):jsxRuntime.jsx("div",{className:"flex items-center justify-center bg-gray-100",style:{backgroundColor:`${c.primary}10`,borderRadius:`${n}px`,minHeight:i==="auto"?"300px":void 0},children:jsxRuntime.jsxs("div",{className:"text-center px-4",children:[jsxRuntime.jsx("svg",{className:"w-16 h-16 mx-auto mb-4",fill:"none",stroke:c.primary,viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),jsxRuntime.jsx("p",{style:{color:c.text,opacity:.6},children:"Add an image URL to display"})]})})}),r&&e&&jsxRuntime.jsx("p",{className:"mt-3 text-sm text-center",style:{color:c.text,opacity:.7,fontFamily:d?.bodyFont||"inherit"},...u&&{"data-editable":true,"data-section-id":p,"data-field-path":"settings.caption"},children:r})]});return jsxRuntime.jsx("div",{className:a==="full"?"w-full":"container mx-auto px-4",children:s&&e?jsxRuntime.jsx("a",{href:s,target:l?"_blank":"_self",rel:l?"noopener noreferrer":void 0,className:"block",children:w}):w})}function Xa({faq:e,index:t,colors:r,typography:a,enableInlineEditing:o,sectionId:i}){let[n,s]=Ge.useState(false);return jsxRuntime.jsxs("div",{className:"border-b border-opacity-10",style:{borderColor:r.text},children:[jsxRuntime.jsxs("button",{onClick:()=>s(!n),className:"w-full py-4 px-6 flex items-center justify-between text-left hover:bg-opacity-5 transition-colors",style:{backgroundColor:n?`${r.primary}10`:"transparent"},children:[jsxRuntime.jsx("span",{className:"font-semibold text-lg pr-4",style:{color:r.text,fontFamily:a?.headingFont||"inherit"},...o&&{"data-editable":true,"data-section-id":i,"data-field-path":`settings.faqs.${t}.question`},children:e.question||"Add question..."}),jsxRuntime.jsx("svg",{className:"w-5 h-5 flex-shrink-0 transition-transform",style:{color:r.primary,transform:n?"rotate(180deg)":"rotate(0deg)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),n&&jsxRuntime.jsx("div",{className:"px-6 pb-4 pt-2",style:{color:r.text,opacity:.8,fontFamily:a?.bodyFont||"inherit"},...o&&{"data-editable":true,"data-section-id":i,"data-field-path":`settings.faqs.${t}.answer`},children:e.answer||"Add answer..."})]})}function $n({title:e="Frequently Asked Questions",faqs:t=[],layout:r="accordion",maxWidth:a="large",colors:o,typography:i,enableInlineEditing:n=false,sectionId:s=""}){return jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsxs("div",{className:`${{full:"max-w-full",large:"max-w-4xl",medium:"max-w-3xl",small:"max-w-2xl"}[a]} mx-auto`,children:[e&&jsxRuntime.jsx("h2",{className:"text-3xl font-bold text-center mb-8",style:{color:o.text,fontFamily:i?.headingFont||"inherit"},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":"settings.title"},children:e}),t.length>0?jsxRuntime.jsx("div",{className:"rounded-lg overflow-hidden",style:{border:`1px solid ${o.text}20`,backgroundColor:`${o.primary}05`},children:t.map((c,d)=>r==="accordion"?jsxRuntime.jsx(Xa,{faq:c,index:d,colors:o,typography:i,enableInlineEditing:n,sectionId:s},d):jsxRuntime.jsxs("div",{className:"border-b border-opacity-10 last:border-b-0 p-6",style:{borderColor:o.text},children:[jsxRuntime.jsx("h3",{className:"font-semibold text-lg mb-2",style:{color:o.text,fontFamily:i?.headingFont||"inherit"},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":`settings.faqs.${d}.question`},children:c.question||"Add question..."}),jsxRuntime.jsx("p",{style:{color:o.text,opacity:.8,fontFamily:i?.bodyFont||"inherit"},...n&&{"data-editable":true,"data-section-id":s,"data-field-path":`settings.faqs.${d}.answer`},children:c.answer||"Add answer..."})]},d))}):jsxRuntime.jsxs("div",{className:"p-12 rounded-lg border-2 border-dashed text-center",style:{borderColor:`${o.primary}30`,backgroundColor:`${o.primary}05`},children:[jsxRuntime.jsx("svg",{className:"w-12 h-12 mx-auto mb-4",fill:"none",stroke:o.primary,viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),jsxRuntime.jsx("p",{style:{color:o.text,opacity:.6},children:"Add FAQ items to get started"})]})]})})}function Bn({brandName:e="Your Brand",logoUrl:t,showLogo:r=true,showBrandName:a=true,links:o=[],ctaText:i,ctaUrl:n,sticky:s=true,transparentOnTop:l=false,colors:c,typography:d,enableInlineEditing:u=false,sectionId:p=""}){let[g,b]=Ge.useState(false),[v,w]=Ge.useState(false),[f,x]=Ge.useState("");Ge.useEffect(()=>{let h=()=>{w(window.scrollY>20);};return window.addEventListener("scroll",h),()=>window.removeEventListener("scroll",h)},[]),Ge.useEffect(()=>{let h=()=>{let k=o.filter(I=>I.url.startsWith("#")).map(I=>document.querySelector(`[data-section-id="${I.url.substring(1)}"]`)).filter(Boolean),S="";k.forEach(I=>{if(I){let R=I.getBoundingClientRect();R.top<=100&&R.bottom>=100&&(S=I.getAttribute("data-section-id")||"");}}),x(S);};return window.addEventListener("scroll",h),()=>window.removeEventListener("scroll",h)},[o]);let y=(h,k)=>{if(k.startsWith("#")){h.preventDefault();let S=k.substring(1),I=document.querySelector(`[data-section-id="${S}"]`);I&&I.scrollIntoView({behavior:"smooth",block:"start"}),b(false);}},N=l&&!v;return jsxRuntime.jsx("nav",{className:`${s?"sticky top-0 z-50":""} ${N?"bg-transparent":s?"bg-white/80 backdrop-blur-md border-b":"bg-white border-b"} transition-all duration-300`,style:{borderColor:N?"transparent":`${c.primary}20`},children:jsxRuntime.jsxs("div",{className:"container mx-auto px-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between h-16 md:h-20",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[r&&t&&jsxRuntime.jsx("img",{src:t,alt:e,className:"h-8 md:h-10 w-auto object-contain"}),a&&jsxRuntime.jsx("h1",{className:"text-xl md:text-2xl font-bold",style:{fontFamily:d?.headingFont||"inherit",color:c.text},...u&&{"data-editable":true,"data-section-id":p,"data-field-path":"settings.brandName"},children:e})]}),jsxRuntime.jsxs("div",{className:"hidden md:flex items-center gap-8",children:[o.map((h,k)=>{let S=h.url.startsWith("#")&&h.url.substring(1)===f;return jsxRuntime.jsxs("a",{href:h.url,onClick:I=>y(I,h.url),className:"relative text-base font-medium transition-colors group",style:{color:S?c.primary:c.text,fontFamily:d?.bodyFont||"inherit"},...h.linkType==="external"&&!h.url.startsWith("#")?{target:"_blank",rel:"noopener noreferrer"}:{},...u&&{"data-editable":true,"data-section-id":p,"data-field-path":`settings.links.${k}.label`},children:[h.label,jsxRuntime.jsx("span",{className:`absolute -bottom-1 left-0 h-0.5 transition-all ${S?"w-full":"w-0 group-hover:w-full"}`,style:{backgroundColor:c.primary}})]},h.id)}),i&&n&&jsxRuntime.jsx("a",{href:n,className:"px-6 py-2.5 rounded-full font-semibold transition-all hover:opacity-90 hover:scale-105",style:{backgroundColor:c.primary,color:c.buttonText||"#FFFFFF",fontFamily:d?.bodyFont||"inherit"},children:i})]}),jsxRuntime.jsx("button",{onClick:()=>b(!g),className:"md:hidden p-2 rounded-lg transition-colors hover:bg-black/5","aria-label":"Toggle menu",children:jsxRuntime.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:c.text,viewBox:"0 0 24 24",children:g?jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]}),jsxRuntime.jsx("div",{className:`md:hidden overflow-hidden transition-all duration-300 ${g?"max-h-96 pb-4":"max-h-0"}`,children:jsxRuntime.jsxs("div",{className:"flex flex-col space-y-3 pt-4 border-t",style:{borderColor:`${c.primary}20`},children:[o.map((h,k)=>{let S=h.url.startsWith("#")&&h.url.substring(1)===f;return jsxRuntime.jsx("a",{href:h.url,onClick:I=>y(I,h.url),className:"text-base font-medium py-2 px-4 rounded-lg transition-colors",style:{color:S?c.primary:c.text,backgroundColor:S?`${c.primary}10`:"transparent",fontFamily:d?.bodyFont||"inherit"},...h.linkType==="external"&&!h.url.startsWith("#")?{target:"_blank",rel:"noopener noreferrer"}:{},children:h.label},h.id)}),i&&n&&jsxRuntime.jsx("a",{href:n,className:"px-6 py-3 rounded-full font-semibold text-center transition-all hover:opacity-90",style:{backgroundColor:c.primary,color:c.buttonText||"#FFFFFF",fontFamily:d?.bodyFont||"inherit"},children:i})]})})]})})}function zn({title:e,content:t,alignment:r="left",maxWidth:a="medium",textSize:o="medium",backgroundColor:i,textColor:n,paddingY:s="medium",colors:l,typography:c,enableInlineEditing:d=false,sectionId:u=""}){let p={full:"max-w-full",large:"max-w-6xl",medium:"max-w-4xl",small:"max-w-2xl"},g={left:"text-left",center:"text-center",right:"text-right"},b={small:"text-sm",medium:"text-base",large:"text-lg"};return jsxRuntime.jsx("div",{className:{none:"py-0",small:"py-8",medium:"py-16",large:"py-24"}[s],style:{backgroundColor:i||"transparent"},children:jsxRuntime.jsx("div",{className:"container mx-auto px-4",children:jsxRuntime.jsxs("div",{className:`${p[a]} mx-auto ${g[r]}`,children:[e&&jsxRuntime.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",style:{color:n||l.text,fontFamily:c?.headingFont||"inherit"},...d&&{"data-editable":true,"data-section-id":u,"data-field-path":"settings.title"},children:e}),jsxRuntime.jsx("div",{className:`${b[o]} leading-relaxed whitespace-pre-wrap`,style:{color:n||l.text,fontFamily:c?.bodyFont||"inherit"},...d&&{"data-editable":true,"data-section-id":u,"data-field-path":"settings.content"},children:t||"Add your text content here..."})]})})})}function $c(e,t=false){if(t)return .15;switch(e){case "fast":return .2;case "slow":return .5;default:return .3}}function Ja(e=50){return {enter:t=>({x:t==="forward"?e:-e,opacity:0}),center:{x:0,opacity:1},exit:t=>({x:t==="forward"?-e:e,opacity:0})}}function Qa(){return {enter:()=>({opacity:0,scale:.95}),center:{opacity:1,scale:1},exit:()=>({opacity:0,scale:.95})}}function Lc(e,t){return e==="fade"?Qa():Ja(t)}var rr={easing:[.4,0,.2,1],spring:{type:"spring",damping:30,stiffness:300},staggerChildren:{staggerChildren:.05,delayChildren:.1},cardHover:{scale:1.02,transition:{duration:.2}},buttonHover:{scale:1.05,transition:{duration:.2}},fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},slideUp:{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"}},scaleIn:{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9}},slideInLeft:{initial:{opacity:0,x:-10},animate:{opacity:1,x:0}},slideInRight:{initial:{opacity:0,x:10},animate:{opacity:1,x:0}},backdrop:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}};function Bc(){return typeof window>"u"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function zc(e,t=.1,r=.05){return Array.from({length:e},(a,o)=>({initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:t+o*r,ease:rr.easing}}))}function ge(e=0,t=.3){return {initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:t,delay:e,ease:rr.easing}}}function On({services:e,categories:t=[],selectedService:r,onServiceSelect:a,settings:o,colors:i}){let[n,s]=Ge.useState(null),[l,c]=Ge.useState(new Set(t.length>0?[t[0].id]:[])),d=o.serviceLayout||"grid",u=o.columns||2,p=o.headerContent?.value||"Choose Your Service",g=o.subheaderContent?.value||"Select the service you'd like to book",b=o.showPricing!==false,v=o.showDuration!==false,w=o.showDescription!==false,f=o.enableCategories===true,x=o.categoryStyle||"dropdown",y=o.policyImages||[],N=o.policyText||null,C=o.imageSpacing||"small",h={none:"0px",small:"8px",medium:"16px",large:"24px"},k=o.imageBorderRadius||"0px",S={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"}[u]||"grid-cols-2",I=f&&n?e.filter(m=>m.category===n):e,R=(m,F)=>{let M=r===m.id;return jsxRuntime.jsx("button",{onClick:()=>a(m.id),className:`w-full ${F==="grid"?"h-full":""} p-4 rounded-lg border-2 transition-all text-left ${F==="grid"?"flex flex-col":""} ${M?"border-current shadow-lg":"border-gray-200 hover:border-gray-300"}`,style:{borderColor:M?i.primary:void 0,backgroundColor:M?`${i.primary}10`:void 0},children:F==="grid"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("p",{className:"font-semibold mb-1",children:m.name}),w&&jsxRuntime.jsx("p",{className:"text-xs opacity-70 mb-2 flex-1",children:m.description}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center text-sm mt-auto",children:[b&&jsxRuntime.jsxs("span",{className:"font-bold",style:{color:i.primary},children:["$",m.price]}),v&&jsxRuntime.jsxs("span",{className:"opacity-60",children:[m.duration," min"]})]})]}):jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"font-semibold mb-1",children:m.name}),w&&jsxRuntime.jsx("p",{className:"text-sm opacity-70",children:m.description})]}),jsxRuntime.jsxs("div",{className:"text-right ml-4",children:[b&&jsxRuntime.jsxs("p",{className:"font-bold",style:{color:i.primary},children:["$",m.price]}),v&&jsxRuntime.jsxs("p",{className:"text-sm opacity-60",children:[m.duration," min"]})]})]})},m.id)};return jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs(framerMotion.motion.div,{...ge(.05),className:"text-center sm:text-left",children:[jsxRuntime.jsx("h2",{className:"text-xl sm:text-2xl font-bold mb-2",style:{color:i.primary},children:p}),jsxRuntime.jsx("p",{className:"text-sm opacity-70",children:g})]}),y&&y.length>0&&jsxRuntime.jsx("div",{className:"w-full flex flex-col",style:{gap:h[C]},children:y.slice(0,3).map((m,F)=>jsxRuntime.jsx("div",{className:"w-full overflow-hidden",style:{aspectRatio:"720 / 300",borderRadius:k},children:jsxRuntime.jsx("img",{src:m.url,alt:m.alt||`Policy image ${F+1}`,className:"w-full h-full object-cover"})},F))}),(!y||y.length===0)&&N&&jsxRuntime.jsx("div",{className:"w-full p-4 rounded-lg border",style:{backgroundColor:`${i.primary}10`,borderColor:`${i.primary}30`},dangerouslySetInnerHTML:{__html:N}}),f&&t.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[x==="dropdown"&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:"block text-sm font-medium mb-2",children:"Service Category"}),jsxRuntime.jsxs("select",{value:n||"all",onChange:m=>s(m.target.value==="all"?null:m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:border-transparent transition-all",style:{"--tw-ring-color":i.primary},children:[jsxRuntime.jsx("option",{value:"all",children:"All Services"}),t.map(m=>jsxRuntime.jsx("option",{value:m.id,children:m.name},m.id))]})]}),x==="tabs"&&jsxRuntime.jsxs("div",{className:"flex gap-2 flex-wrap",children:[jsxRuntime.jsx("button",{onClick:()=>s(null),className:`px-4 py-2 rounded-lg transition-all text-sm font-medium ${n===null?"text-white shadow-lg":"border border-gray-300 hover:border-gray-400"}`,style:{backgroundColor:n===null?i.primary:void 0},children:"All Services"}),t.map(m=>jsxRuntime.jsx("button",{onClick:()=>s(m.id),className:`px-4 py-2 rounded-lg transition-all text-sm font-medium ${n===m.id?"text-white shadow-lg":"border border-gray-300 hover:border-gray-400"}`,style:{backgroundColor:n===m.id?i.primary:void 0},children:m.name},m.id))]}),x==="pills"&&jsxRuntime.jsxs("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-hide",children:[jsxRuntime.jsx("button",{onClick:()=>s(null),className:`px-5 py-2 rounded-full transition-all text-sm font-medium whitespace-nowrap ${n===null?"text-white shadow-md":"bg-gray-100 hover:bg-gray-200"}`,style:{backgroundColor:n===null?i.primary:void 0},children:"All"}),t.map(m=>jsxRuntime.jsx("button",{onClick:()=>s(m.id),className:`px-5 py-2 rounded-full transition-all text-sm font-medium whitespace-nowrap ${n===m.id?"text-white shadow-md":"bg-gray-100 hover:bg-gray-200"}`,style:{backgroundColor:n===m.id?i.primary:void 0},children:m.name},m.id))]}),x==="chips"&&jsxRuntime.jsxs("div",{className:"flex gap-2 flex-wrap",children:[jsxRuntime.jsxs("button",{onClick:()=>s(null),className:`px-3 py-1.5 rounded-lg transition-all text-xs font-medium flex items-center gap-1.5 ${n===null?"text-white":"border border-gray-300 bg-white hover:border-gray-400"}`,style:{backgroundColor:n===null?i.primary:void 0,borderColor:n===null?i.primary:void 0},children:[n===null&&jsxRuntime.jsx("span",{className:"text-[10px]",children:"\u2713"}),"All"]}),t.map(m=>jsxRuntime.jsxs("button",{onClick:()=>s(m.id),className:`px-3 py-1.5 rounded-lg transition-all text-xs font-medium flex items-center gap-1.5 ${n===m.id?"text-white":"border border-gray-300 bg-white hover:border-gray-400"}`,style:{backgroundColor:n===m.id?i.primary:void 0,borderColor:n===m.id?i.primary:void 0},children:[n===m.id&&jsxRuntime.jsx("span",{className:"text-[10px]",children:"\u2713"}),m.name]},m.id))]})]}),f&&x==="accordion"?jsxRuntime.jsx("div",{className:"space-y-4",children:t.map(m=>{let F=l.has(m.id),M=e.filter(A=>A.category===m.id);return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("button",{onClick:()=>{let A=new Set(l);F?A.delete(m.id):A.add(m.id),c(A);},className:"w-full flex items-center justify-between py-2 border-b-2 transition-all group",style:{borderColor:F?i.primary:"#e5e7eb"},children:[jsxRuntime.jsx("span",{className:"font-semibold text-left transition-colors",style:{color:F?i.primary:void 0},children:m.name}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:`w-4 h-4 transition-all ${F?"rotate-180":""}`,style:{color:F?i.primary:"#9ca3af"}})]}),F&&jsxRuntime.jsx("div",{className:`mt-4 ${d==="grid"?`grid ${S} gap-3`:"space-y-3"}`,children:M.map(A=>R(A,d))})]},m.id)})}):d==="grid"?jsxRuntime.jsx("div",{className:`grid ${S} gap-3`,children:I.map(m=>R(m,"grid"))}):jsxRuntime.jsx("div",{className:"space-y-3",children:I.map(m=>R(m,"list"))})]})}function oi(){let e=[],t=new Date;t.setHours(0,0,0,0);for(let r=0;r<3;r++){let a=new Date(t.getFullYear(),t.getMonth()+r,1),o=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();for(let i=1;i<=o;i++){if(new Date(a.getFullYear(),a.getMonth(),i)<t||Math.random()>.6)continue;let s=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(i).padStart(2,"0")}`;e.push(s);}}return e}var ko={avoid:{bg:"#FEE2E2",text:"#991B1B",label:"Avoid"},caution:{bg:"#FEF3C7",text:"#92400E",label:"Caution"},optimal:{bg:"#D1FAE5",text:"#065F46",label:"Optimal"},neutral:{bg:"#F3F4F6",text:"#4B5563",label:"Neutral"}};function nr({availableDates:e,selectedDate:t,onDateSelect:r,settings:a,colors:o,cyclePhases:i,selectedService:n,addons:s=[],selectedAddons:l=[],onAddonsChange:c,addonPlacement:d="date_selection"}){console.log("[DateSelection] Addon Debug:",{addonsLength:s.length,hasOnAddonsChange:!!c,addonPlacement:d,showAddons:d!=="separate_step"&&s.length>0&&!!c,addons:s,selectedService:n});let u=a.calendarView||"month",p=a.headerContent?.value||"Select a Date",g=!e||e.length===0,b=Ge.useMemo(()=>g?oi():e,[g,e]),v=Ge.useMemo(()=>{let D=new Date;if(D.setHours(0,0,0,0),b.length>0){let T=b.find(P=>new Date(P)>=D);if(T){let P=new Date(T);return `${P.getFullYear()}-${String(P.getMonth()+1).padStart(2,"0")}`}}return `${D.getFullYear()}-${String(D.getMonth()+1).padStart(2,"0")}`},[b]),[w,f]=Ge.useState(v),x=Ge.useMemo(()=>new Set(b),[b]),[y,N]=w.split("-").map(Number),h=["January","February","March","April","May","June","July","August","September","October","November","December"][N-1],k=Ge.useMemo(()=>{let D=new Date(y,N-1,1),T=new Date(y,N,0),P=D.getDay(),z=T.getDate(),K=[];for(let Y=0;Y<P;Y++)K.push(null);for(let Y=1;Y<=z;Y++){let Te=`${y}-${String(N).padStart(2,"0")}-${String(Y).padStart(2,"0")}`,U=new Date(Te),ie=new Date;ie.setHours(0,0,0,0),K.push({day:Y,dateStr:Te,isAvailable:x.has(Te)&&U>=ie});}return K},[y,N,x]),S=Ge.useMemo(()=>{let D=new Date(y,N-2,1),T=`${D.getFullYear()}-${String(D.getMonth()+1).padStart(2,"0")}`;return b.some(P=>P.startsWith(T))},[b,y,N]),I=Ge.useMemo(()=>{let D=new Date(y,N,1),T=`${D.getFullYear()}-${String(D.getMonth()+1).padStart(2,"0")}`;return b.some(P=>P.startsWith(T))},[b,y,N]),R=()=>{if(!S)return;let D=new Date(y,N-2,1);f(`${D.getFullYear()}-${String(D.getMonth()+1).padStart(2,"0")}`);},m=()=>{if(!I)return;let D=new Date(y,N,1);f(`${D.getFullYear()}-${String(D.getMonth()+1).padStart(2,"0")}`);},F=i&&Object.keys(i).length>0,M=()=>{let D=n?.price||0;return l.length>0&&s.length>0&&l.forEach(T=>{let P=s.find(z=>z.id===T);P&&(D+=P.addonPrice||P.price||0);}),D},A=D=>{if(!c)return;let T=l.includes(D);c(T?l.filter(P=>P!==D):[...l,D]);};return jsxRuntime.jsxs("div",{className:"space-y-6",children:[n&&jsxRuntime.jsx(framerMotion.motion.div,{...ge(.05),className:"bg-gradient-to-br from-white to-gray-50/30 rounded-xl border border-gray-200/80 p-6 shadow-sm hover:shadow-md transition-shadow",children:jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2 mb-3",children:jsxRuntime.jsx("h3",{className:"text-sm font-semibold tracking-wide uppercase",style:{color:o.primary},children:"Your Selection"})}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("p",{className:"font-bold text-lg text-gray-900",children:n.name}),n.description&&jsxRuntime.jsx("p",{className:"text-sm text-gray-600 leading-relaxed",children:n.description}),n.duration&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-gray-500",children:[jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),jsxRuntime.jsxs("span",{children:[n.duration," minutes"]})]})]})]}),jsxRuntime.jsxs("div",{className:"text-right",children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-500 mb-1 font-medium",children:"Price"}),jsxRuntime.jsxs("div",{className:"text-2xl font-bold",style:{color:o.primary},children:["$",n.price]})]})]})}),d!=="separate_step"&&s.length>0&&c&&jsxRuntime.jsxs(framerMotion.motion.div,{...ge(.1),className:"bg-white rounded-xl border border-gray-200/80 p-6 shadow-sm hover:shadow-md transition-shadow",children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2 mb-4",children:jsxRuntime.jsx("h3",{className:"text-sm font-semibold tracking-wide uppercase",style:{color:o.primary},children:"Enhance Your Experience"})}),jsxRuntime.jsx("div",{className:"space-y-3",children:s.map(D=>{let T=l.includes(D.id),P=D.addonPrice||D.price||0;return jsxRuntime.jsxs("label",{className:"flex items-start gap-4 p-4 rounded-xl border-2 cursor-pointer transition-all group",style:{borderColor:T?o.primary:"#E5E7EB",backgroundColor:T?`${o.primary}08`:"transparent",boxShadow:T?`0 0 0 3px ${o.primary}15`:"none"},children:[jsxRuntime.jsx("div",{className:"flex items-center pt-0.5",children:jsxRuntime.jsx("input",{type:"checkbox",checked:T,onChange:()=>A(D.id),className:"w-5 h-5 rounded border-2 border-gray-300 cursor-pointer",style:{accentColor:o.primary}})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-3 mb-1",children:[jsxRuntime.jsx("span",{className:"font-semibold text-base text-gray-900 group-hover:text-gray-700 transition-colors",children:D.name}),jsxRuntime.jsxs("span",{className:"text-base font-bold whitespace-nowrap flex-shrink-0",style:{color:o.primary},children:["+$",P]})]}),D.description&&jsxRuntime.jsx("p",{className:"text-sm text-gray-600 leading-relaxed",children:D.description})]})]},D.id)})}),l.length>0&&jsxRuntime.jsx("div",{className:"mt-6 pt-5 border-t-2 border-gray-100",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-500 mb-1 font-medium uppercase tracking-wide",children:"New Total"}),jsxRuntime.jsxs("div",{className:"text-sm text-gray-600",children:["Service + ",l.length," add-on",l.length>1?"s":""]})]}),jsxRuntime.jsxs("div",{className:"text-3xl font-bold",style:{color:o.primary},children:["$",M()]})]})})]}),jsxRuntime.jsx(framerMotion.motion.h2,{...ge(.15),className:"text-xl sm:text-2xl font-bold text-center sm:text-left",style:{color:o.primary},children:p}),F&&jsxRuntime.jsx(framerMotion.motion.div,{...ge(.1),className:"bg-white rounded-lg border border-gray-200 px-4 py-3",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 text-xs",children:[jsxRuntime.jsx("span",{className:"font-medium flex items-center",style:{color:o.primary},children:"Cycle Calendar:"}),jsxRuntime.jsx("div",{className:"flex items-center gap-3",children:Object.entries(ko).map(([D,T])=>jsxRuntime.jsxs("div",{className:"flex items-center space-x-1.5",children:[jsxRuntime.jsx("div",{className:"w-3 h-3 rounded border border-gray-300",style:{backgroundColor:T.bg}}),jsxRuntime.jsx("span",{children:T.label})]},D))})]})}),u==="month"?jsxRuntime.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsxRuntime.jsx("button",{className:`p-2 rounded transition-colors ${S?"hover:bg-gray-100":"opacity-30 cursor-not-allowed"}`,onClick:R,disabled:!S,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"w-4 h-4"})}),jsxRuntime.jsxs("p",{className:"font-semibold",children:[h," ",y]}),jsxRuntime.jsx("button",{className:`p-2 rounded transition-colors ${I?"hover:bg-gray-100":"opacity-30 cursor-not-allowed"}`,onClick:m,disabled:!I,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-4 h-4"})})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(D=>jsxRuntime.jsx("div",{className:"text-center text-xs font-medium py-2 opacity-60",children:D},D)),k.map((D,T)=>{if(!D)return jsxRuntime.jsx("div",{},`empty-${T}`);let{day:P,dateStr:z,isAvailable:K}=D,Y=t===z,Te=i?.[z],U=Te?ko[Te]:null;return jsxRuntime.jsx("button",{onClick:()=>K&&r(z),disabled:!K,className:`aspect-square rounded-lg text-sm transition-all ${Y?"text-white shadow-lg font-semibold":K?"hover:scale-105 cursor-pointer":"bg-gray-50 text-gray-300 cursor-not-allowed opacity-40"}`,style:{backgroundColor:Y?o.primary:U?.bg||void 0,color:Y?"white":U?.text||void 0},children:P},z)})]})]}):jsxRuntime.jsx("div",{className:"grid grid-cols-5 gap-3",children:b.slice(0,5).map(D=>{let T=new Date(D),P=T.getDate(),K=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][T.getDay()],Y=t===D;return jsxRuntime.jsxs("button",{onClick:()=>r(D),className:`p-4 rounded-lg border-2 transition-all text-center ${Y?"border-current text-white":"border-gray-200 hover:border-gray-300"}`,style:{borderColor:Y?o.primary:void 0,backgroundColor:Y?o.primary:void 0},children:[jsxRuntime.jsx("p",{className:"text-xs mb-1 opacity-75",children:K}),jsxRuntime.jsx("p",{className:"text-2xl font-semibold",children:P})]},D)})})]})}function Hn({availableTimes:e,selectedTime:t,onTimeSelect:r,settings:a,serviceDuration:o,colors:i,selectedService:n,selectedDate:s,selectedAddons:l=[],addons:c=[]}){let d=a.timeFormat||"12h",u=a.showDuration!==false,p=a.headerContent?.value||"Pick a Time",g=a.columns||3,b=()=>{let x=n?.price||0;return l.length>0&&c.length>0&&l.forEach(y=>{let N=c.find(C=>C.id===y);N&&(x+=N.addonPrice||N.price||0);}),x},v=x=>new Date(x+"T00:00:00").toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"}),w=x=>{let y=x.trim().split(" "),[N,C]=y[0].split(":"),h=parseInt(N),k=C||"00";if(y.length>1){let S=y[1];return d==="24h"?(S==="PM"&&h!==12?h+=12:S==="AM"&&h===12&&(h=0),`${String(h).padStart(2,"0")}:${k}`):x}if(d==="12h"){let S=h>=12?"PM":"AM";return `${h===0?12:h>12?h-12:h}:${k} ${S}`}return `${String(h).padStart(2,"0")}:${k}`},f={2:"grid-cols-2",3:"grid-cols-2 sm:grid-cols-3",4:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"}[g]||"grid-cols-3";return jsxRuntime.jsxs("div",{className:"space-y-6",children:[n&&s&&jsxRuntime.jsxs(framerMotion.motion.div,{...ge(.05),className:"bg-gradient-to-br from-white to-gray-50/30 rounded-xl border border-gray-200/80 p-6 shadow-sm hover:shadow-md transition-shadow",children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2 mb-4",children:jsxRuntime.jsx("h3",{className:"text-sm font-semibold tracking-wide uppercase",style:{color:i.primary},children:"Your Booking"})}),jsxRuntime.jsxs("div",{className:"mb-3",children:[jsxRuntime.jsx("p",{className:"font-bold text-lg text-gray-900",children:n.name}),n.duration&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-gray-500 mt-1",children:[jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),jsxRuntime.jsxs("span",{children:[n.duration," minutes"]})]})]}),l.length>0&&c.length>0&&jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("p",{className:"text-sm font-bold text-gray-900 mb-2",children:"Add-ons"}),jsxRuntime.jsx("div",{className:"space-y-2",children:l.map(x=>{let y=c.find(N=>N.id===x);return y?jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm text-gray-700 font-medium",children:y.name}),jsxRuntime.jsxs("span",{className:"text-sm font-semibold text-gray-900",children:["$",y.addonPrice||y.price||0]})]},x):null})})]}),jsxRuntime.jsx("div",{className:"border-t border-gray-200 -mx-6 mb-4"}),jsxRuntime.jsx("div",{className:"bg-gray-50/50 -mx-6 px-6 py-4 mb-4",children:jsxRuntime.jsx("div",{className:"flex items-center justify-between",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("svg",{className:"w-5 h-5",style:{color:i.primary},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),jsxRuntime.jsx("span",{className:"font-bold text-base text-gray-900",children:v(s)})]})})}),jsxRuntime.jsx("div",{className:"border-t border-gray-200 -mx-6 mb-4"}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-base font-bold text-gray-900",children:"Total"}),jsxRuntime.jsxs("span",{className:"text-2xl font-bold",style:{color:i.primary},children:["$",b()]})]})]}),jsxRuntime.jsx(framerMotion.motion.h2,{...ge(n&&s?.15:.05),className:"text-xl sm:text-2xl font-bold text-center sm:text-left",style:{color:i.primary},children:p}),jsxRuntime.jsx(framerMotion.motion.div,{className:`grid ${f} gap-3`,initial:{opacity:0},animate:{opacity:1},transition:{duration:.3,delay:n&&s?.2:.1},children:e.map((x,y)=>{let N=t===x;return jsxRuntime.jsxs(framerMotion.motion.button,{onClick:()=>r(x),className:`p-3 rounded-lg border-2 transition-all text-center hover:scale-105 ${N?"border-current text-white shadow-lg":"border-gray-200 hover:border-gray-300"}`,style:{borderColor:N?i.primary:void 0,backgroundColor:N?i.primary:void 0},initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2,delay:.15+y*.03,ease:"easeOut"},children:[jsxRuntime.jsx("p",{className:"font-medium",children:w(x)}),u&&o&&jsxRuntime.jsxs("p",{className:"text-xs mt-1 opacity-75",children:[o," min"]})]},x)})})]})}function Wn({addons:e,selectedAddons:t,onAddonsChange:r,settings:a,colors:o}){let i=a.headerContent?.value||"Add Extras",n=a.subheaderContent?.value||"Enhance your experience with these optional add-ons",s=a.showPricing!==false,l=a.showDuration!==false,c=d=>{let u=t.includes(d)?t.filter(p=>p!==d):[...t,d];r(u);};return jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs(framerMotion.motion.div,{...ge(.05),className:"text-center sm:text-left",children:[jsxRuntime.jsx("h2",{className:"text-xl sm:text-2xl font-bold mb-2",style:{color:o.primary},children:i}),jsxRuntime.jsx("p",{className:"text-sm opacity-70",children:n})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:e.map((d,u)=>{let p=t.includes(d.id);return jsxRuntime.jsxs(framerMotion.motion.button,{onClick:()=>c(d.id),className:`p-4 rounded-lg border-2 transition-all text-left relative ${p?"border-current shadow-lg":"border-gray-200 hover:border-gray-300"}`,style:{borderColor:p?o.primary:void 0,backgroundColor:p?`${o.primary}10`:void 0},initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.1+u*.05},children:[p&&jsxRuntime.jsx("div",{className:"absolute top-3 right-3 w-6 h-6 rounded-full flex items-center justify-center text-white text-sm",style:{backgroundColor:o.primary},children:"\u2713"}),jsxRuntime.jsx("p",{className:"font-semibold mb-1 pr-8",children:d.name}),jsxRuntime.jsx("p",{className:"text-xs opacity-70 mb-3",children:d.description}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s&&jsxRuntime.jsxs("span",{className:"font-bold",style:{color:o.primary},children:["+$",d.price]}),l&&jsxRuntime.jsxs("span",{className:"opacity-60",children:["+",d.duration," min"]})]})]},d.id)})}),t.length>0&&jsxRuntime.jsxs(framerMotion.motion.div,{className:"bg-gray-50 rounded-lg p-4 mt-4",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},children:[jsxRuntime.jsx("p",{className:"text-sm font-medium mb-2",children:"Selected Add-ons:"}),jsxRuntime.jsx("div",{className:"space-y-1",children:t.map(d=>{let u=e.find(p=>p.id===d);return u?jsxRuntime.jsxs("div",{className:"flex justify-between text-sm",children:[jsxRuntime.jsx("span",{children:u.name}),jsxRuntime.jsxs("span",{className:"font-medium",style:{color:o.primary},children:["+$",u.price]})]},d):null})})]})]})}function jn({isOpen:e,onClose:t,title:r,children:a,isRequired:o=false,maxHeight:i="80vh"}){return Ge.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset";}),[e]),Ge.useEffect(()=>{if(!o&&e){let n=s=>{s.key==="Escape"&&t();};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)}},[e,o,t]),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(framerMotion.motion.div,{...rr.backdrop,onClick:o?void 0:t,className:"fixed inset-0 bg-black/50 z-50",style:{backdropFilter:"blur(4px)"}}),jsxRuntime.jsxs(framerMotion.motion.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:rr.spring,className:"fixed bottom-0 left-0 right-0 bg-white rounded-t-2xl shadow-2xl z-50",style:{maxHeight:i},children:[jsxRuntime.jsx("div",{className:"flex justify-center pt-3 pb-2",children:jsxRuntime.jsx("div",{className:"w-12 h-1 bg-gray-300 rounded-full"})}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-6 pb-4 border-b border-gray-200",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[r&&jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:r}),o&&jsxRuntime.jsx("span",{className:"text-xs font-medium px-2 py-0.5 bg-amber-100 text-amber-800 rounded",children:"Required"})]}),!o&&jsxRuntime.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors","aria-label":"Close",children:jsxRuntime.jsx(lucideReact.X,{className:"w-5 h-5"})})]}),jsxRuntime.jsx("div",{className:"overflow-y-auto",style:{maxHeight:`calc(${i} - 120px)`},children:jsxRuntime.jsx("div",{className:"px-6 py-6",children:a})})]})]})})}function Vn({contactInfo:e,onContactInfoChange:t,settings:r,optInModules:a=[],onOptInData:o,colors:i,isPreview:n=false}){let[s,l]=Ge.useState(false),[c,d]=Ge.useState(null),[u,p]=Ge.useState(()=>{let m={};return a.forEach(F=>{F.defaultChecked&&(m[F.id]=true);}),m}),[g,b]=Ge.useState({}),[v,w]=Ge.useState({}),f=Ge.useRef(false);Ge.useEffect(()=>{f.current||(f.current=true,a.forEach(m=>{m.defaultChecked&&m.renderCustomForm&&o&&m.renderCustomForm(()=>{},F=>o(m.id,F),i);}));},[]);let x=r.headerContent?.value||"Your Information",y=m=>m?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(m)?null:"Please enter a valid email address":"Email is required",N=m=>m?m.replace(/\D/g,"").length<10?"Please enter a valid phone number":null:"Phone number is required",C=m=>!m||m.trim().length===0?"Name is required":m.trim().length<2?"Name must be at least 2 characters":null,h=(m,F)=>{switch(m){case "email":return y(F);case "phone":return N(F);case "name":return C(F);default:return null}},k=[{label:"Name *",type:"text",placeholder:"Your full name",field:"name"},{label:"Email *",type:"email",placeholder:"your@email.com",field:"email"},{label:"Phone *",type:"tel",placeholder:"(555) 123-4567",field:"phone"},{label:"Notes (optional)",type:"textarea",placeholder:"Any special requests or notes...",field:"notes"}],S=(m,F)=>{if(t({...e,[m]:F}),!n&&v[m]){let M=h(m,F);b(A=>({...A,[m]:M||""}));}},I=m=>{if(n)return;w(A=>({...A,[m]:true}));let F=e[m]||"",M=h(m,F);b(A=>({...A,[m]:M||""}));},R=(m,F)=>{if(p(M=>({...M,[m.id]:F})),F){if(m.renderCustomForm){let M=false;if(m.renderCustomForm(()=>{},D=>{o&&o(m.id,D),M=true;},i)===null&&M)return}d(m),l(true);}else o&&o(m.id,null);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx(framerMotion.motion.h2,{...ge(.05),className:"text-xl sm:text-2xl font-bold text-center sm:text-left",style:{color:i.primary},children:x}),jsxRuntime.jsxs("div",{className:"space-y-3",children:[k.map((m,F)=>jsxRuntime.jsxs(framerMotion.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.3,delay:.1+F*.05,ease:"easeOut"},children:[jsxRuntime.jsx("label",{className:"block text-sm font-medium mb-1",children:m.label}),m.type==="textarea"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("textarea",{className:`w-full px-3 py-2 border rounded-lg focus:ring-2 focus:border-transparent resize-none transition-all ${!n&&g[m.field]&&v[m.field]?"border-red-500":"border-gray-300"}`,style:{"--tw-ring-color":i.primary},rows:3,placeholder:m.placeholder,value:e[m.field]||"",onChange:M=>S(m.field,M.target.value),onBlur:()=>I(m.field)}),!n&&g[m.field]&&v[m.field]&&jsxRuntime.jsx("p",{className:"text-red-500 text-xs mt-1",children:g[m.field]})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:m.type,className:`w-full px-3 py-2 border rounded-lg focus:ring-2 focus:border-transparent transition-all ${!n&&g[m.field]&&v[m.field]?"border-red-500":"border-gray-300"}`,style:{"--tw-ring-color":i.primary},placeholder:m.placeholder,value:e[m.field]||"",onChange:M=>S(m.field,M.target.value),onBlur:()=>I(m.field)}),!n&&g[m.field]&&v[m.field]&&jsxRuntime.jsx("p",{className:"text-red-500 text-xs mt-1",children:g[m.field]})]})]},m.label)),a.length>0&&jsxRuntime.jsx(framerMotion.motion.div,{className:"pt-3 border-t border-gray-200 space-y-3",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.3},children:a.map(m=>jsxRuntime.jsxs("label",{className:"flex items-start gap-3 cursor-pointer group",children:[jsxRuntime.jsx("input",{type:"checkbox",checked:u[m.id]||false,onChange:F=>R(m,F.target.checked),className:"mt-1 w-4 h-4 rounded border-gray-300",style:{accentColor:i.primary}}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("span",{className:"text-sm font-medium",children:[m.label,m.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.description&&jsxRuntime.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:m.description})]})]},m.id))})]})]}),c&&jsxRuntime.jsx(jn,{isOpen:s,onClose:()=>l(false),title:c.formTitle||"Additional Information",isRequired:c.required,children:c.renderCustomForm?c.renderCustomForm(()=>l(false),m=>{o&&o(c.id,m);},i):jsxRuntime.jsxs("div",{className:"space-y-4",children:[c.formFields?.map(m=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:"block text-sm font-medium mb-1",children:[m.label,m.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.type==="textarea"?jsxRuntime.jsx("textarea",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:border-transparent resize-none",style:{"--tw-ring-color":i.primary},rows:3,placeholder:m.placeholder}):m.type==="select"&&m.options?jsxRuntime.jsx("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:border-transparent",style:{"--tw-ring-color":i.primary},children:m.options.map(F=>jsxRuntime.jsx("option",{value:F.value,children:F.label},F.value))}):jsxRuntime.jsx("input",{type:m.type,className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:border-transparent",style:{"--tw-ring-color":i.primary},placeholder:m.placeholder})]},m.id)),jsxRuntime.jsx("button",{onClick:()=>{o&&c&&o(c.id,{}),l(false);},className:"w-full py-3 rounded-lg text-white font-medium transition-all hover:opacity-90",style:{backgroundColor:i.primary},children:"Save & Continue"})]})})]})}function Yn({service:e,addons:t=[],selectedDate:r,selectedTime:a,paymentProvider:o,paymentConfig:i,onConfirm:n,colors:s,isPreview:l=false}){let c=e?.price||0,d=t.reduce((y,N)=>y+(N.addonPrice||N.price||0),0),u=c+d,p=e?.duration||0,g=t.reduce((y,N)=>y+(N.duration||0),0),b=p+g,v=i.depositPercentage||20,w=(u*(v/100)).toFixed(2),f=u.toFixed(2),x=(parseFloat(f)-parseFloat(w)).toFixed(2);return jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx(framerMotion.motion.h2,{...ge(.05),className:"text-xl font-bold text-center",style:{color:s.primary},children:"Confirm & Pay"}),jsxRuntime.jsx(framerMotion.motion.div,{className:"bg-gray-50 rounded-lg p-4",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.1},children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[e&&jsxRuntime.jsxs("div",{className:"flex justify-between items-center text-sm",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium",children:e.name}),jsxRuntime.jsxs("p",{className:"text-xs opacity-70",children:[b," min total"]})]}),jsxRuntime.jsxs("span",{className:"font-bold",style:{color:s.primary},children:["$",c]})]}),t.length>0&&jsxRuntime.jsx("div",{className:"space-y-1 text-xs",children:t.map(y=>jsxRuntime.jsxs("div",{className:"flex justify-between opacity-70",children:[jsxRuntime.jsxs("span",{children:["+ ",y.name]}),jsxRuntime.jsxs("span",{children:["+$",y.addonPrice||y.price||0]})]},y.id))}),r&&jsxRuntime.jsxs("div",{className:"flex justify-between items-center text-sm pt-2 border-t border-gray-200",children:[jsxRuntime.jsx("span",{className:"opacity-70",children:new Date(r+"T00:00:00").toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}),jsxRuntime.jsx("span",{children:a})]}),jsxRuntime.jsxs("div",{className:"pt-2 mt-2 border-t border-gray-200 flex justify-between items-center",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"Due Today"}),jsxRuntime.jsxs("span",{className:"text-lg font-bold",style:{color:s.primary},children:["$",w]})]})]})}),jsxRuntime.jsx(framerMotion.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.2},children:l?jsxRuntime.jsxs("div",{className:"border border-gray-200 rounded-lg p-4 bg-white",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"h-10 bg-gray-50 border border-gray-200 rounded flex items-center px-3",children:jsxRuntime.jsx("span",{className:"text-xs text-gray-400",children:"Card Number"})}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[jsxRuntime.jsx("div",{className:"h-10 bg-gray-50 border border-gray-200 rounded flex items-center px-3",children:jsxRuntime.jsx("span",{className:"text-xs text-gray-400",children:"MM/YY"})}),jsxRuntime.jsx("div",{className:"h-10 bg-gray-50 border border-gray-200 rounded flex items-center px-3",children:jsxRuntime.jsx("span",{className:"text-xs text-gray-400",children:"CVV"})})]})]}),jsxRuntime.jsxs("div",{className:"mt-3 flex items-center justify-center gap-1",children:[jsxRuntime.jsx("svg",{className:"w-3 h-3 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),jsxRuntime.jsxs("span",{className:"text-xs text-gray-400",children:["Powered by ",o==="square"?"Square":"Stripe"]})]})]}):jsxRuntime.jsx("div",{className:"border border-gray-200 rounded-lg p-4 bg-white",children:jsxRuntime.jsxs("div",{className:"text-center py-8 text-sm text-gray-500",children:[jsxRuntime.jsxs("div",{className:"animate-pulse",children:["Initializing ",o==="square"?"Square":"Stripe"," payment..."]}),jsxRuntime.jsx("div",{className:"mt-4 text-xs text-gray-400",children:"Please wait while we securely load the payment form"})]})})}),jsxRuntime.jsx(framerMotion.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.3},children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsxs("label",{className:"flex items-start gap-2 cursor-pointer",children:[jsxRuntime.jsx("input",{type:"checkbox",className:"mt-0.5 w-4 h-4 rounded border-gray-300",style:{accentColor:s.primary}}),jsxRuntime.jsxs("span",{className:"text-xs",children:["I agree to the ",jsxRuntime.jsx("a",{href:"#",className:"underline",style:{color:s.primary},children:"cancellation policy"})," and understand the $",x," balance is due at appointment."]})]}),jsxRuntime.jsxs("label",{className:"flex items-start gap-2 cursor-pointer",children:[jsxRuntime.jsx("input",{type:"checkbox",className:"mt-0.5 w-4 h-4 rounded border-gray-300",style:{accentColor:s.primary}}),jsxRuntime.jsxs("span",{className:"text-xs",children:["I agree to the ",jsxRuntime.jsx("a",{href:"#",className:"underline",style:{color:s.primary},children:"terms of service"}),"."]})]})]})})]})}var Io={avoid:{phase:"avoid",color:"#EF4444",bgColor:"#FEF2F2",label:"Avoid",icon:"\u{1F534}",description:"Period - avoid waxing"},caution:{phase:"caution",color:"#F59E0B",bgColor:"#FFFBEB",label:"Caution",icon:"\u{1F7E1}",description:"End of period - proceed with caution"},optimal:{phase:"optimal",color:"#10B981",bgColor:"#F0FDF4",label:"Optimal",icon:"\u{1F7E2}",description:"Best time for waxing"},neutral:{phase:"neutral",color:"#6B7280",bgColor:"#F9FAFB",label:"Neutral",icon:"\u26AA",description:"Okay but not optimal"},unknown:{phase:"unknown",color:"#9CA3AF",bgColor:"#F3F4F6",label:"Unknown",icon:"\u2753",description:"No cycle data available"}};function pi({availableDates:e,selectedDate:t,onDateSelect:r,settings:a,colors:o,fetchCycleData:i,selectedClient:n,onCycleWarning:s,cycleAwareEnabled:l}){let[c,d]=Ge.useState({}),[u,p]=Ge.useState(false),[g,b]=Ge.useState(null),v=Ge.useMemo(()=>l!==void 0?l:!!(n?.cycle_opt_in&&i),[l,n?.cycle_opt_in,i]);Ge.useEffect(()=>{if(!v||!i||!n){d({});return}e.length!==0&&(p(true),b(null),i(n,e).then(f=>{d(f);}).catch(f=>{console.error("[CycleAwareDateSelection] Error fetching cycle data:",f),b(f.message||"Failed to load cycle data"),d({});}).finally(()=>{p(false);}));},[v,i,n,e]);let w=Ge.useCallback(f=>{let x=c[f];x?.phase==="avoid"&&s&&s(x,f),r(f,x);},[c,r,s]);return jsxRuntime.jsxs("div",{className:"cycle-aware-date-selection space-y-4",children:[v&&Object.keys(c).length>0&&jsxRuntime.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[jsxRuntime.jsxs("h4",{className:"font-medium mb-3 flex items-center",style:{color:o.primary},children:[jsxRuntime.jsx("span",{className:"mr-2",children:"\u{1F4C5}"}),"Your Cycle Calendar"]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-3 text-sm",children:Object.entries(Io).map(([f,x])=>f!=="unknown"&&jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full border border-gray-300",style:{backgroundColor:x.color}}),jsxRuntime.jsx("span",{children:x.label})]},f))}),jsxRuntime.jsx("p",{className:"text-xs opacity-70 mt-2",children:"Green dates are optimal for comfortable waxing appointments"})]}),v&&u&&jsxRuntime.jsx("div",{className:"text-center py-2 text-sm opacity-70",children:"Loading cycle predictions..."}),v&&g&&jsxRuntime.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-3",children:jsxRuntime.jsxs("p",{className:"text-yellow-800 text-sm",children:["Unable to load cycle predictions: ",g]})}),jsxRuntime.jsx(nr,{availableDates:e,selectedDate:t,onDateSelect:w,settings:a,colors:o}),v&&t&&c[t]?.phase==="avoid"&&jsxRuntime.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:jsxRuntime.jsxs("div",{className:"flex items-start space-x-3",children:[jsxRuntime.jsx("span",{className:"text-red-500 text-xl",children:"\u26A0\uFE0F"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h4",{className:"font-medium text-red-800 mb-1",children:"This date falls during your predicted period"}),jsxRuntime.jsx("p",{className:"text-red-700 text-sm mb-3",children:"Waxing during this time may be more uncomfortable than usual. Would you like to see better alternatives?"}),jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx("button",{className:"px-3 py-1 bg-red-100 text-red-700 rounded text-sm hover:bg-red-200 transition-colors",onClick:()=>{let f=e.filter(x=>c[x]?.phase==="optimal");f.length>0&&w(f[0]);},children:"Show optimal dates"}),jsxRuntime.jsx("button",{className:"px-3 py-1 text-red-600 text-sm hover:underline",children:"Continue anyway"})]})]})]})})]})}var gi={enabled:true,duration:6e5,warningThreshold:12e4,maxExtensions:2,extensionDuration:3e5,showActions:true,showWarning:true};function Tr({holdStatus:e,config:t,colors:r,onExtend:a,onRelease:o,onWarning:i,onExpired:n,className:s=""}){let[l,c]=Ge.useState(Date.now()),[d,u]=Ge.useState(false),[p,g]=Ge.useState(false),[b,v]=Ge.useState(false),w={...gi,...t};Ge.useEffect(()=>{if(!e)return;let F=setInterval(()=>{c(Date.now());},1e3);return ()=>clearInterval(F)},[e]);let f=e?Math.max(0,e.expiresAt-l):0,x=f===0&&e!==null,y=f<=w.warningThreshold&&f>0;Ge.useEffect(()=>{y&&!d&&i&&e&&(u(true),i(f));},[y,d,i,e,f]),Ge.useEffect(()=>{x&&e&&n&&n();},[x,e,n]),Ge.useEffect(()=>{u(false);},[e?.holdKey]);let N=Ge.useCallback(async()=>{if(!(!a||!e||p))try{g(!0),await a(),u(!1);}catch(F){console.error("[HoldTimer] Failed to extend hold:",F);}finally{g(false);}},[a,e,p]),C=Ge.useCallback(async()=>{if(!(!o||!e||b))try{v(!0),await o();}catch(F){console.error("[HoldTimer] Failed to release hold:",F);}finally{v(false);}},[o,e,b]);if(!e||!w.enabled)return null;let h=Math.floor(f/6e4),k=Math.floor(f%6e4/1e3),S=`${h}:${k.toString().padStart(2,"0")}`,I="rgba(139, 92, 246, 0.1)",R="rgba(139, 92, 246, 0.3)",m=r.primary;return x?(I="rgba(239, 68, 68, 0.1)",R="rgba(239, 68, 68, 0.3)",m="#EF4444"):y&&w.showWarning&&(I=`${r.secondary}1A`,R=`${r.secondary}4D`,m=r.secondary),jsxRuntime.jsx("div",{className:`rounded-lg p-4 text-center ${s}`,style:{backgroundColor:I,borderWidth:"1px",borderStyle:"solid",borderColor:R},children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsxRuntime.jsx("div",{className:"flex flex-col items-center gap-2 mb-4",children:x?jsxRuntime.jsxs("div",{style:{color:m},className:"font-medium text-base",children:[jsxRuntime.jsx("span",{children:"Time expired - "}),jsxRuntime.jsx("button",{onClick:C,disabled:b,className:"underline hover:no-underline focus:outline-none focus:ring-2 focus:ring-offset-2 inline disabled:opacity-50",style:{color:m},children:b?"Releasing...":"select a new time"})]}):jsxRuntime.jsxs("div",{style:{color:m},className:"font-medium text-base",children:["Your time slot is reserved for ",S]})}),w.showActions&&!x&&jsxRuntime.jsxs("div",{className:"flex justify-center gap-2",children:[a&&e.canExtend&&jsxRuntime.jsxs("button",{onClick:N,disabled:!e.canExtend||p,className:"px-4 py-2 text-sm font-medium rounded transition-all active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed text-white",style:{backgroundColor:r.primary},"aria-label":`Extend hold (${e.maxExtensions-e.extensions} extensions remaining)`,children:[p?"Extending...":"Extend",!p&&e.maxExtensions-e.extensions>0&&jsxRuntime.jsxs("span",{className:"ml-1",children:["(",e.maxExtensions-e.extensions,")"]})]}),o&&jsxRuntime.jsx("button",{onClick:C,disabled:b,className:"px-4 py-2 text-sm font-medium rounded border transition-all active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",style:{borderColor:"rgba(255, 255, 255, 0.2)",color:r.text||"#000000"},"aria-label":"Release hold and return to time selection",children:b?"Releasing...":"Release"})]}),!x&&!e.canExtend&&e.extensions>=e.maxExtensions&&jsxRuntime.jsx("div",{className:"mt-3 pt-3 border-t border-white/10 text-center",children:jsxRuntime.jsxs("div",{className:"text-sm",style:{color:r.secondary},children:["Maximum extensions reached - complete booking now or"," ",jsxRuntime.jsx("button",{onClick:C,disabled:b,className:"hover:underline focus:outline-none focus:underline disabled:opacity-50",style:{color:r.primary},children:b?"releasing...":"select a different time"})]})})]})})}function Ro({config:e,colors:t,services:r=[],categories:a=[],dates:o=[],times:i=[],addons:n=[],paymentProvider:s,paymentConfig:l,isPreview:c=false,onComplete:d,onStepChange:u,onServiceSelect:p,onDateSelect:g,onContactInfoChange:b,validateStep:v,holdTimer:w,stepOrder:f,optInModules:x=[],onOptInData:y,customPaymentForm:N,cyclePhases:C}){let[h,k]=Ge.useState(0),[S,I]=Ge.useState("forward"),[R,m]=Ge.useState(null),[F,M]=Ge.useState(null),[A,D]=Ge.useState(null),[T,P]=Ge.useState([]),[z,K]=Ge.useState({}),[Y,Te]=Ge.useState({}),[U,ie]=Ge.useState(null),Xe=t.bookingText||t.text||"#000000",ot=e.transitions||{},ve=ot.style||"slide",At=ot.speed||"normal",je=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,fe=e.background||{type:"color",value:"#FFFFFF"},O={service:{id:"service",name:"Service",enabled:e.steps?.service_selection?.enabled!==false,settings:e.steps?.service_selection?.settings||{}},date:{id:"date",name:"Date",enabled:e.steps?.date_selection?.enabled!==false,settings:e.steps?.date_selection?.settings||{}},time:{id:"time",name:"Time",enabled:e.steps?.time_selection?.enabled!==false,settings:e.steps?.time_selection?.settings||{}},addons:{id:"addons",name:"Add-ons",enabled:e.steps?.addon_selection?.enabled===true,settings:e.steps?.addon_selection?.settings||{}},details:{id:"details",name:"Details",enabled:e.steps?.contact_form?.enabled!==false,settings:e.steps?.contact_form?.settings||{}},confirm:{id:"confirm",name:"Confirm",enabled:e.steps?.confirmation?.enabled===true,settings:e.steps?.confirmation?.settings||{}}},Ne=f||["service","date","time","addons","details","confirm"],J=Ne.map(E=>O[E]).filter(E=>E&&E.enabled);console.log("[BookingFlow] Step configuration:",{customStepOrder:f,orderedStepIds:Ne,allSteps:J.map(E=>E.id),currentStepIndex:h,currentStepId:J[h]?.id});let re=J[h],at=()=>fe.type==="gradient"?{background:fe.value}:fe.type==="image"?{backgroundImage:`url(${fe.value})`,backgroundSize:"cover",backgroundPosition:"center"}:{backgroundColor:fe.value},it=()=>{if(je)return .15;switch(At){case "fast":return .2;case "slow":return .5;default:return .3}},fr=()=>ve==="fade"?{enter:()=>({opacity:0,scale:.95}),center:{opacity:1,scale:1},exit:()=>({opacity:0,scale:.95})}:{enter:()=>({x:S==="forward"?50:-50,opacity:0}),center:{x:0,opacity:1},exit:()=>({x:S==="forward"?-50:50,opacity:0})},Kt=()=>{let E=re?.id;if(v)return v(E,{service:R,date:F,time:A,addons:T,contact:z});switch(E){case "service":return R!==null;case "date":return F!==null;case "time":return A!==null;case "details":if(c)return true;let W=z?.name&&z.name.trim().length>=2,_=z?.email&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(z.email),ye=z?.phone&&z.phone.replace(/\D/g,"").length>=10;return W&&_&&ye;default:return true}},$t=E=>E<h,Ce=E=>{I(E>h?"forward":"backward"),k(E),u&&u(E,J[E]?.id);},bt=()=>{h<J.length-1&&Ce(h+1);},Lt=async()=>{if(h===0)return;let E=h-1;if(J[E]?.id==="time"&&U&&w?.releaseHold)try{await w.releaseHold(U.holdId),ie(null),D(null);}catch(_){console.error("[BookingFlow] Failed to release hold:",_);}Ce(E);},yr=async E=>{if(D(E),w?.enabled&&w.createHold&&F&&R)try{let W=r.find(ye=>ye.id===R),_=await w.createHold({date:F,time:E,serviceId:R,serviceDuration:W?.duration||60});ie(_);}catch(W){console.error("[BookingFlow] Failed to create hold:",W);return}bt();},br=()=>{ie(null),D(null);let E=J.findIndex(W=>W.id==="time");E>=0&&Ce(E);},Jt=async()=>{d&&d({service:R,date:F,time:A,addons:T,contact:z,optIn:Y});},Zr=()=>{if(!re)return null;let E={settings:re.settings,colors:t},W=r.find(_=>_.id===R);switch(re.id){case "service":return jsxRuntime.jsx(On,{...E,services:r,categories:a,selectedService:R,onServiceSelect:se=>{m(se),p&&p(se);}});case "date":return jsxRuntime.jsx(nr,{...E,availableDates:o,selectedDate:F,onDateSelect:se=>{M(se),g&&g(se);},cyclePhases:C,selectedService:W,addons:n,selectedAddons:T,onAddonsChange:P,addonPlacement:e.steps?.addon_selection?.settings?.placement||"date_selection"});case "time":return jsxRuntime.jsx(Hn,{...E,availableTimes:i,selectedTime:A,onTimeSelect:yr,serviceDuration:W?.duration||60,selectedService:W,selectedDate:F,selectedAddons:T,addons:n});case "addons":return jsxRuntime.jsx(Wn,{...E,addons:n,selectedAddons:T,onAddonsChange:P});case "details":return jsxRuntime.jsx(Vn,{...E,contactInfo:z,onContactInfoChange:se=>{K(se),b&&b(se);},optInModules:x,onOptInData:y});case "confirm":let _=n.filter(se=>T.includes(se.id)),ye=_.reduce((se,Pe)=>se+(Pe.addonPrice||Pe.price||0),0),hr=(W?.price||0)+ye,xr=_.reduce((se,Pe)=>Pe.affectsDuration&&Pe.additionalDuration?se+Pe.additionalDuration:se,W?.duration||60);return N?jsxRuntime.jsx(N,{bookingData:{service:R,serviceName:W?.name,date:F,time:A,addons:T,contact:z,amount:W?.price||0,duration:xr,clientName:z?.name,clientEmail:z?.email,clientPhone:z?.phone,pendingBooking:{customerClientId:null,serviceId:R,date:F,time:A,notes:z?.notes||"",selectedAddons:_,addonServices:T,addonTotalCost:ye,totalAmount:hr,duration:xr}},onPaymentSuccess:Jt,onPaymentError:Pe=>{console.error("[BookingFlow] Payment error:",Pe);}}):jsxRuntime.jsx(Yn,{...E,service:W,addons:_,selectedDate:F||"",selectedTime:A||"",paymentProvider:s||"square",paymentConfig:l||{depositPercentage:20},isPreview:c,onConfirm:Jt});default:return null}},st=()=>{let E=e.progressBar?.style||"dots";return E==="bar"?jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-2",children:[jsxRuntime.jsxs("span",{className:"text-sm font-medium",children:["Step ",h+1," of ",J.length]}),jsxRuntime.jsx("span",{className:"text-xs opacity-60",children:re?.name})]}),jsxRuntime.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:jsxRuntime.jsx(framerMotion.motion.div,{className:"h-full rounded-full",style:{backgroundColor:t.primary},initial:{width:0},animate:{width:`${(h+1)/J.length*100}%`},transition:{duration:.3,ease:"easeOut"}})})]}):E==="minimal"?jsxRuntime.jsxs("div",{className:"mb-6 text-center",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",style:{color:t.primary},children:re?.name}),jsxRuntime.jsxs("p",{className:"text-xs opacity-60 mt-1",children:["Step ",h+1," of ",J.length]})]}):jsxRuntime.jsx("div",{className:"flex justify-center mb-4 overflow-x-auto py-2",children:jsxRuntime.jsx("div",{className:"flex items-center space-x-1.5 px-4 min-w-max",children:J.map((W,_)=>jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx(framerMotion.motion.div,{className:`w-6 h-6 rounded-full flex items-center justify-center font-medium text-xs transition-all flex-shrink-0 ${_===h?"text-white shadow-md":$t(_)?"text-white":"bg-gray-200 text-gray-500"}`,style:{backgroundColor:_<=h?t.primary:void 0},animate:{scale:_===h?1.05:1},transition:{duration:.2},children:$t(_)?"\u2713":_+1}),_<J.length-1&&jsxRuntime.jsx(framerMotion.motion.div,{className:`w-4 h-0.5 mx-1 transition-all flex-shrink-0 ${_<h?"":"bg-gray-200"}`,style:{backgroundColor:_<h?t.primary:void 0},initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.3,delay:.1}})]},W.id))})})};return jsxRuntime.jsxs("div",{className:"w-full max-w-4xl mx-auto p-6 rounded-2xl shadow-xl",style:{...at(),color:Xe},children:[st(),w?.enabled&&U&&re?.id!=="time"&&jsxRuntime.jsx(Tr,{holdStatus:U,config:w.config,colors:t,onExtend:async()=>{if(w.extendHold&&U)try{let E=await w.extendHold(U.holdId);ie(E);}catch(E){console.error("[BookingFlow] Failed to extend hold:",E);}},onRelease:async()=>{if(w.releaseHold&&U)try{await w.releaseHold(U.holdId),ie(null),D(null);let E=J.findIndex(W=>W.id==="time");E>=0&&Ce(E);}catch(E){console.error("[BookingFlow] Failed to release hold:",E);}},onExpired:br,className:"mb-6"}),jsxRuntime.jsx("div",{className:"mb-6 min-h-[300px] relative overflow-hidden",children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",custom:S,children:jsxRuntime.jsx(framerMotion.motion.div,{custom:S,variants:fr(),initial:"enter",animate:"center",exit:"exit",transition:{duration:it(),ease:[.4,0,.2,1]},children:Zr()},h)})}),!(re?.id==="confirm"&&N)&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-gray-200",children:[jsxRuntime.jsx("button",{onClick:Lt,disabled:h===0,className:"px-4 py-2 rounded-lg border border-gray-300 disabled:opacity-30 disabled:cursor-not-allowed hover:bg-gray-50 transition-all text-sm font-medium",children:"Back"}),h<J.length-1?jsxRuntime.jsx("button",{onClick:bt,disabled:!Kt(),className:"px-6 py-2 rounded-lg text-white disabled:opacity-50 disabled:cursor-not-allowed hover:opacity-90 transition-all text-sm font-medium shadow-md",style:{backgroundColor:t.primary},children:"Next"}):jsxRuntime.jsx("button",{onClick:Jt,disabled:!Kt(),className:"px-6 py-2 rounded-lg text-white disabled:opacity-50 disabled:cursor-not-allowed hover:opacity-90 transition-all text-sm font-medium shadow-md",style:{backgroundColor:t.primary},children:re?.id==="confirm"?"Pay & Confirm":"Complete"})]})]})}function yi({section:e,theme:t,BookingFlowComponent:r,config:a,enableInlineEditing:o=false}){let{type:i,settings:n}=e,s=e.id;i==="video_section"&&console.log("\u{1F3AC} Rendering video_section:",{type:i,settings:n,sectionId:s});let l=t?.colors||{primary:"#BCB4FF",secondary:"#CAC426",text:"#000000"},c=t?.typography||{headingFont:"Geist Sans",bodyFont:"Inter",bodySize:"16px"};switch(i){case "logo":return jsxRuntime.jsx(tn,{logoUrl:n.logoUrl,fallbackText:n.fallbackText,size:n.size,alignment:n.alignment,colors:l,enableInlineEditing:o,sectionId:s});case "header":return jsxRuntime.jsx(nn,{name:n.name,title:n.title,bio:n.bio,showName:n.showName,showTitle:n.showTitle,showBio:n.showBio,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "featured_link":return jsxRuntime.jsx(on,{text:n.text,url:n.url,style:n.style,size:n.size,colors:l,enableInlineEditing:o,sectionId:s});case "link_list":return jsxRuntime.jsx(sn,{links:n.links||[],style:n.style,colors:l,enableInlineEditing:o,sectionId:s});case "social_bar":return jsxRuntime.jsx(ln,{platforms:n.platforms||[],socialLinks:n.socialLinks,style:n.style,size:n.size,position:n.position,invertIcons:n.invertIcons,colors:l,enableInlineEditing:o,sectionId:s});case "instagram_feed":return jsxRuntime.jsx(Fn,{username:n.username,colors:l,enableInlineEditing:o,sectionId:s});case "minimal_header":return jsxRuntime.jsx(bn,{brandName:n.brandName,logoUrl:n.logoUrl,style:n.style,alignment:n.alignment,sticky:n.sticky,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "minimal_navigation":return jsxRuntime.jsx(xn,{links:n.links||[],style:n.style,colors:l,enableInlineEditing:o,sectionId:s});case "feature_content":return jsxRuntime.jsx(wn,{headline:n.headline,description:n.description,image:n.image,buttonText:n.buttonText,buttonUrl:n.buttonUrl,showButton:n.showButton,layout:n.layout,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "minimal_footer":return jsxRuntime.jsx(vn,{alignment:n.alignment,showSocial:n.showSocial,showContact:n.showContact,showLinks:n.showLinks,footerText:n.footerText,colors:l,enableInlineEditing:o,sectionId:s});case "hero":return jsxRuntime.jsx(cn,{headline:n.headline,subheadline:n.subheadline,heroImage:n.heroImage,ctaButton:n.ctaButton,layout:n.layout,imagePosition:n.imagePosition,contentDisplay:n.contentDisplay,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "about":return jsxRuntime.jsx(dn,{title:n.title,content:n.content,image:n.image,layout:n.layout,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "services_preview":return jsxRuntime.jsx(un,{title:n.title,services:n.services,layout:n.layout,columns:n.columns,showPrices:n.showPrices,showDuration:n.showDuration,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "gallery":return jsxRuntime.jsx(mn,{title:n.title,images:n.images||[],columns:n.columns,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "testimonials":return jsxRuntime.jsx(gn,{title:n.title,testimonials:n.testimonials,layout:n.layout,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "team":return jsxRuntime.jsx(fn,{title:n.title,members:n.members,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "contact":return jsxRuntime.jsx(yn,{title:n.title,showForm:n.showForm,email:n.email,phone:n.phone,address:n.address,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "before_after":return jsxRuntime.jsx(Cn,{title:n.title,comparisons:n.comparisons,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "pricing_table":return jsxRuntime.jsx(Sn,{title:n.title,plans:n.plans,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "booking":return jsxRuntime.jsx(En,{config:a||{},colors:l,BookingFlowComponent:r,enableInlineEditing:o,sectionId:s});case "fixed_info_card":return jsxRuntime.jsx(In,{name:n.name,subheading:n.subheading,bio:n.bio,links:n.links||[],bookingButtonText:n.bookingButtonText,bookingButtonUrl:n.bookingButtonUrl,showBookingButton:n.showBookingButton,position:n.position,cardWidth:n.cardWidth,cardColor:n.cardColor,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "video_section":return jsxRuntime.jsx(Rn,{videoUrl:n.videoUrl,aspectRatio:n.aspectRatio,autoplay:n.autoplay,loop:n.loop,muted:n.muted,controls:n.controls,allowFullScreen:n.allowFullScreen,coverImage:n.coverImage,maxWidth:n.maxWidth,alignment:n.alignment,borderRadius:n.borderRadius,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "scrolling_text_divider":return jsxRuntime.jsx(Pn,{text:n.text,scrollDirection:n.scrollDirection,scrollSpeed:n.scrollSpeed,orientation:n.orientation,dividerIcon:n.dividerIcon,customIcon:n.customIcon,textSize:n.textSize,textColor:n.textColor,fontWeight:n.fontWeight,backgroundColor:n.backgroundColor,backgroundGradient:n.backgroundGradient,pauseOnHover:n.pauseOnHover,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "location_map":return jsxRuntime.jsx(An,{address:n.address,displayType:n.displayType,mapHeight:n.mapHeight,mapStyle:n.mapStyle,zoom:n.zoom,showMarker:n.showMarker,borderRadius:n.borderRadius,directionsButtonText:n.directionsButtonText,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "image_section":return jsxRuntime.jsx(Mn,{imageUrl:n.imageUrl,altText:n.altText,caption:n.caption,maxWidth:n.maxWidth,alignment:n.alignment,aspectRatio:n.aspectRatio,borderRadius:n.borderRadius,linkUrl:n.linkUrl,openInNewTab:n.openInNewTab,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "faq_section":return jsxRuntime.jsx($n,{title:n.title,faqs:n.faqs,layout:n.layout,maxWidth:n.maxWidth,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "navbar":return jsxRuntime.jsx(Bn,{brandName:n.brandName,logoUrl:n.logoUrl,showLogo:n.showLogo,showBrandName:n.showBrandName,links:n.links,ctaText:n.ctaText,ctaUrl:n.ctaUrl,sticky:n.sticky,transparentOnTop:n.transparentOnTop,colors:l,typography:c,enableInlineEditing:o,sectionId:s});case "text_section":return jsxRuntime.jsx(zn,{title:n.title,content:n.content,alignment:n.alignment,maxWidth:n.maxWidth,textSize:n.textSize,backgroundColor:n.backgroundColor,textColor:n.textColor,paddingY:n.paddingY,colors:l,typography:c,enableInlineEditing:o,sectionId:s});default:return jsxRuntime.jsx("div",{className:"container mx-auto px-4 py-16",children:jsxRuntime.jsx("div",{className:"max-w-4xl mx-auto p-8 rounded-lg border-2 border-dashed text-center",style:{borderColor:l.primary,opacity:.5},children:jsxRuntime.jsxs("p",{className:"text-lg",style:{color:l.text},children:["Unknown section type: ",i]})})})}}var Xn=null;function xi(){if(!Xn){let e=({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href)) }),t=e.env?.VITE_SUPABASE_URL||process.env.NEXT_PUBLIC_SUPABASE_URL,r=e.env?.VITE_SUPABASE_ANON_KEY||process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;if(!t||!r)throw new Error("Supabase URL and Anon Key must be provided");Xn=supabaseJs.createClient(t,r);}return Xn}var nt={bucket:"form-uploads",limits:{maxSize:5*1024*1024,allowedTypes:["image/jpeg","image/png","image/webp","image/jpg"]}};async function To(e,t,r){if(console.log("\u{1F4E6} uploadFormImage called:",{fileName:e.name,clientId:t,formId:r}),e.size>nt.limits.maxSize)throw new Error(`File size exceeds maximum of ${nt.limits.maxSize/1024/1024}MB`);if(!nt.limits.allowedTypes.includes(e.type))throw new Error(`File type ${e.type} not allowed. Accepted types: JPG, PNG, WebP`);console.log("\u{1F3A8} Starting image optimization...");let a=await vi(e);console.log("\u2705 Image optimized:",{originalSize:e.size,optimizedSize:a.size});let o=Date.now();e.name.split(".").pop()?.toLowerCase()||"jpg";let n=e.name.replace(/[^a-zA-Z0-9.-]/g,"_").substring(0,50),s=`${o}_${n}`,l=`${t}/${r}/${s}`;console.log("\u2601\uFE0F Uploading to Supabase:",{filePath:l,bucket:nt.bucket});let c=xi(),{data:d,error:u}=await c.storage.from(nt.bucket).upload(l,a,{cacheControl:"3600",upsert:false,contentType:a.type});if(console.log("\u{1F4E4} Upload result:",{data:d,error:u}),u)throw console.error("\u274C Supabase upload error:",u),new Error(`Upload failed: ${u.message}`);console.log("\u2705 Upload successful, getting public URL...");let{data:{publicUrl:p}}=c.storage.from(nt.bucket).getPublicUrl(l);return console.log("\u2705 Public URL obtained:",p),{url:p,path:l,filename:e.name,size:a.size,type:a.type}}async function vi(e,t=1920,r=.85){console.log("\u{1F5BC}\uFE0F optimizeImage: Starting optimization");let a=e.type==="image/png"||e.type==="image/webp",o=a?e.type:"image/jpeg";return console.log("\u{1F5BC}\uFE0F optimizeImage: Output type:",o,"Transparency:",a),new Promise((i,n)=>{let s=setTimeout(()=>{console.error("\u23F1\uFE0F optimizeImage: Timeout after 30 seconds"),n(new Error("Image optimization timed out"));},3e4),l=new Image,c=document.createElement("canvas"),d=c.getContext("2d",{alpha:a});if(!d){clearTimeout(s),console.error("\u274C optimizeImage: Canvas context not available"),n(new Error("Canvas context not available"));return}console.log("\u{1F5BC}\uFE0F optimizeImage: Created canvas and context"),l.onload=()=>{console.log("\u{1F5BC}\uFE0F optimizeImage: Image loaded",{width:l.width,height:l.height});try{let u=Math.min(t/l.width,1);c.width=l.width*u,c.height=l.height*u,console.log("\u{1F5BC}\uFE0F optimizeImage: Resizing to",{width:c.width,height:c.height}),a&&d.clearRect(0,0,c.width,c.height),d.drawImage(l,0,0,c.width,c.height),console.log("\u{1F5BC}\uFE0F optimizeImage: Image drawn, converting to blob..."),c.toBlob(p=>{if(clearTimeout(s),!p){console.error("\u274C optimizeImage: Blob conversion failed"),n(new Error("Image optimization failed"));return}console.log("\u2705 optimizeImage: Blob created",{size:p.size,type:o});let g=new File([p],e.name,{type:o,lastModified:Date.now()});console.log("\u2705 optimizeImage: Optimization complete"),i(g);},o,r);}catch(u){clearTimeout(s),console.error("\u274C optimizeImage: Error during processing",u),n(u);}},l.onerror=u=>{clearTimeout(s),console.error("\u274C optimizeImage: Failed to load image",u),n(new Error("Failed to load image"));},console.log("\u{1F5BC}\uFE0F optimizeImage: Creating object URL and loading image..."),l.src=URL.createObjectURL(e);})}function Po(e){return e.size>nt.limits.maxSize?{valid:false,error:`File size exceeds maximum of ${nt.limits.maxSize/1024/1024}MB`}:nt.limits.allowedTypes.includes(e.type)?{valid:true}:{valid:false,error:"File type not allowed. Accepted: JPG, PNG, WebP"}}function Ar({field:e,value:t,error:r,onChange:a,businessId:o,formId:i,styling:n}){let s=Ge.useRef(null),[l,c]=Ge.useState(false),[d,u]=Ge.useState(null),p=n?.labelColor||"#374151",g=n?.fieldStyle||"outlined",v=(()=>{let f="w-full px-4 py-2 transition-all focus:outline-none";if(r)return `${f} bg-red-50 border border-red-300 rounded-lg focus:ring-2 focus:ring-red-500`;switch(g){case "filled":return `${f} bg-gray-100 border border-transparent rounded-lg focus:bg-white focus:ring-2 focus:ring-gray-900 focus:border-transparent`;case "underlined":return `${f} bg-transparent border-0 border-b-2 border-gray-300 rounded-none focus:border-gray-900 focus:ring-0 px-0`;case "minimal":return `${f} bg-transparent border border-gray-200 rounded-lg focus:border-gray-400 focus:ring-1 focus:ring-gray-300`;case "outlined":default:return `${f} bg-white border-2 border-gray-300 rounded-lg focus:border-gray-900 focus:ring-2 focus:ring-gray-900`}})(),w="block text-sm font-medium mb-1";if(e.type==="text"||e.type==="email"||e.type==="tel")return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsx("input",{type:e.type,id:e.id,name:e.id,value:t||"",onChange:f=>a(f.target.value),placeholder:e.placeholder,required:e.required,className:v,style:{color:p}}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]});if(e.type==="textarea")return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsx("textarea",{id:e.id,name:e.id,value:t||"",onChange:f=>a(f.target.value),placeholder:e.placeholder,required:e.required,rows:4,className:v,style:{color:p}}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]});if(e.type==="date")return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsx("input",{type:"date",id:e.id,name:e.id,value:t||"",onChange:f=>a(f.target.value),required:e.required,className:v,style:{color:p}}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]});if(e.type==="select"&&e.options)return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsxs("select",{id:e.id,name:e.id,value:t||"",onChange:f=>a(f.target.value),required:e.required,className:v,style:{color:p},children:[jsxRuntime.jsx("option",{value:"",children:"Select an option..."}),e.options.map(f=>jsxRuntime.jsx("option",{value:f.value,children:f.label},f.value))]}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]});if(e.type==="radio"&&e.options)return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsx("div",{className:"space-y-2 mt-2",children:e.options.map(f=>jsxRuntime.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[jsxRuntime.jsx("input",{type:"radio",name:e.id,value:f.value,checked:t===f.value,onChange:x=>a(x.target.value),required:e.required,className:"w-4 h-4 text-gray-900 focus:ring-gray-900 focus:ring-2"}),jsxRuntime.jsx("span",{className:"text-sm",style:{color:n?.labelColor||"#000000"},children:f.label})]},f.value))}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]});if(e.type==="checkbox"&&e.options){let f=Array.isArray(t)?t:[],x=y=>{let N=f.includes(y)?f.filter(C=>C!==y):[...f,y];a(N);};return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsx("div",{className:"space-y-2 mt-2",children:e.options.map(y=>jsxRuntime.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[jsxRuntime.jsx("input",{type:"checkbox",name:`${e.id}[]`,value:y.value,checked:f.includes(y.value),onChange:()=>x(y.value),className:"w-4 h-4 text-gray-900 focus:ring-gray-900 focus:ring-2 rounded"}),jsxRuntime.jsx("span",{className:"text-sm",style:{color:n?.labelColor||"#000000"},children:y.label})]},y.value))}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-red-600",children:r})]})}if(e.type==="photo"){let f=async x=>{let y=x.target.files?.[0];if(!y)return;u(null);let N=Po(y);if(!N.valid){u(N.error||"Invalid file"),s.current&&(s.current.value="");return}if(!o||!i){u("Missing required configuration for file upload"),s.current&&(s.current.value="");return}c(true);try{let C=await To(y,o,i);a({url:C.url,filename:C.filename,size:C.size,type:C.type,uploadedAt:new Date().toISOString()}),u(null);}catch(C){console.error("Photo upload error:",C),u(C instanceof Error?C.message:"Upload failed"),s.current&&(s.current.value="");}finally{c(false);}};return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:w,style:{color:p},children:[e.label,e.required&&jsxRuntime.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),jsxRuntime.jsxs("div",{className:"mt-1",children:[jsxRuntime.jsx("input",{ref:s,type:"file",id:e.id,name:e.id,accept:"image/*",onChange:f,required:e.required,disabled:l,className:`block w-full text-sm text-gray-500
11
11
  file:mr-4 file:py-2 file:px-4
12
12
  file:rounded-lg file:border-0
13
13
  file:text-sm file:font-medium