(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{12964:function(e,t,n){Promise.resolve().then(n.bind(n,85147)),Promise.resolve().then(n.t.bind(n,4565,23)),Promise.resolve().then(n.t.bind(n,69370,23)),Promise.resolve().then(n.t.bind(n,47960,23)),Promise.resolve().then(n.t.bind(n,62495,23))},7436:function(e,t,n){"use strict";n.d(t,{EK:function(){return c},Gv:function(){return s},IC:function(){return i},Iy:function(){return u},Nr:function(){return m},k6:function(){return _},o0:function(){return f},xq:function(){return l}});var o=n(2265),r=n(17200);let a=()=>window.fetch("https://ipapi.co/json").then(e=>e.json()).catch(e=>console.log(e));function c(){console.log("%c %s","font-family:monospace",'\n __  __     __  __     ______       __        _____      __\n/\\ \\/ /    /\\ \\_\\ \\   /\\  __ \\     /\\ \\      /\\  __ \\   /\\ \\\n\\ \\  _"-.  \\ \\  __ \\  \\ \\ \\/\\ \\   _\\_\\ \\     \\ \\  __ \\  \\ \\ \\\n \\ \\_\\ \\_\\  \\ \\_\\ \\_\\  \\ \\_____\\ /\\_____\\     \\ \\_\\ \\_\\  \\ \\_\\\n  \\/_/\\/_/   \\/_/\\/_/   \\/_____/ \\/_____/      \\/_/\\/_/   \\/_/\n\n\nGreetings traveller,\n\nI am ✨Khoj✨, your open-source, personal AI copilot.\n\nSee my source code at https://github.com/khoj-ai/khoj\nRead my operating manual at https://docs.khoj.dev\n')}function _(){let{data:e,error:t,isLoading:n}=(0,r.ZP)("/api/ip",a,{revalidateOnFocus:!1});return{locationData:e,locationDataError:t,locationDataLoading:n}}function i(){let[e,t]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=()=>{window.innerWidth<=768?t(!0):t(!1)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{attributes:!0,characterData:!0,childList:!0,subtree:!0};o.useEffect(()=>{if(e.current){let o=new MutationObserver(t);return o.observe(e.current,n),()=>o.disconnect()}},[e,t,n])};function s(){let[e,t]=(0,o.useState)(!1),[n,r]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{"dark"===localStorage.getItem("theme")?(document.documentElement.classList.add("dark"),t(!0)):"light"===localStorage.getItem("theme")?(document.documentElement.classList.remove("dark"),t(!1)):window.matchMedia("(prefers-color-scheme: dark)").matches&&(document.documentElement.classList.add("dark"),t(!0)),r(!0)},[]),(0,o.useEffect)(()=>{n&&(e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("theme",e?"dark":"light"))},[e,n]),[e,t]}let l=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(2)," KB"):"".concat((e/1048576).toFixed(2)," MB");function m(e,t){let[n,r]=(0,o.useState)(e);return(0,o.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}let f=e=>{try{let t=new Date(e),n=new Date,o=Math.floor((n.getTime()-t.getTime())/6e4);if(o<1)return"just now";if(o<60)return"".concat(o," minutes ago");if(o<120)return"1 hour ago";if(o<1440)return"".concat(Math.floor(o/60)," hours ago");return new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0,timeZoneName:"short"}).format(t)}catch(t){return console.error("Error formatting date:",t),e}}},85147:function(e,t,n){"use strict";n.d(t,{ThemeProvider:function(){return a}});var o=n(57437),r=n(7436);function a(e){let{children:t}=e,[n,a]=(0,r.Gv)();return(0,o.jsx)(o.Fragment,{children:t})}},62495:function(){},47960:function(){},4565:function(e){e.exports={style:{fontFamily:"'__Noto_Sans_f36179', '__Noto_Sans_Fallback_f36179'",fontStyle:"normal"},className:"__className_f36179",variable:"__variable_f36179"}},69370:function(e){e.exports={style:{fontFamily:"'__Noto_Sans_Arabic_386ca1', '__Noto_Sans_Arabic_Fallback_386ca1'",fontStyle:"normal"},className:"__className_386ca1",variable:"__variable_386ca1"}}},function(e){e.O(0,[3254,3587,7400,7200,2971,2117,1744],function(){return e(e.s=12964)}),_N_E=e.O()}]);