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.