UNPKG

@eluvio/elv-js-helpers

Version:

A collection of Javascript helper functions used by several Eluvio libraries.

2 lines 147 kB
/*! For license information please see elv-js-helpers.js.LICENSE.txt */ var ElvJsHelpers;(()=>{var t={45:(t,r,e)=>{var n=e(5789)((function(t,r){for(var e=0,n=r.length,o=[];e<n&&!t(r[e]);)o.push(r[e]),e+=1;return[o,Array.prototype.slice.call(r,e)]}));t.exports=n},48:(t,r,e)=>{var n=e(1382),o=e(5789),i=e(3657),s=function(){function t(t,r){this.xf=r,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=i.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,r){return this.store(r),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return n(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},t}(),u=o((function(t,r){return new s(t,r)}));t.exports=u},58:(t,r,e)=>{var n=e(7020),o="compose: Functions required";function i(t,r){if(!n(r))throw new TypeError(o);return function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return r.call(null,t.apply(null,e))}}t.exports=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(!arguments.length)throw new TypeError(o);var e=t.slice().reverse(),s=e[0];if(!n(s))throw new TypeError(o);return e.slice(1).concat((function(t){return t})).reduce(i,s)}},105:(t,r,e)=>{"use strict";const n=e(2549),o=e(6934),i=e(3942);t.exports=n(((t,r)=>i(o,t,r)))},124:t=>{"use strict";var r,e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};((t,r)=>{for(var n in r)e(t,n,{get:r[n],enumerable:!0})})(s,{Immer:()=>G,applyPatches:()=>st,castDraft:()=>at,castImmutable:()=>ft,createDraft:()=>ut,current:()=>Y,enableMapSet:()=>tt,enablePatches:()=>Q,finishDraft:()=>ct,freeze:()=>j,immerable:()=>c,isDraft:()=>l,isDraftable:()=>d,nothing:()=>u,original:()=>m,produce:()=>et,produceWithPatches:()=>nt,setAutoFreeze:()=>ot,setUseStrictShallowCopy:()=>it}),t.exports=(r=s,((t,r,s,u)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of o(r))!i.call(t,s)&&undefined!==s&&e(t,s,{get:()=>r[s],enumerable:!(u=n(r,s))||u.enumerable});return t})(e({},"__esModule",{value:!0}),r));var u=Symbol.for("immer-nothing"),c=Symbol.for("immer-draftable"),a=Symbol.for("immer-state");function f(t,...r){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var p=Object.getPrototypeOf;function l(t){return!!t&&!!t[a]}function d(t){return!!t&&(y(t)||Array.isArray(t)||!!t[c]||!!t.constructor?.[c]||E(t)||A(t))}var h=Object.prototype.constructor.toString();function y(t){if(!t||"object"!=typeof t)return!1;let r=p(t);if(null===r)return!0;let e=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return e===Object||"function"==typeof e&&Function.toString.call(e)===h}function m(t){return l(t)||f(15),t[a].t}function g(t,r){0===v(t)?Reflect.ownKeys(t).forEach((e=>{r(e,t[e],t)})):t.forEach(((e,n)=>r(n,e,t)))}function v(t){let r=t[a];return r?r.o:Array.isArray(t)?1:E(t)?2:A(t)?3:0}function w(t,r){return 2===v(t)?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function x(t,r){return 2===v(t)?t.get(r):t[r]}function b(t,r,e){let n=v(t);2===n?t.set(r,e):3===n?t.add(e):t[r]=e}function E(t){return t instanceof Map}function A(t){return t instanceof Set}function T(t){return t.e||t.t}function O(t,r){if(E(t))return new Map(t);if(A(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);let e=y(t);if(!0===r||"class_only"===r&&!e){let r=Object.getOwnPropertyDescriptors(t);delete r[a];let e=Reflect.ownKeys(r);for(let n=0;n<e.length;n++){let o=e[n],i=r[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[o]})}return Object.create(p(t),r)}{let r=p(t);if(null!==r&&e)return{...t};let n=Object.create(r);return Object.assign(n,t)}}function j(t,r=!1){return M(t)||l(t)||!d(t)||(v(t)>1&&(t.set=t.add=t.clear=t.delete=S),Object.freeze(t),r&&Object.entries(t).forEach((([t,r])=>j(r,!0)))),t}function S(){f(2)}function M(t){return Object.isFrozen(t)}var P,N={};function q(t){let r=N[t];return r||f(0),r}function F(t,r){N[t]||(N[t]=r)}function R(){return P}function k(t,r){r&&(q("Patches"),t.f=[],t.h=[],t.b=r)}function U(t){_(t),t.a.forEach(I),t.a=null}function _(t){t===P&&(P=t.i)}function C(t){return P=function(t,r){return{a:[],i:t,p:r,P:!0,d:0}}(P,t)}function I(t){let r=t[a];0===r.o||1===r.o?r.x():r.m=!0}function D(t,r){r.d=r.a.length;let e=r.a[0];return void 0!==t&&t!==e?(e[a].s&&(U(r),f(4)),d(t)&&(t=$(r,t),r.i||L(r,t)),r.f&&q("Patches").T(e[a].t,t,r.f,r.h)):t=$(r,e,[]),U(r),r.f&&r.b(r.f,r.h),t!==u?t:void 0}function $(t,r,e){if(M(r))return r;let n=r[a];if(!n)return g(r,((o,i)=>B(t,n,r,o,i,e))),r;if(n.n!==t)return r;if(!n.s)return L(t,n.t,!0),n.t;if(!n.c){n.c=!0,n.n.d--;let r=n.e,o=r,i=!1;3===n.o&&(o=new Set(r),r.clear(),i=!0),g(o,((o,s)=>B(t,n,r,o,s,e,i))),L(t,r,!1),e&&t.f&&q("Patches").g(n,e,t.f,t.h)}return n.e}function B(t,r,e,n,o,i,s){if(l(o)){let s=$(t,o,i&&r&&3!==r.o&&!w(r.r,n)?i.concat(n):void 0);if(b(e,n,s),!l(s))return;t.P=!1}else s&&e.add(o);if(d(o)&&!M(o)){if(!t.p.y&&t.d<1)return;$(t,o),(!r||!r.n.i)&&"symbol"!=typeof n&&Object.prototype.propertyIsEnumerable.call(e,n)&&L(t,o)}}function L(t,r,e=!1){!t.i&&t.p.y&&t.P&&j(r,e)}var z={get(t,r){if(r===a)return t;let e=T(t);if(!w(e,r))return function(t,r,e){let n=K(r,e);return n?"value"in n?n.value:n.get?.call(t.u):void 0}(t,e,r);let n=e[r];return t.c||!d(n)?n:n===J(t.t,r)?(Z(t),t.e[r]=H(n,t)):n},has:(t,r)=>r in T(t),ownKeys:t=>Reflect.ownKeys(T(t)),set(t,r,e){let n=K(T(t),r);if(n?.set)return n.set.call(t.u,e),!0;if(!t.s){let n=J(T(t),r),o=n?.[a];if(o&&o.t===e)return t.e[r]=e,t.r[r]=!1,!0;if(function(t,r){return t===r?0!==t||1/t==1/r:t!=t&&r!=r}(e,n)&&(void 0!==e||w(t.t,r)))return!0;Z(t),V(t)}return t.e[r]===e&&(void 0!==e||r in t.e)||Number.isNaN(e)&&Number.isNaN(t.e[r])||(t.e[r]=e,t.r[r]=!0),!0},deleteProperty:(t,r)=>(void 0!==J(t.t,r)||r in t.t?(t.r[r]=!1,Z(t),V(t)):delete t.r[r],t.e&&delete t.e[r],!0),getOwnPropertyDescriptor(t,r){let e=T(t),n=Reflect.getOwnPropertyDescriptor(e,r);return n&&{writable:!0,configurable:1!==t.o||"length"!==r,enumerable:n.enumerable,value:e[r]}},defineProperty(){f(11)},getPrototypeOf:t=>p(t.t),setPrototypeOf(){f(12)}},W={};function J(t,r){let e=t[a];return(e?T(e):t)[r]}function K(t,r){if(!(r in t))return;let e=p(t);for(;e;){let t=Object.getOwnPropertyDescriptor(e,r);if(t)return t;e=p(e)}}function V(t){t.s||(t.s=!0,t.i&&V(t.i))}function Z(t){t.e||(t.e=O(t.t,t.n.p.S))}g(z,((t,r)=>{W[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}})),W.deleteProperty=function(t,r){return W.set.call(this,t,r,void 0)},W.set=function(t,r,e){return z.set.call(this,t[0],r,e,t[0])};var G=class{constructor(t){this.y=!0,this.S=!1,this.produce=(t,r,e)=>{if("function"==typeof t&&"function"!=typeof r){let e=r;r=t;let n=this;return function(t=e,...o){return n.produce(t,(t=>r.call(this,t,...o)))}}let n;if("function"!=typeof r&&f(6),void 0!==e&&"function"!=typeof e&&f(7),d(t)){let o=C(this),i=H(t,void 0),s=!0;try{n=r(i),s=!1}finally{s?U(o):_(o)}return k(o,e),D(n,o)}if(!t||"object"!=typeof t){if(n=r(t),void 0===n&&(n=t),n===u&&(n=void 0),this.y&&j(n,!0),e){let r=[],o=[];q("Patches").T(t,n,r,o),e(r,o)}return n}f(1)},this.produceWithPatches=(t,r)=>{if("function"==typeof t)return(r,...e)=>this.produceWithPatches(r,(r=>t(r,...e)));let e,n;return[this.produce(t,r,((t,r)=>{e=t,n=r})),e,n]},"boolean"==typeof t?.autoFreeze&&this.setAutoFreeze(t.autoFreeze),"boolean"==typeof t?.useStrictShallowCopy&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){d(t)||f(8),l(t)&&(t=Y(t));let r=C(this),e=H(t,void 0);return e[a].l=!0,_(r),e}finishDraft(t,r){let e=t&&t[a];(!e||!e.l)&&f(9);let{n}=e;return k(n,r),D(void 0,n)}setAutoFreeze(t){this.y=t}setUseStrictShallowCopy(t){this.S=t}applyPatches(t,r){let e;for(e=r.length-1;e>=0;e--){let n=r[e];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}e>-1&&(r=r.slice(e+1));let n=q("Patches").A;return l(t)?n(t,r):this.produce(t,(t=>n(t,r)))}};function H(t,r){let e=E(t)?q("MapSet").I(t,r):A(t)?q("MapSet").D(t,r):function(t,r){let e=Array.isArray(t),n={o:e?1:0,n:r?r.n:R(),s:!1,c:!1,r:{},i:r,t,u:null,e:null,x:null,l:!1},o=n,i=z;e&&(o=[n],i=W);let{revoke:s,proxy:u}=Proxy.revocable(o,i);return n.u=u,n.x=s,u}(t,r);return(r?r.n:R()).a.push(e),e}function Y(t){return l(t)||f(10),X(t)}function X(t){if(!d(t)||M(t))return t;let r,e=t[a];if(e){if(!e.s)return e.t;e.c=!0,r=O(t,e.n.p.S)}else r=O(t,!0);return g(r,((t,e)=>{b(r,t,X(e))})),e&&(e.c=!1),r}function Q(){let t="replace",r="add",e="remove";function n(t){if(!d(t))return t;if(Array.isArray(t))return t.map(n);if(E(t))return new Map(Array.from(t.entries()).map((([t,r])=>[t,n(r)])));if(A(t))return new Set(Array.from(t).map(n));let r=Object.create(p(t));for(let e in t)r[e]=n(t[e]);return w(t,c)&&(r[c]=t[c]),r}function o(t){return l(t)?n(t):t}F("Patches",{A:function(o,i){return i.forEach((i=>{let{path:s,op:u}=i,c=o;for(let t=0;t<s.length-1;t++){let r=v(c),e=s[t];"string"!=typeof e&&"number"!=typeof e&&(e=""+e),(0===r||1===r)&&("__proto__"===e||"constructor"===e)&&f(19),"function"==typeof c&&"prototype"===e&&f(19),c=x(c,e),"object"!=typeof c&&f(18,s.join("/"))}let a=v(c),p=n(i.value),l=s[s.length-1];switch(u){case t:switch(a){case 2:return c.set(l,p);case 3:f(16);default:return c[l]=p}case r:switch(a){case 1:return"-"===l?c.push(p):c.splice(l,0,p);case 2:return c.set(l,p);case 3:return c.add(p);default:return c[l]=p}case e:switch(a){case 1:return c.splice(l,1);case 2:return c.delete(l);case 3:return c.delete(i.value);default:return delete c[l]}default:f(17)}})),o},g:function(n,i,s,u){switch(n.o){case 0:case 2:return function(n,i,s,u){let{t:c,e:a}=n;g(n.r,((n,f)=>{let p=x(c,n),l=x(a,n),d=f?w(c,n)?t:r:e;if(p===l&&d===t)return;let h=i.concat(n);s.push(d===e?{op:d,path:h}:{op:d,path:h,value:l}),u.push(d===r?{op:e,path:h}:d===e?{op:r,path:h,value:o(p)}:{op:t,path:h,value:o(p)})}))}(n,i,s,u);case 1:return function(n,i,s,u){let{t:c,r:a}=n,f=n.e;f.length<c.length&&([c,f]=[f,c],[s,u]=[u,s]);for(let r=0;r<c.length;r++)if(a[r]&&f[r]!==c[r]){let e=i.concat([r]);s.push({op:t,path:e,value:o(f[r])}),u.push({op:t,path:e,value:o(c[r])})}for(let t=c.length;t<f.length;t++){let e=i.concat([t]);s.push({op:r,path:e,value:o(f[t])})}for(let t=f.length-1;c.length<=t;--t){let r=i.concat([t]);u.push({op:e,path:r})}}(n,i,s,u);case 3:return function(t,n,o,i){let{t:s,e:u}=t,c=0;s.forEach((t=>{if(!u.has(t)){let s=n.concat([c]);o.push({op:e,path:s,value:t}),i.unshift({op:r,path:s,value:t})}c++})),c=0,u.forEach((t=>{if(!s.has(t)){let s=n.concat([c]);o.push({op:r,path:s,value:t}),i.unshift({op:e,path:s,value:t})}c++}))}(n,i,s,u)}},T:function(r,e,n,o){n.push({op:t,path:[],value:e===u?void 0:e}),o.push({op:t,path:[],value:r})}})}function tt(){class t extends Map{constructor(t,r){super(),this[a]={o:2,i:r,n:r?r.n:R(),s:!1,c:!1,e:void 0,r:void 0,t,u:this,l:!1,m:!1}}get size(){return T(this[a]).size}has(t){return T(this[a]).has(t)}set(t,e){let n=this[a];return o(n),(!T(n).has(t)||T(n).get(t)!==e)&&(r(n),V(n),n.r.set(t,!0),n.e.set(t,e),n.r.set(t,!0)),this}delete(t){if(!this.has(t))return!1;let e=this[a];return o(e),r(e),V(e),e.t.has(t)?e.r.set(t,!1):e.r.delete(t),e.e.delete(t),!0}clear(){let t=this[a];o(t),T(t).size&&(r(t),V(t),t.r=new Map,g(t.t,(r=>{t.r.set(r,!1)})),t.e.clear())}forEach(t,r){T(this[a]).forEach(((e,n,o)=>{t.call(r,this.get(n),n,this)}))}get(t){let e=this[a];o(e);let n=T(e).get(t);if(e.c||!d(n)||n!==e.t.get(t))return n;let i=H(n,e);return r(e),e.e.set(t,i),i}keys(){return T(this[a]).keys()}values(){let t=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{let r=t.next();return r.done?r:{done:!1,value:this.get(r.value)}}}}entries(){let t=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{let r=t.next();if(r.done)return r;let e=this.get(r.value);return{done:!1,value:[r.value,e]}}}}[Symbol.iterator](){return this.entries()}}function r(t){t.e||(t.r=new Map,t.e=new Map(t.t))}class e extends Set{constructor(t,r){super(),this[a]={o:3,i:r,n:r?r.n:R(),s:!1,c:!1,e:void 0,t,u:this,a:new Map,m:!1,l:!1}}get size(){return T(this[a]).size}has(t){let r=this[a];return o(r),r.e?!!(r.e.has(t)||r.a.has(t)&&r.e.has(r.a.get(t))):r.t.has(t)}add(t){let r=this[a];return o(r),this.has(t)||(n(r),V(r),r.e.add(t)),this}delete(t){if(!this.has(t))return!1;let r=this[a];return o(r),n(r),V(r),r.e.delete(t)||!!r.a.has(t)&&r.e.delete(r.a.get(t))}clear(){let t=this[a];o(t),T(t).size&&(n(t),V(t),t.e.clear())}values(){let t=this[a];return o(t),n(t),t.e.values()}entries(){let t=this[a];return o(t),n(t),t.e.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(t,r){let e=this.values(),n=e.next();for(;!n.done;)t.call(r,n.value,n.value,this),n=e.next()}}function n(t){t.e||(t.e=new Set,t.t.forEach((r=>{if(d(r)){let e=H(r,t);t.a.set(r,e),t.e.add(e)}else t.e.add(r)})))}function o(t){t.m&&f(3,JSON.stringify(T(t)))}F("MapSet",{I:function(r,e){return new t(r,e)},D:function(t,r){return new e(t,r)}})}var rt=new G,et=rt.produce,nt=rt.produceWithPatches.bind(rt),ot=rt.setAutoFreeze.bind(rt),it=rt.setUseStrictShallowCopy.bind(rt),st=rt.applyPatches.bind(rt),ut=rt.createDraft.bind(rt),ct=rt.finishDraft.bind(rt);function at(t){return t}function ft(t){return t}},140:(t,r,e)=>{"use strict";const n=e(5752);t.exports=t=>"Result"===n(t)},153:(t,r,e)=>{var n=e(2743)(1,"join");t.exports=n},163:(t,r,e)=>{"use strict";const n=e(7725),o=e(2549),i=e(489),s=o(((t,r)=>n(r)?i(t):r));t.exports=s},165:(t,r,e)=>{var n=e(5614),o=e(1088),i=e(4342),s=e(1227),u=e(1750),c=n((function t(r,e,n){if(0===r.length)return e;var c=r[0];if(r.length>1){var a=!u(n)&&o(c,n)?n[c]:i(r[1])?[]:{};e=t(Array.prototype.slice.call(r,1),e,a)}return s(c,e,n)}));t.exports=c},167:(t,r,e)=>{"use strict";const n=e(2881),o=e(4607),i=e(2549),s=e(9255),u=i(((t,r)=>s(o(t),n(r))));t.exports=u},170:(t,r,e)=>{var n=e(5789)(e(3300)(["all"],e(5829),(function(t,r){for(var e=0;e<r.length;){if(!t(r[e]))return!1;e+=1}return!0})));t.exports=n},172:(t,r,e)=>{"use strict";const n=e(5752),o=e(6162),i=e(711);t.exports=t=>o(t)?"Err":i(t)?"Ok":n(t)},177:(t,r,e)=>{"use strict";const n=e(3666),o=e(2549)(((t,r)=>n(t,r)));t.exports=o},220:t=>{"use strict";t.exports=t=>Object.fromEntries(t)},268:(t,r,e)=>{var n=e(1204),o=e(2554),i=e(9249),s=e(9032),u=n((function(t){return i(s(t),o(t))}));t.exports=u},284:t=>{t.exports=function(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}},366:(t,r,e)=>{"use strict";const n=e(2775);t.exports=n},368:(t,r,e)=>{"use strict";const n=e(2549),o=e(2953),i=e(7902),s=e(6749);t.exports=n((function(t){if(!s(t))throw new TypeError("tryCatch: Function required for first argument");const r=function(){try{return i(t.apply(this,arguments))}catch(t){return o(t)}};return Object.defineProperty(r,"length",{value:t.length}),r}))},383:(t,r,e)=>{var n=e(8389),o=e(1554);t.exports=function(t){return n(t)||!!t&&o("concat",t)}},468:(t,r,e)=>{var n=e(1204),o=e(7012),i=e(2649),s=e(2613),u=e(9135),c=e(1172),a=n((function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():i(t)?[]:u(t)?"":s(t)?{}:o(t)?function(){return arguments}():c(t)?t.constructor.from(""):void 0}));t.exports=a},479:(t,r,e)=>{"use strict";const n=e(2549),o=e(2588),i=e(1942),s=e(1819),u=n(((t,r)=>s(t)(r).either(o,i)));t.exports=u},489:t=>{"use strict";t.exports=t=>{throw Error(t)}},505:(t,r,e)=>{"use strict";const n=e(3969),o=e(4756);t.exports=t=>n(o(t)).valueOf()},510:(t,r,e)=>{"use strict";const n=e(918)("Number",Number);t.exports=n},516:t=>{t.exports=function(t,r){for(var e=0,n=r.length,o=[];e<n;)t(r[e])&&(o[o.length]=r[e]),e+=1;return o}},592:(t,r,e)=>{var n=e(811),o=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return t.prototype.add=function(t){return!i(t,!0,this)},t.prototype.has=function(t){return i(t,!1,this)},t}();function i(t,r,e){var o,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t==-1/0?!!e._items["-0"]||(r&&(e._items["-0"]=!0),!1):null!==e._nativeSet?r?(o=e._nativeSet.size,e._nativeSet.add(t),e._nativeSet.size===o):e._nativeSet.has(t):i in e._items?t in e._items[i]||(r&&(e._items[i][t]=!0),!1):(r&&(e._items[i]={},e._items[i][t]=!0),!1);case"boolean":if(i in e._items){var s=t?1:0;return!!e._items[i][s]||(r&&(e._items[i][s]=!0),!1)}return r&&(e._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==e._nativeSet?r?(o=e._nativeSet.size,e._nativeSet.add(t),e._nativeSet.size===o):e._nativeSet.has(t):i in e._items?!!n(t,e._items[i])||(r&&e._items[i].push(t),!1):(r&&(e._items[i]=[t]),!1);case"undefined":return!!e._items[i]||(r&&(e._items[i]=!0),!1);case"object":if(null===t)return!!e._items.null||(r&&(e._items.null=!0),!1);default:return(i=Object.prototype.toString.call(t))in e._items?!!n(t,e._items[i])||(r&&e._items[i].push(t),!1):(r&&(e._items[i]=[t]),!1)}}t.exports=o},626:(t,r,e)=>{"use strict";const n=e(167);t.exports=t=>(r,e)=>`invalid property name "${n(t,e)}" (is not a valid ${t.name})`},630:(t,r,e)=>{"use strict";const n=e(775).Just;t.exports=n},633:(t,r,e)=>{"use strict";const n=e(9979);t.exports=n},649:(t,r,e)=>{var n=e(1770),o=e(6770),i=e(1554),s=e(5752),u=e(4496),c=function(t,r){return t.valueOf()===r.valueOf()},a={Array:function(t,r){return t.length===r.length&&f(t,r)},Date:function(t,r){return o(t.valueOf(),r.valueOf())},Error:function(t,r){return t.name===r.name&&t.message===r.message},Object:function(t,r){return Object.keys(t).length===Object.keys(r).length&&f(t,r)},RegExp:function(t,r){return t.source===r.source&&t.ignoreCase===r.ignoreCase&&t.global===r.global&&t.multiline===r.multiline&&t.unicode===r.unicode}};function f(t,r){for(var e in t)if(!p(t[e],r[e]))return!1;return!0}function p(t,r){return!!o(t,r)||!!n(t,r)&&(i("equals",t)?(r[u.equals]||r.equals).call(r,t):(a[s(t)]||c)(t,r))}t.exports=p},711:(t,r,e)=>{"use strict";const n=e(140),o=e(2585),i=e(2588),s=e(1942);t.exports=t=>n(t)&&o(i,s,t)},757:(t,r,e)=>{"use strict";const{Any:n}=e(1021),o=n;t.exports=o},775:(t,r,e)=>{t.exports=e(1338)},786:(t,r,e)=>{"use strict";const n=e(2549),o=e(8286),i=e(5319),s=n(((t,r)=>!(o(r)&&void 0!==i(t,r))));t.exports=s},794:(t,r,e)=>{var n=e(5501),o=e(7020);t.exports=n((function(t,r,e){if(!o(t)||!o(r))throw new TypeError("either: First two arguments must be functions");if(!e||!o(e.either))throw new TypeError("either: Last argument must be a Sum Type");return e.either(t,r)}))},811:(t,r,e)=>{var n=e(3241);t.exports=function(t,r){return n(r,t,0)>=0}},818:(t,r,e)=>{"use strict";const n=e(2549),o=e(5737),i=e(3719),s=e(2453),u=e(489),c=e(163),a=e(1819),f=o("swapFields",{fieldName1:[String,Symbol],fieldName2:[String,Symbol],obj:Object}),p=n(((t,r,e)=>{const n=s(a(f,{fieldName1:t,fieldName2:r,obj:e}));n.ok||u(n.errMsgs.join("\n"));const o=c(`Property '${t}' not found`,i(t,e)),p=c(`Property '${r}' not found`,i(r,e));return Object.assign(e,{[t]:p,[r]:o})}));t.exports=p},827:(t,r,e)=>{var n=e(1554);t.exports=function(t){return!!t&&n("reduce",t)}},855:(t,r,e)=>{"use strict";const n=e(6498),o=e(7940),i=e(1619);t.exports=(t,r)=>n(o,i(t),r)},862:t=>{"use strict";t.exports=()=>new Date},896:(t,r,e)=>{"use strict";const n=e(9407);t.exports=n},906:(t,r,e)=>{"use strict";const n=e(9079);t.exports=n},918:(t,r,e)=>{"use strict";const{BasicModel:n}=e(1021),o=e(163);t.exports=(t,r)=>(o("no basic type supplied",r),n(r).as(t))},976:(t,r,e)=>{"use strict";const n=e(2549);t.exports=t=>n(((r,e)=>t(r,e)?-1:t(e,r)?1:0))},978:t=>{"use strict";t.exports=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/},986:(t,r,e)=>{var n=e(7020);t.exports=function(t){if(!t||!n(t.snd))throw new TypeError("snd: Pair required");return t.snd()}},1003:(t,r,e)=>{"use strict";const n=e(2549),o=e(9102),i=e(5892),s=e(906),u=e(633),c=n(((t,r)=>i(u,o(t),s)(r)));t.exports=c},1018:(t,r,e)=>{"use strict";const n=e(4580),o=e(7725),i=e(105),s=e(2050),u=(t,r=[],e=null)=>{const c=s.concat(r);switch(n(t)){case"Array":return t.map((t=>u(t,r)));case"Object":return i(((t,e)=>u(t,r,e)),t);case"String":return o(c.find((t=>t.test(e))))?t:t.length<=10?"[REDACTED]":`[REDACTED ...${t.slice(-4)}]`;default:return t}};t.exports=u},1021:(t,r)=>{const e=Object.prototype,n=Object.getPrototypeOf,o=Object.setPrototypeOf,i=(t,r)=>e.hasOwnProperty.call(t,r),s=(t,r)=>r instanceof t,u=t=>"function"==typeof t,c=t=>t&&"object"==typeof t,a=t=>"string"==typeof t,f=t=>c(t)&&n(t)===e,p=t=>t&&u(t[Symbol.iterator]),l=(t,r)=>new Proxy(t,r),d=(t,r={})=>{for(let e in r)if(f(r[e])){const n={};d(n,t[e]),d(n,r[e]),t[e]=n}else t[e]=r[e];return t},h=(t,r,e,n=!1)=>{Object.defineProperty(t,r,{value:e,enumerable:n,writable:!0,configurable:!0})},y=(t,r,e)=>{t.prototype=Object.assign(Object.create(r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e),o(t,r)},m=Symbol(),g=Symbol(),v=Symbol(),w=Symbol(),x=(t,r,e,n,i,u)=>{const c=function(t=c.default,r){return u&&!s(c,this)?new c(t):(n&&(t=n(t,c,this)),r===g||P(c,t)?i&&r!==w?l(t,i(c)):t:void 0)};return e&&y(c,e),o(c,r.prototype),c.constructor=r,c.definition=t,c.assertions=[...c.assertions],h(c,"errors",[]),delete c.name,c},b=(t,r,e)=>s(r,t)?t:c(t)||u(t)||void 0===t?(d(e,r.default),r.parentClass&&d(t,new r.parentClass(t)),d(e,t),e):t,E=(t,r,e)=>(y(t,r,e),t.assertions.push(...r.assertions),t),A=(t,r,e,n,o)=>{t.push({expected:r,received:e,path:n,message:o})},T=(t,r=t.errorCollector)=>{const n=t.errors.length;if(n>0){const n=t.errors.map((r=>{var n;return r.message||(r.message="expecting "+(r.path?r.path+" to be ":"")+S(r.expected)+", got "+(null!=r.received?(n=r.received,e.toString.call(n).match(/\s([a-zA-Z]+)/)[1]+" "):"")+R(r.received)),r.model=t,r}));t.errors.length=0,r.call(t,n)}return n},O=t=>t&&n(t)&&s(D,n(t).constructor),j=t=>{if(f(t)){t={};for(let r in t)t[r]=j(t[r])}return Array.isArray(t)?1===t.length?[t[0],void 0,null]:t:[t]},S=(t,r)=>{const e=j(t).map((t=>R(t,r)));return e.length>1?e.join(" or "):e[0]},M=(t,r=[])=>(r.length>0&&(t=[].concat(t,...[].concat(r)).filter(((t,r,e)=>e.indexOf(t)===r))),t),P=(t,r)=>(t[m](r,null,t.errors,[],!0),!T(t)),N=(t,r,e,n,o,i)=>{const u=o.indexOf(r);if(-1!==u&&-1!==o.indexOf(r,u+1))return t;if(Array.isArray(r)&&1===r.length&&null!=t&&(r=r[0]),s(D,r))i&&(t=C(t,r)),r[m](t,e,n,o.concat(r),i);else if(f(r))for(let s in r){const u=t?t[s]:void 0;N(u,r[s],k(e,s),n,o,i)}else{if(j(r).some((r=>q(t,r,e,o,i))))return i?C(t,r):t;A(n,r,t,e)}return t},q=(t,r,e,n,o)=>{if(r===L)return!0;if(null==t)return t===r;if(f(r)||s(D,r)){const i=[];return N(t,r,e,i,n,o),!i.length}return s(RegExp,r)?r.test(t):r===Number||r===Date?t.constructor===r&&!isNaN(t):t===r||u(r)&&s(r,t)||t.constructor===r},F=(t,r,e,n=r.errors)=>{for(let o of r.assertions){let i;try{i=o.call(r,t)}catch(t){i=t}if(!0!==i){const s=u(o.description)?o.description:(t,r)=>`assertion "${o.description}" returned ${R(t)} for ${e?e+" =":"value"} ${R(r)}`;A(n,o,t,e,s.call(r,i,t,e))}}},R=(t,r=[])=>{if(r.length>15||r.includes(t))return"...";if(null==t)return String(t);if(a(t))return`"${t}"`;if(s(D,t))return t.toString(r);if(r.unshift(t),u(t))return t.name||t.toString();if(s(Map,t)||s(Set,t))return R([...t]);if(Array.isArray(t))return`[${t.map((t=>R(t,r))).join(", ")}]`;if(t.toString&&t.toString!==e.toString)return t.toString();if(c(t)){const e=Object.keys(t),n="\t".repeat(r.length);return`{${e.map((e=>`\n${n+e}: ${R(t[e],[...r])}`)).join(", ")} ${e.length?`\n${n.slice(1)}`:""}}`}return String(t)},k=(t,r)=>t?t+"."+r:r,U=(t,r,e,n,o,s,u)=>{const c=k(e,o),a=t.conventionForPrivate(o),f=t.conventionForConstant(o),p=i(n,o),l=p&&Object.getOwnPropertyDescriptor(n,o);o in r&&(a&&!s||f&&void 0!==n[o])&&_(`modify ${a?"private":"constant"} property ${o}`,t),u(),i(r,o)&&N(n[o],r[o],c,t.errors,[]),F(n,t,c);const d=t.errors.length;return d&&(p?Object.defineProperty(n,o,l):delete n[o],T(t)),!d},_=(t,r)=>{r.errors.push({message:"cannot "+t})},C=(t,r=[])=>{if(!t||f(r)||s($,r)||O(t))return t;const e=j(r),n=[];for(let r of e)s(D,r)&&!s($,r)&&r.test(t)&&n.push(r);return 1===n.length?new n[0](t,g):(n.length>1&&console.warn(`Ambiguous model for value ${R(t)}, could be ${n.join(" or ")}`),t)},I=(t,r,e,n)=>({get(o,s){if(s===v)return o;if(!a(s))return Reflect.get(o,s);const c=k(e,s),p=i(r,s),d=r[s];if(!n&&p&&t.conventionForPrivate(s))return _(`access to private property ${c}`,t),void T(t);let h=o[s];return p&&h&&i(o,s)&&!f(d)&&!O(h)&&Reflect.set(o,s,h=C(h,d)),u(h)&&"constructor"!==s&&!n?l(h,{apply(t,r,e){n=!0;const o=Reflect.apply(t,r,e);return n=!1,o}}):(f(d)&&!h&&(o[s]=h={}),((t,r,e,n,o)=>f(e)?l(t,I(r,e,n,o)):C(t,e))(h,t,d,c,n))},set:(o,i,s)=>U(t,r,e,o,i,n,(()=>Reflect.set(o,i,C(s,r[i])))),deleteProperty:(o,i)=>U(t,r,e,o,i,n,(()=>Reflect.deleteProperty(o,i))),defineProperty:(o,i,s)=>U(t,r,e,o,i,n,(()=>Reflect.defineProperty(o,i,s))),has:(e,n)=>Reflect.has(e,n)&&Reflect.has(r,n)&&!t.conventionForPrivate(n),ownKeys:e=>Reflect.ownKeys(e).filter((e=>Reflect.has(r,e)&&!t.conventionForPrivate(e))),getOwnPropertyDescriptor(e,n){let o;return t.conventionForPrivate(n)||(o=Object.getOwnPropertyDescriptor(r,n),void 0!==o&&(o.value=e[n])),o}});function D(t){return f(t)?new B(t):new $(t)}function $(t){return x(t,$)}function B(t){return x(t,B,Object,b,(r=>I(r,t)),!0)}Object.assign(D.prototype,{name:"Model",assertions:[],conventionForConstant:t=>t.toUpperCase()===t,conventionForPrivate:t=>"_"===t[0],toString(t){return i(this,"name")?this.name:S(this.definition,t)+((r=this.assertions).length?`(${r.map((t=>t.name||t.description||t))})`:"");var r},as(t){return h(this,"name",t),this},defaultTo(t){return this.default=this(t),this},[m](t,r,e,n,o){N(t,this.definition,r,e,n,o),F(t,this,r,e)},test(t,r){let e=this;for(;!i(e,"errorCollector");)e=n(e);const o=e.errorCollector;let s;return e.errorCollector=t=>{s=!0,r&&r.call(this,t)},new this(t),e.errorCollector=o,!s},errorCollector(t){const r=new TypeError(t.map((t=>t.message)).join("\n"));throw r.stack=r.stack.replace(/\n.*object-model(.|\n)*object-model.*/,""),r},assert(t,r=R(t)){return h(t,"description",r),this.assertions=this.assertions.concat(t),this}}),D.CHECK_ONCE=w,y($,D,{extend(...t){const r=E(new $(M(this.definition,t)),this);for(let e of t)s($,e)&&r.assertions.push(...e.assertions);return r}}),y(B,D,{defaultTo(t){const r=this.definition;for(let e in t)i(r,e)&&(t[e]=N(t[e],r[e],e,this.errors,[],!0));return T(this),this.default=t,this},toString(t){return R(this.definition,t)},extend(...t){const r={...this.definition},e={...this.prototype},o={...this.default},i=[];for(let n of t)s(D,n)&&(d(r,n.definition),d(o,n.default),i.push(...n.assertions)),u(n)&&d(e,n.prototype),c(n)&&d(r,n);const a=E(new B(r),this,e).defaultTo(o);return a.assertions=[...this.assertions,...i],n(this)!==B.prototype&&(a.parentClass=this),a},[m](t,r,e,n,o){c(t)?N(t[v]||t,this.definition,r,e,n,o):A(e,this,t,r),F(t,this,r,e)}});const L=l($(),{apply(t,r,[e]){const n=Object.create(L);return n.definition=e,n}});L.definition=L,L.toString=()=>"Any",L.remaining=function(t){this.definition=t},y(L.remaining,L,{toString(){return"..."+S(this.definition)}}),L[Symbol.iterator]=function*(){yield new L.remaining(this.definition)};const z=(t,r,e,n,o,s,c)=>x(e,r,t,n,(r=>Object.assign({getPrototypeOf:()=>r.prototype,get(e,n){if(n===v)return e;const c=e[n];return u(c)?l(c,{apply(u,c,a){if(i(s,n)){const[i,c=a.length-1,f]=s[n];for(let e=i;e<=c;e++){const o=f?f(e):r.definition;a[e]=N(a[e],o,`${t.name}.${n} arguments[${e}]`,r.errors,[],!0)}if(r.assertions.length>0){const t=o(e);u.apply(t,a),F(t,r,`after ${n} mutation`)}T(r)}return u.apply(e,a)}}):c}},c)));function W(t){const r=z(Array,W,t,(t=>Array.isArray(t)?t.map((t=>C(t,r.definition))):t),(t=>[...t]),{copyWithin:[],fill:[0,0],pop:[],push:[0],reverse:[],shift:[],sort:[],splice:[2],unshift:[0]},{set:(t,e,n)=>J(r,t,e,n,((t,r)=>t[e]=r),!0),deleteProperty:(t,e)=>J(r,t,e,void 0,(t=>delete t[e]))});return r}y(W,D,{toString(t){return"Array of "+S(this.definition,t)},[m](t,r,e,n,o){Array.isArray(t)?(t[v]||t).forEach(((t,i)=>N(t,this.definition,`${r||"Array"}[${i}]`,e,n,o))):A(e,this,t,r),F(t,this,r,e)},extend(...t){return E(new W(M(this.definition,t)),this)}});const J=(t,r,e,n,o,i)=>{const s=`Array[${e}]`;+e>=0&&(i||e in r)&&(n=N(n,t.definition,s,t.errors,[],!0));const u=[...r];o(u),F(u,t,s);const c=!T(t);return c&&o(r,n),c};function K(t){const r=z(Set,K,t,(t=>p(t)?new Set([...t].map((t=>C(t,r.definition)))):t),(t=>new Set(t)),{add:[0,0],delete:[],clear:[]});return r}function V(t,r){const e=t=>0===t?n.definition.key:n.definition.value,n=z(Map,V,{key:t,value:r},(t=>p(t)?new Map([...t].map((t=>t.map(((t,r)=>C(t,e(r))))))):t),(t=>new Map(t)),{set:[0,1,e],delete:[],clear:[]});return n}function Z(...t){return x({arguments:t},Z,Function,null,(t=>({getPrototypeOf:()=>t.prototype,get:(t,r)=>r===v?t:t[r],apply(r,e,n){const o=t.definition,i=o.arguments.find((t=>s(L.remaining,t))),u=i?Math.max(n.length,o.arguments.length-1):o.arguments.length;for(let r=0;r<u;r++){const e=i&&r>=o.arguments.length-1?i.definition:o.arguments[r];n[r]=N(n[r],e,`arguments[${r}]`,t.errors,[],!0)}let c;return F(n,t,"arguments"),t.errors.length||(c=Reflect.apply(r,e,n),"return"in o&&(c=N(c,o.return,"return value",t.errors,[],!0))),T(t),c}})))}y(K,D,{toString(t){return"Set of "+S(this.definition,t)},[m](t,r,e,n,o){if(s(Set,t))for(let i of t.values())N(i,this.definition,`${r||"Set"} value`,e,n,o);else A(e,this,t,r);F(t,this,r,e)},extend(...t){return E(new K(M(this.definition,t)),this)}}),y(V,D,{toString(t){return`Map of ${S(this.definition.key,t)} : ${S(this.definition.value,t)}`},[m](t,r,e,n,o){if(s(Map,t)){r=r||"Map";for(let[i,s]of t)N(i,this.definition.key,`${r} key`,e,n,o),N(s,this.definition.value,`${r}[${R(i)}]`,e,n,o)}else A(e,this,t,r);F(t,this,r,e)},extend(t,r){return E(new V(M(this.definition.key,t),M(this.definition.value,r)),this)}}),y(Z,D,{toString(t=[]){let r=`Function(${this.definition.arguments.map((r=>S(r,[...t]))).join(", ")})`;return"return"in this.definition&&(r+=" => "+S(this.definition.return,t)),r},return(t){return this.definition.return=t,this},[m](t,r,e){u(t)||A(e,"Function",t,r)}});const G="list-style-type: none; padding: 0; margin: 0;",H="padding: 0 0 0 1em;",Y="color: #3e999f;",X="color: #8959a8",Q="color: #C19ED8",tt="color: #8959a8; font-weight: bold",rt="color: #C19ED8; font-weight: bold",et="color: #B871BD; font-style: italic",nt=t=>{if(null==t)return null;const r=n(t);return r&&r.constructor&&s(D,r.constructor)?r.constructor:null},ot=(t,...r)=>["span",{style:t},...r],it=(t,r={})=>null==t?ot("color: #8e908c",""+t):"boolean"==typeof t?ot("color: #AA0D91",t):"number"==typeof t?ot("color: #1C00CF",t):"string"==typeof t?ot("color: #C41A16",`"${t}"`):Array.isArray(t)&&r.isModelDefinition?ot("",...t.flatMap((t=>[it(t,r)," or "])).slice(0,-1)):f(t)?st(t,nt(t),r):u(t)&&!s(D,t)&&r.isModelDefinition?ot("color: #4271AE",t.name||t.toString()):["object",{object:t,config:r}],st=(t,r,e)=>ot("","{",["ol",{style:G},...Object.keys(t).map((r=>["li",{style:H},ot(X,r),": ",it(t[r],e)]))],"}"),ut={header:(t,r={})=>t===L?ot(Y,"Any"):s(L.remaining,t)?ot(Y,"...",it(t.definition,{isModelDefinition:!0})):s(B,t)?ot(Y,t.name):s(D,t)?(t=>{const r={isModelDefinition:!0},e=t.definition,n=(t,r)=>t.flatMap((t=>[r(t),", "])).slice(0,-1);let o=[];return s($,t)&&(o=[it(e,r)]),s(W,t)&&(o=["Array of ",it(e,r)]),s(K,t)&&(o=["Set of ",it(e,r)]),s(V,t)&&(o=["Map of ",it(e.key,r)," : ",it(e.value,r)]),s(Z,t)&&(o=["Function(",...n(e.arguments,(t=>it(t,r))),")"],"return"in e&&o.push(" => ",it(e.return,r))),t.assertions.length>0&&o.push("\n(assertions: ",...n(t.assertions,(t=>["object",{object:t}])),")"),ot(Y,...o)})(t):r.isModelDefinition&&f(t)?it(t,r):null,hasBody:t=>s(B,t),body:t=>ot("","{",["ol",{style:G},...Object.keys(t.definition).map((r=>{const e=t.conventionForPrivate(r),n=t.conventionForConstant(r),o=t.default&&i(t.default,r);let s=X;return e?s=n?rt:Q:n&&(s=tt),["li",{style:H},ot(s,r),": ",it(t.definition[r],{isModelDefinition:!0}),o?ot(et," = ",it(t.default[r])):""]}))],"}")},ct={header(t,r={}){if(r.isInstanceProperty&&f(t))return it(t,r);const e=nt(t);if(s(D,e)){const r=s(B,e)?[e.name]:[["object",{object:t[v]}],` (${e.name})`];return ot("color: #718c00; font-style: italic",...r)}return null},hasBody:t=>t&&s(B,nt(t)),body(t){const r=nt(t),e=t[v]||t;return ot("","{",["ol",{style:G},...Object.keys(e).map((t=>{const n=r.conventionForPrivate(t),o=r.conventionForConstant(t),i=t in r.definition;let s=X;return i?n?s=o?rt:Q:o&&(s=tt):s="color: #C0C0C0;",["li",{style:H},ot(s,t),": ",it(e[t],{isInstanceProperty:!0})]})),["li",{style:H},ot(et,"__proto__",": ",["object",{object:n(t)}])]],"}")}};"undefined"!=typeof window&&(window.devtoolsFormatters=(window.devtoolsFormatters||[]).concat(ut,ct)),r.Any=L,r.ArrayModel=W,r.BasicModel=$,r.FunctionModel=Z,r.MapModel=V,r.Model=D,r.ObjectModel=B,r.SetModel=K},1060:(t,r,e)=>{"use strict";const n=e(8104)("UUIDLowerCaseString",e(978),"is not in lower case UUID format '00000000-0000-0000-0000-000000000000'");t.exports=n},1088:t=>{t.exports=function(t,r){return Object.prototype.hasOwnProperty.call(r,t)}},1092:(t,r,e)=>{"use strict";const n=e(2645);t.exports=n},1099:(t,r,e)=>{var n=e(1554),o=e(1882);t.exports=function(t){return o(t)&&n("chain",t)}},1125:t=>{"use strict";t.exports=(t,r,e,n)=>`must be ${e?">=":">"} ${t} and ${n?"<=":"<"} ${r}`},1166:(t,r,e)=>{"use strict";const n=e(2549)(((t,r)=>0===r&&0===t?0:(r-t)/Math.abs(t)));t.exports=n},1172:t=>{t.exports=function(t){var r=Object.prototype.toString.call(t);return"[object Uint8ClampedArray]"===r||"[object Int8Array]"===r||"[object Uint8Array]"===r||"[object Int16Array]"===r||"[object Uint16Array]"===r||"[object Int32Array]"===r||"[object Uint32Array]"===r||"[object Float32Array]"===r||"[object Float64Array]"===r||"[object BigInt64Array]"===r||"[object BigUint64Array]"===r}},1177:(t,r,e)=>{"use strict";const n=e(918)("Function",Function);t.exports=n},1204:(t,r,e)=>{var n=e(3125);t.exports=function(t){return function r(e){return 0===arguments.length||n(e)?r:t.apply(this,arguments)}}},1227:(t,r,e)=>{var n=e(2649),o=e(4342);t.exports=function(t,r,e){if(o(t)&&n(e)){var i=[].concat(e);return i[t]=r,i}var s={};for(var u in e)s[u]=e[u];return s[t]=r,s}},1255:(t,r,e)=>{var n=function(t){return{value:t,map:function(r){return n(r(t))}}},o=e(5614)((function(t,r,e){return t((function(t){return n(r(t))}))(e).value}));t.exports=o},1264:(t,r,e)=>{"use strict";const n=e(9424);t.exports=n},1266:(t,r,e)=>{"use strict";const n=e(918),o=e(8286),i=e(6498),s=e(5741),u=e(7843),c=e(163);t.exports=(t,r,e)=>(c("no key model supplied",r),c("no value model supplied",e),n(t,Object).extend().assert(...i(o,...s(r))).assert(...i(o,...u(e))))},1284:(t,r,e)=>{"use strict";const n=e(2549)(((t,r)=>Math.round(r/t)*t));t.exports=n},1312:(t,r,e)=>{var n=e(5789)(e(3300)([],e(5743),(function(t,r){return t(r),r})));t.exports=n},1314:(t,r,e)=>{"use strict";const n=e(3191),o=e(58),i=e(6934),s=e(4294),u=e(6377)(3,o(n(i),s));t.exports=u},1338:(t,r,e)=>{var n=e(7860),o=e(649),i=e(9222),s=e(8486),u=e(3558),c=e(2583).type("Maybe"),a=e(2583).typeFn(c(),4),f=e(4496),p=e(4118),l=e(6350),d=e(7372),h=e(1882),y=e(9931),m=e(7020),g=e(1770),v=function(t){return function(){return t}},w=function(t){return t},x=n({Nothing:[],Just:["a"]}),b=x.Nothing,E=x.Just;j.Nothing=l(j,b),j.Just=l(j,E);var A=l(j,E),T=l(j,b);function O(t){if(!h(t)&&!y(t))throw new TypeError("Maybe.sequence: Must wrap an Apply");return t.map(A)}function j(t){var r;if(!arguments.length)throw new TypeError("Maybe: Must wrap something, try using Nothing or Just constructors");var e=x.includes(t)?t:E(t),n=A,i=T,b=function(t){return P(v(t),w)},S=function(t){return g(j,t)&&P(v(t.either(v(!0),v(!1))),(function(r){return t.either(v(!1),(function(t){return o(t,r)}))}))},M=function(){return P(v("Nothing"),(function(t){return"Just"+u(t)}))};function P(t,r){if(!m(t)||!m(r))throw new TypeError("Maybe.either: Requires both left and right functions");return x.caseOf({Nothing:t,Just:r},e)}function N(t){return function(r){if(!g(j,r))throw new TypeError("Maybe."+t+": Maybe of Semigroup required");return P(j.Nothing,s("Maybe."+t,r))}}function q(t){return function(r){if(!m(r))throw new TypeError("Maybe."+t+": Function required");return P(j.Nothing,l(j.Just,r))}}function F(t){return function(r){if(!g(j,r))throw new TypeError("Maybe."+t+": Maybe required");return P(v(r),j.Just)}}function R(t){return function(r){if(!m(r))throw new TypeError("Maybe."+t+": Function required");var e=P(j.Nothing,r);if(!g(j,e))throw new TypeError("Maybe."+t+": Function must return a Maybe");return e}}return(r={inspect:M,toString:M,either:P,option:b,type:c,equals:S,bichain:function(t,r){var e="Maybe.bichain: Both arguments must be Maybe returning functions";if(!m(t)||!m(r))throw new TypeError(e);var n=P(t,r);if(!g(j,n))throw new TypeError(e);return n},coalesce:function(t,r){if(!m(t)||!m(r))throw new TypeError("Maybe.coalesce: Requires both left and right functions");return j.Just(P(t,r))},zero:i,ap:function(t){var r=b(v(void 0));if(!m(r))throw new TypeError("Maybe.ap: Wrapped value must be a function");if(!g(j,t))throw new TypeError("Maybe.ap: Maybe required");return P(j.Nothing,t.map)},of:n,sequence:function(t){if(!d(t)&&!m(t))throw new TypeError("Maybe.sequence: Applicative TypeRep or Apply returning function required");var r=p(t);return P(l(r,j.Nothing),O)},traverse:function(t,r){if(!d(t)&&!m(t))throw new TypeError("Maybe.traverse: Applicative TypeRep or Apply returning function required for first argument");if(!m(r))throw new TypeError("Maybe.traverse: Apply returning function required for second argument");var e=p(t),n=P(l(e,j.Nothing),r);if(!h(n)&&!y(n))throw new TypeError("Maybe.traverse: Both functions must return an Apply of the same type");return P(v(n),v(n.map(A)))},alt:F("alt"),chain:R("chain"),concat:N("concat"),map:q("map")})[f.zero]=i,r[f.of]=n,r[f.equals]=S,r[f.alt]=F(f.alt),r[f.concat]=N(f.concat),r[f.map]=q(f.map),r[f.chain]=R(f.chain),r["@@type"]=a,r.constructor=j,r}j.of=A,j.zero=T,j.type=c,j[f.of]=A,j[f.zero]=T,j["@@type"]=a,j["@@implements"]=i(["alt","ap","chain","concat","equals","map","of","traverse","zero"]),t.exports=j},1343:(t,r,e)=>{"use strict";const n=e(2549),o=e(489),i=n(((t,r)=>r&&o(t)));t.exports=i},1352:(t,r,e)=>{"use strict";const n=e(4580);t.exports=t=>"GeneratorFunction"===n(t)},1381:(t,r,e)=>{"use strict";const n=e(1284)(2);t.exports=n},1382:t=>{t.exports=function(t,r){var e;r=r||[];var n=(t=t||[]).length,o=r.length,i=[];for(e=0;e<n;)i[i.length]=t[e],e+=1;for(e=0;e<o;)i[i.length]=r[e],e+=1;return i}},1389:(t,r,e)=>{var n=e(2884),o=e(3189);t.exports=function t(r,e,i,s){var u=function(n){for(var o=e.length,u=0;u<o;){if(r===e[u])return i[u];u+=1}for(var c in e[u]=r,i[u]=n,r)r.hasOwnProperty(c)&&(n[c]=s?t(r[c],e,i,!0):r[c]);return n};switch(o(r)){case"Object":return u(Object.create(Object.getPrototypeOf(r)));case"Array":return u([]);case"Date":return new Date(r.valueOf());case"RegExp":return n(r);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return r.slice();default:return r}}},1401:(t,r,e)=>{"use strict";const n=e(2549),o=e(5478),i=n(((t,r,e)=>o(t(r),t(e))));t.exports=i},1496:(t,r,e)=>{"use strict";const n=e(4643);t.exports=t=>{if(n(t))return t.valueOf();throw Error("Value is not a fraction.js object")}},1528:(t,r,e)=>{"use strict";const n=e(5561);t.exports=n},1548:(t,r,e)=>{"use strict";const n=e(8107);t.exports=t=>n(t)},1554:(t,r,e)=>{var n=e(7020),o=e(4496);t.exports=function(t,r){return!!r&&(function(t,r){return n(r[o[t]])||n(r[t])}(t,r)||function(t,r){return n(r["@@implements"])&&!!r["@@implements"](t)}(t,r))}},1556:(t,r,e)=>{var n=e(1382),o=e(1204),i=e(3378),s=o((function(t){return i(t.length,(function(){var r=0,e=arguments[0],o=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0);return i[0]=function(){var t=e.apply(this,n(arguments,[r,o]));return r+=1,t},t.apply(this,i)}))}));t.exports=s},1587:(t,r,e)=>{var n=e(1204)(e(6655)(!0));t.exports=n},1619:(t,r,e)=>{"use strict";const n=e(6901),o=e(2549),i=e(9255),s=o(((t,r)=>void 0===i((r=>!t(r[0],r[1])),n(2,r))));t.exports=s},1657:(t,r,e)=>{"use strict";const n=e(170);t.exports=n},1681:(t,r,e)=>{var n=e(5789),o=e(4342),i=e(7343),s=n((function(t,r){return t.map((function(t){for(var e,n=r,s=0;s<t.length;){if(null==n)return;e=t[s],n=o(e)?i(e,n):n[e],s+=1}return n}))}));t.exports=s},1692:(t,r,e)=>{var n=e(7860),o=e(649),i=e(9222),s=e(8486),u=e(3558),c=e(2583).type("Result"),a=e(2583).typeFn(c(),4),f=e(4496),p=e(4118),l=e(6350),d=e(7372),h=e(1882),y=e(9931),m=e(7020),g=e(1770),v=e(383),w=function(t){return function(){return t}},x=n({Err:["a"],Ok:["b"]});O.Err=l(O,x.Err),O.Ok=l(O,x.Ok);var b=O.Ok,E=function(t){return function(r){return O.Err(t.either((function(t){return v(r)&&g(t,r)?r.concat(t):r}),(function(){return r})))}},A=function(t){return function(r){return O.Err(v(t)&&g(r,t)?r.concat(t):t)}};function T(t){if(!h(t)&&!y(t))throw new TypeError("Result.sequence: Must wrap an Apply");return t.map(b)}function O(t){var r;if(!arguments.length)throw new TypeError("Result: Must wrap something, try using Err or Ok constructors");var e=x.includes(t)?t:x.Ok(t),n=function(t){return g(O,t)&&j((function(r){return t.either((function(t){return o(t,r)}),w(!1))}),(function(r){return t.either(w(!1),(function(t){return o(t,r)}))}))},i=b,v=function(){return j((function(t){return"Err"+u(t)}),(function(t){return"Ok"+u(t)}))};function j(t,r){if(!m(t)||!m(r))throw new TypeError("Result.either: Requires both invalid and valid functions");return x.caseOf({Err:t,Ok:r},e)}function S(t){return function(r){if(!g(O,r))throw new TypeError("Result."+t+": Result of Semigroup required");return j(O.Err,s("Result."+t,r))}}function M(t){return function(r){if(!m(r))throw new TypeError("Result."+t+": Function required");return j(O.Err,l(O.Ok,r))}}function P(t){return function(r,e){if(!m(r)||!m(e))throw new TypeError("Result."+t+": Requires both left and right functions");return j(l(O.Err,r),l(O.Ok,e))}}function N(t){return function(r){if(!g(O,r))throw new TypeError("Result."+t+": Result required");return r.either((function(t){return j(A(t),O.Ok)}),(function(t){return j((function(){return O.Ok(t)}),O.Ok)}))}}function q(t){return function(r){if(!m(r))throw new TypeError("Result."+t+": Result returning function required");var e=j(O.Err,r);if(!g(O,e))throw new TypeError("Result."+t+": Function must return a Result");return e}}return(r={inspect:v,toString:v,equals:n,type:c,either:j,swap:function(t,r){if(!m(t)||!m(r))throw new TypeError("Result.swap: Requires both left and right functions");return j(l(O.Ok,t),l(O.Err,r))},coalesce:function(t,r){if(!m(t)||!m(r))throw new TypeError("Result.coalesce: Requires both left and right functions");return O.Ok(j(t,r))},bichain:function(t,r){var e="Result.bichain: Both arguments must be Result returning functions";if(!m(t)||!m(r))throw new TypeError(e);var n=j(t,r);if(!g(O,n))throw new TypeError(e);return n},ap:function(t){if(!g(O,t))throw new TypeError("Result.ap: Result required");return j(E(t),(function(r){if(!m(r))throw new TypeError("Result.ap: Wrapped value must be a function");return t.either(O.Err,(function(){return t.map(r)}))}))},of:i,sequence:function(t){if(!d(t)&&!m(t))throw new TypeError("Result.sequence: Applicative TypeRep or Apply returning function required");var r=p(t);return j(l(r,O.Err),T)},traverse:function(t,r){if(!d(t)&&!m(t))throw new TypeError("Result.traverse: Applicative TypeRep of Apply returning function required for first argument");if(!m(r))throw new TypeError("Result.traverse: Apply returning functions required for both arguments");var e=p(t),n=j(l(e,O.Err),r);if(!h(n)&&!y(n))throw new TypeError("Result.traverse: Both functions must return an Apply of the same type");return j(w(n),w(n.map(b)))},alt:N("alt"),bimap:P("bimap"),concat:S("concat"),map:M("map"),chain:q("chain")})[f.of]=i,r[f.equals]=n,r[f.alt]=N(f.alt),r[f.bimap]=P(f.bimap),r[f.concat]=S(f.concat),r[f.map]=M(f.map),r[f.chain]=q(f.chain),r["@@type"]=a,r.constructor=O,r}O.of=b,O.type=c,O[f.of]=b,O["@@type"]=a,O["@@implements"]=i(["alt","ap","bimap","chain","concat","equals","map","of","traverse"]),t.exports=O},1750:(t,r,e)=>{var n=e(1204)((function(t){return null==t}));t.exports=n},1770:(t,r,e)=>{var n=e(5501),o=e(7020),i=e(5752);t.exports=n((function(t,r){var e=i(t),n=i(r);return e===n||o(t)&&t.name===n||o(r)&&r.name===e}))},1819:(t,r,e)=>{"use strict";const n=e(2953),o=e(7902),i=e(2549)(((t,r)=>{let e=[];return t.test(r,(r=>r.forEach((r=>e.push(Object.assign({toString:()=>`${t.name}: ${r.message}`},r))))))?o(r):n(e)}));t.exports=i},1830:t=>{"use strict";t.exports=t=>t.reduce(((t,r)=>t<<1|r),0)},1835:(t,r,e)=>{var n=e(9222),o=e(3558),i=e(2583).type("Async"),s=e(2583).typeFn(i(),5),u=e(4496),c=e(8791),a=e(6350),f=e(7441),p=e(6237),l=e(9931),d=e(827),h=e(7020),y=e(5916),m=e(2419),g=e(1770),v=function(t){return w((function(r,e){return e(t)}))};function w(t){var r;if(!h(t))throw new TypeError("Async: Function required");var e=v,n=function(){return"Async"+o(t)};function c(r,e,n){if(!h(r)||!h(e))throw new TypeError("Async.fork: Reject and resolve functions required");var o=!1,i=!1,s=h(n)?n:p,u=function(t,r){if(!i)return i=!0,o?p():t(r)},c=t(u.bind(null,r),u.bind(null,e)),a=h(c)?c:p;return f((function(){return s((a(),void(o=!0)))}))}function l(t){return function(r){if(!h(r))throw new TypeError("Async."+t+": Function required");return w((function(t,e){return c(t,a(e,r))}))}}function d(t){return function(r,e){if(!h(r)||!h(e))throw new TypeError("Async."+t+": Functions required for both arguments");return w((function(t,n){return c(a(t,r),a(n,e))}))}}function y(t){return function(r){if(!g(w,r))throw new TypeError("Async."+t+": Async required");return w((function(t,e){var n=p,o=p;return n=c((function(){o=r.fork(t,e)}),e),f((function(){return o(n())}))}))}}function m(t){return function(r){if(!h(r))throw new TypeError("Async."+t+": Async returning function required");return w((function(e,n){var o=p,i=p;return o=c(e,(function(o){var s=r(o);if(!g(w,s))throw new TypeError("Async."+t+": Function must return another Async");i=s.fork(e,n)})),f((function(){return i(o())}))}))}}return(r={fork:c,toPromise:function(){return new Promise((function(t,r){c(r,t)}))},inspect:n,toString:n,type:i,swap:function(t,r){if(!h(t)||!h(r))throw new TypeError("Async.swap: Functions required for both arguments");return w((function(e,n){return c(a(n,t),a(e,r))}))},race:function(t){if(!g(w,t))throw new TypeError("Async.race: Async required");return w((function(r,e){var n=f((function(t,n){return t?e(n):r(n)})),o=n.bind(null,!0),i=n.bind(null,!1),s=c(i,o),u=t.fork(i,o);return function(){s(),u()}}))},coalesce:function(t,r){if(!h(t)||!h(r))throw new TypeError("Async.coalesce: Functions required for both arguments");return w((function(e,n){return c(a(n,t),a(n,r))}))},ap:function(t){if(!g(w,t))throw new TypeError("Async.ap: Async required");return w((function(r,e){var n=null,o=null,i=!1,s=!1,u=!1,p=f(r);function l(){!u&&i&&s&&a(e,n)(o)}var d=c(p,(function(t){if(!h(t))throw new TypeError("Async.ap: Wrapped value must be a function");i=!0,n=t,l()})),y=t.fork(p,(function(t){s=!0,o=t,l()}));return function(){d(),y(),u=!0}}))},of:e,alt:y("alt"),bimap:d("bimap"),map:l("map"),chain:m("chain"),bichain:function(t,r){var e="Async.bichain: Both arguments must be Async returning functions";if(!h(t)||!h(r))throw new TypeError(e);return w((function(n,o){var i=p,s=p;function u(t){return function(r){var i=t(r);if(!g(w,i))throw new TypeError(e);s=i.fork(n,o)}}return i=c(u(t),u(r)),f((function(){return s(i())}))}))}})[u.of]=e,r[u.alt]=y(u.alt),r[u.bimap]=d(u.bimap),r[u.map]=l(u.map),r[u.chain]=m(u.chain),r["@@type"]=s,r.constructor=w,r}w.of=v,w.type=i,w[u.of]=v,w["@@type"]=s,w.Rejected=function(t){return w((function(r){return r(t)}))},w.Resolved=v,w.fromPromise=function(t){if(!h(t))throw new TypeError("Async.fromPromise: Promise returning function required");return function(){var r=arguments;return w((function(e,n){var o=t.apply(null,r);if(!m(o))throw new TypeError("Async.fromPromise: Promise returning function required");o.then(n,e)}))}},w.fromNode=function(t,r){if(!h(t))throw new TypeError("Async.fromNode: CPS function required");return function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return w((function(n,o){t.apply(r,e.concat((function(t,r){return t?n(t):o(r)})))}))}},w.all=function(t){if(!d(t)||!t.reduce((function(t,r){return t&&g(w,r)}),!0))throw new TypeError("Async.all: Foldable structure of Asyncs required");return l(t)?c.sequence(w.of,t):t.sequence(w.of)},w.rejectAfter=function(t,r){if(!(y(t)&&t>=0))throw new TypeError("Async.rejectAfter: Positive Integer required for first argument");return w((function(e){var n=setTimeout((function(){e(r)}),t);return function(){clearTimeout(n)}}))},w.resolveAfter=function(t,r){if(!(y(t)&&t>=0))throw new TypeError("Async.resolveAfter: Positive Integer required for first argument");return w((function(e,n){var o=setTimeout((function(){n(r)}),t);return function(){clearTimeout(o)}}))},w["@@implements"]=n(["alt","ap","bimap","chain","map","of"]),t.exports=w},1841:(t,r,e)=>{"use strict";const n=e(7232);t.exports=n},1882:(t,r,e)=>{var n=e(1554),o=e(1981);t.exports=function(t){return o(t)&&n("ap",t)}},1901:t=>{t.exports=function(t,r){switch(t){case 0:return function(){return r.apply(this,arguments)};case 1:return function(t){return r.apply(this,arguments)};case 2:return function(t,e){return r.apply(t