ast-deep-contains 5.0.13 → 5.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -63,7 +63,7 @@ deepContains(
63
63
  },
64
64
  (err) => {
65
65
  errors.push(err);
66
- }
66
+ },
67
67
  );
68
68
 
69
69
  // imagine instead of pushing pairs into array, you fed them into assert
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name ast-deep-contains
3
3
  * @fileoverview Like t.same assert on array of objects, where element order doesn't matter.
4
- * @version 5.0.13
4
+ * @version 5.0.15
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/ast-deep-contains/}
8
8
  */
9
9
 
10
- import h from"object-path";import{traverse as J}from"ast-monkey-traverse";import l from"@sindresorhus/is";var V="5.0.13";var F=V;function j(n){if(n.includes(".")){for(let s=n.length;s--;)if(n[s]===".")return n.slice(0,s)}return n}function x(n,s){return Array.from(n).filter((b,c)=>c!==s)}var k={skipContainers:!0,arrayStrictComparison:!1};function w(n,s,b,c,O){let f={...k,...O};l(n)!==l(s)?c(`the first input arg is of a type ${l(n).toLowerCase()} but the second is ${l(s).toLowerCase()}. Values are - 1st:
10
+ import h from"object-path";import{traverse as J}from"ast-monkey-traverse";import l from"@sindresorhus/is";var V="5.0.15";var F=V;function j(n){if(n.includes(".")){for(let s=n.length;s--;)if(n[s]===".")return n.slice(0,s)}return n}function x(n,s){return Array.from(n).filter((b,c)=>c!==s)}var k={skipContainers:!0,arrayStrictComparison:!1};function w(n,s,b,c,O){let f={...k,...O};l(n)!==l(s)?c(`the first input arg is of a type ${l(n).toLowerCase()} but the second is ${l(s).toLowerCase()}. Values are - 1st:
11
11
  ${JSON.stringify(n,null,4)}
12
12
  2nd:
13
13
  ${JSON.stringify(s,null,4)}`):J(s,(D,E,a,v)=>{let d=E!==void 0?E:D,{path:$}=a;if(h.has(n,$))if(!f.arrayStrictComparison&&l.plainObject(d)&&a.parentType==="array"&&a.parent.length>1){v.now=!0;let o=Array.from(a.path.includes(".")?h.get(n,j($)):n);if(o.length<a.parent.length)c(`the first array: ${JSON.stringify(o,null,4)}
@@ -1,22 +1,22 @@
1
1
  /**
2
2
  * @name ast-deep-contains
3
3
  * @fileoverview Like t.same assert on array of objects, where element order doesn't matter.
4
- * @version 5.0.13
4
+ * @version 5.0.15
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/ast-deep-contains/}
8
8
  */
9
9
 
10
- "use strict";var astDeepContains=(()=>{var oe=Object.create;var V=Object.defineProperty,ae=Object.defineProperties,fe=Object.getOwnPropertyDescriptor,le=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols,ue=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var k=(e,n,f)=>n in e?V(e,n,{enumerable:!0,configurable:!0,writable:!0,value:f}):e[n]=f,D=(e,n)=>{for(var f in n||(n={}))G.call(n,f)&&k(e,f,n[f]);if(J)for(var f of J(n))ye.call(n,f)&&k(e,f,n[f]);return e},P=(e,n)=>ae(e,le(n));var W=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),pe=(e,n)=>{for(var f in n)V(e,f,{get:n[f],enumerable:!0})},H=(e,n,f,g)=>{if(n&&typeof n=="object"||typeof n=="function")for(let p of ce(n))!G.call(e,p)&&p!==f&&V(e,p,{get:()=>n[p],enumerable:!(g=fe(n,p))||g.enumerable});return e};var _=(e,n,f)=>(f=e!=null?oe(ue(e)):{},H(n||!e||!e.__esModule?V(f,"default",{value:e,enumerable:!0}):f,e)),me=e=>H(V({},"__esModule",{value:!0}),e);var Q=W((K,B)=>{(function(e,n){"use strict";typeof B=="object"&&typeof B.exports=="object"?B.exports=n():typeof define=="function"&&define.amd?define([],n):e.objectPath=n()})(K,function(){"use strict";var e=Object.prototype.toString;function n(s,o){return s==null?!1:Object.prototype.hasOwnProperty.call(s,o)}function f(s){if(!s||d(s)&&s.length===0)return!0;if(typeof s!="string"){for(var o in s)if(n(s,o))return!1;return!0}return!1}function g(s){return e.call(s)}function p(s){return typeof s=="object"&&g(s)==="[object Object]"}var d=Array.isArray||function(s){return e.call(s)==="[object Array]"};function l(s){return typeof s=="boolean"||g(s)==="[object Boolean]"}function a(s){var o=parseInt(s);return o.toString()===s?o:s}function y(s){s=s||{};var o=function(u){return Object.keys(o).reduce(function(t,c){return c==="create"||typeof o[c]=="function"&&(t[c]=o[c].bind(o,u)),t},{})},A;s.includeInheritedProps?A=function(){return!0}:A=function(u,t){return typeof t=="number"&&Array.isArray(u)||n(u,t)};function O(u,t){if(A(u,t))return u[t]}var E;s.includeInheritedProps?E=function(u,t){typeof t!="string"&&typeof t!="number"&&(t=String(t));var c=O(u,t);if(t==="__proto__"||t==="prototype"||t==="constructor"&&typeof c=="function")throw new Error("For security reasons, object's magic properties cannot be set");return c}:E=function(u,t){return O(u,t)};function j(u,t,c,b){if(typeof t=="number"&&(t=[t]),!t||t.length===0)return u;if(typeof t=="string")return j(u,t.split(".").map(a),c,b);var $=t[0],S=E(u,$);return t.length===1?((S===void 0||!b)&&(u[$]=c),S):(S===void 0&&(typeof t[1]=="number"?u[$]=[]:u[$]={}),j(u[$],t.slice(1),c,b))}return o.has=function(u,t){if(typeof t=="number"?t=[t]:typeof t=="string"&&(t=t.split(".")),!t||t.length===0)return!!u;for(var c=0;c<t.length;c++){var b=a(t[c]);if(typeof b=="number"&&d(u)&&b<u.length||(s.includeInheritedProps?b in Object(u):n(u,b)))u=u[b];else return!1}return!0},o.ensureExists=function(u,t,c){return j(u,t,c,!0)},o.set=function(u,t,c,b){return j(u,t,c,b)},o.insert=function(u,t,c,b){var $=o.get(u,t);b=~~b,d($)||($=[],o.set(u,t,$)),$.splice(b,0,c)},o.empty=function(u,t){if(!f(t)&&u!=null){var c,b;if(c=o.get(u,t)){if(typeof c=="string")return o.set(u,t,"");if(l(c))return o.set(u,t,!1);if(typeof c=="number")return o.set(u,t,0);if(d(c))c.length=0;else if(p(c))for(b in c)A(c,b)&&delete c[b];else return o.set(u,t,null)}}},o.push=function(u,t){var c=o.get(u,t);d(c)||(c=[],o.set(u,t,c)),c.push.apply(c,Array.prototype.slice.call(arguments,2))},o.coalesce=function(u,t,c){for(var b,$=0,S=t.length;$<S;$++)if((b=o.get(u,t[$]))!==void 0)return b;return c},o.get=function(u,t,c){if(typeof t=="number"&&(t=[t]),!t||t.length===0)return u;if(u==null)return c;if(typeof t=="string")return o.get(u,t.split("."),c);var b=a(t[0]),$=E(u,b);return $===void 0?c:t.length===1?$:o.get(u[b],t.slice(1),c)},o.del=function(t,c){if(typeof c=="number"&&(c=[c]),t==null||f(c))return t;if(typeof c=="string")return o.del(t,c.split("."));var b=a(c[0]);if(E(t,b),!A(t,b))return t;if(c.length===1)d(t)?t.splice(b,1):delete t[b];else return o.del(t[b],c.slice(1));return t},o}var m=y();return m.create=y,m.withInheritedProps=y({includeInheritedProps:!0}),m})});var U=W((Fe,z)=>{"use strict";z.exports=be;function I(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function be(e){if(e=e||{},e.circles)return de(e);return e.proto?g:f;function n(p,d){for(var l=Object.keys(p),a=new Array(l.length),y=0;y<l.length;y++){var m=l[y],s=p[m];typeof s!="object"||s===null?a[m]=s:s instanceof Date?a[m]=new Date(s):ArrayBuffer.isView(s)?a[m]=I(s):a[m]=d(s)}return a}function f(p){if(typeof p!="object"||p===null)return p;if(p instanceof Date)return new Date(p);if(Array.isArray(p))return n(p,f);if(p instanceof Map)return new Map(n(Array.from(p),f));if(p instanceof Set)return new Set(n(Array.from(p),f));var d={};for(var l in p)if(Object.hasOwnProperty.call(p,l)!==!1){var a=p[l];typeof a!="object"||a===null?d[l]=a:a instanceof Date?d[l]=new Date(a):a instanceof Map?d[l]=new Map(n(Array.from(a),f)):a instanceof Set?d[l]=new Set(n(Array.from(a),f)):ArrayBuffer.isView(a)?d[l]=I(a):d[l]=f(a)}return d}function g(p){if(typeof p!="object"||p===null)return p;if(p instanceof Date)return new Date(p);if(Array.isArray(p))return n(p,g);if(p instanceof Map)return new Map(n(Array.from(p),g));if(p instanceof Set)return new Set(n(Array.from(p),g));var d={};for(var l in p){var a=p[l];typeof a!="object"||a===null?d[l]=a:a instanceof Date?d[l]=new Date(a):a instanceof Map?d[l]=new Map(n(Array.from(a),g)):a instanceof Set?d[l]=new Set(n(Array.from(a),g)):ArrayBuffer.isView(a)?d[l]=I(a):d[l]=g(a)}return d}}function de(e){var n=[],f=[];return e.proto?d:p;function g(l,a){for(var y=Object.keys(l),m=new Array(y.length),s=0;s<y.length;s++){var o=y[s],A=l[o];if(typeof A!="object"||A===null)m[o]=A;else if(A instanceof Date)m[o]=new Date(A);else if(ArrayBuffer.isView(A))m[o]=I(A);else{var O=n.indexOf(A);O!==-1?m[o]=f[O]:m[o]=a(A)}}return m}function p(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return g(l,p);if(l instanceof Map)return new Map(g(Array.from(l),p));if(l instanceof Set)return new Set(g(Array.from(l),p));var a={};n.push(l),f.push(a);for(var y in l)if(Object.hasOwnProperty.call(l,y)!==!1){var m=l[y];if(typeof m!="object"||m===null)a[y]=m;else if(m instanceof Date)a[y]=new Date(m);else if(m instanceof Map)a[y]=new Map(g(Array.from(m),p));else if(m instanceof Set)a[y]=new Set(g(Array.from(m),p));else if(ArrayBuffer.isView(m))a[y]=I(m);else{var s=n.indexOf(m);s!==-1?a[y]=f[s]:a[y]=p(m)}}return n.pop(),f.pop(),a}function d(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return g(l,d);if(l instanceof Map)return new Map(g(Array.from(l),d));if(l instanceof Set)return new Set(g(Array.from(l),d));var a={};n.push(l),f.push(a);for(var y in l){var m=l[y];if(typeof m!="object"||m===null)a[y]=m;else if(m instanceof Date)a[y]=new Date(m);else if(m instanceof Map)a[y]=new Map(g(Array.from(m),d));else if(m instanceof Set)a[y]=new Set(g(Array.from(m),d));else if(ArrayBuffer.isView(m))a[y]=I(m);else{var s=n.indexOf(m);s!==-1?a[y]=f[s]:a[y]=d(m)}}return n.pop(),f.pop(),a}}});var Be={};pe(Be,{deepContains:()=>ie,defaults:()=>te,version:()=>Ve});var F=_(Q(),1);var Z=_(U(),1);var Y=_(U(),1);var _e=(0,Y.default)();function q(e){if(e==null||typeof e!="object")return!1;let n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function ge(e){if(e.includes(".")){let n=e.lastIndexOf(".");if(!e.slice(0,n).includes("."))return e.slice(0,n);for(let f=n-1;f--;)if(e[f]===".")return e.slice(f+1,n)}return null}var R=ge;var L=(0,Z.default)();function X(e,n){let f={now:!1};function g(p,d,l,a){let y=L(p),m,s=D({depth:-1,path:""},l);if(s.depth+=1,Array.isArray(y))for(let o=0,A=y.length;o<A&&!a.now;o++){let O=s.path?`${s.path}.${o}`:`${o}`;y[o]!==void 0?(s.parent=L(y),s.parentType="array",s.parentKey=R(O),m=g(d(y[o],void 0,P(D({},s),{path:O}),a),d,P(D({},s),{path:O}),a),Number.isNaN(m)&&o<y.length?(y.splice(o,1),o-=1):y[o]=m):y.splice(o,1)}else if(q(y))for(let o in y){if(a.now&&o!=null)break;let A=s.path?`${s.path}.${o}`:o;s.depth===0&&o!=null&&(s.topmostKey=o),s.parent=L(y),s.parentType="object",s.parentKey=R(A),m=g(d(o,y[o],P(D({},s),{path:A}),a),d,P(D({},s),{path:A}),a),Number.isNaN(m)?delete y[o]:y[o]=m}return y}return g(e,n,{},f)}var v=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Ae(e){return v.includes(e)}var $e=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...v];function he(e){return $e.includes(e)}var Se=["null","undefined","string","number","bigint","boolean","symbol"];function Oe(e){return Se.includes(e)}function C(e){return n=>typeof n===e}var{toString:we}=Object.prototype,T=e=>{let n=we.call(e).slice(8,-1);if(/HTML\w+Element/.test(n)&&r.domElement(e))return"HTMLElement";if(he(n))return n},h=e=>n=>T(n)===e;function r(e){if(e===null)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(r.observable(e))return"Observable";if(r.array(e))return"Array";if(r.buffer(e))return"Buffer";let n=T(e);if(n)return n;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}r.undefined=C("undefined");r.string=C("string");var Ee=C("number");r.number=e=>Ee(e)&&!r.nan(e);r.bigint=C("bigint");r.function_=C("function");r.null_=e=>e===null;r.class_=e=>r.function_(e)&&e.toString().startsWith("class ");r.boolean=e=>e===!0||e===!1;r.symbol=C("symbol");r.numericString=e=>r.string(e)&&!r.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e));r.array=(e,n)=>Array.isArray(e)?r.function_(n)?e.every(f=>n(f)):!0:!1;r.buffer=e=>{var n,f,g;return(g=(f=(n=e==null?void 0:e.constructor)==null?void 0:n.isBuffer)==null?void 0:f.call(n,e))!=null?g:!1};r.blob=e=>h("Blob")(e);r.nullOrUndefined=e=>r.null_(e)||r.undefined(e);r.object=e=>!r.null_(e)&&(typeof e=="object"||r.function_(e));r.iterable=e=>r.function_(e==null?void 0:e[Symbol.iterator]);r.asyncIterable=e=>r.function_(e==null?void 0:e[Symbol.asyncIterator]);r.generator=e=>r.iterable(e)&&r.function_(e==null?void 0:e.next)&&r.function_(e==null?void 0:e.throw);r.asyncGenerator=e=>r.asyncIterable(e)&&r.function_(e.next)&&r.function_(e.throw);r.nativePromise=e=>h("Promise")(e);var De=e=>r.function_(e==null?void 0:e.then)&&r.function_(e==null?void 0:e.catch);r.promise=e=>r.nativePromise(e)||De(e);r.generatorFunction=h("GeneratorFunction");r.asyncGeneratorFunction=e=>T(e)==="AsyncGeneratorFunction";r.asyncFunction=e=>T(e)==="AsyncFunction";r.boundFunction=e=>r.function_(e)&&!e.hasOwnProperty("prototype");r.regExp=h("RegExp");r.date=h("Date");r.error=h("Error");r.map=e=>h("Map")(e);r.set=e=>h("Set")(e);r.weakMap=e=>h("WeakMap")(e);r.weakSet=e=>h("WeakSet")(e);r.weakRef=e=>h("WeakRef")(e);r.int8Array=h("Int8Array");r.uint8Array=h("Uint8Array");r.uint8ClampedArray=h("Uint8ClampedArray");r.int16Array=h("Int16Array");r.uint16Array=h("Uint16Array");r.int32Array=h("Int32Array");r.uint32Array=h("Uint32Array");r.float32Array=h("Float32Array");r.float64Array=h("Float64Array");r.bigInt64Array=h("BigInt64Array");r.bigUint64Array=h("BigUint64Array");r.arrayBuffer=h("ArrayBuffer");r.sharedArrayBuffer=h("SharedArrayBuffer");r.dataView=h("DataView");r.enumCase=(e,n)=>Object.values(n).includes(e);r.directInstanceOf=(e,n)=>Object.getPrototypeOf(e)===n.prototype;r.urlInstance=e=>h("URL")(e);r.urlString=e=>{if(!r.string(e))return!1;try{return new URL(e),!0}catch(n){return!1}};r.truthy=e=>!!e;r.falsy=e=>!e;r.nan=e=>Number.isNaN(e);r.primitive=e=>r.null_(e)||Oe(typeof e);r.integer=e=>Number.isInteger(e);r.safeInteger=e=>Number.isSafeInteger(e);r.plainObject=e=>{if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};r.typedArray=e=>Ae(T(e));var Ne=e=>r.safeInteger(e)&&e>=0;r.arrayLike=e=>!r.nullOrUndefined(e)&&!r.function_(e)&&Ne(e.length);r.inRange=(e,n)=>{if(r.number(n))return e>=Math.min(0,n)&&e<=Math.max(n,0);if(r.array(n)&&n.length===2)return e>=Math.min(...n)&&e<=Math.max(...n);throw new TypeError(`Invalid range: ${JSON.stringify(n)}`)};var Ie=1,Ce=["innerHTML","ownerDocument","style","attributes","nodeValue"];r.domElement=e=>r.object(e)&&e.nodeType===Ie&&r.string(e.nodeName)&&!r.plainObject(e)&&Ce.every(n=>n in e);r.observable=e=>{var n,f;return e?e===((n=e[Symbol.observable])==null?void 0:n.call(e))||e===((f=e["@@observable"])==null?void 0:f.call(e)):!1};r.nodeStream=e=>r.object(e)&&r.function_(e.pipe)&&!r.observable(e);r.infinite=e=>e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY;var ee=e=>n=>r.integer(n)&&Math.abs(n%2)===e;r.evenInteger=ee(0);r.oddInteger=ee(1);r.emptyArray=e=>r.array(e)&&e.length===0;r.nonEmptyArray=e=>r.array(e)&&e.length>0;r.emptyString=e=>r.string(e)&&e.length===0;var je=e=>r.string(e)&&!/\S/.test(e);r.emptyStringOrWhitespace=e=>r.emptyString(e)||je(e);r.nonEmptyString=e=>r.string(e)&&e.length>0;r.nonEmptyStringAndNotWhitespace=e=>r.string(e)&&!r.emptyStringOrWhitespace(e);r.emptyObject=e=>r.object(e)&&!r.map(e)&&!r.set(e)&&Object.keys(e).length===0;r.nonEmptyObject=e=>r.object(e)&&!r.map(e)&&!r.set(e)&&Object.keys(e).length>0;r.emptySet=e=>r.set(e)&&e.size===0;r.nonEmptySet=e=>r.set(e)&&e.size>0;r.emptyMap=e=>r.map(e)&&e.size===0;r.nonEmptyMap=e=>r.map(e)&&e.size>0;r.propertyKey=e=>r.any([r.string,r.number,r.symbol],e);r.formData=e=>h("FormData")(e);r.urlSearchParams=e=>h("URLSearchParams")(e);var re=(e,n,f)=>{if(!r.function_(n))throw new TypeError(`Invalid predicate: ${JSON.stringify(n)}`);if(f.length===0)throw new TypeError("Invalid number of values");return e.call(f,n)};r.any=(e,...n)=>(r.array(e)?e:[e]).some(g=>re(Array.prototype.some,g,n));r.all=(e,...n)=>re(Array.prototype.every,e,n);var i=(e,n,f,g={})=>{if(!e){let{multipleValues:p}=g,d=p?`received values of types ${[...new Set(f.map(l=>`\`${r(l)}\``))].join(", ")}`:`received value of type \`${r(f)}\``;throw new TypeError(`Expected value which is \`${n}\`, ${d}.`)}},M={undefined:e=>i(r.undefined(e),"undefined",e),string:e=>i(r.string(e),"string",e),number:e=>i(r.number(e),"number",e),bigint:e=>i(r.bigint(e),"bigint",e),function_:e=>i(r.function_(e),"Function",e),null_:e=>i(r.null_(e),"null",e),class_:e=>i(r.class_(e),"Class",e),boolean:e=>i(r.boolean(e),"boolean",e),symbol:e=>i(r.symbol(e),"symbol",e),numericString:e=>i(r.numericString(e),"string with a number",e),array:(e,n)=>{i(r.array(e),"Array",e),n&&e.forEach(n)},buffer:e=>i(r.buffer(e),"Buffer",e),blob:e=>i(r.blob(e),"Blob",e),nullOrUndefined:e=>i(r.nullOrUndefined(e),"null or undefined",e),object:e=>i(r.object(e),"Object",e),iterable:e=>i(r.iterable(e),"Iterable",e),asyncIterable:e=>i(r.asyncIterable(e),"AsyncIterable",e),generator:e=>i(r.generator(e),"Generator",e),asyncGenerator:e=>i(r.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>i(r.nativePromise(e),"native Promise",e),promise:e=>i(r.promise(e),"Promise",e),generatorFunction:e=>i(r.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>i(r.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>i(r.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>i(r.boundFunction(e),"Function",e),regExp:e=>i(r.regExp(e),"RegExp",e),date:e=>i(r.date(e),"Date",e),error:e=>i(r.error(e),"Error",e),map:e=>i(r.map(e),"Map",e),set:e=>i(r.set(e),"Set",e),weakMap:e=>i(r.weakMap(e),"WeakMap",e),weakSet:e=>i(r.weakSet(e),"WeakSet",e),weakRef:e=>i(r.weakRef(e),"WeakRef",e),int8Array:e=>i(r.int8Array(e),"Int8Array",e),uint8Array:e=>i(r.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>i(r.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>i(r.int16Array(e),"Int16Array",e),uint16Array:e=>i(r.uint16Array(e),"Uint16Array",e),int32Array:e=>i(r.int32Array(e),"Int32Array",e),uint32Array:e=>i(r.uint32Array(e),"Uint32Array",e),float32Array:e=>i(r.float32Array(e),"Float32Array",e),float64Array:e=>i(r.float64Array(e),"Float64Array",e),bigInt64Array:e=>i(r.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>i(r.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>i(r.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>i(r.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>i(r.dataView(e),"DataView",e),enumCase:(e,n)=>i(r.enumCase(e,n),"EnumCase",e),urlInstance:e=>i(r.urlInstance(e),"URL",e),urlString:e=>i(r.urlString(e),"string with a URL",e),truthy:e=>i(r.truthy(e),"truthy",e),falsy:e=>i(r.falsy(e),"falsy",e),nan:e=>i(r.nan(e),"NaN",e),primitive:e=>i(r.primitive(e),"primitive",e),integer:e=>i(r.integer(e),"integer",e),safeInteger:e=>i(r.safeInteger(e),"integer",e),plainObject:e=>i(r.plainObject(e),"plain object",e),typedArray:e=>i(r.typedArray(e),"TypedArray",e),arrayLike:e=>i(r.arrayLike(e),"array-like",e),domElement:e=>i(r.domElement(e),"HTMLElement",e),observable:e=>i(r.observable(e),"Observable",e),nodeStream:e=>i(r.nodeStream(e),"Node.js Stream",e),infinite:e=>i(r.infinite(e),"infinite number",e),emptyArray:e=>i(r.emptyArray(e),"empty array",e),nonEmptyArray:e=>i(r.nonEmptyArray(e),"non-empty array",e),emptyString:e=>i(r.emptyString(e),"empty string",e),emptyStringOrWhitespace:e=>i(r.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>i(r.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>i(r.nonEmptyStringAndNotWhitespace(e),"non-empty string and not whitespace",e),emptyObject:e=>i(r.emptyObject(e),"empty object",e),nonEmptyObject:e=>i(r.nonEmptyObject(e),"non-empty object",e),emptySet:e=>i(r.emptySet(e),"empty set",e),nonEmptySet:e=>i(r.nonEmptySet(e),"non-empty set",e),emptyMap:e=>i(r.emptyMap(e),"empty map",e),nonEmptyMap:e=>i(r.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>i(r.propertyKey(e),"PropertyKey",e),formData:e=>i(r.formData(e),"FormData",e),urlSearchParams:e=>i(r.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>i(r.evenInteger(e),"even integer",e),oddInteger:e=>i(r.oddInteger(e),"odd integer",e),directInstanceOf:(e,n)=>i(r.directInstanceOf(e,n),"T",e),inRange:(e,n)=>i(r.inRange(e,n),"in range",e),any:(e,...n)=>i(r.any(e,...n),"predicate returns truthy for any value",n,{multipleValues:!0}),all:(e,...n)=>i(r.all(e,...n),"predicate returns truthy for all values",n,{multipleValues:!0})};Object.defineProperties(r,{class:{value:r.class_},function:{value:r.function_},null:{value:r.null_}});Object.defineProperties(M,{class:{value:M.class_},function:{value:M.function_},null:{value:M.null_}});var N=r;var ne="5.0.13";var Ve=ne;function Pe(e){if(e.includes(".")){for(let n=e.length;n--;)if(e[n]===".")return e.slice(0,n)}return e}function Te(e,n){return Array.from(e).filter((f,g)=>g!==n)}var te={skipContainers:!0,arrayStrictComparison:!1};function ie(e,n,f,g,p){let d=D(D({},te),p);N(e)!==N(n)?g(`the first input arg is of a type ${N(e).toLowerCase()} but the second is ${N(n).toLowerCase()}. Values are - 1st:
11
- ${JSON.stringify(e,null,4)}
10
+ "use strict";var astDeepContains=(()=>{var Fr=Object.create;var B=Object.defineProperty,Br=Object.defineProperties,Pr=Object.getOwnPropertyDescriptor,Cr=Object.getOwnPropertyDescriptors,Ur=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,jr=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable;var q=(r,e,s)=>e in r?B(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s,$=(r,e)=>{for(var s in e||(e={}))z.call(e,s)&&q(r,s,e[s]);if(Q)for(var s of Q(e))Mr.call(e,s)&&q(r,s,e[s]);return r},P=(r,e)=>Br(r,Cr(e));var Y=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Vr=(r,e)=>{for(var s in e)B(r,s,{get:e[s],enumerable:!0})},Z=(r,e,s,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of Ur(e))!z.call(r,l)&&l!==s&&B(r,l,{get:()=>e[l],enumerable:!(m=Pr(e,l))||m.enumerable});return r};var k=(r,e,s)=>(s=r!=null?Fr(jr(r)):{},Z(e||!r||!r.__esModule?B(s,"default",{value:r,enumerable:!0}):s,r)),Rr=r=>Z(B({},"__esModule",{value:!0}),r);var v=Y((X,R)=>{(function(r,e){"use strict";typeof R=="object"&&typeof R.exports=="object"?R.exports=e():typeof define=="function"&&define.amd?define([],e):r.objectPath=e()})(X,function(){"use strict";var r=Object.prototype.toString;function e(n,i){return n==null?!1:Object.prototype.hasOwnProperty.call(n,i)}function s(n){if(!n||g(n)&&n.length===0)return!0;if(typeof n!="string"){for(var i in n)if(e(n,i))return!1;return!0}return!1}function m(n){return r.call(n)}function l(n){return typeof n=="object"&&m(n)==="[object Object]"}var g=Array.isArray||function(n){return r.call(n)==="[object Array]"};function a(n){return typeof n=="boolean"||m(n)==="[object Boolean]"}function o(n){var i=parseInt(n);return i.toString()===n?i:n}function p(n){n=n||{};var i=function(u){return Object.keys(i).reduce(function(t,f){return f==="create"||typeof i[f]=="function"&&(t[f]=i[f].bind(i,u)),t},{})},d;n.includeInheritedProps?d=function(){return!0}:d=function(u,t){return typeof t=="number"&&Array.isArray(u)||e(u,t)};function E(u,t){if(d(u,t))return u[t]}var S;n.includeInheritedProps?S=function(u,t){typeof t!="string"&&typeof t!="number"&&(t=String(t));var f=E(u,t);if(t==="__proto__"||t==="prototype"||t==="constructor"&&typeof f=="function")throw new Error("For security reasons, object's magic properties cannot be set");return f}:S=function(u,t){return E(u,t)};function D(u,t,f,y){if(typeof t=="number"&&(t=[t]),!t||t.length===0)return u;if(typeof t=="string")return D(u,t.split(".").map(o),f,y);var w=t[0],h=S(u,w);return t.length===1?((h===void 0||!y)&&(u[w]=f),h):(h===void 0&&(typeof t[1]=="number"?u[w]=[]:u[w]={}),D(u[w],t.slice(1),f,y))}return i.has=function(u,t){if(typeof t=="number"?t=[t]:typeof t=="string"&&(t=t.split(".")),!t||t.length===0)return!!u;for(var f=0;f<t.length;f++){var y=o(t[f]);if(typeof y=="number"&&g(u)&&y<u.length||(n.includeInheritedProps?y in Object(u):e(u,y)))u=u[y];else return!1}return!0},i.ensureExists=function(u,t,f){return D(u,t,f,!0)},i.set=function(u,t,f,y){return D(u,t,f,y)},i.insert=function(u,t,f,y){var w=i.get(u,t);y=~~y,g(w)||(w=[],i.set(u,t,w)),w.splice(y,0,f)},i.empty=function(u,t){if(!s(t)&&u!=null){var f,y;if(f=i.get(u,t)){if(typeof f=="string")return i.set(u,t,"");if(a(f))return i.set(u,t,!1);if(typeof f=="number")return i.set(u,t,0);if(g(f))f.length=0;else if(l(f))for(y in f)d(f,y)&&delete f[y];else return i.set(u,t,null)}}},i.push=function(u,t){var f=i.get(u,t);g(f)||(f=[],i.set(u,t,f)),f.push.apply(f,Array.prototype.slice.call(arguments,2))},i.coalesce=function(u,t,f){for(var y,w=0,h=t.length;w<h;w++)if((y=i.get(u,t[w]))!==void 0)return y;return f},i.get=function(u,t,f){if(typeof t=="number"&&(t=[t]),!t||t.length===0)return u;if(u==null)return f;if(typeof t=="string")return i.get(u,t.split("."),f);var y=o(t[0]),w=S(u,y);return w===void 0?f:t.length===1?w:i.get(u[y],t.slice(1),f)},i.del=function(t,f){if(typeof f=="number"&&(f=[f]),t==null||s(f))return t;if(typeof f=="string")return i.del(t,f.split("."));var y=o(f[0]);if(S(t,y),!d(t,y))return t;if(f.length===1)g(t)?t.splice(y,1):delete t[y];else return i.del(t[y],f.slice(1));return t},i}var c=p();return c.create=p,c.withInheritedProps=p({includeInheritedProps:!0}),c})});var W=Y((yt,rr)=>{"use strict";rr.exports=Lr;function I(r){return r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function Lr(r){if(r=r||{},r.circles)return kr(r);return r.proto?m:s;function e(l,g){for(var a=Object.keys(l),o=new Array(a.length),p=0;p<a.length;p++){var c=a[p],n=l[c];typeof n!="object"||n===null?o[c]=n:n instanceof Date?o[c]=new Date(n):ArrayBuffer.isView(n)?o[c]=I(n):o[c]=g(n)}return o}function s(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,s);if(l instanceof Map)return new Map(e(Array.from(l),s));if(l instanceof Set)return new Set(e(Array.from(l),s));var g={};for(var a in l)if(Object.hasOwnProperty.call(l,a)!==!1){var o=l[a];typeof o!="object"||o===null?g[a]=o:o instanceof Date?g[a]=new Date(o):o instanceof Map?g[a]=new Map(e(Array.from(o),s)):o instanceof Set?g[a]=new Set(e(Array.from(o),s)):ArrayBuffer.isView(o)?g[a]=I(o):g[a]=s(o)}return g}function m(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,m);if(l instanceof Map)return new Map(e(Array.from(l),m));if(l instanceof Set)return new Set(e(Array.from(l),m));var g={};for(var a in l){var o=l[a];typeof o!="object"||o===null?g[a]=o:o instanceof Date?g[a]=new Date(o):o instanceof Map?g[a]=new Map(e(Array.from(o),m)):o instanceof Set?g[a]=new Set(e(Array.from(o),m)):ArrayBuffer.isView(o)?g[a]=I(o):g[a]=m(o)}return g}}function kr(r){var e=[],s=[];return r.proto?g:l;function m(a,o){for(var p=Object.keys(a),c=new Array(p.length),n=0;n<p.length;n++){var i=p[n],d=a[i];if(typeof d!="object"||d===null)c[i]=d;else if(d instanceof Date)c[i]=new Date(d);else if(ArrayBuffer.isView(d))c[i]=I(d);else{var E=e.indexOf(d);E!==-1?c[i]=s[E]:c[i]=o(d)}}return c}function l(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return m(a,l);if(a instanceof Map)return new Map(m(Array.from(a),l));if(a instanceof Set)return new Set(m(Array.from(a),l));var o={};e.push(a),s.push(o);for(var p in a)if(Object.hasOwnProperty.call(a,p)!==!1){var c=a[p];if(typeof c!="object"||c===null)o[p]=c;else if(c instanceof Date)o[p]=new Date(c);else if(c instanceof Map)o[p]=new Map(m(Array.from(c),l));else if(c instanceof Set)o[p]=new Set(m(Array.from(c),l));else if(ArrayBuffer.isView(c))o[p]=I(c);else{var n=e.indexOf(c);n!==-1?o[p]=s[n]:o[p]=l(c)}}return e.pop(),s.pop(),o}function g(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return m(a,g);if(a instanceof Map)return new Map(m(Array.from(a),g));if(a instanceof Set)return new Set(m(Array.from(a),g));var o={};e.push(a),s.push(o);for(var p in a){var c=a[p];if(typeof c!="object"||c===null)o[p]=c;else if(c instanceof Date)o[p]=new Date(c);else if(c instanceof Map)o[p]=new Map(m(Array.from(c),g));else if(c instanceof Set)o[p]=new Set(m(Array.from(c),g));else if(ArrayBuffer.isView(c))o[p]=I(c);else{var n=e.indexOf(c);n!==-1?o[p]=s[n]:o[p]=g(c)}}return e.pop(),s.pop(),o}}});var pt={};Vr(pt,{deepContains:()=>Ir,defaults:()=>Nr,version:()=>at});var L=k(v(),1);var nr=k(W(),1);var er=k(W(),1);var lt=(0,er.default)();function tr(r){if(r==null||typeof r!="object")return!1;let e=Object.getPrototypeOf(r);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in r)&&!(Symbol.toStringTag in r)}function Wr(r){if(r.includes(".")){let e=r.lastIndexOf(".");if(!r.slice(0,e).includes("."))return r.slice(0,e);for(let s=e-1;s--;)if(r[s]===".")return r.slice(s+1,e)}return null}var G=Wr;var J=(0,nr.default)();function ir(r,e){let s={now:!1};function m(l,g,a,o){let p=J(l),c,n=$({depth:-1,path:""},a);if(n.depth+=1,Array.isArray(p))for(let i=0,d=p.length;i<d&&!o.now;i++){let E=n.path?`${n.path}.${i}`:`${i}`;p[i]!==void 0?(n.parent=J(p),n.parentType="array",n.parentKey=G(E),c=m(g(p[i],void 0,P($({},n),{path:E}),o),g,P($({},n),{path:E}),o),Number.isNaN(c)&&i<p.length?(p.splice(i,1),i-=1):p[i]=c):p.splice(i,1)}else if(tr(p))for(let i in p){if(o.now&&i!=null)break;let d=n.path?`${n.path}.${i}`:i;n.depth===0&&i!=null&&(n.topmostKey=i),n.parent=J(p),n.parentType="object",n.parentKey=G(d),c=m(g(i,p[i],P($({},n),{path:d}),o),g,P($({},n),{path:d}),o),Number.isNaN(c)?delete p[i]:p[i]=c}return p}return m(r,e,{},s)}var ar=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Gr(r){return ar.includes(r)}var fr=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...ar];function Jr(r){return fr.includes(r)}var ur=["null","undefined","string","number","bigint","boolean","symbol"];function _r(r){return ur.includes(r)}var At=["positive number","negative number","Class","string with a number","null or undefined","Iterable","AsyncIterable","native Promise","EnumCase","string with a URL","truthy","falsy","primitive","integer","plain object","TypedArray","array-like","tuple-like","Node.js Stream","infinite number","empty array","non-empty array","empty string","empty string or whitespace","non-empty string","non-empty string and not whitespace","empty object","non-empty object","empty set","non-empty set","empty map","non-empty map","PropertyKey","even integer","odd integer","T","in range","predicate returns truthy for any value","predicate returns truthy for all values","valid length","whitespace string",...fr,...ur],b=r=>{let e=Object.prototype.toString.call(r).slice(8,-1);if(/HTML\w+Element/.test(e)&&_(r))return"HTMLElement";if(Jr(e))return e};function or(r){if(r===null)return"null";switch(typeof r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(K(r))return"Observable";if(N(r))return"Array";if(lr(r))return"Buffer";let e=b(r);if(e)return e;if(r instanceof String||r instanceof Boolean||r instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}function Hr(r){return A(r==null?void 0:r.then)&&A(r==null?void 0:r.catch)}var Kr=Object.assign(or,{all:Qr,any:cr,array:N,arrayBuffer:qr,arrayLike:zr,asyncFunction:Yr,asyncGenerator:Zr,asyncGeneratorFunction:Xr,asyncIterable:yr,bigint:vr,bigInt64Array:re,bigUint64Array:ee,blob:te,boolean:ne,boundFunction:ie,buffer:lr,class:sr,class_:sr,dataView:oe,date:se,detect:or,directInstanceOf:ae,domElement:_,emptyArray:fe,emptyMap:ue,emptyObject:pe,emptySet:ce,emptyString:mr,emptyStringOrWhitespace:H,enumCase:ye,error:le,evenInteger:me,falsy:ge,float32Array:de,float64Array:be,formData:we,function:A,function_:A,generator:he,generatorFunction:Ae,htmlElement:_,infinite:Se,inRange:$e,int16Array:Te,int32Array:Oe,int8Array:Ne,integer:gr,iterable:dr,map:U,nan:Ie,nativePromise:br,negativeNumber:De,nodeStream:Fe,nonEmptyArray:Be,nonEmptyMap:Pe,nonEmptyObject:Ce,nonEmptySet:Ue,nonEmptyString:je,nonEmptyStringAndNotWhitespace:Me,null:C,null_:C,nullOrUndefined:wr,number:j,numericString:Ve,object:M,observable:K,oddInteger:Re,plainObject:hr,positiveNumber:Le,primitive:ke,promise:We,propertyKey:Ge,regExp:Je,safeInteger:Ar,set:V,sharedArrayBuffer:_e,string:T,symbol:Er,truthy:He,tupleLike:Ke,typedArray:Qe,uint16Array:qe,uint32Array:ze,uint8Array:Ye,uint8ClampedArray:Ze,undefined:xr,urlInstance:Xe,urlSearchParams:ve,urlString:rt,validLength:Sr,weakMap:et,weakRef:tt,weakSet:nt,whitespaceString:$r});function pr(r){return e=>gr(e)&&Math.abs(e%2)===r}function Qr(r,...e){return Tr(Array.prototype.every,r,e)}function cr(r,...e){return(N(r)?r:[r]).some(m=>Tr(Array.prototype.some,m,e))}function N(r,e){return Array.isArray(r)?A(e)?r.every(s=>e(s)):!0:!1}function qr(r){return b(r)==="ArrayBuffer"}function zr(r){return!wr(r)&&!A(r)&&Sr(r.length)}function Yr(r){return b(r)==="AsyncFunction"}function Zr(r){return yr(r)&&A(r.next)&&A(r.throw)}function Xr(r){return b(r)==="AsyncGeneratorFunction"}function yr(r){return A(r==null?void 0:r[Symbol.asyncIterator])}function vr(r){return typeof r=="bigint"}function re(r){return b(r)==="BigInt64Array"}function ee(r){return b(r)==="BigUint64Array"}function te(r){return b(r)==="Blob"}function ne(r){return r===!0||r===!1}function ie(r){return A(r)&&!Object.prototype.hasOwnProperty.call(r,"prototype")}function lr(r){var e,s,m;return(m=(s=(e=r==null?void 0:r.constructor)==null?void 0:e.isBuffer)==null?void 0:s.call(e,r))!=null?m:!1}function sr(r){return A(r)&&r.toString().startsWith("class ")}function oe(r){return b(r)==="DataView"}function se(r){return b(r)==="Date"}function ae(r,e){return Object.getPrototypeOf(r)===e.prototype}function fe(r){return N(r)&&r.length===0}function ue(r){return U(r)&&r.size===0}function pe(r){return M(r)&&!U(r)&&!V(r)&&Object.keys(r).length===0}function ce(r){return V(r)&&r.size===0}function mr(r){return T(r)&&r.length===0}function H(r){return mr(r)||$r(r)}function ye(r,e){return Object.values(e).includes(r)}function le(r){return b(r)==="Error"}function me(r){return pr(0)(r)}function ge(r){return!r}function de(r){return b(r)==="Float32Array"}function be(r){return b(r)==="Float64Array"}function we(r){return b(r)==="FormData"}function A(r){return typeof r=="function"}function he(r){return dr(r)&&A(r==null?void 0:r.next)&&A(r==null?void 0:r.throw)}function Ae(r){return b(r)==="GeneratorFunction"}var Ee=1,xe=["innerHTML","ownerDocument","style","attributes","nodeValue"];function _(r){return M(r)&&r.nodeType===Ee&&T(r.nodeName)&&!hr(r)&&xe.every(e=>e in r)}function Se(r){return r===Number.POSITIVE_INFINITY||r===Number.NEGATIVE_INFINITY}function $e(r,e){if(j(e))return r>=Math.min(0,e)&&r<=Math.max(e,0);if(N(e)&&e.length===2)return r>=Math.min(...e)&&r<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)}function Te(r){return b(r)==="Int16Array"}function Oe(r){return b(r)==="Int32Array"}function Ne(r){return b(r)==="Int8Array"}function gr(r){return Number.isInteger(r)}function dr(r){return A(r==null?void 0:r[Symbol.iterator])}function U(r){return b(r)==="Map"}function Ie(r){return Number.isNaN(r)}function br(r){return b(r)==="Promise"}function De(r){return j(r)&&r<0}function Fe(r){return M(r)&&A(r.pipe)&&!K(r)}function Be(r){return N(r)&&r.length>0}function Pe(r){return U(r)&&r.size>0}function Ce(r){return M(r)&&!U(r)&&!V(r)&&Object.keys(r).length>0}function Ue(r){return V(r)&&r.size>0}function je(r){return T(r)&&r.length>0}function Me(r){return T(r)&&!H(r)}function C(r){return r===null}function wr(r){return C(r)||xr(r)}function j(r){return typeof r=="number"&&!Number.isNaN(r)}function Ve(r){return T(r)&&!H(r)&&!Number.isNaN(Number(r))}function M(r){return!C(r)&&(typeof r=="object"||A(r))}function K(r){var e,s;return r?r===((e=r[Symbol.observable])==null?void 0:e.call(r))||r===((s=r["@@observable"])==null?void 0:s.call(r)):!1}function Re(r){return pr(1)(r)}function hr(r){if(typeof r!="object"||r===null)return!1;let e=Object.getPrototypeOf(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)}function Le(r){return j(r)&&r>0}function ke(r){return C(r)||_r(typeof r)}function We(r){return br(r)||Hr(r)}function Ge(r){return cr([T,j,Er],r)}function Je(r){return b(r)==="RegExp"}function Ar(r){return Number.isSafeInteger(r)}function V(r){return b(r)==="Set"}function _e(r){return b(r)==="SharedArrayBuffer"}function T(r){return typeof r=="string"}function Er(r){return typeof r=="symbol"}function He(r){return!!r}function Ke(r,e){return N(e)&&N(r)&&e.length===r.length?e.every((s,m)=>s(r[m])):!1}function Qe(r){return Gr(b(r))}function qe(r){return b(r)==="Uint16Array"}function ze(r){return b(r)==="Uint32Array"}function Ye(r){return b(r)==="Uint8Array"}function Ze(r){return b(r)==="Uint8ClampedArray"}function xr(r){return r===void 0}function Xe(r){return b(r)==="URL"}function ve(r){return b(r)==="URLSearchParams"}function rt(r){if(!T(r))return!1;try{return new URL(r),!0}catch(e){return!1}}function Sr(r){return Ar(r)&&r>=0}function et(r){return b(r)==="WeakMap"}function tt(r){return b(r)==="WeakRef"}function nt(r){return b(r)==="WeakSet"}function $r(r){return T(r)&&/^\s+$/.test(r)}function Tr(r,e,s){if(!A(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(s.length===0)throw new TypeError("Invalid number of values");return r.call(s,e)}var Et=new Intl.ListFormat("en",{style:"long",type:"conjunction"}),xt=new Intl.ListFormat("en",{style:"long",type:"disjunction"});var it={isArray:"Array",isArrayBuffer:"ArrayBuffer",isArrayLike:"array-like",isAsyncFunction:"AsyncFunction",isAsyncGenerator:"AsyncGenerator",isAsyncGeneratorFunction:"AsyncGeneratorFunction",isAsyncIterable:"AsyncIterable",isBigint:"bigint",isBigInt64Array:"BigInt64Array",isBigUint64Array:"BigUint64Array",isBlob:"Blob",isBoolean:"boolean",isBoundFunction:"Function",isBuffer:"Buffer",isClass:"Class",isDataView:"DataView",isDate:"Date",isDirectInstanceOf:"T",isDomElement:"HTMLElement",isEmptyArray:"empty array",isEmptyMap:"empty map",isEmptyObject:"empty object",isEmptySet:"empty set",isEmptyString:"empty string",isEmptyStringOrWhitespace:"empty string or whitespace",isEnumCase:"EnumCase",isError:"Error",isEvenInteger:"even integer",isFalsy:"falsy",isFloat32Array:"Float32Array",isFloat64Array:"Float64Array",isFormData:"FormData",isFunction:"Function",isGenerator:"Generator",isGeneratorFunction:"GeneratorFunction",isHtmlElement:"HTMLElement",isInfinite:"infinite number",isInRange:"in range",isInt16Array:"Int16Array",isInt32Array:"Int32Array",isInt8Array:"Int8Array",isInteger:"integer",isIterable:"Iterable",isMap:"Map",isNan:"NaN",isNativePromise:"native Promise",isNegativeNumber:"negative number",isNodeStream:"Node.js Stream",isNonEmptyArray:"non-empty array",isNonEmptyMap:"non-empty map",isNonEmptyObject:"non-empty object",isNonEmptySet:"non-empty set",isNonEmptyString:"non-empty string",isNonEmptyStringAndNotWhitespace:"non-empty string and not whitespace",isNull:"null",isNullOrUndefined:"null or undefined",isNumber:"number",isNumericString:"string with a number",isObject:"Object",isObservable:"Observable",isOddInteger:"odd integer",isPlainObject:"plain object",isPositiveNumber:"positive number",isPrimitive:"primitive",isPromise:"Promise",isPropertyKey:"PropertyKey",isRegExp:"RegExp",isSafeInteger:"integer",isSet:"Set",isSharedArrayBuffer:"SharedArrayBuffer",isString:"string",isSymbol:"symbol",isTruthy:"truthy",isTupleLike:"tuple-like",isTypedArray:"TypedArray",isUint16Array:"Uint16Array",isUint32Array:"Uint32Array",isUint8Array:"Uint8Array",isUint8ClampedArray:"Uint8ClampedArray",isUndefined:"undefined",isUrlInstance:"URL",isUrlSearchParams:"URLSearchParams",isUrlString:"string with a URL",isValidLength:"valid length",isWeakMap:"WeakMap",isWeakRef:"WeakRef",isWeakSet:"WeakSet",isWhitespaceString:"whitespace string"};function ot(r){return Object.keys(r)}var St=ot(it);var O=Kr;var Or="5.0.15";var at=Or;function ft(r){if(r.includes(".")){for(let e=r.length;e--;)if(r[e]===".")return r.slice(0,e)}return r}function ut(r,e){return Array.from(r).filter((s,m)=>m!==e)}var Nr={skipContainers:!0,arrayStrictComparison:!1};function Ir(r,e,s,m,l){let g=$($({},Nr),l);O(r)!==O(e)?m(`the first input arg is of a type ${O(r).toLowerCase()} but the second is ${O(e).toLowerCase()}. Values are - 1st:
11
+ ${JSON.stringify(r,null,4)}
12
12
  2nd:
13
- ${JSON.stringify(n,null,4)}`):X(n,(l,a,y,m)=>{let s=a!==void 0?a:l,{path:o}=y;if(F.default.has(e,o))if(!d.arrayStrictComparison&&N.plainObject(s)&&y.parentType==="array"&&y.parent.length>1){m.now=!0;let A=Array.from(y.path.includes(".")?F.default.get(e,Pe(o)):e);if(A.length<y.parent.length)g(`the first array: ${JSON.stringify(A,null,4)}
14
- has less objects than array we're matching against, ${JSON.stringify(y.parent,null,4)}`);else{let O=y.parent,E=A.map((b,$)=>$),j=O.map((b,$)=>$),u=[];for(let b=0,$=E.length;b<$;b++){let S=[],w=E[b],x=Te(E,b);S.push(w),x.forEach(se=>{u.push(Array.from(S).concat(se))})}let t=u.map(b=>b.map(($,S)=>[S,$])),c=0;for(let b=0,$=t.length;b<$;b++){let S=0;t[b].forEach(w=>{N.plainObject(O[w[0]])&&N.plainObject(A[w[1]])&&Object.keys(O[w[0]]).forEach(x=>{Object.keys(A[w[1]]).includes(x)&&(S+=1,A[w[1]][x]===O[w[0]][x]&&(S+=5))})}),t[b].push(S),S>c&&(c=S)}for(let b=0,$=t.length;b<$;b++)if(t[b][2]===c){t[b].forEach((S,w)=>{w<t[b].length-1&&ie(A[S[1]],O[S[0]],f,g,d)});break}}}else{let A=F.default.get(e,o);(!d.skipContainers||!N.plainObject(A)&&!Array.isArray(A))&&f(A,s,o)}else g(`the first input: ${JSON.stringify(e,null,4)}
15
- does not have the path "${o}", we were looking, would it contain a value ${JSON.stringify(s,null,0)}.`);return s})}return me(Be);})();
13
+ ${JSON.stringify(e,null,4)}`):ir(e,(a,o,p,c)=>{let n=o!==void 0?o:a,{path:i}=p;if(L.default.has(r,i))if(!g.arrayStrictComparison&&O.plainObject(n)&&p.parentType==="array"&&p.parent.length>1){c.now=!0;let d=Array.from(p.path.includes(".")?L.default.get(r,ft(i)):r);if(d.length<p.parent.length)m(`the first array: ${JSON.stringify(d,null,4)}
14
+ has less objects than array we're matching against, ${JSON.stringify(p.parent,null,4)}`);else{let E=p.parent,S=d.map((y,w)=>w),D=E.map((y,w)=>w),u=[];for(let y=0,w=S.length;y<w;y++){let h=[],x=S[y],F=ut(S,y);h.push(x),F.forEach(Dr=>{u.push(Array.from(h).concat(Dr))})}let t=u.map(y=>y.map((w,h)=>[h,w])),f=0;for(let y=0,w=t.length;y<w;y++){let h=0;t[y].forEach(x=>{O.plainObject(E[x[0]])&&O.plainObject(d[x[1]])&&Object.keys(E[x[0]]).forEach(F=>{Object.keys(d[x[1]]).includes(F)&&(h+=1,d[x[1]][F]===E[x[0]][F]&&(h+=5))})}),t[y].push(h),h>f&&(f=h)}for(let y=0,w=t.length;y<w;y++)if(t[y][2]===f){t[y].forEach((h,x)=>{x<t[y].length-1&&Ir(d[h[1]],E[h[0]],s,m,g)});break}}}else{let d=L.default.get(r,i);(!g.skipContainers||!O.plainObject(d)&&!Array.isArray(d))&&s(d,n,i)}else m(`the first input: ${JSON.stringify(r,null,4)}
15
+ does not have the path "${i}", we were looking, would it contain a value ${JSON.stringify(n,null,0)}.`);return n})}return Rr(pt);})();
16
16
  /**
17
17
  * @name codsen-utils
18
18
  * @fileoverview Various utility functions
19
- * @version 1.6.0
19
+ * @version 1.6.2
20
20
  * @author Roy Revelt, Codsen Ltd
21
21
  * @license MIT
22
22
  * {@link https://codsen.com/os/codsen-utils/}
@@ -24,7 +24,7 @@ does not have the path "${o}", we were looking, would it contain a value ${JSON.
24
24
  /**
25
25
  * @name ast-monkey-util
26
26
  * @fileoverview Utility library of AST helper functions
27
- * @version 3.0.6
27
+ * @version 3.0.7
28
28
  * @author Roy Revelt, Codsen Ltd
29
29
  * @license MIT
30
30
  * {@link https://codsen.com/os/ast-monkey-util/}
@@ -32,7 +32,7 @@ does not have the path "${o}", we were looking, would it contain a value ${JSON.
32
32
  /**
33
33
  * @name ast-monkey-traverse
34
34
  * @fileoverview Utility library to traverse AST
35
- * @version 4.0.11
35
+ * @version 4.0.13
36
36
  * @author Roy Revelt, Codsen Ltd
37
37
  * @license MIT
38
38
  * {@link https://codsen.com/os/ast-monkey-traverse/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ast-deep-contains",
3
- "version": "5.0.13",
3
+ "version": "5.0.15",
4
4
  "description": "Like t.same assert on array of objects, where element order doesn't matter.",
5
5
  "keywords": [
6
6
  "array",
@@ -54,7 +54,7 @@
54
54
  "cjs-on": "exit 0",
55
55
  "dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
56
56
  "devtest": "c8 npm run unit && npm run examples && npm run lint",
57
- "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --loglevel 'silent'",
57
+ "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --log-level 'silent'",
58
58
  "examples": "node '../../ops/scripts/run-examples.js'",
59
59
  "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
60
60
  "letspublish": "npm publish || :",
@@ -62,7 +62,7 @@
62
62
  "perf": "node perf/check.js",
63
63
  "prep": "echo 'ready'",
64
64
  "prettier": "prettier",
65
- "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --loglevel 'silent'",
65
+ "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --log-level 'silent'",
66
66
  "pretest": "npm run lect && npm run build",
67
67
  "test": "npm run devtest",
68
68
  "unit": "uvu test"
@@ -86,11 +86,11 @@
86
86
  "various": {}
87
87
  },
88
88
  "dependencies": {
89
- "@sindresorhus/is": "^5.4.1",
90
- "ast-monkey-traverse": "^4.0.11",
89
+ "@sindresorhus/is": "^6.0.0",
90
+ "ast-monkey-traverse": "^4.0.13",
91
91
  "object-path": "^0.11.8"
92
92
  },
93
93
  "devDependencies": {
94
- "@types/object-path": "^0.11.1"
94
+ "@types/object-path": "^0.11.2"
95
95
  }
96
96
  }
package/types/index.d.ts CHANGED
@@ -18,7 +18,14 @@ declare function deepContains(
18
18
  tree2: any,
19
19
  cb: Callback,
20
20
  errCb: ErrorCallback,
21
- opts?: Partial<Opts>
21
+ opts?: Partial<Opts>,
22
22
  ): void;
23
23
 
24
- export { Callback, ErrorCallback, Opts, deepContains, defaults, version };
24
+ export {
25
+ type Callback,
26
+ type ErrorCallback,
27
+ type Opts,
28
+ deepContains,
29
+ defaults,
30
+ version,
31
+ };