'use strict'; var w=(r,t)=>(t=Symbol[r])?t:Symbol.for("Symbol."+r),gt=r=>{throw TypeError(r)};var e=(r,t,o)=>new Promise((n,i)=>{var s=y=>{try{m(o.next(y));}catch(v){i(v);}},x=y=>{try{m(o.throw(y));}catch(v){i(v);}},m=y=>y.done?n(y.value):Promise.resolve(y.value).then(s,x);m((o=o.apply(r,t)).next());}),qt=function(r,t){this[0]=r,this[1]=t;};var Mt=r=>{var t=r[w("asyncIterator")],o=!1,n,i={};return t==null?(t=r[w("iterator")](),n=s=>i[s]=x=>t[s](x)):(t=t.call(r),n=s=>i[s]=x=>{if(o){if(o=!1,s==="throw")throw x;return x}return o=!0,{done:!1,value:new qt(new Promise(m=>{var y=t[s](x);y instanceof Object||gt("Object expected"),m(y);}),1)}}),i[w("iterator")]=()=>i,n("next"),"throw"in t?n("throw"):i.throw=s=>{throw s},"return"in t&&n("return"),i},l=(r,t,o)=>(t=r[w("asyncIterator")])?t.call(r):(r=r[w("iterator")](),t={},o=(n,i)=>(i=r[n])&&(t[n]=s=>new Promise((x,m,y)=>(s=i.call(r,s),y=s.done,Promise.resolve(s.value).then(v=>x({value:v,done:y}),m)))),o("next"),o("return"),t);function yr(r){return r!=null}function G(r){return typeof r=="function"}function Dt(r){return r!=null&&G(r[Symbol.iterator])}function R(r){return !!r&&r.length>0}function E(r){return !!r&&r.trim().length>0}function C(r){return {[Symbol.iterator](){return r()}}}function Pt(r){return {[Symbol.asyncIterator](){return r()}}}function B(r){return Dt(r)?r[Symbol.iterator]():r[Symbol.asyncIterator]()}function a(){return {done:!0,value:void 0}}function c(r){return {done:!1,value:r}}function T(r){return G(r)?r():r}var K=class{constructor(t,o){this.iterable=t;this.iteratorMapper=o;}[Symbol.iterator](){return this.iteratorMapper(this.iterable[Symbol.iterator]())}},N=class{constructor(t,o){this.iterable=t;this.iteratorMapper=o;}[Symbol.asyncIterator](){return this.iteratorMapper(this.iterable[Symbol.asyncIterator]())}};function u(r){return t=>new K(t,r)}function p(r){return t=>new N(t,r)}var S=class{next(){return a()}},M=class{next(){return e(this,null,function*(){return a()})}},D=class{constructor(t){this.iterator=t;}next(){return e(this,null,function*(){return this.iterator.next()})}};var I=class r{constructor(t=null){this.asyncIterable=t;}[Symbol.asyncIterator](){return this.asyncIterable?this.asyncIterable[Symbol.asyncIterator]():new M}collectAsync(t){return t(this)}pipeAsync(...t){if(!t.length)return this;let o=t.reduce((n,i)=>i(n),this);return new r(o)}};var f=class r extends I{constructor(o=null){super(null);this.iterable=o;}[Symbol.iterator](){return this.iterable?this.iterable[Symbol.iterator]():new S}[Symbol.asyncIterator](){let o=this[Symbol.iterator]();return new D(o)}collect(o){return o(this)}pipe(...o){if(!o.length)return this;let n=o.reduce((i,s)=>s(i),this);return new r(n)}};var g=class{constructor(t){this.iterables=t;this.index=0;}next(){for(;this.indexnew g(r)))}var Vr=h;var q=class{constructor(t){this.iterables=t;this.index=0;}next(){return e(this,null,function*(){for(;this.indexnew q(r)))}var gr=b;function*kt(r){for(;;)yield*Mt(r);}function $r(r){return new f(kt(r))}function Xr(){return new f}function Ht(r){return new f(r)}var oo=Ht;function zt(r){return new I(r)}var io=zt;function Wt(...r){return new f(r)}var mo=Wt;var k=class{constructor(t,o,n){this.a=t;this.b=o;this.productFunction=n;}*[Symbol.iterator](){for(let t of this.a)for(let o of this.b)yield this.productFunction(t,o);}};function Fo(r,t,o){return new f(new k(r,t,o))}var H=class{constructor(t,o,n=1){this.start=t;this.count=o;this.by=n;this.index=0;}next(){return this.indexnew H(r,t,o)))}var z=class{constructor(t,o){this.value=t;this.times=o;this.index=0;}next(){return this.index++,this.index<=this.times?c(T(this.value)):a()}};function Mo(r,t=Number.POSITIVE_INFINITY){return new f(C(()=>new z(r,t)))}var W=class{constructor(t,o,n){this.a=t;this.b=o;this.zipFunction=n;}next(){let{value:t,done:o}=this.a.next(),{value:n,done:i}=this.b.next();return o||i?a():c(this.zipFunction(t,n))}},L=class{constructor(t,o,n){this.a=t;this.b=o;this.zipFunction=n;}[Symbol.iterator](){return new W(this.a[Symbol.iterator](),this.b[Symbol.iterator](),this.zipFunction)}};function No(r,t,o){return new f(new L(r,t,o))}var $=class{constructor(t,o,n){this.a=t;this.b=o;this.zipFunction=n;}next(){return e(this,null,function*(){let{value:t,done:o}=yield this.a.next(),{value:n,done:i}=yield this.b.next();return o||i?a():c(this.zipFunction(t,n))})}},J=class{constructor(t,o,n){this.a=t;this.b=o;this.zipFunction=n;}[Symbol.asyncIterator](){return new $(this.a[Symbol.asyncIterator](),this.b[Symbol.asyncIterator](),this.zipFunction)}};function Ho(r,t,o){return new I(new J(r,t,o))}var j=class{constructor(t,o,n,i){this.a=t;this.b=o;this.fillValue=n;this.zipFunction=i;}next(){let{value:t,done:o}=this.a.next(),{value:n,done:i}=this.b.next();return o&&i?a():c(this.zipFunction(o?T(this.fillValue):t,i?T(this.fillValue):n))}},Y=class{constructor(t,o,n,i){this.a=t;this.b=o;this.fillValue=n;this.zipFunction=i;}[Symbol.iterator](){return new j(this.a[Symbol.iterator](),this.b[Symbol.iterator](),this.fillValue,this.zipFunction)}};function Uo(r,t,o,n){return new f(new Y(r,t,o,n))}function fn(...r){return t=>h(...r,t)}function Fn(...r){return t=>b(...r,t)}function*Lt(r,t){for(let o of r)yield o.filter(t);}function In(r){return t=>Lt(t,r)}function*$t(r,t){for(let o of r)yield o.map(t);}function Cn(r){return t=>$t(t,r)}var Q=class{constructor(t,o){this.iterator=t;this.size=o;this.bufferArray=[];}next(){for(let{value:t,done:o}=this.iterator.next();!o;{value:t,done:o}=this.iterator.next())if(this.bufferArray.push(t),this.bufferArray.length===this.size){let n=c(this.bufferArray);return this.bufferArray=[],n}if(this.bufferArray.length){let t=c(this.bufferArray);return this.bufferArray=[],t}return a()}};function Sn(r){return u(t=>new Q(t,r))}var U=class{constructor(t,o){this.iterator=t;this.size=o;this.bufferArray=[];}next(){return e(this,null,function*(){for(let{done:t,value:o}=yield this.iterator.next();!t;{done:t,value:o}=yield this.iterator.next())if(this.bufferArray.push(o),this.bufferArray.length===this.size){let n=c(this.bufferArray);return this.bufferArray=[],n}if(this.bufferArray.length){let t=c(this.bufferArray);return this.bufferArray=[],t}return a()})}};function Pn(r){return p(t=>new U(t,r))}function X(...r){return t=>r.reduce((o,n)=>n(o),t)}var qn=X;function _(...r){return t=>r.reduce((o,n)=>n(o),t)}var Hn=_;function jn(...r){return t=>h(t,...r)}function Un(...r){return t=>b(t,...r)}var Z=class{constructor(t,o){this.iterator=t;this.defaultValue=o;this.returnedValue=!1;}next(){let t=this.iterator.next();return !this.returnedValue&&(this.returnedValue=!0,t.done)?c(T(this.defaultValue)):t}};function ne(r){return u(t=>new Z(t,r))}var tt=class{constructor(t,o){this.iterator=t;this.defaultValue=o;this.returnedValue=!1;}next(){return e(this,null,function*(){let t=yield this.iterator.next();return !this.returnedValue&&(this.returnedValue=!0,t.done)?c(T(this.defaultValue)):t})}};function ae(r){return p(t=>new tt(t,r))}var rt=class{constructor(t){this.iterator=t;this.items=new Set;}next(){for(let{value:t,done:o}=this.iterator.next();!o;{value:t,done:o}=this.iterator.next())if(!this.items.has(t))return this.items.add(t),c(t);return this.items.clear(),a()}};function Te(){return u(r=>new rt(r))}var ot=class{constructor(t){this.iterator=t;this.items=new Set;}next(){return e(this,null,function*(){for(let{value:t,done:o}=yield this.iterator.next();!o;{value:t,done:o}=yield this.iterator.next())if(!this.items.has(t))return this.items.add(t),c(t);return this.items.clear(),a()})}};function Ae(){return p(r=>new ot(r))}var nt=class{constructor(t,o=(n,i)=>n===i){this.iterator=t;this.equalsFunction=o;this.items=new Array;}next(){for(let{value:t,done:o}=this.iterator.next();!o;{value:t,done:o}=this.iterator.next())if(this.items.findIndex(n=>this.equalsFunction(n,t))===-1)return this.items.push(t),c(t);return this.items=[],a()}};function Ce(r=(t,o)=>t===o){return u(t=>new nt(t,r))}var et=class{constructor(t,o=(n,i)=>n===i){this.iterator=t;this.equalsFunction=o;this.items=new Array;}next(){return e(this,null,function*(){for(let{value:t,done:o}=yield this.iterator.next();!o;{value:t,done:o}=yield this.iterator.next())if(this.items.findIndex(n=>this.equalsFunction(n,t))===-1)return this.items.push(t),c(t);return this.items=[],a()})}};function Ee(r=(t,o)=>t===o){return p(t=>new et(t,r))}var it=class{constructor(t,o=(n,i)=>n===i){this.iterator=t;this.equalsFunction=o;}next(){for(let{value:t,done:o}=this.iterator.next();!o;{value:t,done:o}=this.iterator.next())if(!this.previous||!this.equalsFunction(t,this.previous))return this.previous=t,c(t);return this.previous=void 0,a()}};function Ne(r){return u(t=>new it(t,r))}var ct=class{constructor(t,o=(n,i)=>n===i){this.iterator=t;this.equalsFunction=o;}next(){return e(this,null,function*(){for(let{value:t,done:o}=yield this.iterator.next();!o;{value:t,done:o}=yield this.iterator.next())if(!this.previous||!this.equalsFunction(t,this.previous))return this.previous=t,c(t);return this.previous=void 0,a()})}};function He(r){return p(t=>new ct(t,r))}var at=class{constructor(t,o,n=(i,s)=>i===s){this.iterator=t;this.key=o;this.equalsFunction=n;}next(){for(let{value:t,done:o}=this.iterator.next();!o;{value:t,done:o}=this.iterator.next()){let n=t[this.key];if(!this.previous||!this.equalsFunction(n,this.previous))return this.previous=n,c(t)}return this.previous=void 0,a()}};function Qe(r,t){return u(o=>new at(o,r,t))}var ut=class{constructor(t,o,n=(i,s)=>i===s){this.iterator=t;this.key=o;this.equalsFunction=n;}next(){return e(this,null,function*(){for(let{value:t,done:o}=yield this.iterator.next();!o;{value:t,done:o}=yield this.iterator.next()){let n=t[this.key];if(!this.previous||!this.equalsFunction(n,this.previous))return this.previous=n,c(t)}return this.previous=void 0,a()})}};function Ze(r,t){return p(o=>new ut(o,r,t))}function ci(...r){return t=>h(t,r)}function pi(...r){return t=>b(t,r)}var O=class{constructor(t,o){this.iterator=t;this.predicate=o;this.index=0;}next(){for(let{done:t,value:o}=this.iterator.next();!t;{done:t,value:o}=this.iterator.next())if(this.predicate(o,this.index++))return c(o);return a()}};function Jt(r){return u(t=>new O(t,r))}function di(){return u(r=>new O(r,t=>!t))}var d=class{constructor(t,o){this.iterator=t;this.predicate=o;this.index=0;}next(){return e(this,null,function*(){for(let{done:t,value:o}=yield this.iterator.next();!t;{done:t,value:o}=yield this.iterator.next())if(this.predicate(o,this.index++))return c(o);return a()})}};function jt(r){return p(t=>new d(t,r))}function Ei(){return p(r=>new d(r,t=>!t))}var pt=class{constructor(t){this.iterator=t;this.current=null;}next(){for(;;){if(this.current){let{value:n,done:i}=this.current.next();if(!i)return c(n);this.current=null;}let{value:t,done:o}=this.iterator.next();if(o)return a();this.current=t[Symbol.iterator]();}}};function st(){return u(r=>new pt(r))}var gi=st;var mt=class{constructor(t){this.iterator=t;this.current=null;}next(){return e(this,null,function*(){for(;;){if(this.current){let{value:n,done:i}=this.current.next();if(!i)return c(n);this.current=null;}let{value:t,done:o}=yield this.iterator.next();if(o)return a();this.current=t[Symbol.iterator]();}})}};function lt(){return p(r=>new mt(r))}var Hi=lt;var ft=class{constructor(t,o){this.iterator=t;this.mapper=o;this.index=0;}next(){let{value:t,done:o}=this.iterator.next();return o?a():c(this.mapper(t,this.index++))}};function Vt(r){return u(t=>new ft(t,r))}var Tt=class{constructor(t,o){this.iterator=t;this.mapper=o;this.index=0;}next(){return e(this,null,function*(){let{value:t,done:o}=yield this.iterator.next();return o?a():c(yield this.mapper(t,this.index++))})}};function Gt(r){return p(t=>new Tt(t,r))}function cc(r){return X(Vt(r),st())}function mc(r){return _(Gt(r),lt())}function Fc(){return r=>r}function xc(){return r=>r}function Cc(){return u(r=>new O(r,R))}function Ec(){return p(r=>new d(r,R))}function Kc(){return u(r=>new O(r,E))}function kc(){return p(r=>new d(r,E))}function Yc(r){return u(t=>new O(t,r))}function Zc(r){return p(t=>new d(t,r))}var yt=class{constructor(t){this.iterator=t;}next(){for(let{done:t,value:o}=this.iterator.next();!t;{done:t,value:o}=this.iterator.next()){if(this.prev){let n=c([this.prev,o]);return this.prev=o,n}this.prev=o;}return a()}};function ia(){return u(r=>new yt(r))}var Ft=class{constructor(t){this.iterator=t;}next(){return e(this,null,function*(){for(let{done:t,value:o}=yield this.iterator.next();!t;{done:t,value:o}=yield this.iterator.next()){if(this.prev){let n=c([this.prev,o]);return this.prev=o,n}this.prev=o;}return a()})}};function ua(){return p(r=>new Ft(r))}var At=class{constructor(t,o){this.iterator=t;this.count=o;this.index=0;}next(){for(let{done:t,value:o}=this.iterator.next();!t;{done:t,value:o}=this.iterator.next())if(this.index++>=this.count)return c(o);return a()}};function ya(r){return u(t=>new At(t,r))}var xt=class{constructor(t,o){this.iterator=t;this.count=o;this.index=0;}next(){return e(this,null,function*(){for(let{done:t,value:o}=yield this.iterator.next();!t;{done:t,value:o}=yield this.iterator.next())if(this.index++>=this.count)return c(o);return a()})}};function xa(r){return p(t=>new xt(t,r))}var Ot=class{constructor(t,o){this.iterator=t;this.predicate=o;this.index=0;this.skip=!0;}next(){for(let{done:t,value:o}=this.iterator.next();!t;{done:t,value:o}=this.iterator.next())if(!(this.skip&&(this.skip=this.predicate(o,this.index++))))return c(o);return a()}};function Ba(r){return u(t=>new Ot(t,r))}var dt=class{constructor(t,o){this.iterator=t;this.predicate=o;this.index=0;this.skip=!0;}next(){return e(this,null,function*(){for(let{done:t,value:o}=yield this.iterator.next();!t;{done:t,value:o}=yield this.iterator.next())if(!(this.skip&&(this.skip=this.predicate(o,this.index++))))return c(o);return a()})}};function Sa(r){return p(t=>new dt(t,r))}function Na(...r){return t=>h(r,t)}function ka(...r){return t=>b(r,t)}var It=class{constructor(t,o){this.iterator=t;this.count=o;this.index=0;}next(){let{done:t,value:o}=this.iterator.next();return t||this.index++>=this.count?a():c(o)}};function Ja(r){return u(t=>new It(t,r))}var ht=class{constructor(t,o){this.iterator=t;this.count=o;this.index=0;}next(){return e(this,null,function*(){let{done:t,value:o}=yield this.iterator.next();return t||this.index++>=this.count?a():c(o)})}};function Qa(r){return p(t=>new ht(t,r))}var bt=class{constructor(t,o){this.iterator=t;this.predicate=o;this.index=0;}next(){let{done:t,value:o}=this.iterator.next();return {done:t||!this.predicate(o,this.index++),value:o}}};function nu(r){return u(t=>new bt(t,r))}var vt=class{constructor(t,o){this.iterator=t;this.predicate=o;this.index=0;}next(){return e(this,null,function*(){let{done:t,value:o}=yield this.iterator.next();return {done:t||!this.predicate(o,this.index++),value:o}})}};function au(r){return p(t=>new vt(t,r))}var Ct=class{constructor(t,o){this.iterator=t;this.callback=o;this.index=0;}next(){let t=this.iterator.next();return t.done||this.callback(t.value,this.index++),t}};function yu(r){return u(t=>new Ct(t,r))}var Bt=class{constructor(t,o){this.iterator=t;this.callback=o;this.index=0;}next(){return e(this,null,function*(){let t=yield this.iterator.next();return t.done||this.callback(t.value,this.index++),t})}};function Ou(r){return p(t=>new Bt(t,r))}function wu(){return u(r=>new O(r,t=>!!t))}function Mu(){return p(r=>new d(r,t=>!!t))}function Yt(r){return t=>{let o=0;for(let n of t)if(!r(n,o++))return !1;return !0}}var lp=Yt;function Qt(r){return t=>e(this,null,function*(){let o=0;try{for(var n=l(t),i,s,x;i=!(s=yield n.next()).done;i=!1){let m=s.value;if(!(yield r(m,o++)))return !1}}catch(s){x=[s];}finally{try{i&&(s=n.return)&&(yield s.call(n));}finally{if(x)throw x[0]}}return !0})}var Tp=Qt;function Ut(r=()=>!0){return t=>{let o=0;for(let n of t)if(r(n,o++))return !0;return !1}}var dp=Ut;function Xt(r=()=>!0){return t=>e(this,null,function*(){let o=0;try{for(var n=l(t),i,s,x;i=!(s=yield n.next()).done;i=!1){let m=s.value;if(yield r(m,o++))return !0}}catch(s){x=[s];}finally{try{i&&(s=n.return)&&(yield s.call(n));}finally{if(x)throw x[0]}}return !1})}var hp=Xt;function _t(r,t=(o,n)=>o===n){return o=>{for(let n of o)if(t(n,r))return !0;return !1}}var Rp=_t;function Zt(r,t=(o,n)=>o===n){return o=>e(this,null,function*(){try{for(var n=l(o),i,s,x;i=!(s=yield n.next()).done;i=!1){let m=s.value;if(t(m,r))return !0}}catch(s){x=[s];}finally{try{i&&(s=n.return)&&(yield s.call(n));}finally{if(x)throw x[0]}}return !1})}var Sp=Zt;function tr(r=()=>!0){return t=>{let o=0,n=0;for(let i of t)r(i,n++)&&o++;return o}}var Kp=tr;function rr(r=()=>!0){return t=>e(this,null,function*(){let o=0,n=0;try{for(var i=l(t),s,x,m;s=!(x=yield i.next()).done;s=!1){let y=x.value;r(y,n++)&&o++;}}catch(x){m=[x];}finally{try{s&&(x=i.return)&&(yield x.call(i));}finally{if(m)throw m[0]}}return o})}var gp=rr;function Lp(r){return t=>{let o=0;for(let n of t){if(o===r)return n;o++;}}}function Jp(r){return t=>e(this,null,function*(){let o=0;try{for(var n=l(t),i,s,x;i=!(s=yield n.next()).done;i=!1){let m=s.value;if(o===r)return m;o++;}}catch(s){x=[s];}finally{try{i&&(s=n.return)&&(yield s.call(n));}finally{if(x)throw x[0]}}})}function wt(r=()=>!0){return t=>{let o=0;for(let n of t)if(r(n,o++))return n}}var _p=wt;function Rt(r=()=>!0){return t=>e(this,null,function*(){let o=0;try{for(var n=l(t),i,s,x;i=!(s=yield n.next()).done;i=!1){let m=s.value;if(yield r(m,o++))return m}}catch(s){x=[s];}finally{try{i&&(s=n.return)&&(yield s.call(n));}finally{if(x)throw x[0]}}})}var ts=Rt;function or(r=()=>!0){return t=>{let o=0;for(let n of t){if(r(n,o))return o;o++;}return -1}}var cs=or;function nr(r=()=>!0){return t=>e(this,null,function*(){let o=0;try{for(var n=l(t),i,s,x;i=!(s=yield n.next()).done;i=!1){let m=s.value;if(yield r(m,o))return o;o++;}}catch(s){x=[s];}finally{try{i&&(s=n.return)&&(yield s.call(n));}finally{if(x)throw x[0]}}return -1})}var us=nr;function er(r,t=()=>!0){return o=>{var n;return (n=wt(t)(o))!=null?n:T(r)}}var xs=er;function ir(r,t=()=>!0){return o=>e(this,null,function*(){var n;return (n=yield Rt(t)(o))!=null?n:T(r)})}var vs=ir;function Ss(r){return t=>{let o=0;for(let n of t)r(n,o++);}}function Ds(r){return t=>e(this,null,function*(){let o=0;try{for(var n=l(t),i,s,x;i=!(s=yield n.next()).done;i=!1){let m=s.value;yield r(m,o++);}}catch(s){x=[s];}finally{try{i&&(s=n.return)&&(yield s.call(n));}finally{if(x)throw x[0]}}})}function A(r,t){return o=>{let n=T(t),i=0;for(let s of o)n=r(n,s,i++);return n}}function F(r,t){return o=>e(this,null,function*(){let n=T(t),i=0;try{for(var s=l(o),x,m,y;x=!(m=yield s.next()).done;x=!1){let v=m.value;n=yield r(n,v,i++);}}catch(m){y=[m];}finally{try{x&&(m=s.return)&&(yield m.call(s));}finally{if(y)throw y[0]}}return n})}function Xs(r){return A((t,o)=>{let n=r(o),i=t.get(n);if(i)i.push(o);else return t.set(n,[o]);return t},()=>new Map)}function tm(r){return F((t,o)=>{let n=r(o),i=t.get(n);if(i)i.push(o);else return t.set(n,[o]);return t},()=>new Map)}function cr(r){return A((t,o)=>{let n=r(o),i=t[n];return i?i.push(o):t[n]=[o],t},()=>({}))}var cm=cr;function ar(r){return F((t,o)=>{let n=r(o),i=t[n];return i?i.push(o):t[n]=[o],t},()=>({}))}var pm=ar;function Tm(){return r=>r[Symbol.iterator]().next().done===!0}function Fm(){return r=>e(this,null,function*(){return (yield r[Symbol.asyncIterator]().next()).done===!0})}function bm(r=","){return A((t,o)=>`${t}${t&&r}${o}`,"")}function Bm(r=","){return F((t,o)=>`${t}${t&&r}${o}`,"")}function Et(r=()=>!0){return t=>{let o,n=0;for(let i of t)r(i,n++)&&(o=i);return o}}var Mm=Et;function St(r=()=>!0){return t=>e(this,null,function*(){let o,n=0;try{for(var i=l(t),s,x,m;s=!(x=yield i.next()).done;s=!1){let y=x.value;(yield r(y,n++))&&(o=y);}}catch(x){m=[x];}finally{try{s&&(x=i.return)&&(yield x.call(i));}finally{if(m)throw m[0]}}return o})}var Pm=St;function ur(r=()=>!0){return t=>{let o=-1,n=o;for(let i of t)o++,r(i,o)&&(n=o);return n}}var qm=ur;function pr(r=()=>!0){return t=>e(this,null,function*(){let o=-1,n=o;try{for(var i=l(t),s,x,m;s=!(x=yield i.next()).done;s=!1){let y=x.value;o++,(yield r(y,o))&&(n=o);}}catch(x){m=[x];}finally{try{s&&(x=i.return)&&(yield x.call(i));}finally{if(m)throw m[0]}}return n})}var Hm=pr;function sr(r,t=()=>!0){return o=>{var n;return (n=Et(t)(o))!=null?n:T(r)}}var Xm=sr;function mr(r,t=()=>!0){return o=>e(this,null,function*(){var n;return (n=yield St(t)(o))!=null?n:T(r)})}var nl=mr;function P(r){return A((t,o)=>t===void 0||r(t,o)<0?o:t,()=>{})}function V(r){return F((t,o)=>t===void 0||r(t,o)<0?o:t,()=>{})}var Al=P((r,t)=>r-t);var dl=V((r,t)=>r-t);function Kt(r){return P((t,o)=>-1*r(t,o))}function Nt(r){return V((t,o)=>-1*r(t,o))}var Pl=Kt((r,t)=>r-t);var Kl=Nt((r,t)=>r-t);function zl(r){return A((t,o,n)=>(r(o,n)?t[0].push(o):t[1].push(o),t),()=>[new Array,new Array])}function $l(r){return F((t,o,n)=>e(this,null,function*(){return (yield r(o,n))?t[0].push(o):t[1].push(o),t}),()=>[new Array,new Array])}function Xl(r,t=(o,n)=>o===n){return o=>{let n=o[Symbol.iterator](),i=r[Symbol.iterator]();for(;;){let s=n.next(),x=i.next();if(x.done)return !0;if(s.done||!t(s.value,x.value))return !1}}}function Zl(r,t=(o,n)=>o===n){return o=>e(this,null,function*(){let n=o[Symbol.asyncIterator](),i=r[Symbol.iterator]();for(;;){let s=yield n.next(),x=i.next();if(x.done)return !0;if(s.done||!t(s.value,x.value))return !1}})}function af(){return A((r,t)=>r===void 0?t:r+t,()=>{})}function sf(){return F((r,t)=>r===void 0?t:r+t,()=>{})}function yf(){return r=>Array.from(r)}function xf(){return F((r,t)=>(r.push(t),r),()=>[])}function vf(r,t){return A((o,n)=>o.set(r(n),t(n)),()=>new Map)}function wf(r,t){return F((o,n)=>o.set(r(n),t(n)),()=>new Map)}function lr(r,t){return A((o,n)=>(o[r(n)]=t(n),o),()=>({}))}var Pf=lr;function fr(r,t){return F((o,n)=>(o[r(n)]=t(n),o),()=>({}))}var Kf=fr;function Hf(){return r=>new Set(r)}function Lf(){return F((r,t)=>r.add(t),()=>new Set)} exports.AsyncStream = I; exports.Stream = f; exports.all = Yt; exports.allAsync = Qt; exports.any = Ut; exports.anyAsync = Xt; exports.appendWith = fn; exports.appendWithAsync = Fn; exports.arrayFilter = In; exports.arrayMap = Cn; exports.buffer = Sn; exports.bufferAsync = Pn; exports.chain = Vr; exports.chainAsync = gr; exports.compound = X; exports.compoundAsync = _; exports.concat = h; exports.concatAsync = b; exports.concatWith = jn; exports.concatWithAsync = Un; exports.contains = _t; exports.containsAsync = Zt; exports.count = tr; exports.countAsync = rr; exports.cycle = $r; exports.defaultIfEmpty = ne; exports.defaultIfEmptyAsync = ae; exports.distinct = Te; exports.distinctAsync = Ae; exports.distinctBy = Ce; exports.distinctByAsync = Ee; exports.distinctUntilChanged = Ne; exports.distinctUntilChangedAsync = He; exports.distinctUntilKeyChanged = Qe; exports.distinctUntilKeyChangedAsync = Ze; exports.elementAt = Lp; exports.elementAtAsync = Jp; exports.empty = Xr; exports.endWith = ci; exports.endWithAsync = pi; exports.every = lp; exports.everyAsync = Tp; exports.falsy = di; exports.falsyAsync = Ei; exports.filter = Jt; exports.filterAsync = jt; exports.find = _p; exports.findAsync = ts; exports.findIndex = cs; exports.findIndexAsync = us; exports.findLast = Mm; exports.findLastAsync = Pm; exports.findLastIndex = qm; exports.findLastIndexAsync = Hm; exports.findLastOrDefault = Xm; exports.findLastOrDefaultAsync = nl; exports.findOrDefault = xs; exports.findOrDefaultAsync = vs; exports.first = wt; exports.firstAsync = Rt; exports.firstIndex = or; exports.firstIndexAsync = nr; exports.firstOrDefault = er; exports.firstOrDefaultAsync = ir; exports.flat = st; exports.flatAsync = lt; exports.flatMap = cc; exports.flatMapAsync = mc; exports.flatten = gi; exports.flattenAsync = Hi; exports.forEach = Ss; exports.forEachAsync = Ds; exports.from = Ht; exports.fromAsync = zt; exports.group = cm; exports.groupAsync = pm; exports.groupBy = Xs; exports.groupByAsync = tm; exports.groupByRecord = cr; exports.groupByRecordAsync = ar; exports.includes = Rp; exports.includesAsync = Sp; exports.isEmpty = Tm; exports.isEmptyAsync = Fm; exports.isFunction = G; exports.isIterable = Dt; exports.isNotNull = yr; exports.isNotNullOrEmpty = R; exports.isNotNullOrWhitespace = E; exports.join = bm; exports.joinAsync = Bm; exports.last = Et; exports.lastAsync = St; exports.lastIndex = ur; exports.lastIndexAsync = pr; exports.lastOrDefault = sr; exports.lastOrDefaultAsync = mr; exports.length = Kp; exports.lengthAsync = gp; exports.map = Vt; exports.mapAsync = Gt; exports.max = Al; exports.maxAsync = dl; exports.maxBy = P; exports.maxByAsync = V; exports.min = Pl; exports.minAsync = Kl; exports.minBy = Kt; exports.minByAsync = Nt; exports.noop = Fc; exports.noopAsync = xc; exports.notNullOrEmpty = Cc; exports.notNullOrEmptyAsync = Ec; exports.notNullOrWhitespace = Kc; exports.notNullOrWhitespaceAsync = kc; exports.of = Wt; exports.ofType = Yc; exports.ofTypeAsync = Zc; exports.pairwise = ia; exports.pairwiseAsync = ua; exports.partition = zl; exports.partitionAsync = $l; exports.pipe = qn; exports.pipeAsync = Hn; exports.product = Fo; exports.range = bo; exports.reduce = A; exports.reduceAsync = F; exports.repeat = Mo; exports.sequenceEquals = Xl; exports.sequenceEqualsAsync = Zl; exports.skip = ya; exports.skipAsync = xa; exports.skipWhile = Ba; exports.skipWhileAsync = Sa; exports.some = dp; exports.someAsync = hp; exports.startWith = Na; exports.startWithAsync = ka; exports.stream = oo; exports.streamAsync = io; exports.streamOf = mo; exports.sum = af; exports.sumAsync = sf; exports.take = Ja; exports.takeAsync = Qa; exports.takeWhile = nu; exports.takeWhileAsync = au; exports.tap = yu; exports.tapAsync = Ou; exports.toArray = yf; exports.toArrayAsync = xf; exports.toMap = vf; exports.toMapAsync = wf; exports.toObject = Pf; exports.toObjectAsync = Kf; exports.toRecord = lr; exports.toRecordAsync = fr; exports.toSet = Hf; exports.toSetAsync = Lf; exports.truthy = wu; exports.truthyAsync = Mu; exports.zip = No; exports.zipAsync = Ho; exports.zipLongest = Uo; //# sourceMappingURL=index.cjs.map //# sourceMappingURL=index.cjs.map