New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

squint-cljs

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

squint-cljs - npm Package Compare versions

Comparing version 0.2.25 to 0.2.26

73

lib/cli.js
import { $APP, shadow$provide, $jscomp } from "./compiler.js";
import "./compiler.node.js";
const shadow_esm_import = function(x) { return import(x) };
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 I8=function(a,b){return $APP.Zd(a)&&$APP.Zd(b)?$APP.Kk.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},J8=function(a,b){return $APP.qe.l(function(c,d){return $APP.LD.j(I8,$APP.B([c,d]))},a,b)},L8=function(a){throw $APP.Yk.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.q(null,1,[K8,a],null));},M8=function(a){var b=JSON.parse(a);return $APP.de(b)?b:L8(a)},N8=function(a){var b=JSON.parse(a);return $APP.fD(b)?b:L8(a)},O8=function(a){var b=
JSON.parse(a);return $APP.gD(b)?b:L8(a)},P8=function(a){var b=JSON.parse(a);return"number"===typeof b?b:L8(a)},Q8=function(a){return"string"===typeof a?$APP.A.l(a,0,null):null},R8=function(a){return $APP.yd.g(":",Q8(a))?$APP.ui.h($APP.ii.g(a,1)):$APP.ui.h(a)},S8=function(a){return $APP.Td(a)?$APP.x(a):a},T8=function(a){if("string"===typeof a)try{var b=Q8(a);if($APP.yd.g("true",a)||$APP.yd.g("false",a))var c=M8(a);else{if($APP.yd.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e=P8(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)?R8(a):a}d=e}c=d}return c}catch(l){return a}else return a},W8=function(a,b,c,d){throw $APP.Yk.l(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.Cs.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,[U8,a,V8,c],null),d);},X8=function(a,b,c){var d=function(){switch(b instanceof $APP.F?b.wa:null){case "boolean":case "bool":return M8;
case "int":case "long":return N8;case "double":return O8;case "number":return P8;case "symbol":return $APP.Di;case "keyword":return R8;case "string":return $APP.ve;case "edn":return $APP.OD;case "auto":return T8;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=W8(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?W8(a,c,b,null):d},Y8=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.Op.g($APP.Ge,
c):c:null},Z8=function(a,b,c,d){return $APP.Ao.g(b,c)?(c=$APP.kD(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},$8=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Td(d):d)?X8(e,d,f):T8(e);return $APP.r(c)?$APP.Fm.B(a,b,c,d):$APP.yi.l(a,b,d)},e9=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,
a9),k=$APP.ie.g(e,b9);c=$APP.ie.g(e,$APP.pm);var l=$APP.ie.g(e,$APP.JB);e=$APP.ie.g(e,c9);b=$APP.r(f)?$APP.Fm.G(b,a9,$APP.yi,d,f):b;b=$APP.r(k)?$APP.Fm.l(b,b9,function(m){if($APP.ke(m,k))throw $APP.Yk.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,[b9,k],null));return $APP.yi.l(m,k,d)}):b;b=$APP.r(l)?$APP.Fm.l(b,$APP.JB,$APP.Op.g(function(m){return $APP.Ge.g(m,d)},$APP.Sh)):b;b=$APP.r(e)?$APP.Fm.G(b,c9,$APP.yi,d,e):b;return $APP.r(c)?
$APP.Fm.G(b,d9,$APP.yi,d,c):b},$APP.mf,a)},i9=function(a,b){b=$APP.nf(b);var c=$APP.ie.g(b,f9);b=$APP.lD(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,[g9,a,h9,b],null)},k9=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.rq.g(b,a),$APP.Cq.g(c,a)),$APP.Cq.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,[h9,a,j9,b],null)},t9=function(a,b,c,d,e){var f=Q8(a),k="string"===typeof a?$APP.A.l(a,1,null):null,l;if(l=$APP.yd.g(f,"-")){try{var m=P8($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?l9:null;f=$APP.yd.g(":",f);c=$APP.Ao.g(l9,b)&&f&&($APP.yd.g(m9,d)||$APP.Za(c)||$APP.yd.g(e,c));d=$APP.r(b)?b:c?n9:null;a=l?$APP.r(k)?$APP.Ao.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.q(null,
5,[o9,d,p9,l,q9,a,r9,c,s9,f],null)},H9=function(a,b){function c(ib){ib=$APP.Kk.j($APP.B([new $APP.q(null,2,[u9,d,$APP.Sk,v9],null),ib]));return O.h?O.h(ib):O.call(null,ib)}var d=u9.h(b),e=$APP.r(d)?J8(b,$APP.B([e9(d)])):b,f=a9.h(e),k=function(){var ib=b9.h(e);return $APP.r(ib)?ib:$APP.QD.h(e)}(),l=w9.h(e),m=$APP.JB.h(e),h=d9.h(e),p=f9.h(e),n=function(){var ib=x9.h(e);return $APP.r(ib)?ib:y9.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=c9.h(e),O=function(){var ib=z9.h(e);return $APP.r(ib)?ib:function(Jb){Jb=$APP.nf(Jb);var oc=$APP.ie.g(Jb,A9);throw $APP.Yk.g(oc,Jb);}}(),P=i9(a,null),V=$APP.nf(P),aa=$APP.ie.g(V,g9),da=$APP.ie.g(V,h9),ja=function(){var ib=j9.h(e);ib=$APP.r(ib)?ib:B9.h(e);return $APP.r(ib)?k9(aa,ib):new $APP.q(null,2,[j9,null,h9,da],null)}(),oa=$APP.nf(ja),ca=$APP.ie.g(oa,h9),E=$APP.ie.g(oa,j9),z=$APP.Ao.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)?l9:null,Ic=$APP.w(J),Af=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=Z8(ib,Jb,oc,null);var Ad=hf;Ic=$APP.y(Ic);ib=Jb;Jb=Ad}else{var Oj=!0===hf,Se=$APP.t.h(hf);Ad=Y8(l,Jb,$APP.ie.g(f,Jb));var eh=$APP.ie.g(f,Jb),Pj=t9(Se,Vd,Jb,eh,oc),ug=$APP.nf(Pj),Qj=$APP.ie.g(ug,p9),vg=$APP.ie.g(ug,q9),Rj=$APP.ie.g(ug,
r9),Te=$APP.ie.g(ug,o9),Mi=$APP.ie.g(ug,s9);if($APP.r(function(){var Xd=Qj;return $APP.r(Xd)?Xd:Rj}())){var xc=$APP.sa(Se,"--"),Ni=xc&&$APP.yd.g("--",Se);if(Ni){var Sj=$APP.y(Ic);return new $APP.H(null,3,5,$APP.I,[function(){var Xd=ib;return Sj?$APP.Vn.B(Xd,$APP.Ut,new $APP.H(null,2,5,$APP.I,[v9,h9],null),$APP.lg(Sj)):Xd}(),Jb,oc],null)}var Oi=xc?$APP.ii.g(Se,2):$APP.dk(Se,/^(:|-|)/,""),Ie=xc?$APP.oq.g(Oi,/=/):new $APP.H(null,1,5,$APP.I,[Oi],null),jd=$APP.A.l(Ie,0,null),Nd=$APP.A.l(Ie,1,null),Fb=
$APP.ui.h(jd),mc=$APP.ie.l(k,Fb,Fb);if($APP.r(Nd))oc=Z8(ib,Jb,oc,Ad),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),ct=t9(Wd,Te,Jb,eh,oc);if($APP.r(function(){var Xd=p9.h(ct);return $APP.r(Xd)?Xd:$APP.Sd(lb)}()))if($APP.r(vg)){var dt=$APP.Yh(mc);oc=$APP.zr.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,Af,dt,lb,Wd,ct,Oi,Ie,jd,Nd,Fb,mc,xc,Ni,Oj,Se,Ad,eh,Pj,ug,Qj,vg,Rj,Te,Mi,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([dt]));Ic=$APP.N.g(oc,lb);Vd=Te;oc=Jb=null}else Ic=$APP.ke(v,mc)?null:$APP.cD($APP.t.h(mc),":no-"),Vd=$APP.r(Ic)?$APP.ui.h($APP.dk($APP.t.h(mc),":no-","")):mc,Ic=$APP.Le($APP.Za(Ic),lb),Jb=Z8(ib,Jb,oc,Ad),Ad=Vd,Vd=Te,ib=Jb,Jb=Ad;else Jb=Z8(ib,Jb,oc,Ad),Ad=mc,Vd=Te,Ic=lb,ib=Jb,Jb=Ad}}else if(Ni=$APP.yd.g(m9,eh)&&$APP.Ao.g(Se,"true")&&$APP.Ao.g(Se,"false")||$APP.yd.g(oc,Jb)&&$APP.Za(Ad))if(Af=$APP.r(Ic)?$APP.r(Af)?k9(Ic,Af):new $APP.q(null,
1,[h9,Ic],null):new $APP.q(null,1,[h9,Ic],null),Vd=$APP.nf(Af),Af=$APP.ie.g(Vd,h9),Vd=$APP.ie.g(Vd,j9),$APP.Ao.g(Ic,Af))Ad=Vd,Vd=Te,Ic=Af,Af=Ad;else return new $APP.H(null,3,5,$APP.I,[$APP.Vn.B(ib,$APP.Ut,new $APP.H(null,2,5,$APP.I,[v9,h9],null),$APP.lg(Ic)),Jb,oc],null);else{try{var pd=$8(ib,Jb,Ad,S8(eh),Se,Oj)}catch(Xd){c(new $APP.q(null,4,[C9,a9,A9,$APP.qD(Xd),D9,Jb,E9,Se],null)),pd=ib}oc=$APP.r(function(){var Xd=$APP.yd.g(n9,Te);return Xd?Mi:Xd}())?null:Jb;Ad=$APP.r(function(){var Xd=$APP.yd.g(n9,
Te);return Xd?Mi:Xd}())?null:Jb;Vd=Te;Ic=$APP.y(Ic);ib=pd;Jb=oc;oc=Ad}}}}(),ea=$APP.A.l(K,0,null),ia=$APP.A.l(K,1,null),ha=$APP.A.l(K,2,null),qa=Y8(l,ia,$APP.ie.g(f,ia)),ra=function(){var ib=Z8(ea,ia,ha,qa);return $APP.w(ba)?$APP.Vn.B(ib,$APP.Hk,new $APP.H(null,2,5,$APP.I,[v9,h9],null),function(Jb){return $APP.Qg.g($APP.lg(ba),Jb)}):ib}(),ua=$APP.r(h)?$APP.Od($APP.Kk.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,[C9,x9,A9,["Unknown option: ",$APP.t.h(Da)].join(""),x9,C,D9,Da],null));xa+=1}else if(a=$APP.w(a))b=a,$APP.be(b)?(a=$APP.wc(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,[C9,x9,A9,["Unknown option: ",$APP.t.h(a)].join(""),x9,C,D9,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.kD(ua,Da))||c(new $APP.q(null,4,[C9,$APP.JB,A9,["Required option: ",$APP.t.h(Da)].join(""),
$APP.JB,m,D9,Da],null)),xa+=1;else if(a=$APP.w(a))b=a,$APP.be(b)?(a=$APP.wc(b),xa=$APP.yc(b),b=a,va=$APP.xd(a),a=xa):(a=$APP.x(b),$APP.r($APP.kD(ua,a))||c(new $APP.q(null,4,[C9,$APP.JB,A9,["Required option: ",$APP.t.h(a)].join(""),$APP.JB,m,D9,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),hb=$APP.A.l(Xa,0,null),mb=$APP.A.l(Xa,1,null),Ib=function(){var ib=(ib=$APP.Zd(mb))?F9.h(mb):ib;return $APP.r(ib)?ib:mb}(),
Wb=$APP.kD(ua,hb);if($APP.r(Wb)){var zc=Wb,Db=$APP.A.l(zc,0,null),se=$APP.A.l(zc,1,null);if(!$APP.r(Ib.h?Ib.h(se):Ib.call(null,se))){var Ii=function(){var ib=G9.h(mb);return $APP.r(ib)?ib:function(){return function(Jb){var oc=$APP.nf(Jb);Jb=$APP.ie.g(oc,D9);oc=$APP.ie.g(oc,E9);return["Invalid value for option ",$APP.t.h(Jb),": ",$APP.t.h(oc)].join("")}}(ya,wa,La,Qa,ib,zc,Db,se,Wb,Ib,Xa,hb,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,[C9,c9,
A9,function(){var ib=new $APP.q(null,2,[D9,hb,E9,se],null);return Ii.h?Ii.h(ib):Ii.call(null,ib)}(),c9,G,D9,hb,E9,se],null))}}Qa+=1}else{var Lj=$APP.w(ya);if(Lj){var ch=Lj;if($APP.be(ch))va=$APP.wc(ch),a=$APP.yc(ch),b=va,va=$APP.xd(va),ya=a,wa=b,La=va;else{var Ji=$APP.x(ch),Ki=$APP.A.l(Ji,0,null),ci=$APP.A.l(Ji,1,null),Li=function(){var ib=(ib=$APP.Zd(ci))?F9.h(ci):ib;return $APP.r(ib)?ib:ci}(),Mj=$APP.kD(ua,Ki);if($APP.r(Mj)){var nc=Mj,di=$APP.A.l(nc,0,null),dh=$APP.A.l(nc,1,null);if(!$APP.r(Li.h?
Li.h(dh):Li.call(null,dh))){var Nj=function(){var ib=G9.h(ci);return $APP.r(ib)?ib:function(){return function(Jb){var oc=$APP.nf(Jb);Jb=$APP.ie.g(oc,D9);oc=$APP.ie.g(oc,E9);return["Invalid value for option ",$APP.t.h(Jb),": ",$APP.t.h(oc)].join("")}}(ya,wa,La,Qa,ib,nc,di,dh,Mj,Li,Ji,Ki,ci,ch,Lj,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,[C9,c9,A9,function(){var ib=new $APP.q(null,2,[D9,Ki,E9,dh],null);return Nj.h?Nj.h(ib):Nj.call(null,ib)}(),
c9,G,D9,Ki,E9,dh],null))}}ya=$APP.y(ch);wa=null;La=0}Qa=0}else break}return ua},I9=function(a,b){a=H9(a,b);b=v9.h($APP.Pd(a));return $APP.yi.l(b,$APP.PD,$APP.Lk.g(a,v9))},J9=function(a,b){var c=$APP.mD($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},N9=function(a,b){$APP.Of(K9,!1);a.setPrompt([$APP.t.h($APP.aq),"\x3d\x3e "].join(""));a.prompt();return $APP.sD($APP.Rb(L9))?null:M9.g?M9.g(b,a):M9.call(null,b,a)},O9=function(a){var b=$APP.vk(a);a=$APP.wk(a);var c=
$APP.rD($APP.Rb(L9));b=$APP.Cq.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(L9,$APP.fp.g("\n",$APP.Le(a,c)))},P9=function(a){var b=[".repl/",$APP.t.h($APP.Wm.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)})},
R9=function(a,b,c){var d=function(){var f=$APP.aq;$APP.aq=$APP.Rb(Q9);try{return $APP.yt($APP.Cs.j($APP.B([a])),null)}finally{$APP.aq=f}}(),e=$APP.nf(d);d=$APP.ie.g(e,$APP.xt);e=$APP.ie.g(e,$APP.Q);$APP.Of(Q9,e);return P9(d).then(function(){esm_import$squint_cljs$core.println(globalThis._repl);return N9(b,c)}).catch(function(f){esm_import$squint_cljs$core.println(f);return N9(b,c)})},M9=function(a,b){if($APP.r(function(){var e=$APP.Rb(K9);return $APP.r(e)?e:$APP.sD($APP.Rb(L9))}()))return null;$APP.Of(K9,
!0);var c=$APP.Vo($APP.Rb(L9)),d=function(){try{return $APP.Xo(c,$APP.Uo($APP.mf))}catch(f){var e=f;if(-1!=$APP.qD(e).indexOf("EOF while reading"))return S9;O9(c);$APP.MD.j($APP.B([$APP.t.h(e)]));return T9}}();if($APP.yd.g(T9,d))return N9(b,a);if($APP.yd.g(S9,d))return $APP.Of(K9,!1);O9(c);return $APP.yd.g($APP.Wo,d)?$APP.Of(K9,!1):R9(d,b,a)},U9=function(a){a.on("line",function(b){$APP.ej.B(L9,$APP.t,b,"\n");return M9(null,a)})},W9=function(a,b){var c=$APP.GD.h(a);if($APP.r(c)&&"string"!==typeof c)throw Error("output-dir must be a string");
return $APP.r(V9.h(a))?($APP.ND.j($APP.B(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])),$APP.ND(),$APP.ND.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.ND.j($APP.B(["[squint] Compiling CLJS file:",e]));return $APP.HD($APP.yi.l(a,$APP.CD,e))}).then(function(f){f=$APP.nf(f);
f=$APP.ie.g(f,$APP.ED);$APP.ND.j($APP.B(["[squint] Wrote JS file:",f]));return f})},null,b)},r9=new $APP.F(null,"kwd-opt","kwd-opt",1313309243),l9=new $APP.F(null,"hyphens","hyphens",2113533609),u9=new $APP.F(null,"spec","spec",347520401),a9=new $APP.F(null,"coerce","coerce",1917884504),x9=new $APP.F(null,"restrict","restrict",-1071101511),n9=new $APP.F(null,"keywords","keywords",1526959054),o9=new $APP.F(null,"mode","mode",654403691),T9=new $APP.F("squint.repl.node","continue","squint.repl.node/continue",
1558138730),A9=new $APP.F(null,"msg","msg",-1386103444),X9=new $APP.F(null,"show","show",-576705889),m9=new $APP.F(null,"boolean","boolean",-1919418404),U8=new $APP.F(null,"input","input",556931961),Y9=new $APP.F(null,"rest-cmds","rest-cmds",-423198324),v9=new $APP.F("org.babashka","cli","org.babashka/cli",1162430315),j9=new $APP.F(null,"args-\x3eopts","args-\x3eopts",964391046),b9=new $APP.F(null,"alias","alias",-2039751630),w9=new $APP.F(null,"collect","collect",-284321549),Z9=new $APP.F(null,"no-run",
"no-run",-1534313596),c9=new $APP.F(null,"validate","validate",-201300827),q9=new $APP.F(null,"composite-opt","composite-opt",-2021292928),p9=new $APP.F(null,"hyphen-opt","hyphen-opt",1836909464),V9=new $APP.F(null,"help","help",-439233446),C9=new $APP.F(null,"cause","cause",231901252),s9=new $APP.F(null,"fst-colon","fst-colon",1618567071),V8=new $APP.F(null,"coerce-fn","coerce-fn",-821146515),h9=new $APP.F(null,"args","args",1315556576),f9=new $APP.F(null,"no-keyword-opts","no-keyword-opts",761286018),
E9=new $APP.F(null,"value","value",305978217),F9=new $APP.F(null,"pred","pred",1927423397),y9=new $APP.F(null,"closed","closed",-919675359),S9=new $APP.F("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),z9=new $APP.F(null,"error-fn","error-fn",-171437615),D9=new $APP.F(null,"option","option",65132272),d9=new $APP.F(null,"exec-args","exec-args",-1860766354),G9=new $APP.F(null,"ex-msg","ex-msg",-1111774387),K8=new $APP.F(null,"s","s",1705939918),B9=new $APP.F(null,
"cmds-opts","cmds-opts",-390130362),$9=new $APP.F(null,"h","h",1109658740),a$=new $APP.F(null,"e","e",1381269198),g9=new $APP.F(null,"cmds","cmds",-1841503952);var L9=$APP.$i.h(""),K9=$APP.$i.h(!1),b$,c$=process.stdout.isTTY;b$=$APP.r(c$)?process.stdin.setRawMode:c$;var Q9=$APP.$i.h($APP.aq),d$=function d$(a){switch(arguments.length){case 0:return d$.v();case 1:return d$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};d$.v=function(){return d$.h(null)};
d$.h=function(){$APP.aq=$APP.ww;$APP.Sp=$APP.rp=!0;$APP.r(b$)&&process.stdin.setRawMode(!0);return P9("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});U9(b);b.setPrompt([$APP.t.h($APP.aq),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};d$.m=1;var e$=new $APP.H(null,4,5,$APP.I,[new $APP.q(null,3,[g9,new $APP.H(null,1,5,$APP.I,["run"],null),$APP.ko,function(a){a=$APP.nf(a);a=$APP.ie.g(a,$APP.PD);var b=$APP.nf(a),c=$APP.ie.g(b,$APP.Vk);b=$APP.ie.g(b,V9);if($APP.r(b))return null;$APP.ND.j($APP.B(["[squint] Running",c]));return $APP.HD($APP.yi.l(a,$APP.CD,c)).then(function(d){d=$APP.nf(d);d=$APP.ie.g(d,$APP.ED);d=$APP.r(esm_import$path.isAbsolute(d))?d:[$APP.t.h(process.cwd()),"/",$APP.t.h(d)].join("");return shadow_esm_import(d)})},B9,new $APP.H(null,
1,5,$APP.I,[$APP.Vk],null)],null),new $APP.q(null,3,[g9,new $APP.H(null,1,5,$APP.I,["compile"],null),a9,new $APP.q(null,3,[$APP.et,m9,$APP.ft,m9,$APP.GD,$APP.il],null),$APP.ko,function(a){var b=$APP.nf(a);a=$APP.ie.g(b,Y9);b=$APP.ie.g(b,$APP.PD);return W9(b,a)}],null),new $APP.q(null,2,[g9,new $APP.H(null,1,5,$APP.I,["repl"],null),$APP.ko,d$],null),new $APP.q(null,2,[g9,$APP.kg,$APP.ko,function(a){a=$APP.nf(a);var b=$APP.ie.g(a,Y9),c=$APP.ie.g(a,$APP.PD);a=a$.h(c);if($APP.r(a)){if($APP.r(V9.h(c)))return $APP.ND.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.bD.g(a,new $APP.q(null,1,[$APP.it,$APP.$i.h(new $APP.q(null,1,[$APP.fo,$APP.ww],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(X9.h(c))&&$APP.ND.j($APP.B([a]));if($APP.r(Z9.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=
V9.h(c);return $APP.r(f)?f:$APP.yd.g("help",$APP.x(b))||$APP.Sd(b)}())?$APP.ND.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."])):W9(c,b)}],null)],null);(function(){var a=new $APP.q(null,1,[$APP.QD,new $APP.q(null,1,[$9,V9],null)],null),b=i9(process.argv.slice(2),a),c=$APP.nf(b),d=$APP.ie.g(c,g9),e=$APP.ie.g(c,h9);return $APP.qe.l(function(f,k){f=$APP.nf(k);var l=$APP.ie.g(f,g9),m=$APP.ie.g(f,$APP.ko),h=J9(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=I9(k,J8(a,$APP.B([f])));k=$APP.nf(f);var p=$APP.ie.g(k,$APP.PD);f=$APP.ie.g(k,h9);k=$APP.ie.g(k,g9);var n=$APP.N.g(k,f);return $APP.kd(function(){var v=
$APP.yi.j(c,h9,n,$APP.B([Y9,n,$APP.PD,p,$APP.Oo,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,e$)})();
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$path from"path";
var H8=function(a,b){return $APP.Zd(a)&&$APP.Zd(b)?$APP.Kk.j($APP.B([a,b])):$APP.Td(a)&&($APP.Vd(a)||$APP.Ud(a))&&$APP.Td(b)&&($APP.Vd(b)||$APP.Ud(b))?$APP.Qg.g(a,b):b},I8=function(a,b){return $APP.qe.l(function(c,d){return $APP.KD.j(H8,$APP.B([c,d]))},a,b)},K8=function(a){throw $APP.Yk.g(["Unexpected format: ",$APP.t.h(a)].join(""),new $APP.q(null,1,[J8,a],null));},L8=function(a){var b=JSON.parse(a);return $APP.de(b)?b:K8(a)},M8=function(a){var b=JSON.parse(a);return $APP.eD(b)?b:K8(a)},N8=function(a){var b=
JSON.parse(a);return $APP.fD(b)?b:K8(a)},O8=function(a){var b=JSON.parse(a);return"number"===typeof b?b:K8(a)},P8=function(a){return"string"===typeof a?$APP.A.l(a,0,null):null},Q8=function(a){return $APP.yd.g(":",P8(a))?$APP.ui.h($APP.ii.g(a,1)):$APP.ui.h(a)},R8=function(a){return $APP.Td(a)?$APP.x(a):a},S8=function(a){if("string"===typeof a)try{var b=P8(a);if($APP.yd.g("true",a)||$APP.yd.g("false",a))var c=L8(a);else{if($APP.yd.g("nil",a))var d=null;else{if($APP.Za(isNaN(a)))var e=O8(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)?Q8(a):a}d=e}c=d}return c}catch(l){return a}else return a},V8=function(a,b,c,d){throw $APP.Yk.l(["Coerce failure: cannot transform ",$APP.r(b)?"(implicit) true":["input ",$APP.Bs.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,[T8,a,U8,c],null),d);},W8=function(a,b,c){var d=function(){switch(b instanceof $APP.F?b.wa:null){case "boolean":case "bool":return L8;
case "int":case "long":return M8;case "double":return N8;case "number":return O8;case "symbol":return $APP.Di;case "keyword":return Q8;case "string":return $APP.ve;case "edn":return $APP.ND;case "auto":return S8;default:return b}}();if("string"===typeof a)try{var e=d.h?d.h(a):d.call(null,a)}catch(f){e=V8(a,c,b,f)}else e=a;d=e;return $APP.r($APP.r(c)?!0!==d:c)?V8(a,c,b,null):d},X8=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},Y8=function(a,b,c,d){return $APP.Ao.g(b,c)?(c=$APP.jD(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},Z8=function(a,b,c,d,e,f){d=$APP.r($APP.r(d)?!$APP.Td(d):d)?W8(e,d,f):S8(e);return $APP.r(c)?$APP.Fm.B(a,b,c,d):$APP.yi.l(a,b,d)},d9=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,
$8),k=$APP.ie.g(e,a9);c=$APP.ie.g(e,$APP.pm);var l=$APP.ie.g(e,$APP.IB);e=$APP.ie.g(e,b9);b=$APP.r(f)?$APP.Fm.G(b,$8,$APP.yi,d,f):b;b=$APP.r(k)?$APP.Fm.l(b,a9,function(m){if($APP.ke(m,k))throw $APP.Yk.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,[a9,k],null));return $APP.yi.l(m,k,d)}):b;b=$APP.r(l)?$APP.Fm.l(b,$APP.IB,$APP.Mp.g(function(m){return $APP.Ge.g(m,d)},$APP.Sh)):b;b=$APP.r(e)?$APP.Fm.G(b,b9,$APP.yi,d,e):b;return $APP.r(c)?
$APP.Fm.G(b,c9,$APP.yi,d,c):b},$APP.mf,a)},h9=function(a,b){b=$APP.nf(b);var c=$APP.ie.g(b,e9);b=$APP.kD(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,[f9,a,g9,b],null)},j9=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.qq.g(b,a),$APP.Bq.g(c,a)),$APP.Bq.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,[g9,a,i9,b],null)},s9=function(a,b,c,d,e){var f=P8(a),k="string"===typeof a?$APP.A.l(a,1,null):null,l;if(l=$APP.yd.g(f,"-")){try{var m=O8($APP.t.h(k))}catch(h){m=null}l=$APP.Za(m)}b=$APP.r(b)?b:l?k9:null;f=$APP.yd.g(":",f);c=$APP.Ao.g(k9,b)&&f&&($APP.yd.g(l9,d)||$APP.Za(c)||$APP.yd.g(e,c));d=$APP.r(b)?b:c?m9:null;a=l?$APP.r(k)?$APP.Ao.g("-",k)&&2<$APP.xd(a):k:null;return new $APP.q(null,
5,[n9,d,o9,l,p9,a,q9,c,r9,f],null)},G9=function(a,b){function c(ib){ib=$APP.Kk.j($APP.B([new $APP.q(null,2,[t9,d,$APP.Sk,u9],null),ib]));return O.h?O.h(ib):O.call(null,ib)}var d=t9.h(b),e=$APP.r(d)?I8(b,$APP.B([d9(d)])):b,f=$8.h(e),k=function(){var ib=a9.h(e);return $APP.r(ib)?ib:$APP.PD.h(e)}(),l=v9.h(e),m=$APP.IB.h(e),h=c9.h(e),p=e9.h(e),n=function(){var ib=w9.h(e);return $APP.r(ib)?ib:x9.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=b9.h(e),O=function(){var ib=y9.h(e);return $APP.r(ib)?ib:function(Jb){Jb=$APP.nf(Jb);var oc=$APP.ie.g(Jb,z9);throw $APP.Yk.g(oc,Jb);}}(),P=h9(a,null),V=$APP.nf(P),aa=$APP.ie.g(V,f9),da=$APP.ie.g(V,g9),ja=function(){var ib=i9.h(e);ib=$APP.r(ib)?ib:A9.h(e);return $APP.r(ib)?j9(aa,ib):new $APP.q(null,2,[i9,null,g9,da],null)}(),oa=$APP.nf(ja),ca=$APP.ie.g(oa,g9),E=$APP.ie.g(oa,i9),z=$APP.Ao.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,Wd=$APP.r(p)?k9:null,Ic=$APP.w(J),Af=E;;){if($APP.Za(Ic))return new $APP.H(null,3,5,$APP.I,[ib,Jb,oc],null);var hf=$APP.x(Ic),uc=hf instanceof $APP.F;if(uc){Jb=Y8(ib,Jb,oc,null);var Bd=hf;Ic=$APP.y(Ic);ib=Jb;Jb=Bd}else{var Pj=!0===hf,Se=$APP.t.h(hf);Bd=X8(l,Jb,$APP.ie.g(f,Jb));var fh=$APP.ie.g(f,Jb),Qj=s9(Se,Wd,Jb,fh,oc),tg=$APP.nf(Qj),Rj=$APP.ie.g(tg,o9),ug=$APP.ie.g(tg,p9),Sj=$APP.ie.g(tg,
q9),Te=$APP.ie.g(tg,n9),Ni=$APP.ie.g(tg,r9);if($APP.r(function(){var Yd=Rj;return $APP.r(Yd)?Yd:Sj}())){var xc=$APP.sa(Se,"--"),Oi=xc&&$APP.yd.g("--",Se);if(Oi){var Tj=$APP.y(Ic);return new $APP.H(null,3,5,$APP.I,[function(){var Yd=ib;return Tj?$APP.Vn.B(Yd,$APP.Tt,new $APP.H(null,2,5,$APP.I,[u9,g9],null),$APP.lg(Tj)):Yd}(),Jb,oc],null)}var Pi=xc?$APP.ii.g(Se,2):$APP.dk(Se,/^(:|-|)/,""),He=xc?$APP.nq.g(Pi,/=/):new $APP.H(null,1,5,$APP.I,[Pi],null),jd=$APP.A.l(He,0,null),Od=$APP.A.l(He,1,null),Fb=
$APP.ui.h(jd),mc=$APP.ie.l(k,Fb,Fb);if($APP.r(Od))oc=Y8(ib,Jb,oc,Bd),Jb=mc,Wd=Te,Ic=$APP.Le(Od,$APP.bd(Ic)),ib=oc,oc=null;else{var lb=$APP.y(Ic),Xd=$APP.x(lb),ct=s9(Xd,Te,Jb,fh,oc);if($APP.r(function(){var Yd=o9.h(ct);return $APP.r(Yd)?Yd:$APP.Sd(lb)}()))if($APP.r(ug)){var dt=$APP.Yh(mc);oc=$APP.yr.j(function(){return function(Yd){return new $APP.H(null,2,5,$APP.I,[["-",$APP.t.h(Yd)].join(""),!0],null)}}(ib,Jb,oc,Wd,Ic,Af,dt,lb,Xd,ct,Pi,He,jd,Od,Fb,mc,xc,Oi,Pj,Se,Bd,fh,Qj,tg,Rj,ug,Sj,Te,Ni,hf,uc,
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([dt]));Ic=$APP.N.g(oc,lb);Wd=Te;oc=Jb=null}else Ic=$APP.ke(v,mc)?null:$APP.bD($APP.t.h(mc),":no-"),Wd=$APP.r(Ic)?$APP.ui.h($APP.dk($APP.t.h(mc),":no-","")):mc,Ic=$APP.Le($APP.Za(Ic),lb),Jb=Y8(ib,Jb,oc,Bd),Bd=Wd,Wd=Te,ib=Jb,Jb=Bd;else Jb=Y8(ib,Jb,oc,Bd),Bd=mc,Wd=Te,Ic=lb,ib=Jb,Jb=Bd}}else if(Oi=$APP.yd.g(l9,fh)&&$APP.Ao.g(Se,"true")&&$APP.Ao.g(Se,"false")||$APP.yd.g(oc,Jb)&&$APP.Za(Bd))if(Af=$APP.r(Ic)?$APP.r(Af)?j9(Ic,Af):new $APP.q(null,
1,[g9,Ic],null):new $APP.q(null,1,[g9,Ic],null),Wd=$APP.nf(Af),Af=$APP.ie.g(Wd,g9),Wd=$APP.ie.g(Wd,i9),$APP.Ao.g(Ic,Af))Bd=Wd,Wd=Te,Ic=Af,Af=Bd;else return new $APP.H(null,3,5,$APP.I,[$APP.Vn.B(ib,$APP.Tt,new $APP.H(null,2,5,$APP.I,[u9,g9],null),$APP.lg(Ic)),Jb,oc],null);else{try{var pd=Z8(ib,Jb,Bd,R8(fh),Se,Pj)}catch(Yd){c(new $APP.q(null,4,[B9,$8,z9,$APP.pD(Yd),C9,Jb,D9,Se],null)),pd=ib}oc=$APP.r(function(){var Yd=$APP.yd.g(m9,Te);return Yd?Ni:Yd}())?null:Jb;Bd=$APP.r(function(){var Yd=$APP.yd.g(m9,
Te);return Yd?Ni:Yd}())?null:Jb;Wd=Te;Ic=$APP.y(Ic);ib=pd;Jb=oc;oc=Bd}}}}(),ea=$APP.A.l(K,0,null),ia=$APP.A.l(K,1,null),ha=$APP.A.l(K,2,null),qa=X8(l,ia,$APP.ie.g(f,ia)),ra=function(){var ib=Y8(ea,ia,ha,qa);return $APP.w(ba)?$APP.Vn.B(ib,$APP.Hk,new $APP.H(null,2,5,$APP.I,[u9,g9],null),function(Jb){return $APP.Qg.g($APP.lg(ba),Jb)}):ib}(),ua=$APP.r(h)?$APP.Nd($APP.Kk.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,[B9,w9,z9,["Unknown option: ",$APP.t.h(Da)].join(""),w9,C,C9,Da],null));xa+=1}else if(a=$APP.w(a))b=a,$APP.be(b)?(a=$APP.wc(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,[B9,w9,z9,["Unknown option: ",$APP.t.h(a)].join(""),w9,C,C9,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.jD(ua,Da))||c(new $APP.q(null,4,[B9,$APP.IB,z9,["Required option: ",$APP.t.h(Da)].join(""),
$APP.IB,m,C9,Da],null)),xa+=1;else if(a=$APP.w(a))b=a,$APP.be(b)?(a=$APP.wc(b),xa=$APP.yc(b),b=a,va=$APP.xd(a),a=xa):(a=$APP.x(b),$APP.r($APP.jD(ua,a))||c(new $APP.q(null,4,[B9,$APP.IB,z9,["Required option: ",$APP.t.h(a)].join(""),$APP.IB,m,C9,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))?E9.h(mb):ib;return $APP.r(ib)?ib:mb}(),
Wb=$APP.jD(ua,gb);if($APP.r(Wb)){var zc=Wb,Db=$APP.A.l(zc,0,null),se=$APP.A.l(zc,1,null);if(!$APP.r(Ib.h?Ib.h(se):Ib.call(null,se))){var Ji=function(){var ib=F9.h(mb);return $APP.r(ib)?ib:function(){return function(Jb){var oc=$APP.nf(Jb);Jb=$APP.ie.g(oc,C9);oc=$APP.ie.g(oc,D9);return["Invalid value for option ",$APP.t.h(Jb),": ",$APP.t.h(oc)].join("")}}(ya,wa,La,Qa,ib,zc,Db,se,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,[B9,b9,
z9,function(){var ib=new $APP.q(null,2,[C9,gb,D9,se],null);return Ji.h?Ji.h(ib):Ji.call(null,ib)}(),b9,G,C9,gb,D9,se],null))}}Qa+=1}else{var Mj=$APP.w(ya);if(Mj){var dh=Mj;if($APP.be(dh))va=$APP.wc(dh),a=$APP.yc(dh),b=va,va=$APP.xd(va),ya=a,wa=b,La=va;else{var Ki=$APP.x(dh),Li=$APP.A.l(Ki,0,null),ci=$APP.A.l(Ki,1,null),Mi=function(){var ib=(ib=$APP.Zd(ci))?E9.h(ci):ib;return $APP.r(ib)?ib:ci}(),Nj=$APP.jD(ua,Li);if($APP.r(Nj)){var nc=Nj,di=$APP.A.l(nc,0,null),eh=$APP.A.l(nc,1,null);if(!$APP.r(Mi.h?
Mi.h(eh):Mi.call(null,eh))){var Oj=function(){var ib=F9.h(ci);return $APP.r(ib)?ib:function(){return function(Jb){var oc=$APP.nf(Jb);Jb=$APP.ie.g(oc,C9);oc=$APP.ie.g(oc,D9);return["Invalid value for option ",$APP.t.h(Jb),": ",$APP.t.h(oc)].join("")}}(ya,wa,La,Qa,ib,nc,di,eh,Nj,Mi,Ki,Li,ci,dh,Mj,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,[B9,b9,z9,function(){var ib=new $APP.q(null,2,[C9,Li,D9,eh],null);return Oj.h?Oj.h(ib):Oj.call(null,ib)}(),
b9,G,C9,Li,D9,eh],null))}}ya=$APP.y(dh);wa=null;La=0}Qa=0}else break}return ua},H9=function(a,b){a=G9(a,b);b=u9.h($APP.Pd(a));return $APP.yi.l(b,$APP.OD,$APP.Lk.g(a,u9))},I9=function(a,b){var c=$APP.lD($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},M9=function(a,b){$APP.Of(J9,!1);a.setPrompt([$APP.t.h($APP.$p),"\x3d\x3e "].join(""));a.prompt();return $APP.rD($APP.Rb(K9))?null:L9.g?L9.g(b,a):L9.call(null,b,a)},N9=function(a){var b=$APP.vk(a);a=$APP.wk(a);var c=
$APP.qD($APP.Rb(K9));b=$APP.Bq.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(K9,$APP.fp.g("\n",$APP.Le(a,c)))},P9=function(a,b,c){var d=function(){var f=$APP.$p;$APP.$p=$APP.Rb(O9);try{a:{var k=$APP.Ka;$APP.Ka=!0;try{var l=$APP.Bs.j($APP.B([a]));break a}finally{$APP.Ka=k}l=void 0}return $APP.xt(l,new $APP.q(null,2,[$APP.ap,$APP.$o,$APP.bt,!0],null))}finally{$APP.$p=f}}(),e=$APP.nf(d);d=$APP.ie.g(e,$APP.wt);e=$APP.ie.g(e,$APP.Q);d=$APP.dk("(async function () {\n%s\n}) ()",
"%s",d);$APP.Of(O9,e);return Promise.resolve(eval(d)).then(function(f){esm_import$squint_cljs$core.println(f);return L9.g?L9.g(c,b):L9.call(null,c,b)}).catch(function(f){esm_import$squint_cljs$core.println(f);return M9(b,c)})},L9=function(a,b){if($APP.r(function(){var e=$APP.Rb(J9);return $APP.r(e)?e:!$APP.rD($APP.Rb(K9))}())){$APP.Of(J9,!0);var c=$APP.Vo($APP.Rb(K9)),d=function(){try{return $APP.Xo(c,$APP.kt)}catch(f){var e=f;if(-1!=$APP.pD(e).indexOf("EOF while reading"))return Q9;N9(c);$APP.LD.j($APP.B([$APP.t.h(e)]));
return R9}}();if($APP.yd.g(R9,d))return M9(b,a);if($APP.yd.g(Q9,d))return $APP.Of(J9,!1);N9(c);return $APP.yd.g($APP.Wo,d)?M9(b,a):P9(d,b,a)}return null},S9=function(a){a.on("line",function(b){$APP.ej.B(K9,$APP.t,b,"\n");return L9(null,a)})},U9=function(a,b){var c=$APP.FD.h(a);if($APP.r(c)&&"string"!==typeof c)throw Error("output-dir must be a string");return $APP.r(T9.h(a))?($APP.MD.j($APP.B(["Usage: squint compile \x3cfiles\x3e \x3copts\x3e"])),$APP.MD(),$APP.MD.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.MD.j($APP.B(["[squint] Compiling CLJS file:",e]));return $APP.GD($APP.yi.l(a,$APP.BD,e))}).then(function(f){f=$APP.nf(f);f=$APP.ie.g(f,$APP.DD);$APP.MD.j($APP.B(["[squint] Wrote JS file:",f]));return f})},null,b)},q9=new $APP.F(null,"kwd-opt","kwd-opt",1313309243),k9=new $APP.F(null,"hyphens","hyphens",2113533609),t9=new $APP.F(null,"spec","spec",347520401),$8=new $APP.F(null,"coerce","coerce",1917884504),w9=new $APP.F(null,"restrict",
"restrict",-1071101511),m9=new $APP.F(null,"keywords","keywords",1526959054),n9=new $APP.F(null,"mode","mode",654403691),R9=new $APP.F("squint.repl.node","continue","squint.repl.node/continue",1558138730),z9=new $APP.F(null,"msg","msg",-1386103444),V9=new $APP.F(null,"show","show",-576705889),l9=new $APP.F(null,"boolean","boolean",-1919418404),T8=new $APP.F(null,"input","input",556931961),W9=new $APP.F(null,"rest-cmds","rest-cmds",-423198324),u9=new $APP.F("org.babashka","cli","org.babashka/cli",
1162430315),i9=new $APP.F(null,"args-\x3eopts","args-\x3eopts",964391046),a9=new $APP.F(null,"alias","alias",-2039751630),v9=new $APP.F(null,"collect","collect",-284321549),X9=new $APP.F(null,"no-run","no-run",-1534313596),b9=new $APP.F(null,"validate","validate",-201300827),p9=new $APP.F(null,"composite-opt","composite-opt",-2021292928),o9=new $APP.F(null,"hyphen-opt","hyphen-opt",1836909464),T9=new $APP.F(null,"help","help",-439233446),B9=new $APP.F(null,"cause","cause",231901252),r9=new $APP.F(null,
"fst-colon","fst-colon",1618567071),U8=new $APP.F(null,"coerce-fn","coerce-fn",-821146515),g9=new $APP.F(null,"args","args",1315556576),e9=new $APP.F(null,"no-keyword-opts","no-keyword-opts",761286018),D9=new $APP.F(null,"value","value",305978217),E9=new $APP.F(null,"pred","pred",1927423397),x9=new $APP.F(null,"closed","closed",-919675359),Q9=new $APP.F("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),y9=new $APP.F(null,"error-fn","error-fn",-171437615),C9=new $APP.F(null,
"option","option",65132272),c9=new $APP.F(null,"exec-args","exec-args",-1860766354),F9=new $APP.F(null,"ex-msg","ex-msg",-1111774387),J8=new $APP.F(null,"s","s",1705939918),A9=new $APP.F(null,"cmds-opts","cmds-opts",-390130362),Y9=new $APP.F(null,"h","h",1109658740),Z9=new $APP.F(null,"e","e",1381269198),f9=new $APP.F(null,"cmds","cmds",-1841503952);var K9=$APP.$i.h(""),J9=$APP.$i.h(!1),$9,a$=process.stdout.isTTY;$9=$APP.r(a$)?process.stdin.setRawMode:a$;var O9=$APP.$i.h($APP.$p),b$=function b$(a){switch(arguments.length){case 0:return b$.v();case 1:return b$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};b$.v=function(){return b$.h(null)};
b$.h=function(){$APP.$p=$APP.vw;$APP.Qp=$APP.Vp=!0;$APP.r($9)&&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});S9(b);b.setPrompt([$APP.t.h($APP.$p),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};b$.m=1;var c$=new $APP.H(null,4,5,$APP.I,[new $APP.q(null,3,[f9,new $APP.H(null,1,5,$APP.I,["run"],null),$APP.ko,function(a){a=$APP.nf(a);a=$APP.ie.g(a,$APP.OD);var b=$APP.nf(a),c=$APP.ie.g(b,$APP.Vk);b=$APP.ie.g(b,T9);if($APP.r(b))return null;$APP.MD.j($APP.B(["[squint] Running",c]));return $APP.GD($APP.yi.l(a,$APP.BD,c)).then(function(d){d=$APP.nf(d);d=$APP.ie.g(d,$APP.DD);d=$APP.r(esm_import$path.isAbsolute(d))?d:[$APP.t.h(process.cwd()),"/",$APP.t.h(d)].join("");return shadow_esm_import(d)})},A9,new $APP.H(null,
1,5,$APP.I,[$APP.Vk],null)],null),new $APP.q(null,3,[f9,new $APP.H(null,1,5,$APP.I,["compile"],null),$8,new $APP.q(null,3,[$APP.bt,l9,$APP.et,l9,$APP.FD,$APP.il],null),$APP.ko,function(a){var b=$APP.nf(a);a=$APP.ie.g(b,W9);b=$APP.ie.g(b,$APP.OD);return U9(b,a)}],null),new $APP.q(null,2,[f9,new $APP.H(null,1,5,$APP.I,["repl"],null),$APP.ko,b$],null),new $APP.q(null,2,[f9,$APP.kg,$APP.ko,function(a){a=$APP.nf(a);var b=$APP.ie.g(a,W9),c=$APP.ie.g(a,$APP.OD);a=Z9.h(c);if($APP.r(a)){if($APP.r(T9.h(c)))return $APP.MD.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.aD.g(a,new $APP.q(null,1,[$APP.ht,$APP.$i.h(new $APP.q(null,1,[$APP.fo,$APP.vw],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(V9.h(c))&&$APP.MD.j($APP.B([a]));if($APP.r(X9.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=
T9.h(c);return $APP.r(f)?f:$APP.yd.g("help",$APP.x(b))||$APP.Sd(b)}())?$APP.MD.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."])):U9(c,b)}],null)],null);(function(){var a=new $APP.q(null,1,[$APP.PD,new $APP.q(null,1,[Y9,T9],null)],null),b=h9(process.argv.slice(2),a),c=$APP.nf(b),d=$APP.ie.g(c,f9),e=$APP.ie.g(c,g9);return $APP.qe.l(function(f,k){f=$APP.nf(k);var l=$APP.ie.g(f,f9),m=$APP.ie.g(f,$APP.ko),h=I9(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=H9(k,I8(a,$APP.B([f])));k=$APP.nf(f);var p=$APP.ie.g(k,$APP.OD);f=$APP.ie.g(k,g9);k=$APP.ie.g(k,f9);var n=$APP.N.g(k,f);return $APP.kd(function(){var v=
$APP.yi.j(c,g9,n,$APP.B([W9,n,$APP.OD,p,$APP.Oo,l]));return m.h?m.h(v):m.call(null,v)}())}return null},null,c$)})();
import { $APP, shadow$provide, $jscomp } from "./compiler.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 dD,nD,oD,pD,tD,AD,BD,ID,KD,uD,zD,DD,FD;$APP.cD=function(a,b){return $APP.sa(a,b)};dD=function(){};$APP.eD=function(a){return null!=a?a.C&512||$APP.Qc===a.be?!0:a.C?!1:$APP.cb($APP.zb,a):$APP.cb($APP.zb,a)};$APP.fD=function(a){return $APP.he(a)||!1};$APP.gD=function(a){return"number"===typeof a};$APP.hD=function(){this.A=[]};$APP.iD=function(a){$APP.oi("\n");return $APP.ie.g(a,$APP.Ga),null};
$APP.jD=function(a,b){var c=$APP.mf;for(b=$APP.w(b);;)if(b){var d=$APP.x(b),e=$APP.ie.l(a,d,$APP.Mz);c=$APP.Ao.g(e,$APP.Mz)?$APP.yi.l(c,d,e):c;b=$APP.y(b)}else return $APP.Vb(c,$APP.Pd(a))};$APP.kD=function(a,b){return(null!=a?$APP.Qc===a.oc||(a.Zc?0:$APP.cb(dD,a)):$APP.cb(dD,a))?$APP.Cb(a,b):null!=a&&$APP.eD(a)&&$APP.ke(a,b)?new $APP.Jg(b,$APP.ie.g(a,b),null):null};$APP.lD=function(a,b){return new $APP.H(null,2,5,$APP.I,[$APP.Hq.g(a,b),$APP.Iq.g(a,b)],null)};
$APP.mD=function(a,b){return new $APP.H(null,2,5,$APP.I,[$APP.Pk.g(a,b),$APP.Cq.g(a,b)],null)};nD=function(){};oD=function(a){if(null!=a&&null!=a.De)a=a.De(a);else{var b=oD[$APP.la(null==a?null:a)];if(null!=b)a=b.h?b.h(a):b.call(null,a);else if(b=oD._,null!=b)a=b.h?b.h(a):b.call(null,a);else throw $APP.eb("IEncodeJS.-clj-\x3ejs",a);}return a};
pD=function(a,b){return(null!=a?$APP.Qc===a.Ce||(a.Zc?0:$APP.cb(nD,a)):$APP.cb(nD,a))?oD(a):"string"===typeof a||"number"===typeof a||a instanceof $APP.F||a instanceof $APP.u?b.h?b.h(a):b.call(null,a):$APP.Cs.j($APP.B([a]))};$APP.qD=function(a){return a instanceof Error?a.message:null};$APP.rD=function(a){return $APP.oq.g(a,/\n|\r\n/)};$APP.sD=function(a){return/^[\s\xa0]*$/.test(null==a?"":String(a))};tD=function(a,b){return $APP.r($APP.r(b)?$APP.Ao.g(b,""):b)?$APP.qm(a,$APP.Ek(b)):null};
AD=function(a){a=$APP.Xo($APP.Vo(a),$APP.lt);if($APP.ee(a)&&$APP.yd.g($APP.yj,$APP.x(a))){a=$APP.w(a);$APP.x(a);a=$APP.y(a);$APP.x(a);a=$APP.y(a);a=$APP.Jf(function(d){var e=$APP.A.l(d,0,null);d=$APP.A.l(d,1,null);return $APP.ee(e)&&$APP.yd.g(uD,$APP.x(e))?new $APP.H(null,2,5,$APP.I,[$APP.bd(e),d],null):null},$APP.vD.l(2,1,a));var b=$APP.A.l(a,0,null),c=$APP.A.l(a,1,null);return $APP.r(b)?shadow_esm_import("./compiler.sci.js").then(function(){var d=$APP.wD.h($APP.Rb($APP.xD));return $APP.qe.l(function(e,
f){return e.then(function(){var k=$APP.w(f),l=$APP.x(k);k=$APP.y(k);k=$APP.nf(k);var m=$APP.ie.g(k,$APP.kq);return Promise.resolve(function(){var h=function(){var n=new $APP.D(null,$APP.NB,new $APP.D(null,new $APP.D(null,$APP.Hj,new $APP.D(null,l,null,1,null),2,null),null,1,null),2,null);return $APP.r(c)?$APP.N.g(n,new $APP.H(null,1,5,$APP.I,[$APP.yD],null)):n}();d.h?d.h(h):d.call(null,h);var p=function(){var n=$APP.U.h($APP.w($APP.N.g(new $APP.D(null,zD,null,1,null),new $APP.D(null,$APP.U.h($APP.w($APP.N.g(new $APP.D(null,
$APP.Hj,null,1,null),new $APP.D(null,l,null,1,null)))),null,1,null))));return d.h?d.h(n):d.call(null,n)}();h=$APP.Nh(p);p=$APP.Ph(p);p=$APP.ti.g($APP.nd,p);h=$APP.Zh(h,p);return $APP.r(m)?$APP.jD(h,m):h}()).then(function(h){return $APP.Ns=$APP.Kk.j($APP.B([$APP.Ns,h]))})})},Promise.resolve(null),b)}):null}return null};BD=function(a,b){return Promise.resolve(AD(a)).then(function(){return $APP.yt(a,b)})};
$APP.HD=function(a){a=$APP.nf(a);var b=$APP.ie.g(a,$APP.CD),c=$APP.ie.g(a,DD),d=$APP.ie.g(a,$APP.ED),e=$APP.ie.g(a,FD),f=$APP.ie.l(a,$APP.GD,"");c=$APP.r(c)?c:esm_import$fs.readFileSync(b,"utf-8");return BD(c,$APP.yi.l(a,$APP.it,$APP.$i.h(new $APP.q(null,1,[$APP.fo,b],null)))).then(function(k){k=$APP.nf(k);var l=$APP.ie.g(k,$APP.xt),m=$APP.ie.g(k,$APP.up),h=esm_import$path,p=h.resolve;$APP.r(d)?m=d:($APP.r(m)?m=".jsx":(m=$APP.r(e)?[".",$APP.dk(e,/^\./,"")].join(""):null,m=$APP.r(m)?m:".mjs"),m=$APP.dk(b,
/.clj(s|c)$/,m));h=p.call(h,f,m);p=esm_import$path.dirname(h);$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.q(null,2,[$APP.GD,f,$APP.ED,h],null));esm_import$fs.writeFileSync(h,l,"utf-8");return $APP.yi.l(k,$APP.ED,h)})};ID=function(a){return $APP.lu.j(a,$APP.B([$APP.mu,!0]))};
KD=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.Yc(f,0,null)}return c.call(this,e)}function c(d){d=$APP.Tt.g(ID,d);d=$APP.Lf.g(a,d);return d instanceof Promise?d.then($APP.JD):$APP.JD(d)}b.m=0;b.o=function(d){d=$APP.w(d);return c(d)};b.j=c;return b}()};$APP.hD.prototype.add=function(a){return this.A.push(a)};$APP.hD.prototype.size=function(){return this.A.length};
$APP.hD.prototype.clear=function(){return this.A=[]};$APP.hD.prototype.Kc=function(){return 0===this.A.length};$APP.LD=function LD(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return LD.j(arguments[0],1<c.length?new $APP.Yc(c.slice(1),0,null):null)};
$APP.LD.j=function(a,b){if($APP.r($APP.Jf($APP.ve,b))){var c=function(d,e){var f=$APP.Hb(e),k=$APP.Kb(e);if($APP.ke(d,f)){e=$APP.yi.l;var l=$APP.ie.g(d,f);k=a.g?a.g(l,k):a.call(null,l,k);d=e.call($APP.yi,d,f,k)}else d=$APP.yi.l(d,f,k);return d};return $APP.qe.g(function(d,e){return $APP.qe.l(c,$APP.r(d)?d:$APP.mf,$APP.w(e))},b)}return null};$APP.LD.m=1;$APP.LD.o=function(a){var b=$APP.x(a);a=$APP.y(a);return this.j(b,a)};
$APP.MD=function MD(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return MD.j(0<c.length?new $APP.Yc(c.slice(0),0,null):null)};$APP.MD.j=function(a){$APP.Ci(a,$APP.Ra());return $APP.r($APP.Sa)?$APP.iD($APP.Ra()):null};$APP.MD.m=0;$APP.MD.o=function(a){return this.j($APP.w(a))};$APP.ND=function ND(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return ND.j(0<c.length?new $APP.Yc(c.slice(0),0,null):null)};
$APP.ND.j=function(a){$APP.Ci(a,$APP.yi.l($APP.Ra(),$APP.Ha,!1));return $APP.r($APP.Sa)?$APP.iD($APP.Ra()):null};$APP.ND.m=0;$APP.ND.o=function(a){return this.j($APP.w(a))};$APP.vD=function vD(a){switch(arguments.length){case 1:return vD.h(arguments[0]);case 2:return vD.g(arguments[0],arguments[1]);case 3:return vD.l(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};
$APP.vD.h=function(a){return function(b){var c=new $APP.hD;return function(){function d(l,m){c.add(m);return a===c.size()?(m=$APP.lg(c.A),c.clear(),b.g?b.g(l,m):b.call(null,l,m)):l}function e(l){if(!$APP.r(c.Kc())){var m=$APP.lg(c.A);c.clear();l=$APP.od(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.vD.g=function(a,b){return $APP.vD.l(a,a,b)};$APP.vD.l=function(a,b,c){return new $APP.Re(null,function(){var d=$APP.w(c);return d?$APP.Le($APP.Pk.g(a,d),$APP.vD.l(a,b,$APP.Cq.g(b,d))):null},null,null)};$APP.vD.m=3;$APP.JD=function JD(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return JD.j(arguments[0],1<c.length?new $APP.Yc(c.slice(1),0,null):null)};
$APP.JD.j=function(a,b){b=$APP.nf(b);var c=$APP.ie.l(b,$APP.FB,$APP.Yh),d=function k(f){if(null==f)return null;if(null!=f?$APP.Qc===f.Ce||(f.Zc?0:$APP.cb(nD,f)):$APP.cb(nD,f))return oD(f);if(f instanceof $APP.F)return c.h?c.h(f):c.call(null,f);if(f instanceof $APP.u)return $APP.t.h(f);if($APP.Zd(f)){var l={};f=$APP.w(f);for(var m=null,h=0,p=0;;)if(p<h){var n=m.V(null,p),v=$APP.A.l(n,0,null);n=$APP.A.l(n,1,null);v=pD(v,d);n=k(n);l[v]=n;p+=1}else if(f=$APP.w(f))$APP.be(f)?(h=$APP.wc(f),f=$APP.yc(f),
m=h,h=$APP.xd(h)):(h=$APP.x(f),m=$APP.A.l(h,0,null),h=$APP.A.l(h,1,null),m=pD(m,d),h=k(h),l[m]=h,f=$APP.y(f),m=null,h=0),p=0;else break;return l}if($APP.Td(f)){l=[];f=$APP.w($APP.ti.g(k,f));m=null;for(p=h=0;;)if(p<h)v=m.V(null,p),l.push(v),p+=1;else if(f=$APP.w(f))m=f,$APP.be(m)?(f=$APP.wc(m),p=$APP.yc(m),m=f,h=$APP.xd(f),f=p):(f=$APP.x(m),l.push(f),f=$APP.y(m),m=null,h=0),p=0;else break;return l}return f};return d(a)};$APP.JD.m=1;
$APP.JD.o=function(a){var b=$APP.x(a);a=$APP.y(a);return this.j(b,a)};$APP.OD=function OD(a){switch(arguments.length){case 1:return OD.h(arguments[0]);case 2:return OD.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.OD.h=function(a){return tD(new $APP.q(null,3,[$APP.om,$APP.Rb($APP.qC),$APP.pm,$APP.Rb($APP.pC),$APP.dl,null],null),a)};
$APP.OD.g=function(a,b){return tD($APP.Fm.l($APP.Kk.j($APP.B([new $APP.q(null,1,[$APP.pm,$APP.Rb($APP.pC)],null),a])),$APP.om,function(c){return $APP.Kk.j($APP.B([$APP.Rb($APP.qC),c]))}),b)};$APP.OD.m=2;$APP.yD=new $APP.F(null,"reload","reload",863702807);$APP.PD=new $APP.F(null,"opts","opts",155075701);$APP.GD=new $APP.F(null,"output-dir","output-dir",-290956991);uD=new $APP.F(null,"require-macros","require-macros",707947416);$APP.CD=new $APP.F(null,"in-file","in-file",-1682176692);
zD=new $APP.u("cljs.core","ns-publics","cljs.core/ns-publics",488240955,null);$APP.wD=new $APP.F(null,"eval-form","eval-form",-1934118476);$APP.QD=new $APP.F(null,"aliases","aliases",1346874714);$APP.ED=new $APP.F(null,"out-file","out-file",-1187066405);DD=new $APP.F(null,"in-str","in-str",-1014658121);FD=new $APP.F(null,"extension","extension",1453374065);var RD;$APP.xD=$APP.$i.h(null);RD=KD(BD);export let compileFile=KD($APP.HD);export let compileString=RD;
import*as esm_import$fs from"fs";import*as esm_import$path from"path";var cD,mD,nD,oD,sD,zD,AD,HD,JD,tD,yD,CD,ED;$APP.bD=function(a,b){return $APP.sa(a,b)};cD=function(){};$APP.dD=function(a){return null!=a?a.C&512||$APP.Qc===a.be?!0:a.C?!1:$APP.cb($APP.zb,a):$APP.cb($APP.zb,a)};$APP.eD=function(a){return $APP.he(a)||!1};$APP.fD=function(a){return"number"===typeof a};$APP.gD=function(){this.A=[]};$APP.hD=function(a){$APP.oi("\n");return $APP.ie.g(a,$APP.Ga),null};
$APP.iD=function(a,b){var c=$APP.mf;for(b=$APP.w(b);;)if(b){var d=$APP.x(b),e=$APP.ie.l(a,d,$APP.Mz);c=$APP.Ao.g(e,$APP.Mz)?$APP.yi.l(c,d,e):c;b=$APP.y(b)}else return $APP.Vb(c,$APP.Pd(a))};$APP.jD=function(a,b){return(null!=a?$APP.Qc===a.oc||(a.Zc?0:$APP.cb(cD,a)):$APP.cb(cD,a))?$APP.Cb(a,b):null!=a&&$APP.dD(a)&&$APP.ke(a,b)?new $APP.Jg(b,$APP.ie.g(a,b),null):null};$APP.kD=function(a,b){return new $APP.H(null,2,5,$APP.I,[$APP.Gq.g(a,b),$APP.Hq.g(a,b)],null)};
$APP.lD=function(a,b){return new $APP.H(null,2,5,$APP.I,[$APP.Pk.g(a,b),$APP.Bq.g(a,b)],null)};mD=function(){};nD=function(a){if(null!=a&&null!=a.De)a=a.De(a);else{var b=nD[$APP.la(null==a?null:a)];if(null!=b)a=b.h?b.h(a):b.call(null,a);else if(b=nD._,null!=b)a=b.h?b.h(a):b.call(null,a);else throw $APP.eb("IEncodeJS.-clj-\x3ejs",a);}return a};
oD=function(a,b){return(null!=a?$APP.Qc===a.Ce||(a.Zc?0:$APP.cb(mD,a)):$APP.cb(mD,a))?nD(a):"string"===typeof a||"number"===typeof a||a instanceof $APP.F||a instanceof $APP.u?b.h?b.h(a):b.call(null,a):$APP.Bs.j($APP.B([a]))};$APP.pD=function(a){return a instanceof Error?a.message:null};$APP.qD=function(a){return $APP.nq.g(a,/\n|\r\n/)};$APP.rD=function(a){return/^[\s\xa0]*$/.test(null==a?"":String(a))};sD=function(a,b){return $APP.r($APP.r(b)?$APP.Ao.g(b,""):b)?$APP.qm(a,$APP.Ek(b)):null};
zD=function(a){a=$APP.Xo($APP.Vo(a),$APP.kt);if($APP.ee(a)&&$APP.yd.g($APP.yj,$APP.x(a))){a=$APP.w(a);$APP.x(a);a=$APP.y(a);$APP.x(a);a=$APP.y(a);a=$APP.Jf(function(d){var e=$APP.A.l(d,0,null);d=$APP.A.l(d,1,null);return $APP.ee(e)&&$APP.yd.g(tD,$APP.x(e))?new $APP.H(null,2,5,$APP.I,[$APP.bd(e),d],null):null},$APP.uD.l(2,1,a));var b=$APP.A.l(a,0,null),c=$APP.A.l(a,1,null);return $APP.r(b)?shadow_esm_import("./compiler.sci.js").then(function(){var d=$APP.vD.h($APP.Rb($APP.wD));return $APP.qe.l(function(e,
f){return e.then(function(){var k=$APP.w(f),l=$APP.x(k);k=$APP.y(k);k=$APP.nf(k);var m=$APP.ie.g(k,$APP.jq);return Promise.resolve(function(){var h=function(){var n=new $APP.D(null,$APP.MB,new $APP.D(null,new $APP.D(null,$APP.Hj,new $APP.D(null,l,null,1,null),2,null),null,1,null),2,null);return $APP.r(c)?$APP.N.g(n,new $APP.H(null,1,5,$APP.I,[$APP.xD],null)):n}();d.h?d.h(h):d.call(null,h);var p=function(){var n=$APP.U.h($APP.w($APP.N.g(new $APP.D(null,yD,null,1,null),new $APP.D(null,$APP.U.h($APP.w($APP.N.g(new $APP.D(null,
$APP.Hj,null,1,null),new $APP.D(null,l,null,1,null)))),null,1,null))));return d.h?d.h(n):d.call(null,n)}();h=$APP.Nh(p);p=$APP.Ph(p);p=$APP.ti.g($APP.nd,p);h=$APP.Zh(h,p);return $APP.r(m)?$APP.iD(h,m):h}()).then(function(h){return $APP.Ms=$APP.Kk.j($APP.B([$APP.Ms,h]))})})},Promise.resolve(null),b)}):null}return null};AD=function(a,b){return Promise.resolve(zD(a)).then(function(){return $APP.xt(a,b)})};
$APP.GD=function(a){a=$APP.nf(a);var b=$APP.ie.g(a,$APP.BD),c=$APP.ie.g(a,CD),d=$APP.ie.g(a,$APP.DD),e=$APP.ie.g(a,ED),f=$APP.ie.l(a,$APP.FD,"");c=$APP.r(c)?c:esm_import$fs.readFileSync(b,"utf-8");return AD(c,$APP.yi.l(a,$APP.ht,$APP.$i.h(new $APP.q(null,1,[$APP.fo,b],null)))).then(function(k){k=$APP.nf(k);var l=$APP.ie.g(k,$APP.wt),m=$APP.ie.g(k,$APP.rp),h=esm_import$path,p=h.resolve;$APP.r(d)?m=d:($APP.r(m)?m=".jsx":(m=$APP.r(e)?[".",$APP.dk(e,/^\./,"")].join(""):null,m=$APP.r(m)?m:".mjs"),m=$APP.dk(b,
/.clj(s|c)$/,m));h=p.call(h,f,m);p=esm_import$path.dirname(h);$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.q(null,2,[$APP.FD,f,$APP.DD,h],null));esm_import$fs.writeFileSync(h,l,"utf-8");return $APP.yi.l(k,$APP.DD,h)})};HD=function(a){return $APP.ku.j(a,$APP.B([$APP.lu,!0]))};
JD=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.Yc(f,0,null)}return c.call(this,e)}function c(d){d=$APP.St.g(HD,d);d=$APP.Lf.g(a,d);return d instanceof Promise?d.then($APP.ID):$APP.ID(d)}b.m=0;b.o=function(d){d=$APP.w(d);return c(d)};b.j=c;return b}()};$APP.gD.prototype.add=function(a){return this.A.push(a)};$APP.gD.prototype.size=function(){return this.A.length};
$APP.gD.prototype.clear=function(){return this.A=[]};$APP.gD.prototype.Kc=function(){return 0===this.A.length};$APP.KD=function KD(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return KD.j(arguments[0],1<c.length?new $APP.Yc(c.slice(1),0,null):null)};
$APP.KD.j=function(a,b){if($APP.r($APP.Jf($APP.ve,b))){var c=function(d,e){var f=$APP.Hb(e),k=$APP.Kb(e);if($APP.ke(d,f)){e=$APP.yi.l;var l=$APP.ie.g(d,f);k=a.g?a.g(l,k):a.call(null,l,k);d=e.call($APP.yi,d,f,k)}else d=$APP.yi.l(d,f,k);return d};return $APP.qe.g(function(d,e){return $APP.qe.l(c,$APP.r(d)?d:$APP.mf,$APP.w(e))},b)}return null};$APP.KD.m=1;$APP.KD.o=function(a){var b=$APP.x(a);a=$APP.y(a);return this.j(b,a)};
$APP.LD=function LD(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return LD.j(0<c.length?new $APP.Yc(c.slice(0),0,null):null)};$APP.LD.j=function(a){$APP.Ci(a,$APP.Ra());return $APP.r($APP.Sa)?$APP.hD($APP.Ra()):null};$APP.LD.m=0;$APP.LD.o=function(a){return this.j($APP.w(a))};$APP.MD=function MD(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return MD.j(0<c.length?new $APP.Yc(c.slice(0),0,null):null)};
$APP.MD.j=function(a){$APP.Ci(a,$APP.yi.l($APP.Ra(),$APP.Ha,!1));return $APP.r($APP.Sa)?$APP.hD($APP.Ra()):null};$APP.MD.m=0;$APP.MD.o=function(a){return this.j($APP.w(a))};$APP.uD=function uD(a){switch(arguments.length){case 1:return uD.h(arguments[0]);case 2:return uD.g(arguments[0],arguments[1]);case 3:return uD.l(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};
$APP.uD.h=function(a){return function(b){var c=new $APP.gD;return function(){function d(l,m){c.add(m);return a===c.size()?(m=$APP.lg(c.A),c.clear(),b.g?b.g(l,m):b.call(null,l,m)):l}function e(l){if(!$APP.r(c.Kc())){var m=$APP.lg(c.A);c.clear();l=$APP.od(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.uD.g=function(a,b){return $APP.uD.l(a,a,b)};$APP.uD.l=function(a,b,c){return new $APP.Re(null,function(){var d=$APP.w(c);return d?$APP.Le($APP.Pk.g(a,d),$APP.uD.l(a,b,$APP.Bq.g(b,d))):null},null,null)};$APP.uD.m=3;$APP.ID=function ID(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return ID.j(arguments[0],1<c.length?new $APP.Yc(c.slice(1),0,null):null)};
$APP.ID.j=function(a,b){b=$APP.nf(b);var c=$APP.ie.l(b,$APP.FB,$APP.Yh),d=function k(f){if(null==f)return null;if(null!=f?$APP.Qc===f.Ce||(f.Zc?0:$APP.cb(mD,f)):$APP.cb(mD,f))return nD(f);if(f instanceof $APP.F)return c.h?c.h(f):c.call(null,f);if(f instanceof $APP.u)return $APP.t.h(f);if($APP.Zd(f)){var l={};f=$APP.w(f);for(var m=null,h=0,p=0;;)if(p<h){var n=m.V(null,p),v=$APP.A.l(n,0,null);n=$APP.A.l(n,1,null);v=oD(v,d);n=k(n);l[v]=n;p+=1}else if(f=$APP.w(f))$APP.be(f)?(h=$APP.wc(f),f=$APP.yc(f),
m=h,h=$APP.xd(h)):(h=$APP.x(f),m=$APP.A.l(h,0,null),h=$APP.A.l(h,1,null),m=oD(m,d),h=k(h),l[m]=h,f=$APP.y(f),m=null,h=0),p=0;else break;return l}if($APP.Td(f)){l=[];f=$APP.w($APP.ti.g(k,f));m=null;for(p=h=0;;)if(p<h)v=m.V(null,p),l.push(v),p+=1;else if(f=$APP.w(f))m=f,$APP.be(m)?(f=$APP.wc(m),p=$APP.yc(m),m=f,h=$APP.xd(f),f=p):(f=$APP.x(m),l.push(f),f=$APP.y(m),m=null,h=0),p=0;else break;return l}return f};return d(a)};$APP.ID.m=1;
$APP.ID.o=function(a){var b=$APP.x(a);a=$APP.y(a);return this.j(b,a)};$APP.ND=function ND(a){switch(arguments.length){case 1:return ND.h(arguments[0]);case 2:return ND.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};$APP.ND.h=function(a){return sD(new $APP.q(null,3,[$APP.om,$APP.Rb($APP.pC),$APP.pm,$APP.Rb($APP.oC),$APP.dl,null],null),a)};
$APP.ND.g=function(a,b){return sD($APP.Fm.l($APP.Kk.j($APP.B([new $APP.q(null,1,[$APP.pm,$APP.Rb($APP.oC)],null),a])),$APP.om,function(c){return $APP.Kk.j($APP.B([$APP.Rb($APP.pC),c]))}),b)};$APP.ND.m=2;$APP.xD=new $APP.F(null,"reload","reload",863702807);$APP.OD=new $APP.F(null,"opts","opts",155075701);$APP.FD=new $APP.F(null,"output-dir","output-dir",-290956991);tD=new $APP.F(null,"require-macros","require-macros",707947416);$APP.BD=new $APP.F(null,"in-file","in-file",-1682176692);
yD=new $APP.u("cljs.core","ns-publics","cljs.core/ns-publics",488240955,null);$APP.vD=new $APP.F(null,"eval-form","eval-form",-1934118476);$APP.PD=new $APP.F(null,"aliases","aliases",1346874714);$APP.DD=new $APP.F(null,"out-file","out-file",-1187066405);CD=new $APP.F(null,"in-str","in-str",-1014658121);ED=new $APP.F(null,"extension","extension",1453374065);var QD;$APP.wD=$APP.$i.h(null);QD=JD(AD);export let compileFile=JD($APP.GD);export let compileString=QD;

@@ -5,3 +5,3 @@ {

"sideEffects": false,
"version": "0.2.25",
"version": "0.2.26",
"files": [

@@ -8,0 +8,0 @@ "core.js",

@@ -69,3 +69,3 @@ ## Squint

- Most functions return arrays and objects, not custom data structures
- Supports async/await:`(def x (js/await y))`. Async functions must be marked
- Supports async/await:`(def x (js-await y))`. Async functions must be marked
with `^:async`: `(defn ^:async foo [])`.

@@ -176,3 +176,3 @@ - `assoc!`, `dissoc!`, `conj!`, etc. perform in place mutation on objects

(def x (js/await (foo)))
(def x (js-await (foo)))

@@ -188,4 +188,31 @@ (println x) ;;=> 10

The JavaScript API exposes the `compileString` function:
``` javascript
import { compileString } from 'squint-cljs';
const f = eval(compileString("(fn [] 1)"
, {"context": "expr",
"elide-imports": true}
));
console.log(f()); // prints 1
```
## REPL
Squint has a console repl which can be started with `squint repl`.
### Emacs
You can use this together with `inf-clojure` in emacs as follows:
In a `.cljs` buffer, type `M-x inf-clojure`. Then enter the startup command `npx
squint repl` (or `bunx --bun repl`) and select the `clojure` or `babashka` type
REPL. REPL away!
## Svelte
A svelte pre-processor for squint can be found [here](https://github.com/jruz/svelte-preprocess-cljs).
License

@@ -192,0 +219,0 @@ =======

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc