import{S as ee,c as te,a as le,d as L,e as V,m as U,b as g,t as E,f as q,g as T,h as F,j as R}from"./index-D5xIMA44.js";import{a as k,b as C,t as B,f as v,h as w,d,k as D,j as O,l as M,i as j,m as y,n as H,e as I,r as z}from"./lifecycle-u0QeOdKt.js";import{g as se}from"./globals-D0QH3NT1.js";import{e as S}from"./each-_CmsXlt5.js";import{a as re,$ as ne}from"./runtime-_7zi23uk.js";import{C as ie}from"./CommitBody-BH1idkTu.js";import{C as oe}from"./CommitDate-DuDYOQBS.js";import{N as ce}from"./ZoomOut24-DVPD-K2C.js";function fe(f){let l,a,r,t,i,e=f[3](new Date("2023-04-23"))+"",s,n,o=f[4]("page.profile.history.activities.setup.summary")+"",p,u,c,m,h=f[4]("page.profile.history.activities.setup.description",{values:{created_with:f[0],instance:f[1],username:f[2]}})+"",N,A;return r=new ce({props:{fill:"currentColor"}}),{c(){l=k("span"),a=k("span"),L(r.$$.fragment),t=C(),i=k("span"),s=B(e),n=B(" - "),p=B(o),u=C(),c=k("span"),m=k("span"),N=B(h),this.h()},l(_){l=v(_,"SPAN",{class:!0});var b=w(l);a=v(b,"SPAN",{class:!0});var J=w(a);V(r.$$.fragment,J),J.forEach(d),t=D(b),i=v(b,"SPAN",{class:!0});var P=w(i);s=O(P,e),n=O(P," - "),p=O(P,o),P.forEach(d),b.forEach(d),u=D(_),c=v(_,"SPAN",{class:!0});var K=w(c);m=v(K,"SPAN",{class:!0});var Q=w(m);N=O(Q,h),Q.forEach(d),K.forEach(d),this.h()},h(){M(a,"class","absolute ltr:-left-3 rtl:-right-3"),M(i,"class","ms-4"),M(l,"class","relative"),M(m,"class","border box-decoration-clone px-4 py-2 leading-10"),M(c,"class","ms-6 mt-8")},m(_,b){j(_,l,b),y(l,a),U(r,a,null),y(l,t),y(l,i),y(i,s),y(i,n),y(i,p),j(_,u,b),j(_,c,b),y(c,m),y(m,N),A=!0},p(_,[b]){(!A||b&8)&&e!==(e=_[3](new Date("2023-04-23"))+"")&&H(s,e),(!A||b&16)&&o!==(o=_[4]("page.profile.history.activities.setup.summary")+"")&&H(p,o),(!A||b&23)&&h!==(h=_[4]("page.profile.history.activities.setup.description",{values:{created_with:_[0],instance:_[1],username:_[2]}})+"")&&H(N,h)},i(_){A||(g(r.$$.fragment,_),A=!0)},o(_){E(r.$$.fragment,_),A=!1},d(_){_&&(d(l),d(u),d(c)),q(r)}}}function ue(f,l,a){let r,t;T(f,re,n=>a(3,r=n)),T(f,ne,n=>a(4,t=n));let{created_with:i=""}=l,{instance:e=""}=l,{username:s=""}=l;return f.$$set=n=>{"created_with"in n&&a(0,i=n.created_with),"instance"in n&&a(1,e=n.instance),"username"in n&&a(2,s=n.username)},[i,e,s,r,t]}class ae extends ee{constructor(l){super(),te(this,l,ue,fe,le,{created_with:0,instance:1,username:2})}}ae.__docgen={version:3,name:"HistoryFallback.svelte",data:[{keywords:[],visibility:"public",description:"Service with which username was created on the instance.",name:"created_with",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""},{keywords:[],visibility:"public",description:"Instance to show in fallback.",name:"instance",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""},{keywords:[],visibility:"public",description:"Username to show in fallback.",name:"username",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const{Boolean:G}=se;function W(f,l,a){const r=f.slice();return r[6]=l[a],r}function X(f,l,a){const r=f.slice();return r[9]=l[a],r}function Y(f,l,a){const r=f.slice();return r[12]=l[a],r}function me(f){let l,a,r;return a=new ae({props:{created_with:f[1].user.created_with,instance:f[1].user.instance,username:f[1].user.username}}),{c(){l=k("li"),L(a.$$.fragment),this.h()},l(t){l=v(t,"LI",{class:!0});var i=w(l);V(a.$$.fragment,i),i.forEach(d),this.h()},h(){M(l,"class","flex flex-col ltr:border-l-2 rtl:border-r-2 ms-2")},m(t,i){j(t,l,i),U(a,l,null),r=!0},p(t,i){const e={};i&2&&(e.created_with=t[1].user.created_with),i&2&&(e.instance=t[1].user.instance),i&2&&(e.username=t[1].user.username),a.$set(e)},i(t){r||(g(a.$$.fragment,t),r=!0)},o(t){E(a.$$.fragment,t),r=!1},d(t){t&&d(l),q(a)}}}function he(f){let l,a,r=S(Object.entries(f[3](f[0]))),t=[];for(let e=0;eE(t[e],1,1,()=>{t[e]=null});return{c(){for(let e=0;eE(o[u],1,1,()=>{o[u]=null});return{c(){l=k("li"),a=k("div"),L(r.$$.fragment),t=C(),i=k("ul");for(let u=0;uE(t[e],1,1,()=>{t[e]=null});return{c(){for(let e=0;e0?0:1}return e=u(f),s=p[e]=o[e](f),{c(){l=k("h2"),r=B(a),t=C(),i=k("ul"),s.c(),this.h()},l(c){l=v(c,"H2",{class:!0});var m=w(l);r=O(m,a),m.forEach(d),t=D(c),i=v(c,"UL",{});var h=w(i);s.l(h),h.forEach(d),this.h()},h(){M(l,"class","h2 font-semibold leading-tight text-base")},m(c,m){j(c,l,m),y(l,r),j(c,t,m),j(c,i,m),p[e].m(i,null),n=!0},p(c,[m]){(!n||m&4)&&a!==(a=c[2]("page.profile.history.heading")+"")&&H(r,a);let h=e;e=u(c),e===h?p[e].p(c,m):(R(),E(p[h],1,1,()=>{p[h]=null}),F(),s=p[e],s?s.p(c,m):(s=p[e]=o[e](c),s.c()),g(s,1),s.m(i,null))},i(c){n||(g(s),n=!0)},o(c){E(s),n=!1},d(c){c&&(d(l),d(t),d(i)),p[e].d()}}}function de(f,l,a){let r;T(f,ne,o=>a(2,r=o));let{commitsMap:t=[]}=l,{data:i={user:{created_with:"",instance:"",username:""}}}=l,{followingsMap:e=[]}=l;const s=function(o){const p={};return o.filter(u=>!!u.id).forEach(u=>{const{committed:c,context:m}=u,h=c.slice(0,c.indexOf("T"));p[h]||(p[h]={}),p[h][m]||(p[h][m]=[]),p[h][m].push(u)}),p},n=function(o){const p=e.find(u=>u.id===o);return(p==null?void 0:p.name)||""};return f.$$set=o=>{"commitsMap"in o&&a(0,t=o.commitsMap),"data"in o&&a(1,i=o.data),"followingsMap"in o&&a(5,e=o.followingsMap)},[t,i,r,s,n,e]}class _e extends ee{constructor(l){super(),te(this,l,de,pe,le,{commitsMap:0,data:1,followingsMap:5})}}_e.__docgen={version:3,name:"History.svelte",data:[{keywords:[],visibility:"public",description:"Array of commits to display by date and project.",name:"commitsMap",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"array",type:"array"}},{keywords:[],visibility:"public",description:"Required context for populating the template.",name:"data",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"}},{keywords:[],visibility:"public",description:"Array of followings to look up.",name:"followingsMap",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"array",type:"array"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};export{_e as H};