git-truck 0.0.0-e3e25b8 → 0.0.0-e6c02122

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +54 -98
  3. package/build/client/assets/Tooltip-BRrRCIoN.js +5 -0
  4. package/build/client/assets/_-CT17qCl3.js +0 -0
  5. package/build/client/assets/_._well-known._-DIwl00oI.js +0 -0
  6. package/build/client/assets/_index-D21Ew7mj.js +0 -0
  7. package/build/client/assets/_path-DLb8dmlQ.js +0 -0
  8. package/build/client/assets/api.abort-BnJg2xc8.js +1 -0
  9. package/build/client/assets/api.abort-DT-xlGik.js +1 -0
  10. package/build/client/assets/api.commits-BQFa-krc.js +1 -0
  11. package/build/client/assets/api.commits-D0V_2Zxh.js +1 -0
  12. package/build/client/assets/api.contributor-distribution-Bm765p2r.js +0 -0
  13. package/build/client/assets/api.progress-DDXJwKZs.js +0 -0
  14. package/build/client/assets/browse-BwwVf3-V.js +1 -0
  15. package/build/client/assets/browse-o58AJQN7.js +1 -0
  16. package/build/client/assets/clear-cache-CkxDeoL-.js +1 -0
  17. package/build/client/assets/clear-cache-DCTKiLTg.js +1 -0
  18. package/build/client/assets/commits-D_3bM_Jc.js +0 -0
  19. package/build/client/assets/crashedTruck_48x-BC5vWJCr.js +1 -0
  20. package/build/client/assets/crashedTruck_48x-DZ8PrkDC.gif +0 -0
  21. package/build/client/assets/dist-Cs-Kcn9j.js +2 -0
  22. package/build/client/assets/drivingTruck_32x-C9OqTj6H.gif +0 -0
  23. package/build/client/assets/drivingTruck_48x-CILwQUl6.gif +0 -0
  24. package/build/client/assets/entry.client-VGg0gg2t.js +9 -0
  25. package/build/client/assets/jsx-runtime-DNTxAj_C.js +26 -0
  26. package/build/client/assets/loadingTruck_48x-ClwSXdP8.gif +0 -0
  27. package/build/client/assets/manifest-2ea0f428.js +1 -0
  28. package/build/client/assets/react-T1tfSvWJ.js +1 -0
  29. package/build/client/assets/react-dom-bApAVOsP.js +1 -0
  30. package/build/client/assets/root-CdHdIgYi.css +2 -0
  31. package/build/client/assets/root-Cwz7TfDG.js +3 -0
  32. package/build/client/assets/ui-Cz1QB8r9.js +1 -0
  33. package/build/client/assets/unloadingTruck_48x-stS0XDD5.gif +0 -0
  34. package/build/client/assets/util-DQQO48u5.js +44 -0
  35. package/build/client/assets/view-CzLqDYRK.js +4 -0
  36. package/build/client/assets/viewParams-j9NUggAW.js +1 -0
  37. package/build/client/assets/viewParams-xPtAQMex.js +1 -0
  38. package/build/client/favicon.ico +0 -0
  39. package/build/server/assets/dist-Bcw9gDV4.js +6678 -0
  40. package/build/server/assets/server-build-BMjoUR58.js +65295 -0
  41. package/build/server/index.js +23033 -0
  42. package/cli.mjs +40451 -0
  43. package/package.json +204 -166
  44. package/build/index.js +0 -1442
  45. package/build/metafile.js.json +0 -1
  46. package/build/metafile.server.json +0 -1
  47. package/build/version.txt +0 -1
  48. package/cli.js +0 -1319
  49. package/public/build/_assets/animations-TUO2PXWS.css +0 -1
  50. package/public/build/_assets/react-datepicker-SHOMGW4P.css +0 -1
  51. package/public/build/_assets/tailwind-IA4ZO74Y.css +0 -1
  52. package/public/build/_assets/truck-7F5JWBYT.gif +0 -0
  53. package/public/build/_assets/truck-JLDVJULS.png +0 -0
  54. package/public/build/_assets/vars-COQCVZEU.css +0 -1
  55. package/public/build/_shared/buttons.esm-D3QISUDE.js +0 -10
  56. package/public/build/_shared/chunk-4OBQSJE7.js +0 -1
  57. package/public/build/_shared/chunk-6NT2R34W.js +0 -1
  58. package/public/build/_shared/chunk-G5WX4PPA.js +0 -1
  59. package/public/build/_shared/chunk-ND5WRITB.js +0 -293
  60. package/public/build/entry.client-RZUWA4GZ.js +0 -1
  61. package/public/build/manifest-DEEA3EAC.js +0 -1
  62. package/public/build/root-TFDKK2KT.js +0 -1
  63. package/public/build/routes/$repo.$-HBFDBHVI.js +0 -75
  64. package/public/build/routes/_index-OFPZDLYL.js +0 -1
  65. package/public/build/routes/authordist-A7NSX5GE.js +0 -1
  66. package/public/build/routes/commitcount-KSNJOFTJ.js +0 -1
  67. package/public/build/routes/commits-6RXT3QOX.js +0 -1
  68. package/public/build/routes/progress-LUCNXSNL.js +0 -1
@@ -0,0 +1,4 @@
1
+ import{r as e,t}from"./react-T1tfSvWJ.js";import{A as n,D as r,F as i,P as a,a as o,c as s,i as c,j as l,k as u,o as d,t as f}from"./jsx-runtime-DNTxAj_C.js";import{t as p}from"./react-dom-bApAVOsP.js";import{$ as m,H as h,I as g,J as _,L as v,M as y,N as b,O as x,P as S,Q as C,R as w,T,U as E,V as D,X as O,Y as k,Z as A,a as j,c as M,ft as N,ht as P,it as F,j as I,k as ee,l as te,mt as L,n as R,o as ne,ot as z,pt as re,q as ie,r as B,s as ae,u as V}from"./clear-cache-CkxDeoL-.js";import{A as H,B as U,Bt as W,C as oe,D as G,E as K,F as se,Ft as q,G as ce,Gt as le,H as ue,Ht as de,I as fe,J as pe,Jt as me,K as he,Kt as ge,L as _e,Lt as ve,N as ye,Nt as be,O as xe,P as Se,Pt as Ce,Q as we,Qt as J,R as Te,Rt as Ee,Vt as De,Wt as Oe,X as ke,Xt as Ae,Y as je,Z as Me,_ as Ne,_t as Pe,a as Fe,b as Ie,bt as Le,c as Re,ct as ze,d as Be,dt as Ve,en as He,et as Ue,ft as We,g as Ge,h as Ke,ht as qe,i as Je,it as Ye,k as Xe,l as Ze,m as Qe,mt as Y,n as $e,nt as et,o as tt,pt as nt,q as rt,qt as it,r as at,rt as ot,t as st,tt as ct,u as lt,v as ut,w as dt,x as ft,y as pt,yt as mt,z as ht,zt as gt}from"./util-DQQO48u5.js";import{a as _t,o as vt}from"./dist-Cs-Kcn9j.js";import{n as yt,r as bt,t as X}from"./viewParams-j9NUggAW.js";import{t as xt}from"./api.commits-BQFa-krc.js";import{t as St}from"./api.abort-DT-xlGik.js";import{a as Ct,i as wt,o as Tt,t as Et}from"./browse-o58AJQN7.js";import{a as Dt,c as Ot,i as kt,n as At,r as jt,s as Mt,t as Nt}from"./Tooltip-BRrRCIoN.js";function Pt(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Ft(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function It(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function Lt(){return this.eachAfter(It)}function Rt(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function zt(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function Bt(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function Vt(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function Ht(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function Ut(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Wt(e){for(var t=this,n=Gt(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Gt(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function Kt(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function qt(){return Array.from(this)}function Jt(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Yt(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Xt(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function Zt(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=en)):t===void 0&&(t=$t);for(var n=new rn(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new rn(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(nn)}function Qt(){return Zt(this).eachBefore(tn)}function $t(e){return e.children}function en(e){return Array.isArray(e)?e[1]:null}function tn(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function nn(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function rn(e){this.data=e,this.depth=this.height=0,this.parent=null}rn.prototype=Zt.prototype={constructor:rn,count:Lt,each:Rt,eachAfter:Bt,eachBefore:zt,find:Vt,sum:Ht,sort:Ut,path:Wt,ancestors:Kt,descendants:qt,leaves:Jt,links:Yt,copy:Qt,[Symbol.iterator]:Xt};function an(e){return e==null?null:on(e)}function on(e){if(typeof e!=`function`)throw Error();return e}function sn(){return 0}function cn(e){return function(){return e}}var ln=1664525,un=1013904223,dn=4294967296;function fn(){let e=1;return()=>(e=(ln*e+un)%dn)/dn}function pn(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function mn(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function hn(e,t){for(var n=0,r=(e=mn(Array.from(e),t)).length,i=[],a,o;n<r;)a=e[n],o&&vn(o,a)?++n:(o=bn(i=gn(i,a)),n=0);return o}function gn(e,t){var n,r;if(yn(t,e))return[t];for(n=0;n<e.length;++n)if(_n(t,e[n])&&yn(Sn(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(_n(Sn(e[n],e[r]),t)&&_n(Sn(e[n],t),e[r])&&_n(Sn(e[r],t),e[n])&&yn(Cn(e[n],e[r],t),e))return[e[n],e[r],t];throw Error()}function _n(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function vn(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function yn(e,t){for(var n=0;n<t.length;++n)if(!vn(e,t[n]))return!1;return!0}function bn(e){switch(e.length){case 1:return xn(e[0]);case 2:return Sn(e[0],e[1]);case 3:return Cn(e[0],e[1],e[2])}}function xn(e){return{x:e.x,y:e.y,r:e.r}}function Sn(e,t){var n=e.x,r=e.y,i=e.r,a=t.x,o=t.y,s=t.r,c=a-n,l=o-r,u=s-i,d=Math.sqrt(c*c+l*l);return{x:(n+a+c/d*u)/2,y:(r+o+l/d*u)/2,r:(d+i+s)/2}}function Cn(e,t,n){var r=e.x,i=e.y,a=e.r,o=t.x,s=t.y,c=t.r,l=n.x,u=n.y,d=n.r,f=r-o,p=r-l,m=i-s,h=i-u,g=c-a,_=d-a,v=r*r+i*i-a*a,y=v-o*o-s*s+c*c,b=v-l*l-u*u+d*d,x=p*m-f*h,S=(m*b-h*y)/(x*2)-r,C=(h*g-m*_)/x,w=(p*y-f*b)/(x*2)-i,T=(f*_-p*g)/x,E=C*C+T*T-1,D=2*(a+S*C+w*T),O=S*S+w*w-a*a,k=-(Math.abs(E)>1e-6?(D+Math.sqrt(D*D-4*E*O))/(2*E):O/D);return{x:r+S+C*k,y:i+w+T*k,r:k}}function wn(e,t,n){var r=e.x-t.x,i,a,o=e.y-t.y,s,c,l=r*r+o*o;l?(a=t.r+n.r,a*=a,c=e.r+n.r,c*=c,a>c?(i=(l+c-a)/(2*l),s=Math.sqrt(Math.max(0,c/l-i*i)),n.x=e.x-i*r-s*o,n.y=e.y-i*o+s*r):(i=(l+a-c)/(2*l),s=Math.sqrt(Math.max(0,a/l-i*i)),n.x=t.x+i*r-s*o,n.y=t.y+i*o+s*r)):(n.x=t.x+n.r,n.y=t.y)}function Tn(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function En(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function Dn(e){this._=e,this.next=null,this.previous=null}function On(e,t){if(!(a=(e=pn(e)).length))return 0;var n=e[0],r,i,a,o,s,c,l,u,d,f;if(n.x=0,n.y=0,!(a>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;wn(r,n,i=e[2]),n=new Dn(n),r=new Dn(r),i=new Dn(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;pack:for(c=3;c<a;++c){wn(n._,r._,i=e[c]),i=new Dn(i),l=r.next,u=n.previous,d=r._.r,f=n._.r;do if(d<=f){if(Tn(l._,i._)){r=l,n.next=r,r.previous=n,--c;continue pack}d+=l._.r,l=l.next}else{if(Tn(u._,i._)){n=u,n.next=r,r.previous=n,--c;continue pack}f+=u._.r,u=u.previous}while(l!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,o=En(n);(i=i.next)!==r;)(s=En(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=hn(n,t),c=0;c<a;++c)n=e[c],n.x-=i.x,n.y-=i.y;return i.r}function kn(e){return Math.sqrt(e.value)}function An(){var e=null,t=1,n=1,r=sn;function i(i){let a=fn();return i.x=t/2,i.y=n/2,e?i.eachBefore(jn(e)).eachAfter(Mn(r,.5,a)).eachBefore(Nn(1)):i.eachBefore(jn(kn)).eachAfter(Mn(sn,1,a)).eachAfter(Mn(r,i.r/Math.min(t,n),a)).eachBefore(Nn(Math.min(t,n)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=an(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(e){return arguments.length?(r=typeof e==`function`?e:cn(+e),i):r},i}function jn(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Mn(e,t,n){return function(r){if(i=r.children){var i,a,o=i.length,s=e(r)*t||0,c;if(s)for(a=0;a<o;++a)i[a].r+=s;if(c=On(i,n),s)for(a=0;a<o;++a)i[a].r-=s;r.r=c+s}}}function Nn(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function Pn(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Fn(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function In(){var e=1,t=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=e,i.y1=t/o,i.eachBefore(a(t,o)),r&&i.eachBefore(Pn),i}function a(e,t){return function(r){r.children&&Fn(r,r.x0,e*(r.depth+1)/t,r.x1,e*(r.depth+2)/t);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}return i.round=function(e){return arguments.length?(r=!!e,i):r},i.size=function(n){return arguments.length?(e=+n[0],t=+n[1],i):[e,t]},i.padding=function(e){return arguments.length?(n=+e,i):n},i}function Ln(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var Rn=(1+Math.sqrt(5))/2;function zn(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?Fn(c,n,r,i,h?r+=m*g/h:a):Ln(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var Bn=(function e(t){function n(e,n,r,i,a){zn(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(Rn);function Vn(){var e=Bn,t=!1,n=1,r=1,i=[0],a=sn,o=sn,s=sn,c=sn,l=sn;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(Pn),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=on(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:cn(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:cn(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:cn(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:cn(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:cn(+e),u):l},u}var Hn=(function e(t){function n(e,n,r,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,c,l,u=-1,d,f=o.length,p=e.value;++u<f;){for(s=o[u],c=s.children,l=s.value=0,d=c.length;l<d;++l)s.value+=c[l].value;s.dice?Fn(s,n,r,i,p?r+=(a-r)*s.value/p:a):Ln(s,n,r,p?n+=(i-n)*s.value/p:i,a),p-=s.value}else e._squarify=o=zn(t,e,n,r,i,a),o.ratio=t}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(Rn);function Un(){var e=Me().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=Ft(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return Un(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},we.apply(d(),arguments)}var Wn=e(p(),1),Z=P(),Q=e(t(),1),$=f(),Gn=Qe();function Kn(e){let t=(0,Q.useId)(),n=`url('#${t}')`;return{linearGradient:(0,Q.useMemo)(()=>(0,$.jsx)(`linearGradient`,{id:t,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,children:Array.from(new Set(e)).toSorted().slice(0,Gn.length).map((e,t,n)=>(0,$.jsx)(`stop`,{offset:`${t/(n.length-1)*100}%`,stopColor:e},t))}),[e,t]),fill:n}}function qn(){let e=(0,Z.c)(99),t=ce(),n=rt(),[r,i]=Ie(),{searchResults:a,hasSearchResults:o}=Ot(),s=(0,Q.useDeferredValue)(i),{databaseInfo:c}=J(),[l]=Ae(),{chartType:u,sizeMetric:d,hierarchyType:f,labelsVisible:p,renderCutOff:m,metricType:h,showFilesWithoutChanges:g,showOnlySearchMatches:_}=tt(),v=it(),y=ge(),b=H(),x=se(),[S,C]=_t(`zoomPath`,X.zoomPath),w;e[0]!==c.repo||e[1]!==C?(w=e=>C(e&&e!==c.repo?mt(e):null),e[0]=c.repo,e[1]=C,e[2]=w):w=e[2];let T=w,E=xe(),D;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(D={key:`Escape`},e[3]=D):D=e[3];let O;e[4]!==b||e[5]!==x?(O=()=>{b&&x(null)},e[4]=b,e[5]=x,e[6]=O):O=e[6],oe(D,O);let k;if(e[7]!==c.commitCounts||e[8]!==c.fileTree||e[9]!==o||e[10]!==f||e[11]!==a||e[12]!==g||e[13]!==_){bb0:{let t;e[15]!==c.commitCounts||e[16]!==o||e[17]!==a||e[18]!==g||e[19]!==_?(t=e=>!(o&&!a[e.path]&&_||!g&&!c.commitCounts[e.path]),e[15]=c.commitCounts,e[16]=o,e[17]=a,e[18]=g,e[19]=_,e[20]=t):t=e[20];let n=pe(c.fileTree,t);if(f===`NESTED`){k=n;break bb0}k={...n,children:je(n)}}e[7]=c.commitCounts,e[8]=c.fileTree,e[9]=o,e[10]=f,e[11]=a,e[12]=g,e[13]=_,e[14]=k}else k=e[14];let A=k,j;bb1:{if(s.width===0||s.height===0){let t;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[21]=t):t=e[21],j=t;break bb1}let t;e[22]!==u||e[23]!==c||e[24]!==A||e[25]!==m||e[26]!==s.height||e[27]!==s.width||e[28]!==d?(t=tr({databaseInfo:c,tree:A,size:{height:s.height,width:s.width},chartType:u,sizeMetricType:d,renderCutOff:m}).descendants(),e[22]=u,e[23]=c,e[24]=A,e[25]=m,e[26]=s.height,e[27]=s.width,e[28]=d,e[29]=t):t=e[29],j=t}let M=j,N;e[30]===n?N=e[31]:(N=()=>{n(null)},e[30]=n,e[31]=N);let P;e[32]!==u||e[33]!==n||e[34]!==s?(P=[u,s,n],e[32]=u,e[33]=n,e[34]=s,e[35]=P):P=e[35],(0,Q.useEffect)(N,P);let F=S&&S===b.path,I=b.path===S,ee;e[36]===c.fileTree?ee=e[37]:(ee=nt(c.fileTree),e[36]=c.fileTree,e[37]=ee);let te=ee,L=(0,Q.useRef)(0),ne=(0,Q.useRef)(null),z=Yn,re=u===`BUBBLE_CHART`,ie;e[38]===re?ie=e[39]:(ie=R(`relative grid overflow-hidden`,{"pb-4":re}),e[38]=re,e[39]=ie);let ae=F&&!te,V;e[40]===ae?V=e[41]:(V=B(`stroke-border dark:stroke-border-dark absolute inset-0 fill-gray-900 text-xs select-none dark:fill-gray-100`,{"cursor-zoom-out":ae}),e[40]=ae,e[41]=V);let U=`0 0 ${s.width} ${s.height}`,W;e[42]!==b.path||e[43]!==I||e[44]!==c.objectPathMap||e[45]!==x||e[46]!==F||e[47]!==te||e[48]!==E?(W=e=>{let t=z(e.target);if(!t){if(!I){x(null);return}F&&!te&&E();return}let n=c.objectPathMap[t];e.stopPropagation(),!ne.current&&(ne.current=window.setTimeout(()=>{if(ne.current=null,n&&b.path===n.path){x(null);return}if(!n)throw Error(`Clicked object not found in databaseInfo.objectMap`);x(t?n??null:null)},300))},e[42]=b.path,e[43]=I,e[44]=c.objectPathMap,e[45]=x,e[46]=F,e[47]=te,e[48]=E,e[49]=W):W=e[49];let G;e[50]!==c.objectPathMap||e[51]!==x||e[52]!==T||e[53]!==S?(G=e=>{let t=z(e.target);if(!t){x(null);return}T(null),e.stopPropagation();let n=c.objectPathMap[t];if(!n)throw Error(`Clicked object not found in databaseInfo.objectMap: `+t);if(ne.current){if(window.clearTimeout(ne.current),ne.current=null,S&&S===n.path){T(``);return}T(n.path??null)}},e[50]=c.objectPathMap,e[51]=x,e[52]=T,e[53]=S,e[54]=G):G=e[54];let K;e[55]!==c.objectPathMap||e[56]!==t?.path||e[57]!==n?(K=e=>{let r=z(e.target);if(!r)return;e.stopPropagation();let i=c.objectPathMap[r];i&&t?.path!==i.path&&n(i)},e[55]=c.objectPathMap,e[56]=t?.path,e[57]=n,e[58]=K):K=e[58];let q;e[59]===n?q=e[60]:(q=()=>n(null),e[59]=n,e[60]=q);let le;e[61]!==t||e[62]!==T||e[63]!==E?(le=e=>{L.current+=e.deltaY,L.current<=-50&&t?((0,Q.startTransition)(()=>{T(t.path)}),L.current=0):L.current>=50&&t&&((0,Q.startTransition)(()=>{E()}),L.current=0)},e[61]=t,e[62]=T,e[63]=E,e[64]=le):le=e[64];let ue;if(e[65]!==b||e[66]!==o||e[67]!==y||e[68]!==p||e[69]!==h||e[70]!==l||e[71]!==M||e[72]!==a||e[73]!==v){let t;e[75]!==b||e[76]!==o||e[77]!==y||e[78]!==p||e[79]!==h||e[80]!==l||e[81]!==a||e[82]!==v?(t=(e,t)=>{let n=!!a[e.data.path],r=Y(e.data)?Object.keys(a).some(t=>t.startsWith(`${e.data.path}/`)):n,i=e=>l.get(h)?.categoriesMap.get(e.path)?.map(Jn)??[],s=i(e.data),c=v.length>0?s.some(e=>y(e))||Y(e.data)&&e.data.children.some(e=>i(e).some(e=>y(e))):!0,u=e.data.path===b.path,d=b?u||Y(b)&&e.data.path.startsWith(b.path+`/`)&&c:c,f=o&&!(n||r)||!d;return(0,$.jsxs)(`g`,{"data-path":e.data.path,className:R(`cursor-pointer duration-400`,{"hover:opacity-80":Ve(e.data)&&!b,"hover:stroke-border-highlight dark:hover:stroke-border-highlight-dark":Y(e.data)&&!b,"opacity-10 grayscale hover:opacity-100 hover:grayscale-0":f}),children:[(0,$.jsx)(Xn,{d:e,isRoot:t===0}),p?(0,$.jsx)(Zn,{isSearchMatch:n,d:e,children:e.data.name}):null]},e.data.path)},e[75]=b,e[76]=o,e[77]=y,e[78]=p,e[79]=h,e[80]=l,e[81]=a,e[82]=v,e[83]=t):t=e[83],ue=M.map(t),e[65]=b,e[66]=o,e[67]=y,e[68]=p,e[69]=h,e[70]=l,e[71]=M,e[72]=a,e[73]=v,e[74]=ue}else ue=e[74];let de;e[84]!==V||e[85]!==U||e[86]!==W||e[87]!==G||e[88]!==K||e[89]!==q||e[90]!==le||e[91]!==ue?(de=(0,$.jsx)(`svg`,{className:V,xmlns:`http://www.w3.org/2000/svg`,viewBox:U,onClick:W,onDoubleClick:G,onMouseOver:K,onMouseOut:q,onWheel:le,children:ue}),e[84]=V,e[85]=U,e[86]=W,e[87]=G,e[88]=K,e[89]=q,e[90]=le,e[91]=ue,e[92]=de):de=e[92];let fe;e[93]!==r||e[94]!==de?(fe=(0,$.jsx)(`div`,{ref:r,className:`relative`,children:de}),e[93]=r,e[94]=de,e[95]=fe):fe=e[95];let me;return e[96]!==fe||e[97]!==ie?(me=(0,$.jsx)(`div`,{className:ie,children:fe}),e[96]=fe,e[97]=ie,e[98]=me):me=e[98],me}function Jn(e){return e.category}function Yn(e){return e instanceof Element?e.closest(`[data-path]`)?.dataset.path:void 0}function Xn(e){let t=(0,Z.c)(41),{d:n,isRoot:r}=e,{chartType:i,transitionsEnabled:a}=tt(),o=H(),s=Qn(n.data),{linearGradient:c,fill:l}=Kn(s),u=Array.isArray(s)&&s.length>1,d=n.data.path===o.path,f=r?12:8,p;t[0]!==s||t[1]!==n.data||t[2]!==l||t[3]!==d||t[4]!==u?(p=Ve(n.data)?{fill:s?u?l:s[0]:Oe,stroke:s?s[0]:le}:{strokeWidth:d?`2px`:`1px`},t[0]=s,t[1]=n.data,t[2]=l,t[3]=d,t[4]=u,t[5]=p):p=t[5];let m=p;if(i===`BUBBLE_CHART`){let e=n,r=e.x-e.r,i=e.y-e.r+16-1,a=e.r*2,o=e.r*2,s;t[6]!==e.r||t[7]!==m||t[8]!==r||t[9]!==i||t[10]!==a||t[11]!==o?(s={...m,x:r,y:i,width:a,height:o,rx:e.r,ry:e.r},t[6]=e.r,t[7]=m,t[8]=r,t[9]=i,t[10]=a,t[11]=o,t[12]=s):s=t[12],m=s}else{let e=n,r=e.x0+.5,i=e.y0+.5,a=e.x1-e.x0-1,o=e.y1-e.y0-1,s;t[13]!==f||t[14]!==n.data?(s=Y(n.data)?{rx:f,ry:f}:{rx:4,ry:4},t[13]=f,t[14]=n.data,t[15]=s):s=t[15];let c;t[16]!==m||t[17]!==r||t[18]!==i||t[19]!==a||t[20]!==o||t[21]!==s?(c={...m,x:r,y:i,width:a,height:o,...s},t[16]=m,t[17]=r,t[18]=i,t[19]=a,t[20]=o,t[21]=s,t[22]=c):c=t[22],m=c}let h=m,g;t[23]!==c||t[24]!==u?(g=u?(0,$.jsx)(`defs`,{children:c}):null,t[23]=c,t[24]=u,t[25]=g):g=t[25];let _=n.data.path,v;t[26]!==i||t[27]!==n.data||t[28]!==r?(v=Y(n.data)&&(i===`BUBBLE_CHART`||!r)?`stroke-inherit`:`stroke-transparent stroke-0`,t[26]=i,t[27]=n.data,t[28]=r,t[29]=v):v=t[29];let y;t[30]!==n.data||t[31]!==v||t[32]!==a?(y=R(v,{"fill-primary-bg dark:fill-primary-bg-dark":Y(n.data),"transition-[x,y,rx,ry,width,height,fill] duration-500 ease-in-out":a}),t[30]=n.data,t[31]=v,t[32]=a,t[33]=y):y=t[33];let b;t[34]!==h||t[35]!==n.data.path||t[36]!==y?(b=(0,$.jsx)(`rect`,{...h,"data-path":_,className:y}),t[34]=h,t[35]=n.data.path,t[36]=y,t[37]=b):b=t[37];let x;return t[38]!==g||t[39]!==b?(x=(0,$.jsxs)($.Fragment,{children:[g,b]}),t[38]=g,t[39]=b,t[40]=x):x=t[40],x}function Zn(e){let t=(0,Z.c)(59),{d:n,isSearchMatch:r,children:i}=e,a=i===void 0?null:i,o;t[0]===n?o=t[1]:(o=er(n),t[0]=n,t[1]=o);let s=o,c=Qn(n.data);if(a===null)return null;let l,u,d,f,p,m,h,g,_,v;if(t[2]!==a||t[3]!==c[0]||t[4]!==c.length||t[5]!==n||t[6]!==s||t[7]!==r){u=Symbol.for(`react.early_return_sentinel`);bb0:{let e=We(c.length>1||c.length===0?`#ffffff`:c[0]),i=s?`50%`:void 0,o=s&&Y(n.data)?`central`:`hanging`,y=s?`middle`:`start`,b=`#path-${n.data.path}`,x;t[18]!==i||t[19]!==o||t[20]!==y||t[21]!==b?(x={startOffset:i,dominantBaseline:o,textAnchor:y,href:b,className:`font-bold tracking-widest`},t[18]=i,t[19]=o,t[20]=y,t[21]=b,t[22]=x):x=t[22],v=x;let S=er(n)?n.r*2-10/2:0,C=!1;if(er(n)){if(Ve(n.data)){if(n.r*2-10>n.data.name.length*7&&(C=!0),n.r*2-10<16){u=null;break bb0}}else if(n.r<(Y(n.data),16)*2||n.r*Math.PI*.6666666666666666<n.data.name.length*7.3){u=null;break bb0}}else{let e=n;if(Ve(n.data)&&e.y1-e.y0-10<16){u=null;break bb0}}let w;t[23]===n?w=t[24]:(w=er(n)?rr(n.x,n.y+(Y(n.data)?15:16),n.r):void 0,t[23]=n,t[24]=w);let T=`path-${n.data.path}`,E;t[25]!==w||t[26]!==T?(E=(0,$.jsx)(`path`,{d:w,id:T}),t[25]=w,t[26]=T,t[27]=E):E=t[27];let D=`clip-path-${n.data.path}`,O;t[28]!==n||t[29]!==S?(O=(0,$.jsx)(`rect`,{stroke:`red`,fill:`transparent`,...er(n)?{x:n.x-n.r+10/4+.5,y:n.y-n.r+16-1+10/4+.5,width:Math.max(S-1,0),height:Math.max(n.r*2-10/2-1,0),rx:n.r,ry:n.r}:{x:n.x0+10/2,y:n.y0,width:Math.max(n.x1-n.x0-10,0),height:Math.max(n.y1-n.y0-10,0),...Y(n.data)?{rx:8,ry:8}:{rx:4,ry:4}}}),t[28]=n,t[29]=S,t[30]=O):O=t[30];let k;t[31]!==D||t[32]!==O?(k=(0,$.jsx)(`clipPath`,{id:D,children:O}),t[31]=D,t[32]=O,t[33]=k):k=t[33],t[34]!==E||t[35]!==k?(_=(0,$.jsxs)(`defs`,{children:[E,k]}),t[34]=E,t[35]=k,t[36]=_):_=t[36],t[37]!==a||t[38]!==n||t[39]!==v?(l=Y(n.data)&&er(n)?(0,$.jsx)(`text`,{className:R(`stroke-primary-bg dark:stroke-primary-bg-dark pointer-events-none fill-none stroke-5`),strokeLinecap:`round`,children:(0,$.jsx)(`textPath`,{...v,children:a})}):null,t[37]=a,t[38]=n,t[39]=v,t[40]=l):l=t[40],d=C?`middle`:void 0,f=`hanging`,t[41]===n?p=t[42]:(p=!er(n)||Ve(n.data)?{clipPath:`url(#clip-path-${n.data.path})`}:{},t[41]=n,t[42]=p),m=er(n)?Y(n.data)?0:n.x-(C?0:n.r-10/2):n.x0+10/2,h=er(n)?Y(n.data)?0:n.y+16/2:n.y0+10/2,g=R(`pointer-events-none stroke-none transition-all`,{"font-bold underline":r,"font-bold":Y(n.data),"fill-primary-text-dark":e&&Ve(n.data),"fill-primary-text":!e&&Ve(n.data)})}t[2]=a,t[3]=c[0],t[4]=c.length,t[5]=n,t[6]=s,t[7]=r,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_,t[17]=v}else l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15],_=t[16],v=t[17];if(u!==Symbol.for(`react.early_return_sentinel`))return u;let y;t[43]!==a||t[44]!==n||t[45]!==v?(y=Y(n.data)&&er(n)?(0,$.jsx)(`textPath`,{...v,children:a}):a,t[43]=a,t[44]=n,t[45]=v,t[46]=y):y=t[46];let b;t[47]!==y||t[48]!==d||t[49]!==f||t[50]!==p||t[51]!==m||t[52]!==h||t[53]!==g?(b=(0,$.jsx)(`text`,{textAnchor:d,alignmentBaseline:f,...p,x:m,y:h,className:g,children:y}),t[47]=y,t[48]=d,t[49]=f,t[50]=p,t[51]=m,t[52]=h,t[53]=g,t[54]=b):b=t[54];let x;return t[55]!==l||t[56]!==b||t[57]!==_?(x=(0,$.jsxs)(`g`,{children:[_,l,b]}),t[55]=l,t[56]=b,t[57]=_,t[58]=x):x=t[58],x}function Qn(e){let t=(0,Z.c)(14),n=it(),r=ge(),{metricType:i}=tt(),a;if(t[0]!==i||t[1]!==n){let e;t[3]===i?e=t[4]:(e=e=>e.startsWith(`${i}:`),t[3]=i,t[4]=e),a=n.filter(e),t[0]=i,t[1]=n,t[2]=a}else a=t[2];let o=a.length===0,[s]=Ae(),c;t[5]!==r||t[6]!==i||t[7]!==s||t[8]!==o||t[9]!==e?(c=[s.get(i)].flatMap(t=>t?.categoriesMap?.get(e.path)?.filter(e=>r(e.category)||o)??[]),t[5]=r,t[6]=i,t[7]=s,t[8]=o,t[9]=e,t[10]=c):c=t[10];let l=c;if((l?.length??0)===0&&Ve(e)){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=[{category:de,color:Oe}],t[11]=e):e=t[11],l=e}let u;return t[12]===l?u=t[13]:(u=l.map($n),t[12]=l,t[13]=u),u}function $n(e){return e.color}function er(e){return typeof e.r==`number`}function tr({databaseInfo:e,tree:t,size:n,chartType:r,sizeMetricType:i,renderCutOff:a}){let o=Zt(t).sum(t=>{if(Y(t))return 0;switch(i){case`FILE_SIZE`:return t.byteSize??1;case`MOST_COMMITS`:return e.commitCounts[t.path]??1;case`EQUAL_SIZE`:return 1;case`LAST_CHANGED`:return 2**(Te.getBuckets(e).length-Te.getBucketIndex(t,e));case`MOST_CONTRIBUTIONS`:return e.contribSumPerFile[t.path]??1}}).sort((e,t)=>(t.value??1)-(e.value??1)),s=Number.isNaN(a)?2:a;if(r===`TREE_MAP`||r===`PARTITION`){let e=(r===`TREE_MAP`?Vn().size([n.width,n.height]).round(!0).tile(Hn).paddingInner(2).paddingOuter(4).paddingTop(21):In().size([n.width,n.height]).padding(0))(o);return nr(e,e=>{let t=e;return t.x1-t.x0>=s&&t.y1-t.y0>=s}),e}if(r===`BUBBLE_CHART`){let e=An().size([n.width,n.height-16]).padding(10)(o);return nr(e,e=>e.r>=s),e}else throw Error(`Unknown chart type: `+r)}function nr(e,t){e.children&&=e.children.filter(e=>t(e));for(let n of e.children??[])(n.children?.length??0)>0&&nr(n,t)}function rr(e,t,n){return`M${e},${t}
2
+ m0,${n}
3
+ a${n},${n} 0 1,1 0,${-n*2}
4
+ a${n},${n} 0 1,1 0,${n*2}`}function ir(e){let t=(0,Z.c)(23),{open:n,onClose:r,children:i,title:a,icon:o}=e,s=(0,Q.useRef)(null),c,l;t[0]===n?(c=t[1],l=t[2]):(c=()=>{let e=s.current;if(e)return n?(document.body.style.setProperty(`overflow`,`hidden`),e.open||e.showModal()):(document.body.style.setProperty(`overflow`,null),e.open&&e.close()),ar},l=[n],t[0]=n,t[1]=c,t[2]=l),(0,Q.useEffect)(c,l);let u=n?`visible`:`hidden`,d;t[3]===o?d=t[4]:(d=(0,$.jsx)(L,{path:o,size:`1.75em`}),t[3]=o,t[4]=d);let f;t[5]===a?f=t[6]:(f=(0,$.jsx)(`h2`,{className:`text-2xl font-semibold`,children:a}),t[5]=a,t[6]=f);let p;t[7]!==d||t[8]!==f?(p=(0,$.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[d,f]}),t[7]=d,t[8]=f,t[9]=p):p=t[9];let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)($e,{absolute:!1,className:`justify-self-end px-1`,onClick:()=>s.current?.close()}),t[10]=m):m=t[10];let h;t[11]===p?h=t[12]:(h=(0,$.jsxs)(`div`,{className:`flex justify-between gap-2`,children:[p,m]}),t[11]=p,t[12]=h);let g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`span`,{className:`w-full border-b-3 border-gray-500 px-20`}),t[13]=g):g=t[13];let _;t[14]!==i||t[15]!==h?(_=(0,$.jsxs)(`div`,{className:`card flex min-h-0 max-w-(--breakpoint-2xl) gap-2 rounded-xl p-4 shadow-sm`,children:[h,g,i]}),t[14]=i,t[15]=h,t[16]=_):_=t[16];let v;t[17]!==r||t[18]!==_?(v=(0,$.jsx)(`dialog`,{ref:s,"aria-modal":!0,open:!1,closedby:`any`,className:`z-10 m-auto flex flex-col bg-transparent text-inherit backdrop:bg-gray-400/75 backdrop:backdrop-blur-xs dark:backdrop:bg-gray-800/75`,onClose:r,children:_}),t[17]=r,t[18]=_,t[19]=v):v=t[19];let y;return t[20]!==v||t[21]!==u?(y=(0,$.jsx)(Q.Activity,{mode:u,children:v}),t[20]=v,t[21]=u,t[22]=y):y=t[22],y}function ar(){document.body.style.setProperty(`overflow`,null)}function or(e){let t=(0,Z.c)(45),{open:n,onClose:r}=e,i=l(),{databaseInfo:a}=J(),o=(0,Q.useRef)(null),s=K(),c,u,f;if(t[0]!==a.hiddenFiles||t[1]!==i.formData||t[2]!==i.state){u=i.state!==`idle`&&i.formData?i.formData.get(`hide`):null;let e;t[6]!==i.formData||t[7]!==i.state?(e=i.state!==`idle`&&i.formData?i.formData.get(`show`):null,t[6]=i.formData,t[7]=i.state,t[8]=e):e=t[8],f=e,c=[...a.hiddenFiles],u&&!a.hiddenFiles.includes(u)&&c.unshift(u),t[0]=a.hiddenFiles,t[1]=i.formData,t[2]=i.state,t[3]=c,t[4]=u,t[5]=f}else c=t[3],u=t[4],f=t[5];let p;t[9]!==c||t[10]!==f?(p=c.filter(e=>e!==f),t[9]=c,t[10]=f,t[11]=p):p=t[11];let m=p,h;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`p`,{className:`text-sm`,children:`Pattern-matched files are hidden from the file tree and excluded from metric computations.`}),t[12]=h):h=t[12];let g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsxs)(`p`,{className:`text-sm`,children:[`Hidden files behave like entries in a `,(0,$.jsx)(at,{inline:!0,children:`.gitignore`}),` file.`]}),t[13]=g):g=t[13];let _;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{setTimeout(()=>{o.current&&(o.current.value=``)},0)},t[14]=_):_=t[14];let v;t[15]===a.hiddenFiles?v=t[16]:(v=(0,$.jsxs)(`label`,{className:`label flex min-w-0 flex-1 flex-col gap-2`,children:[`Path or glob`,(0,$.jsx)(`input`,{ref:o,type:`text`,className:`input`,name:`hide`,placeholder:`Enter pattern...`,onChange:e=>{let t=a.hiddenFiles.includes(e.target.value);e.target.setCustomValidity(t?`Pattern already exists`:``)}})]}),t[15]=a.hiddenFiles,t[16]=v);let x;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(`button`,{className:`btn btn--primary whitespace-nowrap`,children:`Hide`}),t[17]=x):x=t[17];let S;t[18]!==v||t[19]!==s?(S=(0,$.jsxs)(d,{action:s,method:`post`,className:`flex w-full flex-wrap items-end gap-2`,onSubmit:_,children:[v,x]}),t[18]=v,t[19]=s,t[20]=S):S=t[20];let C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(`h3`,{className:`text-tertiary-text dark:text-tertiary-text-dark text-sm font-bold tracking-wide uppercase`,children:`Hidden files/patterns`}),t[21]=C):C=t[21];let w=a.hiddenFiles.length===0,T;t[22]===w?T=t[23]:(T=R({hidden:w}),t[22]=w,t[23]=T);let E,D;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(`input`,{type:`hidden`,name:`unhideAll`,value:`true`}),D=(0,$.jsx)(`button`,{className:`btn btn--danger btn--text`,children:`Reset`}),t[24]=E,t[25]=D):(E=t[24],D=t[25]);let O;t[26]!==T||t[27]!==s?(O=(0,$.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[C,(0,$.jsxs)(d,{action:s,method:`post`,className:T,children:[E,D]})]}),t[26]=T,t[27]=s,t[28]=O):O=t[28];let k;t[29]!==m||t[30]!==i.state||t[31]!==u||t[32]!==f||t[33]!==s?(k=m.length>0?m.map(e=>{let t=e===u;return(0,$.jsxs)(`div`,{className:`primary grid grid-cols-[auto_1fr] items-center gap-2 rounded-md px-2 py-1 text-sm`,style:{opacity:t?.6:e===f?.4:1},title:e,children:[(0,$.jsxs)(d,{action:s,className:`w-4`,method:`post`,children:[(0,$.jsx)(`input`,{type:`hidden`,name:`show`,value:e}),(0,$.jsxs)(`button`,{className:`btn btn--text btn--hover-swap h-4`,title:`Show file`,disabled:i.state!==`idle`||t,children:[(0,$.jsx)(L,{path:b,className:`inline-block h-full`}),(0,$.jsx)(L,{path:y,className:`hover-swap inline-block h-full`})]})]}),(0,$.jsx)(`span`,{className:`truncate text-sm`,title:e,children:sr(e)})]},e)}):(0,$.jsx)(`div`,{className:`text-secondary-text dark:text-secondary-text-dark text-sm opacity-70`,children:`No hidden files`}),t[29]=m,t[30]=i.state,t[31]=u,t[32]=f,t[33]=s,t[34]=k):k=t[34];let A;t[35]===k?A=t[36]:(A=(0,$.jsx)(`div`,{className:`flex max-h-96 min-h-0 w-full flex-col gap-2 overflow-y-auto`,children:k}),t[35]=k,t[36]=A);let j;t[37]!==O||t[38]!==A||t[39]!==S?(j=(0,$.jsxs)(`div`,{className:`flex min-h-0 max-w-[40ch] flex-col items-start justify-center gap-3 overflow-y-auto p-2 pl-0`,children:[h,g,S,O,A]}),t[37]=O,t[38]=A,t[39]=S,t[40]=j):j=t[40];let M;return t[41]!==r||t[42]!==n||t[43]!==j?(M=(0,$.jsx)(ir,{open:n,title:`Hide files`,icon:b,onClose:r,children:j}),t[41]=r,t[42]=n,t[43]=j,t[44]=M):M=t[44],M}function sr(e){if(!e.includes(ze(e)))return e;let t=e.split(ze(e));return t[t.length-1]}function cr(){let e=(0,Z.c)(4),[t,n]=(0,Q.useState)(!1),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`button`,{className:`btn btn--icon btn--text`,title:`Hidden files`,"aria-label":`Hidden files`,onClick:()=>n(!0),children:(0,$.jsx)(L,{path:b})}),e[0]=r):r=e[0];let i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>n(!1),e[1]=i):i=e[1];let a;return e[2]===t?a=e[3]:(a=(0,$.jsxs)($.Fragment,{children:[r,(0,$.jsx)(or,{open:t,onClose:i})]}),e[2]=t,e[3]=a),a}function lr(e,t){let n={};for(let r in e)n[r]=e[r][t];return n}var ur={FILE_TYPE:`FILE_SIZE`,FILE_SIZE:`FILE_SIZE`,TOP_CONTRIBUTOR:`MOST_CONTRIBUTIONS`,MOST_COMMITS:`MOST_COMMITS`,LAST_CHANGED:`LAST_CHANGED`,MOST_CONTRIBUTIONS:`MOST_CONTRIBUTIONS`,CONTRIBUTORS:`EQUAL_SIZE`};function dr(){let e=(0,Z.c)(29),{metricType:t,chartType:n,sizeMetric:r,linkMetricAndSizeMetric:i,setMetricType:a,setChartType:o,setSizeMetricType:s}=tt(),c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=lr(Be,`icon`),e[0]=c):c=e[0];let l=c,u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=lr(Be,`description`),e[1]=u):u=e[1];let d=u,f;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=lr(Ze,`icon`),e[2]=f):f=e[2];let p=f,m;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=lr({FILE_SIZE:ht,MOST_COMMITS:fe,MOST_CONTRIBUTIONS:_e,EQUAL_SIZE:{icon:z},LAST_CHANGED:Te},`icon`),e[3]=m):m=e[3];let h=m,g;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`label`,{htmlFor:`layout`,className:`text-tertiary-text dark:text-tertiary-text-dark ml-8 text-xs font-bold whitespace-nowrap`,children:`Layout`}),e[4]=g):g=e[4];let _;e[5]===o?_=e[6]:(_=e=>o(e),e[5]=o,e[6]=_);let v;e[7]!==n||e[8]!==_?(v=(0,$.jsx)(Dt,{group:Re,defaultValue:n,iconMap:p,ariaLabel:`Select layout`,onChange:_}),e[7]=n,e[8]=_,e[9]=v):v=e[9];let y;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`h3`,{className:`text-tertiary-text dark:text-tertiary-text-dark ml-8 text-xs font-bold whitespace-nowrap`,title:`Select the metric used to size the visualization`,children:`Node Size`}),e[10]=y):y=e[10];let b;e[11]===s?b=e[12]:(b=e=>{s(e)},e[11]=s,e[12]=b);let x;e[13]!==r||e[14]!==b?(x=(0,$.jsx)(Dt,{titleMap:Ge,group:lt,defaultValue:r,iconMap:h,ariaLabel:`Select size metric`,onChange:b}),e[13]=r,e[14]=b,e[15]=x):x=e[15];let S;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(`h3`,{className:`text-tertiary-text dark:text-tertiary-text-dark ml-8 text-xs font-bold whitespace-nowrap`,title:`Select the metric used to color the visualization`,children:`Node Color`}),e[16]=S):S=e[16];let C;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=Object.fromEntries(Object.entries(Be).map(fr)),e[17]=C):C=e[17];let w;e[18]!==i||e[19]!==a||e[20]!==s?(w=e=>{if(a(e),!i)return;let t=ur[e];t&&s(t)},e[18]=i,e[19]=a,e[20]=s,e[21]=w):w=e[21];let T;e[22]!==t||e[23]!==w?(T=(0,$.jsx)(Dt,{titleMap:d,group:C,defaultValue:t,iconMap:l,ariaLabel:`Select color metric`,onChange:w}),e[22]=t,e[23]=w,e[24]=T):T=e[24];let E;return e[25]!==T||e[26]!==v||e[27]!==x?(E=(0,$.jsxs)(`div`,{className:`grid grid-flow-col grid-cols-3 grid-rows-[auto_auto] items-start gap-0`,children:[g,v,y,x,S,T]}),e[25]=T,e[26]=v,e[27]=x,e[28]=E):E=e[28],E}function fr(e){let[t,n]=e;return[t,n.name]}var pr=2,mr=70,hr=10,gr=7,_r=20,vr=40;function yr(e){let t=new Date(e*1e3),n=new Date(t);n.setUTCDate(n.getUTCDate()+4-(n.getUTCDay()||7));let r=new Date(Date.UTC(n.getUTCFullYear(),0,1)),i=Math.ceil(((n.getTime()-r.getTime())/864e5+1)/7);return`Week ${i<10?`0`:``}${i}, ${n.getUTCFullYear()}`}function br(e,t){switch(t){case`week`:return yr(e);case`month`:return new Date(e*1e3).toLocaleString(`en-gb`,{month:`long`,year:`numeric`,timeZone:`UTC`});case`year`:return new Date(e*1e3).getUTCFullYear().toString();case`day`:return et(e*1e3,{weekday:`short`})}}function xr(e){let t=(0,Z.c)(40),{scale:n,className:r}=e,{databaseInfo:i}=J(),a;t[0]===i.selectedRange[0]?a=t[1]:(a=X.start.withDefault(i.selectedRange[0]),t[0]=i.selectedRange[0],t[1]=a);let o;t[2]===i.selectedRange[1]?o=t[3]:(o=X.end.withDefault(i.selectedRange[1]),t[2]=i.selectedRange[1],t[3]=o);let s;t[4]!==a||t[5]!==o?(s={start:a,end:o},t[4]=a,t[5]=o,t[6]=s):s=t[6];let[c,l]=vt(s),{start:u,end:d}=c,{metricType:f}=tt(),p;t[7]===f?p=t[8]:(p=Ke(f),t[7]=f,t[8]=p);let m=p,h=it(),g;if(t[9]!==f||t[10]!==h){let e;t[12]===f?e=t[13]:(e=e=>e.slice(f.length+1),t[12]=f,t[13]=e),g=new Set(h.map(e)),t[9]=f,t[10]=h,t[11]=g}else g=t[11];let _=g,[,v]=Ae(),y=H(),b=he(),x=ye(y),S=ye(i.fileTree)??`#606060`,C=x?{fill:x}:{fill:Oe},w=(0,Q.useRef)(null),[T,E]=Ie(),D=(0,Q.useDeferredValue)(E),O;t[14]===n?O=t[15]:(O=e=>({...e,countLogged:n===`log`?Math.log10(e.count+1):e.count}),t[14]=n,t[15]=O);let k=i.commitCountPerTimeInterval.map(O),A=D.width,j=i.commitCountPerTimeIntervalForClickedObject,M=y.path===i.repo,N=i.commitCountPerTimeIntervalUnit,P=Un().domain(k.map(Tr)).range([0,A]),F=ke().domain([0,Pt(k,wr)||0]).range([mr,0]),I=Math.max(1,P.bandwidth()-pr*2),ee=Math.max(1,Math.ceil(vr/2/P.step()))*2,te=ee/2,L;t[16]===l?L=t[17]:(L=function(e){l(t=>({...t,start:e[0],end:e[1]}))},t[16]=l,t[17]=L);let ne=L,z;t[18]===N?z=t[19]:(z=e=>[e.timestamp.toString(),Ye(e.timestamp,N)],t[18]=N,t[19]=z);let re=Object.fromEntries(k.map(z)),ie=new Map,B;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(B=function(e){return e instanceof SVGRectElement?e.dataset.id:void 0},t[20]=B):B=t[20];let ae=B,V;t[21]===r?V=t[22]:(V=R(`flex flex-col justify-center`,r),t[21]=r,t[22]=V);let U=mr+hr+_r,W;t[23]!==re||t[24]!==ne?(W=e=>{let t=ae(e.target);if(!t)return;let[n,r]=re[t];ne([n+1,r-1])},t[23]=re,t[24]=ne,t[25]=W):W=t[25];let oe=e=>{let t=ae(e.target),n=t?ie.get(t):void 0;n&&(e.stopPropagation(),b(n))},G;t[26]===b?G=t[27]:(G=()=>b(null),t[26]=b,t[27]=G);let K=k.map((e,t)=>{let r=t%ee===0,a=t%te===0,o=P(e.timestamp.toString())??0,s=o+pr,c=mr-F(e.countLogged),l=F(e.countLogged),[f,p]=re[e.timestamp.toString()],g=p>u&&f<d,b=M?void 0:j.find(e=>e.timestamp>=f&&e.timestamp<p),x=M?e:b,w=Object.entries(x?.contributors??{}).sort(Cr),T=x&&h.length>0?w.filter(e=>{let[t]=e;return _.has(t)}):[],E=T.reduce(Sr,0),D=h.length>0?E:x?.count??0,O=D>0,k=n===`log`?Math.log10(D+1):D,A=mr-F(k),L=F(k),R=br(f,N),ne=L+A,z=T.map(e=>{let[t,n]=e,r=n/D*A,i=ne-r;return ne=i,{author:t,y:i,height:r,fill:v.get(t)??`#606060`}}),B=x&&h.length===0?w.map(e=>{let[t]=e;return v.get(t)??`#606060`}):[],ae=(h.length>0?T:w).map(e=>{let[t,n]=e;return{name:t,color:v.get(t)??`#606060`,commitCount:n}}),V={label:R,totalCommitCount:e.count,totalObjectName:i.repo,clickedObjectName:M?null:y.name,clickedCommitCount:b?.count??null,contributors:m?ae:[]},H={id:e.timestamp.toString(),x:s,y:l,hitX:o,width:I,hitWidth:P.bandwidth(),height:c,clickedY:L,clickedHeight:A,date:e.date,tooltip:V,shouldDrawLabel:r,shouldDrawTick:a,isInRange:g,hasFileActivity:O,clickedObjectIsRepo:M,clickedFill:C.fill,stackedSlices:z,gradientColors:B,rootColor:S,interval:[f,p]};return ie.set(H.id,H.tooltip),(0,$.jsx)(Er,{node:H},H.id)}),se=`M0,${mr+1} L${A},${mr+1}`,q;t[28]===se?q=t[29]:(q=(0,$.jsx)(`path`,{d:se,className:`stroke-gray-500`,strokeWidth:1}),t[28]=se,t[29]=q);let ce;t[30]!==W||t[31]!==oe||t[32]!==G||t[33]!==K||t[34]!==q?(ce=(0,$.jsxs)(`svg`,{ref:w,width:`100%`,height:U,className:`fill-transparent`,onClick:W,onMouseOver:oe,onMouseOut:G,children:[K,q]}),t[30]=W,t[31]=oe,t[32]=G,t[33]=K,t[34]=q,t[35]=ce):ce=t[35];let le;return t[36]!==T||t[37]!==V||t[38]!==ce?(le=(0,$.jsx)(`div`,{ref:T,className:V,children:ce}),t[36]=T,t[37]=V,t[38]=ce,t[39]=le):le=t[39],le}function Sr(e,t){let[,n]=t;return e+n}function Cr(e,t){return t[1]-e[1]}function wr(e){return e.countLogged}function Tr(e){return e.timestamp.toString()}function Er(e){let t=(0,Z.c)(66),{node:n}=e,{metricType:r}=tt(),i;t[0]===r?i=t[1]:(i=Ke(r),t[0]=r,t[1]=i);let a=i,{fill:o,linearGradient:s}=Kn(Se(H())),{fill:c,linearGradient:l}=Kn(n.gradientColors),u=n.gradientColors.length>1,d;t[2]!==o||t[3]!==c||t[4]!==u||t[5]!==a||t[6]!==n.clickedFill||t[7]!==n.gradientColors[0]||t[8]!==n.gradientColors.length?(d=a?u?{fill:c}:n.gradientColors.length===1?{fill:n.gradientColors[0]}:n.clickedFill?{fill:n.clickedFill}:{}:{fill:o},t[2]=o,t[3]=c,t[4]=u,t[5]=a,t[6]=n.clickedFill,t[7]=n.gradientColors[0],t[8]=n.gradientColors.length,t[9]=d):d=t[9];let f=d,p=n.hasFileActivity&&!n.clickedObjectIsRepo&&n.stackedSlices.length===0,m=n.isInRange?``:`opacity-30`,h=u?l:null,g=a?null:s,_=n.hitX,v=n.hitWidth,y=n.id,b;t[10]===n.tooltip?b=t[11]:(b=ue(n.tooltip),t[10]=n.tooltip,t[11]=b);let x;t[12]!==n.hitWidth||t[13]!==n.hitX||t[14]!==n.id||t[15]!==b?(x=(0,$.jsx)(`rect`,{x:_,y:0,width:v,height:mr+hr+_r,rx:4,ry:4,className:`peer cursor-pointer fill-transparent stroke-transparent stroke-1`,"data-id":y,"aria-label":b}),t[12]=n.hitWidth,t[13]=n.hitX,t[14]=n.id,t[15]=b,t[16]=x):x=t[16];let S=n.x,C=n.y,w=n.width,T=n.height,E=n.rootColor,D=n.clickedObjectIsRepo?``:`opacity-40`,O;t[17]===D?O=t[18]:(O=R(`pointer-events-none stroke-transparent stroke-2 opacity-100 transition-[height,width,x,y,fill,opacity] duration-300 ease-out peer-hover:stroke-black`,D),t[17]=D,t[18]=O);let k;t[19]!==n.height||t[20]!==n.rootColor||t[21]!==n.width||t[22]!==n.x||t[23]!==n.y||t[24]!==O?(k=(0,$.jsx)(`rect`,{x:S,y:C,width:w,height:T,rx:4,ry:4,fill:E,className:O}),t[19]=n.height,t[20]=n.rootColor,t[21]=n.width,t[22]=n.x,t[23]=n.y,t[24]=O,t[25]=k):k=t[25];let A;t[26]!==f||t[27]!==n.clickedHeight||t[28]!==n.clickedY||t[29]!==n.isInRange||t[30]!==n.width||t[31]!==n.x||t[32]!==p?(A=p?(0,$.jsx)(`rect`,{x:n.x,y:n.clickedY,width:n.width,height:n.clickedHeight,rx:4,ry:4,className:R(`pointer-events-none opacity-100 transition-[height,width,x,y,fill,opacity] duration-300 ease-out`,n.isInRange?`fill-blue-primary`:`fill-blue-primary/50`,{"opacity-0":n.x===0}),style:f}):null,t[26]=f,t[27]=n.clickedHeight,t[28]=n.clickedY,t[29]=n.isInRange,t[30]=n.width,t[31]=n.x,t[32]=p,t[33]=A):A=t[33];let j;if(t[34]!==n.isInRange||t[35]!==n.stackedSlices||t[36]!==n.width||t[37]!==n.x){let e;t[39]!==n.isInRange||t[40]!==n.stackedSlices.length||t[41]!==n.width||t[42]!==n.x?(e=(e,t)=>{let r=t===0,i=t===n.stackedSlices.length-1;return(0,$.jsx)(`rect`,{x:n.x,y:e.y,width:n.width,height:e.height,rx:i||r?4:0,ry:i||r?4:0,className:R(`pointer-events-none opacity-100 transition-[height,width,x,y,fill,opacity] duration-300 ease-out`,{"opacity-50":!n.isInRange}),style:{fill:e.fill}},e.author)},t[39]=n.isInRange,t[40]=n.stackedSlices.length,t[41]=n.width,t[42]=n.x,t[43]=e):e=t[43],j=n.stackedSlices.map(e),t[34]=n.isInRange,t[35]=n.stackedSlices,t[36]=n.width,t[37]=n.x,t[38]=j}else j=t[38];let M;t[44]!==n.isInRange||t[45]!==n.shouldDrawLabel||t[46]!==n.shouldDrawTick||t[47]!==n.width||t[48]!==n.x?(M=n.shouldDrawTick?(0,$.jsx)(`path`,{d:`M${n.x+n.width/2},${mr+1} L${n.x+n.width/2},${mr+(n.shouldDrawLabel?hr:gr)-2}`,className:R(`peer-hover:stroke-blue-primary pointer-events-none`,n.isInRange?`stroke-gray-500`:`stroke-gray-500/30`),strokeWidth:1}):null,t[44]=n.isInRange,t[45]=n.shouldDrawLabel,t[46]=n.shouldDrawTick,t[47]=n.width,t[48]=n.x,t[49]=M):M=t[49];let N;t[50]!==n.date||t[51]!==n.isInRange||t[52]!==n.shouldDrawLabel||t[53]!==n.width||t[54]!==n.x?(N=n.shouldDrawLabel?(0,$.jsx)(`text`,{textAnchor:`middle`,dominantBaseline:`central`,x:n.x+n.width/2,y:mr+hr+_r/2,className:R(`peer-hover:fill-blue-primary pointer-events-none text-xs transition-[x]`,n.isInRange?`fill-primary-text dark:fill-primary-text-dark`:`fill-tertiary-text dark:fill-tertiary-text-dark`),children:n.date}):null,t[50]=n.date,t[51]=n.isInRange,t[52]=n.shouldDrawLabel,t[53]=n.width,t[54]=n.x,t[55]=N):N=t[55];let P;return t[56]!==x||t[57]!==k||t[58]!==A||t[59]!==j||t[60]!==M||t[61]!==N||t[62]!==m||t[63]!==h||t[64]!==g?(P=(0,$.jsxs)(`g`,{className:m,children:[h,g,x,k,A,j,M,N]}),t[56]=x,t[57]=k,t[58]=A,t[59]=j,t[60]=M,t[61]=N,t[62]=m,t[63]=h,t[64]=g,t[65]=P):P=t[65],P}var Dr=[{label:`1d`,durationSecs:1440*60,title:`Last 24 hours`,visibleForUnits:[`day`]},{label:`7d`,durationSecs:10080*60,title:`Last 7 days`,visibleForUnits:[`day`,`week`]},{label:`1m`,durationSecs:720*60*60,durationMonths:1,title:`Last 1 month`,visibleForUnits:[`day`,`week`,`month`]},{label:`3m`,durationSecs:2160*60*60,durationMonths:3,title:`Last 3 months`,visibleForUnits:[`day`,`week`,`month`]},{label:`6m`,durationSecs:4320*60*60,durationMonths:6,title:`Last 6 months`,visibleForUnits:[`day`,`week`,`month`]},{label:`YTD`,durationSecs:null,visibleForUnits:[`day`,`week`,`month`],title:`Year to last change date`},{label:`1yr`,durationSecs:1*365*24*60*60,durationMonths:12,title:`Last 1 year`,visibleForUnits:[`day`,`week`,`month`]},{label:`All`,durationSecs:1/0,title:`Entire project history`,visibleForUnits:[`day`,`week`,`month`,`year`]}];function Or(e){let t=(0,Z.c)(27),{unit:n}=e,{timerange:r}=J().databaseInfo,i;t[0]===r[0]?i=t[1]:(i=X.start.withDefault(r[0]),t[0]=r[0],t[1]=i);let a;t[2]===r[1]?a=t[3]:(a=X.end.withDefault(r[1]),t[2]=r[1],t[3]=a);let o;t[4]!==i||t[5]!==a?(o={...X,start:i,end:a},t[4]=i,t[5]=a,t[6]=o):o=t[6];let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s={clearOnDefault:!1},t[7]=s):s=t[7];let[c,l]=vt(o,s),[,u]=(0,Q.useTransition)(),d;t[8]!==c.end||t[9]!==c.start?(d=[c.start,c.end],t[8]=c.end,t[9]=c.start,t[10]=d):d=t[10];let[f,p]=(0,Q.useOptimistic)(d,kr),m=r[1]-r[0],h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=function(e,t){let n=new Date(e*1e3);return n.setUTCDate(1),n.setUTCHours(0,0,0,0),n.setUTCMonth(n.getUTCMonth()-t+1),Math.floor(n.getTime()/1e3)},t[11]=h):h=t[11];let g=h,_;t[12]!==r[0]||t[13]!==r[1]||t[14]!==n?(_=function(e){let{duration:t,durationMonths:i}=e,a=r[1];return[n===`month`&&i?g(a,i):t===1/0?r[0]:a-Math.floor(t),a]},t[12]=r[0],t[13]=r[1],t[14]=n,t[15]=_):_=t[15];let v=_,y;t[16]!==v||t[17]!==f||t[18]!==m||t[19]!==p||t[20]!==l||t[21]!==u||t[22]!==r[1]||t[23]!==n?(y=Dr.map(e=>{if(!e.visibleForUnits.includes(n))return null;let t=new Date(r[1]*1e3);t.setMonth(0,1);let i=e.durationSecs??r[1]-t.getTime()/1e3,a=v({duration:i,durationMonths:e.durationMonths}),o=e.durationSecs===1/0&&f[1]-f[0]>=m||f[0]===a[0]&&f[1]===a[1];return i<=m||i===1/0?(0,$.jsx)(`button`,{className:R(`cursor-pointer rounded-full p-1 text-sm transition-opacity hover:opacity-80`,o?`bg-secondary-bg dark:bg-secondary-bg-dark text-primary-text dark:text-primary-text-dark`:`text-tertiary-text dark:text-tertiary-text-dark`),title:e.title,onClick:()=>{u(async()=>{p(a),await l(e=>({...e,start:a[0],end:a[1]}))})},children:e.label},e.label):null}),t[16]=v,t[17]=f,t[18]=m,t[19]=p,t[20]=l,t[21]=u,t[22]=r[1],t[23]=n,t[24]=y):y=t[24];let b;return t[25]===y?b=t[26]:(b=(0,$.jsx)(`div`,{className:`bg-primary-bg dark:bg-primary-bg-dark flex justify-end gap-0.5 rounded-full p-1`,children:y}),t[25]=y,t[26]=b),b}function kr(e,t){return t}function Ar(){let e=(0,Z.c)(11),t=J(),n;e[0]===t.databaseInfo.commitCountPerTimeIntervalUnit?n=e[1]:(n=X.timeUnit.withDefault(t.databaseInfo.commitCountPerTimeIntervalUnit),e[0]=t.databaseInfo.commitCountPerTimeIntervalUnit,e[1]=n);let[r,i]=_t(`timeUnit`,n),a;e[2]===i?a=e[3]:(a=e=>i(e.target.value),e[2]=i,e[3]=a);let o;e[4]!==i||e[5]!==r?(o=bt.map(e=>(0,$.jsx)(`option`,{className:R(`text-primary-text bg-primary-bg dark:text-primary-text-dark dark:bg-primary-bg-dark btn capitalize`,r===e?`btn--outlined`:`btn--text`),value:e,onClick:()=>i(e),children:e},e)),e[4]=i,e[5]=r,e[6]=o):o=e[6];let s;return e[7]!==a||e[8]!==o||e[9]!==r?(s=(0,$.jsx)(`select`,{className:`uppercase`,name:`timeUnit`,value:r,onChange:a,children:o}),e[7]=a,e[8]=o,e[9]=r,e[10]=s):s=e[10],s}function jr(e){let t=(0,Z.c)(13),{children:n}=e,r=H(),i=J(),a=Y(r)?`Commits that changed this folder`:`Commits that changed this file`,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(Ct,{}),t[0]=o):o=t[0];let s;t[1]===a?s=t[2]:(s=(0,$.jsxs)(`h2`,{className:`flex items-center gap-2`,title:a,children:[`Commit activity for`,o]}),t[1]=a,t[2]=s);let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`div`,{}),t[3]=c):c=t[3];let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsxs)(`div`,{className:`flex items-start`,children:[`Per`,(0,$.jsx)(Ar,{})]}),t[4]=l):l=t[4];let u;t[5]===i.databaseInfo.commitCountPerTimeIntervalUnit?u=t[6]:(u=(0,$.jsx)(Or,{unit:i.databaseInfo.commitCountPerTimeIntervalUnit}),t[5]=i.databaseInfo.commitCountPerTimeIntervalUnit,t[6]=u);let d;t[7]!==n||t[8]!==u?(d=(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-4`,children:[l,n,u]}),t[7]=n,t[8]=u,t[9]=d):d=t[9];let f;return t[10]!==s||t[11]!==d?(f=(0,$.jsxs)(`div`,{className:`card__title grid w-full grid-cols-[1fr_max-content_1fr] items-center justify-between gap-4`,children:[s,c,d]}),t[10]=s,t[11]=d,t[12]=f):f=t[12],f}function Mr(e){let t=(0,Z.c)(23),{title:n,children:r,defaultOpen:i,className:a,contentClassName:o,reversed:s,onToggle:c}=e,l=i===void 0?!0:i,u=o===void 0?``:o,d=s===void 0?!1:s,[f,p]=(0,Q.useState)(l),m;t[0]===a?m=t[1]:(m=R(`relative flex flex-col not-open:gap-0 open:gap-2`,a),t[0]=a,t[1]=m);let h;t[2]===c?h=t[3]:(h=e=>{let t=e.currentTarget.open;p(t),c?.(t)},t[2]=c,t[3]=h);let g=d?!f:f,_;t[4]===g?_=t[5]:(_=(0,$.jsx)(At,{"aria-hidden":!0,as:`span`,open:g}),t[4]=g,t[5]=_);let v;t[6]!==n||t[7]!==f?(v=(0,$.jsx)(`h2`,{className:`card__title flex min-w-0 flex-1 items-center justify-between gap-2`,children:(0,$.jsx)(n,{open:f})}),t[6]=n,t[7]=f,t[8]=v):v=t[8];let y;t[9]!==_||t[10]!==v?(y=(0,$.jsxs)(`summary`,{className:`dark:text-secondary-text-dark hover:text-primary-text dark:hover:text-primary-text-dark mbe-0 flex cursor-pointer list-none items-center justify-start text-sm leading-relaxed font-bold tracking-wider text-inherit uppercase select-none`,children:[_,v]}),t[9]=_,t[10]=v,t[11]=y):y=t[11];let b;t[12]===u?b=t[13]:(b=R(``,u),t[12]=u,t[13]=b);let x;t[14]!==r||t[15]!==b?(x=(0,$.jsx)(`div`,{className:b,children:r}),t[14]=r,t[15]=b,t[16]=x):x=t[16];let S;return t[17]!==f||t[18]!==x||t[19]!==m||t[20]!==h||t[21]!==y?(S=(0,$.jsxs)(`details`,{className:m,open:f,onToggle:h,children:[y,x]}),t[17]=f,t[18]=x,t[19]=m,t[20]=h,t[21]=y,t[22]=S):S=t[22],S}function Nr(e,t,n,r){if(t.length===0)return 0;for(let i=0;i<t.length;i++){let[,a]=Ye(t[i].timestamp,n);if(r===`end`){if(e<=a)return i+1}else if(e<a)return i}return t.length}function Pr({startIndex:e,endIndex:t,intervals:n,unit:r,minSecs:i,maxSecs:a}){if(n.length===0)return[i,a];let o=Math.max(0,Math.min(e,n.length-1)),s=Math.max(0,Math.min(t-1,n.length-1)),[c]=Ye(n[o].timestamp,r),[,l]=Ye(n[s].timestamp,r);return[Math.max(i,c),Math.min(a,l)]}function Fr(e){let t=(0,Z.c)(40),{className:n}=e,[r,i]=(0,Q.useState)(`log`),{databaseInfo:a}=J(),{timerange:o,selectedRange:s}=a,[c,u]=o,d;t[0]===c?d=t[1]:(d=X.start.withDefault(c),t[0]=c,t[1]=d);let f;t[2]===u?f=t[3]:(f=X.end.withDefault(u),t[2]=u,t[3]=f);let p;t[4]!==d||t[5]!==f?(p={start:d,end:f},t[4]=d,t[5]=f,t[6]=p):p=t[6];let[m]=vt(p),{start:h,end:g}=m,_=a.commitCountPerTimeIntervalUnit,v=l().state!==`idle`,y=a.commitCountPerTimeInterval.length,b;t[7]!==a.commitCountPerTimeInterval||t[8]!==h||t[9]!==_?(b=Nr(h,a.commitCountPerTimeInterval,_,`start`),t[7]=a.commitCountPerTimeInterval,t[8]=h,t[9]=_,t[10]=b):b=t[10];let x=b,S;t[11]!==a.commitCountPerTimeInterval||t[12]!==g||t[13]!==_?(S=Nr(g,a.commitCountPerTimeInterval,_,`end`),t[11]=a.commitCountPerTimeInterval,t[12]=g,t[13]=_,t[14]=S):S=t[14];let C=S,w;t[15]===n?w=t[16]:(w=R(`group/card flex flex-col text-center select-none`,n),t[15]=n,t[16]=w);let T;t[17]===r?T=t[18]:(T=()=>(0,$.jsx)(jr,{children:(0,$.jsx)(me,{unstyled:!0,className:`gap`,title:`Use log scale for commit counts`,checked:r===`log`,onChange:e=>i(e.target.checked?`log`:`linear`),children:`Log scale`})}),t[17]=r,t[18]=T);let E;t[19]===r?E=t[20]:(E=(0,$.jsx)(xr,{scale:r,className:`grid-full`}),t[19]=r,t[20]=E);let D;t[21]===s?D=t[22]:(D=[s],t[21]=s,t[22]=D);let O=D.join(`-`),k=c*1e3,A=u*1e3,j;t[23]!==a.commitCountPerTimeInterval||t[24]!==v||t[25]!==y||t[26]!==C||t[27]!==x||t[28]!==O||t[29]!==k||t[30]!==A||t[31]!==_?(j=(0,$.jsx)(Ir,{startUnits:x,endUnits:C,minMs:k,maxMs:A,unit:_,domainInUnits:y,disabled:v,intervals:a.commitCountPerTimeInterval},O),t[23]=a.commitCountPerTimeInterval,t[24]=v,t[25]=y,t[26]=C,t[27]=x,t[28]=O,t[29]=k,t[30]=A,t[31]=_,t[32]=j):j=t[32];let M;t[33]!==j||t[34]!==E?(M=(0,$.jsxs)(`div`,{className:`group grid`,children:[E,j]}),t[33]=j,t[34]=E,t[35]=M):M=t[35];let N;return t[36]!==M||t[37]!==w||t[38]!==T?(N=(0,$.jsx)(Mr,{reversed:!0,className:w,title:T,children:M}),t[36]=M,t[37]=w,t[38]=T,t[39]=N):N=t[39],N}function Ir(e){let t=(0,Z.c)(24),{startUnits:n,endUnits:r,minMs:i,maxMs:a,domainInUnits:o,unit:s,disabled:c,intervals:l}=e,[u,d]=(0,Q.useTransition)(),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f={start:X.start.withOptions({limitUrlUpdates:{method:`throttle`,timeMs:1e3}}),end:X.end.withOptions({limitUrlUpdates:{method:`throttle`,timeMs:1e3}})},t[0]=f):f=t[0];let[,p]=vt(f),m;t[1]!==l||t[2]!==a||t[3]!==i||t[4]!==p||t[5]!==s?(m=e=>{e[0]===0&&e[1]===0||d(async()=>{let[t,n]=Pr({startIndex:e[0],endIndex:e[1],intervals:l,unit:s,minSecs:i/1e3,maxSecs:a/1e3});await p({start:t,end:n}),console.warn(t,n,`SLIDER VALUES`)})},t[1]=l,t[2]=a,t[3]=i,t[4]=p,t[5]=s,t[6]=m):m=t[6];let h=m,g;t[7]===o?g=t[8]:(g=[0,o],t[7]=o,t[8]=g);let _;t[9]!==r||t[10]!==n?(_=[n,r],t[9]=r,t[10]=n,t[11]=_):_=t[11];let v;t[12]!==c||t[13]!==o?(v=(0,$.jsx)(Ee,{children:e=>{let{handles:t,getHandleProps:n}=e;return(0,$.jsx)(Q.Fragment,{children:t.map(e=>(0,$.jsx)(Q.Fragment,{children:(0,$.jsx)(`button`,{className:R(`pointer-events-auto absolute bottom-0 z-10 flex h-6 -translate-x-1/2 place-content-center opacity-0 transition-opacity group-hover/card:opacity-100 disabled:grayscale`,{"size-5 rounded-full":!1},c?`cursor-progress`:`cursor-col-resize`),role:`slider`,"aria-disabled":c,"aria-valuemin":0,"aria-valuemax":o,"aria-valuenow":e.value,title:`Drag to adjust interval`,style:{left:`${e.percent}%`},...n(e.id),children:(0,$.jsx)(`div`,{className:R(`btn--primary flex h-full w-min items-center`),children:(0,$.jsx)(L,{path:I,size:.5})})},e.id)},e.id))})}}),t[12]=c,t[13]=o,t[14]=v):v=t[14];let y;t[15]===u?y=t[16]:(y=(0,$.jsx)(De,{left:!1,right:!1,children:e=>{let{tracks:t,getTrackProps:n}=e;return(0,$.jsx)(`div`,{children:t.map(e=>{let{id:t,source:r,target:i}=e;return(0,$.jsx)(`div`,{className:R(`bg-blue-primary/20 pointer-events-none absolute right-0 bottom-0 left-0 h-5 cursor-pointer rounded transition-[backdrop-filter]`,{"backdrop-blur-2xl":u}),style:{left:`${r.percent}%`,width:`${i.percent-r.percent}%`},...n()},t)})})}}),t[15]=u,t[16]=y);let b;return t[17]!==c||t[18]!==h||t[19]!==g||t[20]!==_||t[21]!==v||t[22]!==y?(b=(0,$.jsxs)(W,{className:`grid-full pointer-events-none relative`,mode:3,step:1,domain:g,values:_,disabled:c,onChange:h,children:[v,y]}),t[17]=c,t[18]=h,t[19]=g,t[20]=_,t[21]=v,t[22]=y,t[23]=b):b=t[23],b}function Lr(){let e=(0,Z.c)(13),t=l(),n;e[0]===t.formData?n=e[1]:(n=t.formData?.get(`refresh`),e[0]=t.formData,e[1]=n);let r=n===`true`,i=K(),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(`input`,{type:`hidden`,name:`refresh`,value:`true`}),e[2]=a):a=e[2];let o;e[3]===r?o=e[4]:(o=R({"animate-spin":r}),e[3]=r,e[4]=o);let s;e[5]===o?s=e[6]:(s=(0,$.jsx)(L,{path:F,size:`1.25em`,className:o}),e[5]=o,e[6]=s);let c;e[7]!==r||e[8]!==s?(c=(0,$.jsx)(`button`,{className:`btn btn--icon btn--text`,disabled:r,title:`Refresh analysis`,"aria-label":`Refresh analysis`,children:s}),e[7]=r,e[8]=s,e[9]=c):c=e[9];let u;return e[10]!==c||e[11]!==i?(u=(0,$.jsxs)(d,{method:`post`,action:i,className:`contents`,children:[a,c]}),e[10]=c,e[11]=i,e[12]=u):u=e[12],u}function Rr(){let e=(0,Z.c)(10),{isFullscreen:t,toggleFullscreen:n}=ft(zr),r;e[0]===t?r=e[1]:(r=R(`btn btn--icon btn--text`,{"btn--primary":t}),e[0]=t,e[1]=r);let i=t?`Exit fullscreen`:`Enter fullscreen`,a=t?`Exit fullscreen`:`Enter fullscreen`,o=t?E:h,s;e[2]===o?s=e[3]:(s=(0,$.jsx)(L,{path:o,size:1}),e[2]=o,e[3]=s);let c;return e[4]!==r||e[5]!==i||e[6]!==a||e[7]!==s||e[8]!==n?(c=(0,$.jsx)(`button`,{className:r,title:i,"aria-label":a,onClick:n,children:s}),e[4]=r,e[5]=i,e[6]=a,e[7]=s,e[8]=n,e[9]=c):c=e[9],c}function zr(){return document.documentElement}function Br(e){let t=(0,Z.c)(56),{open:n,onClose:r}=e,{metricType:i,hierarchyType:a,transitionsEnabled:o,showFilesWithoutChanges:s,linkMetricAndSizeMetric:c,showOnlySearchMatches:l,setLinkMetricAndSizeMetric:u,setTransitionsEnabled:d,labelsVisible:f,setLabelsVisible:p,setHierarchyType:m,setSizeMetricType:h,setShowFilesWithoutChanges:g,setShowOnlySearchMatches:y}=tt(),b=!!c,S;t[0]!==i||t[1]!==u||t[2]!==h?(S=e=>{u(e.target.checked),e.target.checked&&h(ur[i])},t[0]=i,t[1]=u,t[2]=h,t[3]=S):S=t[3];let C,E;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(L,{className:`ml-1.5`,path:_,size:`1.25em`}),E=(0,$.jsx)(`span`,{className:`flex-1`,children:`Link size and color option`}),t[4]=C,t[5]=E):(C=t[4],E=t[5]);let D;t[6]!==b||t[7]!==S?(D=(0,$.jsxs)(me,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:b,title:`Enable to sync size metric with color metric`,onChange:S,children:[C,E]}),t[6]=b,t[7]=S,t[8]=D):D=t[8];let O;t[9]===d?O=t[10]:(O=e=>d(e.target.checked),t[9]=d,t[10]=O);let k,A;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(L,{className:`ml-1.5`,path:re,size:`1.25em`}),A=(0,$.jsx)(`span`,{className:`flex-1`,children:`Transitions`}),t[11]=k,t[12]=A):(k=t[11],A=t[12]);let j;t[13]!==O||t[14]!==o?(j=(0,$.jsxs)(me,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:o,title:`Disable to improve performance when zooming`,onChange:O,children:[k,A]}),t[13]=O,t[14]=o,t[15]=j):j=t[15];let M;t[16]===p?M=t[17]:(M=e=>p(e.target.checked),t[16]=p,t[17]=M);let N,P;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(L,{className:`ml-1.5`,path:ie,size:`1.25em`}),P=(0,$.jsx)(`span`,{className:`flex-1`,children:`Labels`}),t[18]=N,t[19]=P):(N=t[18],P=t[19]);let F;t[20]!==f||t[21]!==M?(F=(0,$.jsxs)(me,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:f,title:`Disable to improve performance`,onChange:M,children:[N,P]}),t[20]=f,t[21]=M,t[22]=F):F=t[22];let I;t[23]===g?I=t[24]:(I=e=>g(e.target.checked),t[23]=g,t[24]=I);let ee,te;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(L,{className:`ml-1.5`,path:T,size:`1.25em`}),te=(0,$.jsx)(`span`,{className:`flex-1`,children:`Show files with no activity`}),t[25]=ee,t[26]=te):(ee=t[25],te=t[26]);let R;t[27]!==s||t[28]!==I?(R=(0,$.jsxs)(me,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:s,title:`Show files that have had no changes in the selected time range`,onChange:I,children:[ee,te]}),t[27]=s,t[28]=I,t[29]=R):R=t[29];let ne=a===`FLAT`,z;t[30]!==a||t[31]!==m?(z=()=>{m(a===`FLAT`?`NESTED`:`FLAT`)},t[30]=a,t[31]=m,t[32]=z):z=t[32];let B,ae;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsx)(L,{className:`ml-1.5`,path:v,size:`1.25em`}),ae=(0,$.jsx)(`span`,{className:`flex-1`,children:`Flatten file tree`}),t[33]=B,t[34]=ae):(B=t[33],ae=t[34]);let V;t[35]!==ne||t[36]!==z?(V=(0,$.jsxs)(me,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:ne,title:`Show all files on the same level, instead of as a file tree`,onChange:z,children:[B,ae]}),t[35]=ne,t[36]=z,t[37]=V):V=t[37];let H;t[38]===y?H=t[39]:(H=e=>y(e.target.checked),t[38]=y,t[39]=H);let U;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,$.jsx)(L,{className:`ml-1.5`,path:w,size:`1.25em`}),t[40]=U):U=t[40];let W;t[41]!==l||t[42]!==H?(W=(0,$.jsxs)(me,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:l,title:`When searching, hide files that do not match the search query`,onChange:H,children:[U,`Show only search matches`]}),t[41]=l,t[42]=H,t[43]=W):W=t[43];let oe;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsx)(Vr,{}),t[44]=oe):oe=t[44];let G;t[45]!==F||t[46]!==R||t[47]!==V||t[48]!==W||t[49]!==D||t[50]!==j?(G=(0,$.jsxs)(`div`,{className:`flex min-h-0 max-w-max flex-col items-start gap-3 overflow-y-auto p-2 pl-0`,children:[D,j,F,R,V,W,oe]}),t[45]=F,t[46]=R,t[47]=V,t[48]=W,t[49]=D,t[50]=j,t[51]=G):G=t[51];let K;return t[52]!==r||t[53]!==n||t[54]!==G?(K=(0,$.jsx)(ir,{open:n,title:`Settings`,icon:x,onClose:r,children:G}),t[52]=r,t[53]=n,t[54]=G,t[55]=K):K=t[55],K}function Vr(){let e=(0,Z.c)(7),{renderCutOff:t,setRenderCutOff:n}=tt(),[r,i]=(0,Q.useState)(t),[,a]=(0,Q.useTransition)(),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsxs)(`span`,{className:`group flex grow items-center gap-2`,children:[(0,$.jsx)(L,{className:`ml-1.5`,path:ee,size:`1.25em`}),`Pixel render cut-off`]}),e[0]=o):o=e[0];let s;e[1]!==n||e[2]!==a?(s=e=>{let t=Number.isNaN(e.target.valueAsNumber)?Fe().renderCutOff:e.target.valueAsNumber;i(t),a(()=>n(t))},e[1]=n,e[2]=a,e[3]=s):s=e[3];let c;return e[4]!==s||e[5]!==r?(c=(0,$.jsxs)(`label`,{className:`label group flex w-full items-center justify-start gap-2 text-sm hover:text-blue-500 hover:opacity-100`,title:`Increase to improve render performance, decrease it to get higher level of detail`,children:[o,(0,$.jsx)(`input`,{type:`number`,min:0,value:r,className:`mr-1 w-12 place-self-end border-b-2`,onChange:s})]}),e[4]=s,e[5]=r,e[6]=c):c=e[6],c}function Hr(){let e=(0,Z.c)(4),[t,n]=(0,Q.useState)(!1),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`button`,{className:`btn btn--icon btn--text`,title:`Settings`,"aria-label":`Settings`,onClick:()=>n(!0),children:(0,$.jsx)(L,{path:x})}),e[0]=r):r=e[0];let i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>n(!1),e[1]=i):i=e[1];let a;return e[2]===t?a=e[3]:(a=(0,$.jsxs)($.Fragment,{children:[r,(0,$.jsx)(Br,{open:t,onClose:i})]}),e[2]=t,e[3]=a),a}function Ur(e){let t=e.trim(),n=t.length===0?[]:t.split(/\s+/),r=Math.max(n.length-2,0);return{startsWithCapital:/^\p{Lu}/u.test(t)?1:0,middleNames:r,words:n.length,length:t.length,name:t}}function Wr(e,t){return e.startsWithCapital===t.startsWithCapital?e.middleNames===t.middleNames?e.words===t.words?e.length===t.length?e.name.toLowerCase().localeCompare(t.name.toLowerCase()):t.length-e.length:t.words-e.words:t.middleNames-e.middleNames:t.startsWithCapital-e.startsWithCapital}function Gr(e){return e.length===0?`Group`:e.map(e=>Ur(e.name)).filter(e=>e.name.length>0).sort(Wr)[0]?.name??`Group`}var Kr=e=>e.match(/^(\d+)-[^@]+@users\.noreply\.github\.com$/i)?.[1]??null;function qr(e){if(e.length<2)return[];let t=Array.from({length:e.length},(e,t)=>t),n=Array(e.length).fill(0),r=e=>(t[e]!==e&&(t[e]=r(t[e])),t[e]),i=(e,i)=>{let a=r(e),o=r(i);a!==o&&(n[a]<n[o]?t[a]=o:n[a]>n[o]?t[o]=a:(t[o]=a,n[a]++))},a=new Map,o=new Map,s=new Map;for(let[t,{name:n,email:r}]of e.entries())if(n&&(a.has(n)?i(t,a.get(n)):a.set(n,t)),r){o.has(r)?i(t,o.get(r)):o.set(r,t);let e=Kr(r);e&&(s.has(e)?i(t,s.get(e)):s.set(e,t))}let c=new Map;for(let[t,n]of e.entries()){let e=r(t),i=c.get(e)??[];i.push(n),c.set(e,i)}return Array.from(c.values()).filter(e=>e.length>1).map(e=>({displayName:Gr(e),members:e}))}function Jr(e){let t=(0,Z.c)(9),{open:n,onClose:r}=e,{databaseInfo:i}=J(),[,a]=Ae(),{contributorGroups:o,contributors:s}=i,c;t[0]===n?c=t[1]:(c=n.toString(),t[0]=n,t[1]=c);let l;return t[2]!==a||t[3]!==o||t[4]!==s||t[5]!==r||t[6]!==n||t[7]!==c?(l=(0,$.jsx)(Yr,{open:n,contributorGroups:o,contributors:s,contributorColors:a,onClose:r},c),t[2]=a,t[3]=o,t[4]=s,t[5]=r,t[6]=n,t[7]=c,t[8]=l):l=t[8],l}function Yr(e){let t=(0,Z.c)(116),{open:n,contributorGroups:r,contributors:i,contributorColors:a,onClose:o}=e,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=[],t[0]=s):s=t[0];let[c,l]=(0,Q.useState)(s),[u,d]=(0,Q.useState)(r),[f,p]=(0,Q.useState)(``),[,m]=(0,Q.useTransition)(),h=G(),g;t[1]!==r||t[2]!==u||t[3]!==h?(g=()=>{let e=JSON.stringify(u);if(e===JSON.stringify(r))return;let t=new FormData;t.append(`groupedContributors`,e),h(t,{method:`post`})},t[1]=r,t[2]=u,t[3]=h,t[4]=g):g=t[4];let _=g,v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=function(e,t){d(n=>{let r=n[t];return!r||r.displayName===e?n:n.map((n,r)=>r===t?{...n,displayName:e}:n)})},t[5]=v):v=t[5];let y=v,b;t[6]===u?b=t[7]:(b=new Set(u.flatMap(ni).map(ii)),t[6]=u,t[7]=b);let x=b,S;if(t[8]!==i||t[9]!==x){let e;t[11]===x?e=t[12]:(e=e=>!x.has(ii(e)),t[11]=x,t[12]=e),S=i.filter(e).sort(ti),t[8]=i,t[9]=x,t[10]=S}else S=t[10];let C=S,w;if(t[13]!==f||t[14]!==C){let e;t[16]===f?e=t[17]:(e=e=>e.name.toLowerCase().includes(f.toLowerCase()),t[16]=f,t[17]=e),w=C.filter(e),t[13]=f,t[14]=C,t[15]=w}else w=t[15];let T=w,E;t[18]===C?E=t[19]:(E=qr(C),t[18]=C,t[19]=E);let D=E,O=D.reduce(ei,0),k;t[20]===c?k=t[21]:(k=new Set(c.map(ii)),t[20]=c,t[21]=k);let A=k,N;t[22]!==A||t[23]!==T?(N=T.length>0&&T.every(e=>A.has(ii(e))),t[22]=A,t[23]=T,t[24]=N):N=t[24];let P=N,F;t[25]===a?F=t[26]:(F=e=>a.get(e)??`#333`,t[25]=a,t[26]=F);let I=F,ee;if(t[27]!==I||t[28]!==c||t[29]!==T){let e;t[31]!==I||t[32]!==c?(e=e=>{let t=c.some(t=>ii(t)===ii(e));return(0,$.jsx)(me,{className:`contents`,checkBoxClassName:`ml-auto`,checked:t,onChange:t=>{l(n=>t.target?.checked?[...n,e]:n.filter(t=>ii(t)!==ii(e)))},children:(0,$.jsxs)(`div`,{className:`contents`,children:[(0,$.jsx)(Je,{dotColor:I(e.name)}),(0,$.jsx)(`span`,{className:`truncate font-bold`,title:e.name,children:e.name}),(0,$.jsx)(`p`,{className:`text-secondary-text dark:text-secondary-text-dark truncate text-xs leading-tight`,title:e.email,children:e.email})]})},ii(e)+t)},t[31]=I,t[32]=c,t[33]=e):e=t[33],ee=T.map(e),t[27]=I,t[28]=c,t[29]=T,t[30]=ee}else ee=t[30];let z=ee,re;if(t[34]!==I||t[35]!==u||t[36]!==c){let e;t[38]!==I||t[39]!==c?(e=(e,t)=>{let{displayName:n,members:r}=e;return(0,$.jsxs)(`div`,{className:`card bg-primary-bg dark:bg-primary-bg-dark group m-0 flex h-full flex-col justify-between p-2`,title:n,children:[(0,$.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,$.jsxs)(`div`,{className:`flex w-full flex-row justify-between gap-1`,children:[(0,$.jsxs)(`div`,{className:`bg-secondary-bg dark:bg-secondary-bg-dark flex w-full flex-row items-center gap-2 rounded-md px-2 py-1`,children:[(0,$.jsx)(Je,{dotColor:I(n)}),(0,$.jsx)(`select`,{className:`input h-fit w-full truncate border-0 bg-inherit pr-2 text-sm font-bold ring-0`,value:n,onChange:e=>y(e.target.value,t),children:Array.from(new Set([n,...r.map($r)])).map(Qr)})]}),(0,$.jsx)(`div`,{className:`h-full opacity-0 transition-opacity group-hover:opacity-100`,children:(0,$.jsx)(`div`,{className:`h-full max-w-0 overflow-hidden transition-[max-width] group-hover:max-w-20`,children:(0,$.jsx)(`button`,{className:`btn btn--danger h-full w-fit`,title:`Ungroup`,onClick:()=>d(e=>e.filter((e,n)=>n!==t)),children:(0,$.jsx)(L,{path:te,size:.75})})})})]}),(0,$.jsx)(`div`,{children:r.filter(Xr).map(e=>(0,$.jsx)(ri,{contributor:e,onClick:()=>d(n=>n.flatMap((n,r)=>{if(r!==t)return[n];let i=n.members.filter(t=>t.email!==e.email);return i.length>0?[{...n,members:i}]:[]}))},ii(e)))})]}),(0,$.jsx)(`div`,{className:R(`relative flex h-full w-full origin-top items-end justify-end transition-all delay-50 duration-100`,c.length===0?`max-h-0 scale-y-0 opacity-0`:`max-h-10 scale-y-100 opacity-100`),children:(0,$.jsxs)(`button`,{className:`btn btn--primary right bottom absolute h-fit w-fit px-2 py-1 text-xs shadow-lg`,title:`Add selected contributors to this group`,disabled:c.length===0,onClick:()=>{d(e=>e.map((e,n)=>n===t?{...e,members:e.members.concat(c)}:e)),l([])},children:[(0,$.jsx)(L,{path:M,size:.75}),`Add contributor`]})})]},t)},t[38]=I,t[39]=c,t[40]=e):e=t[40],re=u.map(e),t[34]=I,t[35]=u,t[36]=c,t[37]=re}else re=t[37];let ie=re,B;t[41]!==_||t[42]!==o?(B=()=>{_(),o()},t[41]=_,t[42]=o,t[43]=B):B=t[43];let V;t[44]===C.length?V=t[45]:(V=(0,$.jsxs)(`h3`,{className:`text-center text-lg font-bold`,children:[`Ungrouped Contributors (`,C.length,`)`]}),t[44]=C.length,t[45]=V);let H;t[46]===ie.length?H=t[47]:(H=(0,$.jsxs)(`h3`,{className:`text-center text-lg font-bold`,children:[`Contributor Groups (`,ie.length,`)`]}),t[46]=ie.length,t[47]=H);let U;t[48]!==V||t[49]!==H?(U=(0,$.jsxs)(`div`,{className:`grid grid-cols-[1fr_1fr] gap-2`,children:[V,H]}),t[48]=V,t[49]=H,t[50]=U):U=t[50];let W=C.length===0,oe;t[51]===m?oe=t[52]:(oe=e=>m(()=>p(e.target.value)),t[51]=m,t[52]=oe);let K;t[53]!==W||t[54]!==oe?(K=(0,$.jsx)(`input`,{className:`input min-w-0`,type:`search`,placeholder:`Filter...`,disabled:W,onChange:oe}),t[53]=W,t[54]=oe,t[55]=K):K=t[55];let se=c.length===0,q;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(q=()=>l([]),t[56]=q):q=t[56];let ce;t[57]===se?ce=t[58]:(ce=(0,$.jsx)(`button`,{disabled:se,className:`btn w-max grow`,title:`Clear selection`,onClick:q,children:`Clear`}),t[57]=se,t[58]=ce);let le=T.length===0,ue=P?`Deselect selected contributors`:`Select all contributors from list`,de;t[59]!==P||t[60]!==T?(de=()=>l(e=>P?e.filter(e=>!T.some(t=>ii(t)===ii(e))):[...e,...T.filter(t=>!e.some(e=>ii(e)===ii(t)))]),t[59]=P,t[60]=T,t[61]=de):de=t[61];let fe=P?`Deselect all`:`Select all`,pe;t[62]!==le||t[63]!==ue||t[64]!==de||t[65]!==fe?(pe=(0,$.jsx)(`button`,{disabled:le,className:`btn w-max grow`,title:ue,onClick:de,children:fe}),t[62]=le,t[63]=ue,t[64]=de,t[65]=fe,t[66]=pe):pe=t[66];let he;t[67]!==K||t[68]!==ce||t[69]!==pe?(he=(0,$.jsxs)(`div`,{className:`flex gap-2 p-2`,children:[K,ce,pe]}),t[67]=K,t[68]=ce,t[69]=pe,t[70]=he):he=t[70];let ge;t[71]!==f||t[72]!==z||t[73]!==T.length?(ge=T.length>0?z:(0,$.jsx)(`p`,{className:`col-span-full place-self-center text-sm`,children:f.length>0?`No contributors found`:`All contributors have been grouped`}),t[71]=f,t[72]=z,t[73]=T.length,t[74]=ge):ge=t[74];let _e;t[75]===ge?_e=t[76]:(_e=(0,$.jsx)(`div`,{className:`bg-primary-bg dark:bg-primary-bg-dark grid min-h-0 w-full grid-cols-[min-content_3fr_3fr_min-content] items-center gap-x-4 gap-y-1 overflow-y-auto rounded-lg p-2`,children:ge}),t[75]=ge,t[76]=_e);let ve;t[77]!==he||t[78]!==_e?(ve=(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-col rounded-md`,children:[he,_e]}),t[77]=he,t[78]=_e,t[79]=ve):ve=t[79];let ye;t[80]!==ie||t[81]!==u.length?(ye=u.length>0?ie:(0,$.jsx)(`p`,{className:`col-span-2 text-center text-sm`,children:`No contributors have been grouped yet`}),t[80]=ie,t[81]=u.length,t[82]=ye):ye=t[82];let be;t[83]===ye?be=t[84]:(be=(0,$.jsx)(`div`,{className:`min-h-0 overflow-y-auto`,children:(0,$.jsx)(`div`,{className:`grid h-min min-h-0 grid-cols-1 gap-4 rounded-md p-2 lg:grid-cols-1 xl:grid-cols-2`,children:ye})}),t[83]=ye,t[84]=be);let xe;t[85]!==ve||t[86]!==be?(xe=(0,$.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[1fr_1fr] gap-2`,children:[ve,be]}),t[85]=ve,t[86]=be,t[87]=xe):xe=t[87];let Se;t[88]!==O||t[89]!==D?(Se=O>0?(0,$.jsxs)(`button`,{className:`btn btn--primary w-fit transition-all duration-100`,title:D.length===0?`No ungrouped contributors share the same name or email`:`Create ${D.length} inferred group${D.length>1?`s`:``} containing ${O} author${O>1?`s`:``}`,disabled:D.length===0,onClick:()=>{d(e=>{let t=e.slice();for(let e of D)t.push(e);return t}),l([])},children:[(0,$.jsx)(L,{path:ne,size:1}),`Auto group (`,O,`)`]}):null,t[88]=O,t[89]=D,t[90]=Se):Se=t[90];let Ce=c.length<2?`Select at least 2 contributors to group them`:`Group the selected contributors`,we=c.length<2,J;t[91]===c?J=t[92]:(J=()=>{d(e=>[...e,{displayName:Gr(c),members:c}]),l([])},t[91]=c,t[92]=J);let Te;t[93]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,$.jsx)(L,{path:M,size:1}),t[93]=Te):Te=t[93];let Ee;t[94]!==Ce||t[95]!==we||t[96]!==J?(Ee=(0,$.jsxs)(`button`,{className:`btn btn--primary w-fit transition-all duration-100`,title:Ce,disabled:we,onClick:J,children:[Te,`Create new group`]}),t[94]=Ce,t[95]=we,t[96]=J,t[97]=Ee):Ee=t[97];let De;t[98]!==Se||t[99]!==Ee?(De=(0,$.jsxs)(`div`,{className:`flex w-full flex-row justify-end gap-2`,children:[Se,Ee]}),t[98]=Se,t[99]=Ee,t[100]=De):De=t[100];let Oe=u.length===0,ke,Ae;t[101]===Symbol.for(`react.memo_cache_sentinel`)?(ke=()=>{confirm(`Are you sure you want to ungroup all grouped contributors?`)&&d([])},Ae=(0,$.jsx)(L,{path:ae,size:1}),t[101]=ke,t[102]=Ae):(ke=t[101],Ae=t[102]);let je;t[103]===Oe?je=t[104]:(je=(0,$.jsx)(`div`,{className:`flex w-full flex-row justify-end gap-2`,children:(0,$.jsxs)(`button`,{className:`btn btn--danger w-fit transition-all duration-100`,disabled:Oe,onClick:ke,children:[Ae,`Ungroup all`]})}),t[103]=Oe,t[104]=je);let Me;t[105]!==De||t[106]!==je?(Me=(0,$.jsxs)(`div`,{className:`grid grid-cols-[1fr_1fr] gap-2`,children:[De,je]}),t[105]=De,t[106]=je,t[107]=Me):Me=t[107];let Ne;t[108]!==U||t[109]!==xe||t[110]!==Me?(Ne=(0,$.jsxs)(`div`,{className:`flex min-h-0 w-auto max-w-(--breakpoint-lg) min-w-0 flex-col gap-2 p-4`,children:[U,xe,Me]}),t[108]=U,t[109]=xe,t[110]=Me,t[111]=Ne):Ne=t[111];let Pe;return t[112]!==n||t[113]!==B||t[114]!==Ne?(Pe=(0,$.jsx)(ir,{open:n,title:`Group contributors`,icon:j,onClose:B,children:Ne}),t[112]=n,t[113]=B,t[114]=Ne,t[115]=Pe):Pe=t[115],Pe}function Xr(e,t,n){return n.map(Zr).indexOf(e.email)===t}function Zr(e){return e.email}function Qr(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function $r(e){return e.name}function ei(e,t){return e+t.members.length}function ti(e,t){return e.name.localeCompare(t.name)}function ni(e){return e.members}function ri(e){let t=(0,Z.c)(8),{contributor:n,onClick:r,disabled:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(Je,{dotColor:Oe,className:`size-2`}),t[0]=a):a=t[0];let o;t[1]===n.email?o=t[2]:(o=(0,$.jsx)(`span`,{title:n.email,className:`label group min-w-0 truncate text-start text-xs group-hover/alias:text-red-500`,children:n.email}),t[1]=n.email,t[2]=o);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(`div`,{className:`flex opacity-0 transition-opacity duration-200 group-hover/alias:opacity-100`,children:(0,$.jsx)(L,{path:V,size:.75})}),t[3]=s):s=t[3];let c;return t[4]!==i||t[5]!==r||t[6]!==o?(c=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-2 pl-2`,children:[a,(0,$.jsxs)(`button`,{className:`group/alias grid w-full grid-cols-[minmax(0,1fr)_1rem] items-center gap-2 text-sm`,disabled:i,title:`Remove from group`,onClick:r,children:[o,s]})]}),t[4]=i,t[5]=r,t[6]=o,t[7]=c):c=t[7],c}function ii(e){return`${e.name}\u0000${e.email??``}`}function ai(e){let t=(0,Z.c)(19),{compact:n}=e,r=n===void 0?!1:n,[i,a]=(0,Q.useState)(!1),{formData:o}=l(),s;t[0]===o?s=t[1]:(s=o?.has(`contributorGroups`),t[0]=o,t[1]=s);let c=s===!0,u;t[2]===r?u=t[3]:(u=R(`btn`,{"btn--icon btn--text":r}),t[2]=r,t[3]=u);let d=c?`Grouping contributors... `:`Group contributors`,f,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>a(!0),p=(0,$.jsx)(L,{path:j}),t[4]=f,t[5]=p):(f=t[4],p=t[5]);let m;t[6]===r?m=t[7]:(m=r?null:(0,$.jsx)(`span`,{children:`Group contributors`}),t[6]=r,t[7]=m);let h;t[8]!==c||t[9]!==u||t[10]!==d||t[11]!==m?(h=(0,$.jsxs)(`button`,{className:u,title:d,"aria-label":`Group contributors`,disabled:c,onClick:f,children:[p,m]}),t[8]=c,t[9]=u,t[10]=d,t[11]=m,t[12]=h):h=t[12];let g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>a(!1),t[13]=g):g=t[13];let _;t[14]===i?_=t[15]:(_=(0,$.jsx)(Jr,{open:i,onClose:g}),t[14]=i,t[15]=_);let v;return t[16]!==_||t[17]!==h?(v=(0,$.jsxs)($.Fragment,{children:[h,_]}),t[16]=_,t[17]=h,t[18]=v):v=t[18],v}function oi(e){let t=(0,Z.c)(5),n;t[0]===e.keyString?n=t[1]:(n=(0,$.jsx)(`div`,{className:`text-secondary-text dark:text-secondary-text-dark flex grow overflow-hidden text-sm font-bold text-ellipsis whitespace-pre`,children:e.keyString}),t[0]=e.keyString,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,$.jsxs)($.Fragment,{children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function si(e){let t=(0,Z.c)(7),n;t[0]===e.keyString?n=t[1]:(n=(0,$.jsx)(`div`,{className:`text-secondary-text dark:text-secondary-text-dark flex grow overflow-hidden text-sm font-bold text-ellipsis whitespace-pre`,children:e.keyString}),t[0]=e.keyString,t[1]=n);let r;t[2]===e.value?r=t[3]:(r=(0,$.jsx)(`p`,{className:`text-sm text-ellipsis`,children:e.value}),t[2]=e.value,t[3]=r);let i;return t[4]!==n||t[5]!==r?(i=(0,$.jsxs)($.Fragment,{children:[n,r]}),t[4]=n,t[5]=r,t[6]=i):i=t[6],i}function ci(e){let t=(0,Z.c)(4),n;t[0]===e.fileChanges?n=t[1]:(n=e.fileChanges.map(li),t[0]=e.fileChanges,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,$.jsx)(`div`,{className:`overflow-auto`,children:(0,$.jsx)(`div`,{className:`grid max-h-64 max-w-lg grid-cols-[auto_auto_1fr] gap-x-2 gap-y-1 overflow-auto`,children:n})}),t[2]=n,t[3]=r),r}function li(e){return(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsxs)(`div`,{className:`flex grow overflow-hidden text-sm font-semibold text-ellipsis whitespace-pre text-green-600`,children:[`+`,e.insertions.toLocaleString()]}),(0,$.jsxs)(`div`,{className:`flex grow overflow-hidden text-sm font-semibold text-ellipsis whitespace-pre text-red-600`,children:[`-`,e.deletions.toLocaleString()]}),(0,$.jsxs)(`div`,{className:`flex grow flex-row overflow-hidden text-sm text-ellipsis whitespace-nowrap`,title:e.path,children:[(0,$.jsx)(`p`,{className:`text-tertiary-text dark:text-tertiary-text-dark`,children:e.path.split(`/`).slice(0,-1).join(`/`)+`/`}),(0,$.jsx)(`p`,{className:`text-secondary-text dark:text-secondary-text-dark font-semibold`,children:e.path.split(`/`).pop()})]})]},e.path)}function ui(e){let t=(0,Z.c)(71),[,n]=Ae(),r;t[0]!==n||t[1]!==e.value.author.name||t[2]!==e.value.coauthors||t[3]!==e.value.hash?(r=e.value.coauthors.length>0?e.value.coauthors.filter(t=>t.name!=e.value.author.name).slice(0,2).map(t=>{let r=n.get(t.name)??`grey`;return(0,$.jsx)(Je,{title:t.name,dotColor:r,className:`z-0 -ml-2.5`},e.value.hash+t.email+r)}):null,t[0]=n,t[1]=e.value.author.name,t[2]=e.value.coauthors,t[3]=e.value.hash,t[4]=r):r=t[4];let i;t[5]!==n||t[6]!==e.value.author.name?(i=n.get(e.value.author.name)??`grey`,t[5]=n,t[6]=e.value.author.name,t[7]=i):i=t[7];let a=i,o=e.value.hash+e.value.author.email+a,s;t[8]!==a||t[9]!==e.value.author.name||t[10]!==o?(s=(0,$.jsx)(Je,{dotColor:a,title:e.value.author.name,className:`z-0`},o),t[8]=a,t[9]=e.value.author.name,t[10]=o,t[11]=s):s=t[11];let c=s,l;t[12]!==r||t[13]!==c?(l=(0,$.jsx)(`div`,{className:`flex w-min min-w-5.5 items-start`,children:(0,$.jsxs)(`div`,{className:`flex-end flex flex-row-reverse items-center`,children:[r,c]})}),t[12]=r,t[13]=c,t[14]=l):l=t[14];let u;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(u=[`right`,`bottom`,`top`,`left`],t[15]=u):u=t[15];let d;t[16]!==e.value.committerTime||t[17]!==e.value.message?(d=t=>{let{onClick:n}=t;return(0,$.jsx)($.Fragment,{children:(0,$.jsx)(`button`,{className:`h-full w-full min-w-0 cursor-pointer truncate text-start text-sm font-bold`,onClick:n,children:(0,$.jsxs)(`div`,{className:`flex flex-row items-center gap-1`,children:[(0,$.jsx)(`p`,{className:`text-secondary-text dark:text-secondary-text-dark text-xs`,children:Ue(e.value.committerTime*1e3)}),(0,$.jsx)(`p`,{className:`text-tertiary-text dark:text-tertiary-text-dark text-xs`,children:e.value.message})]})})})},t[16]=e.value.committerTime,t[17]=e.value.message,t[18]=d):d=t[18];let f;t[19]===e.value.hash?f=t[20]:(f=(0,$.jsx)(si,{keyString:`Hash`,value:e.value.hash}),t[19]=e.value.hash,t[20]=f);let p;t[21]!==n||t[22]!==e.value.author.name?(p=n.get(e.value.author.name)??`grey`,t[21]=n,t[22]=e.value.author.name,t[23]=p):p=t[23];let m;t[24]===p?m=t[25]:(m=(0,$.jsx)(Je,{dotColor:p}),t[24]=p,t[25]=m);let h;t[26]===e.value.author.name?h=t[27]:(h=(0,$.jsx)(`span`,{title:e.value.author.name,className:`text-ellipsis`,children:e.value.author.name}),t[26]=e.value.author.name,t[27]=h);let g=`<${e.value.author.email}>`,_;t[28]===g?_=t[29]:(_=(0,$.jsxs)(`span`,{className:`text-tertiary-text dark:text-tertiary-text-dark truncate`,children:[`\xA0`,g]}),t[28]=g,t[29]=_);let v;t[30]!==m||t[31]!==h||t[32]!==_?(v=(0,$.jsx)(oi,{keyString:`Author`,children:(0,$.jsxs)(`div`,{className:`grid grid-cols-[max-content_max-content_auto] items-center gap-1 text-sm`,children:[m,h,_]})}),t[30]=m,t[31]=h,t[32]=_,t[33]=v):v=t[33];let y;t[34]!==n||t[35]!==e.value.coauthors?(y=e.value.coauthors.length>0?(0,$.jsx)(oi,{keyString:`Co-authors`,children:(0,$.jsx)(`div`,{className:`flex flex-col gap-y-1`,children:e.value.coauthors.map(e=>(0,$.jsxs)(`div`,{className:`grid grid-cols-[max-content_max-content_auto] items-center gap-1 text-sm`,children:[(0,$.jsx)(Je,{dotColor:n.get(e.name)??`grey`}),(0,$.jsx)(`span`,{title:e.name,className:`text-ellipsis`,children:e.name}),(0,$.jsxs)(`span`,{title:e.email,className:`text-tertiary-text dark:text-tertiary-text-dark truncate`,children:[`\xA0`,`<${e.email}>`]})]},e.email))})}):null,t[34]=n,t[35]=e.value.coauthors,t[36]=y):y=t[36];let b;t[37]!==e.value.authorTime||t[38]!==e.value.committerTime?(b=e.value.committerTime===e.value.authorTime?(0,$.jsx)(oi,{keyString:`Date`,children:(0,$.jsxs)(`div`,{className:`text-sm`,children:[ot(e.value.committerTime*1e3),(0,$.jsx)(`span`,{className:`text-tertiary-text dark:text-tertiary-text-dark`,children:` (`+ct(e.value.committerTime)+` ago)`})]})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(oi,{keyString:`Date committed`,children:(0,$.jsxs)(`div`,{className:`text-sm`,children:[ot(e.value.committerTime*1e3),(0,$.jsx)(`span`,{className:`text-tertiary-text dark:text-tertiary-text-dark`,children:` (`+ct(e.value.committerTime)+` ago)`})]})}),(0,$.jsx)(oi,{keyString:`Date authored`,children:(0,$.jsxs)(`div`,{className:`text-sm`,children:[ot(e.value.authorTime*1e3),(0,$.jsx)(`span`,{className:`text-tertiary-text dark:text-tertiary-text-dark`,children:` (`+ct(e.value.authorTime)+` ago)`})]})})]}),t[37]=e.value.authorTime,t[38]=e.value.committerTime,t[39]=b):b=t[39];let x;t[40]===e.value.message?x=t[41]:(x=(0,$.jsx)(oi,{keyString:`Message`,children:(0,$.jsx)(`div`,{className:`flex h-full items-center text-sm text-ellipsis`,children:e.value.message})}),t[40]=e.value.message,t[41]=x);let S=e.value.body.length>0?e.value.body:`<none>`,C;t[42]===S?C=t[43]:(C=(0,$.jsx)(oi,{keyString:`Body`,children:(0,$.jsx)(`div`,{className:`text-tertiary-text dark:text-tertiary-text-dark flex max-h-64 items-start overflow-auto text-xs font-semibold text-ellipsis whitespace-pre-wrap`,children:S})}),t[42]=S,t[43]=C);let w;t[44]===e.value.fileChanges.length?w=t[45]:(w=(0,$.jsx)(`b`,{children:e.value.fileChanges.length}),t[44]=e.value.fileChanges.length,t[45]=w);let T=`+`+e.value.fileChanges.reduce(fi,0),E;t[46]===T?E=t[47]:(E=(0,$.jsx)(`b`,{className:`font-bold text-green-600`,children:T}),t[46]=T,t[47]=E);let D=`-`+e.value.fileChanges.reduce(di,0),O;t[48]===D?O=t[49]:(O=(0,$.jsx)(`b`,{className:`font-bold text-red-600`,children:D}),t[48]=D,t[49]=O);let k;t[50]!==w||t[51]!==E||t[52]!==O?(k=(0,$.jsx)(oi,{keyString:`File changes`,children:(0,$.jsx)(`div`,{className:`flex flex-row gap-0 text-sm`,children:(0,$.jsxs)(`p`,{children:[w,` files `,`(`,E,`,\xA0`,O,`)`]})})}),t[50]=w,t[51]=E,t[52]=O,t[53]=k):k=t[53];let A;t[54]!==v||t[55]!==y||t[56]!==b||t[57]!==x||t[58]!==C||t[59]!==k||t[60]!==f?(A=(0,$.jsxs)(`div`,{className:`grid max-w-lg grid-cols-[max-content_auto] gap-x-3 gap-y-1`,children:[f,v,y,b,x,C,k]}),t[54]=v,t[55]=y,t[56]=b,t[57]=x,t[58]=C,t[59]=k,t[60]=f,t[61]=A):A=t[61];let j;t[62]===e.value.fileChanges?j=t[63]:(j=(0,$.jsx)(ci,{fileChanges:e.value.fileChanges}),t[62]=e.value.fileChanges,t[63]=j);let M;t[64]!==A||t[65]!==j||t[66]!==d?(M=(0,$.jsxs)(He,{triggerClassName:`flex min-w-0 w-full h-full items-center truncate hover:opacity-60`,positions:u,popoverTitle:`Commit Details`,trigger:d,children:[A,j]}),t[64]=A,t[65]=j,t[66]=d,t[67]=M):M=t[67];let N;return t[68]!==M||t[69]!==l?(N=(0,$.jsxs)($.Fragment,{children:[l,M]}),t[68]=M,t[69]=l,t[70]=N):N=t[70],N}function di(e,t){return e+t.deletions}function fi(e,t){return e+t.insertions}function pi(e){let t=(0,Z.c)(12),{commits:n,loadedCommitCount:r,totalCommitCount:i,isLoading:a,onShowMoreCommits:o}=e,s=H(),c=Math.ceil(i/15),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=[],t[0]=l):l=t[0];let u=`Shows the commit history for `+s.path+`. Click on a commit to see details.`,d=a?`opacity-60`:``,f=a?`pointer-events-none`:``,p;t[1]===n?p=t[2]:(p=n??[],t[1]=n,t[2]=p);let m=r<i?o:void 0,h;t[3]!==d||t[4]!==f||t[5]!==p||t[6]!==m||t[7]!==c?(h=(0,$.jsx)(Xe,{className:d,navClassName:f,items:p,itemsPerPage:15,totalPages:c,itemHeight:20,originalItemsCount:15,onNextFunc:m,children:mi}),t[3]=d,t[4]=f,t[5]=p,t[6]=m,t[7]=c,t[8]=h):h=t[8];let g;return t[9]!==u||t[10]!==h?(g=(0,$.jsx)($.Fragment,{children:(0,$.jsx)(Le,{className:`mt-0`,metricMenuItems:l,description:u,children:h})}),t[9]=u,t[10]=h,t[11]=g):g=t[11],g}function mi(e){return(0,$.jsx)(`div`,{className:`grid grid-cols-[max-content_auto] items-center justify-start gap-x-1 gap-y-1`,children:e.map(hi)})}function hi(e){return(0,$.jsx)(ui,{value:e},e.hash+`--itemContentAccordion`)}function gi(e){let t=(0,Z.c)(47),{className:n}=e,i=n===void 0?``:n,a=H(),{load:o,data:s,state:l,reset:u}=r(),[d]=vt(X),{path:f,branch:p,start:m,end:h}=d,{metricType:g}=tt(),_=it(),v=s?.currentCommitCount??15,y=(0,Q.useRef)(``),b;t[0]!==g||t[1]!==_?(b=g===`TOP_CONTRIBUTOR`||g===`CONTRIBUTORS`?_.map(e=>e.replace(`${g}:`,``)):[],t[0]=g,t[1]=_,t[2]=b):b=t[2];let x=b,S;t[3]!==p||t[4]!==o||t[5]!==f?(S=e=>{let{objectPath:t,contributors:n,count:r,start:i,end:a}=e,s=i===void 0?null:i,l=a===void 0?null:a,u=c(`/api/commits`)+xt({objectPath:t,path:f,branch:p,count:r,contributors:n,start:s,end:l});console.log(`LOADING COMMITS FOR`+n.join(`, `)),o(u)},t[3]=p,t[4]=o,t[5]=f,t[6]=S):S=t[6];let C=S,w;t[7]!==a.path||t[8]!==v||t[9]!==h||t[10]!==C||t[11]!==x||t[12]!==m?(w=()=>{let e=a.path;e&&(e!==y.current&&(y.current=e),C({objectPath:e,contributors:x,count:v,start:m,end:h}))},t[7]=a.path,t[8]=v,t[9]=h,t[10]=C,t[11]=x,t[12]=m,t[13]=w):w=t[13];let T;t[14]!==a.path||t[15]!==v||t[16]!==h||t[17]!==C||t[18]!==u||t[19]!==x||t[20]!==m?(T=[a.path,C,u,x,m,h,v],t[14]=a.path,t[15]=v,t[16]=h,t[17]=C,t[18]=u,t[19]=x,t[20]=m,t[21]=T):T=t[21],(0,Q.useEffect)(w,T);let E;t[22]!==a.path||t[23]!==v||t[24]!==s||t[25]!==C||t[26]!==u||t[27]!==x||t[28]!==l?(E=e=>{e?!s&&l===`idle`&&C({objectPath:a.path,contributors:x,count:v}):u()},t[22]=a.path,t[23]=v,t[24]=s,t[25]=C,t[26]=u,t[27]=x,t[28]=l,t[29]=E):E=t[29];let D;t[30]===s?.commits?D=t[31]:(D=s?.commits??[],t[30]=s?.commits,t[31]=D);let O=s?.totalCommitCount??0,k=l!==`idle`,A;t[32]!==a||t[33]!==v||t[34]!==C||t[35]!==x?(A=()=>{a&&C({objectPath:a.path,contributors:x,count:v+15})},t[32]=a,t[33]=v,t[34]=C,t[35]=x,t[36]=A):A=t[36];let j;t[37]!==v||t[38]!==k||t[39]!==A||t[40]!==D||t[41]!==O?(j=(0,$.jsx)(pi,{commits:D,loadedCommitCount:v,totalCommitCount:O,isLoading:k,onShowMoreCommits:A}),t[37]=v,t[38]=k,t[39]=A,t[40]=D,t[41]=O,t[42]=j):j=t[42];let M;return t[43]!==i||t[44]!==j||t[45]!==E?(M=(0,$.jsx)(Mr,{className:i,title:_i,contentClassName:`flex flex-col gap-2`,defaultOpen:!1,onToggle:E,children:j}),t[43]=i,t[44]=j,t[45]=E,t[46]=M):M=t[46],M}function _i(){return(0,$.jsxs)($.Fragment,{children:[`Commits`,(0,$.jsx)(Ct,{})]})}function vi(e){let t=(0,Z.c)(21),{className:n}=e,r=n===void 0?``:n,{topContributorCutoff:i,setTopContributorCutoff:a}=tt(),[o,s]=(0,Q.useState)(i),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=[0,100],t[0]=c):c=t[0];let l=c,u;t[1]===r?u=t[2]:(u=R(`grid grid-cols-[calc(11*var(--spacing))_1fr] px-3`,r),t[1]=r,t[2]=u);let d;t[3]===o?d=t[4]:(d=(0,$.jsxs)(`p`,{title:`Min percentage of changes a file's top contributor must account for to be colored.`,children:[o,`%`]}),t[3]=o,t[4]=d);let f;t[5]===o?f=t[6]:(f=[o],t[5]=o,t[6]=f);let p;t[7]===a?p=t[8]:(p=e=>{a(e[0]),(0,Q.startTransition)(()=>{s(e[0])})},t[7]=a,t[8]=p);let m,h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>{(0,Q.startTransition)(()=>{s(e[0])})},h=(0,$.jsx)(gt,{children:bi}),t[9]=m,t[10]=h):(m=t[9],h=t[10]);let g,_;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(Ee,{children:e=>{let{handles:t,getHandleProps:n}=e;return(0,$.jsx)(Q.Fragment,{children:t.map(e=>(0,$.jsx)(be,{handle:e,domain:l,getHandleProps:n},e.id))})}}),g=(0,$.jsx)(De,{right:!1,children:yi}),t[11]=g,t[12]=_):(g=t[11],_=t[12]);let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(Ce,{valueMap:{0:`Top contributor`,50:`Majority contributor`,100:`Single contributor`}}),t[13]=v):v=t[13];let y;t[14]!==f||t[15]!==p?(y=(0,$.jsx)(`div`,{className:`relative`,title:`Adjust the top contributor percentage cutoff`,children:(0,$.jsxs)(W,{mode:1,step:1,domain:l,values:f,onChange:p,onUpdate:m,children:[h,_,g,v]})}),t[14]=f,t[15]=p,t[16]=y):y=t[16];let b;return t[17]!==y||t[18]!==u||t[19]!==d?(b=(0,$.jsxs)(`div`,{className:u,children:[d,y]}),t[17]=y,t[18]=u,t[19]=d,t[20]=b):b=t[20],b}function yi(e){let{tracks:t,getTrackProps:n}=e;return(0,$.jsx)(Q.Fragment,{children:t.map(e=>{let{id:t,...r}=e;return(0,Q.createElement)(ve,{...r,key:t,backgroundColor:le,getTrackProps:n})})})}function bi(e){return(0,$.jsx)(q,{...e})}function xi(){let e=(0,Z.c)(20),t=H(),n=J(),[r]=vt(X),[i,a]=_t(`zoomPath`,X.zoomPath),o=u(),c=t.type===`blob`,l,d,f,p;e[0]!==t.path||e[1]!==n||e[2]!==c||e[3]!==o.pathname||e[4]!==r?(p=c?Pe(t.path):t.path,l=(r.zoomPath??n.databaseInfo.repo)===p,d=o.pathname,f=yt({...r,zoomPath:p??void 0}),e[0]=t.path,e[1]=n,e[2]=c,e[3]=o.pathname,e[4]=r,e[5]=l,e[6]=d,e[7]=f,e[8]=p):(l=e[5],d=e[6],f=e[7],p=e[8]);let m=d+f,h;e[9]!==l||e[10]!==p||e[11]!==m?(h=l?null:(0,$.jsxs)(s,{className:`btn btn--text`,"aria-disabled":l,to:l?``:m,title:`Zoom to ${p}`,children:[(0,$.jsx)(L,{path:k}),`Zoom in`]}),e[9]=l,e[10]=p,e[11]=m,e[12]=h):h=e[12];let g;e[13]!==n||e[14]!==a||e[15]!==i?(g=i&&i!==n.databaseInfo.repo?(0,$.jsxs)(`button`,{className:`btn btn--text`,title:`Zoom out to repository root`,onClick:()=>a(n.databaseInfo.repo),children:[(0,$.jsx)(L,{path:O}),`Zoom out`]}):null,e[13]=n,e[14]=a,e[15]=i,e[16]=g):g=e[16];let _;return e[17]!==h||e[18]!==g?(_=(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[h,g]})}),e[17]=h,e[18]=g,e[19]=_):_=e[19],_}function Si(){let e=(0,Z.c)(44),t=a(),n=H(),r=J(),{metricType:i,setMetricType:o,showTopContributorSlider:s,setShowTopContributorSlider:c}=tt(),l=K(),[u,d]=(0,Q.useState)(!1),f=n?.type===`blob`,p;e[0]===n?p=e[1]:(p=nt(n),e[0]=n,e[1]=p);let m=p,h=ye(n);if(!n){let t;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`p`,{className:`p-4`,children:`No file or folder selected`}),e[2]=t):t=e[2],t}let _=r.databaseInfo.clickedObjectInfo;if((f?!!r.databaseInfo.commitCounts[n.path]:_.existsInRange)===!1){let t=f?`File`:`Folder`,n;return e[3]===t?n=e[4]:(n=(0,$.jsxs)(`p`,{className:`p-4`,children:[t,` does not exist in selected time range`]}),e[3]=t,e[4]=n),n}let v=f?r.databaseInfo.contribSumPerFile[n.path]:_?.contributions??null,y=f?r.databaseInfo.commitCounts[n.path]:_?_.amountOfCommits:null,b;e[5]!==n.path||e[6]!==_||e[7]!==r.databaseInfo.lastChanged||e[8]!==f?(b=f?ct(r.databaseInfo.lastChanged[n.path])??`unknown`:ct(_.lastChanged),e[5]=n.path,e[6]=_,e[7]=r.databaseInfo.lastChanged,e[8]=f,e[9]=b):b=e[9];let x=b,S;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>d(!0),e[10]=S):S=e[10];let C;e[11]!==t||e[12]!==l?(C=()=>t({rerollColors:``},{method:`post`,action:l}),e[11]=t,e[12]=l,e[13]=C):C=e[13];let w;e[14]!==c||e[15]!==s?(w=()=>c(!s),e[14]=c,e[15]=s,e[16]=w):w=e[16];let T;if(e[17]!==n||e[18]!==y||e[19]!==v||e[20]!==_||e[21]!==r.databaseInfo.contribSumPerFile||e[22]!==f||e[23]!==m||e[24]!==x||e[25]!==i||e[26]!==u||e[27]!==h||e[28]!==o||e[29]!==s||e[30]!==C||e[31]!==w){let t={"group-contributors":S,"shuffle-colors":C,"toggle-top-contributor-slider":w},a=e=>(e===void 0?[]:e).map(e=>({icon:e.icon,label:e.label,onClick:t[e.actionId]})),c;e[33]!==n.name||e[34]!==f||e[35]!==m?(c=m?`Repository`:f?`.`+qe(n.name.split(`.`)):`Directory`,e[33]=n.name,e[34]=f,e[35]=m,e[36]=c):c=e[36];let l;e[37]===n.byteSize?l=e[38]:(l=U(n.byteSize),e[37]=n.byteSize,e[38]=l);let p;e[39]===n.byteSize?p=e[40]:(p=U(n.byteSize),e[39]=n.byteSize,e[40]=p);let b={FILE_TYPE:{description:Y(n)?`Folder type`:`File type`,icon:m?N:f?g:D,data:c,inspectionPanels:ut.inspectionPanels},FILE_SIZE:{description:n.type===`tree`?`Folder size`:`File size`,icon:ht.icon,data:l.value+` `+p.unit,inspectionPanels:ht.inspectionPanels},MOST_COMMITS:{description:y&&y===1?`Commit`:`Commits`,icon:fe.icon,data:y?.toLocaleString()??`loading...`,inspectionPanels:fe.inspectionPanels},MOST_CONTRIBUTIONS:{description:`Line Changes`,icon:_e.icon,data:f?r.databaseInfo.contribSumPerFile[n.path].toLocaleString():v.toLocaleString(),inspectionPanels:_e.inspectionPanels},CONTRIBUTORS:{icon:Ne.icon,description:`Contributors`,data:_?_.contributors?.length.toLocaleString()??`Unknown`:`loading...`,inspectionPanels:Ne.inspectionPanels},TOP_CONTRIBUTOR:{description:_?.multiTopContributors?`Top Churners`:`Top Churner`,icon:pt.icon,data:_?_.multiTopContributors?`Multiple people`:_.topContributor[0].contributor??`Unknown`:`loading...`,inspectionPanels:[...s?[{title:`Top Cutoff`,content:vi,description:`Adjust percentage-threshold of line-changes needed to be considered top churner (otherwise 'Multiple Contributors').`,menuItems:[{icon:z,label:`Toggle Cutoff Slider`,actionId:`toggle-top-contributor-slider`}]}]:[],...pt.inspectionPanels]},LAST_CHANGED:{description:`Last change`,icon:Te.icon,data:x?x+` ago`:``,inspectionPanels:Te.inspectionPanels}},{inspectionPanels:E}=b[i],O;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>d(!1),e[41]=O):O=e[41];let k;e[42]===u?k=e[43]:(k=(0,$.jsx)(Jr,{open:u,onClose:O}),e[42]=u,e[43]=k),T=(0,$.jsxs)($.Fragment,{children:[k,(0,$.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:Object.entries(b).map(e=>{let[t,n]=e,{icon:r,data:a,description:s}=n;return(0,$.jsxs)(Ci,{icon:r,isCurrentMetric:t===i,color:h&&t===i?h:void 0,onClick:()=>void o(t),children:[(0,$.jsx)(`p`,{className:`truncate text-xs font-normal opacity-70`,children:s}),(0,$.jsx)(`p`,{className:`w-full truncate text-sm font-bold`,title:a,children:a})]},t)})}),E.map((e,t)=>(0,$.jsx)(Le,{actions:e.actions,metricMenuItems:a(e.menuItems),title:e.title??`default`,description:e.description??`Description not provided.`,children:(0,$.jsx)(e.content,{})},t))]}),e[17]=n,e[18]=y,e[19]=v,e[20]=_,e[21]=r.databaseInfo.contribSumPerFile,e[22]=f,e[23]=m,e[24]=x,e[25]=i,e[26]=u,e[27]=h,e[28]=o,e[29]=s,e[30]=C,e[31]=w,e[32]=T}else T=e[32];return T}function Ci(e){let t=(0,Z.c)(17),{icon:n,isCurrentMetric:r,children:i,color:a,onClick:o}=e,s;if(t[0]!==a||t[1]!==r){let e;t[3]===a?e=t[4]:(e=a?We(a)?`text-white`:`text-black`:void 0,t[3]=a,t[4]=e),s=R(`border-border flex h-full w-full cursor-pointer flex-row items-center justify-between gap-5 rounded border bg-[hsl(from_var(--color,var(--color-secondary-bg))_h_s_l/var(--brightness))] px-2 py-1 shadow-sm transition-colors [--brightness:1] hover:[--brightness:0.6] dark:bg-[hsl(from_var(--color,var(--color-secondary-bg-dark))_h_s_l/var(--brightness))]`,{"ring-primary ring-1":r},e),t[0]=a,t[1]=r,t[2]=s}else s=t[2];let c;t[5]===a?c=t[6]:(c={"--color":a},t[5]=a,t[6]=c);let l=c,u;t[7]===n?u=t[8]:(u=(0,$.jsx)(L,{path:n,size:.75}),t[7]=n,t[8]=u);let d;t[9]===i?d=t[10]:(d=(0,$.jsx)(`div`,{className:`flex flex-col overflow-hidden text-right`,children:i}),t[9]=i,t[10]=d);let f;return t[11]!==o||t[12]!==s||t[13]!==l||t[14]!==u||t[15]!==d?(f=(0,$.jsxs)(`button`,{type:`button`,className:s,style:l,onClick:o,children:[u,d]}),t[11]=o,t[12]=s,t[13]=l,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function wi(){let e=(0,Z.c)(42),t=H(),n=se(),r=K(),{state:i}=l(),[,a]=_t(`zoomPath`,X.zoomPath);if(!t)return null;let o;e[0]===t?o=e[1]:(o=nt(t),e[0]=t,e[1]=o);let s=o,c=t.type===`blob`,u;e[2]===t.name?u=e[3]:(u=qe(t.name.split(`.`)),e[2]=t.name,e[3]=u);let f=u,p;e[4]===t.path?p=e[5]:(p=(0,$.jsx)(`input`,{type:`hidden`,name:`open`,value:t.path}),e[4]=t.path,e[5]=p);let h=i!==`idle`,g=t.type===`blob`?`Open ${t.name} in default app`:`Browse ${t.name} in system explorer`,_;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(L,{path:m,size:`1.25em`,className:`w-max`}),e[6]=_):_=e[6];let v=t.type===`blob`?`Open`:`Browse`,y;e[7]!==h||e[8]!==g||e[9]!==v?(y=(0,$.jsxs)(`button`,{className:`btn btn--text`,disabled:h,title:g,children:[_,v]}),e[7]=h,e[8]=g,e[9]=v,e[10]=y):y=e[10];let b;e[11]!==p||e[12]!==y||e[13]!==r?(b=(0,$.jsxs)(d,{method:`post`,action:r,children:[p,y]}),e[11]=p,e[12]=y,e[13]=r,e[14]=b):b=e[14];let x;e[15]!==t.path||e[16]!==c||e[17]!==n||e[18]!==a?(x=()=>{c||a(Pe(t.path)),n(null)},e[15]=t.path,e[16]=c,e[17]=n,e[18]=a,e[19]=x):x=e[19];let C;e[20]===t.path?C=e[21]:(C=(0,$.jsx)(`input`,{type:`hidden`,name:`hide`,value:t.path}),e[20]=t.path,e[21]=C);let w;e[22]!==t.name||e[23]!==s||e[24]!==i?(w=s?null:(0,$.jsxs)(`button`,{className:`btn btn--text`,disabled:i!==`idle`,title:`Hide ${t.name} from visualization`,children:[(0,$.jsx)(L,{path:S}),`Hide`]}),e[22]=t.name,e[23]=s,e[24]=i,e[25]=w):w=e[25];let T;e[26]!==C||e[27]!==w||e[28]!==x||e[29]!==r?(T=(0,$.jsxs)(d,{className:`w-max`,method:`post`,action:r,onSubmit:x,children:[C,w]}),e[26]=C,e[27]=w,e[28]=x,e[29]=r,e[30]=T):T=e[30];let E;e[31]!==t.name||e[32]!==f||e[33]!==c||e[34]!==i||e[35]!==r?(E=c?(0,$.jsx)($.Fragment,{children:t.name.includes(`.`)?(0,$.jsxs)(d,{className:`w-max`,method:`post`,action:r,children:[(0,$.jsx)(`input`,{type:`hidden`,name:`hide`,value:`*.${f}`}),(0,$.jsxs)(`button`,{className:`btn btn--text`,disabled:i!==`idle`,title:`Hide all files with .${f} extension`,children:[(0,$.jsx)(L,{path:S}),(0,$.jsxs)(`span`,{children:[`Hide *.`,f]})]})]}):null}):null,e[31]=t.name,e[32]=f,e[33]=c,e[34]=i,e[35]=r,e[36]=E):E=e[36];let D;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(xi,{}),e[37]=D):D=e[37];let O;return e[38]!==T||e[39]!==E||e[40]!==b?(O=(0,$.jsxs)(`div`,{className:`flex flex-wrap`,children:[b,T,E,D]}),e[38]=T,e[39]=E,e[40]=b,e[41]=O):O=e[41],O}var Ti=`/assets/drivingTruck_32x-C9OqTj6H.gif`;function Ei(e){let t=(0,Z.c)(6),{className:n}=e,r;t[0]===n?r=t[1]:(r=R(`flex gap-2`,n),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(`span`,{className:`font-bold`,children:`Loading...`}),t[2]=i):i=t[2];let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(`div`,{className:`relative flex w-24 items-center`,children:(0,$.jsx)(`img`,{src:Ti,alt:`Loading...`,className:R(`pixelated absolute size-24 translate-y-0.75`)})}),t[3]=a):a=t[3];let o;return t[4]===r?o=t[5]:(o=(0,$.jsxs)(`div`,{className:r,children:[i,a]}),t[4]=r,t[5]=o),o}var Di=({loaderData:e})=>[{title:`${e.repositoryName} - Git Truck`}],Oi=i(function({loaderData:{parentDirectoryPath:e,versionInfo:t,dataPromise:i}}){let[{leftExpanded:a},u]=(0,Q.useReducer)((e,t)=>{switch(t){case`toggleLeft`:return{leftExpanded:!e.leftExpanded}}},{leftExpanded:!0}),d=()=>u(`toggleLeft`),f=n(),p=l(),m=r(),h=m.state!==`idle`,g=p.state!==`idle`,_=c(`/browse`)+Et({path:e}),[v]=vt(X),y=(0,Q.useCallback)(()=>{(0,Q.startTransition)(async()=>{if(h||!v.branch||!v.path)return;let e=c(`/api/abort`)+St({branch:v.branch,path:v.path});await m.submit(null,{action:e,method:`post`}),f(_)})},[h,v.branch,v.path,m,f,_]),b=dt(`(min-width: var(--breakpoint-large))`);return(0,$.jsx)(Q.Suspense,{fallback:(0,$.jsx)(`div`,{className:`grid h-screen place-items-center bg-slate-200 dark:bg-stone-800`,children:(0,$.jsx)(Mt,{showProgress:!h,loadingText:({status:e})=>(0,$.jsx)(`div`,{className:`flex flex-col items-center gap-2`,children:(0,$.jsx)(`div`,{className:`flex gap-2`,children:e!==`Aborted`&&e!==`CommitHistoryProcessed`?(0,$.jsx)(`button`,{className:`btn btn--text btn--danger`,disabled:h,onClick:y,children:h?`Aborting...`:`Abort`}):(0,$.jsx)(s,{to:_,className:`btn btn--text`,children:`Go back`})})})})}),children:(0,$.jsx)(o,{resolve:i,children:e=>(0,$.jsx)(kt,{data:e,children:(0,$.jsxs)(`div`,{className:R(`min-h-100dvh bg-secondary-bg dark:bg-secondary-bg-dark grid grid-cols-2 grid-rows-[auto_100dvh_auto_auto] gap-x-1 gap-y-2 p-2 transition-all [grid-template-areas:"lheader_rheader"_"left_left"_"chart_chart"_"barchart_barchart"] lg:h-screen lg:grid-cols-[var(--spacing-sidepanel)_1fr] lg:grid-rows-[auto_1fr_auto] lg:overflow-hidden lg:pr-2 lg:[grid-template-areas:"rheader_rheader"_"chart_chart"_"barchart_barchart"]`,{'lg:[grid-template-areas:"lheader_rheader"_"left_chart"_"left_barchart"]':a&&b}),children:[(0,$.jsxs)(`header`,{className:R(`bg-secondary-bg dark:bg-secondary-bg-dark flex grid-cols-3 items-center justify-between gap-2 pr-2 [grid-area:lheader]`,{hidden:!a}),children:[(0,$.jsx)(Tt,{installedVersion:t.installedVersion,latestVersion:t.latestVersion}),b&&a?(0,$.jsx)(`button`,{title:a?`Hide left panel`:`Show left panel`,className:`btn btn--text aspect-square`,onClick:d,children:(0,$.jsx)(L,{path:a?C:A,size:1})}):(0,$.jsx)(`div`,{})]}),(0,$.jsxs)(`nav`,{className:`grid grid-cols-[1fr_auto_1fr] items-center justify-between gap-2 [grid-area:rheader]`,children:[(0,$.jsxs)(`div`,{className:`flex items-center`,children:[b&&!a?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{title:a?`Hide left panel`:`Show left panel`,className:`btn btn--text aspect-square`,onClick:d,children:(0,$.jsx)(L,{path:a?C:A,size:1})}),(0,$.jsx)(L,{"aria-hidden":!0,path:`M11,2 H13 V22 H11 Z`,size:1,className:`fill-primary-text dark:fill-primary-text-dark mx-0 align-middle opacity-20`})]}):null,(0,$.jsx)(wt,{zoom:!0})]}),(0,$.jsx)(Ei,{className:R(`transition-opacity`,{"opacity-0":!g})}),(0,$.jsxs)(`div`,{className:`flex justify-end`,children:[(0,$.jsx)(jt,{}),(0,$.jsx)(Lr,{}),(0,$.jsx)(cr,{}),(0,$.jsx)(ai,{compact:!0}),(0,$.jsx)(Hr,{}),(0,$.jsx)(Rr,{})]})]}),(0,$.jsx)(Q.Activity,{mode:a||!b?`visible`:`hidden`,children:(0,$.jsxs)(`aside`,{className:B(`grid grid-rows-[auto_1fr] flex-col gap-4 lg:transition-transform`,a?`[grid-area:left]`:`lg:-translate-x-sidepanel`),children:[(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 px-2`,children:[(0,$.jsx)(`h2`,{className:`card__title`,children:`Visualization options`}),(0,$.jsx)(dr,{},a?`expanded`:`collapsed`)]}),(0,$.jsxs)(`div`,{className:`hover:scrollbar-thumb-primary-bg-dark/50 hover:dark:scrollbar-thumb-primary-bg/50 flex scrollbar-thin scrollbar-thumb-transparent scrollbar-track-transparent scrollbar-gutter-stable flex-col gap-4 overflow-y-auto`,children:[(0,$.jsx)(Mr,{title:()=>(0,$.jsxs)($.Fragment,{children:[`Actions `,(0,$.jsx)(Ct,{})]}),className:`card flex flex-col gap-1 px-2`,children:(0,$.jsx)(wi,{})}),(0,$.jsx)(Mr,{className:`card`,title:()=>(0,$.jsxs)($.Fragment,{children:[`Metrics`,(0,$.jsx)(Ct,{})]}),children:(0,$.jsx)(Si,{})}),(0,$.jsx)(gi,{className:`card`})]})]})}),(0,$.jsx)(`div`,{className:R(`bg-primary-bg dark:bg-primary-bg-dark relative grid h-full rounded-xl shadow-md [grid-area:chart] lg:transition-transform`),children:(0,$.jsx)(st,{children:()=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(qn,{}),(0,Wn.createPortal)((0,$.jsx)(Nt,{}),document.body)]})})}),(0,$.jsx)(Fr,{className:`[grid-area:barchart]`})]})})})})});export{Oi as default,Di as meta};
@@ -0,0 +1 @@
1
+ import{t as e}from"./react-T1tfSvWJ.js";e();function t(e){return e===null||Array.isArray(e)&&e.length===0}function n(e,t,n){if(typeof e==`string`)n.set(t,e);else{n.delete(t);for(let r of e)n.append(t,r);n.has(t)||n.set(t,``)}return n}function r(e,{urlKeys:n={}}={}){function r(a,{strict:o=!1}={}){if(a instanceof Promise)return a.then(e=>r(e,{strict:o}));let s=i(a),c={};for(let[r,i]of Object.entries(e)){let e=n[r]??r,a=i.type===`multi`?s.getAll(e):s.get(e);if(t(a)){c[r]=i.defaultValue??null;continue}let l;try{l=i.parse(a)}catch(e){if(o)throw Error(`[nuqs] Error while parsing query \`${a}\` for key \`${r}\`: ${e}`);l=null}if(o&&a&&l===null)throw Error(`[nuqs] Failed to parse query \`${a}\` for key \`${r}\` (got null)`);c[r]=l??i.defaultValue??null}return c}return r}function i(e){try{if(e instanceof Request)return e.url?new URL(e.url).searchParams:new URLSearchParams;if(e instanceof URL)return e.searchParams;if(e instanceof URLSearchParams)return e;if(typeof e==`object`){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.set(n,r);return t}if(typeof e==`string`)return URL.hasOwnProperty(`canParse`)&&URL.canParse(e)?new URL(e).searchParams:new URLSearchParams(e)}catch{}return new URLSearchParams}function a(){if(typeof window>`u`||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}a();var o=c();function s(e,...t){o&&console.warn(e,...t)}function c(){try{let e=`nuqs-localStorage-test`;if(typeof localStorage>`u`)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem(`debug`)||``).includes(`nuqs`)}catch{return!1}}function l(e,t,n){try{return e(t)}catch(e){return s("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":``),t,e,n),null}}function u(e){function t(t){if(t===void 0)return null;let n=``;if(Array.isArray(t)){if(t[0]===void 0)return null;n=t[0]}return typeof t==`string`&&(n=t),l(e.parse,n)}return{type:`single`,eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide(n){return t(n)??e}}},withOptions(e){return{...this,...e}}}}var d=u({parse:e=>e,serialize:String}),f=u({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)});u({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),u({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(t.length&1?`0`:``)+t}}),u({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),u({parse:e=>e.toLowerCase()===`true`,serialize:String});function p(e,t){return e.valueOf()===t.valueOf()}u({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:p}),u({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:p}),u({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:p});function m(e){return u({parse:t=>{let n=t;return e.includes(n)?n:null},serialize:String})}function h(e,t=`,`){let n=e.eq??((e,t)=>e===t),r=encodeURIComponent(t);return u({parse:n=>n===``?[]:n.split(t).map((n,i)=>l(e.parse,n.replaceAll(r,t),`[${i}]`)).filter(e=>e!=null),serialize:n=>n.map(n=>(e.serialize?e.serialize(n):String(n)).replaceAll(t,r)).join(t),eq(e,t){return e===t?!0:e.length===t.length?e.every((e,r)=>n(e,t[r])):!1}})}function g(e){if(e.size===0)return``;let t=[];for(let[n,r]of e.entries()){let e=n.replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/\+/g,`%2B`).replace(/=/g,`%3D`).replace(/\?/g,`%3F`);t.push(`${e}=${_(r)}`)}return`?`+t.join(`&`)}function _(e){return e.replace(/%/g,`%25`).replace(/\+/g,`%2B`).replace(/ /g,`+`).replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/"/g,`%22`).replace(/'/g,`%27`).replace(/`/g,`%60`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}function v(e,{clearOnDefault:t=!0,urlKeys:r={},processUrlSearchParams:i}={}){function a(a,o={}){let[s,c]=y(a)?b(a):[``,new URLSearchParams],l=y(a)?o:a;if(l===null){for(let t in e){let e=r[t]??t;c.delete(e)}return i&&(c=i(c)),s+g(c)}for(let i in e){let a=e[i],o=l[i];if(!a||o===void 0)continue;let s=r[i]??i,u=a.defaultValue!==void 0&&o!==null&&(a.eq??((e,t)=>e===t))(o,a.defaultValue);o===null||(a.clearOnDefault??t??!0)&&u?c.delete(s):c=n(a.serialize(o),s,c)}return i&&(c=i(c)),s+g(c)}return a}function y(e){return typeof e==`string`||e instanceof URLSearchParams||e instanceof URL}function b(e){if(typeof e==`string`){let[t=``,...n]=e.split(`?`);return[t,new URLSearchParams(n.join(`?`))]}else if(e instanceof URLSearchParams)return[``,new URLSearchParams(e)];else return[e.origin+e.pathname,new URLSearchParams(e.searchParams)]}var x=[`day`,`week`,`month`,`year`],S={path:d.withOptions({shallow:!1}),objectPath:d.withOptions({shallow:!1}),zoomPath:d.withOptions({shallow:!1}),branch:d.withOptions({shallow:!1}),timeUnit:m(x).withOptions({shallow:!1}),start:f.withOptions({shallow:!1}),end:f.withOptions({shallow:!1})},C=v(S);r(S);export{f as a,h as i,C as n,d as o,x as r,m as s,S as t};
@@ -0,0 +1 @@
1
+ import"./viewParams-j9NUggAW.js";
Binary file