1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="2b2540df-7b03-4898-ac60-7e6ed01443dc",e._sentryDebugIdIdentifier="sentry-dbid-2b2540df-7b03-4898-ac60-7e6ed01443dc")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7250],{27250:(e,s,t)=>{t.d(s,{w:()=>k});var a=t(95155),l=t(12115),r=t(47471),n=t(24511),i=t(97003),o=t(83209),c=t(33789),d=t(67001),u=t(65229),m=t(5937),b=t(90368),x=t(87066),h=t(23664),p=t(95740),f=t(42529),g=t(35299),j=t(18085),v=t(25016),y=t(18720),N=t(63366);let w="https://syncfutures-backend.onrender.com";function k(){let{showFeedback:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[s,t]=(0,l.useState)(!1),[k,S]=(0,l.useState)(e?"menu":"support"),[A,C]=(0,l.useState)({name:"",subject:"",email:"",message:""}),[T,_]=(0,l.useState)({}),[F,P]=(0,l.useState)(!1),[E,D]=(0,l.useState)(!1),[z,I]=(0,l.useState)(""),[M,B]=(0,l.useState)(""),[W,$]=(0,l.useState)(null),[O,J]=(0,l.useState)(!1),[q,Y]=(0,l.useState)(!1),[H,R]=(0,l.useState)(null),[Z,G]=(0,l.useState)(!1),[L,U]=(0,l.useState)(!1),K=(0,l.useRef)(null),{isSignedIn:Q,getToken:V}=(0,r.d)(),{user:X}=(0,n.Jd)();(0,l.useEffect)(()=>{Q&&X&&C(e=>{var s,t,a;return{...e,name:e.name||"".concat(null!=(t=X.firstName)?t:""," ").concat(null!=(a=X.lastName)?a:"").trim(),email:e.email||(null==(s=X.primaryEmailAddress)?void 0:s.emailAddress)||""}})},[Q,X]);let ee=async()=>{if(Q)try{var e,s;let t=await V(),a=await fetch("".concat(w,"/api/v1/surveys/me/active?channel=BUBBLE"),{headers:{Authorization:"Bearer ".concat(t)}});if(!a.ok)return;let l=await a.json();R(null!=(s=null==(e=l.surveys)?void 0:e[0])?s:null)}catch(e){}};(0,l.useEffect)(()=>{Q&&ee()},[Q]),(0,l.useEffect)(()=>{if(!H)return void U(!1);try{let e=localStorage.getItem("survey_seen_".concat(H.survey_id));U("1"===e)}catch(e){U(!1)}},[H]),(0,l.useEffect)(()=>{if(s&&H&&!L)try{localStorage.setItem("survey_seen_".concat(H.survey_id),"1"),U(!0)}catch(e){}},[s,H,L]),(0,l.useEffect)(()=>{s||setTimeout(()=>{S(e?"menu":"support"),D(!1),Y(!1)},300)},[s,e]);let es=async s=>{if(s.preventDefault(),(()=>{let e={};return A.name.trim()||(e.name="Please provide your full name."),A.subject.trim()||(e.subject="Please provide a subject."),A.email.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(A.email)||(e.email="Please provide a valid email."):e.email="Please provide your email.",A.message.trim()||(e.message="Please enter your message."),_(e),0===Object.keys(e).length})()){P(!0);try{let s=await fetch("https://api.web3forms.com/submit",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({access_key:"ea9c3538-432c-4ebd-b2c8-86ecb163c517",name:A.name,email:A.email,"Support Topic":A.subject,message:A.message,subject:A.subject,from_name:A.name,replyto:A.email,botcheck:""})});200===s.status?(D(!0),y.o.success("Message sent successfully!"),setTimeout(()=>{t(!1),setTimeout(()=>{D(!1),C({name:"",subject:"",email:"",message:""}),S(e?"menu":"support")},300)},3e3)):y.o.error("Failed to send message. Please try again.")}catch(e){console.error("Support submit error:",e),y.o.error("Network error. Please check your connection.")}finally{P(!1)}}},et=async s=>{if(s.preventDefault(),$(null),!z.trim())return void $("Please write your feedback first.");if(!Q&&!M.trim())return void $("Please add an email so we can follow up if needed.");J(!0);try{let s={"Content-Type":"application/json"};if(Q){let e=await V();e&&(s.Authorization="Bearer ".concat(e))}let a=await fetch("".concat(w,"/api/v1/surveys/feedback"),{method:"POST",headers:s,body:JSON.stringify({content:z,email:Q?void 0:M||void 0,page_url:window.location.pathname})});if(a.ok)Y(!0),y.o.success("Thanks for the feedback!"),setTimeout(()=>{t(!1),setTimeout(()=>{I(""),B(""),Y(!1),S(e?"menu":"support")},300)},2500);else{let e=await a.json().catch(()=>({}));$((null==e?void 0:e.detail)||(null==e?void 0:e.message)||"Failed to submit feedback.")}}catch(e){console.error("Feedback submit error:",e),$("Network error. Please try again.")}finally{J(!1)}},ea=()=>t(e=>!e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed right-6 z-50 bottom-[calc(1.5rem+env(safe-area-inset-bottom))]",children:(0,a.jsxs)(i.$,{onClick:ea,size:"lg",className:"relative h-14 w-14 roun
1ded-full bg-blue-600 hover:bg-blue-700 shadow-lg transition-all duration-200 hover:scale-105",children:[s?(0,a.jsx)(u.A,{className:"h-6 w-6 transition-transform duration-200"}):(0,a.jsx)(m.A,{className:"h-6 w-6 transition-transform duration-200"}),!s&&H&&!L&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 h-4 w-4 rounded-full bg-purple-500 ring-2 ring-background animate-pulse"})]})}),s&&(0,a.jsx)("div",{className:"fixed right-6 z-50 w-96 max-w-[calc(100vw-3rem)] bottom-[calc(6rem+env(safe-area-inset-bottom))]",children:(0,a.jsxs)(o.Zp,{className:"border-0 shadow-2xl bg-background/95 backdrop-blur-sm overflow-hidden pt-0",children:[(0,a.jsx)(o.aR,{className:"pt-4 pb-3 bg-gradient-to-r from-blue-600 to-blue-700 text-white rounded-t-xl",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e&&"menu"!==k&&(0,a.jsx)(i.$,{variant:"ghost",size:"sm",onClick:()=>S("menu"),className:"h-7 w-7 p-0 text-white hover:bg-white/20",children:(0,a.jsx)(b.A,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(o.ZB,{className:"text-lg font-semibold",children:["menu"===k&&"Help & feedback","support"===k&&"Contact support","feedback"===k&&"Send feedback"]}),(0,a.jsxs)("p",{className:"text-blue-100 text-sm mt-1",children:["menu"===k&&"We're here to help","support"===k&&"We usually respond within 2â4 hours, MonâFri, 8 AMâ5 PM Central","feedback"===k&&"Help us make SyncFutures better"]})]})]}),(0,a.jsx)(i.$,{variant:"ghost",size:"sm",onClick:ea,className:"h-8 w-8 p-0 text-white hover:bg-white/20",children:(0,a.jsx)(u.A,{className:"h-4 w-4"})})]})}),(0,a.jsxs)(o.Wu,{className:"p-6",children:["menu"===k&&(0,a.jsxs)("div",{className:"space-y-2",children:[H&&(0,a.jsxs)("button",{type:"button",onClick:()=>{t(!1),G(!0)},className:"w-full flex items-center gap-3 p-4 rounded-lg border border-purple-300 bg-purple-50/70 hover:bg-purple-50 dark:border-purple-700 dark:bg-purple-950/30 text-left transition-colors",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-purple-200 dark:bg-purple-800/60",children:(0,a.jsx)(x.A,{className:"h-5 w-5 text-purple-700 dark:text-purple-200"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"font-medium flex items-center gap-2",children:["Take survey",!L&&(0,a.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-purple-600 text-white font-semibold",children:"NEW"})]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground line-clamp-2",children:H.intro_text||H.name})]})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>S("support"),className:"w-full flex items-center gap-3 p-4 rounded-lg border border-border hover:border-blue-500 hover:bg-blue-50/50 dark:hover:bg-blue-950/20 text-left transition-colors",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900/40",children:(0,a.jsx)(h.A,{className:"h-5 w-5 text-blue-600 dark:text-blue-300"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"font-medium",children:"Contact support"}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Get help with an issue or question"})]})]}),e&&(0,a.jsxs)("button",{type:"button",onClick:()=>S("feedback"),className:"w-full flex items-center gap-3 p-4 rounded-lg border border-border hover:border-purple-500 hover:bg-purple-50/50 dark:hover:bg-purple-950/20 text-left transition-colors",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-purple-100 dark:bg-purple-900/40",children:(0,a.jsx)(p.A,{className:"h-5 w-5 text-purple-600 dark:text-purple-300"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"font-medium",children:"Send feedback"}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Share an idea or suggestion"})]})]})]}),"support"===k&&(E?(0,a.jsxs)("div",{className:"text-center py-8",children:[(0,a.jsx)("div",{className:"mx-auto w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,a.jsx)(f.A,{className:"h-6 w-6 text-green-600"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Message Sent Successfully!"}),(0,a.jsx)("p",{className:"text-gray-600 text-sm",children:"Thank y
1ou for contacting SyncFutures support. We'll get back to you via email."})]}):(0,a.jsxs)("form",{ref:K,onSubmit:es,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"name",className:"block mb-2 text-sm font-medium text-gray-700",children:"Full Name"}),(0,a.jsx)(c.p,{id:"name",type:"text",placeholder:"John Doe",value:A.name,onChange:e=>{C(s=>({...s,name:e.target.value})),T.name&&_(e=>({...e,name:""}))},className:(0,v.cn)("transition-colors",T.name&&"border-red-500"),disabled:F}),T.name&&(0,a.jsx)("div",{className:"text-red-500 text-xs mt-1",children:T.name})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"subject",className:"block mb-2 text-sm font-medium text-gray-700",children:"Subject"}),(0,a.jsx)(c.p,{id:"subject",type:"text",placeholder:"Account issue, Trading question...",value:A.subject,onChange:e=>{C(s=>({...s,subject:e.target.value})),T.subject&&_(e=>({...e,subject:""}))},className:(0,v.cn)("transition-colors",T.subject&&"border-red-500"),disabled:F}),T.subject&&(0,a.jsx)("div",{className:"text-red-500 text-xs mt-1",children:T.subject})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"email",className:"block mb-2 text-sm font-medium text-gray-700",children:"Email Address"}),(0,a.jsx)(c.p,{id:"email",type:"email",placeholder:"[email protected]",value:A.email,onChange:e=>{C(s=>({...s,email:e.target.value})),T.email&&_(e=>({...e,email:""}))},className:(0,v.cn)("transition-colors",T.email&&"border-red-500"),disabled:F}),T.email&&(0,a.jsx)("div",{className:"text-red-500 text-xs mt-1",children:T.email})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"message",className:"block mb-2 text-sm font-medium text-gray-700",children:"Your Message"}),(0,a.jsx)(d.T,{id:"message",placeholder:"Describe your issue or question...",value:A.message,onChange:e=>{C(s=>({...s,message:e.target.value})),T.message&&_(e=>({...e,message:""}))},className:(0,v.cn)("min-h-[100px] transition-colors",T.message&&"border-red-500"),disabled:F}),T.message&&(0,a.jsx)("div",{className:"text-red-500 text-xs mt-1",children:T.message})]}),(0,a.jsx)(i.$,{type:"submit",className:"w-full bg-blue-600 hover:bg-blue-700",disabled:F,children:F?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{className:"w-4 h-4 mr-2 animate-spin"}),"Sending..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.A,{className:"w-4 h-4 mr-2"}),"Send Message"]})})]})),"feedback"===k&&(q?(0,a.jsxs)("div",{className:"text-center py-8",children:[(0,a.jsx)("div",{className:"mx-auto w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,a.jsx)(p.A,{className:"h-6 w-6 text-purple-600"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Thanks for sharing!"}),(0,a.jsx)("p",{className:"text-gray-600 text-sm",children:"Your feedback goes straight to our team and helps shape SyncFutures."})]}):(0,a.jsxs)("form",{onSubmit:et,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"What's on your mind?"}),(0,a.jsx)(d.T,{placeholder:"Tell us what's working, what isn't, or what you'd love to see...",value:z,onChange:e=>{I(e.target.value),W&&$(null)},className:"min-h-[140px]",disabled:O})]}),!Q&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Your email (for follow-up)"}),(0,a.jsx)(c.p,{type:"email",placeholder:"[email protected]",value:M,onChange:e=>{B(e.target.value),W&&$(null)},disabled:O})]}),W&&(0,a.jsx)("div",{className:"text-red-500 text-xs",children:W}),(0,a.jsx)(i.$,{type:"submit",className:"w-full bg-purple-600 hover:bg-purple-700",disabled:O,children:O?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{className:"w-4 h-4 mr-2 animate-spin"}),"Sending..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.A,{className:"w-4 h-4 mr-2"}),"Send feedback"]})})]}))]})]})}),Z&&H&&(0,a.jsx)(N.S,{token:H.token,onClose:()=>{G(!1),ee()}})]})}},33789:(e,s,t)=>{t.d(s,{p:()=>r});var a=t(95155);t(12115);
1var l=t(25016);function r(e){let{className:s,type:t,...r}=e;return(0,a.jsx)("input",{type:t,"data-slot":"input",className:(0,l.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",s),...r})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.