1import{A as G}from"./analytics-B6QZxVUa.js";const Y="modulepreload",K=function(e){return"/"+e},P={},W=function(t,n,o){let a=Promise.resolve();if(n&&n.length>0){let f=function(p){return Promise.all(p.map(s=>Promise.resolve(s).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),d=i?.nonce||i?.getAttribute("nonce");a=f(n.map(p=>{if(p=K(p),p in P)return;P[p]=!0;const s=p.endsWith(".css"),c=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${c}`))return;const l=document.createElement("link");if(l.rel=s?"stylesheet":Y,s||(l.as="script"),l.crossOrigin="",l.href=p,d&&l.setAttribute("nonce",d),document.head.appendChild(l),s)return new Promise((y,w)=>{l.addEventListener("load",y),l.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${p}`)))})}))}function r(i){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=i,window.dispatchEvent(d),!d.defaultPrevented)throw i}return a.then(i=>{for(const d of i||[])d.status==="rejected"&&r(d.reason);return t().catch(r)})},z=(globalThis.ENV?.VITE_DEMO_API_URL||void 0||globalThis.ENV?.VITE_API_URL||void 0||"http://localhost:8000/api").replace(/\/api\/?$/,"")+"/api/v1";function F(){const e=globalThis.ENV?.VITE_DEMO_LINKS||void 0||"",t={};for(const n of String(e).split(",")){const o=n.indexOf(":");o>0&&(t[n.slice(0,o).trim()]=n.slice(o+1).trim())}return t}function E(e,t){const n=globalThis.NEONA_PAGE||"other";G(e,{...t,source:"landing_demo",page:n})}const X=[30,60];let g=null,T=!1,v=null;const R="ndc-style";function J(){if(document.getElementById(R))return;const e=document.createElement("style");e.id=R,e.textContent=["@keyframes ndc-pulse{0%{box-shadow:0 0 0 0 rgba(255,255,255,.55)}70%{box-shadow:0 0 0 7px rgba(255,255,255,0)}100%{box-shadow:0 0 0 0 rgba(255,255,255,0)}}","@keyframes ndc-orb{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}","@keyframes ndc-blink{0%,100%{opacity:1}50%{opacity:.35}}",".ndc-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#fff;margin-right:6px;vertical-align:1px;animation:ndc-pulse 1.6s ease-out infinite}",".ndc-dot--speaking{animation:ndc-pulse .7s ease-out infinite,ndc-blink .7s ease-in-out infinite}",".ndc-orb-live{animation:ndc-orb 1.6s ease-in-out infinite}",".ndc-status{font-weight:400;opacity:.85}","@keyframes ndc-rise{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}","@keyframes ndc-fadeup{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}","@keyframes ndc-grow{from{width:0}}","@keyframes ndc-shimmer{0%{background-position:-200px 0}100%{background-position:200px 0}}",".ndc-card{position:fixed;right:24px;bottom:24px;z-index:300;width:420px;max-width:calc(100vw - 32px);max-height:min(76vh,640px);display:flex;flex-direction:column;background:#fff;color:#0b0b0c;border:1px solid rgba(11,11,12,.08);border-radius:22px;box-shadow:0 8px 24px -12px rgba(11,11,12,.18),0 32px 80px -24px rgba(11,11,12,.35);animation:ndc-rise .32s cubic-bezier(.22,1,.36,1);overflow:hidden}","@media (max-width:640px){.ndc-card{left:14px;right:14px;bottom:14px;width:auto}}",".ndc-card-scroll{overflow-y:auto;padding:22px 22px 0;flex:1;min-height:0}",".ndc-inpanel{padding:22px 22px 0;background:#fafafb;max-height:min(58vh,520px);display:flex;flex-direction:column}",".ndc-inpanel .ndc-rep{flex:1;min-height:0;overflow-y:auto;margin:0 -22px;padding:0 22px}",".ndc-rep-foot{flex:none;padding:12px 0 16px;box-shadow:0 -10px 18px -14px rgba(11,11,12,.16)}",".ndc-card .ndc-rep-foot{padding:12px 20px 16px}",".ndc-rep{font-size:13.5px;line-height:1.65;color:#3a3a40;font-family:inherit}",".ndc-rep>*{animation:ndc-fadeup .45s cubic-bezier(.22,1,.36,1) both}",".ndc-rep>
1*:nth-child(2){animation-delay:.05s}.ndc-rep>*:nth-child(3){animation-delay:.1s}.ndc-rep>*:nth-child(4){animation-delay:.15s}.ndc-rep>*:nth-child(5){animation-delay:.2s}.ndc-rep>*:nth-child(6){animation-delay:.25s}.ndc-rep>*:nth-child(7){animation-delay:.3s}.ndc-rep>*:nth-child(n+8){animation-delay:.35s}",".ndc-rep-top{display:flex;align-items:flex-start;gap:10px;margin-bottom:2px}",".ndc-rep-eyebrow{font-size:10.5px;font-weight:800;letter-spacing:.16em;color:#9a9aa2}",".ndc-rep-level{margin-left:auto;padding:4px 12px;border-radius:999px;background:#16a34a;color:#fff;font-weight:800;font-size:11.5px;white-space:nowrap;box-shadow:0 8px 18px -8px rgba(22,163,74,.6)}",".ndc-rep-x{margin-left:auto;background:none;border:none;color:#b5b5bc;font-size:19px;line-height:1;cursor:pointer;padding:0 0 0 8px}",".ndc-rep-x:hover{color:#55555c}",".ndc-rep-level+.ndc-rep-x{margin-left:0}",".ndc-rep-title{margin:0 0 6px;font-size:18px;font-weight:800;letter-spacing:-0.02em;color:#0b0b0c}",".ndc-rep-headline{margin:0 0 16px;color:#55555c;font-size:14px}",".ndc-rep-stats{display:flex;border:1px solid #ececef;border-radius:14px;background:#fff;margin-bottom:12px;overflow:hidden}",".ndc-rep-stat{flex:1;padding:11px 8px;text-align:center}",".ndc-rep-stat+.ndc-rep-stat{border-left:1px solid #ececef}",".ndc-rep-stat b{display:block;font-size:15px;font-weight:800;color:#0b0b0c;letter-spacing:-0.01em}",".ndc-rep-stat span{display:block;margin-top:1px;font-size:11px;color:#9a9aa2;font-weight:600}",".ndc-rep-share{margin:0 0 6px;padding:12px 14px;border:1px solid #ececef;border-radius:14px;background:#fff}",".ndc-rep-share-label{display:flex;justify-content:space-between;align-items:baseline;font-size:12px;color:#55555c;font-weight:600;margin-bottom:7px}",".ndc-rep-share-label strong{font-size:15px;color:#15803d;letter-spacing:-0.01em}",".ndc-rep-bar{height:8px;border-radius:999px;background:#ececef;overflow:hidden}",".ndc-rep-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#22c55e,#16a34a);animation:ndc-grow .7s .2s cubic-bezier(.22,1,.36,1) backwards}",".ndc-rep-share-sub{display:flex;justify-content:space-between;margin-top:6px;font-size:11px;color:#9a9aa2}",".ndc-rep-sec{padding:13px 2px 2px;margin-top:9px;border-top:1px solid #f0f0f2}",".ndc-rep-sec h4{margin:0 0 7px;font-size:12px;font-weight:800;letter-spacing:.01em;color:#15803d}",".ndc-rep-sec ul{margin:0;padding:0;list-style:none}",".ndc-rep-sec li{position:relative;margin:4px 0;padding-left:15px}",'.ndc-rep-sec li::before{content:"";position:absolute;left:1px;top:9px;width:5px;height:5px;border-radius:50%;background:#16a34a}',".ndc-rep-suggest{margin:14px 0 16px;padding:15px 17px;border-radius:16px;background:linear-gradient(135deg,#15803d,#166534);color:#fff;box-shadow:0 14px 30px -16px rgba(21,128,61,.55)}",".ndc-rep-suggest h4{margin:0 0 6px;font-size:11px;font-weight:800;letter-spacing:.12em;color:rgba(255,255,255,.75)}",".ndc-rep-suggest p{margin:3px 0;font-size:14px;font-weight:700;line-height:1.55;letter-spacing:-0.01em}",".ndc-rep-again{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin:0;padding:14px;border:none;border-radius:999px;background:#16a34a;color:#fff;font:inherit;font-weight:800;font-size:14.5px;cursor:pointer;box-shadow:0 16px 34px -14px rgba(22,163,74,.7);transition:transform .15s ease,box-shadow .15s ease}",".ndc-rep-again:hover{transform:translateY(-1px);box-shadow:0 20px 40px -14px rgba(22,163,74,.75)}",".ndc-rep-again svg{flex:none}",".ndc-live-top{display:flex;align-items:center;gap:10px;margin-bottom:2px}",".ndc-live-eyebrow{display:inline-flex;align-items:center;gap:7px;font-size:10.5px;font-weight:800;letter-spacing:.16em;color:#15803d}",".ndc-live-eyebrow i{width:8px;height:8px;border-radius:50%;background:#16a34a;animation:ndc-blink 1.4s ease-in-out infinite}",".ndc-live-time{margin-left:auto;font-size:13.5px;font-weight:800;color:#15803d;font-variant-numeric:tabular-nums}",".ndc-rep-end{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin:0;padding:13px;border:1px solid #e2e2e8;border-radius:999px;background:#fff;color:#55555c;font:inherit;font-weight:800;font-size:14.5px;cursor:pointer;transition:border-color .15s ease,color .15s ease}",".ndc-rep-end:hover{border-color:#c9c9d0;color:#0b0b0c}",".ndc-rep-load{display:flex;align-items:center;gap:9px;margin:2px 0 14px;color:#55555c;font-size:13.5px;font-weight:600}",".ndc-rep-load i{width:9px;height:9px;border-radius:50%;background:#16a34a;animation:ndc-pulse 1.2s ease-out infinite;box-shadow:0 0 0 0 rgba(22,163,74,.4)}",".ndc-skel{height:12px;border-radius:6px;margin:10px 0;
1background:linear-gradient(90deg,#f0f0f2 25%,#e6e6ea 37%,#f0f0f2 63%);background-size:400px 100%;animation:ndc-shimmer 1.3s linear infinite}",".ndc-skel:nth-child(3){width:82%}.ndc-skel:nth-child(4){width:64%}.ndc-skel:last-child{width:44%;margin-bottom:20px}"].join(` 2`),document.head.appendChild(e)}function _(e){const t=Math.max(0,Math.round((Date.now()-e)/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Q(e,t){e.innerHTML=`<span class="ndc-dot"></span>íµí ì¤ <span data-ndc-time>${_(t)}</span><span class="ndc-status"> · ë르면 ì¢ ë£</span>`}function Z(e){return e.closest("[data-demo-panel]")?.querySelector('span[style*="radial-gradient"]')??null}function I(e,t){e.textContent=t}function N(e,t){e.innerHTML=t}function H(e,t,n){I(e,n),setTimeout(()=>N(e,t),2500)}function ee(e){return`<div class="ndc-rep"><div class="ndc-live-top"><span class="ndc-live-eyebrow"><i></i>ON CALL</span><span class="ndc-live-time" data-ndc-card-time>${_(e)}</span></div><h3 class="ndc-rep-title">ìì´ì í¸ì íµííê³ ìì´ì</h3><p class="ndc-rep-headline">í¸íê² ë§ì 걸ì´ë³´ì¸ì. íµí를 ë§ì¹ë©´ ë°©ê¸ ëí를 ë¶ìí´ ë¦¬í¬í¸ë¡ ì ë¦¬í´ ëë ¤ì.</p></div>`}function te(){return'<div class="ndc-rep-foot"><button type="button" class="ndc-rep-end">íµí ì¢ ë£í기</button></div>'}function $(){document.querySelector(".ndc-card")?.remove(),v=null}function ne(e,t){if(e.closest("[data-demo-panel]"))return;$();const n=document.createElement("div");n.className="ndc-card",n.setAttribute("role","dialog"),n.setAttribute("aria-label","íµí ì¤");const o=document.createElement("div");o.className="ndc-card-scroll",o.innerHTML=ee(t),n.appendChild(o),n.insertAdjacentHTML("beforeend",te()),n.addEventListener("click",a=>{a.target.closest(".ndc-rep-end")&&S("button")}),document.body.appendChild(n),v=n}function L(e){fetch(e,{method:"POST",keepalive:!0}).catch(()=>{})}function S(e){if(!g)return;const t=g;g=null,clearInterval(t.timerId),t.orbEl?.classList.remove("ndc-orb-live");const n=Math.round((Date.now()-t.startedAt)/1e3);E("try_call_end",{demo_id:t.slug,duration_sec:n,end_reason:e}),L(t.endUrl);try{t.room.disconnect()}catch{}if(document.querySelectorAll("audio[data-demo-call-track]").forEach(r=>r.remove()),N(t.btn,t.originalHtml),e==="error"||n<8||!ae.has(t.slug)){$();return}const o=t.endUrl.replace(/\/end$/,"/report"),a=t.btn.closest("[data-demo-panel]");a&&e!=="close"?ce(a,t.slug,o):U(t.slug,o,t.btn)}const ae=new Set(["neona-guide","english-tutor","math-tutor","cs-agent","reception","companion"]),oe=2500,O=14;function x(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function re(e){const t=Math.floor(e/60);return t>0?`${t}ë¶ ${e%60}ì´`:`${e}ì´`}const ie='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3a3 3 0 0 1 3 3v5a3 3 0 0 1-6 0V6a3 3 0 0 1 3-3z"/><path d="M6 11a6 6 0 0 0 12 0"/><path d="M12 17v4"/></svg>';function A(){return'<div class="ndc-rep"><p class="ndc-rep-load"><i></i>ë°©ê¸ ëí를 ë¶ìí´ ë¦¬í¬í¸ë¥¼ ë§ë¤ê³ ìì´ì</p><div class="ndc-skel"></div><div class="ndc-skel"></div><div class="ndc-skel"></div></div>'}function q(e,t){const n=e.stats||{duration_sec:0,user_turns:0,user_chars:0},o=n.agent_chars??0,a=n.user_chars+o,r=a>0?Math.round(n.user_chars/a*100):0,i='<div class="ndc-rep-top"><span class="ndc-rep-eyebrow">SESSION REPORT</span>'+(e.level?`<span class="ndc-rep-level">${x(e.level)}</span>`:"")+(t.showClose?'<button type="button" class="ndc-rep-x" aria-label="ë«ê¸°">Ã</button>':"")+"</div>",d=`<div class="ndc-rep-stats"><div class="ndc-rep-stat"><b>${x(re(n.duration_sec))}</b><span>ëí ìê°</span></div><div class="ndc-rep-stat"><b>${n.user_turns}í</b><span>ë´ ë°í</span></div><div class="ndc-rep-stat"><b>${n.user_chars}ì</b><span>ë§í ë¶ë</span></div></div>`,f=a>0?`<div class="ndc-rep-share"><div class="ndc-rep-share-label"><span>ë´ ë°í ë¹ì¤</span><strong>${r}%</strong></div><div class="ndc-rep-bar"><i style="width:${r}%"></i></div><div class="ndc-rep-share-sub"><span>ë ${n.user_chars}ì</span><span>ìì´ì í¸ ${o}ì</span></div></div>`:"",s=(e.sections||[]).map(c=>c.suggest?`<div class="ndc-rep-suggest"><h4>${x(c.title)}</h4>
2`+c.items.map(l=>`<p>${x(l)}</p>`).join("")+"</div>":`<div class="ndc-rep-sec"><h4>${x(c.title)}</h4><ul>`+c.items.map(l=>`<li>${x(l)}</li>`).join("")+"</ul></div>").join("");return'<div class="ndc-rep">'+i+`<h3 class="ndc-rep-title">${x(e.title||"ì¸ì
리í¬í¸")}</h3><p class="ndc-rep-headline">${x(e.headline)}</p>`+d+f+s+"</div>"}function j(){return`<div class="ndc-rep-foot"><button type="button" class="ndc-rep-again">${ie}ì´ì´ì ë¤ì ëíí기</button></div>`}async function D(e,t,n,o){for(let a=0;a<O;a++){if(!t())return;try{const r=await fetch(e);if(r.ok){const i=await r.json();if(i.status==="ready"&&i.report){t()&&n(i.report);return}if(i.status!=="pending")break}}catch{}a<O-1&&await new Promise(r=>setTimeout(r,oe))}t()&&o()}function B(e,t){t&&document.querySelector("button[data-demo-open]")?.click(),(t?document.querySelector("[data-demo-panel] a[data-demo-call]"):document.querySelector(`a[data-demo-call="${e}"]`))?.click()}let h=null;function se(e){const t=e.firstElementChild,n=t?.lastElementChild;return n&&n!==t?.firstElementChild?n:null}function C(){h&&(h.bodyEl.classList.remove("ndc-inpanel"),h.bodyEl.style.cssText=h.cssText,h.bodyEl.innerHTML=h.html,h=null)}function ce(e,t,n){const o=se(e);if(!o){U(t,n,e);return}h||(h={bodyEl:o,html:o.innerHTML,cssText:o.style.cssText}),o.classList.add("ndc-inpanel"),o.style.cssText="",o.innerHTML=A(),o.onclick=r=>{r.target.closest(".ndc-rep-again")&&(o.onclick=null,C(),B(t,!0))},D(n,()=>h?.bodyEl===o&&!e.hidden,r=>{o.innerHTML=q(r,{showClose:!1})+j()},()=>{o.onclick=null,C()})}function U(e,t,n){const o=v;v=null;let a,r;o?(a=o,a.setAttribute("aria-label","ì¸ì
리í¬í¸"),a.querySelector(".ndc-rep-foot")?.remove(),r=a.querySelector(".ndc-card-scroll"),r.innerHTML=A()):(document.querySelector(".ndc-card")?.remove(),a=document.createElement("div"),a.className="ndc-card",a.setAttribute("role","dialog"),a.setAttribute("aria-label","ì¸ì
리í¬í¸"),r=document.createElement("div"),r.className="ndc-card-scroll",r.innerHTML=A(),a.appendChild(r),document.body.appendChild(a));const i=!!n.closest("[data-demo-panel]");a.addEventListener("click",d=>{const f=d.target;
2if(f.closest(".ndc-rep-x")){a.remove();return}f.closest(".ndc-rep-again")&&(a.remove(),B(e,i))}),D(t,()=>a.isConnected,d=>{r.innerHTML=q(d,{showClose:!0}),a.insertAdjacentHTML("beforeend",j())},()=>a.remove())}function de(){document.querySelectorAll("[data-sound-on]").forEach(e=>{e.hidden||e.closest("button")?.click()}),window.Neona?.stopSequence?.()}async function le(e,t,n){T=!0,de(),J(),$();const o=e.innerHTML;I(e,"ì°ê²° ì¤â¦");let a="";try{const r=await fetch(`${z}/try/${n}/sessions`,{method:"POST"});if(!r.ok)throw new Error(`session create failed (${r.status})`);const i=await r.json();a=`${z}/try/${n}/sessions/${i.session_id}/end`;const{Room:d,RoomEvent:f,Track:p}=await W(async()=>{const{Room:m,RoomEvent:u,Track:b}=await import("./livekit-client.esm-BOXSfssv.js");return{Room:m,RoomEvent:u,Track:b}},[]),s=new d({adaptiveStream:!0,dynacast:!0});s.on(f.TrackSubscribed,m=>{if(m.kind!==p.Kind.Audio)return;const u=m.attach();u.setAttribute("data-demo-call-track",m.sid??""),u.autoplay=!0,document.body.appendChild(u)}),s.on(f.TrackUnsubscribed,m=>{m.detach().forEach(u=>u.remove())}),s.on(f.Disconnected,()=>S("disconnected")),await s.connect(i.server_url,i.token);try{await s.localParticipant.setMicrophoneEnabled(!0)}catch{s.disconnect(),L(a),H(e,o,"ë§ì´í¬ ê¶íì íì©í´ì£¼ì¸ì");return}if(!s.canPlaybackAudio)try{await s.startAudio()}catch{}const c=Date.now(),l=globalThis.NEONA_PAGE||"",y=e.closest("[data-cta-position]")?.getAttribute("data-cta-position");E("try_call_start",{demo_id:t,...y?{position:y}:{},...l.startsWith("uc_")?{use_case:t}:{}});const w=Z(e);w?.classList.add("ndc-orb-live"),Q(e,c),ne(e,c);let M=0;const V=window.setInterval(()=>{const m=Math.round((Date.now()-c)/1e3),u=e.querySelector("[data-ndc-time]");u&&(u.textContent=_(c));const b=v?.querySelector("[data-ndc-card-time]");b&&(b.textContent=_(c));for(const k of X)m>=k&&M<k&&(M=k,E("try_call_progress",{demo_id:t,sec:k}))},1e3);s.on(f.ActiveSpeakersChanged,m=>{const u=m.some(b=>b!==s.localParticipant);e.querySelector(".ndc-dot")?.classList.toggle("ndc-dot--speaking",u)}),g={room:s,endUrl:a,btn:e,originalHtml:o,startedAt:c,slug:t,timerId:V,orbEl:w}}catch{a&&L(a),H(e,o,"ì°ê²°ì ì¤í¨íì´ì â ë¤ì ìë")}finally{T=!1}}document.addEventListener("click",e=>{const t=e.target;if(t?.closest?.("[data-demo-close]")){g?S("close"):C();return}const n=t?.closest?.("[data-demo-call]");if(!n)return;const o=n.getAttribute("data-demo-call")||"",a=F()[o];if(a&&(e.preventDefault(),e.stopPropagation(),!T)){if(g){S("button");return}le(n,o,a)}},!0);window.addEventListener("pagehide",()=>{if(!g)return;const e=g;g=null,clearInterval(e.timerId),E("try_call_end",{demo_id:e.slug,duration_sec:Math.round((Date.now()-e.startedAt)/1e3),end_reason:"pagehide"}),navigator.sendBeacon(e.endUrl)}); 3//# sourceMappingURL=demo-call.js.map
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.