squint-cljs
Advanced tools
Comparing version 0.1.18 to 0.1.19
@@ -5,37 +5,37 @@ import { $APP, shadow$provide, $jscomp } from "./compiler.js"; | ||
import*as esm_import$fs from"fs";import*as esm_import$readline from"readline";import*as esm_import$squint_cljs$core from"squint-cljs/core.js";import*as esm_import$process from"process";import*as esm_import$url from"url";import*as esm_import$path from"path"; | ||
var A8=function(a,b){return $APP.Zd(a)&&$APP.Zd(b)?$APP.Ik.j($APP.B([a,b])):$APP.Td(a)&&($APP.Yd(a)||$APP.Ud(a))&&$APP.Td(b)&&($APP.Yd(b)||$APP.Ud(b))?$APP.Qg.g(a,b):b},B8=function(a,b){return $APP.qe.l(function(c,d){return $APP.UL.j(A8,$APP.B([c,d]))},a,b)},D8=function(a){throw $APP.Wk.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.q(null,1,[C8,a],null));},E8=function(a){var b=JSON.parse(a);return $APP.de(b)?b:D8(a)},F8=function(a){var b=JSON.parse(a);return $APP.rD(b)?b:D8(a)},G8=function(a){var b= | ||
JSON.parse(a);return $APP.tD(b)?b:D8(a)},H8=function(a){var b=JSON.parse(a);return"number"===typeof b?b:D8(a)},I8=function(a){return"string"===typeof a?$APP.A.l(a,0,null):null},J8=function(a){return $APP.yd.g(":",I8(a))?$APP.ui.h($APP.ii.g(a,1)):$APP.ui.h(a)},K8=function(a){return $APP.Td(a)?$APP.x(a):a},L8=function(a){if("string"===typeof a)try{var b=I8(a);if($APP.yd.g("true",a)||$APP.yd.g("false",a))var c=E8(a);else{if($APP.yd.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e=H8(a);else{var f= | ||
$APP.yd.g(":",b);var k=f?$APP.gi(/:[a-zA-Z][a-zA-Z0-9_\/\.-]*/,a):f;e=$APP.r(k)?J8(a):a}d=e}c=d}return c}catch(l){return a}else return a},O8=function(a,b,c,d){throw $APP.Wk.l(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.As.j($APP.B([a]))].join(""),c instanceof $APP.F?" to ":" with ",$APP.t.h(c instanceof $APP.F?$APP.Yh(c):c)].join(""),new $APP.q(null,2,[M8,a,N8,c],null),d);},P8=function(a,b,c){var d=function(){switch(b instanceof $APP.F?b.wa:null){case "boolean":case "bool":return E8; | ||
case "int":case "long":return F8;case "double":return G8;case "number":return H8;case "symbol":return $APP.Di;case "keyword":return J8;case "string":return $APP.ve;case "edn":return $APP.yM;case "auto":return L8;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=O8(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?O8(a,c,b,null):d},Q8=function(a,b,c){a=$APP.ie.g(a,b);c=$APP.r(a)?a:$APP.Td(c)?$APP.Id(c):null;return $APP.r(c)?$APP.Td(c)?$APP.Mp.g($APP.Ge, | ||
c):c:null},R8=function(a,b,c,d){return $APP.yo.g(b,c)?(c=$APP.nE(a,b),$APP.r(c)?($APP.A.l(c,0,null),c=$APP.A.l(c,1,null),$APP.yi.l(a,b,$APP.r(d)?d.g?d.g(c,!0):d.call(null,c,!0):!0)):$APP.yi.l(a,b,$APP.r(d)?d.g?d.g(null,!0):d.call(null,null,!0):!0)):a},S8=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Td(d):d)?P8(e,d,f):L8(e);return $APP.r(c)?$APP.Dm.B(a,b,c,d):$APP.yi.l(a,b,d)},X8=function(a){return $APP.qe.l(function(b,c){var d=$APP.A.l(c,0,null);c=$APP.A.l(c,1,null);var e=$APP.nf(c),f=$APP.ie.g(e, | ||
T8),k=$APP.ie.g(e,U8);c=$APP.ie.g(e,$APP.nm);var l=$APP.ie.g(e,$APP.uB);e=$APP.ie.g(e,V8);b=$APP.r(f)?$APP.Dm.G(b,T8,$APP.yi,d,f):b;b=$APP.r(k)?$APP.Dm.l(b,U8,function(m){if($APP.ke(m,k))throw $APP.Wk.g(["Conflicting alias ",$APP.t.h(k)," between ",$APP.t.h($APP.ie.g(m,k))," and ",$APP.t.h(d)].join(""),new $APP.q(null,1,[U8,k],null));return $APP.yi.l(m,k,d)}):b;b=$APP.r(l)?$APP.Dm.l(b,$APP.uB,$APP.Mp.g(function(m){return $APP.Ge.g(m,d)},$APP.Sh)):b;b=$APP.r(e)?$APP.Dm.G(b,V8,$APP.yi,d,e):b;return $APP.r(c)? | ||
$APP.Dm.G(b,W8,$APP.yi,d,c):b},$APP.mf,a)},a9=function(a,b){b=$APP.nf(b);var c=$APP.ie.g(b,Y8);b=$APP.oE(function(d){var e=$APP.r(c)?null:$APP.sa(d,":");return!($APP.r(e)?e:$APP.sa(d,"-"))},a);a=$APP.A.l(b,0,null);b=$APP.A.l(b,1,null);return new $APP.q(null,2,[Z8,a,$8,b],null)},c9=function(a,b){if($APP.r(b))if($APP.w(a)){var c=$APP.xd(a),d=$APP.cf(c,b);c=c<d?c:d;a=new $APP.H(null,2,5,$APP.I,[$APP.N.g($APP.pq.g(b,a),$APP.Aq.g(c,a)),$APP.Aq.g(c,b)],null)}else a=new $APP.H(null,2,5,$APP.I,[a,b],null); | ||
else a=new $APP.H(null,2,5,$APP.I,[a,b],null);b=a;a=$APP.A.l(b,0,null);b=$APP.A.l(b,1,null);return new $APP.q(null,2,[$8,a,b9,b],null)},l9=function(a,b,c,d,e){var f=I8(a),k="string"===typeof a?$APP.A.l(a,1,null):null,l;if(l=$APP.yd.g(f,"-")){try{var m=H8($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?d9:null;f=$APP.yd.g(":",f);c=$APP.yo.g(d9,b)&&f&&($APP.yd.g(e9,d)||$APP.Za(c)||$APP.yd.g(e,c));d=$APP.r(b)?b:c?f9:null;a=l?$APP.r(k)?$APP.yo.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.q(null, | ||
5,[g9,d,h9,l,i9,a,j9,c,k9,f],null)},z9=function(a,b){function c(ib){ib=$APP.Ik.j($APP.B([new $APP.q(null,2,[m9,d,$APP.Qk,n9],null),ib]));return O.h?O.h(ib):O.call(null,ib)}var d=m9.h(b),e=$APP.r(d)?B8(b,$APP.B([X8(d)])):b,f=T8.h(e),k=function(){var ib=U8.h(e);return $APP.r(ib)?ib:$APP.GH.h(e)}(),l=o9.h(e),m=$APP.uB.h(e),h=W8.h(e),p=Y8.h(e),n=function(){var ib=p9.h(e);return $APP.r(ib)?ib:q9.h(e)}(),v=$APP.Wh($APP.N.j($APP.Nh($APP.Zd(d)?d:$APP.Qg.g($APP.mf,d)),$APP.Ph(k),$APP.B([$APP.Nh(f)]))),C=$APP.yd.g(!0, | ||
n)?v:null==n?null:$APP.Wh(n),G=V8.h(e),O=function(){var ib=r9.h(e);return $APP.r(ib)?ib:function(Jb){Jb=$APP.nf(Jb);var oc=$APP.ie.g(Jb,s9);throw $APP.Wk.g(oc,Jb);}}(),P=a9(a,null),V=$APP.nf(P),aa=$APP.ie.g(V,Z8),da=$APP.ie.g(V,$8),ja=function(){var ib=b9.h(e);ib=$APP.r(ib)?ib:t9.h(e);return $APP.r(ib)?c9(aa,ib):new $APP.q(null,2,[b9,null,$8,da],null)}(),oa=$APP.nf(ja),ca=$APP.ie.g(oa,$8),E=$APP.ie.g(oa,b9),z=$APP.yo.g(ca,da)?new $APP.H(null,2,5,$APP.I,[null,$APP.N.g(ca,da)],null):new $APP.H(null, | ||
2,5,$APP.I,[aa,da],null),ba=$APP.A.l(z,0,null),J=$APP.A.l(z,1,null),K=function(){for(var ib=$APP.mf,Jb=null,oc=null,Vd=$APP.r(p)?d9:null,Ic=$APP.w(J),zf=E;;){if($APP.Za(Ic))return new $APP.H(null,3,5,$APP.I,[ib,Jb,oc],null);var hf=$APP.x(Ic),tc=hf instanceof $APP.F;if(tc){Jb=R8(ib,Jb,oc,null);var zd=hf;Ic=$APP.y(Ic);ib=Jb;Jb=zd}else{var Nj=!0===hf,Se=$APP.t.h(hf);zd=Q8(l,Jb,$APP.ie.g(f,Jb));var dh=$APP.ie.g(f,Jb),Oj=l9(Se,Vd,Jb,dh,oc),tg=$APP.nf(Oj),Pj=$APP.ie.g(tg,h9),ug=$APP.ie.g(tg,i9),Qj=$APP.ie.g(tg, | ||
j9),Te=$APP.ie.g(tg,g9),Li=$APP.ie.g(tg,k9);if($APP.r(function(){var Xd=Pj;return $APP.r(Xd)?Xd:Qj}())){var wc=$APP.sa(Se,"--"),Mi=wc&&$APP.yd.g("--",Se);if(Mi){var Rj=$APP.y(Ic);return new $APP.H(null,3,5,$APP.I,[function(){var Xd=ib;return Rj?$APP.Tn.B(Xd,$APP.St,new $APP.H(null,2,5,$APP.I,[n9,$8],null),$APP.lg(Rj)):Xd}(),Jb,oc],null)}var Ni=wc?$APP.ii.g(Se,2):$APP.bk(Se,/^(:|-|)/,""),He=wc?$APP.mq.g(Ni,/=/):new $APP.H(null,1,5,$APP.I,[Ni],null),jd=$APP.A.l(He,0,null),Nd=$APP.A.l(He,1,null),Eb= | ||
$APP.ui.h(jd),mc=$APP.ie.l(k,Eb,Eb);if($APP.r(Nd))oc=R8(ib,Jb,oc,zd),Jb=mc,Vd=Te,Ic=$APP.Le(Nd,$APP.bd(Ic)),ib=oc,oc=null;else{var lb=$APP.y(Ic),Wd=$APP.x(lb),bt=l9(Wd,Te,Jb,dh,oc);if($APP.r(function(){var Xd=h9.h(bt);return $APP.r(Xd)?Xd:$APP.Sd(lb)}()))if($APP.r(ug)){var ct=$APP.Yh(mc);oc=$APP.xr.j(function(){return function(Xd){return new $APP.H(null,2,5,$APP.I,[["-",$APP.t.h(Xd)].join(""),!0],null)}}(ib,Jb,oc,Vd,Ic,zf,ct,lb,Wd,bt,Ni,He,jd,Nd,Eb,mc,wc,Mi,Nj,Se,zd,dh,Oj,tg,Pj,ug,Qj,Te,Li,hf,tc, | ||
d,e,f,k,l,m,h,p,n,v,C,G,O,c,P,V,aa,da,ja,oa,ca,E,z,ba,J),$APP.B([ct]));Ic=$APP.N.g(oc,lb);Vd=Te;oc=Jb=null}else Ic=$APP.ke(v,mc)?null:$APP.VC($APP.t.h(mc),":no-"),Vd=$APP.r(Ic)?$APP.ui.h($APP.bk($APP.t.h(mc),":no-","")):mc,Ic=$APP.Le($APP.Za(Ic),lb),Jb=R8(ib,Jb,oc,zd),zd=Vd,Vd=Te,ib=Jb,Jb=zd;else Jb=R8(ib,Jb,oc,zd),zd=mc,Vd=Te,Ic=lb,ib=Jb,Jb=zd}}else if(Mi=$APP.yd.g(e9,dh)&&$APP.yo.g(Se,"true")&&$APP.yo.g(Se,"false")||$APP.yd.g(oc,Jb)&&$APP.Za(zd))if(zf=$APP.r(Ic)?$APP.r(zf)?c9(Ic,zf):new $APP.q(null, | ||
1,[$8,Ic],null):new $APP.q(null,1,[$8,Ic],null),Vd=$APP.nf(zf),zf=$APP.ie.g(Vd,$8),Vd=$APP.ie.g(Vd,b9),$APP.yo.g(Ic,zf))zd=Vd,Vd=Te,Ic=zf,zf=zd;else return new $APP.H(null,3,5,$APP.I,[$APP.Tn.B(ib,$APP.St,new $APP.H(null,2,5,$APP.I,[n9,$8],null),$APP.lg(Ic)),Jb,oc],null);else{try{var pd=S8(ib,Jb,zd,K8(dh),Se,Nj)}catch(Xd){c(new $APP.q(null,4,[u9,T8,s9,$APP.LE(Xd),v9,Jb,w9,Se],null)),pd=ib}oc=$APP.r(function(){var Xd=$APP.yd.g(f9,Te);return Xd?Li:Xd}())?null:Jb;zd=$APP.r(function(){var Xd=$APP.yd.g(f9, | ||
Te);return Xd?Li:Xd}())?null:Jb;Vd=Te;Ic=$APP.y(Ic);ib=pd;Jb=oc;oc=zd}}}}(),ea=$APP.A.l(K,0,null),ia=$APP.A.l(K,1,null),ha=$APP.A.l(K,2,null),qa=Q8(l,ia,$APP.ie.g(f,ia)),ra=function(){var ib=R8(ea,ia,ha,qa);return $APP.w(ba)?$APP.Tn.B(ib,$APP.Fk,new $APP.H(null,2,5,$APP.I,[n9,$8],null),function(Jb){return $APP.Qg.g($APP.lg(ba),Jb)}):ib}(),ua=$APP.r(h)?$APP.Od($APP.Ik.j($APP.B([h,ra])),$APP.Pd(ra)):ra;if($APP.r(C)){a=$APP.w($APP.Nh(ua));b=null;for(var va=0,xa=0;;)if(xa<va){var Da=b.V(null,xa);$APP.ke(C, | ||
Da)||c(new $APP.q(null,4,[u9,p9,s9,["Unknown option: ",$APP.t.h(Da)].join(""),p9,C,v9,Da],null));xa+=1}else if(a=$APP.w(a))b=a,$APP.be(b)?(a=$APP.xc(b),xa=$APP.yc(b),b=a,va=$APP.xd(a),a=xa):(a=$APP.x(b),$APP.ke(C,a)||c(new $APP.q(null,4,[u9,p9,s9,["Unknown option: ",$APP.t.h(a)].join(""),p9,C,v9,a],null)),a=$APP.y(b),b=null,va=0),xa=0;else break}if($APP.r(m))for(a=$APP.w(m),b=null,xa=va=0;;)if(xa<va)Da=b.V(null,xa),$APP.r($APP.nE(ua,Da))||c(new $APP.q(null,4,[u9,$APP.uB,s9,["Required option: ",$APP.t.h(Da)].join(""), | ||
$APP.uB,m,v9,Da],null)),xa+=1;else if(a=$APP.w(a))b=a,$APP.be(b)?(a=$APP.xc(b),xa=$APP.yc(b),b=a,va=$APP.xd(a),a=xa):(a=$APP.x(b),$APP.r($APP.nE(ua,a))||c(new $APP.q(null,4,[u9,$APP.uB,s9,["Required option: ",$APP.t.h(a)].join(""),$APP.uB,m,v9,a],null)),a=$APP.y(b),b=null,va=0),xa=0;else break;if($APP.r(G))for(var ya=$APP.w(G),wa=null,La=0,Qa=0;;)if(Qa<La){var Xa=wa.V(null,Qa),gb=$APP.A.l(Xa,0,null),mb=$APP.A.l(Xa,1,null),Ib=function(){var ib=(ib=$APP.Zd(mb))?x9.h(mb):ib;return $APP.r(ib)?ib:mb}(), | ||
Wb=$APP.nE(ua,gb);if($APP.r(Wb)){var zc=Wb,Db=$APP.A.l(zc,0,null),te=$APP.A.l(zc,1,null);if(!$APP.r(Ib.h?Ib.h(te):Ib.call(null,te))){var Hi=function(){var ib=y9.h(mb);return $APP.r(ib)?ib:function(){return function(Jb){var oc=$APP.nf(Jb);Jb=$APP.ie.g(oc,v9);oc=$APP.ie.g(oc,w9);return["Invalid value for option ",$APP.t.h(Jb),": ",$APP.t.h(oc)].join("")}}(ya,wa,La,Qa,ib,zc,Db,te,Wb,Ib,Xa,gb,mb,d,e,f,k,l,m,h,p,n,v,C,G,O,c,P,V,aa,da,ja,oa,ca,E,z,ba,J,K,ea,ia,ha,qa,ra,ua)}();c(new $APP.q(null,5,[u9,V8, | ||
s9,function(){var ib=new $APP.q(null,2,[v9,gb,w9,te],null);return Hi.h?Hi.h(ib):Hi.call(null,ib)}(),V8,G,v9,gb,w9,te],null))}}Qa+=1}else{var Kj=$APP.w(ya);if(Kj){var bh=Kj;if($APP.be(bh))va=$APP.xc(bh),a=$APP.yc(bh),b=va,va=$APP.xd(va),ya=a,wa=b,La=va;else{var Ii=$APP.x(bh),Ji=$APP.A.l(Ii,0,null),ai=$APP.A.l(Ii,1,null),Ki=function(){var ib=(ib=$APP.Zd(ai))?x9.h(ai):ib;return $APP.r(ib)?ib:ai}(),Lj=$APP.nE(ua,Ji);if($APP.r(Lj)){var nc=Lj,bi=$APP.A.l(nc,0,null),ch=$APP.A.l(nc,1,null);if(!$APP.r(Ki.h? | ||
Ki.h(ch):Ki.call(null,ch))){var Mj=function(){var ib=y9.h(ai);return $APP.r(ib)?ib:function(){return function(Jb){var oc=$APP.nf(Jb);Jb=$APP.ie.g(oc,v9);oc=$APP.ie.g(oc,w9);return["Invalid value for option ",$APP.t.h(Jb),": ",$APP.t.h(oc)].join("")}}(ya,wa,La,Qa,ib,nc,bi,ch,Lj,Ki,Ii,Ji,ai,bh,Kj,d,e,f,k,l,m,h,p,n,v,C,G,O,c,P,V,aa,da,ja,oa,ca,E,z,ba,J,K,ea,ia,ha,qa,ra,ua)}();c(new $APP.q(null,5,[u9,V8,s9,function(){var ib=new $APP.q(null,2,[v9,Ji,w9,ch],null);return Mj.h?Mj.h(ib):Mj.call(null,ib)}(), | ||
V8,G,v9,Ji,w9,ch],null))}}ya=$APP.y(bh);wa=null;La=0}Qa=0}else break}return ua},A9=function(a,b){a=z9(a,b);b=n9.h($APP.Pd(a));return $APP.yi.l(b,$APP.VH,$APP.Jk.g(a,n9))},B9=function(a,b){var c=$APP.pE($APP.xd(a),b);b=$APP.A.l(c,0,null);c=$APP.A.l(c,1,null);return $APP.yd.g(b,a)?c:null},F9=function(a,b){$APP.Of(C9,!1);a.setPrompt([$APP.t.h($APP.Zp),"\x3d\x3e "].join(""));a.prompt();return $APP.UE($APP.Rb(D9))?null:E9.g?E9.g(b,a):E9.call(null,b,a)},G9=function(a){var b=$APP.tk(a);a=$APP.uk(a);var c= | ||
$APP.TE($APP.Rb(D9));b=$APP.Aq.g(b-1,c);c=$APP.w(b);b=$APP.x(c);c=$APP.y(c);a=$APP.r(b)?$APP.ii.g(b,a):null;$APP.Of(D9,$APP.dp.g("\n",$APP.Le(a,c)))},H9=function(a){var b=[".repl/",$APP.t.h($APP.Um.v()),".mjs"].join("");$APP.r(esm_import$fs.existsSync(".repl"))||esm_import$fs.mkdirSync(".repl");esm_import$fs.writeFileSync(b,a);return shadow_esm_import($APP.t.h(esm_import$url.pathToFileURL(esm_import$path.resolve(esm_import$process.cwd(),b)))).finally(function(){return esm_import$fs.unlinkSync(b)})}, | ||
J9=function(a,b,c){var d=function(){var f=$APP.Zp;$APP.Zp=$APP.Rb(I9);try{return $APP.wt($APP.As.j($APP.B([a])),null)}finally{$APP.Zp=f}}(),e=$APP.nf(d);d=$APP.ie.g(e,$APP.vt);e=$APP.ie.g(e,$APP.Q);$APP.Of(I9,e);return H9(d).then(function(){esm_import$squint_cljs$core.println(globalThis._repl);return F9(b,c)}).catch(function(f){esm_import$squint_cljs$core.println(f);return F9(b,c)})},E9=function(a,b){if($APP.r(function(){var e=$APP.Rb(C9);return $APP.r(e)?e:$APP.UE($APP.Rb(D9))}()))return null;$APP.Of(C9, | ||
!0);var c=$APP.To($APP.Rb(D9)),d=function(){try{return $APP.Vo(c,$APP.So($APP.mf))}catch(f){var e=f;if(-1!=$APP.LE(e).indexOf("EOF while reading"))return K9;G9(c);$APP.yJ.j($APP.B([$APP.t.h(e)]));return L9}}();if($APP.yd.g(L9,d))return F9(b,a);if($APP.yd.g(K9,d))return $APP.Of(C9,!1);G9(c);return $APP.yd.g($APP.Uo,d)?$APP.Of(C9,!1):J9(d,b,a)},M9=function(a){a.on("line",function(b){$APP.cj.B(D9,$APP.t,b,"\n");return E9(null,a)})},O9=function(a,b){var c=$APP.pL.h(a);if($APP.r(c)&&"string"!==typeof c)throw Error("output-dir must be a string"); | ||
return $APP.r(N9.h(a))?($APP.jM.j($APP.B(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])),$APP.jM(),$APP.jM.j($APP.B(["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.qe.l(function(d,e){return Promise.resolve(d).then(function(){$APP.jM.j($APP.B(["[squint] Compiling CLJS file:",e]));return $APP.qL($APP.yi.l(a,$APP.lL,e))}).then(function(f){f=$APP.nf(f); | ||
f=$APP.ie.g(f,$APP.nL);$APP.jM.j($APP.B(["[squint] Wrote JS file:",f]));return f})},null,b)},j9=new $APP.F(null,"kwd-opt","kwd-opt",1313309243),d9=new $APP.F(null,"hyphens","hyphens",2113533609),m9=new $APP.F(null,"spec","spec",347520401),T8=new $APP.F(null,"coerce","coerce",1917884504),p9=new $APP.F(null,"restrict","restrict",-1071101511),f9=new $APP.F(null,"keywords","keywords",1526959054),g9=new $APP.F(null,"mode","mode",654403691),L9=new $APP.F("squint.repl.node","continue","squint.repl.node/continue", | ||
1558138730),s9=new $APP.F(null,"msg","msg",-1386103444),P9=new $APP.F(null,"show","show",-576705889),e9=new $APP.F(null,"boolean","boolean",-1919418404),M8=new $APP.F(null,"input","input",556931961),Q9=new $APP.F(null,"rest-cmds","rest-cmds",-423198324),n9=new $APP.F("org.babashka","cli","org.babashka/cli",1162430315),b9=new $APP.F(null,"args-\x3eopts","args-\x3eopts",964391046),U8=new $APP.F(null,"alias","alias",-2039751630),o9=new $APP.F(null,"collect","collect",-284321549),R9=new $APP.F(null,"no-run", | ||
"no-run",-1534313596),V8=new $APP.F(null,"validate","validate",-201300827),i9=new $APP.F(null,"composite-opt","composite-opt",-2021292928),h9=new $APP.F(null,"hyphen-opt","hyphen-opt",1836909464),N9=new $APP.F(null,"help","help",-439233446),u9=new $APP.F(null,"cause","cause",231901252),k9=new $APP.F(null,"fst-colon","fst-colon",1618567071),N8=new $APP.F(null,"coerce-fn","coerce-fn",-821146515),$8=new $APP.F(null,"args","args",1315556576),Y8=new $APP.F(null,"no-keyword-opts","no-keyword-opts",761286018), | ||
w9=new $APP.F(null,"value","value",305978217),x9=new $APP.F(null,"pred","pred",1927423397),q9=new $APP.F(null,"closed","closed",-919675359),K9=new $APP.F("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),r9=new $APP.F(null,"error-fn","error-fn",-171437615),v9=new $APP.F(null,"option","option",65132272),W8=new $APP.F(null,"exec-args","exec-args",-1860766354),y9=new $APP.F(null,"ex-msg","ex-msg",-1111774387),C8=new $APP.F(null,"s","s",1705939918),t9=new $APP.F(null, | ||
"cmds-opts","cmds-opts",-390130362),S9=new $APP.F(null,"h","h",1109658740),T9=new $APP.F(null,"e","e",1381269198),Z8=new $APP.F(null,"cmds","cmds",-1841503952);var D9=$APP.Yi.h(""),C9=$APP.Yi.h(!1),U9,V9=process.stdout.isTTY;U9=$APP.r(V9)?process.stdin.setRawMode:V9;process.binding("contextify");var I9=$APP.Yi.h($APP.Zp),W9=function W9(a){switch(arguments.length){case 0:return W9.v();case 1:return W9.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};W9.v=function(){return W9.h(null)}; | ||
W9.h=function(){$APP.Zp=$APP.ow;$APP.Qp=$APP.pp=!0;$APP.r(U9)&&process.stdin.setRawMode(!0);return H9("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});M9(b);b.setPrompt([$APP.t.h($APP.Zp),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};W9.m=1;var X9=new $APP.H(null,4,5,$APP.I,[new $APP.q(null,3,[Z8,new $APP.H(null,1,5,$APP.I,["run"],null),$APP.io,function(a){a=$APP.nf(a);a=$APP.ie.g(a,$APP.VH);var b=$APP.nf(a),c=$APP.ie.g(b,$APP.Tk);b=$APP.ie.g(b,N9);if($APP.r(b))return null;$APP.jM.j($APP.B(["[squint] Running",c]));return $APP.qL($APP.yi.l(a,$APP.lL,c)).then(function(d){d=$APP.nf(d);d=$APP.ie.g(d,$APP.nL);d=$APP.r(esm_import$path.isAbsolute(d))?d:[$APP.t.h(process.cwd()),"/",$APP.t.h(d)].join("");return shadow_esm_import(d)})},t9,new $APP.H(null, | ||
1,5,$APP.I,[$APP.Tk],null)],null),new $APP.q(null,3,[Z8,new $APP.H(null,1,5,$APP.I,["compile"],null),T8,new $APP.q(null,3,[$APP.at,e9,$APP.dt,e9,$APP.pL,$APP.gl],null),$APP.io,function(a){var b=$APP.nf(a);a=$APP.ie.g(b,Q9);b=$APP.ie.g(b,$APP.VH);return O9(b,a)}],null),new $APP.q(null,2,[Z8,new $APP.H(null,1,5,$APP.I,["repl"],null),$APP.io,W9],null),new $APP.q(null,2,[Z8,$APP.kg,$APP.io,function(a){a=$APP.nf(a);var b=$APP.ie.g(a,Q9),c=$APP.ie.g(a,$APP.VH);a=T9.h(c);if($APP.r(a)){if($APP.r(N9.h(c)))return $APP.jM.j($APP.B(["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.NC.g(a,new $APP.q(null,1,[$APP.gt,$APP.Yi.h(new $APP.q(null,1,[$APP.co,$APP.ow],null))],null));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(P9.h(c))&&$APP.jM.j($APP.B([a]));if($APP.r(R9.h(c)))return null;a=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return shadow_esm_import(a).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f= | ||
N9.h(c);return $APP.r(f)?f:$APP.yd.g("help",$APP.x(b))||$APP.Sd(b)}())?$APP.jM.j($APP.B(["Squint v0.0.0\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\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nrepl Start repl\nhelp Print this help\n\nUse squint \x3csubcommand\x3e --help to show more info."])):O9(c,b)}],null)],null);(function(){var a=new $APP.q(null,1,[$APP.GH,new $APP.q(null,1,[S9,N9],null)],null),b=a9(process.argv.slice(2),a),c=$APP.nf(b),d=$APP.ie.g(c,Z8),e=$APP.ie.g(c,$8);return $APP.qe.l(function(f,k){f=$APP.nf(k);var l=$APP.ie.g(f,Z8),m=$APP.ie.g(f,$APP.io),h=B9(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.w(h);return null==v?null:$APP.lg(v)}();k=$APP.N.g(k,e);f=A9(k,B8(a,$APP.B([f])));k=$APP.nf(f);var p=$APP.ie.g(k,$APP.VH);f=$APP.ie.g(k,$8);k=$APP.ie.g(k,Z8);var n=$APP.N.g(k,f);return $APP.kd(function(){var v= | ||
$APP.yi.j(c,$8,n,$APP.B([Q9,n,$APP.VH,p,$APP.Mo,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,X9)})(); | ||
var C8=function(a,b){return $APP.Zd(a)&&$APP.Zd(b)?$APP.Ik.j($APP.B([a,b])):$APP.Td(a)&&($APP.Yd(a)||$APP.Ud(a))&&$APP.Td(b)&&($APP.Yd(b)||$APP.Ud(b))?$APP.Qg.g(a,b):b},D8=function(a,b){return $APP.qe.l(function(c,d){return $APP.YL.j(C8,$APP.B([c,d]))},a,b)},F8=function(a){throw $APP.Wk.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.q(null,1,[E8,a],null));},G8=function(a){var b=JSON.parse(a);return $APP.de(b)?b:F8(a)},H8=function(a){var b=JSON.parse(a);return $APP.vD(b)?b:F8(a)},I8=function(a){var b= | ||
JSON.parse(a);return $APP.xD(b)?b:F8(a)},J8=function(a){var b=JSON.parse(a);return"number"===typeof b?b:F8(a)},K8=function(a){return"string"===typeof a?$APP.A.l(a,0,null):null},L8=function(a){return $APP.yd.g(":",K8(a))?$APP.ui.h($APP.ii.g(a,1)):$APP.ui.h(a)},M8=function(a){return $APP.Td(a)?$APP.x(a):a},N8=function(a){if("string"===typeof a)try{var b=K8(a);if($APP.yd.g("true",a)||$APP.yd.g("false",a))var c=G8(a);else{if($APP.yd.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e=J8(a);else{var f= | ||
$APP.yd.g(":",b);var k=f?$APP.gi(/:[a-zA-Z][a-zA-Z0-9_\/\.-]*/,a):f;e=$APP.r(k)?L8(a):a}d=e}c=d}return c}catch(l){return a}else return a},Q8=function(a,b,c,d){throw $APP.Wk.l(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.As.j($APP.B([a]))].join(""),c instanceof $APP.F?" to ":" with ",$APP.t.h(c instanceof $APP.F?$APP.Yh(c):c)].join(""),new $APP.q(null,2,[O8,a,P8,c],null),d);},R8=function(a,b,c){var d=function(){switch(b instanceof $APP.F?b.wa:null){case "boolean":case "bool":return G8; | ||
case "int":case "long":return H8;case "double":return I8;case "number":return J8;case "symbol":return $APP.Di;case "keyword":return L8;case "string":return $APP.ve;case "edn":return $APP.CM;case "auto":return N8;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=Q8(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?Q8(a,c,b,null):d},S8=function(a,b,c){a=$APP.ie.g(a,b);c=$APP.r(a)?a:$APP.Td(c)?$APP.Id(c):null;return $APP.r(c)?$APP.Td(c)?$APP.Mp.g($APP.Ge, | ||
c):c:null},T8=function(a,b,c,d){return $APP.yo.g(b,c)?(c=$APP.rE(a,b),$APP.r(c)?($APP.A.l(c,0,null),c=$APP.A.l(c,1,null),$APP.yi.l(a,b,$APP.r(d)?d.g?d.g(c,!0):d.call(null,c,!0):!0)):$APP.yi.l(a,b,$APP.r(d)?d.g?d.g(null,!0):d.call(null,null,!0):!0)):a},U8=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Td(d):d)?R8(e,d,f):N8(e);return $APP.r(c)?$APP.Dm.B(a,b,c,d):$APP.yi.l(a,b,d)},Z8=function(a){return $APP.qe.l(function(b,c){var d=$APP.A.l(c,0,null);c=$APP.A.l(c,1,null);var e=$APP.nf(c),f=$APP.ie.g(e, | ||
V8),k=$APP.ie.g(e,W8);c=$APP.ie.g(e,$APP.nm);var l=$APP.ie.g(e,$APP.wB);e=$APP.ie.g(e,X8);b=$APP.r(f)?$APP.Dm.G(b,V8,$APP.yi,d,f):b;b=$APP.r(k)?$APP.Dm.l(b,W8,function(m){if($APP.ke(m,k))throw $APP.Wk.g(["Conflicting alias ",$APP.t.h(k)," between ",$APP.t.h($APP.ie.g(m,k))," and ",$APP.t.h(d)].join(""),new $APP.q(null,1,[W8,k],null));return $APP.yi.l(m,k,d)}):b;b=$APP.r(l)?$APP.Dm.l(b,$APP.wB,$APP.Mp.g(function(m){return $APP.Ge.g(m,d)},$APP.Sh)):b;b=$APP.r(e)?$APP.Dm.G(b,X8,$APP.yi,d,e):b;return $APP.r(c)? | ||
$APP.Dm.G(b,Y8,$APP.yi,d,c):b},$APP.mf,a)},c9=function(a,b){b=$APP.nf(b);var c=$APP.ie.g(b,$8);b=$APP.sE(function(d){var e=$APP.r(c)?null:$APP.sa(d,":");return!($APP.r(e)?e:$APP.sa(d,"-"))},a);a=$APP.A.l(b,0,null);b=$APP.A.l(b,1,null);return new $APP.q(null,2,[a9,a,b9,b],null)},e9=function(a,b){if($APP.r(b))if($APP.w(a)){var c=$APP.xd(a),d=$APP.cf(c,b);c=c<d?c:d;a=new $APP.H(null,2,5,$APP.I,[$APP.N.g($APP.pq.g(b,a),$APP.Aq.g(c,a)),$APP.Aq.g(c,b)],null)}else a=new $APP.H(null,2,5,$APP.I,[a,b],null); | ||
else a=new $APP.H(null,2,5,$APP.I,[a,b],null);b=a;a=$APP.A.l(b,0,null);b=$APP.A.l(b,1,null);return new $APP.q(null,2,[b9,a,d9,b],null)},n9=function(a,b,c,d,e){var f=K8(a),k="string"===typeof a?$APP.A.l(a,1,null):null,l;if(l=$APP.yd.g(f,"-")){try{var m=J8($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?f9:null;f=$APP.yd.g(":",f);c=$APP.yo.g(f9,b)&&f&&($APP.yd.g(g9,d)||$APP.Za(c)||$APP.yd.g(e,c));d=$APP.r(b)?b:c?h9:null;a=l?$APP.r(k)?$APP.yo.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.q(null, | ||
5,[i9,d,j9,l,k9,a,l9,c,m9,f],null)},B9=function(a,b){function c(ib){ib=$APP.Ik.j($APP.B([new $APP.q(null,2,[o9,d,$APP.Qk,p9],null),ib]));return O.h?O.h(ib):O.call(null,ib)}var d=o9.h(b),e=$APP.r(d)?D8(b,$APP.B([Z8(d)])):b,f=V8.h(e),k=function(){var ib=W8.h(e);return $APP.r(ib)?ib:$APP.KH.h(e)}(),l=q9.h(e),m=$APP.wB.h(e),h=Y8.h(e),p=$8.h(e),n=function(){var ib=r9.h(e);return $APP.r(ib)?ib:s9.h(e)}(),v=$APP.Wh($APP.N.j($APP.Nh($APP.Zd(d)?d:$APP.Qg.g($APP.mf,d)),$APP.Ph(k),$APP.B([$APP.Nh(f)]))),C=$APP.yd.g(!0, | ||
n)?v:null==n?null:$APP.Wh(n),G=X8.h(e),O=function(){var ib=t9.h(e);return $APP.r(ib)?ib:function(Jb){Jb=$APP.nf(Jb);var oc=$APP.ie.g(Jb,u9);throw $APP.Wk.g(oc,Jb);}}(),P=c9(a,null),V=$APP.nf(P),aa=$APP.ie.g(V,a9),da=$APP.ie.g(V,b9),ja=function(){var ib=d9.h(e);ib=$APP.r(ib)?ib:v9.h(e);return $APP.r(ib)?e9(aa,ib):new $APP.q(null,2,[d9,null,b9,da],null)}(),oa=$APP.nf(ja),ca=$APP.ie.g(oa,b9),E=$APP.ie.g(oa,d9),z=$APP.yo.g(ca,da)?new $APP.H(null,2,5,$APP.I,[null,$APP.N.g(ca,da)],null):new $APP.H(null, | ||
2,5,$APP.I,[aa,da],null),ba=$APP.A.l(z,0,null),J=$APP.A.l(z,1,null),K=function(){for(var ib=$APP.mf,Jb=null,oc=null,Vd=$APP.r(p)?f9:null,Ic=$APP.w(J),zf=E;;){if($APP.Za(Ic))return new $APP.H(null,3,5,$APP.I,[ib,Jb,oc],null);var hf=$APP.x(Ic),tc=hf instanceof $APP.F;if(tc){Jb=T8(ib,Jb,oc,null);var zd=hf;Ic=$APP.y(Ic);ib=Jb;Jb=zd}else{var Nj=!0===hf,Se=$APP.t.h(hf);zd=S8(l,Jb,$APP.ie.g(f,Jb));var dh=$APP.ie.g(f,Jb),Oj=n9(Se,Vd,Jb,dh,oc),tg=$APP.nf(Oj),Pj=$APP.ie.g(tg,j9),ug=$APP.ie.g(tg,k9),Qj=$APP.ie.g(tg, | ||
l9),Te=$APP.ie.g(tg,i9),Li=$APP.ie.g(tg,m9);if($APP.r(function(){var Xd=Pj;return $APP.r(Xd)?Xd:Qj}())){var wc=$APP.sa(Se,"--"),Mi=wc&&$APP.yd.g("--",Se);if(Mi){var Rj=$APP.y(Ic);return new $APP.H(null,3,5,$APP.I,[function(){var Xd=ib;return Rj?$APP.Tn.B(Xd,$APP.St,new $APP.H(null,2,5,$APP.I,[p9,b9],null),$APP.lg(Rj)):Xd}(),Jb,oc],null)}var Ni=wc?$APP.ii.g(Se,2):$APP.bk(Se,/^(:|-|)/,""),He=wc?$APP.mq.g(Ni,/=/):new $APP.H(null,1,5,$APP.I,[Ni],null),jd=$APP.A.l(He,0,null),Nd=$APP.A.l(He,1,null),Eb= | ||
$APP.ui.h(jd),mc=$APP.ie.l(k,Eb,Eb);if($APP.r(Nd))oc=T8(ib,Jb,oc,zd),Jb=mc,Vd=Te,Ic=$APP.Le(Nd,$APP.bd(Ic)),ib=oc,oc=null;else{var lb=$APP.y(Ic),Wd=$APP.x(lb),bt=n9(Wd,Te,Jb,dh,oc);if($APP.r(function(){var Xd=j9.h(bt);return $APP.r(Xd)?Xd:$APP.Sd(lb)}()))if($APP.r(ug)){var ct=$APP.Yh(mc);oc=$APP.xr.j(function(){return function(Xd){return new $APP.H(null,2,5,$APP.I,[["-",$APP.t.h(Xd)].join(""),!0],null)}}(ib,Jb,oc,Vd,Ic,zf,ct,lb,Wd,bt,Ni,He,jd,Nd,Eb,mc,wc,Mi,Nj,Se,zd,dh,Oj,tg,Pj,ug,Qj,Te,Li,hf,tc, | ||
d,e,f,k,l,m,h,p,n,v,C,G,O,c,P,V,aa,da,ja,oa,ca,E,z,ba,J),$APP.B([ct]));Ic=$APP.N.g(oc,lb);Vd=Te;oc=Jb=null}else Ic=$APP.ke(v,mc)?null:$APP.ZC($APP.t.h(mc),":no-"),Vd=$APP.r(Ic)?$APP.ui.h($APP.bk($APP.t.h(mc),":no-","")):mc,Ic=$APP.Le($APP.Za(Ic),lb),Jb=T8(ib,Jb,oc,zd),zd=Vd,Vd=Te,ib=Jb,Jb=zd;else Jb=T8(ib,Jb,oc,zd),zd=mc,Vd=Te,Ic=lb,ib=Jb,Jb=zd}}else if(Mi=$APP.yd.g(g9,dh)&&$APP.yo.g(Se,"true")&&$APP.yo.g(Se,"false")||$APP.yd.g(oc,Jb)&&$APP.Za(zd))if(zf=$APP.r(Ic)?$APP.r(zf)?e9(Ic,zf):new $APP.q(null, | ||
1,[b9,Ic],null):new $APP.q(null,1,[b9,Ic],null),Vd=$APP.nf(zf),zf=$APP.ie.g(Vd,b9),Vd=$APP.ie.g(Vd,d9),$APP.yo.g(Ic,zf))zd=Vd,Vd=Te,Ic=zf,zf=zd;else return new $APP.H(null,3,5,$APP.I,[$APP.Tn.B(ib,$APP.St,new $APP.H(null,2,5,$APP.I,[p9,b9],null),$APP.lg(Ic)),Jb,oc],null);else{try{var pd=U8(ib,Jb,zd,M8(dh),Se,Nj)}catch(Xd){c(new $APP.q(null,4,[w9,V8,u9,$APP.PE(Xd),x9,Jb,y9,Se],null)),pd=ib}oc=$APP.r(function(){var Xd=$APP.yd.g(h9,Te);return Xd?Li:Xd}())?null:Jb;zd=$APP.r(function(){var Xd=$APP.yd.g(h9, | ||
Te);return Xd?Li:Xd}())?null:Jb;Vd=Te;Ic=$APP.y(Ic);ib=pd;Jb=oc;oc=zd}}}}(),ea=$APP.A.l(K,0,null),ia=$APP.A.l(K,1,null),ha=$APP.A.l(K,2,null),qa=S8(l,ia,$APP.ie.g(f,ia)),ra=function(){var ib=T8(ea,ia,ha,qa);return $APP.w(ba)?$APP.Tn.B(ib,$APP.Fk,new $APP.H(null,2,5,$APP.I,[p9,b9],null),function(Jb){return $APP.Qg.g($APP.lg(ba),Jb)}):ib}(),ua=$APP.r(h)?$APP.Od($APP.Ik.j($APP.B([h,ra])),$APP.Pd(ra)):ra;if($APP.r(C)){a=$APP.w($APP.Nh(ua));b=null;for(var va=0,xa=0;;)if(xa<va){var Da=b.V(null,xa);$APP.ke(C, | ||
Da)||c(new $APP.q(null,4,[w9,r9,u9,["Unknown option: ",$APP.t.h(Da)].join(""),r9,C,x9,Da],null));xa+=1}else if(a=$APP.w(a))b=a,$APP.be(b)?(a=$APP.xc(b),xa=$APP.yc(b),b=a,va=$APP.xd(a),a=xa):(a=$APP.x(b),$APP.ke(C,a)||c(new $APP.q(null,4,[w9,r9,u9,["Unknown option: ",$APP.t.h(a)].join(""),r9,C,x9,a],null)),a=$APP.y(b),b=null,va=0),xa=0;else break}if($APP.r(m))for(a=$APP.w(m),b=null,xa=va=0;;)if(xa<va)Da=b.V(null,xa),$APP.r($APP.rE(ua,Da))||c(new $APP.q(null,4,[w9,$APP.wB,u9,["Required option: ",$APP.t.h(Da)].join(""), | ||
$APP.wB,m,x9,Da],null)),xa+=1;else if(a=$APP.w(a))b=a,$APP.be(b)?(a=$APP.xc(b),xa=$APP.yc(b),b=a,va=$APP.xd(a),a=xa):(a=$APP.x(b),$APP.r($APP.rE(ua,a))||c(new $APP.q(null,4,[w9,$APP.wB,u9,["Required option: ",$APP.t.h(a)].join(""),$APP.wB,m,x9,a],null)),a=$APP.y(b),b=null,va=0),xa=0;else break;if($APP.r(G))for(var ya=$APP.w(G),wa=null,La=0,Qa=0;;)if(Qa<La){var Xa=wa.V(null,Qa),gb=$APP.A.l(Xa,0,null),mb=$APP.A.l(Xa,1,null),Ib=function(){var ib=(ib=$APP.Zd(mb))?z9.h(mb):ib;return $APP.r(ib)?ib:mb}(), | ||
Wb=$APP.rE(ua,gb);if($APP.r(Wb)){var zc=Wb,Db=$APP.A.l(zc,0,null),te=$APP.A.l(zc,1,null);if(!$APP.r(Ib.h?Ib.h(te):Ib.call(null,te))){var Hi=function(){var ib=A9.h(mb);return $APP.r(ib)?ib:function(){return function(Jb){var oc=$APP.nf(Jb);Jb=$APP.ie.g(oc,x9);oc=$APP.ie.g(oc,y9);return["Invalid value for option ",$APP.t.h(Jb),": ",$APP.t.h(oc)].join("")}}(ya,wa,La,Qa,ib,zc,Db,te,Wb,Ib,Xa,gb,mb,d,e,f,k,l,m,h,p,n,v,C,G,O,c,P,V,aa,da,ja,oa,ca,E,z,ba,J,K,ea,ia,ha,qa,ra,ua)}();c(new $APP.q(null,5,[w9,X8, | ||
u9,function(){var ib=new $APP.q(null,2,[x9,gb,y9,te],null);return Hi.h?Hi.h(ib):Hi.call(null,ib)}(),X8,G,x9,gb,y9,te],null))}}Qa+=1}else{var Kj=$APP.w(ya);if(Kj){var bh=Kj;if($APP.be(bh))va=$APP.xc(bh),a=$APP.yc(bh),b=va,va=$APP.xd(va),ya=a,wa=b,La=va;else{var Ii=$APP.x(bh),Ji=$APP.A.l(Ii,0,null),ai=$APP.A.l(Ii,1,null),Ki=function(){var ib=(ib=$APP.Zd(ai))?z9.h(ai):ib;return $APP.r(ib)?ib:ai}(),Lj=$APP.rE(ua,Ji);if($APP.r(Lj)){var nc=Lj,bi=$APP.A.l(nc,0,null),ch=$APP.A.l(nc,1,null);if(!$APP.r(Ki.h? | ||
Ki.h(ch):Ki.call(null,ch))){var Mj=function(){var ib=A9.h(ai);return $APP.r(ib)?ib:function(){return function(Jb){var oc=$APP.nf(Jb);Jb=$APP.ie.g(oc,x9);oc=$APP.ie.g(oc,y9);return["Invalid value for option ",$APP.t.h(Jb),": ",$APP.t.h(oc)].join("")}}(ya,wa,La,Qa,ib,nc,bi,ch,Lj,Ki,Ii,Ji,ai,bh,Kj,d,e,f,k,l,m,h,p,n,v,C,G,O,c,P,V,aa,da,ja,oa,ca,E,z,ba,J,K,ea,ia,ha,qa,ra,ua)}();c(new $APP.q(null,5,[w9,X8,u9,function(){var ib=new $APP.q(null,2,[x9,Ji,y9,ch],null);return Mj.h?Mj.h(ib):Mj.call(null,ib)}(), | ||
X8,G,x9,Ji,y9,ch],null))}}ya=$APP.y(bh);wa=null;La=0}Qa=0}else break}return ua},C9=function(a,b){a=B9(a,b);b=p9.h($APP.Pd(a));return $APP.yi.l(b,$APP.ZH,$APP.Jk.g(a,p9))},D9=function(a,b){var c=$APP.tE($APP.xd(a),b);b=$APP.A.l(c,0,null);c=$APP.A.l(c,1,null);return $APP.yd.g(b,a)?c:null},H9=function(a,b){$APP.Of(E9,!1);a.setPrompt([$APP.t.h($APP.Zp),"\x3d\x3e "].join(""));a.prompt();return $APP.YE($APP.Rb(F9))?null:G9.g?G9.g(b,a):G9.call(null,b,a)},I9=function(a){var b=$APP.tk(a);a=$APP.uk(a);var c= | ||
$APP.XE($APP.Rb(F9));b=$APP.Aq.g(b-1,c);c=$APP.w(b);b=$APP.x(c);c=$APP.y(c);a=$APP.r(b)?$APP.ii.g(b,a):null;$APP.Of(F9,$APP.dp.g("\n",$APP.Le(a,c)))},J9=function(a){var b=[".repl/",$APP.t.h($APP.Um.v()),".mjs"].join("");$APP.r(esm_import$fs.existsSync(".repl"))||esm_import$fs.mkdirSync(".repl");esm_import$fs.writeFileSync(b,a);return shadow_esm_import($APP.t.h(esm_import$url.pathToFileURL(esm_import$path.resolve(esm_import$process.cwd(),b)))).finally(function(){return esm_import$fs.unlinkSync(b)})}, | ||
L9=function(a,b,c){var d=function(){var f=$APP.Zp;$APP.Zp=$APP.Rb(K9);try{return $APP.wt($APP.As.j($APP.B([a])),null)}finally{$APP.Zp=f}}(),e=$APP.nf(d);d=$APP.ie.g(e,$APP.vt);e=$APP.ie.g(e,$APP.Q);$APP.Of(K9,e);return J9(d).then(function(){esm_import$squint_cljs$core.println(globalThis._repl);return H9(b,c)}).catch(function(f){esm_import$squint_cljs$core.println(f);return H9(b,c)})},G9=function(a,b){if($APP.r(function(){var e=$APP.Rb(E9);return $APP.r(e)?e:$APP.YE($APP.Rb(F9))}()))return null;$APP.Of(E9, | ||
!0);var c=$APP.To($APP.Rb(F9)),d=function(){try{return $APP.Vo(c,$APP.So($APP.mf))}catch(f){var e=f;if(-1!=$APP.PE(e).indexOf("EOF while reading"))return M9;I9(c);$APP.CJ.j($APP.B([$APP.t.h(e)]));return N9}}();if($APP.yd.g(N9,d))return H9(b,a);if($APP.yd.g(M9,d))return $APP.Of(E9,!1);I9(c);return $APP.yd.g($APP.Uo,d)?$APP.Of(E9,!1):L9(d,b,a)},O9=function(a){a.on("line",function(b){$APP.cj.B(F9,$APP.t,b,"\n");return G9(null,a)})},Q9=function(a,b){var c=$APP.tL.h(a);if($APP.r(c)&&"string"!==typeof c)throw Error("output-dir must be a string"); | ||
return $APP.r(P9.h(a))?($APP.nM.j($APP.B(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])),$APP.nM(),$APP.nM.j($APP.B(["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.qe.l(function(d,e){return Promise.resolve(d).then(function(){$APP.nM.j($APP.B(["[squint] Compiling CLJS file:",e]));return $APP.uL($APP.yi.l(a,$APP.pL,e))}).then(function(f){f=$APP.nf(f); | ||
f=$APP.ie.g(f,$APP.rL);$APP.nM.j($APP.B(["[squint] Wrote JS file:",f]));return f})},null,b)},l9=new $APP.F(null,"kwd-opt","kwd-opt",1313309243),f9=new $APP.F(null,"hyphens","hyphens",2113533609),o9=new $APP.F(null,"spec","spec",347520401),V8=new $APP.F(null,"coerce","coerce",1917884504),r9=new $APP.F(null,"restrict","restrict",-1071101511),h9=new $APP.F(null,"keywords","keywords",1526959054),i9=new $APP.F(null,"mode","mode",654403691),N9=new $APP.F("squint.repl.node","continue","squint.repl.node/continue", | ||
1558138730),u9=new $APP.F(null,"msg","msg",-1386103444),R9=new $APP.F(null,"show","show",-576705889),g9=new $APP.F(null,"boolean","boolean",-1919418404),O8=new $APP.F(null,"input","input",556931961),S9=new $APP.F(null,"rest-cmds","rest-cmds",-423198324),p9=new $APP.F("org.babashka","cli","org.babashka/cli",1162430315),d9=new $APP.F(null,"args-\x3eopts","args-\x3eopts",964391046),W8=new $APP.F(null,"alias","alias",-2039751630),q9=new $APP.F(null,"collect","collect",-284321549),T9=new $APP.F(null,"no-run", | ||
"no-run",-1534313596),X8=new $APP.F(null,"validate","validate",-201300827),k9=new $APP.F(null,"composite-opt","composite-opt",-2021292928),j9=new $APP.F(null,"hyphen-opt","hyphen-opt",1836909464),P9=new $APP.F(null,"help","help",-439233446),w9=new $APP.F(null,"cause","cause",231901252),m9=new $APP.F(null,"fst-colon","fst-colon",1618567071),P8=new $APP.F(null,"coerce-fn","coerce-fn",-821146515),b9=new $APP.F(null,"args","args",1315556576),$8=new $APP.F(null,"no-keyword-opts","no-keyword-opts",761286018), | ||
y9=new $APP.F(null,"value","value",305978217),z9=new $APP.F(null,"pred","pred",1927423397),s9=new $APP.F(null,"closed","closed",-919675359),M9=new $APP.F("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),t9=new $APP.F(null,"error-fn","error-fn",-171437615),x9=new $APP.F(null,"option","option",65132272),Y8=new $APP.F(null,"exec-args","exec-args",-1860766354),A9=new $APP.F(null,"ex-msg","ex-msg",-1111774387),E8=new $APP.F(null,"s","s",1705939918),v9=new $APP.F(null, | ||
"cmds-opts","cmds-opts",-390130362),U9=new $APP.F(null,"h","h",1109658740),V9=new $APP.F(null,"e","e",1381269198),a9=new $APP.F(null,"cmds","cmds",-1841503952);var F9=$APP.Yi.h(""),E9=$APP.Yi.h(!1),W9,X9=process.stdout.isTTY;W9=$APP.r(X9)?process.stdin.setRawMode:X9;process.binding("contextify");var K9=$APP.Yi.h($APP.Zp),Y9=function Y9(a){switch(arguments.length){case 0:return Y9.v();case 1:return Y9.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};Y9.v=function(){return Y9.h(null)}; | ||
Y9.h=function(){$APP.Zp=$APP.qw;$APP.Qp=$APP.pp=!0;$APP.r(W9)&&process.stdin.setRawMode(!0);return J9("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});O9(b);b.setPrompt([$APP.t.h($APP.Zp),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};Y9.m=1;var Z9=new $APP.H(null,4,5,$APP.I,[new $APP.q(null,3,[a9,new $APP.H(null,1,5,$APP.I,["run"],null),$APP.io,function(a){a=$APP.nf(a);a=$APP.ie.g(a,$APP.ZH);var b=$APP.nf(a),c=$APP.ie.g(b,$APP.Tk);b=$APP.ie.g(b,P9);if($APP.r(b))return null;$APP.nM.j($APP.B(["[squint] Running",c]));return $APP.uL($APP.yi.l(a,$APP.pL,c)).then(function(d){d=$APP.nf(d);d=$APP.ie.g(d,$APP.rL);d=$APP.r(esm_import$path.isAbsolute(d))?d:[$APP.t.h(process.cwd()),"/",$APP.t.h(d)].join("");return shadow_esm_import(d)})},v9,new $APP.H(null, | ||
1,5,$APP.I,[$APP.Tk],null)],null),new $APP.q(null,3,[a9,new $APP.H(null,1,5,$APP.I,["compile"],null),V8,new $APP.q(null,3,[$APP.at,g9,$APP.dt,g9,$APP.tL,$APP.gl],null),$APP.io,function(a){var b=$APP.nf(a);a=$APP.ie.g(b,S9);b=$APP.ie.g(b,$APP.ZH);return Q9(b,a)}],null),new $APP.q(null,2,[a9,new $APP.H(null,1,5,$APP.I,["repl"],null),$APP.io,Y9],null),new $APP.q(null,2,[a9,$APP.kg,$APP.io,function(a){a=$APP.nf(a);var b=$APP.ie.g(a,S9),c=$APP.ie.g(a,$APP.ZH);a=V9.h(c);if($APP.r(a)){if($APP.r(P9.h(c)))return $APP.nM.j($APP.B(["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.RC.g(a,new $APP.q(null,1,[$APP.gt,$APP.Yi.h(new $APP.q(null,1,[$APP.co,$APP.qw],null))],null));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(R9.h(c))&&$APP.nM.j($APP.B([a]));if($APP.r(T9.h(c)))return null;a=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return shadow_esm_import(a).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f= | ||
P9.h(c);return $APP.r(f)?f:$APP.yd.g("help",$APP.x(b))||$APP.Sd(b)}())?$APP.nM.j($APP.B(["Squint v0.0.0\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\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nrepl Start repl\nhelp Print this help\n\nUse squint \x3csubcommand\x3e --help to show more info."])):Q9(c,b)}],null)],null);(function(){var a=new $APP.q(null,1,[$APP.KH,new $APP.q(null,1,[U9,P9],null)],null),b=c9(process.argv.slice(2),a),c=$APP.nf(b),d=$APP.ie.g(c,a9),e=$APP.ie.g(c,b9);return $APP.qe.l(function(f,k){f=$APP.nf(k);var l=$APP.ie.g(f,a9),m=$APP.ie.g(f,$APP.io),h=D9(l,d);if($APP.r(h)){k=function(){var v=null==h?null:$APP.w(h);return null==v?null:$APP.lg(v)}();k=$APP.N.g(k,e);f=C9(k,D8(a,$APP.B([f])));k=$APP.nf(f);var p=$APP.ie.g(k,$APP.ZH);f=$APP.ie.g(k,b9);k=$APP.ie.g(k,a9);var n=$APP.N.g(k,f);return $APP.kd(function(){var v= | ||
$APP.yi.j(c,b9,n,$APP.B([S9,n,$APP.ZH,p,$APP.Mo,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,Z9)})(); |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "0.1.18", | ||
"version": "0.1.19", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "core.js", |
@@ -1235,1 +1235,39 @@ // @ts-check | ||
} | ||
export function max(x, y, ...more) { | ||
if (y == undefined) { | ||
return x; | ||
} | ||
if ( more.length == 0) { | ||
return ( x > y ) ? x : y; | ||
} | ||
return max(max(x,y),...more); | ||
} | ||
export function min(x, y, ...more) { | ||
if (y == undefined) { | ||
return x; | ||
} | ||
if ( more.length == 0) { | ||
return ( x < y ) ? x : y; | ||
} | ||
return min(min(x,y),...more); | ||
} | ||
export function map_QMARK_(x) { | ||
return (x instanceof Object); | ||
} | ||
export function every_pred(...preds) { | ||
return (...args) => { | ||
for (let p of preds) { | ||
for (let a of args) { | ||
let res = p(a); | ||
if (!res) { | ||
return false; | ||
} | ||
} | ||
} | ||
return true; | ||
}; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1127612
5915