PageSourceSearch

https://www.askjeffy.ai/assets/Support-KJFTP9jG.js

js askjeffy.ai collected 2026-10-02 00:13:58 UTC 7,617 bytes, 1 lines download raw bytes

1import{c as w,r as a,aA as A,k as e,aV as E,y as F,n as I}from"./index-DvZYQDkB.js";import{M,C as W}from"./mail-Cmrq2Qgi.js";const O=w("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const L=w("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),P=["General Question","Account & Billing","Product Finder","Keyword Research","Product Tracker","Listing Creator","AskJeffy AI","Bug Report","Feature Request"];function N(){const[r,c]=a.useState(""),[l,p]=a.useState(""),[o,d]=a.useState(""),[v,y]=a.useState(!1),[u,b]=a.useState(!1),i=r&&l.trim()&&o.trim(),{user:C,profile:z}=A(),[s,m]=a.useState(!1),[j,S]=a.useState(""),T=(()=>{const t=z?.plan;return t==="FBA_PRO"?"FBA Pro":t==="SELLER_STARTER"?"Seller Starter":t==="FREE"?"Free":t||"Free"})(),B=async()=>{if(!(!i||s)){m(!0),S("");try{const n=await fetch("https://api.askjeffy.ai/api/support/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({category:r,subject:l,message:o,userEmail:C?.email||"",plan:T})});if(!n.ok){let h="";try{const k=await n.json();h=k?.detail||k?.error||""}catch{}throw new Error(h?`Send failed: ${h}`:`Send failed (HTTP ${n.status})`)}y(!0)}catch(t){S(t?.message||"Could not send your message. Please try again or email [email protected] directly.")}finally{m(!1)}}},R=()=>{c(""),p(""),d(""),y(!1)},g={width:"100%",padding:"10px 14px",borderRadius:10,border:"1.5px solid #e2e8f0",fontSize:13,color:"#0f172a",background:"#f8fafc",outline:"none",transition:"border-color 0.15s"},f={fontSize:11,fontWeight:700,color:"#475569",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:6,display:"block"};return e.jsxs("div",{className:"animate-fade-in",style:{maxWidth:720,margin:"0 auto"},children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:32,paddingTop:8},children:[e.jsx("div",{style:{width:64,height:64,borderRadius:20,margin:"0 auto 16px",background:"linear-gradient(135deg, #f97316, #ea580c)",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 8px 24px rgba(249,115,22,0.25)"},children:e.jsx("img",{src:"/assets/ajassets/AskJeffy iOS Icon.png",alt:"Jeffy",style:{width:38,height:38,borderRadius:10,objectFit:"cover"}})}),e.jsx("h2",{style:{fontSize:22,fontWeight:800,color:"#0f172a",margin:0},children:"How can we help?"}),e.jsx("p",{style:{fontSize:13,color:"#64748b",marginTop:6},children:"Submit a ticket and our team will get back to you as soon as possible."})]}),v?e.jsxs("div",{className:"card",style:{textAlign:"center",padding:"48px 32px"},children:[e.jsx("div",{style:{width:56,height:56,borderRadius:"50%",margin:"0 auto 16px",background:"rgba(16,185,129,0.1)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(E,{size:28,style:{color:"#10b981"}})}),e.jsx("h3",{style:{fontSize:18,fontWeight:700,color:"#0f172a",margin:"0 0 8px"},children:"Ticket Submitted!"}),e.jsxs("p",{style:{fontSize:13,color:"#64748b",marginBottom:24,lineHeight:1.6},children:["Your message has been sent to our support team. We'll get back to you within 24 hours at"," ",e.jsx("a",{href:"mailto:[email protected]",style:{color:"#f97316",fontWeight:600,textDecoration:"none"},children:"[email protected]"})]}),e.jsx("button",{onClick:R,style:{padding:"10px 28px",borderRadius:10,border:"none",background:"linear-gradient(135deg, #f97316, #ea580c)",color:"#fff",fontSize:13,fontWeight:700,cursor:"pointer",boxShadow:"0 4px 16px rgba(249,115,22,0.25)"},children:"Submit Another Ticket"})]}):e.jsx("div",{className:"card",style:{padding:"28px 28px 24px"},children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[e.jsxs("div",{children:[e.jsx("label",{style:f,children:"Category"}),e.jsxs("div",{style:{position:"relative"},children:[e.jsxs("button",{onClick:()=>b(!u),style:{...g,textAlign:"left",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",color:r?"#0f172a":"#94a3b8"},children:[e.jsx("span",{children:r||"Select a category..."}),e.jsx(F,{size:14,style:{color:"#94a3b8",transform:u?"rotate(180deg)":"none",transition:"transform 0.15s"}})]}),u&&e.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:4,background:"#fff",borderRadius:10,border:"1.5px solid #e2e8f0",boxShadow:"0 8px 24px rgba(0,0,0,0.08)",zIndex:20,overflow:"hidden"},children:P.map(t=>e.jsx("button",{onClick:()=>{c(t),b(!1)},style:{width:"100%",padding:"10px 14px",border:"none",background:r===t?"rgba(249,115,22,0.06)":"transparent",textAlign:"left",fontSize:13,color:"#0f172a",cursor:"pointer",display:"block"},onMouseEnter:n=>{n.target.style.background="rgba(249,115,22,0.06)"},onMouseLeave:n=>{n.target.style.background=r===t?"rgba(249,115,22,0.06)":"transparent"},children:t},t))})]})]}),e.jsxs("div",{children:[e.jsx("label",{style:f,children:"Subject"}
1),e.jsx("input",{value:l,onChange:t=>p(t.target.value),placeholder:"Briefly describe your issue...",style:g,onFocus:t=>{t.currentTarget.style.borderColor="#f97316"},onBlur:t=>{t.currentTarget.style.borderColor="#e2e8f0"}})]}),e.jsxs("div",{children:[e.jsx("label",{style:f,children:"Message"}),e.jsx("textarea",{value:o,onChange:t=>d(t.target.value),placeholder:"Describe what happened, steps to reproduce, or any details that would help us assist you...",rows:5,style:{...g,resize:"vertical",minHeight:100,fontFamily:"inherit",lineHeight:1.5},onFocus:t=>{t.currentTarget.style.borderColor="#f97316"},onBlur:t=>{t.currentTarget.style.borderColor="#e2e8f0"}})]}),e.jsxs("button",{onClick:B,disabled:!i||s,style:{width:"100%",padding:"12px 24px",borderRadius:12,border:"none",background:i&&!s?"linear-gradient(135deg, #f97316, #ea580c)":"#e2e8f0",color:i&&!s?"#fff":"#94a3b8",fontSize:13,fontWeight:700,cursor:i&&!s?"pointer":"not-allowed",display:"flex",alignItems:"center",justifyContent:"center",gap:8,boxShadow:i&&!s?"0 4px 16px rgba(249,115,22,0.25)":"none",transition:"all 0.15s"},children:[s?e.jsx(I,{size:14,className:"animate-spin"}):e.jsx(L,{size:14}),s?"Sending...":"Send Support Ticket"]}),j&&e.jsx("p",{style:{fontSize:12,color:"#ef4444",textAlign:"center",marginTop:12},children:j})]})}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:16,marginTop:24},children:[e.jsx(x,{icon:e.jsx(O,{size:18,style:{color:"#3b82f6"}}),iconBg:"rgba(59,130,246,0.1)",title:"Knowledge Base",description:"Browse guides and FAQs"}),e.jsx(x,{icon:e.jsx(M,{size:18,style:{color:"#f97316"}}),iconBg:"rgba(249,115,22,0.1)",title:"Email Us",description:"[email protected]",href:"mailto:[email protected]"}),e.jsx(x,{icon:e.jsx(W,{size:18,style:{color:"#10b981"}}),iconBg:"rgba(16,185,129,0.1)",title:"Response Time",description:"Typically within 24 hours"})]})]})}function x({icon:r,iconBg:c,title:l,description:p,href:o}){const d=e.jsxs("div",{className:"card",style:{padding:"20px 16px",textAlign:"center",cursor:o?"pointer":"default",transition:"box-shadow 0.15s"},children:[e.jsx("div",{style:{width:40,height:40,borderRadius:12,margin:"0 auto 12px",background:c,display:"flex",alignItems:"center",justifyContent:"center"},children:r}),e.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#0f172a",marginBottom:4},children:l}),e.jsx("div",{style:{fontSize:11,color:"#64748b"},children:p})]});return o?e.jsx("a",{href:o,style:{textDecoration:"none"},children:d}):d}export{N as default};

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.