diff --git a/assets/index-Qy9Wgr8q.js b/assets/index-DzJWcF2Q.js similarity index 95% rename from assets/index-Qy9Wgr8q.js rename to assets/index-DzJWcF2Q.js index b5a9b08..af18e47 100644 --- a/assets/index-Qy9Wgr8q.js +++ b/assets/index-DzJWcF2Q.js @@ -69,7 +69,7 @@ Error generating stack: `+c.message+` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(i){return i instanceof this?i:new this(i)}static concat(i,...s){const o=new this(i);return s.forEach(a=>o.set(a)),o}static accessor(i){const o=(this[$internals]=this[$internals]={accessors:{}}).accessors,a=this.prototype;function c(d){const g=normalizeHeader(d);o[g]||(buildAccessors(a,d),o[g]=!0)}return utils$1.isArray(i)?i.forEach(c):c(i),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders.prototype,({value:e},i)=>{let s=i[0].toUpperCase()+i.slice(1);return{get:()=>e,set(o){this[s]=o}}});utils$1.freezeMethods(AxiosHeaders);function transformData(e,i){const s=this||defaults,o=i||s,a=AxiosHeaders.from(o.headers);let c=o.data;return utils$1.forEach(e,function(g){c=g.call(s,c,a.normalize(),i?i.status:void 0)}),a.normalize(),c}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,i,s){AxiosError.call(this,e??"canceled",AxiosError.ERR_CANCELED,i,s),this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(e,i,s){const o=s.config.validateStatus;!s.status||!o||o(s.status)?e(s):i(new AxiosError("Request failed with status code "+s.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function parseProtocol(e){const i=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return i&&i[1]||""}function speedometer(e,i){e=e||10;const s=new Array(e),o=new Array(e);let a=0,c=0,d;return i=i!==void 0?i:1e3,function(b){const _=Date.now(),j=o[c];d||(d=_),s[a]=b,o[a]=_;let _e=c,$=0;for(;_e!==a;)$+=s[_e++],_e=_e%e;if(a=(a+1)%e,a===c&&(c=(c+1)%e),_-d{s=j,a=null,c&&(clearTimeout(c),c=null),e.apply(null,_)};return[(..._)=>{const j=Date.now(),_e=j-s;_e>=o?d(_,j):(a=_,c||(c=setTimeout(()=>{c=null,d(a)},o-_e)))},()=>a&&d(a)]}const progressEventReducer=(e,i,s=3)=>{let o=0;const a=speedometer(50,250);return throttle(c=>{const d=c.loaded,g=c.lengthComputable?c.total:void 0,b=d-o,_=a(b),j=d<=g;o=d;const _e={loaded:d,total:g,progress:g?d/g:void 0,bytes:b,rate:_||void 0,estimated:_&&g&&j?(g-d)/_:void 0,event:c,lengthComputable:g!=null,[i?"download":"upload"]:!0};e(_e)},s)},progressEventDecorator=(e,i)=>{const s=e!=null;return[o=>i[0]({lengthComputable:s,total:e,loaded:o}),i[1]]},asyncDecorator=e=>(...i)=>utils$1.asap(()=>e(...i)),isURLSameOrigin=platform$1.hasStandardBrowserEnv?function(){const i=platform$1.navigator&&/(msie|trident)/i.test(platform$1.navigator.userAgent),s=document.createElement("a");let o;function a(c){let d=c;return i&&(s.setAttribute("href",d),d=s.href),s.setAttribute("href",d),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}return o=a(window.location.href),function(d){const g=utils$1.isString(d)?a(d):d;return g.protocol===o.protocol&&g.host===o.host}}():function(){return function(){return!0}}(),cookies=platform$1.hasStandardBrowserEnv?{write(e,i,s,o,a,c){const d=[e+"="+encodeURIComponent(i)];utils$1.isNumber(s)&&d.push("expires="+new Date(s).toGMTString()),utils$1.isString(o)&&d.push("path="+o),utils$1.isString(a)&&d.push("domain="+a),c===!0&&d.push("secure"),document.cookie=d.join("; ")},read(e){const i=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,i){return i?e.replace(/\/?\/$/,"")+"/"+i.replace(/^\/+/,""):e}function buildFullPath(e,i){return e&&!isAbsoluteURL(i)?combineURLs(e,i):i}const headersToObject=e=>e instanceof AxiosHeaders?{...e}:e;function mergeConfig(e,i){i=i||{};const s={};function o(_,j,_e){return utils$1.isPlainObject(_)&&utils$1.isPlainObject(j)?utils$1.merge.call({caseless:_e},_,j):utils$1.isPlainObject(j)?utils$1.merge({},j):utils$1.isArray(j)?j.slice():j}function a(_,j,_e){if(utils$1.isUndefined(j)){if(!utils$1.isUndefined(_))return o(void 0,_,_e)}else return o(_,j,_e)}function c(_,j){if(!utils$1.isUndefined(j))return o(void 0,j)}function d(_,j){if(utils$1.isUndefined(j)){if(!utils$1.isUndefined(_))return o(void 0,_)}else return o(void 0,j)}function g(_,j,_e){if(_e in i)return o(_,j);if(_e in e)return o(void 0,_)}const b={url:c,method:c,data:c,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:g,headers:(_,j)=>a(headersToObject(_),headersToObject(j),!0)};return utils$1.forEach(Object.keys(Object.assign({},e,i)),function(j){const _e=b[j]||a,$=_e(e[j],i[j],j);utils$1.isUndefined($)&&_e!==g||(s[j]=$)}),s}const resolveConfig=e=>{const i=mergeConfig({},e);let{data:s,withXSRFToken:o,xsrfHeaderName:a,xsrfCookieName:c,headers:d,auth:g}=i;i.headers=d=AxiosHeaders.from(d),i.url=buildURL(buildFullPath(i.baseURL,i.url),e.params,e.paramsSerializer),g&&d.set("Authorization","Basic "+btoa((g.username||"")+":"+(g.password?unescape(encodeURIComponent(g.password)):"")));let b;if(utils$1.isFormData(s)){if(platform$1.hasStandardBrowserEnv||platform$1.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if((b=d.getContentType())!==!1){const[_,...j]=b?b.split(";").map(_e=>_e.trim()).filter(Boolean):[];d.setContentType([_||"multipart/form-data",...j].join("; "))}}if(platform$1.hasStandardBrowserEnv&&(o&&utils$1.isFunction(o)&&(o=o(i)),o||o!==!1&&isURLSameOrigin(i.url))){const _=a&&c&&cookies.read(c);_&&d.set(a,_)}return i},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(s,o){const a=resolveConfig(e);let c=a.data;const d=AxiosHeaders.from(a.headers).normalize();let{responseType:g,onUploadProgress:b,onDownloadProgress:_}=a,j,_e,$,st,it;function nt(){st&&st(),it&&it(),a.cancelToken&&a.cancelToken.unsubscribe(j),a.signal&&a.signal.removeEventListener("abort",j)}let at=new XMLHttpRequest;at.open(a.method.toUpperCase(),a.url,!0),at.timeout=a.timeout;function et(){if(!at)return;const tt=AxiosHeaders.from("getAllResponseHeaders"in at&&at.getAllResponseHeaders()),ct={data:!g||g==="text"||g==="json"?at.responseText:at.response,status:at.status,statusText:at.statusText,headers:tt,config:e,request:at};settle(function(dt){s(dt),nt()},function(dt){o(dt),nt()},ct),at=null}"onloadend"in at?at.onloadend=et:at.onreadystatechange=function(){!at||at.readyState!==4||at.status===0&&!(at.responseURL&&at.responseURL.indexOf("file:")===0)||setTimeout(et)},at.onabort=function(){at&&(o(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,at)),at=null)},at.onerror=function(){o(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,at)),at=null},at.ontimeout=function(){let ot=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const ct=a.transitional||transitionalDefaults;a.timeoutErrorMessage&&(ot=a.timeoutErrorMessage),o(new AxiosError(ot,ct.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,at)),at=null},c===void 0&&d.setContentType(null),"setRequestHeader"in at&&utils$1.forEach(d.toJSON(),function(ot,ct){at.setRequestHeader(ct,ot)}),utils$1.isUndefined(a.withCredentials)||(at.withCredentials=!!a.withCredentials),g&&g!=="json"&&(at.responseType=a.responseType),_&&([$,it]=progressEventReducer(_,!0),at.addEventListener("progress",$)),b&&at.upload&&([_e,st]=progressEventReducer(b),at.upload.addEventListener("progress",_e),at.upload.addEventListener("loadend",st)),(a.cancelToken||a.signal)&&(j=tt=>{at&&(o(!tt||tt.type?new CanceledError(null,e,at):tt),at.abort(),at=null)},a.cancelToken&&a.cancelToken.subscribe(j),a.signal&&(a.signal.aborted?j():a.signal.addEventListener("abort",j)));const rt=parseProtocol(a.url);if(rt&&platform$1.protocols.indexOf(rt)===-1){o(new AxiosError("Unsupported protocol "+rt+":",AxiosError.ERR_BAD_REQUEST,e));return}at.send(c||null)})},composeSignals=(e,i)=>{const{length:s}=e=e?e.filter(Boolean):[];if(i||s){let o=new AbortController,a;const c=function(_){if(!a){a=!0,g();const j=_ instanceof Error?_:this.reason;o.abort(j instanceof AxiosError?j:new CanceledError(j instanceof Error?j.message:j))}};let d=i&&setTimeout(()=>{d=null,c(new AxiosError(`timeout ${i} of ms exceeded`,AxiosError.ETIMEDOUT))},i);const g=()=>{e&&(d&&clearTimeout(d),d=null,e.forEach(_=>{_.unsubscribe?_.unsubscribe(c):_.removeEventListener("abort",c)}),e=null)};e.forEach(_=>_.addEventListener("abort",c));const{signal:b}=o;return b.unsubscribe=()=>utils$1.asap(g),b}},streamChunk=function*(e,i){let s=e.byteLength;if(s{const a=readBytes(e,i);let c=0,d,g=b=>{d||(d=!0,o&&o(b))};return new ReadableStream({async pull(b){try{const{done:_,value:j}=await a.next();if(_){g(),b.close();return}let _e=j.byteLength;if(s){let $=c+=_e;s($)}b.enqueue(new Uint8Array(j))}catch(_){throw g(_),_}},cancel(b){return g(b),a.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(e=>i=>e.encode(i))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),test$1=(e,...i)=>{try{return!!e(...i)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test$1(()=>{let e=!1;const i=new Request(platform$1.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!i}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test$1(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(e=>e.body)};isFetchSupported&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!resolvers[i]&&(resolvers[i]=utils$1.isFunction(e[i])?s=>s[i]():(s,o)=>{throw new AxiosError(`Response type '${i}' is not supported`,AxiosError.ERR_NOT_SUPPORT,o)})})})(new Response);const getBodyLength=async e=>{if(e==null)return 0;if(utils$1.isBlob(e))return e.size;if(utils$1.isSpecCompliantForm(e))return(await new Request(platform$1.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(e)||utils$1.isArrayBuffer(e))return e.byteLength;if(utils$1.isURLSearchParams(e)&&(e=e+""),utils$1.isString(e))return(await encodeText(e)).byteLength},resolveBodyLength=async(e,i)=>{const s=utils$1.toFiniteNumber(e.getContentLength());return s??getBodyLength(i)},fetchAdapter=isFetchSupported&&(async e=>{let{url:i,method:s,data:o,signal:a,cancelToken:c,timeout:d,onDownloadProgress:g,onUploadProgress:b,responseType:_,headers:j,withCredentials:_e="same-origin",fetchOptions:$}=resolveConfig(e);_=_?(_+"").toLowerCase():"text";let st=composeSignals([a,c&&c.toAbortSignal()],d),it;const nt=st&&st.unsubscribe&&(()=>{st.unsubscribe()});let at;try{if(b&&supportsRequestStream&&s!=="get"&&s!=="head"&&(at=await resolveBodyLength(j,o))!==0){let ct=new Request(i,{method:"POST",body:o,duplex:"half"}),ft;if(utils$1.isFormData(o)&&(ft=ct.headers.get("content-type"))&&j.setContentType(ft),ct.body){const[dt,ht]=progressEventDecorator(at,progressEventReducer(asyncDecorator(b)));o=trackStream(ct.body,DEFAULT_CHUNK_SIZE,dt,ht)}}utils$1.isString(_e)||(_e=_e?"include":"omit");const et="credentials"in Request.prototype;it=new Request(i,{...$,signal:st,method:s.toUpperCase(),headers:j.normalize().toJSON(),body:o,duplex:"half",credentials:et?_e:void 0});let rt=await fetch(it);const tt=supportsResponseStream&&(_==="stream"||_==="response");if(supportsResponseStream&&(g||tt&&nt)){const ct={};["status","statusText","headers"].forEach(yt=>{ct[yt]=rt[yt]});const ft=utils$1.toFiniteNumber(rt.headers.get("content-length")),[dt,ht]=g&&progressEventDecorator(ft,progressEventReducer(asyncDecorator(g),!0))||[];rt=new Response(trackStream(rt.body,DEFAULT_CHUNK_SIZE,dt,()=>{ht&&ht(),nt&&nt()}),ct)}_=_||"text";let ot=await resolvers[utils$1.findKey(resolvers,_)||"text"](rt,e);return!tt&&nt&&nt(),await new Promise((ct,ft)=>{settle(ct,ft,{data:ot,headers:AxiosHeaders.from(rt.headers),status:rt.status,statusText:rt.statusText,config:e,request:it})})}catch(et){throw nt&&nt(),et&&et.name==="TypeError"&&/fetch/i.test(et.message)?Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,it),{cause:et.cause||et}):AxiosError.from(et,et&&et.code,e,it)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(e,i)=>{if(e){try{Object.defineProperty(e,"name",{value:i})}catch{}Object.defineProperty(e,"adapterName",{value:i})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||e===null||e===!1,adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:i}=e;let s,o;const a={};for(let c=0;c`adapter ${g} `+(b===!1?"is not supported by the environment":"is not available in the build"));let d=i?c.length>1?`since : `+c.map(renderReason).join(` `):" "+renderReason(c[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return o},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults.adapter)(e).then(function(o){return throwIfCancellationRequested(e),o.data=transformData.call(e,e.transformResponse,o),o.headers=AxiosHeaders.from(o.headers),o},function(o){return isCancel(o)||(throwIfCancellationRequested(e),o&&o.response&&(o.response.data=transformData.call(e,e.transformResponse,o.response),o.response.headers=AxiosHeaders.from(o.response.headers))),Promise.reject(o)})}const VERSION="1.7.7",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,i)=>{validators$1[e]=function(o){return typeof o===e||"a"+(i<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function(i,s,o){function a(c,d){return"[Axios v"+VERSION+"] Transitional option '"+c+"'"+d+(o?". "+o:"")}return(c,d,g)=>{if(i===!1)throw new AxiosError(a(d," has been removed"+(s?" in "+s:"")),AxiosError.ERR_DEPRECATED);return s&&!deprecatedWarnings[d]&&(deprecatedWarnings[d]=!0,console.warn(a(d," has been deprecated since v"+s+" and will be removed in the near future"))),i?i(c,d,g):!0}};function assertOptions(e,i,s){if(typeof e!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let a=o.length;for(;a-- >0;){const c=o[a],d=i[c];if(d){const g=e[c],b=g===void 0||d(g,c,e);if(b!==!0)throw new AxiosError("option "+c+" must be "+b,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new AxiosError("Unknown option "+c,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(i){this.defaults=i,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(i,s){try{return await this._request(i,s)}catch(o){if(o instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;const c=a.stack?a.stack.replace(/^.+\n/,""):"";try{o.stack?c&&!String(o.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(o.stack+=` -`+c):o.stack=c}catch{}}throw o}}_request(i,s){typeof i=="string"?(s=s||{},s.url=i):s=i||{},s=mergeConfig(this.defaults,s);const{transitional:o,paramsSerializer:a,headers:c}=s;o!==void 0&&validator.assertOptions(o,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),a!=null&&(utils$1.isFunction(a)?s.paramsSerializer={serialize:a}:validator.assertOptions(a,{encode:validators.function,serialize:validators.function},!0)),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=c&&utils$1.merge(c.common,c[s.method]);c&&utils$1.forEach(["delete","get","head","post","put","patch","common"],it=>{delete c[it]}),s.headers=AxiosHeaders.concat(d,c);const g=[];let b=!0;this.interceptors.request.forEach(function(nt){typeof nt.runWhen=="function"&&nt.runWhen(s)===!1||(b=b&&nt.synchronous,g.unshift(nt.fulfilled,nt.rejected))});const _=[];this.interceptors.response.forEach(function(nt){_.push(nt.fulfilled,nt.rejected)});let j,_e=0,$;if(!b){const it=[dispatchRequest.bind(this),void 0];for(it.unshift.apply(it,g),it.push.apply(it,_),$=it.length,j=Promise.resolve(s);_e<$;)j=j.then(it[_e++],it[_e++]);return j}$=g.length;let st=s;for(_e=0;_e<$;){const it=g[_e++],nt=g[_e++];try{st=it(st)}catch(at){nt.call(this,at);break}}try{j=dispatchRequest.call(this,st)}catch(it){return Promise.reject(it)}for(_e=0,$=_.length;_e<$;)j=j.then(_[_e++],_[_e++]);return j}getUri(i){i=mergeConfig(this.defaults,i);const s=buildFullPath(i.baseURL,i.url);return buildURL(s,i.params,i.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function(i){Axios.prototype[i]=function(s,o){return this.request(mergeConfig(o||{},{method:i,url:s,data:(o||{}).data}))}});utils$1.forEach(["post","put","patch"],function(i){function s(o){return function(c,d,g){return this.request(mergeConfig(g||{},{method:i,headers:o?{"Content-Type":"multipart/form-data"}:{},url:c,data:d}))}}Axios.prototype[i]=s(),Axios.prototype[i+"Form"]=s(!0)});class CancelToken{constructor(i){if(typeof i!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(c){s=c});const o=this;this.promise.then(a=>{if(!o._listeners)return;let c=o._listeners.length;for(;c-- >0;)o._listeners[c](a);o._listeners=null}),this.promise.then=a=>{let c;const d=new Promise(g=>{o.subscribe(g),c=g}).then(a);return d.cancel=function(){o.unsubscribe(c)},d},i(function(c,d,g){o.reason||(o.reason=new CanceledError(c,d,g),s(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]}unsubscribe(i){if(!this._listeners)return;const s=this._listeners.indexOf(i);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const i=new AbortController,s=o=>{i.abort(o)};return this.subscribe(s),i.signal.unsubscribe=()=>this.unsubscribe(s),i.signal}static source(){let i;return{token:new CancelToken(function(a){i=a}),cancel:i}}}function spread(e){return function(s){return e.apply(null,s)}}function isAxiosError(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([e,i])=>{HttpStatusCode[i]=e});function createInstance(e){const i=new Axios(e),s=bind(Axios.prototype.request,i);return utils$1.extend(s,Axios.prototype,i,{allOwnKeys:!0}),utils$1.extend(s,i,null,{allOwnKeys:!0}),s.create=function(a){return createInstance(mergeConfig(e,a))},s}const axios=createInstance(defaults);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function(i){return Promise.all(i)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode;axios.default=axios;const serverUrl="http://37.27.81.8:3005/api";class Global{static async getUser(){try{return(await this.httpGet("/auth/me")).user}catch{throw new Error("User not found")}}static async httpGet(i,s={}){try{return(await this.axios.get(i,{params:s,withCredentials:!0})).data}catch{throw new Error("Error fetching data")}}static async httpPost(i,s){try{return(await this.axios.post(i,s,{withCredentials:!0})).data}catch{throw new Error("Error sending data")}}}er(Global,"user"),er(Global,"token"),er(Global,"axios",axios.create({baseURL:serverUrl,withCredentials:!0}));/** +`+c):o.stack=c}catch{}}throw o}}_request(i,s){typeof i=="string"?(s=s||{},s.url=i):s=i||{},s=mergeConfig(this.defaults,s);const{transitional:o,paramsSerializer:a,headers:c}=s;o!==void 0&&validator.assertOptions(o,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),a!=null&&(utils$1.isFunction(a)?s.paramsSerializer={serialize:a}:validator.assertOptions(a,{encode:validators.function,serialize:validators.function},!0)),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=c&&utils$1.merge(c.common,c[s.method]);c&&utils$1.forEach(["delete","get","head","post","put","patch","common"],it=>{delete c[it]}),s.headers=AxiosHeaders.concat(d,c);const g=[];let b=!0;this.interceptors.request.forEach(function(nt){typeof nt.runWhen=="function"&&nt.runWhen(s)===!1||(b=b&&nt.synchronous,g.unshift(nt.fulfilled,nt.rejected))});const _=[];this.interceptors.response.forEach(function(nt){_.push(nt.fulfilled,nt.rejected)});let j,_e=0,$;if(!b){const it=[dispatchRequest.bind(this),void 0];for(it.unshift.apply(it,g),it.push.apply(it,_),$=it.length,j=Promise.resolve(s);_e<$;)j=j.then(it[_e++],it[_e++]);return j}$=g.length;let st=s;for(_e=0;_e<$;){const it=g[_e++],nt=g[_e++];try{st=it(st)}catch(at){nt.call(this,at);break}}try{j=dispatchRequest.call(this,st)}catch(it){return Promise.reject(it)}for(_e=0,$=_.length;_e<$;)j=j.then(_[_e++],_[_e++]);return j}getUri(i){i=mergeConfig(this.defaults,i);const s=buildFullPath(i.baseURL,i.url);return buildURL(s,i.params,i.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function(i){Axios.prototype[i]=function(s,o){return this.request(mergeConfig(o||{},{method:i,url:s,data:(o||{}).data}))}});utils$1.forEach(["post","put","patch"],function(i){function s(o){return function(c,d,g){return this.request(mergeConfig(g||{},{method:i,headers:o?{"Content-Type":"multipart/form-data"}:{},url:c,data:d}))}}Axios.prototype[i]=s(),Axios.prototype[i+"Form"]=s(!0)});class CancelToken{constructor(i){if(typeof i!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(c){s=c});const o=this;this.promise.then(a=>{if(!o._listeners)return;let c=o._listeners.length;for(;c-- >0;)o._listeners[c](a);o._listeners=null}),this.promise.then=a=>{let c;const d=new Promise(g=>{o.subscribe(g),c=g}).then(a);return d.cancel=function(){o.unsubscribe(c)},d},i(function(c,d,g){o.reason||(o.reason=new CanceledError(c,d,g),s(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]}unsubscribe(i){if(!this._listeners)return;const s=this._listeners.indexOf(i);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const i=new AbortController,s=o=>{i.abort(o)};return this.subscribe(s),i.signal.unsubscribe=()=>this.unsubscribe(s),i.signal}static source(){let i;return{token:new CancelToken(function(a){i=a}),cancel:i}}}function spread(e){return function(s){return e.apply(null,s)}}function isAxiosError(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([e,i])=>{HttpStatusCode[i]=e});function createInstance(e){const i=new Axios(e),s=bind(Axios.prototype.request,i);return utils$1.extend(s,Axios.prototype,i,{allOwnKeys:!0}),utils$1.extend(s,i,null,{allOwnKeys:!0}),s.create=function(a){return createInstance(mergeConfig(e,a))},s}const axios=createInstance(defaults);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function(i){return Promise.all(i)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode;axios.default=axios;const serverUrl="undefined/api";class Global{static async getUser(){try{return(await this.httpGet("/auth/me")).user}catch{throw new Error("User not found")}}static async httpGet(i,s={}){try{const o=localStorage.getItem("token");return(await this.axios.get(i,{params:s,headers:{Authorization:`Bearer ${o}`},withCredentials:!0})).data}catch{throw new Error("Error fetching data")}}static async httpPost(i,s){try{const o=localStorage.getItem("token");return(await this.axios.post(i,s,{headers:{Authorization:`Bearer ${o}`},withCredentials:!0})).data}catch{throw new Error("Error sending data")}}}er(Global,"user"),er(Global,"axios",axios.create({baseURL:serverUrl,withCredentials:!0}));/** * @license lucide-react v0.447.0 - ISC * * This source code is licensed under the ISC license. @@ -216,4 +216,4 @@ o.goToAndStop(nt-o.firstFrame-1,!0)}it.type==="loop"&&(j===null||j!==it.frames|| If you want to hide the \`${i.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${i.docsSlug}`;return reactExports.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning=({contentRef:e,descriptionId:i})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return reactExports.useEffect(()=>{var c;const a=(c=e.current)==null?void 0:c.getAttribute("aria-describedby");i&&a&&(document.getElementById(i)||console.warn(o))},[o,e,i]),null},Root$3=Dialog,Trigger$1=DialogTrigger,Portal$1=DialogPortal,Overlay=DialogOverlay,Content=DialogContent,Title=DialogTitle,Description=DialogDescription,Close=DialogClose;const Sheet=Root$3,SheetTrigger=Trigger$1,SheetPortal=Portal$1,SheetOverlay=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Overlay,{className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...i,ref:s}));SheetOverlay.displayName=Overlay.displayName;const sheetVariants=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),SheetContent=reactExports.forwardRef(({side:e="right",className:i,children:s,...o},a)=>jsxRuntimeExports.jsxs(SheetPortal,{children:[jsxRuntimeExports.jsx(SheetOverlay,{}),jsxRuntimeExports.jsxs(Content,{ref:a,className:cn(sheetVariants({side:e}),i),...o,children:[jsxRuntimeExports.jsxs(Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsxRuntimeExports.jsx(Cross2Icon,{className:"h-4 w-4"}),jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]}),s]})]}));SheetContent.displayName=Content.displayName;const SheetHeader=({className:e,...i})=>jsxRuntimeExports.jsx("div",{className:cn("flex flex-col space-y-2 text-center sm:text-left",e),...i});SheetHeader.displayName="SheetHeader";const SheetTitle=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Title,{ref:s,className:cn("text-lg font-semibold text-foreground",e),...i}));SheetTitle.displayName=Title.displayName;const SheetDescription=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Description,{ref:s,className:cn("text-sm text-muted-foreground",e),...i}));SheetDescription.displayName=Description.displayName;var PAGE_KEYS=["PageUp","PageDown"],ARROW_KEYS=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],BACK_KEYS={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},SLIDER_NAME="Slider",[Collection$2,useCollection$2,createCollectionScope$2]=createCollection(SLIDER_NAME),[createSliderContext,createSliderScope]=createContextScope$2(SLIDER_NAME,[createCollectionScope$2]),[SliderProvider,useSliderContext]=createSliderContext(SLIDER_NAME),Slider$1=reactExports.forwardRef((e,i)=>{const{name:s,min:o=0,max:a=100,step:c=1,orientation:d="horizontal",disabled:g=!1,minStepsBetweenThumbs:b=0,defaultValue:_=[o],value:j,onValueChange:_e=()=>{},onValueCommit:$=()=>{},inverted:st=!1,form:it,...nt}=e,at=reactExports.useRef(new Set),et=reactExports.useRef(0),tt=d==="horizontal"?SliderHorizontal:SliderVertical,[ot=[],ct]=useControllableState({prop:j,defaultProp:_,onChange:St=>{var kt;(kt=[...at.current][et.current])==null||kt.focus(),_e(St)}}),ft=reactExports.useRef(ot);function dt(St){const xt=getClosestValueIndex(ot,St);Et(St,xt)}function ht(St){Et(St,et.current)}function yt(){const St=ft.current[et.current];ot[et.current]!==St&&$(ot)}function Et(St,xt,{commit:kt}={commit:!1}){const wt=getDecimalCount(c),bt=roundValue(Math.round((St-o)/c)*c+o,wt),pt=clamp$1(bt,[o,a]);ct((mt=[])=>{const lt=getNextSortedValues(mt,pt,xt);if(hasMinStepsBetweenValues(lt,b*c)){et.current=lt.indexOf(pt);const ut=String(lt)!==String(mt);return ut&&kt&&$(lt),ut?lt:mt}else return mt})}return jsxRuntimeExports.jsx(SliderProvider,{scope:e.__scopeSlider,name:s,disabled:g,min:o,max:a,valueIndexToChangeRef:et,thumbs:at.current,values:ot,orientation:d,form:it,children:jsxRuntimeExports.jsx(Collection$2.Provider,{scope:e.__scopeSlider,children:jsxRuntimeExports.jsx(Collection$2.Slot,{scope:e.__scopeSlider,children:jsxRuntimeExports.jsx(tt,{"aria-disabled":g,"data-disabled":g?"":void 0,...nt,ref:i,onPointerDown:composeEventHandlers(nt.onPointerDown,()=>{g||(ft.current=ot)}),min:o,max:a,inverted:st,onSlideStart:g?void 0:dt,onSlideMove:g?void 0:ht,onSlideEnd:g?void 0:yt,onHomeKeyDown:()=>!g&&Et(o,0,{commit:!0}),onEndKeyDown:()=>!g&&Et(a,ot.length-1,{commit:!0}),onStepKeyDown:({event:St,direction:xt})=>{if(!g){const bt=PAGE_KEYS.includes(St.key)||St.shiftKey&&ARROW_KEYS.includes(St.key)?10:1,pt=et.current,mt=ot[pt],lt=c*bt*xt;Et(mt+lt,pt,{commit:!0})}}})})})})});Slider$1.displayName=SLIDER_NAME;var[SliderOrientationProvider,useSliderOrientationContext]=createSliderContext(SLIDER_NAME,{startEdge:"left",endEdge:"right",size:"width",direction:1}),SliderHorizontal=reactExports.forwardRef((e,i)=>{const{min:s,max:o,dir:a,inverted:c,onSlideStart:d,onSlideMove:g,onSlideEnd:b,onStepKeyDown:_,...j}=e,[_e,$]=reactExports.useState(null),st=useComposedRefs(i,tt=>$(tt)),it=reactExports.useRef(),nt=useDirection(a),at=nt==="ltr",et=at&&!c||!at&&c;function rt(tt){const ot=it.current||_e.getBoundingClientRect(),ct=[0,ot.width],dt=linearScale(ct,et?[s,o]:[o,s]);return it.current=ot,dt(tt-ot.left)}return jsxRuntimeExports.jsx(SliderOrientationProvider,{scope:e.__scopeSlider,startEdge:et?"left":"right",endEdge:et?"right":"left",direction:et?1:-1,size:"width",children:jsxRuntimeExports.jsx(SliderImpl,{dir:nt,"data-orientation":"horizontal",...j,ref:st,style:{...j.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:tt=>{const ot=rt(tt.clientX);d==null||d(ot)},onSlideMove:tt=>{const ot=rt(tt.clientX);g==null||g(ot)},onSlideEnd:()=>{it.current=void 0,b==null||b()},onStepKeyDown:tt=>{const ct=BACK_KEYS[et?"from-left":"from-right"].includes(tt.key);_==null||_({event:tt,direction:ct?-1:1})}})})}),SliderVertical=reactExports.forwardRef((e,i)=>{const{min:s,max:o,inverted:a,onSlideStart:c,onSlideMove:d,onSlideEnd:g,onStepKeyDown:b,..._}=e,j=reactExports.useRef(null),_e=useComposedRefs(i,j),$=reactExports.useRef(),st=!a;function it(nt){const at=$.current||j.current.getBoundingClientRect(),et=[0,at.height],tt=linearScale(et,st?[o,s]:[s,o]);return $.current=at,tt(nt-at.top)}return jsxRuntimeExports.jsx(SliderOrientationProvider,{scope:e.__scopeSlider,startEdge:st?"bottom":"top",endEdge:st?"top":"bottom",size:"height",direction:st?1:-1,children:jsxRuntimeExports.jsx(SliderImpl,{"data-orientation":"vertical",..._,ref:_e,style:{..._.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:nt=>{const at=it(nt.clientY);c==null||c(at)},onSlideMove:nt=>{const at=it(nt.clientY);d==null||d(at)},onSlideEnd:()=>{$.current=void 0,g==null||g()},onStepKeyDown:nt=>{const et=BACK_KEYS[st?"from-bottom":"from-top"].includes(nt.key);b==null||b({event:nt,direction:et?-1:1})}})})}),SliderImpl=reactExports.forwardRef((e,i)=>{const{__scopeSlider:s,onSlideStart:o,onSlideMove:a,onSlideEnd:c,onHomeKeyDown:d,onEndKeyDown:g,onStepKeyDown:b,..._}=e,j=useSliderContext(SLIDER_NAME,s);return jsxRuntimeExports.jsx(Primitive.span,{..._,ref:i,onKeyDown:composeEventHandlers(e.onKeyDown,_e=>{_e.key==="Home"?(d(_e),_e.preventDefault()):_e.key==="End"?(g(_e),_e.preventDefault()):PAGE_KEYS.concat(ARROW_KEYS).includes(_e.key)&&(b(_e),_e.preventDefault())}),onPointerDown:composeEventHandlers(e.onPointerDown,_e=>{const $=_e.target;$.setPointerCapture(_e.pointerId),_e.preventDefault(),j.thumbs.has($)?$.focus():o(_e)}),onPointerMove:composeEventHandlers(e.onPointerMove,_e=>{_e.target.hasPointerCapture(_e.pointerId)&&a(_e)}),onPointerUp:composeEventHandlers(e.onPointerUp,_e=>{const $=_e.target;$.hasPointerCapture(_e.pointerId)&&($.releasePointerCapture(_e.pointerId),c(_e))})})}),TRACK_NAME="SliderTrack",SliderTrack=reactExports.forwardRef((e,i)=>{const{__scopeSlider:s,...o}=e,a=useSliderContext(TRACK_NAME,s);return jsxRuntimeExports.jsx(Primitive.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...o,ref:i})});SliderTrack.displayName=TRACK_NAME;var RANGE_NAME="SliderRange",SliderRange=reactExports.forwardRef((e,i)=>{const{__scopeSlider:s,...o}=e,a=useSliderContext(RANGE_NAME,s),c=useSliderOrientationContext(RANGE_NAME,s),d=reactExports.useRef(null),g=useComposedRefs(i,d),b=a.values.length,_=a.values.map($=>convertValueToPercentage($,a.min,a.max)),j=b>1?Math.min(..._):0,_e=100-Math.max(..._);return jsxRuntimeExports.jsx(Primitive.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...o,ref:g,style:{...e.style,[c.startEdge]:j+"%",[c.endEdge]:_e+"%"}})});SliderRange.displayName=RANGE_NAME;var THUMB_NAME="SliderThumb",SliderThumb=reactExports.forwardRef((e,i)=>{const s=useCollection$2(e.__scopeSlider),[o,a]=reactExports.useState(null),c=useComposedRefs(i,g=>a(g)),d=reactExports.useMemo(()=>o?s().findIndex(g=>g.ref.current===o):-1,[s,o]);return jsxRuntimeExports.jsx(SliderThumbImpl,{...e,ref:c,index:d})}),SliderThumbImpl=reactExports.forwardRef((e,i)=>{const{__scopeSlider:s,index:o,name:a,...c}=e,d=useSliderContext(THUMB_NAME,s),g=useSliderOrientationContext(THUMB_NAME,s),[b,_]=reactExports.useState(null),j=useComposedRefs(i,rt=>_(rt)),_e=b?d.form||!!b.closest("form"):!0,$=useSize(b),st=d.values[o],it=st===void 0?0:convertValueToPercentage(st,d.min,d.max),nt=getLabel(o,d.values.length),at=$==null?void 0:$[g.size],et=at?getThumbInBoundsOffset(at,it,g.direction):0;return reactExports.useEffect(()=>{if(b)return d.thumbs.add(b),()=>{d.thumbs.delete(b)}},[b,d.thumbs]),jsxRuntimeExports.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[g.startEdge]:`calc(${it}% + ${et}px)`},children:[jsxRuntimeExports.jsx(Collection$2.ItemSlot,{scope:e.__scopeSlider,children:jsxRuntimeExports.jsx(Primitive.span,{role:"slider","aria-label":e["aria-label"]||nt,"aria-valuemin":d.min,"aria-valuenow":st,"aria-valuemax":d.max,"aria-orientation":d.orientation,"data-orientation":d.orientation,"data-disabled":d.disabled?"":void 0,tabIndex:d.disabled?void 0:0,...c,ref:j,style:st===void 0?{display:"none"}:e.style,onFocus:composeEventHandlers(e.onFocus,()=>{d.valueIndexToChangeRef.current=o})})}),_e&&jsxRuntimeExports.jsx(BubbleInput,{name:a??(d.name?d.name+(d.values.length>1?"[]":""):void 0),form:d.form,value:st},o)]})});SliderThumb.displayName=THUMB_NAME;var BubbleInput=e=>{const{value:i,...s}=e,o=reactExports.useRef(null),a=usePrevious(i);return reactExports.useEffect(()=>{const c=o.current,d=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(d,"value").set;if(a!==i&&b){const _=new Event("input",{bubbles:!0});b.call(c,i),c.dispatchEvent(_)}},[a,i]),jsxRuntimeExports.jsx("input",{style:{display:"none"},...s,ref:o,defaultValue:i})};function getNextSortedValues(e=[],i,s){const o=[...e];return o[s]=i,o.sort((a,c)=>a-c)}function convertValueToPercentage(e,i,s){const c=100/(s-i)*(e-i);return clamp$1(c,[0,100])}function getLabel(e,i){return i>2?`Value ${e+1} of ${i}`:i===2?["Minimum","Maximum"][e]:void 0}function getClosestValueIndex(e,i){if(e.length===1)return 0;const s=e.map(a=>Math.abs(a-i)),o=Math.min(...s);return s.indexOf(o)}function getThumbInBoundsOffset(e,i,s){const o=e/2,c=linearScale([0,50],[0,o]);return(o-c(i)*s)*s}function getStepsBetweenValues(e){return e.slice(0,-1).map((i,s)=>e[s+1]-i)}function hasMinStepsBetweenValues(e,i){if(i>0){const s=getStepsBetweenValues(e);return Math.min(...s)>=i}return!0}function linearScale(e,i){return s=>{if(e[0]===e[1]||i[0]===i[1])return i[0];const o=(i[1]-i[0])/(e[1]-e[0]);return i[0]+o*(s-e[0])}}function getDecimalCount(e){return(String(e).split(".")[1]||"").length}function roundValue(e,i){const s=Math.pow(10,i);return Math.round(e*s)/s}var Root$2=Slider$1,Track=SliderTrack,Range=SliderRange,Thumb=SliderThumb;const Slider=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsxs(Root$2,{ref:s,className:cn("relative flex w-full touch-none select-none items-center",e),...i,children:[jsxRuntimeExports.jsx(Track,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:jsxRuntimeExports.jsx(Range,{className:"absolute h-full bg-primary"})}),jsxRuntimeExports.jsx(Thumb,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));Slider.displayName=Root$2.displayName;const LeaderBoard=()=>{const[e,i]=reactExports.useState([]),[s,o]=reactExports.useState(!0),[a,c]=reactExports.useState(1),[d,g]=reactExports.useState({minPoints:0,maxPoints:100,minPrs:0}),[b,_]=reactExports.useState(1),[j,_e]=reactExports.useState(10),[$,st]=reactExports.useState(""),[it,nt]=reactExports.useState(null),at=reactExports.useCallback(ft(dt=>{st(dt),_(1)},300),[]);reactExports.useEffect(()=>{et(),rt()},[b,j,$,d]);const et=async()=>{try{if(Global.user){const dt=await Global.httpGet(`/users/stats/${Global.user.githubId}`);console.log(dt.user),nt({...dt.stats,...dt.user})}}catch(dt){console.error("Error fetching user:",dt)}},rt=async()=>{o(!0);try{let dt=`/leaderboard?page=${b}&limit=${j}`;$&&(dt=`/leaderboard/search?name=${$}&page=${b}&limit=${j}`),(d.minPoints>0||d.maxPoints<100||d.minPrs>0)&&(dt=`/leaderboard/filter?minPoints=${d.minPoints}&maxPoints=${d.maxPoints}&minPrs=${d.minPrs}&page=${b}&limit=${j}`);const ht=await Global.httpGet(dt);i(ht.contributors),c(ht.meta.totalPages)}catch(dt){console.error("Error fetching contributors:",dt)}finally{o(!1)}},tt=dt=>{at(dt)},ot=dt=>{_(dt)},ct=dt=>{_e(parseInt(dt)),_(1)};function ft(dt,ht){let yt;return function(...St){const xt=()=>{clearTimeout(yt),dt(...St)};clearTimeout(yt),yt=setTimeout(xt,ht)}}return jsxRuntimeExports.jsx("div",{className:"min-h-screen font-dm-sans bg-[#1C1C1C] text-white",children:jsxRuntimeExports.jsxs("main",{className:"container mx-auto px-4 py-8 pt-32",children:[it&&jsxRuntimeExports.jsx("div",{className:"bg-[#2A2A2A] rounded-xl shadow-lg p-6 border border-[#3A3A3A] mb-8",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between space-y-4 md:space-y-0",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-4",children:[jsxRuntimeExports.jsx("img",{src:it.avatarUrl||"https://github.com/identicons/jasonlong.png",alt:it.username,className:"w-20 h-20 rounded-full border-4 border-[#FF4545]"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h2",{className:"text-3xl font-bold text-white",children:it.username}),jsxRuntimeExports.jsxs("p",{className:"text-[#FF4545] text-lg",children:["Rank #",it.rank]})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[jsxRuntimeExports.jsxs("div",{className:"p-4 rounded-lg bg-[#3A3A3A]",children:[jsxRuntimeExports.jsx("div",{className:"text-3xl font-bold text-[#FF4545]",children:it.points}),jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-300",children:"Points"})]}),jsxRuntimeExports.jsxs("div",{className:"p-4 rounded-lg bg-[#3A3A3A]",children:[jsxRuntimeExports.jsx("div",{className:"text-3xl font-bold text-[#FFA500]",children:it.totalPRs}),jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-300",children:"Total PRs"})]}),jsxRuntimeExports.jsxs("div",{className:"p-4 rounded-lg bg-[#3A3A3A]",children:[jsxRuntimeExports.jsx("div",{className:"text-sm font-medium text-gray-300",children:"PRs Status"}),jsxRuntimeExports.jsxs("div",{className:"text-xs mt-1",children:[jsxRuntimeExports.jsxs("span",{className:"text-green-400",children:[it.openPRs," Open"]})," |",jsxRuntimeExports.jsxs("span",{className:"text-blue-400",children:[" ",it.mergedPRs," Merged"]})," |",jsxRuntimeExports.jsxs("span",{className:"text-red-400",children:[" ",it.closedPRs," Closed"]})]})]})]})]})}),jsxRuntimeExports.jsxs("div",{className:"bg-[#2A2A2A] rounded-xl shadow-lg border border-[#3A3A3A]",children:[jsxRuntimeExports.jsx("div",{className:"p-6 border-b border-[#3A3A3A]",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between space-y-4 md:space-y-0",children:[jsxRuntimeExports.jsx("h2",{className:"text-3xl font-bold text-white",children:"Leaderboard"}),jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[jsxRuntimeExports.jsxs("div",{className:"relative w-72 md:w-64 ml-auto pr-3",children:[jsxRuntimeExports.jsx(Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),jsxRuntimeExports.jsx(Input,{placeholder:"Search contributors...",className:"pl-10 bg-[#3A3A3A] border-[#4A4A4A] text-white placeholder-gray-400 w-full",onChange:dt=>tt(dt.target.value)})]}),jsxRuntimeExports.jsxs(Sheet,{children:[jsxRuntimeExports.jsx(SheetTrigger,{asChild:!0,children:jsxRuntimeExports.jsx(Button,{variant:"outline",size:"icon",className:"bg-[#3A3A3A] border-[#4A4A4A] hover:bg-[#4A4A4A]",children:jsxRuntimeExports.jsx(SlidersHorizontal,{className:"h-5 w-5"})})}),jsxRuntimeExports.jsxs(SheetContent,{className:"bg-[#2A2A2A] text-white",children:[jsxRuntimeExports.jsxs(SheetHeader,{children:[jsxRuntimeExports.jsx(SheetTitle,{className:"text-white",children:"Filters"}),jsxRuntimeExports.jsx(SheetDescription,{className:"text-gray-400",children:"Adjust the filters to refine the leaderboard"})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-6 py-4",children:[jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx("label",{className:"text-sm font-medium text-gray-300",children:"Points Range"}),jsxRuntimeExports.jsx(Slider,{defaultValue:[d.minPoints,d.maxPoints],max:100,step:1,onValueChange:([dt,ht])=>g(yt=>({...yt,minPoints:dt,maxPoints:ht})),className:"bg-[#3A3A3A]"}),jsxRuntimeExports.jsxs("div",{className:"flex justify-between text-sm text-gray-400",children:[jsxRuntimeExports.jsx("span",{children:d.minPoints}),jsxRuntimeExports.jsx("span",{children:d.maxPoints})]})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx("label",{className:"text-sm font-medium text-gray-300",children:"Minimum PRs"}),jsxRuntimeExports.jsx(Slider,{defaultValue:[d.minPrs],max:50,step:1,onValueChange:([dt])=>g(ht=>({...ht,minPrs:dt})),className:"bg-[#3A3A3A]"}),jsxRuntimeExports.jsxs("div",{className:"text-sm text-gray-400",children:[d.minPrs," PRs"]})]})]})]})]})]})]})}),jsxRuntimeExports.jsx("div",{className:"overflow-x-auto",children:jsxRuntimeExports.jsxs("table",{className:"w-full",children:[jsxRuntimeExports.jsx("thead",{className:"bg-[#3A3A3A]",children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider",children:"Rank"}),jsxRuntimeExports.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider",children:"User"}),jsxRuntimeExports.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-300 uppercase tracking-wider",children:"Points"}),jsxRuntimeExports.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-300 uppercase tracking-wider",children:"PRs"})]})}),jsxRuntimeExports.jsx("tbody",{className:"divide-y divide-[#3A3A3A]",children:s?jsxRuntimeExports.jsx("tr",{children:jsxRuntimeExports.jsx("td",{colSpan:"4",className:"px-6 py-4 text-center text-gray-400",children:jsxRuntimeExports.jsx("l-infinity",{size:"55",stroke:"4","stroke-length":"0.15","bg-opacity":"0.1",speed:"1.3",color:"white"})})}):e.map((dt,ht)=>jsxRuntimeExports.jsxs("tr",{className:`hover:bg-[#3A3A3A] transition-colors ${ht%2===0?"bg-[#2A2A2A]":"bg-[#333333]"}`,children:[jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:jsxRuntimeExports.jsx("div",{className:"flex items-center",children:dt.rank<=3?jsxRuntimeExports.jsx(Trophy,{className:`h-6 w-6 ${dt.rank===1?"text-[#FFD700]":dt.rank===2?"text-[#C0C0C0]":"text-[#CD7F32]"}`}):jsxRuntimeExports.jsxs("span",{className:"text-gray-400 font-medium",children:["#",dt.rank]})})}),jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[jsxRuntimeExports.jsx("img",{className:"h-10 w-10 rounded-full border-2 border-[#FF4545]",src:dt.avatarUrl||"https://github.com/identicons/jasonlong.png",alt:""}),jsxRuntimeExports.jsx("div",{className:"ml-4",children:jsxRuntimeExports.jsx("div",{className:"text-sm font-medium text-white",children:dt.githubId})})]})}),jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:jsxRuntimeExports.jsx("div",{className:"text-[#FF4545] font-bold",children:dt.points})}),jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[jsxRuntimeExports.jsx(GitPullRequest,{className:"h-5 w-5 text-[#FFA500]"}),jsxRuntimeExports.jsx("span",{className:"text-white font-medium",children:dt.prs.opened+dt.prs.merged+dt.prs.closed})]})})]},dt.githubId))})]})}),jsxRuntimeExports.jsx("div",{className:"p-4 border-t border-[#3A3A3A]",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between space-y-4 md:space-y-0",children:[jsxRuntimeExports.jsxs(Select,{value:j.toString(),onValueChange:ct,children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"w-[180px] bg-[#3A3A3A] border-[#4A4A4A] text-white",children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"Select rows per page"})}),jsxRuntimeExports.jsxs(SelectContent,{className:"bg-[#3A3A3A] border-[#4A4A4A] text-white",children:[jsxRuntimeExports.jsx(SelectItem,{value:"5",children:"5 per page"}),jsxRuntimeExports.jsx(SelectItem,{value:"10",children:"10 per page"}),jsxRuntimeExports.jsx(SelectItem,{value:"20",children:"20 per page"}),jsxRuntimeExports.jsx(SelectItem,{value:"50",children:"50 per page"})]})]}),jsxRuntimeExports.jsx(Pagination,{children:jsxRuntimeExports.jsxs(PaginationContent,{children:[jsxRuntimeExports.jsx(PaginationItem,{children:jsxRuntimeExports.jsx(PaginationPrevious,{onClick:()=>ot(b-1),disabled:b<=1,className:"bg-[#3A3A3A] border-[#4A4A4A] text-white hover:bg-[#4A4A4A]"})}),[...Array(a)].map((dt,ht)=>jsxRuntimeExports.jsx(PaginationItem,{children:jsxRuntimeExports.jsx(PaginationLink,{onClick:()=>ot(ht+1),isActive:b===ht+1,className:`${b===ht+1?"bg-[#FF4545] text-white":"bg-[#3A3A3A] text-white"} border-[#4A4A4A] hover:bg-[#4A4A4A]`,children:ht+1})},ht)),jsxRuntimeExports.jsx(PaginationItem,{children:jsxRuntimeExports.jsx(PaginationNext,{onClick:()=>ot(b+1),disabled:b>=a,className:"bg-[#3A3A3A] border-[#4A4A4A] text-white hover:bg-[#4A4A4A]"})})]})})]})})]})]})})};var AVATAR_NAME="Avatar",[createAvatarContext,createAvatarScope]=createContextScope$2(AVATAR_NAME),[AvatarProvider,useAvatarContext]=createAvatarContext(AVATAR_NAME),Avatar$1=reactExports.forwardRef((e,i)=>{const{__scopeAvatar:s,...o}=e,[a,c]=reactExports.useState("idle");return jsxRuntimeExports.jsx(AvatarProvider,{scope:s,imageLoadingStatus:a,onImageLoadingStatusChange:c,children:jsxRuntimeExports.jsx(Primitive.span,{...o,ref:i})})});Avatar$1.displayName=AVATAR_NAME;var IMAGE_NAME="AvatarImage",AvatarImage$1=reactExports.forwardRef((e,i)=>{const{__scopeAvatar:s,src:o,onLoadingStatusChange:a=()=>{},...c}=e,d=useAvatarContext(IMAGE_NAME,s),g=useImageLoadingStatus(o,c.referrerPolicy),b=useCallbackRef$1(_=>{a(_),d.onImageLoadingStatusChange(_)});return useLayoutEffect2(()=>{g!=="idle"&&b(g)},[g,b]),g==="loaded"?jsxRuntimeExports.jsx(Primitive.img,{...c,ref:i,src:o}):null});AvatarImage$1.displayName=IMAGE_NAME;var FALLBACK_NAME="AvatarFallback",AvatarFallback$1=reactExports.forwardRef((e,i)=>{const{__scopeAvatar:s,delayMs:o,...a}=e,c=useAvatarContext(FALLBACK_NAME,s),[d,g]=reactExports.useState(o===void 0);return reactExports.useEffect(()=>{if(o!==void 0){const b=window.setTimeout(()=>g(!0),o);return()=>window.clearTimeout(b)}},[o]),d&&c.imageLoadingStatus!=="loaded"?jsxRuntimeExports.jsx(Primitive.span,{...a,ref:i}):null});AvatarFallback$1.displayName=FALLBACK_NAME;function useImageLoadingStatus(e,i){const[s,o]=reactExports.useState("idle");return useLayoutEffect2(()=>{if(!e){o("error");return}let a=!0;const c=new window.Image,d=g=>()=>{a&&o(g)};return o("loading"),c.onload=d("loaded"),c.onerror=d("error"),c.src=e,i&&(c.referrerPolicy=i),()=>{a=!1}},[e,i]),s}var Root$1=Avatar$1,Image$1=AvatarImage$1,Fallback=AvatarFallback$1;const Avatar=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Root$1,{ref:s,className:cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...i}));Avatar.displayName=Root$1.displayName;const AvatarImage=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Image$1,{ref:s,className:cn("aspect-square h-full w-full",e),...i}));AvatarImage.displayName=Image$1.displayName;const AvatarFallback=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Fallback,{ref:s,className:cn("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...i}));AvatarFallback.displayName=Fallback.displayName;const StatusBadge=({state:e})=>{const i={merged:"bg-purple-500",open:"bg-green-500",closed:"bg-red-500"};return console.log(e),jsxRuntimeExports.jsx("span",{className:`${i[e]} text-white px-2 py-1 rounded text-sm`,children:e.charAt(0).toUpperCase()+e.slice(1)})};function GitHubProfile(){const[e,i]=React.useState(),{username:s}=useParams();if(reactExports.useEffect(()=>{(async()=>{const{user:o,stats:a}=await Global.httpGet(`/users/stats/${s}`);i({...o,...a}),console.log({...o,...a}),document.title=`Profile | ${o.name}`})()},[s]),e)console.log(e.prs);else return jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center h-screen",children:jsxRuntimeExports.jsx("l-infinity",{size:"55",stroke:"4","stroke-length":"0.15","bg-opacity":"0.1",speed:"1.3",color:"black"})});return jsxRuntimeExports.jsx("div",{className:"min-h-screen bg-black text-white p-8 pt-32",children:jsxRuntimeExports.jsxs("div",{className:"max-w-3xl mx-auto",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[jsxRuntimeExports.jsxs(Avatar,{className:"h-24 w-24",children:[jsxRuntimeExports.jsx(AvatarImage,{src:e.avatar,alt:e.name}),jsxRuntimeExports.jsx(AvatarFallback,{children:e.name.charAt(0)})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-bold",children:e.name}),jsxRuntimeExports.jsxs("div",{className:"text-zinc-400 flex items-center gap-2",children:[jsxRuntimeExports.jsx(GitPullRequest,{className:"h-4 w-4"}),e.username]}),jsxRuntimeExports.jsx("p",{className:"text-zinc-400 mt-2",children:e.bio})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-5 gap-4 mb-8",children:[jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold",children:e.points}),jsxRuntimeExports.jsx("div",{className:"text-zinc-400",children:"Points"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold",children:e.mergedPRs}),jsxRuntimeExports.jsx("div",{className:"text-zinc-400",children:"Merged PRs"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold",children:e.repositories}),jsxRuntimeExports.jsx("div",{className:"text-zinc-400",children:"Repositories"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold",children:e.followers}),jsxRuntimeExports.jsx("div",{className:"text-zinc-400",children:"Followers"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold",children:e.following}),jsxRuntimeExports.jsx("div",{className:"text-zinc-400",children:"Following"})]})]}),jsxRuntimeExports.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Recent Pull Requests"}),jsxRuntimeExports.jsx("div",{className:"space-y-2",children:e.prs.map((o,a)=>jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx(GitPullRequest,{className:"h-5 w-5 text-zinc-400"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"font-medium",children:o.title}),jsxRuntimeExports.jsx("div",{className:"text-sm text-zinc-400",children:o.url})]})]}),jsxRuntimeExports.jsx(StatusBadge,{state:o.state})]},a))})]})})}const logo="/assets/logo-DJb3Nfol.jpeg";function createContextScope(e,i=[]){let s=[];function o(c,d){const g=reactExports.createContext(d),b=s.length;s=[...s,d];function _(_e){const{scope:$,children:st,...it}=_e,nt=($==null?void 0:$[e][b])||g,at=reactExports.useMemo(()=>it,Object.values(it));return jsxRuntimeExports.jsx(nt.Provider,{value:at,children:st})}function j(_e,$){const st=($==null?void 0:$[e][b])||g,it=reactExports.useContext(st);if(it)return it;if(d!==void 0)return d;throw new Error(`\`${_e}\` must be used within \`${c}\``)}return _.displayName=c+"Provider",[_,j]}const a=()=>{const c=s.map(d=>reactExports.createContext(d));return function(g){const b=(g==null?void 0:g[e])||c;return reactExports.useMemo(()=>({[`__scope${e}`]:{...g,[e]:b}}),[g,b])}};return a.scopeName=e,[o,composeContextScopes(a,...i)]}function composeContextScopes(...e){const i=e[0];if(e.length===1)return i;const s=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const d=o.reduce((g,{useScope:b,scopeName:_})=>{const _e=b(c)[`__scope${_}`];return{...g,..._e}},{});return reactExports.useMemo(()=>({[`__scope${i.scopeName}`]:d}),[d])}};return s.scopeName=i.scopeName,s}var ENTRY_FOCUS="rovingFocusGroup.onEntryFocus",EVENT_OPTIONS={bubbles:!1,cancelable:!0},GROUP_NAME$2="RovingFocusGroup",[Collection$1,useCollection$1,createCollectionScope$1]=createCollection(GROUP_NAME$2),[createRovingFocusGroupContext,createRovingFocusGroupScope]=createContextScope(GROUP_NAME$2,[createCollectionScope$1]),[RovingFocusProvider,useRovingFocusContext]=createRovingFocusGroupContext(GROUP_NAME$2),RovingFocusGroup=reactExports.forwardRef((e,i)=>jsxRuntimeExports.jsx(Collection$1.Provider,{scope:e.__scopeRovingFocusGroup,children:jsxRuntimeExports.jsx(Collection$1.Slot,{scope:e.__scopeRovingFocusGroup,children:jsxRuntimeExports.jsx(RovingFocusGroupImpl,{...e,ref:i})})}));RovingFocusGroup.displayName=GROUP_NAME$2;var RovingFocusGroupImpl=reactExports.forwardRef((e,i)=>{const{__scopeRovingFocusGroup:s,orientation:o,loop:a=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:b,onEntryFocus:_,preventScrollOnEntryFocus:j=!1,..._e}=e,$=reactExports.useRef(null),st=useComposedRefs(i,$),it=useDirection(c),[nt=null,at]=useControllableState({prop:d,defaultProp:g,onChange:b}),[et,rt]=reactExports.useState(!1),tt=useCallbackRef$1(_),ot=useCollection$1(s),ct=reactExports.useRef(!1),[ft,dt]=reactExports.useState(0);return reactExports.useEffect(()=>{const ht=$.current;if(ht)return ht.addEventListener(ENTRY_FOCUS,tt),()=>ht.removeEventListener(ENTRY_FOCUS,tt)},[tt]),jsxRuntimeExports.jsx(RovingFocusProvider,{scope:s,orientation:o,dir:it,loop:a,currentTabStopId:nt,onItemFocus:reactExports.useCallback(ht=>at(ht),[at]),onItemShiftTab:reactExports.useCallback(()=>rt(!0),[]),onFocusableItemAdd:reactExports.useCallback(()=>dt(ht=>ht+1),[]),onFocusableItemRemove:reactExports.useCallback(()=>dt(ht=>ht-1),[]),children:jsxRuntimeExports.jsx(Primitive.div,{tabIndex:et||ft===0?-1:0,"data-orientation":o,..._e,ref:st,style:{outline:"none",...e.style},onMouseDown:composeEventHandlers(e.onMouseDown,()=>{ct.current=!0}),onFocus:composeEventHandlers(e.onFocus,ht=>{const yt=!ct.current;if(ht.target===ht.currentTarget&&yt&&!et){const Et=new CustomEvent(ENTRY_FOCUS,EVENT_OPTIONS);if(ht.currentTarget.dispatchEvent(Et),!Et.defaultPrevented){const St=ot().filter(pt=>pt.focusable),xt=St.find(pt=>pt.active),kt=St.find(pt=>pt.id===nt),bt=[xt,kt,...St].filter(Boolean).map(pt=>pt.ref.current);focusFirst$1(bt,j)}}ct.current=!1}),onBlur:composeEventHandlers(e.onBlur,()=>rt(!1))})})}),ITEM_NAME$2="RovingFocusGroupItem",RovingFocusGroupItem=reactExports.forwardRef((e,i)=>{const{__scopeRovingFocusGroup:s,focusable:o=!0,active:a=!1,tabStopId:c,...d}=e,g=useId(),b=c||g,_=useRovingFocusContext(ITEM_NAME$2,s),j=_.currentTabStopId===b,_e=useCollection$1(s),{onFocusableItemAdd:$,onFocusableItemRemove:st}=_;return reactExports.useEffect(()=>{if(o)return $(),()=>st()},[o,$,st]),jsxRuntimeExports.jsx(Collection$1.ItemSlot,{scope:s,id:b,focusable:o,active:a,children:jsxRuntimeExports.jsx(Primitive.span,{tabIndex:j?0:-1,"data-orientation":_.orientation,...d,ref:i,onMouseDown:composeEventHandlers(e.onMouseDown,it=>{o?_.onItemFocus(b):it.preventDefault()}),onFocus:composeEventHandlers(e.onFocus,()=>_.onItemFocus(b)),onKeyDown:composeEventHandlers(e.onKeyDown,it=>{if(it.key==="Tab"&&it.shiftKey){_.onItemShiftTab();return}if(it.target!==it.currentTarget)return;const nt=getFocusIntent(it,_.orientation,_.dir);if(nt!==void 0){if(it.metaKey||it.ctrlKey||it.altKey||it.shiftKey)return;it.preventDefault();let et=_e().filter(rt=>rt.focusable).map(rt=>rt.ref.current);if(nt==="last")et.reverse();else if(nt==="prev"||nt==="next"){nt==="prev"&&et.reverse();const rt=et.indexOf(it.currentTarget);et=_.loop?wrapArray$1(et,rt+1):et.slice(rt+1)}setTimeout(()=>focusFirst$1(et))}})})})});RovingFocusGroupItem.displayName=ITEM_NAME$2;var MAP_KEY_TO_FOCUS_INTENT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function getDirectionAwareKey(e,i){return i!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function getFocusIntent(e,i,s){const o=getDirectionAwareKey(e.key,s);if(!(i==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(i==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return MAP_KEY_TO_FOCUS_INTENT[o]}function focusFirst$1(e,i=!1){const s=document.activeElement;for(const o of e)if(o===s||(o.focus({preventScroll:i}),document.activeElement!==s))return}function wrapArray$1(e,i){return e.map((s,o)=>e[(i+o)%e.length])}var Root=RovingFocusGroup,Item=RovingFocusGroupItem,SELECTION_KEYS=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS,"ArrowRight"],rtl:[...SELECTION_KEYS,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection,useCollection,createCollectionScope]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope$2(MENU_NAME,[createCollectionScope,createPopperScope,createRovingFocusGroupScope]),usePopperScope=createPopperScope(),useRovingFocusGroupScope=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=e=>{const{__scopeMenu:i,open:s=!1,children:o,dir:a,onOpenChange:c,modal:d=!0}=e,g=usePopperScope(i),[b,_]=reactExports.useState(null),j=reactExports.useRef(!1),_e=useCallbackRef$1(c),$=useDirection(a);return reactExports.useEffect(()=>{const st=()=>{j.current=!0,document.addEventListener("pointerdown",it,{capture:!0,once:!0}),document.addEventListener("pointermove",it,{capture:!0,once:!0})},it=()=>j.current=!1;return document.addEventListener("keydown",st,{capture:!0}),()=>{document.removeEventListener("keydown",st,{capture:!0}),document.removeEventListener("pointerdown",it,{capture:!0}),document.removeEventListener("pointermove",it,{capture:!0})}},[]),jsxRuntimeExports.jsx(Root2$2,{...g,children:jsxRuntimeExports.jsx(MenuProvider,{scope:i,open:s,onOpenChange:_e,content:b,onContentChange:_,children:jsxRuntimeExports.jsx(MenuRootProvider,{scope:i,onClose:reactExports.useCallback(()=>_e(!1),[_e]),isUsingKeyboardRef:j,dir:$,modal:d,children:o})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME="MenuAnchor",MenuAnchor=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,...o}=e,a=usePopperScope(s);return jsxRuntimeExports.jsx(Anchor,{...a,...o,ref:i})});MenuAnchor.displayName=ANCHOR_NAME;var PORTAL_NAME$1="MenuPortal",[PortalProvider,usePortalContext]=createMenuContext(PORTAL_NAME$1,{forceMount:void 0}),MenuPortal=e=>{const{__scopeMenu:i,forceMount:s,children:o,container:a}=e,c=useMenuContext(PORTAL_NAME$1,i);return jsxRuntimeExports.jsx(PortalProvider,{scope:i,forceMount:s,children:jsxRuntimeExports.jsx(Presence,{present:s||c.open,children:jsxRuntimeExports.jsx(Portal$3,{asChild:!0,container:a,children:o})})})};MenuPortal.displayName=PORTAL_NAME$1;var CONTENT_NAME$1="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$1),MenuContent=reactExports.forwardRef((e,i)=>{const s=usePortalContext(CONTENT_NAME$1,e.__scopeMenu),{forceMount:o=s.forceMount,...a}=e,c=useMenuContext(CONTENT_NAME$1,e.__scopeMenu),d=useMenuRootContext(CONTENT_NAME$1,e.__scopeMenu);return jsxRuntimeExports.jsx(Collection.Provider,{scope:e.__scopeMenu,children:jsxRuntimeExports.jsx(Presence,{present:o||c.open,children:jsxRuntimeExports.jsx(Collection.Slot,{scope:e.__scopeMenu,children:d.modal?jsxRuntimeExports.jsx(MenuRootContentModal,{...a,ref:i}):jsxRuntimeExports.jsx(MenuRootContentNonModal,{...a,ref:i})})})})}),MenuRootContentModal=reactExports.forwardRef((e,i)=>{const s=useMenuContext(CONTENT_NAME$1,e.__scopeMenu),o=reactExports.useRef(null),a=useComposedRefs(i,o);return reactExports.useEffect(()=>{const c=o.current;if(c)return hideOthers(c)},[]),jsxRuntimeExports.jsx(MenuContentImpl,{...e,ref:a,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),MenuRootContentNonModal=reactExports.forwardRef((e,i)=>{const s=useMenuContext(CONTENT_NAME$1,e.__scopeMenu);return jsxRuntimeExports.jsx(MenuContentImpl,{...e,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),MenuContentImpl=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,loop:o=!1,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:g,onEntryFocus:b,onEscapeKeyDown:_,onPointerDownOutside:j,onFocusOutside:_e,onInteractOutside:$,onDismiss:st,disableOutsideScroll:it,...nt}=e,at=useMenuContext(CONTENT_NAME$1,s),et=useMenuRootContext(CONTENT_NAME$1,s),rt=usePopperScope(s),tt=useRovingFocusGroupScope(s),ot=useCollection(s),[ct,ft]=reactExports.useState(null),dt=reactExports.useRef(null),ht=useComposedRefs(i,dt,at.onContentChange),yt=reactExports.useRef(0),Et=reactExports.useRef(""),St=reactExports.useRef(0),xt=reactExports.useRef(null),kt=reactExports.useRef("right"),wt=reactExports.useRef(0),bt=it?ReactRemoveScroll:reactExports.Fragment,pt=it?{as:Slot,allowPinchZoom:!0}:void 0,mt=ut=>{var Rt,Nt;const vt=Et.current+ut,gt=ot().filter(Lt=>!Lt.disabled),Ct=document.activeElement,Pt=(Rt=gt.find(Lt=>Lt.ref.current===Ct))==null?void 0:Rt.textValue,At=gt.map(Lt=>Lt.textValue),Mt=getNextMatch(At,vt,Pt),_t=(Nt=gt.find(Lt=>Lt.textValue===Mt))==null?void 0:Nt.ref.current;(function Lt(jt){Et.current=jt,window.clearTimeout(yt.current),jt!==""&&(yt.current=window.setTimeout(()=>Lt(""),1e3))})(vt),_t&&setTimeout(()=>_t.focus())};reactExports.useEffect(()=>()=>window.clearTimeout(yt.current),[]),useFocusGuards();const lt=reactExports.useCallback(ut=>{var gt,Ct;return kt.current===((gt=xt.current)==null?void 0:gt.side)&&isPointerInGraceArea(ut,(Ct=xt.current)==null?void 0:Ct.area)},[]);return jsxRuntimeExports.jsx(MenuContentProvider,{scope:s,searchRef:Et,onItemEnter:reactExports.useCallback(ut=>{lt(ut)&&ut.preventDefault()},[lt]),onItemLeave:reactExports.useCallback(ut=>{var vt;lt(ut)||((vt=dt.current)==null||vt.focus(),ft(null))},[lt]),onTriggerLeave:reactExports.useCallback(ut=>{lt(ut)&&ut.preventDefault()},[lt]),pointerGraceTimerRef:St,onPointerGraceIntentChange:reactExports.useCallback(ut=>{xt.current=ut},[]),children:jsxRuntimeExports.jsx(bt,{...pt,children:jsxRuntimeExports.jsx(FocusScope,{asChild:!0,trapped:a,onMountAutoFocus:composeEventHandlers(c,ut=>{var vt;ut.preventDefault(),(vt=dt.current)==null||vt.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:jsxRuntimeExports.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:_,onPointerDownOutside:j,onFocusOutside:_e,onInteractOutside:$,onDismiss:st,children:jsxRuntimeExports.jsx(Root,{asChild:!0,...tt,dir:et.dir,orientation:"vertical",loop:o,currentTabStopId:ct,onCurrentTabStopIdChange:ft,onEntryFocus:composeEventHandlers(b,ut=>{et.isUsingKeyboardRef.current||ut.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntimeExports.jsx(Content$1,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(at.open),"data-radix-menu-content":"",dir:et.dir,...rt,...nt,ref:ht,style:{outline:"none",...nt.style},onKeyDown:composeEventHandlers(nt.onKeyDown,ut=>{const gt=ut.target.closest("[data-radix-menu-content]")===ut.currentTarget,Ct=ut.ctrlKey||ut.altKey||ut.metaKey,Pt=ut.key.length===1;gt&&(ut.key==="Tab"&&ut.preventDefault(),!Ct&&Pt&&mt(ut.key));const At=dt.current;if(ut.target!==At||!FIRST_LAST_KEYS.includes(ut.key))return;ut.preventDefault();const _t=ot().filter(Rt=>!Rt.disabled).map(Rt=>Rt.ref.current);LAST_KEYS.includes(ut.key)&&_t.reverse(),focusFirst(_t)}),onBlur:composeEventHandlers(e.onBlur,ut=>{ut.currentTarget.contains(ut.target)||(window.clearTimeout(yt.current),Et.current="")}),onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(ut=>{const vt=ut.target,gt=wt.current!==ut.clientX;if(ut.currentTarget.contains(vt)&>){const Ct=ut.clientX>wt.current?"right":"left";kt.current=Ct,wt.current=ut.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$1;var GROUP_NAME$1="MenuGroup",MenuGroup=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,...o}=e;return jsxRuntimeExports.jsx(Primitive.div,{role:"group",...o,ref:i})});MenuGroup.displayName=GROUP_NAME$1;var LABEL_NAME$1="MenuLabel",MenuLabel=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,...o}=e;return jsxRuntimeExports.jsx(Primitive.div,{...o,ref:i})});MenuLabel.displayName=LABEL_NAME$1;var ITEM_NAME$1="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=reactExports.forwardRef((e,i)=>{const{disabled:s=!1,onSelect:o,...a}=e,c=reactExports.useRef(null),d=useMenuRootContext(ITEM_NAME$1,e.__scopeMenu),g=useMenuContentContext(ITEM_NAME$1,e.__scopeMenu),b=useComposedRefs(i,c),_=reactExports.useRef(!1),j=()=>{const _e=c.current;if(!s&&_e){const $=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});_e.addEventListener(ITEM_SELECT,st=>o==null?void 0:o(st),{once:!0}),dispatchDiscreteCustomEvent(_e,$),$.defaultPrevented?_.current=!1:d.onClose()}};return jsxRuntimeExports.jsx(MenuItemImpl,{...a,ref:b,disabled:s,onClick:composeEventHandlers(e.onClick,j),onPointerDown:_e=>{var $;($=e.onPointerDown)==null||$.call(e,_e),_.current=!0},onPointerUp:composeEventHandlers(e.onPointerUp,_e=>{var $;_.current||($=_e.currentTarget)==null||$.click()}),onKeyDown:composeEventHandlers(e.onKeyDown,_e=>{const $=g.searchRef.current!=="";s||$&&_e.key===" "||SELECTION_KEYS.includes(_e.key)&&(_e.currentTarget.click(),_e.preventDefault())})})});MenuItem.displayName=ITEM_NAME$1;var MenuItemImpl=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,disabled:o=!1,textValue:a,...c}=e,d=useMenuContentContext(ITEM_NAME$1,s),g=useRovingFocusGroupScope(s),b=reactExports.useRef(null),_=useComposedRefs(i,b),[j,_e]=reactExports.useState(!1),[$,st]=reactExports.useState("");return reactExports.useEffect(()=>{const it=b.current;it&&st((it.textContent??"").trim())},[c.children]),jsxRuntimeExports.jsx(Collection.ItemSlot,{scope:s,disabled:o,textValue:a??$,children:jsxRuntimeExports.jsx(Item,{asChild:!0,...g,focusable:!o,children:jsxRuntimeExports.jsx(Primitive.div,{role:"menuitem","data-highlighted":j?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:_,onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(it=>{o?d.onItemLeave(it):(d.onItemEnter(it),it.defaultPrevented||it.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(it=>d.onItemLeave(it))),onFocus:composeEventHandlers(e.onFocus,()=>_e(!0)),onBlur:composeEventHandlers(e.onBlur,()=>_e(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=reactExports.forwardRef((e,i)=>{const{checked:s=!1,onCheckedChange:o,...a}=e;return jsxRuntimeExports.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:s,children:jsxRuntimeExports.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate(s)?"mixed":s,...a,ref:i,"data-state":getCheckedState(s),onSelect:composeEventHandlers(a.onSelect,()=>o==null?void 0:o(isIndeterminate(s)?!0:!s),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=reactExports.forwardRef((e,i)=>{const{value:s,onValueChange:o,...a}=e,c=useCallbackRef$1(o);return jsxRuntimeExports.jsx(RadioGroupProvider,{scope:e.__scopeMenu,value:s,onValueChange:c,children:jsxRuntimeExports.jsx(MenuGroup,{...a,ref:i})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=reactExports.forwardRef((e,i)=>{const{value:s,...o}=e,a=useRadioGroupContext(RADIO_ITEM_NAME$1,e.__scopeMenu),c=s===a.value;return jsxRuntimeExports.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:c,children:jsxRuntimeExports.jsx(MenuItem,{role:"menuitemradio","aria-checked":c,...o,ref:i,"data-state":getCheckedState(c),onSelect:composeEventHandlers(o.onSelect,()=>{var d;return(d=a.onValueChange)==null?void 0:d.call(a,s)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME,{checked:!1}),MenuItemIndicator=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,forceMount:o,...a}=e,c=useItemIndicatorContext(ITEM_INDICATOR_NAME,s);return jsxRuntimeExports.jsx(Presence,{present:o||isIndeterminate(c.checked)||c.checked===!0,children:jsxRuntimeExports.jsx(Primitive.span,{...a,ref:i,"data-state":getCheckedState(c.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME;var SEPARATOR_NAME$1="MenuSeparator",MenuSeparator=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,...o}=e;return jsxRuntimeExports.jsx(Primitive.div,{role:"separator","aria-orientation":"horizontal",...o,ref:i})});MenuSeparator.displayName=SEPARATOR_NAME$1;var ARROW_NAME$1="MenuArrow",MenuArrow=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,...o}=e,a=usePopperScope(s);return jsxRuntimeExports.jsx(Arrow,{...a,...o,ref:i})});MenuArrow.displayName=ARROW_NAME$1;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=reactExports.forwardRef((e,i)=>{const s=useMenuContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),o=useMenuRootContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),a=useMenuSubContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),c=useMenuContentContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),d=reactExports.useRef(null),{pointerGraceTimerRef:g,onPointerGraceIntentChange:b}=c,_={__scopeMenu:e.__scopeMenu},j=reactExports.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return reactExports.useEffect(()=>j,[j]),reactExports.useEffect(()=>{const _e=g.current;return()=>{window.clearTimeout(_e),b(null)}},[g,b]),jsxRuntimeExports.jsx(MenuAnchor,{asChild:!0,..._,children:jsxRuntimeExports.jsx(MenuItemImpl,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":a.contentId,"data-state":getOpenState(s.open),...e,ref:composeRefs(i,a.onTriggerChange),onClick:_e=>{var $;($=e.onClick)==null||$.call(e,_e),!(e.disabled||_e.defaultPrevented)&&(_e.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(_e=>{c.onItemEnter(_e),!_e.defaultPrevented&&!e.disabled&&!s.open&&!d.current&&(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{s.onOpenChange(!0),j()},100))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(_e=>{var st,it;j();const $=(st=s.content)==null?void 0:st.getBoundingClientRect();if($){const nt=(it=s.content)==null?void 0:it.dataset.side,at=nt==="right",et=at?-5:5,rt=$[at?"left":"right"],tt=$[at?"right":"left"];c.onPointerGraceIntentChange({area:[{x:_e.clientX+et,y:_e.clientY},{x:rt,y:$.top},{x:tt,y:$.top},{x:tt,y:$.bottom},{x:rt,y:$.bottom}],side:nt}),window.clearTimeout(g.current),g.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(_e),_e.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(e.onKeyDown,_e=>{var st;const $=c.searchRef.current!=="";e.disabled||$&&_e.key===" "||SUB_OPEN_KEYS[o.dir].includes(_e.key)&&(s.onOpenChange(!0),(st=s.content)==null||st.focus(),_e.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=reactExports.forwardRef((e,i)=>{const s=usePortalContext(CONTENT_NAME$1,e.__scopeMenu),{forceMount:o=s.forceMount,...a}=e,c=useMenuContext(CONTENT_NAME$1,e.__scopeMenu),d=useMenuRootContext(CONTENT_NAME$1,e.__scopeMenu),g=useMenuSubContext(SUB_CONTENT_NAME$1,e.__scopeMenu),b=reactExports.useRef(null),_=useComposedRefs(i,b);return jsxRuntimeExports.jsx(Collection.Provider,{scope:e.__scopeMenu,children:jsxRuntimeExports.jsx(Presence,{present:o||c.open,children:jsxRuntimeExports.jsx(Collection.Slot,{scope:e.__scopeMenu,children:jsxRuntimeExports.jsx(MenuContentImpl,{id:g.contentId,"aria-labelledby":g.triggerId,...a,ref:_,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:j=>{var _e;d.isUsingKeyboardRef.current&&((_e=b.current)==null||_e.focus()),j.preventDefault()},onCloseAutoFocus:j=>j.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,j=>{j.target!==g.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,j=>{d.onClose(),j.preventDefault()}),onKeyDown:composeEventHandlers(e.onKeyDown,j=>{var st;const _e=j.currentTarget.contains(j.target),$=SUB_CLOSE_KEYS[d.dir].includes(j.key);_e&&$&&(c.onOpenChange(!1),(st=g.trigger)==null||st.focus(),j.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(e){return e?"open":"closed"}function isIndeterminate(e){return e==="indeterminate"}function getCheckedState(e){return isIndeterminate(e)?"indeterminate":e?"checked":"unchecked"}function focusFirst(e){const i=document.activeElement;for(const s of e)if(s===i||(s.focus(),document.activeElement!==i))return}function wrapArray(e,i){return e.map((s,o)=>e[(i+o)%e.length])}function getNextMatch(e,i,s){const a=i.length>1&&Array.from(i).every(_=>_===i[0])?i[0]:i,c=s?e.indexOf(s):-1;let d=wrapArray(e,Math.max(c,0));a.length===1&&(d=d.filter(_=>_!==s));const b=d.find(_=>_.toLowerCase().startsWith(a.toLowerCase()));return b!==s?b:void 0}function isPointInPolygon(e,i){const{x:s,y:o}=e;let a=!1;for(let c=0,d=i.length-1;co!=j>o&&s<(_-g)*(o-b)/(j-b)+g&&(a=!a)}return a}function isPointerInGraceArea(e,i){if(!i)return!1;const s={x:e.clientX,y:e.clientY};return isPointInPolygon(s,i)}function whenMouse(e){return i=>i.pointerType==="mouse"?e(i):void 0}var Root3=Menu,Anchor2=MenuAnchor,Portal=MenuPortal,Content2$1=MenuContent,Group=MenuGroup,Label=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator=MenuItemIndicator,Separator=MenuSeparator,Arrow2=MenuArrow,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext,createDropdownMenuScope]=createContextScope$2(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=e=>{const{__scopeDropdownMenu:i,children:s,dir:o,open:a,defaultOpen:c,onOpenChange:d,modal:g=!0}=e,b=useMenuScope(i),_=reactExports.useRef(null),[j=!1,_e]=useControllableState({prop:a,defaultProp:c,onChange:d});return jsxRuntimeExports.jsx(DropdownMenuProvider,{scope:i,triggerId:useId(),triggerRef:_,contentId:useId(),open:j,onOpenChange:_e,onOpenToggle:reactExports.useCallback(()=>_e($=>!$),[_e]),modal:g,children:jsxRuntimeExports.jsx(Root3,{...b,open:j,onOpenChange:_e,dir:o,modal:g,children:s})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME="DropdownMenuTrigger",DropdownMenuTrigger$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,disabled:o=!1,...a}=e,c=useDropdownMenuContext(TRIGGER_NAME,s),d=useMenuScope(s);return jsxRuntimeExports.jsx(Anchor2,{asChild:!0,...d,children:jsxRuntimeExports.jsx(Primitive.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...a,ref:composeRefs(i,c.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(c.onOpenToggle(),c.open||g.preventDefault())}),onKeyDown:composeEventHandlers(e.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&c.onOpenToggle(),g.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(g.key)&&g.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME;var PORTAL_NAME="DropdownMenuPortal",DropdownMenuPortal=e=>{const{__scopeDropdownMenu:i,...s}=e,o=useMenuScope(i);return jsxRuntimeExports.jsx(Portal,{...o,...s})};DropdownMenuPortal.displayName=PORTAL_NAME;var CONTENT_NAME="DropdownMenuContent",DropdownMenuContent$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useDropdownMenuContext(CONTENT_NAME,s),c=useMenuScope(s),d=reactExports.useRef(!1);return jsxRuntimeExports.jsx(Content2$1,{id:a.contentId,"aria-labelledby":a.triggerId,...c,...o,ref:i,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,g=>{var b;d.current||(b=a.triggerRef.current)==null||b.focus(),d.current=!1,g.preventDefault()}),onInteractOutside:composeEventHandlers(e.onInteractOutside,g=>{const b=g.detail.originalEvent,_=b.button===0&&b.ctrlKey===!0,j=b.button===2||_;(!a.modal||j)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME;var GROUP_NAME="DropdownMenuGroup",DropdownMenuGroup=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(Group,{...a,...o,ref:i})});DropdownMenuGroup.displayName=GROUP_NAME;var LABEL_NAME="DropdownMenuLabel",DropdownMenuLabel$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(Label,{...a,...o,ref:i})});DropdownMenuLabel$1.displayName=LABEL_NAME;var ITEM_NAME="DropdownMenuItem",DropdownMenuItem$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(Item2$1,{...a,...o,ref:i})});DropdownMenuItem$1.displayName=ITEM_NAME;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(CheckboxItem,{...a,...o,ref:i})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(RadioGroup,{...a,...o,ref:i})});DropdownMenuRadioGroup.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(RadioItem,{...a,...o,ref:i})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME="DropdownMenuItemIndicator",DropdownMenuItemIndicator=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(ItemIndicator,{...a,...o,ref:i})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME;var SEPARATOR_NAME="DropdownMenuSeparator",DropdownMenuSeparator$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(Separator,{...a,...o,ref:i})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME;var ARROW_NAME="DropdownMenuArrow",DropdownMenuArrow=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(Arrow2,{...a,...o,ref:i})});DropdownMenuArrow.displayName=ARROW_NAME;var SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(SubTrigger,{...a,...o,ref:i})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(SubContent,{...a,...o,ref:i,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2=DropdownMenu$1,Trigger=DropdownMenuTrigger$1,Portal2=DropdownMenuPortal,Content2=DropdownMenuContent$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2,DropdownMenuTrigger=Trigger,DropdownMenuSubTrigger=reactExports.forwardRef(({className:e,inset:i,children:s,...o},a)=>jsxRuntimeExports.jsxs(SubTrigger2,{ref:a,className:cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",i&&"pl-8",e),...o,children:[s,jsxRuntimeExports.jsx(ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(SubContent2,{ref:s,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",e),...i}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=reactExports.forwardRef(({className:e,sideOffset:i=4,...s},o)=>jsxRuntimeExports.jsx(Portal2,{children:jsxRuntimeExports.jsx(Content2,{ref:o,sideOffset:i,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",e),...s})}));DropdownMenuContent.displayName=Content2.displayName;const DropdownMenuItem=reactExports.forwardRef(({className:e,inset:i,...s},o)=>jsxRuntimeExports.jsx(Item2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i&&"pl-8",e),...s}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=reactExports.forwardRef(({className:e,children:i,checked:s,...o},a)=>jsxRuntimeExports.jsxs(CheckboxItem2,{ref:a,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntimeExports.jsx(ItemIndicator2,{children:jsxRuntimeExports.jsx(CheckIcon,{className:"h-4 w-4"})})}),i]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=reactExports.forwardRef(({className:e,children:i,...s},o)=>jsxRuntimeExports.jsxs(RadioItem2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntimeExports.jsx(ItemIndicator2,{children:jsxRuntimeExports.jsx(DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),i]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=reactExports.forwardRef(({className:e,inset:i,...s},o)=>jsxRuntimeExports.jsx(Label2,{ref:o,className:cn("px-2 py-1.5 text-sm font-semibold",i&&"pl-8",e),...s}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Separator2,{ref:s,className:cn("-mx-1 my-1 h-px bg-muted",e),...i}));DropdownMenuSeparator.displayName=Separator2.displayName;function RiMenu3Fill(e){return GenIcon({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM9 11H21V13H9V11ZM3 18H21V20H3V18Z"},child:[]}]})(e)}function IoMdClose(e){return GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"},child:[]}]})(e)}const Navbar=({onContactClick:e,onQandAClick:i,onStatusClick:s,onProjectsClick:o,onLeaderboardClick:a})=>{const[c,d]=reactExports.useState(!1),g=()=>{window.location.href="http://37.27.81.8:3005/api/auth/github"},b=async()=>{try{await Global.httpPost("/auth/logout"),Global.user=null,window.location.reload()}catch(j){console.error(j)}},_=()=>{d(!c)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("nav",{className:"bg-[rgba(30,30,30,0.8)] backdrop-blur-lg p-4 fixed top-0 left-0 right-0 z-50 flex justify-between items-center shadow-lg",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[jsxRuntimeExports.jsx("img",{className:"w-10 h-10 rounded-full mr-4 transition-transform duration-300 ease-in-out hover:scale-110",src:logo,alt:"Logo"}),jsxRuntimeExports.jsx("a",{href:"/",className:"text-red-500 font-dm-sans text-2xl font-bold tracking-wide",children:"Club Gamma"})]}),jsxRuntimeExports.jsxs("div",{className:"hidden lg:flex gap-12 font-montserrat text-lg",children:[jsxRuntimeExports.jsx("a",{href:"/",className:"text-white hover:text-red-500 transition-all duration-300",children:"Home"}),jsxRuntimeExports.jsx("button",{onClick:i,className:"text-white hover:text-red-500 transition-all duration-300",children:"Q&A"}),jsxRuntimeExports.jsx("button",{onClick:s,className:"text-white hover:text-red-500 transition-all duration-300",children:"Stats"}),jsxRuntimeExports.jsx("button",{onClick:o,className:"text-white hover:text-red-500 transition-all duration-300",children:"Projects"}),jsxRuntimeExports.jsx("button",{onClick:e,className:"text-white hover:text-red-500 transition-all duration-300",children:"Contact"}),jsxRuntimeExports.jsx(Link,{to:"/leaderboard",className:"text-white hover:text-red-500 transition-all duration-300",children:"Leaderboard"})," "]}),jsxRuntimeExports.jsx("div",{className:"hidden lg:flex",children:Global.user?jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs(Button,{variant:"outline",className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(User,{className:"h-4 w-4"}),Global.user.name.split(" ")[0]]})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{align:"end",children:[jsxRuntimeExports.jsx(Link,{to:`/profile/${Global.user.githubId}`,children:jsxRuntimeExports.jsx(DropdownMenuItem,{children:"Profile"})}),jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:b,children:"Logout"})]})]}):jsxRuntimeExports.jsxs("button",{onClick:g,className:"flex font-dm-sans items-center bg-[#181717] text-white py-2 px-5 rounded-md font-bold shadow-lg hover:shadow-none transition-all duration-500",children:[jsxRuntimeExports.jsx("svg",{className:"w-6 h-6 mr-2",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M12,2A10,10,0,0,0,8.84,21.5c.5.08.66-.23.66-.5V19.31C6.73,19.91,6.14,18,6.14,18A2.69,2.69,0,0,0,5,16.5c-.91-.62.07-.6.07-.6a2.1,2.1,0,0,1,1.53,1,2.15,2.15,0,0,0,2.91.83,2.16,2.16,0,0,1,.63-1.34C8,16.17,5.62,15.31,5.62,11.5a3.87,3.87,0,0,1,1-2.71,3.58,3.58,0,0,1,.1-2.64s.84-.27,2.75,1a9.63,9.63,0,0,1,5,0c1.91-1.29,2.75-1,2.75-1a3.58,3.58,0,0,1,.1,2.64,3.87,3.87,0,0,1,1,2.71c0,3.82-2.34,4.66-4.57,4.91a2.39,2.39,0,0,1,.69,1.85V21c0,.27.16.59.67.5A10,10,0,0,0,12,2Z"})}),"Continue with GitHub"]})}),jsxRuntimeExports.jsx("div",{className:"lg:hidden",children:jsxRuntimeExports.jsx("button",{className:"text-white bg-transparent border-none",onClick:_,children:c?jsxRuntimeExports.jsx(IoMdClose,{size:24}):jsxRuntimeExports.jsx(RiMenu3Fill,{size:24})})})]}),jsxRuntimeExports.jsx("div",{className:`fixed inset-y-0 left-0 font-dm-sans w-64 bg-gray-900 transform ${c?"translate-x-0":"-translate-x-full"} transition-transform duration-300 ease-in-out z-50 lg:hidden`,children:jsxRuntimeExports.jsxs("div",{className:"p-4",children:[jsxRuntimeExports.jsx("img",{className:"w-10 h-10 rounded-full mb-4",src:logo,alt:"Logo"}),jsxRuntimeExports.jsxs("nav",{className:"space-y-6",children:[jsxRuntimeExports.jsx("a",{href:"/",className:"text-white block",children:"Home"}),jsxRuntimeExports.jsx("button",{onClick:i,className:"text-white block",children:"Q&A"}),jsxRuntimeExports.jsx("button",{onClick:s,className:"text-white block",children:"Stats"}),jsxRuntimeExports.jsx("button",{onClick:o,className:"text-white block",children:"Projects"}),jsxRuntimeExports.jsx("button",{onClick:e,className:"text-white block",children:"Contact"}),jsxRuntimeExports.jsx(Link,{to:"/leaderboard",className:"text-white block",children:"Leaderboard"})," ",jsxRuntimeExports.jsx("hr",{className:"border-gray-700"}),Global.user?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Link,{to:`/profile/${Global.user.githubId}`,className:"text-white block",children:"Profile"}),jsxRuntimeExports.jsx("button",{onClick:b,className:"text-white block",children:"Logout"})]}):jsxRuntimeExports.jsx(Button,{onClick:g,className:"text-white bg-red-500 block",children:"Continue with GitHub"})]})]})}),jsxRuntimeExports.jsx(Outlet,{})]})};function App(){const[e,i]=reactExports.useState(!1),s=useNavigate(),o=useLocation(),a=c=>{if(o.pathname!=="/")s("/",{state:{scrollTo:c}});else{const d=document.getElementById(c);d==null||d.scrollIntoView({behavior:"smooth"})}};return reactExports.useEffect(()=>{(async()=>{try{Global.user=await Global.getUser(),i(!0)}catch(c){console.error(c),i(!0)}})()},[]),e?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Routes,{children:jsxRuntimeExports.jsxs(Route,{path:"/",element:jsxRuntimeExports.jsx(Navbar,{onContactClick:()=>a("contact"),onQandAClick:()=>a("q&a"),onStatusClick:()=>a("stat"),onProjectsClick:()=>a("project")}),children:[jsxRuntimeExports.jsx(Route,{path:"",element:jsxRuntimeExports.jsx(Home,{})}),jsxRuntimeExports.jsx(Route,{path:"/leaderboard",element:jsxRuntimeExports.jsx(LeaderBoard,{})}),jsxRuntimeExports.jsx(Route,{path:"/profile/:username",element:jsxRuntimeExports.jsx(GitHubProfile,{})})]})})}):jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center h-screen bg-gradient-to-br from-[#1e1e1e] to-[#4e3535]",children:jsxRuntimeExports.jsx("l-infinity",{size:"80",stroke:"4","stroke-length":"0.15","bg-opacity":"0.1",speed:"1.3",color:"white"})})}createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(reactExports.StrictMode,{children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(App,{})})})); +For more information, see https://radix-ui.com/primitives/docs/components/${i.docsSlug}`;return reactExports.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning=({contentRef:e,descriptionId:i})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return reactExports.useEffect(()=>{var c;const a=(c=e.current)==null?void 0:c.getAttribute("aria-describedby");i&&a&&(document.getElementById(i)||console.warn(o))},[o,e,i]),null},Root$3=Dialog,Trigger$1=DialogTrigger,Portal$1=DialogPortal,Overlay=DialogOverlay,Content=DialogContent,Title=DialogTitle,Description=DialogDescription,Close=DialogClose;const Sheet=Root$3,SheetTrigger=Trigger$1,SheetPortal=Portal$1,SheetOverlay=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Overlay,{className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...i,ref:s}));SheetOverlay.displayName=Overlay.displayName;const sheetVariants=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),SheetContent=reactExports.forwardRef(({side:e="right",className:i,children:s,...o},a)=>jsxRuntimeExports.jsxs(SheetPortal,{children:[jsxRuntimeExports.jsx(SheetOverlay,{}),jsxRuntimeExports.jsxs(Content,{ref:a,className:cn(sheetVariants({side:e}),i),...o,children:[jsxRuntimeExports.jsxs(Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsxRuntimeExports.jsx(Cross2Icon,{className:"h-4 w-4"}),jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]}),s]})]}));SheetContent.displayName=Content.displayName;const SheetHeader=({className:e,...i})=>jsxRuntimeExports.jsx("div",{className:cn("flex flex-col space-y-2 text-center sm:text-left",e),...i});SheetHeader.displayName="SheetHeader";const SheetTitle=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Title,{ref:s,className:cn("text-lg font-semibold text-foreground",e),...i}));SheetTitle.displayName=Title.displayName;const SheetDescription=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Description,{ref:s,className:cn("text-sm text-muted-foreground",e),...i}));SheetDescription.displayName=Description.displayName;var PAGE_KEYS=["PageUp","PageDown"],ARROW_KEYS=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],BACK_KEYS={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},SLIDER_NAME="Slider",[Collection$2,useCollection$2,createCollectionScope$2]=createCollection(SLIDER_NAME),[createSliderContext,createSliderScope]=createContextScope$2(SLIDER_NAME,[createCollectionScope$2]),[SliderProvider,useSliderContext]=createSliderContext(SLIDER_NAME),Slider$1=reactExports.forwardRef((e,i)=>{const{name:s,min:o=0,max:a=100,step:c=1,orientation:d="horizontal",disabled:g=!1,minStepsBetweenThumbs:b=0,defaultValue:_=[o],value:j,onValueChange:_e=()=>{},onValueCommit:$=()=>{},inverted:st=!1,form:it,...nt}=e,at=reactExports.useRef(new Set),et=reactExports.useRef(0),tt=d==="horizontal"?SliderHorizontal:SliderVertical,[ot=[],ct]=useControllableState({prop:j,defaultProp:_,onChange:St=>{var kt;(kt=[...at.current][et.current])==null||kt.focus(),_e(St)}}),ft=reactExports.useRef(ot);function dt(St){const xt=getClosestValueIndex(ot,St);Et(St,xt)}function ht(St){Et(St,et.current)}function yt(){const St=ft.current[et.current];ot[et.current]!==St&&$(ot)}function Et(St,xt,{commit:kt}={commit:!1}){const wt=getDecimalCount(c),bt=roundValue(Math.round((St-o)/c)*c+o,wt),pt=clamp$1(bt,[o,a]);ct((mt=[])=>{const lt=getNextSortedValues(mt,pt,xt);if(hasMinStepsBetweenValues(lt,b*c)){et.current=lt.indexOf(pt);const ut=String(lt)!==String(mt);return ut&&kt&&$(lt),ut?lt:mt}else return mt})}return jsxRuntimeExports.jsx(SliderProvider,{scope:e.__scopeSlider,name:s,disabled:g,min:o,max:a,valueIndexToChangeRef:et,thumbs:at.current,values:ot,orientation:d,form:it,children:jsxRuntimeExports.jsx(Collection$2.Provider,{scope:e.__scopeSlider,children:jsxRuntimeExports.jsx(Collection$2.Slot,{scope:e.__scopeSlider,children:jsxRuntimeExports.jsx(tt,{"aria-disabled":g,"data-disabled":g?"":void 0,...nt,ref:i,onPointerDown:composeEventHandlers(nt.onPointerDown,()=>{g||(ft.current=ot)}),min:o,max:a,inverted:st,onSlideStart:g?void 0:dt,onSlideMove:g?void 0:ht,onSlideEnd:g?void 0:yt,onHomeKeyDown:()=>!g&&Et(o,0,{commit:!0}),onEndKeyDown:()=>!g&&Et(a,ot.length-1,{commit:!0}),onStepKeyDown:({event:St,direction:xt})=>{if(!g){const bt=PAGE_KEYS.includes(St.key)||St.shiftKey&&ARROW_KEYS.includes(St.key)?10:1,pt=et.current,mt=ot[pt],lt=c*bt*xt;Et(mt+lt,pt,{commit:!0})}}})})})})});Slider$1.displayName=SLIDER_NAME;var[SliderOrientationProvider,useSliderOrientationContext]=createSliderContext(SLIDER_NAME,{startEdge:"left",endEdge:"right",size:"width",direction:1}),SliderHorizontal=reactExports.forwardRef((e,i)=>{const{min:s,max:o,dir:a,inverted:c,onSlideStart:d,onSlideMove:g,onSlideEnd:b,onStepKeyDown:_,...j}=e,[_e,$]=reactExports.useState(null),st=useComposedRefs(i,tt=>$(tt)),it=reactExports.useRef(),nt=useDirection(a),at=nt==="ltr",et=at&&!c||!at&&c;function rt(tt){const ot=it.current||_e.getBoundingClientRect(),ct=[0,ot.width],dt=linearScale(ct,et?[s,o]:[o,s]);return it.current=ot,dt(tt-ot.left)}return jsxRuntimeExports.jsx(SliderOrientationProvider,{scope:e.__scopeSlider,startEdge:et?"left":"right",endEdge:et?"right":"left",direction:et?1:-1,size:"width",children:jsxRuntimeExports.jsx(SliderImpl,{dir:nt,"data-orientation":"horizontal",...j,ref:st,style:{...j.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:tt=>{const ot=rt(tt.clientX);d==null||d(ot)},onSlideMove:tt=>{const ot=rt(tt.clientX);g==null||g(ot)},onSlideEnd:()=>{it.current=void 0,b==null||b()},onStepKeyDown:tt=>{const ct=BACK_KEYS[et?"from-left":"from-right"].includes(tt.key);_==null||_({event:tt,direction:ct?-1:1})}})})}),SliderVertical=reactExports.forwardRef((e,i)=>{const{min:s,max:o,inverted:a,onSlideStart:c,onSlideMove:d,onSlideEnd:g,onStepKeyDown:b,..._}=e,j=reactExports.useRef(null),_e=useComposedRefs(i,j),$=reactExports.useRef(),st=!a;function it(nt){const at=$.current||j.current.getBoundingClientRect(),et=[0,at.height],tt=linearScale(et,st?[o,s]:[s,o]);return $.current=at,tt(nt-at.top)}return jsxRuntimeExports.jsx(SliderOrientationProvider,{scope:e.__scopeSlider,startEdge:st?"bottom":"top",endEdge:st?"top":"bottom",size:"height",direction:st?1:-1,children:jsxRuntimeExports.jsx(SliderImpl,{"data-orientation":"vertical",..._,ref:_e,style:{..._.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:nt=>{const at=it(nt.clientY);c==null||c(at)},onSlideMove:nt=>{const at=it(nt.clientY);d==null||d(at)},onSlideEnd:()=>{$.current=void 0,g==null||g()},onStepKeyDown:nt=>{const et=BACK_KEYS[st?"from-bottom":"from-top"].includes(nt.key);b==null||b({event:nt,direction:et?-1:1})}})})}),SliderImpl=reactExports.forwardRef((e,i)=>{const{__scopeSlider:s,onSlideStart:o,onSlideMove:a,onSlideEnd:c,onHomeKeyDown:d,onEndKeyDown:g,onStepKeyDown:b,..._}=e,j=useSliderContext(SLIDER_NAME,s);return jsxRuntimeExports.jsx(Primitive.span,{..._,ref:i,onKeyDown:composeEventHandlers(e.onKeyDown,_e=>{_e.key==="Home"?(d(_e),_e.preventDefault()):_e.key==="End"?(g(_e),_e.preventDefault()):PAGE_KEYS.concat(ARROW_KEYS).includes(_e.key)&&(b(_e),_e.preventDefault())}),onPointerDown:composeEventHandlers(e.onPointerDown,_e=>{const $=_e.target;$.setPointerCapture(_e.pointerId),_e.preventDefault(),j.thumbs.has($)?$.focus():o(_e)}),onPointerMove:composeEventHandlers(e.onPointerMove,_e=>{_e.target.hasPointerCapture(_e.pointerId)&&a(_e)}),onPointerUp:composeEventHandlers(e.onPointerUp,_e=>{const $=_e.target;$.hasPointerCapture(_e.pointerId)&&($.releasePointerCapture(_e.pointerId),c(_e))})})}),TRACK_NAME="SliderTrack",SliderTrack=reactExports.forwardRef((e,i)=>{const{__scopeSlider:s,...o}=e,a=useSliderContext(TRACK_NAME,s);return jsxRuntimeExports.jsx(Primitive.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...o,ref:i})});SliderTrack.displayName=TRACK_NAME;var RANGE_NAME="SliderRange",SliderRange=reactExports.forwardRef((e,i)=>{const{__scopeSlider:s,...o}=e,a=useSliderContext(RANGE_NAME,s),c=useSliderOrientationContext(RANGE_NAME,s),d=reactExports.useRef(null),g=useComposedRefs(i,d),b=a.values.length,_=a.values.map($=>convertValueToPercentage($,a.min,a.max)),j=b>1?Math.min(..._):0,_e=100-Math.max(..._);return jsxRuntimeExports.jsx(Primitive.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...o,ref:g,style:{...e.style,[c.startEdge]:j+"%",[c.endEdge]:_e+"%"}})});SliderRange.displayName=RANGE_NAME;var THUMB_NAME="SliderThumb",SliderThumb=reactExports.forwardRef((e,i)=>{const s=useCollection$2(e.__scopeSlider),[o,a]=reactExports.useState(null),c=useComposedRefs(i,g=>a(g)),d=reactExports.useMemo(()=>o?s().findIndex(g=>g.ref.current===o):-1,[s,o]);return jsxRuntimeExports.jsx(SliderThumbImpl,{...e,ref:c,index:d})}),SliderThumbImpl=reactExports.forwardRef((e,i)=>{const{__scopeSlider:s,index:o,name:a,...c}=e,d=useSliderContext(THUMB_NAME,s),g=useSliderOrientationContext(THUMB_NAME,s),[b,_]=reactExports.useState(null),j=useComposedRefs(i,rt=>_(rt)),_e=b?d.form||!!b.closest("form"):!0,$=useSize(b),st=d.values[o],it=st===void 0?0:convertValueToPercentage(st,d.min,d.max),nt=getLabel(o,d.values.length),at=$==null?void 0:$[g.size],et=at?getThumbInBoundsOffset(at,it,g.direction):0;return reactExports.useEffect(()=>{if(b)return d.thumbs.add(b),()=>{d.thumbs.delete(b)}},[b,d.thumbs]),jsxRuntimeExports.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[g.startEdge]:`calc(${it}% + ${et}px)`},children:[jsxRuntimeExports.jsx(Collection$2.ItemSlot,{scope:e.__scopeSlider,children:jsxRuntimeExports.jsx(Primitive.span,{role:"slider","aria-label":e["aria-label"]||nt,"aria-valuemin":d.min,"aria-valuenow":st,"aria-valuemax":d.max,"aria-orientation":d.orientation,"data-orientation":d.orientation,"data-disabled":d.disabled?"":void 0,tabIndex:d.disabled?void 0:0,...c,ref:j,style:st===void 0?{display:"none"}:e.style,onFocus:composeEventHandlers(e.onFocus,()=>{d.valueIndexToChangeRef.current=o})})}),_e&&jsxRuntimeExports.jsx(BubbleInput,{name:a??(d.name?d.name+(d.values.length>1?"[]":""):void 0),form:d.form,value:st},o)]})});SliderThumb.displayName=THUMB_NAME;var BubbleInput=e=>{const{value:i,...s}=e,o=reactExports.useRef(null),a=usePrevious(i);return reactExports.useEffect(()=>{const c=o.current,d=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(d,"value").set;if(a!==i&&b){const _=new Event("input",{bubbles:!0});b.call(c,i),c.dispatchEvent(_)}},[a,i]),jsxRuntimeExports.jsx("input",{style:{display:"none"},...s,ref:o,defaultValue:i})};function getNextSortedValues(e=[],i,s){const o=[...e];return o[s]=i,o.sort((a,c)=>a-c)}function convertValueToPercentage(e,i,s){const c=100/(s-i)*(e-i);return clamp$1(c,[0,100])}function getLabel(e,i){return i>2?`Value ${e+1} of ${i}`:i===2?["Minimum","Maximum"][e]:void 0}function getClosestValueIndex(e,i){if(e.length===1)return 0;const s=e.map(a=>Math.abs(a-i)),o=Math.min(...s);return s.indexOf(o)}function getThumbInBoundsOffset(e,i,s){const o=e/2,c=linearScale([0,50],[0,o]);return(o-c(i)*s)*s}function getStepsBetweenValues(e){return e.slice(0,-1).map((i,s)=>e[s+1]-i)}function hasMinStepsBetweenValues(e,i){if(i>0){const s=getStepsBetweenValues(e);return Math.min(...s)>=i}return!0}function linearScale(e,i){return s=>{if(e[0]===e[1]||i[0]===i[1])return i[0];const o=(i[1]-i[0])/(e[1]-e[0]);return i[0]+o*(s-e[0])}}function getDecimalCount(e){return(String(e).split(".")[1]||"").length}function roundValue(e,i){const s=Math.pow(10,i);return Math.round(e*s)/s}var Root$2=Slider$1,Track=SliderTrack,Range=SliderRange,Thumb=SliderThumb;const Slider=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsxs(Root$2,{ref:s,className:cn("relative flex w-full touch-none select-none items-center",e),...i,children:[jsxRuntimeExports.jsx(Track,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:jsxRuntimeExports.jsx(Range,{className:"absolute h-full bg-primary"})}),jsxRuntimeExports.jsx(Thumb,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));Slider.displayName=Root$2.displayName;const LeaderBoard=()=>{const[e,i]=reactExports.useState([]),[s,o]=reactExports.useState(!0),[a,c]=reactExports.useState(1),[d,g]=reactExports.useState({minPoints:0,maxPoints:100,minPrs:0}),[b,_]=reactExports.useState(1),[j,_e]=reactExports.useState(10),[$,st]=reactExports.useState(""),[it,nt]=reactExports.useState(null),at=reactExports.useCallback(ft(dt=>{st(dt),_(1)},300),[]);reactExports.useEffect(()=>{et(),rt()},[b,j,$,d]);const et=async()=>{try{if(Global.user){const dt=await Global.httpGet(`/users/stats/${Global.user.githubId}`);console.log(dt.user),nt({...dt.stats,...dt.user})}}catch(dt){console.error("Error fetching user:",dt)}},rt=async()=>{o(!0);try{let dt=`/leaderboard?page=${b}&limit=${j}`;$&&(dt=`/leaderboard/search?name=${$}&page=${b}&limit=${j}`),(d.minPoints>0||d.maxPoints<100||d.minPrs>0)&&(dt=`/leaderboard/filter?minPoints=${d.minPoints}&maxPoints=${d.maxPoints}&minPrs=${d.minPrs}&page=${b}&limit=${j}`);const ht=await Global.httpGet(dt);i(ht.contributors),c(ht.meta.totalPages)}catch(dt){console.error("Error fetching contributors:",dt)}finally{o(!1)}},tt=dt=>{at(dt)},ot=dt=>{_(dt)},ct=dt=>{_e(parseInt(dt)),_(1)};function ft(dt,ht){let yt;return function(...St){const xt=()=>{clearTimeout(yt),dt(...St)};clearTimeout(yt),yt=setTimeout(xt,ht)}}return jsxRuntimeExports.jsx("div",{className:"min-h-screen font-dm-sans bg-[#1C1C1C] text-white",children:jsxRuntimeExports.jsxs("main",{className:"container mx-auto px-4 py-8 pt-32",children:[it&&jsxRuntimeExports.jsx("div",{className:"bg-[#2A2A2A] rounded-xl shadow-lg p-6 border border-[#3A3A3A] mb-8",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between space-y-4 md:space-y-0",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-4",children:[jsxRuntimeExports.jsx("img",{src:it.avatarUrl||"https://github.com/identicons/jasonlong.png",alt:it.username,className:"w-20 h-20 rounded-full border-4 border-[#FF4545]"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h2",{className:"text-3xl font-bold text-white",children:it.username}),jsxRuntimeExports.jsxs("p",{className:"text-[#FF4545] text-lg",children:["Rank #",it.rank]})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[jsxRuntimeExports.jsxs("div",{className:"p-4 rounded-lg bg-[#3A3A3A]",children:[jsxRuntimeExports.jsx("div",{className:"text-3xl font-bold text-[#FF4545]",children:it.points}),jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-300",children:"Points"})]}),jsxRuntimeExports.jsxs("div",{className:"p-4 rounded-lg bg-[#3A3A3A]",children:[jsxRuntimeExports.jsx("div",{className:"text-3xl font-bold text-[#FFA500]",children:it.totalPRs}),jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-300",children:"Total PRs"})]}),jsxRuntimeExports.jsxs("div",{className:"p-4 rounded-lg bg-[#3A3A3A]",children:[jsxRuntimeExports.jsx("div",{className:"text-sm font-medium text-gray-300",children:"PRs Status"}),jsxRuntimeExports.jsxs("div",{className:"text-xs mt-1",children:[jsxRuntimeExports.jsxs("span",{className:"text-green-400",children:[it.openPRs," Open"]})," |",jsxRuntimeExports.jsxs("span",{className:"text-blue-400",children:[" ",it.mergedPRs," Merged"]})," |",jsxRuntimeExports.jsxs("span",{className:"text-red-400",children:[" ",it.closedPRs," Closed"]})]})]})]})]})}),jsxRuntimeExports.jsxs("div",{className:"bg-[#2A2A2A] rounded-xl shadow-lg border border-[#3A3A3A]",children:[jsxRuntimeExports.jsx("div",{className:"p-6 border-b border-[#3A3A3A]",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between space-y-4 md:space-y-0",children:[jsxRuntimeExports.jsx("h2",{className:"text-3xl font-bold text-white",children:"Leaderboard"}),jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[jsxRuntimeExports.jsxs("div",{className:"relative w-72 md:w-64 ml-auto pr-3",children:[jsxRuntimeExports.jsx(Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),jsxRuntimeExports.jsx(Input,{placeholder:"Search contributors...",className:"pl-10 bg-[#3A3A3A] border-[#4A4A4A] text-white placeholder-gray-400 w-full",onChange:dt=>tt(dt.target.value)})]}),jsxRuntimeExports.jsxs(Sheet,{children:[jsxRuntimeExports.jsx(SheetTrigger,{asChild:!0,children:jsxRuntimeExports.jsx(Button,{variant:"outline",size:"icon",className:"bg-[#3A3A3A] border-[#4A4A4A] hover:bg-[#4A4A4A]",children:jsxRuntimeExports.jsx(SlidersHorizontal,{className:"h-5 w-5"})})}),jsxRuntimeExports.jsxs(SheetContent,{className:"bg-[#2A2A2A] text-white",children:[jsxRuntimeExports.jsxs(SheetHeader,{children:[jsxRuntimeExports.jsx(SheetTitle,{className:"text-white",children:"Filters"}),jsxRuntimeExports.jsx(SheetDescription,{className:"text-gray-400",children:"Adjust the filters to refine the leaderboard"})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-6 py-4",children:[jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx("label",{className:"text-sm font-medium text-gray-300",children:"Points Range"}),jsxRuntimeExports.jsx(Slider,{defaultValue:[d.minPoints,d.maxPoints],max:100,step:1,onValueChange:([dt,ht])=>g(yt=>({...yt,minPoints:dt,maxPoints:ht})),className:"bg-[#3A3A3A]"}),jsxRuntimeExports.jsxs("div",{className:"flex justify-between text-sm text-gray-400",children:[jsxRuntimeExports.jsx("span",{children:d.minPoints}),jsxRuntimeExports.jsx("span",{children:d.maxPoints})]})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx("label",{className:"text-sm font-medium text-gray-300",children:"Minimum PRs"}),jsxRuntimeExports.jsx(Slider,{defaultValue:[d.minPrs],max:50,step:1,onValueChange:([dt])=>g(ht=>({...ht,minPrs:dt})),className:"bg-[#3A3A3A]"}),jsxRuntimeExports.jsxs("div",{className:"text-sm text-gray-400",children:[d.minPrs," PRs"]})]})]})]})]})]})]})}),jsxRuntimeExports.jsx("div",{className:"overflow-x-auto",children:jsxRuntimeExports.jsxs("table",{className:"w-full",children:[jsxRuntimeExports.jsx("thead",{className:"bg-[#3A3A3A]",children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider",children:"Rank"}),jsxRuntimeExports.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider",children:"User"}),jsxRuntimeExports.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-300 uppercase tracking-wider",children:"Points"}),jsxRuntimeExports.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-300 uppercase tracking-wider",children:"PRs"})]})}),jsxRuntimeExports.jsx("tbody",{className:"divide-y divide-[#3A3A3A]",children:s?jsxRuntimeExports.jsx("tr",{children:jsxRuntimeExports.jsx("td",{colSpan:"4",className:"px-6 py-4 text-center text-gray-400",children:jsxRuntimeExports.jsx("l-infinity",{size:"55",stroke:"4","stroke-length":"0.15","bg-opacity":"0.1",speed:"1.3",color:"white"})})}):e.map((dt,ht)=>jsxRuntimeExports.jsxs("tr",{className:`hover:bg-[#3A3A3A] transition-colors ${ht%2===0?"bg-[#2A2A2A]":"bg-[#333333]"}`,children:[jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:jsxRuntimeExports.jsx("div",{className:"flex items-center",children:dt.rank<=3?jsxRuntimeExports.jsx(Trophy,{className:`h-6 w-6 ${dt.rank===1?"text-[#FFD700]":dt.rank===2?"text-[#C0C0C0]":"text-[#CD7F32]"}`}):jsxRuntimeExports.jsxs("span",{className:"text-gray-400 font-medium",children:["#",dt.rank]})})}),jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[jsxRuntimeExports.jsx("img",{className:"h-10 w-10 rounded-full border-2 border-[#FF4545]",src:dt.avatarUrl||"https://github.com/identicons/jasonlong.png",alt:""}),jsxRuntimeExports.jsx("div",{className:"ml-4",children:jsxRuntimeExports.jsx("div",{className:"text-sm font-medium text-white",children:dt.githubId})})]})}),jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:jsxRuntimeExports.jsx("div",{className:"text-[#FF4545] font-bold",children:dt.points})}),jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[jsxRuntimeExports.jsx(GitPullRequest,{className:"h-5 w-5 text-[#FFA500]"}),jsxRuntimeExports.jsx("span",{className:"text-white font-medium",children:dt.prs.opened+dt.prs.merged+dt.prs.closed})]})})]},dt.githubId))})]})}),jsxRuntimeExports.jsx("div",{className:"p-4 border-t border-[#3A3A3A]",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between space-y-4 md:space-y-0",children:[jsxRuntimeExports.jsxs(Select,{value:j.toString(),onValueChange:ct,children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"w-[180px] bg-[#3A3A3A] border-[#4A4A4A] text-white",children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"Select rows per page"})}),jsxRuntimeExports.jsxs(SelectContent,{className:"bg-[#3A3A3A] border-[#4A4A4A] text-white",children:[jsxRuntimeExports.jsx(SelectItem,{value:"5",children:"5 per page"}),jsxRuntimeExports.jsx(SelectItem,{value:"10",children:"10 per page"}),jsxRuntimeExports.jsx(SelectItem,{value:"20",children:"20 per page"}),jsxRuntimeExports.jsx(SelectItem,{value:"50",children:"50 per page"})]})]}),jsxRuntimeExports.jsx(Pagination,{children:jsxRuntimeExports.jsxs(PaginationContent,{children:[jsxRuntimeExports.jsx(PaginationItem,{children:jsxRuntimeExports.jsx(PaginationPrevious,{onClick:()=>ot(b-1),disabled:b<=1,className:"bg-[#3A3A3A] border-[#4A4A4A] text-white hover:bg-[#4A4A4A]"})}),[...Array(a)].map((dt,ht)=>jsxRuntimeExports.jsx(PaginationItem,{children:jsxRuntimeExports.jsx(PaginationLink,{onClick:()=>ot(ht+1),isActive:b===ht+1,className:`${b===ht+1?"bg-[#FF4545] text-white":"bg-[#3A3A3A] text-white"} border-[#4A4A4A] hover:bg-[#4A4A4A]`,children:ht+1})},ht)),jsxRuntimeExports.jsx(PaginationItem,{children:jsxRuntimeExports.jsx(PaginationNext,{onClick:()=>ot(b+1),disabled:b>=a,className:"bg-[#3A3A3A] border-[#4A4A4A] text-white hover:bg-[#4A4A4A]"})})]})})]})})]})]})})};var AVATAR_NAME="Avatar",[createAvatarContext,createAvatarScope]=createContextScope$2(AVATAR_NAME),[AvatarProvider,useAvatarContext]=createAvatarContext(AVATAR_NAME),Avatar$1=reactExports.forwardRef((e,i)=>{const{__scopeAvatar:s,...o}=e,[a,c]=reactExports.useState("idle");return jsxRuntimeExports.jsx(AvatarProvider,{scope:s,imageLoadingStatus:a,onImageLoadingStatusChange:c,children:jsxRuntimeExports.jsx(Primitive.span,{...o,ref:i})})});Avatar$1.displayName=AVATAR_NAME;var IMAGE_NAME="AvatarImage",AvatarImage$1=reactExports.forwardRef((e,i)=>{const{__scopeAvatar:s,src:o,onLoadingStatusChange:a=()=>{},...c}=e,d=useAvatarContext(IMAGE_NAME,s),g=useImageLoadingStatus(o,c.referrerPolicy),b=useCallbackRef$1(_=>{a(_),d.onImageLoadingStatusChange(_)});return useLayoutEffect2(()=>{g!=="idle"&&b(g)},[g,b]),g==="loaded"?jsxRuntimeExports.jsx(Primitive.img,{...c,ref:i,src:o}):null});AvatarImage$1.displayName=IMAGE_NAME;var FALLBACK_NAME="AvatarFallback",AvatarFallback$1=reactExports.forwardRef((e,i)=>{const{__scopeAvatar:s,delayMs:o,...a}=e,c=useAvatarContext(FALLBACK_NAME,s),[d,g]=reactExports.useState(o===void 0);return reactExports.useEffect(()=>{if(o!==void 0){const b=window.setTimeout(()=>g(!0),o);return()=>window.clearTimeout(b)}},[o]),d&&c.imageLoadingStatus!=="loaded"?jsxRuntimeExports.jsx(Primitive.span,{...a,ref:i}):null});AvatarFallback$1.displayName=FALLBACK_NAME;function useImageLoadingStatus(e,i){const[s,o]=reactExports.useState("idle");return useLayoutEffect2(()=>{if(!e){o("error");return}let a=!0;const c=new window.Image,d=g=>()=>{a&&o(g)};return o("loading"),c.onload=d("loaded"),c.onerror=d("error"),c.src=e,i&&(c.referrerPolicy=i),()=>{a=!1}},[e,i]),s}var Root$1=Avatar$1,Image$1=AvatarImage$1,Fallback=AvatarFallback$1;const Avatar=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Root$1,{ref:s,className:cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...i}));Avatar.displayName=Root$1.displayName;const AvatarImage=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Image$1,{ref:s,className:cn("aspect-square h-full w-full",e),...i}));AvatarImage.displayName=Image$1.displayName;const AvatarFallback=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Fallback,{ref:s,className:cn("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...i}));AvatarFallback.displayName=Fallback.displayName;const StatusBadge=({state:e})=>{const i={merged:"bg-purple-500",open:"bg-green-500",closed:"bg-red-500"};return console.log(e),jsxRuntimeExports.jsx("span",{className:`${i[e]} text-white px-2 py-1 rounded text-sm`,children:e.charAt(0).toUpperCase()+e.slice(1)})};function GitHubProfile(){const[e,i]=React.useState(),{username:s}=useParams();if(reactExports.useEffect(()=>{(async()=>{const{user:o,stats:a}=await Global.httpGet(`/users/stats/${s}`);i({...o,...a}),console.log({...o,...a}),document.title=`Profile | ${o.name}`})()},[s]),e)console.log(e.prs);else return jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center h-screen",children:jsxRuntimeExports.jsx("l-infinity",{size:"55",stroke:"4","stroke-length":"0.15","bg-opacity":"0.1",speed:"1.3",color:"black"})});return jsxRuntimeExports.jsx("div",{className:"min-h-screen bg-black text-white p-8 pt-32",children:jsxRuntimeExports.jsxs("div",{className:"max-w-3xl mx-auto",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[jsxRuntimeExports.jsxs(Avatar,{className:"h-24 w-24",children:[jsxRuntimeExports.jsx(AvatarImage,{src:e.avatar,alt:e.name}),jsxRuntimeExports.jsx(AvatarFallback,{children:e.name.charAt(0)})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-bold",children:e.name}),jsxRuntimeExports.jsxs("div",{className:"text-zinc-400 flex items-center gap-2",children:[jsxRuntimeExports.jsx(GitPullRequest,{className:"h-4 w-4"}),e.username]}),jsxRuntimeExports.jsx("p",{className:"text-zinc-400 mt-2",children:e.bio})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-5 gap-4 mb-8",children:[jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold",children:e.points}),jsxRuntimeExports.jsx("div",{className:"text-zinc-400",children:"Points"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold",children:e.mergedPRs}),jsxRuntimeExports.jsx("div",{className:"text-zinc-400",children:"Merged PRs"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold",children:e.repositories}),jsxRuntimeExports.jsx("div",{className:"text-zinc-400",children:"Repositories"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold",children:e.followers}),jsxRuntimeExports.jsx("div",{className:"text-zinc-400",children:"Followers"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold",children:e.following}),jsxRuntimeExports.jsx("div",{className:"text-zinc-400",children:"Following"})]})]}),jsxRuntimeExports.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Recent Pull Requests"}),jsxRuntimeExports.jsx("div",{className:"space-y-2",children:e.prs.map((o,a)=>jsxRuntimeExports.jsxs("div",{className:"bg-zinc-900 p-4 rounded-lg flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx(GitPullRequest,{className:"h-5 w-5 text-zinc-400"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"font-medium",children:o.title}),jsxRuntimeExports.jsx("div",{className:"text-sm text-zinc-400",children:o.url})]})]}),jsxRuntimeExports.jsx(StatusBadge,{state:o.state})]},a))})]})})}const logo="/hacktoberfest2024/assets/logo-DJb3Nfol.jpeg";function createContextScope(e,i=[]){let s=[];function o(c,d){const g=reactExports.createContext(d),b=s.length;s=[...s,d];function _(_e){const{scope:$,children:st,...it}=_e,nt=($==null?void 0:$[e][b])||g,at=reactExports.useMemo(()=>it,Object.values(it));return jsxRuntimeExports.jsx(nt.Provider,{value:at,children:st})}function j(_e,$){const st=($==null?void 0:$[e][b])||g,it=reactExports.useContext(st);if(it)return it;if(d!==void 0)return d;throw new Error(`\`${_e}\` must be used within \`${c}\``)}return _.displayName=c+"Provider",[_,j]}const a=()=>{const c=s.map(d=>reactExports.createContext(d));return function(g){const b=(g==null?void 0:g[e])||c;return reactExports.useMemo(()=>({[`__scope${e}`]:{...g,[e]:b}}),[g,b])}};return a.scopeName=e,[o,composeContextScopes(a,...i)]}function composeContextScopes(...e){const i=e[0];if(e.length===1)return i;const s=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const d=o.reduce((g,{useScope:b,scopeName:_})=>{const _e=b(c)[`__scope${_}`];return{...g,..._e}},{});return reactExports.useMemo(()=>({[`__scope${i.scopeName}`]:d}),[d])}};return s.scopeName=i.scopeName,s}var ENTRY_FOCUS="rovingFocusGroup.onEntryFocus",EVENT_OPTIONS={bubbles:!1,cancelable:!0},GROUP_NAME$2="RovingFocusGroup",[Collection$1,useCollection$1,createCollectionScope$1]=createCollection(GROUP_NAME$2),[createRovingFocusGroupContext,createRovingFocusGroupScope]=createContextScope(GROUP_NAME$2,[createCollectionScope$1]),[RovingFocusProvider,useRovingFocusContext]=createRovingFocusGroupContext(GROUP_NAME$2),RovingFocusGroup=reactExports.forwardRef((e,i)=>jsxRuntimeExports.jsx(Collection$1.Provider,{scope:e.__scopeRovingFocusGroup,children:jsxRuntimeExports.jsx(Collection$1.Slot,{scope:e.__scopeRovingFocusGroup,children:jsxRuntimeExports.jsx(RovingFocusGroupImpl,{...e,ref:i})})}));RovingFocusGroup.displayName=GROUP_NAME$2;var RovingFocusGroupImpl=reactExports.forwardRef((e,i)=>{const{__scopeRovingFocusGroup:s,orientation:o,loop:a=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:b,onEntryFocus:_,preventScrollOnEntryFocus:j=!1,..._e}=e,$=reactExports.useRef(null),st=useComposedRefs(i,$),it=useDirection(c),[nt=null,at]=useControllableState({prop:d,defaultProp:g,onChange:b}),[et,rt]=reactExports.useState(!1),tt=useCallbackRef$1(_),ot=useCollection$1(s),ct=reactExports.useRef(!1),[ft,dt]=reactExports.useState(0);return reactExports.useEffect(()=>{const ht=$.current;if(ht)return ht.addEventListener(ENTRY_FOCUS,tt),()=>ht.removeEventListener(ENTRY_FOCUS,tt)},[tt]),jsxRuntimeExports.jsx(RovingFocusProvider,{scope:s,orientation:o,dir:it,loop:a,currentTabStopId:nt,onItemFocus:reactExports.useCallback(ht=>at(ht),[at]),onItemShiftTab:reactExports.useCallback(()=>rt(!0),[]),onFocusableItemAdd:reactExports.useCallback(()=>dt(ht=>ht+1),[]),onFocusableItemRemove:reactExports.useCallback(()=>dt(ht=>ht-1),[]),children:jsxRuntimeExports.jsx(Primitive.div,{tabIndex:et||ft===0?-1:0,"data-orientation":o,..._e,ref:st,style:{outline:"none",...e.style},onMouseDown:composeEventHandlers(e.onMouseDown,()=>{ct.current=!0}),onFocus:composeEventHandlers(e.onFocus,ht=>{const yt=!ct.current;if(ht.target===ht.currentTarget&&yt&&!et){const Et=new CustomEvent(ENTRY_FOCUS,EVENT_OPTIONS);if(ht.currentTarget.dispatchEvent(Et),!Et.defaultPrevented){const St=ot().filter(pt=>pt.focusable),xt=St.find(pt=>pt.active),kt=St.find(pt=>pt.id===nt),bt=[xt,kt,...St].filter(Boolean).map(pt=>pt.ref.current);focusFirst$1(bt,j)}}ct.current=!1}),onBlur:composeEventHandlers(e.onBlur,()=>rt(!1))})})}),ITEM_NAME$2="RovingFocusGroupItem",RovingFocusGroupItem=reactExports.forwardRef((e,i)=>{const{__scopeRovingFocusGroup:s,focusable:o=!0,active:a=!1,tabStopId:c,...d}=e,g=useId(),b=c||g,_=useRovingFocusContext(ITEM_NAME$2,s),j=_.currentTabStopId===b,_e=useCollection$1(s),{onFocusableItemAdd:$,onFocusableItemRemove:st}=_;return reactExports.useEffect(()=>{if(o)return $(),()=>st()},[o,$,st]),jsxRuntimeExports.jsx(Collection$1.ItemSlot,{scope:s,id:b,focusable:o,active:a,children:jsxRuntimeExports.jsx(Primitive.span,{tabIndex:j?0:-1,"data-orientation":_.orientation,...d,ref:i,onMouseDown:composeEventHandlers(e.onMouseDown,it=>{o?_.onItemFocus(b):it.preventDefault()}),onFocus:composeEventHandlers(e.onFocus,()=>_.onItemFocus(b)),onKeyDown:composeEventHandlers(e.onKeyDown,it=>{if(it.key==="Tab"&&it.shiftKey){_.onItemShiftTab();return}if(it.target!==it.currentTarget)return;const nt=getFocusIntent(it,_.orientation,_.dir);if(nt!==void 0){if(it.metaKey||it.ctrlKey||it.altKey||it.shiftKey)return;it.preventDefault();let et=_e().filter(rt=>rt.focusable).map(rt=>rt.ref.current);if(nt==="last")et.reverse();else if(nt==="prev"||nt==="next"){nt==="prev"&&et.reverse();const rt=et.indexOf(it.currentTarget);et=_.loop?wrapArray$1(et,rt+1):et.slice(rt+1)}setTimeout(()=>focusFirst$1(et))}})})})});RovingFocusGroupItem.displayName=ITEM_NAME$2;var MAP_KEY_TO_FOCUS_INTENT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function getDirectionAwareKey(e,i){return i!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function getFocusIntent(e,i,s){const o=getDirectionAwareKey(e.key,s);if(!(i==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(i==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return MAP_KEY_TO_FOCUS_INTENT[o]}function focusFirst$1(e,i=!1){const s=document.activeElement;for(const o of e)if(o===s||(o.focus({preventScroll:i}),document.activeElement!==s))return}function wrapArray$1(e,i){return e.map((s,o)=>e[(i+o)%e.length])}var Root=RovingFocusGroup,Item=RovingFocusGroupItem,SELECTION_KEYS=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS,"ArrowRight"],rtl:[...SELECTION_KEYS,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection,useCollection,createCollectionScope]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope$2(MENU_NAME,[createCollectionScope,createPopperScope,createRovingFocusGroupScope]),usePopperScope=createPopperScope(),useRovingFocusGroupScope=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=e=>{const{__scopeMenu:i,open:s=!1,children:o,dir:a,onOpenChange:c,modal:d=!0}=e,g=usePopperScope(i),[b,_]=reactExports.useState(null),j=reactExports.useRef(!1),_e=useCallbackRef$1(c),$=useDirection(a);return reactExports.useEffect(()=>{const st=()=>{j.current=!0,document.addEventListener("pointerdown",it,{capture:!0,once:!0}),document.addEventListener("pointermove",it,{capture:!0,once:!0})},it=()=>j.current=!1;return document.addEventListener("keydown",st,{capture:!0}),()=>{document.removeEventListener("keydown",st,{capture:!0}),document.removeEventListener("pointerdown",it,{capture:!0}),document.removeEventListener("pointermove",it,{capture:!0})}},[]),jsxRuntimeExports.jsx(Root2$2,{...g,children:jsxRuntimeExports.jsx(MenuProvider,{scope:i,open:s,onOpenChange:_e,content:b,onContentChange:_,children:jsxRuntimeExports.jsx(MenuRootProvider,{scope:i,onClose:reactExports.useCallback(()=>_e(!1),[_e]),isUsingKeyboardRef:j,dir:$,modal:d,children:o})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME="MenuAnchor",MenuAnchor=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,...o}=e,a=usePopperScope(s);return jsxRuntimeExports.jsx(Anchor,{...a,...o,ref:i})});MenuAnchor.displayName=ANCHOR_NAME;var PORTAL_NAME$1="MenuPortal",[PortalProvider,usePortalContext]=createMenuContext(PORTAL_NAME$1,{forceMount:void 0}),MenuPortal=e=>{const{__scopeMenu:i,forceMount:s,children:o,container:a}=e,c=useMenuContext(PORTAL_NAME$1,i);return jsxRuntimeExports.jsx(PortalProvider,{scope:i,forceMount:s,children:jsxRuntimeExports.jsx(Presence,{present:s||c.open,children:jsxRuntimeExports.jsx(Portal$3,{asChild:!0,container:a,children:o})})})};MenuPortal.displayName=PORTAL_NAME$1;var CONTENT_NAME$1="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$1),MenuContent=reactExports.forwardRef((e,i)=>{const s=usePortalContext(CONTENT_NAME$1,e.__scopeMenu),{forceMount:o=s.forceMount,...a}=e,c=useMenuContext(CONTENT_NAME$1,e.__scopeMenu),d=useMenuRootContext(CONTENT_NAME$1,e.__scopeMenu);return jsxRuntimeExports.jsx(Collection.Provider,{scope:e.__scopeMenu,children:jsxRuntimeExports.jsx(Presence,{present:o||c.open,children:jsxRuntimeExports.jsx(Collection.Slot,{scope:e.__scopeMenu,children:d.modal?jsxRuntimeExports.jsx(MenuRootContentModal,{...a,ref:i}):jsxRuntimeExports.jsx(MenuRootContentNonModal,{...a,ref:i})})})})}),MenuRootContentModal=reactExports.forwardRef((e,i)=>{const s=useMenuContext(CONTENT_NAME$1,e.__scopeMenu),o=reactExports.useRef(null),a=useComposedRefs(i,o);return reactExports.useEffect(()=>{const c=o.current;if(c)return hideOthers(c)},[]),jsxRuntimeExports.jsx(MenuContentImpl,{...e,ref:a,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),MenuRootContentNonModal=reactExports.forwardRef((e,i)=>{const s=useMenuContext(CONTENT_NAME$1,e.__scopeMenu);return jsxRuntimeExports.jsx(MenuContentImpl,{...e,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),MenuContentImpl=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,loop:o=!1,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:g,onEntryFocus:b,onEscapeKeyDown:_,onPointerDownOutside:j,onFocusOutside:_e,onInteractOutside:$,onDismiss:st,disableOutsideScroll:it,...nt}=e,at=useMenuContext(CONTENT_NAME$1,s),et=useMenuRootContext(CONTENT_NAME$1,s),rt=usePopperScope(s),tt=useRovingFocusGroupScope(s),ot=useCollection(s),[ct,ft]=reactExports.useState(null),dt=reactExports.useRef(null),ht=useComposedRefs(i,dt,at.onContentChange),yt=reactExports.useRef(0),Et=reactExports.useRef(""),St=reactExports.useRef(0),xt=reactExports.useRef(null),kt=reactExports.useRef("right"),wt=reactExports.useRef(0),bt=it?ReactRemoveScroll:reactExports.Fragment,pt=it?{as:Slot,allowPinchZoom:!0}:void 0,mt=ut=>{var Rt,Nt;const vt=Et.current+ut,gt=ot().filter(Lt=>!Lt.disabled),Ct=document.activeElement,Pt=(Rt=gt.find(Lt=>Lt.ref.current===Ct))==null?void 0:Rt.textValue,At=gt.map(Lt=>Lt.textValue),Mt=getNextMatch(At,vt,Pt),_t=(Nt=gt.find(Lt=>Lt.textValue===Mt))==null?void 0:Nt.ref.current;(function Lt(jt){Et.current=jt,window.clearTimeout(yt.current),jt!==""&&(yt.current=window.setTimeout(()=>Lt(""),1e3))})(vt),_t&&setTimeout(()=>_t.focus())};reactExports.useEffect(()=>()=>window.clearTimeout(yt.current),[]),useFocusGuards();const lt=reactExports.useCallback(ut=>{var gt,Ct;return kt.current===((gt=xt.current)==null?void 0:gt.side)&&isPointerInGraceArea(ut,(Ct=xt.current)==null?void 0:Ct.area)},[]);return jsxRuntimeExports.jsx(MenuContentProvider,{scope:s,searchRef:Et,onItemEnter:reactExports.useCallback(ut=>{lt(ut)&&ut.preventDefault()},[lt]),onItemLeave:reactExports.useCallback(ut=>{var vt;lt(ut)||((vt=dt.current)==null||vt.focus(),ft(null))},[lt]),onTriggerLeave:reactExports.useCallback(ut=>{lt(ut)&&ut.preventDefault()},[lt]),pointerGraceTimerRef:St,onPointerGraceIntentChange:reactExports.useCallback(ut=>{xt.current=ut},[]),children:jsxRuntimeExports.jsx(bt,{...pt,children:jsxRuntimeExports.jsx(FocusScope,{asChild:!0,trapped:a,onMountAutoFocus:composeEventHandlers(c,ut=>{var vt;ut.preventDefault(),(vt=dt.current)==null||vt.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:jsxRuntimeExports.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:_,onPointerDownOutside:j,onFocusOutside:_e,onInteractOutside:$,onDismiss:st,children:jsxRuntimeExports.jsx(Root,{asChild:!0,...tt,dir:et.dir,orientation:"vertical",loop:o,currentTabStopId:ct,onCurrentTabStopIdChange:ft,onEntryFocus:composeEventHandlers(b,ut=>{et.isUsingKeyboardRef.current||ut.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntimeExports.jsx(Content$1,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(at.open),"data-radix-menu-content":"",dir:et.dir,...rt,...nt,ref:ht,style:{outline:"none",...nt.style},onKeyDown:composeEventHandlers(nt.onKeyDown,ut=>{const gt=ut.target.closest("[data-radix-menu-content]")===ut.currentTarget,Ct=ut.ctrlKey||ut.altKey||ut.metaKey,Pt=ut.key.length===1;gt&&(ut.key==="Tab"&&ut.preventDefault(),!Ct&&Pt&&mt(ut.key));const At=dt.current;if(ut.target!==At||!FIRST_LAST_KEYS.includes(ut.key))return;ut.preventDefault();const _t=ot().filter(Rt=>!Rt.disabled).map(Rt=>Rt.ref.current);LAST_KEYS.includes(ut.key)&&_t.reverse(),focusFirst(_t)}),onBlur:composeEventHandlers(e.onBlur,ut=>{ut.currentTarget.contains(ut.target)||(window.clearTimeout(yt.current),Et.current="")}),onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(ut=>{const vt=ut.target,gt=wt.current!==ut.clientX;if(ut.currentTarget.contains(vt)&>){const Ct=ut.clientX>wt.current?"right":"left";kt.current=Ct,wt.current=ut.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$1;var GROUP_NAME$1="MenuGroup",MenuGroup=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,...o}=e;return jsxRuntimeExports.jsx(Primitive.div,{role:"group",...o,ref:i})});MenuGroup.displayName=GROUP_NAME$1;var LABEL_NAME$1="MenuLabel",MenuLabel=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,...o}=e;return jsxRuntimeExports.jsx(Primitive.div,{...o,ref:i})});MenuLabel.displayName=LABEL_NAME$1;var ITEM_NAME$1="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=reactExports.forwardRef((e,i)=>{const{disabled:s=!1,onSelect:o,...a}=e,c=reactExports.useRef(null),d=useMenuRootContext(ITEM_NAME$1,e.__scopeMenu),g=useMenuContentContext(ITEM_NAME$1,e.__scopeMenu),b=useComposedRefs(i,c),_=reactExports.useRef(!1),j=()=>{const _e=c.current;if(!s&&_e){const $=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});_e.addEventListener(ITEM_SELECT,st=>o==null?void 0:o(st),{once:!0}),dispatchDiscreteCustomEvent(_e,$),$.defaultPrevented?_.current=!1:d.onClose()}};return jsxRuntimeExports.jsx(MenuItemImpl,{...a,ref:b,disabled:s,onClick:composeEventHandlers(e.onClick,j),onPointerDown:_e=>{var $;($=e.onPointerDown)==null||$.call(e,_e),_.current=!0},onPointerUp:composeEventHandlers(e.onPointerUp,_e=>{var $;_.current||($=_e.currentTarget)==null||$.click()}),onKeyDown:composeEventHandlers(e.onKeyDown,_e=>{const $=g.searchRef.current!=="";s||$&&_e.key===" "||SELECTION_KEYS.includes(_e.key)&&(_e.currentTarget.click(),_e.preventDefault())})})});MenuItem.displayName=ITEM_NAME$1;var MenuItemImpl=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,disabled:o=!1,textValue:a,...c}=e,d=useMenuContentContext(ITEM_NAME$1,s),g=useRovingFocusGroupScope(s),b=reactExports.useRef(null),_=useComposedRefs(i,b),[j,_e]=reactExports.useState(!1),[$,st]=reactExports.useState("");return reactExports.useEffect(()=>{const it=b.current;it&&st((it.textContent??"").trim())},[c.children]),jsxRuntimeExports.jsx(Collection.ItemSlot,{scope:s,disabled:o,textValue:a??$,children:jsxRuntimeExports.jsx(Item,{asChild:!0,...g,focusable:!o,children:jsxRuntimeExports.jsx(Primitive.div,{role:"menuitem","data-highlighted":j?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:_,onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(it=>{o?d.onItemLeave(it):(d.onItemEnter(it),it.defaultPrevented||it.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(it=>d.onItemLeave(it))),onFocus:composeEventHandlers(e.onFocus,()=>_e(!0)),onBlur:composeEventHandlers(e.onBlur,()=>_e(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=reactExports.forwardRef((e,i)=>{const{checked:s=!1,onCheckedChange:o,...a}=e;return jsxRuntimeExports.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:s,children:jsxRuntimeExports.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate(s)?"mixed":s,...a,ref:i,"data-state":getCheckedState(s),onSelect:composeEventHandlers(a.onSelect,()=>o==null?void 0:o(isIndeterminate(s)?!0:!s),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=reactExports.forwardRef((e,i)=>{const{value:s,onValueChange:o,...a}=e,c=useCallbackRef$1(o);return jsxRuntimeExports.jsx(RadioGroupProvider,{scope:e.__scopeMenu,value:s,onValueChange:c,children:jsxRuntimeExports.jsx(MenuGroup,{...a,ref:i})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=reactExports.forwardRef((e,i)=>{const{value:s,...o}=e,a=useRadioGroupContext(RADIO_ITEM_NAME$1,e.__scopeMenu),c=s===a.value;return jsxRuntimeExports.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:c,children:jsxRuntimeExports.jsx(MenuItem,{role:"menuitemradio","aria-checked":c,...o,ref:i,"data-state":getCheckedState(c),onSelect:composeEventHandlers(o.onSelect,()=>{var d;return(d=a.onValueChange)==null?void 0:d.call(a,s)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME,{checked:!1}),MenuItemIndicator=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,forceMount:o,...a}=e,c=useItemIndicatorContext(ITEM_INDICATOR_NAME,s);return jsxRuntimeExports.jsx(Presence,{present:o||isIndeterminate(c.checked)||c.checked===!0,children:jsxRuntimeExports.jsx(Primitive.span,{...a,ref:i,"data-state":getCheckedState(c.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME;var SEPARATOR_NAME$1="MenuSeparator",MenuSeparator=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,...o}=e;return jsxRuntimeExports.jsx(Primitive.div,{role:"separator","aria-orientation":"horizontal",...o,ref:i})});MenuSeparator.displayName=SEPARATOR_NAME$1;var ARROW_NAME$1="MenuArrow",MenuArrow=reactExports.forwardRef((e,i)=>{const{__scopeMenu:s,...o}=e,a=usePopperScope(s);return jsxRuntimeExports.jsx(Arrow,{...a,...o,ref:i})});MenuArrow.displayName=ARROW_NAME$1;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=reactExports.forwardRef((e,i)=>{const s=useMenuContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),o=useMenuRootContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),a=useMenuSubContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),c=useMenuContentContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),d=reactExports.useRef(null),{pointerGraceTimerRef:g,onPointerGraceIntentChange:b}=c,_={__scopeMenu:e.__scopeMenu},j=reactExports.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return reactExports.useEffect(()=>j,[j]),reactExports.useEffect(()=>{const _e=g.current;return()=>{window.clearTimeout(_e),b(null)}},[g,b]),jsxRuntimeExports.jsx(MenuAnchor,{asChild:!0,..._,children:jsxRuntimeExports.jsx(MenuItemImpl,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":a.contentId,"data-state":getOpenState(s.open),...e,ref:composeRefs(i,a.onTriggerChange),onClick:_e=>{var $;($=e.onClick)==null||$.call(e,_e),!(e.disabled||_e.defaultPrevented)&&(_e.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(_e=>{c.onItemEnter(_e),!_e.defaultPrevented&&!e.disabled&&!s.open&&!d.current&&(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{s.onOpenChange(!0),j()},100))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(_e=>{var st,it;j();const $=(st=s.content)==null?void 0:st.getBoundingClientRect();if($){const nt=(it=s.content)==null?void 0:it.dataset.side,at=nt==="right",et=at?-5:5,rt=$[at?"left":"right"],tt=$[at?"right":"left"];c.onPointerGraceIntentChange({area:[{x:_e.clientX+et,y:_e.clientY},{x:rt,y:$.top},{x:tt,y:$.top},{x:tt,y:$.bottom},{x:rt,y:$.bottom}],side:nt}),window.clearTimeout(g.current),g.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(_e),_e.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(e.onKeyDown,_e=>{var st;const $=c.searchRef.current!=="";e.disabled||$&&_e.key===" "||SUB_OPEN_KEYS[o.dir].includes(_e.key)&&(s.onOpenChange(!0),(st=s.content)==null||st.focus(),_e.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=reactExports.forwardRef((e,i)=>{const s=usePortalContext(CONTENT_NAME$1,e.__scopeMenu),{forceMount:o=s.forceMount,...a}=e,c=useMenuContext(CONTENT_NAME$1,e.__scopeMenu),d=useMenuRootContext(CONTENT_NAME$1,e.__scopeMenu),g=useMenuSubContext(SUB_CONTENT_NAME$1,e.__scopeMenu),b=reactExports.useRef(null),_=useComposedRefs(i,b);return jsxRuntimeExports.jsx(Collection.Provider,{scope:e.__scopeMenu,children:jsxRuntimeExports.jsx(Presence,{present:o||c.open,children:jsxRuntimeExports.jsx(Collection.Slot,{scope:e.__scopeMenu,children:jsxRuntimeExports.jsx(MenuContentImpl,{id:g.contentId,"aria-labelledby":g.triggerId,...a,ref:_,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:j=>{var _e;d.isUsingKeyboardRef.current&&((_e=b.current)==null||_e.focus()),j.preventDefault()},onCloseAutoFocus:j=>j.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,j=>{j.target!==g.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,j=>{d.onClose(),j.preventDefault()}),onKeyDown:composeEventHandlers(e.onKeyDown,j=>{var st;const _e=j.currentTarget.contains(j.target),$=SUB_CLOSE_KEYS[d.dir].includes(j.key);_e&&$&&(c.onOpenChange(!1),(st=g.trigger)==null||st.focus(),j.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(e){return e?"open":"closed"}function isIndeterminate(e){return e==="indeterminate"}function getCheckedState(e){return isIndeterminate(e)?"indeterminate":e?"checked":"unchecked"}function focusFirst(e){const i=document.activeElement;for(const s of e)if(s===i||(s.focus(),document.activeElement!==i))return}function wrapArray(e,i){return e.map((s,o)=>e[(i+o)%e.length])}function getNextMatch(e,i,s){const a=i.length>1&&Array.from(i).every(_=>_===i[0])?i[0]:i,c=s?e.indexOf(s):-1;let d=wrapArray(e,Math.max(c,0));a.length===1&&(d=d.filter(_=>_!==s));const b=d.find(_=>_.toLowerCase().startsWith(a.toLowerCase()));return b!==s?b:void 0}function isPointInPolygon(e,i){const{x:s,y:o}=e;let a=!1;for(let c=0,d=i.length-1;co!=j>o&&s<(_-g)*(o-b)/(j-b)+g&&(a=!a)}return a}function isPointerInGraceArea(e,i){if(!i)return!1;const s={x:e.clientX,y:e.clientY};return isPointInPolygon(s,i)}function whenMouse(e){return i=>i.pointerType==="mouse"?e(i):void 0}var Root3=Menu,Anchor2=MenuAnchor,Portal=MenuPortal,Content2$1=MenuContent,Group=MenuGroup,Label=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator=MenuItemIndicator,Separator=MenuSeparator,Arrow2=MenuArrow,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext,createDropdownMenuScope]=createContextScope$2(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=e=>{const{__scopeDropdownMenu:i,children:s,dir:o,open:a,defaultOpen:c,onOpenChange:d,modal:g=!0}=e,b=useMenuScope(i),_=reactExports.useRef(null),[j=!1,_e]=useControllableState({prop:a,defaultProp:c,onChange:d});return jsxRuntimeExports.jsx(DropdownMenuProvider,{scope:i,triggerId:useId(),triggerRef:_,contentId:useId(),open:j,onOpenChange:_e,onOpenToggle:reactExports.useCallback(()=>_e($=>!$),[_e]),modal:g,children:jsxRuntimeExports.jsx(Root3,{...b,open:j,onOpenChange:_e,dir:o,modal:g,children:s})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME="DropdownMenuTrigger",DropdownMenuTrigger$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,disabled:o=!1,...a}=e,c=useDropdownMenuContext(TRIGGER_NAME,s),d=useMenuScope(s);return jsxRuntimeExports.jsx(Anchor2,{asChild:!0,...d,children:jsxRuntimeExports.jsx(Primitive.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...a,ref:composeRefs(i,c.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(c.onOpenToggle(),c.open||g.preventDefault())}),onKeyDown:composeEventHandlers(e.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&c.onOpenToggle(),g.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(g.key)&&g.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME;var PORTAL_NAME="DropdownMenuPortal",DropdownMenuPortal=e=>{const{__scopeDropdownMenu:i,...s}=e,o=useMenuScope(i);return jsxRuntimeExports.jsx(Portal,{...o,...s})};DropdownMenuPortal.displayName=PORTAL_NAME;var CONTENT_NAME="DropdownMenuContent",DropdownMenuContent$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useDropdownMenuContext(CONTENT_NAME,s),c=useMenuScope(s),d=reactExports.useRef(!1);return jsxRuntimeExports.jsx(Content2$1,{id:a.contentId,"aria-labelledby":a.triggerId,...c,...o,ref:i,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,g=>{var b;d.current||(b=a.triggerRef.current)==null||b.focus(),d.current=!1,g.preventDefault()}),onInteractOutside:composeEventHandlers(e.onInteractOutside,g=>{const b=g.detail.originalEvent,_=b.button===0&&b.ctrlKey===!0,j=b.button===2||_;(!a.modal||j)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME;var GROUP_NAME="DropdownMenuGroup",DropdownMenuGroup=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(Group,{...a,...o,ref:i})});DropdownMenuGroup.displayName=GROUP_NAME;var LABEL_NAME="DropdownMenuLabel",DropdownMenuLabel$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(Label,{...a,...o,ref:i})});DropdownMenuLabel$1.displayName=LABEL_NAME;var ITEM_NAME="DropdownMenuItem",DropdownMenuItem$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(Item2$1,{...a,...o,ref:i})});DropdownMenuItem$1.displayName=ITEM_NAME;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(CheckboxItem,{...a,...o,ref:i})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(RadioGroup,{...a,...o,ref:i})});DropdownMenuRadioGroup.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(RadioItem,{...a,...o,ref:i})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME="DropdownMenuItemIndicator",DropdownMenuItemIndicator=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(ItemIndicator,{...a,...o,ref:i})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME;var SEPARATOR_NAME="DropdownMenuSeparator",DropdownMenuSeparator$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(Separator,{...a,...o,ref:i})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME;var ARROW_NAME="DropdownMenuArrow",DropdownMenuArrow=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(Arrow2,{...a,...o,ref:i})});DropdownMenuArrow.displayName=ARROW_NAME;var SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(SubTrigger,{...a,...o,ref:i})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=reactExports.forwardRef((e,i)=>{const{__scopeDropdownMenu:s,...o}=e,a=useMenuScope(s);return jsxRuntimeExports.jsx(SubContent,{...a,...o,ref:i,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2=DropdownMenu$1,Trigger=DropdownMenuTrigger$1,Portal2=DropdownMenuPortal,Content2=DropdownMenuContent$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2,DropdownMenuTrigger=Trigger,DropdownMenuSubTrigger=reactExports.forwardRef(({className:e,inset:i,children:s,...o},a)=>jsxRuntimeExports.jsxs(SubTrigger2,{ref:a,className:cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",i&&"pl-8",e),...o,children:[s,jsxRuntimeExports.jsx(ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(SubContent2,{ref:s,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",e),...i}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=reactExports.forwardRef(({className:e,sideOffset:i=4,...s},o)=>jsxRuntimeExports.jsx(Portal2,{children:jsxRuntimeExports.jsx(Content2,{ref:o,sideOffset:i,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",e),...s})}));DropdownMenuContent.displayName=Content2.displayName;const DropdownMenuItem=reactExports.forwardRef(({className:e,inset:i,...s},o)=>jsxRuntimeExports.jsx(Item2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i&&"pl-8",e),...s}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=reactExports.forwardRef(({className:e,children:i,checked:s,...o},a)=>jsxRuntimeExports.jsxs(CheckboxItem2,{ref:a,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntimeExports.jsx(ItemIndicator2,{children:jsxRuntimeExports.jsx(CheckIcon,{className:"h-4 w-4"})})}),i]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=reactExports.forwardRef(({className:e,children:i,...s},o)=>jsxRuntimeExports.jsxs(RadioItem2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntimeExports.jsx(ItemIndicator2,{children:jsxRuntimeExports.jsx(DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),i]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=reactExports.forwardRef(({className:e,inset:i,...s},o)=>jsxRuntimeExports.jsx(Label2,{ref:o,className:cn("px-2 py-1.5 text-sm font-semibold",i&&"pl-8",e),...s}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=reactExports.forwardRef(({className:e,...i},s)=>jsxRuntimeExports.jsx(Separator2,{ref:s,className:cn("-mx-1 my-1 h-px bg-muted",e),...i}));DropdownMenuSeparator.displayName=Separator2.displayName;function RiMenu3Fill(e){return GenIcon({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM9 11H21V13H9V11ZM3 18H21V20H3V18Z"},child:[]}]})(e)}function IoMdClose(e){return GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"},child:[]}]})(e)}const Navbar=({onContactClick:e,onQandAClick:i,onStatusClick:s,onProjectsClick:o,onLeaderboardClick:a})=>{const[c,d]=reactExports.useState(!1),g=()=>{window.location.href="undefined/api/auth/github"},b=async()=>{try{await Global.httpPost("/auth/logout"),Global.user=null,window.location.reload()}catch(j){console.error(j)}},_=()=>{d(!c)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("nav",{className:"bg-[rgba(30,30,30,0.8)] backdrop-blur-lg p-4 fixed top-0 left-0 right-0 z-50 flex justify-between items-center shadow-lg",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[jsxRuntimeExports.jsx("img",{className:"w-10 h-10 rounded-full mr-4 transition-transform duration-300 ease-in-out hover:scale-110",src:logo,alt:"Logo"}),jsxRuntimeExports.jsx("a",{href:"/",className:"text-red-500 font-dm-sans text-2xl font-bold tracking-wide",children:"Club Gamma"})]}),jsxRuntimeExports.jsxs("div",{className:"hidden lg:flex gap-12 font-montserrat text-lg",children:[jsxRuntimeExports.jsx("a",{href:"/",className:"text-white hover:text-red-500 transition-all duration-300",children:"Home"}),jsxRuntimeExports.jsx("button",{onClick:i,className:"text-white hover:text-red-500 transition-all duration-300",children:"Q&A"}),jsxRuntimeExports.jsx("button",{onClick:s,className:"text-white hover:text-red-500 transition-all duration-300",children:"Stats"}),jsxRuntimeExports.jsx("button",{onClick:o,className:"text-white hover:text-red-500 transition-all duration-300",children:"Projects"}),jsxRuntimeExports.jsx("button",{onClick:e,className:"text-white hover:text-red-500 transition-all duration-300",children:"Contact"}),jsxRuntimeExports.jsx(Link,{to:"/leaderboard",className:"text-white hover:text-red-500 transition-all duration-300",children:"Leaderboard"})," "]}),jsxRuntimeExports.jsx("div",{className:"hidden lg:flex",children:Global.user?jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs(Button,{variant:"outline",className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(User,{className:"h-4 w-4"}),Global.user.name.split(" ")[0]]})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{align:"end",children:[jsxRuntimeExports.jsx(Link,{to:`/profile/${Global.user.githubId}`,children:jsxRuntimeExports.jsx(DropdownMenuItem,{children:"Profile"})}),jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:b,children:"Logout"})]})]}):jsxRuntimeExports.jsxs("button",{onClick:g,className:"flex font-dm-sans items-center bg-[#181717] text-white py-2 px-5 rounded-md font-bold shadow-lg hover:shadow-none transition-all duration-500",children:[jsxRuntimeExports.jsx("svg",{className:"w-6 h-6 mr-2",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M12,2A10,10,0,0,0,8.84,21.5c.5.08.66-.23.66-.5V19.31C6.73,19.91,6.14,18,6.14,18A2.69,2.69,0,0,0,5,16.5c-.91-.62.07-.6.07-.6a2.1,2.1,0,0,1,1.53,1,2.15,2.15,0,0,0,2.91.83,2.16,2.16,0,0,1,.63-1.34C8,16.17,5.62,15.31,5.62,11.5a3.87,3.87,0,0,1,1-2.71,3.58,3.58,0,0,1,.1-2.64s.84-.27,2.75,1a9.63,9.63,0,0,1,5,0c1.91-1.29,2.75-1,2.75-1a3.58,3.58,0,0,1,.1,2.64,3.87,3.87,0,0,1,1,2.71c0,3.82-2.34,4.66-4.57,4.91a2.39,2.39,0,0,1,.69,1.85V21c0,.27.16.59.67.5A10,10,0,0,0,12,2Z"})}),"Continue with GitHub"]})}),jsxRuntimeExports.jsx("div",{className:"lg:hidden",children:jsxRuntimeExports.jsx("button",{className:"text-white bg-transparent border-none",onClick:_,children:c?jsxRuntimeExports.jsx(IoMdClose,{size:24}):jsxRuntimeExports.jsx(RiMenu3Fill,{size:24})})})]}),jsxRuntimeExports.jsx("div",{className:`fixed inset-y-0 left-0 font-dm-sans w-64 bg-gray-900 transform ${c?"translate-x-0":"-translate-x-full"} transition-transform duration-300 ease-in-out z-50 lg:hidden`,children:jsxRuntimeExports.jsxs("div",{className:"p-4",children:[jsxRuntimeExports.jsx("img",{className:"w-10 h-10 rounded-full mb-4",src:logo,alt:"Logo"}),jsxRuntimeExports.jsxs("nav",{className:"space-y-6",children:[jsxRuntimeExports.jsx("a",{href:"/",className:"text-white block",children:"Home"}),jsxRuntimeExports.jsx("button",{onClick:i,className:"text-white block",children:"Q&A"}),jsxRuntimeExports.jsx("button",{onClick:s,className:"text-white block",children:"Stats"}),jsxRuntimeExports.jsx("button",{onClick:o,className:"text-white block",children:"Projects"}),jsxRuntimeExports.jsx("button",{onClick:e,className:"text-white block",children:"Contact"}),jsxRuntimeExports.jsx(Link,{to:"/leaderboard",className:"text-white block",children:"Leaderboard"})," ",jsxRuntimeExports.jsx("hr",{className:"border-gray-700"}),Global.user?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Link,{to:`/profile/${Global.user.githubId}`,className:"text-white block",children:"Profile"}),jsxRuntimeExports.jsx("button",{onClick:b,className:"text-white block",children:"Logout"})]}):jsxRuntimeExports.jsx(Button,{onClick:g,className:"text-white bg-red-500 block",children:"Continue with GitHub"})]})]})}),jsxRuntimeExports.jsx(Outlet,{})]})},RedirectPage=()=>{const e=useNavigate();return reactExports.useEffect(()=>{const s=new URLSearchParams(window.location.search).get("token");console.log(s),s?(localStorage.setItem("token",s),e("/")):(console.error("Token not found!"),e("/"))},[e]),jsxRuntimeExports.jsx("div",{children:"Redirecting..."})};function App(){const[e,i]=reactExports.useState(!1),s=useNavigate(),o=useLocation(),a=c=>{if(o.pathname!=="/")s("/",{state:{scrollTo:c}});else{const d=document.getElementById(c);d==null||d.scrollIntoView({behavior:"smooth"})}};return reactExports.useEffect(()=>{(async()=>{try{Global.user=await Global.getUser(),i(!0)}catch(c){console.error(c),i(!0)}})()},[]),e?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Routes,{children:jsxRuntimeExports.jsxs(Route,{path:"/",element:jsxRuntimeExports.jsx(Navbar,{onContactClick:()=>a("contact"),onQandAClick:()=>a("q&a"),onStatusClick:()=>a("stat"),onProjectsClick:()=>a("project")}),children:[jsxRuntimeExports.jsx(Route,{path:"",element:jsxRuntimeExports.jsx(Home,{})}),jsxRuntimeExports.jsx(Route,{path:"/leaderboard",element:jsxRuntimeExports.jsx(LeaderBoard,{})}),jsxRuntimeExports.jsx(Route,{path:"/profile/:username",element:jsxRuntimeExports.jsx(GitHubProfile,{})}),jsxRuntimeExports.jsx(Route,{path:"/redirect",element:jsxRuntimeExports.jsx(RedirectPage,{})})," "]})})}):jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center h-screen bg-gradient-to-br from-[#1e1e1e] to-[#4e3535]",children:jsxRuntimeExports.jsx("l-infinity",{size:"80",stroke:"4","stroke-length":"0.15","bg-opacity":"0.1",speed:"1.3",color:"white"})})}createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(reactExports.StrictMode,{children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(App,{})})})); diff --git a/index.html b/index.html index e21b355..eb9540f 100644 --- a/index.html +++ b/index.html @@ -1,14 +1,14 @@ - - - - - - - Club Gamma - - - - -
- - + + + + + + + Club Gamma + + + + +
+ +