From 74878348a50b6e21ac16959d4031ee15ee37f5b0 Mon Sep 17 00:00:00 2001 From: Karson Kalt Date: Tue, 16 Jul 2024 19:37:43 -0400 Subject: [PATCH 1/2] init --- _layouts/home.html | 87 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/_layouts/home.html b/_layouts/home.html index 1ec5057..ecc4703 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -29,11 +29,9 @@

Karson Kalt

fill="none" > - Email + + + Email @@ -60,10 +58,31 @@

Karson Kalt

-
+
-
From c4c88d2afc4a68088793040b92b4742e66a690fa Mon Sep 17 00:00:00 2001 From: Karson Kalt Date: Wed, 17 Jul 2024 10:10:53 -0400 Subject: [PATCH 2/2] add github activity --- _layouts/home.html | 7 +- _sass/custom-styles.scss | 6 ++ assets/js/{terminal.js => home.js} | 4 +- ...nal.js.LICENSE.txt => home.js.LICENSE.txt} | 0 assets/js/tabs.js | 1 - assets/ts/home/githubStatus.ts | 57 +++++++++++++++ assets/ts/home/index.ts | 9 +++ assets/ts/home/tabs.ts | 69 +++++++++++++++++++ .../{ => home}/terminal/UserInputManager.ts | 19 +---- assets/ts/{ => home}/terminal/commands.ts | 0 assets/ts/home/terminal/index.ts | 18 +++++ assets/ts/{ => home}/terminal/themeButton.ts | 0 .../{ => home}/terminal/updateAccentColor.ts | 0 assets/ts/index.ts | 2 +- assets/ts/tabs.ts | 67 ------------------ assets/ts/terminal/index.ts | 12 ---- tsconfig.json | 14 ++-- webpack.config.js | 3 +- 18 files changed, 172 insertions(+), 116 deletions(-) rename assets/js/{terminal.js => home.js} (55%) rename assets/js/{terminal.js.LICENSE.txt => home.js.LICENSE.txt} (100%) delete mode 100644 assets/js/tabs.js create mode 100644 assets/ts/home/githubStatus.ts create mode 100644 assets/ts/home/index.ts create mode 100644 assets/ts/home/tabs.ts rename assets/ts/{ => home}/terminal/UserInputManager.ts (83%) rename assets/ts/{ => home}/terminal/commands.ts (100%) create mode 100644 assets/ts/home/terminal/index.ts rename assets/ts/{ => home}/terminal/themeButton.ts (100%) rename assets/ts/{ => home}/terminal/updateAccentColor.ts (100%) delete mode 100644 assets/ts/tabs.ts delete mode 100644 assets/ts/terminal/index.ts diff --git a/_layouts/home.html b/_layouts/home.html index ecc4703..33b1155 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -42,6 +42,7 @@

Karson Kalt

{{ site.status_updated | date: "%B %-d" }}
{{ site.status }}
+
@@ -316,8 +317,4 @@

Work History

- - + diff --git a/_sass/custom-styles.scss b/_sass/custom-styles.scss index 575d684..0b0cb2e 100644 --- a/_sass/custom-styles.scss +++ b/_sass/custom-styles.scss @@ -496,6 +496,12 @@ a .domain { } } +#github-status { + margin-top: 10px; + font-size: 11px; + color: var(--text--secondary); +} + [role="tab"] { all: unset; bottom: -1px; diff --git a/assets/js/terminal.js b/assets/js/home.js similarity index 55% rename from assets/js/terminal.js rename to assets/js/home.js index b2c0c3b..b94b514 100644 --- a/assets/js/terminal.js +++ b/assets/js/home.js @@ -1,2 +1,2 @@ -/*! For license information please see terminal.js.LICENSE.txt */ -(()=>{var e={768:function(e){e.exports=function(){"use strict";for(var e=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),er?r:e},t=e,r={},n=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n255)&&(e._clipped=!0),e[r]=t(e[r],0,255)):3===r&&(e[r]=t(e[r],0,1));return e},limit:e,type:f,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==u(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==c(e[t])?e[t].toLowerCase():null},PI:i,TWOPI:2*i,PITHIRD:i/3,DEG2RAD:i/180,RAD2DEG:180/i},s={format:{},autodetect:[]},d=l.last,h=l.clip_rgb,p=l.type,b=s,g=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if("object"===p(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var n=d(e),a=!1;if(!n){a=!0,b.sorted||(b.autodetect=b.autodetect.sort((function(e,t){return t.p-e.p})),b.sorted=!0);for(var o=0,f=b.autodetect;o4?e[4]:1;return 1===o?[0,0,0,f]:[r>=1?0:255*(1-r)*(1-o),n>=1?0:255*(1-n)*(1-o),a>=1?0:255*(1-a)*(1-o),f]},_=y,E=v,C=s,S=l.unpack,L=l.type,O=x;E.prototype.cmyk=function(){return O(this._rgb)},_.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(E,[null].concat(e,["cmyk"])))},C.format.cmyk=N,C.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=S(e,"cmyk"),"array"===L(e)&&4===e.length)return"cmyk"}});var A=l.unpack,P=l.last,I=function(e){return Math.round(100*e)/100},D=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=A(e,"hsla"),n=P(e)||"lsa";return r[0]=I(r[0]||0),r[1]=I(100*r[1])+"%",r[2]=I(100*r[2])+"%","hsla"===n||r.length>3&&r[3]<1?(r[3]=r.length>3?r[3]:1,n="hsla"):r.length=3,n+"("+r.join(",")+")"},R=l.unpack,q=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=R(e,"rgba"))[0],n=e[1],a=e[2];r/=255,n/=255,a/=255;var o,f,u=Math.min(r,n,a),c=Math.max(r,n,a),i=(c+u)/2;return c===u?(o=0,f=Number.NaN):o=i<.5?(c-u)/(c+u):(c-u)/(2-c-u),r==c?f=(n-a)/(c-u):n==c?f=2+(a-r)/(c-u):a==c&&(f=4+(r-n)/(c-u)),(f*=60)<0&&(f+=360),e.length>3&&void 0!==e[3]?[f,o,i,e[3]]:[f,o,i]},j=l.unpack,F=l.last,B=D,T=q,G=Math.round,z=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=j(e,"rgba"),n=F(e)||"rgb";return"hsl"==n.substr(0,3)?B(T(r),n):(r[0]=G(r[0]),r[1]=G(r[1]),r[2]=G(r[2]),("rgba"===n||r.length>3&&r[3]<1)&&(r[3]=r.length>3?r[3]:1,n="rgba"),n+"("+r.slice(0,"rgb"===n?3:4).join(",")+")")},Y=l.unpack,U=Math.round,V=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];var n,a,o,f=(t=Y(t,"hsl"))[0],u=t[1],c=t[2];if(0===u)n=a=o=255*c;else{var i=[0,0,0],l=[0,0,0],s=c<.5?c*(1+u):c+u-c*u,d=2*c-s,h=f/360;i[0]=h+1/3,i[1]=h,i[2]=h-1/3;for(var p=0;p<3;p++)i[p]<0&&(i[p]+=1),i[p]>1&&(i[p]-=1),6*i[p]<1?l[p]=d+6*(s-d)*i[p]:2*i[p]<1?l[p]=s:3*i[p]<2?l[p]=d+(s-d)*(2/3-i[p])*6:l[p]=d;n=(e=[U(255*l[0]),U(255*l[1]),U(255*l[2])])[0],a=e[1],o=e[2]}return t.length>3?[n,a,o,t[3]]:[n,a,o,1]},$=V,X=s,J=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,K=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,W=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,H=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Z=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Q=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ee=Math.round,te=function(e){var t;if(e=e.toLowerCase().trim(),X.format.named)try{return X.format.named(e)}catch(e){}if(t=e.match(J)){for(var r=t.slice(1,4),n=0;n<3;n++)r[n]=+r[n];return r[3]=1,r}if(t=e.match(K)){for(var a=t.slice(1,5),o=0;o<4;o++)a[o]=+a[o];return a}if(t=e.match(W)){for(var f=t.slice(1,4),u=0;u<3;u++)f[u]=ee(2.55*f[u]);return f[3]=1,f}if(t=e.match(H)){for(var c=t.slice(1,5),i=0;i<3;i++)c[i]=ee(2.55*c[i]);return c[3]=+c[3],c}if(t=e.match(Z)){var l=t.slice(1,4);l[1]*=.01,l[2]*=.01;var s=$(l);return s[3]=1,s}if(t=e.match(Q)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var h=$(d);return h[3]=+t[4],h}};te.test=function(e){return J.test(e)||K.test(e)||W.test(e)||H.test(e)||Z.test(e)||Q.test(e)};var re=y,ne=v,ae=s,oe=l.type,fe=z,ue=te;ne.prototype.css=function(e){return fe(this._rgb,e)},re.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ne,[null].concat(e,["css"])))},ae.format.css=ue,ae.autodetect.push({p:5,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===oe(e)&&ue.test(e))return"css"}});var ce=v,ie=y,le=l.unpack;s.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=le(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r},ie.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ce,[null].concat(e,["gl"])))},ce.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var se=l.unpack,de=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=se(e,"rgb"),a=n[0],o=n[1],f=n[2],u=Math.min(a,o,f),c=Math.max(a,o,f),i=c-u,l=100*i/255,s=u/(255-i)*100;return 0===i?r=Number.NaN:(a===c&&(r=(o-f)/i),o===c&&(r=2+(f-a)/i),f===c&&(r=4+(a-o)/i),(r*=60)<0&&(r+=360)),[r,l,s]},he=l.unpack,pe=Math.floor,be=function(){for(var e,t,r,n,a,o,f=[],u=arguments.length;u--;)f[u]=arguments[u];var c,i,l,s=(f=he(f,"hcg"))[0],d=f[1],h=f[2];h*=255;var p=255*d;if(0===d)c=i=l=h;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var b=pe(s/=60),g=s-b,v=h*(1-d),m=v+p*(1-g),y=v+p*g,w=v+p;switch(b){case 0:c=(e=[w,y,v])[0],i=e[1],l=e[2];break;case 1:c=(t=[m,w,v])[0],i=t[1],l=t[2];break;case 2:c=(r=[v,w,y])[0],i=r[1],l=r[2];break;case 3:c=(n=[v,m,w])[0],i=n[1],l=n[2];break;case 4:c=(a=[y,v,w])[0],i=a[1],l=a[2];break;case 5:c=(o=[w,v,m])[0],i=o[1],l=o[2]}}return[c,i,l,f.length>3?f[3]:1]},ge=l.unpack,ve=l.type,me=y,ye=v,we=s,ke=de;ye.prototype.hcg=function(){return ke(this._rgb)},me.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ye,[null].concat(e,["hcg"])))},we.format.hcg=be,we.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ge(e,"hcg"),"array"===ve(e)&&3===e.length)return"hcg"}});var xe=l.unpack,Me=l.last,Ne=Math.round,_e=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=xe(e,"rgba"),n=r[0],a=r[1],o=r[2],f=r[3],u=Me(e)||"auto";void 0===f&&(f=1),"auto"===u&&(u=f<1?"rgba":"rgb");var c="000000"+((n=Ne(n))<<16|(a=Ne(a))<<8|(o=Ne(o))).toString(16);c=c.substr(c.length-6);var i="0"+Ne(255*f).toString(16);switch(i=i.substr(i.length-2),u.toLowerCase()){case"rgba":return"#"+c+i;case"argb":return"#"+i+c;default:return"#"+c}},Ee=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ce=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Se=function(e){if(e.match(Ee)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(Ce)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var r=parseInt(e,16);return[r>>24&255,r>>16&255,r>>8&255,Math.round((255&r)/255*100)/100]}throw new Error("unknown hex color: "+e)},Le=y,Oe=v,Ae=l.type,Pe=s,Ie=_e;Oe.prototype.hex=function(e){return Ie(this._rgb,e)},Le.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Oe,[null].concat(e,["hex"])))},Pe.format.hex=Se,Pe.autodetect.push({p:4,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===Ae(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var De=l.unpack,Re=l.TWOPI,qe=Math.min,je=Math.sqrt,Fe=Math.acos,Be=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=De(e,"rgb"),a=n[0],o=n[1],f=n[2],u=qe(a/=255,o/=255,f/=255),c=(a+o+f)/3,i=c>0?1-u/c:0;return 0===i?r=NaN:(r=(a-o+(a-f))/2,r/=je((a-o)*(a-o)+(a-f)*(o-f)),r=Fe(r),f>o&&(r=Re-r),r/=Re),[360*r,i,c]},Te=l.unpack,Ge=l.limit,ze=l.TWOPI,Ye=l.PITHIRD,Ue=Math.cos,Ve=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=Te(e,"hsi"))[0],f=e[1],u=e[2];return isNaN(o)&&(o=0),isNaN(f)&&(f=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?n=1-((a=(1-f)/3)+(r=(1+f*Ue(ze*o)/Ue(Ye-ze*o))/3)):o<2/3?a=1-((r=(1-f)/3)+(n=(1+f*Ue(ze*(o-=1/3))/Ue(Ye-ze*o))/3)):r=1-((n=(1-f)/3)+(a=(1+f*Ue(ze*(o-=2/3))/Ue(Ye-ze*o))/3)),[255*(r=Ge(u*r*3)),255*(n=Ge(u*n*3)),255*(a=Ge(u*a*3)),e.length>3?e[3]:1]},$e=l.unpack,Xe=l.type,Je=y,Ke=v,We=s,He=Be;Ke.prototype.hsi=function(){return He(this._rgb)},Je.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Ke,[null].concat(e,["hsi"])))},We.format.hsi=Ve,We.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=$e(e,"hsi"),"array"===Xe(e)&&3===e.length)return"hsi"}});var Ze=l.unpack,Qe=l.type,et=y,tt=v,rt=s,nt=q;tt.prototype.hsl=function(){return nt(this._rgb)},et.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(tt,[null].concat(e,["hsl"])))},rt.format.hsl=V,rt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ze(e,"hsl"),"array"===Qe(e)&&3===e.length)return"hsl"}});var at=l.unpack,ot=Math.min,ft=Math.max,ut=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=at(e,"rgb"))[0],f=e[1],u=e[2],c=ot(o,f,u),i=ft(o,f,u),l=i-c;return a=i/255,0===i?(r=Number.NaN,n=0):(n=l/i,o===i&&(r=(f-u)/l),f===i&&(r=2+(u-o)/l),u===i&&(r=4+(o-f)/l),(r*=60)<0&&(r+=360)),[r,n,a]},ct=l.unpack,it=Math.floor,lt=function(){for(var e,t,r,n,a,o,f=[],u=arguments.length;u--;)f[u]=arguments[u];var c,i,l,s=(f=ct(f,"hsv"))[0],d=f[1],h=f[2];if(h*=255,0===d)c=i=l=h;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var p=it(s/=60),b=s-p,g=h*(1-d),v=h*(1-d*b),m=h*(1-d*(1-b));switch(p){case 0:c=(e=[h,m,g])[0],i=e[1],l=e[2];break;case 1:c=(t=[v,h,g])[0],i=t[1],l=t[2];break;case 2:c=(r=[g,h,m])[0],i=r[1],l=r[2];break;case 3:c=(n=[g,v,h])[0],i=n[1],l=n[2];break;case 4:c=(a=[m,g,h])[0],i=a[1],l=a[2];break;case 5:c=(o=[h,g,v])[0],i=o[1],l=o[2]}}return[c,i,l,f.length>3?f[3]:1]},st=l.unpack,dt=l.type,ht=y,pt=v,bt=s,gt=ut;pt.prototype.hsv=function(){return gt(this._rgb)},ht.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(pt,[null].concat(e,["hsv"])))},bt.format.hsv=lt,bt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=st(e,"hsv"),"array"===dt(e)&&3===e.length)return"hsv"}});var vt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},mt=vt,yt=l.unpack,wt=Math.pow,kt=function(e){return(e/=255)<=.04045?e/12.92:wt((e+.055)/1.055,2.4)},xt=function(e){return e>mt.t3?wt(e,1/3):e/mt.t2+mt.t0},Mt=function(e,t,r){return e=kt(e),t=kt(t),r=kt(r),[xt((.4124564*e+.3575761*t+.1804375*r)/mt.Xn),xt((.2126729*e+.7151522*t+.072175*r)/mt.Yn),xt((.0193339*e+.119192*t+.9503041*r)/mt.Zn)]},Nt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=yt(e,"rgb"),n=r[0],a=r[1],o=r[2],f=Mt(n,a,o),u=f[0],c=f[1],i=116*c-16;return[i<0?0:i,500*(u-c),200*(c-f[2])]},_t=vt,Et=l.unpack,Ct=Math.pow,St=function(e){return 255*(e<=.00304?12.92*e:1.055*Ct(e,1/2.4)-.055)},Lt=function(e){return e>_t.t1?e*e*e:_t.t2*(e-_t.t0)},Ot=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=Et(e,"lab"))[0],f=e[1],u=e[2];return n=(o+16)/116,r=isNaN(f)?n:n+f/500,a=isNaN(u)?n:n-u/200,n=_t.Yn*Lt(n),r=_t.Xn*Lt(r),a=_t.Zn*Lt(a),[St(3.2404542*r-1.5371385*n-.4985314*a),St(-.969266*r+1.8760108*n+.041556*a),St(.0556434*r-.2040259*n+1.0572252*a),e.length>3?e[3]:1]},At=l.unpack,Pt=l.type,It=y,Dt=v,Rt=s,qt=Nt;Dt.prototype.lab=function(){return qt(this._rgb)},It.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Dt,[null].concat(e,["lab"])))},Rt.format.lab=Ot,Rt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=At(e,"lab"),"array"===Pt(e)&&3===e.length)return"lab"}});var jt=l.unpack,Ft=l.RAD2DEG,Bt=Math.sqrt,Tt=Math.atan2,Gt=Math.round,zt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=jt(e,"lab"),n=r[0],a=r[1],o=r[2],f=Bt(a*a+o*o),u=(Tt(o,a)*Ft+360)%360;return 0===Gt(1e4*f)&&(u=Number.NaN),[n,f,u]},Yt=l.unpack,Ut=Nt,Vt=zt,$t=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Yt(e,"rgb"),n=r[0],a=r[1],o=r[2],f=Ut(n,a,o),u=f[0],c=f[1],i=f[2];return Vt(u,c,i)},Xt=l.unpack,Jt=l.DEG2RAD,Kt=Math.sin,Wt=Math.cos,Ht=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Xt(e,"lch"),n=r[0],a=r[1],o=r[2];return isNaN(o)&&(o=0),[n,Wt(o*=Jt)*a,Kt(o)*a]},Zt=l.unpack,Qt=Ht,er=Ot,tr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=Zt(e,"lch"))[0],n=e[1],a=e[2],o=Qt(r,n,a),f=o[0],u=o[1],c=o[2],i=er(f,u,c);return[i[0],i[1],i[2],e.length>3?e[3]:1]},rr=l.unpack,nr=tr,ar=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=rr(e,"hcl").reverse();return nr.apply(void 0,r)},or=l.unpack,fr=l.type,ur=y,cr=v,ir=s,lr=$t;cr.prototype.lch=function(){return lr(this._rgb)},cr.prototype.hcl=function(){return lr(this._rgb).reverse()},ur.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(cr,[null].concat(e,["lch"])))},ur.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(cr,[null].concat(e,["hcl"])))},ir.format.lch=tr,ir.format.hcl=ar,["lch","hcl"].forEach((function(e){return ir.autodetect.push({p:2,test:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(t=or(t,e),"array"===fr(t)&&3===t.length)return e}})}));var sr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},dr=s,hr=l.type,pr=sr,br=Se,gr=_e;v.prototype.name=function(){for(var e=gr(this._rgb,"rgb"),t=0,r=Object.keys(pr);t0;)t[r]=arguments[r+1];if(!t.length&&"string"===hr(e)&&pr[e.toLowerCase()])return"named"}});var vr=l.unpack,mr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=vr(e,"rgb");return(r[0]<<16)+(r[1]<<8)+r[2]},yr=l.type,wr=y,kr=v,xr=s,Mr=l.type,Nr=mr;kr.prototype.num=function(){return Nr(this._rgb)},wr.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(kr,[null].concat(e,["num"])))},xr.format.num=function(e){if("number"==yr(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},xr.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Mr(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var _r=y,Er=v,Cr=s,Sr=l.unpack,Lr=l.type,Or=Math.round;Er.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Or)},Er.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,r){return r<3?!1===e?t:Or(t):t}))},_r.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Er,[null].concat(e,["rgb"])))},Cr.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Sr(e,"rgba");return void 0===r[3]&&(r[3]=1),r},Cr.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Sr(e,"rgba"),"array"===Lr(e)&&(3===e.length||4===e.length&&"number"==Lr(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var Ar=Math.log,Pr=function(e){var t,r,n,a=e/100;return a<66?(t=255,r=a<6?0:-155.25485562709179-.44596950469579133*(r=a-2)+104.49216199393888*Ar(r),n=a<20?0:.8274096064007395*(n=a-10)-254.76935184120902+115.67994401066147*Ar(n)):(t=351.97690566805693+.114206453784165*(t=a-55)-40.25366309332127*Ar(t),r=325.4494125711974+.07943456536662342*(r=a-50)-28.0852963507957*Ar(r),n=255),[t,r,n,1]},Ir=Pr,Dr=l.unpack,Rr=Math.round,qr=y,jr=v,Fr=s,Br=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r,n=Dr(e,"rgb"),a=n[0],o=n[2],f=1e3,u=4e4;u-f>.4;){var c=Ir(r=.5*(u+f));c[2]/c[0]>=o/a?u=r:f=r}return Rr(r)};jr.prototype.temp=jr.prototype.kelvin=jr.prototype.temperature=function(){return Br(this._rgb)},qr.temp=qr.kelvin=qr.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(jr,[null].concat(e,["temp"])))},Fr.format.temp=Fr.format.kelvin=Fr.format.temperature=Pr;var Tr=l.unpack,Gr=Math.cbrt,zr=Math.pow,Yr=Math.sign,Ur=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Tr(e,"rgb"),n=r[0],a=r[1],o=r[2],f=[Vr(n/255),Vr(a/255),Vr(o/255)],u=f[0],c=f[1],i=f[2],l=Gr(.4122214708*u+.5363325363*c+.0514459929*i),s=Gr(.2119034982*u+.6806995451*c+.1073969566*i),d=Gr(.0883024619*u+.2817188376*c+.6299787005*i);return[.2104542553*l+.793617785*s-.0040720468*d,1.9779984951*l-2.428592205*s+.4505937099*d,.0259040371*l+.7827717662*s-.808675766*d]};function Vr(e){var t=Math.abs(e);return t<.04045?e/12.92:(Yr(e)||1)*zr((t+.055)/1.055,2.4)}var $r=l.unpack,Xr=Math.pow,Jr=Math.sign,Kr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=$r(e,"lab"))[0],n=e[1],a=e[2],o=Xr(r+.3963377774*n+.2158037573*a,3),f=Xr(r-.1055613458*n-.0638541728*a,3),u=Xr(r-.0894841775*n-1.291485548*a,3);return[255*Wr(4.0767416621*o-3.3077115913*f+.2309699292*u),255*Wr(-1.2684380046*o+2.6097574011*f-.3413193965*u),255*Wr(-.0041960863*o-.7034186147*f+1.707614701*u),e.length>3?e[3]:1]};function Wr(e){var t=Math.abs(e);return t>.0031308?(Jr(e)||1)*(1.055*Xr(t,1/2.4)-.055):12.92*e}var Hr=l.unpack,Zr=l.type,Qr=y,en=v,tn=s,rn=Ur;en.prototype.oklab=function(){return rn(this._rgb)},Qr.oklab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(en,[null].concat(e,["oklab"])))},tn.format.oklab=Kr,tn.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Hr(e,"oklab"),"array"===Zr(e)&&3===e.length)return"oklab"}});var nn=l.unpack,an=Ur,on=zt,fn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=nn(e,"rgb"),n=r[0],a=r[1],o=r[2],f=an(n,a,o),u=f[0],c=f[1],i=f[2];return on(u,c,i)},un=l.unpack,cn=Ht,ln=Kr,sn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=un(e,"lch"))[0],n=e[1],a=e[2],o=cn(r,n,a),f=o[0],u=o[1],c=o[2],i=ln(f,u,c);return[i[0],i[1],i[2],e.length>3?e[3]:1]},dn=l.unpack,hn=l.type,pn=y,bn=v,gn=s,vn=fn;bn.prototype.oklch=function(){return vn(this._rgb)},pn.oklch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(bn,[null].concat(e,["oklch"])))},gn.format.oklch=sn,gn.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=dn(e,"oklch"),"array"===hn(e)&&3===e.length)return"oklch"}});var mn=v,yn=l.type;mn.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===yn(e)?t?(this._rgb[3]=e,this):new mn([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},v.prototype.clipped=function(){return this._rgb._clipped||!1};var wn=v,kn=vt;wn.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=kn.Kn*e,new wn(t,"lab").alpha(this.alpha(),!0)},wn.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},wn.prototype.darker=wn.prototype.darken,wn.prototype.brighter=wn.prototype.brighten,v.prototype.get=function(e){var t=e.split("."),r=t[0],n=t[1],a=this[r]();if(n){var o=r.indexOf(n)-("ok"===r.substr(0,2)?2:0);if(o>-1)return a[o];throw new Error("unknown channel "+n+" in mode "+r)}return a};var xn=v,Mn=l.type,Nn=Math.pow;xn.prototype.luminance=function(e){if(void 0!==e&&"number"===Mn(e)){if(0===e)return new xn([0,0,0,this._rgb[3]],"rgb");if(1===e)return new xn([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),r=20,n=function(t,a){var o=t.interpolate(a,.5,"rgb"),f=o.luminance();return Math.abs(e-f)<1e-7||!r--?o:f>e?n(t,o):n(o,a)},a=(t>e?n(new xn([0,0,0]),this):n(this,new xn([255,255,255]))).rgb();return new xn(a.concat([this._rgb[3]]))}return _n.apply(void 0,this._rgb.slice(0,3))};var _n=function(e,t,r){return.2126*(e=En(e))+.7152*(t=En(t))+.0722*En(r)},En=function(e){return(e/=255)<=.03928?e/12.92:Nn((e+.055)/1.055,2.4)},Cn={},Sn=v,Ln=l.type,On=Cn,An=function(e,t,r){void 0===r&&(r=.5);for(var n=[],a=arguments.length-3;a-- >0;)n[a]=arguments[a+3];var o=n[0]||"lrgb";if(On[o]||n.length||(o=Object.keys(On)[0]),!On[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==Ln(e)&&(e=new Sn(e)),"object"!==Ln(t)&&(t=new Sn(t)),On[o](e,t,r).alpha(e.alpha()+r*(t.alpha()-e.alpha()))},Pn=v,In=An;Pn.prototype.mix=Pn.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return In.apply(void 0,[this,e,t].concat(r))};var Dn=v;Dn.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,r=t[3];return e?(this._rgb=[t[0]*r,t[1]*r,t[2]*r,r],this):new Dn([t[0]*r,t[1]*r,t[2]*r,r],"rgb")};var Rn=v,qn=vt;Rn.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=qn.Kn*e,t[1]<0&&(t[1]=0),new Rn(t,"lch").alpha(this.alpha(),!0)},Rn.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var jn=v,Fn=l.type;jn.prototype.set=function(e,t,r){void 0===r&&(r=!1);var n=e.split("."),a=n[0],o=n[1],f=this[a]();if(o){var u=a.indexOf(o)-("ok"===a.substr(0,2)?2:0);if(u>-1){if("string"==Fn(t))switch(t.charAt(0)){case"+":case"-":f[u]+=+t;break;case"*":f[u]*=+t.substr(1);break;case"/":f[u]/=+t.substr(1);break;default:f[u]=+t}else{if("number"!==Fn(t))throw new Error("unsupported value for Color.set");f[u]=t}var c=new jn(f,a);return r?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+o+" in mode "+a)}return f};var Bn=v;Cn.rgb=function(e,t,r){var n=e._rgb,a=t._rgb;return new Bn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"rgb")};var Tn=v,Gn=Math.sqrt,zn=Math.pow;Cn.lrgb=function(e,t,r){var n=e._rgb,a=n[0],o=n[1],f=n[2],u=t._rgb,c=u[0],i=u[1],l=u[2];return new Tn(Gn(zn(a,2)*(1-r)+zn(c,2)*r),Gn(zn(o,2)*(1-r)+zn(i,2)*r),Gn(zn(f,2)*(1-r)+zn(l,2)*r),"rgb")};var Yn=v;Cn.lab=function(e,t,r){var n=e.lab(),a=t.lab();return new Yn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"lab")};var Un=v,Vn=function(e,t,r,n){var a,o,f,u,c,i,l,s,d,h,p,b,g;return"hsl"===n?(f=e.hsl(),u=t.hsl()):"hsv"===n?(f=e.hsv(),u=t.hsv()):"hcg"===n?(f=e.hcg(),u=t.hcg()):"hsi"===n?(f=e.hsi(),u=t.hsi()):"lch"===n||"hcl"===n?(n="hcl",f=e.hcl(),u=t.hcl()):"oklch"===n&&(f=e.oklch().reverse(),u=t.oklch().reverse()),"h"!==n.substr(0,1)&&"oklch"!==n||(c=(a=f)[0],l=a[1],d=a[2],i=(o=u)[0],s=o[1],h=o[2]),isNaN(c)||isNaN(i)?isNaN(c)?isNaN(i)?b=Number.NaN:(b=i,1!=d&&0!=d||"hsv"==n||(p=s)):(b=c,1!=h&&0!=h||"hsv"==n||(p=l)):b=c+r*(i>c&&i-c>180?i-(c+360):i180?i+360-c:i-c),void 0===p&&(p=l+r*(s-l)),g=d+r*(h-d),new Un("oklch"===n?[g,p,b]:[b,p,g],n)},$n=Vn,Xn=function(e,t,r){return $n(e,t,r,"lch")};Cn.lch=Xn,Cn.hcl=Xn;var Jn=v;Cn.num=function(e,t,r){var n=e.num(),a=t.num();return new Jn(n+r*(a-n),"num")};var Kn=Vn;Cn.hcg=function(e,t,r){return Kn(e,t,r,"hcg")};var Wn=Vn;Cn.hsi=function(e,t,r){return Wn(e,t,r,"hsi")};var Hn=Vn;Cn.hsl=function(e,t,r){return Hn(e,t,r,"hsl")};var Zn=Vn;Cn.hsv=function(e,t,r){return Zn(e,t,r,"hsv")};var Qn=v;Cn.oklab=function(e,t,r){var n=e.oklab(),a=t.oklab();return new Qn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"oklab")};var ea=Vn;Cn.oklch=function(e,t,r){return ea(e,t,r,"oklch")};var ta=v,ra=l.clip_rgb,na=Math.pow,aa=Math.sqrt,oa=Math.PI,fa=Math.cos,ua=Math.sin,ca=Math.atan2,ia=function(e,t){for(var r=e.length,n=[0,0,0,0],a=0;a.9999999&&(n[3]=1),new ta(ra(n))},la=y,sa=l.type,da=Math.pow,ha=function(e){var t="rgb",r=la("#ccc"),n=0,a=[0,1],o=[],f=[0,0],u=!1,c=[],i=!1,l=0,s=1,d=!1,h={},p=!0,b=1,g=function(e){if((e=e||["#fff","#000"])&&"string"===sa(e)&&la.brewer&&la.brewer[e.toLowerCase()]&&(e=la.brewer[e.toLowerCase()]),"array"===sa(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t2?function(e){if(null!=u){for(var t=u.length-1,r=0;r=u[r];)r++;return r-1}return 0}(e)/(u.length-2):s!==l?(e-l)/(s-l):1,i=m(i),n||(i=v(i)),1!==b&&(i=da(i,b)),i=f[0]+i*(1-f[0]-f[1]),i=Math.min(1,Math.max(0,i));var d=Math.floor(1e4*i);if(p&&h[d])a=h[d];else{if("array"===sa(c))for(var g=0;g=y&&g===o.length-1){a=c[g];break}if(i>y&&i2){var i=e.map((function(t,r){return r/(e.length-1)})),d=e.map((function(e){return(e-l)/(s-l)}));d.every((function(e,t){return i[t]===e}))||(m=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=d[t+1];)t++;var r=(e-d[t])/(d[t+1]-d[t]);return i[t]+r*(i[t+1]-i[t])})}}return a=[l,s],k},k.mode=function(e){return arguments.length?(t=e,w(),k):t},k.range=function(e,t){return g(e),k},k.out=function(e){return i=e,k},k.spread=function(e){return arguments.length?(n=e,k):n},k.correctLightness=function(e){return null==e&&(e=!0),d=e,w(),v=d?function(e){for(var t=y(0,!0).lab()[0],r=y(1,!0).lab()[0],n=t>r,a=y(e,!0).lab()[0],o=t+(r-t)*e,f=a-o,u=0,c=1,i=20;Math.abs(f)>.01&&i-- >0;)n&&(f*=-1),f<0?(u=e,e+=.5*(c-e)):(c=e,e+=.5*(u-e)),f=(a=y(e,!0).lab()[0])-o;return e}:function(e){return e},k},k.padding=function(e){return null!=e?("number"===sa(e)&&(e=[e,e]),f=e,k):f},k.colors=function(t,r){arguments.length<2&&(r="hex");var n=[];if(0===arguments.length)n=c.slice(0);else if(1===t)n=[k(.5)];else if(t>1){var o=a[0],f=a[1]-o;n=function(e,t,r){for(var n=[],a=eo;a?f++:f--)n.push(f);return n}(0,t,!1).map((function(e){return k(o+e/(t-1)*f)}))}else{e=[];var i=[];if(u&&u.length>2)for(var l=1,s=u.length,d=1<=s;d?ls;d?l++:l--)i.push(.5*(u[l-1]+u[l]));else i=a;n=i.map((function(e){return k(e)}))}return la[r]&&(n=n.map((function(e){return e[r]()}))),n},k.cache=function(e){return null!=e?(p=e,k):p},k.gamma=function(e){return null!=e?(b=e,k):b},k.nodata=function(e){return null!=e?(r=la(e),k):r},k};var pa=v,ba=ha,ga=y,va=function(e,t,r){if(!va[r])throw new Error("unknown blend mode "+r);return va[r](e,t)},ma=function(e){return function(t,r){var n=ga(r).rgb(),a=ga(t).rgb();return ga.rgb(e(n,a))}},ya=function(e){return function(t,r){var n=[];return n[0]=e(t[0],r[0]),n[1]=e(t[1],r[1]),n[2]=e(t[2],r[2]),n}};va.normal=ma(ya((function(e){return e}))),va.multiply=ma(ya((function(e,t){return e*t/255}))),va.screen=ma(ya((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),va.overlay=ma(ya((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),va.darken=ma(ya((function(e,t){return e>t?t:e}))),va.lighten=ma(ya((function(e,t){return e>t?e:t}))),va.dodge=ma(ya((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),va.burn=ma(ya((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var wa=va,ka=l.type,xa=l.clip_rgb,Ma=l.TWOPI,Na=Math.pow,_a=Math.sin,Ea=Math.cos,Ca=y,Sa=v,La=Math.floor,Oa=Math.random,Aa=f,Pa=Math.log,Ia=Math.pow,Da=Math.floor,Ra=Math.abs,qa=function(e,t){void 0===t&&(t=null);var r={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Aa(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===Aa(e)&&(e=e[t]),null==e||isNaN(e)||(r.values.push(e),r.sum+=e,er.max&&(r.max=e),r.count+=1)})),r.domain=[r.min,r.max],r.limits=function(e,t){return ja(r,e,t)},r},ja=function(e,t,r){void 0===t&&(t="equal"),void 0===r&&(r=7),"array"==Aa(e)&&(e=qa(e));var n=e.min,a=e.max,o=e.values.sort((function(e,t){return e-t}));if(1===r)return[n,a];var f=[];if("c"===t.substr(0,1)&&(f.push(n),f.push(a)),"e"===t.substr(0,1)){f.push(n);for(var u=1;u 0");var c=Math.LOG10E*Pa(n),i=Math.LOG10E*Pa(a);f.push(n);for(var l=1;l200&&(y=!1)}for(var R={},q=0;q=360;)p-=360;f[h]=p}else f[h]=f[h]/u[h];return d/=n,new ta(f,t).alpha(d>.99999?1:d,!0)},uo.bezier=function(e){var t=function(e){var t,r,n,a,o,f,u;if(2===(e=e.map((function(e){return new pa(e)}))).length)t=e.map((function(e){return e.lab()})),o=t[0],f=t[1],a=function(e){var t=[0,1,2].map((function(t){return o[t]+e*(f[t]-o[t])}));return new pa(t,"lab")};else if(3===e.length)r=e.map((function(e){return e.lab()})),o=r[0],f=r[1],u=r[2],a=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*o[t]+2*(1-e)*e*f[t]+e*e*u[t]}));return new pa(t,"lab")};else if(4===e.length){var c;n=e.map((function(e){return e.lab()})),o=n[0],f=n[1],u=n[2],c=n[3],a=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*o[t]+3*(1-e)*(1-e)*e*f[t]+3*(1-e)*e*e*u[t]+e*e*e*c[t]}));return new pa(t,"lab")}}else{if(!(e.length>=5))throw new RangeError("No point in running bezier with only one color.");var i,l,s;i=e.map((function(e){return e.lab()})),s=e.length-1,l=function(e){for(var t=[1,1],r=1;rn?(r+.05)/(n+.05):(n+.05)/(r+.05)},uo.deltaE=function(e,t,r,n,a){void 0===r&&(r=1),void 0===n&&(n=1),void 0===a&&(a=1);var o=function(e){return 360*e/(2*Wa)},f=function(e){return 2*Wa*e/360};e=new Ta(e),t=new Ta(t);var u=Array.from(e.lab()),c=u[0],i=u[1],l=u[2],s=Array.from(t.lab()),d=s[0],h=s[1],p=s[2],b=(c+d)/2,g=(Ga(za(i,2)+za(l,2))+Ga(za(h,2)+za(p,2)))/2,v=.5*(1-Ga(za(g,7)/(za(g,7)+za(25,7)))),m=i*(1+v),y=h*(1+v),w=Ga(za(m,2)+za(l,2)),k=Ga(za(y,2)+za(p,2)),x=(w+k)/2,M=o(Va(l,m)),N=o(Va(p,y)),_=M>=0?M:M+360,E=N>=0?N:N+360,C=$a(_-E)>180?(_+E+360)/2:(_+E)/2,S=1-.17*Xa(f(C-30))+.24*Xa(f(2*C))+.32*Xa(f(3*C+6))-.2*Xa(f(4*C-63)),L=E-_;L=$a(L)<=180?L:E<=_?L+360:L-360,L=2*Ga(w*k)*Ja(f(L)/2);var O=d-c,A=k-w,P=1+.015*za(b-50,2)/Ga(20+za(b-50,2)),I=1+.045*x,D=1+.015*x*S,R=30*Ka(-za((C-275)/25,2)),q=-2*Ga(za(x,7)/(za(x,7)+za(25,7)))*Ja(2*f(R)),j=Ga(za(O/(r*P),2)+za(A/(n*I),2)+za(L/(a*D),2)+q*(A/(n*I))*(L/(a*D)));return Ua(0,Ya(100,j))},uo.distance=function(e,t,r){void 0===r&&(r="lab"),e=new Ha(e),t=new Ha(t);var n=e.get(r),a=t.get(r),o=0;for(var f in n){var u=(n[f]||0)-(a[f]||0);o+=u*u}return Math.sqrt(o)},uo.limits=Fa.limits,uo.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(Za,[null].concat(e))),!0}catch(e){return!1}},uo.scales=to,uo.colors=sr,uo.brewer=fo,uo}()}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=r(768),t=r.n(e),n=function(e){return e.rgb().join(", ")},a=function(e){return"rgb("+e.rgb().join(", ")+")"},o=function(e){var r,o=e[0];if(o.startsWith("PS1=")){var f=o.slice(4).trim();return document.querySelectorAll(".system-prompt").forEach((function(e){e.textContent=f})),r=f,localStorage.setItem("PS1",r),"Prompt character changed to ".concat(f)}if(o.startsWith("ACCENT_COLOR=")){var u=e.join(" ").slice(13).trim();return function(e){try{if(c=e,!t().valid(c))return!1;var r=function(e){var t=e.luminance();t<.15?e=e.luminance(.15):t>.85&&(e=e.luminance(.85));var r=e.get("hsl.s");return e.set("hsl.s",Math.min(r,.85))}(t()(e)),o=function(e){if(0===e.get("hsl.s")){var r=["#00796b","#00acc1","#1976d2","#2196f3"];return t()(r[Math.floor(Math.random()*r.length)]).set("hsl.s",1)}var n=e.set("hsl.s",1);if(n.set("hsl.l",.5),t().contrast(n,e)>=1.75)return n;for(var a=1;a<=20;a++){var o=n.set("hsl.l",n.get("hsl.l")+.05*a);if(t().contrast(o,e)>=1.75)return o}return n}(r),f=function(e){return e.luminance()<.95?e.brighten(.5):e.darken(.05)}(r),u=function(e){return e.get("hsl.s")<.2}(o)?"underline":"none";return function(e,t,r,n){localStorage.setItem("ACCENT_COLOR",a(e)),localStorage.setItem("LINK_COLOR",a(t)),localStorage.setItem("LINK_COLOR_HOVER",a(r)),localStorage.setItem("LINK_DECORATION",n)}(r,o,f,u),function(e,t,r,o){document.documentElement.style.setProperty("--accent-color-base",n(e)),document.documentElement.style.setProperty("--accent-color-link",a(t)),document.documentElement.style.setProperty("--accent-color-link-hover",a(r)),document.documentElement.style.setProperty("--link-decoration",o)}(r,o,f,u),!0}catch(e){return console.error(e),!1}var c}(u)?"Accent changed to ".concat(u):"Invalid color. Please provide: #000000, rgb(0, 0, 0) or any valid css color."}return"Invalid export command. Usage: export PS1=$, export ACCENT_COLOR=#"},f=function(){var e=Math.floor(Math.random()*i.length);return i[e]},u={clear:{execute:function(e){for(var t=document.querySelector(".stdout-log");null==t?void 0:t.firstChild;)t.removeChild(t.firstChild);return"Console cleared"},description:"Clears the terminal screen",flags:{}},echo:{execute:function(e){return t=e.join(" "),(r=document.createElement("div")).classList.add("oval"),r.innerText=t,r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.zIndex="500",r.style.left="50px",r.style.top="50px",document.body.appendChild(r),r.classList.add("oval-animate"),r.addEventListener("animationend",(function(){document.body.removeChild(r)})),"Echo effect triggered for ".concat(e.join(" "));var t,r},description:"Prints back the input received",flags:{}},ls:{execute:function(e){return"file1.txt\nfile2.txt\nfile3.txt"},description:"Lists all available files",flags:{}},about:{execute:function(e){return'I’m a passionate software engineer dedicated to crafting interfaces that delight users and make a difference. Currently, I’m a Software Engineer at JupiterOne , where I advocate for user experience and get to build impactful features every day.'},description:"Displays about information",flags:{}},help:{execute:function(e){for(var t="Available commands:\n",r=0,n=Object.entries(u);r")},description:"Shows help information about all commands",flags:{}},date:{execute:function(e){return(new Date).toString()},description:"Displays the current date and time",flags:{}},whoami:{execute:function(e){return"Karson, Frontend Developer"},description:"Displays user information",flags:{}},skills:{execute:function(e){return e.includes("--languages")?"TypeScript, JavaScript, CSS":e.includes("-l")?"Frontend Development, React, UX Design, TypeScript, JavaScript, Node A11y, Agile, User-Centered Design":"Frontend Development, React, UX Design, TypeScript, JavaScript"},description:"Lists all my skills",flags:{"--languages":"Lists programming languages I know","-l":"Lists all my skills"}},projects:{execute:function(e){return"Projects: "},description:"Lists all my projects",flags:{}},education:{execute:function(e){return'B.S. Digital Marketing, Utah Valley University (2010 - 2014)\n Software Engineering Immersive Flatiron School (2017)\n '},description:"Displays my educational background",flags:{}},experience:{execute:function(e){return'Software Engineer, Applications, JupiterOne (October 2021 - Present)\n Natural Language Querying\n − Designed and developed the integration of generative AI into our search experience, converting natural language to our query language. Resulted in one of our highest adoption rates and helped accelerate platform time-to-value.\n − Implemented a vector database embedding cache, improving query response times and reducing operational costs.\n − Implemented Natural Language Processing (NLP) techniques including fuzzy matching and stop word filtering to enhance search precision.\n\n Design System Development\n − Spearheaded the development of JupiterOne’s design system, including creation of a comprehensive component library, design tokens, and theming system. Helping to streamline the development process and enabling engineers to focus on core feature development.\n − Crafted standardized-yet-customizable component APIs through a mix of composability, customization, and "component slots". Balanced flexibility with ease-of-use, allowing for customization without excessive rigidity. Leveraged standard naming conventions and JSDoc for streamlined development.\n '},description:"Displays my work experience",flags:{}},export:{execute:o,description:"Exports a variable",flags:{}},restore:{execute:function(e){var t=localStorage.getItem("PS1");t&&o(["PS1="+t]);var r=localStorage.getItem("ACCENT_COLOR");return r&&o(["ACCENT_COLOR="+r]),"Restored terminal settings"},description:"Restores terminal settings",flags:{}}},c={cd:{execute:f},rm:{execute:f},sudo:{execute:f},mv:{execute:f},chmod:{execute:f},chown:{execute:f},mkdir:{execute:f},ls:{execute:f},cat:{execute:f},ps:{execute:f},top:{execute:f},vi:{execute:f},nano:{execute:f},exit:{execute:f},man:{execute:f},grep:{execute:f},find:{execute:f},pwd:{execute:f},df:{execute:f},du:{execute:f},curl:{execute:f},wget:{execute:f},ping:{execute:f},ifconfig:{execute:f}},i=["Nice try, but this isn't a real terminal!","You're not fooling anyone.","Did you really think that would work?","You must think you're pretty clever, huh?","You must be new here.","I'm sorry, Dave. I'm afraid I can't do that.","You must be mistaken, this isn't a real terminal.","That command is about as useful here as a chocolate teapot."],l=function(){function e(e,t,r){this.prompt=e,this.terminal=t,this.mirrorElement=r,this.initialize()}return e.prototype.createRipple=function(){var e=document.querySelector(".ripple-container"),t=1.1*Math.max(e.offsetWidth,e.offsetHeight),r=document.createElement("span");r.className="ripple",r.style.setProperty("--ripple-size","".concat(t,"px")),e.appendChild(r),r.addEventListener("animationend",(function(){r.remove()}))},e.prototype.setPromptValue=function(e){this.prompt.value=e,this.mirrorElement.textContent=e},e.prototype.handleBashCommand=function(e,t){void 0===t&&(t=!0),t&&this.createRipple();var r,n,a=e.split(" "),o=(r=a[0],n=a.slice(1),r in c?c[r].execute(n):r in u?u[r].execute(n):"Command not found: ".concat(r)).replace(/\n/g,"
");this.setPromptValue(""),t&&this.addToStdoutLog(e,o)},e.prototype.addToStdoutLog=function(e,t){var r,n=document.querySelector(".tab-panels").querySelector(".stdout-log"),a=document.createElement("li");a.innerHTML='\n
\n
\n '.concat(e,'\n
').concat(t,"
\n
\n
\n "),n.insertBefore(a,n.firstChild);var o=null===(r=document.querySelector('button[role="tab"][aria-selected="true"]'))||void 0===r?void 0:r.id;o&&this.updateBadge("console"!==o)},e.prototype.updateBadge=function(e){var t=document.querySelector("#stdout").querySelector(".unread-badge");e&&t.classList.add("show")},e.prototype.switchTab=function(e){var t;if("stdout"===e){var r=null===(t=document.querySelector('button[role="tab"][aria-selected="true"]'))||void 0===t?void 0:t.id;r&&this.updateBadge("stdout"!==r)}},e.prototype.initialize=function(){var e=this;this.prompt.addEventListener("keydown",(function(t){"Enter"===t.key&&e.prompt.value.trim()&&(t.preventDefault(),e.handleBashCommand(e.prompt.value.trim()),e.setPromptValue(""))})),document.querySelectorAll(".tab").forEach((function(t){t.addEventListener("click",(function(t){var r,n=null===(r=t.target)||void 0===r?void 0:r.getAttribute("data-tab");n&&e.switchTab(n)}))})),this.terminal.addEventListener("click",(function(){e.prompt.focus()})),this.prompt.addEventListener("input",(function(t){var r=t.target;e.setPromptValue(r.value)})),window.addEventListener("executeCommand",(function(t){var r=t.detail.command;e.handleBashCommand(r)}))},e}(),s=document.querySelector(".prompt"),d=document.querySelector(".input-mirror"),h=new l(s,document.querySelector(".terminal"),d);document.addEventListener("DOMContentLoaded",(function(){h.handleBashCommand("restore",!1),h.handleBashCommand("help",!0)}))})()})(); \ No newline at end of file +/*! For license information please see home.js.LICENSE.txt */ +(()=>{var e={768:function(e){e.exports=function(){"use strict";for(var e=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),er?r:e},t=e,r={},n=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n255)&&(e._clipped=!0),e[r]=t(e[r],0,255)):3===r&&(e[r]=t(e[r],0,1));return e},limit:e,type:c,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==u(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==i(e[t])?e[t].toLowerCase():null},PI:f,TWOPI:2*f,PITHIRD:f/3,DEG2RAD:f/180,RAD2DEG:180/f},s={format:{},autodetect:[]},d=l.last,h=l.clip_rgb,p=l.type,b=s,g=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if("object"===p(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var n=d(e),a=!1;if(!n){a=!0,b.sorted||(b.autodetect=b.autodetect.sort((function(e,t){return t.p-e.p})),b.sorted=!0);for(var o=0,c=b.autodetect;o4?e[4]:1;return 1===o?[0,0,0,c]:[r>=1?0:255*(1-r)*(1-o),n>=1?0:255*(1-n)*(1-o),a>=1?0:255*(1-a)*(1-o),c]},_=y,E=v,S=s,A=l.unpack,C=l.type,L=x;E.prototype.cmyk=function(){return L(this._rgb)},_.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(E,[null].concat(e,["cmyk"])))},S.format.cmyk=N,S.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=A(e,"cmyk"),"array"===C(e)&&4===e.length)return"cmyk"}});var O=l.unpack,P=l.last,I=function(e){return Math.round(100*e)/100},q=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=O(e,"hsla"),n=P(e)||"lsa";return r[0]=I(r[0]||0),r[1]=I(100*r[1])+"%",r[2]=I(100*r[2])+"%","hsla"===n||r.length>3&&r[3]<1?(r[3]=r.length>3?r[3]:1,n="hsla"):r.length=3,n+"("+r.join(",")+")"},D=l.unpack,R=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=D(e,"rgba"))[0],n=e[1],a=e[2];r/=255,n/=255,a/=255;var o,c,u=Math.min(r,n,a),i=Math.max(r,n,a),f=(i+u)/2;return i===u?(o=0,c=Number.NaN):o=f<.5?(i-u)/(i+u):(i-u)/(2-i-u),r==i?c=(n-a)/(i-u):n==i?c=2+(a-r)/(i-u):a==i&&(c=4+(r-n)/(i-u)),(c*=60)<0&&(c+=360),e.length>3&&void 0!==e[3]?[c,o,f,e[3]]:[c,o,f]},j=l.unpack,F=l.last,B=q,T=R,G=Math.round,z=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=j(e,"rgba"),n=F(e)||"rgb";return"hsl"==n.substr(0,3)?B(T(r),n):(r[0]=G(r[0]),r[1]=G(r[1]),r[2]=G(r[2]),("rgba"===n||r.length>3&&r[3]<1)&&(r[3]=r.length>3?r[3]:1,n="rgba"),n+"("+r.slice(0,"rgb"===n?3:4).join(",")+")")},Y=l.unpack,U=Math.round,V=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];var n,a,o,c=(t=Y(t,"hsl"))[0],u=t[1],i=t[2];if(0===u)n=a=o=255*i;else{var f=[0,0,0],l=[0,0,0],s=i<.5?i*(1+u):i+u-i*u,d=2*i-s,h=c/360;f[0]=h+1/3,f[1]=h,f[2]=h-1/3;for(var p=0;p<3;p++)f[p]<0&&(f[p]+=1),f[p]>1&&(f[p]-=1),6*f[p]<1?l[p]=d+6*(s-d)*f[p]:2*f[p]<1?l[p]=s:3*f[p]<2?l[p]=d+(s-d)*(2/3-f[p])*6:l[p]=d;n=(e=[U(255*l[0]),U(255*l[1]),U(255*l[2])])[0],a=e[1],o=e[2]}return t.length>3?[n,a,o,t[3]]:[n,a,o,1]},$=V,H=s,X=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,J=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,K=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,W=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Z=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Q=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ee=Math.round,te=function(e){var t;if(e=e.toLowerCase().trim(),H.format.named)try{return H.format.named(e)}catch(e){}if(t=e.match(X)){for(var r=t.slice(1,4),n=0;n<3;n++)r[n]=+r[n];return r[3]=1,r}if(t=e.match(J)){for(var a=t.slice(1,5),o=0;o<4;o++)a[o]=+a[o];return a}if(t=e.match(K)){for(var c=t.slice(1,4),u=0;u<3;u++)c[u]=ee(2.55*c[u]);return c[3]=1,c}if(t=e.match(W)){for(var i=t.slice(1,5),f=0;f<3;f++)i[f]=ee(2.55*i[f]);return i[3]=+i[3],i}if(t=e.match(Z)){var l=t.slice(1,4);l[1]*=.01,l[2]*=.01;var s=$(l);return s[3]=1,s}if(t=e.match(Q)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var h=$(d);return h[3]=+t[4],h}};te.test=function(e){return X.test(e)||J.test(e)||K.test(e)||W.test(e)||Z.test(e)||Q.test(e)};var re=y,ne=v,ae=s,oe=l.type,ce=z,ue=te;ne.prototype.css=function(e){return ce(this._rgb,e)},re.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ne,[null].concat(e,["css"])))},ae.format.css=ue,ae.autodetect.push({p:5,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===oe(e)&&ue.test(e))return"css"}});var ie=v,fe=y,le=l.unpack;s.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=le(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r},fe.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ie,[null].concat(e,["gl"])))},ie.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var se=l.unpack,de=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=se(e,"rgb"),a=n[0],o=n[1],c=n[2],u=Math.min(a,o,c),i=Math.max(a,o,c),f=i-u,l=100*f/255,s=u/(255-f)*100;return 0===f?r=Number.NaN:(a===i&&(r=(o-c)/f),o===i&&(r=2+(c-a)/f),c===i&&(r=4+(a-o)/f),(r*=60)<0&&(r+=360)),[r,l,s]},he=l.unpack,pe=Math.floor,be=function(){for(var e,t,r,n,a,o,c=[],u=arguments.length;u--;)c[u]=arguments[u];var i,f,l,s=(c=he(c,"hcg"))[0],d=c[1],h=c[2];h*=255;var p=255*d;if(0===d)i=f=l=h;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var b=pe(s/=60),g=s-b,v=h*(1-d),m=v+p*(1-g),y=v+p*g,w=v+p;switch(b){case 0:i=(e=[w,y,v])[0],f=e[1],l=e[2];break;case 1:i=(t=[m,w,v])[0],f=t[1],l=t[2];break;case 2:i=(r=[v,w,y])[0],f=r[1],l=r[2];break;case 3:i=(n=[v,m,w])[0],f=n[1],l=n[2];break;case 4:i=(a=[y,v,w])[0],f=a[1],l=a[2];break;case 5:i=(o=[w,v,m])[0],f=o[1],l=o[2]}}return[i,f,l,c.length>3?c[3]:1]},ge=l.unpack,ve=l.type,me=y,ye=v,we=s,ke=de;ye.prototype.hcg=function(){return ke(this._rgb)},me.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ye,[null].concat(e,["hcg"])))},we.format.hcg=be,we.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ge(e,"hcg"),"array"===ve(e)&&3===e.length)return"hcg"}});var xe=l.unpack,Me=l.last,Ne=Math.round,_e=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=xe(e,"rgba"),n=r[0],a=r[1],o=r[2],c=r[3],u=Me(e)||"auto";void 0===c&&(c=1),"auto"===u&&(u=c<1?"rgba":"rgb");var i="000000"+((n=Ne(n))<<16|(a=Ne(a))<<8|(o=Ne(o))).toString(16);i=i.substr(i.length-6);var f="0"+Ne(255*c).toString(16);switch(f=f.substr(f.length-2),u.toLowerCase()){case"rgba":return"#"+i+f;case"argb":return"#"+f+i;default:return"#"+i}},Ee=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Se=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Ae=function(e){if(e.match(Ee)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(Se)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var r=parseInt(e,16);return[r>>24&255,r>>16&255,r>>8&255,Math.round((255&r)/255*100)/100]}throw new Error("unknown hex color: "+e)},Ce=y,Le=v,Oe=l.type,Pe=s,Ie=_e;Le.prototype.hex=function(e){return Ie(this._rgb,e)},Ce.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Le,[null].concat(e,["hex"])))},Pe.format.hex=Ae,Pe.autodetect.push({p:4,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===Oe(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var qe=l.unpack,De=l.TWOPI,Re=Math.min,je=Math.sqrt,Fe=Math.acos,Be=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=qe(e,"rgb"),a=n[0],o=n[1],c=n[2],u=Re(a/=255,o/=255,c/=255),i=(a+o+c)/3,f=i>0?1-u/i:0;return 0===f?r=NaN:(r=(a-o+(a-c))/2,r/=je((a-o)*(a-o)+(a-c)*(o-c)),r=Fe(r),c>o&&(r=De-r),r/=De),[360*r,f,i]},Te=l.unpack,Ge=l.limit,ze=l.TWOPI,Ye=l.PITHIRD,Ue=Math.cos,Ve=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=Te(e,"hsi"))[0],c=e[1],u=e[2];return isNaN(o)&&(o=0),isNaN(c)&&(c=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?n=1-((a=(1-c)/3)+(r=(1+c*Ue(ze*o)/Ue(Ye-ze*o))/3)):o<2/3?a=1-((r=(1-c)/3)+(n=(1+c*Ue(ze*(o-=1/3))/Ue(Ye-ze*o))/3)):r=1-((n=(1-c)/3)+(a=(1+c*Ue(ze*(o-=2/3))/Ue(Ye-ze*o))/3)),[255*(r=Ge(u*r*3)),255*(n=Ge(u*n*3)),255*(a=Ge(u*a*3)),e.length>3?e[3]:1]},$e=l.unpack,He=l.type,Xe=y,Je=v,Ke=s,We=Be;Je.prototype.hsi=function(){return We(this._rgb)},Xe.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Je,[null].concat(e,["hsi"])))},Ke.format.hsi=Ve,Ke.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=$e(e,"hsi"),"array"===He(e)&&3===e.length)return"hsi"}});var Ze=l.unpack,Qe=l.type,et=y,tt=v,rt=s,nt=R;tt.prototype.hsl=function(){return nt(this._rgb)},et.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(tt,[null].concat(e,["hsl"])))},rt.format.hsl=V,rt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ze(e,"hsl"),"array"===Qe(e)&&3===e.length)return"hsl"}});var at=l.unpack,ot=Math.min,ct=Math.max,ut=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=at(e,"rgb"))[0],c=e[1],u=e[2],i=ot(o,c,u),f=ct(o,c,u),l=f-i;return a=f/255,0===f?(r=Number.NaN,n=0):(n=l/f,o===f&&(r=(c-u)/l),c===f&&(r=2+(u-o)/l),u===f&&(r=4+(o-c)/l),(r*=60)<0&&(r+=360)),[r,n,a]},it=l.unpack,ft=Math.floor,lt=function(){for(var e,t,r,n,a,o,c=[],u=arguments.length;u--;)c[u]=arguments[u];var i,f,l,s=(c=it(c,"hsv"))[0],d=c[1],h=c[2];if(h*=255,0===d)i=f=l=h;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var p=ft(s/=60),b=s-p,g=h*(1-d),v=h*(1-d*b),m=h*(1-d*(1-b));switch(p){case 0:i=(e=[h,m,g])[0],f=e[1],l=e[2];break;case 1:i=(t=[v,h,g])[0],f=t[1],l=t[2];break;case 2:i=(r=[g,h,m])[0],f=r[1],l=r[2];break;case 3:i=(n=[g,v,h])[0],f=n[1],l=n[2];break;case 4:i=(a=[m,g,h])[0],f=a[1],l=a[2];break;case 5:i=(o=[h,g,v])[0],f=o[1],l=o[2]}}return[i,f,l,c.length>3?c[3]:1]},st=l.unpack,dt=l.type,ht=y,pt=v,bt=s,gt=ut;pt.prototype.hsv=function(){return gt(this._rgb)},ht.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(pt,[null].concat(e,["hsv"])))},bt.format.hsv=lt,bt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=st(e,"hsv"),"array"===dt(e)&&3===e.length)return"hsv"}});var vt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},mt=vt,yt=l.unpack,wt=Math.pow,kt=function(e){return(e/=255)<=.04045?e/12.92:wt((e+.055)/1.055,2.4)},xt=function(e){return e>mt.t3?wt(e,1/3):e/mt.t2+mt.t0},Mt=function(e,t,r){return e=kt(e),t=kt(t),r=kt(r),[xt((.4124564*e+.3575761*t+.1804375*r)/mt.Xn),xt((.2126729*e+.7151522*t+.072175*r)/mt.Yn),xt((.0193339*e+.119192*t+.9503041*r)/mt.Zn)]},Nt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=yt(e,"rgb"),n=r[0],a=r[1],o=r[2],c=Mt(n,a,o),u=c[0],i=c[1],f=116*i-16;return[f<0?0:f,500*(u-i),200*(i-c[2])]},_t=vt,Et=l.unpack,St=Math.pow,At=function(e){return 255*(e<=.00304?12.92*e:1.055*St(e,1/2.4)-.055)},Ct=function(e){return e>_t.t1?e*e*e:_t.t2*(e-_t.t0)},Lt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=Et(e,"lab"))[0],c=e[1],u=e[2];return n=(o+16)/116,r=isNaN(c)?n:n+c/500,a=isNaN(u)?n:n-u/200,n=_t.Yn*Ct(n),r=_t.Xn*Ct(r),a=_t.Zn*Ct(a),[At(3.2404542*r-1.5371385*n-.4985314*a),At(-.969266*r+1.8760108*n+.041556*a),At(.0556434*r-.2040259*n+1.0572252*a),e.length>3?e[3]:1]},Ot=l.unpack,Pt=l.type,It=y,qt=v,Dt=s,Rt=Nt;qt.prototype.lab=function(){return Rt(this._rgb)},It.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(qt,[null].concat(e,["lab"])))},Dt.format.lab=Lt,Dt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ot(e,"lab"),"array"===Pt(e)&&3===e.length)return"lab"}});var jt=l.unpack,Ft=l.RAD2DEG,Bt=Math.sqrt,Tt=Math.atan2,Gt=Math.round,zt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=jt(e,"lab"),n=r[0],a=r[1],o=r[2],c=Bt(a*a+o*o),u=(Tt(o,a)*Ft+360)%360;return 0===Gt(1e4*c)&&(u=Number.NaN),[n,c,u]},Yt=l.unpack,Ut=Nt,Vt=zt,$t=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Yt(e,"rgb"),n=r[0],a=r[1],o=r[2],c=Ut(n,a,o),u=c[0],i=c[1],f=c[2];return Vt(u,i,f)},Ht=l.unpack,Xt=l.DEG2RAD,Jt=Math.sin,Kt=Math.cos,Wt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Ht(e,"lch"),n=r[0],a=r[1],o=r[2];return isNaN(o)&&(o=0),[n,Kt(o*=Xt)*a,Jt(o)*a]},Zt=l.unpack,Qt=Wt,er=Lt,tr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=Zt(e,"lch"))[0],n=e[1],a=e[2],o=Qt(r,n,a),c=o[0],u=o[1],i=o[2],f=er(c,u,i);return[f[0],f[1],f[2],e.length>3?e[3]:1]},rr=l.unpack,nr=tr,ar=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=rr(e,"hcl").reverse();return nr.apply(void 0,r)},or=l.unpack,cr=l.type,ur=y,ir=v,fr=s,lr=$t;ir.prototype.lch=function(){return lr(this._rgb)},ir.prototype.hcl=function(){return lr(this._rgb).reverse()},ur.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ir,[null].concat(e,["lch"])))},ur.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ir,[null].concat(e,["hcl"])))},fr.format.lch=tr,fr.format.hcl=ar,["lch","hcl"].forEach((function(e){return fr.autodetect.push({p:2,test:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(t=or(t,e),"array"===cr(t)&&3===t.length)return e}})}));var sr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},dr=s,hr=l.type,pr=sr,br=Ae,gr=_e;v.prototype.name=function(){for(var e=gr(this._rgb,"rgb"),t=0,r=Object.keys(pr);t0;)t[r]=arguments[r+1];if(!t.length&&"string"===hr(e)&&pr[e.toLowerCase()])return"named"}});var vr=l.unpack,mr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=vr(e,"rgb");return(r[0]<<16)+(r[1]<<8)+r[2]},yr=l.type,wr=y,kr=v,xr=s,Mr=l.type,Nr=mr;kr.prototype.num=function(){return Nr(this._rgb)},wr.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(kr,[null].concat(e,["num"])))},xr.format.num=function(e){if("number"==yr(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},xr.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Mr(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var _r=y,Er=v,Sr=s,Ar=l.unpack,Cr=l.type,Lr=Math.round;Er.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Lr)},Er.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,r){return r<3?!1===e?t:Lr(t):t}))},_r.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Er,[null].concat(e,["rgb"])))},Sr.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Ar(e,"rgba");return void 0===r[3]&&(r[3]=1),r},Sr.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ar(e,"rgba"),"array"===Cr(e)&&(3===e.length||4===e.length&&"number"==Cr(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var Or=Math.log,Pr=function(e){var t,r,n,a=e/100;return a<66?(t=255,r=a<6?0:-155.25485562709179-.44596950469579133*(r=a-2)+104.49216199393888*Or(r),n=a<20?0:.8274096064007395*(n=a-10)-254.76935184120902+115.67994401066147*Or(n)):(t=351.97690566805693+.114206453784165*(t=a-55)-40.25366309332127*Or(t),r=325.4494125711974+.07943456536662342*(r=a-50)-28.0852963507957*Or(r),n=255),[t,r,n,1]},Ir=Pr,qr=l.unpack,Dr=Math.round,Rr=y,jr=v,Fr=s,Br=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r,n=qr(e,"rgb"),a=n[0],o=n[2],c=1e3,u=4e4;u-c>.4;){var i=Ir(r=.5*(u+c));i[2]/i[0]>=o/a?u=r:c=r}return Dr(r)};jr.prototype.temp=jr.prototype.kelvin=jr.prototype.temperature=function(){return Br(this._rgb)},Rr.temp=Rr.kelvin=Rr.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(jr,[null].concat(e,["temp"])))},Fr.format.temp=Fr.format.kelvin=Fr.format.temperature=Pr;var Tr=l.unpack,Gr=Math.cbrt,zr=Math.pow,Yr=Math.sign,Ur=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Tr(e,"rgb"),n=r[0],a=r[1],o=r[2],c=[Vr(n/255),Vr(a/255),Vr(o/255)],u=c[0],i=c[1],f=c[2],l=Gr(.4122214708*u+.5363325363*i+.0514459929*f),s=Gr(.2119034982*u+.6806995451*i+.1073969566*f),d=Gr(.0883024619*u+.2817188376*i+.6299787005*f);return[.2104542553*l+.793617785*s-.0040720468*d,1.9779984951*l-2.428592205*s+.4505937099*d,.0259040371*l+.7827717662*s-.808675766*d]};function Vr(e){var t=Math.abs(e);return t<.04045?e/12.92:(Yr(e)||1)*zr((t+.055)/1.055,2.4)}var $r=l.unpack,Hr=Math.pow,Xr=Math.sign,Jr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=$r(e,"lab"))[0],n=e[1],a=e[2],o=Hr(r+.3963377774*n+.2158037573*a,3),c=Hr(r-.1055613458*n-.0638541728*a,3),u=Hr(r-.0894841775*n-1.291485548*a,3);return[255*Kr(4.0767416621*o-3.3077115913*c+.2309699292*u),255*Kr(-1.2684380046*o+2.6097574011*c-.3413193965*u),255*Kr(-.0041960863*o-.7034186147*c+1.707614701*u),e.length>3?e[3]:1]};function Kr(e){var t=Math.abs(e);return t>.0031308?(Xr(e)||1)*(1.055*Hr(t,1/2.4)-.055):12.92*e}var Wr=l.unpack,Zr=l.type,Qr=y,en=v,tn=s,rn=Ur;en.prototype.oklab=function(){return rn(this._rgb)},Qr.oklab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(en,[null].concat(e,["oklab"])))},tn.format.oklab=Jr,tn.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Wr(e,"oklab"),"array"===Zr(e)&&3===e.length)return"oklab"}});var nn=l.unpack,an=Ur,on=zt,cn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=nn(e,"rgb"),n=r[0],a=r[1],o=r[2],c=an(n,a,o),u=c[0],i=c[1],f=c[2];return on(u,i,f)},un=l.unpack,fn=Wt,ln=Jr,sn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=un(e,"lch"))[0],n=e[1],a=e[2],o=fn(r,n,a),c=o[0],u=o[1],i=o[2],f=ln(c,u,i);return[f[0],f[1],f[2],e.length>3?e[3]:1]},dn=l.unpack,hn=l.type,pn=y,bn=v,gn=s,vn=cn;bn.prototype.oklch=function(){return vn(this._rgb)},pn.oklch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(bn,[null].concat(e,["oklch"])))},gn.format.oklch=sn,gn.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=dn(e,"oklch"),"array"===hn(e)&&3===e.length)return"oklch"}});var mn=v,yn=l.type;mn.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===yn(e)?t?(this._rgb[3]=e,this):new mn([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},v.prototype.clipped=function(){return this._rgb._clipped||!1};var wn=v,kn=vt;wn.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=kn.Kn*e,new wn(t,"lab").alpha(this.alpha(),!0)},wn.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},wn.prototype.darker=wn.prototype.darken,wn.prototype.brighter=wn.prototype.brighten,v.prototype.get=function(e){var t=e.split("."),r=t[0],n=t[1],a=this[r]();if(n){var o=r.indexOf(n)-("ok"===r.substr(0,2)?2:0);if(o>-1)return a[o];throw new Error("unknown channel "+n+" in mode "+r)}return a};var xn=v,Mn=l.type,Nn=Math.pow;xn.prototype.luminance=function(e){if(void 0!==e&&"number"===Mn(e)){if(0===e)return new xn([0,0,0,this._rgb[3]],"rgb");if(1===e)return new xn([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),r=20,n=function(t,a){var o=t.interpolate(a,.5,"rgb"),c=o.luminance();return Math.abs(e-c)<1e-7||!r--?o:c>e?n(t,o):n(o,a)},a=(t>e?n(new xn([0,0,0]),this):n(this,new xn([255,255,255]))).rgb();return new xn(a.concat([this._rgb[3]]))}return _n.apply(void 0,this._rgb.slice(0,3))};var _n=function(e,t,r){return.2126*(e=En(e))+.7152*(t=En(t))+.0722*En(r)},En=function(e){return(e/=255)<=.03928?e/12.92:Nn((e+.055)/1.055,2.4)},Sn={},An=v,Cn=l.type,Ln=Sn,On=function(e,t,r){void 0===r&&(r=.5);for(var n=[],a=arguments.length-3;a-- >0;)n[a]=arguments[a+3];var o=n[0]||"lrgb";if(Ln[o]||n.length||(o=Object.keys(Ln)[0]),!Ln[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==Cn(e)&&(e=new An(e)),"object"!==Cn(t)&&(t=new An(t)),Ln[o](e,t,r).alpha(e.alpha()+r*(t.alpha()-e.alpha()))},Pn=v,In=On;Pn.prototype.mix=Pn.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return In.apply(void 0,[this,e,t].concat(r))};var qn=v;qn.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,r=t[3];return e?(this._rgb=[t[0]*r,t[1]*r,t[2]*r,r],this):new qn([t[0]*r,t[1]*r,t[2]*r,r],"rgb")};var Dn=v,Rn=vt;Dn.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=Rn.Kn*e,t[1]<0&&(t[1]=0),new Dn(t,"lch").alpha(this.alpha(),!0)},Dn.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var jn=v,Fn=l.type;jn.prototype.set=function(e,t,r){void 0===r&&(r=!1);var n=e.split("."),a=n[0],o=n[1],c=this[a]();if(o){var u=a.indexOf(o)-("ok"===a.substr(0,2)?2:0);if(u>-1){if("string"==Fn(t))switch(t.charAt(0)){case"+":case"-":c[u]+=+t;break;case"*":c[u]*=+t.substr(1);break;case"/":c[u]/=+t.substr(1);break;default:c[u]=+t}else{if("number"!==Fn(t))throw new Error("unsupported value for Color.set");c[u]=t}var i=new jn(c,a);return r?(this._rgb=i._rgb,this):i}throw new Error("unknown channel "+o+" in mode "+a)}return c};var Bn=v;Sn.rgb=function(e,t,r){var n=e._rgb,a=t._rgb;return new Bn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"rgb")};var Tn=v,Gn=Math.sqrt,zn=Math.pow;Sn.lrgb=function(e,t,r){var n=e._rgb,a=n[0],o=n[1],c=n[2],u=t._rgb,i=u[0],f=u[1],l=u[2];return new Tn(Gn(zn(a,2)*(1-r)+zn(i,2)*r),Gn(zn(o,2)*(1-r)+zn(f,2)*r),Gn(zn(c,2)*(1-r)+zn(l,2)*r),"rgb")};var Yn=v;Sn.lab=function(e,t,r){var n=e.lab(),a=t.lab();return new Yn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"lab")};var Un=v,Vn=function(e,t,r,n){var a,o,c,u,i,f,l,s,d,h,p,b,g;return"hsl"===n?(c=e.hsl(),u=t.hsl()):"hsv"===n?(c=e.hsv(),u=t.hsv()):"hcg"===n?(c=e.hcg(),u=t.hcg()):"hsi"===n?(c=e.hsi(),u=t.hsi()):"lch"===n||"hcl"===n?(n="hcl",c=e.hcl(),u=t.hcl()):"oklch"===n&&(c=e.oklch().reverse(),u=t.oklch().reverse()),"h"!==n.substr(0,1)&&"oklch"!==n||(i=(a=c)[0],l=a[1],d=a[2],f=(o=u)[0],s=o[1],h=o[2]),isNaN(i)||isNaN(f)?isNaN(i)?isNaN(f)?b=Number.NaN:(b=f,1!=d&&0!=d||"hsv"==n||(p=s)):(b=i,1!=h&&0!=h||"hsv"==n||(p=l)):b=i+r*(f>i&&f-i>180?f-(i+360):f180?f+360-i:f-i),void 0===p&&(p=l+r*(s-l)),g=d+r*(h-d),new Un("oklch"===n?[g,p,b]:[b,p,g],n)},$n=Vn,Hn=function(e,t,r){return $n(e,t,r,"lch")};Sn.lch=Hn,Sn.hcl=Hn;var Xn=v;Sn.num=function(e,t,r){var n=e.num(),a=t.num();return new Xn(n+r*(a-n),"num")};var Jn=Vn;Sn.hcg=function(e,t,r){return Jn(e,t,r,"hcg")};var Kn=Vn;Sn.hsi=function(e,t,r){return Kn(e,t,r,"hsi")};var Wn=Vn;Sn.hsl=function(e,t,r){return Wn(e,t,r,"hsl")};var Zn=Vn;Sn.hsv=function(e,t,r){return Zn(e,t,r,"hsv")};var Qn=v;Sn.oklab=function(e,t,r){var n=e.oklab(),a=t.oklab();return new Qn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"oklab")};var ea=Vn;Sn.oklch=function(e,t,r){return ea(e,t,r,"oklch")};var ta=v,ra=l.clip_rgb,na=Math.pow,aa=Math.sqrt,oa=Math.PI,ca=Math.cos,ua=Math.sin,ia=Math.atan2,fa=function(e,t){for(var r=e.length,n=[0,0,0,0],a=0;a.9999999&&(n[3]=1),new ta(ra(n))},la=y,sa=l.type,da=Math.pow,ha=function(e){var t="rgb",r=la("#ccc"),n=0,a=[0,1],o=[],c=[0,0],u=!1,i=[],f=!1,l=0,s=1,d=!1,h={},p=!0,b=1,g=function(e){if((e=e||["#fff","#000"])&&"string"===sa(e)&&la.brewer&&la.brewer[e.toLowerCase()]&&(e=la.brewer[e.toLowerCase()]),"array"===sa(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t2?function(e){if(null!=u){for(var t=u.length-1,r=0;r=u[r];)r++;return r-1}return 0}(e)/(u.length-2):s!==l?(e-l)/(s-l):1,f=m(f),n||(f=v(f)),1!==b&&(f=da(f,b)),f=c[0]+f*(1-c[0]-c[1]),f=Math.min(1,Math.max(0,f));var d=Math.floor(1e4*f);if(p&&h[d])a=h[d];else{if("array"===sa(i))for(var g=0;g=y&&g===o.length-1){a=i[g];break}if(f>y&&f2){var f=e.map((function(t,r){return r/(e.length-1)})),d=e.map((function(e){return(e-l)/(s-l)}));d.every((function(e,t){return f[t]===e}))||(m=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=d[t+1];)t++;var r=(e-d[t])/(d[t+1]-d[t]);return f[t]+r*(f[t+1]-f[t])})}}return a=[l,s],k},k.mode=function(e){return arguments.length?(t=e,w(),k):t},k.range=function(e,t){return g(e),k},k.out=function(e){return f=e,k},k.spread=function(e){return arguments.length?(n=e,k):n},k.correctLightness=function(e){return null==e&&(e=!0),d=e,w(),v=d?function(e){for(var t=y(0,!0).lab()[0],r=y(1,!0).lab()[0],n=t>r,a=y(e,!0).lab()[0],o=t+(r-t)*e,c=a-o,u=0,i=1,f=20;Math.abs(c)>.01&&f-- >0;)n&&(c*=-1),c<0?(u=e,e+=.5*(i-e)):(i=e,e+=.5*(u-e)),c=(a=y(e,!0).lab()[0])-o;return e}:function(e){return e},k},k.padding=function(e){return null!=e?("number"===sa(e)&&(e=[e,e]),c=e,k):c},k.colors=function(t,r){arguments.length<2&&(r="hex");var n=[];if(0===arguments.length)n=i.slice(0);else if(1===t)n=[k(.5)];else if(t>1){var o=a[0],c=a[1]-o;n=function(e,t,r){for(var n=[],a=eo;a?c++:c--)n.push(c);return n}(0,t,!1).map((function(e){return k(o+e/(t-1)*c)}))}else{e=[];var f=[];if(u&&u.length>2)for(var l=1,s=u.length,d=1<=s;d?ls;d?l++:l--)f.push(.5*(u[l-1]+u[l]));else f=a;n=f.map((function(e){return k(e)}))}return la[r]&&(n=n.map((function(e){return e[r]()}))),n},k.cache=function(e){return null!=e?(p=e,k):p},k.gamma=function(e){return null!=e?(b=e,k):b},k.nodata=function(e){return null!=e?(r=la(e),k):r},k};var pa=v,ba=ha,ga=y,va=function(e,t,r){if(!va[r])throw new Error("unknown blend mode "+r);return va[r](e,t)},ma=function(e){return function(t,r){var n=ga(r).rgb(),a=ga(t).rgb();return ga.rgb(e(n,a))}},ya=function(e){return function(t,r){var n=[];return n[0]=e(t[0],r[0]),n[1]=e(t[1],r[1]),n[2]=e(t[2],r[2]),n}};va.normal=ma(ya((function(e){return e}))),va.multiply=ma(ya((function(e,t){return e*t/255}))),va.screen=ma(ya((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),va.overlay=ma(ya((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),va.darken=ma(ya((function(e,t){return e>t?t:e}))),va.lighten=ma(ya((function(e,t){return e>t?e:t}))),va.dodge=ma(ya((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),va.burn=ma(ya((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var wa=va,ka=l.type,xa=l.clip_rgb,Ma=l.TWOPI,Na=Math.pow,_a=Math.sin,Ea=Math.cos,Sa=y,Aa=v,Ca=Math.floor,La=Math.random,Oa=c,Pa=Math.log,Ia=Math.pow,qa=Math.floor,Da=Math.abs,Ra=function(e,t){void 0===t&&(t=null);var r={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Oa(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===Oa(e)&&(e=e[t]),null==e||isNaN(e)||(r.values.push(e),r.sum+=e,er.max&&(r.max=e),r.count+=1)})),r.domain=[r.min,r.max],r.limits=function(e,t){return ja(r,e,t)},r},ja=function(e,t,r){void 0===t&&(t="equal"),void 0===r&&(r=7),"array"==Oa(e)&&(e=Ra(e));var n=e.min,a=e.max,o=e.values.sort((function(e,t){return e-t}));if(1===r)return[n,a];var c=[];if("c"===t.substr(0,1)&&(c.push(n),c.push(a)),"e"===t.substr(0,1)){c.push(n);for(var u=1;u 0");var i=Math.LOG10E*Pa(n),f=Math.LOG10E*Pa(a);c.push(n);for(var l=1;l200&&(y=!1)}for(var D={},R=0;R=360;)p-=360;c[h]=p}else c[h]=c[h]/u[h];return d/=n,new ta(c,t).alpha(d>.99999?1:d,!0)},uo.bezier=function(e){var t=function(e){var t,r,n,a,o,c,u;if(2===(e=e.map((function(e){return new pa(e)}))).length)t=e.map((function(e){return e.lab()})),o=t[0],c=t[1],a=function(e){var t=[0,1,2].map((function(t){return o[t]+e*(c[t]-o[t])}));return new pa(t,"lab")};else if(3===e.length)r=e.map((function(e){return e.lab()})),o=r[0],c=r[1],u=r[2],a=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*o[t]+2*(1-e)*e*c[t]+e*e*u[t]}));return new pa(t,"lab")};else if(4===e.length){var i;n=e.map((function(e){return e.lab()})),o=n[0],c=n[1],u=n[2],i=n[3],a=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*o[t]+3*(1-e)*(1-e)*e*c[t]+3*(1-e)*e*e*u[t]+e*e*e*i[t]}));return new pa(t,"lab")}}else{if(!(e.length>=5))throw new RangeError("No point in running bezier with only one color.");var f,l,s;f=e.map((function(e){return e.lab()})),s=e.length-1,l=function(e){for(var t=[1,1],r=1;rn?(r+.05)/(n+.05):(n+.05)/(r+.05)},uo.deltaE=function(e,t,r,n,a){void 0===r&&(r=1),void 0===n&&(n=1),void 0===a&&(a=1);var o=function(e){return 360*e/(2*Ka)},c=function(e){return 2*Ka*e/360};e=new Ta(e),t=new Ta(t);var u=Array.from(e.lab()),i=u[0],f=u[1],l=u[2],s=Array.from(t.lab()),d=s[0],h=s[1],p=s[2],b=(i+d)/2,g=(Ga(za(f,2)+za(l,2))+Ga(za(h,2)+za(p,2)))/2,v=.5*(1-Ga(za(g,7)/(za(g,7)+za(25,7)))),m=f*(1+v),y=h*(1+v),w=Ga(za(m,2)+za(l,2)),k=Ga(za(y,2)+za(p,2)),x=(w+k)/2,M=o(Va(l,m)),N=o(Va(p,y)),_=M>=0?M:M+360,E=N>=0?N:N+360,S=$a(_-E)>180?(_+E+360)/2:(_+E)/2,A=1-.17*Ha(c(S-30))+.24*Ha(c(2*S))+.32*Ha(c(3*S+6))-.2*Ha(c(4*S-63)),C=E-_;C=$a(C)<=180?C:E<=_?C+360:C-360,C=2*Ga(w*k)*Xa(c(C)/2);var L=d-i,O=k-w,P=1+.015*za(b-50,2)/Ga(20+za(b-50,2)),I=1+.045*x,q=1+.015*x*A,D=30*Ja(-za((S-275)/25,2)),R=-2*Ga(za(x,7)/(za(x,7)+za(25,7)))*Xa(2*c(D)),j=Ga(za(L/(r*P),2)+za(O/(n*I),2)+za(C/(a*q),2)+R*(O/(n*I))*(C/(a*q)));return Ua(0,Ya(100,j))},uo.distance=function(e,t,r){void 0===r&&(r="lab"),e=new Wa(e),t=new Wa(t);var n=e.get(r),a=t.get(r),o=0;for(var c in n){var u=(n[c]||0)-(a[c]||0);o+=u*u}return Math.sqrt(o)},uo.limits=Fa.limits,uo.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(Za,[null].concat(e))),!0}catch(e){return!1}},uo.scales=to,uo.colors=sr,uo.brewer=co,uo}()}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=r(768),t=r.n(e),n=function(e){return e.rgb().join(", ")},a=function(e){return"rgb("+e.rgb().join(", ")+")"},o=function(e){var r,o=e[0];if(o.startsWith("PS1=")){var c=o.slice(4).trim();return document.querySelectorAll(".system-prompt").forEach((function(e){e.textContent=c})),r=c,localStorage.setItem("PS1",r),"Prompt character changed to ".concat(c)}if(o.startsWith("ACCENT_COLOR=")){var u=e.join(" ").slice(13).trim();return function(e){try{if(i=e,!t().valid(i))return!1;var r=function(e){var t=e.luminance();t<.15?e=e.luminance(.15):t>.85&&(e=e.luminance(.85));var r=e.get("hsl.s");return e.set("hsl.s",Math.min(r,.85))}(t()(e)),o=function(e){if(0===e.get("hsl.s")){var r=["#00796b","#00acc1","#1976d2","#2196f3"];return t()(r[Math.floor(Math.random()*r.length)]).set("hsl.s",1)}var n=e.set("hsl.s",1);if(n.set("hsl.l",.5),t().contrast(n,e)>=1.75)return n;for(var a=1;a<=20;a++){var o=n.set("hsl.l",n.get("hsl.l")+.05*a);if(t().contrast(o,e)>=1.75)return o}return n}(r),c=function(e){return e.luminance()<.95?e.brighten(.5):e.darken(.05)}(r),u=function(e){return e.get("hsl.s")<.2}(o)?"underline":"none";return function(e,t,r,n){localStorage.setItem("ACCENT_COLOR",a(e)),localStorage.setItem("LINK_COLOR",a(t)),localStorage.setItem("LINK_COLOR_HOVER",a(r)),localStorage.setItem("LINK_DECORATION",n)}(r,o,c,u),function(e,t,r,o){document.documentElement.style.setProperty("--accent-color-base",n(e)),document.documentElement.style.setProperty("--accent-color-link",a(t)),document.documentElement.style.setProperty("--accent-color-link-hover",a(r)),document.documentElement.style.setProperty("--link-decoration",o)}(r,o,c,u),!0}catch(e){return console.error(e),!1}var i}(u)?"Accent changed to ".concat(u):"Invalid color. Please provide: #000000, rgb(0, 0, 0) or any valid css color."}return"Invalid export command. Usage: export PS1=$, export ACCENT_COLOR=#"},c=function(){var e=Math.floor(Math.random()*f.length);return f[e]},u={clear:{execute:function(e){for(var t=document.querySelector(".stdout-log");null==t?void 0:t.firstChild;)t.removeChild(t.firstChild);return"Console cleared"},description:"Clears the terminal screen",flags:{}},echo:{execute:function(e){return t=e.join(" "),(r=document.createElement("div")).classList.add("oval"),r.innerText=t,r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.zIndex="500",r.style.left="50px",r.style.top="50px",document.body.appendChild(r),r.classList.add("oval-animate"),r.addEventListener("animationend",(function(){document.body.removeChild(r)})),"Echo effect triggered for ".concat(e.join(" "));var t,r},description:"Prints back the input received",flags:{}},ls:{execute:function(e){return"file1.txt\nfile2.txt\nfile3.txt"},description:"Lists all available files",flags:{}},about:{execute:function(e){return'I’m a passionate software engineer dedicated to crafting interfaces that delight users and make a difference. Currently, I’m a Software Engineer at JupiterOne , where I advocate for user experience and get to build impactful features every day.'},description:"Displays about information",flags:{}},help:{execute:function(e){for(var t="Available commands:\n",r=0,n=Object.entries(u);r")},description:"Shows help information about all commands",flags:{}},date:{execute:function(e){return(new Date).toString()},description:"Displays the current date and time",flags:{}},whoami:{execute:function(e){return"Karson, Frontend Developer"},description:"Displays user information",flags:{}},skills:{execute:function(e){return e.includes("--languages")?"TypeScript, JavaScript, CSS":e.includes("-l")?"Frontend Development, React, UX Design, TypeScript, JavaScript, Node A11y, Agile, User-Centered Design":"Frontend Development, React, UX Design, TypeScript, JavaScript"},description:"Lists all my skills",flags:{"--languages":"Lists programming languages I know","-l":"Lists all my skills"}},projects:{execute:function(e){return"Projects: "},description:"Lists all my projects",flags:{}},education:{execute:function(e){return'B.S. Digital Marketing, Utah Valley University (2010 - 2014)\n Software Engineering Immersive Flatiron School (2017)\n '},description:"Displays my educational background",flags:{}},experience:{execute:function(e){return'Software Engineer, Applications, JupiterOne (October 2021 - Present)\n Natural Language Querying\n − Designed and developed the integration of generative AI into our search experience, converting natural language to our query language. Resulted in one of our highest adoption rates and helped accelerate platform time-to-value.\n − Implemented a vector database embedding cache, improving query response times and reducing operational costs.\n − Implemented Natural Language Processing (NLP) techniques including fuzzy matching and stop word filtering to enhance search precision.\n\n Design System Development\n − Spearheaded the development of JupiterOne’s design system, including creation of a comprehensive component library, design tokens, and theming system. Helping to streamline the development process and enabling engineers to focus on core feature development.\n − Crafted standardized-yet-customizable component APIs through a mix of composability, customization, and "component slots". Balanced flexibility with ease-of-use, allowing for customization without excessive rigidity. Leveraged standard naming conventions and JSDoc for streamlined development.\n '},description:"Displays my work experience",flags:{}},export:{execute:o,description:"Exports a variable",flags:{}},restore:{execute:function(e){var t=localStorage.getItem("PS1");t&&o(["PS1="+t]);var r=localStorage.getItem("ACCENT_COLOR");return r&&o(["ACCENT_COLOR="+r]),"Restored terminal settings"},description:"Restores terminal settings",flags:{}}},i={cd:{execute:c},rm:{execute:c},sudo:{execute:c},mv:{execute:c},chmod:{execute:c},chown:{execute:c},mkdir:{execute:c},ls:{execute:c},cat:{execute:c},ps:{execute:c},top:{execute:c},vi:{execute:c},nano:{execute:c},exit:{execute:c},man:{execute:c},grep:{execute:c},find:{execute:c},pwd:{execute:c},df:{execute:c},du:{execute:c},curl:{execute:c},wget:{execute:c},ping:{execute:c},ifconfig:{execute:c}},f=["Nice try, but this isn't a real terminal!","You're not fooling anyone.","Did you really think that would work?","You must think you're pretty clever, huh?","You must be new here.","I'm sorry, Dave. I'm afraid I can't do that.","You must be mistaken, this isn't a real terminal.","That command is about as useful here as a chocolate teapot."],l=function(){function e(e,t,r){this.prompt=e,this.terminal=t,this.mirrorElement=r,this.initialize()}return e.prototype.createRipple=function(){var e=document.querySelector(".ripple-container"),t=1.1*Math.max(e.offsetWidth,e.offsetHeight),r=document.createElement("span");r.className="ripple",r.style.setProperty("--ripple-size","".concat(t,"px")),e.appendChild(r),r.addEventListener("animationend",(function(){r.remove()}))},e.prototype.setPromptValue=function(e){this.prompt.value=e,this.mirrorElement.textContent=e},e.prototype.handleBashCommand=function(e,t){void 0===t&&(t=!0),t&&this.createRipple();var r,n,a=e.split(" "),o=(r=a[0],n=a.slice(1),r in i?i[r].execute(n):r in u?u[r].execute(n):"Command not found: ".concat(r)).replace(/\n/g,"
");this.setPromptValue(""),t&&this.addToStdoutLog(e,o)},e.prototype.addToStdoutLog=function(e,t){var r=document.querySelector(".tab-panels").querySelector(".stdout-log"),n=document.createElement("li");n.innerHTML='\n
\n
\n '.concat(e,'\n
').concat(t,"
\n
\n
\n "),r.insertBefore(n,r.firstChild)},e.prototype.switchTab=function(e){var t;"stdout"===e&&(null===(t=document.querySelector('button[role="tab"][aria-selected="true"]'))||void 0===t||t.id)},e.prototype.initialize=function(){var e=this;this.prompt.addEventListener("keydown",(function(t){"Enter"===t.key&&e.prompt.value.trim()&&(t.preventDefault(),e.handleBashCommand(e.prompt.value.trim()),e.setPromptValue(""))})),document.querySelectorAll(".tab").forEach((function(t){t.addEventListener("click",(function(t){var r,n=null===(r=t.target)||void 0===r?void 0:r.getAttribute("data-tab");n&&e.switchTab(n)}))})),this.terminal.addEventListener("click",(function(){e.prompt.focus()})),this.prompt.addEventListener("input",(function(t){var r=t.target;e.setPromptValue(r.value)})),window.addEventListener("executeCommand",(function(t){var r=t.detail.command;e.handleBashCommand(r)}))},e}();document.addEventListener("DOMContentLoaded",(function(){var e,t,r,n,a;(function(){var e=Array.from(document.querySelectorAll("[role='tab']")),t=document.querySelector(".bottom-drawer"),r=document.querySelector(".prompt");function n(n){var a,o,c;a="console"===n.getAttribute("id"),c=null==(o=document.querySelector("#console"))?void 0:o.querySelector(".unread-badge"),a&&(null==c||c.classList.remove("show")),e.forEach((function(e){var t=e===n;e.setAttribute("aria-selected",t.toString());var r=e.getAttribute("aria-controls"),a=document.getElementById(r||"");a&&(t?a.removeAttribute("hidden"):a.setAttribute("hidden",""))})),"console"===n.getAttribute("id")?(null==t||t.setAttribute("open",""),r.focus()):(null==t||t.removeAttribute("open"),r.blur())}if(e.forEach((function(e){e.addEventListener("click",(function(){history.replaceState(null,"","#"+e.id),n(e)}))})),window.onhashchange=function(){var e=document.querySelector(location.hash);e&&n(e)},location.hash){var a=document.querySelector(location.hash);a&&n(a)}})(),e=document.querySelector(".prompt"),t=document.querySelector(".input-mirror"),r=document.querySelector(".terminal"),(n=new l(e,r,t)).handleBashCommand("restore",!1),n.handleBashCommand("help",!0),a="https://api.github.com/users/".concat("karsonkalt","/events/public"),fetch(a).then((function(e){return e.json()})).then((function(e){if(0!==e.length){var t=e[0],r=new Date(t.created_at),n=document.getElementById("github-status");if(n){var a=r.toLocaleString("default",{month:"long",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0});n.innerHTML="Last GitHub Activity: ".concat(a)}}})).catch((function(e){console.error("Error fetching activity",e.message)}))}))})()})(); \ No newline at end of file diff --git a/assets/js/terminal.js.LICENSE.txt b/assets/js/home.js.LICENSE.txt similarity index 100% rename from assets/js/terminal.js.LICENSE.txt rename to assets/js/home.js.LICENSE.txt diff --git a/assets/js/tabs.js b/assets/js/tabs.js deleted file mode 100644 index fa29f88..0000000 --- a/assets/js/tabs.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e=Array.from(document.querySelectorAll("[role='tab']")),t=document.querySelector(".bottom-drawer"),o=document.querySelector(".prompt");function r(r){var n,c,u;n="console"===r.getAttribute("id"),u=null==(c=document.querySelector("#console"))?void 0:c.querySelector(".unread-badge"),n&&(null==u||u.classList.remove("show")),e.forEach((function(e){var t=e===r;e.setAttribute("aria-selected",t.toString());var o=e.getAttribute("aria-controls"),n=document.getElementById(o||"");n&&(t?n.removeAttribute("hidden"):n.setAttribute("hidden",""))})),"console"===r.getAttribute("id")?(null==t||t.setAttribute("open",""),o.focus()):(null==t||t.removeAttribute("open"),o.blur())}if(e.forEach((function(e){e.addEventListener("click",(function(){history.replaceState(null,"","#"+e.id),r(e)}))})),window.onhashchange=function(){var e=document.querySelector(location.hash);e&&r(e)},location.hash){var n=document.querySelector(location.hash);n&&r(n)}})(); \ No newline at end of file diff --git a/assets/ts/home/githubStatus.ts b/assets/ts/home/githubStatus.ts new file mode 100644 index 0000000..7587f04 --- /dev/null +++ b/assets/ts/home/githubStatus.ts @@ -0,0 +1,57 @@ +const GITHUB_USERNAME = "karsonkalt"; + +type GitHubEvent = { + actor: { + id: number; + login: string; + display_login: string; + gravatar_id: string; + url: string; + }; + created_at: string; + id: string; + payload: { + repository_id: number; + push_id: number; + size: number; + distinct_size: number; + ref: string; + }; + public: boolean; + repo: { + id: number; + name: string; + url: string; + }; + type: string; +}; + +export const addGithubStatus = () => { + const url = `https://api.github.com/users/${GITHUB_USERNAME}/events/public`; + fetch(url) + .then((response) => response.json()) + .then((data) => { + if (data.length === 0) { + return; + } + const latestEvent = data[0] as GitHubEvent; + const latestGithubInteractionDate = new Date(latestEvent.created_at); + const githubStatusElement = document.getElementById("github-status"); + if (githubStatusElement) { + const formattedDate = latestGithubInteractionDate.toLocaleString( + "default", + { + month: "long", + day: "numeric", + hour: "numeric", + minute: "numeric", + hour12: true, + } + ); + githubStatusElement.innerHTML = `Last GitHub Activity: ${formattedDate}`; + } + }) + .catch((error) => { + console.error("Error fetching activity", error.message); + }); +}; diff --git a/assets/ts/home/index.ts b/assets/ts/home/index.ts new file mode 100644 index 0000000..d34b941 --- /dev/null +++ b/assets/ts/home/index.ts @@ -0,0 +1,9 @@ +import { addGithubStatus } from "./githubStatus"; +import { addTabs } from "./tabs"; +import { addTerminal } from "./terminal/index"; + +document.addEventListener("DOMContentLoaded", () => { + addTabs(); + addTerminal(); + addGithubStatus(); +}); diff --git a/assets/ts/home/tabs.ts b/assets/ts/home/tabs.ts new file mode 100644 index 0000000..28f9158 --- /dev/null +++ b/assets/ts/home/tabs.ts @@ -0,0 +1,69 @@ +export const addTabs = () => { + const TAB_QUERY_SELECTOR = "[role='tab']"; + + const tabNodes = Array.from(document.querySelectorAll(TAB_QUERY_SELECTOR)); + const bottomDrawerNode = document.querySelector(".bottom-drawer"); + + const promptElement = document.querySelector(".prompt") as HTMLInputElement; + + tabNodes.forEach((tab) => { + tab.addEventListener("click", () => { + history.replaceState(null, "", "#" + tab.id); + applyChanges(tab); + }); + }); + + window.onhashchange = function () { + const tab = document.querySelector(location.hash); + if (tab) { + applyChanges(tab); + } + }; + + function applyChanges(clickedTab: Element) { + updateBadge(clickedTab.getAttribute("id") === "console"); + + tabNodes.forEach((tab) => { + const isSelected = tab === clickedTab; + tab.setAttribute("aria-selected", isSelected.toString()); + + const tabPanelId = tab.getAttribute("aria-controls"); + const tabPanel = document.getElementById(tabPanelId || ""); + + if (!tabPanel) { + return; + } + + if (isSelected) { + tabPanel.removeAttribute("hidden"); + } else { + tabPanel.setAttribute("hidden", ""); + } + }); + + if (clickedTab.getAttribute("id") === "console") { + bottomDrawerNode?.setAttribute("open", ""); + promptElement.focus(); + } else { + bottomDrawerNode?.removeAttribute("open"); + promptElement.blur(); + } + } + + // duplicated from other + function updateBadge(hasUnreadStdout: boolean) { + const consoleTab = document.querySelector("#console"); + const badge = consoleTab?.querySelector(".unread-badge"); + + if (hasUnreadStdout) { + badge?.classList.remove("show"); + } + } + + if (location.hash) { + const tab = document.querySelector(location.hash); + if (tab) { + applyChanges(tab); + } + } +}; diff --git a/assets/ts/terminal/UserInputManager.ts b/assets/ts/home/terminal/UserInputManager.ts similarity index 83% rename from assets/ts/terminal/UserInputManager.ts rename to assets/ts/home/terminal/UserInputManager.ts index 362f9f2..e24a39c 100644 --- a/assets/ts/terminal/UserInputManager.ts +++ b/assets/ts/home/terminal/UserInputManager.ts @@ -63,28 +63,11 @@ class UserInputManager { `; ul.insertBefore(li, ul.firstChild); - - const currentTab = document.querySelector( - 'button[role="tab"][aria-selected="true"]' - )?.id; - if (currentTab) this.updateBadge(currentTab !== "console"); - } - - private updateBadge(hasUnreadStdout: boolean) { - const stdoutTab = document.querySelector("#stdout") as Element; - const badge = stdoutTab.querySelector(".unread-badge") as Element; - - if (hasUnreadStdout) { - badge.classList.add("show"); - } } private switchTab(tabName: string) { if (tabName === "stdout") { - const currentTab = document.querySelector( - 'button[role="tab"][aria-selected="true"]' - )?.id; - if (currentTab) this.updateBadge(currentTab !== "stdout"); + document.querySelector('button[role="tab"][aria-selected="true"]')?.id; } } diff --git a/assets/ts/terminal/commands.ts b/assets/ts/home/terminal/commands.ts similarity index 100% rename from assets/ts/terminal/commands.ts rename to assets/ts/home/terminal/commands.ts diff --git a/assets/ts/home/terminal/index.ts b/assets/ts/home/terminal/index.ts new file mode 100644 index 0000000..64f15ad --- /dev/null +++ b/assets/ts/home/terminal/index.ts @@ -0,0 +1,18 @@ +import { UserInputManager } from "./UserInputManager"; + +export const addTerminal = () => { + const prompt = document.querySelector(".prompt") as HTMLInputElement; + const mirrorElement = document.querySelector( + ".input-mirror" + ) as HTMLDivElement; + const terminal = document.querySelector(".terminal") as HTMLDivElement; + + const userInputManager = new UserInputManager( + prompt, + terminal, + mirrorElement + ); + + userInputManager.handleBashCommand("restore", false); // TODO I dont like this + userInputManager.handleBashCommand("help", true); +}; diff --git a/assets/ts/terminal/themeButton.ts b/assets/ts/home/terminal/themeButton.ts similarity index 100% rename from assets/ts/terminal/themeButton.ts rename to assets/ts/home/terminal/themeButton.ts diff --git a/assets/ts/terminal/updateAccentColor.ts b/assets/ts/home/terminal/updateAccentColor.ts similarity index 100% rename from assets/ts/terminal/updateAccentColor.ts rename to assets/ts/home/terminal/updateAccentColor.ts diff --git a/assets/ts/index.ts b/assets/ts/index.ts index 6aed9b9..10c28dd 100644 --- a/assets/ts/index.ts +++ b/assets/ts/index.ts @@ -1,4 +1,4 @@ -import { insertThemeButton } from "./terminal/themeButton"; +import { insertThemeButton } from "./home/terminal/themeButton"; console.log(` ▄▄▄ ▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄ diff --git a/assets/ts/tabs.ts b/assets/ts/tabs.ts deleted file mode 100644 index 3f7d08e..0000000 --- a/assets/ts/tabs.ts +++ /dev/null @@ -1,67 +0,0 @@ -const TAB_QUERY_SELECTOR = "[role='tab']"; - -const tabNodes = Array.from(document.querySelectorAll(TAB_QUERY_SELECTOR)); -const bottomDrawerNode = document.querySelector(".bottom-drawer"); - -const promptElement = document.querySelector(".prompt") as HTMLInputElement; - -tabNodes.forEach((tab) => { - tab.addEventListener("click", () => { - history.replaceState(null, "", "#" + tab.id); - applyChanges(tab); - }); -}); - -window.onhashchange = function () { - const tab = document.querySelector(location.hash); - if (tab) { - applyChanges(tab); - } -}; - -function applyChanges(clickedTab: Element) { - updateBadge(clickedTab.getAttribute("id") === "console"); - - tabNodes.forEach((tab) => { - const isSelected = tab === clickedTab; - tab.setAttribute("aria-selected", isSelected.toString()); - - const tabPanelId = tab.getAttribute("aria-controls"); - const tabPanel = document.getElementById(tabPanelId || ""); - - if (!tabPanel) { - return; - } - - if (isSelected) { - tabPanel.removeAttribute("hidden"); - } else { - tabPanel.setAttribute("hidden", ""); - } - }); - - if (clickedTab.getAttribute("id") === "console") { - bottomDrawerNode?.setAttribute("open", ""); - promptElement.focus(); - } else { - bottomDrawerNode?.removeAttribute("open"); - promptElement.blur(); - } -} - -// duplicated from other -function updateBadge(hasUnreadStdout: boolean) { - const consoleTab = document.querySelector("#console"); - const badge = consoleTab?.querySelector(".unread-badge"); - - if (hasUnreadStdout) { - badge?.classList.remove("show"); - } -} - -if (location.hash) { - const tab = document.querySelector(location.hash); - if (tab) { - applyChanges(tab); - } -} diff --git a/assets/ts/terminal/index.ts b/assets/ts/terminal/index.ts deleted file mode 100644 index e7a856a..0000000 --- a/assets/ts/terminal/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { UserInputManager } from "./UserInputManager"; - -const prompt = document.querySelector(".prompt") as HTMLInputElement; -const mirrorElement = document.querySelector(".input-mirror") as HTMLDivElement; -const terminal = document.querySelector(".terminal") as HTMLDivElement; - -const userInputManager = new UserInputManager(prompt, terminal, mirrorElement); - -document.addEventListener("DOMContentLoaded", () => { - userInputManager.handleBashCommand("restore", false); // TODO I dont like this - userInputManager.handleBashCommand("help", true); -}); diff --git a/tsconfig.json b/tsconfig.json index d4235da..8d7d8d4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,13 @@ { "compilerOptions": { - "outDir": "./assets/js", // Output directory for compiled JS - "rootDir": "./assets/ts", // Directory containing TS files - "target": "es5", // Targeting ES5 for compatibility - "module": "ESNext", // Change this to ES6 - "strict": true, // Enable strict type-checking options + "outDir": "./assets/js", // output compiled + "rootDir": "./assets/ts", + "target": "es5", + "module": "ESNext", + "strict": true, "skipLibCheck": true, "esModuleInterop": true }, - "include": [ - "assets/ts/**/*.ts" // Correct path to include all TS files - ], + "include": ["assets/ts/**/*.ts"], "exclude": ["node_modules"] } diff --git a/webpack.config.js b/webpack.config.js index 41d3c34..1af8099 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,8 +3,7 @@ const path = require("path"); module.exports = { entry: { index: "./assets/ts/index.ts", - tabs: "./assets/ts/tabs.ts", // Add other entry points here - terminal: "./assets/ts/terminal/index.ts", // Update this path as needed + home: "./assets/ts/home/index.ts", }, module: { rules: [