const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeSpace-LkNTr6Yb.js","assets/vendor-DPdZy5oT.js","assets/monaco-editor-B9sTvin7.js","assets/monaco-editor-DXKIMHUD.css","assets/monaco-binding-Dce7j3HK.js"])))=>i.map(i=>d[i]); import{r as ys,a as xs,b as d,u as Ot,R as j,c as bs,d as le,e as vs,B as ws}from"./vendor-DPdZy5oT.js";import{_ as _s}from"./monaco-editor-B9sTvin7.js";import{s as Ns,c as js,f as ks,o as Ts,v as Cs,t as Es,a as Ss,b as As,w as U,e as Os,d as Z,g as Is,r as rt,h as Ls,i as nt,j as Rs,m as Ps,O as Bs,A as Ms,k as V,l as It,n as pe,p as Lt,q as pt,u as Fe,x as Q,y as Us,z as Ds,B as qs,C as zs,D as Fs}from"./monaco-binding-Dce7j3HK.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function s(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=s(o);fetch(o.href,i)}})();var Be={exports:{}},de={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var mt;function Vs(){if(mt)return de;mt=1;var t=ys(),e=Symbol.for("react.element"),s=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,c,f){var u,m={},y=null,x=null;f!==void 0&&(y=""+f),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(x=c.ref);for(u in c)r.call(c,u)&&!i.hasOwnProperty(u)&&(m[u]=c[u]);if(l&&l.defaultProps)for(u in c=l.defaultProps,c)m[u]===void 0&&(m[u]=c[u]);return{$$typeof:e,type:l,key:y,ref:x,props:m,_owner:o.current}}return de.Fragment=s,de.jsx=a,de.jsxs=a,de}var gt;function Hs(){return gt||(gt=1,Be.exports=Vs()),Be.exports}var n=Hs(),be={},yt;function Qs(){if(yt)return be;yt=1;var t=xs();return be.createRoot=t.createRoot,be.hydrateRoot=t.hydrateRoot,be}var Gs=Qs();/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ys=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Js=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,s,r)=>r?r.toUpperCase():s.toLowerCase()),xt=t=>{const e=Js(t);return e.charAt(0).toUpperCase()+e.slice(1)},Rt=(...t)=>t.filter((e,s,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===s).join(" ").trim(),Ws=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ks={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Xs=d.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},c)=>d.createElement("svg",{ref:c,...Ks,width:e,height:e,stroke:t,strokeWidth:r?Number(s)*24/Number(e):s,className:Rt("lucide",o),...!i&&!Ws(l)&&{"aria-hidden":"true"},...l},[...a.map(([f,u])=>d.createElement(f,u)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const A=(t,e)=>{const s=d.forwardRef(({className:r,...o},i)=>d.createElement(Xs,{ref:i,iconNode:e,className:Rt(`lucide-${Ys(xt(t))}`,`lucide-${t}`,r),...o}));return s.displayName=xt(t),s};/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Zs=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ve=A("arrow-right",Zs);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $s=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Pt=A("chevron-down",$s);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const er=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],tr=A("circle-question-mark",er);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const sr=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],rr=A("clipboard",sr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const nr=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],or=A("clock",nr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ir=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],ot=A("code-xml",ir);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ar=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Me=A("code",ar);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cr=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],lr=A("file-text",cr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dr=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],hr=A("graduation-cap",dr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ur=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],fr=A("key",ur);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pr=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],mr=A("mail",pr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gr=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],yr=A("map-pin",gr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xr=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],br=A("menu",xr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vr=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],bt=A("message-circle",vr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wr=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Bt=A("message-square",wr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _r=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Nr=A("palette",_r);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jr=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],kr=A("phone",jr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tr=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Cr=A("play",Tr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Er=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Sr=A("send",Er);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ar=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Or=A("shield-check",Ar);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ir=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],vt=A("shield",Ir);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lr=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Ve=A("sparkles",Lr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rr=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Pr=A("star",Rr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Br=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Mr=A("triangle-alert",Br);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ur=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],it=A("users",Ur);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],qr=A("x",Dr);/** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zr=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],He=A("zap",zr),ee=d.createContext(),Fr=({children:t})=>{const[e,s]=d.useState(!1),[r,o]=d.useState(!1),[i,a]=d.useState(null),l=u=>{const m={username:u.username,email:u.email};localStorage.setItem("user",JSON.stringify(m)),a(m)},c=()=>{const u=localStorage.getItem("user");if(u){a(JSON.parse(u));return}return null},f=()=>{localStorage.removeItem("user"),a(null)};return n.jsx(ee.Provider,{value:{loginState:e,signupState:r,user:i,setLoginState:s,setSignupState:o,saveUser:l,getUserDetails:c,logout:f},children:t})},Vr=()=>{const[t,e]=d.useState(!1),[s,r]=d.useState(!1),[o,i]=d.useState(!1),[a,l]=d.useState("/"),c=Ot(),{setSignupState:f,setLoginState:u,user:m,logout:y}=d.useContext(ee),x=m?m.username:"";d.useEffect(()=>{const h=()=>e(window.scrollY>10);return window.addEventListener("scroll",h),()=>window.removeEventListener("scroll",h)},[]),d.useEffect(()=>{l(window.location.pathname)},[]);const C=[{name:"Home",path:"/"},{name:"Features",path:"/features"},{name:"FAQs",path:"/faqs"},{name:"Contact Us",path:"/contact"}],N=()=>{u(!0),f(!1)},v=()=>{f(!0),u(!1)},g=h=>{c(h),l(h),r(!1)};return n.jsx(n.Fragment,{children:n.jsx("div",{className:`fixed top-0 left-0 w-full z-50 transition-colors duration-200 ${t?"bg-white border-b border-green-200":"bg-white border-b border-green-100"}`,children:n.jsxs("header",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"flex justify-between items-center h-16 lg:h-20",children:[n.jsxs("div",{className:"flex items-center space-x-3 cursor-pointer",onClick:()=>g("/"),children:[n.jsx("div",{className:"w-10 h-10 bg-white border border-green-700 flex items-center justify-center",children:n.jsx(ot,{className:"w-6 h-6 text-green-700"})}),n.jsxs("div",{className:"flex flex-col",children:[n.jsx("span",{className:"text-xl font-bold text-green-800 tracking-tight",children:"CodeLive"}),n.jsx("span",{className:"text-xs text-gray-600 -mt-1",children:"Real-time coding"})]})]}),n.jsx("nav",{className:"hidden lg:block",children:n.jsx("ul",{className:"flex items-center space-x-1",children:C.map(h=>n.jsx("li",{children:n.jsx("button",{onClick:()=>g(h.path),className:`px-10 py-2 font-medium transition-colors border-b-2 ${a===h.path?"text-green-700 border-green-700":"text-gray-800 border-transparent hover:text-green-700 hover:border-green-300"}`,children:h.name})},h.path))})}),n.jsxs("div",{className:"flex items-center space-x-4",children:[x?n.jsxs("div",{className:"relative",children:[n.jsxs("button",{onClick:()=>i(!o),className:"flex items-center space-x-3 px-3 py-2 hover:bg-green-50 transition border border-green-100",children:[n.jsx("img",{className:"w-8 h-8 rounded-full ring-2 ring-green-100",src:x.profile_picture||"data:image/png;base64,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",alt:"Profile",referrerPolicy:"no-referrer"}),n.jsxs("div",{className:"hidden sm:block text-left",children:[n.jsxs("p",{className:"text-sm font-medium text-green-900",children:["Hi, ",x]}),n.jsx("p",{className:"text-xs text-gray-600",children:"Welcome back"})]}),n.jsx(Pt,{className:`w-4 h-4 text-green-600 transition-transform ${o?"rotate-180":""}`})]}),o&&n.jsx("div",{className:"absolute right-0 mt-2 w-48 bg-white border border-gray-200 rounded-lg shadow-lg py-2 z-50 animate-fadeIn",children:n.jsx("button",{onClick:()=>{y(),i(!1)},className:"w-full px-4 py-2 text-sm text-red-600 text-left hover:bg-red-50 hover:text-red-700 transition duration-150",children:"Sign Out"})})]}):n.jsxs("div",{className:"hidden sm:flex items-center space-x-3",children:[n.jsx("button",{onClick:N,className:"px-6 py-2 text-green-800 font-medium border border-green-700 hover:bg-green-700 hover:text-white transition-colors",children:"Login"}),n.jsx("button",{onClick:v,className:"px-6 py-2 bg-green-700 text-white font-medium border border-green-700 hover:bg-white hover:text-green-800 transition-colors",children:"Sign Up"})]}),n.jsx("button",{onClick:()=>r(!s),className:"lg:hidden p-2 hover:bg-green-50",children:s?n.jsx(qr,{className:"w-6 h-6"}):n.jsx(br,{className:"w-6 h-6"})})]})]}),s&&n.jsx("div",{className:"lg:hidden border-t border-green-100 bg-white",children:n.jsxs("div",{className:"px-4 py-6 space-y-4",children:[C.map(h=>n.jsx("button",{onClick:()=>g(h.path),className:`w-full text-left px-4 py-3 font-medium transition-colors border-l-4 ${a===h.path?"text-green-700 bg-green-50 border-green-700":"text-gray-800 hover:text-green-700 hover:bg-green-50 border-transparent"}`,children:h.name},h.path)),x?n.jsxs("div",{className:"pt-4 border-t border-green-100",children:[n.jsxs("div",{className:"flex items-center space-x-3 px-4 py-3",children:[n.jsx("img",{className:"w-10 h-10 rounded-full ring-2 ring-green-100",src:x.profile_picture,alt:"Profile",referrerPolicy:"no-referrer"}),n.jsxs("div",{children:[n.jsxs("p",{className:"font-medium text-green-900",children:["Hi, ",x.given_name]}),n.jsx("p",{className:"text-sm text-gray-600",children:"Welcome back"})]})]}),n.jsxs("div",{className:"mt-3 space-y-2",children:[n.jsx("button",{className:"w-full text-left px-4 py-2 text-gray-800 hover:bg-green-50",children:"Profile Settings"}),n.jsx("button",{className:"w-full text-left px-4 py-2 text-gray-800 hover:bg-green-50",children:"My Projects"}),n.jsx("button",{className:"w-full text-left px-4 py-2 text-red-600 hover:bg-red-50",children:"Sign Out"})]})]}):n.jsxs("div",{className:"pt-4 border-t border-green-100 space-y-3",children:[n.jsx("button",{onClick:N,className:"w-full px-6 py-3 text-green-800 font-medium border border-green-700 hover:bg-green-700 hover:text-white transition-colors",children:"Login"}),n.jsx("button",{onClick:v,className:"w-full px-6 py-3 bg-green-700 text-white font-medium border border-green-700 hover:bg-white hover:text-green-800 transition-colors",children:"Sign Up"})]})]})})]})})})},Hr="/assets/sub-coding-hzv5i2eJ.mp4",Qr="/assets/live2-50PSXBYW.mp4",Oi=[{label:"Text",value:"plaintext"},{label:"JavaScript",value:"javascript"},{label:"Python",value:"python"},{label:"Java",value:"java"},{label:"C++",value:"cpp"},{label:"C",value:"c"},{label:"SQL",value:"sql"}],wt={coding_video:Hr,LIVE_video:Qr},Gr=()=>{const t=Ot(),[e,s]=d.useState(!1);d.useEffect(()=>{s(!0)},[]);const r=[{icon:n.jsx(Me,{className:"w-8 h-8"}),title:"Code with your team",description:"Open a Codeshare editor, write or copy code, then share it with friends and colleagues. Pair program and troubleshoot together in real-time.",buttonText:"Start Collaboration",gradient:"from-blue-500 to-cyan-500"},{icon:n.jsx(it,{className:"w-8 h-8"}),title:"Interview developers",description:"Set coding tasks and observe in real-time when interviewing remotely or in person. Streamlined technical interviews made simple.",buttonText:"Begin Interview",gradient:"from-purple-500 to-pink-500"},{icon:n.jsx(hr,{className:"w-8 h-8"}),title:"Teach programming",description:"Share your code with students and peers, then educate them effectively. Universities worldwide trust our platform for coding education.",buttonText:"Start Teaching",gradient:"from-green-500 to-teal-500"}],o=()=>{t("/code-space"),window.scrollTo(0,0)};return n.jsxs("div",{className:"min-h-full bg-gradient-to-br from-green-50 via-emerald-50 to-green-100",children:[n.jsxs("div",{className:"relative overflow-hidden",children:[n.jsx("div",{className:"absolute inset-0 bg-grid-pattern opacity-5"}),n.jsxs("div",{className:"relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-16 pb-20",children:[n.jsxs("div",{className:`text-center transition-all duration-1000 ${e?"opacity-100 translate-y-0":"opacity-0 translate-y-10"}`,children:[n.jsxs("div",{className:"inline-flex items-center px-4 py-2 rounded bg-green-100 text-green-800 text-sm font-medium mb-8",children:[n.jsx(Pr,{className:"w-4 h-4 mr-2"}),"Trusted by 100,000+ developers worldwide"]}),n.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-7xl font-bold text-gray-900 mb-6 leading-tight",children:["Share Code in"," ",n.jsx("span",{className:"bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:"Real-time"}),n.jsx("br",{}),"with Developers"]}),n.jsx("p",{className:"text-lg sm:text-xl text-gray-700 mb-10 max-w-3xl mx-auto leading-relaxed",children:"The most intuitive online code editor for interviews, collaboration, teaching, and troubleshooting. Code together, anywhere, anytime."}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center mb-16",children:[n.jsxs("button",{onClick:o,className:"px-8 py-3 border border-green-700 text-green-800 text-sm font-medium tracking-wide hover:bg-green-700 hover:text-white transition-colors flex items-center",children:["Start Sharing",n.jsx(ve,{className:"w-4 h-4 ml-2"})]}),n.jsxs("button",{className:"px-8 py-3 border border-green-300 text-green-800 text-sm font-medium tracking-wide hover:bg-green-200 transition-colors flex items-center",children:[n.jsx(Cr,{className:"w-4 h-4 mr-2"}),"Demo"]})]}),n.jsx("p",{className:"text-sm text-green-700",children:"Free to use • No signup required • Works everywhere"})]}),n.jsx("div",{className:`mt-16 transition-all duration-1000 delay-300 ${e?"opacity-100 translate-y-0":"opacity-0 translate-y-10"}`,children:n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 max-w-6xl mx-auto",children:[n.jsx("div",{className:"lg:col-span-2",children:n.jsxs("div",{className:"relative group",children:[n.jsx("div",{className:"absolute inset-0"}),n.jsx("div",{className:"relative bg-white p-2 border border-green-200",children:n.jsxs("video",{className:"w-full h-64 sm:h-80 lg:h-96 object-cover",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,children:[n.jsx("source",{src:wt.coding_video,type:"video/mp4"}),n.jsx("div",{className:"w-full h-full bg-gradient-to-br from-blue-100 to-purple-100 rounded-xl flex items-center justify-center",children:n.jsxs("div",{className:"text-center",children:[n.jsx(Me,{className:"w-16 h-16 text-blue-500 mx-auto mb-4"}),n.jsx("p",{className:"text-gray-600",children:"Demo Video Placeholder"})]})})]})})]})}),n.jsx("div",{className:"hidden lg:flex flex-col gap-6",children:[1,2].map(i=>n.jsxs("div",{className:"relative group",children:[n.jsx("div",{className:"absolute inset-0"}),n.jsx("div",{className:"relative bg-white p-2 border border-green-200",children:n.jsxs("video",{className:"w-full h-32 sm:h-40 lg:h-44 object-cover",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,children:[n.jsx("source",{src:wt.coding_video,type:"video/mp4"}),n.jsx("div",{className:"w-full h-full bg-gradient-to-br from-green-100 to-blue-100 rounded-lg flex items-center justify-center",children:n.jsx(Me,{className:"w-8 h-8 text-green-500"})})]})})]},i))})]})})]})]}),n.jsx("div",{className:"bg-white/50 backdrop-blur-sm py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto text-center px-4",children:n.jsx("blockquote",{className:"text-xl sm:text-2xl font-medium text-gray-700 italic",children:'"Trusted by software engineers at leading companies and universities worldwide"'})})}),n.jsx("div",{className:"py-14 bg-gradient-to-r from-emerald-50 via-green-100 to-emerald-50 border-y border-green-200",children:n.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col lg:flex-row items-center gap-10",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-green-100 text-green-800 text-xs font-semibold tracking-wide mb-4",children:[n.jsx(Ve,{className:"w-4 h-4"})," AI POWERED"]}),n.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-gray-900 mb-4 leading-tight",children:["Supercharge Collaboration with ",n.jsx("span",{className:"bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:"AI Code Generation"})]}),n.jsx("p",{className:"text-lg text-gray-700 leading-relaxed mb-6 max-w-xl",children:"Instantly generate boilerplate, helper functions, test cases and more directly inside your shared editor. Our integrated AI helps teams move faster, stay focused and explore solutions together."}),n.jsxs("ul",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-8 text-sm text-gray-700",children:[n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"text-green-600",children:"•"})," Context-aware code insertion"]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"text-green-600",children:"•"})," Generates clean, readable output"]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"text-green-600",children:"•"})," Works seamlessly with real-time sessions"]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"text-green-600",children:"•"})," Safe fallback when editor not active"]})]}),n.jsxs("button",{onClick:o,className:"px-8 py-3 border border-green-700 text-green-800 text-sm font-medium tracking-wide hover:bg-green-700 hover:text-white transition-colors inline-flex items-center",children:["Try AI Now ",n.jsx(ve,{className:"w-4 h-4 ml-2"})]})]}),n.jsx("div",{className:"flex-1 w-full max-w-md",children:n.jsxs("div",{className:"relative bg-white border border-green-200 p-5 shadow-sm",children:[n.jsx("div",{className:"absolute -top-3 -left-3 w-14 h-14 bg-green-600 text-white flex items-center justify-center rounded-full shadow-md",children:n.jsx(Ve,{className:"w-7 h-7"})}),n.jsx("pre",{className:"text-xs bg-gray-900 text-green-100 p-4 overflow-auto leading-relaxed font-mono border border-gray-800",children:n.jsx("code",{children:`# AI Example # Prompt: "Generate a function to reverse words in a sentence" function reverseWords(sentence) { return sentence .split(/ | /) .map(word => word.split('').reverse().join('')) .join(' '); } console.log(reverseWords('Code Live Together'));`})}),n.jsx("p",{className:"mt-4 text-xs text-gray-600",children:"Generated sample output. Actual results adapt to your prompt."})]})})]})}),n.jsx("div",{className:"py-20 bg-gradient-to-b from-white to-green-50",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsxs("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-gray-900 mb-6",children:["Everything you need to"," ",n.jsx("span",{className:"bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:"code together"})]}),n.jsx("p",{className:"text-xl text-gray-700 max-w-3xl mx-auto",children:"Whether you're collaborating with teammates, conducting interviews, or teaching students, we've got you covered."})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:r.map((i,a)=>n.jsxs("div",{className:`relative bg-white p-6 border border-green-200 hover:border-green-500 transition-colors ${e?"opacity-100 translate-y-0":"opacity-0 translate-y-6"}`,style:{transitionDelay:`${a*100}ms`},children:[n.jsx("div",{className:"mb-4 text-green-700",children:i.icon}),n.jsx("h3",{className:"text-lg font-semibold text-green-900 mb-3",children:i.title}),n.jsx("p",{className:"text-sm text-green-800 mb-5 leading-relaxed",children:i.description}),n.jsxs("button",{onClick:o,className:"px-5 py-2 border border-green-700 text-green-800 text-xs font-medium tracking-wide hover:bg-green-700 hover:text-white transition-colors inline-flex items-center",children:[i.buttonText.replace(/Start |Begin |Start /gi,"").trim()||"Open",n.jsx(ve,{className:"w-3 h-3 ml-2"})]})]},a))})]})}),n.jsx("div",{className:"bg-gradient-to-r from-green-700 via-emerald-700 to-green-800 py-20",children:n.jsxs("div",{className:"max-w-4xl mx-auto text-center px-4",children:[n.jsx("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-6",children:"Ready to start coding together?"}),n.jsx("p",{className:"text-xl text-green-100 mb-10",children:"Join thousands of developers who trust our platform for their coding needs."}),n.jsxs("button",{onClick:o,className:"px-10 py-4 border border-green-200 text-white text-sm font-medium tracking-wide hover:bg-white hover:text-green-800 transition-colors flex items-center mx-auto",children:["Get Started",n.jsx(ve,{className:"w-5 h-5 ml-2"})]}),n.jsx("p",{className:"text-green-100 mt-6 text-sm",children:"No credit card required • Start in seconds"})]})})]})};var Mt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},_t=j.createContext&&j.createContext(Mt),Yr=["attr","size","title"];function Jr(t,e){if(t==null)return{};var s=Wr(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function Wr(t,e){if(t==null)return{};var s={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;s[r]=t[r]}return s}function Ce(){return Ce=Object.assign?Object.assign.bind():function(t){for(var e=1;ej.createElement(e.tag,Ee({key:s},e.attr),Ut(e.child)))}function Se(t){return e=>j.createElement($r,Ce({attr:Ee({},t.attr)},e),Ut(t.child))}function $r(t){var e=s=>{var{attr:r,size:o,title:i}=t,a=Jr(t,Yr),l=o||s.size||"1em",c;return s.className&&(c=s.className),t.className&&(c=(c?c+" ":"")+t.className),j.createElement("svg",Ce({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,r,a,{className:c,style:Ee(Ee({color:t.color||s.color},s.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&j.createElement("title",null,i),t.children)};return _t!==void 0?j.createElement(_t.Consumer,null,s=>e(s)):e(Mt)}function en(t){return Se({attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"},child:[]}]})(t)}function tn(t){return Se({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"},child:[]}]})(t)}function sn(t){return Se({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"},child:[]}]})(t)}function rn(t){return Se({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"},child:[]}]})(t)}const nn=()=>{const t=["Home","Features","Pricing","FAQs","About"],e=[{icon:tn,url:"https://www.linkedin.com/in/himadrikaran"},{icon:en,url:"https://github.com/karanhimadri"},{icon:rn,url:"https://www.youtube.com/@himadri"},{icon:sn,url:"https://twitter.com/himadri"}];function s(r){window.open(r,"_blank")}return n.jsx("footer",{className:"bg-gradient-to-br from-green-50 to-green-100 border-t border-green-200",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-12",children:[n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8 lg:gap-12 items-center",children:[n.jsx("div",{className:"flex items-center space-x-2",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-10 h-10 bg-white border border-green-700 flex items-center justify-center",children:n.jsx(ot,{className:"w-6 h-6 text-green-700"})}),n.jsxs("div",{className:"flex flex-col",children:[n.jsx("span",{className:"text-xl font-bold text-green-800",children:"CodeLive"}),n.jsx("span",{className:"text-xs text-gray-600 -mt-1",children:"Real-time coding"})]})]})}),n.jsx("nav",{className:"flex justify-center",children:n.jsx("ul",{className:"flex flex-wrap items-center justify-center gap-6 lg:gap-8 text-gray-800 font-medium",children:t.map(r=>n.jsxs("li",{className:"hover:text-green-700 transition-colors cursor-pointer relative group",children:[r,n.jsx("span",{className:"absolute -bottom-1 left-0 w-0 h-0.5 bg-green-700 transition-all group-hover:w-full"})]},r))})}),n.jsx("div",{className:"flex justify-center lg:justify-end",children:n.jsx("ul",{className:"flex items-center gap-3",children:e.map((r,o)=>{const i=r.icon;return n.jsx("li",{onClick:()=>s(r.url),className:`p-2 bg-white border border-green-200 cursor-pointer rounded-md hover:bg-green-50 transition-transform hover:scale-110 ${o==0||o==3?"text-blue-600":""} ${o==1?"text-black":""} ${o==2?"text-red-600":""}`,children:n.jsx(i,{size:16})},o)})})})]}),n.jsx("div",{className:"w-full h-px bg-gradient-to-r from-transparent via-green-200 to-transparent my-8"}),n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-center gap-4 text-sm text-gray-700",children:[n.jsxs("p",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-gray-600",children:"©"}),n.jsx("span",{children:"2025 All rights reserved."})]}),n.jsxs("p",{className:"text-center sm:text-right",children:["Design by"," ",n.jsx("span",{className:"font-semibold text-gray-800 hover:text-green-700 transition-colors",children:"Himadri Karan"}),n.jsx("span",{className:"ml-1 px-2 py-1 bg-green-50 text-green-800 border border-green-300 text-xs font-medium",children:"TECB"})]})]})]})})};function Dt(t){var e,s,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e"u")return;let e=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}on(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}} `);var ge=t=>typeof t=="number"&&!isNaN(t),ne=t=>typeof t=="string",X=t=>typeof t=="function",an=t=>ne(t)||ge(t),Qe=t=>ne(t)||X(t)?t:null,cn=(t,e)=>t===!1||ge(t)&&t>0?t:e,Ge=t=>d.isValidElement(t)||ne(t)||X(t)||ge(t);function ln(t,e,s=300){let{scrollHeight:r,style:o}=t;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${s}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(e,s)})})}function dn({enter:t,exit:e,appendPosition:s=!1,collapse:r=!0,collapseDuration:o=300}){return function({children:i,position:a,preventExitTransition:l,done:c,nodeRef:f,isIn:u,playToast:m}){let y=s?`${t}--${a}`:t,x=s?`${e}--${a}`:e,C=d.useRef(0);return d.useLayoutEffect(()=>{let N=f.current,v=y.split(" "),g=h=>{h.target===f.current&&(m(),N.removeEventListener("animationend",g),N.removeEventListener("animationcancel",g),C.current===0&&h.type!=="animationcancel"&&N.classList.remove(...v))};N.classList.add(...v),N.addEventListener("animationend",g),N.addEventListener("animationcancel",g)},[]),d.useEffect(()=>{let N=f.current,v=()=>{N.removeEventListener("animationend",v),r?ln(N,c,o):c()};u||(l?v():(C.current=1,N.className+=` ${x}`,N.addEventListener("animationend",v)))},[u]),j.createElement(j.Fragment,null,i)}}function jt(t,e){return{content:qt(t.content,t.props),containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,reason:t.removalReason,status:e}}function qt(t,e,s=!1){return d.isValidElement(t)&&!ne(t.type)?d.cloneElement(t,{closeToast:e.closeToast,toastProps:e,data:e.data,isPaused:s}):X(t)?t({closeToast:e.closeToast,toastProps:e,data:e.data,isPaused:s}):t}function hn({closeToast:t,theme:e,ariaLabel:s="close"}){return j.createElement("button",{className:`Toastify__close-button Toastify__close-button--${e}`,type:"button",onClick:r=>{r.stopPropagation(),t(!0)},"aria-label":s},j.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},j.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function un({delay:t,isRunning:e,closeToast:s,type:r="default",hide:o,className:i,controlledProgress:a,progress:l,rtl:c,isIn:f,theme:u}){let m=o||a&&l===0,y={animationDuration:`${t}ms`,animationPlayState:e?"running":"paused"};a&&(y.transform=`scaleX(${l})`);let x=re("Toastify__progress-bar",a?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${u}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":c}),C=X(i)?i({rtl:c,type:r,defaultClassName:x}):re(x,i),N={[a&&l>=1?"onTransitionEnd":"onAnimationEnd"]:a&&l<1?null:()=>{f&&s()}};return j.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},j.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${u} Toastify__progress-bar--${r}`}),j.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:C,style:y,...N}))}var fn=1,zt=()=>`${fn++}`;function pn(t,e,s){let r=1,o=0,i=[],a=[],l=e,c=new Map,f=new Set,u=h=>(f.add(h),()=>f.delete(h)),m=()=>{a=Array.from(c.values()),f.forEach(h=>h())},y=({containerId:h,toastId:p,updateId:b})=>{let O=h?h!==t:t!==1,I=c.has(p)&&b==null;return O||I},x=(h,p)=>{c.forEach(b=>{var O;(p==null||p===b.props.toastId)&&((O=b.toggle)==null||O.call(b,h))})},C=h=>{var p,b;(b=(p=h.props)==null?void 0:p.onClose)==null||b.call(p,h.removalReason),h.isActive=!1},N=h=>{if(h==null)c.forEach(C);else{let p=c.get(h);p&&C(p)}m()},v=()=>{o-=i.length,i=[]},g=h=>{var p,b;let{toastId:O,updateId:I}=h.props,w=I==null;h.staleId&&c.delete(h.staleId),h.isActive=!0,c.set(O,h),m(),s(jt(h,w?"added":"updated")),w&&((b=(p=h.props).onOpen)==null||b.call(p))};return{id:t,props:l,observe:u,toggle:x,removeToast:N,toasts:c,clearQueue:v,buildToast:(h,p)=>{if(y(p))return;let{toastId:b,updateId:O,data:I,staleId:w,delay:k}=p,P=O==null;P&&o++;let B={...l,style:l.toastStyle,key:r++,...Object.fromEntries(Object.entries(p).filter(([q,Y])=>Y!=null)),toastId:b,updateId:O,data:I,isIn:!1,className:Qe(p.className||l.toastClassName),progressClassName:Qe(p.progressClassName||l.progressClassName),autoClose:p.isLoading?!1:cn(p.autoClose,l.autoClose),closeToast(q){c.get(b).removalReason=q,N(b)},deleteToast(){let q=c.get(b);if(q!=null){if(s(jt(q,"removed")),c.delete(b),o--,o<0&&(o=0),i.length>0){g(i.shift());return}m()}}};B.closeButton=l.closeButton,p.closeButton===!1||Ge(p.closeButton)?B.closeButton=p.closeButton:p.closeButton===!0&&(B.closeButton=Ge(l.closeButton)?l.closeButton:!0);let R={content:h,props:B,staleId:w};l.limit&&l.limit>0&&o>l.limit&&P?i.push(R):ge(k)?setTimeout(()=>{g(R)},k):g(R)},setProps(h){l=h},setToggle:(h,p)=>{let b=c.get(h);b&&(b.toggle=p)},isToastActive:h=>{var p;return(p=c.get(h))==null?void 0:p.isActive},getSnapshot:()=>a}}var D=new Map,me=[],Ye=new Set,mn=t=>Ye.forEach(e=>e(t)),Ft=()=>D.size>0;function gn(){me.forEach(t=>Ht(t.content,t.options)),me=[]}var yn=(t,{containerId:e})=>{var s;return(s=D.get(e||1))==null?void 0:s.toasts.get(t)};function Vt(t,e){var s;if(e)return!!((s=D.get(e))!=null&&s.isToastActive(t));let r=!1;return D.forEach(o=>{o.isToastActive(t)&&(r=!0)}),r}function xn(t){if(!Ft()){me=me.filter(e=>t!=null&&e.options.toastId!==t);return}if(t==null||an(t))D.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=D.get(t.containerId);e?e.removeToast(t.id):D.forEach(s=>{s.removeToast(t.id)})}}var bn=(t={})=>{D.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})};function Ht(t,e){Ge(t)&&(Ft()||me.push({content:t,options:e}),D.forEach(s=>{s.buildToast(t,e)}))}function vn(t){var e;(e=D.get(t.containerId||1))==null||e.setToggle(t.id,t.fn)}function Qt(t,e){D.forEach(s=>{(e==null||!(e!=null&&e.containerId)||(e==null?void 0:e.containerId)===s.id)&&s.toggle(t,e==null?void 0:e.id)})}function wn(t){let e=t.containerId||1;return{subscribe(s){let r=pn(e,t,mn);D.set(e,r);let o=r.observe(s);return gn(),()=>{o(),D.delete(e)}},setProps(s){var r;(r=D.get(e))==null||r.setProps(s)},getSnapshot(){var s;return(s=D.get(e))==null?void 0:s.getSnapshot()}}}function _n(t){return Ye.add(t),()=>{Ye.delete(t)}}function Nn(t){return t&&(ne(t.toastId)||ge(t.toastId))?t.toastId:zt()}function ye(t,e){return Ht(t,e),e.toastId}function Ae(t,e){return{...e,type:e&&e.type||t,toastId:Nn(e)}}function Oe(t){return(e,s)=>ye(e,Ae(t,s))}function S(t,e){return ye(t,Ae("default",e))}S.loading=(t,e)=>ye(t,Ae("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e}));function jn(t,{pending:e,error:s,success:r},o){let i;e&&(i=ne(e)?S.loading(e,o):S.loading(e.render,{...o,...e}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(f,u,m)=>{if(u==null){S.dismiss(i);return}let y={type:f,...a,...o,data:m},x=ne(u)?{render:u}:u;return i?S.update(i,{...y,...x}):S(x.render,{...y,...x}),m},c=X(t)?t():t;return c.then(f=>l("success",r,f)).catch(f=>l("error",s,f)),c}S.promise=jn;S.success=Oe("success");S.info=Oe("info");S.error=Oe("error");S.warning=Oe("warning");S.warn=S.warning;S.dark=(t,e)=>ye(t,Ae("default",{theme:"dark",...e}));function kn(t){xn(t)}S.dismiss=kn;S.clearWaitingQueue=bn;S.isActive=Vt;S.update=(t,e={})=>{let s=yn(t,e);if(s){let{props:r,content:o}=s,i={delay:100,...r,...e,toastId:e.toastId||t,updateId:zt()};i.toastId!==t&&(i.staleId=t);let a=i.render||o;delete i.render,ye(a,i)}};S.done=t=>{S.update(t,{progress:1})};S.onChange=_n;S.play=t=>Qt(!0,t);S.pause=t=>Qt(!1,t);function Tn(t){var e;let{subscribe:s,getSnapshot:r,setProps:o}=d.useRef(wn(t)).current;o(t);let i=(e=d.useSyncExternalStore(s,r,r))==null?void 0:e.slice();function a(l){if(!i)return[];let c=new Map;return t.newestOnTop&&i.reverse(),i.forEach(f=>{let{position:u}=f.props;c.has(u)||c.set(u,[]),c.get(u).push(f)}),Array.from(c,f=>l(f[0],f[1]))}return{getToastToRender:a,isToastActive:Vt,count:i==null?void 0:i.length}}function Cn(t){let[e,s]=d.useState(!1),[r,o]=d.useState(!1),i=d.useRef(null),a=d.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:l,pauseOnHover:c,closeToast:f,onClick:u,closeOnClick:m}=t;vn({id:t.toastId,containerId:t.containerId,fn:s}),d.useEffect(()=>{if(t.pauseOnFocusLoss)return y(),()=>{x()}},[t.pauseOnFocusLoss]);function y(){document.hasFocus()||g(),window.addEventListener("focus",v),window.addEventListener("blur",g)}function x(){window.removeEventListener("focus",v),window.removeEventListener("blur",g)}function C(w){if(t.draggable===!0||t.draggable===w.pointerType){h();let k=i.current;a.canCloseOnClick=!0,a.canDrag=!0,k.style.transition="none",t.draggableDirection==="x"?(a.start=w.clientX,a.removalDistance=k.offsetWidth*(t.draggablePercent/100)):(a.start=w.clientY,a.removalDistance=k.offsetHeight*(t.draggablePercent===80?t.draggablePercent*1.5:t.draggablePercent)/100)}}function N(w){let{top:k,bottom:P,left:B,right:R}=i.current.getBoundingClientRect();w.nativeEvent.type!=="touchend"&&t.pauseOnHover&&w.clientX>=B&&w.clientX<=R&&w.clientY>=k&&w.clientY<=P?g():v()}function v(){s(!0)}function g(){s(!1)}function h(){a.didMove=!1,document.addEventListener("pointermove",b),document.addEventListener("pointerup",O)}function p(){document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",O)}function b(w){let k=i.current;if(a.canDrag&&k){a.didMove=!0,e&&g(),t.draggableDirection==="x"?a.delta=w.clientX-a.start:a.delta=w.clientY-a.start,a.start!==w.clientX&&(a.canCloseOnClick=!1);let P=t.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`;k.style.transform=`translate3d(${P},0)`,k.style.opacity=`${1-Math.abs(a.delta/a.removalDistance)}`}}function O(){p();let w=i.current;if(a.canDrag&&a.didMove&&w){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance){o(!0),t.closeToast(!0),t.collapseAll();return}w.style.transition="transform 0.2s, opacity 0.2s",w.style.removeProperty("transform"),w.style.removeProperty("opacity")}}let I={onPointerDown:C,onPointerUp:N};return l&&c&&(I.onMouseEnter=g,t.stacked||(I.onMouseLeave=v)),m&&(I.onClick=w=>{u&&u(w),a.canCloseOnClick&&f(!0)}),{playToast:v,pauseToast:g,isRunning:e,preventExitTransition:r,toastRef:i,eventHandlers:I}}var En=typeof window<"u"?d.useLayoutEffect:d.useEffect,Ie=({theme:t,type:e,isLoading:s,...r})=>j.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${e})`,...r});function Sn(t){return j.createElement(Ie,{...t},j.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function An(t){return j.createElement(Ie,{...t},j.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function On(t){return j.createElement(Ie,{...t},j.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function In(t){return j.createElement(Ie,{...t},j.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function Ln(){return j.createElement("div",{className:"Toastify__spinner"})}var Je={info:An,warning:Sn,success:On,error:In,spinner:Ln},Rn=t=>t in Je;function Pn({theme:t,type:e,isLoading:s,icon:r}){let o=null,i={theme:t,type:e};return r===!1||(X(r)?o=r({...i,isLoading:s}):d.isValidElement(r)?o=d.cloneElement(r,i):s?o=Je.spinner():Rn(e)&&(o=Je[e](i))),o}var Bn=t=>{let{isRunning:e,preventExitTransition:s,toastRef:r,eventHandlers:o,playToast:i}=Cn(t),{closeButton:a,children:l,autoClose:c,onClick:f,type:u,hideProgressBar:m,closeToast:y,transition:x,position:C,className:N,style:v,progressClassName:g,updateId:h,role:p,progress:b,rtl:O,toastId:I,deleteToast:w,isIn:k,isLoading:P,closeOnClick:B,theme:R,ariaLabel:q}=t,Y=re("Toastify__toast",`Toastify__toast-theme--${R}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":O},{"Toastify__toast--close-on-click":B}),z=X(N)?N({rtl:O,position:C,type:u,defaultClassName:Y}):re(Y,N),F=Pn(t),K=!!b||!c,te={closeToast:y,type:u,theme:R},ce=null;return a===!1||(X(a)?ce=a(te):d.isValidElement(a)?ce=d.cloneElement(a,te):ce=hn(te)),j.createElement(x,{isIn:k,done:w,position:C,preventExitTransition:s,nodeRef:r,playToast:i},j.createElement("div",{id:I,tabIndex:0,onClick:f,"data-in":k,className:z,...o,style:v,ref:r,...k&&{role:p,"aria-label":q}},F!=null&&j.createElement("div",{className:re("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!P})},F),qt(l,t,!e),ce,!t.customProgressBar&&j.createElement(un,{...h&&!K?{key:`p-${h}`}:{},rtl:O,theme:R,delay:c,isRunning:e,isIn:k,closeToast:y,hide:m,type:u,className:g,controlledProgress:K,progress:b||0})))},Mn=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),Un=dn(Mn("bounce",!0)),Dn={position:"top-right",transition:Un,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:t=>t.altKey&&t.code==="KeyT"};function qn(t){let e={...Dn,...t},s=t.stacked,[r,o]=d.useState(!0),i=d.useRef(null),{getToastToRender:a,isToastActive:l,count:c}=Tn(e),{className:f,style:u,rtl:m,containerId:y,hotKeys:x}=e;function C(v){let g=re("Toastify__toast-container",`Toastify__toast-container--${v}`,{"Toastify__toast-container--rtl":m});return X(f)?f({position:v,rtl:m,defaultClassName:g}):re(g,Qe(f))}function N(){s&&(o(!0),S.play())}return En(()=>{var v;if(s){let g=i.current.querySelectorAll('[data-in="true"]'),h=12,p=(v=e.position)==null?void 0:v.includes("top"),b=0,O=0;Array.from(g).reverse().forEach((I,w)=>{let k=I;k.classList.add("Toastify__toast--stacked"),w>0&&(k.dataset.collapsed=`${r}`),k.dataset.pos||(k.dataset.pos=p?"top":"bot");let P=b*(r?.2:1)+(r?0:h*w);k.style.setProperty("--y",`${p?P:P*-1}px`),k.style.setProperty("--g",`${h}`),k.style.setProperty("--s",`${1-(r?O:0)}`),b+=k.offsetHeight,O+=.025})}},[r,c,s]),d.useEffect(()=>{function v(g){var h;let p=i.current;x(g)&&((h=p.querySelector('[tabIndex="0"]'))==null||h.focus(),o(!1),S.pause()),g.key==="Escape"&&(document.activeElement===p||p!=null&&p.contains(document.activeElement))&&(o(!0),S.play())}return document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v)}},[x]),j.createElement("section",{ref:i,className:"Toastify",id:y,onMouseEnter:()=>{s&&(o(!1),S.pause())},onMouseLeave:N,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":e["aria-label"]},a((v,g)=>{let h=g.length?{...u}:{...u,pointerEvents:"none"};return j.createElement("div",{tabIndex:-1,className:C(v),"data-stacked":s,style:h,key:`c-${v}`},g.map(({content:p,props:b})=>j.createElement(Bn,{...b,stacked:s,collapseAll:N,isIn:l(b.toastId,b.containerId),key:`t-${b.key}`},p)))}))}const zn=[{id:1,icon:n.jsx(ot,{className:"w-10 h-10"}),title:"Real-time Code Editing",description:"Collaboratively edit code with instant synchronization powered by WebSocket rooms and Yjs shared text.",gradient:"from-blue-500 to-cyan-400",shadowColor:"shadow-blue-500/20",hoverShadow:"hover:shadow-blue-500/40"},{id:2,icon:n.jsx(it,{className:"w-10 h-10"}),title:"Live User Presence",description:"See who created the room and who joined in real-time with dynamic user counts and active lists.",gradient:"from-purple-500 to-pink-400",shadowColor:"shadow-purple-500/20",hoverShadow:"hover:shadow-purple-500/40"},{id:3,icon:n.jsx(Bt,{className:"w-10 h-10"}),title:"In-Room Chat",description:"Exchange messages instantly while coding—integrated chat keeps collaboration focused and fast.",gradient:"from-green-500 to-emerald-400",shadowColor:"shadow-green-500/20",hoverShadow:"hover:shadow-green-500/40"},{id:4,icon:n.jsx(Ve,{className:"w-10 h-10"}),title:"AI Code Generation",description:"Generate boilerplate, helper functions, and snippets right inside the editor with one prompt.",gradient:"from-emerald-500 to-green-400",shadowColor:"shadow-emerald-500/20",hoverShadow:"hover:shadow-emerald-500/40"},{id:5,icon:n.jsx(Nr,{className:"w-10 h-10"}),title:"Language & Theme Switch",description:"Quickly change programming languages and toggle dark/light themes for a personalized workspace.",gradient:"from-indigo-500 to-blue-400",shadowColor:"shadow-indigo-500/20",hoverShadow:"hover:shadow-indigo-500/40"},{id:6,icon:n.jsx(fr,{className:"w-10 h-10"}),title:"Room Access Codes",description:"Create and join secure 6-digit rooms—simple guest fallback usernames keep access frictionless.",gradient:"from-orange-500 to-red-400",shadowColor:"shadow-orange-500/20",hoverShadow:"hover:shadow-orange-500/40"},{id:7,icon:n.jsx(rr,{className:"w-10 h-10"}),title:"Code Utilities",description:"Fast actions: copy room code, copy editor content, clear workspace, and auto file naming.",gradient:"from-slate-600 to-gray-500",shadowColor:"shadow-slate-500/20",hoverShadow:"hover:shadow-slate-500/40"},{id:8,icon:n.jsx(Or,{className:"w-10 h-10"}),title:"Session Stability",description:"Automatic reconnection handling and graceful leave/join state ensure smooth collaboration.",gradient:"from-rose-500 to-pink-400",shadowColor:"shadow-rose-500/20",hoverShadow:"hover:shadow-rose-500/40"}],Fn=({icon:t,title:e,description:s})=>n.jsxs("div",{className:"group relative bg-white border border-green-200 hover:border-green-500 p-8 transition-colors cursor-pointer",children:[n.jsx("div",{className:"relative w-16 h-16 mx-auto mb-6 bg-white border border-green-700 text-green-700 flex items-center justify-center",children:t}),n.jsxs("div",{className:"relative z-10 text-center",children:[n.jsx("h3",{className:"text-xl font-bold mb-4 text-gray-900 group-hover:text-green-800 transition-colors",children:e}),n.jsx("p",{className:"text-gray-700 leading-relaxed",children:s})]})]}),Vn=()=>n.jsxs("section",{className:"relative min-h-full bg-gradient-to-br from-green-50 via-white to-emerald-50 py-16 overflow-hidden",children:[n.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[n.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-green-400/10 blur-3xl"}),n.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-emerald-400/10 blur-3xl"})]}),n.jsxs("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-20",children:[n.jsx("div",{className:"inline-block px-4 py-2 bg-green-50 border border-green-200 mb-6",children:n.jsx("span",{className:"text-sm font-semibold text-green-700",children:"POWERFUL FEATURES"})}),n.jsxs("h2",{className:"text-5xl md:text-6xl font-bold text-gray-900 mb-6 leading-tight",children:["Built for Modern",n.jsx("br",{}),"Development"]}),n.jsx("p",{className:"text-xl text-gray-700 max-w-2xl mx-auto leading-relaxed",children:"Everything you need to build, collaborate, and deploy amazing applications with your team"})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8",children:zn.map(({id:t,icon:e,title:s,description:r})=>n.jsx(Fn,{icon:e,title:s,description:r},t))}),n.jsx("div",{className:"text-center mt-20",children:n.jsx("button",{className:"px-8 py-4 border border-green-700 text-green-800 font-semibold hover:bg-green-700 hover:text-white transition-colors",children:"Get Started Today"})})]})]}),Hn=[{id:1,icon:n.jsx(bt,{className:"w-5 h-5"}),question:"How does real-time collaboration work?",answer:"Our real-time collaboration features allow multiple developers to work on the same project simultaneously. You can see live cursors, instant code changes, and communicate through integrated chat. All changes are synchronized in real-time with conflict resolution to ensure smooth teamwork.",category:"Collaboration"},{id:2,icon:n.jsx(vt,{className:"w-5 h-5"}),question:"Is my code and data secure?",answer:"Absolutely! We use enterprise-grade encryption for all data in transit and at rest. Your code is stored in secure, geo-distributed data centers with automatic backups. We're SOC 2 compliant and follow industry best practices for security and privacy.",category:"Security"},{id:3,icon:n.jsx(He,{className:"w-5 h-5"}),question:"What programming languages and frameworks are supported?",answer:"We support all major programming languages including JavaScript, Python, Java, C++, Go, Rust, and more. Popular frameworks like React, Vue, Angular, Django, Flask, Spring Boot, and Node.js are fully supported with intelligent code completion and debugging.",category:"Development"},{id:4,icon:n.jsx(lr,{className:"w-5 h-5"}),question:"Can I import existing projects?",answer:"Yes! You can easily import projects from GitHub, GitLab, Bitbucket, or upload files directly. Our platform automatically detects project structure, dependencies, and sets up the appropriate development environment for you.",category:"Getting Started"},{id:5,icon:n.jsx(tr,{className:"w-5 h-5"}),question:"What are the pricing plans?",answer:"We offer flexible pricing starting with a free tier for individual developers. Pro plans start at $10/month with advanced features, unlimited private projects, and priority support. Enterprise plans include custom integrations and dedicated support.",category:"Pricing"},{id:6,icon:n.jsx(bt,{className:"w-5 h-5"}),question:"How do I deploy my applications?",answer:"Deployment is as simple as clicking a button! We integrate with major cloud providers like AWS, Google Cloud, and Azure. You can set up automated CI/CD pipelines, custom domains, and environment variables with just a few clicks.",category:"Deployment"},{id:7,icon:n.jsx(vt,{className:"w-5 h-5"}),question:"Do you offer customer support?",answer:"Yes! We provide 24/7 support through multiple channels including live chat, email, and community forums. Pro and Enterprise users get priority support with dedicated account managers and faster response times.",category:"Support"},{id:8,icon:n.jsx(He,{className:"w-5 h-5"}),question:"Can I work offline?",answer:"While our platform is cloud-based, we offer offline capabilities for premium users. You can sync your work locally, continue coding without internet, and sync changes once you're back online. All your work is automatically backed up.",category:"Features"}],Qn=({faq:t,isOpen:e,onToggle:s})=>n.jsxs("div",{className:"group bg-white border border-green-200 transition-colors overflow-hidden",children:[n.jsxs("button",{onClick:s,className:"w-full p-6 text-left flex items-center justify-between focus:outline-none focus:ring-2 focus:ring-green-500/20",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-10 h-10 bg-white border border-green-600 text-green-700 flex items-center justify-center",children:t.icon}),n.jsx("div",{children:n.jsx("h3",{className:"text-lg font-semibold text-gray-900 group-hover:text-green-700 transition-colors",children:t.question})})]}),n.jsx(Pt,{className:`w-5 h-5 text-green-700 transition-transform ${e?"rotate-180":""}`})]}),n.jsx("div",{className:`overflow-hidden transition-all ${e?"max-h-96 opacity-100":"max-h-0 opacity-0"}`,children:n.jsx("div",{className:"px-6 pb-6",children:n.jsx("div",{className:"pl-14",children:n.jsx("p",{className:"text-gray-700 leading-relaxed",children:t.answer})})})})]}),Gn=()=>{const[t,e]=d.useState(new Set([1])),s=o=>{const i=new Set(t);i.has(o)?i.delete(o):i.add(o),e(i)},r=Hn;return n.jsxs("section",{className:"relative min-h-full bg-gradient-to-br from-green-50 via-white to-emerald-50 py-16 overflow-hidden",children:[n.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[n.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-green-400/10 blur-3xl"}),n.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-emerald-400/10 blur-3xl"})]}),n.jsxs("div",{className:"relative max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("div",{className:"inline-block px-4 py-2 bg-green-50 border border-green-200 mb-6",children:n.jsx("span",{className:"text-sm font-semibold text-green-700",children:"FREQUENTLY ASKED QUESTIONS"})}),n.jsxs("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 mb-6 leading-tight",children:["Got Questions?",n.jsx("br",{}),"We've Got Answers"]}),n.jsx("p",{className:"text-xl text-gray-700 max-w-2xl mx-auto leading-relaxed",children:"Find answers to the most common questions about our development platform"})]}),n.jsx("div",{className:"space-y-4",children:r.map(o=>n.jsx(Qn,{faq:o,isOpen:t.has(o.id),onToggle:()=>s(o.id)},o.id))}),n.jsxs("div",{className:"text-center mt-16 p-8 bg-green-50 border border-green-200",children:[n.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Still have questions?"}),n.jsx("p",{className:"text-gray-700 mb-6",children:"Our support team is here to help you get started"}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[n.jsx("button",{className:"px-6 py-3 bg-green-700 text-white font-semibold border border-green-700 hover:bg-white hover:text-green-800 transition-colors",children:"Contact Support"}),n.jsx("button",{className:"px-6 py-3 bg-white text-green-800 font-semibold border border-green-300 hover:bg-green-50 transition-colors",children:"View Documentation"})]})]})]})]})},Yn=[{id:1,icon:n.jsx(mr,{className:"w-6 h-6"}),title:"Email Us",description:"Get in touch via email",contact:"support@codelive.apps24.tech",action:"Send Email"},{id:2,icon:n.jsx(kr,{className:"w-6 h-6"}),title:"Call Us",description:"Speak with our team",contact:"+91 9547717585",action:"Call Now"},{id:3,icon:n.jsx(Bt,{className:"w-6 h-6"}),title:"Live Chat",description:"Chat with support",contact:"Available 24/7",action:"Start Chat"},{id:4,icon:n.jsx(yr,{className:"w-6 h-6"}),title:"Visit Us",description:"Our headquarters",contact:"Salt Lake - Kolkata, WB, India",action:"Get Directions"}],Jn=[{icon:n.jsx(or,{className:"w-5 h-5"}),title:"24/7 Support",description:"Round-the-clock assistance"},{icon:n.jsx(it,{className:"w-5 h-5"}),title:"Expert Team",description:"Experienced developers"},{icon:n.jsx(He,{className:"w-5 h-5"}),title:"Quick Response",description:"Average 2-hour response time"}],Wn=({method:t})=>n.jsxs("div",{className:"group bg-white border border-green-200 p-6 transition-colors",children:[n.jsx("div",{className:"w-14 h-14 rounded-xl bg-white p-3 mb-4 group-hover:scale-110 transition-transform duration-300",children:n.jsx("div",{className:"text-green-700 border border-green-600 p-2 w-full h-full flex items-center justify-center",children:t.icon})}),n.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:t.title}),n.jsx("p",{className:"text-gray-700 mb-2",children:t.description}),n.jsx("p",{className:"text-green-800 font-medium mb-4",children:t.contact}),n.jsx("button",{className:"w-full py-2 px-4 border border-green-700 text-green-800 text-sm font-medium hover:bg-green-700 hover:text-white transition-colors",children:t.action})]}),Kn=()=>{const[t,e]=d.useState({name:"",email:"",subject:"",message:"",inquiryType:"general"}),[s,r]=d.useState(!1),o=a=>{e({...t,[a.target.name]:a.target.value})},i=async a=>{a.preventDefault(),r(!0),await new Promise(l=>setTimeout(l,2e3)),e({name:"",email:"",subject:"",message:"",inquiryType:"general"}),r(!1),alert("Message sent successfully! We'll get back to you soon.")};return n.jsxs("div",{className:"bg-white border border-green-200 p-8",children:[n.jsxs("div",{className:"mb-4",children:[n.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Send us a Message"}),n.jsx("p",{className:"text-gray-600",children:"Fill out the form below and we'll get back to you within 24 hours"})]}),n.jsxs("form",{onSubmit:i,className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Full Name *"}),n.jsx("input",{type:"text",name:"name",value:t.name,onChange:o,required:!0,className:"w-full px-4 py-2 bg-white border border-green-300 text-sm focus:outline-none focus:border-green-600",placeholder:"John Doe"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email Address *"}),n.jsx("input",{type:"email",name:"email",value:t.email,onChange:o,required:!0,className:"w-full px-4 py-2 bg-white border border-green-300 text-sm focus:outline-none focus:border-green-600",placeholder:"john@example.com"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Inquiry Type"}),n.jsxs("select",{name:"inquiryType",value:t.inquiryType,onChange:o,className:"w-full px-4 py-2 bg-white border border-green-300 text-sm focus:outline-none focus:border-green-600",children:[n.jsx("option",{value:"general",children:"General Inquiry"}),n.jsx("option",{value:"sales",children:"Sales"}),n.jsx("option",{value:"support",children:"Technical Support"}),n.jsx("option",{value:"partnership",children:"Partnership"}),n.jsx("option",{value:"feedback",children:"Feedback"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Subject *"}),n.jsx("input",{type:"text",name:"subject",value:t.subject,onChange:o,required:!0,className:"w-full px-4 py-2 bg-white border border-green-300 text-sm focus:outline-none focus:border-green-600",placeholder:"How can we help you?"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Message *"}),n.jsx("textarea",{name:"message",value:t.message,onChange:o,required:!0,rows:5,className:"w-full px-4 py-2 bg-white border border-green-300 text-sm focus:outline-none focus:border-green-600 resize-none",placeholder:"Tell us more about your inquiry..."})]}),n.jsx("button",{type:"submit",disabled:s,className:"w-full border border-green-700 text-green-800 font-medium py-3 px-6 text-sm hover:bg-green-700 hover:text-white transition-colors flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed",children:s?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Sending..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Sr,{className:"w-5 h-5"}),"Send Message"]})})]})]})},Xn=()=>n.jsxs("section",{className:"relative min-h-full bg-gradient-to-br from-green-50 via-white to-emerald-50 py-16 overflow-hidden",children:[n.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[n.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-green-400/10 blur-3xl"}),n.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-emerald-400/10 blur-3xl"})]}),n.jsxs("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("div",{className:"inline-block px-4 py-2 bg-green-50 border border-green-200 mb-6",children:n.jsx("span",{className:"text-sm font-semibold text-green-800",children:"GET IN TOUCH"})}),n.jsxs("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 mb-6 leading-tight",children:["Let's Start a",n.jsx("br",{}),"Conversation"]}),n.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto leading-relaxed",children:"Have questions about our platform? Need technical support? Or want to discuss a partnership? We're here to help."})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-16",children:Jn.map((t,e)=>n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"w-12 h-12 bg-white border border-green-700 text-green-700 flex items-center justify-center mx-auto mb-3",children:t.icon}),n.jsx("h3",{className:"font-medium text-gray-900 mb-1",children:t.title}),n.jsx("p",{className:"text-gray-700 text-xs",children:t.description})]},e))}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-8",children:"Choose Your Preferred Way to Connect"}),n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:Yn.map(t=>n.jsx(Wn,{method:t},t.id))})]}),n.jsx("div",{children:n.jsx(Kn,{})})]}),n.jsxs("div",{className:"mt-20 text-center p-8 bg-green-50 border border-green-200",children:[n.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Join Our Developer Community"}),n.jsx("p",{className:"text-gray-700 mb-6",children:"Connect with thousands of developers, share knowledge, and get help from our community"}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[n.jsx("button",{className:"px-6 py-3 border border-green-700 text-green-800 font-medium hover:bg-green-700 hover:text-white transition-colors",children:"Join Discord"}),n.jsx("button",{className:"px-6 py-3 bg-white text-green-800 font-medium border border-green-300 hover:bg-green-50 transition-colors",children:"Browse Forum"})]})]})]})]});class ue extends Error{}ue.prototype.name="InvalidTokenError";function Zn(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,s)=>{let r=s.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function $n(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Zn(e)}catch{return atob(e)}}function eo(t,e){if(typeof t!="string")throw new ue("Invalid token specified: must be a string");e||(e={});const s=e.header===!0?0:1,r=t.split(".")[s];if(typeof r!="string")throw new ue(`Invalid token specified: missing part #${s+1}`);let o;try{o=$n(r)}catch(i){throw new ue(`Invalid token specified: invalid base64 for part #${s+1} (${i.message})`)}try{return JSON.parse(o)}catch(i){throw new ue(`Invalid token specified: invalid json for part #${s+1} (${i.message})`)}}function to(t={}){const{nonce:e,onScriptLoadSuccess:s,onScriptLoadError:r}=t,[o,i]=d.useState(!1),a=d.useRef(s);a.current=s;const l=d.useRef(r);return l.current=r,d.useEffect(()=>{const c=document.createElement("script");return c.src="proxy.php?url=https%3A%2F%2Faccounts.google.com%2Fgsi%2Fclient",c.async=!0,c.defer=!0,c.nonce=e,c.onload=()=>{var f;i(!0),(f=a.current)===null||f===void 0||f.call(a)},c.onerror=()=>{var f;i(!1),(f=l.current)===null||f===void 0||f.call(l)},document.body.appendChild(c),()=>{document.body.removeChild(c)}},[e]),o}const Gt=d.createContext(null);function so({clientId:t,nonce:e,onScriptLoadSuccess:s,onScriptLoadError:r,children:o}){const i=to({nonce:e,onScriptLoadSuccess:s,onScriptLoadError:r}),a=d.useMemo(()=>({clientId:t,scriptLoadedSuccessfully:i}),[t,i]);return j.createElement(Gt.Provider,{value:a},o)}function ro(){const t=d.useContext(Gt);if(!t)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return t}function no(t){var e;return(e=t==null?void 0:t.clientId)!==null&&e!==void 0?e:t==null?void 0:t.client_id}const oo={large:40,medium:32,small:20};function io({onSuccess:t,onError:e,useOneTap:s,promptMomentNotification:r,type:o="standard",theme:i="outline",size:a="large",text:l,shape:c,logo_alignment:f,width:u,locale:m,click_listener:y,containerProps:x,...C}){const N=d.useRef(null),{clientId:v,scriptLoadedSuccessfully:g}=ro(),h=d.useRef(t);h.current=t;const p=d.useRef(e);p.current=e;const b=d.useRef(r);return b.current=r,d.useEffect(()=>{var O,I,w,k,P,B,R,q,Y;if(g)return(w=(I=(O=window==null?void 0:window.google)===null||O===void 0?void 0:O.accounts)===null||I===void 0?void 0:I.id)===null||w===void 0||w.initialize({client_id:v,callback:z=>{var F;if(!(z!=null&&z.credential))return(F=p.current)===null||F===void 0?void 0:F.call(p);const{credential:K,select_by:te}=z;h.current({credential:K,clientId:no(z),select_by:te})},...C}),(B=(P=(k=window==null?void 0:window.google)===null||k===void 0?void 0:k.accounts)===null||P===void 0?void 0:P.id)===null||B===void 0||B.renderButton(N.current,{type:o,theme:i,size:a,text:l,shape:c,logo_alignment:f,width:u,locale:m,click_listener:y}),s&&((Y=(q=(R=window==null?void 0:window.google)===null||R===void 0?void 0:R.accounts)===null||q===void 0?void 0:q.id)===null||Y===void 0||Y.prompt(b.current)),()=>{var z,F,K;s&&((K=(F=(z=window==null?void 0:window.google)===null||z===void 0?void 0:z.accounts)===null||F===void 0?void 0:F.id)===null||K===void 0||K.cancel())}},[v,g,s,o,i,a,l,c,f,u,m]),j.createElement("div",{...x,ref:N,style:{height:oo[a],...x==null?void 0:x.style}})}const Yt=()=>{const{setSignupState:t,setLoginState:e,saveUser:s}=d.useContext(ee),r=i=>{if(!i||!i.credential){S.error("Login failed. Invalid credentials.");return}try{const a=eo(i.credential);s({username:a.name,email:a.email,password:""}),e(!1),t(!1)}catch(a){S.error("Error decoding token.",a.message)}},o=()=>{S.error("Login failed.")};return n.jsxs("div",{children:[n.jsx(io,{onSuccess:r,onError:o}),n.jsx("div",{className:"flex flex-col items-center justify-center",children:n.jsx("p",{className:"my-3 font-medium text-gray-500",children:"OR"})})]})},ao=()=>{const{setSignupState:t,saveUser:e}=d.useContext(ee),[s,r]=d.useState({username:"",email:"",password:""}),o=a=>{const{name:l,value:c}=a.target;r(f=>({...f,[l]:c}))},i=a=>{a.preventDefault(),e(s),t(!1)};return n.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-black/50 z-50",children:n.jsxs("div",{className:"bg-white p-6 border border-green-200 w-96 max-w-[90%] animate-fadeIn relative z-50",children:[n.jsx("h2",{className:"text-xl font-semibold mb-4 text-center text-gray-900",children:"Sign Up"}),n.jsx(Yt,{}),n.jsxs("form",{onSubmit:i,className:"mt-4 space-y-3",children:[n.jsx("input",{type:"text",name:"username",placeholder:"Username",value:s.username,onChange:o,className:"w-full px-4 py-2 bg-white border border-green-300 text-sm focus:outline-none focus:border-green-600",required:!0}),n.jsx("input",{type:"email",name:"email",placeholder:"Email",value:s.email,onChange:o,className:"w-full px-4 py-2 bg-white border border-green-300 text-sm focus:outline-none focus:border-green-600",required:!0}),n.jsx("input",{type:"password",name:"password",placeholder:"Password",value:s.password,onChange:o,className:"w-full px-4 py-2 bg-white border border-green-300 text-sm focus:outline-none focus:border-green-600",required:!0}),n.jsx("button",{type:"submit",className:"w-full border border-green-700 text-green-800 py-3 text-sm font-medium hover:bg-green-700 hover:text-white transition-colors cursor-pointer",children:"Sign Up"})]}),n.jsx("button",{onClick:()=>t(!1),className:"mt-3 border border-green-300 py-3 w-full text-gray-700 hover:text-green-700 transition-colors cursor-pointer text-sm",children:"Cancel"})]})})},co=()=>{const{setLoginState:t}=d.useContext(ee),[e,s]=d.useState({email:"",password:""}),r=i=>{s({...e,[i.target.name]:i.target.value})},o=i=>{i.preventDefault(),console.log("Login Data:",e),t(!1)};return n.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-black/50 z-50",children:n.jsxs("div",{className:"bg-white p-6 border border-green-200 w-96 max-w-[90%] animate-fadeIn relative z-50",children:[n.jsx("h2",{className:"text-xl font-semibold mb-4 text-center text-gray-900",children:"Login"}),n.jsx(Yt,{}),n.jsxs("form",{onSubmit:o,className:"mt-4 space-y-3",children:[n.jsx("input",{type:"email",name:"email",placeholder:"Email",value:e.email,onChange:r,className:"w-full px-4 py-2 bg-white border border-green-300 text-sm focus:outline-none focus:border-green-600",required:!0}),n.jsx("input",{type:"password",name:"password",placeholder:"Password",value:e.password,onChange:r,className:"w-full px-4 py-2 bg-white border border-green-300 text-sm focus:outline-none focus:border-green-600",required:!0}),n.jsx("button",{type:"submit",className:"w-full border border-green-700 text-green-800 py-3 text-sm font-medium hover:bg-green-700 hover:text-white transition-colors",children:"Login"})]}),n.jsx("button",{onClick:()=>t(!1),className:"mt-3 w-full text-gray-700 hover:text-green-700 transition-colors text-sm",children:"Cancel"})]})})},lo=()=>{const{signupState:t,loginState:e}=d.useContext(ee);return n.jsx("section",{className:"min-h-full",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-4",children:[t&&!e&&n.jsx(ao,{}),e&&!t&&n.jsx(co,{})]})})},ho=d.lazy(()=>_s(()=>import("./CodeSpace-LkNTr6Yb.js"),__vite__mapDeps([0,1,2,3,4]))),uo=()=>{const{getUserDetails:t}=d.useContext(ee),[e,s]=d.useState(!1);return d.useEffect(()=>{t()},[]),d.useEffect(()=>{fetch("https://codelive-758504.onrender.com/api/ping").then(o=>{o.ok||s(!0)}).catch(()=>s(!0))},[]),n.jsxs("div",{className:"min-h-screen flex flex-col",children:[e&&n.jsx("div",{className:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm flex items-center justify-center p-4",children:n.jsxs("div",{className:"relative bg-green-100 border border-green-300 text-green-900 px-6 py-6 rounded-md shadow max-w-lg w-full text-center",children:[n.jsx("button",{className:"absolute top-3 right-3 text-yellow-900 hover:text-yellow-600 transition","aria-label":"Close server down warning",onClick:()=>s(!1),children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),n.jsxs("div",{className:"flex items-center justify-center mb-4",children:[n.jsx(Mr,{className:"w-8 h-8 text-green-800 mr-2"}),n.jsx("h2",{className:"text-xl font-semibold",children:"Server is Down"})]}),n.jsx("p",{className:"text-sm sm:text-base mb-4",children:"Oops! Some features may not work right now. This happens when the backend server is sleeping or under maintenance. Please try again later or check the GitHub Profile."}),n.jsxs("div",{className:"flex gap-4 justify-center",children:[n.jsx("a",{href:"https://github.com/karanhimadri/Codellive----Real_Time_Code-Sharing_Platform.git",target:"_blank",rel:"noopener noreferrer",className:"cursor-pointer inline-block bg-green-50 hover:bg-green-100 text-green-900 px-5 py-2 border border-green-500 text-sm font-medium transition-colors",children:"GitHub"}),n.jsx("button",{onClick:()=>{s(!1),window.location.href="proxy.php?url=https%3A%2F%2Fcodelive.apps24.tech%2Fcontact"},className:"inline-block bg-green-50 hover:bg-green-100 text-green-900 px-5 py-2 border border-green-500 text-sm font-medium transition-colors",children:"Contact"})]})]})}),n.jsx(Vr,{}),n.jsx(lo,{}),n.jsx("main",{className:"flex-1 pt-16 lg:pt-20",children:n.jsx(d.Suspense,{fallback:n.jsx("div",{className:"flex items-center justify-center min-h-[60vh] bg-gray-900",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"inline-block h-12 w-12 animate-spin rounded-full border-4 border-solid border-blue-500 border-r-transparent"}),n.jsx("p",{className:"mt-4 text-white text-lg",children:"Loading Code Editor..."})]})}),children:n.jsxs(bs,{children:[n.jsx(le,{path:"/",element:n.jsx(Gr,{})}),n.jsx(le,{path:"/code-space",element:n.jsx(ho,{})}),n.jsx(le,{path:"/features",element:n.jsx(Vn,{})}),n.jsx(le,{path:"/faqs",element:n.jsx(Gn,{})}),n.jsx(le,{path:"/contact",element:n.jsx(Xn,{})})]})})}),n.jsx(nn,{}),n.jsx(qn,{autoClose:2500,toastClassName:"flex items-center space-x-2 px-4 py-2",bodyClassName:"flex items-center"})]})},W=Object.create(null);W.open="0";W.close="1";W.ping="2";W.pong="3";W.message="4";W.upgrade="5";W.noop="6";const Ne=Object.create(null);Object.keys(W).forEach(t=>{Ne[W[t]]=t});const We={type:"error",data:"parser error"},Jt=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Wt=typeof ArrayBuffer=="function",Kt=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,at=({type:t,data:e},s,r)=>Jt&&e instanceof Blob?s?r(e):kt(e,r):Wt&&(e instanceof ArrayBuffer||Kt(e))?s?r(e):kt(new Blob([e]),r):r(W[t]+(e||"")),kt=(t,e)=>{const s=new FileReader;return s.onload=function(){const r=s.result.split(",")[1];e("b"+(r||""))},s.readAsDataURL(t)};function Tt(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Ue;function fo(t,e){if(Jt&&t.data instanceof Blob)return t.data.arrayBuffer().then(Tt).then(e);if(Wt&&(t.data instanceof ArrayBuffer||Kt(t.data)))return e(Tt(t.data));at(t,!1,s=>{Ue||(Ue=new TextEncoder),e(Ue.encode(s))})}const Ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,s=t.length,r,o=0,i,a,l,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const f=new ArrayBuffer(e),u=new Uint8Array(f);for(r=0;r>4,u[o++]=(a&15)<<4|l>>2,u[o++]=(l&3)<<6|c&63;return f},mo=typeof ArrayBuffer=="function",ct=(t,e)=>{if(typeof t!="string")return{type:"message",data:Xt(t,e)};const s=t.charAt(0);return s==="b"?{type:"message",data:go(t.substring(1),e)}:Ne[s]?t.length>1?{type:Ne[s],data:t.substring(1)}:{type:Ne[s]}:We},go=(t,e)=>{if(mo){const s=po(t);return Xt(s,e)}else return{base64:!0,data:t}},Xt=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},Zt="",yo=(t,e)=>{const s=t.length,r=new Array(s);let o=0;t.forEach((i,a)=>{at(i,!1,l=>{r[a]=l,++o===s&&e(r.join(Zt))})})},xo=(t,e)=>{const s=t.split(Zt),r=[];for(let o=0;o{const r=s.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const i=new DataView(o.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{o=new Uint8Array(9);const i=new DataView(o.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(s)})}})}let De;function we(t){return t.reduce((e,s)=>e+s.length,0)}function _e(t,e){if(t[0].length===e)return t.shift();const s=new Uint8Array(e);let r=0;for(let o=0;oMath.pow(2,21)-1){l.enqueue(We);break}o=u*Math.pow(2,32)+f.getUint32(4),r=3}else{if(we(s)t){l.enqueue(We);break}}}})}const $t=4;function L(t){if(t)return wo(t)}function wo(t){for(var e in L.prototype)t[e]=L.prototype[e];return t}L.prototype.on=L.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};L.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this};L.prototype.off=L.prototype.removeListener=L.prototype.removeAllListeners=L.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+t];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,o=0;oPromise.resolve().then(e):(e,s)=>s(e,0),H=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),_o="arraybuffer";function es(t,...e){return e.reduce((s,r)=>(t.hasOwnProperty(r)&&(s[r]=t[r]),s),{})}const No=H.setTimeout,jo=H.clearTimeout;function Re(t,e){e.useNativeTimers?(t.setTimeoutFn=No.bind(H),t.clearTimeoutFn=jo.bind(H)):(t.setTimeoutFn=H.setTimeout.bind(H),t.clearTimeoutFn=H.clearTimeout.bind(H))}const ko=1.33;function To(t){return typeof t=="string"?Co(t):Math.ceil((t.byteLength||t.size)*ko)}function Co(t){let e=0,s=0;for(let r=0,o=t.length;r=57344?s+=3:(r++,s+=4);return s}function ts(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Eo(t){let e="";for(let s in t)t.hasOwnProperty(s)&&(e.length&&(e+="&"),e+=encodeURIComponent(s)+"="+encodeURIComponent(t[s]));return e}function So(t){let e={},s=t.split("&");for(let r=0,o=s.length;r{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||s()})),this.writable||(r++,this.once("drain",function(){--r||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const s=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};xo(e,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,yo(e,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=ts()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(e,s)}}let ss=!1;try{ss=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Io=ss;function Lo(){}class Ro extends Oo{constructor(e){if(super(e),typeof location<"u"){const s=location.protocol==="https:";let r=location.port;r||(r=s?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,s){const r=this.request({method:"POST",data:e});r.on("success",s),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(s,r)=>{this.onError("xhr poll error",s,r)}),this.pollXhr=e}}class J extends L{constructor(e,s,r){super(),this.createRequest=e,Re(this,r),this._opts=r,this._method=r.method||"GET",this._uri=s,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;const s=es(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(s);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=J.requestsCount++,J.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Lo,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete J.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}J.requestsCount=0;J.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Et);else if(typeof addEventListener=="function"){const t="onpagehide"in H?"pagehide":"unload";addEventListener(t,Et,!1)}}function Et(){for(let t in J.requests)J.requests.hasOwnProperty(t)&&J.requests[t].abort()}const Po=function(){const t=rs({xdomain:!1});return t&&t.responseType!==null}();class Bo extends Ro{constructor(e){super(e);const s=e&&e.forceBase64;this.supportsBinary=Po&&!s}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new J(rs,this.uri(),e)}}function rs(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Io))return new XMLHttpRequest}catch{}if(!e)try{return new H[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ns=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Mo extends lt{get name(){return"websocket"}doOpen(){const e=this.uri(),s=this.opts.protocols,r=ns?{}:es(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,s,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let s=0;s{try{this.doWrite(r,i)}catch{}o&&Le(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=ts()),this.supportsBinary||(s.b64=1),this.createUri(e,s)}}const qe=H.WebSocket||H.MozWebSocket;class Uo extends Mo{createSocket(e,s,r){return ns?new qe(e,s,r):s?new qe(e,s):new qe(e)}doWrite(e,s){this.ws.send(s)}}class Do extends lt{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const s=vo(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(s).getReader(),o=bo();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();const i=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),i())}).catch(l=>{})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let s=0;s{o&&Le(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const qo={websocket:Uo,webtransport:Do,polling:Bo},zo=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Fo=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ke(t){if(t.length>8e3)throw"URI too long";const e=t,s=t.indexOf("["),r=t.indexOf("]");s!=-1&&r!=-1&&(t=t.substring(0,s)+t.substring(s,r).replace(/:/g,";")+t.substring(r,t.length));let o=zo.exec(t||""),i={},a=14;for(;a--;)i[Fo[a]]=o[a]||"";return s!=-1&&r!=-1&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Vo(i,i.path),i.queryKey=Ho(i,i.query),i}function Vo(t,e){const s=/\/{2,9}/g,r=e.replace(s,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Ho(t,e){const s={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(s[o]=i)}),s}const Xe=typeof addEventListener=="function"&&typeof removeEventListener=="function",je=[];Xe&&addEventListener("offline",()=>{je.forEach(t=>t())},!1);class $ extends L{constructor(e,s){if(super(),this.binaryType=_o,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(s=e,e=null),e){const r=Ke(e);s.hostname=r.host,s.secure=r.protocol==="https"||r.protocol==="wss",s.port=r.port,r.query&&(s.query=r.query)}else s.host&&(s.hostname=Ke(s.host).host);Re(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=So(this.opts.query)),Xe&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},je.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const s=Object.assign({},this.opts.query);s.EIO=$t,s.transport=e,this.id&&(s.sid=this.id);const r=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&$.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(e);s.open(),this.setTransport(s)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",$.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=e.data,this._onError(s);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let r=0;r0&&s>this._maxPayload)return this.writeBuffer.slice(0,r);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Le(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,s,r){return this._sendPacket("message",e,s,r),this}send(e,s,r){return this._sendPacket("message",e,s,r),this}_sendPacket(e,s,r,o){if(typeof s=="function"&&(o=s,s=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:e,data:s,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),e()},r=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if($.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Xe&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=je.indexOf(this._offlineEventListener);r!==-1&&je.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,s),this.writeBuffer=[],this._prevBufferLen=0}}}$.protocol=$t;class Qo extends ${constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{r||(s.send([{type:"ping",data:"probe"}]),s.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;$.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=s.name,this.emitReserved("upgradeError",y)}}))};function i(){r||(r=!0,u(),s.close(),s=null)}const a=m=>{const y=new Error("probe error: "+m);y.transport=s.name,i(),this.emitReserved("upgradeError",y)};function l(){a("transport closed")}function c(){a("socket closed")}function f(m){s&&m.name!==s.name&&i()}const u=()=>{s.removeListener("open",o),s.removeListener("error",a),s.removeListener("close",l),this.off("close",c),this.off("upgrading",f)};s.once("open",o),s.once("error",a),s.once("close",l),this.once("close",c),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||s.open()},200):s.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const s=[];for(let r=0;rqo[o]).filter(o=>!!o)),super(e,r)}};function Yo(t,e="",s){let r=t;s=s||typeof location<"u"&&location,t==null&&(t=s.protocol+"//"+s.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=s.protocol+t:t=s.host+t),/^(https?|wss?):\/\//.test(t)||(typeof s<"u"?t=s.protocol+"//"+t:t="https://"+t),r=Ke(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+e,r.href=r.protocol+"://"+i+(s&&s.port===r.port?"":":"+r.port),r}const Jo=typeof ArrayBuffer=="function",Wo=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,os=Object.prototype.toString,Ko=typeof Blob=="function"||typeof Blob<"u"&&os.call(Blob)==="[object BlobConstructor]",Xo=typeof File=="function"||typeof File<"u"&&os.call(File)==="[object FileConstructor]";function dt(t){return Jo&&(t instanceof ArrayBuffer||Wo(t))||Ko&&t instanceof Blob||Xo&&t instanceof File}function ke(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let s=0,r=t.length;s=0&&t.num{delete this.acks[e];for(let l=0;l{this.io.clearTimeoutFn(i),s.apply(this,l)};a.withError=!0,this.acks[e]=a}emitWithAck(e,...s){return new Promise((r,o)=>{const i=(a,l)=>a?o(a):r(l);i.withError=!0,s.push(i),this.emit(e,...s)})}_addToQueue(e){let s;typeof e[e.length-1]=="function"&&(s=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(o)):(this._queue.shift(),s&&s(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!e||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:_.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case _.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case _.EVENT:case _.BINARY_EVENT:this.onevent(e);break;case _.ACK:case _.BINARY_ACK:this.onack(e);break;case _.DISCONNECT:this.ondisconnect();break;case _.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const s=e.data||[];e.id!=null&&s.push(this.ack(e.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const r of s)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const s=this;let r=!1;return function(...o){r||(r=!0,s.packet({type:_.ACK,id:e,data:o}))}}onack(e){const s=this.acks[e.id];typeof s=="function"&&(delete this.acks[e.id],s.withError&&e.data.unshift(null),s.apply(this,e.data))}onconnect(e,s){this.id=e,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:_.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const s=this._anyListeners;for(let r=0;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}ae.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),s=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-s:t+s}return Math.min(t,this.max)|0};ae.prototype.reset=function(){this.attempts=0};ae.prototype.setMin=function(t){this.ms=t};ae.prototype.setMax=function(t){this.max=t};ae.prototype.setJitter=function(t){this.jitter=t};class et extends L{constructor(e,s){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(s=e,e=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Re(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((r=s.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ae({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=e;const o=s.parser||ni;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var s;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(s=this.backoff)===null||s===void 0||s.setMin(e),this)}randomizationFactor(e){var s;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(s=this.backoff)===null||s===void 0||s.setJitter(e),this)}reconnectionDelayMax(e){var s;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(s=this.backoff)===null||s===void 0||s.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Go(this.uri,this.opts);const s=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=G(s,"open",function(){r.onopen(),e&&e()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),e?e(l):this.maybeReconnectOnOpen()},a=G(s,"error",i);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{o(),i(new Error("timeout")),s.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(G(e,"ping",this.onping.bind(this)),G(e,"data",this.ondata.bind(this)),G(e,"error",this.onerror.bind(this)),G(e,"close",this.onclose.bind(this)),G(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(s){this.onclose("parse error",s)}}ondecoded(e){Le(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,s){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new is(this,e,s),this.nsps[e]=r),r}_destroy(e){const s=Object.keys(this.nsps);for(const r of s)if(this.nsps[r].active)return;this._close()}_packet(e){const s=this.encoder.encode(e);for(let r=0;re()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,s){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},s);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const he={};function Te(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const s=Yo(t,e.path||"/socket.io"),r=s.source,o=s.id,i=s.path,a=he[o]&&i in he[o].nsps,l=e.forceNew||e["force new connection"]||e.multiplex===!1||a;let c;return l?c=new et(r,e):(he[o]||(he[o]=new et(r,e)),c=he[o]),s.query&&!e.query&&(e.query=s.queryKey),c.socket(s.path,e)}Object.assign(Te,{Manager:et,Socket:is,io:Te,connect:Te});const as=new Map;class ii{constructor(e){this.room=e,this.onmessage=null,this._onChange=s=>s.key===e&&this.onmessage!==null&&this.onmessage({data:ks(s.newValue||"")}),Ts(this._onChange)}postMessage(e){Cs.setItem(this.room,Es(As(e)))}close(){Ss(this._onChange)}}const ai=typeof BroadcastChannel>"u"?ii:BroadcastChannel,ut=t=>Ns(as,t,()=>{const e=js(),s=new ai(t);return s.onmessage=r=>e.forEach(o=>o(r.data,"broadcastchannel")),{bc:s,subs:e}}),ci=(t,e)=>(ut(t).subs.add(e),e),li=(t,e)=>{const s=ut(t),r=s.subs.delete(e);return r&&s.subs.size===0&&(s.bc.close(),as.delete(t)),r},oe=(t,e,s=null)=>{const r=ut(t);r.bc.postMessage(e),r.subs.forEach(o=>o(e,s))},cs=0,ft=1,ls=2,tt=(t,e)=>{U(t,cs);const s=Os(e);Z(t,s)},ds=(t,e,s)=>{U(t,ft),Z(t,Is(e,s))},di=(t,e,s)=>ds(e,s,nt(t)),hs=(t,e,s)=>{try{Ls(e,nt(t),s)}catch(r){console.error("Caught error while handling a Yjs update",r)}},hi=(t,e)=>{U(t,ls),Z(t,e)},ui=hs,fi=(t,e,s,r)=>{const o=rt(t);switch(o){case cs:di(t,e,s);break;case ft:hs(t,s,r);break;case ls:ui(t,s,r);break;default:throw new Error("Unknown message type")}return o},pi=0,mi=(t,e,s)=>{switch(rt(t)){case pi:s(e,Rs(t))}},gi=t=>Ps(t,(e,s)=>`${encodeURIComponent(s)}=${encodeURIComponent(e)}`).join("&"),se=0,us=3,ie=1,yi=2,xe=[];xe[se]=(t,e,s,r,o)=>{U(t,se);const i=fi(e,t,s.doc,s);r&&i===ft&&!s.synced&&(s.synced=!0)};xe[us]=(t,e,s,r,o)=>{U(t,ie),Z(t,pe(s.awareness,Array.from(s.awareness.getStates().keys())))};xe[ie]=(t,e,s,r,o)=>{zs(s.awareness,nt(e),s)};xe[yi]=(t,e,s,r,o)=>{mi(e,s.doc,(i,a)=>xi(s,a))};const At=3e4,xi=(t,e)=>console.warn(`Permission denied to access ${t.url}. ${e}`),fs=(t,e,s)=>{const r=Us(e),o=Q(),i=rt(r),a=t.messageHandlers[i];return a?a(o,r,t,s,i):console.error("Unable to compute message"),o},st=(t,e,s)=>{e===t.ws&&(t.emit("connection-close",[s,t]),t.ws=null,e.close(),t.wsconnecting=!1,t.wsconnected?(t.wsconnected=!1,t.synced=!1,Lt(t.awareness,Array.from(t.awareness.getStates().keys()).filter(r=>r!==t.doc.clientID),t),t.emit("status",[{status:"disconnected"}])):t.wsUnsuccessfulReconnects++,setTimeout(ps,Ds(qs(2,t.wsUnsuccessfulReconnects)*100,t.maxBackoffTime),t))},ps=t=>{if(t.shouldConnect&&t.ws===null){const e=new t._WS(t.url,t.protocols);e.binaryType="arraybuffer",t.ws=e,t.wsconnecting=!0,t.wsconnected=!1,t.synced=!1,e.onmessage=s=>{t.wsLastMessageReceived=Fe();const r=fs(t,new Uint8Array(s.data),!0);It(r)>1&&e.send(V(r))},e.onerror=s=>{t.emit("connection-error",[s,t])},e.onclose=s=>{st(t,e,s)},e.onopen=()=>{t.wsLastMessageReceived=Fe(),t.wsconnecting=!1,t.wsconnected=!0,t.wsUnsuccessfulReconnects=0,t.emit("status",[{status:"connected"}]);const s=Q();if(U(s,se),tt(s,t.doc),e.send(V(s)),t.awareness.getLocalState()!==null){const r=Q();U(r,ie),Z(r,pe(t.awareness,[t.doc.clientID])),e.send(V(r))}},t.emit("status",[{status:"connecting"}])}},ze=(t,e)=>{const s=t.ws;t.wsconnected&&s&&s.readyState===s.OPEN&&s.send(e),t.bcconnected&&oe(t.bcChannel,e,t)};class bi extends Bs{constructor(e,s,r,{connect:o=!0,awareness:i=new Ms(r),params:a={},protocols:l=[],WebSocketPolyfill:c=WebSocket,resyncInterval:f=-1,maxBackoffTime:u=2500,disableBc:m=!1}={}){for(super();e[e.length-1]==="/";)e=e.slice(0,e.length-1);this.serverUrl=e,this.bcChannel=e+"/"+s,this.maxBackoffTime=u,this.params=a,this.protocols=l,this.roomname=s,this.doc=r,this._WS=c,this.awareness=i,this.wsconnected=!1,this.wsconnecting=!1,this.bcconnected=!1,this.disableBc=m,this.wsUnsuccessfulReconnects=0,this.messageHandlers=xe.slice(),this._synced=!1,this.ws=null,this.wsLastMessageReceived=0,this.shouldConnect=o,this._resyncInterval=0,f>0&&(this._resyncInterval=setInterval(()=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){const y=Q();U(y,se),tt(y,r),this.ws.send(V(y))}},f)),this._bcSubscriber=(y,x)=>{if(x!==this){const C=fs(this,new Uint8Array(y),!1);It(C)>1&&oe(this.bcChannel,V(C),this)}},this._updateHandler=(y,x)=>{if(x!==this){const C=Q();U(C,se),hi(C,y),ze(this,V(C))}},this.doc.on("update",this._updateHandler),this._awarenessUpdateHandler=({added:y,updated:x,removed:C},N)=>{const v=y.concat(x).concat(C),g=Q();U(g,ie),Z(g,pe(i,v)),ze(this,V(g))},this._exitHandler=()=>{Lt(this.awareness,[r.clientID],"app closed")},pt&&typeof process<"u"&&process.on("exit",this._exitHandler),i.on("update",this._awarenessUpdateHandler),this._checkInterval=setInterval(()=>{this.wsconnected&&At{const{user:e}=d.useContext(ee),[s,r]=d.useState(null),[o,i]=d.useState(""),[a,l]=d.useState(""),[c,f]=d.useState("plaintext"),[u,m]=d.useState("vs-dark"),[y,x]=d.useState("Hello, welcome to CodeLIVE"),[C,N]=d.useState(null),[v,g]=d.useState([]),[h,p]=d.useState({successMsg:"",errorMsg:""}),[b,O]=d.useState(0),[I,w]=d.useState(!1),[k,P]=d.useState({creator:"",created_at:"",users:[]}),[B]=d.useState(new Fs),[R,q]=d.useState(null),[Y,z]=d.useState(null),F="https://codelive-758504.onrender.com",te=`${window.location.protocol==="https:"?"wss:":"ws:"}//codelive-758504.onrender.com/yjs`;d.useEffect(()=>{i(e?e.username:`Guest-${Math.floor(1e3+Math.random()*9e3)}`)},[e]),d.useEffect(()=>{const T=Te(F,{path:"/socket.io/",transports:["polling","websocket"],upgrade:!0,timeout:2e4,forceNew:!0});return r(T),T.on("connect_error",E=>{console.error("❌ Socket.IO Connection Error:",E)}),T.on("validateConnection",E=>p(M=>({...M,successMsg:E}))),T.on("RoomCreationSuccess",({success:E,message:M})=>p(Pe=>({...Pe,[E?"successMsg":"errorMsg"]:M}))),T.on("userJoined",E=>p(M=>({...M,successMsg:E}))),T.on("userJoinSuccess",E=>{w(!0),localStorage.setItem("isJoined","true"),p(M=>({...M,successMsg:E}))}),T.on("userLeavedRoom",()=>{localStorage.setItem("isJoined","false"),w(!1)}),T.on("successMessage",E=>p(M=>({...M,successMsg:E}))),T.on("errorMessage",E=>p(M=>({...M,errorMsg:E}))),T.on("countTotalUser",E=>O(E)),T.on("msgFromServer",({name:E,message:M})=>g(Pe=>[...Pe,{sender:E,local:0,msg:M}])),T.on("seeAllUsers",E=>{E&&E.success&&P({creator:E.created_by,created_at:E.created_at,users:E.users})}),()=>{T.disconnect()}},[]),d.useEffect(()=>{if(a){R&&R.destroy();try{const T=new bi(`${te}?room=${a}`,a,B),E=B.getText("monaco");q(T),z(E),E.observe(()=>x(E.toString()))}catch(T){console.error("❌ Error setting up Yjs:",T)}return()=>{R&&R.destroy()}}},[a,B]);const gs={localCode:y,lang:c,theme:u,setLang:f,setTheme:m,setLocalCode:x,editorInstance:C,setEditorInstance:N,socket:s,roomCode:a,totalUser:b,isUserJoined:I,userName:o,userLists:k,connctionMsg:h,userMessages:v,setRoomCode:l,handleRoomCreation:async T=>{if(!T)return!1;try{const M=await(await fetch(`${F}/api/create-room`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({roomId:T,name:o||"Guest"})})).json();return M.success?(console.log("Room created successfully! You can now join it."),!0):(console.log(`Failed to create room: ${M.message}`),!1)}catch{return console.log("Error creating room. Please try again."),!1}},handleRoomJoining:T=>{if(!T)return console.warn("Room code missing"),!1;try{return localStorage.setItem("roomId",T),localStorage.setItem("username",o||"Guest"),l(T),s==null||s.emit("joinRoom",{name:o,roomCode:T}),!0}catch(E){return console.error("Failed to join room:",E),!1}},handleRoomLeaving:T=>{s==null||s.emit("leaveRoom",{name:o,roomCode:T}),l(""),w(!1)},handleLocalMessageToServer:T=>{I&&a&&(s==null||s.emit("msgFromClient",{roomCode:a,name:o,msg:T}))},setUserMessages:g,getAllUsersByRoomId:T=>{s==null||s.emit("getAllUser",T)},ydoc:B,yProvider:R,yText:Y};return n.jsx(vi.Provider,{value:gs,children:t})},_i=()=>{const{pathname:t}=vs();return d.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[t]),null},ms=d.createContext(),Ni=({children:t})=>{const e="https://codelive-758504.onrender.com",s=async r=>{try{const i=await(await fetch(`${e}/api/ai/generate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:r})})).json();return i.success?i.code:(console.error("AI Response Error:",i.message),null)}catch(o){return console.error("AI Error:",o),null}};return n.jsx(ms.Provider,{value:{generateCode:s},children:t})},Li=()=>d.useContext(ms);Gs.createRoot(document.getElementById("root")).render(n.jsx(Fr,{children:n.jsx(Ni,{children:n.jsx(wi,{children:n.jsx(so,{clientId:void 0,children:n.jsxs(ws,{future:{v7_startTransition:!0,v7_relativeSplatPath:!0},children:[n.jsx(_i,{}),n.jsx(uo,{})]})})})})}));export{Bt as M,Ve as S,it as U,qr as X,vi as a,ee as b,A as c,wt as d,Sr as e,n as j,Oi as l,Li as u,S as y};