new Date(new Date().toDateString()+" "+U),D=s.type=="time",L=s.type=="week";Mo(Z.value)&&y&&($=D?P(y)>P(Z.value):L?y>Z.value:Q>new Date(Z.value)),Mo(re.value)&&y&&(Y=D?P(y)+$.value,re=!co(Y.value)&&y.length<+Y.value;if((Z||re)&&(ie(Z,$.message,Y.message),!a))return x(S[g].message),S}if(f&&!B&&Mo(y)){let{value:$,message:Y}=ff(f);if(r0($)&&!y.match($)&&(S[g]={type:si.pattern,message:Y,ref:s,...F(si.pattern,Y)},!a))return x(Y),S}if(h){if(ja(h)){let $=await h(y,r),Y=Ij($,v);if(Y&&(S[g]={...Y,...F(si.validate,Y.message)},!a))return x(Y.message),S}else if(Tr(h)){let $={};for(let Y in h){if(!Ua($)&&!a)break;let Z=Ij(await h[Y](y,r),v,Y);Z&&($={...Z,...F(Y,Z.message)},x(Z.message),a&&(S[g]=$))}if(!Ua($)&&(S[g]={ref:v,...$},!a))return S}}return x(!0),S},qte={mode:Bn.onSubmit,reValidateMode:Bn.onChange,shouldFocusError:!0}});function tre(e,t){let r=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),n=Math.abs(t.left-e.x);switch(Math.min(r,a,o,n)){case n:return"left";case o:return"right";case r:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function rre(e,t,r=5){let a=[];switch(t){case"top":a.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":a.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":a.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":a.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return a}function are(e){let{top:t,right:r,bottom:a,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:a},{x:o,y:a}]}function ore(e,t){let{x:r,y:a}=e,o=!1;for(let n=0,s=t.length-1;na!=p>a&&r<(u-c)*(a-d)/(p-d)+c&&(o=!o)}return o}function nre(e){let t=e.slice();return t.sort((r,a)=>r.xa.x?1:r.ya.y?1:0),sre(t)}function sre(e){if(e.length<=1)return e.slice();let t=[];for(let a=0;a=2;){let n=t[t.length-1],s=t[t.length-2];if((n.x-s.x)*(o.y-s.y)>=(n.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();let r=[];for(let a=e.length-1;a>=0;a--){let o=e[a];for(;r.length>=2;){let n=r[r.length-1],s=r[r.length-2];if((n.x-s.x)*(o.y-s.y)>=(n.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var ot,Ar,o0,Pwe,n0,Vj,Gte,yI,$te,bI,qj,Ph,Kte,Th,Wj,vI,Gj,wI,Xte,Yte,$j,mf,Kj,Qte,Jte,Zte,ere,Xj,Yj,Qj,Jj,Zj,eV,tV,rV,aV,oV=C(()=>{"use client";ot=A(J(),1);Go();Hr();Ro();Kp();bc();Kc();Kc();Xp();xc();ba();yn();$i();Rc();Ar=A(me(),1),[o0,Pwe]=rr("Tooltip",[ti]),n0=ti(),Vj="TooltipProvider",Gte=700,yI="tooltip.open",[$te,bI]=o0(Vj),qj=e=>{let{__scopeTooltip:t,delayDuration:r=Gte,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:n}=e,s=ot.useRef(!0),i=ot.useRef(!1),l=ot.useRef(0);return ot.useEffect(()=>{let c=l.current;return()=>window.clearTimeout(c)},[]),(0,Ar.jsx)($te,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:ot.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:ot.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,a)},[a]),isPointerInTransitRef:i,onPointerInTransitChange:ot.useCallback(c=>{i.current=c},[]),disableHoverableContent:o,children:n})};qj.displayName=Vj;Ph="Tooltip",[Kte,Th]=o0(Ph),Wj=e=>{let{__scopeTooltip:t,children:r,open:a,defaultOpen:o,onOpenChange:n,disableHoverableContent:s,delayDuration:i}=e,l=bI(Ph,e.__scopeTooltip),c=n0(t),[d,u]=ot.useState(null),p=va(),f=ot.useRef(0),h=s??l.disableHoverableContent,g=i??l.delayDuration,b=ot.useRef(!1),[m,y]=to({prop:a,defaultProp:o??!1,onChange:_=>{_?(l.onOpen(),document.dispatchEvent(new CustomEvent(yI))):l.onClose(),n?.(_)},caller:Ph}),v=ot.useMemo(()=>m?b.current?"delayed-open":"instant-open":"closed",[m]),x=ot.useCallback(()=>{window.clearTimeout(f.current),f.current=0,b.current=!1,y(!0)},[y]),S=ot.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y(!1)},[y]),I=ot.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{b.current=!0,y(!0),f.current=0},g)},[g,y]);return ot.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),(0,Ar.jsx)(Gc,{...c,children:(0,Ar.jsx)(Kte,{scope:t,contentId:p,open:m,stateAttribute:v,trigger:d,onTriggerChange:u,onTriggerEnter:ot.useCallback(()=>{l.isOpenDelayedRef.current?I():x()},[l.isOpenDelayedRef,I,x]),onTriggerLeave:ot.useCallback(()=>{h?S():(window.clearTimeout(f.current),f.current=0)},[S,h]),onOpen:x,onClose:S,disableHoverableContent:h,children:r})})};Wj.displayName=Ph;vI="TooltipTrigger",Gj=ot.forwardRef((e,t)=>{let{__scopeTooltip:r,...a}=e,o=Th(vI,r),n=bI(vI,r),s=n0(r),i=ot.useRef(null),l=$e(t,i,o.onTriggerChange),c=ot.useRef(!1),d=ot.useRef(!1),u=ot.useCallback(()=>c.current=!1,[]);return ot.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),(0,Ar.jsx)($c,{asChild:!0,...s,children:(0,Ar.jsx)(qe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:l,onPointerMove:ye(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!n.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:ye(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:ye(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:ye(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:ye(e.onBlur,o.onClose),onClick:ye(e.onClick,o.onClose)})})});Gj.displayName=vI;wI="TooltipPortal",[Xte,Yte]=o0(wI,{forceMount:void 0}),$j=e=>{let{__scopeTooltip:t,forceMount:r,children:a,container:o}=e,n=Th(wI,t);return(0,Ar.jsx)(Xte,{scope:t,forceMount:r,children:(0,Ar.jsx)(lr,{present:r||n.open,children:(0,Ar.jsx)(Gs,{asChild:!0,container:o,children:a})})})};$j.displayName=wI;mf="TooltipContent",Kj=ot.forwardRef((e,t)=>{let r=Yte(mf,e.__scopeTooltip),{forceMount:a=r.forceMount,side:o="top",...n}=e,s=Th(mf,e.__scopeTooltip);return(0,Ar.jsx)(lr,{present:a||s.open,children:s.disableHoverableContent?(0,Ar.jsx)(Xj,{side:o,...n,ref:t}):(0,Ar.jsx)(Qte,{side:o,...n,ref:t})})}),Qte=ot.forwardRef((e,t)=>{let r=Th(mf,e.__scopeTooltip),a=bI(mf,e.__scopeTooltip),o=ot.useRef(null),n=$e(t,o),[s,i]=ot.useState(null),{trigger:l,onClose:c}=r,d=o.current,{onPointerInTransitChange:u}=a,p=ot.useCallback(()=>{i(null),u(!1)},[u]),f=ot.useCallback((h,g)=>{let b=h.currentTarget,m={x:h.clientX,y:h.clientY},y=tre(m,b.getBoundingClientRect()),v=rre(m,y),x=are(g.getBoundingClientRect()),S=nre([...v,...x]);i(S),u(!0)},[u]);return ot.useEffect(()=>()=>p(),[p]),ot.useEffect(()=>{if(l&&d){let h=b=>f(b,d),g=b=>f(b,l);return l.addEventListener("pointerleave",h),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",h),d.removeEventListener("pointerleave",g)}}},[l,d,f,p]),ot.useEffect(()=>{if(s){let h=g=>{let b=g.target,m={x:g.clientX,y:g.clientY},y=l?.contains(b)||d?.contains(b),v=!ore(m,s);y?p():v&&(p(),c())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,d,s,c,p]),(0,Ar.jsx)(Xj,{...e,ref:n})}),[Jte,Zte]=o0(Ph,{isInside:!1}),ere=rv("TooltipContent"),Xj=ot.forwardRef((e,t)=>{let{__scopeTooltip:r,children:a,"aria-label":o,onEscapeKeyDown:n,onPointerDownOutside:s,...i}=e,l=Th(mf,r),c=n0(r),{onClose:d}=l;return ot.useEffect(()=>(document.addEventListener(yI,d),()=>document.removeEventListener(yI,d)),[d]),ot.useEffect(()=>{if(l.trigger){let u=p=>{p.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[l.trigger,d]),(0,Ar.jsx)(Ws,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:(0,Ar.jsxs)(Gd,{"data-state":l.stateAttribute,...c,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,Ar.jsx)(ere,{children:a}),(0,Ar.jsx)(Jte,{scope:r,isInside:!0,children:(0,Ar.jsx)(Qo,{id:l.contentId,role:"tooltip",children:o||a})})]})})});Kj.displayName=mf;Yj="TooltipArrow",Qj=ot.forwardRef((e,t)=>{let{__scopeTooltip:r,...a}=e,o=n0(r);return Zte(Yj,r).isInside?null:(0,Ar.jsx)($d,{...o,...a,ref:t})});Qj.displayName=Yj;Jj=qj,Zj=Wj,eV=Gj,tV=$j,rV=Kj,aV=Qj});function lre({delayDuration:e=0,...t}){return(0,ii.jsx)(Jj,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function s0({...e}){return(0,ii.jsx)(lre,{children:(0,ii.jsx)(Zj,{"data-slot":"tooltip",...e})})}function i0({...e}){return(0,ii.jsx)(eV,{"data-slot":"tooltip-trigger",...e})}function l0({className:e,sideOffset:t=0,children:r,...a}){return(0,ii.jsx)(tV,{children:(0,ii.jsxs)(rV,{"data-slot":"tooltip-content",sideOffset:t,className:se("fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in text-balance rounded-md bg-primary px-3 py-1.5 text-primary-foreground text-xs data-[state=closed]:animate-out",e),...a,children:[r,(0,ii.jsx)(aV,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-primary fill-primary"})]})})}var ii,nV=C(()=>{"use strict";"use client";ii=A(me(),1);oV();Ot()});async function c0(e){let t=await ig(),r=t.peerjsServers.find(n=>e.startsWith(n.prefix)),a=r?.host??"0.peerjs.com",o=r?.token??"peerjs";return new pu({host:a,token:o,secure:!0,pingInterval:3e4,config:{iceServers:t.iceServers}})}var xI=C(()=>{"use strict";Cw();Sw()});function ure(e){return typeof e=="object"&&e!==null&&"then"in e}function sV(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===cre&&"_payload"in e&&ure(e._payload)}function iV(e){let t=dre(e),r=Dr.forwardRef((a,o)=>{let{children:n,...s}=a;sV(n)&&typeof d0=="function"&&(n=d0(n._payload));let i=Dr.Children.toArray(n),l=i.find(pre);if(l){let c=l.props.children,d=i.map(u=>u===l?Dr.Children.count(c)>1?Dr.Children.only(null):Dr.isValidElement(c)?c.props.children:null:u);return(0,u0.jsx)(t,{...s,ref:o,children:Dr.isValidElement(c)?Dr.cloneElement(c,void 0,d):null})}return(0,u0.jsx)(t,{...s,ref:o,children:n})});return r.displayName=`${e}.Slot`,r}function dre(e){let t=Dr.forwardRef((r,a)=>{let{children:o,...n}=r;if(sV(o)&&typeof d0=="function"&&(o=d0(o._payload)),Dr.isValidElement(o)){let s=hre(o),i=mre(n,o.props);return o.type!==Dr.Fragment&&(i.ref=a?gn(a,s):s),Dr.cloneElement(o,i)}return Dr.Children.count(o)>1?Dr.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}function pre(e){return Dr.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fre}function mre(e,t){let r={...t};for(let a in t){let o=e[a],n=t[a];/^on[A-Z]/.test(a)?o&&n?r[a]=(...i)=>{let l=n(...i);return o(...i),l}:o&&(r[a]=o):a==="style"?r[a]={...o,...n}:a==="className"&&(r[a]=[o,n].filter(Boolean).join(" "))}return{...e,...r}}function hre(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Dr,u0,cre,d0,fre,lV=C(()=>{Dr=A(J(),1);Hr();u0=A(me(),1),cre=Symbol.for("react.lazy"),d0=Dr[" use ".trim().toString()];fre=Symbol("radix.slottable")});var cV,gre,uV,yre,dV,fV=C(()=>{cV=A(J(),1),gre=A(Gn(),1);lV();uV=A(me(),1),yre=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dV=yre.reduce((e,t)=>{let r=iV(`Primitive.${t}`),a=cV.forwardRef((o,n)=>{let{asChild:s,...i}=o,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,uV.jsx)(l,{...i,ref:n})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{})});var pV,mV,vre,hV,gV,yV=C(()=>{"use client";pV=A(J(),1);fV();mV=A(me(),1),vre="Label",hV=pV.forwardRef((e,t)=>(0,mV.jsx)(dV.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));hV.displayName=vre;gV=hV});function bV({className:e,...t}){return(0,vV.jsx)(gV,{"data-slot":"label",className:se("select-none font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",e),...t})}var vV,wV=C(()=>{"use strict";"use client";vV=A(me(),1);yV();Ot()});function _I({className:e,...t}){let r=Fl.useId();return(0,Ol.jsx)(SV.Provider,{value:{id:r},children:(0,Ol.jsx)("div",{"data-slot":"form-item",className:se("grid gap-2",e),...t})})}function kI({className:e,...t}){let{error:r,formItemId:a}=SI();return(0,Ol.jsx)(bV,{"data-slot":"form-label","data-error":!!r,className:se("data-[error=true]:text-destructive-foreground",e),htmlFor:a,...t})}function RI({...e}){let{error:t,formItemId:r,formDescriptionId:a,formMessageId:o}=SI();return(0,Ol.jsx)(md,{"data-slot":"form-control",id:r,"aria-describedby":t?`${a} ${o}`:`${a}`,"aria-invalid":!!t,...e})}function II({className:e,...t}){let{error:r,formMessageId:a}=SI(),o=r?String(r?.message):t.children;return o?(0,Ol.jsx)("p",{"data-slot":"form-message",id:a,className:se("text-destructive text-sm",e),...t,children:o}):null}var Ol,Fl,xV,CV,CI,SI,SV,_V=C(()=>{"use strict";"use client";Ol=A(me(),1);yn();Fl=A(J(),1);gI();wV();Ot();xV=Nj,CV=Fl.createContext({}),CI=({...e})=>(0,Ol.jsx)(CV.Provider,{value:{name:e.name},children:(0,Ol.jsx)(Dj,{...e})}),SI=()=>{let e=Fl.useContext(CV),t=Fl.useContext(SV),{getFieldState:r}=Mj(),a=fI({name:e.name}),o=r(e.name,a);if(!e)throw new Error("useFormField should be used within ");let{id:n}=t;return{id:n,name:e.name,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`,...o}},SV=Fl.createContext({})});function wre({peerId:e,playerId:t,playerName:r,isStaff:a}){let o=at("Anticheat.Dashboard"),n=us(),s=!a||Jr(n,"staff","view"),i=(0,Va.useRef)(null),l=(0,Va.useRef)({call:null,peer:null,mediaStream:null,mediaRecorder:null}),[c,d]=(0,Va.useState)(!1),[u,p]=(0,Va.useState)(!1),f=(0,Va.useRef)(null),h=(0,Va.useCallback)(()=>{p(!1),f.current&&(f.current.srcObject=null),l.current.mediaRecorder&&l.current.mediaRecorder.state==="recording"&&(l.current.mediaRecorder.requestData(),l.current.mediaRecorder.stop()),l.current.call&&l.current.call.close(),l.current.peer&&l.current.peer.disconnect(),l.current={call:null,peer:null,mediaStream:null,mediaRecorder:null},d(!1)},[]);(0,Va.useEffect)(()=>()=>h(),[h]);let g=(0,Va.useCallback)(async()=>{p(!0);let b=await c0(e);b.on("error",()=>{h()}),b.on("close",()=>{h()}),b.on("call",async m=>{m.on("error",()=>{h()}),m.on("close",()=>{h()}),m.on("stream",y=>{f.current&&(f.current.srcObject=y),l.current={call:m,peer:b,mediaStream:y,mediaRecorder:null},d(!0)}),m.answer(void 0)}),b.on("open",()=>{let m=b.connect(e,{metadata:{type:"screen"}});m&&m.on("open",()=>{m.close()})})},[e,h]);return(0,q.jsxs)("div",{children:[(0,q.jsxs)("div",{ref:i,className:se("group group relative select-none overflow-hidden rounded object-contain transition-colors",c&&"mb-4 w-full border",!c&&"mb-0 w-0 border-0"),children:[(0,q.jsx)("video",{onLoadedData:()=>p(!1),muted:!0,controls:!0,autoPlay:!0,loop:!0,className:"no-volume-slider h-full w-full",ref:f}),(0,q.jsx)("div",{className:"absolute top-2 right-2 z-30 flex gap-2"})]}),c?(0,q.jsxs)(Ye,{onClick:()=>{h()},className:"flex w-full gap-2",variant:"outline",children:[(0,q.jsx)(jm,{className:"size-4"})," ",o("Actions.stopWatching")]}):(0,q.jsx)(q.Fragment,{children:s?(0,q.jsx)(Ye,{disabled:u,className:"flex w-full gap-2",variant:"outline",onClick:async()=>{await g()},children:u?(0,q.jsx)(In,{className:"size-4 animate-spin"}):(0,q.jsx)(zd,{className:"size-4"})}):(0,q.jsxs)(s0,{children:[(0,q.jsx)(i0,{asChild:!0,children:(0,q.jsx)(Ye,{disabled:!0,className:"flex w-full gap-2",variant:"outline",children:(0,q.jsx)(zd,{className:"size-4"})})}),(0,q.jsx)(l0,{children:(0,q.jsx)("p",{children:o("Monitoring.noStaffViewingPermission")})})]})})]})}function xre({ping:e}){return e<70?(0,q.jsx)(Mc,{className:"size-4 text-muted-foreground"}):e<120?(0,q.jsx)(Oc,{className:"size-4 text-muted-foreground"}):e<200?(0,q.jsx)(Nc,{className:"size-4 text-muted-foreground"}):(0,q.jsx)(Fc,{className:"size-4 text-muted-foreground"})}function Cre({permissions:e}){return(0,q.jsxs)("div",{className:"flex gap-2",children:[e?.whitelisted&&(0,q.jsx)(Ln,{className:"size-4"}),e?.adminMenu&&(0,q.jsx)(Qs,{className:"size-4"})]})}function Sre({player:e,refetch:t}){let r=at("Anticheat.Dashboard.Actions"),a=(0,Va.useRef)(null);return(0,q.jsxs)(Cl,{children:[(0,q.jsx)(mh,{asChild:!0,children:(0,q.jsx)(Ye,{className:"w-full",variant:"warning",children:r("kick")})}),(0,q.jsxs)(Sl,{children:[(0,q.jsxs)(_l,{children:[(0,q.jsx)(Rl,{children:r("kickPlayer",{player:e.name})}),(0,q.jsx)(Il,{children:r("kickConfirm")})]}),(0,q.jsx)(jr,{ref:a,placeholder:r("reason")}),(0,q.jsxs)(kl,{children:[(0,q.jsx)(El,{children:r("cancel")}),(0,q.jsx)(Ll,{onClick:async()=>{await Ae("kickPlayer",{netId:e.id,reason:a.current.value,details:""}),t()},children:r("continue")})]})]})]})}function _re({player:e}){let t=at("Anticheat.Dashboard.Actions"),[r,a]=(0,Va.useState)(!1),o=jj({defaultValues:{title:"",description:""}}),n=async s=>{await Ae("sendMessage",{playerId:e.id,title:s.title.trim(),description:s.description.trim()}),er.success(t("sendMessage")),a(!1),o.reset()};return(0,q.jsxs)(Ca,{open:r,onOpenChange:a,children:[(0,q.jsx)(bn,{asChild:!0,children:(0,q.jsx)(Ye,{variant:"outline",children:(0,q.jsx)(Fm,{className:"size-4"})})}),(0,q.jsxs)(Sa,{className:"sm:max-w-[425px]",children:[(0,q.jsxs)(_a,{children:[(0,q.jsx)(ka,{children:t("messagePlayer",{player:e.name})}),(0,q.jsx)(En,{children:t("messageConfirm")})]}),(0,q.jsx)(xV,{...o,children:(0,q.jsxs)("form",{onSubmit:o.handleSubmit(n),className:"space-y-4",children:[(0,q.jsx)(CI,{control:o.control,name:"title",render:({field:s})=>(0,q.jsxs)(_I,{children:[(0,q.jsx)(kI,{children:t("messageTitle")}),(0,q.jsx)(RI,{children:(0,q.jsx)(jr,{placeholder:t("messageTitlePlaceholder"),...s})}),(0,q.jsx)(II,{})]})}),(0,q.jsx)(CI,{control:o.control,name:"description",render:({field:s})=>(0,q.jsxs)(_I,{children:[(0,q.jsx)(kI,{children:t("messageDescription")}),(0,q.jsx)(RI,{children:(0,q.jsx)(Qb,{placeholder:t("messageDescriptionPlaceholder"),rows:3,...s})}),(0,q.jsx)(II,{})]})}),(0,q.jsx)(VB,{children:(0,q.jsx)(Ye,{type:"submit",children:t("sendMessage")})})]})})]})]})}function kre({player:e,refetch:t}){let r=at("Anticheat.Dashboard.Actions"),a=(0,Va.useRef)(null);return(0,q.jsxs)(Cl,{children:[(0,q.jsx)(mh,{asChild:!0,children:(0,q.jsx)(Ye,{className:"w-full",variant:"destructive",children:r("ban")})}),(0,q.jsxs)(Sl,{children:[(0,q.jsxs)(_l,{children:[(0,q.jsx)(Rl,{children:r("banPlayer",{player:e.name})}),(0,q.jsx)(Il,{children:r("banConfirm")})]}),(0,q.jsx)(jr,{ref:a,placeholder:r("reason")}),(0,q.jsxs)(kl,{children:[(0,q.jsx)(El,{children:r("cancel")}),(0,q.jsx)(Ll,{onClick:async()=>{await Ae("banPlayer",{netId:e.id,reason:a.current.value,details:""}),t()},children:r("continue")})]})]})]})}function Rre({proxy:e}){let t=at("Anticheat.Dashboard.Actions");return e?(0,q.jsxs)(s0,{children:[(0,q.jsx)(i0,{asChild:!0,children:(0,q.jsx)(Dc,{className:"size-4"})}),(0,q.jsx)(l0,{children:(0,q.jsx)("p",{children:t("usingProxy")})})]}):null}function Ire(){return(0,q.jsx)("div",{className:"flex aspect-square h-full w-full items-center justify-center border-border border-r bg-muted p-1 text-muted-foreground",children:(0,q.jsx)(Pm,{className:"size-5"})})}function Lre(){return(0,q.jsx)("div",{className:"flex aspect-square h-full w-full items-center justify-center border-border border-r bg-muted p-1 text-muted-foreground",children:(0,q.jsx)(en,{className:"size-5"})})}function Ere(){return(0,q.jsx)("div",{className:"flex aspect-square h-full w-full items-center justify-center border-border border-r bg-muted p-1 text-muted-foreground",children:(0,q.jsx)(Cm,{className:"size-5"})})}function Pre(){return(0,q.jsx)("div",{className:"flex aspect-square h-full w-full items-center justify-center border-border border-r bg-muted p-1 text-muted-foreground",children:(0,q.jsx)(Vm,{className:"size-5"})})}function Tre(){return(0,q.jsx)("div",{className:"flex aspect-square h-full w-full items-center justify-center border-border border-r bg-muted p-1 text-muted-foreground",children:(0,q.jsx)(Mm,{className:"size-5"})})}function Are(){return(0,q.jsx)("div",{className:"flex aspect-square h-full w-full items-center justify-center border-border border-r bg-muted p-1 text-muted-foreground",children:(0,q.jsx)(Hm,{className:"size-5"})})}function Dre(){return(0,q.jsx)("div",{className:"flex aspect-square h-full w-full items-center justify-center border-border border-r bg-muted p-1 text-muted-foreground",children:(0,q.jsx)(Km,{className:"size-5"})})}function Mre(){return(0,q.jsx)("div",{className:"flex aspect-square h-full w-full items-center justify-center border-border border-r bg-muted p-1 text-muted-foreground",children:(0,q.jsx)($m,{className:"size-5"})})}function Nre(){return(0,q.jsx)("div",{className:"flex aspect-square h-full w-full items-center justify-center border-border border-r bg-muted p-1 text-muted-foreground",children:(0,q.jsx)(qm,{className:"size-5"})})}function Ore(){return(0,q.jsx)("div",{className:"flex aspect-square h-full w-full items-center justify-center border-border border-r bg-muted p-1 text-muted-foreground text-muted-foreground",children:(0,q.jsx)(Rn,{className:"size-5"})})}function LI({transport:e}){let t=Fre.get(e??-1)||Ore;return(0,q.jsx)(t,{})}function Bre({hosting:e}){let t=at("Anticheat.Dashboard.Actions");return e?(0,q.jsxs)(s0,{children:[(0,q.jsx)(i0,{asChild:!0,children:(0,q.jsx)(Um,{className:"size-4"})}),(0,q.jsx)(l0,{children:(0,q.jsx)("p",{children:t("usingHosting")})})]}):null}function kV({player:e,refetch:t}){let r=at("Anticheat.Dashboard.Actions"),a=us();return(0,q.jsxs)(Ca,{children:[(0,q.jsx)(bn,{className:"cursor-pointer",asChild:!0,children:(0,q.jsxs)(ur,{className:se("relative flex h-full gap-2 overflow-hidden border duration-200 hover:border-secondary/50"),children:[(0,q.jsx)("div",{className:"h-full",children:(0,q.jsx)(LI,{transport:e.transportationType})}),(0,q.jsxs)(wr,{className:"flex w-full items-center gap-2 py-2 pr-4",children:[(0,q.jsxs)("p",{className:"text-base text-muted-foreground",children:["[",e.id,"]"]}),(0,q.jsx)("p",{className:"line-clamp-1 text-base",children:e.name}),(0,q.jsx)("div",{className:"ml-2",children:(0,q.jsx)(Cre,{permissions:e.permissions})}),(0,q.jsxs)("div",{className:"ml-auto flex items-center gap-4",children:[(0,q.jsx)(Rre,{proxy:e.proxy}),(0,q.jsx)(Bre,{hosting:e.hosting}),(0,q.jsx)(xre,{ping:e.ping})]})]})]})}),(0,q.jsxs)(Sa,{onOpenAutoFocus:o=>o.preventDefault(),children:[(0,q.jsxs)(_a,{children:[(0,q.jsxs)(ka,{className:"line-clamp-1 flex",children:[(0,q.jsxs)("p",{className:"mr-2 text-muted-foreground",children:["[",e.id,"]"]}),(0,q.jsx)("p",{children:e.name})]}),(0,q.jsx)(En,{children:r("playerIdentifiers")})]}),(0,q.jsx)(ms,{identifiers:e.identifiers}),(0,q.jsx)(En,{children:r("playerActions")}),(0,q.jsxs)("div",{className:"flex w-full gap-4",children:[(0,q.jsx)(Ye,{onClick:()=>Ae("gotoPlayer",{netId:e.id}),className:"w-full",variant:"secondary",children:"Goto"}),(0,q.jsx)(Ye,{onClick:()=>Ae("bringPlayer",{netId:e.id}),className:"w-full",variant:"secondary",children:"Bring"})]}),(0,q.jsxs)("div",{className:"flex w-full gap-4",children:[Jr(a,"kicks","create")&&(0,q.jsx)(Sre,{refetch:t,player:e}),Jr(a,"bans","create")&&(0,q.jsx)(kre,{refetch:t,player:e}),Jr(a,"messages","send")&&(0,q.jsx)(_re,{player:e})]}),e.peerId&&(0,q.jsx)(wre,{peerId:e.peerId,playerId:e.id,playerName:e.name,isStaff:e.permissions?.whitelisted??!1})]})]})}var q,Va,Fre,EI=C(()=>{"use strict";q=A(me(),1);Ks();Qr();Va=A(J(),1);gI();Ui();ko();Zd();Tb();nn();ds();Js();wl();nV();xI();Ot();ra();Ym();Qd();_V();KR();Qr();Fre=new Map([[0,Ire],[1,Lre],[2,Ere],[3,Pre],[4,Tre],[5,Are],[6,Dre],[7,Mre],[8,Nre]])});function PV(e){return e?"checked":"unchecked"}var zn,nu,f0,Hre,Cxe,zre,Ure,RV,IV,LV,jre,EV,TV,AV,DV=C(()=>{"use client";zn=A(J(),1);Go();Hr();Ro();$i();fR();mb();ba();nu=A(me(),1),f0="Switch",[Hre,Cxe]=rr(f0),[zre,Ure]=Hre(f0),RV=zn.forwardRef((e,t)=>{let{__scopeSwitch:r,name:a,checked:o,defaultChecked:n,required:s,disabled:i,value:l="on",onCheckedChange:c,form:d,...u}=e,[p,f]=zn.useState(null),h=$e(t,v=>f(v)),g=zn.useRef(!1),b=p?d||!!p.closest("form"):!0,[m,y]=to({prop:o,defaultProp:n??!1,onChange:c,caller:f0});return(0,nu.jsxs)(zre,{scope:r,checked:m,disabled:i,children:[(0,nu.jsx)(qe.button,{type:"button",role:"switch","aria-checked":m,"aria-required":s,"data-state":PV(m),"data-disabled":i?"":void 0,disabled:i,value:l,...u,ref:h,onClick:ye(e.onClick,v=>{y(x=>!x),b&&(g.current=v.isPropagationStopped(),g.current||v.stopPropagation())})}),b&&(0,nu.jsx)(EV,{control:p,bubbles:!g.current,name:a,value:l,checked:m,required:s,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});RV.displayName=f0;IV="SwitchThumb",LV=zn.forwardRef((e,t)=>{let{__scopeSwitch:r,...a}=e,o=Ure(IV,r);return(0,nu.jsx)(qe.span,{"data-state":PV(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t})});LV.displayName=IV;jre="SwitchBubbleInput",EV=zn.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:a=!0,...o},n)=>{let s=zn.useRef(null),i=$e(s,n),l=Db(r),c=Wd(t);return zn.useEffect(()=>{let d=s.current;if(!d)return;let u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(l!==r&&f){let h=new Event("click",{bubbles:a});f.call(d,r),d.dispatchEvent(h)}},[l,r,a]),(0,nu.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});EV.displayName=jre;TV=RV,AV=LV});function TI({className:e,...t}){return(0,PI.jsx)(TV,{"data-slot":"switch",className:se("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,children:(0,PI.jsx)(AV,{"data-slot":"switch-thumb",className:se("pointer-events-none block size-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})}var PI,MV=C(()=>{"use strict";"use client";PI=A(me(),1);DV();Ot()});function qre({player:e}){let t=at("Anticheat.Dashboard.Monitoring"),r=at("Anticheat.Dashboard.Actions"),a=us(),o=!e.permissions?.whitelisted||Jr(a,"staff","view"),n=(0,Yt.useRef)({call:null,peer:null,mediaStream:null,mediaRecorder:null}),[s,i]=(0,Yt.useState)(!1),l=(0,Yt.useRef)(null),c=(0,Yt.useRef)(null),d=(0,Yt.useCallback)(()=>{i(!1),l.current&&(l.current.srcObject=null),n.current.mediaRecorder&&n.current.mediaRecorder.state==="recording"&&(n.current.mediaRecorder.requestData(),n.current.mediaRecorder.stop()),n.current.call&&n.current.call.close(),n.current.peer&&n.current.peer.disconnect(),n.current={call:null,peer:null,mediaStream:null,mediaRecorder:null}},[]),u=(0,Yt.useCallback)(async()=>{if(d(),!o||!e.peerId)return;i(!0);let y=await c0(e.peerId);y.on("error",()=>{d()}),y.on("close",()=>{d()}),y.on("call",async v=>{v.on("close",()=>{d()}),v.on("error",()=>{d()}),v.on("stream",x=>{l.current&&(l.current.srcObject=x),n.current={call:v,peer:y,mediaStream:x,mediaRecorder:null}}),v.answer(void 0)}),y.on("open",()=>{if(!e.peerId)return;let v=y.connect(e.peerId,{metadata:{type:"screen"}});v&&v.on("open",()=>{v.close()})})},[e.peerId,d,o]);(0,Yt.useEffect)(()=>(e.peerId&&u(),()=>d()),[e.peerId,d,u]);let[p,f]=(0,Yt.useState)(!1),[h,g]=(0,Yt.useState)(!1),[b,m]=(0,Yt.useState)(!1);return(0,le.jsxs)("div",{ref:c,className:"group relative flex h-full w-full items-center justify-center overflow-hidden border border-border bg-muted transition-colors",children:[o?(0,le.jsx)("video",{onLoadedData:()=>i(!1),muted:!0,controls:!1,autoPlay:!0,loop:!0,className:se("pointer-events-none absolute top-0 left-0 h-full w-full overflow-hidden object-contain"),ref:l}):(0,le.jsx)("div",{className:"flex h-full w-full items-center justify-center bg-muted",children:(0,le.jsx)("p",{className:"text-muted-foreground text-sm",children:t("noStaffViewingPermission")})}),(0,le.jsxs)("p",{className:"pointer-events-none absolute top-2 left-2 line-clamp-1 max-w-52 select-none rounded bg-background/50 px-2 py-1",children:["[",e.id,"] ",e.name]}),(0,le.jsx)("div",{className:"absolute top-2 right-2 flex flex-col gap-2",children:(0,le.jsxs)(is,{children:[(0,le.jsx)(ls,{asChild:!0,children:(0,le.jsx)(sl,{className:"aspect-square cursor-pointer p-1"})}),(0,le.jsxs)(cs,{align:"end",children:[(0,le.jsx)(ml,{children:t("actions")}),(0,le.jsx)(hl,{}),(0,le.jsx)(Kd,{children:(0,le.jsx)("button",{type:"button",onClick:()=>f(!0),children:r("kick")})}),(0,le.jsx)(Kd,{children:(0,le.jsx)("button",{type:"button",onClick:()=>g(!0),children:r("ban")})}),(0,le.jsx)(Kd,{children:(0,le.jsx)("button",{type:"button",onClick:()=>m(!0),children:r("info")})})]})]})}),s&&(0,le.jsx)(In,{className:"absolute size-1/4 animate-spin"}),(0,le.jsx)(Kre,{player:e,refetch:()=>{},open:p,setOpen:f}),(0,le.jsx)(Xre,{player:e,refetch:()=>{},open:h,setOpen:g}),(0,le.jsx)(Yre,{player:e,open:b,setOpen:m})]})}function Wre({player:e,selected:t,onSelect:r,disabled:a}){return(0,le.jsx)("button",{onClick:r,type:"button",className:"w-full cursor-pointer",disabled:a,children:(0,le.jsxs)(ur,{className:se("relative flex h-full w-full gap-2 overflow-hidden border duration-200 hover:border-secondary/50",a&&"hover:border-border",t&&"border-secondary hover:border-secondary"),children:[(0,le.jsx)("div",{className:"h-10",children:(0,le.jsx)(LI,{transport:e.transportationType})}),(0,le.jsxs)(wr,{className:"flex w-full items-center gap-2 py-2 pr-4",children:[(0,le.jsxs)("p",{className:"text-base text-muted-foreground",children:["[",e.id,"]"]}),(0,le.jsx)("p",{className:"line-clamp-1 text-base",children:e.name}),(0,le.jsx)("div",{className:"ml-2",children:(0,le.jsx)($re,{permissions:e.permissions})}),(0,le.jsx)("div",{className:"ml-auto flex items-center gap-4",children:(0,le.jsx)(Gre,{ping:e.ping})})]})]})})}function Gre({ping:e}){return e<70?(0,le.jsx)(Mc,{className:"size-4 text-muted-foreground"}):e<120?(0,le.jsx)(Oc,{className:"size-4 text-muted-foreground"}):e<200?(0,le.jsx)(Nc,{className:"size-4 text-muted-foreground"}):(0,le.jsx)(Fc,{className:"size-4 text-muted-foreground"})}function $re({permissions:e}){return(0,le.jsxs)("div",{className:"flex gap-2",children:[e?.whitelisted&&(0,le.jsx)(Ln,{className:"size-4"}),e?.adminMenu&&(0,le.jsx)(Qs,{className:"size-4"})]})}function Kre({player:e,refetch:t,open:r,setOpen:a}){let o=at("Anticheat.Dashboard.Actions"),n=(0,Yt.useRef)(null);return(0,le.jsx)(Cl,{open:r,onOpenChange:a,children:(0,le.jsxs)(Sl,{children:[(0,le.jsxs)(_l,{children:[(0,le.jsx)(Rl,{children:o("kickPlayer",{player:e.name})}),(0,le.jsx)(Il,{children:o("kickConfirm")})]}),(0,le.jsx)(jr,{ref:n,placeholder:o("reason")}),(0,le.jsxs)(kl,{children:[(0,le.jsx)(El,{children:o("cancel")}),(0,le.jsx)(Ll,{onClick:async()=>{await Ae("kickPlayer",{netId:e.id,reason:n.current.value,details:""}),t(),a(!1)},children:o("continue")})]})]})})}function Xre({player:e,refetch:t,open:r,setOpen:a}){let o=at("Anticheat.Dashboard.Actions"),n=(0,Yt.useRef)(null);return(0,le.jsx)(Cl,{open:r,onOpenChange:a,children:(0,le.jsxs)(Sl,{children:[(0,le.jsxs)(_l,{children:[(0,le.jsx)(Rl,{children:o("banPlayer",{player:e.name})}),(0,le.jsx)(Il,{children:o("banConfirm")})]}),(0,le.jsx)(jr,{ref:n,placeholder:o("reason")}),(0,le.jsxs)(kl,{children:[(0,le.jsx)(El,{children:o("cancel")}),(0,le.jsx)(Ll,{onClick:async()=>{await Ae("banPlayer",{netId:e.id,reason:n.current.value,details:""}),t(),a(!1)},children:o("continue")})]})]})})}function Yre({player:e,open:t,setOpen:r}){let a=at("Anticheat.Dashboard.Actions");return(0,le.jsx)(Ca,{open:t,onOpenChange:r,children:(0,le.jsxs)(Sa,{children:[(0,le.jsx)(_a,{children:(0,le.jsxs)(ka,{className:"line-clamp-1 flex",children:[(0,le.jsxs)("p",{className:"mr-2 text-muted-foreground",children:["[",e.id,"]"]}),(0,le.jsx)("p",{children:e.name})]})}),(0,le.jsx)(En,{children:a("playerIdentifiers")}),(0,le.jsx)(ms,{identifiers:e.identifiers})]})})}function OV(){let e=at("Anticheat.Dashboard.Monitoring"),[t,r]=(0,Yt.useState)(""),[a,o]=(0,Yt.useState)([]),[n,s]=(0,Yt.useState)("none"),[i,l]=(0,Yt.useState)(!0),[c,d]=(0,Yt.useState)(16),{data:u,isLoading:p}=Io({queryKey:["players"],refetchInterval:1e4,queryFn:async()=>await Ae("getPlayers")}),[f,h]=(0,Yt.useState)([]);return(0,Yt.useEffect)(()=>{let g=u?.filter(b=>f.includes(b.id)).map(b=>b.id)??[];eI(g,f)||h(g)},[u,f]),(0,Yt.useEffect)(()=>{if(!t){o([]);return}let g=NV.default.go(t,u??[],{keys:["name","id","identifiers.steam","identifiers.discord","identifiers.license","identifiers.license2","identifiers.fivem","identifiers.xbl","identifiers.ip"],threshold:.5});o(g.map(b=>b.obj).sort((b,m)=>b.id-m.id))},[t,u]),(0,Yt.useEffect)(()=>(n==="latest"?h([...u??[]].sort((g,b)=>b.id-g.id).slice(0,c).sort((g,b)=>g.id-b.id).map(g=>g.id)):n==="staff"&&h([...u??[]].filter(g=>g.permissions?.whitelisted).slice(0,c).sort((g,b)=>g.id-b.id).map(g=>g.id)),()=>{n!=="none"&&h([])}),[n,u,c]),(0,le.jsxs)("div",{className:"absolute top-0 left-0 flex h-full w-full flex-row",children:[(0,le.jsxs)("div",{className:se("no-scrollbar flex h-full max-h-screen w-full max-w-screen flex-col overflow-auto duration-500",i&&"mr-0",!i&&"-mr-80"),children:[(0,le.jsx)(Qre,{selectedPlayers:u?.filter(g=>f.includes(g.id))??[]}),(0,le.jsxs)("div",{className:"flex items-center justify-between gap-4 p-4",children:[(0,le.jsxs)("div",{className:"flex gap-4",children:[(0,le.jsx)(Ye,{variant:"outline",size:"icon",onClick:()=>d(9),className:se(c===9&&"border-secondary"),children:"9"}),(0,le.jsx)(Ye,{variant:"outline",size:"icon",onClick:()=>d(16),className:se(c===16&&"border-secondary"),children:"16"}),(0,le.jsx)(Ye,{variant:"outline",size:"icon",onClick:()=>d(25),className:se(c===25&&"border-secondary"),children:"25"}),(0,le.jsx)(Ye,{variant:"outline",size:"icon",onClick:()=>d(36),className:se(c===36&&"border-secondary"),children:"36"})]}),(0,le.jsxs)("div",{className:"flex items-center gap-4",children:[(0,le.jsx)(TI,{checked:n==="latest",onCheckedChange:g=>{s(g?"latest":"none")}}),(0,le.jsx)("p",{className:"text-muted-foreground text-sm",children:e("viewLatest")}),(0,le.jsx)(TI,{checked:n==="staff",onCheckedChange:g=>{s(g?"staff":"none")}}),(0,le.jsx)("p",{className:"text-muted-foreground text-sm",children:e("viewStaff")}),(0,le.jsxs)(Ye,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:g=>{l(!i)},children:[(0,le.jsx)(Bm,{}),(0,le.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})]})]})]}),(0,le.jsx)("div",{className:se("border-l duration-500",i&&"translate-x-0",!i&&"translate-x-full"),children:(0,le.jsxs)("div",{className:"flex h-full w-80 flex-col gap-6 px-4 pt-4",children:[(0,le.jsxs)("div",{className:"relative w-full",children:[(0,le.jsx)(Da,{className:"absolute top-2.5 left-2.5 size-4 text-muted-foreground"}),(0,le.jsx)(jr,{onChange:g=>r(g.target.value),value:t,type:"search",placeholder:e("search"),className:"w-full rounded-lg bg-background pl-8"})]}),(0,le.jsx)("div",{className:"no-scrollbar h-full w-full overflow-auto pb-4",children:p?(0,le.jsx)("div",{className:"flex items-center justify-center p-4",children:(0,le.jsx)(In,{className:"size-6 animate-spin"})}):(t?a:u?.sort((g,b)=>g.id-b.id)??[]).map((g,b)=>(0,le.jsx)(Wre,{player:g,disabled:n!=="none",selected:!!f.includes(g.id),onSelect:()=>{if(f.find(m=>m===g.id))h(f.filter(m=>m!==g.id));else{if(f.length>=c)return;h([...f,g.id])}}},g.id))})]})})]})}var le,NV,Yt,Qre,FV=C(()=>{"use strict";le=A(me(),1);el();gj();NV=A(tI(),1);Qr();Yt=A(J(),1);ko();Qd();EI();Zd();Tb();nn();ds();Js();Yd();wl();MV();xI();Ot();ra();Ym();Qre=({selectedPlayers:e})=>{let t=at("Anticheat.Dashboard.Monitoring"),r=e.length;return(0,le.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:r===0?(0,le.jsx)("p",{className:"text-muted-foreground",children:t("noPlayersSelected")}):(0,le.jsx)("div",{className:"flex aspect-[512/295] h-auto max-h-full w-full max-w-full items-center justify-center",children:(0,le.jsx)("div",{className:se("grid aspect-[512/295] h-full max-h-full w-auto max-w-full p-4",r>0&&"grid-cols-1",r>1&&"grid-cols-2",r>4&&"grid-cols-3",r>9&&"grid-cols-4",r>16&&"grid-cols-5",r>25&&"grid-cols-6"),children:e.map(a=>(0,le.jsx)(qre,{player:a},a.id))})})})}});function Jre(e){return e?.sort((t,r)=>t.id-r.id)}function HV(){let e=at("Anticheat.Dashboard.Players"),{data:t,isLoading:r,refetch:a}=Io({queryKey:["players"],refetchInterval:1e4,queryFn:async()=>await Ae("getPlayers")}),[o,n]=(0,Ah.useState)(""),[s,i]=(0,Ah.useState)([]);return(0,Ah.useEffect)(()=>{if(!o){i([]);return}(async()=>{let l=BV.default.go(o,t??[],{keys:["name","id","identifiers.steam","identifiers.discord","identifiers.license","identifiers.license2","identifiers.fivem","identifiers.xbl","identifiers.ip"],threshold:.5});i(l.map(c=>c.obj).sort((c,d)=>c.id-d.id))})()},[o,t]),(0,Mr.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,Mr.jsxs)("div",{className:"flex gap-4 md:gap-8",children:[(0,Mr.jsxs)("div",{className:"relative mr-auto flex-1 md:grow-0",children:[(0,Mr.jsx)(Da,{className:"absolute top-2.5 left-2.5 size-4 text-muted-foreground"}),(0,Mr.jsx)(jr,{onChange:l=>n(l.target.value),value:o,type:"search",placeholder:e("search"),className:"w-[200px] rounded-lg bg-background pl-8 lg:w-[336px]"})]}),(0,Mr.jsx)(ur,{className:"flex h-10 items-center justify-center px-4",children:(0,Mr.jsx)("p",{className:"line-clamp-1 text-muted-foreground",children:e("online",{amount:t?.length??0})})})]}),(0,Mr.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-5",children:r?(0,Mr.jsxs)(Mr.Fragment,{children:[(0,Mr.jsx)(AI,{}),(0,Mr.jsx)(AI,{}),(0,Mr.jsx)(AI,{})]}):(0,Mr.jsx)(Mr.Fragment,{children:Jre(o?s:t??[]).map((l,c)=>(0,Mr.jsx)(kV,{player:l,refetch:a},l.id))})})]})}function AI(){return(0,Mr.jsx)(ua,{className:"h-10 w-full"})}var Mr,BV,Ah,zV=C(()=>{"use strict";Mr=A(me(),1);el();BV=A(tI(),1);Qr();Ah=A(J(),1);ko();ds();wl();dh();ra();EI()});function Zre({index:e,style:t,options:r,onSelect:a}){return(0,At.jsx)(Gb,{value:r[e],style:t,onSelect:a,children:r[e]},e)}function UV(){let e=at("Anticheat.Dashboard.Vehicles"),{data:t}=Io({queryKey:["vehicles"],queryFn:async()=>await Ae("getVehicleModels")}),[r,a]=(0,DI.useState)(!1),[o,n]=(0,DI.useState)(t?.models??null),s=o??t?.models??[],i=l=>{Ae("createVehicle",{model:l}).then(p0),a(!1)};return(0,At.jsxs)(ur,{children:[(0,At.jsx)(Dn,{children:(0,At.jsx)(wr,{children:e("title")})}),(0,At.jsx)(ca,{children:(0,At.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,At.jsxs)(Kb,{modal:!0,open:r,onOpenChange:a,children:[(0,At.jsx)(Xb,{asChild:!0,children:(0,At.jsxs)(Ye,{variant:"outline","aria-expanded":r,className:"w-full justify-between",children:[e("selectVehicle"),(0,At.jsx)(Tc,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,At.jsx)(Yb,{className:"w-[50vw] p-0",children:(0,At.jsxs)(Ub,{shouldFilter:!1,children:[(0,At.jsx)(jb,{onValueChange:l=>{l||n(null);let c=l.toLowerCase()??"";n((t?.models??[]).filter(d=>d.toLowerCase().includes(c)))},placeholder:e("searchVehicles")}),(0,At.jsxs)(Vb,{className:"max-h-[300px]",children:[(0,At.jsx)(qb,{children:e("noVehicleFound")}),(0,At.jsx)(Wb,{className:"h-[300px]",children:(0,At.jsx)(Pb,{overscanCount:5,rowComponent:Zre,rowProps:{options:s,onSelect:i},rowCount:s.length,rowHeight:40,style:{width:"100%",height:600}})})]})]})})]}),(0,At.jsxs)("div",{className:"flex w-full gap-4",children:[(0,At.jsxs)(Ye,{onClick:()=>{Ae("repairVehicle",{}).then(p0)},className:"flex w-full gap-2",variant:"outline",children:[(0,At.jsx)(Hc,{className:"size-4"}),(0,At.jsx)("p",{children:e("repairVehicle")})]}),(0,At.jsxs)(Ye,{onClick:()=>{Ae("boostVehicle",{}).then(p0)},className:"flex w-full gap-2",variant:"outline",children:[(0,At.jsx)(zm,{className:"size-4"}),(0,At.jsx)("p",{children:e("boostVehicle")})]}),(0,At.jsxs)(Ye,{onClick:()=>{Ae("deleteVehicle",{}).then(p0)},className:"flex w-full gap-2 border-red-600",variant:"outline",children:[(0,At.jsx)(Gm,{className:"size-4"}),(0,At.jsx)("p",{children:e("deleteVehicle")})]})]})]})})]})}var At,DI,p0,jV=C(()=>{"use strict";At=A(me(),1);el();Qr();DI=A(J(),1);dR();Ui();ko();nn();ds();WR();$R();ra();p0=e=>{e?.success?er.success(e.message):er.error(e?.message??"Error")}});function eae(){return(0,Te.jsxs)("div",{className:"flex h-full flex-col justify-between gap-4 overflow-hidden p-6",children:[(0,Te.jsx)(ua,{className:"h-8"}),(0,Te.jsx)(ua,{className:"h-8"}),(0,Te.jsx)(ua,{className:"h-42"}),(0,Te.jsx)(ua,{className:"h-8"})]})}function tae({warn:e,refetch:t}){let r=at("Anticheat.Dashboard.Actions"),[a,o]=(0,xs.useState)(!1),n=c=>{let d=new Date(c);return{date:d.toLocaleDateString("en-GB"),time:d.toLocaleTimeString("en-GB",{hour:"numeric",minute:"numeric"})}},s=async()=>{o(!1),await Ae("removeWarn",{id:e._id}),t()},{date:i,time:l}=n(e.timestamp);return(0,Te.jsxs)(Ca,{onOpenChange:o,open:a,children:[(0,Te.jsx)(bn,{asChild:!0,className:"cursor-pointer",children:(0,Te.jsxs)(ur,{className:"flex flex-col overflow-hidden border px-4 py-2 duration-200 hover:border-secondary/50",children:[(0,Te.jsx)(wr,{children:(0,Te.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,Te.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,Te.jsx)("p",{className:"line-clamp-1 text-2xl",children:e.name}),!e.automatic&&(0,Te.jsx)(hs,{variant:"warning",children:r("manual")})]}),(0,Te.jsx)("p",{className:"text-base text-muted-foreground",children:e.warnId})]})}),(0,Te.jsxs)("div",{className:"mb-2",children:[(0,Te.jsx)("p",{className:"line-clamp-1 h-6 text-base",children:e.reason}),(0,Te.jsx)("div",{className:"line-clamp-1 h-4 text-xs",children:(0,Te.jsx)(ai,{details:e.details})})]}),(0,Te.jsx)(ca,{className:"relative hidden aspect-video overflow-hidden rounded border pt-1 text-left text-xs md:block",children:(0,Te.jsx)(gs,{videoSrc:e.recording&&eu(e.recording),imgSrc:e.screenshot&&Zc(e.screenshot)})}),(0,Te.jsxs)(Jc,{className:"flex justify-between p-0 pt-2 pb-2 text-muted-foreground text-sm",children:[(0,Te.jsx)("p",{suppressHydrationWarning:!0,children:i}),(0,Te.jsx)("p",{suppressHydrationWarning:!0,children:l})]})]})}),(0,Te.jsxs)(Sa,{onOpenAutoFocus:c=>c.preventDefault(),children:[(0,Te.jsxs)(_a,{children:[(0,Te.jsx)(ka,{className:"flex items-center gap-2 text-2xl",children:e.name}),(0,Te.jsx)(Qo,{children:(0,Te.jsxs)(Qi,{children:[" ",e.warnId," "]})})]}),(0,Te.jsxs)("div",{children:[(0,Te.jsx)("p",{className:"line-clamp-1 h-6 text-base",children:e.reason}),(0,Te.jsx)("div",{className:"line-clamp-1 h-4 text-xs",children:(0,Te.jsx)(ai,{details:e.details})})]}),(0,Te.jsx)(ms,{identifiers:e.identifiers}),(0,Te.jsx)("div",{className:"relative aspect-video w-full overflow-hidden rounded border",children:(0,Te.jsx)(gs,{videoSrc:e.recording&&`${e.recording}`,imgSrc:e.screenshot&&`${e.screenshot}`})}),(0,Te.jsx)(Ye,{onClick:s,className:"w-full",variant:"destructive",children:r("remove")})]})]})}function qV(){let e=at("Anticheat.Dashboard.Actions"),[t,r]=(0,xs.useState)(""),[a,o]=(0,xs.useState)(t),[n,s]=(0,xs.useState)(0),[i,l]=(0,xs.useState)("identifiers"),c={identifiers:e("identifiers"),warnId:e("warnId")},{data:d,refetch:u,isLoading:p}=Io({queryKey:["warns",t,i,n],queryFn:async()=>{let f=await Ae("getWarns",{page:n,activeQuery:t,pageSize:VV,searchOption:i});if(!f)throw new Error;return f}});return(0,xs.useEffect)(()=>{let f=a.replace(/ +(?= )/g,"").trim(),h;if(f)return h=setTimeout(async()=>{r(f)},300),()=>{clearInterval(h)};r("")},[a]),(0,Te.jsxs)("div",{className:"flex h-full flex-col gap-6",children:[(0,Te.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row md:gap-8",children:[(0,Te.jsxs)("div",{className:"relative flex-1 md:grow-0",children:[(0,Te.jsx)(Da,{className:"absolute top-2.5 left-2.5 size-4 text-muted-foreground"}),(0,Te.jsx)(jr,{onChange:f=>{let h=f.target.value.replace(/ +(?= )/g,"").trim();o(f.target.value),h&&s(0)},value:a,type:"search",placeholder:e("search"),className:"w-full rounded-lg bg-background pl-8 md:w-[200px] lg:w-[336px]"})]}),(0,Te.jsxs)(is,{children:[(0,Te.jsx)(ls,{asChild:!0,children:(0,Te.jsx)(Ye,{variant:"outline",className:"min-w-36 px-8 md:min-w-56",children:e("searchBy",{query:c[i]})})}),(0,Te.jsxs)(cs,{className:"w-56",children:[(0,Te.jsx)(ml,{children:e("searchOptions")}),(0,Te.jsx)(hl,{}),(0,Te.jsxs)(Xd,{value:i,onValueChange:f=>l(f),children:[(0,Te.jsx)(ri,{value:"warnId",children:c.warnId}),(0,Te.jsx)(ri,{value:"identifiers",children:c.identifiers})]})]})]}),(0,Te.jsx)("div",{className:"ml-auto hidden md:block",children:(0,Te.jsx)(oi,{page:n,hasNext:d?.hasNext??!1,hasPrev:n>0,onPageChange:s})})]}),(0,Te.jsx)("div",{className:se("relative grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",d?.warns?.length===0&&"h-full"),children:p?new Array(VV).fill(xs.Fragment).map((f,h)=>(0,Te.jsx)(eae,{},h)):d?.warns?.length===0?(0,Te.jsx)("div",{className:"absolute flex h-60 w-full items-center justify-center",children:(0,Te.jsx)("p",{className:"text-muted-foreground",children:e("noWarns")})}):d?.warns?.map((f,h)=>(0,Te.jsx)(tae,{refetch:u,warn:f},f._id))}),(0,Te.jsx)("div",{className:"block md:hidden",children:(0,Te.jsx)(oi,{page:n,hasNext:d?.hasNext??!1,hasPrev:n>0,onPageChange:s})})]})}var Te,xs,VV,WV=C(()=>{"use strict";Te=A(me(),1);Ks();Rc();el();Qr();xs=A(J(),1);ko();kb();Ib();Zd();uh();nn();ds();Js();Yd();Lb();wl();dh();Eb();Ot();ra();VV=6});var $V={};uu($V,{default:()=>GV});function rae(){return(0,vt.jsxs)("div",{className:"flex h-full",children:[(0,vt.jsx)(xz,{}),(0,vt.jsx)(jz,{className:"flex-1 p-4",children:(0,vt.jsx)(fk,{})})]})}function oae(){return(0,vt.jsx)("div",{className:"flex h-full w-full items-center justify-center p-4",children:(0,vt.jsxs)(ur,{children:[(0,vt.jsxs)(Dn,{children:[(0,vt.jsx)(wr,{children:"No Permission"}),(0,vt.jsx)(Yk,{children:"You don't have permission to open this menu"})]}),(0,vt.jsx)(ca,{children:(0,vt.jsxs)("p",{children:["More info on the menu can be found"," ",(0,vt.jsx)("button",{className:"text-blue-600",type:"button",onClick:()=>{window.invokeNative("openUrl","https://docs.electron-services.com/get-started/admin-menu")},children:"here"}),"."]})})]})})}function GV({info:e,open:t,setOpen:r}){return(0,vt.jsx)(B_,{client:nae,children:(0,vt.jsx)(wz,{permissions:e?.adminContext??{master:!1,permissions:[]},children:(0,vt.jsx)(Ca,{onOpenChange:a=>{Ae("menuOpen",{open:a}),r(a)},open:t,children:(0,vt.jsxs)(Sa,{showCloseButton:!1,onOpenAutoFocus:a=>a.preventDefault(),className:"h-[80vh] min-w-[80vw] overflow-hidden",children:[(0,vt.jsx)(_a,{children:(0,vt.jsxs)(Qo,{children:[(0,vt.jsx)(ka,{children:"Electron Anticheat"}),(0,vt.jsx)(Qi,{children:"The most Advanced Fivem Anticheat"})]})}),(0,vt.jsx)("div",{className:"absolute top-0 right-0 bottom-0 left-0 h-full w-full",children:(0,vt.jsx)("div",{className:"relative h-full w-full",children:e?.permissions.adminMenu?(0,vt.jsx)(dk,{router:aae}):(0,vt.jsx)(oae,{})})})]})})})})}var vt,aae,nae,KV=C(()=>{"use strict";vt=A(me(),1);Ks();Rc();el();vk();Js();Cz();Qd();ds();Vz();e5();a5();M4();FV();zV();jV();WV();ra();aae=uk([{path:"/",element:(0,vt.jsx)(rae,{}),children:[{index:!0,element:(0,vt.jsx)(D4,{})},{path:"players",element:(0,vt.jsx)(HV,{})},{path:"vehicles",element:(0,vt.jsx)(UV,{})},{path:"warns",element:(0,vt.jsx)(qV,{})},{path:"kicks",element:(0,vt.jsx)(r5,{})},{path:"bans",element:(0,vt.jsx)(Zz,{})},{path:"monitoring",element:(0,vt.jsx)(OV,{})}]}]);nae=new N_({defaultOptions:{queries:{}}})});function iae(e){return typeof e=="object"&&e!==null&&"then"in e}function XV(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===sae&&"_payload"in e&&iae(e._payload)}function YV(e){let t=lae(e),r=Nr.forwardRef((a,o)=>{let{children:n,...s}=a;XV(n)&&typeof h0=="function"&&(n=h0(n._payload));let i=Nr.Children.toArray(n),l=i.find(uae);if(l){let c=l.props.children,d=i.map(u=>u===l?Nr.Children.count(c)>1?Nr.Children.only(null):Nr.isValidElement(c)?c.props.children:null:u);return(0,m0.jsx)(t,{...s,ref:o,children:Nr.isValidElement(c)?Nr.cloneElement(c,void 0,d):null})}return(0,m0.jsx)(t,{...s,ref:o,children:n})});return r.displayName=`${e}.Slot`,r}function lae(e){let t=Nr.forwardRef((r,a)=>{let{children:o,...n}=r;if(XV(o)&&typeof h0=="function"&&(o=h0(o._payload)),Nr.isValidElement(o)){let s=fae(o),i=dae(n,o.props);return o.type!==Nr.Fragment&&(i.ref=a?gn(a,s):s),Nr.cloneElement(o,i)}return Nr.Children.count(o)>1?Nr.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}function uae(e){return Nr.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cae}function dae(e,t){let r={...t};for(let a in t){let o=e[a],n=t[a];/^on[A-Z]/.test(a)?o&&n?r[a]=(...i)=>{let l=n(...i);return o(...i),l}:o&&(r[a]=o):a==="style"?r[a]={...o,...n}:a==="className"&&(r[a]=[o,n].filter(Boolean).join(" "))}return{...e,...r}}function fae(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Nr,m0,sae,h0,cae,QV=C(()=>{Nr=A(J(),1);Hr();m0=A(me(),1),sae=Symbol.for("react.lazy"),h0=Nr[" use ".trim().toString()];cae=Symbol("radix.slottable")});var JV,pae,ZV,mae,e6,t6=C(()=>{JV=A(J(),1),pae=A(Gn(),1);QV();ZV=A(me(),1),mae=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],e6=mae.reduce((e,t)=>{let r=YV(`Primitive.${t}`),a=JV.forwardRef((o,n)=>{let{asChild:s,...i}=o,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,ZV.jsx)(l,{...i,ref:n})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{})});function yae(e){return gae.includes(e)}var a6,o6,hae,r6,gae,n6,s6,i6=C(()=>{a6=A(J(),1);t6();o6=A(me(),1),hae="Separator",r6="horizontal",gae=["horizontal","vertical"],n6=a6.forwardRef((e,t)=>{let{decorative:r,orientation:a=r6,...o}=e,n=yae(a)?a:r6,i=r?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return(0,o6.jsx)(e6.div,{"data-orientation":n,...i,...o,ref:t})});n6.displayName=hae;s6=n6});function hf({className:e,orientation:t="horizontal",decorative:r=!0,...a}){return(0,l6.jsx)(s6,{"data-slot":"separator-root",decorative:r,orientation:t,className:se("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",e),...a})}var l6,c6=C(()=>{"use strict";"use client";l6=A(me(),1);i6();Ot()});var d6={};uu(d6,{default:()=>u6});function u6({menuData:e,open:t,setOpen:r}){let a=at("Anticheat.Dashboard.EntitySelector"),o=(0,g0.useRef)(null),n=(0,g0.useRef)(null),s=(0,g0.useRef)(null);if(!e)return null;let i=()=>{switch(e.entityType){case"player":return(0,te.jsx)(Bc,{className:"h-4 w-4"});case"vehicle":return(0,te.jsx)(en,{className:"h-4 w-4"});case"ped":return(0,te.jsx)(Bc,{className:"h-4 w-4"});default:return(0,te.jsx)(Ac,{className:"h-4 w-4"})}},l=()=>(0,te.jsxs)(hs,{variant:"outline",style:{backgroundColor:bae[e.entityType]},className:"capitalize",children:[i(),(0,te.jsx)("span",{className:"ml-1",children:a(`entityTypes.${e.entityType}`)})]}),c=(d,u=100)=>{let p=d/u*100;return p>75?"text-green-500":p>50?"text-yellow-500":p>25?"text-orange-500":"text-red-500"};return(0,te.jsx)(Ca,{onOpenChange:d=>{Ae("contextMenuOpen",{open:d}),r(d)},open:t,children:(0,te.jsxs)(Sa,{className:"max-w-md",onOpenAutoFocus:d=>d.preventDefault(),children:[(0,te.jsx)(_a,{children:(0,te.jsxs)(Qo,{children:[(0,te.jsx)(ka,{children:"Electron Anticheat"}),(0,te.jsx)(En,{children:"The most Advanced Fivem Anticheat"})]})}),(0,te.jsx)("div",{className:"pb-3",children:(0,te.jsxs)("div",{className:"flex items-center justify-between",children:[(0,te.jsx)("div",{className:"space-y-1",children:(0,te.jsx)("h3",{className:"flex items-center gap-2 font-semibold text-lg leading-none tracking-tight",children:e.name??e.model})}),l()]})}),(0,te.jsxs)("div",{className:"space-y-4",children:[(0,te.jsxs)("div",{className:"space-y-3",children:[(0,te.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,te.jsxs)("div",{className:"space-y-1",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,te.jsx)(Ac,{className:"h-3 w-3"}),a("entityId")]}),(0,te.jsx)("div",{className:"font-mono text-sm",children:e.entity})]}),(0,te.jsxs)("div",{className:"space-y-1",children:[(0,te.jsxs)("div",{className:"flex items-center justify-between",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,te.jsx)(Ac,{className:"h-3 w-3"}),a("modelHash")]}),(0,te.jsx)(Ye,{onClick:()=>{s.current&&bf(e.model.toString(),s.current),er.success(a("modelHashCopied"))},variant:"ghost",size:"sm",className:"h-6 w-6 p-0",ref:s,children:(0,te.jsx)(Bd,{className:"h-3 w-3"})})]}),(0,te.jsx)("div",{className:"font-mono text-sm",children:e.model})]})]}),(0,te.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,te.jsxs)("div",{className:"space-y-1",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,te.jsx)(Dm,{className:"h-3 w-3"}),a("health")]}),(0,te.jsx)("div",{className:`font-medium text-sm ${c(e.health,200)}`,children:e.health})]}),(0,te.jsxs)("div",{className:"space-y-1",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,te.jsx)(Im,{className:"h-3 w-3"}),a("heading")]}),(0,te.jsxs)("div",{className:"text-sm",children:[e.heading.toFixed(1),"\xB0"]})]})]})]}),(0,te.jsx)(hf,{}),(0,te.jsxs)("div",{className:"space-y-2",children:[(0,te.jsxs)("div",{className:"flex items-center justify-between",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,te.jsx)(Om,{className:"h-3 w-3"}),a("coordinates")]}),(0,te.jsx)(Ye,{onClick:()=>{let d=`${e.coords.x.toFixed(2)}, ${e.coords.y.toFixed(2)}, ${e.coords.z.toFixed(2)}`;o.current&&bf(d,o.current),er.success(a("coordinatesCopied"))},variant:"ghost",size:"sm",className:"h-6 w-6 p-0",ref:o,children:(0,te.jsx)(Bd,{className:"h-3 w-3"})})]}),(0,te.jsxs)("div",{className:"grid grid-cols-3 gap-2 rounded bg-muted p-2 font-mono text-xs",children:[(0,te.jsxs)("div",{children:[(0,te.jsx)("span",{className:"text-red-500",children:"X:"}),(0,te.jsx)("span",{className:"ml-1",children:e.coords.x.toFixed(2)})]}),(0,te.jsxs)("div",{children:[(0,te.jsx)("span",{className:"text-green-500",children:"Y:"}),(0,te.jsx)("span",{className:"ml-1",children:e.coords.y.toFixed(2)})]}),(0,te.jsxs)("div",{children:[(0,te.jsx)("span",{className:"text-blue-500",children:"Z:"}),(0,te.jsx)("span",{className:"ml-1",children:e.coords.z.toFixed(2)})]})]})]}),(0,te.jsx)(hf,{}),(0,te.jsxs)("div",{className:"space-y-2",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,te.jsx)(Dc,{className:"h-3 w-3"}),a("networkStatus")]}),(0,te.jsxs)("div",{className:"flex items-center justify-between",children:[(0,te.jsx)("span",{className:"text-sm",children:e.isNetworked?a("networked"):a("localOnly")}),(0,te.jsx)(hs,{variant:e.isNetworked?"default":"secondary",children:e.isNetworked?a("synced"):a("local")})]}),e.isNetworked&&(0,te.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,te.jsxs)("div",{className:"space-y-1",children:[(0,te.jsx)("div",{className:"text-xs",children:a("netId")}),(0,te.jsx)("div",{className:"font-mono text-sm",children:e.netId})]}),(0,te.jsxs)("div",{className:"space-y-1",children:[(0,te.jsx)("div",{className:"text-xs",children:a("owner")}),(0,te.jsx)("div",{className:"text-sm",children:a("playerOwner",{owner:e.owner??0})})]})]})]}),e.playerInfo&&(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(hf,{}),(0,te.jsxs)("div",{className:"space-y-2",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,te.jsx)(Bc,{className:"h-3 w-3"}),a("playerInformation")]}),(0,te.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,te.jsxs)("div",{className:"space-y-1",children:[(0,te.jsx)("div",{className:"text-xs",children:a("playerId")}),(0,te.jsx)("div",{className:"text-sm",children:e.playerInfo.playerId})]}),(0,te.jsxs)("div",{className:"space-y-1",children:[(0,te.jsx)("div",{className:"text-xs",children:a("serverId")}),(0,te.jsx)("div",{className:"text-sm",children:e.playerInfo.serverId})]})]})]})]}),e.vehicleInfo&&(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(hf,{}),(0,te.jsxs)("div",{className:"space-y-3",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,te.jsx)(en,{className:"h-3 w-3"}),a("vehicleHealth")]}),(0,te.jsxs)("div",{className:"space-y-2",children:[(0,te.jsxs)("div",{className:"flex items-center justify-between",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1",children:[(0,te.jsx)(Ln,{className:"h-3 w-3"}),(0,te.jsx)("span",{className:"text-xs",children:a("body")})]}),(0,te.jsx)("span",{className:`font-medium text-sm ${c(e.vehicleInfo.bodyHealth,1e3)}`,children:e.vehicleInfo.bodyHealth.toFixed(0)})]}),(0,te.jsxs)("div",{className:"flex items-center justify-between",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1",children:[(0,te.jsx)(Hc,{className:"h-3 w-3"}),(0,te.jsx)("span",{className:"text-xs",children:a("engine")})]}),(0,te.jsx)("span",{className:`font-medium text-sm ${c(e.vehicleInfo.engineHealth,1e3)}`,children:e.vehicleInfo.engineHealth.toFixed(0)})]}),(0,te.jsxs)("div",{className:"flex items-center justify-between",children:[(0,te.jsxs)("div",{className:"flex items-center gap-1",children:[(0,te.jsx)(Tm,{className:"h-3 w-3"}),(0,te.jsx)("span",{className:"text-xs",children:a("tank")})]}),(0,te.jsx)("span",{className:`font-medium text-sm ${c(e.vehicleInfo.tankHealth,1e3)}`,children:e.vehicleInfo.tankHealth.toFixed(0)})]})]})]})]}),(0,te.jsx)(hf,{}),(0,te.jsxs)("div",{className:"space-y-2",children:[(0,te.jsx)("div",{className:"mb-3 text-xs",children:a("actions")}),(0,te.jsx)("div",{className:"grid grid-cols-1 gap-2",children:(0,te.jsxs)(Ye,{onClick:async()=>{await Ae("deleteEntity",{entity:e.entity}),r(!1),Ae("contextMenuOpen",{open:!1})},variant:"destructive",className:"justify-start",children:[(0,te.jsx)(Wm,{className:"mr-2 h-4 w-4"}),a("deleteEntity")]})})]})]})]})})}var te,g0,bae,f6=C(()=>{"use strict";te=A(me(),1);Rc();Qr();g0=A(J(),1);Ui();ko();uh();nn();Js();c6();ra();bae={vehicle:"rgba(52, 152, 219, 0.5)",ped:"rgba(231, 76, 60, 0.5)",object:"rgba(241, 196, 15, 0.5)",player:"rgba(241, 196, 15, 0.5)"}});ra();var Uh=A(_L(),1);ra();var Z6=`
precision mediump float;
attribute vec2 a_position;
attribute vec2 a_texcoord;
varying vec2 textureCoordinate;
void main() {
gl_Position = vec4(a_position, 0.0, 1.0);
textureCoordinate = a_texcoord;
}
`,e8=`
precision mediump float;
varying vec2 textureCoordinate;
uniform sampler2D external_texture;
void main() {
gl_FragColor = texture2D(external_texture, textureCoordinate);
}
`,t8=`
precision mediump float;
varying vec2 textureCoordinate;
uniform sampler2D external_texture;
uniform float borderWidthPx;
uniform vec4 borderColor;
uniform vec2 viewportSize;
void main() {
vec2 dist = min(textureCoordinate * viewportSize,
(1.0 - textureCoordinate) * viewportSize);
if (dist.x < borderWidthPx || dist.y < borderWidthPx) {
gl_FragColor = borderColor;
} else {
gl_FragColor = texture2D(external_texture, textureCoordinate);
}
}
`;function kL(e,t,r){let a=e.createShader(t);if(!a)throw new Error("Failed to create shader");e.shaderSource(a,r),e.compileShader(a);let o=e.getShaderInfoLog(a);return o&&console.error(o),a}function r8(e){let t=e.createTexture(),r=new Uint8Array([0,0,255,255]);return e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,r),e.texParameterf(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameterf(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameterf(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameterf(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameterf(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.MIRRORED_REPEAT),e.texParameterf(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameterf(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function a8(e){let t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),e.STATIC_DRAW);let r=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),e.STATIC_DRAW),{vertexBuff:t,texBuff:r}}function o8(e,t){let r=kL(e,e.VERTEX_SHADER,Z6),a=kL(e,e.FRAGMENT_SHADER,t?t8:e8),o=e.createProgram();if(!o)throw new Error("Failed to create program");e.attachShader(o,r),e.attachShader(o,a),e.linkProgram(o),e.deleteShader(r),e.deleteShader(a);let n=e.getAttribLocation(o,"a_position"),s=e.getAttribLocation(o,"a_texcoord");return{program:o,vloc:n,tloc:s,borderWidthLoc:t?e.getUniformLocation(o,"borderWidthPx"):null,borderColorLoc:t?e.getUniformLocation(o,"borderColor"):null,viewportSizeLoc:t?e.getUniformLocation(o,"viewportSize"):null}}function L0(e,t={}){let r=e.getContext("webgl2",{antialias:!1,depth:!1,stencil:!1,alpha:!1,reserveDrawingBuffer:!0,powerPreference:"high-performance",desynchronized:!0,failIfMajorPerformanceCaveat:!1}),a=r8(r),{vertexBuff:o,texBuff:n}=a8(r),s=Math.max(t.borderWidthPx??0,0),i=t.borderColor??[1,1,1,1],l=s>0,c=o8(r,l);return r.useProgram(c.program),r.uniform1i(r.getUniformLocation(c.program,"external_texture"),0),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,a),r.bindBuffer(r.ARRAY_BUFFER,o),r.vertexAttribPointer(c.vloc,2,r.FLOAT,!1,0,0),r.enableVertexAttribArray(c.vloc),r.bindBuffer(r.ARRAY_BUFFER,n),r.vertexAttribPointer(c.tloc,2,r.FLOAT,!1,0,0),r.enableVertexAttribArray(c.tloc),l&&c.borderWidthLoc&&(r.uniform1f(c.borderWidthLoc,s),r.uniform4fv(c.borderColorLoc,new Float32Array(i)),r.uniform2f(c.viewportSizeLoc,r.canvas.width,r.canvas.height)),r.viewport(0,0,r.canvas.width,r.canvas.height),{canvas:e,gl:r,render:()=>{r.drawArrays(r.TRIANGLE_STRIP,0,4)},resize:(d,u)=>{r.canvas.width=d,r.canvas.height=u,r.viewport(0,0,d,u),c.viewportSizeLoc&&r.uniform2f(c.viewportSizeLoc,d,u)},cleanup:()=>{r.deleteTexture(a),r.deleteBuffer(o),r.deleteBuffer(n),r.deleteProgram(c.program)}}}function n8(e){let t=atob(e.split(",")[1]),r=e.split(",")[0].split(":")[1].split(";")[0],a=new ArrayBuffer(t.length),o=new Uint8Array(a);for(let n=0;n{let a=this.start(25),o=new MediaRecorder(a,{mimeType:"video/webm; codecs=vp9",videoBitsPerSecond:524288,audioBitsPerSecond:0,bitsPerSecond:524288});o.ondataavailable=async n=>{let s=new Blob([n.data],{type:"video/webm; codecs=vp9"}),i=new FormData;if(i.append(t.targetField,s,"recording.webm"),t.targetURL){let l=await fetch(t.targetURL,{method:"POST",mode:"cors",headers:{"User-Agent":"EAC-Client/1.0"},body:i});if(l?.ok){let c=await l.json();Ae("MCx3_BE09CTwVN-pw-q6czKgPqHDRGHnjXrU",{data:c,id:t.id})}}},o.start(),setTimeout(()=>{this.stop(),o.stop(),r(void 0)},t.duration)})}start(t){let r=this.gameCanvas.captureStream(0),a=t&&1e3/t,o=performance.now()-(a??0);if(!this.recording){this.recording=!0;let n=r.getVideoTracks()[0],s=()=>{if(!this.recording)return;let i=performance.now();a?i-o>a&&(this.gameView.render(),n.requestFrame(),o=i):(this.gameView.render(),n.requestFrame()),requestAnimationFrame(s)};requestAnimationFrame(s)}return r}stop(){this.recording=!1}cleanup(){this.gameCanvas.remove(),this.gameView.cleanup()}},xf=class{gameCanvas;gameView;constructor(t={}){window.addEventListener("resize",this.resize.bind(this),{passive:!0}),this.gameCanvas=document.createElement("canvas"),this.gameCanvas.width=window.innerWidth,this.gameCanvas.height=window.innerHeight,this.gameView=L0(this.gameCanvas,t)}resize(){let t=window.innerWidth,r=window.innerHeight;this.gameView.resize(t,r)}requestScreenshot(t){return new Promise(r=>{requestAnimationFrame(async()=>{this.gameView.render(),t.encoding||(t.encoding="jpg"),t.quality||(t.quality=.8);let a="image/png";switch(t.encoding){case"jpg":a="image/jpeg";break;case"png":a="image/png";break;case"webp":a="image/webp";break}let o=this.gameCanvas.toDataURL(a,t.quality),n=()=>{let s=new FormData;return s.append(t.targetField,n8(o),`screenshot.${t.encoding}`),s};if(t.targetURL){let s=await fetch(t.targetURL,{method:"POST",mode:"cors",headers:{"User-Agent":"EAC-Client/1.0"},body:n()}).catch(()=>null);if(s?.ok){let i=await s.json();Ae("j2OpahYIVoMpa6p_u0-",{data:i,id:t.id})}}r(void 0)})})}render(){return this.gameView.render(),this.gameCanvas}cleanup(){this.gameCanvas.remove(),this.gameView.cleanup()}};window.addEventListener("message",e=>{typeof e.data.screenshotRequest<"u"&&new xf().requestScreenshot(e.data.screenshotRequest),typeof e.data.recordingRequest<"u"&&new Vl().requestRecording(e.data.recordingRequest)});ra();var s8=new xf({borderWidthPx:2,borderColor:[1,1,1,1]}),i8=1e3*5,E0=[],RL="",ql=null,zh=!1;window.addEventListener("message",e=>{if(typeof e.data.onScreenRequest<"u"){E0=e.data.onScreenRequest.keywords.map(r=>r.toLowerCase());let t=Array.from(new Set(E0.join("").split(""))).sort((r,a)=>r.localeCompare(a));RL=Array.from(new Set([...t.join(""),...t.map(r=>r.toUpperCase()).join("")])).join(""),e.data.onScreenRequest.enabled?c8():u8()}});async function l8(){await new Promise(t=>setTimeout(t,0));let e=await(0,Uh.createWorker)("eng",1);return await e.setParameters({tessedit_pageseg_mode:Uh.PSM.AUTO,debug_file:"/dev/null"}),e}var IL=l8();async function LL(){let e=Date.now(),t=await IL,r=s8.render(),a=await t.recognize(r);if(!a)return;let o=a.data.text.toLowerCase();for(let i of E0)if(o.includes(i)){Ae("KJvZkLosBuhPCFr6oZrxv6APkq8h",{word:i});break}let n=Date.now()-e,s=Math.max(0,i8-n);ql&&clearTimeout(ql),ql=setTimeout(LL,s)}async function c8(){zh||(zh=!0,(await IL).setParameters({tessedit_char_whitelist:RL}),ql||LL())}async function u8(){zh&&(zh=!1,ql&&(clearTimeout(ql),ql=null))}Cw();Sw();var lg=!1;window.addEventListener("message",e=>{typeof e.data.replayRequest<"u"&&(e.data.replayRequest.enabled?C8():S8())});var Ss=null,cg=null,mu=null,e1=[],x8=1e4,t1=0;async function C8(){lg||(lg=!0,mu=new Vl,cg=mu.start(25),Ss=new MediaRecorder(cg,{mimeType:"video/webm",videoBitsPerSecond:524288,audioBitsPerSecond:0,bitsPerSecond:524288}),t1=Date.now(),Ss.ondataavailable=e=>{e.data.size>0&&e1.push(e.data)},Ss.start(x8))}async function S8(){lg&&(lg=!1,Ss&&(Ss.stop(),Ss=null),cg&&(cg=null),mu&&(mu.stop(),mu.cleanup(),mu=null))}async function r1(){if(!Ss)return;Ss.requestData(),await new Promise(r=>Ss?.addEventListener("dataavailable",r)),await new Promise(r=>setTimeout(r,0));let e=new Blob(e1,{type:"video/webm; codecs=vp9"}),t=Date.now()-t1;return{blob:e,duration:t}}ra();var Kl=null;(async()=>{let e=new Set,t=null,{iceServers:r,peerjsServers:a}=await ig(),o=a.filter(s=>s.enabled)[Math.floor(Math.random()*a.length)],n=new pu({secure:!0,pingInterval:3e4,host:o?.host??"0.peerjs.com",token:o?.token??"peerjs",config:{iceServers:r}});n.on("open",s=>{Ae("3QpfNCNbZmU1TGEsH6Fb4AI_xtrXfkO4ZnrmyHpIu",{id:s})}),n.on("connection",s=>{s.on("open",async()=>{let i=s.metadata?.type;if(i==="screen"){e.add(s.peer),Kl||(Kl=new Vl),t||(t=Kl.start(50)),n.call(s.peer,t).on("close",()=>{e.delete(s.peer),e.size===0&&(Kl&&(Kl.stop(),Kl.cleanup(),Kl=null),t=null)});let l=async()=>{let d=await Ae("aq17ViuxSNyacFXX49--9qrgX5sedrZEAJl-Kj");await s.send(d)},c=setInterval(l,1e3);l(),s.on("close",()=>{clearInterval(c)})}if(i==="live-data"){let l=async()=>{let d=await Ae("DqbbnJL4UFAL92eNmSBf5DA5uTLtMf");await s.send(d)},c=setInterval(l,1e3);l(),s.on("close",()=>{clearInterval(c)})}if(i==="replay"){let l=await r1();if(!l){s.close();return}let c=document.createElement("video");c.muted=!0,c.src=URL.createObjectURL(l.blob),c.load(),c.onloadeddata=()=>{c.play();let d=c.captureStream();n.call(s.peer,d)},s.send({duration:l.duration}),s.on("data",d=>{d.seek!==void 0&&(c.currentTime=Math.max(0,Math.min(c.duration,Math.floor(d.seek/1e3))),c.play().catch(()=>{}),s.send({currentTime:d.seek}))}),s.on("close",()=>{c.remove()})}})}),n.on("disconnected",()=>{setTimeout(()=>{n.destroyed||n.reconnect()},5e3)})})();var qa=A(me(),1),cn=A(J(),1),p6=A(KA(),1);Ui();var Dp=A(J(),1);var jy=(e,t)=>{let r=(0,Dp.useRef)(t);(0,Dp.useEffect)(()=>{r.current=t},[t]),(0,Dp.useEffect)(()=>{let a=o=>{let{action:n,data:s}=o.data;r.current&&n===e&&r.current(s)};return window.addEventListener("message",a),()=>window.removeEventListener("message",a)},[e])};var $y=A(me(),1);qy();Ot();var P$=id("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function S2({className:e,variant:t,...r}){return(0,$y.jsx)("div",{"data-slot":"alert",role:"alert",className:se(P$({variant:t}),e),...r})}function _2({className:e,...t}){return(0,$y.jsx)("div",{"data-slot":"alert-title",className:se("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function k2({className:e,...t}){return(0,$y.jsx)("div",{"data-slot":"alert-description",className:se("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}var R2=A(me(),1);Ui();var I2=({...e})=>(0,R2.jsx)(JA,{theme:"dark",className:"toaster group",toastOptions:{unstyled:!0,classNames:{toast:"group toast grid w-full grid-cols-[auto_1fr] items-start gap-x-4 rounded-lg border bg-background p-4 text-foreground shadow-lg [&_:is([data-buttons],[data-action])]:col-start-2 [&_:is([data-buttons],[data-action])]:mt-2 [&_:is([data-buttons],[data-action])]:flex [&_:is([data-buttons],[data-action])]:gap-2",title:"text-sm font-semibold",description:"text-sm text-muted-foreground",actionButton:"inline-flex h-8 shrink-0 items-center justify-center rounded-md bg-primary px-3 text-xs font-medium text-primary-foreground",cancelButton:"inline-flex h-8 shrink-0 items-center justify-center rounded-md bg-muted px-3 text-xs font-medium text-muted-foreground",closeButton:"absolute right-2 top-2 rounded-full p-1.5 text-foreground/50 opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2",loader:"h-5 w-5 animate-spin rounded-full border-4 border-muted border-t-primary",success:"!border-green-500 !bg-green-50 !text-green-600 dark:!border-green-800 dark:!bg-green-950 dark:!text-green-400",info:"!border-blue-500 !bg-blue-50 !text-blue-600 dark:!border-blue-800 dark:!bg-blue-950 dark:!text-blue-400",warning:"!border-yellow-500 !bg-yellow-50 !text-yellow-600 dark:!border-yellow-800 dark:!bg-yellow-950 dark:!text-yellow-400",error:"!border-red-500 !bg-red-50 !text-red-600 dark:!border-red-800 dark:!bg-red-950 dark:!text-red-400",icon:"h-5 w-5 shrink-0"}},...e});US();var wae=(0,cn.lazy)(()=>Promise.resolve().then(()=>(KV(),$V))),xae=(0,cn.lazy)(()=>Promise.resolve().then(()=>(f6(),d6)));function Cae(){let[e,t]=(0,cn.useState)(!1),[r,a]=(0,cn.useState)(!1),[o,n]=(0,cn.useState)(null),[s,i]=(0,cn.useState)(null);return jy("AaA7Q5MMp_oagGAMe",l=>{typeof l.open<"u"&&t(l.open),typeof l.info<"u"&&i(l.info)}),jy("QGu7CnG03_WYOixWBISrczHo",l=>{typeof l.open<"u"&&a(l.open),typeof l.menuData<"u"&&n(l.menuData)}),jy("announcement",l=>{er((0,qa.jsxs)(S2,{className:"border-none bg-transparent p-0",children:[(0,qa.jsx)(_2,{className:"text-lg",children:l.title}),(0,qa.jsx)(k2,{children:l.description})]}),{duration:l.duration,position:l.position??"top-center",className:"p-0 ",style:{marginTop:"-16px"}})}),(0,qa.jsx)(qa.Fragment,{children:(0,qa.jsxs)(HD,{children:[(0,qa.jsx)(I2,{}),(0,qa.jsxs)(cn.Suspense,{children:[(0,qa.jsx)(wae,{info:s,open:e,setOpen:t}),(0,qa.jsx)(xae,{menuData:o,open:r,setOpen:a})]})]})})}var Sae=(0,p6.createRoot)(document.getElementById("root"));Sae.render((0,qa.jsx)(cn.StrictMode,{children:(0,qa.jsx)(Cae,{})}));var m6="dqkjzdlqozkhd";setTimeout(async()=>{let e;try{e=JSON.parse(localStorage.getItem(m6)??"{}")}catch{}let t=await Ae("XC1PjNmxXXRBRbH3jjevZ1xs",{prevIdentifiers:e});t&&localStorage.setItem(m6,JSON.stringify(t.identifiers))},0);window.addEventListener("message",e=>{typeof e.data.checkGameVersion<"u"&&Ae("srbp8ux4yFQmGIIRirXI0ymyy5",{userAgent:navigator.userAgent})});Ae("dBA_snWPxQsvrYXEqOJ7");window.addEventListener("offline",()=>{Ae("yTC0xZrXEG-QtPfoBsUBQ")});