UNPKG

@eluvio/elv-js-helpers

Version:

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

1 lines 146 kB
var ElvJsHelpers;(()=>{var o={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 o=e(7020),i="compose: Functions required";function s(e,n){if(!o(n))throw new TypeError(i);return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return n.call(null,e.apply(null,t))}}t.exports=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(!arguments.length)throw new TypeError(i);var e=t.slice().reverse(),n=e[0];if(!o(n))throw new TypeError(i);return e.slice(1).concat(function(t){return t}).reduce(s,n)}},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:_=>{"use strict";var t,o=Object.defineProperty,C=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyNames,D=Object.prototype.hasOwnProperty,r={};((t,r)=>{for(var e in r)o(t,e,{get:r[e],enumerable:!0})})(r,{Immer:()=>Y,applyPatches:()=>st,castDraft:()=>at,castImmutable:()=>ft,createDraft:()=>ut,current:()=>X,enableMapSet:()=>rt,enablePatches:()=>tt,finishDraft:()=>ct,freeze:()=>d,immerable:()=>n,isDraft:()=>f,isDraftable:()=>y,nothing:()=>u,original:()=>B,produce:()=>et,produceWithPatches:()=>nt,setAutoFreeze:()=>ot,setUseStrictShallowCopy:()=>it}),_.exports=(t=r,((r,e,t,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let t of I(e))!D.call(r,t)&&undefined!==t&&o(r,t,{get:()=>e[t],enumerable:!(n=C(e,t))||n.enumerable});return r})(o({},"__esModule",{value:!0}),t));var u=Symbol.for("immer-nothing"),n=Symbol.for("immer-draftable"),c=Symbol.for("immer-state");function a(t,...r){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var s=Object.getPrototypeOf;function f(t){return!!t&&!!t[c]}function y(t){return!!t&&(p(t)||Array.isArray(t)||!!t[n]||!!t.constructor?.[n]||x(t)||b(t))}var $=Object.prototype.constructor.toString();function p(t){if(!t||"object"!=typeof t)return!1;let r=s(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)===$}function B(t){return f(t)||a(15),t[c].t}function m(e,n){0===g(e)?Reflect.ownKeys(e).forEach(t=>{n(t,e[t],e)}):e.forEach((t,r)=>n(r,t,e))}function g(t){let r=t[c];return r?r.o:Array.isArray(t)?1:x(t)?2:b(t)?3:0}function v(t,r){return 2===g(t)?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function w(t,r){return 2===g(t)?t.get(r):t[r]}function L(t,r,e){let n=g(t);2===n?t.set(r,e):3===n?t.add(e):t[r]=e}function x(t){return t instanceof Map}function b(t){return t instanceof Set}function l(t){return t.e||t.t}function i(i,t){if(x(i))return new Map(i);if(b(i))return new Set(i);if(Array.isArray(i))return Array.prototype.slice.call(i);let e=p(i);if(!0===t||"class_only"===t&&!e){let n=Object.getOwnPropertyDescriptors(i);delete n[c];let o=Reflect.ownKeys(n);for(let e=0;e<o.length;e++){let t=o[e],r=n[t];!1===r.writable&&(r.writable=!0,r.configurable=!0),(r.get||r.set)&&(n[t]={configurable:!0,writable:!0,enumerable:r.enumerable,value:i[t]})}return Object.create(s(i),n)}{let t=s(i);if(null!==t&&e)return{...i};let r=Object.create(t);return Object.assign(r,i)}}function d(t,r=!1){return h(t)||f(t)||!y(t)||(g(t)>1&&(t.set=t.add=t.clear=t.delete=z),Object.freeze(t),r&&Object.entries(t).forEach(([t,r])=>d(r,!0))),t}function z(){a(2)}function h(t){return Object.isFrozen(t)}var e,E={};function A(t){let r=E[t];return r||a(0),r}function W(t,r){E[t]||(E[t]=r)}function T(){return e}function J(t,r){r&&(A("Patches"),t.f=[],t.h=[],t.b=r)}function O(t){j(t),t.a.forEach(V),t.a=null}function j(t){t===e&&(e=t.i)}function K(t){return e=function(t,r){return{a:[],i:t,p:r,P:!0,d:0}}(e,t)}function V(t){let r=t[c];0===r.o||1===r.o?r.x():r.m=!0}function Z(t,r){r.d=r.a.length;let e=r.a[0];return void 0!==t&&t!==e?(e[c].s&&(O(r),a(4)),y(t)&&(t=S(r,t),r.i||M(r,t)),r.f&&A("Patches").T(e[c].t,t,r.f,r.h)):t=S(r,e,[]),O(r),r.f&&r.b(r.f,r.h),t!==u?t:void 0}function S(o,e,i){if(h(e))return e;let s=e[c];if(!s)return m(e,(t,r)=>G(o,s,e,t,r,i)),e;if(s.n!==o)return e;if(!s.s)return M(o,s.t,!0),s.t;if(!s.c){s.c=!0,s.n.d--;let e=s.e,t=e,n=!1;3===s.o&&(t=new Set(e),e.clear(),n=!0),m(t,(t,r)=>G(o,s,e,t,r,i,n)),M(o,e,!1),i&&o.f&&A("Patches").g(s,i,o.f,o.h)}return s.e}function G(r,e,n,o,i,s,t){if(f(i)){let t=S(r,i,s&&e&&3!==e.o&&!v(e.r,o)?s.concat(o):void 0);if(L(n,o,t),!f(t))return;r.P=!1}else t&&n.add(i);if(y(i)&&!h(i)){if(!r.p.y&&r.d<1)return;S(r,i),(!e||!e.n.i)&&"symbol"!=typeof o&&Object.prototype.propertyIsEnumerable.call(n,o)&&M(r,i)}}function M(t,r,e=!1){!t.i&&t.p.y&&t.P&&d(r,e)}var P={get(t,r){if(r===c)return t;let e=l(t);if(!v(e,r))return function(t,r,e){let n=H(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||!y(n)?n:n===q(t.t,r)?(R(t),t.e[r]=k(n,t)):n},has:(t,r)=>r in l(t),ownKeys:t=>Reflect.ownKeys(l(t)),set(e,n,o){let t=H(l(e),n);if(t?.set)return t.set.call(e.u,o),!0;if(!e.s){let t=q(l(e),n),r=t?.[c];if(r&&r.t===o)return e.e[n]=o,e.r[n]=!1,!0;if(function(t,r){return t===r?0!==t||1/t==1/r:t!=t&&r!=r}(o,t)&&(void 0!==o||v(e.t,n)))return!0;R(e),F(e)}return e.e[n]===o&&(void 0!==o||n in e.e)||Number.isNaN(o)&&Number.isNaN(e.e[n])||(e.e[n]=o,e.r[n]=!0),!0},deleteProperty:(t,r)=>(void 0!==q(t.t,r)||r in t.t?(t.r[r]=!1,R(t),F(t)):delete t.r[r],t.e&&delete t.e[r],!0),getOwnPropertyDescriptor(t,r){let e=l(t),n=Reflect.getOwnPropertyDescriptor(e,r);return n&&{writable:!0,configurable:1!==t.o||"length"!==r,enumerable:n.enumerable,value:e[r]}},defineProperty(){a(11)},getPrototypeOf:t=>s(t.t),setPrototypeOf(){a(12)}},N={};function q(t,r){let e=t[c];return(e?l(e):t)[r]}function H(t,r){if(!(r in t))return;let e=s(t);for(;e;){let t=Object.getOwnPropertyDescriptor(e,r);if(t)return t;e=s(e)}}function F(t){t.s||(t.s=!0,t.i&&F(t.i))}function R(t){t.e||(t.e=i(t.t,t.n.p.S))}m(P,(t,r)=>{N[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),N.deleteProperty=function(t,r){return N.set.call(this,t,r,void 0)},N.set=function(t,r,e){return P.set.call(this,t[0],r,e,t[0])};var Y=class{constructor(t){this.y=!0,this.S=!1,this.produce=(o,i,n)=>{if("function"==typeof o&&"function"!=typeof i){let e=i;i=o;let n=this;return function(t=e,...r){return n.produce(t,t=>i.call(this,t,...r))}}let s;if("function"!=typeof i&&a(6),void 0!==n&&"function"!=typeof n&&a(7),y(o)){let t=K(this),r=k(o,void 0),e=!0;try{s=i(r),e=!1}finally{e?O(t):j(t)}return J(t,n),Z(s,t)}if(!o||"object"!=typeof o){if(s=i(o),void 0===s&&(s=o),s===u&&(s=void 0),this.y&&d(s,!0),n){let t=[],r=[];A("Patches").T(o,s,t,r),n(t,r)}return s}a(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,t=>e(t,...r));let n,o;return[this.produce(e,t,(t,r)=>{n=t,o=r}),n,o]},"boolean"==typeof t?.autoFreeze&&this.setAutoFreeze(t.autoFreeze),"boolean"==typeof t?.useStrictShallowCopy&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){y(t)||a(8),f(t)&&(t=X(t));let r=K(this),e=k(t,void 0);return e[c].l=!0,j(r),e}finishDraft(t,r){let e=t&&t[c];(!e||!e.l)&&a(9);let{n}=e;return J(n,r),Z(void 0,n)}setAutoFreeze(t){this.y=t}setUseStrictShallowCopy(t){this.S=t}applyPatches(r,e){let n;for(n=e.length-1;n>=0;n--){let t=e[n];if(0===t.path.length&&"replace"===t.op){r=t.value;break}}n>-1&&(e=e.slice(n+1));let o=A("Patches").A;return f(r)?o(r,e):this.produce(r,t=>o(t,e))}};function k(t,r){let e=x(t)?A("MapSet").I(t,r):b(t)?A("MapSet").D(t,r):function(t,r){let e=Array.isArray(t),n={o:e?1:0,n:r?r.n:T(),s:!1,c:!1,r:{},i:r,t:t,u:null,e:null,x:null,l:!1},o=n,i=P;e&&(o=[n],i=N);let{revoke:s,proxy:u}=Proxy.revocable(o,i);return n.u=u,n.x=s,u}(t,r);return(r?r.n:T()).a.push(e),e}function X(t){return f(t)||a(10),Q(t)}function Q(t){if(!y(t)||h(t))return t;let e,r=t[c];if(r){if(!r.s)return r.t;r.c=!0,e=i(t,r.n.p.S)}else e=i(t,!0);return m(e,(t,r)=>{L(e,t,Q(r))}),r&&(r.c=!1),e}function tt(){let p="replace",l="add",d="remove";function c(r){if(!y(r))return r;if(Array.isArray(r))return r.map(c);if(x(r))return new Map(Array.from(r.entries()).map(([t,r])=>[t,c(r)]));if(b(r))return new Set(Array.from(r).map(c));let e=Object.create(s(r));for(let t in r)e[t]=c(r[t]);return v(r,n)&&(e[n]=r[n]),e}function h(t){return f(t)?c(t):t}W("Patches",{A:function(u,t){return t.forEach(t=>{let{path:n,op:r}=t,o=u;for(let e=0;e<n.length-1;e++){let t=g(o),r=n[e];"string"!=typeof r&&"number"!=typeof r&&(r=""+r),(0===t||1===t)&&("__proto__"===r||"constructor"===r)&&a(19),"function"==typeof o&&"prototype"===r&&a(19),o=w(o,r),"object"!=typeof o&&a(18,n.join("/"))}let e=g(o),i=c(t.value),s=n[n.length-1];switch(r){case p:switch(e){case 2:return o.set(s,i);case 3:a(16);default:return o[s]=i}case l:switch(e){case 1:return"-"===s?o.push(i):o.splice(s,0,i);case 2:return o.set(s,i);case 3:return o.add(i);default:return o[s]=i}case d:switch(e){case 1:return o.splice(s,1);case 2:return o.delete(s);case 3:return o.delete(t.value);default:return delete o[s]}default:a(17)}}),u},g:function(t,r,e,n){switch(t.o){case 0:case 2:return function(t,s,u,c){let{t:a,e:f}=t;m(t.r,(t,r)=>{let e=w(a,t),n=w(f,t),o=r?v(a,t)?p:l:d;if(e===n&&o===p)return;let i=s.concat(t);u.push(o===d?{op:o,path:i}:{op:o,path:i,value:n}),c.push(o===l?{op:d,path:i}:o===d?{op:l,path:i,value:h(e)}:{op:p,path:i,value:h(e)})})}(t,r,e,n);case 1:return function(t,e,n,o){let{t:i,r:s}=t,u=t.e;u.length<i.length&&([i,u]=[u,i],[n,o]=[o,n]);for(let r=0;r<i.length;r++)if(s[r]&&u[r]!==i[r]){let t=e.concat([r]);n.push({op:p,path:t,value:h(u[r])}),o.push({op:p,path:t,value:h(i[r])})}for(let r=i.length;r<u.length;r++){let t=e.concat([r]);n.push({op:l,path:t,value:h(u[r])})}for(let r=u.length-1;i.length<=r;--r){let t=e.concat([r]);o.push({op:d,path:t})}}(t,r,e,n);case 3:return function(t,e,n,o){let{t:i,e:s}=t,u=0;i.forEach(r=>{if(!s.has(r)){let t=e.concat([u]);n.push({op:d,path:t,value:r}),o.unshift({op:l,path:t,value:r})}u++}),u=0,s.forEach(r=>{if(!i.has(r)){let t=e.concat([u]);n.push({op:l,path:t,value:r}),o.unshift({op:d,path:t,value:r})}u++})}(t,r,e,n)}},T:function(t,r,e,n){e.push({op:p,path:[],value:r===u?void 0:r}),n.push({op:p,path:[],value:t})}})}function rt(){class e extends Map{constructor(t,r){super(),this[c]={o:2,i:r,n:r?r.n:T(),s:!1,c:!1,e:void 0,r:void 0,t:t,u:this,l:!1,m:!1}}get size(){return l(this[c]).size}has(t){return l(this[c]).has(t)}set(t,r){let e=this[c];return s(e),(!l(e).has(t)||l(e).get(t)!==r)&&(o(e),F(e),e.r.set(t,!0),e.e.set(t,r),e.r.set(t,!0)),this}delete(t){if(!this.has(t))return!1;let r=this[c];return s(r),o(r),F(r),r.t.has(t)?r.r.set(t,!1):r.r.delete(t),r.e.delete(t),!0}clear(){let r=this[c];s(r),l(r).size&&(o(r),F(r),r.r=new Map,m(r.t,t=>{r.r.set(t,!1)}),r.e.clear())}forEach(n,o){l(this[c]).forEach((t,r,e)=>{n.call(o,this.get(r),r,this)})}get(t){let r=this[c];s(r);let e=l(r).get(t);if(r.c||!y(e)||e!==r.t.get(t))return e;let n=k(e,r);return o(r),r.e.set(t,n),n}keys(){return l(this[c]).keys()}values(){let r=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{let t=r.next();return t.done?t:{done:!1,value:this.get(t.value)}}}}entries(){let e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{let t=e.next();if(t.done)return t;let r=this.get(t.value);return{done:!1,value:[t.value,r]}}}}[Symbol.iterator](){return this.entries()}}function o(t){t.e||(t.r=new Map,t.e=new Map(t.t))}class n extends Set{constructor(t,r){super(),this[c]={o:3,i:r,n:r?r.n:T(),s:!1,c:!1,e:void 0,t:t,u:this,a:new Map,m:!1,l:!1}}get size(){return l(this[c]).size}has(t){let r=this[c];return s(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[c];return s(r),this.has(t)||(i(r),F(r),r.e.add(t)),this}delete(t){if(!this.has(t))return!1;let r=this[c];return s(r),i(r),F(r),r.e.delete(t)||!!r.a.has(t)&&r.e.delete(r.a.get(t))}clear(){let t=this[c];s(t),l(t).size&&(i(t),F(t),t.e.clear())}values(){let t=this[c];return s(t),i(t),t.e.values()}entries(){let t=this[c];return s(t),i(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 i(e){e.e||(e.e=new Set,e.t.forEach(r=>{if(y(r)){let t=k(r,e);e.a.set(r,t),e.e.add(t)}else e.e.add(r)}))}function s(t){t.m&&a(3,JSON.stringify(l(t)))}W("MapSet",{I:function(t,r){return new e(t,r)},D:function(t,r){return new n(t,r)}})}var U=new Y,et=U.produce,nt=U.produceWithPatches.bind(U),ot=U.setAutoFreeze.bind(U),it=U.setUseStrictShallowCopy.bind(U),st=U.applyPatches.bind(U),ut=U.createDraft.bind(U),ct=U.finishDraft.bind(U);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),s=e(1088),u=e(4342),c=e(1227),a=e(1750),o=n(function t(r,e,n){if(0===r.length)return e;var o=r[0];if(r.length>1){var i=!a(n)&&s(o,n)?n[o]:u(r[1])?[]:{};e=t(Array.prototype.slice.call(r,1),e,i)}return c(o,e,n)});t.exports=o},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 s=e(811),n=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return t.prototype.add=function(t){return!o(t,!0,this)},t.prototype.has=function(t){return o(t,!1,this)},t}();function o(t,r,e){var n,o=typeof t;switch(o){case"string":case"number":return 0===t&&1/t==-1/0?!!e._items["-0"]||(r&&(e._items["-0"]=!0),!1):null!==e._nativeSet?r?(n=e._nativeSet.size,e._nativeSet.add(t),e._nativeSet.size===n):e._nativeSet.has(t):o in e._items?t in e._items[o]||(r&&(e._items[o][t]=!0),!1):(r&&(e._items[o]={},e._items[o][t]=!0),!1);case"boolean":if(o in e._items){var i=t?1:0;return!!e._items[o][i]||(r&&(e._items[o][i]=!0),!1)}return r&&(e._items[o]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==e._nativeSet?r?(n=e._nativeSet.size,e._nativeSet.add(t),e._nativeSet.size===n):e._nativeSet.has(t):o in e._items?!!s(t,e._items[o])||(r&&e._items[o].push(t),!1):(r&&(e._items[o]=[t]),!1);case"undefined":return!!e._items[o]||(r&&(e._items[o]=!0),!1);case"object":if(null===t)return!!e._items.null||(r&&(e._items.null=!0),!1);default:return(o=Object.prototype.toString.call(t))in e._items?!!s(t,e._items[o])||(r&&e._items[o].push(t),!1):(r&&(e._items[o]=[t]),!1)}}t.exports=n},626:(t,r,e)=>{"use strict";const n=e(167);t.exports=e=>(t,r)=>`invalid property name "${n(e,r)}" (is not a valid ${e.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=e(918)("Any",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),s=e(3719),u=e(2453),c=e(489),a=e(163),f=e(1819),p=o("swapFields",{fieldName1:[String,Symbol],fieldName2:[String,Symbol],obj:Object}),i=n((t,r,e)=>{const n=u(f(p,{fieldName1:t,fieldName2:r,obj:e}));n.ok||c(n.errMsgs.join("\n"));const o=a(`Property '${t}' not found`,s(t,e)),i=a(`Property '${r}' not found`,s(r,e));return Object.assign(e,{[t]:i,[r]:o})});t.exports=i},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=e=>n((t,r)=>e(t,r)?-1:e(r,t)?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 o=e(4580),i=e(7725),s=e(105),u=e(2050),c=(t,e=[],r=null)=>{const n=u.concat(e);switch(o(t)){case"Array":return t.map(t=>c(t,e));case"Object":return s((t,r)=>c(t,e,r),t);case"String":return i(n.find(t=>t.test(r)))?t:t.length<=10?"[REDACTED]":`[REDACTED ...${t.slice(-4)}]`;default:return t}};t.exports=c},1021:(r,t)=>{const o=Object.prototype,u=Object.getPrototypeOf,I=Object.setPrototypeOf,d=(t,r)=>o.hasOwnProperty.call(t,r),c=(t,r)=>r instanceof t,f=t=>"function"==typeof t,s=t=>t&&"object"==typeof t,D=t=>"string"==typeof t,p=t=>s(t)&&u(t)===o,$=t=>t&&f(t[Symbol.iterator]),l=(t,r)=>new Proxy(t,r),a=(e,n={})=>{for(let r in n)if(p(n[r])){const t={};a(t,e[r]),a(t,n[r]),e[r]=t}else e[r]=n[r];return e},B=(t,r,e,n=!1)=>{Object.defineProperty(t,r,{value:e,enumerable:n,writable:!0,configurable:!0})},h=(t,r,e)=>{t.prototype=Object.assign(Object.create(r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e),I(t,r)},y=Symbol(),L=Symbol(),m=Symbol(),z=Symbol(),i=(t,r,e,n,o,i)=>{const s=function(t=s.default,r){return i&&!c(s,this)?new s(t):(n&&(t=n(t,s,this)),r===L||J(s,t)?o&&r!==z?l(t,o(s)):t:void 0)};return e&&h(s,e),I(s,r.prototype),s.constructor=r,s.definition=t,s.assertions=[...s.assertions],B(s,"errors",[]),delete s.name,s},e=(t,r,e)=>c(r,t)?t:s(t)||f(t)||void 0===t?(a(e,r.default),r.parentClass&&a(t,new r.parentClass(t)),a(e,t),e):t,g=(t,r,e)=>(h(t,r,e),t.assertions.push(...r.assertions),t),v=(t,r,e,n,o)=>{t.push({expected:r,received:e,path:n,message:o})},w=(e,t=e.errorCollector)=>{const r=e.errors.length;if(r>0){const r=e.errors.map(t=>{var r;return t.message||(t.message="expecting "+(t.path?t.path+" to be ":"")+n(t.expected)+", got "+(null!=t.received?(r=t.received,o.toString.call(r).match(/\s([a-zA-Z]+)/)[1]+" "):"")+T(t.received)),t.model=e,t});e.errors.length=0,t.call(e,r)}return r},W=t=>t&&u(t)&&c(j,u(t).constructor),x=r=>{if(p(r)){r={};for(let t in r)r[t]=x(r[t])}return Array.isArray(r)?1===r.length?[r[0],void 0,null]:r:[r]},n=(t,r)=>{const e=x(t).map(t=>T(t,r));return e.length>1?e.join(" or "):e[0]},b=(t,r=[])=>(r.length>0&&(t=[].concat(t,...[].concat(r)).filter((t,r,e)=>e.indexOf(t)===r)),t),J=(t,r)=>(t[y](r,null,t.errors,[],!0),!w(t)),E=(r,e,n,o,i,s)=>{const u=i.indexOf(e);if(-1!==u&&-1!==i.indexOf(e,u+1))return r;if(Array.isArray(e)&&1===e.length&&null!=r&&(e=e[0]),c(j,e))s&&(r=O(r,e)),e[y](r,n,o,i.concat(e),s);else if(p(e))for(let t in e){const u=r?r[t]:void 0;E(u,e[t],V(n,t),o,i,s)}else{if(x(e).some(t=>K(r,t,n,i,s)))return s?O(r,e):r;v(o,e,r,n)}return r},K=(r,e,n,o,i)=>{if(e===P)return!0;if(null==r)return r===e;if(p(e)||c(j,e)){const t=[];return E(r,e,n,t,o,i),!t.length}return c(RegExp,e)?e.test(r):e===Number||e===Date?r.constructor===e&&!isNaN(r):r===e||f(e)&&c(e,r)||r.constructor===e},A=(n,o,i,s=o.errors)=>{for(let e of o.assertions){let r;try{r=e.call(o,n)}catch(n){r=n}if(!0!==r){const t=f(e.description)?e.description:(t,r)=>`assertion "${e.description}" returned ${T(t)} for ${i?i+" =":"value"} ${T(r)}`;v(s,e,n,i,t.call(o,r,n,i))}}},T=(e,n=[])=>{if(n.length>15||n.includes(e))return"...";if(null==e)return String(e);if(D(e))return`"${e}"`;if(c(j,e))return e.toString(n);if(n.unshift(e),f(e))return e.name||e.toString();if(c(Map,e)||c(Set,e))return T([...e]);if(Array.isArray(e))return`[${e.map(t=>T(t,n)).join(", ")}]`;if(e.toString&&e.toString!==o.toString)return e.toString();if(s(e)){const o=Object.keys(e),r="\t".repeat(n.length);return`{${o.map(t=>`\n${r+t}: ${T(e[t],[...n])}`).join(", ")} ${o.length?`\n${r.slice(1)}`:""}}`}return String(e)},V=(t,r)=>t?t+"."+r:r,Z=(t,r,e,n,o,i,s)=>{const u=V(e,o),c=t.conventionForPrivate(o),a=t.conventionForConstant(o),f=d(n,o),p=f&&Object.getOwnPropertyDescriptor(n,o);o in r&&(c&&!i||a&&void 0!==n[o])&&G(`modify ${c?"private":"constant"} property ${o}`,t),s(),d(r,o)&&E(n[o],r[o],u,t.errors,[]),A(n,t,u);const l=t.errors.length;return l&&(f?Object.defineProperty(n,o,p):delete n[o],w(t)),!l},G=(t,r)=>{r.errors.push({message:"cannot "+t})},O=(r,t=[])=>{if(!r||p(t)||c(S,t)||W(r))return r;const e=x(t),n=[];for(let t of e)c(j,t)&&!c(S,t)&&t.test(r)&&n.push(t);return 1===n.length?new n[0](r,L):(n.length>1&&console.warn(`Ambiguous model for value ${T(r)}, could be ${n.join(" or ")}`),r)},H=(s,u,c,a)=>({get(t,r){if(r===m)return t;if(!D(r))return Reflect.get(t,r);const e=V(c,r),n=d(u,r),o=u[r];if(!a&&n&&s.conventionForPrivate(r))return G(`access to private property ${e}`,s),void w(s);let i=t[r];return n&&i&&d(t,r)&&!p(o)&&!W(i)&&Reflect.set(t,r,i=O(i,o)),f(i)&&"constructor"!==r&&!a?l(i,{apply(t,r,e){a=!0;const n=Reflect.apply(t,r,e);return a=!1,n}}):(p(o)&&!i&&(t[r]=i={}),((t,r,e,n,o)=>p(e)?l(t,H(r,e,n,o)):O(t,e))(i,s,o,e,a))},set:(t,r,e)=>Z(s,u,c,t,r,a,()=>Reflect.set(t,r,O(e,u[r]))),deleteProperty:(t,r)=>Z(s,u,c,t,r,a,()=>Reflect.deleteProperty(t,r)),defineProperty:(t,r,e)=>Z(s,u,c,t,r,a,()=>Reflect.defineProperty(t,r,e)),has:(t,r)=>Reflect.has(t,r)&&Reflect.has(u,r)&&!s.conventionForPrivate(r),ownKeys:t=>Reflect.ownKeys(t).filter(t=>Reflect.has(u,t)&&!s.conventionForPrivate(t)),getOwnPropertyDescriptor(t,r){let e;return s.conventionForPrivate(r)||(e=Object.getOwnPropertyDescriptor(u,r),void 0!==e&&(e.value=t[r])),e}});function j(t){return p(t)?new M(t):new S(t)}function S(t){return i(t,S)}function M(r){return i(r,M,Object,e,t=>H(t,r),!0)}Object.assign(j.prototype,{name:"Model",assertions:[],conventionForConstant:t=>t.toUpperCase()===t,conventionForPrivate:t=>"_"===t[0],toString(t){return d(this,"name")?this.name:n(this.definition,t)+((r=this.assertions).length?`(${r.map(t=>t.name||t.description||t)})`:"");var r},as(t){return B(this,"name",t),this},defaultTo(t){return this.default=this(t),this},[y](t,r,e,n,o){E(t,this.definition,r,e,n,o),A(t,this,r,e)},test(t,r){let e=this;for(;!d(e,"errorCollector");)e=u(e);const n=e.errorCollector;let o;return e.errorCollector=t=>{o=!0,r&&r.call(this,t)},new this(t),e.errorCollector=n,!o},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=T(t)){return B(t,"description",r),this.assertions=this.assertions.concat(t),this}}),j.CHECK_ONCE=z,h(S,j,{extend(...r){const e=g(new S(b(this.definition,r)),this);for(let t of r)c(S,t)&&e.assertions.push(...t.assertions);return e}}),h(M,j,{defaultTo(r){const e=this.definition;for(let t in r)d(e,t)&&(r[t]=E(r[t],e[t],t,this.errors,[],!0));return w(this),this.default=r,this},toString(t){return T(this.definition,t)},extend(...r){const e={...this.definition},n={...this.prototype},o={...this.default},i=[];for(let t of r)c(j,t)&&(a(e,t.definition),a(o,t.default),i.push(...t.assertions)),f(t)&&a(n,t.prototype),s(t)&&a(e,t);const t=g(new M(e),this,n).defaultTo(o);return t.assertions=[...this.assertions,...i],u(this)!==M.prototype&&(t.parentClass=this),t},[y](t,r,e,n,o){s(t)?E(t[m]||t,this.definition,r,e,n,o):v(e,this,t,r),A(t,this,r,e)}});const P=l(S(),{apply(t,r,[e]){const n=Object.create(P);return n.definition=e,n}});P.definition=P,P.toString=()=>"Any",P.remaining=function(t){this.definition=t},h(P.remaining,P,{toString(){return"..."+n(this.definition)}}),P[Symbol.iterator]=function*(){yield new P.remaining(this.definition)};const Y=(u,t,r,e,c,a,n)=>i(r,t,u,e,s=>Object.assign({getPrototypeOf:()=>s.prototype,get(o,i){if(i===m)return o;const t=o[i];return f(t)?l(t,{apply(t,e,n){if(d(a,i)){const[d,e=n.length-1,r]=a[i];for(let t=d;t<=e;t++){const c=r?r(t):s.definition;n[t]=E(n[t],c,`${u.name}.${i} arguments[${t}]`,s.errors,[],!0)}if(s.assertions.length>0){const u=c(o);t.apply(u,n),A(u,s,`after ${i} mutation`)}w(s)}return t.apply(o,n)}}):t}},n));function N(t){const n=Y(Array,N,t,t=>Array.isArray(t)?t.map(t=>O(t,n.definition)):t,t=>[...t],{copyWithin:[],fill:[0,0],pop:[],push:[0],reverse:[],shift:[],sort:[],splice:[2],unshift:[0]},{set:(t,e,r)=>X(n,t,e,r,(t,r)=>t[e]=r,!0),deleteProperty:(t,r)=>X(n,t,r,void 0,t=>delete t[r])});return n}h(N,j,{toString(t){return"Array of "+n(this.definition,t)},[y](t,e,n,o,i){Array.isArray(t)?(t[m]||t).forEach((t,r)=>E(t,this.definition,`${e||"Array"}[${r}]`,n,o,i)):v(n,this,t,e),A(t,this,e,n)},extend(...t){return g(new N(b(this.definition,t)),this)}});const X=(t,r,e,n,o,i)=>{const s=`Array[${e}]`;+e>=0&&(i||e in r)&&(n=E(n,t.definition,s,t.errors,[],!0));const u=[...r];o(u),A(u,t,s);const c=!w(t);return c&&o(r,n),c};function q(t){const r=Y(Set,q,t,t=>$(t)?new Set([...t].map(t=>O(t,r.definition))):t,t=>new Set(t),{add:[0,0],delete:[],clear:[]});return r}function F(t,r){const e=t=>0===t?n.definition.key:n.definition.value,n=Y(Map,F,{key:t,value:r},t=>$(t)?new Map([...t].map(t=>t.map((t,r)=>O(t,e(r))))):t,t=>new Map(t),{set:[0,1,e],delete:[],clear:[]});return n}function R(...t){return i({arguments:t},R,Function,null,u=>({getPrototypeOf:()=>u.prototype,get:(t,r)=>r===m?t:t[r],apply(t,r,e){const n=u.definition,o=n.arguments.find(t=>c(P.remaining,t)),i=o?Math.max(e.length,n.arguments.length-1):n.arguments.length;for(let t=0;t<i;t++){const r=o&&t>=n.arguments.length-1?o.definition:n.arguments[t];e[t]=E(e[t],r,`arguments[${t}]`,u.errors,[],!0)}let s;return A(e,u,"arguments"),u.errors.length||(s=Reflect.apply(t,r,e),"return"in n&&(s=E(s,n.return,"return value",u.errors,[],!0))),w(u),s}}))}h(q,j,{toString(t){return"Set of "+n(this.definition,t)},[y](r,e,n,o,i){if(c(Set,r))for(let t of r.values())E(t,this.definition,`${e||"Set"} value`,n,o,i);else v(n,this,r,e);A(r,this,e,n)},extend(...t){return g(new q(b(this.definition,t)),this)}}),h(F,j,{toString(t){return`Map of ${n(this.definition.key,t)} : ${n(this.definition.value,t)}`},[y](e,n,o,i,s){if(c(Map,e)){n=n||"Map";for(let[t,r]of e)E(t,this.definition.key,`${n} key`,o,i,s),E(r,this.definition.value,`${n}[${T(t)}]`,o,i,s)}else v(o,this,e,n);A(e,this,n,o)},extend(t,r){return g(new F(b(this.definition.key,t),b(this.definition.value,r)),this)}}),h(R,j,{toString(r=[]){let t=`Function(${this.definition.arguments.map(t=>n(t,[...r])).join(", ")})`;return"return"in this.definition&&(t+=" => "+n(this.definition.return,r)),t},return(t){return this.definition.return=t,this},[y](t,r,e){f(t)||v(e,"Function",t,r)}});const Q="list-style-type: none; padding: 0; margin: 0;",k="padding: 0 0 0 1em;",U="color: #3e999f;",tt="color: #8959a8",rt="color: #C19ED8",et="color: #8959a8; font-weight: bold",nt="color: #C19ED8; font-weight: bold",ot="color: #B871BD; font-style: italic",it=t=>{if(null==t)return null;const r=u(t);return r&&r.constructor&&c(j,r.constructor)?r.constructor:null},_=(t,...r)=>["span",{style:t},...r],C=(t,r={})=>null==t?_("color: #8e908c",""+t):"boolean"==typeof t?_("color: #AA0D91",t):"number"==typeof t?_("color: #1C00CF",t):"string"==typeof t?_("color: #C41A16",`"${t}"`):Array.isArray(t)&&r.isModelDefinition?_("",...t.flatMap(t=>[C(t,r)," or "]).slice(0,-1)):p(t)?st(t,it(t),r):f(t)&&!c(j,t)&&r.isModelDefinition?_("color: #4271AE",t.name||t.toString()):["object",{object:t,config:r}],st=(r,t,e)=>_("","{",["ol",{style:Q},...Object.keys(r).map(t=>["li",{style:k},_(tt,t),": ",C(r[t],e)])],"}"),ut={header:(t,r={})=>t===P?_(U,"Any"):c(P.remaining,t)?_(U,"...",C(t.definition,{isModelDefinition:!0})):c(M,t)?_(U,t.name):c(j,t)?(t=>{const r={isModelDefinition:!0},e=t.definition,n=(t,r)=>t.flatMap(t=>[r(t),", "]).slice(0,-1);let o=[];return c(S,t)&&(o=[C(e,r)]),c(N,t)&&(o=["Array of ",C(e,r)]),c(q,t)&&(o=["Set of ",C(e,r)]),c(F,t)&&(o=["Map of ",C(e.key,r)," : ",C(e.value,r)]),c(R,t)&&(o=["Function(",...n(e.arguments,t=>C(t,r)),")"],"return"in e&&o.push(" => ",C(e.return,r))),t.assertions.length>0&&o.push("\n(assertions: ",...n(t.assertions,t=>["object",{object:t}]),")"),_(U,...o)})(t):r.isModelDefinition&&p(t)?C(t,r):null,hasBody:t=>c(M,t),body:i=>_("","{",["ol",{style:Q},...Object.keys(i.definition).map(t=>{const r=i.conventionForPrivate(t),e=i.conventionForConstant(t),n=i.default&&d(i.default,t);let o=tt;return r?o=e?nt:rt:e&&(o=et),["li",{style:k},_(o,t),": ",C(i.definition[t],{isModelDefinition:!0}),n?_(ot," = ",C(i.default[t])):""]})],"}")},ct={header(t,r={}){if(r.isInstanceProperty&&p(t))return C(t,r);const e=it(t);if(c(j,e)){const r=c(M,e)?[e.name]:[["object",{object:t[m]}],` (${e.name})`];return _("color: #718c00; font-style: italic",...r)}return null},hasBody:t=>t&&c(M,it(t)),body(t){const i=it(t),s=t[m]||t;return _("","{",["ol",{style:Q},...Object.keys(s).map(t=>{const r=i.conventionForPrivate(t),e=i.conventionForConstant(t),n=t in i.definition;let o=tt;return n?r?o=e?nt:rt:e&&(o=et):o="color: #C0C0C0;",["li",{style:k},_(o,t),": ",C(s[t],{isInstanceProperty:!0})]}),["li",{style:k},_(ot,"__proto__",": ",["object",{object:u(t)}])]],"}")}};"undefined"!=typeof window&&(window.devtoolsFormatters=(window.devtoolsFormatters||[]).concat(ut,ct)),t.Any=P,t.ArrayModel=N,t.BasicModel=S,t.FunctionModel=R,t.MapModel=F,t.Model=j,t.ObjectModel=M,t.SetModel=q},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(e){return function t(r){return 0===arguments.length||n(r)?t:e.apply(this,arguments)}}},1227:(t,r,e)=>{var s=e(2649),u=e(4342);t.exports=function(t,r,e){if(u(t)&&s(e)){var n=[].concat(e);return n[t]=r,n}var o={};for(var i in e)o[i]=e[i];return o[t]=r,o}},1255:(t,r,e)=>{var n=function(r){return{value:r,map:function(t){return n(t(r))}}},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),d=e(649),o=e(9222),h=e(8486),y=e(3558),m=e(2583).type("Maybe"),g=e(2583).typeFn(m(),4),v=e(4496),w=e(4118),x=e(6350),b=e(7372),E=e(1882),A=e(9931),T=e(7020),O=e(1770),j=function(t){return function(){return t}},S=function(t){return t},M=n({Nothing:[],Just:["a"]}),i=M.Nothing,P=M.Just;R.Nothing=x(R,i),R.Just=x(R,P);var N=x(R,P),q=x(R,i);function F(t){if(!E(t)&&!A(t))throw new TypeError("Maybe.sequence: Must wrap an Apply");return t.map(N)}function R(t){var r;if(!arguments.length)throw new TypeError("Maybe: Must wrap something, try using Nothing or Just constructors");var e=M.includes(t)?t:P(t),n=N,o=q,i=function(t){return c(j(t),S)},s=function(t){return O(R,t)&&c(j(t.either(j(!0),j(!1))),function(r){return t.either(j(!1),function(t){return d(t,r)})})},u=function(){return c(j("Nothing"),function(t){return"Just"+y(t)})};function c(t,r){if(!T(t)||!T(r))throw new TypeError("Maybe.either: Requires both left and right functions");return M.caseOf({Nothing:t,Just:r},e)}function a(r){return function(t){if(!O(R,t))throw new TypeError("Maybe."+r+": Maybe of Semigroup required");return c(R.Nothing,h("Maybe."+r,t))}}function f(r){return function(t){if(!T(t))throw new TypeError("Maybe."+r+": Function required");return c(R.Nothing,x(R.Just,t))}}function p(r){return function(t){if(!O(R,t))throw new TypeError("Maybe."+r+": Maybe required");return c(j(t),R.Just)}}function l(e){return function(t){if(!T(t))throw new TypeError("Maybe."+e+": Function required");var r=c(R.Nothing,t);if(!O(R,r))throw new TypeError("Maybe."+e+": Function must return a Maybe");return r}}return(r={inspect:u,toString:u,either:c,option:i,type:m,equals:s,bichain:function(t,r){var e="Maybe.bichain: Both arguments must be Maybe returning functions";if(!T(t)||!T(r))throw new TypeError(e);var n=c(t,r);if(!O(R,n))throw new TypeError(e);return n},coalesce:function(t,r){if(!T(t)||!T(r))throw new TypeError("Maybe.coalesce: Requires both left and right functions");return R.Just(c(t,r))},zero:o,ap:function(t){var r=i(j(void 0));if(!T(r))throw new TypeError("Maybe.ap: Wrapped value must be a function");if(!O(R,t))throw new TypeError("Maybe.ap: Maybe required");return c(R.Nothing,t.map)},of:n,sequence:function(t){if(!b(t)&&!T(t))throw new TypeError("Maybe.sequence: Applicative TypeRep or Apply returning function required");var r=w(t);return c(x(r,R.Nothing),F)},traverse:function(t,r){if(!b(t)&&!T(t))throw new TypeError("Maybe.traverse: Applicative TypeRep or Apply returning function required for first argument");if(!T(r))throw new TypeError("Maybe.traverse: Apply returning function required for second argument");var e=w(t),n=c(x(e,R.Nothing),r);if(!E(n)&&!A(n))throw new TypeError("Maybe.traverse: Both functions must return an Apply of the same type");return c(j(n),j(n.map(N)))},alt:p("alt"),chain:l("chain"),concat:a("concat"),map:f("map")})[v.zero]=o,r[v.of]=n,r[v.equals]=s,r[v.alt]=p(v.alt),r[v.concat]=a(v.concat),r[v.map]=f(v.map),r[v.chain]=l(v.chain),r["@@type"]=g,r.constructor=R,r}R.of=N,R.zero=q,R.type=m,R[v.of]=N,R[v.zero]=q,R["@@type"]=g,R["@@implements"]=o(["alt","ap","chain","concat","equals","map","of","traverse","zero"]),t.exports=R},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),a=e(3189);t.exports=function o(i,s,u,c){var t=function(t){for(var r=s.length,e=0;e<r;){if(i===s[e])return u[e];e+=1}for(var n in s[e]=i,u[e]=t,i)i.hasOwnProperty(n)&&(t[n]=c?o(i[n],s,u,!0):i[n]);return t};switch(a(i)){case"Object":return t(Object.create(Object.getPrototypeOf(i)));case"Array":return t([]);case"Date":return new Date(i.valueOf());case"RegExp":return n(i);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return i.slice();default:return i}}},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 i=e(1382),n=e(1204),s=e(3378),o=n(function(o){return s(o.length,function(){var r=0,e=arguments[0],n=arguments[arguments.length-1],t=Array.prototype.slice.call(arguments,0);return t[0]=function(){var t=e.apply(this,i(arguments,[r,n]));return r+=1,t},o.apply(this,t)})});t.exports=o},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((r,t)=>void 0===i(t=>!r(t[0],t[1]),n(2,t)));t.exports=s},1657:(t,r,e)=>{"use strict";const n=e(170);t.exports=n},1681:(t,r,e)=>{var n=e(5789),i=e(4342),s=e(7343),o=n(function(t,o){return t.map(function(t){for(var r,e=o,n=0;n<t.length;){if(null==e)return;r=t[n],e=i(r)?s(r,e):e[r],n+=1}return e})});t.exports=o},1692:(t,r,e)=>{var n=e(7860),l=e(649),o=e(9222),d=e(8486),h=e(3558),y=e(2583).type("Result"),m=e(2583).typeFn(y(),4),g=e(4496),v=e(4118),w=e(6350),x=e(7372),b=e(1882),E=e(9931),A=e(7020),T=e(1770),i=e(383),O=function(t){return function(){return t}},j=n({Err:["a"],Ok:["b"]});q.Err=w(q,j.Err),q.Ok=w(q,j.Ok);var S=q.Ok,M=function(t){return function(r){return q.Err(t.either(function(t){return i(r)&&T(t,r)?r.concat(t):r},function(){return r}))}},P=function(r){return function(t){return q.Err(i(r)&&T(t,r)?t.concat(r):r)}};function N(t){if(!b(t)&&!E(t))throw new TypeError("Result.sequence: Must wrap an Apply");return t.map(S)}function q(t){var r;if(!arguments.length)throw new TypeError("Result: Must wrap something, try using Err or Ok constructors");var e=j.includes(t)?t:j.Ok(t),n=function(t){return T(q,t)&&s(function(r){return t.either(function(t){return l(t,r)},O(!1))},function(r){return t.either(O(!1),function(t){return l(t,r)})})},o=S,i=function(){return s(function(t){return"Err"+h(t)},function(t){return"Ok"+h(t)})};function s(t,r){if(!A(t)||!A(r))throw new TypeError("Result.either: Requires both invalid and valid functions");return j.caseOf({Err:t,Ok:r},e)}function u(r){return function(t){if(!T(q,t))throw new TypeError("Result."+r+": Result of Semigroup required");return s(q.Err,d("Result."+r,t))}}function c(r){return function(t){if(!A(t))throw new TypeError("Result."+r+": Function required");return s(q.Err,w(q.Ok,t))}}function a(e){return function(t,r){if(!A(t)||!A(r))throw new TypeError("Result."+e+": Requires both left and right functions");return s(w(q.Err,t),w(q.Ok,r))}}function f(r){return function(t){if(!T(q,t))throw new TypeError("Result."+r+": Result required");return t.either(function(t){return s(P(t),q.Ok)},function(t){return s(function(){return q.Ok(t)},q.Ok)})}}function p(e){return function(t){if(!A(t))throw new TypeError("Result."+e+": Result returning function required");var r=s(q.Err,t);if(!T(q,r))throw new TypeError("Result."+e+": Function must return a Result");return r}}return(r={inspect:i,toString:i,equals:n,type:y,either:s,swap:function(t,r){if(!A(t)||!A(r))throw new TypeError("Result.swap: Requires both left and right functions");return s(w(q.Ok,t),w(q.Err,r))},coalesce:function(t,r){if(!A(t)||!A(r))throw new TypeError("Result.coalesce: Requires both left and right functions");return q.Ok(s(t,r))},bichain:function(t,r){var e="Result.bichain: Both arguments must be Result returning functions";if(!A(t)||!A(r))throw new TypeError(e);var n=s(t,r);if(!T(q,n))throw new TypeError(e);return n},ap:function(r){if(!T(q,r))throw new TypeError("Result.ap: Result required");return s(M(r),function(t){if(!A(t))throw new TypeError("Result.ap: Wrapped value must be a function");return r.either(q.Err,function(){return r.map(t)})})},of:o,sequence:function(t){if(!x(t)&&!A(t))throw new TypeError("Result.sequence: Applicative TypeRep or Apply returning function required");var r=v(t);return s(w(r,q.Err),N)},traverse:function(t,r){if(!x(t)&&!A(t))throw new TypeError("Result.traverse: Applicative TypeRep of Apply returning function required for first argument");if(!A(r))throw new TypeError("Result.traverse: Apply returning functions required for both arguments");var e=v(t),n=s(w(e,q.Err),r);if(!b(n)&&!E(n))throw new TypeError("Result.traverse: Both functions must return an Apply of the same type");return s(O(n),O(n.map(S)))},alt:f("alt"),bimap:a("bimap"),concat:u("concat"),map:c("map"),chain:p("chain")})[g.of]=o,r[g.equals]=n,r[g.alt]=f(g.alt),r[g.bimap]=a(g.bimap),r[g.concat]=u(g.concat),r[g.map]=c(g.map),r[g.chain]=p(g.chain),r["@@type"]=m,r.constructor=q,r}q.of=S,q.type=y,q[g.of]=S,q["@@type"]=m,q["@@implements"]=o(["alt","ap","bimap","chain","concat","equals","map","of","traverse"]),t.exports=q},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)((r,t)=>{let e=[];return r.test(t,t=>t.forEach(t=>e.push(Object.assign({toString:()=>`${r.name}: ${t.message}`},t))))?o(t):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),u=e(3558),c=e(2583).type("Async"),f=e(2583).typeFn(c(),5),p=e(4496),o=e(8791),d=e(6350),h=e(7441),y=e(6237),i=e(9931),s=e(827),m=e(7020),a=e(5916),l=e(2419),g=e(1770),v=function(e){return w(function(t,r){return r(e)})};function w(a){var t;if(!m(a))throw new TypeError("Async: Function required");var r=v,e=function(){return"Async"+u(a)};function l(t,r,e){if(!m(t)||!m(r))throw new TypeError("Async.fork: Reject and resolve functions required");var n=!1,o=!1,i=m(e)?e:y,s=function(t,r){if(!o)return o=!0,n?y():t(r)},u=a(s.bind(null,t),s.bind(null,r)),c=m(u)?u:y;return h(function(){return i((c(),void(n=!0)))})}function n(t){return function(e){if(!m(e))throw new TypeError("Async."+t+": Function required");return w(function(t,r){return l(t,d(r,e))})}}function o(t){return function(e,n){if(!m(e)||!m(n))throw new TypeError("Async."+t+": Functions required for both arguments");return w(function(t,r){return l(d(t,e),d(r,n))})}}function i(t){return function(o){if(!g(w,o))throw new TypeError("Async."+t+": Async required");return w(function(t,r){var e=y,n=y;return e=l(function(){n=o.fork(t,r)},r),h(function(){return n(e())})})}}function s(s){return function(i){if(!m(i))throw new TypeError("Async."+s+": Async returning function required");return w(function(e,n){var t=y,o=y;return t=l(e,function(t){var r=i(t);if(!g(w,r))throw new TypeError("Async."+s+": Function must return another Async");o=r.fork(e,n)}),h(function(){return o(t())})})}}return(t={fork:l,toPromise:function(){return new Promise(function(t,r){l(r,t)})},inspect:e,toString:e,type:c,swap:function(e,n){if(!m(e)||!m(n))throw new TypeError("Async.swap: Functions required for both arguments");return w(function(t,r){return l(d(r,e),d(t,n))})},race:function(u){if(!g(w,u))throw new TypeError("Async.race: Async required");return w(function(e,n){var t=h(function(t,r){return t?n(r):e(r)}),r=t.bind(null,!0),o=t.bind(null,!1),i=l(o,r),s=u.fork(o,r);return function(){i(),s()}})},coalesce:function(e,n){if(!m(e)||!m(n))throw new TypeError("Async.coalesce: Functions required for both arguments");return w(function(t,r){return l(d(r,e),d(r,n))})},ap:function(p){if(!g(w,p))throw new TypeError("Async.ap: Async required");return w(function(t,r){var e=null,n=null,o=!1,i=!1,s=!1,u=h(t);function c(){!s&&o&&i&&d(r,e)(n)}var a=l(u,function(t){if(!m(t))throw new TypeError("Async.ap: Wrapped value must be a function");o=!0,e=t,c()}),f=p.fork(u,function(t){i=!0,n=t,c()});return function(){a(),f(),s=!0}})},of:r,alt:i("alt"),bimap:o("bimap"),map:n("map"),chain:s("chain"),bichain:function(e,s){var u="Async.bichain: Both arguments must be Async returning functions";if(!m(e)||!m(s))throw new TypeError(u);return w(function(n,o){var t=y,i=y;function r(e){return function(t){var r=e(t);if(!g(w,r))throw new TypeError(u);i=r.fork(n,o)}}return t=l(r(e),r(s)),h(function(){return i(t())})})}})[p.of]=r,t[p.alt]=i(p.alt),t[p.bimap]=o(p.bimap),t[p.map]=n(p.map),t[p.chain]=s(p.chain),t["@@type"]=f,t.constructor=w,t}w.of=v,w.type=c,w[p.of]=v,w["@@type"]=f,w.Rejected=function(r){return w(function(t){return t(r)})},w.Resolved=v,w.fromPromise=function(o){if(!m(o))throw new TypeError("Async.fromPromise: Promise returning function required");return function(){var n=arguments;return w(function(t,r){var e=o.apply(null,n);if(!l(e))throw new TypeError("Async.fromPromise: Promise returning function required");e.then(r,t)})}},w.fromNode=function(o,i){if(!m(o))throw new TypeError("Async.fromNode: CPS function required");return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return w(function(e,n){o.apply(i,t.concat(function(t,r){return t?e(t):n(r)}))})}},w.all=function(t){if(!s(t)||!t.reduce(function(t,r){return t&&g(w,r)},!0))throw new TypeError("Async.all: Foldable structure of Asyncs required");return i(t)?o.sequence(w.of,t):t.sequence(w.of)},w.rejectAfter=function(e,n){if(!(a(e)&&e>=0))throw new TypeError("Async.rejectAfter: Positive Integer required for first argument");return w(function(t){var r=setTimeout(function(){t(n)},e);return function(){clearTimeout(r)}})},w.resolveAfter=function(n,o){if(!(a(n)&&n>=0))throw new TypeError("Async.resolveAfter: Positive Integer required for first argument");return w(function(t,r){var e=setTimeout(function(){r(o)},n);return function(){clearTimeout(e)}})},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,f){switch(t){case 0:return function(){return f.apply(this,arguments)};case 1:return function(t){return f.apply(this,arguments)};case 2:return function(t,r){return f.apply(this,arguments)};case 3:return function(t,r,e){return f.apply(this,arguments)};case 4:return function(t,r,e,n){return f.apply(this,arguments)};case 5:return function(t,r,e,n,o){return f.apply(this,arguments)};case 6:return function(t,r,e,n,o,i){return f.apply(this,arguments)};case 7:return function(t,r,e,n,o,i,s){return f.apply(this,arguments)};case 8:return function(t,r,e,