squint-cljs
Advanced tools
Comparing version 0.4.85 to 0.5.86
@@ -6,47 +6,47 @@ import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
import*as esm_import$fs from"fs";import*as esm_import$net from"net";import*as esm_import$readline from"readline";import*as esm_import$squint_cljs$core from"squint-cljs/core.js";import*as esm_import$node_util from"node:util";import*as esm_import$path from"path"; | ||
var Zga=function(a,b){return $APP.Vd(a)&&$APP.Vd(b)?$APP.Mk.l($APP.F([a,b])):$APP.Rd(a)&&($APP.Ud(a)||$APP.Td(a))&&$APP.Rd(b)&&($APP.Ud(b)||$APP.Td(b))?$APP.Rg.g(a,b):b},W9=function(a,b){return $APP.oe.j(function(c,d){return $APP.Su.l(Zga,$APP.F([c,d]))},a,b)},X9=function(a){throw $APP.Zk.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.n(null,1,[$ga,a],null));},Y9=function(a){var b=JSON.parse(a);return $APP.ae(b)?b:X9(a)},aha=function(a){var b=JSON.parse(a);return $APP.oG(b)?b:X9(a)},bha= | ||
function(a){var b=JSON.parse(a);return $APP.pG(b)?b:X9(a)},Z9=function(a){var b=JSON.parse(a);return"number"===typeof b?b:X9(a)},$9=function(a){return"string"===typeof a?$APP.B.j(a,0,null):null},a$=function(a){return $APP.A.g(":",$9(a))?$APP.ri.h($APP.fi.g(a,1)):$APP.ri.h(a)},cha=function(a){return $APP.Rd(a)?$APP.y(a):a},b$=function(a){if("string"===typeof a)try{var b=$9(a);if($APP.A.g("true",a)||$APP.A.g("false",a))var c=Y9(a);else{if($APP.A.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e= | ||
Z9(a);else{var f=$APP.A.g(":",b);var k=f?$APP.di(/:[a-zA-Z][a-zA-Z0-9_\/\.-]*/,a):f;e=$APP.r(k)?a$(a):a}d=e}c=d}return c}catch(l){return a}else return a},c$=function(a,b,c,d){throw $APP.Zk.j(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.Oi.l($APP.F([a]))].join(""),c instanceof $APP.H?" to ":" with ",$APP.t.h(c instanceof $APP.H?$APP.Xh(c):c)].join(""),new $APP.n(null,2,[dha,a,eha,c],null),d);},fha=function(a,b,c){var d=function(){switch(b instanceof $APP.H?b.da:null){case "boolean":case "bool":return Y9; | ||
case "int":case "long":return aha;case "double":return bha;case "number":return Z9;case "symbol":return $APP.Ei;case "keyword":return a$;case "string":return $APP.se;case "edn":return $APP.aH;case "auto":return b$;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=c$(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?c$(a,c,b,null):d},d$=function(a,b,c){a=$APP.fe.g(a,b);c=$APP.r(a)?a:$APP.Rd(c)?$APP.Hd(c):null;return $APP.r(c)?$APP.Rd(c)?$APP.gq.g($APP.Ee, | ||
c):c:null},e$=function(a,b,c,d){return $APP.Ko.g(b,c)?(c=$APP.tG(a,b),$APP.r(c)?($APP.B.j(c,0,null),c=$APP.B.j(c,1,null),$APP.zi.j(a,b,$APP.r(d)?d.g?d.g(c,!0):d.call(null,c,!0):!0)):$APP.zi.j(a,b,$APP.r(d)?d.g?d.g(null,!0):d.call(null,null,!0):!0)):a},gha=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Rd(d):d)?fha(e,d,f):b$(e);return $APP.r(c)?$APP.Pm.A(a,b,c,d):$APP.zi.j(a,b,d)},hha=function(a){return $APP.oe.j(function(b,c){var d=$APP.B.j(c,0,null);c=$APP.B.j(c,1,null);var e=$APP.jf(c),f=$APP.fe.g(e, | ||
f$),k=$APP.fe.g(e,g$);c=$APP.fe.g(e,$APP.zm);var l=$APP.fe.g(e,$APP.xE);e=$APP.fe.g(e,h$);b=$APP.r(f)?$APP.Pm.J(b,f$,$APP.zi,d,f):b;b=$APP.r(k)?$APP.Pm.j(b,g$,function(m){if($APP.he(m,k))throw $APP.Zk.g(["Conflicting alias ",$APP.t.h(k)," between ",$APP.t.h($APP.fe.g(m,k))," and ",$APP.t.h(d)].join(""),new $APP.n(null,1,[g$,k],null));return $APP.zi.j(m,k,d)}):b;b=$APP.r(l)?$APP.Pm.j(b,$APP.xE,$APP.gq.g(function(m){return $APP.Ee.g(m,d)},$APP.Rh)):b;b=$APP.r(e)?$APP.Pm.J(b,h$,$APP.zi,d,e):b;return $APP.r(c)? | ||
$APP.Pm.J(b,i$,$APP.zi,d,c):b},$APP.hf,a)},m$=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,j$);b=$APP.uG(function(d){var e=$APP.r(c)?null:$APP.qa(d,":");return!($APP.r(e)?e:$APP.qa(d,"-"))},a);a=$APP.B.j(b,0,null);b=$APP.B.j(b,1,null);return new $APP.n(null,2,[k$,a,l$,b],null)},o$=function(a,b){if($APP.r(b))if($APP.x(a)){var c=$APP.xd(a),d=$APP.$e(c,b);c=c<d?c:d;a=new $APP.I(null,2,5,$APP.N,[$APP.R.g($APP.Du.g(b,a),$APP.Nf.g(c,a)),$APP.Nf.g(c,b)],null)}else a=new $APP.I(null,2,5,$APP.N,[a,b],null); | ||
else a=new $APP.I(null,2,5,$APP.N,[a,b],null);b=a;a=$APP.B.j(b,0,null);b=$APP.B.j(b,1,null);return new $APP.n(null,2,[l$,a,n$,b],null)},w$=function(a,b,c,d,e){var f=$9(a),k="string"===typeof a?$APP.B.j(a,1,null):null,l;if(l=$APP.A.g(f,"-")){try{var m=Z9($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?p$:null;f=$APP.A.g(":",f);c=$APP.Ko.g(p$,b)&&f&&($APP.A.g(q$,d)||$APP.Za(c)||$APP.A.g(e,c));d=$APP.r(b)?b:c?r$:null;a=l?$APP.r(k)?$APP.Ko.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.n(null, | ||
5,[$APP.Iw,d,s$,l,t$,a,u$,c,v$,f],null)},lha=function(a,b){function c(vb){vb=$APP.Mk.l($APP.F([new $APP.n(null,2,[x$,d,$APP.Tk,y$],null),vb]));return O.h?O.h(vb):O.call(null,vb)}var d=x$.h(b),e=$APP.r(d)?W9(b,$APP.F([hha(d)])):b,f=f$.h(e),k=function(){var vb=g$.h(e);return $APP.r(vb)?vb:$APP.Uq.h(e)}(),l=iha.h(e),m=$APP.xE.h(e),h=i$.h(e),p=j$.h(e),q=function(){var vb=z$.h(e);return $APP.r(vb)?vb:jha.h(e)}(),v=$APP.Vh($APP.R.l($APP.Mh($APP.Vd(d)?d:$APP.Rg.g($APP.hf,d)),$APP.Oh(k),$APP.F([$APP.Mh(f)]))), | ||
D=$APP.A.g(!0,q)?v:null==q?null:$APP.Vh(q),J=h$.h(e),O=function(){var vb=kha.h(e);return $APP.r(vb)?vb:function(Yb){Yb=$APP.jf(Yb);var Ic=$APP.fe.g(Yb,A$);throw $APP.Zk.g(Ic,Yb);}}(),P=m$(a,null),W=$APP.jf(P),ca=$APP.fe.g(W,k$),ha=$APP.fe.g(W,l$),na=function(){var vb=n$.h(e);vb=$APP.r(vb)?vb:B$.h(e);return $APP.r(vb)?o$(ca,vb):new $APP.n(null,2,[n$,null,l$,ha],null)}(),pa=$APP.jf(na),fa=$APP.fe.g(pa,l$),E=$APP.fe.g(pa,n$),C=$APP.Ko.g(fa,ha)?new $APP.I(null,2,5,$APP.N,[null,$APP.R.g(fa,ha)],null): | ||
new $APP.I(null,2,5,$APP.N,[ca,ha],null),ea=$APP.B.j(C,0,null),K=$APP.B.j(C,1,null),M=function(){for(var vb=$APP.hf,Yb=null,Ic=null,Ke=$APP.r(p)?p$:null,hd=$APP.x(K),Gg=E;;){if($APP.Za(hd))return new $APP.I(null,3,5,$APP.N,[vb,Yb,Ic],null);var hg=$APP.y(hd),Tc=hg instanceof $APP.H;if(Tc){Yb=e$(vb,Yb,Ic,null);var me=hg;hd=$APP.z(hd);vb=Yb;Yb=me}else{var xl=!0===hg,Qf=$APP.t.h(hg);me=d$(l,Yb,$APP.fe.g(f,Yb));var xi=$APP.fe.g(f,Yb),yl=w$(Qf,Ke,Yb,xi,Ic),Jh=$APP.jf(yl),zl=$APP.fe.g(Jh,s$),Kh=$APP.fe.g(Jh, | ||
t$),Al=$APP.fe.g(Jh,u$),Rf=$APP.fe.g(Jh,$APP.Iw),lk=$APP.fe.g(Jh,v$);if($APP.r(function(){var Me=zl;return $APP.r(Me)?Me:Al}())){var Yc=$APP.qa(Qf,"--"),mk=Yc&&$APP.A.g("--",Qf);if(mk){var Bl=$APP.z(hd);return new $APP.I(null,3,5,$APP.N,[function(){var Me=vb;return Bl?$APP.fo.A(Me,$APP.Fu,new $APP.I(null,2,5,$APP.N,[y$,l$],null),$APP.mg(Bl)):Me}(),Yb,Ic],null)}var nk=Yc?$APP.fi.g(Qf,2):$APP.Wj(Qf,/^(:|-|)/,""),zf=Yc?$APP.Qq.g(nk,/=/):new $APP.I(null,1,5,$APP.N,[nk],null),Sd=$APP.B.j(zf,0,null),Be= | ||
$APP.B.j(zf,1,null),Tb=$APP.ri.h(Sd),Dc=$APP.fe.j(k,Tb,Tb);if($APP.r(Be))Ic=e$(vb,Yb,Ic,me),Yb=Dc,Ke=Rf,hd=$APP.He(Be,$APP.cd(hd)),vb=Ic,Ic=null;else{var Ab=$APP.z(hd),Le=$APP.y(Ab),gw=w$(Le,Rf,Yb,xi,Ic);if($APP.r(function(){var Me=s$.h(gw);return $APP.r(Me)?Me:$APP.Qd(Ab)}()))if($APP.r(Kh)){var hw=$APP.Xh(Dc);Ic=$APP.Ir.l(function(){return function(Me){return new $APP.I(null,2,5,$APP.N,[["-",$APP.t.h(Me)].join(""),!0],null)}}(vb,Yb,Ic,Ke,hd,Gg,hw,Ab,Le,gw,nk,zf,Sd,Be,Tb,Dc,Yc,mk,xl,Qf,me,xi,yl,Jh, | ||
zl,Kh,Al,Rf,lk,hg,Tc,d,e,f,k,l,m,h,p,q,v,D,J,O,c,P,W,ca,ha,na,pa,fa,E,C,ea,K),$APP.F([hw]));hd=$APP.R.g(Ic,Ab);Ke=Rf;Ic=Yb=null}else hd=$APP.he(v,Dc)?null:$APP.jG($APP.t.h(Dc),":no-"),Ke=$APP.r(hd)?$APP.ri.h($APP.Wj($APP.t.h(Dc),":no-","")):Dc,hd=$APP.He($APP.Za(hd),Ab),Yb=e$(vb,Yb,Ic,me),me=Ke,Ke=Rf,vb=Yb,Yb=me;else Yb=e$(vb,Yb,Ic,me),me=Dc,Ke=Rf,hd=Ab,vb=Yb,Yb=me}}else if(mk=$APP.A.g(q$,xi)&&$APP.Ko.g(Qf,"true")&&$APP.Ko.g(Qf,"false")||$APP.A.g(Ic,Yb)&&$APP.Za(me))if(Gg=$APP.r(hd)?$APP.r(Gg)?o$(hd, | ||
Gg):new $APP.n(null,1,[l$,hd],null):new $APP.n(null,1,[l$,hd],null),Ke=$APP.jf(Gg),Gg=$APP.fe.g(Ke,l$),Ke=$APP.fe.g(Ke,n$),$APP.Ko.g(hd,Gg))me=Ke,Ke=Rf,hd=Gg,Gg=me;else return new $APP.I(null,3,5,$APP.N,[$APP.fo.A(vb,$APP.Fu,new $APP.I(null,2,5,$APP.N,[y$,l$],null),$APP.mg(hd)),Yb,Ic],null);else{try{var Zd=gha(vb,Yb,me,cha(xi),Qf,xl)}catch(Me){c(new $APP.n(null,4,[C$,f$,A$,$APP.yG(Me),D$,Yb,E$,Qf],null)),Zd=vb}Ic=$APP.r(function(){var Me=$APP.A.g(r$,Rf);return Me?lk:Me}())?null:Yb;me=$APP.r(function(){var Me= | ||
$APP.A.g(r$,Rf);return Me?lk:Me}())?null:Yb;Ke=Rf;hd=$APP.z(hd);vb=Zd;Yb=Ic;Ic=me}}}}(),da=$APP.B.j(M,0,null),ia=$APP.B.j(M,1,null),ja=$APP.B.j(M,2,null),sa=d$(l,ia,$APP.fe.g(f,ia)),ta=function(){var vb=e$(da,ia,ja,sa);return $APP.x(ea)?$APP.fo.A(vb,$APP.Jk,new $APP.I(null,2,5,$APP.N,[y$,l$],null),function(Yb){return $APP.Rg.g($APP.mg(ea),Yb)}):vb}(),wa=$APP.r(h)?$APP.Md($APP.Mk.l($APP.F([h,ta])),$APP.Nd(ta)):ta;if($APP.r(D)){a=$APP.x($APP.Mh(wa));b=null;for(var ya=0,Ba=0;;)if(Ba<ya){var Ha=b.ba(null, | ||
Ba);$APP.he(D,Ha)||c(new $APP.n(null,4,[C$,z$,A$,["Unknown option: ",$APP.t.h(Ha)].join(""),z$,D,D$,Ha],null));Ba+=1}else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ba=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ba):(a=$APP.y(b),$APP.he(D,a)||c(new $APP.n(null,4,[C$,z$,A$,["Unknown option: ",$APP.t.h(a)].join(""),z$,D,D$,a],null)),a=$APP.z(b),b=null,ya=0),Ba=0;else break}if($APP.r(m))for(a=$APP.x(m),b=null,Ba=ya=0;;)if(Ba<ya)Ha=b.ba(null,Ba),$APP.r($APP.tG(wa,Ha))||c(new $APP.n(null,4,[C$,$APP.xE,A$,["Required option: ", | ||
$APP.t.h(Ha)].join(""),$APP.xE,m,D$,Ha],null)),Ba+=1;else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ba=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ba):(a=$APP.y(b),$APP.r($APP.tG(wa,a))||c(new $APP.n(null,4,[C$,$APP.xE,A$,["Required option: ",$APP.t.h(a)].join(""),$APP.xE,m,D$,a],null)),a=$APP.z(b),b=null,ya=0),Ba=0;else break;if($APP.r(J))for(var Da=$APP.x(J),za=null,Na=0,Ta=0;;)if(Ta<Na){var db=za.ba(null,Ta),ub=$APP.B.j(db,0,null),Bb=$APP.B.j(db,1,null),Xb=function(){var vb=(vb=$APP.Vd(Bb))?F$.h(Bb):vb;return $APP.r(vb)? | ||
vb:Bb}(),pc=$APP.tG(wa,ub);if($APP.r(pc)){var $c=pc,Rb=$APP.B.j($c,0,null),lf=$APP.B.j($c,1,null);if(!$APP.r(Xb.h?Xb.h(lf):Xb.call(null,lf))){var hk=function(){var vb=G$.h(Bb);return $APP.r(vb)?vb:function(){return function(Yb){var Ic=$APP.jf(Yb);Yb=$APP.fe.g(Ic,D$);Ic=$APP.fe.g(Ic,E$);return["Invalid value for option ",$APP.t.h(Yb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Na,Ta,vb,$c,Rb,lf,pc,Xb,db,ub,Bb,d,e,f,k,l,m,h,p,q,v,D,J,O,c,P,W,ca,ha,na,pa,fa,E,C,ea,K,M,da,ia,ja,sa,ta,wa)}();c(new $APP.n(null, | ||
5,[C$,h$,A$,function(){var vb=new $APP.n(null,2,[D$,ub,E$,lf],null);return hk.h?hk.h(vb):hk.call(null,vb)}(),h$,J,D$,ub,E$,lf],null))}}Ta+=1}else{var ul=$APP.x(Da);if(ul){var vi=ul;if($APP.Yd(vi))ya=$APP.uc(vi),a=$APP.vc(vi),b=ya,ya=$APP.xd(ya),Da=a,za=b,Na=ya;else{var ik=$APP.y(vi),jk=$APP.B.j(ik,0,null),pj=$APP.B.j(ik,1,null),kk=function(){var vb=(vb=$APP.Vd(pj))?F$.h(pj):vb;return $APP.r(vb)?vb:pj}(),vl=$APP.tG(wa,jk);if($APP.r(vl)){var Hc=vl,qj=$APP.B.j(Hc,0,null),wi=$APP.B.j(Hc,1,null);if(!$APP.r(kk.h? | ||
kk.h(wi):kk.call(null,wi))){var wl=function(){var vb=G$.h(pj);return $APP.r(vb)?vb:function(){return function(Yb){var Ic=$APP.jf(Yb);Yb=$APP.fe.g(Ic,D$);Ic=$APP.fe.g(Ic,E$);return["Invalid value for option ",$APP.t.h(Yb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Na,Ta,vb,Hc,qj,wi,vl,kk,ik,jk,pj,vi,ul,d,e,f,k,l,m,h,p,q,v,D,J,O,c,P,W,ca,ha,na,pa,fa,E,C,ea,K,M,da,ia,ja,sa,ta,wa)}();c(new $APP.n(null,5,[C$,h$,A$,function(){var vb=new $APP.n(null,2,[D$,jk,E$,wi],null);return wl.h?wl.h(vb):wl.call(null,vb)}(), | ||
h$,J,D$,jk,E$,wi],null))}}Da=$APP.z(vi);za=null;Na=0}Ta=0}else break}return wa},mha=function(a,b){a=lha(a,b);b=y$.h($APP.Nd(a));return $APP.zi.j(b,$APP.cH,$APP.Nk.g(a,y$))},nha=function(a,b){var c=$APP.Of($APP.xd(a),b);b=$APP.B.j(c,0,null);c=$APP.B.j(c,1,null);return $APP.A.g(b,a)?c:null},L$=function(a,b){$APP.Jf(H$,!1);a.setPrompt([$APP.t.h($APP.u(I$)),"\x3d\x3e "].join(""));a.prompt();return $APP.AG($APP.u(J$))?null:K$.g?K$.g(b,a):K$.call(null,b,a)},M$=function(a){var b=$APP.xk(a);a=$APP.yk(a); | ||
var c=$APP.zG($APP.u(J$));b=$APP.Nf.g(b-1,c);c=$APP.x(b);b=$APP.y(c);c=$APP.z(c);a=$APP.r(b)?$APP.fi.g(b,a):null;$APP.Jf(J$,$APP.wp.g("\n",$APP.He(a,c)))},pha=function(a,b,c){var d=function(){var f=$APP.yq;$APP.yq=$APP.u(I$);try{a:{var k=$APP.La;$APP.La=!0;try{var l=$APP.Oi.l($APP.F([a]));break a}finally{$APP.La=k}l=void 0}return $APP.cu(l,new $APP.n(null,3,[$APP.np,$APP.mp,$APP.Rq,oha,$APP.St,!0],null),null)}finally{$APP.yq=f}}(),e=$APP.jf(d);d=$APP.fe.g(e,$APP.bu);e=$APP.fe.g(e,$APP.S);d=$APP.Wj("(async function () {\n%s\n}) ()", | ||
"%s",d);$APP.Jf(I$,e);return Promise.resolve(eval(d)).then(function(f){$APP.r(c)?c.write(esm_import$node_util.inspect(f),"\n"):console.log(f);return K$.g?K$.g(c,b):K$.call(null,c,b)}).catch(function(f){esm_import$squint_cljs$core.println(f);return L$(b,c)})},K$=function(a,b){if($APP.r(function(){var e=$APP.u(H$);return $APP.r(e)?e:!$APP.AG($APP.u(J$))}())){$APP.Jf(H$,!0);var c=$APP.ep($APP.u(J$)),d=function(){try{return $APP.gp(c,$APP.Pt)}catch(f){var e=f;if(-1!=$APP.yG(e).indexOf("EOF while reading"))return N$; | ||
M$(c);$APP.ZG.l($APP.F([$APP.t.h(e)]));return O$}}();if($APP.A.g(O$,d))return L$(b,a);if($APP.A.g(N$,d))return $APP.Jf(H$,!1);M$(c);return $APP.A.g($APP.fp,d)?L$(b,a):pha(d,b,a)}return null},P$=function(a,b){a.on("line",function(c){$APP.Ti.A(J$,$APP.t,c,"\n");return K$(b,a)})},qha=function(a){var b=esm_import$readline.createInterface({input:a,output:a});P$(b,a);a.setNoDelay(!0);return a.on("close",function(){return $APP.$G.l($APP.F(["Client closed connection."]))})},Q$=function(a,b,c){return $APP.r(c)? | ||
esm_import$path.resolve(c,$APP.OG(a,b)):a},R$=function(a,b,c){var d=$APP.TG.h(a),e=$APP.DG.h(a);b=Q$(b,e,d);c=$APP.FG(c);d=null==c?null:Q$(c,e,d);d=null==d?null:null==d?null:esm_import$path.relative(esm_import$path.dirname($APP.t.h(b)),d);return $APP.r(d)?(a=$APP.SG.g(a,".mjs"),a=$APP.qa(a,".")?a:[".",$APP.t.h(a)].join(""),e=esm_import$path.extname(d),["./",$APP.Wj(d,$APP.gi([$APP.t.h(e),"$"].join("")),a)].join("")):null},S$=function(a,b,c){b=esm_import$path.resolve(b,$APP.OG(a,c));c=esm_import$path.dirname(b); | ||
$APP.r(esm_import$fs.existsSync(c))||($APP.$G.l($APP.F(["[squint] Creating directory:",c])),esm_import$fs.mkdirSync(c,{recursive:!0}));$APP.$G.l($APP.F(["[squint] Copying resource",a,"to",c]));return esm_import$fs.copyFileSync(a,b)},V$=function(a,b){var c=$APP.u($APP.EG),d=$APP.Mk.l($APP.F([c,a])),e=$APP.DG.h(c),f=$APP.TG.g(c,".");a=$APP.Qd(b)?$APP.mg($APP.Ir.l(T$,$APP.F([e]))):b;b=$APP.TG.h(d);if($APP.r(b)&&"string"!==typeof b)throw Error("output-dir must be a string");return $APP.r(U$.h(d))?($APP.$G.l($APP.F(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])), | ||
$APP.$G(),$APP.$G.l($APP.F(["Options:\n\n--elide-imports: do not include imports\n--elide-exports: do not include exports\n--extension: default extension for JS files\n--output-dir: output directory for JS files"]))):$APP.oe.j(function(k,l){return Promise.resolve(k).then(function(){return $APP.he(new $APP.Qh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(l))?($APP.$G.l($APP.F(["[squint] Compiling CLJS file:",l])),$APP.UG($APP.zi.l(d,$APP.PG,l,$APP.F([$APP.Gq, | ||
function(m){return R$(d,l,m)}])))):S$(l,f,e)}).then(function(m){m=$APP.jf(m);m=$APP.fe.g(m,$APP.RG);$APP.r(m)&&$APP.$G.l($APP.F(["[squint] Wrote file:",m]));return m})},null,a)},u$=new $APP.H(null,"kwd-opt","kwd-opt",1313309243),p$=new $APP.H(null,"hyphens","hyphens",2113533609),x$=new $APP.H(null,"spec","spec",347520401),f$=new $APP.H(null,"coerce","coerce",1917884504),z$=new $APP.H(null,"restrict","restrict",-1071101511),r$=new $APP.H(null,"keywords","keywords",1526959054),O$=new $APP.H("squint.repl.node", | ||
"continue","squint.repl.node/continue",1558138730),A$=new $APP.H(null,"msg","msg",-1386103444),rha=new $APP.H(null,"show","show",-576705889),q$=new $APP.H(null,"boolean","boolean",-1919418404),dha=new $APP.H(null,"input","input",556931961),W$=new $APP.H(null,"rest-cmds","rest-cmds",-423198324),y$=new $APP.H("org.babashka","cli","org.babashka/cli",1162430315),n$=new $APP.H(null,"args-\x3eopts","args-\x3eopts",964391046),g$=new $APP.H(null,"alias","alias",-2039751630),iha=new $APP.H(null,"collect", | ||
"collect",-284321549),h$=new $APP.H(null,"validate","validate",-201300827),t$=new $APP.H(null,"composite-opt","composite-opt",-2021292928),sha=new $APP.H(null,"run","run",-1821166653),s$=new $APP.H(null,"hyphen-opt","hyphen-opt",1836909464),U$=new $APP.H(null,"help","help",-439233446),C$=new $APP.H(null,"cause","cause",231901252),v$=new $APP.H(null,"fst-colon","fst-colon",1618567071),eha=new $APP.H(null,"coerce-fn","coerce-fn",-821146515),l$=new $APP.H(null,"args","args",1315556576),j$=new $APP.H(null, | ||
"no-keyword-opts","no-keyword-opts",761286018),E$=new $APP.H(null,"value","value",305978217),F$=new $APP.H(null,"pred","pred",1927423397),jha=new $APP.H(null,"closed","closed",-919675359),N$=new $APP.H("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),kha=new $APP.H(null,"error-fn","error-fn",-171437615),D$=new $APP.H(null,"option","option",65132272),i$=new $APP.H(null,"exec-args","exec-args",-1860766354),G$=new $APP.H(null,"ex-msg","ex-msg",-1111774387),$ga=new $APP.H(null, | ||
"s","s",1705939918),B$=new $APP.H(null,"cmds-opts","cmds-opts",-390130362),tha=new $APP.H(null,"h","h",1109658740),k$=new $APP.H(null,"cmds","cmds",-1841503952);var J$=$APP.Si.h(""),H$=$APP.Si.h(!1),I$=$APP.Si.h($APP.yq),X$,Y$=process.stdout.isTTY;X$=$APP.r(Y$)?process.stdin.setRawMode:Y$;var oha=$APP.Si.h($APP.hf),Z$=function Z$(a){switch(arguments.length){case 0:return Z$.v();case 1:return Z$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};Z$.v=function(){return Z$.h(null)}; | ||
Z$.h=function(a){$APP.yq=$APP.Qx;$APP.kq=$APP.xq=!0;var b=function(){var d=$APP.bH.h(a);return $APP.r(d)?d:0}(),c=esm_import$net.createServer(qha);return c.listen(b,"127.0.0.1",function(){var d=c.address(),e=d.address;return $APP.$G.l($APP.F([["Socket REPL listening on port ",$APP.t.h(d.port)," on host ",$APP.t.h(e)].join("")]))})};Z$.m=1; | ||
var eha=function(a,b){return $APP.Vd(a)&&$APP.Vd(b)?$APP.Pk.l($APP.F([a,b])):$APP.Rd(a)&&($APP.Ud(a)||$APP.Td(a))&&$APP.Rd(b)&&($APP.Ud(b)||$APP.Td(b))?$APP.Rg.g(a,b):b},W9=function(a,b){return $APP.oe.j(function(c,d){return $APP.Vu.l(eha,$APP.F([c,d]))},a,b)},X9=function(a){throw $APP.bl.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.n(null,1,[fha,a],null));},Y9=function(a){var b=JSON.parse(a);return $APP.ae(b)?b:X9(a)},gha=function(a){var b=JSON.parse(a);return $APP.vG(b)?b:X9(a)},hha= | ||
function(a){var b=JSON.parse(a);return $APP.wG(b)?b:X9(a)},Z9=function(a){var b=JSON.parse(a);return"number"===typeof b?b:X9(a)},$9=function(a){return"string"===typeof a?$APP.B.j(a,0,null):null},a$=function(a){return $APP.A.g(":",$9(a))?$APP.vi.h($APP.ji.g(a,1)):$APP.vi.h(a)},iha=function(a){return $APP.Rd(a)?$APP.y(a):a},b$=function(a){if("string"===typeof a)try{var b=$9(a);if($APP.A.g("true",a)||$APP.A.g("false",a))var c=Y9(a);else{if($APP.A.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e= | ||
Z9(a);else{var f=$APP.A.g(":",b);var k=f?$APP.hi(/:[a-zA-Z][a-zA-Z0-9_\/\.-]*/,a):f;e=$APP.r(k)?a$(a):a}d=e}c=d}return c}catch(l){return a}else return a},c$=function(a,b,c,d){throw $APP.bl.j(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.Ri.l($APP.F([a]))].join(""),c instanceof $APP.H?" to ":" with ",$APP.t.h(c instanceof $APP.H?$APP.ai(c):c)].join(""),new $APP.n(null,2,[jha,a,kha,c],null),d);},lha=function(a,b,c){var d=function(){switch(b instanceof $APP.H?b.da:null){case "boolean":case "bool":return Y9; | ||
case "int":case "long":return gha;case "double":return hha;case "number":return Z9;case "symbol":return $APP.Hi;case "keyword":return a$;case "string":return $APP.se;case "edn":return $APP.hH;case "auto":return b$;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=c$(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?c$(a,c,b,null):d},d$=function(a,b,c){a=$APP.fe.g(a,b);c=$APP.r(a)?a:$APP.Rd(c)?$APP.Hd(c):null;return $APP.r(c)?$APP.Rd(c)?$APP.iq.g($APP.Ee, | ||
c):c:null},e$=function(a,b,c,d){return $APP.Qh.g(b,c)?(c=$APP.AG(a,b),$APP.r(c)?($APP.B.j(c,0,null),c=$APP.B.j(c,1,null),$APP.Rh.j(a,b,$APP.r(d)?d.g?d.g(c,!0):d.call(null,c,!0):!0)):$APP.Rh.j(a,b,$APP.r(d)?d.g?d.g(null,!0):d.call(null,null,!0):!0)):a},mha=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Rd(d):d)?lha(e,d,f):b$(e);return $APP.r(c)?$APP.Sm.A(a,b,c,d):$APP.Rh.j(a,b,d)},nha=function(a){return $APP.oe.j(function(b,c){var d=$APP.B.j(c,0,null);c=$APP.B.j(c,1,null);var e=$APP.jf(c),f=$APP.fe.g(e, | ||
f$),k=$APP.fe.g(e,g$);c=$APP.fe.g(e,$APP.Cm);var l=$APP.fe.g(e,$APP.EE);e=$APP.fe.g(e,h$);b=$APP.r(f)?$APP.Sm.J(b,f$,$APP.Rh,d,f):b;b=$APP.r(k)?$APP.Sm.j(b,g$,function(m){if($APP.he(m,k))throw $APP.bl.g(["Conflicting alias ",$APP.t.h(k)," between ",$APP.t.h($APP.fe.g(m,k))," and ",$APP.t.h(d)].join(""),new $APP.n(null,1,[g$,k],null));return $APP.Rh.j(m,k,d)}):b;b=$APP.r(l)?$APP.Sm.j(b,$APP.EE,$APP.iq.g(function(m){return $APP.Ee.g(m,d)},$APP.Vh)):b;b=$APP.r(e)?$APP.Sm.J(b,h$,$APP.Rh,d,e):b;return $APP.r(c)? | ||
$APP.Sm.J(b,i$,$APP.Rh,d,c):b},$APP.hf,a)},m$=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,j$);b=$APP.BG(function(d){var e=$APP.r(c)?null:$APP.qa(d,":");return!($APP.r(e)?e:$APP.qa(d,"-"))},a);a=$APP.B.j(b,0,null);b=$APP.B.j(b,1,null);return new $APP.n(null,2,[k$,a,l$,b],null)},o$=function(a,b){if($APP.r(b))if($APP.x(a)){var c=$APP.xd(a),d=$APP.$e(c,b);c=c<d?c:d;a=new $APP.I(null,2,5,$APP.N,[$APP.R.g($APP.Gu.g(b,a),$APP.Nf.g(c,a)),$APP.Nf.g(c,b)],null)}else a=new $APP.I(null,2,5,$APP.N,[a,b],null); | ||
else a=new $APP.I(null,2,5,$APP.N,[a,b],null);b=a;a=$APP.B.j(b,0,null);b=$APP.B.j(b,1,null);return new $APP.n(null,2,[l$,a,n$,b],null)},w$=function(a,b,c,d,e){var f=$9(a),k="string"===typeof a?$APP.B.j(a,1,null):null,l;if(l=$APP.A.g(f,"-")){try{var m=Z9($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?p$:null;f=$APP.A.g(":",f);c=$APP.Qh.g(p$,b)&&f&&($APP.A.g(q$,d)||$APP.Za(c)||$APP.A.g(e,c));d=$APP.r(b)?b:c?r$:null;a=l?$APP.r(k)?$APP.Qh.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.n(null, | ||
5,[$APP.Nw,d,s$,l,t$,a,u$,c,v$,f],null)},rha=function(a,b){function c(vb){vb=$APP.Pk.l($APP.F([new $APP.n(null,2,[x$,d,$APP.Wk,y$],null),vb]));return O.h?O.h(vb):O.call(null,vb)}var d=x$.h(b),e=$APP.r(d)?W9(b,$APP.F([nha(d)])):b,f=f$.h(e),k=function(){var vb=g$.h(e);return $APP.r(vb)?vb:$APP.Xq.h(e)}(),l=oha.h(e),m=$APP.EE.h(e),h=i$.h(e),q=j$.h(e),p=function(){var vb=z$.h(e);return $APP.r(vb)?vb:pha.h(e)}(),v=$APP.Zh($APP.R.l($APP.Mh($APP.Vd(d)?d:$APP.Rg.g($APP.hf,d)),$APP.Oh(k),$APP.F([$APP.Mh(f)]))), | ||
D=$APP.A.g(!0,p)?v:null==p?null:$APP.Zh(p),J=h$.h(e),O=function(){var vb=qha.h(e);return $APP.r(vb)?vb:function(Yb){Yb=$APP.jf(Yb);var Ic=$APP.fe.g(Yb,A$);throw $APP.bl.g(Ic,Yb);}}(),P=m$(a,null),W=$APP.jf(P),ca=$APP.fe.g(W,k$),ha=$APP.fe.g(W,l$),na=function(){var vb=n$.h(e);vb=$APP.r(vb)?vb:B$.h(e);return $APP.r(vb)?o$(ca,vb):new $APP.n(null,2,[n$,null,l$,ha],null)}(),pa=$APP.jf(na),fa=$APP.fe.g(pa,l$),E=$APP.fe.g(pa,n$),C=$APP.Qh.g(fa,ha)?new $APP.I(null,2,5,$APP.N,[null,$APP.R.g(fa,ha)],null): | ||
new $APP.I(null,2,5,$APP.N,[ca,ha],null),ea=$APP.B.j(C,0,null),K=$APP.B.j(C,1,null),M=function(){for(var vb=$APP.hf,Yb=null,Ic=null,Ke=$APP.r(q)?p$:null,hd=$APP.x(K),Hg=E;;){if($APP.Za(hd))return new $APP.I(null,3,5,$APP.N,[vb,Yb,Ic],null);var ig=$APP.y(hd),Tc=ig instanceof $APP.H;if(Tc){Yb=e$(vb,Yb,Ic,null);var me=ig;hd=$APP.z(hd);vb=Yb;Yb=me}else{var zl=!0===ig,Qf=$APP.t.h(ig);me=d$(l,Yb,$APP.fe.g(f,Yb));var yi=$APP.fe.g(f,Yb),Al=w$(Qf,Ke,Yb,yi,Ic),Kh=$APP.jf(Al),Bl=$APP.fe.g(Kh,s$),Lh=$APP.fe.g(Kh, | ||
t$),Cl=$APP.fe.g(Kh,u$),Rf=$APP.fe.g(Kh,$APP.Nw),mk=$APP.fe.g(Kh,v$);if($APP.r(function(){var Me=Bl;return $APP.r(Me)?Me:Cl}())){var Yc=$APP.qa(Qf,"--"),nk=Yc&&$APP.A.g("--",Qf);if(nk){var Dl=$APP.z(hd);return new $APP.I(null,3,5,$APP.N,[function(){var Me=vb;return Dl?$APP.io.A(Me,$APP.Iu,new $APP.I(null,2,5,$APP.N,[y$,l$],null),$APP.mg(Dl)):Me}(),Yb,Ic],null)}var ok=Yc?$APP.ji.g(Qf,2):$APP.Zj(Qf,/^(:|-|)/,""),zf=Yc?$APP.Tq.g(ok,/=/):new $APP.I(null,1,5,$APP.N,[ok],null),Sd=$APP.B.j(zf,0,null),Be= | ||
$APP.B.j(zf,1,null),Tb=$APP.vi.h(Sd),Ec=$APP.fe.j(k,Tb,Tb);if($APP.r(Be))Ic=e$(vb,Yb,Ic,me),Yb=Ec,Ke=Rf,hd=$APP.He(Be,$APP.cd(hd)),vb=Ic,Ic=null;else{var Ab=$APP.z(hd),Le=$APP.y(Ab),hw=w$(Le,Rf,Yb,yi,Ic);if($APP.r(function(){var Me=s$.h(hw);return $APP.r(Me)?Me:$APP.Qd(Ab)}()))if($APP.r(Lh)){var iw=$APP.ai(Ec);Ic=$APP.Lr.l(function(){return function(Me){return new $APP.I(null,2,5,$APP.N,[["-",$APP.t.h(Me)].join(""),!0],null)}}(vb,Yb,Ic,Ke,hd,Hg,iw,Ab,Le,hw,ok,zf,Sd,Be,Tb,Ec,Yc,nk,zl,Qf,me,yi,Al,Kh, | ||
Bl,Lh,Cl,Rf,mk,ig,Tc,d,e,f,k,l,m,h,q,p,v,D,J,O,c,P,W,ca,ha,na,pa,fa,E,C,ea,K),$APP.F([iw]));hd=$APP.R.g(Ic,Ab);Ke=Rf;Ic=Yb=null}else hd=$APP.he(v,Ec)?null:$APP.qG($APP.t.h(Ec),":no-"),Ke=$APP.r(hd)?$APP.vi.h($APP.Zj($APP.t.h(Ec),":no-","")):Ec,hd=$APP.He($APP.Za(hd),Ab),Yb=e$(vb,Yb,Ic,me),me=Ke,Ke=Rf,vb=Yb,Yb=me;else Yb=e$(vb,Yb,Ic,me),me=Ec,Ke=Rf,hd=Ab,vb=Yb,Yb=me}}else if(nk=$APP.A.g(q$,yi)&&$APP.Qh.g(Qf,"true")&&$APP.Qh.g(Qf,"false")||$APP.A.g(Ic,Yb)&&$APP.Za(me))if(Hg=$APP.r(hd)?$APP.r(Hg)?o$(hd, | ||
Hg):new $APP.n(null,1,[l$,hd],null):new $APP.n(null,1,[l$,hd],null),Ke=$APP.jf(Hg),Hg=$APP.fe.g(Ke,l$),Ke=$APP.fe.g(Ke,n$),$APP.Qh.g(hd,Hg))me=Ke,Ke=Rf,hd=Hg,Hg=me;else return new $APP.I(null,3,5,$APP.N,[$APP.io.A(vb,$APP.Iu,new $APP.I(null,2,5,$APP.N,[y$,l$],null),$APP.mg(hd)),Yb,Ic],null);else{try{var Zd=mha(vb,Yb,me,iha(yi),Qf,zl)}catch(Me){c(new $APP.n(null,4,[C$,f$,A$,$APP.FG(Me),D$,Yb,E$,Qf],null)),Zd=vb}Ic=$APP.r(function(){var Me=$APP.A.g(r$,Rf);return Me?mk:Me}())?null:Yb;me=$APP.r(function(){var Me= | ||
$APP.A.g(r$,Rf);return Me?mk:Me}())?null:Yb;Ke=Rf;hd=$APP.z(hd);vb=Zd;Yb=Ic;Ic=me}}}}(),da=$APP.B.j(M,0,null),ia=$APP.B.j(M,1,null),ja=$APP.B.j(M,2,null),sa=d$(l,ia,$APP.fe.g(f,ia)),ta=function(){var vb=e$(da,ia,ja,sa);return $APP.x(ea)?$APP.io.A(vb,$APP.Mk,new $APP.I(null,2,5,$APP.N,[y$,l$],null),function(Yb){return $APP.Rg.g($APP.mg(ea),Yb)}):vb}(),wa=$APP.r(h)?$APP.Md($APP.Pk.l($APP.F([h,ta])),$APP.Nd(ta)):ta;if($APP.r(D)){a=$APP.x($APP.Mh(wa));b=null;for(var ya=0,Ba=0;;)if(Ba<ya){var Ha=b.ba(null, | ||
Ba);$APP.he(D,Ha)||c(new $APP.n(null,4,[C$,z$,A$,["Unknown option: ",$APP.t.h(Ha)].join(""),z$,D,D$,Ha],null));Ba+=1}else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ba=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ba):(a=$APP.y(b),$APP.he(D,a)||c(new $APP.n(null,4,[C$,z$,A$,["Unknown option: ",$APP.t.h(a)].join(""),z$,D,D$,a],null)),a=$APP.z(b),b=null,ya=0),Ba=0;else break}if($APP.r(m))for(a=$APP.x(m),b=null,Ba=ya=0;;)if(Ba<ya)Ha=b.ba(null,Ba),$APP.r($APP.AG(wa,Ha))||c(new $APP.n(null,4,[C$,$APP.EE,A$,["Required option: ", | ||
$APP.t.h(Ha)].join(""),$APP.EE,m,D$,Ha],null)),Ba+=1;else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ba=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ba):(a=$APP.y(b),$APP.r($APP.AG(wa,a))||c(new $APP.n(null,4,[C$,$APP.EE,A$,["Required option: ",$APP.t.h(a)].join(""),$APP.EE,m,D$,a],null)),a=$APP.z(b),b=null,ya=0),Ba=0;else break;if($APP.r(J))for(var Da=$APP.x(J),za=null,Na=0,Ta=0;;)if(Ta<Na){var db=za.ba(null,Ta),ub=$APP.B.j(db,0,null),Bb=$APP.B.j(db,1,null),Xb=function(){var vb=(vb=$APP.Vd(Bb))?F$.h(Bb):vb;return $APP.r(vb)? | ||
vb:Bb}(),pc=$APP.AG(wa,ub);if($APP.r(pc)){var $c=pc,Rb=$APP.B.j($c,0,null),lf=$APP.B.j($c,1,null);if(!$APP.r(Xb.h?Xb.h(lf):Xb.call(null,lf))){var ik=function(){var vb=G$.h(Bb);return $APP.r(vb)?vb:function(){return function(Yb){var Ic=$APP.jf(Yb);Yb=$APP.fe.g(Ic,D$);Ic=$APP.fe.g(Ic,E$);return["Invalid value for option ",$APP.t.h(Yb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Na,Ta,vb,$c,Rb,lf,pc,Xb,db,ub,Bb,d,e,f,k,l,m,h,q,p,v,D,J,O,c,P,W,ca,ha,na,pa,fa,E,C,ea,K,M,da,ia,ja,sa,ta,wa)}();c(new $APP.n(null, | ||
5,[C$,h$,A$,function(){var vb=new $APP.n(null,2,[D$,ub,E$,lf],null);return ik.h?ik.h(vb):ik.call(null,vb)}(),h$,J,D$,ub,E$,lf],null))}}Ta+=1}else{var wl=$APP.x(Da);if(wl){var wi=wl;if($APP.Yd(wi))ya=$APP.uc(wi),a=$APP.vc(wi),b=ya,ya=$APP.xd(ya),Da=a,za=b,Na=ya;else{var jk=$APP.y(wi),kk=$APP.B.j(jk,0,null),qj=$APP.B.j(jk,1,null),lk=function(){var vb=(vb=$APP.Vd(qj))?F$.h(qj):vb;return $APP.r(vb)?vb:qj}(),xl=$APP.AG(wa,kk);if($APP.r(xl)){var Hc=xl,rj=$APP.B.j(Hc,0,null),xi=$APP.B.j(Hc,1,null);if(!$APP.r(lk.h? | ||
lk.h(xi):lk.call(null,xi))){var yl=function(){var vb=G$.h(qj);return $APP.r(vb)?vb:function(){return function(Yb){var Ic=$APP.jf(Yb);Yb=$APP.fe.g(Ic,D$);Ic=$APP.fe.g(Ic,E$);return["Invalid value for option ",$APP.t.h(Yb),": ",$APP.t.h(Ic)].join("")}}(Da,za,Na,Ta,vb,Hc,rj,xi,xl,lk,jk,kk,qj,wi,wl,d,e,f,k,l,m,h,q,p,v,D,J,O,c,P,W,ca,ha,na,pa,fa,E,C,ea,K,M,da,ia,ja,sa,ta,wa)}();c(new $APP.n(null,5,[C$,h$,A$,function(){var vb=new $APP.n(null,2,[D$,kk,E$,xi],null);return yl.h?yl.h(vb):yl.call(null,vb)}(), | ||
h$,J,D$,kk,E$,xi],null))}}Da=$APP.z(wi);za=null;Na=0}Ta=0}else break}return wa},sha=function(a,b){a=rha(a,b);b=y$.h($APP.Nd(a));return $APP.Rh.j(b,$APP.jH,$APP.Qk.g(a,y$))},tha=function(a,b){var c=$APP.Of($APP.xd(a),b);b=$APP.B.j(c,0,null);c=$APP.B.j(c,1,null);return $APP.A.g(b,a)?c:null},L$=function(a,b){$APP.Jf(H$,!1);a.setPrompt([$APP.t.h($APP.u(I$)),"\x3d\x3e "].join(""));a.prompt();return $APP.HG($APP.u(J$))?null:K$.g?K$.g(b,a):K$.call(null,b,a)},M$=function(a){var b=$APP.Ak(a);a=$APP.Bk(a); | ||
var c=$APP.GG($APP.u(J$));b=$APP.Nf.g(b-1,c);c=$APP.x(b);b=$APP.y(c);c=$APP.z(c);a=$APP.r(b)?$APP.ji.g(b,a):null;$APP.Jf(J$,$APP.yp.g("\n",$APP.He(a,c)))},vha=function(a,b,c){var d=function(){var f=$APP.Bq;$APP.Bq=$APP.u(I$);try{a:{var k=$APP.La;$APP.La=!0;try{var l=$APP.Ri.l($APP.F([a]));break a}finally{$APP.La=k}l=void 0}return $APP.fu(l,new $APP.n(null,3,[$APP.pp,$APP.op,$APP.Uq,uha,$APP.Vt,!0],null),null)}finally{$APP.Bq=f}}(),e=$APP.jf(d);d=$APP.fe.g(e,$APP.eu);e=$APP.fe.g(e,$APP.S);d=$APP.Zj("(async function () {\n%s\n}) ()", | ||
"%s",d);$APP.Jf(I$,e);return Promise.resolve(eval(d)).then(function(f){$APP.r(c)?c.write(esm_import$node_util.inspect(f),"\n"):console.log(f);return K$.g?K$.g(c,b):K$.call(null,c,b)}).catch(function(f){esm_import$squint_cljs$core.println(f);return L$(b,c)})},K$=function(a,b){if($APP.r(function(){var e=$APP.u(H$);return $APP.r(e)?e:!$APP.HG($APP.u(J$))}())){$APP.Jf(H$,!0);var c=$APP.gp($APP.u(J$)),d=function(){try{return $APP.ip(c,$APP.St)}catch(f){var e=f;if(-1!=$APP.FG(e).indexOf("EOF while reading"))return N$; | ||
M$(c);$APP.fH.l($APP.F([$APP.t.h(e)]));return O$}}();if($APP.A.g(O$,d))return L$(b,a);if($APP.A.g(N$,d))return $APP.Jf(H$,!1);M$(c);return $APP.A.g($APP.hp,d)?L$(b,a):vha(d,b,a)}return null},P$=function(a,b){a.on("line",function(c){$APP.Wi.A(J$,$APP.t,c,"\n");return K$(b,a)})},wha=function(a){var b=esm_import$readline.createInterface({input:a,output:a});P$(b,a);a.setNoDelay(!0);return a.on("close",function(){return $APP.gH.l($APP.F(["Client closed connection."]))})},Q$=function(a,b,c){return $APP.r(c)? | ||
esm_import$path.resolve(c,$APP.VG(a,b)):a},R$=function(a,b,c){var d=$APP.$G.h(a),e=$APP.KG.h(a);b=Q$(b,e,d);c=$APP.MG(c);d=null==c?null:Q$(c,e,d);d=null==d?null:null==d?null:esm_import$path.relative(esm_import$path.dirname($APP.t.h(b)),d);return $APP.r(d)?(a=$APP.ZG.g(a,".mjs"),a=$APP.qa(a,".")?a:[".",$APP.t.h(a)].join(""),e=esm_import$path.extname(d),["./",$APP.Zj(d,$APP.ki([$APP.t.h(e),"$"].join("")),a)].join("")):null},S$=function(a,b,c){b=esm_import$path.resolve(b,$APP.VG(a,c));c=esm_import$path.dirname(b); | ||
$APP.r(esm_import$fs.existsSync(c))||($APP.gH.l($APP.F(["[squint] Creating directory:",c])),esm_import$fs.mkdirSync(c,{recursive:!0}));$APP.gH.l($APP.F(["[squint] Copying resource",a,"to",c]));return esm_import$fs.copyFileSync(a,b)},V$=function(a,b){var c=$APP.u($APP.LG),d=$APP.Pk.l($APP.F([c,a])),e=$APP.KG.h(c),f=$APP.$G.g(c,".");a=$APP.Qd(b)?$APP.mg($APP.Lr.l(T$,$APP.F([e]))):b;b=$APP.$G.h(d);if($APP.r(b)&&"string"!==typeof b)throw Error("output-dir must be a string");return $APP.r(U$.h(d))?($APP.gH.l($APP.F(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])), | ||
$APP.gH(),$APP.gH.l($APP.F(["Options:\n\n--elide-imports: do not include imports\n--elide-exports: do not include exports\n--extension: default extension for JS files\n--output-dir: output directory for JS files"]))):$APP.oe.j(function(k,l){return Promise.resolve(k).then(function(){return $APP.he(new $APP.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(l))?($APP.gH.l($APP.F(["[squint] Compiling CLJS file:",l])),$APP.aH($APP.Rh.l(d,$APP.WG,l,$APP.F([$APP.Jq, | ||
function(m){return R$(d,l,m)}])))):S$(l,f,e)}).then(function(m){m=$APP.jf(m);m=$APP.fe.g(m,$APP.YG);$APP.r(m)&&$APP.gH.l($APP.F(["[squint] Wrote file:",m]));return m})},null,a)},u$=new $APP.H(null,"kwd-opt","kwd-opt",1313309243),p$=new $APP.H(null,"hyphens","hyphens",2113533609),x$=new $APP.H(null,"spec","spec",347520401),f$=new $APP.H(null,"coerce","coerce",1917884504),z$=new $APP.H(null,"restrict","restrict",-1071101511),r$=new $APP.H(null,"keywords","keywords",1526959054),O$=new $APP.H("squint.repl.node", | ||
"continue","squint.repl.node/continue",1558138730),A$=new $APP.H(null,"msg","msg",-1386103444),xha=new $APP.H(null,"show","show",-576705889),q$=new $APP.H(null,"boolean","boolean",-1919418404),jha=new $APP.H(null,"input","input",556931961),W$=new $APP.H(null,"rest-cmds","rest-cmds",-423198324),y$=new $APP.H("org.babashka","cli","org.babashka/cli",1162430315),n$=new $APP.H(null,"args-\x3eopts","args-\x3eopts",964391046),g$=new $APP.H(null,"alias","alias",-2039751630),oha=new $APP.H(null,"collect", | ||
"collect",-284321549),h$=new $APP.H(null,"validate","validate",-201300827),t$=new $APP.H(null,"composite-opt","composite-opt",-2021292928),yha=new $APP.H(null,"run","run",-1821166653),s$=new $APP.H(null,"hyphen-opt","hyphen-opt",1836909464),U$=new $APP.H(null,"help","help",-439233446),C$=new $APP.H(null,"cause","cause",231901252),v$=new $APP.H(null,"fst-colon","fst-colon",1618567071),kha=new $APP.H(null,"coerce-fn","coerce-fn",-821146515),l$=new $APP.H(null,"args","args",1315556576),j$=new $APP.H(null, | ||
"no-keyword-opts","no-keyword-opts",761286018),E$=new $APP.H(null,"value","value",305978217),F$=new $APP.H(null,"pred","pred",1927423397),pha=new $APP.H(null,"closed","closed",-919675359),N$=new $APP.H("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),qha=new $APP.H(null,"error-fn","error-fn",-171437615),D$=new $APP.H(null,"option","option",65132272),i$=new $APP.H(null,"exec-args","exec-args",-1860766354),G$=new $APP.H(null,"ex-msg","ex-msg",-1111774387),fha=new $APP.H(null, | ||
"s","s",1705939918),B$=new $APP.H(null,"cmds-opts","cmds-opts",-390130362),zha=new $APP.H(null,"h","h",1109658740),k$=new $APP.H(null,"cmds","cmds",-1841503952);var J$=$APP.Vi.h(""),H$=$APP.Vi.h(!1),I$=$APP.Vi.h($APP.Bq),X$,Y$=process.stdout.isTTY;X$=$APP.r(Y$)?process.stdin.setRawMode:Y$;var uha=$APP.Vi.h($APP.hf),Z$=function Z$(a){switch(arguments.length){case 0:return Z$.v();case 1:return Z$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};Z$.v=function(){return Z$.h(null)}; | ||
Z$.h=function(a){$APP.Bq=$APP.Vx;$APP.mq=$APP.Aq=!0;var b=function(){var d=$APP.iH.h(a);return $APP.r(d)?d:0}(),c=esm_import$net.createServer(wha);return c.listen(b,"127.0.0.1",function(){var d=c.address(),e=d.address;return $APP.gH.l($APP.F([["Socket REPL listening on port ",$APP.t.h(d.port)," on host ",$APP.t.h(e)].join("")]))})};Z$.m=1; | ||
var $$=function $$(a){switch(arguments.length){case 0:return $$.v();case 1:return $$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$$.v=function(){return $$.h(null)}; | ||
$$.h=function(){$APP.yq=$APP.Qx;$APP.kq=$APP.xq=!0;$APP.r(X$)&&process.stdin.setRawMode(!0);return Promise.resolve(eval("globalThis.user \x3d globalThis.user || {};")).then(function(){return new Promise(function(a){var b=$APP.r(null)?esm_import$readline.createInterface({input:null,output:null}):esm_import$readline.createInterface({input:process.stdin,output:process.stdout});P$(b,null);b.setPrompt([$APP.t.h($APP.u(I$)),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};$$.m=1;var T$=function T$(a){var c=esm_import$fs.readdirSync(a);return $APP.mg($APP.Ir.l(function(d){d=esm_import$path.resolve(a,d);return $APP.r(esm_import$fs.lstatSync(d).isDirectory())?T$.h?T$.h(d):T$.call(null,d):new $APP.I(null,1,5,$APP.N,[d],null)},$APP.F([c])))},uha=new $APP.I(null,7,5,$APP.N,[new $APP.n(null,3,[k$,new $APP.I(null,1,5,$APP.N,["run"],null),$APP.uo,function(a){a=$APP.jf(a);a=$APP.fe.g(a,$APP.cH);var b=$APP.u($APP.EG),c=$APP.Mk.l($APP.F([b,a]));a=$APP.jf(c);var d=$APP.fe.g(a,$APP.Wk); | ||
a=$APP.fe.g(a,U$);if($APP.r(a))return null;$APP.$G.l($APP.F(["[squint] Running",d]));return $APP.UG($APP.zi.l(c,$APP.PG,d,$APP.F([$APP.Gq,function(e){return R$(c,d,e)}]))).then(function(e){e=$APP.jf(e);e=$APP.fe.g(e,$APP.RG);e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",$APP.t.h(e)].join("");return shadow_esm_import(e)})},B$,new $APP.I(null,1,5,$APP.N,[$APP.Wk],null)],null),new $APP.n(null,2,[k$,new $APP.I(null,1,5,$APP.N,["compile"],null),$APP.uo,function(a){var b=$APP.jf(a); | ||
a=$APP.fe.g(b,W$);b=$APP.fe.g(b,$APP.cH);return V$(b,a)}],null),new $APP.n(null,2,[k$,new $APP.I(null,1,5,$APP.N,["repl"],null),$APP.uo,$$],null),new $APP.n(null,2,[k$,new $APP.I(null,1,5,$APP.N,["socket-repl"],null),$APP.uo,Z$],null),new $APP.n(null,2,[k$,new $APP.I(null,1,5,$APP.N,["nrepl-server"],null),$APP.uo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.cH);return shadow_esm_import("./node.nrepl_server.js").then(function(c){c=c.startServer;return c.h?c.h(b):c.call(null,b)})}],null),new $APP.n(null, | ||
2,[k$,new $APP.I(null,1,5,$APP.N,["watch"],null),$APP.uo,function(a){var b=$APP.u($APP.EG),c=$APP.Mk.l($APP.F([b,a])),d=$APP.DG.h(b),e=$APP.TG.g(b,".");return shadow_esm_import("chokidar").catch(function(f){return console.error(f)}).then(function(f){f=f.watch;$APP.$G.l($APP.F(["[squint] Watching paths:",$APP.wp.g(", ",d)]));for(var k=$APP.x(d),l=null,m=0,h=0;;)if(h<m){var p=l.ba(null,h);(f.h?f.h(p):f.call(null,p)).on("all",function(D,J,O,P,W,ca,ha,na,pa,fa){return function(E,C){return $APP.r(esm_import$fs.lstatSync(C).isDirectory())? | ||
null:$APP.he(new $APP.Qh(null,new $APP.n(null,2,["add",null,"change",null],null),null),E)&&$APP.he(new $APP.Qh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(C))?V$(na,new $APP.I(null,1,5,$APP.N,[C],null)).catch(function(){return function(ea){return console.error(ea)}}(D,J,O,P,W,ca,ha,na,pa,fa)):S$(C,fa,pa)}}(k,l,m,h,p,f,b,c,d,e));h+=1}else{var q=$APP.x(k);if(q){var v=q;$APP.Yd(v)?(k=$APP.uc(v),m=$APP.vc(v),l=k,v=$APP.xd(k),k=m,m=v):(p=$APP.y(v),(f.h?f.h(p): | ||
f.call(null,p)).on("all",function(D,J,O,P,W,ca,ha,na,pa,fa,E,C){return function(ea,K){return $APP.r(esm_import$fs.lstatSync(K).isDirectory())?null:$APP.he(new $APP.Qh(null,new $APP.n(null,2,["add",null,"change",null],null),null),ea)&&$APP.he(new $APP.Qh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(K))?V$(fa,new $APP.I(null,1,5,$APP.N,[K],null)).catch(function(){return function(M){return console.error(M)}}(D,J,O,P,W,ca,ha,na,pa,fa,E,C)):S$(K,C,E)}}(k,l,m,h, | ||
p,v,q,f,b,c,d,e)),k=$APP.z(v),l=null,m=0);h=0}else return null}})}],null),new $APP.n(null,2,[k$,$APP.lg,$APP.uo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,W$),c=$APP.fe.g(a,$APP.cH);a=$APP.fE.h(c);if($APP.r(a)){if($APP.r(U$.h(c)))return $APP.$G.l($APP.F(["Usage: squint -e \x3cexpr\x3e \x3copts\x3e\n\nOptions:\n\n--no-run: do not run compiled expression\n--show: print compiled expression"]));a=$APP.r($APP.ot.h(c))?$APP.Wj("(do %s\n)","%s",a):a;a=$APP.iG.g(a,$APP.zi.l(c,$APP.ot,$APP.ot.h(c),$APP.F([$APP.Rq, | ||
$APP.Si.h(new $APP.n(null,1,[$APP.po,$APP.Qx],null)),$APP.np,$APP.r($APP.ot.h(c))?$APP.mp:$APP.pq,$APP.St,function(){var f=$APP.ot.h(c);return $APP.r(f)?!1!==$APP.St.h(c):f}()])));a=$APP.r($APP.ot.h(c))?$APP.Wj("(async function() { %s })()","%s",a):a;var d=esm_import$fs.mkdtempSync(".tmp"),e=[$APP.t.h(d),"/squint.mjs"].join("");esm_import$fs.writeFileSync(e,a,"utf-8");$APP.r(rha.h(c))&&$APP.$G.l($APP.F([a]));if(!1===sha.h(c))return null;e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()), | ||
"/",e].join("");return($APP.r($APP.ot.h(c))?Promise.resolve(eval(a)):shadow_esm_import(e)).then(function(f){return $APP.r($APP.ot.h(c))?$APP.ZG.l($APP.F([f])):null}).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f=U$.h(c);return $APP.r(f)?f:$APP.A.g("help",$APP.y(b))||$APP.Qd(b)}())?$APP.$G.l($APP.F(["Squint v0.4.85\n\nUsage: squint \x3csubcommand\x3e \x3copts\x3e\n\nSubcommands:\n\n-e \x3cexpr\x3e Compile and run expression.\nrun \x3cfile.cljs\x3e Compile and run a file\nwatch Watch :paths in squint.edn\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nrepl Start repl\nhelp Print this help\n\nUse squint \x3csubcommand\x3e --help to show more info."])): | ||
V$(c,b)}],null)],null);(function(){var a=new $APP.n(null,2,[$APP.Uq,new $APP.n(null,1,[tha,U$],null),f$,new $APP.n(null,4,[$APP.St,q$,$APP.Vq,q$,$APP.TG,$APP.jl,$APP.ot,q$],null)],null),b=m$(process.argv.slice(2),a),c=$APP.jf(b),d=$APP.fe.g(c,k$),e=$APP.fe.g(c,l$);return $APP.oe.j(function(f,k){f=$APP.jf(k);var l=$APP.fe.g(f,k$),m=$APP.fe.g(f,$APP.uo),h=nha(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.x(h);return null==v?null:$APP.mg(v)}();k=$APP.R.g(k,e);f=mha(k,W9(a,$APP.F([f])));k=$APP.jf(f);var p=$APP.fe.g(k, | ||
$APP.cH);f=$APP.fe.g(k,l$);k=$APP.fe.g(k,k$);var q=$APP.R.g(k,f);return $APP.ld(function(){var v=$APP.zi.l(c,l$,q,$APP.F([W$,q,$APP.cH,p,$APP.Yo,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,uha)})(); | ||
$$.h=function(){$APP.Bq=$APP.Vx;$APP.mq=$APP.Aq=!0;$APP.r(X$)&&process.stdin.setRawMode(!0);return Promise.resolve(eval("globalThis.user \x3d globalThis.user || {};")).then(function(){return new Promise(function(a){var b=$APP.r(null)?esm_import$readline.createInterface({input:null,output:null}):esm_import$readline.createInterface({input:process.stdin,output:process.stdout});P$(b,null);b.setPrompt([$APP.t.h($APP.u(I$)),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};$$.m=1;var T$=function T$(a){var c=esm_import$fs.readdirSync(a);return $APP.mg($APP.Lr.l(function(d){d=esm_import$path.resolve(a,d);return $APP.r(esm_import$fs.lstatSync(d).isDirectory())?T$.h?T$.h(d):T$.call(null,d):new $APP.I(null,1,5,$APP.N,[d],null)},$APP.F([c])))},Aha=new $APP.I(null,7,5,$APP.N,[new $APP.n(null,3,[k$,new $APP.I(null,1,5,$APP.N,["run"],null),$APP.xo,function(a){a=$APP.jf(a);a=$APP.fe.g(a,$APP.jH);var b=$APP.u($APP.LG),c=$APP.Pk.l($APP.F([b,a]));a=$APP.jf(c);var d=$APP.fe.g(a,$APP.Zk); | ||
a=$APP.fe.g(a,U$);if($APP.r(a))return null;$APP.gH.l($APP.F(["[squint] Running",d]));return $APP.aH($APP.Rh.l(c,$APP.WG,d,$APP.F([$APP.Jq,function(e){return R$(c,d,e)}]))).then(function(e){e=$APP.jf(e);e=$APP.fe.g(e,$APP.YG);e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",$APP.t.h(e)].join("");return shadow_esm_import(e)})},B$,new $APP.I(null,1,5,$APP.N,[$APP.Zk],null)],null),new $APP.n(null,2,[k$,new $APP.I(null,1,5,$APP.N,["compile"],null),$APP.xo,function(a){var b=$APP.jf(a); | ||
a=$APP.fe.g(b,W$);b=$APP.fe.g(b,$APP.jH);return V$(b,a)}],null),new $APP.n(null,2,[k$,new $APP.I(null,1,5,$APP.N,["repl"],null),$APP.xo,$$],null),new $APP.n(null,2,[k$,new $APP.I(null,1,5,$APP.N,["socket-repl"],null),$APP.xo,Z$],null),new $APP.n(null,2,[k$,new $APP.I(null,1,5,$APP.N,["nrepl-server"],null),$APP.xo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.jH);return shadow_esm_import("./node.nrepl_server.js").then(function(c){c=c.startServer;return c.h?c.h(b):c.call(null,b)})}],null),new $APP.n(null, | ||
2,[k$,new $APP.I(null,1,5,$APP.N,["watch"],null),$APP.xo,function(a){var b=$APP.u($APP.LG),c=$APP.Pk.l($APP.F([b,a])),d=$APP.KG.h(b),e=$APP.$G.g(b,".");return shadow_esm_import("chokidar").catch(function(f){return console.error(f)}).then(function(f){f=f.watch;$APP.gH.l($APP.F(["[squint] Watching paths:",$APP.yp.g(", ",d)]));for(var k=$APP.x(d),l=null,m=0,h=0;;)if(h<m){var q=l.ba(null,h);(f.h?f.h(q):f.call(null,q)).on("all",function(D,J,O,P,W,ca,ha,na,pa,fa){return function(E,C){return $APP.r(esm_import$fs.lstatSync(C).isDirectory())? | ||
null:$APP.he(new $APP.Uh(null,new $APP.n(null,2,["add",null,"change",null],null),null),E)&&$APP.he(new $APP.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(C))?V$(na,new $APP.I(null,1,5,$APP.N,[C],null)).catch(function(){return function(ea){return console.error(ea)}}(D,J,O,P,W,ca,ha,na,pa,fa)):S$(C,fa,pa)}}(k,l,m,h,q,f,b,c,d,e));h+=1}else{var p=$APP.x(k);if(p){var v=p;$APP.Yd(v)?(k=$APP.uc(v),m=$APP.vc(v),l=k,v=$APP.xd(k),k=m,m=v):(q=$APP.y(v),(f.h?f.h(q): | ||
f.call(null,q)).on("all",function(D,J,O,P,W,ca,ha,na,pa,fa,E,C){return function(ea,K){return $APP.r(esm_import$fs.lstatSync(K).isDirectory())?null:$APP.he(new $APP.Uh(null,new $APP.n(null,2,["add",null,"change",null],null),null),ea)&&$APP.he(new $APP.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(K))?V$(fa,new $APP.I(null,1,5,$APP.N,[K],null)).catch(function(){return function(M){return console.error(M)}}(D,J,O,P,W,ca,ha,na,pa,fa,E,C)):S$(K,C,E)}}(k,l,m,h, | ||
q,v,p,f,b,c,d,e)),k=$APP.z(v),l=null,m=0);h=0}else return null}})}],null),new $APP.n(null,2,[k$,$APP.lg,$APP.xo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,W$),c=$APP.fe.g(a,$APP.jH);a=$APP.kE.h(c);if($APP.r(a)){if($APP.r(U$.h(c)))return $APP.gH.l($APP.F(["Usage: squint -e \x3cexpr\x3e \x3copts\x3e\n\nOptions:\n\n--no-run: do not run compiled expression\n--show: print compiled expression"]));a=$APP.r($APP.rt.h(c))?$APP.Zj("(do %s\n)","%s",a):a;a=$APP.pG.g(a,$APP.Rh.l(c,$APP.rt,$APP.rt.h(c),$APP.F([$APP.Uq, | ||
$APP.Vi.h(new $APP.n(null,1,[$APP.so,$APP.Vx],null)),$APP.pp,$APP.r($APP.rt.h(c))?$APP.op:$APP.sq,$APP.Vt,function(){var f=$APP.rt.h(c);return $APP.r(f)?!1!==$APP.Vt.h(c):f}()])));a=$APP.r($APP.rt.h(c))?$APP.Zj("(async function() { %s })()","%s",a):a;var d=esm_import$fs.mkdtempSync(".tmp"),e=[$APP.t.h(d),"/squint.mjs"].join("");esm_import$fs.writeFileSync(e,a,"utf-8");$APP.r(xha.h(c))&&$APP.gH.l($APP.F([a]));if(!1===yha.h(c))return null;e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()), | ||
"/",e].join("");return($APP.r($APP.rt.h(c))?Promise.resolve(eval(a)):shadow_esm_import(e)).then(function(f){return $APP.r($APP.rt.h(c))?$APP.fH.l($APP.F([f])):null}).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f=U$.h(c);return $APP.r(f)?f:$APP.A.g("help",$APP.y(b))||$APP.Qd(b)}())?$APP.gH.l($APP.F(["Squint v0.5.86\n\nUsage: squint \x3csubcommand\x3e \x3copts\x3e\n\nSubcommands:\n\n-e \x3cexpr\x3e Compile and run expression.\nrun \x3cfile.cljs\x3e Compile and run a file\nwatch Watch :paths in squint.edn\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nrepl Start repl\nhelp Print this help\n\nUse squint \x3csubcommand\x3e --help to show more info."])): | ||
V$(c,b)}],null)],null);(function(){var a=new $APP.n(null,2,[$APP.Xq,new $APP.n(null,1,[zha,U$],null),f$,new $APP.n(null,4,[$APP.Vt,q$,$APP.Yq,q$,$APP.$G,$APP.ml,$APP.rt,q$],null)],null),b=m$(process.argv.slice(2),a),c=$APP.jf(b),d=$APP.fe.g(c,k$),e=$APP.fe.g(c,l$);return $APP.oe.j(function(f,k){f=$APP.jf(k);var l=$APP.fe.g(f,k$),m=$APP.fe.g(f,$APP.xo),h=tha(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.x(h);return null==v?null:$APP.mg(v)}();k=$APP.R.g(k,e);f=sha(k,W9(a,$APP.F([f])));k=$APP.jf(f);var q=$APP.fe.g(k, | ||
$APP.jH);f=$APP.fe.g(k,l$);k=$APP.fe.g(k,k$);var p=$APP.R.g(k,f);return $APP.ld(function(){var v=$APP.Rh.l(c,l$,p,$APP.F([W$,p,$APP.jH,q,$APP.$o,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,Aha)})(); |
import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
import "./node.js"; | ||
const shadow_esm_import = function(x) { return import(x) }; | ||
import*as esm_import$fs from"fs";import*as esm_import$path from"path";var kG,lG,mG,BG,CG,MG,NG,VG,WG,GG,LG,QG;$APP.jG=function(a,b){return $APP.qa(a,b)};kG=function(a,b){a.sort(b||$APP.Ca)};lG=function(a,b){const c=Array(a.length);for(let e=0;e<a.length;e++)c[e]={index:e,value:a[e]};const d=b||$APP.Ca;kG(c,function(e,f){return d(e.value,f.value)||e.index-f.index});for(b=0;b<a.length;b++)a[b]=c[b].value};mG=function(){}; | ||
$APP.nG=function(a){return null!=a?a.D&512||$APP.Oc===a.Ce?!0:a.D?!1:$APP.cb($APP.yb,a):$APP.cb($APP.yb,a)};$APP.oG=function(a){return $APP.ee(a)||!1};$APP.pG=function(a){return"number"===typeof a};$APP.qG=function(){this.C=[]};$APP.rG=function(a){return $APP.A.g(a,$APP.ie)?$APP.ie:function(b,c){var d=a.g?a.g(b,c):a.call(null,b,c);return"number"===typeof d?d:$APP.r(d)?-1:$APP.r(a.g?a.g(c,b):a.call(null,c,b))?1:0}};$APP.sG=function(a){$APP.li("\n");return $APP.fe.g(a,$APP.Ga),null}; | ||
$APP.tG=function(a,b){return(null!=a?$APP.Oc===a.Hc||(a.wd?0:$APP.cb(mG,a)):$APP.cb(mG,a))?$APP.Db(a,b):null!=a&&$APP.nG(a)&&$APP.he(a,b)?new $APP.Kg(b,$APP.fe.g(a,b),null):null};$APP.uG=function(a,b){return new $APP.I(null,2,5,$APP.N,[$APP.Pr.g(a,b),$APP.Qr.g(a,b)],null)};$APP.vG=function(a,b){this.f=a;this.value=b;this.D=2147516416;this.M=1};$APP.wG=function(a){return Math.floor(Math.random()*a)}; | ||
$APP.xG=function(){function a(){return $APP.wG(16).toString(16)}var b=(8|3&$APP.wG(16)).toString(16);return new $APP.kj([$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-4",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(b),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()), | ||
$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a())].join("").toLowerCase())};$APP.yG=function(a){return a instanceof Error?a.message:null};$APP.zG=function(a){return $APP.Qq.g(a,/\n|\r\n/)};$APP.AG=function(a){return $APP.ua(null==a?"":String(a))};BG=function(a,b){return $APP.r($APP.r(b)?$APP.Ko.g(b,""):b)?$APP.Am(a,$APP.Gk(b)):null}; | ||
CG=function(a,b){return $APP.Ef(function(c){c=esm_import$path.resolve(a,[$APP.t.h(b),".",$APP.t.h(c)].join(""));return $APP.r(esm_import$fs.existsSync(c))?c:null},new $APP.I(null,2,5,$APP.N,["cljc","cljs"],null))};$APP.FG=function(a){var b=$APP.Wj($APP.Wj($APP.t.h(a),"-","_"),".","/");return $APP.Ef(function(c){return CG(c,b)},$APP.DG.g($APP.u($APP.EG),new $APP.I(null,2,5,$APP.N,[".","src"],null)))}; | ||
MG=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,$APP.Rq);a=$APP.gp($APP.ep(a),$APP.Pt);if($APP.be(a)&&$APP.A.g($APP.Aj,$APP.y(a))){a=$APP.x(a);$APP.y(a);a=$APP.z(a);var d=$APP.y(a);a=$APP.z(a);a=$APP.Ef(function(k){var l=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);return $APP.be(l)&&$APP.A.g(GG,$APP.y(l))?new $APP.I(null,2,5,$APP.N,[$APP.cd(l),k],null):null},$APP.HG.j(2,1,a));var e=$APP.B.j(a,0,null),f=$APP.B.j(a,1,null);return $APP.r(e)?shadow_esm_import("./compiler.sci.js").then(function(){var k=$APP.IG.h($APP.u($APP.JG)); | ||
return $APP.oe.j(function(l,m){return l.then(function(){var h=$APP.x(m),p=$APP.y(h);h=$APP.z(h);h=$APP.jf(h);var q=$APP.fe.g(h,$APP.Mq),v=$APP.fe.g(h,$APP.Nq);return Promise.resolve(function(){var D=function(){var O=new $APP.G(null,$APP.CE,new $APP.G(null,new $APP.G(null,$APP.Jj,new $APP.G(null,p,null,1,null),2,null),null,1,null),2,null);return $APP.r(f)?$APP.R.g(O,new $APP.I(null,1,5,$APP.N,[$APP.KG],null)):O}();k.h?k.h(D):k.call(null,D);var J=function(){var O=$APP.X.h($APP.x($APP.R.g(new $APP.G(null, | ||
LG,null,1,null),new $APP.G(null,$APP.X.h($APP.x($APP.R.g(new $APP.G(null,$APP.Jj,null,1,null),new $APP.G(null,p,null,1,null)))),null,1,null))));return k.h?k.h(O):k.call(null,O)}();D=$APP.Mh(J);J=$APP.Oh(J);J=$APP.qi.g($APP.od,J);return $APP.Yh(D,J)}()).then(function(D){return $APP.Ti.g(c,function(J){J=$APP.Fu(J,new $APP.I(null,2,5,$APP.N,[$APP.nt,p],null),D);J=$APP.r(v)?$APP.Fu(J,new $APP.I(null,3,5,$APP.N,[d,$APP.Uq,v],null),p):J;return $APP.r(q)?$APP.Fu(J,new $APP.I(null,2,5,$APP.N,[d,$APP.Sq], | ||
null),$APP.Yh(q,$APP.Tq.h(p))):J})})})},Promise.resolve(null),e)}):null}return null};NG=function(a,b){return Promise.resolve(MG(a,b)).then(function(){return $APP.cu(a,b,null)})}; | ||
$APP.OG=function(a,b){return $APP.oe.j(function(c,d){a:{var e=esm_import$path.resolve(d).split(esm_import$path.sep);for(var f=esm_import$path.resolve(a).split(esm_import$path.sep);;){var k=$APP.Qd(e);if(k){e=k;break a}if(k=$APP.x(f))if(k=$APP.A.g($APP.y(e),$APP.y(f)))e=$APP.cd(e),f=$APP.cd(f);else{e=k;break a}else{e=k;break a}}}return e?$APP.ld(esm_import$path.relative(d,a)):c},a,b)}; | ||
$APP.UG=function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.PG),c=$APP.fe.g(a,QG),d=$APP.fe.g(a,$APP.RG),e=$APP.fe.g(a,$APP.SG),f=$APP.fe.j(a,$APP.TG,"");c=$APP.r(c)?c:esm_import$fs.readFileSync(b,"utf-8");return NG(c,$APP.zi.j(a,$APP.Rq,$APP.Si.h(new $APP.n(null,1,[$APP.po,$APP.Qx],null)))).then(function(k){k=$APP.jf(k);var l=$APP.fe.g(k,$APP.bu),m=$APP.fe.g(k,$APP.Ip),h=$APP.DG.g($APP.u($APP.EG),new $APP.I(null,2,5,$APP.N,[".","src"],null)),p=esm_import$path,q=p.resolve;$APP.r(d)?h=d:(h=$APP.OG(b,h), | ||
$APP.r(m)?m=".jsx":(m=$APP.r(e)?[".",$APP.Wj(e,/^\./,"")].join(""):null,m=$APP.r(m)?m:".mjs"),h=$APP.Wj(h,/.clj(s|c)$/,m));p=q.call(p,f,h);q=esm_import$path.dirname(p);$APP.r(esm_import$fs.existsSync(q))||esm_import$fs.mkdirSync(q,{recursive:!0});if(!$APP.r(esm_import$fs.existsSync(q)))throw Error("File not found, make sure output-dir is a valid path: ",new $APP.n(null,2,[$APP.TG,f,$APP.RG,p],null));esm_import$fs.writeFileSync(p,l,"utf-8");return $APP.zi.j(k,$APP.RG,p)})}; | ||
VG=function(a){return $APP.du.l(a,$APP.F([$APP.eu,!0]))};WG=function(a){return function(){function b(d){var e=null;if(0<arguments.length){e=0;for(var f=Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Xc(f,0,null)}return c.call(this,e)}function c(d){d=$APP.Eu.g(VG,d);d=$APP.Gf.g(a,d);return d instanceof Promise?d.then($APP.Zu):$APP.Zu(d)}b.m=0;b.o=function(d){d=$APP.x(d);return c(d)};b.l=c;return b}()};$APP.qG.prototype.add=function(a){return this.C.push(a)}; | ||
$APP.qG.prototype.size=function(){return this.C.length};$APP.qG.prototype.clear=function(){return this.C=[]};$APP.qG.prototype.fd=function(){return 0===this.C.length};$APP.XG=function XG(a){switch(arguments.length){case 1:return XG.h(arguments[0]);case 2:return XG.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.XG.h=function(a){return $APP.XG.g($APP.ie,a)}; | ||
$APP.XG.g=function(a,b){if($APP.x(b)){var c=$APP.Ze.h?$APP.Ze.h(b):$APP.Ze.call(null,b);lG(c,$APP.rG(a));return $APP.Md($APP.x(c),$APP.Nd(b))}return $APP.bd};$APP.XG.m=2;$APP.YG=function YG(a){switch(arguments.length){case 2:return YG.g(arguments[0],arguments[1]);case 3:return YG.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.YG.g=function(a,b){return $APP.YG.j(a,$APP.ie,b)}; | ||
$APP.YG.j=function(a,b,c){return $APP.XG.g(function(d,e){d=a.h?a.h(d):a.call(null,d);e=a.h?a.h(e):a.call(null,e);var f=$APP.rG(b);return f.g?f.g(d,e):f.call(null,d,e)},c)};$APP.YG.m=3;$APP.ZG=function ZG(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return ZG.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.ZG.l=function(a){$APP.Di(a,$APP.Ra());return $APP.r($APP.Sa)?$APP.sG($APP.Ra()):null};$APP.ZG.m=0;$APP.ZG.o=function(a){return this.l($APP.x(a))}; | ||
$APP.$G=function $G(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return $G.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.$G.l=function(a){$APP.Di(a,$APP.zi.j($APP.Ra(),$APP.Ia,!1));return $APP.r($APP.Sa)?$APP.sG($APP.Ra()):null};$APP.$G.m=0;$APP.$G.o=function(a){return this.l($APP.x(a))}; | ||
$APP.HG=function HG(a){switch(arguments.length){case 1:return HG.h(arguments[0]);case 2:return HG.g(arguments[0],arguments[1]);case 3:return HG.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.HG.h=function(a){return function(b){var c=new $APP.qG;return function(){function d(l,m){c.add(m);return a===c.size()?(m=$APP.mg(c.C),c.clear(),b.g?b.g(l,m):b.call(null,l,m)):l}function e(l){if(!$APP.r(c.fd())){var m=$APP.mg(c.C);c.clear();l=$APP.pd(b.g?b.g(l,m):b.call(null,l,m))}return b.h?b.h(l):b.call(null,l)}function f(){return b.v?b.v():b.call(null)}var k=null;k=function(l,m){switch(arguments.length){case 0:return f.call(this);case 1:return e.call(this,l);case 2:return d.call(this,l,m)}throw Error("Invalid arity: "+ | ||
arguments.length);};k.v=f;k.h=e;k.g=d;return k}()}};$APP.HG.g=function(a,b){return $APP.HG.j(a,a,b)};$APP.HG.j=function(a,b,c){return new $APP.Qe(null,function(){var d=$APP.x(c);return d?$APP.He($APP.Mf.g(a,d),$APP.HG.j(a,b,$APP.Nf.g(b,d))):null},null,null)};$APP.HG.m=3;$APP.vG.prototype.nb=function(){$APP.r(this.f)&&(this.value=this.f.v?this.f.v():this.f.call(null),this.f=null);return this.value};$APP.vG.prototype.$c=function(){return $APP.Za(this.f)}; | ||
$APP.vG.prototype.R=function(a,b,c){$APP.ic(b,"#object[cljs.core.Delay ");$APP.pi(new $APP.n(null,2,[$APP.XC,null==this.f?$APP.lw:$APP.JA,$APP.Xu,this.value],null),b,c);return $APP.ic(b,"]")};$APP.aH=function aH(a){switch(arguments.length){case 1:return aH.h(arguments[0]);case 2:return aH.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.aH.h=function(a){return BG(new $APP.n(null,3,[$APP.ym,$APP.u($APP.mF),$APP.zm,$APP.u($APP.lF),$APP.el,null],null),a)};$APP.aH.g=function(a,b){return BG($APP.Pm.j($APP.Mk.l($APP.F([new $APP.n(null,1,[$APP.zm,$APP.u($APP.lF)],null),a])),$APP.ym,function(c){return $APP.Mk.l($APP.F([$APP.u($APP.mF),c]))}),b)};$APP.aH.m=2;$APP.bH=new $APP.H(null,"port","port",1534937262);$APP.KG=new $APP.H(null,"reload","reload",863702807);$APP.cH=new $APP.H(null,"opts","opts",155075701); | ||
$APP.TG=new $APP.H(null,"output-dir","output-dir",-290956991);GG=new $APP.H(null,"require-macros","require-macros",707947416);$APP.dH=new $APP.H(null,"message","message",-406056002);$APP.PG=new $APP.H(null,"in-file","in-file",-1682176692);$APP.eH=new $APP.H(null,"id","id",-1388402092);LG=new $APP.w("cljs.core","ns-publics","cljs.core/ns-publics",488240955,null);$APP.DG=new $APP.H(null,"paths","paths",-1807389588);$APP.fH=new $APP.H(null,"eval","eval",-1103567905); | ||
$APP.IG=new $APP.H(null,"eval-form","eval-form",-1934118476);$APP.RG=new $APP.H(null,"out-file","out-file",-1187066405);QG=new $APP.H(null,"in-str","in-str",-1014658121);$APP.SG=new $APP.H(null,"extension","extension",1453374065);$APP.EG=new $APP.vG(function(){if($APP.r(esm_import$fs.existsSync("squint.edn"))){var a=esm_import$fs.readFileSync("squint.edn","utf-8");a=$APP.aH.h(a)}else a=null;return a},null);var gH;$APP.JG=$APP.Si.h(null);gH=WG(NG);export const compileFile=WG($APP.UG);export const compileString=gH; | ||
import*as esm_import$fs from"fs";import*as esm_import$path from"path";var rG,sG,tG,IG,JG,TG,UG,bH,cH,NG,SG,XG;$APP.qG=function(a,b){return $APP.qa(a,b)};rG=function(a,b){a.sort(b||$APP.Ca)};sG=function(a,b){const c=Array(a.length);for(let e=0;e<a.length;e++)c[e]={index:e,value:a[e]};const d=b||$APP.Ca;rG(c,function(e,f){return d(e.value,f.value)||e.index-f.index});for(b=0;b<a.length;b++)a[b]=c[b].value};tG=function(){}; | ||
$APP.uG=function(a){return null!=a?a.D&512||$APP.Oc===a.Ce?!0:a.D?!1:$APP.cb($APP.yb,a):$APP.cb($APP.yb,a)};$APP.vG=function(a){return $APP.ee(a)||!1};$APP.wG=function(a){return"number"===typeof a};$APP.xG=function(){this.C=[]};$APP.yG=function(a){return $APP.A.g(a,$APP.ie)?$APP.ie:function(b,c){var d=a.g?a.g(b,c):a.call(null,b,c);return"number"===typeof d?d:$APP.r(d)?-1:$APP.r(a.g?a.g(c,b):a.call(null,c,b))?1:0}};$APP.zG=function(a){$APP.pi("\n");return $APP.fe.g(a,$APP.Ga),null}; | ||
$APP.AG=function(a,b){return(null!=a?$APP.Oc===a.Hc||(a.wd?0:$APP.cb(tG,a)):$APP.cb(tG,a))?$APP.Db(a,b):null!=a&&$APP.uG(a)&&$APP.he(a,b)?new $APP.Kg(b,$APP.fe.g(a,b),null):null};$APP.BG=function(a,b){return new $APP.I(null,2,5,$APP.N,[$APP.Tr.g(a,b),$APP.Ur.g(a,b)],null)};$APP.CG=function(a,b){this.f=a;this.value=b;this.D=2147516416;this.M=1};$APP.DG=function(a){return Math.floor(Math.random()*a)}; | ||
$APP.EG=function(){function a(){return $APP.DG(16).toString(16)}var b=(8|3&$APP.DG(16)).toString(16);return new $APP.nj([$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-4",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(b),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),"-",$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()), | ||
$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a()),$APP.t.h(a())].join("").toLowerCase())};$APP.FG=function(a){return a instanceof Error?a.message:null};$APP.GG=function(a){return $APP.Tq.g(a,/\n|\r\n/)};$APP.HG=function(a){return $APP.ua(null==a?"":String(a))};IG=function(a,b){return $APP.r($APP.r(b)?$APP.Qh.g(b,""):b)?$APP.Dm(a,$APP.Jk(b)):null}; | ||
JG=function(a,b){return $APP.Ef(function(c){c=esm_import$path.resolve(a,[$APP.t.h(b),".",$APP.t.h(c)].join(""));return $APP.r(esm_import$fs.existsSync(c))?c:null},new $APP.I(null,2,5,$APP.N,["cljc","cljs"],null))};$APP.MG=function(a){var b=$APP.Zj($APP.Zj($APP.t.h(a),"-","_"),".","/");return $APP.Ef(function(c){return JG(c,b)},$APP.KG.g($APP.u($APP.LG),new $APP.I(null,2,5,$APP.N,[".","src"],null)))}; | ||
TG=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,$APP.Uq);a=$APP.ip($APP.gp(a),$APP.St);if($APP.be(a)&&$APP.A.g($APP.Dj,$APP.y(a))){a=$APP.x(a);$APP.y(a);a=$APP.z(a);var d=$APP.y(a);a=$APP.z(a);a=$APP.Ef(function(k){var l=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);return $APP.be(l)&&$APP.A.g(NG,$APP.y(l))?new $APP.I(null,2,5,$APP.N,[$APP.cd(l),k],null):null},$APP.OG.j(2,1,a));var e=$APP.B.j(a,0,null),f=$APP.B.j(a,1,null);return $APP.r(e)?shadow_esm_import("./compiler.sci.js").then(function(){var k=$APP.PG.h($APP.u($APP.QG)); | ||
return $APP.oe.j(function(l,m){return l.then(function(){var h=$APP.x(m),q=$APP.y(h);h=$APP.z(h);h=$APP.jf(h);var p=$APP.fe.g(h,$APP.Pq),v=$APP.fe.g(h,$APP.Qq);return Promise.resolve(function(){var D=function(){var O=new $APP.G(null,$APP.JE,new $APP.G(null,new $APP.G(null,$APP.Mj,new $APP.G(null,q,null,1,null),2,null),null,1,null),2,null);return $APP.r(f)?$APP.R.g(O,new $APP.I(null,1,5,$APP.N,[$APP.RG],null)):O}();k.h?k.h(D):k.call(null,D);var J=function(){var O=$APP.X.h($APP.x($APP.R.g(new $APP.G(null, | ||
SG,null,1,null),new $APP.G(null,$APP.X.h($APP.x($APP.R.g(new $APP.G(null,$APP.Mj,null,1,null),new $APP.G(null,q,null,1,null)))),null,1,null))));return k.h?k.h(O):k.call(null,O)}();D=$APP.Mh(J);J=$APP.Oh(J);J=$APP.ui.g($APP.od,J);return $APP.bi(D,J)}()).then(function(D){return $APP.Wi.g(c,function(J){J=$APP.Iu(J,new $APP.I(null,2,5,$APP.N,[$APP.qt,q],null),D);J=$APP.r(v)?$APP.Iu(J,new $APP.I(null,3,5,$APP.N,[d,$APP.Xq,v],null),q):J;return $APP.r(p)?$APP.Iu(J,new $APP.I(null,2,5,$APP.N,[d,$APP.Vq], | ||
null),$APP.bi(p,$APP.Wq.h(q))):J})})})},Promise.resolve(null),e)}):null}return null};UG=function(a,b){return Promise.resolve(TG(a,b)).then(function(){return $APP.fu(a,b,null)})}; | ||
$APP.VG=function(a,b){return $APP.oe.j(function(c,d){a:{var e=esm_import$path.resolve(d).split(esm_import$path.sep);for(var f=esm_import$path.resolve(a).split(esm_import$path.sep);;){var k=$APP.Qd(e);if(k){e=k;break a}if(k=$APP.x(f))if(k=$APP.A.g($APP.y(e),$APP.y(f)))e=$APP.cd(e),f=$APP.cd(f);else{e=k;break a}else{e=k;break a}}}return e?$APP.ld(esm_import$path.relative(d,a)):c},a,b)}; | ||
$APP.aH=function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.WG),c=$APP.fe.g(a,XG),d=$APP.fe.g(a,$APP.YG),e=$APP.fe.g(a,$APP.ZG),f=$APP.fe.j(a,$APP.$G,"");c=$APP.r(c)?c:esm_import$fs.readFileSync(b,"utf-8");return UG(c,$APP.Rh.j(a,$APP.Uq,$APP.Vi.h(new $APP.n(null,1,[$APP.so,$APP.Vx],null)))).then(function(k){k=$APP.jf(k);var l=$APP.fe.g(k,$APP.eu),m=$APP.fe.g(k,$APP.Kp),h=$APP.KG.g($APP.u($APP.LG),new $APP.I(null,2,5,$APP.N,[".","src"],null)),q=esm_import$path,p=q.resolve;$APP.r(d)?h=d:(h=$APP.VG(b,h), | ||
$APP.r(m)?m=".jsx":(m=$APP.r(e)?[".",$APP.Zj(e,/^\./,"")].join(""):null,m=$APP.r(m)?m:".mjs"),h=$APP.Zj(h,/.clj(s|c)$/,m));q=p.call(q,f,h);p=esm_import$path.dirname(q);$APP.r(esm_import$fs.existsSync(p))||esm_import$fs.mkdirSync(p,{recursive:!0});if(!$APP.r(esm_import$fs.existsSync(p)))throw Error("File not found, make sure output-dir is a valid path: ",new $APP.n(null,2,[$APP.$G,f,$APP.YG,q],null));esm_import$fs.writeFileSync(q,l,"utf-8");return $APP.Rh.j(k,$APP.YG,q)})}; | ||
bH=function(a){return $APP.gu.l(a,$APP.F([$APP.hu,!0]))};cH=function(a){return function(){function b(d){var e=null;if(0<arguments.length){e=0;for(var f=Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Xc(f,0,null)}return c.call(this,e)}function c(d){d=$APP.Hu.g(bH,d);d=$APP.Gf.g(a,d);return d instanceof Promise?d.then($APP.bv):$APP.bv(d)}b.m=0;b.o=function(d){d=$APP.x(d);return c(d)};b.l=c;return b}()};$APP.xG.prototype.add=function(a){return this.C.push(a)}; | ||
$APP.xG.prototype.size=function(){return this.C.length};$APP.xG.prototype.clear=function(){return this.C=[]};$APP.xG.prototype.fd=function(){return 0===this.C.length};$APP.dH=function dH(a){switch(arguments.length){case 1:return dH.h(arguments[0]);case 2:return dH.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.dH.h=function(a){return $APP.dH.g($APP.ie,a)}; | ||
$APP.dH.g=function(a,b){if($APP.x(b)){var c=$APP.Ze.h?$APP.Ze.h(b):$APP.Ze.call(null,b);sG(c,$APP.yG(a));return $APP.Md($APP.x(c),$APP.Nd(b))}return $APP.bd};$APP.dH.m=2;$APP.eH=function eH(a){switch(arguments.length){case 2:return eH.g(arguments[0],arguments[1]);case 3:return eH.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.eH.g=function(a,b){return $APP.eH.j(a,$APP.ie,b)}; | ||
$APP.eH.j=function(a,b,c){return $APP.dH.g(function(d,e){d=a.h?a.h(d):a.call(null,d);e=a.h?a.h(e):a.call(null,e);var f=$APP.yG(b);return f.g?f.g(d,e):f.call(null,d,e)},c)};$APP.eH.m=3;$APP.fH=function fH(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return fH.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.fH.l=function(a){$APP.Gi(a,$APP.Ra());return $APP.r($APP.Sa)?$APP.zG($APP.Ra()):null};$APP.fH.m=0;$APP.fH.o=function(a){return this.l($APP.x(a))}; | ||
$APP.gH=function gH(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return gH.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.gH.l=function(a){$APP.Gi(a,$APP.Rh.j($APP.Ra(),$APP.Ia,!1));return $APP.r($APP.Sa)?$APP.zG($APP.Ra()):null};$APP.gH.m=0;$APP.gH.o=function(a){return this.l($APP.x(a))}; | ||
$APP.OG=function OG(a){switch(arguments.length){case 1:return OG.h(arguments[0]);case 2:return OG.g(arguments[0],arguments[1]);case 3:return OG.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.OG.h=function(a){return function(b){var c=new $APP.xG;return function(){function d(l,m){c.add(m);return a===c.size()?(m=$APP.mg(c.C),c.clear(),b.g?b.g(l,m):b.call(null,l,m)):l}function e(l){if(!$APP.r(c.fd())){var m=$APP.mg(c.C);c.clear();l=$APP.pd(b.g?b.g(l,m):b.call(null,l,m))}return b.h?b.h(l):b.call(null,l)}function f(){return b.v?b.v():b.call(null)}var k=null;k=function(l,m){switch(arguments.length){case 0:return f.call(this);case 1:return e.call(this,l);case 2:return d.call(this,l,m)}throw Error("Invalid arity: "+ | ||
arguments.length);};k.v=f;k.h=e;k.g=d;return k}()}};$APP.OG.g=function(a,b){return $APP.OG.j(a,a,b)};$APP.OG.j=function(a,b,c){return new $APP.Qe(null,function(){var d=$APP.x(c);return d?$APP.He($APP.Mf.g(a,d),$APP.OG.j(a,b,$APP.Nf.g(b,d))):null},null,null)};$APP.OG.m=3;$APP.CG.prototype.nb=function(){$APP.r(this.f)&&(this.value=this.f.v?this.f.v():this.f.call(null),this.f=null);return this.value};$APP.CG.prototype.$c=function(){return $APP.Za(this.f)}; | ||
$APP.CG.prototype.R=function(a,b,c){$APP.ic(b,"#object[cljs.core.Delay ");$APP.ti(new $APP.n(null,2,[$APP.bD,null==this.f?$APP.pw:$APP.PA,$APP.$u,this.value],null),b,c);return $APP.ic(b,"]")};$APP.hH=function hH(a){switch(arguments.length){case 1:return hH.h(arguments[0]);case 2:return hH.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.hH.h=function(a){return IG(new $APP.n(null,3,[$APP.Bm,$APP.u($APP.tF),$APP.Cm,$APP.u($APP.sF),$APP.hl,null],null),a)};$APP.hH.g=function(a,b){return IG($APP.Sm.j($APP.Pk.l($APP.F([new $APP.n(null,1,[$APP.Cm,$APP.u($APP.sF)],null),a])),$APP.Bm,function(c){return $APP.Pk.l($APP.F([$APP.u($APP.tF),c]))}),b)};$APP.hH.m=2;$APP.iH=new $APP.H(null,"port","port",1534937262);$APP.RG=new $APP.H(null,"reload","reload",863702807);$APP.jH=new $APP.H(null,"opts","opts",155075701); | ||
$APP.$G=new $APP.H(null,"output-dir","output-dir",-290956991);NG=new $APP.H(null,"require-macros","require-macros",707947416);$APP.kH=new $APP.H(null,"message","message",-406056002);$APP.WG=new $APP.H(null,"in-file","in-file",-1682176692);$APP.lH=new $APP.H(null,"id","id",-1388402092);SG=new $APP.w("cljs.core","ns-publics","cljs.core/ns-publics",488240955,null);$APP.KG=new $APP.H(null,"paths","paths",-1807389588);$APP.mH=new $APP.H(null,"eval","eval",-1103567905); | ||
$APP.PG=new $APP.H(null,"eval-form","eval-form",-1934118476);$APP.YG=new $APP.H(null,"out-file","out-file",-1187066405);XG=new $APP.H(null,"in-str","in-str",-1014658121);$APP.ZG=new $APP.H(null,"extension","extension",1453374065);$APP.LG=new $APP.CG(function(){if($APP.r(esm_import$fs.existsSync("squint.edn"))){var a=esm_import$fs.readFileSync("squint.edn","utf-8");a=$APP.hH.h(a)}else a=null;return a},null);var nH;$APP.QG=$APP.Vi.h(null);nH=cH(UG);export const compileFile=cH($APP.aH);export const compileString=nH; |
@@ -7,18 +7,18 @@ import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
import*as esm_import$fs from"fs";import*as esm_import$net from"net"; | ||
var J9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},K9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},L9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},M9=function(a){return console.debug($APP.wp.g(" ",a))},xga=function(a){return function(b,c){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.eH),e=$APP.fe.g(b,wga);c=$APP.zi.j(c,"id",d);c=$APP.r(e)?$APP.zi.j(c,"session",e):c;return a.g?a.g(b,c):a.call(null,b,c)}},zga=function(){var a= | ||
yga;return function(b,c){b=$APP.Pm.j(b,N9,$APP.ri);return a.g?a.g(b,c):a.call(null,b,c)}},Bga=function(){var a=Aga();return function(b,c){M9($APP.F(["request",b]));return a.g?a.g(b,c):a.call(null,b,c)}},Cga=function(a){return function(b,c){M9($APP.F(["response",c]));return a.g?a.g(b,c):a.call(null,b,c)}},Aga=function(){var a=zga();return function(b,c){return a.g?a.g(b,c):a.call(null,b,c)}},O9=function(a){return $APP.zi.j($APP.Yh(new $APP.I(null,3,5,$APP.N,["major","minor","incremental"],null),$APP.du.h(a.split("."))), | ||
"version-string",a)},Dga=function(a,b,c){if($APP.r(a))if(a=P9.h?P9.h(a):P9.call(null,a),$APP.r(a)){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.r9),e=$APP.fe.g(b,$APP.k9),f=$APP.fe.g(b,$APP.t9);b=$APP.Qa;var k=$APP.hi,l=$APP.S6;$APP.Qa=e;$APP.hi=f;$APP.S6=d;try{var m=new $APP.Fa;d=$APP.Sa;e=$APP.Ua;$APP.Sa=!0;$APP.Ua=function(h){return m.append(h)};try{a.h?a.h(c):a.call(null,c)}finally{$APP.Ua=e,$APP.Sa=d}return $APP.t.h(m)}finally{$APP.S6=l,$APP.hi=k,$APP.Qa=b}}else return M9($APP.F(["Pretty-Printing is only supported for cider.nrepl.pprint/pprint"])), | ||
$APP.Oi.l($APP.F([c]));else return $APP.Oi.l($APP.F([c]))},Fga=function(a){a:{var b=$APP.yq;$APP.yq=$APP.u(Q9);try{var c=$APP.cu(a,new $APP.n(null,5,[$APP.np,$APP.mp,$APP.Rq,Ega,$APP.St,!0,$APP.ot,!0,$APP.Dr,!0],null),null);break a}finally{$APP.yq=b}c=void 0}c=$APP.jf(c);a=$APP.fe.g(c,$APP.bu);c=$APP.fe.g(c,$APP.S);a=$APP.Wj("(async function () {\n%s\n}) ()","%s",a);$APP.Jf(Q9,c);return a},Lga=function(a,b){var c=$APP.jf(a);$APP.fe.g(c,$APP.S);a=$APP.fe.g(c,Gga);$APP.fe.g(c,$APP.Wk);$APP.fe.g(c,Hga); | ||
$APP.fe.g(c,Iga);return Promise.resolve(a).then(Fga).then(function(d){$APP.$G.l($APP.F(["About to eval:"]));$APP.$G.l($APP.F([d]));return eval(d)}).then(function(d){d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(Q9)),"value",Dga(Jga.h(c),Kga.h(c),d)],null);return b.g?b.g(c,d):b.call(null,c,d)}).catch(function(d){console.error(d);var e=$APP.dH.h($APP.mj(d));e=$APP.r(e)?e:d.message;$APP.r(e)&&(e=new $APP.n(null,1,["err",[$APP.t.h(e),"\n"].join("")],null),b.g?b.g(c,e):b.call(null,c,e));d=new $APP.n(null, | ||
2,["ex",$APP.t.h(d),"ns",$APP.t.h($APP.yq)],null);return b.g?b.g(c,d):b.call(null,c,d)}).finally(function(){var d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(Q9)),"status",new $APP.I(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(c,d):b.call(null,c,d)})},R9=function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.S);return null},yga=function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,N9),d=$APP.fe.g(S9,c);if($APP.r(d))return d.g?d.g(a,b):d.call(null,a,b);console.warn($APP.wp.g(" ",$APP.F(["Unhandled operation",c]))); | ||
c=new $APP.n(null,1,["status",new $APP.I(null,3,5,$APP.N,["error","unknown-op","done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},Mga=function(a){return function(b,c){return a.write(T9(c))}},Nga=function(a,b){M9($APP.F(["Connection accepted"]));b.setNoDelay(!0);var c=Bga(),d=xga(Cga(Mga(b))),e=$APP.Si.h(null);b.on("data",function(f){var k=$APP.u(e);if($APP.r(k)){f=[$APP.t.h(k),$APP.t.h(f)].join("");$APP.Jf(e,null);var l=f}else l=f;a:for(f=$APP.F([$APP.eu,!0]),k=$APP.lg;;){var m=$APP.Gf.j(U9, | ||
l,f);l=$APP.B.j(m,0,null);m=$APP.B.j(m,1,null);if(null==l){k=new $APP.I(null,2,5,$APP.N,[k,m],null);break a}k=$APP.Ee.g(k,l);l=m}f=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);$APP.AG(k)||$APP.Jf(e,k);f=$APP.x(f);k=null;for(var h=m=0;;)if(h<m)l=k.ba(null,h),c(l,d),h+=1;else if(f=$APP.x(f))k=f,$APP.Yd(k)?(f=$APP.uc(k),m=$APP.vc(k),k=f,l=$APP.xd(f),f=m,m=l):(l=$APP.y(k),c(l,d),f=$APP.z(k),k=null,m=0),h=0;else return null});return b.on("close",function(f){return $APP.r(f)?M9($APP.F(["Connection lost"])): | ||
M9($APP.F(["Connection closed"]))})},Iga=new $APP.H(null,"_line","_line",232847719),Kga=new $APP.H("nrepl.middleware.print","options","nrepl.middleware.print/options",868480159),wga=new $APP.H(null,"session","session",1008279103),Oga=new $APP.H(null,"lookup","lookup",1225356838),Pga=new $APP.H(null,"load-file","load-file",-424586670),Hga=new $APP.H(null,"_load-file?","_load-file?",-1198848711),N9=new $APP.H(null,"op","op",-1882987955),Qga=new $APP.H(null,"describe","describe",1369790582),Gga=new $APP.H(null, | ||
"code","code",1586293142),Rga=new $APP.H(null,"eldoc","eldoc",-1321421900),Sga=new $APP.H(null,"log_level","log_level",-1756736313),Jga=new $APP.H("nrepl.middleware.print","print","nrepl.middleware.print/print",-1616742548),Tga=new $APP.H(null,"clone","clone",711747572),Uga=new $APP.H(null,"close","close",1835149582),Vga=new $APP.H(null,"info","info",-317069002),Wga=new $APP.H(null,"host","host",-1558485167),Xga=new $APP.H(null,"complete","complete",-500388775);var V9=function V9(a,b){switch($APP.t.h(L9(a,1))){case "i":return a=K9(a,1),b=J9(a,"e"),new $APP.I(null,2,5,$APP.N,[parseInt(L9(a,b)),K9(a,b+1)],null);case "l":var d=a=K9(a,1);for(a=$APP.mc($APP.lg);;){if($APP.A.g($APP.t.h(L9(d,1)),"e"))return new $APP.I(null,2,5,$APP.N,[$APP.oc(a),K9(d,1)],null);var e=V9.g?V9.g(d,b):V9.call(null,d,b),f=$APP.B.j(e,0,null),k=$APP.B.j(e,1,null);e=k;a=$APP.fg.g(a,f);d=e}case "d":for(a=K9(a,1),f=$APP.jf(b),f=$APP.fe.g(f,$APP.eu),d=a,e=$APP.mc($APP.hf);;){if($APP.A.g($APP.t.h(L9(d, | ||
1)),"e"))return new $APP.I(null,2,5,$APP.N,[$APP.oc(e),K9(d,1)],null);a=V9.g?V9.g(d,b):V9.call(null,d,b);d=$APP.B.j(a,0,null);k=$APP.B.j(a,1,null);k=V9.g?V9.g(k,b):V9.call(null,k,b);a=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);d=$APP.r(f)?$APP.ri.h(d):d;a=$APP.Ug.j(e,d,a);d=k;e=a}default:return b=J9(a,":"),f=parseInt(L9(a,b)),a=K9(a,b+1),new $APP.I(null,2,5,$APP.N,[$APP.t.h(L9(a,f)),K9(a,f)],null)}},U9=function U9(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return U9.l(arguments[0], | ||
var J9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},K9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},L9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},M9=function(a){return console.debug($APP.yp.g(" ",a))},Dga=function(a){return function(b,c){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.lH),e=$APP.fe.g(b,Cga);c=$APP.Rh.j(c,"id",d);c=$APP.r(e)?$APP.Rh.j(c,"session",e):c;return a.g?a.g(b,c):a.call(null,b,c)}},Fga=function(){var a= | ||
Ega;return function(b,c){b=$APP.Sm.j(b,N9,$APP.vi);return a.g?a.g(b,c):a.call(null,b,c)}},Hga=function(){var a=Gga();return function(b,c){M9($APP.F(["request",b]));return a.g?a.g(b,c):a.call(null,b,c)}},Iga=function(a){return function(b,c){M9($APP.F(["response",c]));return a.g?a.g(b,c):a.call(null,b,c)}},Gga=function(){var a=Fga();return function(b,c){return a.g?a.g(b,c):a.call(null,b,c)}},O9=function(a){return $APP.Rh.j($APP.bi(new $APP.I(null,3,5,$APP.N,["major","minor","incremental"],null),$APP.gu.h(a.split("."))), | ||
"version-string",a)},Jga=function(a,b,c){if($APP.r(a))if(a=P9.h?P9.h(a):P9.call(null,a),$APP.r(a)){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.r9),e=$APP.fe.g(b,$APP.k9),f=$APP.fe.g(b,$APP.t9);b=$APP.Qa;var k=$APP.li,l=$APP.S6;$APP.Qa=e;$APP.li=f;$APP.S6=d;try{var m=new $APP.Fa;d=$APP.Sa;e=$APP.Ua;$APP.Sa=!0;$APP.Ua=function(h){return m.append(h)};try{a.h?a.h(c):a.call(null,c)}finally{$APP.Ua=e,$APP.Sa=d}return $APP.t.h(m)}finally{$APP.S6=l,$APP.li=k,$APP.Qa=b}}else return M9($APP.F(["Pretty-Printing is only supported for cider.nrepl.pprint/pprint"])), | ||
$APP.Ri.l($APP.F([c]));else return $APP.Ri.l($APP.F([c]))},Lga=function(a){a:{var b=$APP.Bq;$APP.Bq=$APP.u(Q9);try{var c=$APP.fu(a,new $APP.n(null,5,[$APP.pp,$APP.op,$APP.Uq,Kga,$APP.Vt,!0,$APP.rt,!0,$APP.Gr,!0],null),null);break a}finally{$APP.Bq=b}c=void 0}c=$APP.jf(c);a=$APP.fe.g(c,$APP.eu);c=$APP.fe.g(c,$APP.S);a=$APP.Zj("(async function () {\n%s\n}) ()","%s",a);$APP.Jf(Q9,c);return a},Rga=function(a,b){var c=$APP.jf(a);$APP.fe.g(c,$APP.S);a=$APP.fe.g(c,Mga);$APP.fe.g(c,$APP.Zk);$APP.fe.g(c,Nga); | ||
$APP.fe.g(c,Oga);return Promise.resolve(a).then(Lga).then(function(d){$APP.gH.l($APP.F(["About to eval:"]));$APP.gH.l($APP.F([d]));return eval(d)}).then(function(d){d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(Q9)),"value",Jga(Pga.h(c),Qga.h(c),d)],null);return b.g?b.g(c,d):b.call(null,c,d)}).catch(function(d){console.error(d);var e=$APP.kH.h($APP.pj(d));e=$APP.r(e)?e:d.message;$APP.r(e)&&(e=new $APP.n(null,1,["err",[$APP.t.h(e),"\n"].join("")],null),b.g?b.g(c,e):b.call(null,c,e));d=new $APP.n(null, | ||
2,["ex",$APP.t.h(d),"ns",$APP.t.h($APP.Bq)],null);return b.g?b.g(c,d):b.call(null,c,d)}).finally(function(){var d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(Q9)),"status",new $APP.I(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(c,d):b.call(null,c,d)})},R9=function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.S);return null},Ega=function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,N9),d=$APP.fe.g(S9,c);if($APP.r(d))return d.g?d.g(a,b):d.call(null,a,b);console.warn($APP.yp.g(" ",$APP.F(["Unhandled operation",c]))); | ||
c=new $APP.n(null,1,["status",new $APP.I(null,3,5,$APP.N,["error","unknown-op","done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},Sga=function(a){return function(b,c){return a.write(T9(c))}},Tga=function(a,b){M9($APP.F(["Connection accepted"]));b.setNoDelay(!0);var c=Hga(),d=Dga(Iga(Sga(b))),e=$APP.Vi.h(null);b.on("data",function(f){var k=$APP.u(e);if($APP.r(k)){f=[$APP.t.h(k),$APP.t.h(f)].join("");$APP.Jf(e,null);var l=f}else l=f;a:for(f=$APP.F([$APP.hu,!0]),k=$APP.lg;;){var m=$APP.Gf.j(U9, | ||
l,f);l=$APP.B.j(m,0,null);m=$APP.B.j(m,1,null);if(null==l){k=new $APP.I(null,2,5,$APP.N,[k,m],null);break a}k=$APP.Ee.g(k,l);l=m}f=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);$APP.HG(k)||$APP.Jf(e,k);f=$APP.x(f);k=null;for(var h=m=0;;)if(h<m)l=k.ba(null,h),c(l,d),h+=1;else if(f=$APP.x(f))k=f,$APP.Yd(k)?(f=$APP.uc(k),m=$APP.vc(k),k=f,l=$APP.xd(f),f=m,m=l):(l=$APP.y(k),c(l,d),f=$APP.z(k),k=null,m=0),h=0;else return null});return b.on("close",function(f){return $APP.r(f)?M9($APP.F(["Connection lost"])): | ||
M9($APP.F(["Connection closed"]))})},Oga=new $APP.H(null,"_line","_line",232847719),Qga=new $APP.H("nrepl.middleware.print","options","nrepl.middleware.print/options",868480159),Cga=new $APP.H(null,"session","session",1008279103),Uga=new $APP.H(null,"lookup","lookup",1225356838),Vga=new $APP.H(null,"load-file","load-file",-424586670),Nga=new $APP.H(null,"_load-file?","_load-file?",-1198848711),N9=new $APP.H(null,"op","op",-1882987955),Wga=new $APP.H(null,"describe","describe",1369790582),Mga=new $APP.H(null, | ||
"code","code",1586293142),Xga=new $APP.H(null,"eldoc","eldoc",-1321421900),Yga=new $APP.H(null,"log_level","log_level",-1756736313),Pga=new $APP.H("nrepl.middleware.print","print","nrepl.middleware.print/print",-1616742548),Zga=new $APP.H(null,"clone","clone",711747572),$ga=new $APP.H(null,"close","close",1835149582),aha=new $APP.H(null,"info","info",-317069002),bha=new $APP.H(null,"host","host",-1558485167),cha=new $APP.H(null,"complete","complete",-500388775);var V9=function V9(a,b){switch($APP.t.h(L9(a,1))){case "i":return a=K9(a,1),b=J9(a,"e"),new $APP.I(null,2,5,$APP.N,[parseInt(L9(a,b)),K9(a,b+1)],null);case "l":var d=a=K9(a,1);for(a=$APP.mc($APP.lg);;){if($APP.A.g($APP.t.h(L9(d,1)),"e"))return new $APP.I(null,2,5,$APP.N,[$APP.oc(a),K9(d,1)],null);var e=V9.g?V9.g(d,b):V9.call(null,d,b),f=$APP.B.j(e,0,null),k=$APP.B.j(e,1,null);e=k;a=$APP.fg.g(a,f);d=e}case "d":for(a=K9(a,1),f=$APP.jf(b),f=$APP.fe.g(f,$APP.hu),d=a,e=$APP.mc($APP.hf);;){if($APP.A.g($APP.t.h(L9(d, | ||
1)),"e"))return new $APP.I(null,2,5,$APP.N,[$APP.oc(e),K9(d,1)],null);a=V9.g?V9.g(d,b):V9.call(null,d,b);d=$APP.B.j(a,0,null);k=$APP.B.j(a,1,null);k=V9.g?V9.g(k,b):V9.call(null,k,b);a=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);d=$APP.r(f)?$APP.vi.h(d):d;a=$APP.Ug.j(e,d,a);d=k;e=a}default:return b=J9(a,":"),f=parseInt(L9(a,b)),a=K9(a,b+1),new $APP.I(null,2,5,$APP.N,[$APP.t.h(L9(a,f)),K9(a,f)],null)}},U9=function U9(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return U9.l(arguments[0], | ||
1<c.length?new $APP.Xc(c.slice(1),0,null):null)};U9.l=function(a,b){try{return V9(a,b)}catch(c){if(c instanceof Error)return new $APP.I(null,2,5,$APP.N,[null,a],null);throw c;}};U9.m=1;U9.o=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)}; | ||
var T9=function T9(a){for(;;){if("string"===typeof a)return[$APP.t.h(Buffer.from(a).length),":",a].join("");if(a instanceof $APP.H||a instanceof $APP.w)a=[function(){var c=$APP.Oe(a);return $APP.r(c)?[c,"/"].join(""):null}(),$APP.Xh(a)].join("");else return"number"===typeof a?["i",$APP.t.h(a),"e"].join(""):$APP.Td(a)||$APP.Xd(a)||null==a?["l",$APP.t.h($APP.Gf.g($APP.t,$APP.qi.g(T9,a))),"e"].join(""):$APP.Vd(a)?["d",$APP.t.h($APP.Gf.g($APP.t,$APP.qi.g(function(){return function(c){var d=$APP.B.j(c, | ||
0,null);c=$APP.B.j(c,1,null);return[$APP.t.h(T9.h?T9.h(d):T9.call(null,d)),$APP.t.h(T9.h?T9.h(c):T9.call(null,c))].join("")}}(a),$APP.YG.g($APP.y,a)))),"e"].join(""):null}};var Q9=$APP.Si.h($APP.yq),P9=new $APP.n(null,1,["cider.nrepl.pprint/pprint",$APP.A9],null);$APP.Si.h(!1); | ||
var Ega=$APP.Si.h($APP.hf),S9=$APP.vh([Oga,Uga,Pga,Rga,Tga,Qga,Vga,Xga,$APP.fH],[R9,function(a,b){var c=new $APP.n(null,1,["status",new $APP.I(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.Wk);return null},R9,function(a,b){var c=new $APP.n(null,2,["new-session",$APP.t.h($APP.xG()),"status",new $APP.I(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},function(a,b){var c=new $APP.n(null,4,["versions",new $APP.n(null, | ||
2,["nbb-nrepl",O9("TODO"),"node",O9(process.version)],null),"aux",$APP.hf,"ops",$APP.Yh($APP.qi.g($APP.Xh,$APP.Mh(S9)),$APP.Tq.h($APP.hf)),"status",new $APP.I(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},R9,function(){return null},function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,$APP.S);$APP.ZG.l($APP.F([$APP.S,c]));return Lga($APP.zi.j(a,$APP.S,$APP.u(Q9)),b)}]),Yga=$APP.Si.h(null);export const startServer=function(a){return Promise.resolve(null).then(function(){var b=function(){var e=$APP.bH.h(a);return $APP.r(e)?e:0}(),c=function(){var e=Wga.h(a);return $APP.r(e)?e:"127.0.0.1"}();(function(){var e=$APP.$a(a)?a.bg:Sga.h(a);return $APP.r(e)?e:"info"})();var d=esm_import$net.createServer($APP.Pk.g(Nga,$APP.hf));d.listen(b,c,function(){var e=d.address(),f=e.port;e=e.address;$APP.$G.l($APP.F([["nREPL server started on port ",$APP.t.h(f)," on host ",$APP.t.h(e)," - nrepl://",$APP.t.h(e), | ||
":",$APP.t.h(f)].join("")]));try{return esm_import$fs.writeFileSync(".nrepl-port",$APP.t.h(f))}catch(k){return console.warn($APP.wp.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Jf(Yga,d)})}; | ||
var T9=function T9(a){for(;;){if("string"===typeof a)return[$APP.t.h(Buffer.from(a).length),":",a].join("");if(a instanceof $APP.H||a instanceof $APP.w)a=[function(){var c=$APP.Oe(a);return $APP.r(c)?[c,"/"].join(""):null}(),$APP.ai(a)].join("");else return"number"===typeof a?["i",$APP.t.h(a),"e"].join(""):$APP.Td(a)||$APP.Xd(a)||null==a?["l",$APP.t.h($APP.Gf.g($APP.t,$APP.ui.g(T9,a))),"e"].join(""):$APP.Vd(a)?["d",$APP.t.h($APP.Gf.g($APP.t,$APP.ui.g(function(){return function(c){var d=$APP.B.j(c, | ||
0,null);c=$APP.B.j(c,1,null);return[$APP.t.h(T9.h?T9.h(d):T9.call(null,d)),$APP.t.h(T9.h?T9.h(c):T9.call(null,c))].join("")}}(a),$APP.eH.g($APP.y,a)))),"e"].join(""):null}};var Q9=$APP.Vi.h($APP.Bq),P9=new $APP.n(null,1,["cider.nrepl.pprint/pprint",$APP.A9],null);$APP.Vi.h(!1); | ||
var Kga=$APP.Vi.h($APP.hf),S9=$APP.vh([Uga,$ga,Vga,Xga,Zga,Wga,aha,cha,$APP.mH],[R9,function(a,b){var c=new $APP.n(null,1,["status",new $APP.I(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.Zk);return null},R9,function(a,b){var c=new $APP.n(null,2,["new-session",$APP.t.h($APP.EG()),"status",new $APP.I(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},function(a,b){var c=new $APP.n(null,4,["versions",new $APP.n(null, | ||
2,["nbb-nrepl",O9("TODO"),"node",O9(process.version)],null),"aux",$APP.hf,"ops",$APP.bi($APP.ui.g($APP.ai,$APP.Mh(S9)),$APP.Wq.h($APP.hf)),"status",new $APP.I(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},R9,function(){return null},function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,$APP.S);$APP.fH.l($APP.F([$APP.S,c]));return Rga($APP.Rh.j(a,$APP.S,$APP.u(Q9)),b)}]),dha=$APP.Vi.h(null);export const startServer=function(a){return Promise.resolve(null).then(function(){var b=function(){var e=$APP.iH.h(a);return $APP.r(e)?e:0}(),c=function(){var e=bha.h(a);return $APP.r(e)?e:"127.0.0.1"}();(function(){var e=$APP.$a(a)?a.bg:Yga.h(a);return $APP.r(e)?e:"info"})();var d=esm_import$net.createServer($APP.Sk.g(Tga,$APP.hf));d.listen(b,c,function(){var e=d.address(),f=e.port;e=e.address;$APP.gH.l($APP.F([["nREPL server started on port ",$APP.t.h(f)," on host ",$APP.t.h(e)," - nrepl://",$APP.t.h(e), | ||
":",$APP.t.h(f)].join("")]));try{return esm_import$fs.writeFileSync(".nrepl-port",$APP.t.h(f))}catch(k){return console.warn($APP.yp.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Jf(dha,d)})}; |
@@ -1,1 +0,1 @@ | ||
var squint;(squint||={}).core=(()=>{var W=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var ae=Object.getOwnPropertyNames;var le=Object.prototype.hasOwnProperty;var pe=(t,e)=>{for(var n in e)W(t,n,{get:e[n],enumerable:!0})},_e=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ae(e))!le.call(t,o)&&o!==n&&W(t,o,{get:()=>e[o],enumerable:!(r=fe(e,o))||r.enumerable});return t};var he=t=>_e(W({},"__esModule",{value:!0}),t);var Hr={};pe(Hr,{Atom:()=>Nt,Cons:()=>Kt,IIterable:()=>Z,IIterable__iterator:()=>Et,LazySeq:()=>Gn,NaN_QMARK_:()=>dr,PROTOCOL_SENTINEL:()=>Ye,_:()=>me,_GT_:()=>pt,_GT__EQ_:()=>_t,_LT_:()=>de,_LT__EQ_:()=>xe,_PLUS_:()=>ye,_STAR_:()=>we,_iterator:()=>B,abs:()=>Yr,aclone:()=>tr,add_watch:()=>er,alength:()=>Un,apply:()=>nn,array_QMARK_:()=>P,aset:()=>Xn,assoc:()=>R,assoc_BANG_:()=>g,assoc_in:()=>ht,assoc_in_BANG_:()=>dt,atom:()=>We,boolean$:()=>Cn,boolean_QMARK_:()=>Sr,bounded_count:()=>Qr,butlast:()=>Bn,cat:()=>Jr,coll_QMARK_:()=>wr,comp:()=>ve,compare:()=>b,complement:()=>nt,concat:()=>Lt,conj:()=>yt,conj_BANG_:()=>G,cons:()=>Oe,constantly:()=>on,contains_QMARK_:()=>mt,count:()=>j,counted_QMARK_:()=>oe,cycle:()=>mn,dec:()=>Se,deref:()=>jt,disj:()=>Me,disj_BANG_:()=>wt,dissoc:()=>Re,dissoc_BANG_:()=>Ee,distinct:()=>bn,doall:()=>Hn,dorun:()=>Zn,drop:()=>V,drop_last:()=>Ln,drop_while:()=>Wt,empty:()=>Pt,empty_QMARK_:()=>In,es6_iterator:()=>L,even_QMARK_:()=>Gt,every_QMARK_:()=>Jt,every_pred:()=>ir,ex_cause:()=>gr,ex_data:()=>br,ex_info:()=>vr,ex_message:()=>Ar,false_QMARK_:()=>Pn,ffirst:()=>Ke,filter:()=>z,filterv:()=>qe,find:()=>Kr,first:()=>S,flatten:()=>Gr,fn_QMARK_:()=>_r,fnil:()=>it,frequencies:()=>qn,get:()=>y,get_in:()=>ut,group_by:()=>Tn,identical_QMARK_:()=>xn,identity:()=>$t,inc:()=>bt,int_QMARK_:()=>ne,integer_QMARK_:()=>Mr,interleave:()=>zt,interpose:()=>sn,into:()=>Vt,into_array:()=>Zt,iterable:()=>c,iterate:()=>sr,js_keys:()=>xr,js_obj:()=>Dn,juxt:()=>fr,keep:()=>Mn,keep_indexed:()=>ze,key:()=>Yt,keys:()=>ee,last:()=>ke,lazy:()=>a,list:()=>Bt,list_QMARK_:()=>un,long$:()=>Cr,map:()=>k,map_QMARK_:()=>ur,map_indexed:()=>Be,mapcat:()=>cn,mapv:()=>Tt,max:()=>Xt,max_key:()=>Nr,memoize:()=>Ur,merge:()=>_n,merge_with:()=>hn,meta:()=>Er,min:()=>or,min_key:()=>Ir,mod:()=>kr,neg_QMARK_:()=>Wn,next:()=>D,nil_QMARK_:()=>Pe,nnext:()=>ar,not:()=>kt,not_any_QMARK_:()=>Kn,not_empty:()=>qr,not_every_QMARK_:()=>vn,nth:()=>gt,number_QMARK_:()=>te,object_QMARK_:()=>Ae,odd_QMARK_:()=>rn,parse_long:()=>Or,partial:()=>wn,partition:()=>ln,partition_all:()=>an,partition_by:()=>pn,peek:()=>Xr,persistent_BANG_:()=>Lr,pop:()=>Zr,pos_QMARK_:()=>Jn,pr_str:()=>It,println:()=>At,prn:()=>Ve,quot:()=>ie,rand_int:()=>Ut,rand_nth:()=>Nn,range:()=>De,re_find:()=>Xe,re_matches:()=>Ue,re_pattern:()=>Ze,re_seq:()=>hr,reduce:()=>Q,reduce_kv:()=>rr,reduced:()=>Rt,reduced_QMARK_:()=>H,reductions:()=>Ne,regexp_QMARK_:()=>mr,rem:()=>Dr,remove:()=>Ge,remove_watch:()=>nr,repeat:()=>ot,repeatedly:()=>On,replace:()=>kn,reset_BANG_:()=>Ot,rest:()=>$,reverse:()=>En,satisfies_QMARK_:()=>be,second:()=>Qe,select_keys:()=>fn,seq:()=>M,seq_QMARK_:()=>vt,seqable_QMARK_:()=>Mt,sequential_QMARK_:()=>J,set:()=>en,shuffle:()=>Qn,some:()=>Dt,some_QMARK_:()=>Yn,some_fn:()=>cr,sort:()=>ct,sort_by:()=>Sn,sorted_set:()=>$r,split_at:()=>$n,split_with:()=>zn,str:()=>Fe,string_QMARK_:()=>ft,subs:()=>Ht,subseq:()=>Pr,subvec:()=>He,swap_BANG_:()=>Je,system_time:()=>dn,t:()=>pr,take:()=>Y,take_nth:()=>yn,take_while:()=>C,to_array:()=>lr,transduce:()=>lt,transient$:()=>Br,tree_seq:()=>ce,true_QMARK_:()=>Fn,truth_:()=>d,type:()=>Vr,update:()=>An,update_BANG_:()=>st,update_in:()=>gn,val:()=>Ct,vals:()=>yr,vec:()=>E,vector:()=>et,vector_QMARK_:()=>tn,warn_on_lazy_reusage_BANG_:()=>je,with_meta:()=>Rr,zero_QMARK_:()=>Vn,zipmap:()=>Tr});function f(t){if(t==null||t instanceof Function)return t;const e=typeof t;return e==="string"?(n,r)=>y(n,t,r):e==="object"?(n,r)=>y(t,n,r):t}function O(t,e){return t.every(function(n,r){return r===0||e(t[r-1],n)})}function pt(...t){return O(t,(e,n)=>e>n)}function _t(...t){return O(t,(e,n)=>e>=n)}function de(...t){return O(t,(e,n)=>e<n)}function xe(...t){return O(t,(e,n)=>e<=n)}function ye(...t){return t.reduce((e,n)=>e+n,0)}function we(...t){return t.reduce((e,n)=>e*n,1)}function me(...t){return t.length==1?0-t[0]:t.reduce((e,n)=>e-n)}function be(t,e){return e[t]}function g(t,e,n,...r){if(r.length%2!==0)throw new Error("Illegal argument: assoc expects an odd number of arguments.");switch(p(t)){case _:t.set(e,n);for(let o=0;o<r.length;o+=2)t.set(r[o],r[o+1]);break;case h:case m:t[e]=n;for(let o=0;o<r.length;o+=2)t[r[o]]=r[o+1];break;default:throw new Error(`Illegal argument: assoc! expects a Map, Array, or Object as the first argument, but got ${typeof t}.`)}return t}function K(t){switch(p(t)){case _:return new Map(t);case x:return new t.constructor(t);case h:return[...t];case m:return{...t};default:throw new Error(`Don't know how to copy object of type ${typeof t}.`)}}function R(t,e,n,...r){t||(t={});const o=K(t);return g(o,e,n,...r),o}const _=1,h=2,m=3,v=4,x=5,T=6;function q(t){switch(t){case _:return new Map;case h:return[];case m:return{};case v:return new F;case x:return new Set;case T:return a(function*(){})}}function X(t){return t.constructor===Object}function Ae(t){return t!=null&&X(t)}function p(t){if(t!=null){if(X(t))return m;if(t instanceof Map)return _;if(t instanceof Set)return x;if(t instanceof F)return v;if(Array.isArray(t))return h;if(t instanceof tt)return T;if(t instanceof I)return x;if(t instanceof Object)return m}}function ge(t,e,n,r,o){r=E(r);const u=p(n);if(u!==_&&u!==h&&u!==m)throw new Error(`Illegal argument: ${e} expects the first argument to be a Map, Array, or Object.`);const i=[n];let s=n;for(let l=0;l<r.length-1;l+=1){const A=r[l];let w;s instanceof Map?w=s.get(A):w=s[A],w||(w=q(u)),i.push(w),s=w}i.push(o);for(let l=i.length-2;l>=0;l-=1)i[l]=t(i[l],r[l],i[l+1]);return i[0]}function ht(t,e,n){return ge(R,"assoc-in",t,e,n)}function dt(t,e,n){e=E(e);var r=t;const o=p(t);for(const u of e.splice(0,e.length-1)){let i=y(r,u);i===void 0&&(i=q(o),g(r,u,i)),r=i}return g(r,e[e.length-1],n),t}function ve(...t){if(t=t.map(f),t.length===0)return $t;if(t.length===1)return t[0];const[e,...n]=t.slice().reverse();return function(...r){let o=e(...r);for(const u of n)o=u(o);return o}}function xt(t,e){for(const n of e)t.add(n);return t}function G(...t){if(t.length===0)return et();const[e,...n]=t;let r=e;switch(r==null&&(r=[]),p(r)){case x:xt(r,n);break;case v:r.unshift(...n.reverse());break;case h:r.push(...n);break;case _:for(const o of n)Array.isArray(o)?r.set(o[0],o[1]):c(o).forEach(u=>{r.set(u[0],u[1])});break;case m:for(const o of n)Array.isArray(o)?r[o[0]]=o[1]:Object.assign(r,o);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return r}function yt(...t){if(t.length===0)return et();const[e,...n]=t;let r=e;r==null&&(r=Bt());let o,u;switch(p(r)){case x:return r instanceof I?xt(new r.constructor(r),n):new r.constructor([...r,...n]);case v:return new F(...n.reverse(),...r);case h:return[...r,...n];case _:o=new Map(r);for(const i of n)Array.isArray(i)?o.set(i[0],i[1]):c(i).forEach(s=>{o.set(s[0],s[1])});return o;case T:return a(function*(){yield*n,yield*r});case m:u={...r};for(const i of n)Array.isArray(i)?u[i[0]]=i[1]:Object.assign(u,i);return u;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function wt(t,...e){for(const n of e)t.delete(n);return t}function Me(t,...e){const n=new t.constructor([...t]);return wt(n,...e)}function mt(t,e){switch(p(t)){case x:case _:return t.has(e);case void 0:return!1;default:return e in t}}function Ee(t,...e){for(const n of e)delete t[n];return t}function Re(t,...e){if(e.length===0)return t;const n=K(t);switch(p(t)){case _:for(const r of e)n.delete(r);break;default:for(const r of e)delete n[r];break}return n}function bt(t){return t+1}function Se(t){return t-1}function At(...t){console.log(...t)}function gt(t,e,n){if(t){var r=void 0;if(Array.isArray(t))r=t[e];else{const o=c(t);let u=0;for(const i of o)if(u++==e){r=i;break}}if(r!==void 0)return r}return n}function y(t,e,n=void 0){if(t==null)return n;let r;if(X(t))return r=t[e],r===void 0?n:r;let o;switch(p(t)){case x:t.has(e)&&(r=e);break;case _:r=t.get(e);break;case h:r=t[e];break;default:if(o=t.get,o instanceof Function)try{r=t.get(e);break}catch{}r=t[e];break}return r!==void 0?r:n}function vt(t){return t!=null&&!!t[Symbol.iterator]}const J=vt;function Mt(t){return t==null||!!t[Symbol.iterator]}function c(t){if(t==null)return[];if(Mt(t))return t;if(t instanceof Object)return Object.entries(t);throw new TypeError(`${t} is not iterable`)}const Z=Symbol("Iterable"),Et=Symbol.iterator;function B(t){return t[Symbol.iterator]()}const L=B;function M(t){if(t==null)return t;const e=c(t);return e.length===0||e.size===0||e[Symbol.iterator]().next().done?null:e}function S(t){const[e]=c(t);return e}function Qe(t){const[e,n]=c(t);return n}function Ke(t){return S(S(t))}function $(t){return a(function*(){let e=!0;for(const n of c(t))e?e=!1:yield n})}class N{value;constructor(e){this.value=e}_deref(){return this.value}}function ke(t){t=c(t);let e;switch(p(t)){case h:return t[t.length-1];default:for(const n of t)e=n;return e}}function Rt(t){return new N(t)}function H(t){return t instanceof N}function Q(t,e,n){t=f(t);let r,o;if(n===void 0){const u=c(e)[Symbol.iterator](),i=u.next();i.done?o=t():o=i.value,r=u}else o=e,r=c(n);if(o instanceof N)return o.value;for(const u of r)if(o=t(o,u),o instanceof N){o=o.value;break}return o}function*Ie(t,e){const n=e.next();n.done?yield t():yield*St(t,n.value,e)}function*St(t,e,n){let r=e,o=n;for(;;){if(H(r)){yield r.value;return}else yield r;const u=o.next();if(u.done)break;r=t(r,u.value)}}function Ne(t,e,n){return t=f(t),a(n===void 0?function*(){yield*Ie(t,c(e)[Symbol.iterator]())}:function*(){yield*St(t,e,c(n)[Symbol.iterator]())})}var Qt=!1;function je(){Qt=!0}class tt{constructor(e){this.gen=e,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&Qt)try{throw new Error}catch(e){console.warn("Re-use of lazy value",e.stack)}return this.gen()}}tt.prototype[Z]=!0;function a(t){return new tt(t)}class Kt{constructor(e,n){this.x=e,this.coll=n}*[Symbol.iterator](){yield this.x,yield*c(this.coll)}}function Oe(t,e){return new Kt(t,e)}function k(t,...e){switch(t=f(t),e.length){case 0:return n=>(...r)=>{switch(r.length){case 0:return n();case 1:return n(r[0]);case 2:return n(r[0],t(r[1]));default:return n(r[0],t(...r.slice(1)))}};case 1:return a(function*(){for(const n of c(e[0]))yield t(n)});default:return a(function*(){const n=e.map(r=>L(c(r)));for(;;){const r=[];for(const o of n){const u=o.next();if(u.done)return;r.push(u.value)}yield t(...r)}})}}function Te(t){return e=>(...n)=>{switch(n.length){case 0:return e();case 1:return e(n[0]);case 2:{const r=n[0],o=n[1];return d(t(o))?e(r,o):r}}}}function z(t,e){return e===void 0?Te(t):(t=f(t),a(function*(){for(const n of c(e))d(t(n))&&(yield n)}))}function qe(t,e){return[...z(t,e)]}function Ge(t,e){return z(nt(t),e)}function Be(t,e){t=f(t);const n=[];let r=0;for(const o of c(e))n.push(t(r,o)),r++;return n}function Le(t,e){t=f(t);const n=[];let r=0;for(const o of c(e)){const u=t(r,o);d(u)&&n.push(u),r++}return n}function $e(t){return e=>{let n=-1;return(r,o)=>{if(r===void 0)return e();if(o===void 0)return e(r);n++;const u=t(n,o);return u==null?r:e(r,u)}}}function ze(t,e){return e===void 0?$e(t):Le(t,e)}function Fe(...t){return t.join("")}function kt(t){return!d(t)}function Pe(t){return t==null}const Ye={};function Ce(t){return t===null?"null":JSON.stringify(t,(e,n)=>{switch(p(n)){case x:case T:return[...n];case _:return Object.fromEntries(n);default:return n}})}function It(...t){return t.map(Ce).join(" ")}function Ve(...t){At(It(...t))}function Nt(t){this.val=t,this._watches={},this._deref=()=>this.val,this._hasWatches=!1,this._reset_BANG_=e=>{const n=this.val;if(this.val=e,this._hasWatches)for(const r of Object.entries(this._watches)){const o=r[0],u=r[1];u(o,this,n,e)}return e},this._add_watch=(e,n)=>{this._watches[e]=n,this._hasWatches=!0},this._remove_watch=e=>{delete this._watches[e]}}function We(t){return new Nt(t)}function jt(t){return t._deref()}function Ot(t,e){t._reset_BANG_(e)}function Je(t,e,...n){e=f(e);const r=e(jt(t),...n);return Ot(t,r),r}function De(t,e,n){return a(function*(){let r=t,o=e,u=n;e===void 0&&(r=0,o=t);let i=r||0;for(u=n||1;o===void 0||i<o;)yield i,i+=u})}function Ue(t,e){const n=t.exec(e);return n&&e===n[0]?n.length===1?n[0]:n:null}function Xe(t,e){if(ft(e)){const n=t.exec(e);return n!=null?n.length===1?n[0]:[...n]:null}else throw new TypeError("re-find must match against a string.")}function Ze(t){if(t instanceof RegExp)return t;const e=t.match(/^\(\?([dgimsuvy]*)\)/);return e?new RegExp(t.slice(e[0].length),e[1]):new RegExp(t)}function He(t,e,n){return t.slice(e,n)}function et(...t){return t}function tn(t){return p(t)===h}function Tt(...t){return[...k(...t)]}function E(t){return P(t)?t:[...c(t)]}function en(t){return new Set(c(t))}const qt=Symbol("IApply__apply");function nn(t,...e){t=f(t);const n=e.slice(0,e.length-1),r=c(e[e.length-1]),o=t[qt];return o?o(...n,r):t(...n,...r)}function Gt(t){return t%2==0}function rn(t){return!Gt(t)}function nt(t){return t=f(t),(...e)=>kt(t(...e))}function on(t){return(...e)=>t}class F extends Array{constructor(...e){super(),this.push(...e)}}function un(t){return p(t)===v}function Bt(...t){return new F(...t)}function P(t){return Array.isArray(t)}function rt(t){return a(function*(){for(const e of t)yield*c(e)})}function Lt(...t){return rt(t)}Lt[qt]=t=>rt(t);function cn(t,...e){const n=k(t,...e);return rt(n)}function $t(t){return t}function zt(...t){return a(function*(){const e=t.map(n=>L(c(n)));for(;;){const n=[];for(const r of e){const o=r.next();if(o.done)return;n.push(o.value)}yield*n}})}function sn(t,e){return V(1,zt(ot(t),e))}function fn(t,e){const n=p(t),r=q(n)||{};for(const o of e){const u=y(t,o);u!=null&&g(r,o,u)}return r}function an(t,...e){let n=t,r=e[0];return e.length===2&&([n,r]=e),Ft(t,n,[],r,!0)}function ln(t,...e){let n=t,r=[],o=e[0];return e.length===2?[n,o]=e:e.length>2&&([n,r,o]=e),Ft(t,n,r,o,!1)}function Ft(t,e,n,r,o){return a(function*(){let u=[],i=0;for(const s of c(r))i<t&&(u.push(s),u.length===t&&(yield u,u=e<t?u.slice(e):[])),i++,i===e&&(i=0);u.length>0&&(u.length===t||o?yield u:n.length&&(u.push(...n.slice(0,t-u.length)),yield u))})}function pn(t,e){return t=f(t),a(function*(){const n=L(e),r=n.next();r.done&&(yield*null);const o=r.value;let u=t(o),i=[o],s=[];for(;;){const l=n.next();if(l.done){yield i;break}const A=l.value,w=t(A);u==w?i.push(A):(yield i,s.push(A),i=s,u=w,s=[])}})}function Pt(t){const e=p(t);if(e!=null)return q(e);throw new Error(`Can't create empty of ${typeof t}`)}function _n(...t){const e=t[0];let n;return e==null?n={}:n=Vt(Pt(e),e),G(n,...t.slice(1))}function Yt(t){return t[0]}function Ct(t){return t[1]}function hn(t,...e){t=f(t);var n=!1;for(const r of e)if(r!=null){n=!0;break}if(n){const r=(u,i)=>{const s=Yt(i),l=Ct(i);return mt(u,s)?R(u,s,t(y(u,s),l)):R(u,s,l)};return Q((u,i)=>Q(r,u||{},M(i)),e)}else return null}function dn(){return performance.now()}function Vt(...t){let e,n,r,o,u;switch(t.length){case 0:return[];case 1:return t[0];case 2:return yt(t[0]??[],...c(t[1]));case 3:return e=t[0],n=t[1],r=t[2],o=K(e),u=(i,s)=>s===void 0?i:G(i,s),lt(n,u,o,r);default:throw TypeError(`Invalid arity call of into: ${t.length}`)}}function xn(t,e){return t===e}function ot(...t){if(t.length==0||t.length>2)throw new Error(`Invalid arity: ${t.length}`);return{[Z]:!0,[Et]:t.length==1?function*(){const e=t[0];for(;;)yield e}:function*(){const[e,n]=t;for(var r=0;r<e;r++)yield n}}}function Y(t,e){return a(function*(){let n=t-1;for(const r of c(e))if(n-->=0&&(yield r),n<0)return})}function C(t,e){return t=f(t),a(function*(){for(const n of c(e))if(d(t(n)))yield n;else return})}function yn(t,e){return t<=0?ot(S(e)):a(function*(){let n=0;for(const r of c(e))n%t===0&&(yield r),n++})}function wn(t,...e){return t=f(t),function(...n){return t(...e,...n)}}function mn(t){return a(function*(){for(;;)yield*t})}function V(t,e){return a(function*(){const n=B(c(e));for(let r=0;r<t;r++)n.next();yield*n})}function Wt(t,e){return t=f(t),a(function*(){const n=B(c(e));for(;;){const r=n.next();if(r.done)break;const o=r.value;if(!d(t(o))){yield o;break}}yield*n})}function bn(t){return a(function*(){const e=new Set;for(const n of c(t))e.has(n)||(yield n),e.add(n)})}function An(t,e,n,...r){return n=f(n),R(t,e,n(y(t,e),...r))}function ut(t,e,n){let r=t;for(const o of e)r=y(r,o);return r===void 0?n:r}function gn(t,e,n,...r){return n=f(n),ht(t,e,n(ut(t,e),...r))}function it(t,e,...n){return t=f(t),function(r,...o){return r?t(r,...n,...o):t(e,...n,...o)}}function Jt(t,e){t=f(t);for(const n of c(e))if(!t(n))return!1;return!0}function vn(t,e){return!Jt(t,e)}function Mn(t,e){return t=f(t),a(function*(){for(const n of c(e)){const r=t(n);d(r)&&(yield r)}})}function En(t){return t=c(t),[...t].reverse()}function ct(t,e){return e===void 0&&(e=t,t=void 0),t=f(t),e=c(e),[...e].sort(t||b)}function Rn(t){return t===b?t:(e,n)=>{const r=t(e,n);return te(r)?r:r?-1:t(n,e)?1:0}}function Sn(t,e,n){return n===void 0&&(n=e,e=b),t=f(t),e=f(e),ct((r,o)=>{const u=Rn(e),i=t(r),s=t(o);return u(i,s)},n)}function Qn(t){return[...t].sort(function(e,n){return Math.random()-.5})}function Dt(t,e){t=f(t);for(const n of c(e)){const r=t(n);if(d(r))return r}}function Kn(t,e){return t=f(t),!Dt(t,e)}function kn(t,e){return(Array.isArray(e)?Tt:k)(r=>{const o=t[r];return o!==void 0?o:r},e)}function In(t){return!M(t)}function Ut(t){return Math.floor(Math.random()*t)}function Nn(t){const e=Ut(j(t));return gt(t,e)}function jn(t){return a(function*(){for(;;)yield t()})}function On(t,e){e===void 0&&(e=t,t=void 0);const n=jn(e);return t?Y(t,n):n}function st(t,e,n,...r){const o=y(t,e);return g(t,e,n(o,...r))}function Tn(t,e){t=f(t);const n={};for(const r of c(e)){const o=t(r);st(n,o,it(G,[]),r)}return n}function qn(t){const e={},n=it(bt,0);for(const r of c(t))st(e,r,n);return e}class Gn{constructor(e){this.f=e,this.res=void 0}*[Symbol.iterator](){this.res===void 0&&(this.res=this.f(),this.f=null),yield*c(this.res)}}function Bn(t){const e=[...c(t)];return e.pop(),e.length>0?e:null}function Ln(...t){const[e,n]=t.length>1?t:[1,t[0]];return k((r,o)=>r,n,V(e,n))}function $n(t,e){return[Y(t,e),V(t,e)]}function zn(t,e){return[C(t,e),Wt(t,e)]}function j(t){if(!t)return 0;const e=t.length||t.size;if(typeof e=="number")return e;let n=0;for(const r of c(t))n++;return n}function Fn(t){return t===!0}function Pn(t){return t===!1}function Yn(t){return t!=null}function Cn(t){return!!t}function Vn(t){return t===0}function Wn(t){return t<0}function Jn(t){return t>0}function Dn(...t){let e=0;const n={};for(;!(e>=t.length);)n[t[e]]=t[e+1],e=e+2;return n}function Un(t){return t.length}function Xn(t,e,n,...r){if(r.length==0)return t[e]=n,n;{const o=[e,n,...r],u=o[o.length-1];let i=t,s=0;const l=o.length-2;for(;s<l;s++)i=i[o[s]];return i[o[s]]=u,n}}function Zn(t){for(const e of c(t));return null}function Hn(t){return E(t)}function tr(t){return[...t]}function er(t,e,n){return t._add_watch(e,n)}function nr(t,e){return t._remove_watch(e)}function rr(t,e,n){if(!n)return e;var r=e;for(const o of c(n))r=t(r,o[0],o[1]);return r}function Xt(t,e,...n){return e==null?t:Math.max(t,e,...n)}function or(t,e,...n){return e==null?t:Math.min(t,e,...n)}function ur(t){return t instanceof Object}function ir(...t){return(...e)=>{for(const n of t)for(const r of e)if(!n(r))return!1;return!0}}function cr(...t){return(...e)=>{for(const n of t)for(const r of e){const o=n(r);if(o)return o}}}function Zt(t,e){return E(e||t)}function sr(t,e){var n=e;return a(function*(){for(;;)yield n,n=t(n)})}function fr(...t){return t=t.map(f),(...e)=>{const n=[];for(const r of t)n.push(r(...e));return n}}function D(t){if(Array.isArray(t)){const e=t.slice(1);return e.length>0?e:null}else return M($(t))}function ar(t){return D(D(t))}function b(t,e){if(t===e)return 0;{if(t==null)return-1;if(e==null)return 1;const n=typeof t,r=typeof e;if(n==="number"&&r==="number"||n==="string"&&r==="string")return t===e?0:t<e?-1:1;throw new Error(`comparing ${n} to ${r}`)}}function lr(t){return Zt(t)}function d(t){return t!=null&&t!==!1}const pr=d;function Ht(t,e,n){return t.substring(e,n)}function _r(t){return typeof t=="function"}function hr(t,e){return a(function*(){for(;;){const n=t.exec(e);if(n){const r=n[0];yield n.length===1?r:E(n);const u=n.index+Xt(1,r.length);if(u>e.length)break;e=Ht(e,u)}else break}})}function dr(t){return Number.isNaN(t)}function te(t){return typeof t=="number"}function ee(t){return t?Object.keys(t):null}function xr(t){return ee(t)}function yr(t){return t?Object.values(t):null}function ft(t){return typeof t=="string"}function wr(t){return p(t)!=null}function mr(t){return t instanceof RegExp}class at extends Error{constructor(e,n,r){super(e),this._data=n,this._cause=r}}function br(t){return t instanceof at?t._data:null}function Ar(t){return t instanceof Error?t.message:null}function gr(t){return t instanceof at?t._cause:null}function vr(t,e,n){return new at(t,e,n)}function ne(t){return Number.isInteger(t)}const Mr=ne,re=Symbol("meta");function Er(t){return t instanceof Object?t[re]:null}function Rr(t,e){const n=K(t);return n[re]=e,n}function Sr(t){return t===!0||t===!1}function oe(t){switch(p(t)){case h:case _:case m:case v:case x:return!0}return!1}function Qr(t,e){return oe(e)?j(e):j(Y(t,e))}function Kr(t,e){const n=y(t,e);if(n!==void 0)return[e,n]}function kr(t,e){return(t%e+e)%e}function Ir(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i<=r&&(r=i,o=u)}),o}function Nr(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i>=r&&(r=i,o=u)}),o}function jr(t){throw new Error(`Expected string, got: ${typeof t}`)}function Or(t){if(ft(t)){if(/^[+-]?\d+$/.test(t)){const e=parseInt(t);if(Number.MIN_SAFE_INTEGER<=e<=Number.MAX_SAFE_INTEGER)return e}return null}return jr(t)}function ue(t){return t>=0?Math.floor(t):Math.ceil(t)}function ie(t,e){const n=t%e;return ue((t-n)/e)}function lt(t,...e){switch(e.length){case 2:{const n=e[0],r=e[1];return lt(t,n,n(),r)}default:{let n=e[0];const r=e[1],o=e[2];n=t(n);const u=Q(n,r,o);return n(u)}}}function Tr(t,e){const n={},r=c(t)[Symbol.iterator](),o=c(e)[Symbol.iterator]();let u,i;for(;u=r.next(),!(u.done||(i=o.next(),i.done));)n[u.value]=i.value;return n}function qr(t){return M(t)?t:null}function ce(t,e,n){const r=function*(o){if(yield o,d(t(o)))for(const u of c(e(o)))yield*r(u)};return a(function*(){yield*r(n)})}function Gr(t){return z(nt(J),$(ce(J,M,t)))}function Br(t){return K(t)}function Lr(t){return Object.freeze(t)}class I{constructor(e){e instanceof I||(e=ct(e));const r=new Set(e);this._elts=[...r],this._set=r}add(e){if(this._set.has(e))return this;const n=this._elts;let r=!1;for(let o=0;o<n.length;o++)if(b(e,n[o])<=0){n.splice(o,0,e),r=!0;break}return r?this._set=new Set(n):(n.push(e),this._set.add(e)),this.size=n.length,this}delete(e){if(!this._set.has(e))return this;const n=this._elts,r=n.indexOf(e);return n.splice(r,1),this._set=new Set(n),this.size=n.length,this}has(e){return this._set.has(e)}keys(){return this.values()}values(){return this._elts[Symbol.iterator]()}entries(){return this._set.entries()}forEach(...e){return this.set.forEach(...e)}clear(){this._elts=[],this._set=new Set(this._elts)}[Symbol.iterator](){return this.keys()}}function $r(...t){return new I(t)}function U(t,e,n){return r=>e(b(r,n),0)}function se(t,e,n=!0){let r=0;for(;r<t.length&&b(e,t[r])>0;r++);return r}function zr([t,e,n]){const r=U(t,e,n);if(e===pt||e===_t){const o=[...t],u=se(o,n,!0);return o.splice(0,u),r(o[0])||o.splice(0,1),o}else return[...C(r,t)]}function Fr([t,e,n,r,o]){const u=[...t],i=se(u,n,!0);u.splice(0,i);const s=U(t,r,o);return U(t,e,n)(u[0])||u.splice(0,1),[...C(s,u)]}function Pr(...t){if(t.length===3)return zr(t);if(t.length===5)return Fr(t)}function Yr(t){return Math.abs(t)}function Cr(t){return ue(t)}function Vr(t){return t!=null&&t.constructor}function Wr(t){return(e,n)=>{const r=t(e,n);return H(r)?Rt(r):r}}function Jr(t){return t=Wr(t),(...e)=>{switch(e.length){case 0:return t();case 1:return t(e[0]);case 2:return Q(t,e[0],e[1])}}}function Dr(t,e){const n=ie(t,e);return t-e*n}function Ur(t){const e=new Map;return(...n)=>{const r=[n.length,...n],o=ut(e,r);if(o===void 0){const u=t(...n);return dt(e,r,u),u}else return o}}function Xr(t){return P(t)?t[t.length-1]:S(t)}function Zr(t){if(P(t)){const e=[...t];return e.pop(),e}else return $(t)}return he(Hr);})(); | ||
var squint;(squint||={}).core=(()=>{var J=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var _e=Object.prototype.hasOwnProperty;var he=(t,e)=>{for(var n in e)J(t,n,{get:e[n],enumerable:!0})},de=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of pe(e))!_e.call(t,o)&&o!==n&&J(t,o,{get:()=>e[o],enumerable:!(r=le(e,o))||r.enumerable});return t};var xe=t=>de(J({},"__esModule",{value:!0}),t);var uo={};he(uo,{Atom:()=>Tt,Cons:()=>jt,IIterable:()=>H,IIterable__iterator:()=>Qt,LazySeq:()=>Fn,NaN_QMARK_:()=>mr,PROTOCOL_SENTINEL:()=>De,_:()=>ge,_EQ_:()=>ye,_GT_:()=>ht,_GT__EQ_:()=>dt,_LT_:()=>we,_LT__EQ_:()=>me,_PLUS_:()=>be,_STAR_:()=>Ae,_iterator:()=>B,abs:()=>Jr,aclone:()=>ur,add_watch:()=>ir,alength:()=>er,apply:()=>sn,array_QMARK_:()=>P,aset:()=>nr,assoc:()=>R,assoc_BANG_:()=>b,assoc_in:()=>yt,assoc_in_BANG_:()=>wt,atom:()=>Ze,boolean$:()=>Un,boolean_QMARK_:()=>Ir,bounded_count:()=>jr,butlast:()=>Pn,cat:()=>Zr,coll_QMARK_:()=>gr,comp:()=>Qe,compare:()=>A,complement:()=>rt,concat:()=>Ft,conj:()=>bt,conj_BANG_:()=>G,cons:()=>Le,constantly:()=>an,contains_QMARK_:()=>gt,count:()=>O,counted_QMARK_:()=>ie,cycle:()=>Mn,dec:()=>je,deref:()=>qt,disj:()=>Ke,disj_BANG_:()=>At,dissoc:()=>Ie,dissoc_BANG_:()=>ke,distinct:()=>En,doall:()=>or,dorun:()=>rr,drop:()=>W,drop_last:()=>Yn,drop_while:()=>Dt,empty:()=>Y,empty_QMARK_:()=>qn,es6_iterator:()=>L,even_QMARK_:()=>$t,every_QMARK_:()=>Ut,every_pred:()=>ar,ex_cause:()=>Rr,ex_data:()=>Mr,ex_info:()=>Sr,ex_message:()=>Er,false_QMARK_:()=>Jn,ffirst:()=>Oe,filter:()=>z,filterv:()=>ze,find:()=>Nr,first:()=>S,flatten:()=>zr,fn_QMARK_:()=>yr,fnil:()=>ct,frequencies:()=>zn,get:()=>w,get_in:()=>it,group_by:()=>$n,identical_QMARK_:()=>An,identity:()=>Pt,inc:()=>vt,int_QMARK_:()=>oe,integer_QMARK_:()=>Qr,interleave:()=>Yt,interpose:()=>_n,into:()=>Jt,into_array:()=>te,iterable:()=>c,iterate:()=>pr,js_keys:()=>br,js_obj:()=>tr,juxt:()=>_r,keep:()=>Kn,keep_indexed:()=>Ve,key:()=>Vt,keys:()=>re,last:()=>Te,lazy:()=>a,list:()=>zt,list_QMARK_:()=>ln,long$:()=>Dr,map:()=>I,map_QMARK_:()=>fr,map_indexed:()=>Pe,mapcat:()=>pn,mapv:()=>Bt,max:()=>Ht,max_key:()=>qr,memoize:()=>to,merge:()=>wn,merge_with:()=>mn,meta:()=>Kr,min:()=>sr,min_key:()=>Tr,mod:()=>Or,neg_QMARK_:()=>Zn,next:()=>U,nil_QMARK_:()=>Je,nnext:()=>hr,not:()=>Nt,not_any_QMARK_:()=>On,not_empty:()=>$r,not_every_QMARK_:()=>Qn,nth:()=>Et,number_QMARK_:()=>ne,object_QMARK_:()=>Re,odd_QMARK_:()=>fn,parse_long:()=>Br,partial:()=>vn,partition:()=>xn,partition_all:()=>dn,partition_by:()=>yn,peek:()=>eo,persistent_BANG_:()=>Pr,pop:()=>no,pos_QMARK_:()=>Hn,pr_str:()=>Ot,println:()=>Mt,prn:()=>Xe,quot:()=>se,rand_int:()=>Zt,rand_nth:()=>Gn,range:()=>tn,re_find:()=>nn,re_matches:()=>en,re_pattern:()=>rn,re_seq:()=>wr,reduce:()=>Q,reduce_kv:()=>at,reduced:()=>Kt,reduced_QMARK_:()=>tt,reductions:()=>Ge,regexp_QMARK_:()=>vr,rem:()=>Hr,remove:()=>Fe,remove_watch:()=>cr,repeat:()=>ut,repeatedly:()=>Ln,replace:()=>Tn,reset_BANG_:()=>Gt,rest:()=>$,reverse:()=>kn,satisfies_QMARK_:()=>ve,second:()=>Ne,select_keys:()=>hn,seq:()=>M,seq_QMARK_:()=>Rt,seqable_QMARK_:()=>St,sequential_QMARK_:()=>D,set:()=>cn,shuffle:()=>Nn,some:()=>Xt,some_QMARK_:()=>Dn,some_fn:()=>lr,sort:()=>st,sort_by:()=>jn,sorted_set:()=>Yr,split_at:()=>Cn,split_with:()=>Vn,str:()=>We,string_QMARK_:()=>lt,subs:()=>ee,subseq:()=>Wr,subvec:()=>on,swap_BANG_:()=>He,system_time:()=>bn,t:()=>xr,take:()=>C,take_nth:()=>gn,take_while:()=>V,to_array:()=>dr,transduce:()=>_t,transient$:()=>Fr,tree_seq:()=>fe,true_QMARK_:()=>Wn,truth_:()=>d,type:()=>Ur,update:()=>Rn,update_BANG_:()=>ft,update_in:()=>Sn,update_keys:()=>ro,update_vals:()=>oo,val:()=>Wt,vals:()=>Ar,vec:()=>E,vector:()=>nt,vector_QMARK_:()=>un,warn_on_lazy_reusage_BANG_:()=>Be,with_meta:()=>kr,zero_QMARK_:()=>Xn,zipmap:()=>Lr});function f(t){if(t==null||t instanceof Function)return t;const e=typeof t;return e==="string"?(n,r)=>w(n,t,r):e==="object"?(n,r)=>w(t,n,r):t}function K(t,e){return t.every(function(n,r){return r===0||e(t[r-1],n)})}function ye(...t){return K(t,(e,n)=>e===n)}function ht(...t){return K(t,(e,n)=>e>n)}function dt(...t){return K(t,(e,n)=>e>=n)}function we(...t){return K(t,(e,n)=>e<n)}function me(...t){return K(t,(e,n)=>e<=n)}function be(...t){return t.reduce((e,n)=>e+n,0)}function Ae(...t){return t.reduce((e,n)=>e*n,1)}function ge(...t){return t.length==1?0-t[0]:t.reduce((e,n)=>e-n)}function ve(t,e){return e[t]}function Me(t,e,n){return t.set(e,n),t}function Ee(t,e,n){return t[e]=n,t}function xt(t){switch(p(t)){case _:return Me;case h:case x:return Ee}}function b(t,e,n,...r){if(r.length%2!==0)throw new Error("Illegal argument: assoc expects an odd number of arguments.");switch(p(t)){case _:t.set(e,n);for(let o=0;o<r.length;o+=2)t.set(r[o],r[o+1]);break;case h:case x:t[e]=n;for(let o=0;o<r.length;o+=2)t[r[o]]=r[o+1];break;default:throw new Error(`Illegal argument: assoc! expects a Map, Array, or Object as the first argument, but got ${typeof t}.`)}return t}function k(t){switch(p(t)){case _:return new Map(t);case y:return new t.constructor(t);case h:return[...t];case x:return{...t};default:throw new Error(`Don't know how to copy object of type ${typeof t}.`)}}function R(t,e,n,...r){t||(t={});const o=k(t);return b(o,e,n,...r),o}const _=1,h=2,x=3,v=4,y=5,T=6;function q(t){switch(t){case _:return new Map;case h:return[];case x:return{};case v:return new F;case y:return new Set;case T:return a(function*(){})}}function Z(t){return t.constructor===Object}function Re(t){return t!=null&&Z(t)}function p(t){if(t!=null){if(Z(t))return x;if(t instanceof Map)return _;if(t instanceof Set)return y;if(t instanceof F)return v;if(Array.isArray(t))return h;if(t instanceof et)return T;if(t instanceof j)return y;if(t instanceof Object)return x}}function Se(t,e,n,r,o){r=E(r);const u=p(n);if(u!==_&&u!==h&&u!==x)throw new Error(`Illegal argument: ${e} expects the first argument to be a Map, Array, or Object.`);const i=[n];let s=n;for(let l=0;l<r.length-1;l+=1){const g=r[l];let m;s instanceof Map?m=s.get(g):m=s[g],m||(m=q(u)),i.push(m),s=m}i.push(o);for(let l=i.length-2;l>=0;l-=1)i[l]=t(i[l],r[l],i[l+1]);return i[0]}function yt(t,e,n){return Se(R,"assoc-in",t,e,n)}function wt(t,e,n){e=E(e);var r=t;const o=p(t);for(const u of e.splice(0,e.length-1)){let i=w(r,u);i===void 0&&(i=q(o),b(r,u,i)),r=i}return b(r,e[e.length-1],n),t}function Qe(...t){if(t=t.map(f),t.length===0)return Pt;if(t.length===1)return t[0];const[e,...n]=t.slice().reverse();return function(...r){let o=e(...r);for(const u of n)o=u(o);return o}}function mt(t,e){for(const n of e)t.add(n);return t}function G(...t){if(t.length===0)return nt();const[e,...n]=t;let r=e;switch(r==null&&(r=[]),p(r)){case y:mt(r,n);break;case v:r.unshift(...n.reverse());break;case h:r.push(...n);break;case _:for(const o of n)Array.isArray(o)?r.set(o[0],o[1]):c(o).forEach(u=>{r.set(u[0],u[1])});break;case x:for(const o of n)Array.isArray(o)?r[o[0]]=o[1]:Object.assign(r,o);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return r}function bt(...t){if(t.length===0)return nt();const[e,...n]=t;let r=e;r==null&&(r=zt());let o,u;switch(p(r)){case y:return r instanceof j?mt(new r.constructor(r),n):new r.constructor([...r,...n]);case v:return new F(...n.reverse(),...r);case h:return[...r,...n];case _:o=new Map(r);for(const i of n)Array.isArray(i)?o.set(i[0],i[1]):c(i).forEach(s=>{o.set(s[0],s[1])});return o;case T:return a(function*(){yield*n,yield*r});case x:u={...r};for(const i of n)Array.isArray(i)?u[i[0]]=i[1]:Object.assign(u,i);return u;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function At(t,...e){for(const n of e)t.delete(n);return t}function Ke(t,...e){const n=new t.constructor([...t]);return At(n,...e)}function gt(t,e){switch(p(t)){case y:case _:return t.has(e);case void 0:return!1;default:return e in t}}function ke(t,...e){for(const n of e)delete t[n];return t}function Ie(t,...e){if(e.length===0)return t;const n=k(t);switch(p(t)){case _:for(const r of e)n.delete(r);break;default:for(const r of e)delete n[r];break}return n}function vt(t){return t+1}function je(t){return t-1}function Mt(...t){console.log(...t)}function Et(t,e,n){if(t){var r=void 0;if(Array.isArray(t))r=t[e];else{const o=c(t);let u=0;for(const i of o)if(u++==e){r=i;break}}if(r!==void 0)return r}return n}function w(t,e,n=void 0){if(t==null)return n;let r;if(Z(t))return r=t[e],r===void 0?n:r;let o;switch(p(t)){case y:t.has(e)&&(r=e);break;case _:r=t.get(e);break;case h:r=t[e];break;default:if(o=t.get,o instanceof Function)try{r=t.get(e);break}catch{}r=t[e];break}return r!==void 0?r:n}function Rt(t){return t!=null&&!!t[Symbol.iterator]}const D=Rt;function St(t){return t==null||!!t[Symbol.iterator]}function c(t){if(t==null)return[];if(St(t))return t;if(t instanceof Object)return Object.entries(t);throw new TypeError(`${t} is not iterable`)}const H=Symbol("Iterable"),Qt=Symbol.iterator;function B(t){return t[Symbol.iterator]()}const L=B;function M(t){if(t==null)return t;const e=c(t);return e.length===0||e.size===0||e[Symbol.iterator]().next().done?null:e}function S(t){const[e]=c(t);return e}function Ne(t){const[e,n]=c(t);return n}function Oe(t){return S(S(t))}function $(t){return a(function*(){let e=!0;for(const n of c(t))e?e=!1:yield n})}class N{value;constructor(e){this.value=e}_deref(){return this.value}}function Te(t){t=c(t);let e;switch(p(t)){case h:return t[t.length-1];default:for(const n of t)e=n;return e}}function Kt(t){return new N(t)}function tt(t){return t instanceof N}function Q(t,e,n){t=f(t);let r,o;if(n===void 0){const u=c(e)[Symbol.iterator](),i=u.next();i.done?o=t():o=i.value,r=u}else o=e,r=c(n);if(o instanceof N)return o.value;for(const u of r)if(o=t(o,u),o instanceof N){o=o.value;break}return o}function*qe(t,e){const n=e.next();n.done?yield t():yield*kt(t,n.value,e)}function*kt(t,e,n){let r=e,o=n;for(;;){if(tt(r)){yield r.value;return}else yield r;const u=o.next();if(u.done)break;r=t(r,u.value)}}function Ge(t,e,n){return t=f(t),a(n===void 0?function*(){yield*qe(t,c(e)[Symbol.iterator]())}:function*(){yield*kt(t,e,c(n)[Symbol.iterator]())})}var It=!1;function Be(){It=!0}class et{constructor(e){this.gen=e,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&It)try{throw new Error}catch(e){console.warn("Re-use of lazy value",e.stack)}return this.gen()}}et.prototype[H]=!0;function a(t){return new et(t)}class jt{constructor(e,n){this.x=e,this.coll=n}*[Symbol.iterator](){yield this.x,yield*c(this.coll)}}function Le(t,e){return new jt(t,e)}function I(t,...e){switch(t=f(t),e.length){case 0:return n=>(...r)=>{switch(r.length){case 0:return n();case 1:return n(r[0]);case 2:return n(r[0],t(r[1]));default:return n(r[0],t(...r.slice(1)))}};case 1:return a(function*(){for(const n of c(e[0]))yield t(n)});default:return a(function*(){const n=e.map(r=>L(c(r)));for(;;){const r=[];for(const o of n){const u=o.next();if(u.done)return;r.push(u.value)}yield t(...r)}})}}function $e(t){return e=>(...n)=>{switch(n.length){case 0:return e();case 1:return e(n[0]);case 2:{const r=n[0],o=n[1];return d(t(o))?e(r,o):r}}}}function z(t,e){return e===void 0?$e(t):(t=f(t),a(function*(){for(const n of c(e))d(t(n))&&(yield n)}))}function ze(t,e){return[...z(t,e)]}function Fe(t,e){return z(rt(t),e)}function Pe(t,e){t=f(t);const n=[];let r=0;for(const o of c(e))n.push(t(r,o)),r++;return n}function Ye(t,e){t=f(t);const n=[];let r=0;for(const o of c(e)){const u=t(r,o);d(u)&&n.push(u),r++}return n}function Ce(t){return e=>{let n=-1;return(r,o)=>{if(r===void 0)return e();if(o===void 0)return e(r);n++;const u=t(n,o);return u==null?r:e(r,u)}}}function Ve(t,e){return e===void 0?Ce(t):Ye(t,e)}function We(...t){return t.join("")}function Nt(t){return!d(t)}function Je(t){return t==null}const De={};function Ue(t){return t===null?"null":JSON.stringify(t,(e,n)=>{switch(p(n)){case y:case T:return[...n];case _:return Object.fromEntries(n);default:return n}})}function Ot(...t){return t.map(Ue).join(" ")}function Xe(...t){Mt(Ot(...t))}function Tt(t){this.val=t,this._watches={},this._deref=()=>this.val,this._hasWatches=!1,this._reset_BANG_=e=>{const n=this.val;if(this.val=e,this._hasWatches)for(const r of Object.entries(this._watches)){const o=r[0],u=r[1];u(o,this,n,e)}return e},this._add_watch=(e,n)=>{this._watches[e]=n,this._hasWatches=!0},this._remove_watch=e=>{delete this._watches[e]}}function Ze(t){return new Tt(t)}function qt(t){return t._deref()}function Gt(t,e){t._reset_BANG_(e)}function He(t,e,...n){e=f(e);const r=e(qt(t),...n);return Gt(t,r),r}function tn(t,e,n){return a(function*(){let r=t,o=e,u=n;e===void 0&&(r=0,o=t);let i=r||0;for(u=n||1;o===void 0||i<o;)yield i,i+=u})}function en(t,e){const n=t.exec(e);return n&&e===n[0]?n.length===1?n[0]:n:null}function nn(t,e){if(lt(e)){const n=t.exec(e);return n!=null?n.length===1?n[0]:[...n]:null}else throw new TypeError("re-find must match against a string.")}function rn(t){if(t instanceof RegExp)return t;const e=t.match(/^\(\?([dgimsuvy]*)\)/);return e?new RegExp(t.slice(e[0].length),e[1]):new RegExp(t)}function on(t,e,n){return t.slice(e,n)}function nt(...t){return t}function un(t){return p(t)===h}function Bt(...t){return[...I(...t)]}function E(t){return P(t)?t:[...c(t)]}function cn(t){return new Set(c(t))}const Lt=Symbol("IApply__apply");function sn(t,...e){t=f(t);const n=e.slice(0,e.length-1),r=c(e[e.length-1]),o=t[Lt];return o?o(...n,r):t(...n,...r)}function $t(t){return t%2==0}function fn(t){return!$t(t)}function rt(t){return t=f(t),(...e)=>Nt(t(...e))}function an(t){return(...e)=>t}class F extends Array{constructor(...e){super(),this.push(...e)}}function ln(t){return p(t)===v}function zt(...t){return new F(...t)}function P(t){return Array.isArray(t)}function ot(t){return a(function*(){for(const e of t)yield*c(e)})}function Ft(...t){return ot(t)}Ft[Lt]=t=>ot(t);function pn(t,...e){const n=I(t,...e);return ot(n)}function Pt(t){return t}function Yt(...t){return a(function*(){const e=t.map(n=>L(c(n)));for(;;){const n=[];for(const r of e){const o=r.next();if(o.done)return;n.push(o.value)}yield*n}})}function _n(t,e){return W(1,Yt(ut(t),e))}function hn(t,e){const n=p(t),r=q(n)||{};for(const o of e){const u=w(t,o);u!=null&&b(r,o,u)}return r}function dn(t,...e){let n=t,r=e[0];return e.length===2&&([n,r]=e),Ct(t,n,[],r,!0)}function xn(t,...e){let n=t,r=[],o=e[0];return e.length===2?[n,o]=e:e.length>2&&([n,r,o]=e),Ct(t,n,r,o,!1)}function Ct(t,e,n,r,o){return a(function*(){let u=[],i=0;for(const s of c(r))i<t&&(u.push(s),u.length===t&&(yield u,u=e<t?u.slice(e):[])),i++,i===e&&(i=0);u.length>0&&(u.length===t||o?yield u:n.length&&(u.push(...n.slice(0,t-u.length)),yield u))})}function yn(t,e){return t=f(t),a(function*(){const n=L(e),r=n.next();r.done&&(yield*null);const o=r.value;let u=t(o),i=[o],s=[];for(;;){const l=n.next();if(l.done){yield i;break}const g=l.value,m=t(g);u==m?i.push(g):(yield i,s.push(g),i=s,u=m,s=[])}})}function Y(t){const e=p(t);if(e!=null)return q(e);throw new Error(`Can't create empty of ${typeof t}`)}function wn(...t){const e=t[0];let n;return e==null?n={}:n=Jt(Y(e),e),G(n,...t.slice(1))}function Vt(t){return t[0]}function Wt(t){return t[1]}function mn(t,...e){t=f(t);var n=!1;for(const r of e)if(r!=null){n=!0;break}if(n){const r=(u,i)=>{const s=Vt(i),l=Wt(i);return gt(u,s)?R(u,s,t(w(u,s),l)):R(u,s,l)};return Q((u,i)=>Q(r,u||{},M(i)),e)}else return null}function bn(){return performance.now()}function Jt(...t){let e,n,r,o,u;switch(t.length){case 0:return[];case 1:return t[0];case 2:return bt(t[0]??[],...c(t[1]));case 3:return e=t[0],n=t[1],r=t[2],o=k(e),u=(i,s)=>s===void 0?i:G(i,s),_t(n,u,o,r);default:throw TypeError(`Invalid arity call of into: ${t.length}`)}}function An(t,e){return t===e}function ut(...t){if(t.length==0||t.length>2)throw new Error(`Invalid arity: ${t.length}`);return{[H]:!0,[Qt]:t.length==1?function*(){const e=t[0];for(;;)yield e}:function*(){const[e,n]=t;for(var r=0;r<e;r++)yield n}}}function C(t,e){return a(function*(){let n=t-1;for(const r of c(e))if(n-->=0&&(yield r),n<0)return})}function V(t,e){return t=f(t),a(function*(){for(const n of c(e))if(d(t(n)))yield n;else return})}function gn(t,e){return t<=0?ut(S(e)):a(function*(){let n=0;for(const r of c(e))n%t===0&&(yield r),n++})}function vn(t,...e){return t=f(t),function(...n){return t(...e,...n)}}function Mn(t){return a(function*(){for(;;)yield*t})}function W(t,e){return a(function*(){const n=B(c(e));for(let r=0;r<t;r++)n.next();yield*n})}function Dt(t,e){return t=f(t),a(function*(){const n=B(c(e));for(;;){const r=n.next();if(r.done)break;const o=r.value;if(!d(t(o))){yield o;break}}yield*n})}function En(t){return a(function*(){const e=new Set;for(const n of c(t))e.has(n)||(yield n),e.add(n)})}function Rn(t,e,n,...r){return n=f(n),R(t,e,n(w(t,e),...r))}function it(t,e,n){let r=t;for(const o of e)r=w(r,o);return r===void 0?n:r}function Sn(t,e,n,...r){return n=f(n),yt(t,e,n(it(t,e),...r))}function ct(t,e,...n){return t=f(t),function(r,...o){return r?t(r,...n,...o):t(e,...n,...o)}}function Ut(t,e){t=f(t);for(const n of c(e))if(!t(n))return!1;return!0}function Qn(t,e){return!Ut(t,e)}function Kn(t,e){return t=f(t),a(function*(){for(const n of c(e)){const r=t(n);d(r)&&(yield r)}})}function kn(t){return t=c(t),[...t].reverse()}function st(t,e){return e===void 0&&(e=t,t=void 0),t=f(t),e=c(e),[...e].sort(t||A)}function In(t){return t===A?t:(e,n)=>{const r=t(e,n);return ne(r)?r:r?-1:t(n,e)?1:0}}function jn(t,e,n){return n===void 0&&(n=e,e=A),t=f(t),e=f(e),st((r,o)=>{const u=In(e),i=t(r),s=t(o);return u(i,s)},n)}function Nn(t){return[...t].sort(function(e,n){return Math.random()-.5})}function Xt(t,e){t=f(t);for(const n of c(e)){const r=t(n);if(d(r))return r}}function On(t,e){return t=f(t),!Xt(t,e)}function Tn(t,e){return(Array.isArray(e)?Bt:I)(r=>{const o=t[r];return o!==void 0?o:r},e)}function qn(t){return!M(t)}function Zt(t){return Math.floor(Math.random()*t)}function Gn(t){const e=Zt(O(t));return Et(t,e)}function Bn(t){return a(function*(){for(;;)yield t()})}function Ln(t,e){e===void 0&&(e=t,t=void 0);const n=Bn(e);return t?C(t,n):n}function ft(t,e,n,...r){const o=w(t,e);return b(t,e,n(o,...r))}function $n(t,e){t=f(t);const n={};for(const r of c(e)){const o=t(r);ft(n,o,ct(G,[]),r)}return n}function zn(t){const e={},n=ct(vt,0);for(const r of c(t))ft(e,r,n);return e}class Fn{constructor(e){this.f=e,this.res=void 0}*[Symbol.iterator](){this.res===void 0&&(this.res=this.f(),this.f=null),yield*c(this.res)}}function Pn(t){const e=[...c(t)];return e.pop(),e.length>0?e:null}function Yn(...t){const[e,n]=t.length>1?t:[1,t[0]];return I((r,o)=>r,n,W(e,n))}function Cn(t,e){return[C(t,e),W(t,e)]}function Vn(t,e){return[V(t,e),Dt(t,e)]}function O(t){if(!t)return 0;const e=t.length||t.size;if(typeof e=="number")return e;let n=0;for(const r of c(t))n++;return n}function Wn(t){return t===!0}function Jn(t){return t===!1}function Dn(t){return t!=null}function Un(t){return!!t}function Xn(t){return t===0}function Zn(t){return t<0}function Hn(t){return t>0}function tr(...t){let e=0;const n={};for(;!(e>=t.length);)n[t[e]]=t[e+1],e=e+2;return n}function er(t){return t.length}function nr(t,e,n,...r){if(r.length==0)return t[e]=n,n;{const o=[e,n,...r],u=o[o.length-1];let i=t,s=0;const l=o.length-2;for(;s<l;s++)i=i[o[s]];return i[o[s]]=u,n}}function rr(t){for(const e of c(t));return null}function or(t){return E(t)}function ur(t){return[...t]}function ir(t,e,n){return t._add_watch(e,n)}function cr(t,e){return t._remove_watch(e)}function at(t,e,n){if(!n)return e;var r=e;for(const o of c(n))r=t(r,o[0],o[1]);return r}function Ht(t,e,...n){return e==null?t:Math.max(t,e,...n)}function sr(t,e,...n){return e==null?t:Math.min(t,e,...n)}function fr(t){return t instanceof Object}function ar(...t){return(...e)=>{for(const n of t)for(const r of e)if(!n(r))return!1;return!0}}function lr(...t){return(...e)=>{for(const n of t)for(const r of e){const o=n(r);if(o)return o}}}function te(t,e){return E(e||t)}function pr(t,e){var n=e;return a(function*(){for(;;)yield n,n=t(n)})}function _r(...t){return t=t.map(f),(...e)=>{const n=[];for(const r of t)n.push(r(...e));return n}}function U(t){if(Array.isArray(t)){const e=t.slice(1);return e.length>0?e:null}else return M($(t))}function hr(t){return U(U(t))}function A(t,e){if(t===e)return 0;{if(t==null)return-1;if(e==null)return 1;const n=typeof t,r=typeof e;if(n==="number"&&r==="number"||n==="string"&&r==="string")return t===e?0:t<e?-1:1;throw new Error(`comparing ${n} to ${r}`)}}function dr(t){return te(t)}function d(t){return t!=null&&t!==!1}const xr=d;function ee(t,e,n){return t.substring(e,n)}function yr(t){return typeof t=="function"}function wr(t,e){return a(function*(){for(;;){const n=t.exec(e);if(n){const r=n[0];yield n.length===1?r:E(n);const u=n.index+Ht(1,r.length);if(u>e.length)break;e=ee(e,u)}else break}})}function mr(t){return Number.isNaN(t)}function ne(t){return typeof t=="number"}function re(t){return t?Object.keys(t):null}function br(t){return re(t)}function Ar(t){return t?Object.values(t):null}function lt(t){return typeof t=="string"}function gr(t){return p(t)!=null}function vr(t){return t instanceof RegExp}class pt extends Error{constructor(e,n,r){super(e),this._data=n,this._cause=r}}function Mr(t){return t instanceof pt?t._data:null}function Er(t){return t instanceof Error?t.message:null}function Rr(t){return t instanceof pt?t._cause:null}function Sr(t,e,n){return new pt(t,e,n)}function oe(t){return Number.isInteger(t)}const Qr=oe,ue=Symbol("meta");function Kr(t){return t instanceof Object?t[ue]:null}function kr(t,e){const n=k(t);return n[ue]=e,n}function Ir(t){return t===!0||t===!1}function ie(t){switch(p(t)){case h:case _:case x:case v:case y:return!0}return!1}function jr(t,e){return ie(e)?O(e):O(C(t,e))}function Nr(t,e){const n=w(t,e);if(n!==void 0)return[e,n]}function Or(t,e){return(t%e+e)%e}function Tr(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i<=r&&(r=i,o=u)}),o}function qr(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i>=r&&(r=i,o=u)}),o}function Gr(t){throw new Error(`Expected string, got: ${typeof t}`)}function Br(t){if(lt(t)){if(/^[+-]?\d+$/.test(t)){const e=parseInt(t);if(Number.MIN_SAFE_INTEGER<=e<=Number.MAX_SAFE_INTEGER)return e}return null}return Gr(t)}function ce(t){return t>=0?Math.floor(t):Math.ceil(t)}function se(t,e){const n=t%e;return ce((t-n)/e)}function _t(t,...e){switch(e.length){case 2:{const n=e[0],r=e[1];return _t(t,n,n(),r)}default:{let n=e[0];const r=e[1],o=e[2];n=t(n);const u=Q(n,r,o);return n(u)}}}function Lr(t,e){const n={},r=c(t)[Symbol.iterator](),o=c(e)[Symbol.iterator]();let u,i;for(;u=r.next(),!(u.done||(i=o.next(),i.done));)n[u.value]=i.value;return n}function $r(t){return M(t)?t:null}function fe(t,e,n){const r=function*(o){if(yield o,d(t(o)))for(const u of c(e(o)))yield*r(u)};return a(function*(){yield*r(n)})}function zr(t){return z(rt(D),$(fe(D,M,t)))}function Fr(t){return k(t)}function Pr(t){return Object.freeze(t)}class j{constructor(e){e instanceof j||(e=st(e));const r=new Set(e);this._elts=[...r],this._set=r}add(e){if(this._set.has(e))return this;const n=this._elts;let r=!1;for(let o=0;o<n.length;o++)if(A(e,n[o])<=0){n.splice(o,0,e),r=!0;break}return r?this._set=new Set(n):(n.push(e),this._set.add(e)),this.size=n.length,this}delete(e){if(!this._set.has(e))return this;const n=this._elts,r=n.indexOf(e);return n.splice(r,1),this._set=new Set(n),this.size=n.length,this}has(e){return this._set.has(e)}keys(){return this.values()}values(){return this._elts[Symbol.iterator]()}entries(){return this._set.entries()}forEach(...e){return this.set.forEach(...e)}clear(){this._elts=[],this._set=new Set(this._elts)}[Symbol.iterator](){return this.keys()}}function Yr(...t){return new j(t)}function X(t,e,n){return r=>e(A(r,n),0)}function ae(t,e,n=!0){let r=0;for(;r<t.length&&A(e,t[r])>0;r++);return r}function Cr([t,e,n]){const r=X(t,e,n);if(e===ht||e===dt){const o=[...t],u=ae(o,n,!0);return o.splice(0,u),r(o[0])||o.splice(0,1),o}else return[...V(r,t)]}function Vr([t,e,n,r,o]){const u=[...t],i=ae(u,n,!0);u.splice(0,i);const s=X(t,r,o);return X(t,e,n)(u[0])||u.splice(0,1),[...V(s,u)]}function Wr(...t){if(t.length===3)return Cr(t);if(t.length===5)return Vr(t)}function Jr(t){return Math.abs(t)}function Dr(t){return ce(t)}function Ur(t){return t!=null&&t.constructor}function Xr(t){return(e,n)=>{const r=t(e,n);return tt(r)?Kt(r):r}}function Zr(t){return t=Xr(t),(...e)=>{switch(e.length){case 0:return t();case 1:return t(e[0]);case 2:return Q(t,e[0],e[1])}}}function Hr(t,e){const n=se(t,e);return t-e*n}function to(t){const e=new Map;return(...n)=>{const r=[n.length,...n],o=it(e,r);if(o===void 0){const u=t(...n);return wt(e,r,u),u}else return o}}function eo(t){return P(t)?t[t.length-1]:S(t)}function no(t){if(P(t)){const e=[...t];return e.pop(),e}else return $(t)}function ro(t,e){const n=Y(t),r=xt(t)||b;return at((o,u,i)=>r(o,e(u),i),n,t),n}function oo(t,e){const n=Y(t),r=xt(t)||b;return at((o,u,i)=>r(o,u,e(i)),n,t),n}return xe(uo);})(); |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "0.4.85", | ||
"version": "0.5.86", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "core.js", |
@@ -199,3 +199,3 @@ ## Squint | ||
squint supports `async/await`: | ||
Squint supports `async/await`: | ||
@@ -210,2 +210,28 @@ ``` clojure | ||
Anonymous functions must have `^:async` on the `fn` symbol or the function's name: | ||
``` clojure | ||
(^:async fn [] (js-await {}) 3) | ||
``` | ||
## Generator functions | ||
Generator functions must be marked with `^:gen`: | ||
``` clojure | ||
(defn ^:gen foo [] | ||
(js-yield 1) | ||
(js-yield* [2 3]) | ||
(let [x (inc 3)] | ||
(yield x))) | ||
(vec (foo)) ;;=> [1 2 3 4] | ||
``` | ||
Anonymous functions must have `^:gen` on the argument vector: | ||
``` clojure | ||
(^:gen fn [] (js-yield 1) (js-yield 2)) | ||
``` | ||
## Defclass | ||
@@ -359,2 +385,5 @@ | ||
- [Date-fns](https://squint-cljs.github.io/squint/?src=KHJlcXVpcmUgJ1siaHR0cHM6L2VzbS5zaC9kYXRlLWZuc0AzLjAuMC9pbmRleC5tanMiIDphcyBkXSkKCihkL2Zvcm1hdFJlbGF0aXZlIChkL3N1YkRheXMgKGpzL0RhdGUuKSAyKSAoanMvRGF0ZS4pKQ%3D%3D) | ||
- [VanJS](https://squint-cljs.github.io/squint/?src=KHJlcXVpcmUgJ1siaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L2doL3ZhbmpzLW9yZy92YW4vcHVibGljL3Zhbi0xLjIuNy5taW4uanMkZGVmYXVsdCIKICAgICAgICAgICA6YXMgdmFuXSkKCihkZWYgYnV0dG9uIHZhbi90YWdzLmJ1dHRvbikKKGRlZiBzcGFuIHZhbi90YWdzLnNwYW4pCgooZGVmbiBDb3VudGVyIFtdCiAgKGxldCBbY291bnRlciAodmFuL3N0YXRlIDApXQogICAgKHNwYW4gIlx1Mjc2NCIgY291bnRlciAiICIKICAgICAgKGJ1dHRvbiB7Om9uY2xpY2sgIyhzZXQhICguLXZhbCBjb3VudGVyKSAoZGVjICguLXZhbCBjb3VudGVyKSkpfQogICAgICAgICJcdWQ4M2RcdWRjNGUiKQogICAgICAoYnV0dG9uIHs6b25jbGljayAjKHNldCEgKC4tdmFsIGNvdW50ZXIpIChpbmMgKC4tdmFsIGNvdW50ZXIpKSl9CiAgICAgICAgIlx1ZDgzZFx1ZGM0ZCIpKSkpCgooZG9jdW1lbnQuYm9keS5wcmVwZW5kIChDb3VudGVyKSk%3D) | ||
- [Mithril](https://squint-cljs.github.io/squint/?src=KHJlcXVpcmUgJ1siaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvbWl0aHJpbC8yLjIuMi9taXRocmlsLm1pbi5qcyJdKQoKKGRlZiBtIGpzL20pCgooZGVmIHJvb3QgKG9yCiAgICAgICAgICAgIChqcy9kb2N1bWVudC5xdWVyeVNlbGVjdG9yICIjYXBwIikKICAgICAgICAgICAgKGRvdG8gKGpzL2RvY3VtZW50LmNyZWF0ZUVsZW1lbnQgImRpdiIpCiAgICAgICAgICAgICAgKHNldCEgLWlkICJhcHAiKQogICAgICAgICAgICAgIChqcy9kb2N1bWVudC5ib2R5LnByZXBlbmQpKSkpCgooZGVmIGNvdW50ZXIgKGF0b20gMCkpCgooLm1vdW50IG0gcm9vdAogIHs6dmlldyAoZm4gW10KICAgICAgICAgICAobSA6bWFpbgogICAgICAgICAgICAgWyhtIDpoMSAiVHJ5IG1lIG91dCIpCiAgICAgICAgICAgICAgKG0gOmJ1dHRvbgogICAgICAgICAgICAgICAgezpvbmNsaWNrICMoc3dhcCEgY291bnRlciBpbmMpfQogICAgICAgICAgICAgICAgIkNsaWNrczogIiBAY291bnRlcildKSl9KQ%3D%3D) | ||
- [Rough](https://squint-cljs.github.io/squint/?src=KHJlcXVpcmUgJ1siaHR0cHM6Ly9lc20uc2gvcm91Z2hqc0A0LjYuNiRkZWZhdWx0IiA6YXMgcm91Z2hdKQoKKGRlZiBjYW52YXMgKG9yIChqcy9kb2N1bWVudC5xdWVyeVNlbGVjdG9yICIjY2FudmFzIikKICAgICAgICAgICAgICAoZG90byAoanMvZG9jdW1lbnQuY3JlYXRlRWxlbWVudCAiY2FudmFzIikKICAgICAgICAgICAgICAgIChzZXQhIC1pZCAiY2FudmFzIikKICAgICAgICAgICAgICAgIChzZXQhIC13aWR0aCAyNTApCiAgICAgICAgICAgICAgICAoc2V0ISAtaGVpZ2h0IDI1MCkKICAgICAgICAgICAgICAgIChqcy9kb2N1bWVudC5ib2R5LnByZXBlbmQpKSkpCgooZGVmIHJjIChyb3VnaC9jYW52YXMgY2FudmFzKSkKCihyYy5yZWN0YW5nbGUgMTAgMTAgMjAwIDIwMCkKKHJjLmNpcmNsZSA4MCAxMjAgNTAgezpmaWxsIDpncmVlbn0pCihyYy5jaXJjbGUgODAgMTYwIDUwIHs6ZmlsbCA6cmVkfSk%3D) | ||
@@ -361,0 +390,0 @@ License |
@@ -28,2 +28,6 @@ /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "destructuredArrayIgnorePattern": "^_"}]*/ | ||
export function _EQ_(...xs) { | ||
return walkArray(xs, (x,y) => x === y); | ||
} | ||
export function _GT_(...xs) { | ||
@@ -64,2 +68,20 @@ return walkArray(xs, (x, y) => x > y); | ||
function mapAssocMut(m, k, v) { | ||
m.set(k, v); | ||
return m; | ||
} | ||
function objAssocMut(m, k, v) { | ||
m[k] = v; | ||
return m; | ||
} | ||
function getAssocMut(m) { | ||
switch (typeConst(m)) { | ||
case MAP_TYPE: return mapAssocMut; | ||
case ARRAY_TYPE: | ||
case OBJECT_TYPE: return objAssocMut; | ||
} | ||
} | ||
export function assoc_BANG_(m, k, v, ...kvs) { | ||
@@ -2342,2 +2364,20 @@ if (kvs.length % 2 !== 0) { | ||
} | ||
} | ||
export function update_keys(m, f) { | ||
const m2 = empty(m); | ||
const assocFn = getAssocMut(m) || assoc_BANG_; | ||
reduce_kv( (acc, k, v) => { | ||
return assocFn(acc, f(k), v); | ||
}, m2, m); | ||
return m2; | ||
} | ||
export function update_vals(m, f) { | ||
const m2 = empty(m); | ||
const assocFn = getAssocMut(m) || assoc_BANG_; | ||
reduce_kv( (acc, k, v) => { | ||
return assocFn(acc, k, f(v)); | ||
}, m2, m); | ||
return m2; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1356314
7929
391