(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[977],{692:(e,t,r)=>{"use strict";r.d(t,{Gq:()=>i,Jz:()=>s,kI:()=>n});let a={newsletter:{maxRequests:5,windowMs:36e5},feedback:{maxRequests:3,windowMs:36e5},contact:{maxRequests:2,windowMs:36e5},popularFeatures:{maxRequests:10,windowMs:36e5}};function s(e){let t=a[e],r=Date.now();try{let a=localStorage.getItem("rateLimit_".concat(e)),s=a?JSON.parse(a):{count:0,windowStart:r};return r-s.windowStart>t.windowMs&&(s.count=0,s.windowStart=r),s.count>=t.maxRequests}catch(e){return console.warn("Rate limiting check failed:",e),!1}}function i(e){let t=a[e],r="rateLimit_".concat(e),s=Date.now();try{let e=localStorage.getItem(r),a=e?JSON.parse(e):{count:0,windowStart:s};s-a.windowStart>t.windowMs?(a.count=1,a.windowStart=s):a.count+=1,localStorage.setItem(r,JSON.stringify(a))}catch(e){console.warn("Failed to record submission:",e)}}function n(e){let t=a[e],r=Date.now();try{let a=localStorage.getItem("rateLimit_".concat(e)),s=a?JSON.parse(a):{count:0,windowStart:r};if(r-s.windowStart>t.windowMs)return t.maxRequests;return Math.max(0,t.maxRequests-s.count)}catch(e){return console.warn("Failed to get remaining submissions:",e),t.maxRequests}}},3720:(e,t,r)=>{"use strict";r.d(t,{B9:()=>s,e2:()=>i});let a=/^[a-zA-Z0-9]([a-zA-Z0-9._%-]*[a-zA-Z0-9])?@[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/;function s(e){return!!e&&"string"==typeof e&&a.test(e.trim())}function i(e){return e&&""!==e.trim()?s(e)?null:"Please enter a valid email address":"Email is required"}},4679:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>p,D5:()=>d,KE:()=>u,RS:()=>o,cK:()=>c,mX:()=>m});var a=r(1990),s=r(5317),i=r(7039),n=r(692);let o=(0,a.zD)("contact/submit",async(e,t)=>{let{rejectWithValue:r}=t;try{if((0,n.Jz)("contact")){let e=(0,n.kI)("contact");return r("Too many contact requests. You can send ".concat(e," more messages in the next hour. Please try again later."))}if(!e.name.trim()||!e.email.trim()||!e.message.trim())return r("Name, email, and message are required");if(!e.agreeToPrivacy)return r("You must agree to the privacy policy to send a message");let t={...e,submittedAt:s.Dc.now(),isProcessed:!1,source:"landing-page-contact-form"},a=await (0,s.gS)((0,s.rJ)(i.db,"contact-submissions"),t);return(0,n.Gq)("contact"),{id:a.id,message:"Thank you for your message! We'll get back to you within 24 hours."}}catch(e){return r(e instanceof Error?e.message:"Failed to send message")}}),l=(0,a.Z0)({name:"contact",initialState:{formData:{name:"",email:"",inquiryType:"general-inquiry",subject:"",message:"",agreeToPrivacy:!1},isSubmitting:!1,isSubmitted:!1,error:null,successMessage:null},reducers:{updateContactForm:(e,t)=>{e.formData={...e.formData,...t.payload},(e.error||e.successMessage)&&(e.error=null,e.successMessage=null)},setInquiryType:(e,t)=>{e.formData.inquiryType=t.payload},togglePrivacyAgreement:e=>{e.formData.agreeToPrivacy=!e.formData.agreeToPrivacy},clearContactMessages:e=>{e.error=null,e.successMessage=null},resetContactForm:e=>{e.formData={name:"",email:"",inquiryType:"general-inquiry",subject:"",message:"",agreeToPrivacy:!1},e.isSubmitting=!1,e.isSubmitted=!1,e.error=null,e.successMessage=null}},extraReducers:e=>{e.addCase(o.pending,e=>{e.isSubmitting=!0,e.error=null,e.successMessage=null}).addCase(o.fulfilled,(e,t)=>{e.isSubmitting=!1,e.isSubmitted=!0,e.successMessage=t.payload.message,e.formData={name:"",email:"",inquiryType:"general-inquiry",subject:"",message:"",agreeToPrivacy:!1}}).addCase(o.rejected,(e,t)=>{e.isSubmitting=!1,e.error=t.payload})}}),{updateContactForm:c,setInquiryType:u,togglePrivacyAgreement:d,clearContactMessages:m,resetContactForm:g}=l.actions,p=l.reducer},5118:(e,t,r)=>{"use strict";r.d(t,{default:()=>d});var a=r(5155),s=r(4679),i=r(6874),n=r.n(i),o=r(2115),l=r(8418),c=r(3720),u=r(6877);function d(){let e=(0,l.j)(),{formData:t,isSubmitting:r,isSubmitted:i,error:d,successMessage:m}=(0,l.G)(e=>e.contact),[g,p]=(0,o.useState)(null),[f,y]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{t.email||(p(null),y(!1))},[t.email]),(0,o.useEffect)(()=>{u.Qu.start()},[]),(0,o.useEffect)(()=>{i&&m?u.Qu.submit(!0):d&&u.Qu.submit(!1,d)},[i,m,d]),(0,o.useEffect)(()=>{if(d||m){let t=setTimeout(()=>{e((0,s.mX)())},8e3);return()=>clearTimeout(t)}},[d,m,e]),i&&m)?(0,a.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,a.jsxs)("div",{className:"bg-green-50 border border-green-200 rounded-2xl p-8 text-center",children:[(0,a.jsx)("div",{className:"text-6xl mb-4",children:"✅"}),(0,a.jsx)("h3",{className:"text-2xl font-bold text-green-800 mb-2",children:"Message Sent!"}),(0,a.jsx)("p",{className:"text-green-700 mb-6",children:m}),(0,a.jsx)("button",{onClick:()=>window.location.reload(),className:"px-6 py-3 bg-green-600 text-white rounded-xl hover:bg-green-700 transition-colors",children:"Send Another Message"})]})}):(0,a.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,a.jsxs)("form",{onSubmit:r=>{r.preventDefault(),y(!0);let a=(0,c.e2)(t.email);if(a){p(a),u.Qu.field("validation_error","email"),console.error("Email validation failed:",a,"for email:",t.email);return}p(null),e((0,s.RS)(t))},className:"bg-white rounded-3xl p-8 shadow-xl",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Name *"}),(0,a.jsx)("input",{type:"text",value:t.name,onChange:t=>e((0,s.cK)({name:t.target.value})),placeholder:"Your full name",className:"w-full px-4 py-3 border border-gray-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent",required:!0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email *"}),(0,a.jsx)("input",{type:"email",value:t.email,onChange:t=>{let r=t.target.value;e((0,s.cK)({email:r})),f&&p((0,c.e2)(r))},onFocus:()=>u.Qu.field("focus","email"),onBlur:()=>{y(!0),p((0,c.e2)(t.email)),u.Qu.field("blur","email")},placeholder:"your@email.com",className:"w-full px-4 py-3 border rounded-xl focus:outline-none focus:ring-2 focus:border-transparent ".concat(g&&f?"border-red-300 focus:ring-red-500":"border-gray-300 focus:ring-purple-500"),required:!0}),g&&f&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-600",children:g})]})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-3",children:"What can we help you with? *"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[{value:"general-inquiry",label:"General Inquiry",description:"Questions about FrameTimeSync or photography"},{value:"technical-support",label:"Technical Support",description:"App issues, bugs, or troubleshooting help"},{value:"business-inquiry",label:"Business Inquiry",description:"Commercial licensing or enterprise questions"},{value:"media-press",label:"Media & Press",description:"Press inquiries, interviews, or media requests"},{value:"partnership",label:"Partnership",description:"Collaboration or integration opportunities"},{value:"other",label:"Other",description:"Something else not covered above"}].map(r=>(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-start p-4 border border-gray-200 rounded-xl cursor-pointer hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("input",{type:"radio",name:"inquiryType",value:r.value,checked:t.inquiryType===r.value,onChange:()=>{e((0,s.KE)(r.value)),u.Qu.inquiryType(r.value)},className:"mt-1 mr-3 text-purple-600 focus:ring-purple-500"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:r.label}),(0,a.jsx)("div",{className:"text-sm text-gray-600",children:r.description})]})]})},r.value))})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Subject *"}),(0,a.jsx)("input",{type:"text",value:t.subject,onChange:t=>e((0,s.cK)({subject:t.target.value})),placeholder:"Brief description of your inquiry",className:"w-full px-4 py-3 border border-gray-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent",required:!0})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Message *"}),(0,a.jsx)("textarea",{value:t.message,onChange:t=>e((0,s.cK)({message:t.target.value})),placeholder:"Please provide details about your inquiry...",rows:6,className:"w-full px-4 py-3 border border-gray-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none",required:!0})]}),(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)("label",{className:"flex items-start",children:[(0,a.jsx)("input",{type:"checkbox",checked:t.agreeToPrivacy,onChange:()=>e((0,s.D5)()),className:"mt-1 mr-3 text-purple-600 focus:ring-purple-500 rounded",required:!0}),(0,a.jsxs)("span",{className:"text-sm text-gray-700",children:["I agree to the"," ",(0,a.jsx)(n(),{href:"/privacy",className:"text-purple-600 hover:text-purple-700 underline",children:"Privacy Policy"})," ","and consent to FrameTimeSync processing my personal data to respond to my inquiry. *"]})]})}),d&&(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4",children:(0,a.jsx)("p",{className:"text-red-800 text-sm",children:d})})}),(0,a.jsx)("button",{type:"submit",disabled:r||!t.agreeToPrivacy||!c.B9||f&&!!g,className:"w-full py-4 px-6 rounded-2xl font-semibold text-lg transition-all ".concat(r||!t.agreeToPrivacy||f&&g?"bg-gray-400 cursor-not-allowed":"bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700 shadow-lg hover:shadow-xl"," text-white"),children:r?(0,a.jsxs)("span",{className:"flex items-center justify-center",children:[(0,a.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Sending Message..."]}):"Send Message \uD83D\uDCE7"}),(0,a.jsx)("div",{className:"mt-6 p-4 bg-gray-50 rounded-xl",children:(0,a.jsxs)("p",{className:"text-xs text-gray-600",children:[(0,a.jsx)("strong",{children:"Data Protection:"})," Your personal information will be used solely to respond to your inquiry. We store your data securely and will not share it with third parties. You can request deletion of your data at any time by contacting us."]})})]})})}},6073:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,6874,23)),Promise.resolve().then(r.t.bind(r,3063,23)),Promise.resolve().then(r.bind(r,5118))},6877:(e,t,r)=>{"use strict";r.d(t,{Qu:()=>c,tN:()=>d,xs:()=>u});var a=r(1906),s=r(7039);let i=(e,t)=>{if(s.z){let r={page_title:document.title,page_location:window.location.pathname,timestamp:Date.now(),...t};(0,a.$s)(s.z,e,r)}},n=e=>{i("form_start",{form_type:e,event_category:"form"})},o=(e,t,r)=>{i(t?"form_success":"form_error",{form_type:e,error_message:r,event_category:"form"})},l=(e,t,r)=>{i("validation_error"===e?"form_validation_error":"form_field_".concat(e),{field_name:t,form_type:r,event_category:"form"})},c={start:()=>{i("contact_form_start"),n("contact")},submit:(e,t)=>{o("contact",e,t),e?i("contact_form_success"):i("contact_form_error",{error_message:t})},field:(e,t)=>l(e,t,"contact"),inquiryType:e=>{i("inquiry_type_select",{inquiry_type:e})}},u={start:()=>{i("feedback_form_start"),n("feedback")},submit:(e,t)=>{o("feedback",e,t),e?i("feedback_form_success"):i("feedback_form_error",{error_message:t})},field:(e,t)=>l(e,t,"feedback"),type:e=>{i("feedback_type_select",{feedback_type:e})},rating:e=>{i("rating_submit",{rating_value:e,rating_context:"feedback_form",event_category:"feedback"}),i("rating_click",{rating_value:e})},feature:e=>{i("feature_selection",{feature_name:e,selection_context:"feedback_form",event_category:"engagement"}),i("popular_feature_select",{feature_name:e})},style:e=>{i("photography_style_select",{photography_style:e})}},d={subscribe:(e,t)=>{o("newsletter",e,t),e?i("newsletter_subscribe",{success:!0}):i("newsletter_subscribe",{success:!1,error_message:t})}}},7039:(e,t,r)=>{"use strict";let a;r.d(t,{db:()=>l,z:()=>a});var s=r(1906),i=r(3915),n=r(5317);let o=(0,i.Wp)({apiKey:"AIzaSyDuXmoACmYcS38pRnSKT7pZiB2YFAtB35w",authDomain:"frametimesync.firebaseapp.com",projectId:"frametimesync",storageBucket:"frametimesync.firebasestorage.app",messagingSenderId:"593555084950",appId:"1:593555084950:web:183fdaa8121df4f54ed4b7",measurementId:"G-80HV83B5GQ"}),l=(0,n.aU)(o);a=(0,s.P5)(o)},8418:(e,t,r)=>{"use strict";r.d(t,{G:()=>i,j:()=>s});var a=r(4540);let s=()=>(0,a.wA)(),i=a.d4}},e=>{e.O(0,[135,992,724,441,964,358],()=>e(e.s=6073)),_N_E=e.O()}]);