squint-cljs 0.8.129 → 0.8.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- var squint;(squint||={}).core=(()=>{var Z=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Me=Object.prototype.hasOwnProperty;var Ee=(t,e)=>{for(var n in e)Z(t,n,{get:e[n],enumerable:!0})},Re=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ve(e))!Me.call(t,o)&&o!==n&&Z(t,o,{get:()=>e[o],enumerable:!(r=Ae(e,o))||r.enumerable});return t};var Se=t=>Re(Z({},"__esModule",{value:!0}),t);var ko={};Ee(ko,{Atom:()=>Ft,Cons:()=>zt,Delay:()=>Ro,IIterable:()=>rt,IIterable__iterator:()=>Ot,LazySeq:()=>ar,NaN_QMARK_:()=>$r,PROTOCOL_SENTINEL:()=>fn,_:()=>Te,_EQ_:()=>ke,_GT_:()=>bt,_GT__EQ_:()=>At,_LT_:()=>Qe,_LT__EQ_:()=>Ke,_PLUS_:()=>Ie,_STAR_:()=>je,__protocol_satisfies:()=>Ne,_iterator:()=>L,abs:()=>yo,aclone:()=>kr,add_watch:()=>Qr,alength:()=>Mr,apply:()=>bn,array_QMARK_:()=>V,aset:()=>Er,assoc:()=>k,assoc_BANG_:()=>b,assoc_in:()=>Mt,assoc_in_BANG_:()=>Et,atom:()=>pn,boolean$:()=>wr,boolean_QMARK_:()=>Hr,bounded_count:()=>to,butlast:()=>pr,cat:()=>bo,clj__GT_js:()=>So,coll_QMARK_:()=>Yr,comp:()=>Le,compare:()=>v,complement:()=>ct,concat:()=>Vt,conj:()=>St,conj_BANG_:()=>z,cons:()=>Xe,constantly:()=>vn,contains_QMARK_:()=>Qt,count:()=>O,counted_QMARK_:()=>_e,cycle:()=>Pn,dec:()=>Ye,deref:()=>ot,disj:()=>$e,disj_BANG_:()=>kt,dissoc:()=>Pe,dissoc_BANG_:()=>Fe,distinct:()=>Vn,doall:()=>Sr,dorun:()=>Rr,drop:()=>X,drop_last:()=>hr,drop_while:()=>ne,empty:()=>W,empty_QMARK_:()=>ur,ensure_reduced:()=>ee,es6_iterator:()=>$,even_QMARK_:()=>Ct,every_QMARK_:()=>re,every_pred:()=>jr,ex_cause:()=>Wr,ex_data:()=>Dr,ex_info:()=>Jr,ex_message:()=>Vr,false_QMARK_:()=>yr,ffirst:()=>De,filter:()=>C,filterv:()=>He,find:()=>eo,first:()=>Q,flatten:()=>fo,fn_QMARK_:()=>zr,fnil:()=>ht,frequencies:()=>lr,get:()=>w,get_in:()=>pt,group_by:()=>fr,identical_QMARK_:()=>qn,identity:()=>Wt,inc:()=>Kt,int_QMARK_:()=>pe,integer_QMARK_:()=>Ur,interleave:()=>Jt,interpose:()=>Sn,into:()=>lt,into_array:()=>se,iterable:()=>s,iterate:()=>Nr,js_keys:()=>Fr,js_obj:()=>vr,juxt:()=>Or,keep:()=>Zn,keep_indexed:()=>un,key:()=>Ht,keys:()=>ae,last:()=>Ve,lazy:()=>a,list:()=>Dt,list_QMARK_:()=>Mn,long$:()=>mo,map:()=>M,map_QMARK_:()=>ce,map_indexed:()=>nn,mapcat:()=>En,mapv:()=>it,max:()=>ie,max_key:()=>oo,memoize:()=>Ao,merge:()=>Nn,merge_with:()=>On,meta:()=>Xr,min:()=>Ir,min_key:()=>ro,mod:()=>no,neg_QMARK_:()=>br,next:()=>tt,nil_QMARK_:()=>sn,nnext:()=>Gr,not:()=>Lt,not_any_QMARK_:()=>rr,not_empty:()=>so,not_every_QMARK_:()=>Un,nth:()=>jt,number_QMARK_:()=>le,object_QMARK_:()=>Be,odd_QMARK_:()=>An,parse_long:()=>io,partial:()=>Fn,partition:()=>Xt,partition_all:()=>Ut,partition_by:()=>Tn,partitionv:()=>Kn,partitionv_all:()=>In,peek:()=>vo,persistent_BANG_:()=>ao,pop:()=>Mo,pos_QMARK_:()=>Ar,pr_str:()=>$t,println:()=>It,prn:()=>an,quot:()=>xe,rand_int:()=>ue,rand_nth:()=>ir,range:()=>_n,re_find:()=>xn,re_matches:()=>dn,re_pattern:()=>yn,re_seq:()=>Lr,reduce:()=>K,reduce_kv:()=>xt,reduced:()=>P,reduced_QMARK_:()=>A,reductions:()=>Je,regexp_QMARK_:()=>Cr,rem:()=>we,remove:()=>tn,remove_watch:()=>Kr,repeat:()=>at,repeatedly:()=>sr,replace:()=>or,reset_BANG_:()=>Pt,rest:()=>F,reverse:()=>Hn,satisfies_QMARK_:()=>Oe,second:()=>Ce,select_keys:()=>kn,seq:()=>R,seq_QMARK_:()=>Tt,seqable_QMARK_:()=>Nt,sequential_QMARK_:()=>H,set:()=>gn,shuffle:()=>nr,some:()=>oe,some_QMARK_:()=>mr,some_fn:()=>Tr,sort:()=>_t,sort_by:()=>er,sorted_set:()=>po,split_at:()=>_r,split_with:()=>dr,str:()=>cn,string_QMARK_:()=>yt,subs:()=>fe,subseq:()=>xo,subvec:()=>mn,swap_BANG_:()=>hn,system_time:()=>Gn,t:()=>Br,take:()=>J,take_nth:()=>$n,take_while:()=>U,to_array:()=>qr,transduce:()=>wt,transient$:()=>lo,tree_seq:()=>ye,true_QMARK_:()=>xr,truth_:()=>_,type:()=>wo,unreduced:()=>ft,update:()=>Wn,update_BANG_:()=>dt,update_in:()=>Jn,update_keys:()=>Eo,update_vals:()=>ge,val:()=>te,vals:()=>Pr,vec:()=>S,vector:()=>ut,vector_QMARK_:()=>wn,warn_on_lazy_reusage_BANG_:()=>Ue,with_meta:()=>Zr,zero_QMARK_:()=>gr,zipmap:()=>co});function f(t){if(t==null||t instanceof Function)return t;const e=typeof t;return e==="string"?(n,r)=>w(n,t,r):e==="object"?(n,r)=>w(t,n,r):t}function I(t,e){return t.every(function(n,r){return r===0||e(t[r-1],n)})}function ke(...t){return I(t,(e,n)=>e===n)}function bt(...t){return I(t,(e,n)=>e>n)}function At(...t){return I(t,(e,n)=>e>=n)}function Qe(...t){return I(t,(e,n)=>e<n)}function Ke(...t){return I(t,(e,n)=>e<=n)}function Ie(...t){return t.reduce((e,n)=>e+n,0)}function je(...t){return t.reduce((e,n)=>e*n,1)}function Te(...t){return t.length==1?0-t[0]:t.reduce((e,n)=>e-n)}const Ne={};function Oe(t,e){return e==null?t[null]:typeof t=="symbol"?e[t]:e[t.__sym]}function Ge(t,e,n){return t.set(e,n),t}function qe(t,e,n){return t[e]=n,t}function vt(t){switch(p(t)){case h:return Ge;case x:case y:return qe}}function b(t,e,n,...r){if(r.length%2!==0)throw new Error("Illegal argument: assoc expects an odd number of arguments.");switch(p(t)){case h:t.set(e,n);for(let o=0;o<r.length;o+=2)t.set(r[o],r[o+1]);break;case x:case y:t[e]=n;for(let o=0;o<r.length;o+=2)t[r[o]]=r[o+1];break;default:throw new Error(`Illegal argument: assoc! expects a Map, Array, or Object as the first argument, but got ${typeof t}.`)}return t}function j(t){switch(p(t)){case h:return new Map(t);case m:return new t.constructor(t);case x:return[...t];case y:return{...t};default:throw new Error(`Don't know how to copy object of type ${typeof t}.`)}}function k(t,e,n,...r){t||(t={});const o=j(t);return b(o,e,n,...r),o}const h=1,x=2,y=3,E=4,m=5,G=6;function q(t){switch(t){case h:return new Map;case x:return[];case y:return{};case E:return new D;case m:return new Set;case G:return a(function*(){})}}function B(t){return t.constructor===Object}function Be(t){return t!=null&&B(t)}function p(t){if(t!=null){if(B(t))return y;if(t instanceof Map)return h;if(t instanceof Set)return m;if(t instanceof D)return E;if(Array.isArray(t))return x;if(t instanceof Y)return G;if(t instanceof T)return m;if(t instanceof Object)return y}}function ze(t,e,n,r,o){r=S(r);const u=p(n);if(u!==h&&u!==x&&u!==y)throw new Error(`Illegal argument: ${e} expects the first argument to be a Map, Array, or Object.`);const i=[n];let c=n;for(let l=0;l<r.length-1;l+=1){const g=r[l];let d;c instanceof Map?d=c.get(g):d=c[g],d||(d=q(u)),i.push(d),c=d}i.push(o);for(let l=i.length-2;l>=0;l-=1)i[l]=t(i[l],r[l],i[l+1]);return i[0]}function Mt(t,e,n){return ze(k,"assoc-in",t,e,n)}function Et(t,e,n){e=S(e);var r=t;const o=p(t);for(const u of e.splice(0,e.length-1)){let i=w(r,u);i===void 0&&(i=q(o),b(r,u,i)),r=i}return b(r,e[e.length-1],n),t}function Le(...t){if(t=t.map(f),t.length===0)return Wt;if(t.length===1)return t[0];const[e,...n]=t.slice().reverse();return function(...r){let o=e(...r);for(const u of n)o=u(o);return o}}function Rt(t,e){for(const n of e)t.add(n);return t}function z(...t){if(t.length===0)return ut();const[e,...n]=t;let r=e;switch(r==null&&(r=[]),p(r)){case m:Rt(r,n);break;case E:r.unshift(...n.reverse());break;case x:r.push(...n);break;case h:for(const o of n)Array.isArray(o)?r.set(o[0],o[1]):s(o).forEach(u=>{r.set(u[0],u[1])});break;case y:for(const o of n)Array.isArray(o)?r[o[0]]=o[1]:Object.assign(r,o);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return r}function St(...t){if(t.length===0)return ut();const[e,...n]=t;let r=e;r==null&&(r=Dt());let o,u;switch(p(r)){case m:return r instanceof T?Rt(new r.constructor(r),n):new r.constructor([...r,...n]);case E:return new D(...n.reverse(),...r);case x:return[...r,...n];case h:o=new Map(r);for(const i of n)Array.isArray(i)?o.set(i[0],i[1]):s(i).forEach(c=>{o.set(c[0],c[1])});return o;case G:return a(function*(){yield*n,yield*r});case y:u={...r};for(const i of n)Array.isArray(i)?u[i[0]]=i[1]:Object.assign(u,i);return u;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function kt(t,...e){for(const n of e)t.delete(n);return t}function $e(t,...e){const n=new t.constructor([...t]);return kt(n,...e)}function Qt(t,e){switch(p(t)){case m:case h:return t.has(e);case void 0:return!1;default:return e in t}}function Fe(t,...e){for(const n of e)delete t[n];return t}function Pe(t,...e){if(e.length===0)return t;const n=j(t);switch(p(t)){case h:for(const r of e)n.delete(r);break;default:for(const r of e)delete n[r];break}return n}function Kt(t){return t+1}function Ye(t){return t-1}function It(...t){console.log(...t)}function jt(t,e,n){if(t){var r=void 0;if(Array.isArray(t))r=t[e];else{const o=s(t);let u=0;for(const i of o)if(u++==e){r=i;break}}if(r!==void 0)return r}return n}function w(t,e,n=void 0){if(t==null)return n;let r;if(B(t))return r=t[e],r===void 0?n:r;let o;switch(p(t)){case m:t.has(e)&&(r=e);break;case h:r=t.get(e);break;case x:r=t[e];break;default:if(o=t.get,o instanceof Function)try{r=t.get(e);break}catch{}r=t[e];break}return r!==void 0?r:n}function Tt(t){return t!=null&&!!t[Symbol.iterator]}const H=Tt;function Nt(t){return t==null||!!t[Symbol.iterator]}function s(t){if(t==null)return[];if(Nt(t))return t;if(t instanceof Object)return Object.entries(t);throw new TypeError(`${t} is not iterable`)}const rt=Symbol("Iterable"),Ot=Symbol.iterator;function L(t){return t[Symbol.iterator]()}const $=L;function R(t){if(t==null)return t;const e=s(t);return e.length===0||e.size===0||e[Symbol.iterator]().next().done?null:e}function Q(t){const[e]=s(t);return e}function Ce(t){const[e,n]=s(t);return n}function De(t){return Q(Q(t))}function F(t){return a(function*(){let e=!0;for(const n of s(t))e?e=!1:yield n})}class Gt{then(e,n){return e(this._deref())}}class N extends Gt{value;constructor(e){super(),this.value=e}_deref(){return this.value}}function Ve(t){t=s(t);let e;switch(p(t)){case x:return t[t.length-1];default:for(const n of t)e=n;return e}}function P(t){return new N(t)}function A(t){return t instanceof N}function K(t,e,n){t=f(t);let r,o;if(arguments.length===2){const u=s(e)[Symbol.iterator](),i=u.next();i.done?o=t():o=i.value,r=u}else o=e,r=s(n);if(o instanceof N)return o.value;for(const u of r)if(o=t(o,u),o instanceof N){o=o.value;break}return o}function*We(t,e){const n=e.next();n.done?yield t():yield*qt(t,n.value,e)}function*qt(t,e,n){let r=e,o=n;for(;;){if(A(r)){yield r.value;return}else yield r;const u=o.next();if(u.done)break;r=t(r,u.value)}}function Je(t,e,n){return t=f(t),arguments.length===2?a(function*(){yield*We(t,s(e)[Symbol.iterator]())}):a(function*(){yield*qt(t,e,s(n)[Symbol.iterator]())})}var Bt=!1;function Ue(){Bt=!0}class Y{constructor(e){this.gen=e,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&Bt)try{throw new Error}catch(e){console.warn("Re-use of lazy value",e.stack)}return this.gen()}}Y.prototype[rt]=!0;function a(t){return new Y(t)}class zt{constructor(e,n){this.x=e,this.coll=n}*[Symbol.iterator](){yield this.x,yield*s(this.coll)}}function Xe(t,e){return new zt(t,e)}function M(t,...e){switch(t=f(t),e.length){case 0:return n=>(...r)=>{switch(r.length){case 0:return n();case 1:return n(r[0]);case 2:return n(r[0],t(r[1]));default:return n(r[0],t(...r.slice(1)))}};case 1:return a(function*(){for(const n of s(e[0]))yield t(n)});default:return a(function*(){const n=e.map(r=>$(s(r)));for(;;){const r=[];for(const o of n){const u=o.next();if(u.done)return;r.push(u.value)}yield t(...r)}})}}function Ze(t){return e=>(...n)=>{switch(n.length){case 0:return e();case 1:return e(n[0]);case 2:{const r=n[0],o=n[1];return _(t(o))?e(r,o):r}}}}function C(t,e){return arguments.length===1?Ze(t):(t=f(t),a(function*(){for(const n of s(e))_(t(n))&&(yield n)}))}function He(t,e){return[...C(t,e)]}function tn(t,e){return C(ct(t),e)}function en(t){return e=>{let n=-1;return(...r)=>{switch(r.length){case 0:return e();case 1:return e(r[0]);case 2:return e(r[0],t((n=n+1,n),r[1]))}}}}function nn(t,e){if(t=f(t),arguments.length===1)return en(t);const n=[];let r=0;for(const o of s(e))n.push(t(r,o)),r++;return n}function rn(t,e){t=f(t);const n=[];let r=0;for(const o of s(e)){const u=t(r,o);_(u)&&n.push(u),r++}return n}function on(t){return e=>{let n=-1;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1];n++;const c=t(n,i);return c==null?u:e(u,c)}}}}function un(t,e){return arguments.length===1?on(t):rn(t,e)}function cn(...t){return t.join("")}function Lt(t){return!_(t)}function sn(t){return t==null}const fn={};function ln(t){return t===null?"null":JSON.stringify(t,(e,n)=>{switch(p(n)){case m:case G:return[...n];case h:return Object.fromEntries(n);default:return n}})}function $t(...t){return t.map(ln).join(" ")}function an(...t){It($t(...t))}class Ft extends Gt{constructor(e){super(),this.val=e,this._watches={},this._deref=()=>this.val,this._hasWatches=!1,this._reset_BANG_=n=>{const r=this.val;if(this.val=n,this._hasWatches)for(const o of Object.entries(this._watches)){const u=o[0],i=o[1];i(u,this,r,n)}return n},this._add_watch=(n,r)=>{this._watches[n]=r,this._hasWatches=!0},this._remove_watch=n=>{delete this._watches[n]}}}function pn(t){return new Ft(t)}function ot(t){return t._deref()}function Pt(t,e){t._reset_BANG_(e)}function hn(t,e,...n){e=f(e);const r=e(ot(t),...n);return Pt(t,r),r}function _n(t,e,n){return a(function*(){let r=t,o=e,u=n;e===void 0&&(r=0,o=t);let i=r||0;for(u=n||1;o===void 0||i<o;)yield i,i+=u})}function dn(t,e){const n=t.exec(e);return n&&e===n[0]?n.length===1?n[0]:n:null}function xn(t,e){if(yt(e)){const n=t.exec(e);return n!=null?n.length===1?n[0]:[...n]:null}else throw new TypeError("re-find must match against a string.")}function yn(t){if(t instanceof RegExp)return t;const e=t.match(/^\(\?([dgimsuvy]*)\)/);return e?new RegExp(t.slice(e[0].length),e[1]):new RegExp(t)}function mn(t,e,n){return t.slice(e,n)}function ut(...t){return t}function wn(t){return p(t)===x}function it(...t){if(t.length===2){const[n,r]=t;if(r instanceof Y){var e=[];for(const o of r)e.push(n(o));return e}return lt([],M(n),r)}return[...M(...t)]}function S(t){return V(t)?t:[...s(t)]}function gn(t){return new Set(s(t))}const Yt=Symbol("IApply__apply");function bn(t,...e){t=f(t);const n=e.slice(0,e.length-1),r=s(e[e.length-1]),o=t[Yt];return o?o(...n,r):t(...n,...r)}function Ct(t){return t%2==0}function An(t){return!Ct(t)}function ct(t){return t=f(t),(...e)=>Lt(t(...e))}function vn(t){return(...e)=>t}class D extends Array{constructor(...e){super(),this.push(...e)}}function Mn(t){return p(t)===E}function Dt(...t){return new D(...t)}function V(t){return Array.isArray(t)}function st(t){return a(function*(){for(const e of t)yield*s(e)})}function Vt(...t){return st(t)}Vt[Yt]=t=>st(t);function En(t,...e){const n=M(t,...e);return st(n)}function Wt(t){return t}function Jt(...t){return a(function*(){const e=t.map(n=>$(s(n)));for(;;){const n=[];for(const r of e){const o=r.next();if(o.done)return;n.push(o.value)}yield*n}})}function Rn(t){return e=>{let n=!1;return(...r)=>{switch(r.length){case 0:return e();case 1:return e(r[0]);case 2:if(n){const o=e(r[0],t);return A(o)?o:e(o,r[1])}else return n=!0,e(r[0],r[1])}}}}function Sn(t,e){return arguments.length===1?Rn(t):X(1,Jt(at(t),e))}function kn(t,e){const n=p(t),r=q(n)||{};for(const o of e){const u=w(t,o);u!=null&&b(r,o,u)}return r}function ft(t){return A(t)?ot(t):t}function Qn(t){return e=>{let n=[];return(...r)=>{let o,u;switch(r.length){case 0:return e();case 1:return o=r[0],n.length!==0&&(u=[...n],n=[],o=ft(e(o,u))),e(o);case 2:return o=r[0],n.push(r[1]),t===n.length?(u=[...n],n=[],e(o,u)):o}}}}function Ut(t,...e){if(arguments.length===1)return Qn(t);let n=t,r=e[0];return e.length===2&&([n,r]=e),Zt(t,n,[],r,!0)}function Xt(t,...e){let n=t,r=[],o=e[0];return e.length===2?[n,o]=e:e.length>2&&([n,r,o]=e),Zt(t,n,r,o,!1)}const Kn=Xt,In=Ut;function Zt(t,e,n,r,o){return a(function*(){let u=[],i=0;for(const c of s(r))i<t&&(u.push(c),u.length===t&&(yield u,u=e<t?u.slice(e):[])),i++,i===e&&(i=0);u.length>0&&(u.length===t||o?yield u:n.length&&(u.push(...n.slice(0,t-u.length)),yield u))})}function jn(t){return e=>{let n=[];const r={};let o=r;return(...u)=>{const i=u.length;if(i===0)return e();if(i===1){let c=u[0];if(n.length!==0){const l=[...n];n=[],c=ft(e(c,l))}return e(c)}if(i===2){const c=u[0],l=u[1],g=o,d=t(l);if(o=d,g===r||d===g)return n.push(l),c;{const be=[...n];n=[];const gt=e(c,be);return A(gt)||n.push(l),gt}}}}}function Tn(t,e){return t=f(t),arguments.length===1?jn(t):a(function*(){const n=$(e),r=n.next();r.done&&(yield*null);const o=r.value;let u=t(o),i=[o],c=[];for(;;){const l=n.next();if(l.done){yield i;break}const g=l.value,d=t(g);u==d?i.push(g):(yield i,c.push(g),i=c,u=d,c=[])}})}function W(t){const e=p(t);if(e!=null)return q(e);throw new Error(`Can't create empty of ${typeof t}`)}function Nn(...t){const e=t[0];let n;return e==null?n={}:n=lt(W(e),e),z(n,...t.slice(1))}function Ht(t){return t[0]}function te(t){return t[1]}function On(t,...e){t=f(t);var n=!1;for(const r of e)if(r!=null){n=!0;break}if(n){const r=(u,i)=>{const c=Ht(i),l=te(i);return Qt(u,c)?k(u,c,t(w(u,c),l)):k(u,c,l)};return K((u,i)=>K(r,u||{},R(i)),e)}else return null}function Gn(){return performance.now()}function lt(...t){let e,n,r,o,u;switch(t.length){case 0:return[];case 1:return t[0];case 2:return St(t[0]??[],...s(t[1]));case 3:return e=t[0],n=t[1],r=t[2],o=j(e),u=(i,c)=>c===void 0?i:z(i,c),wt(n,u,o,r);default:throw TypeError(`Invalid arity call of into: ${t.length}`)}}function qn(t,e){return t===e}function at(...t){if(t.length==0||t.length>2)throw new Error(`Invalid arity: ${t.length}`);return{[rt]:!0,[Ot]:t.length==1?function*(){const e=t[0];for(;;)yield e}:function*(){const[e,n]=t;for(var r=0;r<e;r++)yield n}}}function ee(t){return A(t)?t:P(t)}function Bn(t){return e=>{let n=t;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1){const u=r[0];return e(u)}if(o===2){let u=r[0];const i=r[1],c=n,l=(n=n-1,n);return c>0&&(u=e(u,i)),l>0?u:ee(u)}}}}function J(t,e){return arguments.length===1?Bn(t):a(function*(){let n=t-1;for(const r of s(e))if(n-->=0&&(yield r),n<0)return})}function zn(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const o=n[0],u=n[1];return _(t(u))?e(o,u):P(o)}}}function U(t,e){return t=f(t),arguments.length===1?zn(t):a(function*(){for(const n of s(e))if(_(t(n)))yield n;else return})}function Ln(t){return e=>{let n=-1;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1];return n++,we(n,t)===0?e(u,i):u}}}}function $n(t,e){return arguments.length===1?Ln(t):t<=0?at(Q(e)):a(function*(){let n=0;for(const r of s(e))n%t===0&&(yield r),n++})}function Fn(t,...e){return t=f(t),function(...n){return t(...e,...n)}}function Pn(t){return a(function*(){for(;;)yield*t})}function Yn(t){return e=>{let n=t;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1],c=n;return n--,c>0?u:e(u,i)}}}}function X(t,e){return arguments.length===1?Yn(t):a(function*(){const n=L(s(e));for(let r=0;r<t;r++)n.next();yield*n})}function Cn(t){return e=>{let n=!0;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=n,i=r[0],c=r[1];return u&&_(t(c))?i:(n=null,e(i,c))}}}}function ne(t,e){return t=f(t),arguments.length===1?Cn(t):a(function*(){const n=L(s(e));for(;;){const r=n.next();if(r.done)break;const o=r.value;if(!_(t(o))){yield o;break}}yield*n})}function Dn(){return t=>{const e=new Set;return(...n)=>{const r=n.length;if(r===0)return t();if(r===1)return t(n[0]);if(r===2){const o=n[0],u=n[1];return e.has(u)?o:(e.add(u),t(o,u))}}}}function Vn(t){return arguments.length===0?Dn():a(function*(){const e=new Set;for(const n of s(t))e.has(n)||(yield n),e.add(n)})}function Wn(t,e,n,...r){return n=f(n),k(t,e,n(w(t,e),...r))}function pt(t,e,n){let r=t;for(const o of e)r=w(r,o);return r===void 0?n:r}function Jn(t,e,n,...r){return n=f(n),Mt(t,e,n(pt(t,e),...r))}function ht(t,e,...n){return t=f(t),function(r,...o){return r?t(r,...n,...o):t(e,...n,...o)}}function re(t,e){t=f(t);for(const n of s(e))if(!t(n))return!1;return!0}function Un(t,e){return!re(t,e)}function Xn(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const o=n[0],u=n[1],i=t(u);return i==null?o:e(o,i)}}}function Zn(t,e){return t=f(t),arguments.length===1?Xn(t):a(function*(){for(const n of s(e)){const r=t(n);_(r)&&(yield r)}})}function Hn(t){return t=s(t),[...t].reverse()}function _t(t,e){return arguments.length===1&&(e=t,t=void 0),t=f(t),e=s(e),[...e].sort(t||v)}function tr(t){return t===v?t:(e,n)=>{const r=t(e,n);return le(r)?r:r?-1:t(n,e)?1:0}}function er(t,e,n){return arguments.length===2&&(n=e,e=v),t=f(t),e=f(e),_t((r,o)=>{const u=tr(e),i=t(r),c=t(o);return u(i,c)},n)}function nr(t){const e=[...t];let n=t.length;for(;n;){const r=Math.floor(Math.random()*n--),o=e[n];e[n]=e[r],e[r]=o}return e}function oe(t,e){t=f(t);for(const n of s(e)){const r=t(n);if(_(r))return r}}function rr(t,e){return t=f(t),!oe(t,e)}function or(t,e){return(Array.isArray(e)?it:M)(r=>{const o=t[r];return o!==void 0?o:r},e)}function ur(t){return!R(t)}function ue(t){return Math.floor(Math.random()*t)}function ir(t){const e=ue(O(t));return jt(t,e)}function cr(t){return a(function*(){for(;;)yield t()})}function sr(t,e){arguments.length===1&&(e=t,t=void 0);const n=cr(e);return t?J(t,n):n}function dt(t,e,n,...r){const o=w(t,e);return b(t,e,n(o,...r))}function fr(t,e){t=f(t);const n={};for(const r of s(e)){const o=t(r);dt(n,o,ht(z,[]),r)}return n}function lr(t){const e={},n=ht(Kt,0);for(const r of s(t))dt(e,r,n);return e}class ar{constructor(e){this.f=e,this.res=void 0}*[Symbol.iterator](){this.res===void 0&&(this.res=this.f(),this.f=null),yield*s(this.res)}}function pr(t){const e=[...s(t)];return e.pop(),e.length>0?e:null}function hr(...t){const[e,n]=t.length>1?t:[1,t[0]];return M((r,o)=>r,n,X(e,n))}function _r(t,e){return[J(t,e),X(t,e)]}function dr(t,e){return[U(t,e),ne(t,e)]}function O(t){if(!t)return 0;const e=t.length||t.size;if(typeof e=="number")return e;let n=0;for(const r of s(t))n++;return n}function xr(t){return t===!0}function yr(t){return t===!1}function mr(t){return t!=null}function wr(t){return!!t}function gr(t){return t===0}function br(t){return t<0}function Ar(t){return t>0}function vr(...t){let e=0;const n={};for(;!(e>=t.length);)n[t[e]]=t[e+1],e=e+2;return n}function Mr(t){return t.length}function Er(t,e,n,...r){if(r.length==0)return t[e]=n,n;{const o=[e,n,...r],u=o[o.length-1];let i=t,c=0;const l=o.length-2;for(;c<l;c++)i=i[o[c]];return i[o[c]]=u,n}}function Rr(t){for(const e of s(t));return null}function Sr(t){return S(t)}function kr(t){return[...t]}function Qr(t,e,n){return t._add_watch(e,n)}function Kr(t,e){return t._remove_watch(e)}function xt(t,e,n){if(!n)return e;var r=e;for(const o of s(n))r=t(r,o[0],o[1]);return r}function ie(t,e,...n){return e==null?t:Math.max(t,e,...n)}function Ir(t,e,...n){return e==null?t:Math.min(t,e,...n)}function ce(t){return t==null?!1:!!(B(t)||t instanceof Map)}function jr(...t){return(...e)=>{for(const n of t)for(const r of e)if(!n(r))return!1;return!0}}function Tr(...t){return(...e)=>{for(const n of t)for(const r of e){const o=n(r);if(o)return o}}}function se(t,e){return S(e||t)}function Nr(t,e){var n=e;return a(function*(){for(;;)yield n,n=t(n)})}function Or(...t){return t=t.map(f),(...e)=>{const n=[];for(const r of t)n.push(r(...e));return n}}function tt(t){if(Array.isArray(t)){const e=t.slice(1);return e.length>0?e:null}else return R(F(t))}function Gr(t){return tt(tt(t))}function v(t,e){if(t===e)return 0;{if(t==null)return-1;if(e==null)return 1;const n=typeof t,r=typeof e;if(n==="number"&&r==="number"||n==="string"&&r==="string")return t===e?0:t<e?-1:1;throw new Error(`comparing ${n} to ${r}`)}}function qr(t){return se(t)}function _(t){return t!=null&&t!==!1}const Br=_;function fe(t,e,n){return t.substring(e,n)}function zr(t){return typeof t=="function"}function Lr(t,e){return a(function*(){for(;;){const n=t.exec(e);if(n){const r=n[0];yield n.length===1?r:S(n);const u=n.index+ie(1,r.length);if(u>e.length)break;e=fe(e,u)}else break}})}function $r(t){return Number.isNaN(t)}function le(t){return typeof t=="number"}function ae(t){return t?Object.keys(t):null}function Fr(t){return ae(t)}function Pr(t){return t?Object.values(t):null}function yt(t){return typeof t=="string"}function Yr(t){return p(t)!=null}function Cr(t){return t instanceof RegExp}class mt extends Error{constructor(e,n,r){super(e),this._data=n,this._cause=r}}function Dr(t){return t instanceof mt?t._data:null}function Vr(t){return t instanceof Error?t.message:null}function Wr(t){return t instanceof mt?t._cause:null}function Jr(t,e,n){return new mt(t,e,n)}function pe(t){return Number.isInteger(t)}const Ur=pe,he=Symbol("meta");function Xr(t){return t instanceof Object?t[he]:null}function Zr(t,e){const n=j(t);return n[he]=e,n}function Hr(t){return t===!0||t===!1}function _e(t){switch(p(t)){case x:case h:case y:case E:case m:return!0}return!1}function to(t,e){return _e(e)?O(e):O(J(t,e))}function eo(t,e){const n=w(t,e);if(n!==void 0)return[e,n]}function no(t,e){return(t%e+e)%e}function ro(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i<=r&&(r=i,o=u)}),o}function oo(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i>=r&&(r=i,o=u)}),o}function uo(t){throw new Error(`Expected string, got: ${typeof t}`)}function io(t){if(yt(t)){if(/^[+-]?\d+$/.test(t)){const e=parseInt(t);if(Number.MIN_SAFE_INTEGER<=e<=Number.MAX_SAFE_INTEGER)return e}return null}return uo(t)}function de(t){return t>=0?Math.floor(t):Math.ceil(t)}function xe(t,e){const n=t%e;return de((t-n)/e)}function wt(t,...e){switch(e.length){case 2:{const n=e[0],r=e[1];return wt(t,n,n(),r)}default:{let n=e[0];const r=e[1],o=e[2];n=t(n);const u=K(n,r,o);return n(u)}}}function co(t,e){const n={},r=s(t)[Symbol.iterator](),o=s(e)[Symbol.iterator]();let u,i;for(;u=r.next(),!(u.done||(i=o.next(),i.done));)n[u.value]=i.value;return n}function so(t){return R(t)?t:null}function ye(t,e,n){const r=function*(o){if(yield o,_(t(o)))for(const u of s(e(o)))yield*r(u)};return a(function*(){yield*r(n)})}function fo(t){return C(ct(H),F(ye(H,R,t)))}function lo(t){return j(t)}function ao(t){return Object.freeze(t)}class T{constructor(e){e instanceof T||(e=_t(e));const r=new Set(e);this._elts=[...r],this._set=r}add(e){if(this._set.has(e))return this;const n=this._elts;let r=!1;for(let o=0;o<n.length;o++)if(v(e,n[o])<=0){n.splice(o,0,e),r=!0;break}return r?this._set=new Set(n):(n.push(e),this._set.add(e)),this.size=n.length,this}delete(e){if(!this._set.has(e))return this;const n=this._elts,r=n.indexOf(e);return n.splice(r,1),this._set=new Set(n),this.size=n.length,this}has(e){return this._set.has(e)}keys(){return this.values()}values(){return this._elts[Symbol.iterator]()}entries(){return this._set.entries()}forEach(...e){return this.set.forEach(...e)}clear(){this._elts=[],this._set=new Set(this._elts)}[Symbol.iterator](){return this.keys()}}function po(...t){return new T(t)}function et(t,e,n){return r=>e(v(r,n),0)}function me(t,e,n=!0){let r=0;for(;r<t.length&&v(e,t[r])>0;r++);return r}function ho([t,e,n]){const r=et(t,e,n);if(e===bt||e===At){const o=[...t],u=me(o,n,!0);return o.splice(0,u),r(o[0])||o.splice(0,1),o}else return[...U(r,t)]}function _o([t,e,n,r,o]){const u=[...t],i=me(u,n,!0);u.splice(0,i);const c=et(t,r,o);return et(t,e,n)(u[0])||u.splice(0,1),[...U(c,u)]}function xo(...t){if(t.length===3)return ho(t);if(t.length===5)return _o(t)}function yo(t){return Math.abs(t)}function mo(t){return de(t)}function wo(t){return t!=null&&t.constructor}function go(t){return(e,n)=>{const r=t(e,n);return A(r)?P(r):r}}function bo(t){return t=go(t),(...e)=>{switch(e.length){case 0:return t();case 1:return t(e[0]);case 2:return K(t,e[0],e[1])}}}function we(t,e){const n=xe(t,e);return t-e*n}function Ao(t){const e=new Map;return(...n)=>{const r=[n.length,...n],o=pt(e,r);if(o===void 0){const u=t(...n);return Et(e,r,u),u}else return o}}function vo(t){return V(t)?t[t.length-1]:Q(t)}function Mo(t){if(V(t)){const e=[...t];return e.pop(),e}else return F(t)}function Eo(t,e){const n=W(t),r=vt(t)||b;return xt((o,u,i)=>r(o,e(u),i),n,t),n}function ge(t,e){const n=W(t),r=vt(t)||b;return xt((o,u,i)=>r(o,u,e(i)),n,t),n}class Ro{constructor(e){this.f=e}_deref(){return this.realized?this.v:(this.v=this.f(),this.realized=!0,this.v)}}function nt(t,e){if(e.has(t))return t;if(e.add(t),ce(t))return ge(t,r=>nt(r,e));const n=p(t);return n&&n!=y?it(r=>nt(r,e),t):t}function So(t){return nt(t,new Set)}return Se(ko);})();
1
+ var squint;(squint||={}).core=(()=>{var X=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Me=Object.prototype.hasOwnProperty;var Ee=(t,e)=>{for(var n in e)X(t,n,{get:e[n],enumerable:!0})},Re=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ve(e))!Me.call(t,o)&&o!==n&&X(t,o,{get:()=>e[o],enumerable:!(r=Ae(e,o))||r.enumerable});return t};var Se=t=>Re(X({},"__esModule",{value:!0}),t);var ko={};Ee(ko,{Atom:()=>$t,Cons:()=>Bt,Delay:()=>Ro,IIterable:()=>nt,IIterable__iterator:()=>Nt,LazySeq:()=>ar,NaN_QMARK_:()=>$r,PROTOCOL_SENTINEL:()=>fn,_:()=>Te,_EQ_:()=>ke,_GT_:()=>gt,_GT__EQ_:()=>bt,_LT_:()=>Qe,_LT__EQ_:()=>Ke,_PLUS_:()=>Ie,_STAR_:()=>je,__protocol_satisfies:()=>Ne,_iterator:()=>L,abs:()=>yo,aclone:()=>kr,add_watch:()=>Qr,alength:()=>Mr,apply:()=>bn,array_QMARK_:()=>D,aset:()=>Er,assoc:()=>S,assoc_BANG_:()=>b,assoc_in:()=>vt,assoc_in_BANG_:()=>Mt,atom:()=>pn,boolean$:()=>wr,boolean_QMARK_:()=>Hr,bounded_count:()=>to,butlast:()=>pr,cat:()=>bo,clj__GT_js:()=>So,coll_QMARK_:()=>Yr,comp:()=>Le,compare:()=>v,complement:()=>ct,concat:()=>Dt,conj:()=>Rt,conj_BANG_:()=>z,cons:()=>Xe,constantly:()=>vn,contains_QMARK_:()=>kt,count:()=>O,counted_QMARK_:()=>_e,cycle:()=>Pn,dec:()=>Ye,deref:()=>ot,disj:()=>$e,disj_BANG_:()=>St,dissoc:()=>Pe,dissoc_BANG_:()=>Fe,distinct:()=>Vn,doall:()=>Sr,dorun:()=>Rr,drop:()=>U,drop_last:()=>hr,drop_while:()=>ne,empty:()=>V,empty_QMARK_:()=>ur,ensure_reduced:()=>ee,es6_iterator:()=>$,even_QMARK_:()=>Yt,every_QMARK_:()=>re,every_pred:()=>jr,ex_cause:()=>Wr,ex_data:()=>Dr,ex_info:()=>Jr,ex_message:()=>Vr,false_QMARK_:()=>yr,ffirst:()=>De,filter:()=>Y,filterv:()=>He,find:()=>eo,first:()=>k,flatten:()=>fo,fn_QMARK_:()=>zr,fnil:()=>pt,frequencies:()=>lr,get:()=>w,get_in:()=>at,group_by:()=>fr,identical_QMARK_:()=>qn,identity:()=>Vt,inc:()=>Qt,int_QMARK_:()=>pe,integer_QMARK_:()=>Ur,interleave:()=>Wt,interpose:()=>Sn,into:()=>te,into_array:()=>se,iterable:()=>s,iterate:()=>Nr,js_keys:()=>Fr,js_obj:()=>vr,juxt:()=>Or,keep:()=>Zn,keep_indexed:()=>un,key:()=>Zt,keys:()=>ae,last:()=>Ve,lazy:()=>a,list:()=>Ct,list_QMARK_:()=>Mn,long$:()=>mo,map:()=>j,map_QMARK_:()=>ce,map_indexed:()=>nn,mapcat:()=>En,mapv:()=>it,max:()=>ie,max_key:()=>oo,memoize:()=>Ao,merge:()=>Nn,merge_with:()=>On,meta:()=>Xr,min:()=>Ir,min_key:()=>ro,mod:()=>no,neg_QMARK_:()=>br,next:()=>H,nil_QMARK_:()=>sn,nnext:()=>Gr,not:()=>zt,not_any_QMARK_:()=>rr,not_empty:()=>so,not_every_QMARK_:()=>Un,nth:()=>It,number_QMARK_:()=>le,object_QMARK_:()=>Be,odd_QMARK_:()=>An,parse_long:()=>io,partial:()=>Fn,partition:()=>Ut,partition_all:()=>Jt,partition_by:()=>Tn,partitionv:()=>Kn,partitionv_all:()=>In,peek:()=>vo,persistent_BANG_:()=>ao,pop:()=>Mo,pos_QMARK_:()=>Ar,pr_str:()=>Lt,println:()=>Kt,prn:()=>an,quot:()=>xe,rand_int:()=>ue,rand_nth:()=>ir,range:()=>_n,re_find:()=>xn,re_matches:()=>dn,re_pattern:()=>yn,re_seq:()=>Lr,reduce:()=>Q,reduce_kv:()=>dt,reduced:()=>P,reduced_QMARK_:()=>A,reductions:()=>Je,regexp_QMARK_:()=>Cr,rem:()=>we,remove:()=>tn,remove_watch:()=>Kr,repeat:()=>lt,repeatedly:()=>sr,replace:()=>or,reset_BANG_:()=>Ft,rest:()=>F,reverse:()=>Hn,satisfies_QMARK_:()=>Oe,second:()=>Ce,select_keys:()=>kn,seq:()=>E,seq_QMARK_:()=>jt,seqable_QMARK_:()=>Tt,sequential_QMARK_:()=>Z,set:()=>gn,shuffle:()=>nr,some:()=>oe,some_QMARK_:()=>mr,some_fn:()=>Tr,sort:()=>ht,sort_by:()=>er,sorted_set:()=>po,split_at:()=>_r,split_with:()=>dr,str:()=>cn,string_QMARK_:()=>xt,subs:()=>fe,subseq:()=>xo,subvec:()=>mn,swap_BANG_:()=>hn,system_time:()=>Gn,t:()=>Br,take:()=>W,take_nth:()=>$n,take_while:()=>J,to_array:()=>qr,transduce:()=>mt,transient$:()=>lo,tree_seq:()=>ye,true_QMARK_:()=>xr,truth_:()=>_,type:()=>wo,unreduced:()=>ft,update:()=>Wn,update_BANG_:()=>_t,update_in:()=>Jn,update_keys:()=>Eo,update_vals:()=>ge,val:()=>Ht,vals:()=>Pr,vec:()=>R,vector:()=>ut,vector_QMARK_:()=>wn,warn_on_lazy_reusage_BANG_:()=>Ue,with_meta:()=>Zr,zero_QMARK_:()=>gr,zipmap:()=>co});function f(t){if(t==null||t instanceof Function)return t;const e=typeof t;return e==="string"?(n,r)=>w(n,t,r):e==="object"?(n,r)=>w(t,n,r):t}function K(t,e){return t.every(function(n,r){return r===0||e(t[r-1],n)})}function ke(...t){return K(t,(e,n)=>e===n)}function gt(...t){return K(t,(e,n)=>e>n)}function bt(...t){return K(t,(e,n)=>e>=n)}function Qe(...t){return K(t,(e,n)=>e<n)}function Ke(...t){return K(t,(e,n)=>e<=n)}function Ie(...t){return t.reduce((e,n)=>e+n,0)}function je(...t){return t.reduce((e,n)=>e*n,1)}function Te(...t){return t.length==1?0-t[0]:t.reduce((e,n)=>e-n)}const Ne={};function Oe(t,e){return e==null?t[null]:typeof t=="symbol"?e[t]:e[t.__sym]}function Ge(t,e,n){return t.set(e,n),t}function qe(t,e,n){return t[e]=n,t}function At(t){switch(p(t)){case h:return Ge;case x:case y:return qe}}function b(t,e,n,...r){if(r.length%2!==0)throw new Error("Illegal argument: assoc expects an odd number of arguments.");switch(p(t)){case h:t.set(e,n);for(let o=0;o<r.length;o+=2)t.set(r[o],r[o+1]);break;case x:case y:t[e]=n;for(let o=0;o<r.length;o+=2)t[r[o]]=r[o+1];break;default:throw new Error(`Illegal argument: assoc! expects a Map, Array, or Object as the first argument, but got ${typeof t}.`)}return t}function I(t){switch(p(t)){case h:return new Map(t);case m:return new t.constructor(t);case x:return[...t];case y:return{...t};default:throw new Error(`Don't know how to copy object of type ${typeof t}.`)}}function S(t,e,n,...r){t||(t={});const o=I(t);return b(o,e,n,...r),o}const h=1,x=2,y=3,M=4,m=5,G=6;function q(t){switch(t){case h:return new Map;case x:return[];case y:return{};case M:return new C;case m:return new Set;case G:return a(function*(){})}}function B(t){return t.constructor===Object}function Be(t){return t!=null&&B(t)}function p(t){if(t!=null){if(B(t))return y;if(t instanceof Map)return h;if(t instanceof Set)return m;if(t instanceof C)return M;if(Array.isArray(t))return x;if(t instanceof rt)return G;if(t instanceof T)return m;if(t instanceof Object)return y}}function ze(t,e,n,r,o){r=R(r);const u=p(n);if(u!==h&&u!==x&&u!==y)throw new Error(`Illegal argument: ${e} expects the first argument to be a Map, Array, or Object.`);const i=[n];let c=n;for(let l=0;l<r.length-1;l+=1){const g=r[l];let d;c instanceof Map?d=c.get(g):d=c[g],d||(d=q(u)),i.push(d),c=d}i.push(o);for(let l=i.length-2;l>=0;l-=1)i[l]=t(i[l],r[l],i[l+1]);return i[0]}function vt(t,e,n){return ze(S,"assoc-in",t,e,n)}function Mt(t,e,n){e=R(e);var r=t;const o=p(t);for(const u of e.splice(0,e.length-1)){let i=w(r,u);i===void 0&&(i=q(o),b(r,u,i)),r=i}return b(r,e[e.length-1],n),t}function Le(...t){if(t=t.map(f),t.length===0)return Vt;if(t.length===1)return t[0];const[e,...n]=t.slice().reverse();return function(...r){let o=e(...r);for(const u of n)o=u(o);return o}}function Et(t,e){for(const n of e)t.add(n);return t}function z(...t){if(t.length===0)return ut();const[e,...n]=t;let r=e;switch(r==null&&(r=[]),p(r)){case m:Et(r,n);break;case M:r.unshift(...n.reverse());break;case x:r.push(...n);break;case h:for(const o of n)Array.isArray(o)?r.set(o[0],o[1]):s(o).forEach(u=>{r.set(u[0],u[1])});break;case y:for(const o of n)Array.isArray(o)?r[o[0]]=o[1]:Object.assign(r,o);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return r}function Rt(...t){if(t.length===0)return ut();const[e,...n]=t;let r=e;r==null&&(r=Ct());let o,u;switch(p(r)){case m:return r instanceof T?Et(new r.constructor(r),n):new r.constructor([...r,...n]);case M:return new C(...n.reverse(),...r);case x:return[...r,...n];case h:o=new Map(r);for(const i of n)Array.isArray(i)?o.set(i[0],i[1]):s(i).forEach(c=>{o.set(c[0],c[1])});return o;case G:return a(function*(){yield*n,yield*r});case y:u={...r};for(const i of n)Array.isArray(i)?u[i[0]]=i[1]:Object.assign(u,i);return u;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function St(t,...e){for(const n of e)t.delete(n);return t}function $e(t,...e){const n=new t.constructor([...t]);return St(n,...e)}function kt(t,e){switch(p(t)){case m:case h:return t.has(e);case void 0:return!1;default:return e in t}}function Fe(t,...e){for(const n of e)delete t[n];return t}function Pe(t,...e){if(e.length===0)return t;const n=I(t);switch(p(t)){case h:for(const r of e)n.delete(r);break;default:for(const r of e)delete n[r];break}return n}function Qt(t){return t+1}function Ye(t){return t-1}function Kt(...t){console.log(...t)}function It(t,e,n){if(t){var r=void 0;if(Array.isArray(t))r=t[e];else{const o=s(t);let u=0;for(const i of o)if(u++==e){r=i;break}}if(r!==void 0)return r}return n}function w(t,e,n=void 0){if(t==null)return n;let r;if(B(t))return r=t[e],r===void 0?n:r;let o;switch(p(t)){case m:t.has(e)&&(r=e);break;case h:r=t.get(e);break;case x:r=t[e];break;default:if(o=t.get,o instanceof Function)try{r=t.get(e);break}catch{}r=t[e];break}return r!==void 0?r:n}function jt(t){return t!=null&&!!t[Symbol.iterator]}const Z=jt;function Tt(t){return t==null||!!t[Symbol.iterator]}function s(t){if(t==null)return[];if(Tt(t))return t;if(t instanceof Object)return Object.entries(t);throw new TypeError(`${t} is not iterable`)}const nt=Symbol("Iterable"),Nt=Symbol.iterator;function L(t){return t[Symbol.iterator]()}const $=L;function E(t){if(t==null)return t;const e=s(t);return e.length===0||e.size===0||e[Symbol.iterator]().next().done?null:e}function k(t){const[e]=s(t);return e}function Ce(t){const[e,n]=s(t);return n}function De(t){return k(k(t))}function F(t){return a(function*(){let e=!0;for(const n of s(t))e?e=!1:yield n})}class Ot{then(e,n){return e(this._deref())}}class N extends Ot{value;constructor(e){super(),this.value=e}_deref(){return this.value}}function Ve(t){t=s(t);let e;switch(p(t)){case x:return t[t.length-1];default:for(const n of t)e=n;return e}}function P(t){return new N(t)}function A(t){return t instanceof N}function Q(t,e,n){t=f(t);let r,o;if(arguments.length===2){const u=s(e)[Symbol.iterator](),i=u.next();i.done?o=t():o=i.value,r=u}else o=e,r=s(n);if(o instanceof N)return o.value;for(const u of r)if(o=t(o,u),o instanceof N){o=o.value;break}return o}function*We(t,e){const n=e.next();n.done?yield t():yield*Gt(t,n.value,e)}function*Gt(t,e,n){let r=e,o=n;for(;;){if(A(r)){yield r.value;return}else yield r;const u=o.next();if(u.done)break;r=t(r,u.value)}}function Je(t,e,n){return t=f(t),arguments.length===2?a(function*(){yield*We(t,s(e)[Symbol.iterator]())}):a(function*(){yield*Gt(t,e,s(n)[Symbol.iterator]())})}var qt=!1;function Ue(){qt=!0}class rt{constructor(e){this.gen=e,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&qt)try{throw new Error}catch(e){console.warn("Re-use of lazy value",e.stack)}return this.gen()}}rt.prototype[nt]=!0;function a(t){return new rt(t)}class Bt{constructor(e,n){this.x=e,this.coll=n}*[Symbol.iterator](){yield this.x,yield*s(this.coll)}}function Xe(t,e){return new Bt(t,e)}function j(t,...e){switch(t=f(t),e.length){case 0:return n=>(...r)=>{switch(r.length){case 0:return n();case 1:return n(r[0]);case 2:return n(r[0],t(r[1]));default:return n(r[0],t(...r.slice(1)))}};case 1:return a(function*(){for(const n of s(e[0]))yield t(n)});default:return a(function*(){const n=e.map(r=>$(s(r)));for(;;){const r=[];for(const o of n){const u=o.next();if(u.done)return;r.push(u.value)}yield t(...r)}})}}function Ze(t){return e=>(...n)=>{switch(n.length){case 0:return e();case 1:return e(n[0]);case 2:{const r=n[0],o=n[1];return _(t(o))?e(r,o):r}}}}function Y(t,e){return arguments.length===1?Ze(t):(t=f(t),a(function*(){for(const n of s(e))_(t(n))&&(yield n)}))}function He(t,e){return[...Y(t,e)]}function tn(t,e){return Y(ct(t),e)}function en(t){return e=>{let n=-1;return(...r)=>{switch(r.length){case 0:return e();case 1:return e(r[0]);case 2:return e(r[0],t((n=n+1,n),r[1]))}}}}function nn(t,e){if(t=f(t),arguments.length===1)return en(t);const n=[];let r=0;for(const o of s(e))n.push(t(r,o)),r++;return n}function rn(t,e){t=f(t);const n=[];let r=0;for(const o of s(e)){const u=t(r,o);_(u)&&n.push(u),r++}return n}function on(t){return e=>{let n=-1;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1];n++;const c=t(n,i);return c==null?u:e(u,c)}}}}function un(t,e){return arguments.length===1?on(t):rn(t,e)}function cn(...t){return t.join("")}function zt(t){return!_(t)}function sn(t){return t==null}const fn={};function ln(t){return t===null?"null":JSON.stringify(t,(e,n)=>{switch(p(n)){case m:case G:return[...n];case h:return Object.fromEntries(n);default:return n}})}function Lt(...t){return t.map(ln).join(" ")}function an(...t){Kt(Lt(...t))}class $t extends Ot{constructor(e){super(),this.val=e,this._watches={},this._deref=()=>this.val,this._hasWatches=!1,this._reset_BANG_=n=>{const r=this.val;if(this.val=n,this._hasWatches)for(const o of Object.entries(this._watches)){const u=o[0],i=o[1];i(u,this,r,n)}return n},this._add_watch=(n,r)=>{this._watches[n]=r,this._hasWatches=!0},this._remove_watch=n=>{delete this._watches[n]}}}function pn(t){return new $t(t)}function ot(t){return t._deref()}function Ft(t,e){t._reset_BANG_(e)}function hn(t,e,...n){e=f(e);const r=e(ot(t),...n);return Ft(t,r),r}function _n(t,e,n){return a(function*(){let r=t,o=e,u=n;e===void 0&&(r=0,o=t);let i=r||0;for(u=n||1;o===void 0||i<o;)yield i,i+=u})}function dn(t,e){const n=t.exec(e);return n&&e===n[0]?n.length===1?n[0]:n:null}function xn(t,e){if(xt(e)){const n=t.exec(e);return n!=null?n.length===1?n[0]:[...n]:null}else throw new TypeError("re-find must match against a string.")}function yn(t){if(t instanceof RegExp)return t;const e=t.match(/^\(\?([dgimsuvy]*)\)/);return e?new RegExp(t.slice(e[0].length),e[1]):new RegExp(t)}function mn(t,e,n){return t.slice(e,n)}function ut(...t){return t}function wn(t){return p(t)===x}function it(...t){if(t.length===2){const[r,o]=t,u=s(o);if(Array.isArray(u)){const i=new Array(u.length);for(var e=0;e<u.length;e++)i[e]=r(u[e]);return i}else{var n=[];for(const i of u)n.push(r(i));return n}}return[...j(...t)]}function R(t){return D(t)?t:[...s(t)]}function gn(t){return new Set(s(t))}const Pt=Symbol("IApply__apply");function bn(t,...e){t=f(t);const n=e.slice(0,e.length-1),r=s(e[e.length-1]),o=t[Pt];return o?o(...n,r):t(...n,...r)}function Yt(t){return t%2==0}function An(t){return!Yt(t)}function ct(t){return t=f(t),(...e)=>zt(t(...e))}function vn(t){return(...e)=>t}class C extends Array{constructor(...e){super(),this.push(...e)}}function Mn(t){return p(t)===M}function Ct(...t){return new C(...t)}function D(t){return Array.isArray(t)}function st(t){return a(function*(){for(const e of t)yield*s(e)})}function Dt(...t){return st(t)}Dt[Pt]=t=>st(t);function En(t,...e){const n=j(t,...e);return st(n)}function Vt(t){return t}function Wt(...t){return a(function*(){const e=t.map(n=>$(s(n)));for(;;){const n=[];for(const r of e){const o=r.next();if(o.done)return;n.push(o.value)}yield*n}})}function Rn(t){return e=>{let n=!1;return(...r)=>{switch(r.length){case 0:return e();case 1:return e(r[0]);case 2:if(n){const o=e(r[0],t);return A(o)?o:e(o,r[1])}else return n=!0,e(r[0],r[1])}}}}function Sn(t,e){return arguments.length===1?Rn(t):U(1,Wt(lt(t),e))}function kn(t,e){const n=p(t),r=q(n)||{};for(const o of e){const u=w(t,o);u!=null&&b(r,o,u)}return r}function ft(t){return A(t)?ot(t):t}function Qn(t){return e=>{let n=[];return(...r)=>{let o,u;switch(r.length){case 0:return e();case 1:return o=r[0],n.length!==0&&(u=[...n],n=[],o=ft(e(o,u))),e(o);case 2:return o=r[0],n.push(r[1]),t===n.length?(u=[...n],n=[],e(o,u)):o}}}}function Jt(t,...e){if(arguments.length===1)return Qn(t);let n=t,r=e[0];return e.length===2&&([n,r]=e),Xt(t,n,[],r,!0)}function Ut(t,...e){let n=t,r=[],o=e[0];return e.length===2?[n,o]=e:e.length>2&&([n,r,o]=e),Xt(t,n,r,o,!1)}const Kn=Ut,In=Jt;function Xt(t,e,n,r,o){return a(function*(){let u=[],i=0;for(const c of s(r))i<t&&(u.push(c),u.length===t&&(yield u,u=e<t?u.slice(e):[])),i++,i===e&&(i=0);u.length>0&&(u.length===t||o?yield u:n.length&&(u.push(...n.slice(0,t-u.length)),yield u))})}function jn(t){return e=>{let n=[];const r={};let o=r;return(...u)=>{const i=u.length;if(i===0)return e();if(i===1){let c=u[0];if(n.length!==0){const l=[...n];n=[],c=ft(e(c,l))}return e(c)}if(i===2){const c=u[0],l=u[1],g=o,d=t(l);if(o=d,g===r||d===g)return n.push(l),c;{const be=[...n];n=[];const wt=e(c,be);return A(wt)||n.push(l),wt}}}}}function Tn(t,e){return t=f(t),arguments.length===1?jn(t):a(function*(){const n=$(e),r=n.next();r.done&&(yield*null);const o=r.value;let u=t(o),i=[o],c=[];for(;;){const l=n.next();if(l.done){yield i;break}const g=l.value,d=t(g);u==d?i.push(g):(yield i,c.push(g),i=c,u=d,c=[])}})}function V(t){const e=p(t);if(e!=null)return q(e);throw new Error(`Can't create empty of ${typeof t}`)}function Nn(...t){const e=t[0];let n;return e==null?n={}:n=te(V(e),e),z(n,...t.slice(1))}function Zt(t){return t[0]}function Ht(t){return t[1]}function On(t,...e){t=f(t);var n=!1;for(const r of e)if(r!=null){n=!0;break}if(n){const r=(u,i)=>{const c=Zt(i),l=Ht(i);return kt(u,c)?S(u,c,t(w(u,c),l)):S(u,c,l)};return Q((u,i)=>Q(r,u||{},E(i)),e)}else return null}function Gn(){return performance.now()}function te(...t){let e,n,r,o,u;switch(t.length){case 0:return[];case 1:return t[0];case 2:return Rt(t[0]??[],...s(t[1]));case 3:return e=t[0],n=t[1],r=t[2],o=I(e),u=(i,c)=>c===void 0?i:z(i,c),mt(n,u,o,r);default:throw TypeError(`Invalid arity call of into: ${t.length}`)}}function qn(t,e){return t===e}function lt(...t){if(t.length==0||t.length>2)throw new Error(`Invalid arity: ${t.length}`);return{[nt]:!0,[Nt]:t.length==1?function*(){const e=t[0];for(;;)yield e}:function*(){const[e,n]=t;for(var r=0;r<e;r++)yield n}}}function ee(t){return A(t)?t:P(t)}function Bn(t){return e=>{let n=t;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1){const u=r[0];return e(u)}if(o===2){let u=r[0];const i=r[1],c=n,l=(n=n-1,n);return c>0&&(u=e(u,i)),l>0?u:ee(u)}}}}function W(t,e){return arguments.length===1?Bn(t):a(function*(){let n=t-1;for(const r of s(e))if(n-->=0&&(yield r),n<0)return})}function zn(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const o=n[0],u=n[1];return _(t(u))?e(o,u):P(o)}}}function J(t,e){return t=f(t),arguments.length===1?zn(t):a(function*(){for(const n of s(e))if(_(t(n)))yield n;else return})}function Ln(t){return e=>{let n=-1;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1];return n++,we(n,t)===0?e(u,i):u}}}}function $n(t,e){return arguments.length===1?Ln(t):t<=0?lt(k(e)):a(function*(){let n=0;for(const r of s(e))n%t===0&&(yield r),n++})}function Fn(t,...e){return t=f(t),function(...n){return t(...e,...n)}}function Pn(t){return a(function*(){for(;;)yield*t})}function Yn(t){return e=>{let n=t;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=r[0],i=r[1],c=n;return n--,c>0?u:e(u,i)}}}}function U(t,e){return arguments.length===1?Yn(t):a(function*(){const n=L(s(e));for(let r=0;r<t;r++)n.next();yield*n})}function Cn(t){return e=>{let n=!0;return(...r)=>{const o=r.length;if(o===0)return e();if(o===1)return e(r[0]);if(o===2){const u=n,i=r[0],c=r[1];return u&&_(t(c))?i:(n=null,e(i,c))}}}}function ne(t,e){return t=f(t),arguments.length===1?Cn(t):a(function*(){const n=L(s(e));for(;;){const r=n.next();if(r.done)break;const o=r.value;if(!_(t(o))){yield o;break}}yield*n})}function Dn(){return t=>{const e=new Set;return(...n)=>{const r=n.length;if(r===0)return t();if(r===1)return t(n[0]);if(r===2){const o=n[0],u=n[1];return e.has(u)?o:(e.add(u),t(o,u))}}}}function Vn(t){return arguments.length===0?Dn():a(function*(){const e=new Set;for(const n of s(t))e.has(n)||(yield n),e.add(n)})}function Wn(t,e,n,...r){return n=f(n),S(t,e,n(w(t,e),...r))}function at(t,e,n){let r=t;for(const o of e)r=w(r,o);return r===void 0?n:r}function Jn(t,e,n,...r){return n=f(n),vt(t,e,n(at(t,e),...r))}function pt(t,e,...n){return t=f(t),function(r,...o){return r?t(r,...n,...o):t(e,...n,...o)}}function re(t,e){t=f(t);for(const n of s(e))if(!t(n))return!1;return!0}function Un(t,e){return!re(t,e)}function Xn(t){return e=>(...n)=>{const r=n.length;if(r===0)return e();if(r===1)return e(n[0]);if(r===2){const o=n[0],u=n[1],i=t(u);return i==null?o:e(o,i)}}}function Zn(t,e){return t=f(t),arguments.length===1?Xn(t):a(function*(){for(const n of s(e)){const r=t(n);_(r)&&(yield r)}})}function Hn(t){return t=s(t),[...t].reverse()}function ht(t,e){return arguments.length===1&&(e=t,t=void 0),t=f(t),e=s(e),[...e].sort(t||v)}function tr(t){return t===v?t:(e,n)=>{const r=t(e,n);return le(r)?r:r?-1:t(n,e)?1:0}}function er(t,e,n){return arguments.length===2&&(n=e,e=v),t=f(t),e=f(e),ht((r,o)=>{const u=tr(e),i=t(r),c=t(o);return u(i,c)},n)}function nr(t){const e=[...t];let n=t.length;for(;n;){const r=Math.floor(Math.random()*n--),o=e[n];e[n]=e[r],e[r]=o}return e}function oe(t,e){t=f(t);for(const n of s(e)){const r=t(n);if(_(r))return r}}function rr(t,e){return t=f(t),!oe(t,e)}function or(t,e){return(Array.isArray(e)?it:j)(r=>{const o=t[r];return o!==void 0?o:r},e)}function ur(t){return!E(t)}function ue(t){return Math.floor(Math.random()*t)}function ir(t){const e=ue(O(t));return It(t,e)}function cr(t){return a(function*(){for(;;)yield t()})}function sr(t,e){arguments.length===1&&(e=t,t=void 0);const n=cr(e);return t?W(t,n):n}function _t(t,e,n,...r){const o=w(t,e);return b(t,e,n(o,...r))}function fr(t,e){t=f(t);const n={};for(const r of s(e)){const o=t(r);_t(n,o,pt(z,[]),r)}return n}function lr(t){const e={},n=pt(Qt,0);for(const r of s(t))_t(e,r,n);return e}class ar{constructor(e){this.f=e,this.res=void 0}*[Symbol.iterator](){this.res===void 0&&(this.res=this.f(),this.f=null),yield*s(this.res)}}function pr(t){const e=[...s(t)];return e.pop(),e.length>0?e:null}function hr(...t){const[e,n]=t.length>1?t:[1,t[0]];return j((r,o)=>r,n,U(e,n))}function _r(t,e){return[W(t,e),U(t,e)]}function dr(t,e){return[J(t,e),ne(t,e)]}function O(t){if(!t)return 0;const e=t.length||t.size;if(typeof e=="number")return e;let n=0;for(const r of s(t))n++;return n}function xr(t){return t===!0}function yr(t){return t===!1}function mr(t){return t!=null}function wr(t){return!!t}function gr(t){return t===0}function br(t){return t<0}function Ar(t){return t>0}function vr(...t){let e=0;const n={};for(;!(e>=t.length);)n[t[e]]=t[e+1],e=e+2;return n}function Mr(t){return t.length}function Er(t,e,n,...r){if(r.length==0)return t[e]=n,n;{const o=[e,n,...r],u=o[o.length-1];let i=t,c=0;const l=o.length-2;for(;c<l;c++)i=i[o[c]];return i[o[c]]=u,n}}function Rr(t){for(const e of s(t));return null}function Sr(t){return R(t)}function kr(t){return[...t]}function Qr(t,e,n){return t._add_watch(e,n)}function Kr(t,e){return t._remove_watch(e)}function dt(t,e,n){if(!n)return e;var r=e;for(const o of s(n))r=t(r,o[0],o[1]);return r}function ie(t,e,...n){return e==null?t:Math.max(t,e,...n)}function Ir(t,e,...n){return e==null?t:Math.min(t,e,...n)}function ce(t){return t==null?!1:!!(B(t)||t instanceof Map)}function jr(...t){return(...e)=>{for(const n of t)for(const r of e)if(!n(r))return!1;return!0}}function Tr(...t){return(...e)=>{for(const n of t)for(const r of e){const o=n(r);if(o)return o}}}function se(t,e){return R(e||t)}function Nr(t,e){var n=e;return a(function*(){for(;;)yield n,n=t(n)})}function Or(...t){return t=t.map(f),(...e)=>{const n=[];for(const r of t)n.push(r(...e));return n}}function H(t){if(Array.isArray(t)){const e=t.slice(1);return e.length>0?e:null}else return E(F(t))}function Gr(t){return H(H(t))}function v(t,e){if(t===e)return 0;{if(t==null)return-1;if(e==null)return 1;const n=typeof t,r=typeof e;if(n==="number"&&r==="number"||n==="string"&&r==="string")return t===e?0:t<e?-1:1;throw new Error(`comparing ${n} to ${r}`)}}function qr(t){return se(t)}function _(t){return t!=null&&t!==!1}const Br=_;function fe(t,e,n){return t.substring(e,n)}function zr(t){return typeof t=="function"}function Lr(t,e){return a(function*(){for(;;){const n=t.exec(e);if(n){const r=n[0];yield n.length===1?r:R(n);const u=n.index+ie(1,r.length);if(u>e.length)break;e=fe(e,u)}else break}})}function $r(t){return Number.isNaN(t)}function le(t){return typeof t=="number"}function ae(t){return t?Object.keys(t):null}function Fr(t){return ae(t)}function Pr(t){return t?Object.values(t):null}function xt(t){return typeof t=="string"}function Yr(t){return p(t)!=null}function Cr(t){return t instanceof RegExp}class yt extends Error{constructor(e,n,r){super(e),this._data=n,this._cause=r}}function Dr(t){return t instanceof yt?t._data:null}function Vr(t){return t instanceof Error?t.message:null}function Wr(t){return t instanceof yt?t._cause:null}function Jr(t,e,n){return new yt(t,e,n)}function pe(t){return Number.isInteger(t)}const Ur=pe,he=Symbol("meta");function Xr(t){return t instanceof Object?t[he]:null}function Zr(t,e){const n=I(t);return n[he]=e,n}function Hr(t){return t===!0||t===!1}function _e(t){switch(p(t)){case x:case h:case y:case M:case m:return!0}return!1}function to(t,e){return _e(e)?O(e):O(W(t,e))}function eo(t,e){const n=w(t,e);if(n!==void 0)return[e,n]}function no(t,e){return(t%e+e)%e}function ro(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i<=r&&(r=i,o=u)}),o}function oo(t,e,...n){if(n.length==0)return e;var r=t(e),o=e;return n.forEach(u=>{var i=t(u);i>=r&&(r=i,o=u)}),o}function uo(t){throw new Error(`Expected string, got: ${typeof t}`)}function io(t){if(xt(t)){if(/^[+-]?\d+$/.test(t)){const e=parseInt(t);if(Number.MIN_SAFE_INTEGER<=e<=Number.MAX_SAFE_INTEGER)return e}return null}return uo(t)}function de(t){return t>=0?Math.floor(t):Math.ceil(t)}function xe(t,e){const n=t%e;return de((t-n)/e)}function mt(t,...e){switch(e.length){case 2:{const n=e[0],r=e[1];return mt(t,n,n(),r)}default:{let n=e[0];const r=e[1],o=e[2];n=t(n);const u=Q(n,r,o);return n(u)}}}function co(t,e){const n={},r=s(t)[Symbol.iterator](),o=s(e)[Symbol.iterator]();let u,i;for(;u=r.next(),!(u.done||(i=o.next(),i.done));)n[u.value]=i.value;return n}function so(t){return E(t)?t:null}function ye(t,e,n){const r=function*(o){if(yield o,_(t(o)))for(const u of s(e(o)))yield*r(u)};return a(function*(){yield*r(n)})}function fo(t){return Y(ct(Z),F(ye(Z,E,t)))}function lo(t){return I(t)}function ao(t){return Object.freeze(t)}class T{constructor(e){e instanceof T||(e=ht(e));const r=new Set(e);this._elts=[...r],this._set=r}add(e){if(this._set.has(e))return this;const n=this._elts;let r=!1;for(let o=0;o<n.length;o++)if(v(e,n[o])<=0){n.splice(o,0,e),r=!0;break}return r?this._set=new Set(n):(n.push(e),this._set.add(e)),this.size=n.length,this}delete(e){if(!this._set.has(e))return this;const n=this._elts,r=n.indexOf(e);return n.splice(r,1),this._set=new Set(n),this.size=n.length,this}has(e){return this._set.has(e)}keys(){return this.values()}values(){return this._elts[Symbol.iterator]()}entries(){return this._set.entries()}forEach(...e){return this.set.forEach(...e)}clear(){this._elts=[],this._set=new Set(this._elts)}[Symbol.iterator](){return this.keys()}}function po(...t){return new T(t)}function tt(t,e,n){return r=>e(v(r,n),0)}function me(t,e,n=!0){let r=0;for(;r<t.length&&v(e,t[r])>0;r++);return r}function ho([t,e,n]){const r=tt(t,e,n);if(e===gt||e===bt){const o=[...t],u=me(o,n,!0);return o.splice(0,u),r(o[0])||o.splice(0,1),o}else return[...J(r,t)]}function _o([t,e,n,r,o]){const u=[...t],i=me(u,n,!0);u.splice(0,i);const c=tt(t,r,o);return tt(t,e,n)(u[0])||u.splice(0,1),[...J(c,u)]}function xo(...t){if(t.length===3)return ho(t);if(t.length===5)return _o(t)}function yo(t){return Math.abs(t)}function mo(t){return de(t)}function wo(t){return t!=null&&t.constructor}function go(t){return(e,n)=>{const r=t(e,n);return A(r)?P(r):r}}function bo(t){return t=go(t),(...e)=>{switch(e.length){case 0:return t();case 1:return t(e[0]);case 2:return Q(t,e[0],e[1])}}}function we(t,e){const n=xe(t,e);return t-e*n}function Ao(t){const e=new Map;return(...n)=>{const r=[n.length,...n],o=at(e,r);if(o===void 0){const u=t(...n);return Mt(e,r,u),u}else return o}}function vo(t){return D(t)?t[t.length-1]:k(t)}function Mo(t){if(D(t)){const e=[...t];return e.pop(),e}else return F(t)}function Eo(t,e){const n=V(t),r=At(t)||b;return dt((o,u,i)=>r(o,e(u),i),n,t),n}function ge(t,e){const n=V(t),r=At(t)||b;return dt((o,u,i)=>r(o,u,e(i)),n,t),n}class Ro{constructor(e){this.f=e}_deref(){return this.realized?this.v:(this.v=this.f(),this.realized=!0,this.v)}}function et(t,e){if(e.has(t))return t;if(e.add(t),ce(t))return ge(t,r=>et(r,e));const n=p(t);return n&&n!=y?it(r=>et(r,e),t):t}function So(t){return et(t,new Set)}return Se(ko);})();
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "squint-cljs",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.8.129",
5
+ "version": "0.8.130",
6
6
  "files": [
7
7
  "core.js",
8
8
  "src/squint/core.js",
@@ -82,9 +82,11 @@ function objAssocMut(m, k, v) {
82
82
 
83
83
  function getAssocMut(m) {
84
84
  switch (typeConst(m)) {
85
- case MAP_TYPE: return mapAssocMut;
85
+ case MAP_TYPE:
86
+ return mapAssocMut;
86
87
  case ARRAY_TYPE:
87
- case OBJECT_TYPE: return objAssocMut;
88
+ case OBJECT_TYPE:
89
+ return objAssocMut;
88
90
  }
89
91
  }
90
92
 
@@ -514,7 +516,8 @@ export function seqable_QMARK_(x) {
514
516
  x === undefined ||
515
517
  // we used to check instanceof Object but this returns false for TC39 Records
516
518
  // also we used to write `Symbol.iterator in` but this does not work for strings and some other types
517
- !!x[Symbol.iterator]);
519
+ !!x[Symbol.iterator]
520
+ );
518
521
  }
519
522
 
520
523
  export function iterable(x) {
@@ -577,7 +580,7 @@ export function rest(coll) {
577
580
  }
578
581
 
579
582
  class IDerefAsync {
580
- then(resolve,_reject) {
583
+ then(resolve, _reject) {
581
584
  return resolve(this._deref());
582
585
  }
583
586
  }
@@ -656,7 +659,8 @@ function* _reductions2(f, s) {
656
659
  }
657
660
 
658
661
  function* _reductions3(f, init, coll) {
659
- let i = init, rst = coll;
662
+ let i = init,
663
+ rst = coll;
660
664
  while (true) {
661
665
  if (reduced_QMARK_(i)) {
662
666
  yield i.value;
@@ -783,8 +787,10 @@ function filter1(pred) {
783
787
  return (rf) => {
784
788
  return (...args) => {
785
789
  switch (args.length) {
786
- case 0: return rf();
787
- case 1: return rf(args[0]);
790
+ case 0:
791
+ return rf();
792
+ case 1:
793
+ return rf(args[0]);
788
794
  case 2: {
789
795
  const result = args[0];
790
796
  const input = args[1];
@@ -824,9 +830,12 @@ function map_indexed1(f) {
824
830
  let i = -1;
825
831
  return (...args) => {
826
832
  switch (args.length) {
827
- case 0: return rf();
828
- case 1: return rf(args[0]);
829
- case 2: return rf(args[0], f((i = i + 1, i), args[1]));
833
+ case 0:
834
+ return rf();
835
+ case 1:
836
+ return rf(args[0]);
837
+ case 2:
838
+ return rf(args[0], f(((i = i + 1), i), args[1]));
830
839
  }
831
840
  };
832
841
  };
@@ -1058,14 +1067,21 @@ export function vector_QMARK_(x) {
1058
1067
  export function mapv(...args) {
1059
1068
  if (args.length === 2) {
1060
1069
  const [f, coll] = args;
1061
- if (coll instanceof LazyIterable) {
1070
+ const iter = iterable(coll);
1071
+ if (Array.isArray(iter)) {
1072
+ const ret = new Array(iter.length);
1073
+ for (var i = 0; i < iter.length; i++) {
1074
+ ret[i] = f(iter[i]);
1075
+ }
1076
+ return ret;
1077
+ }
1078
+ else {
1062
1079
  var ret = [];
1063
- for (const x of coll) {
1080
+ for (const x of iter) {
1064
1081
  ret.push(f(x));
1065
1082
  }
1066
1083
  return ret;
1067
1084
  }
1068
- return into([], map(f), coll);
1069
1085
  }
1070
1086
  return [...map(...args)];
1071
1087
  }
@@ -1179,8 +1195,10 @@ function interpose1(sep) {
1179
1195
  let started = false;
1180
1196
  return (...args) => {
1181
1197
  switch (args.length) {
1182
- case 0: return rf();
1183
- case 1: return rf(args[0]);
1198
+ case 0:
1199
+ return rf();
1200
+ case 1:
1201
+ return rf(args[0]);
1184
1202
  case 2: {
1185
1203
  if (started) {
1186
1204
  const sepr = rf(args[0], sep);
@@ -1231,7 +1249,8 @@ function partition_all1(n) {
1231
1249
  return (...args) => {
1232
1250
  let result, v;
1233
1251
  switch (args.length) {
1234
- case 0: return rf();
1252
+ case 0:
1253
+ return rf();
1235
1254
  case 1: {
1236
1255
  result = args[0];
1237
1256
  if (a.length !== 0) {
@@ -1494,13 +1513,13 @@ export function repeat(...args) {
1494
1513
  [IIterable__iterator]:
1495
1514
  args.length == 1
1496
1515
  ? function* () {
1497
- const x = args[0];
1498
- while (true) yield x;
1499
- }
1516
+ const x = args[0];
1517
+ while (true) yield x;
1518
+ }
1500
1519
  : function* () {
1501
- const [n, x] = args;
1502
- for (var i = 0; i < n; i++) yield x;
1503
- },
1520
+ const [n, x] = args;
1521
+ for (var i = 0; i < n; i++) yield x;
1522
+ },
1504
1523
  };
1505
1524
  }
1506
1525
 
@@ -1528,14 +1547,13 @@ function take1(n) {
1528
1547
  let result = args[0];
1529
1548
  const input = args[1];
1530
1549
  const n = na;
1531
- const nn = (na = na - 1, na);
1550
+ const nn = ((na = na - 1), na);
1532
1551
  if (n > 0) {
1533
1552
  result = rf(result, input);
1534
1553
  }
1535
1554
  if (!(nn > 0)) {
1536
1555
  return ensure_reduced(result);
1537
- }
1538
- else {
1556
+ } else {
1539
1557
  return result;
1540
1558
  }
1541
1559
  }
@@ -2047,7 +2065,7 @@ export function pos_QMARK_(x) {
2047
2065
  export function js_obj(...args) {
2048
2066
  let ctr = 0;
2049
2067
  const ret = {};
2050
- for (; ;) {
2068
+ for (;;) {
2051
2069
  if (ctr >= args.length) {
2052
2070
  break;
2053
2071
  }
@@ -2217,9 +2235,9 @@ export function compare(x, y) {
2217
2235
  if (y == null) {
2218
2236
  return 1;
2219
2237
  }
2220
- const tx = typeof (x);
2221
- const ty = typeof (y);
2222
- if (tx === 'number' && ty === 'number' || tx === 'string' && ty === 'string') {
2238
+ const tx = typeof x;
2239
+ const ty = typeof y;
2240
+ if ((tx === 'number' && ty === 'number') || (tx === 'string' && ty === 'string')) {
2223
2241
  if (x === y) {
2224
2242
  return 0;
2225
2243
  }
@@ -2361,7 +2379,11 @@ export function boolean_QMARK_(x) {
2361
2379
  export function counted_QMARK_(x) {
2362
2380
  const tc = typeConst(x);
2363
2381
  switch (tc) {
2364
- case ARRAY_TYPE: case MAP_TYPE: case OBJECT_TYPE: case LIST_TYPE: case SET_TYPE:
2382
+ case ARRAY_TYPE:
2383
+ case MAP_TYPE:
2384
+ case OBJECT_TYPE:
2385
+ case LIST_TYPE:
2386
+ case SET_TYPE:
2365
2387
  return true;
2366
2388
  }
2367
2389
  return false;
@@ -2470,7 +2492,7 @@ export function zipmap(keys, vals) {
2470
2492
  const keyIterator = iterable(keys)[Symbol.iterator]();
2471
2493
  const valIterator = iterable(vals)[Symbol.iterator]();
2472
2494
  let nextKey, nextVal;
2473
- for (; ;) {
2495
+ for (;;) {
2474
2496
  nextKey = keyIterator.next();
2475
2497
  if (nextKey.done) break;
2476
2498
  nextVal = valIterator.next();
@@ -2502,8 +2524,7 @@ export function tree_seq(isBranch, children, root) {
2502
2524
  }
2503
2525
 
2504
2526
  export function flatten(x) {
2505
- return filter(complement(sequential_QMARK_),
2506
- rest(tree_seq(sequential_QMARK_, seq, x)));
2527
+ return filter(complement(sequential_QMARK_), rest(tree_seq(sequential_QMARK_, seq, x)));
2507
2528
  }
2508
2529
 
2509
2530
  export function transient$(x) {
@@ -2540,8 +2561,7 @@ class SortedSet {
2540
2561
  xs.push(x);
2541
2562
  // in this case we can re-use the set, since we add the element last
2542
2563
  this._set.add(x);
2543
- }
2544
- else {
2564
+ } else {
2545
2565
  this._set = new Set(xs);
2546
2566
  }
2547
2567
  this.size = xs.length;
@@ -2658,8 +2678,7 @@ function preserving_reduced(rf) {
2658
2678
  const ret = rf(a1, a2);
2659
2679
  if (reduced_QMARK_(ret)) {
2660
2680
  return reduced(ret);
2661
- }
2662
- else return ret;
2681
+ } else return ret;
2663
2682
  };
2664
2683
  }
2665
2684
 
@@ -2667,16 +2686,19 @@ export function cat(rf) {
2667
2686
  rf = preserving_reduced(rf);
2668
2687
  return (...args) => {
2669
2688
  switch (args.length) {
2670
- case 0: return rf();
2671
- case 1: return rf(args[0]);
2672
- case 2: return reduce(rf, args[0], args[1]);
2689
+ case 0:
2690
+ return rf();
2691
+ case 1:
2692
+ return rf(args[0]);
2693
+ case 2:
2694
+ return reduce(rf, args[0], args[1]);
2673
2695
  }
2674
2696
  };
2675
2697
  }
2676
2698
 
2677
2699
  export function rem(n, d) {
2678
2700
  const q = quot(n, d);
2679
- return n - (d * q);
2701
+ return n - d * q;
2680
2702
  }
2681
2703
 
2682
2704
  export function memoize(f) {
@@ -2713,18 +2735,26 @@ export function pop(vec) {
2713
2735
  export function update_keys(m, f) {
2714
2736
  const m2 = empty(m);
2715
2737
  const assocFn = getAssocMut(m) || assoc_BANG_;
2716
- reduce_kv((acc, k, v) => {
2717
- return assocFn(acc, f(k), v);
2718
- }, m2, m);
2738
+ reduce_kv(
2739
+ (acc, k, v) => {
2740
+ return assocFn(acc, f(k), v);
2741
+ },
2742
+ m2,
2743
+ m
2744
+ );
2719
2745
  return m2;
2720
2746
  }
2721
2747
 
2722
2748
  export function update_vals(m, f) {
2723
2749
  const m2 = empty(m);
2724
2750
  const assocFn = getAssocMut(m) || assoc_BANG_;
2725
- reduce_kv((acc, k, v) => {
2726
- return assocFn(acc, k, f(v));
2727
- }, m2, m);
2751
+ reduce_kv(
2752
+ (acc, k, v) => {
2753
+ return assocFn(acc, k, f(v));
2754
+ },
2755
+ m2,
2756
+ m
2757
+ );
2728
2758
  return m2;
2729
2759
  }
2730
2760
 
@@ -2748,12 +2778,12 @@ function clj__GT_js_(x, seen) {
2748
2778
  if (seen.has(x)) return x;
2749
2779
  seen.add(x);
2750
2780
  if (map_QMARK_(x)) {
2751
- return update_vals(x, x => clj__GT_js_(x, seen));
2781
+ return update_vals(x, (x) => clj__GT_js_(x, seen));
2752
2782
  }
2753
2783
 
2754
2784
  const tc = typeConst(x);
2755
2785
  if (tc && tc != OBJECT_TYPE) {
2756
- return mapv(x => clj__GT_js_(x, seen), x);
2786
+ return mapv((x) => clj__GT_js_(x, seen), x);
2757
2787
  }
2758
2788
  return x;
2759
2789
  }