UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

1 lines 69.1 kB
var l;(()=>{"use strict";var e={1996:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isChain=t.chain=t.Chain=void 0;const r=n(8703),o=n(4230);class u extends o.Monad{constructor(e){super(),this.bind=this._,this.__value=e}_(e){return i(e(this.__value))}bindM(e){return i(e(this))}filter(e){return e(this.__value)?this:i(null)}getValue(){return this.__value}getValueOr(e){return this.__value||e}effect(e){return e(this.__value),this}}function i(e){return new u((0,r.getValueOr)(null,e))}t.Chain=u,t.chain=i,t.isChain=function(e){return e instanceof u}},9863:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throwLeftAsError=t.isEither=t.isRight=t.isLeft=t.either=t.right=t.left=t.Right=t.Left=void 0;const r=n(8703),o=n(4230);class u extends o.Monad{constructor(e){super(),this.bind=this._,this.errorValue=e}_(e,t){return this}bindM(e){return this}filter(e,t){return this}effect(e){return this}getValue(){throw new Error(`Can not get value of Left(${String(this.errorValue)})`)}getValueOr(e){return e}match(e){return e.left?s(e.left(this.errorValue)):this}isLeft(){return!0}isRight(){return!1}getReason(){return this.errorValue}}t.Left=u;class i extends o.Monad{constructor(e){super(),this.bind=this._,this.value=e}_(e,t){try{const n=e(this.value),o=s((0,r.getValue)(n));return o.isLeft()&&t?l(t):o}catch(e){return l(e)}}bindM(e){try{const t=e(this);return s((0,r.getValue)(t))}catch(e){return l(e)}}filter(e,t){try{return e(this.value)?this:l(t instanceof Error?t:new o.InvalidValueError(t))}catch(e){return l(new Error(`Exception while filtering: ${e.message}`))}}effect(e){try{e(this.value)}catch(e){}return this}getValue(){return this.value}getValueOr(e){return this.value}match(e){var t;return s((null!==(t=e.right)&&void 0!==t?t:r.identity)(this.value))}isLeft(){return!1}isRight(){return!0}getReason(){throw new Error("Can not get error reason for Right")}}function l(e){return new u(e)}function s(e,t){const n=(0,r.getValue)(e);return(0,r.isNil)(n)?new u(t||new o.NilError):new i(n)}function c(e){return e instanceof u}function a(e){return e instanceof i}t.Right=i,t.left=l,t.right=function(e){return new i(e)},t.either=s,t.isLeft=c,t.isRight=a,t.isEither=function(e){return c(e)||a(e)},t.throwLeftAsError={right:e=>e,left:e=>{throw e instanceof Error?e:new Error(e)}}},4187:function(e,t){var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{s(r.next(e))}catch(e){u(e)}}function l(e){try{s(r.throw(e))}catch(e){u(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))};function r(e,t=[]){return{_:n=>r(n(e),t),try:(n,o)=>{try{return r(n(e),t)}catch(e){return r(o,[...t,e])}},effect:n=>{try{return n(e),r(e,t)}catch(n){return r(e,[...t,n])}},getErrors:()=>t,getValue:()=>e,getValueOr:t=>e||t,hasErrors:()=>t.length>0}}Object.defineProperty(t,"__esModule",{value:!0}),t.errorLoggedFuture=t.errorLogged=void 0;const o=(e,t=Promise.resolve([]))=>{const r=e instanceof Promise?e:Promise.resolve(e),u=(e,r)=>e.then((()=>r)).catch((e=>n(void 0,void 0,void 0,(function*(){return[...yield t,e]}))));return{_:e=>o(r.then(e),t),effect:e=>o(r,u(r.then(e),t)),try:(e,n)=>{const i=r.then(e);return o(i.catch((()=>n)),u(i,t))},getErrors:()=>t,getValue:()=>r,getValueOr:e=>n(void 0,void 0,void 0,(function*(){return(yield r)||(e instanceof Promise?yield e:e)})),hasErrors:()=>t.then((e=>e.length>0))}};t.errorLogged=e=>r(e),t.errorLoggedFuture=e=>o(e)},7035:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.F=void 0,t.F=function(...e){return!1}},3755:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{s(r.next(e))}catch(e){u(e)}}function l(e){try{s(r.throw(e))}catch(e){u(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.futureMaybe=t.futureEither=t.Future=void 0;const o=n(8703);class u{constructor(e,t,n){this.bindDefault=e,this.bindError=t,this.value=n instanceof Promise?n:Promise.resolve(n)}_(e,t){const n=t?()=>this.bindError(t):this.bindError,l=this.value.then((u=>r(this,void 0,void 0,(function*(){if((0,o.isNothing)(u)||(0,o.isLeft)(u))return Promise.resolve(u);try{const r=u.getValue(),o=e(r);return o instanceof Promise?o.then((e=>u._((()=>e)))).catch((e=>n(e))).then(i):i(u._((()=>o),t))}catch(e){return console.log(e),n(e)}}))));return new u(this.bindDefault,this.bindError,l)}filter(e,t){return new u(this.bindDefault,this.bindError,this.value.then((n=>r(this,void 0,void 0,(function*(){const r=yield n.bind(e).getValue();return n.filter((()=>r),t)})))).catch(this.bindError))}effect(e){return new u(this.bindDefault,this.bindError,this.value.then((t=>r(this,void 0,void 0,(function*(){return yield e(t.getValue()),t})))).catch(this.bindError))}match(e){const t=this.value.then((t=>t.match(e))).then(this.bindDefault);return new u(this.bindDefault,this.bindError,t)}effectAsync(e){return this.value.then((t=>t.effect(e))),this}getValueOr(e){return this.value.then((0,o.getValueOr)(e))}getValue(){return r(this,void 0,void 0,(function*(){return(yield this.value).getValue()}))}getMonad(){return this.value}getReason(){return r(this,void 0,void 0,(function*(){const e=yield this.value;if((0,o.isLeft)(e))return e.getReason();if((0,o.isNothing)(e))return new o.NilError("Nothing()");throw new Error(`Can not get reason from ${e}`)}))}}t.Future=u,t.futureEither=e=>new u(o.either,o.left,(0,o.either)(e)),t.futureMaybe=e=>new u(o.maybe,o.nothing,(0,o.maybe)(e));const i=e=>((0,o.isLeft)(e)&&console.log(e.getReason()),e)},4457:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isMaybe=t.isNothing=t.isJust=t.maybe=t.nothing=t.just=t.Just=t.Nothing=void 0;const r=n(8703),o=n(4230);class u extends o.Monad{constructor(){super(...arguments),this.bind=this._}_(e){return this}bindM(e){return this}filter(e){return this}effect(e){return this}getValue(){throw new Error("Can not get value of Nothing")}getValueOr(e){return e}match(e){return e.nothing?(0,t.maybe)(e.nothing()):this}isNothing(){return!0}isJust(){return!1}}t.Nothing=u;class i extends o.Monad{constructor(e){super(),this.bind=this._,this.value=e}_(e){try{const n=e(this.value);return(0,t.maybe)((0,r.getValue)(n))}catch(e){return(0,t.nothing)()}}bindM(e){try{const n=e(this);return(0,t.maybe)((0,r.getValue)(n))}catch(e){return(0,t.nothing)()}}filter(e){try{return e(this.value)?this:(0,t.nothing)()}catch(e){return(0,t.nothing)()}}effect(e){try{e(this.value)}catch(e){}return this}getValue(){return this.value}getValueOr(e){return this.value}match(e){const n=e.just||r.identity;return(0,t.maybe)(n(this.value))}isNothing(){return!1}isJust(){return!0}}t.Just=i,t.just=e=>new i(e),t.nothing=()=>new u,t.maybe=e=>{const n=(0,r.getValue)(e);return null==n?(0,t.nothing)():(0,t.just)(n)},t.isJust=e=>e instanceof i,t.isNothing=e=>e instanceof u,t.isMaybe=e=>(0,t.isJust)(e)||(0,t.isNothing)(e)},5582:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.lift=t.bindM=t.bind=void 0;const r=n(9863),o=n(8703),u=n(4457);t.bind=function(e){return t=>t._(e)},t.bindM=function(e){return t=>l(t._(e))};const i=e=>t=>e.isJust&&e.isJust(e)||e.isNothing&&e.isNothing()?(0,u.maybe)(t):e.isLeft&&e.isLeft()||e.isRight&&e.isRight()?(0,r.either)(t):(0,o.chain)(t);function l(e){return i(e)(e.getValueOr(void 0))}t.lift=l},3514:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MutablePrimitive=t.MutableObject=t.MutableArray=t.Mutable=void 0,t.Mutable=e=>t=>{let n=e(t),r=!1;const o=()=>{if(r)throw new Error("Can not alter mutable value after it was consumed")};return{set:e=>{o(),n=e},update:e=>{o(),n=e(n)},change:e=>{o(),e(n)},value:()=>(r=!0,n),toString:()=>`Mutable ${JSON.stringify(n)}`}};const n=e=>e.concat();t.MutableArray=e=>(0,t.Mutable)(n)(e);const r=e=>Object.assign({},e);t.MutableObject=e=>(0,t.Mutable)(r)(e);const o=e=>e;t.MutablePrimitive=e=>(0,t.Mutable)(o)(e)},2884:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.T=void 0,t.T=function(...e){return!0}},2217:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.inc=t.add=void 0;const r=n(8703);function o(e,t){return 1===arguments.length?t=>o(e,t):(0,r.getValueOr)(0,e)+(0,r.getValueOr)(0,t)}t.add=o,t.inc=function(e){return o(1,e)}},4520:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.adjust=void 0;const r=n(8703);t.adjust=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);{const e=(0,r.getValueOr)([],o),u=Array.from(e),i=(0,r.getValueOr)(-1,t);return 0<=i&&i<e.length&&(u[i]=n(e[i])),u}}},8936:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.all=void 0;const r=n(8703);t.all=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValueOr)([],n).reduce(((e,n)=>e&&t(n)),!0)}},5215:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.allPass=void 0;const r=n(8703);t.allPass=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(n);return t.reduce(((e,t)=>e&&t(o)),!0)}},4833:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.and=void 0;const r=n(8703);t.and=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValueOr)(!1,t)&&(0,r.getValueOr)(!1,n)}},1550:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.aperture=void 0;const r=n(8703);t.aperture=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)(-1,t),u=(0,r.getValueOr)([],n);if(1>o||o>u.length)return[];const i=[];for(let e=0;e<u.length-o+1;e++)i.push(u.slice(e,e+o));return i}},249:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.append=void 0;const r=n(8703);t.append=function e(t,n){return 1===arguments.length?n=>e(t,n):n instanceof Array?[...(0,r.getValueOr)([],n),(0,r.getValue)(t)]:(0,r.getValueOr)("",n)+(0,r.getValueOr)("",t)}},4774:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.apply=void 0,t.apply=function e(t,n){return 1===arguments.length?n=>e(t,n):t(...n||[])}},6745:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.applyTo=void 0;const r=n(8703);t.applyTo=function e(t,n){return 1===arguments.length?n=>e(t,n):(n||(e=>null))((0,r.getValue)(t))}},4142:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ascend=void 0;const r=n(8703);t.ascend=function(e){return(t,n)=>{const o=(0,r.getValueOr)(null,t),u=(0,r.getValueOr)(null,n),i=o&&e(o),l=u&&e(u);return i===l?0:(0,r.isSome)(i)&&(0,r.isSome)(l)?i<l?1:-1:(0,r.isNil)(i)?-1:1}}},5010:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assoc=void 0;const r=n(8703);t.assoc=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);if("number"==typeof t){const e=Array.from((0,r.getValueOr)([],o));return e[t]=n,e}return Object.assign(Object.assign({},(0,r.getValueOr)({},o)),{[t]:n})}},868:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.assocIn=void 0;const o=n(8703),u=r(n(1288)),i=(e,t,n)=>{const r=e.peek(),u=e.length>1&&!n?"number"==typeof r?[]:{}:n;return e.pop(),(0,o.assoc)(r,e.isEmpty()?t:i(e,t,u[r]),n)};t.assocIn=function e(t,n,r){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const l=new u.default((0,o.getValueOr)([],t));return 0===l.length?r:i(l,n,r)}},6064:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.both=void 0;const r=n(8703);t.both=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=(0,r.getValue)(o);return t(u)&&n(u)}},501:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clamp=void 0;const r=n(8703);t.clamp=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const[u,i,l]=[o,t,n].map(r.getValue);if(void 0===u||void 0===i||void 0===l)throw new Error("clamp() retrieved undefined input"+JSON.stringify({min:t,max:n,value:o}));return u<i?i:u>l?l:u}},9920:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.comparator=void 0;const r=n(8703);t.comparator=function(e){return(t,n)=>{const o=(0,r.getValue)(t),u=(0,r.getValue)(n);return e(o,u)?1:e(u,o)?-1:0}}},2643:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.complement=void 0,t.complement=function e(t,n){return 1===arguments.length?n=>e(t,n):!t(n)}},977:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.compose=void 0;class n extends Function{constructor(e){super(),this.fn=e;const t=function(t){return e(t)};return t._=t=>new n((n=>e(t(n)))),t}}t.compose=e=>new n(e)},2018:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;const r=n(8703);t.concat=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(t),u=(0,r.getValue)(n);if(u instanceof Array||o instanceof Array){const e=null!=o?o:[],t=null!=u?u:[],n=new Array(e.length+t.length);for(let t=0;t<e.length;++t)n[t]=e[t];for(let r=e.length,o=0;o<t.length;++r,++o)n[r]=t[o];return n}return(0,r.getValueOr)("",t)+(0,r.getValueOr)("",n)}},8526:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.cond=void 0;const r=n(8703);t.cond=function(e){return t=>{const n=(0,r.getValue)(t),o=e.reduce(((e,[t,r])=>e||(t(n)?r:null)),null);return o&&o(n)}}},670:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.constantly=void 0,t.constantly=function(e){return(...t)=>e}},4222:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.converge=void 0;const r=n(8703);t.converge=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=(0,r.getValue)(o);return(0,r.chain)(n).bind((0,r.map)((e=>e(u)))).bind(t).getValue()}},2279:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;const r=n(8703);t.count=function(e){const t=(0,r.getValueOr)("",e);return t instanceof Array||"string"==typeof t?t.length:t instanceof Object?Object.keys(t).length:0}},4664:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.countBy=void 0;const r=n(8703);t.countBy=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValueOr)([],n).reduce(((e,n)=>{const r=String(t(n));return e[r]=(e[r]||0)+1,e}),{})}},5736:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.cycle=void 0;const r=n(9789);t.cycle=function(e){return(0,r.InfiniteArray)((t=>e[t%e.length]))}},8908:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.descend=void 0;const r=n(8703);t.descend=function(e){return(t,n)=>{const o=(0,r.getValueOr)(null,t),u=(0,r.getValueOr)(null,n),i=o&&e(o),l=u&&e(u);return i===l?0:(0,r.isSome)(i)&&(0,r.isSome)(l)?i>l?1:-1:(0,r.isNil)(i)?-1:1}}},9891:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.differenceWith=void 0;const r=n(8703);t.differenceWith=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)([],t),u=new Set((0,r.getValueOr)([],n)),i=[];return o.forEach((e=>{u.has(e)||i.push(e)})),i}},6362:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.differenceWith=void 0;const r=n(8703);t.differenceWith=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=(0,r.getValueOr)([],n),i=new Set((0,r.getValueOr)([],o).map(t)),l=[];return u.forEach((e=>{i.has(t(e))||l.push(e)})),l}},9905:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dissoc=void 0,t.dissoc=function e(t,n){return 1===arguments.length?n=>e(t,n):n instanceof Array?(r=t,[...(o=n).slice(0,r),...o.slice(r+1)]):((e,t)=>{const n={};return Object.keys(t).forEach((r=>{r!==e&&(n[r]=t[r])})),n})(t,n||{});var r,o}},3452:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dissocIn=void 0;const r=n(8703);t.dissocIn=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(t),u=o.slice(0,o.length-1),i=o[o.length-1],l=(0,r.getValueOr)({},n);return(0,r.updateIn)(u,(0,r.dissoc)(i),l)}},9415:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.divideBy=t.divide=void 0;const r=n(8703);function o(e,t){return 1===arguments.length?t=>o(e,t):(0,r.getValue)(e)/(0,r.getValue)(t)}t.divide=o,t.divideBy=function(e,t){return 1===arguments.length?t=>o(t,e):o(t,e)}},9181:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.drop=void 0;const r=n(8703);t.drop=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)([],n),u=(0,r.clamp)(0,o.length,(0,r.getValueOr)(0,t));return o.slice(u)}},1338:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dropRepeats=void 0;const r=n(8703);t.dropRepeats=function(e){const t=(0,r.getValueOr)([],e),n=[];let o;for(let e=0;e<t.length;++e){const u=t[e];0!==e&&(0,r.equals)(u,o)||n.push(u),o=u}return n}},7297:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dropRepeatsWith=void 0;const r=n(8703);t.dropRepeatsWith=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=[],u=(0,r.getValueOr)([],n);let i;for(let e=0;e<u.length;++e){const n=u[e];0!==e&&t(n,i)||o.push(n),i=n}return o}},6598:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dropRight=void 0;const r=n(8703);t.dropRight=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)([],n),u=(0,r.clamp)(0,o.length,(0,r.getValueOr)(0,t));return o.slice(0,o.length-u)}},5229:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dropRightWhile=void 0;const r=n(8703);t.dropRightWhile=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)([],n);for(let e=o.length-1,n=0;e>=0;--e,++n)if(!t(o[e]))return(0,r.dropRight)(n,o);return o}},4809:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dropWhile=void 0;const r=n(8703);t.dropWhile=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)([],n);for(let e=0;e<o.length;++e)if(!t(o[e]))return(0,r.drop)(e,o);return o}},1460:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.eitherOr=void 0;const r=n(8703);t.eitherOr=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=(0,r.getValue)(o);return t(u)||n(u)}},9049:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.empty=void 0;const r=n(8703);t.empty=function(e){return"string"==typeof e?"":e instanceof Array?[]:(0,r.isMaybe)(e)?(0,r.nothing)():(0,r.isChain)(e)?(0,r.chain)(null):e instanceof Function?()=>{}:e instanceof Object?e.empty instanceof Function?e.empty():{}:null}},8062:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.endsWith=void 0;const r=n(8703);t.endsWith=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(t),u=(0,r.getValue)(n);if((0,r.isNil)(o)||(0,r.isNil)(u))return!1;if("string"==typeof o&&"string"==typeof u)return u.endsWith(o);if(o instanceof Array&&!(u[0]instanceof Array)){let e=u.length-1;for(let t=o.length-1;t>0;--t,--e)if(!(0,r.equals)(o[t],u[e]))return!1;return!0}return(0,r.equals)(u[u.length-1],o)}},5148:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.eq=void 0;const r=n(8703);t.eq=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValue)(t)===(0,r.getValue)(n)}},263:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.eqBy=void 0;const r=n(8703);t.eqBy=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=t((0,r.getValue)(n)),i=t((0,r.getValue)(o));return(0,r.equals)(u,i)}},8259:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.eqProps=void 0;const r=n(8703);t.eqProps=function e(t,n,o){return 1===arguments.length?function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)}:2===arguments.length?r=>e(t,n,r):(0,r.equals)((0,r.getValueOr)({},n)[t],(0,r.getValueOr)({},o)[t])}},8628:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.equals=void 0;const r=n(8703),o=(e,t)=>{if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(e instanceof Array){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!o(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let n of e.entries())if(!t.has(n[0])||!o(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf===t.valueOf;if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e);if(!o(n,Object.keys(t)))return!1;for(let r=0;r<n.length;++r){const u=n[r];if(!o(e[u],t[u]))return!1}return!0}return e!=e&&t!=t};t.equals=function e(t,n){if(1===arguments.length)return n=>e(t,n);const u=(0,r.when)(r.isMonad,r.getValue,t),i=(0,r.when)(r.isMonad,r.getValue,n);return o(u,i)}},6254:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0,t.filter=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=n||[];return r instanceof Array?((e,t=[])=>t.filter(e))(t,r):((e,t={})=>Object.keys(t).reduce(((n,r)=>{const o=t[r];return e(o)&&(n[r]=o),n}),{}))(t,r)}},2751:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.filterKeys=void 0,t.filterKeys=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=n||{};return Object.keys(r).reduce(((e,n)=>(t(n)&&(e[n]=r[n]),e)),{})}},9469:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.find=void 0;const r=n(8703);t.find=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.maybe)((0,r.getValue)(n)).bind((e=>(0,r.isNil)(e)?null:e instanceof Array?e:Object.values(e))).bind((e=>e.find(t)||null)).getValueOr(null)}},9965:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;const r=n(8703);t.findIndex=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(n),u=o instanceof Array?-1:null;return(0,r.maybe)(o).bind((e=>{return e instanceof Array?e.map(((e,t)=>[t,e])):(t=e,Object.keys(t).sort().map((e=>[e,t[e]])));var t})).bind((e=>e.reduce(((e,[n,r])=>e===u?t(r)?n:u:e),u))).getValueOr(u)}},1734:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.findLast=void 0;const r=n(8703);t.findLast=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.maybe)((0,r.getValue)(n)).bind((e=>e instanceof Array?e:Object.values(e))).bind(r.reverse).bind((e=>e.find(t)||null)).getValueOr(null)}},5734:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.findLastIndex=void 0;const r=n(8703);t.findLastIndex=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(n),u=o instanceof Array?-1:null;return(0,r.maybe)(o).bind((e=>{return e instanceof Array?e.map(((e,t)=>[t,e])):(t=e,Object.keys(t).sort().map((e=>[e,t[e]])));var t})).bind((e=>(0,r.reverse)(e))).bind((e=>e.reduce(((e,[n,r])=>e===u?t(r)?n:u:e),u))).getValueOr(u)}},9678:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0,t.first=function(e){return(e||[])[0]||null}},713:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;const r=n(8703);t.flatMap=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValueOr)([],n).map((e=>e instanceof Array?e.map(t):t(e))).reduce(((e,t)=>t instanceof Array?[...e,...t]:[...e,t]),[])}},2822:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.flatten=void 0;const r=n(8703);t.flatten=function(e){const t=[];return(0,r.getValueOr)([],e).forEach((e=>Array.isArray(e)?e.forEach((e=>t.push(e))):t.push(e))),t}},1066:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.flow=void 0,t.flow=function(...e){return t=>e.reduce(((e,t)=>t(e)),t)}},1721:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.forEach=void 0;const r=n(8703);t.forEach=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)([],n);return o instanceof Array?o.forEach(t):Object.keys(o).forEach((e=>t(o[e],e))),o}},3797:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromPairs=void 0;const r=n(8703);t.fromPairs=function(e){return(0,r.getValueOr)([],e).reduce(((e,[t,n])=>(e[t]=n,e)),{})}},8542:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.get=void 0;const r=n(8703);t.get=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o="string"==typeof t?{}:[];return(0,r.getValueOr)(o,n)[t]}},355:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getIn=void 0;const r=n(8703),o=(e,t,n=0)=>t?n<e.length-1?o(e,t[e[n]],n+1):t[e[n]]:null;t.getIn=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.maybe)(n)._((e=>o(t,e,0))).getValueOr(null)}},8271:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getOr=void 0;const r=n(8703);t.getOr=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=o||{};return(n instanceof Array?(0,r.getIn)(n||[],u):(0,r.get)(n||"",u))||t}},1778:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getValue=void 0;const r=n(8703);t.getValue=function e(t){if(!(0,r.isFunction)(null==t?void 0:t.getValue))return t;try{return e(t.getValue())}catch(e){return null}}},135:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getValueOr=void 0;const r=n(8703);t.getValueOr=function e(t,n){if(1===arguments.length)return n=>e(t,n);if(!(0,r.isFunction)(null==n?void 0:n.getValue))return(0,r.isNil)(n)?t:n;try{return e(t,n.getValueOr(t))}catch(e){return t}}},5639:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;const r=n(8703);t.groupBy=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValueOr)([],n).reduce(((e,n)=>{const r=t(n);return e[r]||(e[r]=[]),e[r].push(n),e}),{})}},1132:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupWith=void 0;const r=n(8703);t.groupWith=function e(t,n){return 1===arguments.length?n=>e(t,n):((e,t)=>{const n=(t,o,u)=>{const[i,...l]=u,s=o[o.length-1];return(0,r.isNil)(i)?[...t,o]:e(s,i)?n(t,[...o,i],l):n([...t,o],[i],l)};return n([],[t[0]],t.slice(1))})(t,(0,r.getValueOr)([],n))}},5752:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.gt=void 0;const r=n(8703);t.gt=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValue)(n)>(0,r.getValue)(t)}},9279:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.gte=void 0;const r=n(8703);t.gte=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValue)(n)>=(0,r.getValue)(t)}},3948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.has=void 0;const r=n(8703);t.has=function e(t,n){return 1===arguments.length?n=>e(t,n):Object.keys((0,r.getValueOr)({},n)).includes((0,r.getValue)(t))}},8232:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hasIn=void 0;const r=n(8703),o=(e,t)=>(0,r.isEmpty)(e)?!(0,r.isNil)(t):!(0,r.isEmpty)(t)&&o(e.slice(1),t[e[0]]);t.hasIn=function e(t,n){if(1===arguments.length)return n=>e(t,n);const u=(0,r.getValueOr)([],t),i=(0,r.getValueOr)({},n);return!(0,r.isEmpty)(u)&&!(0,r.isEmpty)(i)&&o(u,i)}},7636:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.identical=void 0,t.identical=function e(t,n){return 1===arguments.length?n=>e(t,n):Object.is(t,n)}},476:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},5496:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ifElse=void 0;const r=n(8703);t.ifElse=function e(t,n,o,u){if(1===arguments.length)return function(n,r,o){return 1===arguments.length?e(t,n):2===arguments.length?e(t,n,r):e(t,n,r,o)};if(2===arguments.length)return function(r,o){return 1===arguments.length?e(t,n,r):e(t,n,r,o)};if(3===arguments.length)return r=>e(t,n,o,r);const i=(0,r.getValue)(u);return t(i)?n(i):o(i)}},7565:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.includes=void 0;const r=n(8703);t.includes=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(t),u=(0,r.getValue)(n);return!(0,r.isNil)(u)&&u.includes(o)}},3643:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.indexBy=void 0;const r=n(8703);t.indexBy=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValueOr)([],n).reduce(((e,n)=>(e[t(n)]=n,e)),{})}},4479:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.indexOf=void 0;const r=n(8703);t.indexOf=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)([],n);for(let e=0;e<o.length;++e)if((0,r.equals)(t,o[e]))return e;return-1}},4111:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0;const r=n(8703);t.init=function(e){return(0,r.getValueOr)([],e).slice(0,-1)}},169:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.innerJoin=void 0;const r=n(8703);t.innerJoin=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=[],i=(0,r.getValueOr)([],n),l=(0,r.getValueOr)([],o);let s=0;for(let e=0;e<i.length;++e)for(s=0;s<l.length;++s)t(i[e],l[s])&&u.push(Object.assign(Object.assign({},i[e]),l[s]));return u}},2843:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.insert=void 0;const r=n(8703);t.insert=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=(0,r.getValueOr)([],o),i=u.slice(0,t),l=u.slice(t);return[...i,(0,r.getValue)(n),...l]}},2396:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.insertAll=void 0;const r=n(8703);t.insertAll=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=(0,r.getValueOr)([],o),i=u.slice(0,t),l=u.slice(t);return[...i,...(0,r.getValueOr)([],n),...l]}},2895:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.intersection=void 0;const r=n(8703);t.intersection=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)([],t),u=new Set((0,r.getValueOr)([],n)),i=[];for(let e=0;e<o.length;++e)u.has(o[e])&&i.push(o[e]);return i}},7704:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.intersects=void 0,t.intersects=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=new Set(t),o=null!=n?n:[];for(let e=0;e<o.length;++e)if(r.has(o[e]))return!0;return!1}},4197:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.intersectsBy=void 0,t.intersectsBy=function e(t,n,r){if(2===arguments.length)return r=>e(t,n,r);if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};const o=new Set((null!=n?n:[]).map(t)),u=null!=r?r:[];for(let e=0;e<u.length;++e)if(o.has(t(u[e])))return!0;return!1}},5932:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.intersperse=void 0;const r=n(8703);t.intersperse=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(t),u=(0,r.getValueOr)([],n),i=[];for(let e=0;e<u.length-1;++e)i.push(u[e],o);return u.length>0&&i.push(u[u.length-1]),i}},5238:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.into=void 0;const r=n(8703);t.into=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(t),u=(0,r.getValueOr)([],n);return o instanceof Array?(0,r.concat)(o,u):u.reduce(((e,[t,n])=>(e[t]=n,e)),o)}},8087:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.invert=void 0;const r=n(8703);t.invert=function(e){const t=(0,r.getValueOr)({},e);return Object.keys(t).reduce(((e,n)=>{const r=String(t[n]);return e[r]=e[r]||[],e[r].push(n),e}),{})}},7980:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.invertObj=void 0;const r=n(8703);t.invertObj=function(e){const t=(0,r.getValueOr)({},e);return Object.keys(t).reduce(((e,n)=>(e[String(t[n])]=n,e)),{})}},9240:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isSeq=t.isObject=t.isMap=t.isSet=t.isArray=void 0;const r=n(9248),o=n(1655);function u(e){return Array.isArray(e)}function i(e){return e instanceof Set}function l(e){return e instanceof Map}function s(e){return!(0,o.isPrimitive)(e)}t.isArray=u,t.isSet=i,t.isMap=l,t.isObject=s,t.isSeq=function(e){return(0,r.somePass)([u,i,l,s],e)}},2680:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isDataObject=void 0;const r=n(9240),o=n(1074),u=n(2422),i=n(3636);t.isDataObject=e=>(0,u.isNotNil)(e)&&"object"==typeof e&&!(0,r.isArray)(e)&&(0,i.values)(e).every((e=>!(0,o.isFunction)(e)))},5041:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNotEmpty=t.isEmpty=void 0;const r=n(8703);function o(e){const t=(0,r.getValue)(e);return"number"!=typeof e&&(!!((0,r.isNothing)(e)||(0,r.isNil)(t)||(0,r.isLeft)(e))||(e instanceof Array||"string"==typeof e?0===e.length:0===Object.keys(t).length))}t.isEmpty=o,t.isNotEmpty=function(e){return!o(e)}},1074:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},9868:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isIn=void 0;const r=n(8703);t.isIn=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(n),u=(0,r.getValue)(t);return!(0,r.isNil)(u)&&u.includes(o)}},9842:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isMonad=void 0;const r=n(8703);t.isMonad=function(e){return e instanceof r.Monad}},6896:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNeg=void 0,t.isNeg=function(e){return e<0}},2422:(e,t)=>{function n(e){return null==e||"number"==typeof e&&isNaN(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isNotNil=t.isNil=void 0,t.isNil=n,t.isNotNil=function(e){return!n(e)}},3846:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNumber=void 0,t.isNumber=function(e){return"number"==typeof e&&!isNaN(e)}},7979:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPos=void 0,t.isPos=function(e){return e>0}},1655:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPrimitive=void 0,t.isPrimitive=e=>"number"==typeof e||"string"==typeof e||"symbol"==typeof e||!0===e||!1===e||null==e},1696:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isSome=void 0;const r=n(8703);t.isSome=function(e){return(0,r.isNotNil)(e)&&(0,r.isNotEmpty)(e)}},9967:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isString=void 0,t.isString=function(e){return"string"==typeof e}},1782:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isZero=void 0,t.isZero=function(e){return 0===e}},5750:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.join=void 0;const r=n(8703);t.join=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)(",",t);return(0,r.getValueOr)([],n).join(o)}},4688:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.juxt=void 0,t.juxt=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=t.length,o=new Array(r);for(let e=0;e<r;++e)o[e]=t[e](n);return o}},2017:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.keys=void 0;const r=n(8703);t.keys=function(e){const t=(0,r.getValueOr)({},e);return(0,r.isNil)(t)?[]:(0,r.isFunction)(t.keys)?Array.from(t.keys()):Object.keys(t)}},7456:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;const r=n(8703);t.last=function(e){const t=(0,r.getValueOr)([],e);return 0===t.length?null:t[t.length-1]}},1456:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.lensPath=t.lensIndex=t.lensProp=t.over=t.set=t.view=t.lens=void 0;const r=n(8703);function o(e,t){return{view:e,set:t}}t.lens=o,t.view=function e(t,n){return 1===arguments.length?n=>e(t,n):t.view(n)},t.set=function e(t,n,r){return 1===arguments.length?function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)}:2===arguments.length?r=>e(t,n,r):t.set(n,r)},t.over=function e(t,n,r){return 1===arguments.length?function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)}:2===arguments.length?r=>e(t,n,r):t.set(n(t.view(r)),r)},t.lensProp=function(e){return o((0,r.prop)(e),(0,r.assoc)(e))},t.lensIndex=function(e){return o((0,r.nth)(e),(0,r.assocIn)([e]))},t.lensPath=function(e){return o((0,r.getIn)(e),(0,r.assocIn)(e))}},5839:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.lt=void 0;const r=n(8703);t.lt=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValue)(n)<(0,r.getValue)(t)}},5427:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.lte=void 0;const r=n(8703);t.lte=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValue)(n)<=(0,r.getValue)(t)}},8703:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.symDiff=t.symmetricDifference=t.tail=t.rest=t.init=t.butLast=t.includes=t.contains=t.getValueOr=t.defaultTo=t.propOr=t.getOr=t.head=t.first=t.equals=t.eqDeep=t.eqShallow=t.eq=t.dissocPath=t.difference=t.size=t.count=t.always=t.constantly=t.every=t.all=t.M=t.Validator=t.transduce=void 0;const s=u(n(6835));t.transduce=s;const c=l(n(5884));t.Validator=c.default,t.M=u(n(5582)),i(n(1996),t),i(n(9863),t),i(n(3755),t),i(n(4457),t),i(n(2217),t),i(n(4520),t);var a=n(8936);Object.defineProperty(t,"all",{enumerable:!0,get:function(){return a.all}}),Object.defineProperty(t,"every",{enumerable:!0,get:function(){return a.all}}),i(n(5215),t),i(n(4833),t),i(n(1550),t),i(n(249),t),i(n(4774),t),i(n(6745),t),i(n(4142),t),i(n(5010),t),i(n(868),t),i(n(6064),t),i(n(501),t),i(n(9920),t),i(n(2643),t),i(n(977),t),i(n(2018),t),i(n(8526),t);var f=n(670);Object.defineProperty(t,"constantly",{enumerable:!0,get:function(){return f.constantly}}),Object.defineProperty(t,"always",{enumerable:!0,get:function(){return f.constantly}}),i(n(4222),t);var d=n(2279);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return d.count}}),Object.defineProperty(t,"size",{enumerable:!0,get:function(){return d.count}}),i(n(4664),t),i(n(5736),t),i(n(8908),t);var h=n(9891);Object.defineProperty(t,"difference",{enumerable:!0,get:function(){return h.differenceWith}}),i(n(6362),t),i(n(9905),t),i(n(3452),t);var g=n(3452);Object.defineProperty(t,"dissocPath",{enumerable:!0,get:function(){return g.dissocIn}}),i(n(9415),t),i(n(9181),t),i(n(1338),t),i(n(7297),t),i(n(6598),t),i(n(5229),t),i(n(4809),t),i(n(1460),t),i(n(9049),t),i(n(8062),t);var v=n(5148);Object.defineProperty(t,"eq",{enumerable:!0,get:function(){return v.eq}}),Object.defineProperty(t,"eqShallow",{enumerable:!0,get:function(){return v.eq}}),i(n(263),t),i(n(8259),t);var p=n(8628);Object.defineProperty(t,"eqDeep",{enumerable:!0,get:function(){return p.equals}}),Object.defineProperty(t,"equals",{enumerable:!0,get:function(){return p.equals}}),i(n(4187),t),i(n(7035),t),i(n(6254),t),i(n(2751),t),i(n(9469),t),i(n(9965),t),i(n(1734),t),i(n(5734),t);var y=n(9678);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return y.first}}),Object.defineProperty(t,"head",{enumerable:!0,get:function(){return y.first}}),i(n(713),t),i(n(2822),t),i(n(1066),t),i(n(1721),t),i(n(3797),t),i(n(8542),t),i(n(355),t);var _=n(8271);Object.defineProperty(t,"getOr",{enumerable:!0,get:function(){return _.getOr}}),Object.defineProperty(t,"propOr",{enumerable:!0,get:function(){return _.getOr}}),i(n(1778),t);var b=n(135);Object.defineProperty(t,"defaultTo",{enumerable:!0,get:function(){return b.getValueOr}}),Object.defineProperty(t,"getValueOr",{enumerable:!0,get:function(){return b.getValueOr}}),i(n(5639),t),i(n(1132),t),i(n(5752),t),i(n(9279),t),i(n(3948),t),i(n(8232),t),i(n(7636),t),i(n(476),t),i(n(5496),t);var O=n(7565);Object.defineProperty(t,"contains",{enumerable:!0,get:function(){return O.includes}}),Object.defineProperty(t,"includes",{enumerable:!0,get:function(){return O.includes}}),i(n(3643),t),i(n(4479),t);var j=n(4111);Object.defineProperty(t,"butLast",{enumerable:!0,get:function(){return j.init}}),Object.defineProperty(t,"init",{enumerable:!0,get:function(){return j.init}}),i(n(169),t),i(n(2843),t),i(n(2396),t),i(n(2895),t),i(n(7704),t),i(n(4197),t),i(n(5932),t),i(n(5238),t),i(n(8087),t),i(n(7980),t),i(n(9240),t),i(n(2680),t),i(n(5041),t),i(n(1074),t),i(n(9868),t),i(n(9842),t),i(n(2422),t),i(n(6896),t),i(n(3846),t),i(n(7979),t),i(n(1655),t),i(n(1696),t),i(n(9967),t),i(n(1782),t),i(n(5750),t),i(n(4688),t),i(n(2017),t),i(n(7456),t),i(n(5839),t),i(n(5427),t),i(n(3556),t),i(n(2049),t),i(n(9135),t),i(n(1418),t),i(n(3325),t),i(n(9197),t),i(n(8288),t),i(n(1425),t),i(n(3160),t),i(n(4867),t),i(n(1780),t),i(n(4568),t),i(n(1182),t),i(n(3514),t),i(n(7080),t),i(n(2650),t),i(n(5953),t),i(n(7282),t),i(n(1205),t),i(n(3561),t),i(n(1026),t),i(n(4238),t),i(n(7590),t),i(n(2710),t),i(n(3501),t),i(n(8199),t),i(n(4955),t),i(n(7230),t),i(n(7675),t),i(n(7746),t),i(n(6105),t),i(n(1584),t),i(n(1317),t),i(n(7493),t),i(n(5593),t),i(n(3243),t),i(n(2091),t),i(n(9091),t),i(n(5402),t);var P=n(8120);Object.defineProperty(t,"rest",{enumerable:!0,get:function(){return P.rest}}),Object.defineProperty(t,"tail",{enumerable:!0,get:function(){return P.rest}}),i(n(4219),t),i(n(6248),t),i(n(776),t),i(n(3893),t),i(n(9248),t),i(n(8364),t),i(n(7087),t),i(n(2601),t),i(n(5147),t),i(n(6483),t),i(n(553),t),i(n(353),t),i(n(4657),t),i(n(2026),t),i(n(6447),t);var M=n(7984);Object.defineProperty(t,"symmetricDifference",{enumerable:!0,get:function(){return M.symmetricDifference}}),Object.defineProperty(t,"symDiff",{enumerable:!0,get:function(){return M.symmetricDifference}}),i(n(2884),t),i(n(9817),t),i(n(2207),t),i(n(4528),t),i(n(8005),t),i(n(6967),t),i(n(9234),t),i(n(3704),t),i(n(6834),t),i(n(4175),t),i(n(3700),t),i(n(6793),t),i(n(2674),t),i(n(659),t),i(n(4230),t),i(n(9691),t),i(n(1235),t),i(n(5332),t),i(n(671),t),i(n(9360),t),i(n(3946),t),i(n(8957),t),i(n(3636),t),i(n(6284),t),i(n(7242),t),i(n(6813),t),i(n(1853),t),i(n(8165),t),i(n(7039),t),i(n(2253),t),i(n(1456),t)},3556:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;const r=n(8703);t.map=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)([],n);return o instanceof Array?o.map(t):((e,t)=>Object.keys(t).reduce(((n,r)=>(n[r]=e(t[r]),n)),{}))(t,o)}},2049:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mapIndexed=void 0;const r=n(8703);t.mapIndexed=function e(t,n){if(1===arguments.length)return n=>e(t,n);{const e=(0,r.getValue)(n);return e instanceof Array?((e,t)=>null==t?void 0:t.map(e))(t,e):((e,t)=>t&&Object.keys(t).reduce(((n,r)=>{try{return n[r]=e(t[r],r),n}catch(e){throw new Error(`Error mapping functor over object key ${r}: ${e.message}`)}}),{}))(t,e)}}},9135:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mapKeys=void 0;const r=n(8703);t.mapKeys=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=n||{};return Object.keys(o||{}).reduce(((e,n)=>(e[(0,r.getValue)(t(n))]=o[n],e)),{})}},1418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mapP=void 0;const r=n(8703);t.mapP=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.chain)(n).bind((e=>e.map((e=>t(e).then(r.getValue))))).bind((e=>Promise.all(e))).getValue()}},3325:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.match=void 0,t.match=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=RegExp(t),o=n.match(r);return o?r.global?o:[o[0]]:[]}},9197:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0,t.max=function(e){return e.reduce(((e,t)=>e>t?e:t))}},8288:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mean=void 0;const r=n(8703);t.mean=function(e){return(0,r.chain)(e).bind((0,r.reduce)(r.add,0)).bind((0,r.divideBy)((0,r.count)(e))).getValue()}},1425:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.median=void 0,t.median=function(e){const t=e.length;if(0===t)return NaN;const n=e.sort(((e,t)=>t-e)),r=t/2;return t%2==1?n[0|r]:(n[r-1]+n[r])/2}},3160:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.memoizeWith=void 0,t.memoizeWith=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=new Map;return e=>{const o=t(e);if(r.has(o))return r.get(o);{const t=n(e);return r.set(o,t),t}}}},4867:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0,t.min=function(e){return e.reduce(((e,t)=>e>t?t:e))}},1780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mod=void 0,t.mod=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=n%t;return r<0?r+t:Math.abs(r)}},4568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defmethod=t.defmulti=t.MultiMethod=void 0;class n extends Function{constructor(e){super();const t={},n=function(...n){const r=e(...n),o=t[r]||t.default;if(!o)throw new Error(`No method implementation for dispatch key ${r}`);return o(...n)};return n.defmethod=(e,n)=>{t[e]&&console.warn(`Overriding definition of ${e}`),t[e]=n},n}}t.MultiMethod=n,t.defmulti=function(e){return new n(e)},t.defmethod=function(e,t,n){if(!e.defmethod)throw new Error("Can not extend given method: not a multi method");e.defmethod(t,n)}},1182:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.multiply=void 0;const r=n(8703);t.multiply=function e(t,n){return 1===arguments.length?n=>e(t,n):((0,r.isNil)(t)||isNaN(t)?1:t)*((0,r.isNil)(n)||isNaN(n)?1:n)}},7080:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.negate=void 0;const r=n(8703);t.negate=function(e){return-(0,r.getValueOr)(-0,e)}},2650:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.none=void 0,t.none=function e(t,n){if(1===arguments.length)return n=>e(t,n);for(let e=0;e<n.length;++e)if(t(n[e]))return!1;return!0}},5953:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.nonePass=void 0,t.nonePass=function e(t,n){if(1===arguments.length)return n=>e(t,n);for(let e=0;e<t.length;++e)if(t[e](n))return!1;return!0}},7282:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0;const r=n(8703);t.not=function(e){return!(0,r.getValue)(e)}},1205:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.nth=void 0;const r=n(8703);t.nth=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=n.length;return n[t<0?(0,r.mod)(o,t):t>=o?o-1:t]}},3561:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0,t.of=function(e){return[e]}},1026:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.omit=void 0,t.omit=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r={};return Object.keys(n||{}).forEach((e=>{t.includes(e)||(r[e]=n[e])})),r}},4238:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.partial=void 0,t.partial=function(e,...t){return n=>e(...t,n)}},7590:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0,t.partition=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r={t:[],f:[]};return(null!=n?n:[]).forEach((e=>{t(e)?r.t.push(e):r.f.push(e)})),r}},2710:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pick=void 0;const r=n(8703);t.pick=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)({},n);return(0,r.getValueOr)([],t).reduce(((e,t)=>(e[t]=o[t],e)),{})}},3501:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pickBy=void 0;const r=n(8703);t.pickBy=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValueOr)({},n);return Object.keys(o).reduce(((e,n)=>(t(o[n])&&(e[n]=o[n]),e)),{})}},8199:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pipe=void 0;class n extends Function{constructor(e){super(),this.fn=e;const t=function(t){return e(t)};return t._=t=>new n((n=>t(e(n)))),t}}t.pipe=e=>new n(e)},4955:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=void 0;const r=n(8703);t.prepend=function e(t,n){return 1===arguments.length?n=>e(t,n):n instanceof Array?[(0,r.getValue)(t),...(0,r.getValueOr)([],n)]:(0,r.getValueOr)("",t)+(0,r.getValueOr)("",n)}},7230:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.product=void 0,t.product=function(e){return e.reduce(((e,t)=>e*t),1)}},7675:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.project=void 0;const r=n(8703);t.project=function e(t,n){return 1===arguments.length?n=>e(t,n):(null!=n?n:[]).map((0,r.pick)(t))}},7746:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.prop=void 0;const r=n(8703);t.prop=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=n||{};return t instanceof Array?(0,r.getIn)(t,o):(0,r.get)(t,o)}},1584:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propEq=void 0;const r=n(8703);t.propEq=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=t instanceof Array?(0,r.getIn)(t,o):(0,r.get)(t,o);return(0,r.equals)(u,n)}},1317:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propSatisfies=void 0;const r=n(8703);t.propSatisfies=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=t instanceof Array?(0,r.getIn)(t,o):(0,r.get)(t,o);try{return n(u)}catch(e){return!1}}},6105:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.props=void 0,t.props=function e(t,n){return 1===arguments.length?n=>e(t,n):t.map((e=>(n||{})[e]))}},7493:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;const r=n(8703),o=(e,t)=>{const n=(0,r.getValue)(t);return 0===n?n:n||e};t.range=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=o(0,t),u=o(r,n),i=u<r?-1:1,l=[];for(let e=r;e!==u;e+=i)l.push(e);return l}},5593:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0,t.reduce=function e(t,n,r){return 1===arguments.length?function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)}:2===arguments.length?r=>e(t,n,r):r instanceof Array?r.reduce(t,n):Object.values(r).reduce(t,n)}},3243:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reduceKV=void 0,t.reduceKV=function e(t,n,r){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const o=Object.values(r);return Object.keys(r).reduce(((e,n,r)=>t(e,o[r],n)),n)}},2091:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reject=void 0;const r=n(8703);t.reject=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.filter)((0,r.complement)(t),n)}},9091:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0,t.repeat=function e(t,n){return 1===arguments.length?n=>e(t,n):new Array(n).fill(t)}},5402:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.replace=void 0,t.replace=function e(t,n,r){switch(arguments.length){case 1:return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};case 2:return r=>e(t,n,r);default:return(r||"").replace(t||"",n||"")}}},8120:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.rest=void 0,t.rest=function(e){return e.slice(0,e.length-1)}},4219:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reverse=void 0;const r=n(8703);t.reverse=function(e){const t=(0,r.getValueOr)([],e),n=new Array(t.length);for(let e=0,r=t.length-1;r>=0;++e,--r)n[r]=t[e];return"string"==typeof t?n.join(""):n}},6248:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0,t.scan=function e(t,n,r){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const o=[];for(let e=0;e<r.length;++e){const u=0===e?n:o[e-1];o.push(t(u,r[e]))}return o}},776:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{s(r.next(e))}catch(e){u(e)}}function l(e){try{s(r.throw(e))}catch(e){u(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.sequentialize=void 0;const o=n(8703);t.sequentialize=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,o.chain)(n).bind((e=>r(this,void 0,void 0,(function*(){if(!e)return[];const n=Array(e.length);for(let r=0;r<e.length;++r)n[r]=yield t(e[r]).then(o.getValue);return n})))).getValue()}},3893:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.some=void 0;const r=n(8703);t.some=function e(t,n){return 1===arguments.length?n=>e(t,n):(0,r.getValueOr)([],n).reduce(((e,n)=>e||t(n)),!1)}},9248:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.somePass=void 0;const r=n(8703);t.somePass=function e(t,n){if(1===arguments.length)return n=>e(t,n);const o=(0,r.getValue)(n);return(t||[]).reduce(((e,t)=>e||t(o)),!1)}},8364:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sort=void 0,t.sort=function(e){return Array.from(e).sort()}},7087:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sortBy=void 0,t.sortBy=function e(t,n){return 1===arguments.length?n=>e(t,n):Array.from(n).sort(t)}},2601:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sortWith=void 0;t.sortWith=function e(t,n){return 1===arguments.length?n=>e(t,n):[...null!=n?n:[]].sort((e=>{const t=(n,r,o)=>{const u=e[o],i=((e,t)=>{switch(!0){case e>t:return 1;case e<t:return-1;default:return 0}})(u(n),u(r)),l=o<e.length-1;return 0===i&&l?t(n,r,o+1):i};return(e,n)=>t(e,n,0)})(t))}},5147:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.split=void 0,t.split=function e(t,n){return 1===arguments.length?n=>e(t,n):(null!=n?n:"").split(t)||[]}},6483:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.splitAt=void 0;const r=n(8703);t.splitAt=function e(t,n){if(1===arguments.length)return n=>e(t,n);if(!("string"==typeof n||n instanceof Array||(0,r.isNil)(n)))throw new Error("Can only split string or array, got "+typeof n);return"string"==typeof n?[n.slice(0,t)||"",n.slice(t)||""]:[(n||[]).slice(0,t),(n||[]).slice(t)]}},553:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.splitEvery=void 0,t.splitEvery=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=[];for(let e=0;e<n.length;e+=t)r.push(n.slice(e,e+t));return r}},353:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.splitWhen=void 0,t.splitWhen=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=n||[],o=r.findIndex(t);return o<0?[r,[]]:[r.slice(0,o),r.slice(o)]}},4657:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.spy=void 0,t.spy=function e(t,n){return 1===arguments.length?n=>e(t,n):(console.log(`[${t||"spy"}]:`,typeof n,n),n)}},2026:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.subtractFrom=t.dec=t.subtract=void 0;const r=n(8703);function o(e,t){return 1===arguments.length?t=>o(e,t):(0,r.getValueOr)(0,t)-(0,r.getValueOr)(0,e)}t.subtract=o,t.dec=function(e){return o(1,e)},t.subtractFrom=function e(t,n){return 1===arguments.length?n=>e(t,n):o(n||0,t||0)}},6447:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sum=void 0;const r=n(8703);t.sum=function(e){return e.reduce(r.add,0)}},7984:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.symmetricDifference=void 0,t.symmetricDifference=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=new Set(t||[]),o=new Set(n||[]),u=[];return(t||[]).forEach((e=>{o.has(e)||u.push(e)})),(n||[]).forEach((e=>{r.has(e)||u.push(e)})),u}},9817:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0,t.take=function e(t,n){return 1===arguments.length?n=>e(t,n):(n||[]).slice(0,t)}},4528:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.takeRight=void 0,t.takeRight=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=[],o=n||[];for(let e=o.length-1,n=0;e>=0&&n<t;--e,++n)r.push(o[e]);return r}},8005:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.takeRightWhile=void 0,t.takeRightWhile=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=[],o=n||[];for(let e=o.length-1;e>=0&&t(o[e]);--e)r.push(o[e]);return r}},2207:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0,t.takeWhile=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=n||[],o=[];for(let e=0;e<r.length;++e)t(r[e])&&o.push(r[e]);return o}},6967:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;const r=n(8703);t.tap=function e(t,n){return 1===arguments.length?n=>e(t,n):(t((0,r.getValue)(n)),n)}},9234:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.test=void 0,t.test=function e(t,n){return 1===arguments.length?n=>e(t,n):t.test(n)}},3704:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.times=void 0,t.times=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=Array(t);for(let e=0;e<t;++e)r[e]=n(e);return r}},6834:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toLower=void 0,t.toLower=function(e){return(e||"").toLowerCase()}},4175:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toPairs=void 0;const r=n(8703);t.toPairs=function(e){const t=(0,r.getValueOr)({},e);return Object.keys(t).map((e=>[e,t[e]]))}},3700:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toString=void 0,t.toString=function(e){return String(e)}},6793:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toUpper=void 0,t.toUpper=function(e){return(e||"").toUpperCase()}},9789:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfiniteArray=void 0,t.InfiniteArray=function(e){return new Proxy([],{get(t,n){if("length"===n)return Number.POSITIVE_INFINITY;const r="string"==typeof n?parseInt(n):n;return e(r)}})}},1288:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t){this.data=e,this.next=t}}class r{constructor(e){this.length=0,this.push=e=>(this.tail?(this.tail.next=new n(e),this.tail=this.tail.next):(this.tail=new n(e),this.head=this.tail),this.length++,this),this.pop=()=>{var e;if(this.head){const t=this.head;return this.head=(null===(e=this.head)||void 0===e?void 0:e.next)?this.head.next:void 0,this.length--,t.data}throw new Error("Cannot pop from empty queue")},this.peek=()=>{var e;return null===(e=this.head)||void 0===e?void 0:e.data},this.isEmpty=()=>this.length<=0,this.map=e=>{const t=[];for(let n=this.head;n;n=n.next)t.push(e(n.data));return t},this.forEach=e=>{for(let t=this.head;t;t=t.next)e(t.data)},e&&e.forEach((e=>this.push(e)))}static from(e){return new r(e)}}t.default=r},6835:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.transformObj=t.intoObjM=t.transformList=t.insertM=t.compact=t.find=t.uniqBy=t.uniq=t.insert=t.drop=t.take=t.filter=t.flatten=t.flatMap=t.map=t.consM=t.conjM=void 0;const r=n(8703);t.conjM=(e,t)=>(e.push(t),e),t.consM=(e,t)=>(e.unshift(t),e),t.map=e=>t=>(n,r)=>t(n,e(r)),t.flatMap=e=>t=>(n,o)=>{const u=e(o);return(0,r.isArray)(u)?(0,r.reduce)(t,n,u):t(n,u)},t.flatten=e=>(t,n)=>(0,r.isArray)(n)?(0,r.reduce)(e,t,n):e(t,n),t.filter=e=>t=>(n,r)=>e(r)?t(n,r):n,t.take=e=>t=>{let n=0;return(r,o)=>n++<e?t(r,o):r},t.drop=e=>t=>{let n=0;return(r,o)=>n++<e?r:t(r,o)},t.insert=e=>t=>{let n=!1;return(r,o)=>n?t(r,o):(n=!0,t(t(r,e),o))},t.uniq=e=>{const t=new Set;return(n,r)=>t.has(r)?n:(t.add(r),e(n,r))},t.uniqBy=e=>t=>{const n=new Set;return(r,o)=>{const u=e(o);return n.has(u)?r:(n.add(u),t(r,o))}},t.find=e=>t=>(n,r)=>e(r)?t(n,r):n,t.compact=(0,t.filter)((e=>!(null==e||"number"==typeof e&&isNaN(e)||(0,r.isNothing)(e)||(0,r.isLeft)(e)))),t.insertM=(e,t,n)=>{let r=0,o=t.length;for(;o>r;){const u=r+o>>1;e(n,t[u])?o=u:r=u+1}return t.splice(r,0,n),t},t.transformList=function e(...n){if(!Array.isArray(n[n.length-1]))return t=>e(...n,t);const o=(0,r.butLast)(n),u=(0,r.last)(n),i=(0,r.flow)(...o.reverse());return(0,r.reduce)(i(t.conjM),[],u)},t.intoObjM=(e,[t,n])=>(e[t]=n,e),t.transformObj=function e(...n){if((0,r.isFunction)(n[n.length-1]))return t=>e(...n,t);const o=(0,r.butLast)(n),u=(0,r.last)(n),i=(0,r.flow)(...o.reverse());return(0,r.reduce)(i(t.intoObjM),{},Object.entries(u))}},2674:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trim=void 0,t.trim=function(e){return(e||"").trim()}},659:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tryCatch=void 0,t.tryCatch=function e(t,n,r){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);try{return t(r)}catch(e){if(n)return n(e,r);throw new Error("No catcher fn defined")}}},4230:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Monad=t.InvalidValueError=t.NilError=void 0;class n extends Error{constructor(e="Encountered NIL"){super(e),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}t.NilError=n;class r extends Error{constructor(e=""){const t="Value was invalid";super(e?`${t}: ${e}`:t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}t.InvalidValueError=r,t.Monad=class{to(e){return e(this)}}},9691:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.union=void 0,t.union=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=new Set(t||[]);return(n||[]).forEach((e=>r.add(e))),Array.from(r)}},1235:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.unionBy=void 0,t.unionBy=function e(t,n,r){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const o=new Set,u=[];return(n||[]).forEach((e=>{const n=t(e);o.has(n)||(u.push(e),o.add(n))})),(r||[]).forEach((e=>{const n=t(e);o.has(n)||(u.push(e),o.add(n))})),u}},5332:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uniq=void 0,t.uniq=function(e){return Array.from(new Set(e))}},671:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uniqBy=void 0,t.uniqBy=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=new Set,o=[];return(n||[]).forEach((e=>{const n=t(e);r.has(n)||(o.push(e),r.add(n))})),o}},9360:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.unless=void 0;const r=n(8703);t.unless=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=(0,r.getValue)(o);return t(u)?u:n(u)}},3946:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.update=void 0;const r=n(8703);t.update=function e(t,n,o){if(1===arguments.length)return n=>e(t,n);if(2===arguments.length)return r=>e(t,n,r);const u=(0,r.getValueOr)({},o);return u instanceof Array?((e,t,n)=>{const r=Array.from(n);return r[e]=t(r[e]),r})(t,n,u):Object.assign(Object.assign({},u),{[t]:n(u[t])})}},8957:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateIn=void 0;const r=n(8703);t.updateIn=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=(0,r.getValueOr)([],t),i=(0,r.getValueOr)({},o);return(0,r.chain)(i).bind((0,r.getIn)(u)).bind(n).bind((e=>(0,r.assocIn)(t,e,i))).getValueOr({})}},5884:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;const r=n(8936),o=n(9863),u=n(135),i=n(2680),l=n(1074),s=n(2422),c=n(3846),a=n(9967),f=n(3556),d=n(3636),h="__name",g=(e,t)=>{const n=(0,a.isString)(e)?e:y(e),r=(e=>Array.isArray(e)?"array":null===e?"null object":typeof e)(t);return new Error(`expected ${n}, got ${r} ${JSON.stringify(t)}`)},v=(e,t)=>{const n=(0,l.isFunction)(t)?t:!0===t?JSON.parse:void 0;return(0,a.isString)(e)&&n?n(e):e},p=(e,t)=>(Object.defineProperty(t,h,{value:e}),t),y=e=>e[h],_=e=>{return Array.isArray(e)?(t=e,(0,r.all)(o.isRight,t)?(0,o.right)(t.map(_)):(0,o.left)(new Error((e=>`[${e.reduce(((e,t,n)=>{var r;return t.isLeft()&&e.push(`${n}: ${null===(r=t.getReason())||void 0===r?void 0:r.message}`),e}),[]).join(", ")}]`)(t)))):(0,i.isDataObject)(e)?b(e):(0,u.getValueOr)(void 0,e);var t},b=e=>(0,r.all)(o.isRight,(0,d.values)(e))?(0,o.right)((0,f.map)(_,e)):(0,o.left)(new Error(`{${Object.entries(e).reduce(((e,[t,n])=>{var r;return(0,o.isLeft)(n)&&e.push(`${t}: ${null===(r=n.getReason())||void 0===r?void 0:r.message}`),e}),[]).join(", ")}}`));t.from=(e,t)=>((e,{decode:t}={decode:!1})=>p(y(e),(n=>{const r=t?v(n,t):n;return e(r)?(0,o.right)(r):(0,o.left)(g(e,n))})))(p(e,t));const O=(0,t.from)("any",(e=>!0)),j=(0,t.from)("unknown",(e=>!0)),P=(0,t.from)("string",a.isString),M=(0,t.from)("number",c.isNumber),m=(0,t.from)("null",(e=>null===e)),V=(0,t.from)("undefined",(e=>void 0===e)),w=(0,t.from)("boolean",(e=>!0===e||!1===e)),E=(0,t.from)("nil",s.isNil),A=(0,t.from)("ISO date string",(e=>(0,a.isString)(e)&&"Invalid Date"!==String(new Date(e)))),N=(...e)=>{const n=e.map(y).join(" | ");return(0,t.from)(`[${n}]`,(t=>e.some((e=>e(t).isRight()))))};t.default={from:t.from,any:O,array:e=>{const t=`Array<${y(e)}>`;return p(t,((n,{decode:r}={decode:!1})=>{const u=r?v(n,r):n;return Array.isArray(u)?_(u.map(e)):(0,o.left)(g(t,n))}))},boolean:w,dateString:A,dictionary:e=>{const t=`Dictionary<${y(e)}>`;return p(t,((n,{decode:r}={decode:!1})=>{const u=r?v(n,r):n;return(0,i.isDataObject)(u)?_((l=u,Object.fromEntries(Object.entries(l).map((([t,n])=>[t,e(n)]))))):(0,o.left)(g(t,n));var l}))},enum:(e,n=`one of [${e.join(",")}]`)=>{const r=new Set(e);return(0,t.from)(null!=n?n:`one of [${e.join(",")}]`,(e=>r.has(e)))},nil:E,number:M,null:m,nullable:e=>N(e,m),oneOf:N,optional:e=>N(e,V),record:e=>{const t=`Record<{${Object.entries(e).map((([e,t])=>`${e}: ${y(t)}`)).join(", ")}}>`;return p(t,((n,{decode:r}={decode:!1})=>{const u=r?v(n,r):n;return(0,i.isDataObject)(u)?_((l=u,Object.fromEntries(Object.entries(e).map((([e,t])=>[e,t(l[e])]))))):(0,o.left)(g(t,n));var l}))},string:P,undefined:V,unknown:j}},3636:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.values=void 0;const r=n(8703);t.values=function(e){const t=(0,r.getValueOr)({},e);return(0,r.isNil)(t)?[]:(0,r.isFunction)(t.values)?Array.from(t.values()):Array.isArray(t)?t:Object.values(t)}},6284:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.when=void 0;const r=n(8703);t.when=function e(t,n,o){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const u=(0,r.getValue)(o);return t(u)?n(u):u}},7242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.where=void 0,t.where=function e(t,n){return 1===arguments.length?n=>e(t,n):Object.keys(t).reduce(((e,r)=>e&&t[r](n[r])),!0)}},6813:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.whereEq=void 0;const r=n(8703);t.whereEq=function e(t,n){return 1===arguments.length?n=>e(t,n):Object.keys(t).reduce(((e,o)=>e&&(0,r.equals)(t[o],n[o])),!0)}},1853:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.xor=void 0,t.xor=function e(t,n){return 1===arguments.length?n=>e(t,n):!!((t?1:0)^(n?1:0))}},8165:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.xprod=void 0,t.xprod=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=[];return(t||[]).forEach((e=>{(n||[]).forEach((t=>r.push([e,t])))})),r}},7039:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0,t.zip=function e(t,n){if(1===arguments.length)return n=>e(t,n);const r=[],o=t||[],u=n||[];for(let e=0;e<o.length&&e<u.length;++e)r.push([o[e],u[e]]);return r}},2253:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.zipMap=void 0,t.zipMap=function e(t,n,r){if(1===arguments.length)return function(n,r){return 1===arguments.length?e(t,n):e(t,n,r)};if(2===arguments.length)return r=>e(t,n,r);const o=[],u=n||[],i=r||[];for(let e=0;e<u.length&&i.length;++e)o.push(t([u[e],i[e]]));return o}}},t={},n=function n(r){var o=t[r];if(void 0!==o)return o.exports;var u=t[r]={exports:{}};return e[r].call(u.exports,u,u.exports,n),u.exports}(8703);l=n})();