ast-compare 4.2.2 → 4.2.3
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/CHANGELOG.md +9 -0
- package/README.md +1 -1
- package/dist/ast-compare.esm.js +2 -3
- package/dist/ast-compare.umd.js +7 -7
- package/package.json +2 -3
- package/types/index.d.ts +46 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 4.2.3 (2026-09-01)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- align object predicate contracts ([2268d1b](https://github.com/codsen/codsen/commit/2268d1b75188c2ec9c13b14ace4360f6836fd1bd))
|
|
11
|
+
- **ast-compare:** correct matching semantics ([2ebcd60](https://github.com/codsen/codsen/commit/2ebcd601c231a01043f46bc5afbcac2eaaf91db3))
|
|
12
|
+
- **ast-contains-only-empty-space:** harden traversal contracts ([34cd77e](https://github.com/codsen/codsen/commit/34cd77e9273347ec8d8c6c69bbc85ea89b8b9aa9))
|
|
13
|
+
- **object-delete-key:** make deletion linear and safe ([6d2623f](https://github.com/codsen/codsen/commit/6d2623fc25bc0a67f9f291c2e530d5f7584e7d27))
|
|
14
|
+
|
|
6
15
|
## 4.2.2 (2026-08-22)
|
|
7
16
|
|
|
8
17
|
### Performance Improvements
|
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ import { strict as assert } from "node:assert";
|
|
|
36
36
|
|
|
37
37
|
import { compare } from "ast-compare";
|
|
38
38
|
|
|
39
|
-
//
|
|
39
|
+
// Check whether the second nested value is equal to, or a subset of, the first.
|
|
40
40
|
assert.equal(
|
|
41
41
|
compare(
|
|
42
42
|
{
|
package/dist/ast-compare.esm.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ast-compare
|
|
3
3
|
* @fileoverview Compare anything: AST, objects, arrays, strings and nested thereof
|
|
4
|
-
* @version 4.2.
|
|
4
|
+
* @version 4.2.3
|
|
5
5
|
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ast-compare/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import{empty as l}from"ast-contains-only-empty-space";import{hasOwnProp as D,isPlainObject as c,match as d}from"codsen-utils";var p="4.2.2";var x=p;function j(e){return c(e)?!Object.keys(e).length:Array.isArray(e)||typeof e=="string"?!e.length:!1}function b(e,n){return e===null||n===null?e===n:Array.isArray(e)||Array.isArray(n)?Array.isArray(e)&&Array.isArray(n):typeof e==typeof n}function $(e){return e===null?"null":Array.isArray(e)?"Array":c(e)?"Object":typeof e}var S={arrayOrder:"ordered",hungryForWhitespace:!1,matchStrictly:!1,verboseWhenMismatches:!1,useWildcards:!1};function w(e,n,t){return f(e,n,{...S,...t})}function f(e,n,t){let u,h,i,y=0;if(t.hungryForWhitespace&&t.matchStrictly&&c(e)&&l(e)&&c(n)&&!Object.keys(n).length)return!0;if((!t.hungryForWhitespace||t.hungryForWhitespace&&!l(e)&&l(n))&&c(e)&&Object.keys(e).length!==0&&c(n)&&Object.keys(n).length===0||!b(e,n)&&(!t.hungryForWhitespace||t.hungryForWhitespace&&!l(e)))return!1;if(typeof e=="string"&&typeof n=="string"){if(t.hungryForWhitespace&&l(e)&&l(n))return!0;let r=t.useWildcards?d(e,n,{caseSensitiveMatch:!0}):e===n;return t.verboseWhenMismatches?r?!0:`Given string ${n} is not matched! We have ${e} on the other end.`:r}if(Array.isArray(e)&&Array.isArray(n)){if(t.hungryForWhitespace&&l(n)&&(!t.matchStrictly||t.matchStrictly&&e.length===n.length))return!0;if(!t.hungryForWhitespace&&n.length>e.length||t.matchStrictly&&n.length!==e.length)return t.verboseWhenMismatches?`The length of a given array, ${JSON.stringify(n,null,4)} is ${n.length} but the length of an array on the other end, ${JSON.stringify(e,null,4)} is ${e.length}`:!1;if(n.length===0)return e.length===0?!0:t.verboseWhenMismatches?`The given array has no elements, but the array on the other end, ${JSON.stringify(e,null,4)} does have some`:!1;if(t.arrayOrder==="any")i=W(e,n,t);else{i=!0;for(let r=0,s=n.length;r<s;r++){i=!1;for(let o=y,a=e.length;o<a;o++)if(y+=1,f(e[o],n[r],t)===!0){i=!0;break}if(!i)break}}if(!i)return t.verboseWhenMismatches?`The given array ${JSON.stringify(n,null,4)} is not a subset of an array on the other end, ${JSON.stringify(e,null,4)}`:!1}else if(c(e)&&c(n)){if(u=Object.keys(n),h=Object.keys(e),t.matchStrictly&&u.length!==h.length){if(!t.verboseWhenMismatches)return!1;let r=new Set(u),s=new Set(h),o=u.filter(g=>!s.has(g)),a=o.length?` First object has unique keys: ${JSON.stringify(o,null,4)}.`:"",m=h.filter(g=>!r.has(g)),V=m.length?` Second object has unique keys:
|
|
11
|
-
${JSON.stringify(m,null,4)}.`:"";return`When matching strictly, we found that both objects have different amount of keys.${a}${V}`}for(let r of u){if(!D(e,r)){if(!t.useWildcards||t.useWildcards&&!r.includes("*"))return t.verboseWhenMismatches?`The given object has key "${r}" which the other-one does not have.`:!1;if(h.some(s=>d(s,r,{caseSensitiveMatch:!0})))continue;return t.verboseWhenMismatches?`The given object has key "${r}" which the other-one does not have.`:!1}if(e[r]!=null&&!b(e[r],n[r])){if(!(l(e[r])&&l(n[r])&&t.hungryForWhitespace))return t.verboseWhenMismatches?`The given key ${r} is of a different type on both objects. On the first-one, it's ${$(n[r])}, on the second-one, it's ${$(e[r])}`:!1}else if(f(e[r],n[r],t)!==!0)return t.verboseWhenMismatches?`The given piece ${JSON.stringify(n[r],null,4)} and ${JSON.stringify(e[r],null,4)} don't match.`:!1}}else return t.hungryForWhitespace&&l(e)&&l(n)&&(!t.matchStrictly||t.matchStrictly&&j(n))?!0:e===n;return!0}function W(e,n,t){let u=t.verboseWhenMismatches?{...t,verboseWhenMismatches:!1}:t,h=Array.from({length:n.length},(r,s)=>Array.from({length:e.length},(o,a)=>f(e[a],n[s],u)===!0)),i=new Array(e.length).fill(-1);function y(r,s){for(let o=0;o<e.length;o++){if(!h[r][o]||s[o])continue;s[o]=!0;let a=i[o];if(a===-1||y(a,s))return i[o]=r,!0}return!1}for(let r=0;r<n.length;r++)if(!y(r,new Array(e.length).fill(!1)))return!1;return!0}export{w as compare,S as defaults,x as version};
|
|
10
|
+
import{createMatcher as B,formatDiagnosticValue as b,hasOwnProp as N,isPlainObject as O,match as U}from"codsen-utils";var M="4.2.3";var re=M,A=Object.freeze({arrayOrder:"ordered",hungryForWhitespace:!1,matchStrictly:!1,reportCompletionFunc:null,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,verboseWhenMismatches:!1,useWildcards:!1}),se=Object.freeze({...A}),K=Object.freeze({caseSensitiveMatch:!0}),y=Object.freeze({matched:!0});function j(t,o,r,a){return{matched:!1,mismatch:{first:r,path:t,reason:o,second:a}}}function P(t,o){return`${t}[${JSON.stringify(o)}]`}function C(t){return t===null?"null":Array.isArray(t)?"array":O(t)?"plain object":typeof t}function L(t){return`Mismatch at ${t.path}: ${t.reason} First value is ${b(t.first,4)}; second pattern is ${b(t.second,4)}.`}function G(t,o,r){return t.get(o)?.has(r)===!0}function S(t,o,r){let a=t.get(o);a||(a=new WeakSet,t.set(o,a)),a.add(r)}function Q(t,o,r){t.get(o)?.delete(r)}function _(t){return typeof t=="string"&&t.trim().length===0}function $(t){if(Array.isArray(t)){let o=new Array(t.length);for(let r=0;r<t.length;r++)o[r]=t[r];return o}return Object.keys(t).map(o=>t[o])}function D(t,o){if(!Array.isArray(t)&&!O(t))return _(t);let r=o.get(t);if(r!==void 0)return r;let a=new WeakSet,n=[{allEmpty:!0,children:$(t),index:0,value:t}];a.add(t);let s=!1;for(;n.length;){let e=n[n.length-1];if(!e.allEmpty||e.index===e.children.length){s=e.allEmpty,o.set(e.value,s),a.delete(e.value),n.pop(),n.length&&!s&&(n[n.length-1].allEmpty=!1);continue}let d=e.children[e.index++];if(!Array.isArray(d)&&!O(d)){_(d)||(e.allEmpty=!1);continue}let f=o.get(d);f!==void 0?f||(e.allEmpty=!1):a.has(d)?e.allEmpty=!1:(a.add(d),n.push({allEmpty:!0,children:$(d),index:0,value:d}))}return s}function W(t,o){if(t)try{t(o)}catch{}}function V(){try{let t=Date.now();return Number.isFinite(t)?t:null}catch{return null}}function T(t,o=!1){let{opts:r}=t;if(!r.reportProgressFunc)return;let a=r.reportProgressFuncTo-r.reportProgressFuncFrom,n=t.comparisons+t.candidateComparisons,s=o?r.reportProgressFuncTo:r.reportProgressFuncFrom+a*Math.min(.99,n/(n+1e3));s!==t.lastProgress&&(t.lastProgress=s,W(r.reportProgressFunc,s))}function X(t){t.comparisons+=1,t.comparisons%1e3===0&&T(t)}function H(t){t.candidateComparisons+=1,t.candidateComparisons%1e3===0&&T(t)}function J(t){let o=new Uint32Array(t.length);for(let r=0;r<t.length;r++)o[r]=t[r];return o}function q(t,o){let r=t.length;if(r===0)return!0;let a=new Int32Array(r),n=new Int32Array(o),s=new Int32Array(r);a.fill(-1),n.fill(-1);let e=0;for(;;){let d=new Int32Array(r),f=0,u=0,m=!1;for(let c=0;c<r;c++)a[c]===-1?(s[c]=0,d[u++]=c):s[c]=-1;for(;f<u;){let c=d[f++];for(let p of t[c]){let l=n[p];l===-1?m=!0:s[l]===-1&&(s[l]=s[c]+1,d[u++]=l)}}if(!m)return e===r;let g=new Int32Array(r);for(let c=0;c<r;c++){if(a[c]!==-1)continue;let p=[c],l=[],x=!1;for(;p.length&&!x;){let F=p.length-1,k=p[F],w=t[k],i=!1;for(;g[k]<w.length;){let h=w[g[k]++],v=n[h];if(v===-1){a[k]=h,n[h]=k;for(let I=F-1;I>=0;I--){let E=p[I],R=l[I];a[E]=R,n[R]=E}x=!0;break}if(s[v]===s[k]+1){l[F]=h,p.push(v),i=!0;break}}!i&&!x&&(s[k]=-1,p.pop(),l.length=Math.max(0,p.length-1))}x&&(e+=1)}if(e===r)return!0}}function Y(t,o,r){let{opts:a}=r,n=[{first:t,kind:"pair",path:"$",second:o}],s=y;for(;n.length;){let e=n.pop();if(e.kind==="release-pair"){Q(r.activePairs,e.first,e.second);continue}if(e.kind==="ordered-array-after"){s.matched?n.push({...e,firstIndex:e.firstIndex+1,kind:"ordered-array",secondIndex:e.secondIndex+1}):(s=y,n.push({...e,firstIndex:e.firstIndex+1,kind:"ordered-array"}));continue}if(e.kind==="ordered-array"){e.secondIndex===e.second.length?s=y:e.firstIndex===e.first.length?s=j(e.path,"the second array is not an ordered subset of the first array.",e.first,e.second):(n.push({...e,kind:"ordered-array-after"}),n.push({first:e.first[e.firstIndex],kind:"pair",path:`${e.path}[${e.firstIndex}]`,second:e.second[e.secondIndex]}));continue}if(e.kind==="exact-object-after"){s.matched&&n.push({...e,index:e.index+1,kind:"exact-object"});continue}if(e.kind==="exact-object"){if(e.index<e.exactKeys.length){let i=e.exactKeys[e.index];n.push({...e,kind:"exact-object-after"}),n.push({first:e.first[i],kind:"pair",path:P(e.path,i),second:e.second[i]})}else e.wildcardKeys.length?n.push({adjacency:Array.from({length:e.wildcardKeys.length},()=>[]),first:e.first,firstIndex:0,firstKeys:e.wildcardFirstKeys,keyMatchers:e.wildcardKeys.map(i=>B(i,K)),kind:"object-candidates",path:e.path,second:e.second,secondIndex:0,wildcardKeys:e.wildcardKeys}):s=y;continue}if(e.kind==="array-candidates-after"){s.matched&&(e.adjacency[e.secondIndex].push(e.firstIndex),r.matchingEdges+=1),s=y,n.push({...e,firstIndex:e.firstIndex+1,kind:"array-candidates"});continue}if(e.kind==="array-candidates"){e.secondIndex===e.second.length?s=q(e.adjacency,e.first.length)?y:j(e.path,"the second array has no injective unordered match in the first array.",e.first,e.second):e.firstIndex===e.first.length?(e.adjacency[e.secondIndex]=J(e.adjacency[e.secondIndex]),n.push({...e,firstIndex:0,kind:"array-candidates",secondIndex:e.secondIndex+1})):(H(r),n.push({...e,kind:"array-candidates-after"}),n.push({first:e.first[e.firstIndex],kind:"pair",path:`${e.path}[${e.firstIndex}]`,second:e.second[e.secondIndex]}));continue}if(e.kind==="object-candidates-after"){s.matched&&(e.adjacency[e.secondIndex].push(e.firstIndex),r.matchingEdges+=1),s=y,n.push({...e,firstIndex:e.firstIndex+1,kind:"object-candidates"});continue}if(e.kind==="object-candidates"){if(e.secondIndex===e.wildcardKeys.length)s=q(e.adjacency,e.firstKeys.length)?y:j(e.path,"the wildcard properties in the second object have no injective key-and-value match in the first object.",e.first,e.second);else if(e.firstIndex===e.firstKeys.length)e.adjacency[e.secondIndex]=J(e.adjacency[e.secondIndex]),n.push({...e,firstIndex:0,kind:"object-candidates",secondIndex:e.secondIndex+1});else{H(r);let i=e.firstKeys[e.firstIndex];if(e.keyMatchers[e.secondIndex](i)){let h=e.wildcardKeys[e.secondIndex];n.push({...e,kind:"object-candidates-after"}),n.push({first:e.first[i],kind:"pair",path:P(e.path,i),second:e.second[h]})}else n.push({...e,firstIndex:e.firstIndex+1,kind:"object-candidates"})}continue}if(X(r),e.first===e.second){s=y;continue}if(a.hungryForWhitespace&&D(e.first,r.emptyCache)&&D(e.second,r.emptyCache)){s=y;continue}if(typeof e.first=="string"&&typeof e.second=="string"){s=(a.useWildcards?U(e.first,e.second,K):!1)?y:j(e.path,"the strings do not match.",e.first,e.second);continue}let d=Array.isArray(e.first)&&Array.isArray(e.second),f=O(e.first)&&O(e.second);if(!d&&!f){let i=C(e.first)===C(e.second)?"the values are not equal.":`the value types differ (${C(e.first)} versus ${C(e.second)}).`;s=j(e.path,i,e.first,e.second);continue}let u=e.first,m=e.second;if(G(r.activePairs,u,m)){s=y;continue}if(d){let i=e.first,h=e.second;if(a.matchStrictly&&i.length!==h.length||h.length>i.length||h.length===0&&i.length!==0){s=j(e.path,a.matchStrictly?"strict array matching requires equal lengths.":"the second array cannot be an empty or larger subset of the first array.",e.first,e.second);continue}S(r.activePairs,u,m),n.push({first:u,kind:"release-pair",second:m}),a.arrayOrder==="any"?n.push({adjacency:Array.from({length:h.length},()=>[]),first:i,firstIndex:0,kind:"array-candidates",path:e.path,second:h,secondIndex:0}):n.push({first:i,firstIndex:0,kind:"ordered-array",path:e.path,second:h,secondIndex:0});continue}let g=e.first,c=e.second,p=Object.keys(g),l=Object.keys(c);if(a.matchStrictly&&p.length!==l.length||l.length>p.length||l.length===0&&p.length!==0){s=j(e.path,a.matchStrictly?"strict object matching requires equal key counts.":"the second object cannot be an empty or larger subset of the first object.",e.first,e.second);continue}let x=[],F=[],k=new Set,w;for(let i of l)if(N(g,i))x.push(i),k.add(i);else if(a.useWildcards)F.push(i);else{w=i;break}if(w!==void 0){s=j(P(e.path,w),`the first object does not have the second object's key ${JSON.stringify(w)}.`,void 0,c[w]);continue}S(r.activePairs,u,m),n.push({first:u,kind:"release-pair",second:m}),n.push({exactKeys:x,first:g,index:0,kind:"exact-object",path:e.path,second:c,wildcardFirstKeys:p.filter(i=>!k.has(i)),wildcardKeys:F})}return s}function Z(t){if(t!=null&&!O(t))throw new TypeError(`ast-compare/compare(): [THROW_ID_03] The third argument must be a plain object, null, or undefined; received ${b(t,4)}.`);let o=t??{},r=new Set(Object.keys(A)),a=Object.keys(o).find(l=>!r.has(l));if(a!==void 0)throw new TypeError(`ast-compare/compare(): [THROW_ID_04] Unknown option ${JSON.stringify(a)}.`);let n=l=>N(o,l)?o[l]:A[l],s=n("arrayOrder");if(s!=="ordered"&&s!=="any")throw new TypeError(`ast-compare/compare(): [THROW_ID_05] opts.arrayOrder must be "ordered" or "any"; received ${b(s,4)}.`);let e=n("hungryForWhitespace");if(typeof e!="boolean")throw new TypeError(`ast-compare/compare(): [THROW_ID_06] opts.hungryForWhitespace must be a Boolean; received ${b(e,4)}.`);let d=n("matchStrictly");if(typeof d!="boolean")throw new TypeError(`ast-compare/compare(): [THROW_ID_07] opts.matchStrictly must be a Boolean; received ${b(d,4)}.`);let f=n("verboseWhenMismatches");if(typeof f!="boolean")throw new TypeError(`ast-compare/compare(): [THROW_ID_08] opts.verboseWhenMismatches must be a Boolean; received ${b(f,4)}.`);let u=n("useWildcards");if(typeof u!="boolean")throw new TypeError(`ast-compare/compare(): [THROW_ID_09] opts.useWildcards must be a Boolean; received ${b(u,4)}.`);let m=n("reportCompletionFunc");if(m!==null&&typeof m!="function")throw new TypeError(`ast-compare/compare(): [THROW_ID_10] opts.reportCompletionFunc must be a function or null; received ${b(m,4)}.`);let g=n("reportProgressFunc");if(g!==null&&typeof g!="function")throw new TypeError(`ast-compare/compare(): [THROW_ID_11] opts.reportProgressFunc must be a function or null; received ${b(g,4)}.`);let c=n("reportProgressFuncFrom");if(!Number.isFinite(c))throw new TypeError(`ast-compare/compare(): [THROW_ID_12] opts.reportProgressFuncFrom must be a finite number; received ${b(c,4)}.`);let p=n("reportProgressFuncTo");if(!Number.isFinite(p))throw new TypeError(`ast-compare/compare(): [THROW_ID_13] opts.reportProgressFuncTo must be a finite number; received ${b(p,4)}.`);if(c>p)throw new RangeError(`ast-compare/compare(): [THROW_ID_14] opts.reportProgressFuncFrom cannot exceed opts.reportProgressFuncTo; received ${c} and ${p}.`);return{arrayOrder:s,hungryForWhitespace:e,matchStrictly:d,reportCompletionFunc:m,reportProgressFunc:g,reportProgressFuncFrom:c,reportProgressFuncTo:p,verboseWhenMismatches:f,useWildcards:u}}function oe(...t){if(t.length<1)throw new TypeError("ast-compare/compare(): [THROW_ID_01] The first value is missing.");if(t.length<2)throw new TypeError("ast-compare/compare(): [THROW_ID_02] The second pattern is missing.");let[o,r,a]=t,n=Z(a),s=n.reportCompletionFunc?V():null,e={activePairs:new WeakMap,candidateComparisons:0,comparisons:0,emptyCache:new WeakMap,lastProgress:void 0,matchingEdges:0,opts:n};W(n.reportProgressFunc,n.reportProgressFuncFrom),e.lastProgress=n.reportProgressFuncFrom;let d=Y(o,r,e);if(T(e,!0),n.reportCompletionFunc){let f=V(),u=s===null||f===null?0:f-s;W(n.reportCompletionFunc,Object.freeze({candidateComparisons:e.candidateComparisons,comparisons:e.comparisons,matchingEdges:e.matchingEdges,timeTakenInMilliseconds:Number.isFinite(u)?Math.max(0,u):0}))}return d.matched?!0:n.verboseWhenMismatches?L(d.mismatch):!1}export{oe as compare,se as defaults,re as version};
|
package/dist/ast-compare.umd.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ast-compare
|
|
3
3
|
* @fileoverview Compare anything: AST, objects, arrays, strings and nested thereof
|
|
4
|
-
* @version 4.2.
|
|
4
|
+
* @version 4.2.3
|
|
5
5
|
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ast-compare/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var astCompare=(()=>{var S=Object.defineProperty,Q=Object.defineProperties,H=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertyNames,W=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var C=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v=(e,t)=>{for(var r in t||(t={}))M.call(t,r)&&C(e,r,t[r]);if(W)for(var r of W(t))Z.call(t,r)&&C(e,r,t[r]);return e},F=(e,t)=>Q(e,G(t));var Y=(e,t)=>{for(var r in t)S(e,r,{get:t[r],enumerable:!0})},X=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of z(t))!M.call(e,l)&&l!==r&&S(e,l,{get:()=>t[l],enumerable:!(o=H(t,l))||o.enumerable});return e};var ee=e=>X(S({},"__esModule",{value:!0}),e);var Ae={};Y(Ae,{compare:()=>me,defaults:()=>_,version:()=>ye});function te(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function E(e){if(typeof e=="string")return!e.trim();if(Array.isArray(e)){for(let t of e)if(!E(t))return!1}else if(te(e)){for(let t of Object.keys(e))if(!E(e[t]))return!1}return!0}function h(e){return typeof e=="string"?!e.trim():typeof e!="object"||!e?!1:E(e)}var De=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]),re=Object.prototype.hasOwnProperty;function g(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function ne(e){return typeof e=="string"}var R,we=(R=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:R.get;var je=Date.prototype.getTime;function I(e,t){return g(e)&&ne(t)&&re.call(e,t)}var oe=256,ie=1024,le=1,se=new Map,ue=new Map;function x(e){if(e>=97&&e<=122)return e-32;if(e>65535)return e;let t=String.fromCharCode(e).toUpperCase();if(t.length!==1)return e;let r=t.charCodeAt(0);return e>127&&r<128?e:r}function O(e,t,r,o,l,i){for(let s=0;s<l;s++){let n=e.charCodeAt(t+s),u=r.charCodeAt(o+s);if(i||(n>=97&&n<=122&&(n-=32),u>=97&&u<=122&&(u-=32)),n!==u)return!1}return!0}function B(e,t,r){let o=t.indexOf("\\");if(o===-1&&e===t)return!0;let l=t.indexOf("*");if(o===-1&&l===-1){if(r)return!1;for(let f=0;f<t.length;f++)if(t.charCodeAt(f)>127)return;return e.length===t.length&&O(e,0,t,0,t.length,!1)}if(o!==-1)return;let i=0,s=!1,n=-1;for(let f=0;f<t.length;f++){let m=t.charCodeAt(f);if(m>127)return;if(m===42){if(n=f,!s){if(i++,i>1)return;s=!0}}else s=!1}let u=n+1,a=t.length-u;return e.length<l+a?!1:O(e,0,t,0,l,r)&&O(e,e.length-a,t,u,a,r)}function ae(e){let t=new Uint32Array(e.length),r=0;for(let o=1;o<e.length;o++){for(;r>0&&e[o]!==e[r];)r=t[r-1];e[o]===e[r]&&r++,t[o]=r}return t}function fe(e,t){let r=[[]],o=!0,l=!1,i=!1,s=0;for(let c=0;c<e.length;){let y=e.codePointAt(c);if(y!==92){if(y===42)l=!0,i||(r.push([]),i=!0);else{let d=t?y:x(y);r[r.length-1].push(d),o&&(o=d<=127),s++,i=!1}c+=y>65535?2:1;continue}let b=c+1;for(;e.charCodeAt(b)===92;)b++;let A=b-c,p=e.codePointAt(b),$,k=!1;p===42?(k=A%2===0,$=k?A/2:(A-1)/2):p===void 0||p===10||p===13||p===8232||p===8233?$=Math.ceil(A/2):$=Math.floor(A/2);for(let d=0;d<$;d++)r[r.length-1].push(92),s++;if(k){i=!1,c=b;continue}if(p!==void 0){let d=t?p:x(p);r[r.length-1].push(d),o&&(o=d<=127),s++,b+=p>65535?2:1}i=!1,c=b}let n=l&&r[0].length===0,u=l&&r[r.length-1].length===0,a=[];for(let c of r)c.length&&a.push({values:c});let f=n?0:1,m=a.length-(u?0:1);for(let c=f;c<m;c++)a[c].values.length>le&&(a[c].failure=ae(a[c].values));return{asciiOnly:o,endsWithWildcard:u,hasWildcard:l,minimumInputLength:s,segments:a,startsWithWildcard:n}}function L(e,t){let r=t?se:ue,o=e.length<=ie;if(o){let i=r.get(e);if(i)return i}let l=fe(e,t);if(o){if(r.size>=oe){let i=r.keys().next().value;i!==void 0&&r.delete(i)}r.set(e,l)}return l}function T(e,t){if(t){let l=[];for(let i=0;i<e.length;){let s=e.codePointAt(i);l.push(s),i+=s>65535?2:1}return l}let r=new Uint32Array(e.length),o=0;for(let l=0;l<e.length;){let i=e.codePointAt(l);r[o]=x(i),o++,l+=i>65535?2:1}return o===r.length?r:r.subarray(0,o)}function D(e,t,r,o){for(let l=0;l<r.values.length;l++){let i=e.charCodeAt(t+l);if(!o&&i>=97&&i<=122&&(i-=32),i!==r.values[l])return!1}return!0}function ce(e,t,r,o,l){let i=o-t.values.length;if(i<r)return-1;if(!t.failure){for(let n=r;n<=i;n++)if(D(e,n,t,l))return n;return-1}let s=0;for(let n=r;n<o;n++){let u=e.charCodeAt(n);for(!l&&u>=97&&u<=122&&(u-=32);s>0&&u!==t.values[s];)s=t.failure[s-1];if(u===t.values[s]&&(s++,s===t.values.length))return n-s+1}return-1}function N(e,t,r){if(e.length<t.minimumInputLength)return!1;if(!t.hasWildcard)return e.length===t.minimumInputLength&&D(e,0,t.segments[0],r);let o=0,l=t.segments.length,i=0,s=e.length;if(!t.startsWithWildcard){let n=t.segments[0];if(!D(e,0,n,r))return!1;i=n.values.length,o++}if(!t.endsWithWildcard){l--;let n=t.segments[l];if(s-=n.values.length,!D(e,s,n,r))return!1}for(let n=o;n<l;n++){let u=t.segments[n],a=ce(e,u,i,s,r);if(a===-1)return!1;i=a+u.values.length}return!0}function w(e,t,r){for(let o=0;o<r.values.length;o++)if(e[t+o]!==r.values[o])return!1;return!0}function he(e,t,r,o){let l=o-t.values.length;if(l<r)return-1;if(!t.failure){for(let s=r;s<=l;s++)if(w(e,s,t))return s;return-1}let i=0;for(let s=r;s<o;s++){for(;i>0&&e[s]!==t.values[i];)i=t.failure[i-1];if(e[s]===t.values[i]&&(i++,i===t.values.length))return s-i+1}return-1}function P(e,t){if(e.length<t.minimumInputLength)return!1;if(!t.hasWildcard)return e.length===t.minimumInputLength&&w(e,0,t.segments[0]);let r=0,o=t.segments.length,l=0,i=e.length;if(!t.startsWithWildcard){let s=t.segments[0];if(!w(e,0,s))return!1;l=s.values.length,r++}if(!t.endsWithWildcard){o--;let s=t.segments[o];if(i-=s.values.length,!w(e,i,s))return!1}for(let s=r;s<o;s++){let n=t.segments[s],u=he(e,n,l,i);if(u===-1)return!1;l=u+n.values.length}return!0}function pe(e,t,r){let o=B(e,t,r);if(o!==void 0)return o;let l=L(t,r);return l.asciiOnly?N(e,l,r):P(T(e,r),l)}function J(e,t,r,o){var s;let l=B(e,t,r);if(l!==void 0)return l;let i=L(t,r);return i.asciiOnly?N(e,i,r):((s=o.tokens)!=null||(o.tokens=T(e,r)),P(o.tokens,i))}function V(e,t,r){if(typeof t!="string"&&!t.length)return!1;let o=r===void 0?!1:r.caseSensitiveMatch===!0;if(typeof t=="string"){let n=t.charCodeAt(0)===33,u=n?t.slice(1):t,a=pe(e,u,o);return n?!a:a}let l={},i=!1,s=!1;for(let n of t){let u=n.charCodeAt(0)===33,a=u?n.slice(1):n;if(u){if(J(e,a,o,l))return!1}else i=!0,!s&&J(e,a,o,l)&&(s=!0)}return i?s:!0}var K="4.2.2";var ye=K;function de(e){return g(e)?!Object.keys(e).length:Array.isArray(e)||typeof e=="string"?!e.length:!1}function U(e,t){return e===null||t===null?e===t:Array.isArray(e)||Array.isArray(t)?Array.isArray(e)&&Array.isArray(t):typeof e==typeof t}function q(e){return e===null?"null":Array.isArray(e)?"Array":g(e)?"Object":typeof e}var _={arrayOrder:"ordered",hungryForWhitespace:!1,matchStrictly:!1,verboseWhenMismatches:!1,useWildcards:!1};function me(e,t,r){return j(e,t,v(v({},_),r))}function j(e,t,r){let o,l,i,s=0;if(r.hungryForWhitespace&&r.matchStrictly&&g(e)&&h(e)&&g(t)&&!Object.keys(t).length)return!0;if((!r.hungryForWhitespace||r.hungryForWhitespace&&!h(e)&&h(t))&&g(e)&&Object.keys(e).length!==0&&g(t)&&Object.keys(t).length===0||!U(e,t)&&(!r.hungryForWhitespace||r.hungryForWhitespace&&!h(e)))return!1;if(typeof e=="string"&&typeof t=="string"){if(r.hungryForWhitespace&&h(e)&&h(t))return!0;let n=r.useWildcards?V(e,t,{caseSensitiveMatch:!0}):e===t;return r.verboseWhenMismatches?n?!0:"Given string ".concat(t," is not matched! We have ").concat(e," on the other end."):n}if(Array.isArray(e)&&Array.isArray(t)){if(r.hungryForWhitespace&&h(t)&&(!r.matchStrictly||r.matchStrictly&&e.length===t.length))return!0;if(!r.hungryForWhitespace&&t.length>e.length||r.matchStrictly&&t.length!==e.length)return r.verboseWhenMismatches?"The length of a given array, ".concat(JSON.stringify(t,null,4)," is ").concat(t.length," but the length of an array on the other end, ").concat(JSON.stringify(e,null,4)," is ").concat(e.length):!1;if(t.length===0)return e.length===0?!0:r.verboseWhenMismatches?"The given array has no elements, but the array on the other end, ".concat(JSON.stringify(e,null,4)," does have some"):!1;if(r.arrayOrder==="any")i=be(e,t,r);else{i=!0;for(let n=0,u=t.length;n<u;n++){i=!1;for(let a=s,f=e.length;a<f;a++)if(s+=1,j(e[a],t[n],r)===!0){i=!0;break}if(!i)break}}if(!i)return r.verboseWhenMismatches?"The given array ".concat(JSON.stringify(t,null,4)," is not a subset of an array on the other end, ").concat(JSON.stringify(e,null,4)):!1}else if(g(e)&&g(t)){if(o=Object.keys(t),l=Object.keys(e),r.matchStrictly&&o.length!==l.length){if(!r.verboseWhenMismatches)return!1;let n=new Set(o),u=new Set(l),a=o.filter(y=>!u.has(y)),f=a.length?" First object has unique keys: ".concat(JSON.stringify(a,null,4),"."):"",m=l.filter(y=>!n.has(y)),c=m.length?" Second object has unique keys:\n ".concat(JSON.stringify(m,null,4),"."):"";return"When matching strictly, we found that both objects have different amount of keys.".concat(f).concat(c)}for(let n of o){if(!I(e,n)){if(!r.useWildcards||r.useWildcards&&!n.includes("*"))return r.verboseWhenMismatches?'The given object has key "'.concat(n,'" which the other-one does not have.'):!1;if(l.some(u=>V(u,n,{caseSensitiveMatch:!0})))continue;return r.verboseWhenMismatches?'The given object has key "'.concat(n,'" which the other-one does not have.'):!1}if(e[n]!=null&&!U(e[n],t[n])){if(!(h(e[n])&&h(t[n])&&r.hungryForWhitespace))return r.verboseWhenMismatches?"The given key ".concat(n," is of a different type on both objects. On the first-one, it's ").concat(q(t[n]),", on the second-one, it's ").concat(q(e[n])):!1}else if(j(e[n],t[n],r)!==!0)return r.verboseWhenMismatches?"The given piece ".concat(JSON.stringify(t[n],null,4)," and ").concat(JSON.stringify(e[n],null,4)," don't match."):!1}}else return r.hungryForWhitespace&&h(e)&&h(t)&&(!r.matchStrictly||r.matchStrictly&&de(t))?!0:e===t;return!0}function be(e,t,r){let o=r.verboseWhenMismatches?F(v({},r),{verboseWhenMismatches:!1}):r,l=Array.from({length:t.length},(n,u)=>Array.from({length:e.length},(a,f)=>j(e[f],t[u],o)===!0)),i=new Array(e.length).fill(-1);function s(n,u){for(let a=0;a<e.length;a++){if(!l[n][a]||u[a])continue;u[a]=!0;let f=i[a];if(f===-1||s(f,u))return i[a]=n,!0}return!1}for(let n=0;n<t.length;n++)if(!s(n,new Array(e.length).fill(!1)))return!1;return!0}return ee(Ae);})();
|
|
10
|
+
"use strict";var astCompare=(()=>{var I=Object.defineProperty,we=Object.defineProperties,ke=Object.getOwnPropertyDescriptor,je=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var G=(e,n,r)=>n in e?I(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,k=(e,n)=>{for(var r in n||(n={}))Z.call(n,r)&&G(e,r,n[r]);if(Q)for(var r of Q(n))ve.call(n,r)&&G(e,r,n[r]);return e},O=(e,n)=>we(e,je(n));var xe=(e,n)=>{for(var r in n)I(e,r,{get:n[r],enumerable:!0})},Ae=(e,n,r,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let _ of Oe(n))!Z.call(e,_)&&_!==r&&I(e,_,{get:()=>n[_],enumerable:!(s=ke(n,_))||s.enumerable});return e};var Ce=e=>Ae(I({},"__esModule",{value:!0}),e);var rt={};xe(rt,{compare:()=>tt,defaults:()=>Je,version:()=>qe});function Fe(){let e=[],n=0,r=!1;return{append(s){return r?!1:n+s.length>1999?(e.push("\u2026"),n+=1,r=!0,!1):(e.push(s),n+=s.length,!0)},result(){return e.join("")},stopped(){return r}}}function Ie(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function P(e,n){if(e.append('"')){for(let r=0;r<n.length&&!e.stopped();r+=1){let s=n.charCodeAt(r);s===34?e.append('\\"'):s===92?e.append("\\\\"):s===8?e.append("\\b"):s===9?e.append("\\t"):s===10?e.append("\\n"):s===12?e.append("\\f"):s===13?e.append("\\r"):s<32||s===8232||s===8233||s>=55296&&s<=57343?e.append(Ie(s)):e.append(n[r])}e.append('"')}}function Pe(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function X(e,n){e.append("Symbol(");let r=String(n);r.length>8&&P(e,r.slice(7,-1)),e.append(")")}function Y(e,n){typeof n=="symbol"?X(e,n):P(e,String(n))}function j(e,n=0){let r=Fe(),s=n===4?4:0,_=new WeakSet,o=0;function t(a){s&&r.append(" ".repeat(a*s))}function i(a,f){a&&r.append(","),s&&(r.append("\n"),t(f+1))}function c(a,f,p){s&&f&&(r.append("\n"),t(p)),r.append(a)}function u(a,f){Object.prototype.hasOwnProperty.call(a,"value")?h(a.value,f):r.append(Pe(a))}function m(a,f){let p;try{p=Reflect.getOwnPropertyDescriptor(a,"length")}catch(l){r.append("[Uninspectable]");return}let g=p==null?void 0:p.value;if(!Number.isSafeInteger(g)||g<0){r.append("[Uninspectable]");return}r.append("[");let y=!1;for(let l=0;l<g&&!r.stopped();l+=1){if(i(y,f),y=!0,o>=50){r.append("[MaxEntries]");break}o+=1;let b;try{b=Reflect.getOwnPropertyDescriptor(a,String(l))}catch(C){r.append("[Uninspectable]");continue}b!=null&&b.enumerable?u(b,f+1):r.append("[Empty]")}c("]",y,f)}function w(a,f){let p;try{p=Reflect.ownKeys(a)}catch(y){r.append("[Uninspectable]");return}r.append("{");let g=!1;for(let y of p){if(r.stopped())break;if(o>=50){i(g,f),g=!0,P(r,"\u2026"),r.append(s?": ":":"),r.append("[MaxEntries]");break}o+=1;let l;try{l=Reflect.getOwnPropertyDescriptor(a,y)}catch(b){i(g,f),g=!0,Y(r,y),r.append(s?": ":":"),r.append("[Uninspectable]");continue}l!=null&&l.enumerable&&(i(g,f),g=!0,Y(r,y),r.append(s?": ":":"),u(l,f+1))}c("}",g,f)}function d(a,f){if(_.has(a)){r.append("[Circular]");return}if(f>=5){r.append("[MaxDepth]");return}let p;try{p=Array.isArray(a)}catch(g){r.append("[Uninspectable]");return}_.add(a);try{p?m(a,f):w(a,f)}finally{_.delete(a)}}function h(a,f){a===null?r.append("null"):typeof a=="string"?P(r,a):typeof a=="number"?r.append(Object.is(a,-0)?"-0":String(a)):typeof a=="boolean"?r.append(a?"true":"false"):typeof a>"u"?r.append("undefined"):typeof a=="bigint"?r.append("".concat(a,"n")):typeof a=="symbol"?X(r,a):typeof a=="function"?r.append("[Function]"):d(a,f)}try{return h(e,0),r.result()}catch(a){return"[Uninspectable]"}}var We=["_16_0_a_0_4_0_5_m_1_u_1_cp_4_b_e_4_7_0_1_0_3l_4_1_1_2_3_1_0_6_0_1_2_1_0_1_j_1_2a_1_3u_8_4l_1_11_2_0_","6_14_1z_q_4_3_19_16_z_1_1_2q_1_0_f_1_7_1_a_2_2_0_g_0_1_t_t_2g_b_0_o_w_9_1_4_0_5_l_4_0_9_0_3_0_n_o_7_","a_5_n_1_6_g_15_1m_1h_3_0_i_0_7_9_f_f_4_7_2_1_2_l_1_6_1_0_3_3_3_0_g_0_d_1_1_2_e_1_a_0_8_5_4_1_2_l_1_6","_1_1_1_1_1_1_v_3_1_0_j_2_g_8_1_2_1_l_1_6_1_1_1_4_3_0_i_0_f_1_n_0_b_7_2_1_2_l_1_6_1_1_1_4_3_0_u_1_1_2","_f_0_h_0_1_5_3_2_1_3_3_1_1_0_1_1_3_1_3_2_3_b_m_0_1g_7_1_2_1_m_1_f_3_0_q_2_1_1_2_1_u_0_4_7_1_2_1_m_1_","9_1_4_3_0_u_2_1_1_f_1_h_8_1_2_1_14_2_0_g_0_5_2_8_2_o_5_5_h_3_n_1_8_1_0_2_6_1m_1b_1_1_c_6_1m_1_1_0_1_","4_1_n_1_0_1_9_1_1_9_0_2_4_1_0_l_3_w_0_1r_7_1_z_r_4_37_16_k_0_g_5_4_3_3_0_3_1_7_2_4_c_c_0_h_11_1_0_5_","0_2_16_1_98_1_3_2_6_1_0_1_3_2_14_1_3_2_w_1_3_2_6_1_0_1_3_2_e_1_1k_1_3_2_1u_11_f_g_2d_2_5_3_h7_2_g_1_","p_5_22_6_7_7_h_d_i_e_h_e_c_1_2_f_1f_z_0_4_0_1v_2g_7_4_2_x_1_0_5_1x_a_u_1d_t_2_4_b_17_4_p_1i_m_9_1g_2","a_0_2l_1a_h_7_1i_t_d_1_a_17_q_z_15_2_a_z_2_a_5_16_2_2_15_3_1_5_1_1_3_0_5_5b_1s_7p_2_5_2_11_2_5_2_7_1","_0_1_0_1_0_1_u_2_1g_1_6_1_0_3_2_1_6_3_3_2_5_4_c_5_2_1_6_38_0_d_0_g_c_2t_0_4_0_2_9_1_0_3_4_6_0_1_0_1_","0_1_3_1_a_2_3_5_4_4_0_1g_1_22j_6c_6_3_3_1_c_11_1_0_5_0_2_1j_7_0_g_m_9_6_1_6_1_6_1_6_1_6_1_6_1_6_1_6_","28_0_d1_1_16_4_5_1_4_2d_6_2_1_2h_1_3_5_16_1_2l_h_v_1c_f_e8_533_1s_h3g_1v_19_2_7g_3_f_a_1_k_1a_g_u_2_","1x_1d_8_2_2u_2_29_k_g_1_2_1_3_1_m_t_1f_e_1d_1q_5_3_0_1_1_b_r_a_m_p_s_7_1a_s_0_g_4_1_9_a_4_1_14_n_2_1","_7_k_m_3_0_3_1d_1_0_3_1_2_4_2_0_1_0_o_2_2_a_7_2_c_5_2_5_2_5_9_6_1_6_1_16_1_d_6_36_t_8mb_c_m_4_1c_6is","_a5_2_2x_12_6_c_4_5_0_1_9_1_c_1_4_1_0_1_1_1_1_1_2z_x_a2_i_1r_2_1h_14_b_38_4_1_3q_10_p_6_p_b_2g_3_5_2","_5_2_5_2_2_z_b_1_p_1_i_1_1_1_e_2_d_y_3e_at_s_3_1c_1b_v_d_j_1_7_6_11_a_t_2_z_4_7_1c_4d_i_z_4_z_4_13_8","_1f_c_a_1_e_1_6_1_1_1_a_1_e_1_6_1_1_3_1f_c_8m_9_l_a_7_o_5_1_15_1_8_1x_5_2_0_1_17_1_1_3_0_2_m_a_m_9_u","_1t_i_1_1_a_l_a_p_6_p_12_1j_6_1_1s_0_f_3_1_2_1_s_16_s_3_s_z_7_1_r_r_1h_a_l_a_i_d_h_32_20_1j_1e_d_1e_","d_z_12_r_9_m_6y_15_6_1_g_5_1k_s_a_0_8_l_16_h_1a_k_r_m_c_1g_1l_1_2_0_d_18_w_o_q_z_t_0_2_0_8_y_3_0_c_1","b_e_3_l_0_1_0_z_h_1_o_j_1_1r_6_1_0_1_3_1_e_1_9_7_1a_12_7_2_1_2_l_1_6_1_1_1_4_3_0_i_0_c_4_u_9_1_0_2_0","_1_11_1_0_p_0_1_0_18_1g_i_3_k_2_u_1b_k_1_1_0_54_1a_15_3_10_1b_k_0_1n_16_d_0_1z_q_11_6_55_17_38_1r_v_","7_2_0_2_7_1_1_1_n_f_0_1_0_2m_7_2_12_g_0_1_0_s_0_a_13_7_0_l_0_b_19_j_0_i_20_5j_w_v_8_1_10_h_0_1d_t_34","_6_1_1_1_11_l_0_p_5_1_1_1_v_e_0_n_17_78_i_f_0_1_c_1_x_3g_0_27_pl_6e_5f_218_2o_f_tr_h_5_p_32y_5_g6_5a","1_t_1cy_fs_7_u_h_26_h_t_i_1b_g_3_v_k_5_i_c0_18_5v_1r_w_o_2_o_18_22_5_0_1u_c_1s_1_1_0_e_1_c_5p1_15_v_","2p_36_6pp_3_1_6_1_1_1_82_f_0_t_2_2_0_e_3_8_az_1s4_2y_5_c_3_8_7_9_4me_2c_1_1y_1_1_2_0_2_1_2_3_1_b_1_0","_1_6_1_1s_1_3_2_7_1_6_1_r_1_3_1_4_1_0_3_6_1_9f_2_o_1_o_1_u_1_o_1_u_1_o_1_u_1_o_1_u_1_o_1_7_1f8_u_6_5","_79_1p_42_18_a_6_g_0_8x_t_i_17_dg_r_6c_t_2_0_5r_u_1_2_1_1_1_6_2_4_9_1_68_6_1_3_1_1_1_e_1_5g_1n_1v_7_","0_xg_3_1_q_1_1_1_0_2_0_1_9_1_3_1_0_1_0_6_0_4_0_1_0_1_0_1_2_1_1_1_0_2_0_1_0_1_0_1_0_1_0_1_1_1_0_2_3_1","_6_1_3_1_3_1_0_1_9_1_g_5_2_1_4_1_g_3es_wyn_w_3dp_2_4gd_2_5rk_f_h9_1wi_f1_15u_3t6_5_6jt"].join(""),E=We.slice(1).split("_"),Se=[],ee=127;for(let e=0;e<E.length;e+=2){let n=ee+1+Number.parseInt(E[e],36),r=n+Number.parseInt(E[e+1],36);Se.push([n,r]),ee=r}var it=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]),Re=Object.prototype.hasOwnProperty,oe=Function.prototype.toString,Ee=oe.call(Object);var at=Map.prototype.entries,ct=Set.prototype.values;var re,lt=(re=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength"))==null?void 0:re.get,ne,ut=(ne=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags"))==null?void 0:ne.get,se,dt=(se=Object.getOwnPropertyDescriptor(RegExp.prototype,"global"))==null?void 0:se.get,_e,ft=(_e=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:_e.get,pt=RegExp.prototype.test;function A(e){var s;if(e==null||typeof e!="object")return!1;let n=Object.getPrototypeOf(e);if(n===null||n===Object.prototype)return!0;let r=Object.getOwnPropertyDescriptor(n,"constructor");return!r||!("value"in r)||typeof r.value!="function"?!1:((s=Object.getOwnPropertyDescriptor(r.value,"prototype"))==null?void 0:s.value)===n&&oe.call(r.value)===Ee}var ht=Date.prototype.getTime;function $(e,n){return e!=null&&Re.call(e,n)}var Me=256,De=1024,Te=1,$e=new Map,Ke=new Map;function T(e){if(e>=97&&e<=122)return e-32;if(e>65535)return e;let n=String.fromCharCode(e).toUpperCase();if(n.length!==1)return e;let r=n.charCodeAt(0);return e>127&&r<128?e:r}function M(e,n,r,s,_,o){for(let t=0;t<_;t++){let i=e.charCodeAt(n+t),c=r.charCodeAt(s+t);if(o||(i>=97&&i<=122&&(i-=32),c>=97&&c<=122&&(c-=32)),i!==c)return!1}return!0}function ie(e,n,r){let s=n.indexOf("\\");if(s===-1&&e===n)return!0;let _=n.indexOf("*");if(s===-1&&_===-1){if(r)return!1;for(let m=0;m<n.length;m++)if(n.charCodeAt(m)>127)return;return e.length===n.length&&M(e,0,n,0,n.length,!1)}if(s!==-1)return;let o=0,t=!1,i=-1;for(let m=0;m<n.length;m++){let w=n.charCodeAt(m);if(w>127)return;if(w===42){if(i=m,!t){if(o++,o>1)return;t=!0}}else t=!1}let c=i+1,u=n.length-c;return e.length<_+u?!1:M(e,0,n,0,_,r)&&M(e,e.length-u,n,c,u,r)}function Be(e){let n=new Uint32Array(e.length),r=0;for(let s=1;s<e.length;s++){for(;r>0&&e[s]!==e[r];)r=n[r-1];e[s]===e[r]&&r++,n[s]=r}return n}function Ne(e,n){let r=[[]],s=!0,_=!1,o=!1,t=0;for(let d=0;d<e.length;){let h=e.codePointAt(d);if(h!==92){if(h===42)_=!0,o||(r.push([]),o=!0);else{let l=n?h:T(h);r[r.length-1].push(l),s&&(s=l<=127),t++,o=!1}d+=h>65535?2:1;continue}let a=d+1;for(;e.charCodeAt(a)===92;)a++;let f=a-d,p=e.codePointAt(a),g,y=!1;p===42?(y=f%2===0,g=y?f/2:(f-1)/2):p===void 0||p===10||p===13||p===8232||p===8233?g=Math.ceil(f/2):g=Math.floor(f/2);for(let l=0;l<g;l++)r[r.length-1].push(92),t++;if(y){o=!1,d=a;continue}if(p!==void 0){let l=n?p:T(p);r[r.length-1].push(l),s&&(s=l<=127),t++,a+=p>65535?2:1}o=!1,d=a}let i=_&&r[0].length===0,c=_&&r[r.length-1].length===0,u=[];for(let d of r)d.length&&u.push({values:d});let m=i?0:1,w=u.length-(c?0:1);for(let d=m;d<w;d++)u[d].values.length>Te&&(u[d].failure=Be(u[d].values));return{asciiOnly:s,endsWithWildcard:c,hasWildcard:_,minimumInputLength:t,segments:u,startsWithWildcard:i}}function K(e,n){let r=n?$e:Ke,s=e.length<=De;if(s){let o=r.get(e);if(o)return o}let _=Ne(e,n);if(s){if(r.size>=Me){let o=r.keys().next().value;o!==void 0&&r.delete(o)}r.set(e,_)}return _}function B(e,n){if(n){let _=[];for(let o=0;o<e.length;){let t=e.codePointAt(o);_.push(t),o+=t>65535?2:1}return _}let r=new Uint32Array(e.length),s=0;for(let _=0;_<e.length;){let o=e.codePointAt(_);r[s]=T(o),s++,_+=o>65535?2:1}return s===r.length?r:r.subarray(0,s)}function W(e,n,r,s){for(let _=0;_<r.values.length;_++){let o=e.charCodeAt(n+_);if(!s&&o>=97&&o<=122&&(o-=32),o!==r.values[_])return!1}return!0}function Ve(e,n,r,s,_){let o=s-n.values.length;if(o<r)return-1;if(!n.failure){for(let i=r;i<=o;i++)if(W(e,i,n,_))return i;return-1}let t=0;for(let i=r;i<s;i++){let c=e.charCodeAt(i);for(!_&&c>=97&&c<=122&&(c-=32);t>0&&c!==n.values[t];)t=n.failure[t-1];if(c===n.values[t]&&(t++,t===n.values.length))return i-t+1}return-1}function N(e,n,r){if(e.length<n.minimumInputLength)return!1;if(!n.hasWildcard)return e.length===n.minimumInputLength&&W(e,0,n.segments[0],r);let s=0,_=n.segments.length,o=0,t=e.length;if(!n.startsWithWildcard){let i=n.segments[0];if(!W(e,0,i,r))return!1;o=i.values.length,s++}if(!n.endsWithWildcard){_--;let i=n.segments[_];if(t-=i.values.length,!W(e,t,i,r))return!1}for(let i=s;i<_;i++){let c=n.segments[i],u=Ve(e,c,o,t,r);if(u===-1)return!1;o=u+c.values.length}return!0}function S(e,n,r){for(let s=0;s<r.values.length;s++)if(e[n+s]!==r.values[s])return!1;return!0}function ze(e,n,r,s){let _=s-n.values.length;if(_<r)return-1;if(!n.failure){for(let t=r;t<=_;t++)if(S(e,t,n))return t;return-1}let o=0;for(let t=r;t<s;t++){for(;o>0&&e[t]!==n.values[o];)o=n.failure[o-1];if(e[t]===n.values[o]&&(o++,o===n.values.length))return t-o+1}return-1}function V(e,n){if(e.length<n.minimumInputLength)return!1;if(!n.hasWildcard)return e.length===n.minimumInputLength&&S(e,0,n.segments[0]);let r=0,s=n.segments.length,_=0,o=e.length;if(!n.startsWithWildcard){let t=n.segments[0];if(!S(e,0,t))return!1;_=t.values.length,r++}if(!n.endsWithWildcard){s--;let t=n.segments[s];if(o-=t.values.length,!S(e,o,t))return!1}for(let t=r;t<s;t++){let i=n.segments[t],c=ze(e,i,_,o);if(c===-1)return!1;_=c+i.values.length}return!0}function Le(e,n,r){let s=ie(e,n,r);if(s!==void 0)return s;let _=K(n,r);return _.asciiOnly?N(e,_,r):V(B(e,r),_)}function te(e,n,r,s){var t;let _=ie(e,n,r);if(_!==void 0)return _;let o=K(n,r);return o.asciiOnly?N(e,o,r):((t=s.tokens)!=null||(s.tokens=B(e,r)),V(s.tokens,o))}function Ue(e,n){let r=e.charCodeAt(0)===33,s=r?e.slice(1):e;return{compiled:s.length===0?void 0:K(s,n),negative:r}}function D(e,n,r,s){var o;let _;return n.compiled?n.compiled.asciiOnly?_=N(e,n.compiled,r):((o=s.tokens)!=null||(s.tokens=B(e,r)),_=V(s.tokens,n.compiled)):_=e.length===0,n.negative?!_:_}function ae(e,n){let r=(n==null?void 0:n.caseSensitiveMatch)===!0,s=typeof e=="string"?[e]:Array.from(new Set(e));if(s.length===0)return()=>!1;let _=s.map(o=>Ue(o,r));if(typeof e=="string"){let o=_[0];return t=>D(t,o,r,{})}return o=>{let t={},i=!1,c=!1;for(let u of _)if(u.negative){if(!D(o,u,r,t))return!1}else i=!0,!c&&D(o,u,r,t)&&(c=!0);return i?c:!0}}function ce(e,n,r){if(typeof n!="string"&&!n.length)return!1;let s=r===void 0?!1:r.caseSensitiveMatch===!0;if(typeof n=="string"){let i=n.charCodeAt(0)===33,c=i?n.slice(1):n,u=Le(e,c,s);return i?!u:u}let _={},o=!1,t=!1;for(let i of n){let c=i.charCodeAt(0)===33,u=c?i.slice(1):i;if(c){if(te(e,u,s,_))return!1}else o=!0,!t&&te(e,u,s,_)&&(t=!0)}return o?t:!0}var le="4.2.3";var qe=le,L=Object.freeze({arrayOrder:"ordered",hungryForWhitespace:!1,matchStrictly:!1,reportCompletionFunc:null,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,verboseWhenMismatches:!1,useWildcards:!1}),Je=Object.freeze(k({},L)),ue=Object.freeze({caseSensitiveMatch:!0}),v=Object.freeze({matched:!0});function x(e,n,r,s){return{matched:!1,mismatch:{first:r,path:e,reason:n,second:s}}}function z(e,n){return"".concat(e,"[").concat(JSON.stringify(n),"]")}function R(e){return e===null?"null":Array.isArray(e)?"array":A(e)?"plain object":typeof e}function Qe(e){return"Mismatch at ".concat(e.path,": ").concat(e.reason," First value is ").concat(j(e.first,4),"; second pattern is ").concat(j(e.second,4),".")}function Ge(e,n,r){var s;return((s=e.get(n))==null?void 0:s.has(r))===!0}function de(e,n,r){let s=e.get(n);s||(s=new WeakSet,e.set(n,s)),s.add(r)}function Ze(e,n,r){var s;(s=e.get(n))==null||s.delete(r)}function fe(e){return typeof e=="string"&&e.trim().length===0}function pe(e){if(Array.isArray(e)){let n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r];return n}return Object.keys(e).map(n=>e[n])}function he(e,n){if(!Array.isArray(e)&&!A(e))return fe(e);let r=n.get(e);if(r!==void 0)return r;let s=new WeakSet,_=[{allEmpty:!0,children:pe(e),index:0,value:e}];s.add(e);let o=!1;for(;_.length;){let t=_[_.length-1];if(!t.allEmpty||t.index===t.children.length){o=t.allEmpty,n.set(t.value,o),s.delete(t.value),_.pop(),_.length&&!o&&(_[_.length-1].allEmpty=!1);continue}let i=t.children[t.index++];if(!Array.isArray(i)&&!A(i)){fe(i)||(t.allEmpty=!1);continue}let c=n.get(i);c!==void 0?c||(t.allEmpty=!1):s.has(i)?t.allEmpty=!1:(s.add(i),_.push({allEmpty:!0,children:pe(i),index:0,value:i}))}return o}function U(e,n){if(e)try{e(n)}catch(r){}}function ge(){try{let e=Date.now();return Number.isFinite(e)?e:null}catch(e){return null}}function H(e,n=!1){let{opts:r}=e;if(!r.reportProgressFunc)return;let s=r.reportProgressFuncTo-r.reportProgressFuncFrom,_=e.comparisons+e.candidateComparisons,o=n?r.reportProgressFuncTo:r.reportProgressFuncFrom+s*Math.min(.99,_/(_+1e3));o!==e.lastProgress&&(e.lastProgress=o,U(r.reportProgressFunc,o))}function Ye(e){e.comparisons+=1,e.comparisons%1e3===0&&H(e)}function me(e){e.candidateComparisons+=1,e.candidateComparisons%1e3===0&&H(e)}function ye(e){let n=new Uint32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r];return n}function be(e,n){let r=e.length;if(r===0)return!0;let s=new Int32Array(r),_=new Int32Array(n),o=new Int32Array(r);s.fill(-1),_.fill(-1);let t=0;for(;;){let i=new Int32Array(r),c=0,u=0,m=!1;for(let d=0;d<r;d++)s[d]===-1?(o[d]=0,i[u++]=d):o[d]=-1;for(;c<u;){let d=i[c++];for(let h of e[d]){let a=_[h];a===-1?m=!0:o[a]===-1&&(o[a]=o[d]+1,i[u++]=a)}}if(!m)return t===r;let w=new Int32Array(r);for(let d=0;d<r;d++){if(s[d]!==-1)continue;let h=[d],a=[],f=!1;for(;h.length&&!f;){let p=h.length-1,g=h[p],y=e[g],l=!1;for(;w[g]<y.length;){let b=y[w[g]++],C=_[b];if(C===-1){s[g]=b,_[b]=g;for(let F=p-1;F>=0;F--){let q=h[F],J=a[F];s[q]=J,_[J]=q}f=!0;break}if(o[C]===o[g]+1){a[p]=b,h.push(C),l=!0;break}}!l&&!f&&(o[g]=-1,h.pop(),a.length=Math.max(0,h.length-1))}f&&(t+=1)}if(t===r)return!0}}function Xe(e,n,r){let{opts:s}=r,_=[{first:e,kind:"pair",path:"$",second:n}],o=v;for(;_.length;){let t=_.pop();if(t.kind==="release-pair"){Ze(r.activePairs,t.first,t.second);continue}if(t.kind==="ordered-array-after"){o.matched?_.push(O(k({},t),{firstIndex:t.firstIndex+1,kind:"ordered-array",secondIndex:t.secondIndex+1})):(o=v,_.push(O(k({},t),{firstIndex:t.firstIndex+1,kind:"ordered-array"})));continue}if(t.kind==="ordered-array"){t.secondIndex===t.second.length?o=v:t.firstIndex===t.first.length?o=x(t.path,"the second array is not an ordered subset of the first array.",t.first,t.second):(_.push(O(k({},t),{kind:"ordered-array-after"})),_.push({first:t.first[t.firstIndex],kind:"pair",path:"".concat(t.path,"[").concat(t.firstIndex,"]"),second:t.second[t.secondIndex]}));continue}if(t.kind==="exact-object-after"){o.matched&&_.push(O(k({},t),{index:t.index+1,kind:"exact-object"}));continue}if(t.kind==="exact-object"){if(t.index<t.exactKeys.length){let l=t.exactKeys[t.index];_.push(O(k({},t),{kind:"exact-object-after"})),_.push({first:t.first[l],kind:"pair",path:z(t.path,l),second:t.second[l]})}else t.wildcardKeys.length?_.push({adjacency:Array.from({length:t.wildcardKeys.length},()=>[]),first:t.first,firstIndex:0,firstKeys:t.wildcardFirstKeys,keyMatchers:t.wildcardKeys.map(l=>ae(l,ue)),kind:"object-candidates",path:t.path,second:t.second,secondIndex:0,wildcardKeys:t.wildcardKeys}):o=v;continue}if(t.kind==="array-candidates-after"){o.matched&&(t.adjacency[t.secondIndex].push(t.firstIndex),r.matchingEdges+=1),o=v,_.push(O(k({},t),{firstIndex:t.firstIndex+1,kind:"array-candidates"}));continue}if(t.kind==="array-candidates"){t.secondIndex===t.second.length?o=be(t.adjacency,t.first.length)?v:x(t.path,"the second array has no injective unordered match in the first array.",t.first,t.second):t.firstIndex===t.first.length?(t.adjacency[t.secondIndex]=ye(t.adjacency[t.secondIndex]),_.push(O(k({},t),{firstIndex:0,kind:"array-candidates",secondIndex:t.secondIndex+1}))):(me(r),_.push(O(k({},t),{kind:"array-candidates-after"})),_.push({first:t.first[t.firstIndex],kind:"pair",path:"".concat(t.path,"[").concat(t.firstIndex,"]"),second:t.second[t.secondIndex]}));continue}if(t.kind==="object-candidates-after"){o.matched&&(t.adjacency[t.secondIndex].push(t.firstIndex),r.matchingEdges+=1),o=v,_.push(O(k({},t),{firstIndex:t.firstIndex+1,kind:"object-candidates"}));continue}if(t.kind==="object-candidates"){if(t.secondIndex===t.wildcardKeys.length)o=be(t.adjacency,t.firstKeys.length)?v:x(t.path,"the wildcard properties in the second object have no injective key-and-value match in the first object.",t.first,t.second);else if(t.firstIndex===t.firstKeys.length)t.adjacency[t.secondIndex]=ye(t.adjacency[t.secondIndex]),_.push(O(k({},t),{firstIndex:0,kind:"object-candidates",secondIndex:t.secondIndex+1}));else{me(r);let l=t.firstKeys[t.firstIndex];if(t.keyMatchers[t.secondIndex](l)){let b=t.wildcardKeys[t.secondIndex];_.push(O(k({},t),{kind:"object-candidates-after"})),_.push({first:t.first[l],kind:"pair",path:z(t.path,l),second:t.second[b]})}else _.push(O(k({},t),{firstIndex:t.firstIndex+1,kind:"object-candidates"}))}continue}if(Ye(r),t.first===t.second){o=v;continue}if(s.hungryForWhitespace&&he(t.first,r.emptyCache)&&he(t.second,r.emptyCache)){o=v;continue}if(typeof t.first=="string"&&typeof t.second=="string"){o=(s.useWildcards?ce(t.first,t.second,ue):!1)?v:x(t.path,"the strings do not match.",t.first,t.second);continue}let i=Array.isArray(t.first)&&Array.isArray(t.second),c=A(t.first)&&A(t.second);if(!i&&!c){let l=R(t.first)===R(t.second)?"the values are not equal.":"the value types differ (".concat(R(t.first)," versus ").concat(R(t.second),").");o=x(t.path,l,t.first,t.second);continue}let u=t.first,m=t.second;if(Ge(r.activePairs,u,m)){o=v;continue}if(i){let l=t.first,b=t.second;if(s.matchStrictly&&l.length!==b.length||b.length>l.length||b.length===0&&l.length!==0){o=x(t.path,s.matchStrictly?"strict array matching requires equal lengths.":"the second array cannot be an empty or larger subset of the first array.",t.first,t.second);continue}de(r.activePairs,u,m),_.push({first:u,kind:"release-pair",second:m}),s.arrayOrder==="any"?_.push({adjacency:Array.from({length:b.length},()=>[]),first:l,firstIndex:0,kind:"array-candidates",path:t.path,second:b,secondIndex:0}):_.push({first:l,firstIndex:0,kind:"ordered-array",path:t.path,second:b,secondIndex:0});continue}let w=t.first,d=t.second,h=Object.keys(w),a=Object.keys(d);if(s.matchStrictly&&h.length!==a.length||a.length>h.length||a.length===0&&h.length!==0){o=x(t.path,s.matchStrictly?"strict object matching requires equal key counts.":"the second object cannot be an empty or larger subset of the first object.",t.first,t.second);continue}let f=[],p=[],g=new Set,y;for(let l of a)if($(w,l))f.push(l),g.add(l);else if(s.useWildcards)p.push(l);else{y=l;break}if(y!==void 0){o=x(z(t.path,y),"the first object does not have the second object's key ".concat(JSON.stringify(y),"."),void 0,d[y]);continue}de(r.activePairs,u,m),_.push({first:u,kind:"release-pair",second:m}),_.push({exactKeys:f,first:w,index:0,kind:"exact-object",path:t.path,second:d,wildcardFirstKeys:h.filter(l=>!g.has(l)),wildcardKeys:p})}return o}function et(e){if(e!=null&&!A(e))throw new TypeError("ast-compare/compare(): [THROW_ID_03] The third argument must be a plain object, null, or undefined; received ".concat(j(e,4),"."));let n=e!=null?e:{},r=new Set(Object.keys(L)),s=Object.keys(n).find(a=>!r.has(a));if(s!==void 0)throw new TypeError("ast-compare/compare(): [THROW_ID_04] Unknown option ".concat(JSON.stringify(s),"."));let _=a=>$(n,a)?n[a]:L[a],o=_("arrayOrder");if(o!=="ordered"&&o!=="any")throw new TypeError('ast-compare/compare(): [THROW_ID_05] opts.arrayOrder must be "ordered" or "any"; received '.concat(j(o,4),"."));let t=_("hungryForWhitespace");if(typeof t!="boolean")throw new TypeError("ast-compare/compare(): [THROW_ID_06] opts.hungryForWhitespace must be a Boolean; received ".concat(j(t,4),"."));let i=_("matchStrictly");if(typeof i!="boolean")throw new TypeError("ast-compare/compare(): [THROW_ID_07] opts.matchStrictly must be a Boolean; received ".concat(j(i,4),"."));let c=_("verboseWhenMismatches");if(typeof c!="boolean")throw new TypeError("ast-compare/compare(): [THROW_ID_08] opts.verboseWhenMismatches must be a Boolean; received ".concat(j(c,4),"."));let u=_("useWildcards");if(typeof u!="boolean")throw new TypeError("ast-compare/compare(): [THROW_ID_09] opts.useWildcards must be a Boolean; received ".concat(j(u,4),"."));let m=_("reportCompletionFunc");if(m!==null&&typeof m!="function")throw new TypeError("ast-compare/compare(): [THROW_ID_10] opts.reportCompletionFunc must be a function or null; received ".concat(j(m,4),"."));let w=_("reportProgressFunc");if(w!==null&&typeof w!="function")throw new TypeError("ast-compare/compare(): [THROW_ID_11] opts.reportProgressFunc must be a function or null; received ".concat(j(w,4),"."));let d=_("reportProgressFuncFrom");if(!Number.isFinite(d))throw new TypeError("ast-compare/compare(): [THROW_ID_12] opts.reportProgressFuncFrom must be a finite number; received ".concat(j(d,4),"."));let h=_("reportProgressFuncTo");if(!Number.isFinite(h))throw new TypeError("ast-compare/compare(): [THROW_ID_13] opts.reportProgressFuncTo must be a finite number; received ".concat(j(h,4),"."));if(d>h)throw new RangeError("ast-compare/compare(): [THROW_ID_14] opts.reportProgressFuncFrom cannot exceed opts.reportProgressFuncTo; received ".concat(d," and ").concat(h,"."));return{arrayOrder:o,hungryForWhitespace:t,matchStrictly:i,reportCompletionFunc:m,reportProgressFunc:w,reportProgressFuncFrom:d,reportProgressFuncTo:h,verboseWhenMismatches:c,useWildcards:u}}function tt(...e){if(e.length<1)throw new TypeError("ast-compare/compare(): [THROW_ID_01] The first value is missing.");if(e.length<2)throw new TypeError("ast-compare/compare(): [THROW_ID_02] The second pattern is missing.");let[n,r,s]=e,_=et(s),o=_.reportCompletionFunc?ge():null,t={activePairs:new WeakMap,candidateComparisons:0,comparisons:0,emptyCache:new WeakMap,lastProgress:void 0,matchingEdges:0,opts:_};U(_.reportProgressFunc,_.reportProgressFuncFrom),t.lastProgress=_.reportProgressFuncFrom;let i=Xe(n,r,t);if(H(t,!0),_.reportCompletionFunc){let c=ge(),u=o===null||c===null?0:c-o;U(_.reportCompletionFunc,Object.freeze({candidateComparisons:t.candidateComparisons,comparisons:t.comparisons,matchingEdges:t.matchingEdges,timeTakenInMilliseconds:Number.isFinite(u)?Math.max(0,u):0}))}return i.matched?!0:_.verboseWhenMismatches?Qe(i.mismatch):!1}return Ce(rt);})();
|
|
11
11
|
/**
|
|
12
|
-
* @name
|
|
13
|
-
* @fileoverview
|
|
14
|
-
* @version
|
|
12
|
+
* @name codsen-format-diagnostic-value
|
|
13
|
+
* @fileoverview Safely format untrusted JavaScript values for diagnostics
|
|
14
|
+
* @version 1.1.0
|
|
15
15
|
* @author Roy Revelt
|
|
16
16
|
* @license MIT
|
|
17
|
-
* {@link https://codsen.com/os/
|
|
17
|
+
* {@link https://codsen.com/os/codsen-format-diagnostic-value/}
|
|
18
18
|
*/
|
|
19
19
|
/**
|
|
20
20
|
* @name codsen-utils
|
|
21
21
|
* @fileoverview Various utility functions
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.10.0
|
|
23
23
|
* @author Roy Revelt
|
|
24
24
|
* @license MIT
|
|
25
25
|
* {@link https://codsen.com/os/codsen-utils/}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ast-compare",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"description": "Compare anything: AST, objects, arrays, strings and nested thereof",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -76,8 +76,7 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"
|
|
80
|
-
"codsen-utils": "^1.9.0"
|
|
79
|
+
"codsen-utils": "^1.10.0"
|
|
81
80
|
},
|
|
82
81
|
"engines": {
|
|
83
82
|
"node": ">=18.20.8"
|
package/types/index.d.ts
CHANGED
|
@@ -1,28 +1,65 @@
|
|
|
1
1
|
declare const version: string;
|
|
2
2
|
type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
|
|
3
3
|
type JsonObject = {
|
|
4
|
-
[Key in string]?: JsonValue;
|
|
4
|
+
readonly [Key in string]?: JsonValue | undefined;
|
|
5
5
|
};
|
|
6
|
-
type JsonArray = JsonValue[];
|
|
6
|
+
type JsonArray = readonly (JsonValue | undefined)[];
|
|
7
|
+
type ComparableValue = JsonValue | undefined;
|
|
7
8
|
interface AnyObject {
|
|
8
|
-
[key: string]:
|
|
9
|
+
readonly [key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
interface CompletionStats {
|
|
12
|
+
candidateComparisons: number;
|
|
13
|
+
comparisons: number;
|
|
14
|
+
matchingEdges: number;
|
|
15
|
+
timeTakenInMilliseconds: number;
|
|
9
16
|
}
|
|
10
17
|
interface Opts {
|
|
11
18
|
arrayOrder: "ordered" | "any";
|
|
12
19
|
hungryForWhitespace: boolean;
|
|
13
20
|
matchStrictly: boolean;
|
|
21
|
+
reportCompletionFunc: null | ((stats: CompletionStats) => void);
|
|
22
|
+
reportProgressFunc: null | ((percentageDone: number) => void);
|
|
23
|
+
reportProgressFuncFrom: number;
|
|
24
|
+
reportProgressFuncTo: number;
|
|
14
25
|
verboseWhenMismatches: boolean;
|
|
15
26
|
useWildcards: boolean;
|
|
16
27
|
}
|
|
17
|
-
|
|
28
|
+
type BooleanOpts = Partial<Opts> & {
|
|
29
|
+
verboseWhenMismatches?: false | undefined;
|
|
30
|
+
};
|
|
31
|
+
type VerboseOpts = Partial<Opts> & {
|
|
32
|
+
verboseWhenMismatches: true;
|
|
33
|
+
};
|
|
34
|
+
declare const defaults: Readonly<Opts>;
|
|
18
35
|
/**
|
|
19
|
-
*
|
|
36
|
+
* Check whether the second value is equal to, or a subset of, the first value.
|
|
20
37
|
*/
|
|
21
38
|
declare function compare(
|
|
22
|
-
b:
|
|
23
|
-
s:
|
|
24
|
-
opts
|
|
39
|
+
b: ComparableValue,
|
|
40
|
+
s: ComparableValue,
|
|
41
|
+
opts: VerboseOpts,
|
|
42
|
+
): true | string;
|
|
43
|
+
declare function compare(
|
|
44
|
+
b: ComparableValue,
|
|
45
|
+
s: ComparableValue,
|
|
46
|
+
opts?: BooleanOpts | null,
|
|
47
|
+
): boolean;
|
|
48
|
+
declare function compare(
|
|
49
|
+
b: ComparableValue,
|
|
50
|
+
s: ComparableValue,
|
|
51
|
+
opts?: Partial<Opts> | null,
|
|
25
52
|
): boolean | string;
|
|
26
53
|
|
|
27
54
|
export { compare, defaults, version };
|
|
28
|
-
export type {
|
|
55
|
+
export type {
|
|
56
|
+
AnyObject,
|
|
57
|
+
BooleanOpts,
|
|
58
|
+
ComparableValue,
|
|
59
|
+
CompletionStats,
|
|
60
|
+
JsonArray,
|
|
61
|
+
JsonObject,
|
|
62
|
+
JsonValue,
|
|
63
|
+
Opts,
|
|
64
|
+
VerboseOpts,
|
|
65
|
+
};
|