1import{r as l,j as n}from"./vendor-react-BGN68_Lp.js";import{a as y,u as T}from"./vendor-redux-D8sX5Eqv.js";import{ba as A,a9 as v,bc as q,s as k,b as x}from"./index-uear5Vpj.js";import{g as a}from"./vendor-styled-pkIKgjgv.js";import{C as z}from"./ProfileIcons-McyIpcqm.js";import{u as S}from"./vendor-i18n-BWleq_Sd.js";import"./vendor-socket-DSYo_sTV.js";import"./vendor-router-CYD8mbvC.js";const _=a.div` 2 position: relative; 3 max-width: 90%; 4 padding: 40px; 5 border-radius: 15px; 6 background: #171c2a; 7 8 @media (max-width: 480px) { 9 padding: 24px; 10 } 11`,D=a.div` 12 display: flex; 13 align-items: center; 14 justify-content: center; 15 gap: 12px; 16 margin-bottom: 26px; 17 18 h2 { 19 color: #ecf1f8; 20 font-size: 24px; 21 font-weight: 800; 22 line-height: 1.15; 23 } 24 25 @media (max-width: 480px) { 26 h2 { 27 text-align: center; 28 font-size: 20px; 29 } 30 31 svg { 32 display: none; 33 } 34 } 35`,E=a.div` 36 display: flex; 37 align-items: center; 38 justify-content: center; 39 width: 200px; 40 height: 200px; 41 border-radius: 18px; 42 margin: 0 auto 22px; 43 padding: 5px; 44 overflow: hidden; 45 background: rgba(145, 175, 253, 0.07); 46 47 img { 48 width: 100%; 49 height: 100%; 50 object-fit: contain; 51 } 52`,U=a.h3` 53 margin-bottom: 6px; 54 color: #dee2ed; 55 font-size: 14px; 56 font-weight: 700; 57 text-align: center; 58 text-transform: none; 59`,I=a.p` 60 margin: 0 auto 22px; 61 max-width: 300px; 62 font-size: 12px; 63 color: rgba(222, 226, 237, 0.7); 64 line-height: 120%; 65 text-align: center; 66`,P=a.button` 67 width: 100%; 68 padding: 20px; 69 border-radius: 6px; 70 background: #6080ff; 71 color: #fff; 72 font-size: 14px; 73 font-weight: 700; 74 75 &:disabled { 76 cursor: default; 77 opacity: 0.55; 78 } 79`,p=e=>e?/^(data:|https?:\/\/|\/\/)/i.test(e)?e:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`:null,Q=({url:e,url_app:r})=>typeof navigator>"u"?e||r:/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)?r||e:e||r,$=()=>{const{t:e}=S(),r=y(),t=T(o=>o.modals.data.ACCOUNT_QR_CONNECT)||{},[c,h]=l.useState(null),[b,d]=l.useState(!1),u=t.type==="telegram",f=t.qr||p(t.image)||p(c?.qr_url)||p(c?.qr_app),i=u?Q(c||{url:t.url,url_app:t.urlApp}):t.url||t.urlApp,w=()=>r(x(null));l.useEffect(()=>{},[]),l.useEffect(()=>{if(!u){d(!1);return}let o=!0,g=null;const m=async(C=!1)=>{C&&d(!0);try{const s=await v.telegramConnectHash();if(!o)return;if(s?.data?.is_connected){o=!1,r(q({type:"telegram",data:{hide:!1,name:"Telegram",url:"",username:"@Telegram"}})),k(e("Acconnected")),r(x(null));return}s?.result==="success"&&s.data&&h(s.data)}catch{}finally{if(!o)return;d(!1),g=setTimeout(m,3e3)}};return m(!t.qr),()=>{o=!1,clearTimeout(g)}},[r,u,t.qr,e]);const j=()=>
79{if(t.action){t.action();return}if(i){if(/^tg:\/\//i.test(i)){window.location.href=i;return}window.open(i,"_blank","noopener,noreferrer");return}w()};return n.jsxs(_,{children:[n.jsxs(D,{children:[n.jsx(z,{}),n.jsx("h2",{children:e(t.title)})]}),n.jsx(E,{children:f?n.jsx("img",{loading:"lazy",src:f,alt:""}):n.jsx(A,{width:100,height:100,baseColor:"#dce3f4",highlightColor:"#eef2fb"})}),n.jsx(U,{children:e(t.subtitle)}),n.jsx(I,{children:e(t.text)}),n.jsx(P,{onClick:j,disabled:b||!f,children:e(t.buttonText)})]})};export{$ 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.