squint-cljs
Advanced tools
Comparing version 0.7.100 to 0.7.101
@@ -6,48 +6,48 @@ 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 zha=function(a,b){return $APP.Vd(a)&&$APP.Vd(b)?$APP.Qk.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},V9=function(a,b){return $APP.oe.j(function(c,d){return $APP.cv.l(zha,$APP.F([c,d]))},a,b)},W9=function(a){throw $APP.cl.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.n(null,1,[Aha,a],null));},X9=function(a){var b=JSON.parse(a);return $APP.ae(b)?b:W9(a)},Bha=function(a){var b=JSON.parse(a);return $APP.SG(b)?b:W9(a)},Cha= | ||
function(a){var b=JSON.parse(a);return $APP.TG(b)?b:W9(a)},Y9=function(a){var b=JSON.parse(a);return"number"===typeof b?b:W9(a)},Z9=function(a){return"string"===typeof a?$APP.B.j(a,0,null):null},$9=function(a){return $APP.A.g(":",Z9(a))?$APP.zi.h($APP.ji.g(a,1)):$APP.zi.h(a)},Dha=function(a){return $APP.Rd(a)?$APP.y(a):a},a$=function(a){if("string"===typeof a)try{var b=Z9(a);if($APP.A.g("true",a)||$APP.A.g("false",a))var c=X9(a);else{if($APP.A.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e= | ||
Y9(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)?$9(a):a}d=e}c=d}return c}catch(l){return a}else return a},b$=function(a,b,c,d){throw $APP.cl.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,[Eha,a,Fha,c],null),d);},Gha=function(a,b,c){var d=function(){switch(b instanceof $APP.H?b.da:null){case "boolean":case "bool":return X9; | ||
case "int":case "long":return Bha;case "double":return Cha;case "number":return Y9;case "symbol":return $APP.Hi;case "keyword":return $9;case "string":return $APP.se;case "edn":return $APP.DH;case "auto":return a$;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=b$(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?b$(a,c,b,null):d},c$=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.Wq.g($APP.Ee, | ||
c):c:null},d$=function(a,b,c,d){return $APP.Qh.g(b,c)?(c=$APP.XG(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},Hha=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Rd(d):d)?Gha(e,d,f):a$(e);return $APP.r(c)?$APP.Tm.A(a,b,c,d):$APP.Rh.j(a,b,d)},Iha=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, | ||
e$),k=$APP.fe.g(e,f$);c=$APP.fe.g(e,$APP.Dm);var l=$APP.fe.g(e,$APP.WE);e=$APP.fe.g(e,g$);b=$APP.r(f)?$APP.Tm.J(b,e$,$APP.Rh,d,f):b;b=$APP.r(k)?$APP.Tm.j(b,f$,function(m){if($APP.he(m,k))throw $APP.cl.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,[f$,k],null));return $APP.Rh.j(m,k,d)}):b;b=$APP.r(l)?$APP.Tm.j(b,$APP.WE,$APP.Wq.g(function(m){return $APP.Ee.g(m,d)},$APP.Vh)):b;b=$APP.r(e)?$APP.Tm.J(b,g$,$APP.Rh,d,e):b;return $APP.r(c)? | ||
$APP.Tm.J(b,h$,$APP.Rh,d,c):b},$APP.hf,a)},l$=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,i$);b=$APP.YG(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,[j$,a,k$,b],null)},n$=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.J(null,2,5,$APP.N,[$APP.R.g($APP.Ou.g(b,a),$APP.Nf.g(c,a)),$APP.Nf.g(c,b)],null)}else a=new $APP.J(null,2,5,$APP.N,[a,b],null); | ||
else a=new $APP.J(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,[k$,a,m$,b],null)},v$=function(a,b,c,d,e){var f=Z9(a),k="string"===typeof a?$APP.B.j(a,1,null):null,l;if(l=$APP.A.g(f,"-")){try{var m=Y9($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?o$:null;f=$APP.A.g(":",f);c=$APP.Qh.g(o$,b)&&f&&($APP.A.g(p$,d)||$APP.Za(c)||$APP.A.g(e,c));d=$APP.r(b)?b:c?q$:null;a=l?$APP.r(k)?$APP.Qh.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.n(null, | ||
5,[$APP.Ww,d,r$,l,s$,a,t$,c,u$,f],null)},Mha=function(a,b){function c(vb){vb=$APP.Qk.l($APP.F([new $APP.n(null,2,[w$,d,$APP.Xk,x$],null),vb]));return O.h?O.h(vb):O.call(null,vb)}var d=w$.h(b),e=$APP.r(d)?V9(b,$APP.F([Iha(d)])):b,f=e$.h(e),k=function(){var vb=f$.h(e);return $APP.r(vb)?vb:$APP.Hr.h(e)}(),l=Jha.h(e),m=$APP.WE.h(e),h=h$.h(e),q=i$.h(e),p=function(){var vb=y$.h(e);return $APP.r(vb)?vb:Kha.h(e)}(),v=$APP.Zh($APP.R.l($APP.Kh($APP.Vd(d)?d:$APP.Rg.g($APP.hf,d)),$APP.Oh(k),$APP.F([$APP.Kh(f)]))), | ||
D=$APP.A.g(!0,p)?v:null==p?null:$APP.Zh(p),I=g$.h(e),O=function(){var vb=Lha.h(e);return $APP.r(vb)?vb:function(Zb){Zb=$APP.jf(Zb);var Ic=$APP.fe.g(Zb,z$);throw $APP.cl.g(Ic,Zb);}}(),P=l$(a,null),W=$APP.jf(P),ca=$APP.fe.g(W,j$),ha=$APP.fe.g(W,k$),na=function(){var vb=m$.h(e);vb=$APP.r(vb)?vb:A$.h(e);return $APP.r(vb)?n$(ca,vb):new $APP.n(null,2,[m$,null,k$,ha],null)}(),pa=$APP.jf(na),fa=$APP.fe.g(pa,k$),E=$APP.fe.g(pa,m$),C=$APP.Qh.g(fa,ha)?new $APP.J(null,2,5,$APP.N,[null,$APP.R.g(fa,ha)],null): | ||
new $APP.J(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,Zb=null,Ic=null,Me=$APP.r(q)?o$:null,hd=$APP.x(K),Jg=E;;){if($APP.Za(hd))return new $APP.J(null,3,5,$APP.N,[vb,Zb,Ic],null);var ng=$APP.y(hd),Tc=ng instanceof $APP.H;if(Tc){Zb=d$(vb,Zb,Ic,null);var me=ng;hd=$APP.z(hd);vb=Zb;Zb=me}else{var Al=!0===ng,Sf=$APP.t.h(ng);me=c$(l,Zb,$APP.fe.g(f,Zb));var xi=$APP.fe.g(f,Zb),Bl=v$(Sf,Me,Zb,xi,Ic),Lh=$APP.jf(Bl),Cl=$APP.fe.g(Lh,r$),Mh=$APP.fe.g(Lh, | ||
s$),Dl=$APP.fe.g(Lh,t$),Tf=$APP.fe.g(Lh,$APP.Ww),mk=$APP.fe.g(Lh,u$);if($APP.r(function(){var Oe=Cl;return $APP.r(Oe)?Oe:Dl}())){var Yc=$APP.qa(Sf,"--"),nk=Yc&&$APP.A.g("--",Sf);if(nk){var El=$APP.z(hd);return new $APP.J(null,3,5,$APP.N,[function(){var Oe=vb;return El?$APP.jo.A(Oe,$APP.Qu,new $APP.J(null,2,5,$APP.N,[x$,k$],null),$APP.lg(El)):Oe}(),Zb,Ic],null)}var ok=Yc?$APP.ji.g(Sf,2):$APP.Zj(Sf,/^(:|-|)/,""),zf=Yc?$APP.Dr.g(ok,/=/):new $APP.J(null,1,5,$APP.N,[ok],null),Sd=$APP.B.j(zf,0,null),Ce= | ||
$APP.B.j(zf,1,null),Tb=$APP.zi.h(Sd),Ec=$APP.fe.j(k,Tb,Tb);if($APP.r(Ce))Ic=d$(vb,Zb,Ic,me),Zb=Ec,Me=Tf,hd=$APP.He(Ce,$APP.cd(hd)),vb=Ic,Ic=null;else{var Ab=$APP.z(hd),Ne=$APP.y(Ab),pw=v$(Ne,Tf,Zb,xi,Ic);if($APP.r(function(){var Oe=r$.h(pw);return $APP.r(Oe)?Oe:$APP.Qd(Ab)}()))if($APP.r(Mh)){var qw=$APP.ai(Ec);Ic=$APP.aq.l(function(){return function(Oe){return new $APP.J(null,2,5,$APP.N,[["-",$APP.t.h(Oe)].join(""),!0],null)}}(vb,Zb,Ic,Me,hd,Jg,qw,Ab,Ne,pw,ok,zf,Sd,Ce,Tb,Ec,Yc,nk,Al,Sf,me,xi,Bl,Lh, | ||
Cl,Mh,Dl,Tf,mk,ng,Tc,d,e,f,k,l,m,h,q,p,v,D,I,O,c,P,W,ca,ha,na,pa,fa,E,C,ea,K),$APP.F([qw]));hd=$APP.R.g(Ic,Ab);Me=Tf;Ic=Zb=null}else hd=$APP.he(v,Ec)?null:$APP.NG($APP.t.h(Ec),":no-"),Me=$APP.r(hd)?$APP.zi.h($APP.Zj($APP.t.h(Ec),":no-","")):Ec,hd=$APP.He($APP.Za(hd),Ab),Zb=d$(vb,Zb,Ic,me),me=Me,Me=Tf,vb=Zb,Zb=me;else Zb=d$(vb,Zb,Ic,me),me=Ec,Me=Tf,hd=Ab,vb=Zb,Zb=me}}else if(nk=$APP.A.g(p$,xi)&&$APP.Qh.g(Sf,"true")&&$APP.Qh.g(Sf,"false")||$APP.A.g(Ic,Zb)&&$APP.Za(me))if(Jg=$APP.r(hd)?$APP.r(Jg)?n$(hd, | ||
Jg):new $APP.n(null,1,[k$,hd],null):new $APP.n(null,1,[k$,hd],null),Me=$APP.jf(Jg),Jg=$APP.fe.g(Me,k$),Me=$APP.fe.g(Me,m$),$APP.Qh.g(hd,Jg))me=Me,Me=Tf,hd=Jg,Jg=me;else return new $APP.J(null,3,5,$APP.N,[$APP.jo.A(vb,$APP.Qu,new $APP.J(null,2,5,$APP.N,[x$,k$],null),$APP.lg(hd)),Zb,Ic],null);else{try{var Zd=Hha(vb,Zb,me,Dha(xi),Sf,Al)}catch(Oe){c(new $APP.n(null,4,[B$,e$,z$,$APP.bH(Oe),C$,Zb,D$,Sf],null)),Zd=vb}Ic=$APP.r(function(){var Oe=$APP.A.g(q$,Tf);return Oe?mk:Oe}())?null:Zb;me=$APP.r(function(){var Oe= | ||
$APP.A.g(q$,Tf);return Oe?mk:Oe}())?null:Zb;Me=Tf;hd=$APP.z(hd);vb=Zd;Zb=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=c$(l,ia,$APP.fe.g(f,ia)),ta=function(){var vb=d$(da,ia,ja,sa);return $APP.x(ea)?$APP.jo.A(vb,$APP.Nk,new $APP.J(null,2,5,$APP.N,[x$,k$],null),function(Zb){return $APP.Rg.g($APP.lg(ea),Zb)}):vb}(),wa=$APP.r(h)?$APP.Md($APP.Qk.l($APP.F([h,ta])),$APP.Nd(ta)):ta;if($APP.r(D)){a=$APP.x($APP.Kh(wa));b=null;for(var ya=0,Ca=0;;)if(Ca<ya){var Ha=b.ba(null, | ||
Ca);$APP.he(D,Ha)||c(new $APP.n(null,4,[B$,y$,z$,["Unknown option: ",$APP.t.h(Ha)].join(""),y$,D,C$,Ha],null));Ca+=1}else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ca=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ca):(a=$APP.y(b),$APP.he(D,a)||c(new $APP.n(null,4,[B$,y$,z$,["Unknown option: ",$APP.t.h(a)].join(""),y$,D,C$,a],null)),a=$APP.z(b),b=null,ya=0),Ca=0;else break}if($APP.r(m))for(a=$APP.x(m),b=null,Ca=ya=0;;)if(Ca<ya)Ha=b.ba(null,Ca),$APP.r($APP.XG(wa,Ha))||c(new $APP.n(null,4,[B$,$APP.WE,z$,["Required option: ", | ||
$APP.t.h(Ha)].join(""),$APP.WE,m,C$,Ha],null)),Ca+=1;else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ca=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ca):(a=$APP.y(b),$APP.r($APP.XG(wa,a))||c(new $APP.n(null,4,[B$,$APP.WE,z$,["Required option: ",$APP.t.h(a)].join(""),$APP.WE,m,C$,a],null)),a=$APP.z(b),b=null,ya=0),Ca=0;else break;if($APP.r(I))for(var Da=$APP.x(I),Aa=null,Oa=0,Sa=0;;)if(Sa<Oa){var db=Aa.ba(null,Sa),ub=$APP.B.j(db,0,null),Bb=$APP.B.j(db,1,null),Yb=function(){var vb=(vb=$APP.Vd(Bb))?E$.h(Bb):vb;return $APP.r(vb)? | ||
vb:Bb}(),qc=$APP.XG(wa,ub);if($APP.r(qc)){var $c=qc,Sb=$APP.B.j($c,0,null),nf=$APP.B.j($c,1,null);if(!$APP.r(Yb.h?Yb.h(nf):Yb.call(null,nf))){var ik=function(){var vb=F$.h(Bb);return $APP.r(vb)?vb:function(){return function(Zb){var Ic=$APP.jf(Zb);Zb=$APP.fe.g(Ic,C$);Ic=$APP.fe.g(Ic,D$);return["Invalid value for option ",$APP.t.h(Zb),": ",$APP.t.h(Ic)].join("")}}(Da,Aa,Oa,Sa,vb,$c,Sb,nf,qc,Yb,db,ub,Bb,d,e,f,k,l,m,h,q,p,v,D,I,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,[B$,g$,z$,function(){var vb=new $APP.n(null,2,[C$,ub,D$,nf],null);return ik.h?ik.h(vb):ik.call(null,vb)}(),g$,I,C$,ub,D$,nf],null))}}Sa+=1}else{var xl=$APP.x(Da);if(xl){var vi=xl;if($APP.Yd(vi))ya=$APP.uc(vi),a=$APP.vc(vi),b=ya,ya=$APP.xd(ya),Da=a,Aa=b,Oa=ya;else{var jk=$APP.y(vi),kk=$APP.B.j(jk,0,null),rj=$APP.B.j(jk,1,null),lk=function(){var vb=(vb=$APP.Vd(rj))?E$.h(rj):vb;return $APP.r(vb)?vb:rj}(),yl=$APP.XG(wa,kk);if($APP.r(yl)){var Hc=yl,sj=$APP.B.j(Hc,0,null),wi=$APP.B.j(Hc,1,null);if(!$APP.r(lk.h? | ||
lk.h(wi):lk.call(null,wi))){var zl=function(){var vb=F$.h(rj);return $APP.r(vb)?vb:function(){return function(Zb){var Ic=$APP.jf(Zb);Zb=$APP.fe.g(Ic,C$);Ic=$APP.fe.g(Ic,D$);return["Invalid value for option ",$APP.t.h(Zb),": ",$APP.t.h(Ic)].join("")}}(Da,Aa,Oa,Sa,vb,Hc,sj,wi,yl,lk,jk,kk,rj,vi,xl,d,e,f,k,l,m,h,q,p,v,D,I,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,[B$,g$,z$,function(){var vb=new $APP.n(null,2,[C$,kk,D$,wi],null);return zl.h?zl.h(vb):zl.call(null,vb)}(), | ||
g$,I,C$,kk,D$,wi],null))}}Da=$APP.z(vi);Aa=null;Oa=0}Sa=0}else break}return wa},Nha=function(a,b){a=Mha(a,b);b=x$.h($APP.Nd(a));return $APP.Rh.j(b,$APP.FH,$APP.Rk.g(a,x$))},Oha=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},K$=function(a,b){$APP.Jf(G$,!1);a.setPrompt([$APP.t.h($APP.u(H$)),"\x3d\x3e "].join(""));a.prompt();return $APP.gk($APP.u(I$))?null:J$.g?J$.g(b,a):J$.call(null,b,a)},L$=function(a){var b=$APP.Bk(a);a=$APP.Ck(a); | ||
var c=$APP.cH($APP.u(I$));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(I$,$APP.Mp.g("\n",$APP.He(a,c)))},Qha=function(a,b,c){var d=function(){var f=$APP.lr;$APP.lr=$APP.u(H$);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.nu(l,new $APP.n(null,3,[$APP.Op,$APP.Rp,$APP.Er,Pha,$APP.cu,!0],null),null)}finally{$APP.lr=f}}(),e=$APP.jf(d);d=$APP.fe.g(e,$APP.mu);e=$APP.fe.g(e,$APP.T);d=$APP.Zj("(async function () {\n%s\n}) ()", | ||
"%s",d);$APP.Jf(H$,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 J$.g?J$.g(c,b):J$.call(null,c,b)}).catch(function(f){esm_import$squint_cljs$core.println(f);return K$(b,c)})},J$=function(a,b){if($APP.r(function(){var e=$APP.u(G$);return $APP.r(e)?e:!$APP.gk($APP.u(I$))}())){$APP.Jf(G$,!0);var c=$APP.hp($APP.u(I$)),d=function(){try{return $APP.jp(c,$APP.$t)}catch(f){var e=f;if(-1!=$APP.bH(e).indexOf("EOF while reading"))return M$; | ||
L$(c);$APP.BH.l($APP.F([$APP.t.h(e)]));return N$}}();if($APP.A.g(N$,d))return K$(b,a);if($APP.A.g(M$,d))return $APP.Jf(G$,!1);L$(c);return $APP.A.g($APP.ip,d)?K$(b,a):Qha(d,b,a)}return null},O$=function(a,b){a.on("line",function(c){$APP.Wi.A(I$,$APP.t,c,"\n");return J$(b,a)})},Rha=function(a){var b=esm_import$readline.createInterface({input:a,output:a});O$(b,a);a.setNoDelay(!0);return a.on("close",function(){return $APP.CH.l($APP.F(["Client closed connection."]))})},P$=function(a,b,c){return $APP.r(c)? | ||
esm_import$path.resolve(c,$APP.qH(a,b)):a},Q$=function(a,b,c){var d=$APP.vH.h(a),e=$APP.fH.h(a);b=P$(b,e,d);c=$APP.hH(c);d=null==c?null:P$(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.uH.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},R$=function(a,b,c,d){if($APP.r(a)){var e=esm_import$path.resolve(c,$APP.qH(b, | ||
d));c=esm_import$path.dirname(e);if($APP.r($APP.Ef(function(f){return f instanceof $APP.H?$APP.ii($APP.ki(["\\.",$APP.ai(f),"$"].join("")),e):"string"===typeof f?$APP.ii($APP.ki(f),e):null},a)))return $APP.r(esm_import$fs.existsSync(c))||($APP.CH.l($APP.F(["[squint] Creating directory:",c])),esm_import$fs.mkdirSync(c,{recursive:!0})),$APP.CH.l($APP.F(["[squint] zCopying resource",b,"to",c])),esm_import$fs.copyFileSync(b,e)}return null},V$=function(a,b){var c=$APP.u($APP.gH),d=$APP.Qk.l($APP.F([c, | ||
a])),e=$APP.fH.h(c),f=S$.h(c),k=$APP.vH.g(c,".");a=$APP.Qd(b)?$APP.lg($APP.aq.l(T$,$APP.F([e]))):b;b=$APP.vH.h(d);if($APP.r(b)&&"string"!==typeof b)throw Error("output-dir must be a string");return $APP.r(U$.h(d))?($APP.CH.l($APP.F(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])),$APP.CH(),$APP.CH.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(l,m){return Promise.resolve(l).then(function(){return $APP.he(new $APP.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(m))?($APP.CH.l($APP.F(["[squint] Compiling CLJS file:",m])),$APP.wH($APP.Rh.l(d,$APP.rH,m,$APP.F([$APP.tr,function(h){return Q$(d,m,h)}])))):R$(f,m,k,e)}).then(function(h){h=$APP.jf(h);h=$APP.fe.g(h,$APP.tH);$APP.r(h)&&$APP.CH.l($APP.F(["[squint] Wrote file:",h]));return h})},null,a)},t$=new $APP.H(null,"kwd-opt","kwd-opt", | ||
1313309243),o$=new $APP.H(null,"hyphens","hyphens",2113533609),w$=new $APP.H(null,"spec","spec",347520401),e$=new $APP.H(null,"coerce","coerce",1917884504),y$=new $APP.H(null,"restrict","restrict",-1071101511),q$=new $APP.H(null,"keywords","keywords",1526959054),N$=new $APP.H("squint.repl.node","continue","squint.repl.node/continue",1558138730),z$=new $APP.H(null,"msg","msg",-1386103444),Sha=new $APP.H(null,"show","show",-576705889),p$=new $APP.H(null,"boolean","boolean",-1919418404),Eha=new $APP.H(null, | ||
"input","input",556931961),W$=new $APP.H(null,"rest-cmds","rest-cmds",-423198324),x$=new $APP.H("org.babashka","cli","org.babashka/cli",1162430315),m$=new $APP.H(null,"args-\x3eopts","args-\x3eopts",964391046),f$=new $APP.H(null,"alias","alias",-2039751630),Jha=new $APP.H(null,"collect","collect",-284321549),g$=new $APP.H(null,"validate","validate",-201300827),s$=new $APP.H(null,"composite-opt","composite-opt",-2021292928),Tha=new $APP.H(null,"run","run",-1821166653),r$=new $APP.H(null,"hyphen-opt", | ||
"hyphen-opt",1836909464),U$=new $APP.H(null,"help","help",-439233446),B$=new $APP.H(null,"cause","cause",231901252),u$=new $APP.H(null,"fst-colon","fst-colon",1618567071),Fha=new $APP.H(null,"coerce-fn","coerce-fn",-821146515),k$=new $APP.H(null,"args","args",1315556576),i$=new $APP.H(null,"no-keyword-opts","no-keyword-opts",761286018),D$=new $APP.H(null,"value","value",305978217),S$=new $APP.H(null,"copy-resources","copy-resources",-1367155536),E$=new $APP.H(null,"pred","pred",1927423397),Kha=new $APP.H(null, | ||
"closed","closed",-919675359),M$=new $APP.H("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),Lha=new $APP.H(null,"error-fn","error-fn",-171437615),C$=new $APP.H(null,"option","option",65132272),h$=new $APP.H(null,"exec-args","exec-args",-1860766354),F$=new $APP.H(null,"ex-msg","ex-msg",-1111774387),Aha=new $APP.H(null,"s","s",1705939918),A$=new $APP.H(null,"cmds-opts","cmds-opts",-390130362),Uha=new $APP.H(null,"h","h",1109658740),j$=new $APP.H(null,"cmds","cmds", | ||
-1841503952);var I$=$APP.Vi.h(""),G$=$APP.Vi.h(!1),H$=$APP.Vi.h($APP.lr),X$,Y$=process.stdout.isTTY;X$=$APP.r(Y$)?process.stdin.setRawMode:Y$;var Pha=$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.lr=$APP.fy;$APP.$q=$APP.kr=!0;var b=function(){var d=$APP.EH.h(a);return $APP.r(d)?d:0}(),c=esm_import$net.createServer(Rha);return c.listen(b,"127.0.0.1",function(){var d=c.address(),e=d.address;return $APP.CH.l($APP.F([["Socket REPL listening on port ",$APP.t.h(d.port)," on host ",$APP.t.h(e)].join("")]))})};Z$.m=1; | ||
var Aha=function(a,b){return $APP.Vd(a)&&$APP.Vd(b)?$APP.Qk.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},V9=function(a,b){return $APP.oe.j(function(c,d){return $APP.dv.l(Aha,$APP.F([c,d]))},a,b)},W9=function(a){throw $APP.cl.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.n(null,1,[Bha,a],null));},X9=function(a){var b=JSON.parse(a);return $APP.ae(b)?b:W9(a)},Cha=function(a){var b=JSON.parse(a);return $APP.TG(b)?b:W9(a)},Dha= | ||
function(a){var b=JSON.parse(a);return $APP.UG(b)?b:W9(a)},Y9=function(a){var b=JSON.parse(a);return"number"===typeof b?b:W9(a)},Z9=function(a){return"string"===typeof a?$APP.B.j(a,0,null):null},$9=function(a){return $APP.A.g(":",Z9(a))?$APP.zi.h($APP.ji.g(a,1)):$APP.zi.h(a)},Eha=function(a){return $APP.Rd(a)?$APP.y(a):a},a$=function(a){if("string"===typeof a)try{var b=Z9(a);if($APP.A.g("true",a)||$APP.A.g("false",a))var c=X9(a);else{if($APP.A.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e= | ||
Y9(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)?$9(a):a}d=e}c=d}return c}catch(l){return a}else return a},b$=function(a,b,c,d){throw $APP.cl.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,[Fha,a,Gha,c],null),d);},Hha=function(a,b,c){var d=function(){switch(b instanceof $APP.H?b.da:null){case "boolean":case "bool":return X9; | ||
case "int":case "long":return Cha;case "double":return Dha;case "number":return Y9;case "symbol":return $APP.Hi;case "keyword":return $9;case "string":return $APP.se;case "edn":return $APP.EH;case "auto":return a$;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=b$(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?b$(a,c,b,null):d},c$=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.Wq.g($APP.Ee, | ||
c):c:null},d$=function(a,b,c,d){return $APP.Qh.g(b,c)?(c=$APP.YG(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},Iha=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Rd(d):d)?Hha(e,d,f):a$(e);return $APP.r(c)?$APP.Tm.A(a,b,c,d):$APP.Rh.j(a,b,d)},Jha=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, | ||
e$),k=$APP.fe.g(e,f$);c=$APP.fe.g(e,$APP.Dm);var l=$APP.fe.g(e,$APP.YE);e=$APP.fe.g(e,g$);b=$APP.r(f)?$APP.Tm.J(b,e$,$APP.Rh,d,f):b;b=$APP.r(k)?$APP.Tm.j(b,f$,function(m){if($APP.he(m,k))throw $APP.cl.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,[f$,k],null));return $APP.Rh.j(m,k,d)}):b;b=$APP.r(l)?$APP.Tm.j(b,$APP.YE,$APP.Wq.g(function(m){return $APP.Ee.g(m,d)},$APP.Vh)):b;b=$APP.r(e)?$APP.Tm.J(b,g$,$APP.Rh,d,e):b;return $APP.r(c)? | ||
$APP.Tm.J(b,h$,$APP.Rh,d,c):b},$APP.hf,a)},l$=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,i$);b=$APP.ZG(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,[j$,a,k$,b],null)},n$=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.Pu.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,[k$,a,m$,b],null)},v$=function(a,b,c,d,e){var f=Z9(a),k="string"===typeof a?$APP.B.j(a,1,null):null,l;if(l=$APP.A.g(f,"-")){try{var m=Y9($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?o$:null;f=$APP.A.g(":",f);c=$APP.Qh.g(o$,b)&&f&&($APP.A.g(p$,d)||$APP.Za(c)||$APP.A.g(e,c));d=$APP.r(b)?b:c?q$:null;a=l?$APP.r(k)?$APP.Qh.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.n(null, | ||
5,[$APP.Yw,d,r$,l,s$,a,t$,c,u$,f],null)},Nha=function(a,b){function c(vb){vb=$APP.Qk.l($APP.F([new $APP.n(null,2,[w$,d,$APP.Xk,x$],null),vb]));return O.h?O.h(vb):O.call(null,vb)}var d=w$.h(b),e=$APP.r(d)?V9(b,$APP.F([Jha(d)])):b,f=e$.h(e),k=function(){var vb=f$.h(e);return $APP.r(vb)?vb:$APP.Hr.h(e)}(),l=Kha.h(e),m=$APP.YE.h(e),h=h$.h(e),q=i$.h(e),p=function(){var vb=y$.h(e);return $APP.r(vb)?vb:Lha.h(e)}(),v=$APP.Zh($APP.R.l($APP.Kh($APP.Vd(d)?d:$APP.Rg.g($APP.hf,d)),$APP.Oh(k),$APP.F([$APP.Kh(f)]))), | ||
D=$APP.A.g(!0,p)?v:null==p?null:$APP.Zh(p),J=g$.h(e),O=function(){var vb=Mha.h(e);return $APP.r(vb)?vb:function(Zb){Zb=$APP.jf(Zb);var Ic=$APP.fe.g(Zb,z$);throw $APP.cl.g(Ic,Zb);}}(),P=l$(a,null),W=$APP.jf(P),ca=$APP.fe.g(W,j$),ha=$APP.fe.g(W,k$),na=function(){var vb=m$.h(e);vb=$APP.r(vb)?vb:A$.h(e);return $APP.r(vb)?n$(ca,vb):new $APP.n(null,2,[m$,null,k$,ha],null)}(),pa=$APP.jf(na),fa=$APP.fe.g(pa,k$),E=$APP.fe.g(pa,m$),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,Zb=null,Ic=null,Me=$APP.r(q)?o$:null,hd=$APP.x(K),Jg=E;;){if($APP.Za(hd))return new $APP.I(null,3,5,$APP.N,[vb,Zb,Ic],null);var ng=$APP.y(hd),Tc=ng instanceof $APP.H;if(Tc){Zb=d$(vb,Zb,Ic,null);var me=ng;hd=$APP.z(hd);vb=Zb;Zb=me}else{var Al=!0===ng,Sf=$APP.t.h(ng);me=c$(l,Zb,$APP.fe.g(f,Zb));var xi=$APP.fe.g(f,Zb),Bl=v$(Sf,Me,Zb,xi,Ic),Lh=$APP.jf(Bl),Cl=$APP.fe.g(Lh,r$),Mh=$APP.fe.g(Lh, | ||
s$),Dl=$APP.fe.g(Lh,t$),Tf=$APP.fe.g(Lh,$APP.Yw),mk=$APP.fe.g(Lh,u$);if($APP.r(function(){var Oe=Cl;return $APP.r(Oe)?Oe:Dl}())){var Yc=$APP.qa(Sf,"--"),nk=Yc&&$APP.A.g("--",Sf);if(nk){var El=$APP.z(hd);return new $APP.I(null,3,5,$APP.N,[function(){var Oe=vb;return El?$APP.jo.A(Oe,$APP.Ru,new $APP.I(null,2,5,$APP.N,[x$,k$],null),$APP.lg(El)):Oe}(),Zb,Ic],null)}var ok=Yc?$APP.ji.g(Sf,2):$APP.Zj(Sf,/^(:|-|)/,""),zf=Yc?$APP.Dr.g(ok,/=/):new $APP.I(null,1,5,$APP.N,[ok],null),Sd=$APP.B.j(zf,0,null),Ce= | ||
$APP.B.j(zf,1,null),Tb=$APP.zi.h(Sd),Ec=$APP.fe.j(k,Tb,Tb);if($APP.r(Ce))Ic=d$(vb,Zb,Ic,me),Zb=Ec,Me=Tf,hd=$APP.He(Ce,$APP.cd(hd)),vb=Ic,Ic=null;else{var Ab=$APP.z(hd),Ne=$APP.y(Ab),pw=v$(Ne,Tf,Zb,xi,Ic);if($APP.r(function(){var Oe=r$.h(pw);return $APP.r(Oe)?Oe:$APP.Qd(Ab)}()))if($APP.r(Mh)){var qw=$APP.ai(Ec);Ic=$APP.Yp.l(function(){return function(Oe){return new $APP.I(null,2,5,$APP.N,[["-",$APP.t.h(Oe)].join(""),!0],null)}}(vb,Zb,Ic,Me,hd,Jg,qw,Ab,Ne,pw,ok,zf,Sd,Ce,Tb,Ec,Yc,nk,Al,Sf,me,xi,Bl,Lh, | ||
Cl,Mh,Dl,Tf,mk,ng,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([qw]));hd=$APP.R.g(Ic,Ab);Me=Tf;Ic=Zb=null}else hd=$APP.he(v,Ec)?null:$APP.OG($APP.t.h(Ec),":no-"),Me=$APP.r(hd)?$APP.zi.h($APP.Zj($APP.t.h(Ec),":no-","")):Ec,hd=$APP.He($APP.Za(hd),Ab),Zb=d$(vb,Zb,Ic,me),me=Me,Me=Tf,vb=Zb,Zb=me;else Zb=d$(vb,Zb,Ic,me),me=Ec,Me=Tf,hd=Ab,vb=Zb,Zb=me}}else if(nk=$APP.A.g(p$,xi)&&$APP.Qh.g(Sf,"true")&&$APP.Qh.g(Sf,"false")||$APP.A.g(Ic,Zb)&&$APP.Za(me))if(Jg=$APP.r(hd)?$APP.r(Jg)?n$(hd, | ||
Jg):new $APP.n(null,1,[k$,hd],null):new $APP.n(null,1,[k$,hd],null),Me=$APP.jf(Jg),Jg=$APP.fe.g(Me,k$),Me=$APP.fe.g(Me,m$),$APP.Qh.g(hd,Jg))me=Me,Me=Tf,hd=Jg,Jg=me;else return new $APP.I(null,3,5,$APP.N,[$APP.jo.A(vb,$APP.Ru,new $APP.I(null,2,5,$APP.N,[x$,k$],null),$APP.lg(hd)),Zb,Ic],null);else{try{var Zd=Iha(vb,Zb,me,Eha(xi),Sf,Al)}catch(Oe){c(new $APP.n(null,4,[B$,e$,z$,$APP.cH(Oe),C$,Zb,D$,Sf],null)),Zd=vb}Ic=$APP.r(function(){var Oe=$APP.A.g(q$,Tf);return Oe?mk:Oe}())?null:Zb;me=$APP.r(function(){var Oe= | ||
$APP.A.g(q$,Tf);return Oe?mk:Oe}())?null:Zb;Me=Tf;hd=$APP.z(hd);vb=Zd;Zb=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=c$(l,ia,$APP.fe.g(f,ia)),ta=function(){var vb=d$(da,ia,ja,sa);return $APP.x(ea)?$APP.jo.A(vb,$APP.Nk,new $APP.I(null,2,5,$APP.N,[x$,k$],null),function(Zb){return $APP.Rg.g($APP.lg(ea),Zb)}):vb}(),wa=$APP.r(h)?$APP.Md($APP.Qk.l($APP.F([h,ta])),$APP.Nd(ta)):ta;if($APP.r(D)){a=$APP.x($APP.Kh(wa));b=null;for(var ya=0,Ca=0;;)if(Ca<ya){var Ha=b.ba(null, | ||
Ca);$APP.he(D,Ha)||c(new $APP.n(null,4,[B$,y$,z$,["Unknown option: ",$APP.t.h(Ha)].join(""),y$,D,C$,Ha],null));Ca+=1}else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ca=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ca):(a=$APP.y(b),$APP.he(D,a)||c(new $APP.n(null,4,[B$,y$,z$,["Unknown option: ",$APP.t.h(a)].join(""),y$,D,C$,a],null)),a=$APP.z(b),b=null,ya=0),Ca=0;else break}if($APP.r(m))for(a=$APP.x(m),b=null,Ca=ya=0;;)if(Ca<ya)Ha=b.ba(null,Ca),$APP.r($APP.YG(wa,Ha))||c(new $APP.n(null,4,[B$,$APP.YE,z$,["Required option: ", | ||
$APP.t.h(Ha)].join(""),$APP.YE,m,C$,Ha],null)),Ca+=1;else if(a=$APP.x(a))b=a,$APP.Yd(b)?(a=$APP.uc(b),Ca=$APP.vc(b),b=a,ya=$APP.xd(a),a=Ca):(a=$APP.y(b),$APP.r($APP.YG(wa,a))||c(new $APP.n(null,4,[B$,$APP.YE,z$,["Required option: ",$APP.t.h(a)].join(""),$APP.YE,m,C$,a],null)),a=$APP.z(b),b=null,ya=0),Ca=0;else break;if($APP.r(J))for(var Da=$APP.x(J),Aa=null,Oa=0,Sa=0;;)if(Sa<Oa){var db=Aa.ba(null,Sa),ub=$APP.B.j(db,0,null),Bb=$APP.B.j(db,1,null),Yb=function(){var vb=(vb=$APP.Vd(Bb))?E$.h(Bb):vb;return $APP.r(vb)? | ||
vb:Bb}(),qc=$APP.YG(wa,ub);if($APP.r(qc)){var $c=qc,Sb=$APP.B.j($c,0,null),nf=$APP.B.j($c,1,null);if(!$APP.r(Yb.h?Yb.h(nf):Yb.call(null,nf))){var ik=function(){var vb=F$.h(Bb);return $APP.r(vb)?vb:function(){return function(Zb){var Ic=$APP.jf(Zb);Zb=$APP.fe.g(Ic,C$);Ic=$APP.fe.g(Ic,D$);return["Invalid value for option ",$APP.t.h(Zb),": ",$APP.t.h(Ic)].join("")}}(Da,Aa,Oa,Sa,vb,$c,Sb,nf,qc,Yb,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,[B$,g$,z$,function(){var vb=new $APP.n(null,2,[C$,ub,D$,nf],null);return ik.h?ik.h(vb):ik.call(null,vb)}(),g$,J,C$,ub,D$,nf],null))}}Sa+=1}else{var xl=$APP.x(Da);if(xl){var vi=xl;if($APP.Yd(vi))ya=$APP.uc(vi),a=$APP.vc(vi),b=ya,ya=$APP.xd(ya),Da=a,Aa=b,Oa=ya;else{var jk=$APP.y(vi),kk=$APP.B.j(jk,0,null),rj=$APP.B.j(jk,1,null),lk=function(){var vb=(vb=$APP.Vd(rj))?E$.h(rj):vb;return $APP.r(vb)?vb:rj}(),yl=$APP.YG(wa,kk);if($APP.r(yl)){var Hc=yl,sj=$APP.B.j(Hc,0,null),wi=$APP.B.j(Hc,1,null);if(!$APP.r(lk.h? | ||
lk.h(wi):lk.call(null,wi))){var zl=function(){var vb=F$.h(rj);return $APP.r(vb)?vb:function(){return function(Zb){var Ic=$APP.jf(Zb);Zb=$APP.fe.g(Ic,C$);Ic=$APP.fe.g(Ic,D$);return["Invalid value for option ",$APP.t.h(Zb),": ",$APP.t.h(Ic)].join("")}}(Da,Aa,Oa,Sa,vb,Hc,sj,wi,yl,lk,jk,kk,rj,vi,xl,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,[B$,g$,z$,function(){var vb=new $APP.n(null,2,[C$,kk,D$,wi],null);return zl.h?zl.h(vb):zl.call(null,vb)}(), | ||
g$,J,C$,kk,D$,wi],null))}}Da=$APP.z(vi);Aa=null;Oa=0}Sa=0}else break}return wa},Oha=function(a,b){a=Nha(a,b);b=x$.h($APP.Nd(a));return $APP.Rh.j(b,$APP.GH,$APP.Rk.g(a,x$))},Pha=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},K$=function(a,b){$APP.Jf(G$,!1);a.setPrompt([$APP.t.h($APP.u(H$)),"\x3d\x3e "].join(""));a.prompt();return $APP.gk($APP.u(I$))?null:J$.g?J$.g(b,a):J$.call(null,b,a)},L$=function(a){var b=$APP.Bk(a);a=$APP.Ck(a); | ||
var c=$APP.dH($APP.u(I$));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(I$,$APP.Jp.g("\n",$APP.He(a,c)))},Rha=function(a,b,c){var d=function(){var f=$APP.lr;$APP.lr=$APP.u(H$);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.ou(l,new $APP.n(null,3,[$APP.Lp,$APP.Op,$APP.Er,Qha,$APP.du,!0],null),null)}finally{$APP.lr=f}}(),e=$APP.jf(d);d=$APP.fe.g(e,$APP.nu);e=$APP.fe.g(e,$APP.T);d=$APP.Zj("(async function () {\n%s\n}) ()", | ||
"%s",d);$APP.Jf(H$,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 J$.g?J$.g(c,b):J$.call(null,c,b)}).catch(function(f){esm_import$squint_cljs$core.println(f);return K$(b,c)})},J$=function(a,b){if($APP.r(function(){var e=$APP.u(G$);return $APP.r(e)?e:!$APP.gk($APP.u(I$))}())){$APP.Jf(G$,!0);var c=$APP.hp($APP.u(I$)),d=function(){try{return $APP.jp(c,$APP.au)}catch(f){var e=f;if(-1!=$APP.cH(e).indexOf("EOF while reading"))return M$; | ||
L$(c);$APP.CH.l($APP.F([$APP.t.h(e)]));return N$}}();if($APP.A.g(N$,d))return K$(b,a);if($APP.A.g(M$,d))return $APP.Jf(G$,!1);L$(c);return $APP.A.g($APP.ip,d)?K$(b,a):Rha(d,b,a)}return null},O$=function(a,b){a.on("line",function(c){$APP.Wi.A(I$,$APP.t,c,"\n");return J$(b,a)})},Sha=function(a){var b=esm_import$readline.createInterface({input:a,output:a});O$(b,a);a.setNoDelay(!0);return a.on("close",function(){return $APP.DH.l($APP.F(["Client closed connection."]))})},P$=function(a,b,c){return $APP.r(c)? | ||
esm_import$path.resolve(c,$APP.rH(a,b)):a},Q$=function(a,b,c){var d=$APP.wH.h(a),e=$APP.gH.h(a);b=P$(b,e,d);c=$APP.iH(c);d=null==c?null:P$(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.vH.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},R$=function(a,b,c,d){if($APP.r(a)){var e=esm_import$path.resolve(c,$APP.rH(b, | ||
d));c=esm_import$path.dirname(e);if($APP.r($APP.Ef(function(f){return f instanceof $APP.H?$APP.ii($APP.ki(["\\.",$APP.ai(f),"$"].join("")),e):"string"===typeof f?$APP.ii($APP.ki(f),e):null},a)))return $APP.r(esm_import$fs.existsSync(c))||($APP.DH.l($APP.F(["[squint] Creating directory:",c])),esm_import$fs.mkdirSync(c,{recursive:!0})),$APP.DH.l($APP.F(["[squint] zCopying resource",b,"to",c])),esm_import$fs.copyFileSync(b,e)}return null},V$=function(a,b){var c=$APP.u($APP.hH),d=$APP.Qk.l($APP.F([c, | ||
a])),e=$APP.gH.h(c),f=S$.h(c),k=$APP.wH.g(c,".");a=$APP.Qd(b)?$APP.lg($APP.Yp.l(T$,$APP.F([e]))):b;b=$APP.wH.h(d);if($APP.r(b)&&"string"!==typeof b)throw Error("output-dir must be a string");return $APP.r(U$.h(d))?($APP.DH.l($APP.F(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])),$APP.DH(),$APP.DH.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(l,m){return Promise.resolve(l).then(function(){return $APP.he(new $APP.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(m))?($APP.DH.l($APP.F(["[squint] Compiling CLJS file:",m])),$APP.xH($APP.Rh.l(d,$APP.sH,m,$APP.F([$APP.tr,function(h){return Q$(d,m,h)}])))):R$(f,m,k,e)}).then(function(h){h=$APP.jf(h);h=$APP.fe.g(h,$APP.uH);$APP.r(h)&&$APP.DH.l($APP.F(["[squint] Wrote file:",h]));return h})},null,a)},t$=new $APP.H(null,"kwd-opt","kwd-opt", | ||
1313309243),o$=new $APP.H(null,"hyphens","hyphens",2113533609),w$=new $APP.H(null,"spec","spec",347520401),e$=new $APP.H(null,"coerce","coerce",1917884504),y$=new $APP.H(null,"restrict","restrict",-1071101511),q$=new $APP.H(null,"keywords","keywords",1526959054),N$=new $APP.H("squint.repl.node","continue","squint.repl.node/continue",1558138730),z$=new $APP.H(null,"msg","msg",-1386103444),Tha=new $APP.H(null,"show","show",-576705889),p$=new $APP.H(null,"boolean","boolean",-1919418404),Fha=new $APP.H(null, | ||
"input","input",556931961),W$=new $APP.H(null,"rest-cmds","rest-cmds",-423198324),x$=new $APP.H("org.babashka","cli","org.babashka/cli",1162430315),m$=new $APP.H(null,"args-\x3eopts","args-\x3eopts",964391046),f$=new $APP.H(null,"alias","alias",-2039751630),Kha=new $APP.H(null,"collect","collect",-284321549),g$=new $APP.H(null,"validate","validate",-201300827),s$=new $APP.H(null,"composite-opt","composite-opt",-2021292928),Uha=new $APP.H(null,"run","run",-1821166653),r$=new $APP.H(null,"hyphen-opt", | ||
"hyphen-opt",1836909464),U$=new $APP.H(null,"help","help",-439233446),B$=new $APP.H(null,"cause","cause",231901252),u$=new $APP.H(null,"fst-colon","fst-colon",1618567071),Gha=new $APP.H(null,"coerce-fn","coerce-fn",-821146515),k$=new $APP.H(null,"args","args",1315556576),i$=new $APP.H(null,"no-keyword-opts","no-keyword-opts",761286018),D$=new $APP.H(null,"value","value",305978217),S$=new $APP.H(null,"copy-resources","copy-resources",-1367155536),E$=new $APP.H(null,"pred","pred",1927423397),Lha=new $APP.H(null, | ||
"closed","closed",-919675359),M$=new $APP.H("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),Mha=new $APP.H(null,"error-fn","error-fn",-171437615),C$=new $APP.H(null,"option","option",65132272),h$=new $APP.H(null,"exec-args","exec-args",-1860766354),F$=new $APP.H(null,"ex-msg","ex-msg",-1111774387),Bha=new $APP.H(null,"s","s",1705939918),A$=new $APP.H(null,"cmds-opts","cmds-opts",-390130362),Vha=new $APP.H(null,"h","h",1109658740),j$=new $APP.H(null,"cmds","cmds", | ||
-1841503952);var I$=$APP.Vi.h(""),G$=$APP.Vi.h(!1),H$=$APP.Vi.h($APP.lr),X$,Y$=process.stdout.isTTY;X$=$APP.r(Y$)?process.stdin.setRawMode:Y$;var Qha=$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.lr=$APP.ey;$APP.$q=$APP.kr=!0;var b=function(){var d=$APP.FH.h(a);return $APP.r(d)?d:0}(),c=esm_import$net.createServer(Sha);return c.listen(b,"127.0.0.1",function(){var d=c.address(),e=d.address;return $APP.DH.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.lr=$APP.fy;$APP.$q=$APP.kr=!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});O$(b,null);b.setPrompt([$APP.t.h($APP.u(H$)),"\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.lg($APP.aq.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.J(null,1,5,$APP.N,[d],null)},$APP.F([c])))},Vha=new $APP.J(null,7,5,$APP.N,[new $APP.n(null,3,[j$,new $APP.J(null,1,5,$APP.N,["run"],null),$APP.yo,function(a){a=$APP.jf(a);a=$APP.fe.g(a,$APP.FH);var b=$APP.u($APP.gH),c=$APP.Qk.l($APP.F([b,a]));a=$APP.jf(c);var d=$APP.fe.g(a,$APP.$k); | ||
a=$APP.fe.g(a,U$);if($APP.r(a))return null;$APP.CH.l($APP.F(["[squint] Running",d]));return $APP.wH($APP.Rh.l(c,$APP.rH,d,$APP.F([$APP.tr,function(e){return Q$(c,d,e)}]))).then(function(e){e=$APP.jf(e);e=$APP.fe.g(e,$APP.tH);e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",$APP.t.h(e)].join("");return shadow_esm_import(e)})},A$,new $APP.J(null,1,5,$APP.N,[$APP.$k],null)],null),new $APP.n(null,2,[j$,new $APP.J(null,1,5,$APP.N,["compile"],null),$APP.yo,function(a){var b=$APP.jf(a); | ||
a=$APP.fe.g(b,W$);b=$APP.fe.g(b,$APP.FH);return V$(b,a)}],null),new $APP.n(null,2,[j$,new $APP.J(null,1,5,$APP.N,["repl"],null),$APP.yo,$$],null),new $APP.n(null,2,[j$,new $APP.J(null,1,5,$APP.N,["socket-repl"],null),$APP.yo,Z$],null),new $APP.n(null,2,[j$,new $APP.J(null,1,5,$APP.N,["nrepl-server"],null),$APP.yo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.FH);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,[j$,new $APP.J(null,1,5,$APP.N,["watch"],null),$APP.yo,function(a){var b=$APP.u($APP.gH),c=$APP.Qk.l($APP.F([b,a])),d=$APP.fH.h(b),e=$APP.vH.g(b,"."),f=S$.h(b);return shadow_esm_import("chokidar").catch(function(k){return console.error(k)}).then(function(k){k=k.watch;$APP.CH.l($APP.F(["[squint] Watching paths:",$APP.Mp.g(", ",d)]));for(var l=$APP.x(d),m=null,h=0,q=0;;)if(q<h){var p=m.ba(null,q);(k.h?k.h(p):k.call(null,p)).on("all",function(I,O,P,W,ca,ha,na,pa,fa,E,C){return function(ea,K){return $APP.r(esm_import$fs.existsSync(K))? | ||
$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$(pa,new $APP.J(null,1,5,$APP.N,[K],null)).catch(function(){return function(M){return console.error(M)}}(I,O,P,W,ca,ha,na,pa,fa,E,C)):R$(C,K,E,fa):null}}(l,m,h,q,p,k,b,c,d,e,f));q+=1}else{var v=$APP.x(l);if(v){var D=v;$APP.Yd(D)?(l=$APP.uc(D),h=$APP.vc(D), | ||
m=l,D=$APP.xd(l),l=h,h=D):(p=$APP.y(D),(k.h?k.h(p):k.call(null,p)).on("all",function(I,O,P,W,ca,ha,na,pa,fa,E,C,ea,K){return function(M,da){return $APP.r(esm_import$fs.existsSync(da))?$APP.r(esm_import$fs.lstatSync(da).isDirectory())?null:$APP.he(new $APP.Uh(null,new $APP.n(null,2,["add",null,"change",null],null),null),M)&&$APP.he(new $APP.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(da))?V$(E,new $APP.J(null,1,5,$APP.N,[da],null)).catch(function(){return function(ia){return console.error(ia)}}(I, | ||
O,P,W,ca,ha,na,pa,fa,E,C,ea,K)):R$(K,da,ea,C):null}}(l,m,h,q,p,D,v,k,b,c,d,e,f)),l=$APP.z(D),m=null,h=0);q=0}else return null}})}],null),new $APP.n(null,2,[j$,$APP.kg,$APP.yo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,W$),c=$APP.fe.g(a,$APP.FH);a=$APP.DE.h(c);if($APP.r(a)){if($APP.r(U$.h(c)))return $APP.CH.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.xt.h(c))?$APP.Zj("(do %s\n)", | ||
"%s",a):a;a=$APP.MG.g(a,$APP.Rh.l(c,$APP.xt,$APP.xt.h(c),$APP.F([$APP.Er,$APP.Vi.h(new $APP.n(null,1,[$APP.to,$APP.fy],null)),$APP.Op,$APP.r($APP.xt.h(c))?$APP.Rp:$APP.Sp,$APP.cu,function(){var f=$APP.xt.h(c);return $APP.r(f)?!1!==$APP.cu.h(c):f}()])));a=$APP.r($APP.xt.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(Sha.h(c))&&$APP.CH.l($APP.F([a]));if(!1===Tha.h(c))return null; | ||
e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return($APP.r($APP.xt.h(c))?Promise.resolve(eval(a)):shadow_esm_import(e)).then(function(f){return $APP.r($APP.xt.h(c))?$APP.BH.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.CH.l($APP.F(["Squint v0.7.100\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.Hr,new $APP.n(null,1,[Uha,U$],null),e$,new $APP.n(null,4,[$APP.cu,p$,$APP.Ir,p$,$APP.vH,$APP.nl,$APP.xt,p$],null)],null),b=l$(process.argv.slice(2),a),c=$APP.jf(b),d=$APP.fe.g(c,j$),e=$APP.fe.g(c,k$);return $APP.oe.j(function(f,k){f=$APP.jf(k);var l=$APP.fe.g(f,j$),m=$APP.fe.g(f,$APP.yo),h=Oha(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.x(h);return null==v?null:$APP.lg(v)}();k=$APP.R.g(k,e);f=Nha(k,V9(a,$APP.F([f])));k=$APP.jf(f);var q=$APP.fe.g(k, | ||
$APP.FH);f=$APP.fe.g(k,k$);k=$APP.fe.g(k,j$);var p=$APP.R.g(k,f);return $APP.ld(function(){var v=$APP.Rh.l(c,k$,p,$APP.F([W$,p,$APP.FH,q,$APP.ap,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,Vha)})(); | ||
$$.h=function(){$APP.lr=$APP.ey;$APP.$q=$APP.kr=!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});O$(b,null);b.setPrompt([$APP.t.h($APP.u(H$)),"\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.lg($APP.Yp.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])))},Wha=new $APP.I(null,7,5,$APP.N,[new $APP.n(null,3,[j$,new $APP.I(null,1,5,$APP.N,["run"],null),$APP.yo,function(a){a=$APP.jf(a);a=$APP.fe.g(a,$APP.GH);var b=$APP.u($APP.hH),c=$APP.Qk.l($APP.F([b,a]));a=$APP.jf(c);var d=$APP.fe.g(a,$APP.$k); | ||
a=$APP.fe.g(a,U$);if($APP.r(a))return null;$APP.DH.l($APP.F(["[squint] Running",d]));return $APP.xH($APP.Rh.l(c,$APP.sH,d,$APP.F([$APP.tr,function(e){return Q$(c,d,e)}]))).then(function(e){e=$APP.jf(e);e=$APP.fe.g(e,$APP.uH);e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",$APP.t.h(e)].join("");return shadow_esm_import(e)})},A$,new $APP.I(null,1,5,$APP.N,[$APP.$k],null)],null),new $APP.n(null,2,[j$,new $APP.I(null,1,5,$APP.N,["compile"],null),$APP.yo,function(a){var b=$APP.jf(a); | ||
a=$APP.fe.g(b,W$);b=$APP.fe.g(b,$APP.GH);return V$(b,a)}],null),new $APP.n(null,2,[j$,new $APP.I(null,1,5,$APP.N,["repl"],null),$APP.yo,$$],null),new $APP.n(null,2,[j$,new $APP.I(null,1,5,$APP.N,["socket-repl"],null),$APP.yo,Z$],null),new $APP.n(null,2,[j$,new $APP.I(null,1,5,$APP.N,["nrepl-server"],null),$APP.yo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.GH);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,[j$,new $APP.I(null,1,5,$APP.N,["watch"],null),$APP.yo,function(a){var b=$APP.u($APP.hH),c=$APP.Qk.l($APP.F([b,a])),d=$APP.gH.h(b),e=$APP.wH.g(b,"."),f=S$.h(b);return shadow_esm_import("chokidar").catch(function(k){return console.error(k)}).then(function(k){k=k.watch;$APP.DH.l($APP.F(["[squint] Watching paths:",$APP.Jp.g(", ",d)]));for(var l=$APP.x(d),m=null,h=0,q=0;;)if(q<h){var p=m.ba(null,q);(k.h?k.h(p):k.call(null,p)).on("all",function(J,O,P,W,ca,ha,na,pa,fa,E,C){return function(ea,K){return $APP.r(esm_import$fs.existsSync(K))? | ||
$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$(pa,new $APP.I(null,1,5,$APP.N,[K],null)).catch(function(){return function(M){return console.error(M)}}(J,O,P,W,ca,ha,na,pa,fa,E,C)):R$(C,K,E,fa):null}}(l,m,h,q,p,k,b,c,d,e,f));q+=1}else{var v=$APP.x(l);if(v){var D=v;$APP.Yd(D)?(l=$APP.uc(D),h=$APP.vc(D), | ||
m=l,D=$APP.xd(l),l=h,h=D):(p=$APP.y(D),(k.h?k.h(p):k.call(null,p)).on("all",function(J,O,P,W,ca,ha,na,pa,fa,E,C,ea,K){return function(M,da){return $APP.r(esm_import$fs.existsSync(da))?$APP.r(esm_import$fs.lstatSync(da).isDirectory())?null:$APP.he(new $APP.Uh(null,new $APP.n(null,2,["add",null,"change",null],null),null),M)&&$APP.he(new $APP.Uh(null,new $APP.n(null,2,[".cljc",null,".cljs",null],null),null),esm_import$path.extname(da))?V$(E,new $APP.I(null,1,5,$APP.N,[da],null)).catch(function(){return function(ia){return console.error(ia)}}(J, | ||
O,P,W,ca,ha,na,pa,fa,E,C,ea,K)):R$(K,da,ea,C):null}}(l,m,h,q,p,D,v,k,b,c,d,e,f)),l=$APP.z(D),m=null,h=0);q=0}else return null}})}],null),new $APP.n(null,2,[j$,$APP.kg,$APP.yo,function(a){a=$APP.jf(a);var b=$APP.fe.g(a,W$),c=$APP.fe.g(a,$APP.GH);a=$APP.GE.h(c);if($APP.r(a)){if($APP.r(U$.h(c)))return $APP.DH.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.yt.h(c))?$APP.Zj("(do %s\n)", | ||
"%s",a):a;a=$APP.NG.g(a,$APP.Rh.l(c,$APP.yt,$APP.yt.h(c),$APP.F([$APP.Er,$APP.Vi.h(new $APP.n(null,1,[$APP.to,$APP.ey],null)),$APP.Lp,$APP.r($APP.yt.h(c))?$APP.Op:$APP.Pp,$APP.du,function(){var f=$APP.yt.h(c);return $APP.r(f)?!1!==$APP.du.h(c):f}()])));a=$APP.r($APP.yt.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(Tha.h(c))&&$APP.DH.l($APP.F([a]));if(!1===Uha.h(c))return null; | ||
e=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return($APP.r($APP.yt.h(c))?Promise.resolve(eval(a)):shadow_esm_import(e)).then(function(f){return $APP.r($APP.yt.h(c))?$APP.CH.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.DH.l($APP.F(["Squint v0.7.101\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.Hr,new $APP.n(null,1,[Vha,U$],null),e$,new $APP.n(null,4,[$APP.du,p$,$APP.Ir,p$,$APP.wH,$APP.nl,$APP.yt,p$],null)],null),b=l$(process.argv.slice(2),a),c=$APP.jf(b),d=$APP.fe.g(c,j$),e=$APP.fe.g(c,k$);return $APP.oe.j(function(f,k){f=$APP.jf(k);var l=$APP.fe.g(f,j$),m=$APP.fe.g(f,$APP.yo),h=Pha(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.x(h);return null==v?null:$APP.lg(v)}();k=$APP.R.g(k,e);f=Oha(k,V9(a,$APP.F([f])));k=$APP.jf(f);var q=$APP.fe.g(k, | ||
$APP.GH);f=$APP.fe.g(k,k$);k=$APP.fe.g(k,j$);var p=$APP.R.g(k,f);return $APP.ld(function(){var v=$APP.Rh.l(c,k$,p,$APP.F([W$,p,$APP.GH,q,$APP.ap,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,Wha)})(); |
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 OG,PG,QG,dH,eH,oH,pH,xH,yH,iH,nH,sH;$APP.NG=function(a,b){return $APP.qa(a,b)};OG=function(a,b){a.sort(b||$APP.Ba)};PG=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.Ba;OG(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};QG=function(){}; | ||
$APP.RG=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.SG=function(a){return $APP.ee(a)||!1};$APP.TG=function(a){return"number"===typeof a};$APP.UG=function(){this.C=[]};$APP.VG=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.WG=function(a){$APP.pi("\n");return $APP.fe.g(a,$APP.Ga),null}; | ||
$APP.XG=function(a,b){return(null!=a?$APP.Oc===a.Hc||(a.wd?0:$APP.cb(QG,a)):$APP.cb(QG,a))?$APP.Db(a,b):null!=a&&$APP.RG(a)&&$APP.he(a,b)?new $APP.Ig(b,$APP.fe.g(a,b),null):null};$APP.YG=function(a,b){return new $APP.J(null,2,5,$APP.N,[$APP.Yr.g(a,b),$APP.Zr.g(a,b)],null)};$APP.ZG=function(a,b){this.f=a;this.value=b;this.D=2147516416;this.M=1};$APP.$G=function(a){return Math.floor(Math.random()*a)}; | ||
$APP.aH=function(){function a(){return $APP.$G(16).toString(16)}var b=(8|3&$APP.$G(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.bH=function(a){return a instanceof Error?a.message:null};$APP.cH=function(a){return $APP.Dr.g(a,/\n|\r\n/)};dH=function(a,b){return $APP.r($APP.r(b)?$APP.Qh.g(b,""):b)?$APP.Em(a,$APP.Kk(b)):null};eH=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.J(null,2,5,$APP.N,["cljc","cljs"],null))}; | ||
$APP.hH=function(a){var b=$APP.Zj($APP.Zj($APP.t.h(a),"-","_"),".","/");return $APP.Ef(function(c){return eH(c,b)},$APP.fH.g($APP.u($APP.gH),new $APP.J(null,2,5,$APP.N,[".","src"],null)))}; | ||
oH=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,$APP.Er);a=$APP.jp($APP.hp(a),$APP.$t);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(iH,$APP.y(l))?new $APP.J(null,2,5,$APP.N,[$APP.cd(l),k],null):null},$APP.jH.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.kH.h($APP.u($APP.lH)); | ||
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.zr),v=$APP.fe.g(h,$APP.Ar);return Promise.resolve(function(){var D=function(){var O=new $APP.G(null,$APP.aF,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.J(null,1,5,$APP.N,[$APP.mH],null)):O}();k.h?k.h(D):k.call(null,D);var I=function(){var O=$APP.S.h($APP.x($APP.R.g(new $APP.G(null, | ||
nH,null,1,null),new $APP.G(null,$APP.S.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.Kh(I);I=$APP.Oh(I);I=$APP.ui.g($APP.od,I);return $APP.bi(D,I)}()).then(function(D){return $APP.Wi.g(c,function(I){I=$APP.Qu(I,new $APP.J(null,2,5,$APP.N,[$APP.wt,q],null),D);I=$APP.r(v)?$APP.Qu(I,new $APP.J(null,3,5,$APP.N,[d,$APP.Hr,v],null),q):I;return $APP.r(p)?$APP.Qu(I,new $APP.J(null,2,5,$APP.N,[d,$APP.Fr], | ||
null),$APP.bi(p,$APP.Gr.h(q))):I})})})},Promise.resolve(null),e)}):null}return null};pH=function(a,b){return Promise.resolve(oH(a,b)).then(function(){return $APP.nu(a,b,null)})}; | ||
$APP.qH=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.wH=function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.rH),c=$APP.fe.g(a,sH),d=$APP.fe.g(a,$APP.tH),e=$APP.fe.g(a,$APP.uH),f=$APP.fe.j(a,$APP.vH,"");c=$APP.r(c)?c:esm_import$fs.readFileSync(b,"utf-8");return pH(c,$APP.Rh.j(a,$APP.Er,$APP.Vi.h(new $APP.n(null,1,[$APP.to,$APP.fy],null)))).then(function(k){k=$APP.jf(k);var l=$APP.fe.g(k,$APP.mu),m=$APP.fe.g(k,$APP.wq),h=$APP.fH.g($APP.u($APP.gH),new $APP.J(null,2,5,$APP.N,[".","src"],null)),q=esm_import$path,p=q.resolve;$APP.r(d)?h=d:(h=$APP.qH(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.vH,f,$APP.tH,q],null));esm_import$fs.writeFileSync(q,l,"utf-8");return $APP.Rh.j(k,$APP.tH,q)})}; | ||
xH=function(a){return $APP.ou.l(a,$APP.F([$APP.pu,!0]))};yH=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.Pu.g(xH,d);d=$APP.Gf.g(a,d);return d instanceof Promise?d.then($APP.jv):$APP.jv(d)}b.m=0;b.o=function(d){d=$APP.x(d);return c(d)};b.l=c;return b}()};$APP.UG.prototype.add=function(a){return this.C.push(a)}; | ||
$APP.UG.prototype.size=function(){return this.C.length};$APP.UG.prototype.clear=function(){return this.C=[]};$APP.UG.prototype.fd=function(){return 0===this.C.length};$APP.zH=function zH(a){switch(arguments.length){case 1:return zH.h(arguments[0]);case 2:return zH.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.zH.h=function(a){return $APP.zH.g($APP.ie,a)}; | ||
$APP.zH.g=function(a,b){if($APP.x(b)){var c=$APP.Ze.h?$APP.Ze.h(b):$APP.Ze.call(null,b);PG(c,$APP.VG(a));return $APP.Md($APP.x(c),$APP.Nd(b))}return $APP.bd};$APP.zH.m=2;$APP.AH=function AH(a){switch(arguments.length){case 2:return AH.g(arguments[0],arguments[1]);case 3:return AH.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.AH.g=function(a,b){return $APP.AH.j(a,$APP.ie,b)}; | ||
$APP.AH.j=function(a,b,c){return $APP.zH.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.VG(b);return f.g?f.g(d,e):f.call(null,d,e)},c)};$APP.AH.m=3;$APP.BH=function BH(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return BH.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.BH.l=function(a){$APP.Gi(a,$APP.Ra());return $APP.r($APP.Ta)?$APP.WG($APP.Ra()):null};$APP.BH.m=0;$APP.BH.o=function(a){return this.l($APP.x(a))}; | ||
$APP.CH=function CH(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return CH.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.CH.l=function(a){$APP.Gi(a,$APP.Rh.j($APP.Ra(),$APP.Ia,!1));return $APP.r($APP.Ta)?$APP.WG($APP.Ra()):null};$APP.CH.m=0;$APP.CH.o=function(a){return this.l($APP.x(a))}; | ||
$APP.jH=function jH(a){switch(arguments.length){case 1:return jH.h(arguments[0]);case 2:return jH.g(arguments[0],arguments[1]);case 3:return jH.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.jH.h=function(a){return function(b){var c=new $APP.UG;return function(){function d(l,m){c.add(m);return a===c.size()?(m=$APP.lg(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.lg(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.jH.g=function(a,b){return $APP.jH.j(a,a,b)};$APP.jH.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.jH.j(a,b,$APP.Nf.g(b,d))):null},null,null)};$APP.jH.m=3;$APP.ZG.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.ZG.prototype.$c=function(){return $APP.Za(this.f)}; | ||
$APP.ZG.prototype.R=function(a,b,c){$APP.ic(b,"#object[cljs.core.Delay ");$APP.ti(new $APP.n(null,2,[$APP.rD,null==this.f?$APP.yw:$APP.cB,$APP.hv,this.value],null),b,c);return $APP.ic(b,"]")};$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 dH(new $APP.n(null,3,[$APP.Cm,$APP.u($APP.OF),$APP.Dm,$APP.u($APP.NF),$APP.il,null],null),a)};$APP.DH.g=function(a,b){return dH($APP.Tm.j($APP.Qk.l($APP.F([new $APP.n(null,1,[$APP.Dm,$APP.u($APP.NF)],null),a])),$APP.Cm,function(c){return $APP.Qk.l($APP.F([$APP.u($APP.OF),c]))}),b)};$APP.DH.m=2;$APP.EH=new $APP.H(null,"port","port",1534937262);$APP.mH=new $APP.H(null,"reload","reload",863702807);$APP.FH=new $APP.H(null,"opts","opts",155075701); | ||
$APP.vH=new $APP.H(null,"output-dir","output-dir",-290956991);iH=new $APP.H(null,"require-macros","require-macros",707947416);$APP.GH=new $APP.H(null,"message","message",-406056002);$APP.rH=new $APP.H(null,"in-file","in-file",-1682176692);$APP.HH=new $APP.H(null,"id","id",-1388402092);nH=new $APP.w("cljs.core","ns-publics","cljs.core/ns-publics",488240955,null);$APP.fH=new $APP.H(null,"paths","paths",-1807389588);$APP.IH=new $APP.H(null,"eval","eval",-1103567905); | ||
$APP.kH=new $APP.H(null,"eval-form","eval-form",-1934118476);$APP.tH=new $APP.H(null,"out-file","out-file",-1187066405);sH=new $APP.H(null,"in-str","in-str",-1014658121);$APP.uH=new $APP.H(null,"extension","extension",1453374065);$APP.gH=new $APP.ZG(function(){if($APP.r(esm_import$fs.existsSync("squint.edn"))){var a=esm_import$fs.readFileSync("squint.edn","utf-8");a=$APP.DH.h(a)}else a=null;return a},null);var JH;$APP.lH=$APP.Vi.h(null);JH=yH(pH);export const compileFile=yH($APP.wH);export const compileString=JH; | ||
import*as esm_import$fs from"fs";import*as esm_import$path from"path";var PG,QG,RG,eH,fH,pH,qH,yH,zH,jH,oH,tH;$APP.OG=function(a,b){return $APP.qa(a,b)};PG=function(a,b){a.sort(b||$APP.Ba)};QG=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.Ba;PG(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};RG=function(){}; | ||
$APP.SG=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.TG=function(a){return $APP.ee(a)||!1};$APP.UG=function(a){return"number"===typeof a};$APP.VG=function(){this.C=[]};$APP.WG=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.XG=function(a){$APP.pi("\n");return $APP.fe.g(a,$APP.Ga),null}; | ||
$APP.YG=function(a,b){return(null!=a?$APP.Oc===a.Hc||(a.wd?0:$APP.cb(RG,a)):$APP.cb(RG,a))?$APP.Db(a,b):null!=a&&$APP.SG(a)&&$APP.he(a,b)?new $APP.Ig(b,$APP.fe.g(a,b),null):null};$APP.ZG=function(a,b){return new $APP.I(null,2,5,$APP.N,[$APP.Zr.g(a,b),$APP.$r.g(a,b)],null)};$APP.$G=function(a,b){this.f=a;this.value=b;this.D=2147516416;this.M=1};$APP.aH=function(a){return Math.floor(Math.random()*a)}; | ||
$APP.bH=function(){function a(){return $APP.aH(16).toString(16)}var b=(8|3&$APP.aH(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.cH=function(a){return a instanceof Error?a.message:null};$APP.dH=function(a){return $APP.Dr.g(a,/\n|\r\n/)};eH=function(a,b){return $APP.r($APP.r(b)?$APP.Qh.g(b,""):b)?$APP.Em(a,$APP.Kk(b)):null};fH=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.iH=function(a){var b=$APP.Zj($APP.Zj($APP.t.h(a),"-","_"),".","/");return $APP.Ef(function(c){return fH(c,b)},$APP.gH.g($APP.u($APP.hH),new $APP.I(null,2,5,$APP.N,[".","src"],null)))}; | ||
pH=function(a,b){b=$APP.jf(b);var c=$APP.fe.g(b,$APP.Er);a=$APP.jp($APP.hp(a),$APP.au);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(jH,$APP.y(l))?new $APP.I(null,2,5,$APP.N,[$APP.cd(l),k],null):null},$APP.kH.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.lH.h($APP.u($APP.mH)); | ||
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.zr),v=$APP.fe.g(h,$APP.Ar);return Promise.resolve(function(){var D=function(){var O=new $APP.G(null,$APP.dF,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.nH],null)):O}();k.h?k.h(D):k.call(null,D);var J=function(){var O=$APP.S.h($APP.x($APP.R.g(new $APP.G(null, | ||
oH,null,1,null),new $APP.G(null,$APP.S.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.Kh(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.Ru(J,new $APP.I(null,2,5,$APP.N,[$APP.xt,q],null),D);J=$APP.r(v)?$APP.Ru(J,new $APP.I(null,3,5,$APP.N,[d,$APP.Hr,v],null),q):J;return $APP.r(p)?$APP.Ru(J,new $APP.I(null,2,5,$APP.N,[d,$APP.Fr], | ||
null),$APP.bi(p,$APP.Gr.h(q))):J})})})},Promise.resolve(null),e)}):null}return null};qH=function(a,b){return Promise.resolve(pH(a,b)).then(function(){return $APP.ou(a,b,null)})}; | ||
$APP.rH=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.xH=function(a){a=$APP.jf(a);var b=$APP.fe.g(a,$APP.sH),c=$APP.fe.g(a,tH),d=$APP.fe.g(a,$APP.uH),e=$APP.fe.g(a,$APP.vH),f=$APP.fe.j(a,$APP.wH,"");c=$APP.r(c)?c:esm_import$fs.readFileSync(b,"utf-8");return qH(c,$APP.Rh.j(a,$APP.Er,$APP.Vi.h(new $APP.n(null,1,[$APP.to,$APP.ey],null)))).then(function(k){k=$APP.jf(k);var l=$APP.fe.g(k,$APP.nu),m=$APP.fe.g(k,$APP.wq),h=$APP.gH.g($APP.u($APP.hH),new $APP.I(null,2,5,$APP.N,[".","src"],null)),q=esm_import$path,p=q.resolve;$APP.r(d)?h=d:(h=$APP.rH(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.wH,f,$APP.uH,q],null));esm_import$fs.writeFileSync(q,l,"utf-8");return $APP.Rh.j(k,$APP.uH,q)})}; | ||
yH=function(a){return $APP.pu.l(a,$APP.F([$APP.qu,!0]))};zH=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.Qu.g(yH,d);d=$APP.Gf.g(a,d);return d instanceof Promise?d.then($APP.kv):$APP.kv(d)}b.m=0;b.o=function(d){d=$APP.x(d);return c(d)};b.l=c;return b}()};$APP.VG.prototype.add=function(a){return this.C.push(a)}; | ||
$APP.VG.prototype.size=function(){return this.C.length};$APP.VG.prototype.clear=function(){return this.C=[]};$APP.VG.prototype.fd=function(){return 0===this.C.length};$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 $APP.AH.g($APP.ie,a)}; | ||
$APP.AH.g=function(a,b){if($APP.x(b)){var c=$APP.Ze.h?$APP.Ze.h(b):$APP.Ze.call(null,b);QG(c,$APP.WG(a));return $APP.Md($APP.x(c),$APP.Nd(b))}return $APP.bd};$APP.AH.m=2;$APP.BH=function BH(a){switch(arguments.length){case 2:return BH.g(arguments[0],arguments[1]);case 3:return BH.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.BH.g=function(a,b){return $APP.BH.j(a,$APP.ie,b)}; | ||
$APP.BH.j=function(a,b,c){return $APP.AH.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.WG(b);return f.g?f.g(d,e):f.call(null,d,e)},c)};$APP.BH.m=3;$APP.CH=function CH(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return CH.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.CH.l=function(a){$APP.Gi(a,$APP.Ra());return $APP.r($APP.Ta)?$APP.XG($APP.Ra()):null};$APP.CH.m=0;$APP.CH.o=function(a){return this.l($APP.x(a))}; | ||
$APP.DH=function DH(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return DH.l(0<c.length?new $APP.Xc(c.slice(0),0,null):null)};$APP.DH.l=function(a){$APP.Gi(a,$APP.Rh.j($APP.Ra(),$APP.Ia,!1));return $APP.r($APP.Ta)?$APP.XG($APP.Ra()):null};$APP.DH.m=0;$APP.DH.o=function(a){return this.l($APP.x(a))}; | ||
$APP.kH=function kH(a){switch(arguments.length){case 1:return kH.h(arguments[0]);case 2:return kH.g(arguments[0],arguments[1]);case 3:return kH.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.kH.h=function(a){return function(b){var c=new $APP.VG;return function(){function d(l,m){c.add(m);return a===c.size()?(m=$APP.lg(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.lg(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.kH.g=function(a,b){return $APP.kH.j(a,a,b)};$APP.kH.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.kH.j(a,b,$APP.Nf.g(b,d))):null},null,null)};$APP.kH.m=3;$APP.$G.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.$G.prototype.$c=function(){return $APP.Za(this.f)}; | ||
$APP.$G.prototype.R=function(a,b,c){$APP.ic(b,"#object[cljs.core.Delay ");$APP.ti(new $APP.n(null,2,[$APP.wD,null==this.f?$APP.Aw:$APP.jB,$APP.iv,this.value],null),b,c);return $APP.ic(b,"]")};$APP.EH=function EH(a){switch(arguments.length){case 1:return EH.h(arguments[0]);case 2:return EH.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}}; | ||
$APP.EH.h=function(a){return eH(new $APP.n(null,3,[$APP.Cm,$APP.u($APP.PF),$APP.Dm,$APP.u($APP.OF),$APP.il,null],null),a)};$APP.EH.g=function(a,b){return eH($APP.Tm.j($APP.Qk.l($APP.F([new $APP.n(null,1,[$APP.Dm,$APP.u($APP.OF)],null),a])),$APP.Cm,function(c){return $APP.Qk.l($APP.F([$APP.u($APP.PF),c]))}),b)};$APP.EH.m=2;$APP.FH=new $APP.H(null,"port","port",1534937262);$APP.nH=new $APP.H(null,"reload","reload",863702807);$APP.GH=new $APP.H(null,"opts","opts",155075701); | ||
$APP.wH=new $APP.H(null,"output-dir","output-dir",-290956991);jH=new $APP.H(null,"require-macros","require-macros",707947416);$APP.HH=new $APP.H(null,"message","message",-406056002);$APP.sH=new $APP.H(null,"in-file","in-file",-1682176692);$APP.IH=new $APP.H(null,"id","id",-1388402092);oH=new $APP.w("cljs.core","ns-publics","cljs.core/ns-publics",488240955,null);$APP.gH=new $APP.H(null,"paths","paths",-1807389588);$APP.JH=new $APP.H(null,"eval","eval",-1103567905); | ||
$APP.lH=new $APP.H(null,"eval-form","eval-form",-1934118476);$APP.uH=new $APP.H(null,"out-file","out-file",-1187066405);tH=new $APP.H(null,"in-str","in-str",-1014658121);$APP.vH=new $APP.H(null,"extension","extension",1453374065);$APP.hH=new $APP.$G(function(){if($APP.r(esm_import$fs.existsSync("squint.edn"))){var a=esm_import$fs.readFileSync("squint.edn","utf-8");a=$APP.EH.h(a)}else a=null;return a},null);var KH;$APP.mH=$APP.Vi.h(null);KH=zH(qH);export const compileFile=zH($APP.xH);export const compileString=KH; |
@@ -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 I9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},J9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},K9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},L9=function(a){return console.debug($APP.Mp.g(" ",a))},Yga=function(a){return function(b,c){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.HH),e=$APP.fe.g(b,Xga);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)}},$ga=function(){var a= | ||
Zga;return function(b,c){b=$APP.Tm.j(b,M9,$APP.zi);return a.g?a.g(b,c):a.call(null,b,c)}},bha=function(){var a=aha();return function(b,c){L9($APP.F(["request",b]));return a.g?a.g(b,c):a.call(null,b,c)}},cha=function(a){return function(b,c){L9($APP.F(["response",c]));return a.g?a.g(b,c):a.call(null,b,c)}},aha=function(){var a=$ga();return function(b,c){return a.g?a.g(b,c):a.call(null,b,c)}},N9=function(a){return $APP.Rh.j($APP.bi(new $APP.J(null,3,5,$APP.N,["major","minor","incremental"],null),$APP.ou.h(a.split("."))), | ||
"version-string",a)},dha=function(a,b,c){if($APP.r(a))if(a=O9.h?O9.h(a):O9.call(null,a),$APP.r(a)){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.q9),e=$APP.fe.g(b,$APP.i9),f=$APP.fe.g(b,$APP.s9);b=$APP.Qa;var k=$APP.li,l=$APP.R6;$APP.Qa=e;$APP.li=f;$APP.R6=d;try{var m=new $APP.Fa;d=$APP.Ta;e=$APP.Ua;$APP.Ta=!0;$APP.Ua=function(h){return m.append(h)};try{a.h?a.h(c):a.call(null,c)}finally{$APP.Ua=e,$APP.Ta=d}return $APP.t.h(m)}finally{$APP.R6=l,$APP.li=k,$APP.Qa=b}}else return L9($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]))},fha=function(a){a:{var b=$APP.lr;$APP.lr=$APP.u(P9);try{var c=$APP.nu(a,new $APP.n(null,5,[$APP.Op,$APP.Rp,$APP.Er,eha,$APP.cu,!0,$APP.xt,!0,$APP.Up,!0],null),null);break a}finally{$APP.lr=b}c=void 0}c=$APP.jf(c);a=$APP.fe.g(c,$APP.mu);c=$APP.fe.g(c,$APP.T);a=$APP.Zj("(async function () {\n%s\n}) ()","%s",a);$APP.Jf(P9,c);return a},lha=function(a,b){var c=$APP.jf(a);$APP.fe.g(c,$APP.T);a=$APP.fe.g(c,gha);$APP.fe.g(c,$APP.$k);$APP.fe.g(c,hha); | ||
$APP.fe.g(c,iha);return Promise.resolve(a).then(fha).then(function(d){$APP.CH.l($APP.F(["About to eval:"]));$APP.CH.l($APP.F([d]));return eval(d)}).then(function(d){d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(P9)),"value",dha(jha.h(c),kha.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.GH.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.lr)],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(P9)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(c,d):b.call(null,c,d)})},Q9=function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.T);return null},Zga=function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,M9),d=$APP.fe.g(R9,c);if($APP.r(d))return d.g?d.g(a,b):d.call(null,a,b);console.warn($APP.Mp.g(" ",$APP.F(["Unhandled operation",c]))); | ||
c=new $APP.n(null,1,["status",new $APP.J(null,3,5,$APP.N,["error","unknown-op","done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},mha=function(a){return function(b,c){return a.write(S9(c))}},nha=function(a,b){L9($APP.F(["Connection accepted"]));b.setNoDelay(!0);var c=bha(),d=Yga(cha(mha(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.pu,!0]),k=$APP.kg;;){var m=$APP.Gf.j(T9, | ||
l,f);l=$APP.B.j(m,0,null);m=$APP.B.j(m,1,null);if(null==l){k=new $APP.J(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.gk(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)?L9($APP.F(["Connection lost"])): | ||
L9($APP.F(["Connection closed"]))})},iha=new $APP.H(null,"_line","_line",232847719),kha=new $APP.H("nrepl.middleware.print","options","nrepl.middleware.print/options",868480159),Xga=new $APP.H(null,"session","session",1008279103),oha=new $APP.H(null,"lookup","lookup",1225356838),pha=new $APP.H(null,"load-file","load-file",-424586670),hha=new $APP.H(null,"_load-file?","_load-file?",-1198848711),M9=new $APP.H(null,"op","op",-1882987955),qha=new $APP.H(null,"describe","describe",1369790582),gha=new $APP.H(null, | ||
"code","code",1586293142),rha=new $APP.H(null,"eldoc","eldoc",-1321421900),sha=new $APP.H(null,"log_level","log_level",-1756736313),jha=new $APP.H("nrepl.middleware.print","print","nrepl.middleware.print/print",-1616742548),tha=new $APP.H(null,"clone","clone",711747572),uha=new $APP.H(null,"close","close",1835149582),vha=new $APP.H(null,"info","info",-317069002),wha=new $APP.H(null,"host","host",-1558485167),xha=new $APP.H(null,"complete","complete",-500388775);var U9=function U9(a,b){switch($APP.t.h(K9(a,1))){case "i":return a=J9(a,1),b=I9(a,"e"),new $APP.J(null,2,5,$APP.N,[parseInt(K9(a,b)),J9(a,b+1)],null);case "l":var d=a=J9(a,1);for(a=$APP.mc($APP.kg);;){if($APP.A.g($APP.t.h(K9(d,1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.oc(a),J9(d,1)],null);var e=U9.g?U9.g(d,b):U9.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=J9(a,1),f=$APP.jf(b),f=$APP.fe.g(f,$APP.pu),d=a,e=$APP.mc($APP.hf);;){if($APP.A.g($APP.t.h(K9(d, | ||
1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.oc(e),J9(d,1)],null);a=U9.g?U9.g(d,b):U9.call(null,d,b);d=$APP.B.j(a,0,null);k=$APP.B.j(a,1,null);k=U9.g?U9.g(k,b):U9.call(null,k,b);a=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);d=$APP.r(f)?$APP.zi.h(d):d;a=$APP.Ug.j(e,d,a);d=k;e=a}default:return b=I9(a,":"),f=parseInt(K9(a,b)),a=J9(a,b+1),new $APP.J(null,2,5,$APP.N,[$APP.t.h(K9(a,f)),J9(a,f)],null)}},T9=function T9(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return T9.l(arguments[0], | ||
1<c.length?new $APP.Xc(c.slice(1),0,null):null)};T9.l=function(a,b){try{return U9(a,b)}catch(c){if(c instanceof Error)return new $APP.J(null,2,5,$APP.N,[null,a],null);throw c;}};T9.m=1;T9.o=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)}; | ||
var I9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},J9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},K9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},L9=function(a){return console.debug($APP.Jp.g(" ",a))},Zga=function(a){return function(b,c){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.IH),e=$APP.fe.g(b,Yga);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)}},aha=function(){var a= | ||
$ga;return function(b,c){b=$APP.Tm.j(b,M9,$APP.zi);return a.g?a.g(b,c):a.call(null,b,c)}},cha=function(){var a=bha();return function(b,c){L9($APP.F(["request",b]));return a.g?a.g(b,c):a.call(null,b,c)}},dha=function(a){return function(b,c){L9($APP.F(["response",c]));return a.g?a.g(b,c):a.call(null,b,c)}},bha=function(){var a=aha();return function(b,c){return a.g?a.g(b,c):a.call(null,b,c)}},N9=function(a){return $APP.Rh.j($APP.bi(new $APP.I(null,3,5,$APP.N,["major","minor","incremental"],null),$APP.pu.h(a.split("."))), | ||
"version-string",a)},eha=function(a,b,c){if($APP.r(a))if(a=O9.h?O9.h(a):O9.call(null,a),$APP.r(a)){b=$APP.jf(b);var d=$APP.fe.g(b,$APP.q9),e=$APP.fe.g(b,$APP.i9),f=$APP.fe.g(b,$APP.s9);b=$APP.Qa;var k=$APP.li,l=$APP.R6;$APP.Qa=e;$APP.li=f;$APP.R6=d;try{var m=new $APP.Fa;d=$APP.Ta;e=$APP.Ua;$APP.Ta=!0;$APP.Ua=function(h){return m.append(h)};try{a.h?a.h(c):a.call(null,c)}finally{$APP.Ua=e,$APP.Ta=d}return $APP.t.h(m)}finally{$APP.R6=l,$APP.li=k,$APP.Qa=b}}else return L9($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]))},gha=function(a){a:{var b=$APP.lr;$APP.lr=$APP.u(P9);try{var c=$APP.ou(a,new $APP.n(null,5,[$APP.Lp,$APP.Op,$APP.Er,fha,$APP.du,!0,$APP.yt,!0,$APP.Rp,!0],null),null);break a}finally{$APP.lr=b}c=void 0}c=$APP.jf(c);a=$APP.fe.g(c,$APP.nu);c=$APP.fe.g(c,$APP.T);a=$APP.Zj("(async function () {\n%s\n}) ()","%s",a);$APP.Jf(P9,c);return a},mha=function(a,b){var c=$APP.jf(a);$APP.fe.g(c,$APP.T);a=$APP.fe.g(c,hha);$APP.fe.g(c,$APP.$k);$APP.fe.g(c,iha); | ||
$APP.fe.g(c,jha);return Promise.resolve(a).then(gha).then(function(d){$APP.DH.l($APP.F(["About to eval:"]));$APP.DH.l($APP.F([d]));return eval(d)}).then(function(d){d=new $APP.n(null,2,["ns",$APP.t.h($APP.u(P9)),"value",eha(kha.h(c),lha.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.HH.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.lr)],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(P9)),"status",new $APP.I(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(c,d):b.call(null,c,d)})},Q9=function(a){a=$APP.jf(a);$APP.fe.g(a,$APP.T);return null},$ga=function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,M9),d=$APP.fe.g(R9,c);if($APP.r(d))return d.g?d.g(a,b):d.call(null,a,b);console.warn($APP.Jp.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)},nha=function(a){return function(b,c){return a.write(S9(c))}},oha=function(a,b){L9($APP.F(["Connection accepted"]));b.setNoDelay(!0);var c=cha(),d=Zga(dha(nha(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.qu,!0]),k=$APP.kg;;){var m=$APP.Gf.j(T9, | ||
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.gk(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)?L9($APP.F(["Connection lost"])): | ||
L9($APP.F(["Connection closed"]))})},jha=new $APP.H(null,"_line","_line",232847719),lha=new $APP.H("nrepl.middleware.print","options","nrepl.middleware.print/options",868480159),Yga=new $APP.H(null,"session","session",1008279103),pha=new $APP.H(null,"lookup","lookup",1225356838),qha=new $APP.H(null,"load-file","load-file",-424586670),iha=new $APP.H(null,"_load-file?","_load-file?",-1198848711),M9=new $APP.H(null,"op","op",-1882987955),rha=new $APP.H(null,"describe","describe",1369790582),hha=new $APP.H(null, | ||
"code","code",1586293142),sha=new $APP.H(null,"eldoc","eldoc",-1321421900),tha=new $APP.H(null,"log_level","log_level",-1756736313),kha=new $APP.H("nrepl.middleware.print","print","nrepl.middleware.print/print",-1616742548),uha=new $APP.H(null,"clone","clone",711747572),vha=new $APP.H(null,"close","close",1835149582),wha=new $APP.H(null,"info","info",-317069002),xha=new $APP.H(null,"host","host",-1558485167),yha=new $APP.H(null,"complete","complete",-500388775);var U9=function U9(a,b){switch($APP.t.h(K9(a,1))){case "i":return a=J9(a,1),b=I9(a,"e"),new $APP.I(null,2,5,$APP.N,[parseInt(K9(a,b)),J9(a,b+1)],null);case "l":var d=a=J9(a,1);for(a=$APP.mc($APP.kg);;){if($APP.A.g($APP.t.h(K9(d,1)),"e"))return new $APP.I(null,2,5,$APP.N,[$APP.oc(a),J9(d,1)],null);var e=U9.g?U9.g(d,b):U9.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=J9(a,1),f=$APP.jf(b),f=$APP.fe.g(f,$APP.qu),d=a,e=$APP.mc($APP.hf);;){if($APP.A.g($APP.t.h(K9(d, | ||
1)),"e"))return new $APP.I(null,2,5,$APP.N,[$APP.oc(e),J9(d,1)],null);a=U9.g?U9.g(d,b):U9.call(null,d,b);d=$APP.B.j(a,0,null);k=$APP.B.j(a,1,null);k=U9.g?U9.g(k,b):U9.call(null,k,b);a=$APP.B.j(k,0,null);k=$APP.B.j(k,1,null);d=$APP.r(f)?$APP.zi.h(d):d;a=$APP.Ug.j(e,d,a);d=k;e=a}default:return b=I9(a,":"),f=parseInt(K9(a,b)),a=J9(a,b+1),new $APP.I(null,2,5,$APP.N,[$APP.t.h(K9(a,f)),J9(a,f)],null)}},T9=function T9(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return T9.l(arguments[0], | ||
1<c.length?new $APP.Xc(c.slice(1),0,null):null)};T9.l=function(a,b){try{return U9(a,b)}catch(c){if(c instanceof Error)return new $APP.I(null,2,5,$APP.N,[null,a],null);throw c;}};T9.m=1;T9.o=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)}; | ||
var S9=function S9(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.Le(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(S9,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(S9.h?S9.h(d):S9.call(null,d)),$APP.t.h(S9.h?S9.h(c):S9.call(null,c))].join("")}}(a),$APP.AH.g($APP.y,a)))),"e"].join(""):null}};var P9=$APP.Vi.h($APP.lr),O9=new $APP.n(null,1,["cider.nrepl.pprint/pprint",$APP.z9],null);$APP.Vi.h(!1); | ||
var eha=$APP.Vi.h($APP.hf),R9=$APP.vh([oha,uha,pha,rha,tha,qha,vha,xha,$APP.IH],[Q9,function(a,b){var c=new $APP.n(null,1,["status",new $APP.J(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.$k);return null},Q9,function(a,b){var c=new $APP.n(null,2,["new-session",$APP.t.h($APP.aH()),"status",new $APP.J(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",N9("TODO"),"node",N9(process.version)],null),"aux",$APP.hf,"ops",$APP.bi($APP.ui.g($APP.ai,$APP.Kh(R9)),$APP.Gr.h($APP.hf)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},Q9,function(){return null},function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,$APP.T);$APP.BH.l($APP.F([$APP.T,c]));return lha($APP.Rh.j(a,$APP.T,$APP.u(P9)),b)}]),yha=$APP.Vi.h(null);export const startServer=function(a){return Promise.resolve(null).then(function(){var b=function(){var e=$APP.EH.h(a);return $APP.r(e)?e:0}(),c=function(){var e=wha.h(a);return $APP.r(e)?e:"127.0.0.1"}();(function(){var e=$APP.$a(a)?a.bg:sha.h(a);return $APP.r(e)?e:"info"})();var d=esm_import$net.createServer($APP.Tk.g(nha,$APP.hf));d.listen(b,c,function(){var e=d.address(),f=e.port;e=e.address;$APP.CH.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.Mp.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Jf(yha,d)})}; | ||
0,null);c=$APP.B.j(c,1,null);return[$APP.t.h(S9.h?S9.h(d):S9.call(null,d)),$APP.t.h(S9.h?S9.h(c):S9.call(null,c))].join("")}}(a),$APP.BH.g($APP.y,a)))),"e"].join(""):null}};var P9=$APP.Vi.h($APP.lr),O9=new $APP.n(null,1,["cider.nrepl.pprint/pprint",$APP.z9],null);$APP.Vi.h(!1); | ||
var fha=$APP.Vi.h($APP.hf),R9=$APP.vh([pha,vha,qha,sha,uha,rha,wha,yha,$APP.JH],[Q9,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.$k);return null},Q9,function(a,b){var c=new $APP.n(null,2,["new-session",$APP.t.h($APP.bH()),"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",N9("TODO"),"node",N9(process.version)],null),"aux",$APP.hf,"ops",$APP.bi($APP.ui.g($APP.ai,$APP.Kh(R9)),$APP.Gr.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)},Q9,function(){return null},function(a,b){a=$APP.jf(a);var c=$APP.fe.g(a,$APP.T);$APP.CH.l($APP.F([$APP.T,c]));return mha($APP.Rh.j(a,$APP.T,$APP.u(P9)),b)}]),zha=$APP.Vi.h(null);export const startServer=function(a){return Promise.resolve(null).then(function(){var b=function(){var e=$APP.FH.h(a);return $APP.r(e)?e:0}(),c=function(){var e=xha.h(a);return $APP.r(e)?e:"127.0.0.1"}();(function(){var e=$APP.$a(a)?a.bg:tha.h(a);return $APP.r(e)?e:"info"})();var d=esm_import$net.createServer($APP.Tk.g(oha,$APP.hf));d.listen(b,c,function(){var e=d.address(),f=e.port;e=e.address;$APP.DH.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.Jp.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Jf(zha,d)})}; |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "0.7.100", | ||
"version": "0.7.101", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "core.js", |
@@ -421,2 +421,3 @@ ## Squint | ||
- [SolidJS](https://squint-cljs.github.io/squint/?repl=true&jsx.import-source=https%3A%2F%2Fesm.sh%2Fsolid-js%401.8.10%2Fh&src=KHJlcXVpcmUgJ1siaHR0cHM6Ly9lc20uc2gvc29saWQtanNAMS44LjEwIiA6YXMgc29saWRdKQoocmVxdWlyZSAnWyJodHRwczovL2VzbS5zaC9zb2xpZC1qc0AxLjguMTAvd2ViIiA6YXMgc29saWQtd2ViXSkKCihkZWZuIENoaWxkQ29tcG9uZW50IFt7OmtleXMgW2NvdW50XX1dCiAgI2pzeCBbOmRpdiAiQ291bnQgdmFsdWUgaXMgIiBjb3VudF0pCgooZGVmbiBDb3VudGluZ0NvbXBvbmVudCBbXQogIChsZXQgW1tjb3VudCBzZXRDb3VudF0gKHNvbGlkL2NyZWF0ZVNpZ25hbCAxMCkKICAgICAgICBpbnRlcnZhbCAoanMvc2V0SW50ZXJ2YWwgIyhzZXRDb3VudCBpbmMpCiAgICAgICAgICAgICAgICAgICAxMDAwKV0KICAgIChzb2xpZC9vbkNsZWFudXAgIyhqcy9jbGVhckludGVydmFsIGludGVydmFsKSkKICAgICNqc3ggW0NoaWxkQ29tcG9uZW50IHs6Y291bnQKICAgICAgICAgICAgICAgICAgICAgICAgICA7OyByZWFjdGl2ZSB2YWx1ZSBtdXN0IGJlIHdyYXBwZWQgaW4gdGh1bmsKICAgICAgICAgICAgICAgICAgICAgICAgICA7OyB3aGVuIHVzaW5nIGpzeC1ydW50aW1lIGluc3RlYWQgb2Ygc29saWQtanMgY29tcGlsZXIKICAgICAgICAgICAgICAgICAgICAgICAgICAoZm4gW10gY291bnQpfV0pKQoKKGRlZiBlbHQgKG9yCiAgICAgICAgICAgKGpzL2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IgIiNhcHAiKQogICAgICAgICAgIChkb3RvIChqcy9kb2N1bWVudC5jcmVhdGVFbGVtZW50ICJkaXYiKQogICAgICAgICAgICAgKHNldCEgLWlkICJhcHAiKQogICAgICAgICAgICAgKGpzL2RvY3VtZW50LmJvZHkucHJlcGVuZCkpKSkKCihkZWZvbmNlIGRpc3Bvc2UgKGF0b20gKGZuIFtdKSkpCihkbwogIChAZGlzcG9zZSkKICAocmVzZXQhIGRpc3Bvc2UKICAgIChzb2xpZC13ZWIvcmVuZGVyIChmbiBbXSAjanN4IFtDb3VudGluZ0NvbXBvbmVudF0pIGVsdCkpKQ%3D%3D) | ||
- [Web components](https://squint-cljs.github.io/squint/?src=KG5zIG15ZWxlbWVudAogICg6cmVxdWlyZSBbc3F1aW50LmNvcmUgOnJlZmVyIFtkZWZjbGFzc11dKSkKCihkZWZjbGFzcyBNeUVsZW1lbnQKICAoZXh0ZW5kcyBqcy9IVE1MRWxlbWVudCkKCiAgKGZpZWxkIC1zaGFkb3cpCiAgKGZpZWxkIGNvdW50IDApCgogIChjb25zdHJ1Y3RvciBbdGhpc10KICAgIChzdXBlcikKICAgIChzZXQhIC1zaGFkb3cgKC5hdHRhY2hTaGFkb3cgdGhpcyB7Om1vZGUgOm9wZW59KSkpCgogIE9iamVjdAogIChoYW5kbGVDbGljayBbdGhpcyBlXQogICAgKHNldCEgY291bnQgKGluYyBjb3VudCkpCiAgICAoLnJlbmRlciB0aGlzKSkKCiAgKGNvbm5lY3RlZENhbGxiYWNrIFt0aGlzXQogICAgKC5hZGRFdmVudExpc3RlbmVyIHRoaXMgImNsaWNrIiB0aGlzLmhhbmRsZUNsaWNrKQogICAgKC5yZW5kZXIgdGhpcykpCgogIChkaXNjb25uZWN0ZWRDYWxsYmFjayBbdGhpc10KICAgICgucmVtb3ZlRXZlbnRMaXN0ZW5lciB0aGlzICJjbGljayIgdGhpcy5oYW5kbGVDbGljaykpCgogIChyZW5kZXIgW3RoaXNdCiAgICAoc2V0ISAoLi1pbm5lckhUTUwgLXNoYWRvdykKICAgICAgI2h0bWwgWzpidXR0b24gIkNsaWNrIGNvdW50ICIgY291bnRdKSkpCgooLmRlZmluZSBjdXN0b21FbGVtZW50cyA6bXktZWxlbWVudCBNeUVsZW1lbnQpCgooZGVmIGFwcCAob3IgKGpzL2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IgIiNhcHAiKQogICAgICAgICAgIChkb3RvIChqcy9kb2N1bWVudC5jcmVhdGVFbGVtZW50IDpkaXYpCiAgICAgICAgICAgICAoc2V0ISAtaWQgOmFwcCkKICAgICAgICAgICAgIChqcy9kb2N1bWVudC5ib2R5LnByZXBlbmQpKSkpCgooc2V0ISAoLi1pbm5lckhUTUwgYXBwKSAjaHRtbCBbOm15LWVsZW1lbnRdKQ%3D%3D&repl=true) | ||
@@ -423,0 +424,0 @@ License |
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
1382201
427
8275