1import{r as n,j as e,D as k,a as S,e as R,f as T,S as u,A as g,L as A,T as E,G as p,B as f,E as O,g as B,h as C}from"./index-CMgPBONj.js";import{A as P,m as y}from"./proxy-CwcqjmZh.js";function I({src:t,play:s=!1,volume:c=.5}){const r=n.useRef(null);return n.useEffect(()=>{if(t&&s&&r.current)try{r.current.volume=c,r.current.currentTime=0;const a=r.current.play();a!==void 0&&a.catch(l=>{console.log("Audio play prevented:",l)})}catch(a){console.log("Audio error:",a)}},[s,t,c]),t?e.jsx("audio",{ref:r,src:t,preload:"auto"}):null}function L(){const[t,s]=n.useState(!1),[c,r]=n.useState(!1),[a,l]=n.useState(null),[j,N]=n.useState(0),[d,w]=n.useState(!1),x="https://www.switchmarkets.com/signup?lid=6603&pid=107341",m=p.POINTS.BROKER_SIGNUP;n.useEffect(()=>{(async()=>{try{const o=await C.User.me();l(o);const v=o.broker_registrations&&o.broker_registrations.includes("switchmarkets");r(v)}catch{}})()},[]);const b=()=>{s(!1)},h=async()=>{if(window.open(x,"_blank"),a)try{await p.trackBrokerRegistration(a.id,"switchmarkets")&&(N(m),w(!0),r(!0),setTimeout(()=>{s(!1)},3e3))}catch(i){console.error("Error tracking broker registration:",i)}else s(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(I,{src:"https://assets.mixkit.co/sfx/preview/mixkit-coin-win-notification-1992.mp3",play:d,volume:.5}),e.jsx(k,{open:t,onOpenChange:s,children:e.jsxs(S,{className:"bg-gradient-to-b from-gray-900 to-gray-800 border-gray-700 max-w-md",children:[e.jsxs(R,{children:[e.jsxs(T,{className:"flex items-center justify-center gap-2 text-xl",children:[e.jsx(u,{className:"h-6 w-6 text-cyan-400"}),e.jsx("span",{className:"text-white",children:"Trusted Broker Partner"})]}),e.jsx("div",{className:"flex justify-center -mt-1",children:e.jsx("div",{className:"h-px w-24 bg-gradient-to-r from-transparent via-cyan-500 to-transparent"})})]}),e.jsx(P,{children:d?e.jsxs(y.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:"py-6 text-center",children:[e.jsxs(y.div,{initial:{y:-20},animate:{y:[0,-10,0]},transition:{repeat:2,duration:.5,repeatType:"reverse"},className:"text-4xl font-bold text-yellow-400 mb-3",children:["+",j," POINTS!"]}),e.jsx(g,{className:"h-16 w-16 text-yellow-500 mx-auto mb-2"}),e.jsx("p",{className:"text-white text-lg",children:"Thank you for registering!"}),e.jsx("p",{className:"text-gray-300 mt-1",children:"Your points have been credited to your account."})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("a",{href:x,target:"_blank",rel:"noopener noreferrer",onClick:i=>{i.preventDefault(),h()},className:"block transition-transform duration-200 hover:scale-[1.02] hover:shadow-lg focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-opacity-50 rounded-lg",children:e.jsx("div",{className:"bg-gradient-to-r from-purple-900 via-indigo-900 to-blue-900 rounded-lg p-4 border border-indigo-800/50",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(A,{className:"h-12 w-12 mr-3"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-lg text-white",children:"Switch Markets"}),e.jsx("p",{className:"text-cyan-300 text-sm",children:"Regulated Professional Broker"})]})]}),e.jsx(_,{className:"bg-cyan-500",children:"Recommended"})]})})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-center",children:[e.jsxs("div",{className:"bg-gray-800 p-3 rounded-lg border border-gray-700",children:[e.jsx(u,{className:"h-6 w-6 text-cyan-400 mx-auto mb-1"}),e.jsx("p",{className:"text-sm text-white",children:"Regulated & Secure"})]}),e.jsxs("div",{className:"bg-gray-800 p-3 rounded-lg border border-gray-700",children:[e.jsx(E,{className:"h-6 w-6 text-cyan-400 mx-auto mb-1"}),e.jsx("p",{className:"text-sm text-white",children:"Low Spreads"})]})]}),a&&e.jsx("div",{className:"bg-gray-800 p-3 rounded-lg border border-green-800/30",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(g,{className:"h-5 w-5 text-yellow-500 flex-shrink-0"}),e.jsxs("p",{className:"text-sm text-gray-200",children:["Earn ",e.jsxs("span",{className:"text-yellow-400 font-bold",children:[m," points"]})," for registering via our link!"]})]})}),e.jsxs("div",{className:"flex gap-3 mt-4",children:[e.jsxs(f,{className:"flex-1 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",onClick:h,children:["Open Account ",e.jsx(O,{className:"h-4 w-4 ml-2"})]}),e.jsx(f,{variant:"ghost",className:"text-gray-400 hover:text-white",onClick:b,children:"Maybe Later"})]}),e.jsx("div",{className:"text-xs text-gray-500 text-center",children:"By
1signing up, you agree to Switch Markets' Terms & Conditions."}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-amber-400 bg-amber-900/20 p-2 rounded-lg",children:[e.jsx(B,{className:"h-4 w-4"}),e.jsx("span",{children:"Trading involves risk. Only trade with money you can afford to lose."})]})]})})]})})]})}function _({children:t,className:s}){return e.jsx("div",{className:`px-2 py-1 rounded text-xs font-medium ${s}`,children:t})}export{L 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.