PageSourceSearch

https://snich.ai/assets/EventLandingPage-55836100.js

js snich.ai collected 2026-10-05 15:07:59 UTC 44,851 bytes, 6 lines download raw bytes

1import{r as i,j as e,R as ts,u as is,b as rs,a as ls}from"./vendor-react-72e4a099.js";import{u as os,e as Be,f as xe,g as cs,w as ds,r as we,k as ms,d as us,B as hs}from"./buildLifecycle-a44b0e05.js";import{u as Se,f as Te,F as Y,I as oe,T as He,B as f,P as ps,a as Le,h as xs,M as gs,d as js}from"./Toast-43ee7788.js";import{T as Me,b as fs,S as bs}from"./Display-48adcc24.js";import{m as Ns,u as ys}from"./format-5039f022.js";import{u as vs,B as ks,V as Oe}from"./EntryChrome-3815c94b.js";import{e as ze,z as Fe,E as Ve,f as ws,s as Cs}from"./EventPreview-a5c61118.js";import{L as Ss}from"./Lobby-cd4ae718.js";import{E as zs}from"./EndedScreen-b2678b64.js";import{p as J,r as Ie,s as _e}from"./publicApi-16230aa9.js";import{s as Es,a as Is,w as Rs}from"./roomAccess-6d61bdfc.js";import{L as As}from"./LandingView-54e2e5c3.js";import{C as Re,S as Ts}from"./SmartCaptcha-69c09d2e.js";import{C as fe}from"./calendar-days-6829c81b.js";import{g as Ls,Y as Fs,d as Us}from"./calendar-dc21508f.js";import{H as ge}from"./hourglass-26ebe251.js";import{C as Ce}from"./check-083433f7.js";import{M as be}from"./mail-c07c6c62.js";import{E as $s}from"./eye-5711d0dd.js";import{S as Bs}from"./sparkles-e0558c3e.js";import{A as je}from"./arrow-right-eda8f931.js";import{S as Ms}from"./SoonView-a22eca1b.js";import{L as Je}from"./lock-73755c1f.js";import{S as Os}from"./shield-check-111738a3.js";import{U as _s}from"./user-x-facc2ce7.js";import{L as Ds}from"./log-in-3920688d.js";import{S as qs}from"./search-x-c253167f.js";import{c as Ps}from"./createLucideIcon-581cd729.js";import{W as Ws}from"./wifi-off-4fc4a3bc.js";/* empty css              */import{U as Hs}from"./user-2d8f405f.js";import{L as Vs}from"./log-out-e38723a8.js";import{A as Ae}from"./arrow-left-6a250fbc.js";import{R as Js}from"./radio-dc3b7f8c.js";import{S as De}from"./share-2-50cd044b.js";import"./x-b9f3d093.js";import"./circle-check-63b159d4.js";import"./circle-alert-67975319.js";import"./Controls-5a18fd37.js";import"./chevron-down-888c3b30.js";import"./copy-34f4069e.js";import"./eventDuration-e09aabf0.js";import"./BackgroundModal-371a8f77.js";import"./deviceDetection-9fe14a8f.js";import"./chromaKey-9ef66bf0.js";import"./mediaPrefs-a1582108.js";import"./image-aefc8036.js";import"./upload-34ad8b6a.js";import"./chevron-up-f536cc4c.js";import"./mic-098d6d5b.js";import"./square-abcd1e2a.js";import"./play-3580deb4.js";import"./volume-2-a1e941cc.js";import"./video-off-a445220e.js";import"./mic-off-05523af3.js";import"./smartphone-d9ded3c9.js";import"./video-a08888e9.js";import"./headphones-a3105568.js";import"./refresh-cw-98362cea.js";import"./users-a990a1e8.js";import"./pencil-c32e7d9a.js";import"./star-f57b9032.js";import"./list-13d531b4.js";import"./file-text-e7c68864.js";import"./api-d8a57490.js";import"./clock-e6794ea5.js";import"./music-0f60f4f1.js";import"./volume-x-8aea9e1c.js";import"./minimize-f9a54b0a.js";import"./maximize-edcb58d4.js";import"./pin-70ee9bd9.js";/**
2 * @license lucide-react v0.554.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Gs=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m17 22 5-5",key:"1k6ppv"}],["path",{d:"m17 17 5 5",key:"p7ous7"}]],Xs=Ps("calendar-x-2",Gs),Ks=/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;function Ys(){try{const n=new URLSearchParams(window.location.search),o=n.get("utm_source")||void 0,h=n.get("utm_medium")||void 0,l=n.get("utm_campaign")||void 0;return o||h||l?{source:o,medium:h,campaign:l}:void 0}catch{return}}function Zs({event:n,open:o,onClose:h,onRegistered:l,onDuplicate:c,defaultName:x,defaultEmail:d}){const N=Se(),[s,y]=i.useState(x||""),[b,k]=i.useState(d||""),[g,p]=i.useState(""),[v,j]=i.useState(!0),[F,U]=i.useState(!1),[S,_]=i.useState({}),[$,Z]=i.useState(""),[C,Q]=i.useState({}),[ce,L]=i.useState(null),[R,M]=i.useState(!1),[ee,Ne]=i.useState(!1),[de,G]=i.useState(!1),[ye,se]=i.useState(!1);i.useEffect(()=>{o&&(Q({}),L(null),M(!1),x&&!s&&y(x),d&&!b&&k(d))},[o]);const me=i.useMemo(()=>ze(n.scheduledAt,n.durationMinutes,n.timezone),[n.scheduledAt,n.durationMinutes,n.timezone]),D=n.scheduledAt?new Date(n.scheduledAt).getTime():0,r=!D||D-Date.now()>60*60*1e3,ne=n.captchaRequired&&!!Re,B=()=>{const t={};s.trim().length<2&&(t.name="Как к вам обращаться? Нужно хотя бы 2 буквы");const u=b.trim();return u?Ks.test(u)||(t.email="Похоже, в адресе опечатка"):t.email="Укажите email — пришлём ссылку на эфир",n.extraFields.forEach(z=>
6{const A=(S[z.name]||"").trim();z.required&&!A&&(t[`x:${z.name}`]="Заполните это поле")}),F||(t.consent="Нужно ваше согласие, чтобы мы могли прислать ссылку"),ne&&!$&&(t.captcha="Подтвердите, что вы не робот"),t},ae=async t=>{t.preventDefault();const w=B();if(Q(w),L(null),M(!1),!Object.keys(w).length){Ne(!0);try{const u={};n.extraFields.forEach(A=>{const E=(S[A.name]||"").trim();E&&(u[A.name]=E)});const z=await J.register(n.slug||n.roomId,{name:s.trim(),email:b.trim(),company:g.trim()||void 0,remind:r?v:!1,consent:!0,extra:Object.keys(u).length?u:void 0,captchaToken:$||void 0,utm:Ys()});l(z)}catch(u){const z=u==null?void 0:u.data,A=(u==null?void 0:u.message)||"Не получилось зарегистрироваться";(z==null?void 0:z.code)==="duplicate"?(M(!0),c==null||c(b.trim())):(z==null?void 0:z.code)==="captcha_failed"?(Q({captcha:A}),Z("")):L(A)}finally{Ne(!1)}}},q=async()=>{G(!0);try{await J.resend(n.slug||n.roomId,b.trim()),N.success(`Отправили ссылку ещё раз на ${b.trim()}`)}catch(t){N.error(t.message||"Не получилось отправить письмо")}finally{G(!1)}},P=t=>Q(w=>{if(!w[t])return w;const u={...w};return delete u[t],u});return e.jsxs(e.Fragment,{children:[e.jsx(Te,{className:"sn-e-modal",open:o,onClose:h,width:520,icon:e.jsx(fe,{className:"sn-i sn-i-20"}),title:"Регистрация на эфир",subtitle:`${n.title}${me?` · ${me.short}`:""}`,bodyStyle:{paddingTop:4,paddingBottom:24},children:e.jsxs("form",{className:"sn-e-reg-form",onSubmit:ae,noValidate:!0,children:[e.jsx(Y,{label:"Имя и фамилия",htmlFor:"reg-name",error:C.name,children:e.jsx(oe,{id:"reg-name",autoComplete:"name",value:s,invalid:!!C.name,maxLength:120,onChange:t=>{y(t.target.value),P("name")},placeholder:"Как вас представить"})}),e.jsx(Y,{label:"Email",htmlFor:"reg-mail",error:C.email,hint:"Пришлём ссылку на эфир, а потом — запись",children:e.jsx(oe,{id:"reg-mail",type:"email",inputMode:"email",autoComplete:"email",value:b,invalid:!!C.email,maxLength:254,onChange:t=>{k(t.target.value),P("email"),M(!1)},placeholder:"[email protected]"})}),e.jsx(Y,{label:e.jsxs(e.Fragment,{children:["Компания ",e.jsx("em",{children:"необязательно"})]}),htmlFor:"reg-org",children:e.jsx(oe,{id:"reg-org",autoComplete:"organization",value:g,maxLength:160,onChange:t=>p(t.target.value),placeholder:"Где вы работаете"})}),n.extraFields.map(t=>{const w=`x:${t.name}`,u=`reg-x-${t.name}`,z=t.required?t.label:e.jsxs(e.Fragment,{children:[t.label," ",e.jsx("em",{children:"необязательно"})]}),A=S[t.name]||"",E=I=>{_(X=>({...X,[t.name]:I})),P(w)};return t.type==="checkbox"?e.jsxs("label",{className:`sn-e-optrow${C[w]?" is-invalid":""}`,children:[e.jsx("input",{type:"checkbox",checked:A==="да",onChange:I=>E(I.target.checked?"да":"")}),e.jsx("span",{children:t.label})]},t.name):e.jsx(Y,{label:z,htmlFor:u,error:C[w],children:t.type==="select"&&t.options.length?e.jsxs("select",{id:u,className:"sn-input",value:A,onChange:I=>E(I.target.value),"aria-invalid":!!C[w]||void 0,children:[e.jsx("option",{value:"",children:"Выберите…"}),t.options.map(I=>e.jsx("option",{value:I,children:I},I))]}):t.type==="textarea"?e.jsx(He,{id:u,value:A,maxLength:500,invalid:!!C[w],placeholder:t.placeholder,onChange:I=>E(I.target.value)}):e.jsx(oe,{id:u,value:A,maxLength:500,invalid:!!C[w],placeholder:t.placeholder,type:t.type==="phone"?"tel":t.type==="number"?"number":t.type==="email"?"email":"text",onChange:I=>E(I.target.value)})},t.name)}),r&&e.jsxs("label",{className:"sn-e-optrow",children:[e.jsx("input",{type:"checkbox",checked:v,onChange:t=>j(t.target.checked)}),e.jsx("span",{children:"Напомнить за час до начала"}),e.jsx("span",{className:"sn-hint",children:"письмом"})]}),e.jsxs("label",{className:`sn-e-optrow sn-e-consent${C.consent?" is-invalid":""}`,children:[e.jsx("input",{type:"checkbox",checked:F,onChange:t=>{U(t.target.checked),P("consent")},"aria-describedby":"reg-consent-err"}),e.jsxs("span",{children:["Согласен(на) на обработку персональных данных"," ",e.jsx("button",{type:"button",className:"sn-e-linkbtn",onClick:t=>{t.preventDefault(),se(!0)},children:"— зачем они нужны"})]})]}),C.consent&&e.jsx("span",{id:"reg-consent-err",className:"sn-error",role:"alert",style:{marginTop:-8},children:C.consent}),n.captchaRequired&&(Re?e.jsxs("div",{children:[e.jsx(Ts,{sitekey:Re,language:"ru",onSuccess:t=>{Z(t),P("captcha")},onTokenExpired:()=>Z("")}),C.captcha&&e.jsx("span",{className:"sn-error",role:"alert",children:C.captcha})]}):null),R&&e.jsx("div",{className:"sn-e-alert is-info",role:"status",children:e.jsxs("span",{style:{flex:1},children:["С этим email вы уже зарегистрированы — ссылка на эфир в письме."," ",e.jsx("button",{type:"button",className:"sn-e-linkbtn",onClick:q,disabled:de,children:de?"Отправляем…":"Прислать письмо ещё раз"})]})}),ce&&e.jsx("div",{className:"sn-e-alert is-error",role:"alert",children:ce}),e.jsx(f,{type:"submit",variant:"primary",size:"lg",block:!0,loading:ee,style:{marginTop:4},children:"Зарегистрироваться"}),e.jsxs("p",{className:"sn-e-fineprint",children:[n.approveRegistrations?"Организатор подтверждает заявки вручную — ссылка придёт после подтверждения. ":"","Письма — только об этом эфире."]})]})}),e.jsx(Te,{className:"sn-e-modal",open:ye,onClose:()=>se(!1),width:480,title:"Зачем нам ваши данные",footer
6:e.jsx(f,{variant:"primary",onClick:()=>{U(!0),P("consent"),se(!1)},children:"Понятно, согласен(на)"}),children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,fontSize:14,lineHeight:1.5,color:"var(--sn-ink-2)"},children:[e.jsxs("p",{children:["Имя, email и компанию получит организатор эфира «",n.organizer.name,"», чтобы:"]}),e.jsxs("ul",{style:{margin:0,paddingLeft:20,display:"flex",flexDirection:"column",gap:4},children:[e.jsx("li",{children:"прислать ссылку на эфир и напоминание, если вы его включили;"}),e.jsx("li",{children:"после эфира отправить запись и итоги;"}),e.jsx("li",{children:"показать вас в списке участников эфира в своём кабинете."})]}),e.jsx("p",{children:"SNICH не передаёт данные третьим лицам и не шлёт рекламу. Удалить регистрацию можно, написав организатору со страницы эфира."})]})})]})}function Qs(n,o){if(!n.scheduledAt)return null;const h=new Date(n.scheduledAt),l=new Date(h.getTime()+(n.durationMinutes||60)*6e4);return{uid:n.roomId,title:n.title,start:h,end:l,url:o,description:n.description,organizer:n.organizer.name}}function Ge({event:n,pageUrl:o,compact:h}){const l=Se(),c=Qs(n,o);if(!c)return null;const x=d=>{try{return Us(c),!0}catch{return l.error(`Не получилось подготовить файл для ${d}`),!1}};return e.jsxs("div",{role:"group","aria-label":"Добавить в календарь",className:"sn-e-cal",style:h?{marginTop:0}:void 0,children:[e.jsx(f,{variant:"quiet",size:"sm",href:Ls(c),target:"_blank",rel:"noopener noreferrer",icon:e.jsx("span",{className:"sn-e-cal-ico",children:"G"}),children:"Google"}),e.jsx(f,{variant:"quiet",size:"sm",icon:e.jsx("span",{className:"sn-e-cal-ico",children:"Я"}),onClick:()=>{x("Яндекс Календаря")&&l.show("Файл события скачан — откройте его в Яндекс Календаре (Настройки → Импорт)",{duration:9e3,action:{label:"Открыть календарь",onClick:()=>window.open(Fs,"_blank","noopener")}})},children:"Яндекс"}),e.jsx(f,{variant:"quiet",size:"sm",icon:e.jsx("span",{className:"sn-e-cal-ico",children:"O"}),onClick:()=>{x("Outlook")&&l.success("Файл .ics скачан — откройте его, чтобы добавить событие")},children:"Outlook · .ics"})]})}function en({targetMs:n,now:o}){const{total:h,days:l,hours:c,minutes:x,seconds:d}=ws(n,o),N=(y,b,k,g)=>{const p=y%10,v=y%100;return v>10&&v<20?g:p===1?b:p>1&&p<5?k:g},s=l>0?[[l,N(l,"день","дня","дней")],[c,N(c,"час","часа","часов")],[x,N(x,"минута","минуты","минут")]]:[[c,N(c,"час","часа","часов")],[x,N(x,"минута","минуты","минут")],[d,N(d,"секунда","секунды","секунд")]];return e.jsxs("div",{role:"timer","aria-live":"off","aria-label":`До начала ${s.map(([y,b])=>`${y} ${b}`).join(" ")}`,className:"sn-e-count",children:[s.map(([y,b],k)=>e.jsxs(ts.Fragment,{children:[k>0&&e.jsx("i",{"aria-hidden":"true",children:":"}),e.jsxs("span",{children:[e.jsx("b",{children:Ns(Number(y))}),e.jsx("small",{children:b})]})]},String(b))),h===0&&e.jsx("span",{className:"sn-hint",style:{alignSelf:"center",marginLeft:12},children:"вот-вот начнём"})]})}function sn({event:n,now:o,email:h,status:l,remind:c,pageUrl:x,cabinetHref:d,cabinetExternal:N,loggedIn:s,onBack:y,onResend:b,resending:k}){const g=l==="pending",p=l==="waitlisted",v=ze(n.scheduledAt,n.durationMinutes,n.timezone,new Date(o)),j=n.scheduledAt?new Date(n.scheduledAt).getTime():0,F=j?Fe(new Date(j-60*6e4),n.timezone):"",U=c&&j-o>60*6e4;return e.jsxs("div",{className:"sn-e-done",children:[e.jsx("span",{className:`sn-e-done-icon${g||p?" is-pending":""}`,children:g||p?e.jsx(ge,{}):e.jsx(Ce,{})}),e.jsx("h1",{children:g?"Заявка отправлена":p?"Вы в листе ожидания":"Вы зарегистрированы"}),e.jsx("p",{className:"sn-e-done-sub",children:g?e.jsxs(e.Fragment,{children:["Организатор подтвердит участие — ссылку пришлём на ",e.jsx("b",{children:h})]}):p?e.jsxs(e.Fragment,{children:["Мест пока нет. Если освободится — напишем на ",e.jsx("b",{children:h})]}):e.jsxs(e.Fragment,{children:["Ссылка на эфир отправлена на ",e.jsx("b",{children:h})]})}),e.jsxs("section",{"aria-label":`Эфир «${n.title}»`,className:"sn-card sn-e-ticket",children:[e.jsx(Ve,{title:n.title,mode:"splash",logoUrl:n.brand.logoUrl,accentColor:n.brand.accentColor,splashColor:n.brand.splashColor,splashSub:n.scheduledAt?`Начинаем в ${Fe(n.scheduledAt,n.timezone)}`:void 0}),e.jsxs("div",{className:"sn-e-ticket-body",children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[e.jsx("span",{className:"sn-eyebrow",children:"До начала"}),g||p?e.jsx(Me,{tone:"amber",icon:e.jsx(ge,{className:"sn-i sn-i-14"}),children:g?"Ждёт подтверждения":"Лист ожидания"}):e.jsx(Me,{tone:"green",icon:e.jsx(Ce,{className:"sn-i sn-i-14"}),children:"Место за вами"})]}),j?e.jsx(en,{targetMs:j,now:o}):e.jsx("p",{className:"sn-hint",style:{marginTop:12},children:"Дату сообщим письмом"}),v&&e.jsxs("p",{className:"sn-e-ticket-when",children:[e.jsx(fe,{className:"sn-i"}),v.day," · ",e.jsx("span",{className:"sn-mono",children:v.time})," ",v.zone]}),e.jsx("hr",{className:"sn-e-hr"}),e.jsx("span",{style:{fontSize:14,fontWeight:600},children:"Добавить в календарь"}),e.jsx(Ge,{event:n,pageUrl:x})]})]}),e.jsxs("ul",{className:"sn-e-tips",children:[e.jsxs("li",{children:[e.jsx("span",{className:"sn-e-tip-ico",children:e.jsx(be,{className:"sn-i sn-i-20"})}),e.jsxs("span",{children:[e.jsx("b",{children:U?"Напомним за час":"Ссылка — в письме"}),e.jsx("span",{children:U?e.jsxs(e.Fragment,{children:["Письмо со ссылкой придёт в ",F," — ничего не нужно сохранять"]}):e.jsxs(e.Fragment,{children:["Не пришло?"," ",e.jsx("button",{type:"button",className:"sn-e-linkbtn",onClick:b,disabled:k,children:k?"Отправляем…":"Отправить ещё раз"})]})})]})]}),e.jsxs("li",{children:[e.jsx("span",{className:"sn-e-tip-ico",children:e.jsx($s,{className:"sn-i sn-i-20"})}),e.jsxs("span",{children:[e.jsx("b",{children:"Камера не нужна"}),e.jsxs("span",{children:["Смотрите в браузере",n.features.chat?", пишите в чат":"",n.features.questions?" и задавайте вопросы спикерам":""]})]})]}),e.jsxs("li",{children:[e.jsx("span",{className:"sn-e-tip-ico",children:e.jsx(Bs,{className:"sn-i sn-i-20"})}),e.jsxs("span",{children:[e.jsx("b",{children:n.features.aiSummary?"Запись и AI-итоги":"Запись эфира"}),e.jsx("span",{children:n.features.recording?`После эфира пришлём запись${n.features.aiSummary?", главы и краткие итоги":""} на почту`:"Если организатор запишет эфир, запись появится на этой странице"})]})]})]}),e.jsxs("div",{className:"sn-e-done-actions",children:[e.jsx(f,{variant:"primary",size:"lg",...N?{href:d}:{to:d},iconRight:e.jsx(je,{className:"sn-i"}),children:"Открыть кабинет"}),e.jsx(f,{variant:"text",size:"lg",onClick:y,children:"К странице эфира"})]}),e.jsx("p",{className:"sn-e-done-hint",children:s?"В кабинете — все ваши эфиры, ссылки и записи.":`В кабинете — все ваши эфиры, ссылки и записи. Войдите или создайте аккаунт с почтой ${h}.`})]})}const nn=/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;function an({event:n,open:o,onClose:h,defaultName:l,defaultEmail:c,defaultMessage:x}){const d=Se(),[N,s]=i.useState(l||""),[y,b]=i.useState(c||""),[k,g]=i.useState(x||""),[p,v]=i.useState({}),[j,F]=i.useState(!1);i.useEffect(()=>{o&&(v({}),l&&!N&&s(l),c&&!y&&b(c),x&&!k&&g(x))}
6,[o]);const U=async S=>{S.preventDefault();const _={};if(N.trim().length<2&&(_.name="Представьтесь, пожалуйста"),nn.test(y.trim())||(_.email="Нужен email, чтобы организатор мог ответить"),k.trim().length<5&&(_.message="Напишите пару слов — что вам нужно"),v(_),!Object.keys(_).length){F(!0);try{await J.contact(n.slug||n.roomId,{name:N.trim(),email:y.trim(),message:k.trim()}),d.success("Сообщение отправлено — организатор ответит на вашу почту"),g(""),h()}catch($){d.error($.message||"Не получилось отправить сообщение")}finally{F(!1)}}};return e.jsx(Te,{className:"sn-e-modal",open:o,onClose:h,width:500,icon:e.jsx(be,{className:"sn-i sn-i-20"}),title:"Написать организатору",subtitle:`${n.organizer.personName||n.organizer.name} получит письмо и ответит на ваш email`,children:e.jsxs("form",{className:"sn-e-reg-form",onSubmit:U,noValidate:!0,children:[e.jsx(Y,{label:"Ваше имя",htmlFor:"co-name",error:p.name,children:e.jsx(oe,{id:"co-name",autoComplete:"name",value:N,maxLength:120,invalid:!!p.name,onChange:S=>s(S.target.value)})}),e.jsx(Y,{label:"Email для ответа",htmlFor:"co-mail",error:p.email,children:e.jsx(oe,{id:"co-mail",type:"email",autoComplete:"email",value:y,maxLength:254,invalid:!!p.email,onChange:S=>b(S.target.value)})}),e.jsx(Y,{label:"Сообщение",htmlFor:"co-msg",error:p.message,children:e.jsx(He,{id:"co-msg",rows:4,value:k,maxLength:2e3,invalid:!!p.message,onChange:S=>g(S.target.value),placeholder:`Например: «Здравствуйте! Не нашёл пароль от встречи „${n.title}“»`})}),e.jsx(f,{type:"submit",variant:"primary",size:"lg",block:!0,loading:j,children:"Отправить"})]})})}function Xe({event:n}){const o=ze(n.scheduledAt,null,n.timezone),h=n.speakers.find(x=>x.role==="host")||null,l=(h==null?void 0:h.name)||n.organizer.personName,c=(h==null?void 0:h.avatarUrl)||n.organizer.avatarUrl;return!o&&!l?null:e.jsxs("div",{className:"sn-e-gate-meta",children:[o&&e.jsxs("span",{children:[e.jsx(fe,{className:"sn-i sn-i-16",style:{color:"var(--sn-ink-3)"}}),o.day," · ",e.jsx("span",{className:"sn-mono",children:o.time})]}),o&&l&&e.jsx("span",{"aria-hidden":"true",style:{color:"var(--sn-ink-3)"},children:"·"}),l&&e.jsxs("span",{children:[e.jsx(fs,{name:l,src:c,size:22}),l]})]})}function qe({event:n,onAccess:o,onContact:h,registration:l}){const[c,x]=i.useState(""),[d,N]=i.useState(null),[s,y]=i.useState(!1),b=n.kind==="meeting",k=async g=>{var p;if(g.preventDefault(),!c.trim()){N("Введите пароль из приглашения");return}y(!0),N(null);try{const v=await J.access(n.slug||n.roomId,{password:c,...l});o(v)}catch(v){const j=(p=v.data)==null?void 0:p.code;N(j==="wrong_password"?"Неверный пароль. Проверьте раскладку и заглавные буквы.":v.message||"Не получилось проверить пароль")}finally{y(!1)}};return e.jsxs("section",{"aria-labelledby":"gate-title",className:"sn-card sn-e-gate",children:[e.jsx("span",{className:"sn-e-gate-ico",children:e.jsx(Je,{className:"sn-i sn-i-24"})}),e.jsx("span",{className:"sn-eyebrow",style:{marginTop:24},children:b?"Закрытая встреча":"Закрытый эфир"}),e.jsx("h1",{id:"gate-title",children:n.title}),e.jsx(Xe,{event:n}),e.jsxs("form",{style:{display:"flex",flexDirection:"column",marginTop:28},onSubmit:k,noValidate:!0,children:[e.jsx("label",{className:"sn-label",htmlFor:"room-pass",style:{fontSize:14},children:b?"Пароль встречи":"Пароль эфира"}),e.jsx("div",{style:{marginTop:8},children:e.jsx(ps,{id:"room-pass",className:"sn-e-pass",autoComplete:"off",autoFocus:!0,value:c,invalid:!!d,"aria-describedby":"pass-hint",onChange:g=>{x(g.target.value),N(null)}})}),d?e.jsxs("p",{id:"pass-hint",className:"sn-e-pass-hint",role:"alert",style:{color:"var(--sn-red-ink)"},children:[e.jsx(Le,{className:"sn-i sn-i-16",style:{marginTop:1,flex:"none"}}),e.jsx("span",{children:d})]}):e.jsxs("p",{id:"pass-hint",className:"sn-e-pass-hint",children:[e.jsx(Le,{className:"sn-i sn-i-16",style:{marginTop:1,flex:"none"}}),e.jsx("span",{children:"Пароль есть в письме-приглашении от организатора. Учитываются заглавные буквы."})]}),e.jsx(f,{type:"submit",variant:"primary",size:"lg",block:!0,loading:s,style:{marginTop:22},iconRight:e.jsx(je,{className:"sn-i"}),children:"Войти"})]}),n.organizer.canContact&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"sn-divider",style:{margin:"24px 0 14px"}}),e.jsxs("p",{className:"sn-e-gate-foot",children:["Нет пароля?",e.jsx("button",{type:"button",className:"sn-e-linkbtn",onClick:h,children:"Напишите организатору"})]})]})]})}function Pe({meeting:n}){return e.jsxs("p",{className:"sn-e-safe",children:[e.jsx(Os,{className:"sn-i sn-i-16"}),n?"Встреча защищена: без пароля в неё не попасть, даже по ссылке":"Эфир защищён: без пароля в него не попасть, даже по ссылке"]})}function tn({event:n,loggedIn:o,email:h,loginHref:l,onContact:c,onSwitchAccount:x}){return e.jsxs("section",{"aria-labelledby":"inv-title",className:"sn-card sn-e-gate",children:[e.jsx("span",{className:"sn-e-gate-ico is-soft",children:o?e.jsx(_s,{className:"sn-i sn-i-24"}):e.jsx(Je,{className:"sn-i sn-i-24"})}),e.jsx("span",{className:"sn-eyebrow",style:{marginTop:24},children:"Только по приглашению"}),e.jsx("h1",{id:"inv-title",children:n.title}),e.jsx(Xe,{event:n}),o?e.jsxs("p",{className:"sn-e-gate-text",children:["Вас нет в списке приглашённых",h?e.jsxs(e.Fragment,{children:[" для ",e.jsx("b",{style:{color:"var(--sn-ink)"},children:h})]}
6):null,". Если приглашение пришло на другую почту — войдите с ней, или попросите организатора добавить вас."]}):e.jsxs("p",{className:"sn-e-gate-text",children:["Организатор пускает на ",n.kind==="meeting"?"эту встречу":"этот эфир"," только приглашённых. Войдите с почтой, на которую пришло приглашение, — и мы вас узнаем."]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10,marginTop:24},children:o?e.jsxs(e.Fragment,{children:[n.organizer.canContact&&e.jsx(f,{variant:"primary",size:"lg",block:!0,icon:e.jsx(be,{className:"sn-i"}),onClick:c,children:"Попросить приглашение"}),x&&e.jsx(f,{variant:"quiet",size:"lg",block:!0,onClick:x,children:"Войти с другой почтой"})]}):e.jsxs(e.Fragment,{children:[e.jsx(f,{href:l,variant:"primary",size:"lg",block:!0,icon:e.jsx(Ds,{className:"sn-i"}),children:"Войти"}),n.organizer.canContact&&e.jsx(f,{variant:"text",block:!0,onClick:c,children:"Нет приглашения? Напишите организатору"})]})})]})}function We({kind:n,title:o,text:h,action:l}){const c=n==="not_found"?e.jsx(qs,{className:"sn-i sn-i-24"}):n==="cancelled"?e.jsx(Xs,{className:"sn-i sn-i-24"}):n==="paid"?e.jsx(Le,{className:"sn-i sn-i-24"}):e.jsx(Ws,{className:"sn-i sn-i-24"});return e.jsxs("section",{className:"sn-card sn-e-gate",role:"status",children:[e.jsx("span",{className:`sn-e-gate-ico ${n==="cancelled"?"is-red":n==="offline"?"is-amber":"is-soft"}`,children:c}),e.jsx("h1",{style:{marginTop:24},children:o}),e.jsx("p",{className:"sn-e-gate-text",children:h}),l&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10,marginTop:24},children:l})]})}const rn={producer:"Вы организатор",host:"Вы ведущий",moderator:"Вы модератор",speaker:"Вы спикер",participant:"Вы приглашены"},ln=15*60*1e3;function on(n,o){const[h,l]=i.useState(null),[c,x]=i.useState(null),[d,N]=i.useState(!0),[s,y]=i.useState(0),b=i.useRef(0),k=i.useCallback(async(g=!1)=>{const p=++b.current;g||N(!0);const v=Date.now();try{const j=await J.get(n);if(p!==b.current)return null;const F=Date.now(),U=new Date(j.serverTime).getTime();return Number.isFinite(U)&&y(U-(v+F)/2),l(j),x(null),j}catch(j){return p!==b.current||(!g||j.status===404)&&x(j),null}finally{p===b.current&&N(!1)}},[n]);return i.useEffect(()=>{k()},[k,o]),{event:h,error:c,loading:d,skew:s,load:k,setEvent:l}}function cn(){const{slug:n=""}=is(),[o,h]=rs(),l=ls(),c=Se(),x=vs(),{user:d,logout:N}=os(),{event:s,error:y,loading:b,skew:k,load:g}=on(n,(d==null?void 0:d.id)??null),p=ys(1e3)+k,v=s?s.slug||s.roomId:n,[j,F]=i.useState(()=>Ie(n)),[U,S]=i.useState(!1),[_,$]=i.useState(!1),[Z,C]=i.useState(!1),[Q,ce]=i.useState(!1),[L,R]=i.useState("idle"),[M,ee]=i.useState(null),[Ne,de]=i.useState(!1),[G,ye]=i.useState(null),se=i.useRef(!1),me=i.useRef(!1);i.useEffect(()=>{s&&v!==n&&F(Ie(v)||Ie(n))},[s,v,n]),i.useEffect(()=>{if(!s)return;const a=s.scheduledAt?new Date(s.scheduledAt).getTime():0,T=s.status==="live"||s.status==="scheduled"&&(!a||a-Date.now()<2*60*60*1e3)?window.setInterval(()=>{g(!0)},2e4):0,O=()=>{document.visibilityState==="visible"&&g(!0)};return document.addEventListener("visibilitychange",O),()=>{T&&window.clearInterval(T),document.removeEventListener("visibilitychange",O)}},[s==null?void 0:s.status,s==null?void 0:s.scheduledAt,g]);const D=(s==null?void 0:s.viewer.registration)||null,r=i.useMemo(()=>D?{registrationId:D.id,email:D.email||(j==null?void 0:j.email)||(s==null?void 0:s.viewer.email)||"",name:D.name||(j==null?void 0:j.name)||(s==null?void 0:s.viewer.name)||"",status:D.status,remind:(j==null?void 0:j.remind)??!0}:j,[D,j,s==null?void 0:s.viewer.email,s==null?void 0:s.viewer.name]),ne=(s==null?void 0:s.viewer.teamRole)||null,B=!!(ne&&ne!=="participant"),ae=B?ne:(s==null?void 0:s.kind)==="meeting"?"participant":"viewer",q=s?Be(s.slug||s.roomId):Be(n),P=`/e/${encodeURIComponent((s==null?void 0:s.slug)||n)}`,t=xe(cs(P)),w=ds()==="events",u=w?xe(we.viewerHome()):we.viewerHome(),z=`${w?xe("/check"):"/check"}?room=${encodeURIComponent((s==null?void 0:s.roomId)||"")}`,A=d?u:ms()?"/":us.web,E=(s==null?void 0:s.viewer.name)||(r==null?void 0:r.name)||null,I=(s==null?void 0:s.viewer.email)||(r==null?void 0:r.email)||null;i.useEffect(()=>{if(!s||o.get("register")!=="1")return;const a=new URLSearchParams(o);a.delete("register"),h(a,{replace:!0}),s.registrationOpen&&!r&&s.kind==="broadcast"&&S(!0)},[s]);const X=i.useCallback((a,m)=>{if(Es(a.roomId,{token:a.accessToken,role:a.role,expiresAt:a.expiresAt}),m&&Is(a.roomId,m),w){window.location.assign(Rs(xe(a.studioPath),a.accessToken));return}l(a.studioPath)},[l,w]),ve=i.useCallback(a=>{var le;const m=a,T=(le=m==null?void 0:m.data)==null?void 0:le.code,O=(m==null?void 0:m.message)||"Не получилось войти";return T==="password_required"?R("password"):T==="registration_required"?(_e(v,null),F(null),R("idle"),C(!0),s!=null&&s.registrationOpen&&S(!0),c.show("Сначала зарегистрируйтесь — это займёт полминуты")):T==="registration_pending"?(R("idle"),c.show(O,{duration:7e3})):T==="login_required"||T==="not_invited"||(m==null?void 0:m.status)===409?(R("idle"),g(!0),(m==null?void 0:m.status)===409&&c.show(O)):(R("idle"),c.error(O)),O},[s==null?void 0:s.registrationOpen,g,v,c]),Ue=i.useCallback(async(a={})=>
6{if(!s)return null;try{const m=await J.access(s.slug||s.roomId,{...r?{registrationId:r.registrationId,email:r.email}:{},...a});return ee(m),m}catch(m){return ve(m),null}},[s,r,ve]),ue=i.useCallback(async()=>{if(!s)return;if(s.hasPassword&&!B&&!M){R("password");return}if(s.kind==="meeting"||ae!=="viewer"){R("lobby");return}R("joining");const a=M||await Ue();if(a){if(!E){R("lobby");return}X(a,{name:E,cameraOn:!1,micOn:!1,cameraId:null,micId:null,speakerId:null,background:{mode:"none"},noiseSuppression:"normal"})}},[s,B,ae,M,Ue,E,X]),Ke=i.useCallback(async a=>{var T,O;if(!s)return;let m=M;if(!m)try{m=await J.access(s.slug||s.roomId,{...r?{registrationId:r.registrationId,email:r.email}:{}}),ee(m)}catch(le){const $e=(T=le.data)==null?void 0:T.code;if($e==="password_required"||$e==="registration_required"){(O=a.stream)==null||O.getTracks().forEach(as=>as.stop()),ve(le);return}throw new Error(le.message||"Не получилось войти")}X(m,a)},[s,M,r,X,ve]);i.useEffect(()=>{!s||s.kind!=="broadcast"||s.status==="live"&&se.current&&!me.current&&L==="idle"&&(me.current=!0,ue())},[s,L,ue]),i.useEffect(()=>{if(!s||o.get("join")!=="1")return;const a=new URLSearchParams(o);a.delete("join"),h(a,{replace:!0}),L==="idle"&&(s.status==="live"||B&&s.status==="scheduled")&&ue()},[s]);const Ye=a=>{const m={registrationId:a.registrationId,email:a.email,name:a.name,status:a.status,remind:a.remind,at:Date.now()};_e(v,m),F(m),S(!1),C(!1),ce(!0),g(!0),window.scrollTo({top:0}),(s==null?void 0:s.status)==="live"&&a.status==="confirmed"&&(c.success("Вы зарегистрированы — подключаем к эфиру"),window.setTimeout(()=>{ue()},300))},Ze=async()=>{if(!(!s||!(r!=null&&r.email))){de(!0);try{await J.resend(s.slug||s.roomId,r.email),c.success(`Отправили ссылку ещё раз на ${r.email}`)}catch(a){c.error(a.message||"Не получилось отправить письмо")}finally{de(!1)}}},ke=e.jsx(ks,{...A.startsWith("http")?{href:A}:{to:A}}),W=d?e.jsxs(e.Fragment,{children:[e.jsx(Oe,{name:d.name||d.email,avatarUrl:d.avatarUrl||d.avatar_url,subtitle:rn[ne||""]||((s==null?void 0:s.kind)==="meeting"?"Вы участник":"Вы зритель"),onClick:a=>ye(G?null:a.currentTarget),expanded:!!G}),e.jsx(gs,{open:!!G,anchor:G,onClose:()=>ye(null),width:240,items:[{label:"Мои события",icon:e.jsx(fe,{className:"sn-i sn-i-16"}),onSelect:()=>{w?window.location.assign(u):l(u)}},{label:"Кабинет организатора",icon:e.jsx(Hs,{className:"sn-i sn-i-16"}),onSelect:()=>{const a=w?xe(we.dashboard()):we.dashboard();w?window.location.assign(a):l(a)}},{type:"separator"},{label:"Выйти",icon:e.jsx(Vs,{className:"sn-i sn-i-16"}),onSelect:()=>{N(),c.show("Вы вышли из аккаунта")}}]})]}):r!=null&&r.name?e.jsx(Oe,{name:r.name,subtitle:r.status==="pending"?"Заявка отправлена":"Вы зарегистрированы"}):e.jsx(f,{variant:"quiet",size:"sm",href:t,children:"Войти"}),H=(a,m=!1)=>e.jsxs("header",{className:`sn-e-head${m?" is-narrow":""}`,children:[ke,e.jsx("span",{className:"sn-e-grow"}),a]}),Qe=s?e.jsxs("footer",{className:"sn-e-foot",children:[e.jsx("img",{src:s.brand.logoUrl||hs,alt:""}),e.jsxs("span",{children:["Организатор: ",e.jsx("b",{children:s.organizer.name})]}),e.jsx("span",{"aria-hidden":"true",className:"sn-hide-sm",children:"·"}),e.jsx("span",{className:"sn-mono sn-hide-sm",style:{fontSize:13},children:q.replace(/^https?:\/\//,"")}),s.organizer.canContact&&e.jsx("button",{type:"button",className:"sn-e-linkbtn",style:{fontSize:14},onClick:()=>$(!0),children:"Написать организатору"}),e.jsx("span",{className:"sn-e-grow"}),e.jsxs("span",{children:[s.kind==="meeting"?"Встреча":"Трансляция"," на ",e.jsxs("span",{className:"sn-e-logo-text",style:{fontSize:13,color:"var(--sn-ink-2)"},children:["snich",e.jsx("i",{children:"."}),"ai"]})]})]}):null,K=s?e.jsx(an,{event:s,open:_,onClose:()=>$(!1),defaultName:E,defaultEmail:I,defaultMessage:s.hasPassword&&L==="password"?`Здравствуйте! Не могу найти пароль от «${s.title}».`:void 0}):null;if(b&&!s)return e.jsxs("div",{className:"sn sn-e-page",children:[H(null),e.jsxs("div",{className:"sn-e-loading",children:[e.jsx(bs,{size:24})," Загружаем страницу эфира…"]})]});if(!s){const a=(y==null?void 0:y.status)===404;return e.jsxs("div",{className:"sn sn-e-page",children:[H(d?W:null),e.jsx("div",{className:"sn-e-center",children:e.jsx(We,{kind:a?"not_found":"offline",title:a?"Эфир не найден":"Не получилось открыть страницу",text:a?"Возможно, ссылка устарела или организатор ещё не опубликовал страницу. Проверьте адрес из письма-приглашения.":(y==null?void 0:y.message)||"Проверьте интернет и попробуйте ещё раз.",action:a?e.jsx(f,{variant:"quiet",size:"lg",block:!0,...u.startsWith("http")?{href:u}:{to:u},children:"Мои события"}):e.jsx(f,{variant:"primary",size:"lg",block:!0,onClick:()=>void g(),children:"Обновить"})})})]})}const he=s.scheduledAt?new Date(s.scheduledAt).getTime():0,te=ze(s.scheduledAt,s.durationMinutes,s.timezone,new Date(p)),es=s.access==="invite"&&!s.viewer.invited&&!B,ie=s.speakers.find(a=>a.role==="host")||null;if(s.status==="cancelled")return e.jsxs("div",{className:"sn sn-e-page",children:[H(W,!0),e.jsx("div",{className:"sn-e-center",children:e.jsx(We,{kind:"cancelled",title:`${s.kind==="meeting"?"Встреча отменена":"Эфир отменён"}`,text:e.jsxs(e.Fragment,{children:["«",s.title,"» не состоится. ",s.organizer.canContact?"Если остались вопросы — напишите организатору.":""]}),action:e.jsxs(e.Fragment,{children:[s.nextEvents[0]&&e.jsxs(f,{variant:"primary",size:"lg",block:!0,href:`/e/${encodeURIComponent(s.nextEvents[0].slug)}`,children:["Следующий эфир: ",s.nextEvents[0].title]}),s.organizer.canContact&&e.jsx(f,{variant:"quiet",size:"lg",block:!0,icon:e.jsx(be,{className:"sn-i"}),onClick:()=>$(!0),children:"Написать организатору"})]})})}),K]});if(s.status==="ended"){const a=te?`${te.day.replace(/^(Сегодня|Вчера|Завтра), /,"")}, ${te.time}`:null;return e.jsx(e.Fragment,{children:e.jsx(zs,{roomId:s.roomId,title:s.title,kind:s.kind,whenLabel:a,hostName:(ie==null?void 0:ie.name)||s.organizer.personName,people:s.showSpeakers?s.speakers.filter(m=>m.avatarUrl).map(m=>({id:m.id,name:m.name,title:m.title,avatarUrl:m.avatarUrl})):[],logoUrl:s.brand.logoUrl,accentColor:s.brand.accentColor,recording:s.recording,features:s.features,chaptersCount:s.program.length,nextEvents:s.nextEvents,viewer:{name:E,email:I},logo:ke,headerRight:e.jsxs(e.Fragment,{children:[d&&e.jsx(f,{variant:"text",size:"sm",icon:e.jsx(fe,{className:"sn-i sn-i-16"}),...u.startsWith("http")?{href:u}:{to:u},className:"sn-hide-sm",children:"Мои события"}),W]})})})}if(es)return e.jsxs("div",{className:"sn sn-e-page",children:[H(W,!0),e.jsx("div",{className:"sn-e-center",children:e.jsx(tn,{event:s,loggedIn:!!d,email:d==null?void 0:d.email,loginHref:t,onContact:()=>$(!0),onSwitchAccount:d?()=>{N(),window.location.assign(t)}:void 0})}),K]});if(L==="password")return e.jsxs("div",{className:"sn sn-e-page",children:[H(d?e.jsx(f,{variant:"text",size:"sm",icon:e.jsx(Ae,{className:"sn-i sn-i-16"}),...u.startsWith("http")?{href:u}:{to:u},children:"Мои события"}):e.jsxs(f,{variant:"text",size:"sm",icon:e.jsx(Ae,{className:"sn-i sn-i-16"}),onClick:()=>R("idle"),children:["К странице ",s.kind==="meeting"?"встречи":"эфира"]}),!0),e.jsx("div",{className:"sn-e-center",style:{paddingBottom:24},children:e.jsx(qe,{event:s,registration:r?{registrationId:r.registrationId,email:r.email}:void 0,onContact:()=>$(!0),onAccess:a=>{ee(a),s.kind==="meeting"||ae!=="viewer"||!E?R("lobby"):(R("joining"),X(a,{name:E,cameraOn:!1,micOn:!1,cameraId:null,micId:null,
6speakerId:null,background:{mode:"none"},noiseSuppression:"normal"}))}})}),e.jsx(Pe,{meeting:s.kind==="meeting"}),K]});if(s.kind==="meeting"&&L==="idle"&&s.hasPassword&&!B&&!M)return e.jsxs("div",{className:"sn sn-e-page",children:[H(d?e.jsx(f,{variant:"text",size:"sm",icon:e.jsx(Ae,{className:"sn-i sn-i-16"}),...u.startsWith("http")?{href:u}:{to:u},children:"Мои события"}):e.jsx(f,{variant:"quiet",size:"sm",href:t,children:"Войти"}),!0),e.jsx("div",{className:"sn-e-center",style:{paddingBottom:24},children:e.jsx(qe,{event:s,onContact:()=>$(!0),onAccess:a=>{ee(a),R("lobby")}})}),e.jsx(Pe,{meeting:!0}),K]});if(L==="lobby"||s.kind==="meeting"&&L==="idle"){const a=ae,m=s.status==="live"?s.kind==="meeting"?"Встреча идёт":"Трансляция идёт":he?`${s.kind==="meeting"?"Встреча":"Трансляция"} · ${he-p>0?`начнётся ${Cs(he,p)}`:"вот-вот начнётся"}`:void 0;return e.jsx(Ss,{roomTitle:s.title,role:a,roomMeta:{statusLabel:m,statusTone:s.status==="live"?"live":"amber",host:ie?{name:ie.name,avatarUrl:ie.avatarUrl}:s.organizer.personName?{name:s.organizer.personName,avatarUrl:s.organizer.avatarUrl}:null,speakers:s.showSpeakers?s.speakers.filter(T=>T.role!=="host").map(T=>({name:T.name,avatarUrl:T.avatarUrl})):[],when:te==null?void 0:te.full},defaultName:E,waitingRoomEnabled:s.waitingRoom.enabled&&s.kind==="meeting"&&!B,onJoin:Ke,onCancel:s.kind==="broadcast"?()=>R("idle"):void 0,logo:ke,headerRight:d?W:e.jsxs("p",{style:{fontSize:14,color:"var(--sn-ink-3)"},children:["Уже есть аккаунт? ",e.jsx("a",{href:t,style:{fontWeight:600,marginLeft:4},children:"Войти"})]}),checkHref:z,viewerPreview:e.jsx(Ve,{title:s.title,mode:"splash",logoUrl:s.brand.logoUrl,accentColor:s.brand.accentColor,splashColor:s.brand.splashColor,splashSub:s.status==="live"?"Эфир идёт":s.scheduledAt?`Начинаем в ${Fe(s.scheduledAt,s.timezone)}`:void 0})})}const pe=!!r,ss=s.status==="scheduled"&&he>0&&he-p<=ln,ns=pe?(r==null?void 0:r.status)==="confirmed":s.access==="link"||B;if(s.kind==="broadcast"&&ss&&ns&&!Z)return se.current=!0,e.jsxs("div",{className:"sn",children:[e.jsx(Ms,{event:s,now:p,logo:ke,viewer:W,onShare:()=>void x(q,s.title),checkHref:z,joining:L==="joining"}),K]});if(s.kind==="broadcast"&&s.status==="scheduled"&&pe&&!Z&&r)return e.jsxs("div",{className:"sn sn-e-page",children:[H(W),e.jsx("main",{className:"sn-e-main",style:{paddingBottom:48},children:e.jsx(sn,{event:s,now:p,email:r.email,status:r.status,remind:r.remind,pageUrl:q,cabinetHref:u,cabinetExternal:u.startsWith("http"),loggedIn:!!d,onBack:()=>{C(!0),ce(!1),window.scrollTo({top:0})},onResend:()=>void Ze(),resending:Ne})}),K]});const Ee=s.status==="live";let V,re=null;return Ee&&(!s.access||s.access==="link"||pe||B)?V=(r==null?void 0:r.status)==="pending"?e.jsx(f,{variant:"quiet",size:"lg",className:"sn-e-cta-main",icon:e.jsx(ge,{className:"sn-i"}),disabled:!0,children:"Заявка на рассмотрении"}):e.jsx(f,{variant:"live",size:"lg",className:"sn-e-cta-main",loading:L==="joining",onClick:()=>void ue(),iconRight:e.jsx(je,{className:"sn-i"}),children:"Войти в эфир"}):Ee&&s.registrationOpen&&!s.paid?V=e.jsx(f,{variant:"live",size:"lg",className:"sn-e-cta-main",onClick:()=>S(!0),iconRight:e.jsx(je,{className:"sn-i"}),children:"Зарегистрироваться и смотреть"}):pe?V=e.jsx(f,{variant:"soft",size:"lg",className:"sn-e-cta-main",icon:(r==null?void 0:r.status)==="pending"?e.jsx(ge,{className:"sn-i"}):e.jsx(Ce,{className:"sn-i"}),onClick:()=>{C(!1),window.scrollTo({top:0})},children:(r==null?void 0:r.status)==="pending"?"Заявка отправлена":"Вы зарегистрированы"}):s.paid?(V=s.organizer.canContact?e.jsx(f,{variant:"primary",size:"lg",className:"sn-e-cta-main",icon:e.jsx(be,{className:"sn-i"}),onClick:()=>$(!0),children:"Узнать про билеты"}):null,re=e.jsx("p",{className:"sn-e-note",children:"Участие платное — билеты оформляет организатор."})):s.access==="link"||B?(V=e.jsx(Ge,{event:s,pageUrl:q,compact:!0}),re=e.jsxs("p",{className:"sn-e-note",children:[e.jsx(Js,{className:"sn-i sn-i-16"}),"Регистрация не нужна — трансляция откроется на этой странице за 15 минут до начала."]})):s.registrationOpen?(V=e.jsx(f,{variant:"primary",size:"lg",className:"sn-e-cta-main",onClick:()=>S(!0),iconRight:e.jsx(je,{className:"sn-i"}),children:"Зарегистрироваться"}),s.approveRegistrations&&(re=e.jsxs("p",{className:"sn-e-note",children:[e.jsx(ge,{className:"sn-i sn-i-16"}),"Организатор подтверждает заявки вручную — ссылку пришлём после подтверждения."]}))):(V=null,re=e.jsxs("p",{className:"sn-e-note",children:["Регистрация закрыта.",s.organizer.canContact?" Если хотите попасть — напишите организатору.":""]})),pe&&!Ee&&(re=e.jsxs("p",{className:"sn-e-note",children:[e.jsx(Ce,{className:"sn-i sn-i-16",style:{color:"var(--sn-green)"}}),e.jsxs("span",{children:[(r==null?void 0:r.status)==="pending"?"Ждём подтверждения организатора. ":"Ссылка на эфир — в письме. ",e.jsx("button",{type:"button",className:"sn-e-linkbtn",onClick:()=>{C(!1),window.scrollTo({top:0})},children:"Таймер и календарь"})]})]})),e.jsxs("div",{className:"sn sn-e-page",style:s.brand.accentColor?{"--sn-e-accent":s.brand.accentColor}:void 0,children:[H(e.jsxs(e.Fragment,{children:[e.jsx(f,{variant:"text",size:"sm",icon:e.jsx(De,{className:"sn-i sn-i-16"}),onClick:()=>void x(q,s.title),className:"sn-hide-sm",children:"Поделиться"}),e.jsx(js,{label:"Поделиться",size:"sm",onClick:()=>void x(q,s.title),className:"sn-e-only-sm",children:e.jsx(De,{className:"sn-i"})}),W]})),e.jsx("main",{className:"sn-e-main",children:e.jsx(As,{event:s,now:p,cta:V,note:re,aside:Q?null:void 0})}),Qe,e.jsx(Zs,{event:s,open:U,onClose:()=>S(!1),onRegistered:Ye,defaultName:E,defaultEmail:I}),K]})}function za(){return e.jsx(xs,{children:e.jsx(cn,{})})}
6export{za 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.