import{s as ge,f as w,l as he,g as $,h as I,m as me,d as _,j as u,i as B,r as d,n as je,u as $e,v as nt,w as Ee,x as wt,y as jt,z as F,o as Me,t as $t,p as qe,a as L,c as j,A as re,e as ze,B as Mt,C as Oe,D as Z,E as st,F as at,G as ot,H as St,I as Tt,J as Dt,K as At,L as Vt,k as Ce}from"../chunks/scheduler.2f9f1739.js";import{S as pe,i as _e,g as Ve,c as Pe,a as M,t as T,b as N,d as q,m as O,e as K,f as yt,h as Be}from"../chunks/index.f9f1dac6.js";import{F as we}from"../chunks/fa.139e50c6.js";import{s as Et,a as We,f as it}from"../chunks/index.63ca82d4.js";import{f as Pt,a as Bt,b as Ht,c as Nt,d as qt}from"../chunks/index.b11ac8a0.js";import{g as Ye,a as Fe,b as Ge,c as Qe,s as Ot,d as Kt,e as Ut,f as zt}from"../chunks/KDialog.svelte_svelte_type_style_lang.4fb3d663.js";import{w as Wt}from"../chunks/index.4c158df6.js";import{f as xt,a as Gt,b as Rt,c as Yt}from"../chunks/index.e4323a1b.js";import{m as Ft}from"../chunks/randomstore.850cca5c.js";import{p as Qt}from"../chunks/stores.c8a8c810.js";import{e as De,u as Xt,o as Zt}from"../chunks/each.7a84d497.js";import{j as Jt}from"../chunks/singletons.681f9cfa.js";import{g as er,a as tr,s as rr,b as lr}from"../chunks/projectStore.d940159c.js";var nr="@vercel/analytics",sr="1.1.2",ar=()=>{window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)})};function It(){return typeof window<"u"}function Ct(){try{const n="production"}catch{}return"production"}function or(n="auto"){if(n==="auto"){window.vam=Ct();return}window.vam=n}function ir(){return(It()?window.vam:Ct())||"production"}function Re(){return ir()==="development"}function cr(n={debug:!0}){var e;if(!It())return;or(n.mode),ar(),n.beforeSend&&((e=window.va)==null||e.call(window,"beforeSend",n.beforeSend));const t=Re()?"https://va.vercel-scripts.com/v1/script.debug.js":"/_vercel/insights/script.js";if(document.head.querySelector(`script[src*="${t}"]`))return;const r=document.createElement("script");r.src=t,r.defer=!0,r.setAttribute("data-sdkn",nr),r.setAttribute("data-sdkv",sr),r.onerror=()=>{const o=Re()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${t}. ${o}`)},Re()&&n.debug===!1&&r.setAttribute("data-debug","false"),document.head.appendChild(r)}const fr="auto";cr({mode:"production"});const cl=Object.freeze(Object.defineProperty({__proto__:null,prerender:fr},Symbol.toStringTag,{value:"Module"}));function ur(n){let e,t,r=n[0].name+"",o,s;return{c(){e=w("li"),t=w("a"),o=he(r),this.h()},l(i){e=$(i,"LI",{class:!0});var l=I(e);t=$(l,"A",{href:!0,class:!0});var a=I(t);o=me(a,r),a.forEach(_),l.forEach(_),this.h()},h(){u(t,"href",s=n[0].href),u(t,"class","font-visby_mid hover-animate md:hover:text-2xl svelte-1gk04p6"),u(e,"class","cursor-pointer p-1 dark:border-dark rounded")},m(i,l){B(i,e,l),d(e,t),d(t,o)},p(i,[l]){l&1&&r!==(r=i[0].name+"")&&je(o,r),l&1&&s!==(s=i[0].href)&&u(t,"href",s)},i:$e,o:$e,d(i){i&&_(e)}}}function dr(n,e,t){let{data:r}=e;return n.$$set=o=>{"data"in o&&t(0,r=o.data)},[r]}class Ke extends pe{constructor(e){super(),_e(this,e,dr,ur,ge,{data:0})}}class hr{constructor(){this.model=[]}register(e){this.model=e}getModel(){return this.model}searchName(e,t=this.model){function r(o,s,i=null){let l=[];for(let a of s){const c={...a,parentTitle:i};if(a.title&&a.title.toLowerCase().includes(o.toLowerCase())&&l.push(c),a.nested&&a.nested.length>0){const p=r(o,a.nested,a.title);l=l.concat(p)}}return l}return r(e,t)}}let Te=new hr;function Ae(n,e){for(let t=0;t<e.length;t++){let r=e[t];r.setAttribute("aria-selected","false"),r.classList.remove("active")}e.length>0&&(e[n].setAttribute("aria-selected","true"),e[n].classList.add("active"))}function mr(n){const e=t=>{n&&!n.contains(t.target)&&!t.defaultPrevented&&n.dispatchEvent(new CustomEvent("click_outside",n))};return document.addEventListener("click",e,!0),{destroy(){document.removeEventListener("click",e,!0)}}}function gr(n){let e,t,r,o;return{c(){e=w("div"),t=w("input"),this.h()},l(s){e=$(s,"DIV",{class:!0});var i=I(e);t=$(i,"INPUT",{autocomplete:!0,role:!0,spellcheck:!0,"aria-controls":!0,"aria-expanded":!0,type:!0,"aria-activedescendant":!0,name:!0,id:!0,class:!0,placeholder:!0}),i.forEach(_),this.h()},h(){t.autofocus=!0,u(t,"autocomplete","off"),u(t,"role","combobox"),u(t,"spellcheck","false"),u(t,"aria-controls","k-listbox"),u(t,"aria-expanded",n[0]),u(t,"type","text"),u(t,"aria-activedescendant",pr),u(t,"name",""),u(t,"id",""),u(t,"class","search svelte-o1kvhy"),u(t,"placeholder",n[2]),u(e,"class","search-container svelte-o1kvhy")},m(s,i){B(s,e,i),d(e,t),nt(t,n[3]),n[11](t),t.focus(),r||(o=[Ee(t,"input",n[10]),Ee(t,"input",n[7])],r=!0)},p(s,[i]){i&1&&u(t,"aria-expanded",s[0]),i&4&&u(t,"placeholder",s[2]),i&8&&t.value!==s[3]&&nt(t,s[3])},i:$e,o:$e,d(s){s&&_(e),n[11](null),r=!1,wt(o)}}}let pr=null;function _r(n,e,t){let r,o,s;const i=jt();let l=Ye();F(n,l,f=>t(2,o=f));let a=Fe();F(n,a,f=>t(3,s=f));let c,p=Ge();F(n,p,f=>t(9,r=f));let g=null,{showing:b}=e;function E(){i("search",s)}Me(()=>{window&&t(8,g=!0),c.addEventListener("keydown",f=>{const v=document.getElementById("k-listbox"),h=v.querySelectorAll('button[role="option"]'),x=v.querySelector('[aria-selected="true"]'),C=Array.from(h).indexOf(x);let A;switch(f.key){case"ArrowDown":f.preventDefault(),A=C+1,A<h.length||(A=0),Ae(A,h),h[A].scrollIntoView();break;case"ArrowUp":f.preventDefault(),A=C-1,h.length>A&&A>-1?(console.log(h.length,A),h[A].scrollIntoView(),Ae(A,h)):(A=h.length-1,Ae(A,h)),h[A].scrollIntoView();break;case"Enter":f.preventDefault(),x&&x.click()}})});function m(){s=this.value,a.set(s)}function k(f){qe[f?"unshift":"push"](()=>{c=f,t(1,c)})}return n.$$set=f=>{"showing"in f&&t(0,b=f.showing)},n.$$.update=()=>{n.$$.dirty&262&&o&&g&&c&&c.focus(),n.$$.dirty&770&&r&&g&&c&&$t().then(()=>{c.focus(),setTimeout(()=>{c.select()},200)})},[b,c,o,s,l,a,p,E,g,r,m,k]}class br extends pe{constructor(e){super(),_e(this,e,_r,gr,ge,{showing:0})}}function ct(n){var s;let e,t=((s=n[0])==null?void 0:s.parentTitle)+"",r,o;return{c(){e=w("div"),r=he(t),o=he("..⟩  "),this.h()},l(i){e=$(i,"DIV",{class:!0});var l=I(e);r=me(l,t),o=me(l,"..⟩  "),l.forEach(_),this.h()},h(){u(e,"class","parent-title svelte-1wz0qzr")},m(i,l){B(i,e,l),d(e,r),d(e,o)},p(i,l){var a;l&1&&t!==(t=((a=i[0])==null?void 0:a.parentTitle)+"")&&je(r,t)},d(i){i&&_(e)}}}function ft(n){var o;let e,t=((o=n[0])==null?void 0:o.subtitle)+"",r;return{c(){e=w("div"),r=he(t),this.h()},l(s){e=$(s,"DIV",{class:!0});var i=I(e);r=me(i,t),i.forEach(_),this.h()},h(){u(e,"class","subtitle svelte-1wz0qzr")},m(s,i){B(s,e,i),d(e,r)},p(s,i){var l;i&1&&t!==(t=((l=s[0])==null?void 0:l.subtitle)+"")&&je(r,t)},d(s){s&&_(e)}}}function vr(n){var E,m,k;let e,t,r,o,s=((E=n[0])==null?void 0:E.title)+"",i,l,a,c,p,g=((m=n[0])==null?void 0:m.parentTitle)&&ct(n),b=((k=n[0])==null?void 0:k.subtitle)&&ft(n);return{c(){e=w("button"),g&&g.c(),t=L(),r=w("div"),o=w("div"),i=he(s),l=L(),b&&b.c(),this.h()},l(f){e=$(f,"BUTTON",{id:!0,"aria-selected":!0,role:!0,class:!0});var v=I(e);g&&g.l(v),t=j(v),r=$(v,"DIV",{class:!0});var h=I(r);o=$(h,"DIV",{class:!0});var x=I(o);i=me(x,s),x.forEach(_),l=j(h),b&&b.l(h),h.forEach(_),v.forEach(_),this.h()},h(){u(o,"class","title"),u(r,"class",""),u(e,"id",a="kbar-option-"+n[1]),u(e,"aria-selected","false"),u(e,"role","option"),u(e,"class","action-button kbar-list-item svelte-1wz0qzr")},m(f,v){B(f,e,v),g&&g.m(e,null),d(e,t),d(e,r),d(r,o),d(o,i),d(r,l),b&&b.m(r,null),n[8](e),c||(p=Ee(e,"click",n[7]),c=!0)},p(f,[v]){var h,x,C;(h=f[0])!=null&&h.parentTitle?g?g.p(f,v):(g=ct(f),g.c(),g.m(e,t)):g&&(g.d(1),g=null),v&1&&s!==(s=((x=f[0])==null?void 0:x.title)+"")&&je(i,s),(C=f[0])!=null&&C.subtitle?b?b.p(f,v):(b=ft(f),b.c(),b.m(r,null)):b&&(b.d(1),b=null),v&2&&a!==(a="kbar-option-"+f[1])&&u(e,"id",a)},i:$e,o:$e,d(f){f&&_(e),g&&g.d(),b&&b.d(),n[8](null),c=!1,p()}}}function kr(n,e,t){let r,o,s,i,{details:l}=e,{count:a}=e,c=l==null?void 0:l.nested,p=Ge();F(n,p,v=>t(9,r=v));let g=Qe();F(n,g,v=>t(11,s=v));let b=Ye();F(n,b,v=>t(12,i=v));let E=Fe();F(n,E,v=>t(10,o=v));let m;function k(){if(c){re(b,i=l==null?void 0:l.title,i),re(g,s=c,s),re(E,o="",o);return}l==null||l.callback(),re(p,r=!1,r)}Me(()=>{m.addEventListener("mousemove",()=>{const h=document.getElementById("k-listbox").querySelectorAll('button[role="option"]');Ae(a-1,h)})});function f(v){qe[v?"unshift":"push"](()=>{m=v,t(2,m)})}return n.$$set=v=>{"details"in v&&t(0,l=v.details),"count"in v&&t(1,a=v.count)},[l,a,m,p,g,b,E,k,f]}class wr extends pe{constructor(e){super(),_e(this,e,kr,vr,ge,{details:0,count:1})}}function ut(n,e,t){const r=n.slice();return r[4]=e[t],r}function dt(n,e){let t,r,o;return r=new wr({props:{details:e[4],count:e[1].indexOf(e[4])+1}}),{key:n,first:null,c(){t=ze(),N(r.$$.fragment),this.h()},l(s){t=ze(),q(r.$$.fragment,s),this.h()},h(){this.first=t},m(s,i){B(s,t,i),O(r,s,i),o=!0},p(s,i){e=s;const l={};i&2&&(l.details=e[4]),i&2&&(l.count=e[1].indexOf(e[4])+1),r.$set(l)},i(s){o||(M(r.$$.fragment,s),o=!0)},o(s){T(r.$$.fragment,s),o=!1},d(s){s&&_(t),K(r,s)}}}function $r(n){let e,t=[],r=new Map,o,s=De(n[1]);const i=l=>crypto.randomUUID();for(let l=0;l<s.length;l+=1){let a=ut(n,s,l),c=i();r.set(c,t[l]=dt(c,a))}return{c(){e=w("div");for(let l=0;l<t.length;l+=1)t[l].c();this.h()},l(l){e=$(l,"DIV",{role:!0,class:!0,id:!0});var a=I(e);for(let c=0;c<t.length;c+=1)t[c].l(a);a.forEach(_),this.h()},h(){u(e,"role","listbox"),u(e,"class","actions-container svelte-65zx6l"),u(e,"id",yr)},m(l,a){B(l,e,a);for(let c=0;c<t.length;c+=1)t[c]&&t[c].m(e,null);n[3](e),o=!0},p(l,[a]){a&2&&(s=De(l[1]),Ve(),t=Xt(t,a,i,1,l,s,r,e,Zt,dt,null,ut),Pe())},i(l){if(!o){for(let a=0;a<s.length;a+=1)M(t[a]);o=!0}},o(l){for(let a=0;a<t.length;a+=1)T(t[a]);o=!1},d(l){l&&_(e);for(let a=0;a<t.length;a+=1)t[a].d();n[3](null)}}}let yr="k-listbox";function Er(n,e,t){let r,o=Qe();F(n,o,l=>t(1,r=l));let s;function i(l){qe[l?"unshift":"push"](()=>{s=l,t(0,s)})}return n.$$.update=()=>{n.$$.dirty&3&&s&&r&&$t().then(()=>{let l=0;const a=s.querySelectorAll('button[role="option"]');Ae(l,a)})},[s,r,o,i]}class xr extends pe{constructor(e){super(),_e(this,e,Er,$r,ge,{})}}function Ir(n){let e,t,r,o,s,i,l,a;return r=new br({}),r.$on("search",n[5]),s=new xr({}),{c(){e=w("dialog"),t=w("div"),N(r.$$.fragment),o=L(),N(s.$$.fragment),this.h()},l(c){e=$(c,"DIALOG",{class:!0,id:!0,tabindex:!0});var p=I(e);t=$(p,"DIV",{class:!0});var g=I(t);q(r.$$.fragment,g),o=j(g),q(s.$$.fragment,g),g.forEach(_),p.forEach(_),this.h()},h(){u(t,"class","dialog-container svelte-12gqwy7"),u(e,"class","dialog svelte-12gqwy7"),u(e,"id","dialog"),u(e,"tabindex","-1")},m(c,p){B(c,e,p),d(e,t),O(r,t,null),d(t,o),O(s,t,null),n[9](e),i=!0,l||(a=[Mt(mr.call(null,t)),Ee(t,"click_outside",n[6])],l=!0)},p:$e,i(c){i||(M(r.$$.fragment,c),M(s.$$.fragment,c),i=!0)},o(c){T(r.$$.fragment,c),T(s.$$.fragment,c),i=!1},d(c){c&&_(e),K(r),K(s),n[9](null),l=!1,wt(a)}}}let Ue="Search ..";function Cr(n,e,t){let r,o,s,i,{actions:l}=e;Te.register(l),Ot(Ue),Kt(""),Ut(Te.getModel());let a=Qe();F(n,a,f=>t(11,s=f));let c=Fe();F(n,c,f=>t(12,i=f));let p,g=Ge();F(n,g,f=>t(8,r=f));let b=Ye();F(n,b,f=>t(10,o=f));function E(f){if(f.detail){if(o!=Ue){re(a,s=Te.searchName(f.detail,s),s);return}re(a,s=Te.searchName(f.detail),s)}else re(a,s=[...Te.getModel()],s),re(b,o=Ue,o)}function m(){re(g,r=!1,r)}Me(()=>{document.addEventListener("keydown",function(f){(f.ctrlKey||f.metaKey)&&f.key==="k"&&(f.preventDefault(),re(g,r=!r,r))})});function k(f){qe[f?"unshift":"push"](()=>{p=f,t(0,p)})}return n.$$set=f=>{"actions"in f&&t(7,l=f.actions)},n.$$.update=()=>{if(n.$$.dirty&257)try{r===!0?(p.showModal(),re(c,i="",i),re(b,o=Ue,o),re(a,s=[...Te.getModel()],s)):p.close()}catch{}},[p,a,c,g,b,E,m,l,r,k]}class Lr extends pe{constructor(e){super(),_e(this,e,Cr,Ir,ge,{actions:7})}}const Le=Wt(!1);function jr(n){let e,t,r,o,s,i;return t=new we({props:{icon:Pt,class:"self-center"}}),{c(){e=w("button"),N(t.$$.fragment),this.h()},l(l){e=$(l,"BUTTON",{class:!0});var a=I(e);q(t.$$.fragment,a),a.forEach(_),this.h()},h(){u(e,"class","cursor-pointer self-center hover-animate")},m(l,a){B(l,e,a),O(t,e,null),o=!0,s||(i=Ee(e,"click",n[1]),s=!0)},p:$e,i(l){o||(M(t.$$.fragment,l),l&&(r||Oe(()=>{r=yt(e,Et,{}),r.start()})),o=!0)},o(l){T(t.$$.fragment,l),o=!1},d(l){l&&_(e),K(t),s=!1,i()}}}function Mr(n){let e,t,r,o,s,i;return t=new we({props:{icon:Bt,class:"self-center"}}),{c(){e=w("button"),N(t.$$.fragment),this.h()},l(l){e=$(l,"BUTTON",{class:!0});var a=I(e);q(t.$$.fragment,a),a.forEach(_),this.h()},h(){u(e,"class","cursor-pointer self-center hover-animate")},m(l,a){B(l,e,a),O(t,e,null),o=!0,s||(i=Ee(e,"click",n[1]),s=!0)},p:$e,i(l){o||(M(t.$$.fragment,l),l&&(r||Oe(()=>{r=yt(e,Et,{}),r.start()})),o=!0)},o(l){T(t.$$.fragment,l),o=!1},d(l){l&&_(e),K(t),s=!1,i()}}}function Sr(n){let e,t,r,o;const s=[Mr,jr],i=[];function l(a,c){return a[0]?0:1}return t=l(n),r=i[t]=s[t](n),{c(){e=w("div"),r.c(),this.h()},l(a){e=$(a,"DIV",{class:!0});var c=I(e);r.l(c),c.forEach(_),this.h()},h(){u(e,"class","text-inherit flex items-center justify-center")},m(a,c){B(a,e,c),i[t].m(e,null),o=!0},p(a,[c]){let p=t;t=l(a),t===p?i[t].p(a,c):(Ve(),T(i[p],1,1,()=>{i[p]=null}),Pe(),r=i[t],r?r.p(a,c):(r=i[t]=s[t](a),r.c()),M(r,1),r.m(e,null))},i(a){o||(M(r),o=!0)},o(a){T(r),o=!1},d(a){a&&_(e),i[t].d()}}}function Tr(n,e,t){let r;F(n,Le,l=>t(0,r=l));let o=!1,s=Le.subscribe(l=>{o&&(localStorage.setItem("theme",l?"dark":"light"),localStorage.theme==="dark"||!("theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"))});function i(){Le.update(l=>!l)}return Me(()=>{let l=localStorage.theme=="dark";return Le.set(l),o=!0,()=>{s()}}),[r,i]}class Lt extends pe{constructor(e){super(),_e(this,e,Tr,Sr,ge,{})}}function Dr(n){let e,t,r,o='<a href="/blog" class="relative font-bold flex items-center justify-center"><h1>Home</h1></a>',s,i,l,a,c,p='Search <span class="">Ctrl+K</span>',g,b,E='<a href="/about ">About</a>',m,k,f,v,h,x,C="RSS",A,z,se,R,Q,le,ae;return v=new we({props:{icon:Ht}}),se=new Lt({}),{c(){e=w("div"),t=w("ul"),r=w("li"),r.innerHTML=o,s=L(),i=w("li"),l=w("ul"),a=w("li"),c=w("button"),c.innerHTML=p,g=L(),b=w("li"),b.innerHTML=E,m=L(),k=w("li"),f=w("div"),N(v.$$.fragment),h=L(),x=w("a"),x.textContent=C,A=L(),z=w("li"),N(se.$$.fragment),this.h()},l(S){e=$(S,"DIV",{class:!0});var X=I(e);t=$(X,"UL",{class:!0});var J=I(t);r=$(J,"LI",{"data-svelte-h":!0}),Z(r)!=="svelte-sr6ji3"&&(r.innerHTML=o),s=j(J),i=$(J,"LI",{});var ee=I(i);l=$(ee,"UL",{class:!0});var te=I(l);a=$(te,"LI",{class:!0});var fe=I(a);c=$(fe,"BUTTON",{"data-svelte-h":!0}),Z(c)!=="svelte-n5mlmz"&&(c.innerHTML=p),fe.forEach(_),g=j(te),b=$(te,"LI",{class:!0,"data-svelte-h":!0}),Z(b)!=="svelte-161s3lu"&&(b.innerHTML=E),m=j(te),k=$(te,"LI",{class:!0});var H=I(k);f=$(H,"DIV",{class:!0});var ne=I(f);q(v.$$.fragment,ne),h=j(ne),x=$(ne,"A",{href:!0,"data-svelte-h":!0}),Z(x)!=="svelte-z4tmsw"&&(x.textContent=C),ne.forEach(_),H.forEach(_),A=j(te),z=$(te,"LI",{class:!0});var P=I(z);q(se.$$.fragment,P),P.forEach(_),te.forEach(_),ee.forEach(_),J.forEach(_),X.forEach(_),this.h()},h(){u(a,"class","bg-orange-200 hidden md:block dark:bg-stone-800 dark:text-orange-300 p-2 px-3 rounded-full text-black text-sm"),u(b,"class","flex rounded-full items-center justify-center bg-orange-50 border border-orang dark:border-dark dark:bg-stone-950 px-2 py-1"),u(x,"href","/rss.xml"),u(f,"class","w-full rounded-full flex items-center justify-center gap-2"),u(k,"class","flex items-center justify-center"),u(z,"class","py-2 flex items-center justify-center"),u(l,"class","flex gap-2 items-center justify-center"),u(t,"class","w-screen flex justify-between py-6 px-3 pr-5 md:px-6 items-center mt-12"),u(e,"class","bottom-nav w-[200vw] z-50 fixed bg-orange-100 border-b-2 border-orang dark:border-dark dark:bg-stone-900 flex items-center justify-center svelte-1f10a5d"),st(e,"visible",n[0])},m(S,X){B(S,e,X),d(e,t),d(t,r),d(t,s),d(t,i),d(i,l),d(l,a),d(a,c),d(l,g),d(l,b),d(l,m),d(l,k),d(k,f),O(v,f,null),d(f,h),d(f,x),d(l,A),d(l,z),O(se,z,null),Q=!0,le||(ae=Ee(c,"click",n[2]),le=!0)},p(S,[X]){(!Q||X&1)&&st(e,"visible",S[0])},i(S){Q||(M(v.$$.fragment,S),M(se.$$.fragment,S),S&&Oe(()=>{Q&&(R||(R=Be(e,We,{},!0)),R.run(1))}),Q=!0)},o(S){T(v.$$.fragment,S),T(se.$$.fragment,S),S&&(R||(R=Be(e,We,{},!1)),R.run(0)),Q=!1},d(S){S&&_(e),K(v),K(se),S&&R&&R.end(),le=!1,ae()}}}function Ar(n,e,t){let r,o=!0;const s=()=>{t(0,o=!0)};let i=Ge();F(n,i,a=>t(3,r=a)),Me(()=>{let a=window.pageYOffset;const c=()=>{const p=window.pageYOffset;a>p?s():t(0,o=!1),a=p};return window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}});function l(){re(i,r=!r,r)}return[o,i,l]}class Vr extends pe{constructor(e){super(),_e(this,e,Ar,Dr,ge,{})}}function Pr(n){let e,t;return e=new Vr({}),{c(){N(e.$$.fragment)},l(r){q(e.$$.fragment,r)},m(r,o){O(e,r,o),t=!0},i(r){t||(M(e.$$.fragment,r),t=!0)},o(r){T(e.$$.fragment,r),t=!1},d(r){K(e,r)}}}function Br(n){let e,t,r,o,s,i,l,a,c,p,g,b,E;return t=new Ke({props:{data:{name:"Home",href:"/"}}}),o=new Ke({props:{data:{name:"About",href:"/about"}}}),l=new Lt({}),c=new Ke({props:{data:{name:"Blog",href:"/blog"}}}),g=new Ke({props:{data:{name:"Projects",href:"/projects"}}}),{c(){e=w("ul"),N(t.$$.fragment),r=L(),N(o.$$.fragment),s=L(),i=w("div"),N(l.$$.fragment),a=L(),N(c.$$.fragment),p=L(),N(g.$$.fragment),this.h()},l(m){e=$(m,"UL",{class:!0});var k=I(e);q(t.$$.fragment,k),r=j(k),q(o.$$.fragment,k),s=j(k),i=$(k,"DIV",{class:!0});var f=I(i);q(l.$$.fragment,f),f.forEach(_),a=j(k),q(c.$$.fragment,k),p=j(k),q(g.$$.fragment,k),k.forEach(_),this.h()},h(){u(i,"class","text-4xl p-3"),u(e,"class","flex top-1 gap-1 lg:gap-3 font-medium border px-2 border-orange-600 dark:border-dark border-b-2 rounded-3xl items-center justify-center")},m(m,k){B(m,e,k),O(t,e,null),d(e,r),O(o,e,null),d(e,s),d(e,i),O(l,i,null),d(e,a),O(c,e,null),d(e,p),O(g,e,null),E=!0},i(m){E||(M(t.$$.fragment,m),M(o.$$.fragment,m),M(l.$$.fragment,m),M(c.$$.fragment,m),M(g.$$.fragment,m),m&&Oe(()=>{E&&(b||(b=Be(e,We,{},!0)),b.run(1))}),E=!0)},o(m){T(t.$$.fragment,m),T(o.$$.fragment,m),T(l.$$.fragment,m),T(c.$$.fragment,m),T(g.$$.fragment,m),m&&(b||(b=Be(e,We,{},!1)),b.run(0)),E=!1},d(m){m&&_(e),K(t),K(o),K(l),K(c),K(g),m&&b&&b.end()}}}function Hr(n){let e,t,r,o;const s=[Br,Pr],i=[];function l(a,c){return a[0]?1:0}return t=l(n),r=i[t]=s[t](n),{c(){e=w("nav"),r.c(),this.h()},l(a){e=$(a,"NAV",{class:!0});var c=I(e);r.l(c),c.forEach(_),this.h()},h(){u(e,"class","w-full font-medium flex justify-center items-center pt-3 flex-col relative")},m(a,c){B(a,e,c),i[t].m(e,null),o=!0},p(a,[c]){let p=t;t=l(a),t!==p&&(Ve(),T(i[p],1,1,()=>{i[p]=null}),Pe(),r=i[t],r||(r=i[t]=s[t](a),r.c()),M(r,1),r.m(e,null))},i(a){o||(M(r),o=!0)},o(a){T(r),o=!1},d(a){a&&_(e),i[t].d()}}}function Nr(n,e,t){let{isBlog:r}=e;return n.$$set=o=>{"isBlog"in o&&t(0,r=o.isBlog)},[r]}class qr extends pe{constructor(e){super(),_e(this,e,Nr,Hr,ge,{isBlog:0})}}function Or(n){let e,t,r='Made with <span class="font-bold text-orang dark:text-dark">Sveltekit</span> ♡',o,s,i,l,a,c,p,g,b,E,m,k,f,v,h,x,C,A,z,se='<p>Gigs, or Need help? Email</p> <a href="mailto:abdulmuminyqn@gmail.com?subject=Hi%20Abdulmumin&amp;body=Just%20saying%20hi!" class="font-visby font-bold" target="_blank">abdulmuminyqn@gmail.com</a>',R,Q,le="Helpful links",ae,S,X,J,ee,te,fe,H="|",ne,P,be,W,Se,y,V="|",G,ce,ye,D,oe,ue,He="|",xe,ve,ke="Wallpapers",de;return l=new we({props:{icon:xt}}),g=new we({props:{icon:Gt}}),k=new we({props:{icon:Rt}}),x=new we({props:{icon:Yt}}),{c(){e=w("footer"),t=w("p"),t.innerHTML=r,o=L(),s=w("div"),i=w("a"),N(l.$$.fragment),c=L(),p=w("a"),N(g.$$.fragment),E=L(),m=w("a"),N(k.$$.fragment),v=L(),h=w("a"),N(x.$$.fragment),A=L(),z=w("div"),z.innerHTML=se,R=L(),Q=w("p"),Q.textContent=le,ae=L(),S=w("div"),X=w("a"),J=he("Blog"),te=L(),fe=w("p"),fe.textContent=H,ne=L(),P=w("a"),be=he("LinkedIn"),Se=L(),y=w("p"),y.textContent=V,G=L(),ce=w("a"),ye=he("Resources"),oe=L(),ue=w("p"),ue.textContent=He,xe=L(),ve=w("a"),ve.textContent=ke,this.h()},l(U){e=$(U,"FOOTER",{class:!0});var Y=I(e);t=$(Y,"P",{class:!0,"data-svelte-h":!0}),Z(t)!=="svelte-gd2x4q"&&(t.innerHTML=r),o=j(Y),s=$(Y,"DIV",{class:!0});var Ie=I(s);i=$(Ie,"A",{href:!0});var Xe=I(i);q(l.$$.fragment,Xe),Xe.forEach(_),c=j(Ie),p=$(Ie,"A",{href:!0});var Ze=I(p);q(g.$$.fragment,Ze),Ze.forEach(_),E=j(Ie),m=$(Ie,"A",{href:!0});var Je=I(m);q(k.$$.fragment,Je),Je.forEach(_),v=j(Ie),h=$(Ie,"A",{href:!0});var et=I(h);q(x.$$.fragment,et),et.forEach(_),Ie.forEach(_),A=j(Y),z=$(Y,"DIV",{"data-svelte-h":!0}),Z(z)!=="svelte-1vogc1b"&&(z.innerHTML=se),R=j(Y),Q=$(Y,"P",{class:!0,"data-svelte-h":!0}),Z(Q)!=="svelte-1u11b2k"&&(Q.textContent=le),ae=j(Y),S=$(Y,"DIV",{class:!0});var ie=I(S);X=$(ie,"A",{href:!0});var tt=I(X);J=me(tt,"Blog"),tt.forEach(_),te=j(ie),fe=$(ie,"P",{"data-svelte-h":!0}),Z(fe)!=="svelte-1ceyy2c"&&(fe.textContent=H),ne=j(ie),P=$(ie,"A",{href:!0});var rt=I(P);be=me(rt,"LinkedIn"),rt.forEach(_),Se=j(ie),y=$(ie,"P",{"data-svelte-h":!0}),Z(y)!=="svelte-1ceyy2c"&&(y.textContent=V),G=j(ie),ce=$(ie,"A",{href:!0});var lt=I(ce);ye=me(lt,"Resources"),lt.forEach(_),oe=j(ie),ue=$(ie,"P",{"data-svelte-h":!0}),Z(ue)!=="svelte-1ceyy2c"&&(ue.textContent=He),xe=j(ie),ve=$(ie,"A",{href:!0,"data-svelte-h":!0}),Z(ve)!=="svelte-1gfwsvv"&&(ve.textContent=ke),ie.forEach(_),Y.forEach(_),this.h()},h(){u(t,"class",""),u(i,"href",a=n[0].github),u(p,"href",b=n[0].linkedin),u(m,"href",f=n[0].twitter),u(h,"href",C=n[0].youtube),u(s,"class","flex space-x-2"),u(Q,"class","font-visby_bold font-bold text-2xl"),u(X,"href",ee=n[0].hashnode),u(P,"href",W=n[0].linkedin),u(ce,"href",D=n[0].hashnode),u(ve,"href","/wallpapers"),u(S,"class","flex space-x-2 flex-wrap"),u(e,"class","bottom-0 w-full p-6 items-center justify-center flex flex-col s")},m(U,Y){B(U,e,Y),d(e,t),d(e,o),d(e,s),d(s,i),O(l,i,null),d(s,c),d(s,p),O(g,p,null),d(s,E),d(s,m),O(k,m,null),d(s,v),d(s,h),O(x,h,null),d(e,A),d(e,z),d(e,R),d(e,Q),d(e,ae),d(e,S),d(S,X),d(X,J),d(S,te),d(S,fe),d(S,ne),d(S,P),d(P,be),d(S,Se),d(S,y),d(S,G),d(S,ce),d(ce,ye),d(S,oe),d(S,ue),d(S,xe),d(S,ve),de=!0},p(U,[Y]){(!de||Y&1&&a!==(a=U[0].github))&&u(i,"href",a),(!de||Y&1&&b!==(b=U[0].linkedin))&&u(p,"href",b),(!de||Y&1&&f!==(f=U[0].twitter))&&u(m,"href",f),(!de||Y&1&&C!==(C=U[0].youtube))&&u(h,"href",C),(!de||Y&1&&ee!==(ee=U[0].hashnode))&&u(X,"href",ee),(!de||Y&1&&W!==(W=U[0].linkedin))&&u(P,"href",W),(!de||Y&1&&D!==(D=U[0].hashnode))&&u(ce,"href",D)},i(U){de||(M(l.$$.fragment,U),M(g.$$.fragment,U),M(k.$$.fragment,U),M(x.$$.fragment,U),de=!0)},o(U){T(l.$$.fragment,U),T(g.$$.fragment,U),T(k.$$.fragment,U),T(x.$$.fragment,U),de=!1},d(U){U&&_(e),K(l),K(g),K(k),K(x)}}}function Kr(n,e,t){let r;return F(n,Ft,o=>t(0,r=o)),[r]}class Ur extends pe{constructor(e){super(),_e(this,e,Kr,Or,ge,{})}}const Ne=Jt("goto");function ht(n,e,t){const r=n.slice();return r[12]=e[t],r}function mt(n,e,t){const r=n.slice();return r[15]=e[t],r[17]=t,r}function gt(n){let e,t,r,o,s="View on GitHub",i,l;return t=new we({props:{icon:xt}}),{c(){e=w("a"),N(t.$$.fragment),r=L(),o=w("span"),o.textContent=s,this.h()},l(a){e=$(a,"A",{target:!0,href:!0,class:!0});var c=I(e);q(t.$$.fragment,c),r=j(c),o=$(c,"SPAN",{"data-svelte-h":!0}),Z(o)!=="svelte-1s7htxr"&&(o.textContent=s),c.forEach(_),this.h()},h(){u(e,"target","_blank"),u(e,"href",i=n[0].links.study),u(e,"class","flex items-center space-x-2 bg-orange-300 dark:bg-orange-700 hover:bg-orange-400 dark:hover:bg-orange-600 text-stone-900 dark:text-orange-100 font-bold py-2 px-4 rounded-lg")},m(a,c){B(a,e,c),O(t,e,null),d(e,r),d(e,o),l=!0},p(a,c){(!l||c&1&&i!==(i=a[0].links.study))&&u(e,"href",i)},i(a){l||(M(t.$$.fragment,a),l=!0)},o(a){T(t.$$.fragment,a),l=!1},d(a){a&&_(e),K(t)}}}function pt(n){let e,t;return{c(){e=w("img"),this.h()},l(r){e=$(r,"IMG",{alt:!0,src:!0,class:!0}),this.h()},h(){u(e,"alt",`Project image ${n[17]+1}`),ot(e.src,t=n[15])||u(e,"src",t),u(e,"class","w-[720px] border-4 border-orange-200 dark:border-dark object-contain rounded-xl")},m(r,o){B(r,e,o)},p(r,o){o&4&&!ot(e.src,t=r[15])&&u(e,"src",t)},d(r){r&&_(e)}}}function _t(n){let e,t=n[12]+"",r,o;return{c(){e=w("li"),r=he(t),o=L(),this.h()},l(s){e=$(s,"LI",{class:!0});var i=I(e);r=me(i,t),o=j(i),i.forEach(_),this.h()},h(){u(e,"class","bg-orange-200 dark:bg-stone-700 text-stone-800 dark:text-orange-100 px-2 py-1 rounded-md text-sm")},m(s,i){B(s,e,i),d(e,r),d(e,o)},p(s,i){i&1&&t!==(t=s[12]+"")&&je(r,t)},d(s){s&&_(e)}}}function zr(n){var Se;let e,t,r,o=n[0].name+"",s,i,l,a,c,p,g=n[0].description+"",b,E,m,k,f,v,h="Visit Website",x,C,A,z,se,R,Q,le,ae,S="Tech Stack",X,J,ee,te,fe;a=new we({props:{icon:Nt}});let H=((Se=n[0].links)==null?void 0:Se.study)&&gt(n);C=new we({props:{icon:qt}});let ne=De(n[2]),P=[];for(let y=0;y<ne.length;y+=1)P[y]=pt(mt(n,ne,y));let be=De(n[0].stack),W=[];for(let y=0;y<be.length;y+=1)W[y]=_t(ht(n,be,y));return{c(){e=w("dialog"),t=w("div"),r=w("h2"),s=he(o),i=L(),l=w("button"),N(a.$$.fragment),c=L(),p=w("p"),b=he(g),E=L(),m=w("div"),H&&H.c(),k=L(),f=w("a"),v=w("span"),v.textContent=h,x=L(),N(C.$$.fragment),se=L(),R=w("div");for(let y=0;y<P.length;y+=1)P[y].c();Q=L(),le=w("div"),ae=w("h3"),ae.textContent=S,X=L(),J=w("ul");for(let y=0;y<W.length;y+=1)W[y].c();this.h()},l(y){e=$(y,"DIALOG",{class:!0});var V=I(e);t=$(V,"DIV",{class:!0});var G=I(t);r=$(G,"H2",{class:!0});var ce=I(r);s=me(ce,o),ce.forEach(_),i=j(G),l=$(G,"BUTTON",{class:!0});var ye=I(l);q(a.$$.fragment,ye),ye.forEach(_),G.forEach(_),c=j(V),p=$(V,"P",{class:!0});var D=I(p);b=me(D,g),D.forEach(_),E=j(V),m=$(V,"DIV",{class:!0});var oe=I(m);H&&H.l(oe),k=j(oe),f=$(oe,"A",{target:!0,href:!0,class:!0});var ue=I(f);v=$(ue,"SPAN",{"data-svelte-h":!0}),Z(v)!=="svelte-1y0l6t4"&&(v.textContent=h),x=j(ue),q(C.$$.fragment,ue),ue.forEach(_),oe.forEach(_),se=j(V),R=$(V,"DIV",{class:!0});var He=I(R);for(let ke=0;ke<P.length;ke+=1)P[ke].l(He);He.forEach(_),Q=j(V),le=$(V,"DIV",{class:!0});var xe=I(le);ae=$(xe,"H3",{class:!0,"data-svelte-h":!0}),Z(ae)!=="svelte-jgfuqy"&&(ae.textContent=S),X=j(xe),J=$(xe,"UL",{class:!0});var ve=I(J);for(let ke=0;ke<W.length;ke+=1)W[ke].l(ve);ve.forEach(_),xe.forEach(_),V.forEach(_),this.h()},h(){var y,V;u(r,"class","text-3xl lg:text-4xl font-visby_bold font-extrabold"),u(l,"class","text-stone-600 hover:text-stone-800 dark:text-orange-300 dark:hover:text-orange-100"),u(t,"class","flex justify-between items-center mb-4"),u(p,"class","text-stone-700 dark:text-orange-200 mb-4 max-w-[20rem]"),u(f,"target",A=(y=n[0])!=null&&y.onpage?"_self":"_blank"),u(f,"href",z=((V=n[0])!=null&&V.onpage?"":"https://")+n[0].links.page),u(f,"class","flex items-center space-x-2 bg-orange-300 dark:bg-orange-700 hover:bg-orange-400 dark:hover:bg-orange-600 text-stone-900 dark:text-orange-100 font-bold py-2 px-4 rounded-lg"),u(m,"class","flex space-x-4 mb-6"),u(R,"class","flex gap-4 overflow-x-auto mb-6"),u(ae,"class","text-xl font-semibold mb-2"),u(J,"class","flex gap-2 flex-wrap"),u(le,"class","mb-4"),u(e,"class","w-full max-w-[90%] font-visby p-6 rounded-2xl border border-orang dark:border-dark bg-orange-100 dark:bg-stone-900 text-stone-900 dark:text-orange-100")},m(y,V){B(y,e,V),d(e,t),d(t,r),d(r,s),d(t,i),d(t,l),O(a,l,null),d(e,c),d(e,p),d(p,b),d(e,E),d(e,m),H&&H.m(m,null),d(m,k),d(m,f),d(f,v),d(f,x),O(C,f,null),d(e,se),d(e,R);for(let G=0;G<P.length;G+=1)P[G]&&P[G].m(R,null);d(e,Q),d(e,le),d(le,ae),d(le,X),d(le,J);for(let G=0;G<W.length;G+=1)W[G]&&W[G].m(J,null);n[6](e),ee=!0,te||(fe=Ee(l,"click",n[5]),te=!0)},p(y,[V]){var G,ce,ye;if((!ee||V&1)&&o!==(o=y[0].name+"")&&je(s,o),(!ee||V&1)&&g!==(g=y[0].description+"")&&je(b,g),(G=y[0].links)!=null&&G.study?H?(H.p(y,V),V&1&&M(H,1)):(H=gt(y),H.c(),M(H,1),H.m(m,k)):H&&(Ve(),T(H,1,1,()=>{H=null}),Pe()),(!ee||V&1&&A!==(A=(ce=y[0])!=null&&ce.onpage?"_self":"_blank"))&&u(f,"target",A),(!ee||V&1&&z!==(z=((ye=y[0])!=null&&ye.onpage?"":"https://")+y[0].links.page))&&u(f,"href",z),V&4){ne=De(y[2]);let D;for(D=0;D<ne.length;D+=1){const oe=mt(y,ne,D);P[D]?P[D].p(oe,V):(P[D]=pt(oe),P[D].c(),P[D].m(R,null))}for(;D<P.length;D+=1)P[D].d(1);P.length=ne.length}if(V&1){be=De(y[0].stack);let D;for(D=0;D<be.length;D+=1){const oe=ht(y,be,D);W[D]?W[D].p(oe,V):(W[D]=_t(oe),W[D].c(),W[D].m(J,null))}for(;D<W.length;D+=1)W[D].d(1);W.length=be.length}},i(y){ee||(M(a.$$.fragment,y),M(H),M(C.$$.fragment,y),ee=!0)},o(y){T(a.$$.fragment,y),T(H),T(C.$$.fragment,y),ee=!1},d(y){y&&_(e),K(a),H&&H.d(),K(C),at(P,y),at(W,y),n[6](null),te=!1,fe()}}}function Wr(n,e,t){let r,o,s=er();F(n,s,m=>t(7,r=m));let l={name:"Project Name",stack:["Stack1","Stack2","Stack3"],description:"A short sentence that gives an overall picture of the project",links:{study:"https://github.com/yourusername/project",page:"your-project-url.com"}},a=tr();F(n,a,m=>t(8,o=m));let c;function p(){re(a,o=!1,o)}Me(()=>{let m=a.subscribe(k=>{if(k){if(!r)return;t(0,l=r),l!=null&&l.imagelist&&t(2,b=l.imagelist),c.showModal()}else c.close(),re(s,r=null,r),t(2,b=g)});return()=>{m()}});let g=["/dummy.png","/dummy.png","/dummy.png","/dummy.png"],b=g;function E(m){qe[m?"unshift":"push"](()=>{c=m,t(1,c)})}return[l,c,b,s,a,p,E]}class Gr extends pe{constructor(e){super(),_e(this,e,Wr,zr,ge,{})}}function bt(n){let e;return{c(){e=w("link"),this.h()},l(t){e=$(t,"LINK",{rel:!0,href:!0}),this.h()},h(){u(e,"rel","canonical"),u(e,"href",n[1])},m(t,r){B(t,e,r)},p(t,r){r&2&&u(e,"href",t[1])},d(t){t&&_(e)}}}function vt(n){let e,t,r="<p>Light mode is better</p>",o,s,i='<img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExejl2b3VkaXBqbHJpeWUzdng4Z3RvYXEzaWkwanIyOTQ4Ym00b2VudiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/s1AxxupkX45GsPQVHL/giphy.gif" alt="" srcset="" class="svelte-8j0lsi"/>',l,a,c="✖",p,g,b,E;return{c(){e=w("div"),t=w("div"),t.innerHTML=r,o=L(),s=w("div"),s.innerHTML=i,l=L(),a=w("button"),a.textContent=c,this.h()},l(m){e=$(m,"DIV",{class:!0});var k=I(e);t=$(k,"DIV",{class:!0,"data-svelte-h":!0}),Z(t)!=="svelte-4qrt6d"&&(t.innerHTML=r),o=j(k),s=$(k,"DIV",{class:!0,"data-svelte-h":!0}),Z(s)!=="svelte-3u6tqc"&&(s.innerHTML=i),l=j(k),a=$(k,"BUTTON",{class:!0,"data-svelte-h":!0}),Z(a)!=="svelte-69nbta"&&(a.textContent=c),k.forEach(_),this.h()},h(){u(t,"class","speech-bubble svelte-8j0lsi"),u(s,"class","clippy svelte-8j0lsi"),u(a,"class","dismiss svelte-8j0lsi"),u(e,"class","assistant svelte-8j0lsi")},m(m,k){B(m,e,k),d(e,t),d(e,o),d(e,s),d(e,l),d(e,a),g=!0,b||(E=Ee(a,"click",n[11]),b=!0)},p:$e,i(m){g||(m&&Oe(()=>{g&&(p||(p=Be(e,it,{y:20},!0)),p.run(1))}),g=!0)},o(m){m&&(p||(p=Be(e,it,{y:20},!1)),p.run(0)),g=!1},d(m){m&&_(e),m&&p&&p.end(),b=!1,E()}}}function kt(n){let e,t,r,o,s,i;return e=new Lr({props:{actions:n[4]}}),{c(){t=w("div"),N(e.$$.fragment),this.h()},l(l){t=$(l,"DIV",{style:!0});var a=I(t);q(e.$$.fragment,a),this.h()},h(){Ce(t,"display","contents"),Ce(t,"--bg",r=n[6]?"#1c1917":"#ffedd5"),Ce(t,"--kbar-primary",o=n[6]?"#c04310":"#f97316"),Ce(t,"--kbar-gray","#1c1917"),Ce(t,"--shadow",s=`0px .2px .2px ${n[6]?"#c04310":"#f97316"}`)},m(l,a){B(l,t,a),O(e,t,null),i=!0},p(l,a){a&64&&r!==(r=l[6]?"#1c1917":"#ffedd5")&&Ce(t,"--bg",r),a&64&&o!==(o=l[6]?"#c04310":"#f97316")&&Ce(t,"--kbar-primary",o),a&64&&s!==(s=`0px .2px .2px ${l[6]?"#c04310":"#f97316"}`)&&Ce(t,"--shadow",s);const c={};a&16&&(c.actions=l[4]),e.$set(c)},i(l){i||(M(e.$$.fragment,l),i=!0)},o(l){T(e.$$.fragment,l),i=!1},d(l){l&&e&&_(t),K(e,l)}}}function Rr(n){let e,t,r,o,s,i,l,a,c,p,g,b,E=n[1]&&bt(n);o=new qr({props:{isBlog:n[5]}});const m=n[10].default,k=St(m,n,n[9],null);l=new Ur({});let f=n[2]&&vt(n),v=n[0]&&kt(n);return g=new Gr({}),{c(){E&&E.c(),e=ze(),t=L(),r=w("div"),N(o.$$.fragment),s=L(),k&&k.c(),i=L(),N(l.$$.fragment),a=L(),f&&f.c(),c=L(),v&&v.c(),p=L(),N(g.$$.fragment),this.h()},l(h){const x=Tt("svelte-h3vunp",document.head);E&&E.l(x),e=ze(),x.forEach(_),t=j(h),r=$(h,"DIV",{class:!0});var C=I(r);q(o.$$.fragment,C),s=j(C),k&&k.l(C),i=j(C),q(l.$$.fragment,C),C.forEach(_),a=j(h),f&&f.l(h),c=j(h),v&&v.l(h),p=j(h),q(g.$$.fragment,h),this.h()},h(){u(r,"class","w-screen bg-orange-50 dark:text-orange-200 font-visby dark:bg-stone-950 relative transition-colors duration-500")},m(h,x){E&&E.m(document.head,null),d(document.head,e),B(h,t,x),B(h,r,x),O(o,r,null),d(r,s),k&&k.m(r,null),d(r,i),O(l,r,null),B(h,a,x),f&&f.m(h,x),B(h,c,x),v&&v.m(h,x),B(h,p,x),O(g,h,x),b=!0},p(h,[x]){h[1]?E?E.p(h,x):(E=bt(h),E.c(),E.m(e.parentNode,e)):E&&(E.d(1),E=null);const C={};x&32&&(C.isBlog=h[5]),o.$set(C),k&&k.p&&(!b||x&512)&&Dt(k,m,h,h[9],b?Vt(m,h[9],x,null):At(h[9]),null),h[2]?f?(f.p(h,x),x&4&&M(f,1)):(f=vt(h),f.c(),M(f,1),f.m(c.parentNode,c)):f&&(Ve(),T(f,1,1,()=>{f=null}),Pe()),h[0]?v?(v.p(h,x),x&1&&M(v,1)):(v=kt(h),v.c(),M(v,1),v.m(p.parentNode,p)):v&&(Ve(),T(v,1,1,()=>{v=null}),Pe())},i(h){b||(M(o.$$.fragment,h),M(k,h),M(l.$$.fragment,h),M(f),M(v),M(g.$$.fragment,h),b=!0)},o(h){T(o.$$.fragment,h),T(k,h),T(l.$$.fragment,h),T(f),T(v),T(g.$$.fragment,h),b=!1},d(h){h&&(_(t),_(r),_(a),_(c),_(p)),E&&E.d(h),_(e),K(o),k&&k.d(h),K(l),f&&f.d(h),v&&v.d(h),K(g,h)}}}async function Yr(){return await(await fetch("/blog/api/posts")).json()}function Fr(n,e,t){let r,o,s,i;F(n,Qt,C=>t(8,s=C)),F(n,Le,C=>t(6,i=C));let{$$slots:l={},$$scope:a}=e;rr(),lr(),zt();function c(C){Le.set(C)}let p=[],g=!1,b=null,E,m=!1,k,f=!1;function v(){console.log("dark mode is better."),clearTimeout(k),t(2,m=!0),t(3,k=setTimeout(()=>{t(2,m=!1)},4e3))}let h=Le.subscribe(C=>{C&&f?v():m&&t(2,m=!1)});Me(async()=>{f=!0,E=localStorage.theme==="dark"||!("theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches,E&&(v(),setTimeout(()=>{Le.set(!1)},2e3));let C=await Yr();return window.location.hostname.startsWith("www.")?t(1,b=window.location.href.replace("www.","")):t(1,b="https://www."+window.location.hostname+window.location.pathname),C.forEach(z=>{t(7,p=[...p,{title:z.title,subtitle:`${z.description.slice(0,100)}...`,callback:()=>{Ne(`/blog/${z.slug}`)}}])}),t(0,g=!0),()=>{h()}});const x=()=>{clearTimeout(k),t(2,m=!1)};return n.$$set=C=>{"$$scope"in C&&t(9,a=C.$$scope)},n.$$.update=()=>{n.$$.dirty&256&&t(5,r=s.url.pathname.startsWith("/blog")||s.url.pathname.startsWith("/category")),n.$$.dirty&128&&t(4,o=[{title:"Home",callback:()=>{Ne("/")}},{title:"About",callback:()=>{Ne("/about")}},{title:"Projects",callback:()=>{Ne("/projects")}},{title:"Blog",callback:()=>{Ne("/blog")}},{title:"Change Theme",nested:[{title:"Light",callback:()=>{c(!1)}},{title:"Dark",callback:()=>{c(!0)}}]},{title:"Search Blog",nested:p}])},t(5,r=!1),[g,b,m,k,o,r,i,p,s,a,l,x]}class fl extends pe{constructor(e){super(),_e(this,e,Fr,Rr,ge,{})}}export{fl as component,cl as universal};