@likec4/core 1.57.0 → 1.59.0

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.
Files changed (93) hide show
  1. package/dist/builder/index.d.mts +2 -2
  2. package/dist/builder/index.mjs +2 -1
  3. package/dist/chunks/Builder.view-element.mjs +2 -0
  4. package/dist/{_chunks → chunks}/LikeC4Model.d.mts +25 -27
  5. package/dist/{_chunks → chunks}/_types.d.mts +302 -57
  6. package/dist/{_chunks → chunks}/_types2.d.mts +2 -2
  7. package/dist/chunks/assignTagColors.mjs +1 -0
  8. package/dist/chunks/calcDriftsFromSnapshot.mjs +1 -0
  9. package/dist/chunks/default-map.d.mts +29 -0
  10. package/dist/{_chunks → chunks}/index.d.mts +938 -194
  11. package/dist/{_chunks → chunks}/index2.d.mts +21 -19
  12. package/dist/{_chunks → chunks}/index3.d.mts +14 -3
  13. package/dist/{_chunks/index5.d.mts → chunks/index4.d.mts} +153 -4
  14. package/dist/{_chunks/index4.d.mts → chunks/index5.d.mts} +2 -2
  15. package/dist/chunks/libs/chroma-js.mjs +15 -0
  16. package/dist/chunks/libs/graphology-dag.mjs +1 -0
  17. package/dist/chunks/libs/graphology.mjs +1 -0
  18. package/dist/chunks/libs/hast-util-sanitize.mjs +1 -0
  19. package/dist/chunks/libs/hast-util-to-html.mjs +9 -0
  20. package/dist/chunks/libs/mdast.mjs +29 -0
  21. package/dist/chunks/libs/mnemonist.mjs +1 -0
  22. package/dist/chunks/libs/ohash.mjs +1 -0
  23. package/dist/chunks/libs/remark.mjs +3 -0
  24. package/dist/chunks/libs/remeda.mjs +1 -0
  25. package/dist/chunks/libs/unified.mjs +1 -0
  26. package/dist/chunks/model.mjs +4 -0
  27. package/dist/chunks/rolldown-runtime.mjs +1 -0
  28. package/dist/chunks/types.mjs +9 -0
  29. package/dist/compute-view/index.d.mts +56 -18
  30. package/dist/compute-view/index.mjs +2 -2
  31. package/dist/geometry/index.d.mts +2 -2
  32. package/dist/geometry/index.mjs +1 -1
  33. package/dist/index.d.mts +10 -10
  34. package/dist/index.mjs +1 -1
  35. package/dist/model/index.d.mts +3 -3
  36. package/dist/model/index.mjs +1 -1
  37. package/dist/styles/index.d.mts +3 -3
  38. package/dist/styles/index.mjs +1 -1
  39. package/dist/types/index.d.mts +3 -3
  40. package/dist/types/index.mjs +1 -1
  41. package/dist/utils/graphology/index.d.mts +618 -1
  42. package/dist/utils/graphology/index.mjs +1 -1
  43. package/dist/utils/index.d.mts +4 -4
  44. package/dist/utils/index.mjs +1 -1
  45. package/package.json +17 -18
  46. package/dist/THIRD-PARTY-LICENSES.md +0 -1034
  47. package/dist/_chunks/Builder.view-element.mjs +0 -2
  48. package/dist/_chunks/assignTagColors.mjs +0 -1
  49. package/dist/_chunks/libs/@ungap/structured-clone.mjs +0 -1
  50. package/dist/_chunks/libs/bail.mjs +0 -1
  51. package/dist/_chunks/libs/ccount.mjs +0 -1
  52. package/dist/_chunks/libs/character-entities-html4.mjs +0 -1
  53. package/dist/_chunks/libs/character-entities-legacy.mjs +0 -1
  54. package/dist/_chunks/libs/character-entities.mjs +0 -2
  55. package/dist/_chunks/libs/chroma-js.mjs +0 -15
  56. package/dist/_chunks/libs/comma-separated-tokens.mjs +0 -1
  57. package/dist/_chunks/libs/decode-named-character-reference.mjs +0 -1
  58. package/dist/_chunks/libs/defu.mjs +0 -1
  59. package/dist/_chunks/libs/devlop.mjs +0 -1
  60. package/dist/_chunks/libs/escape-string-regexp.mjs +0 -1
  61. package/dist/_chunks/libs/extend.mjs +0 -1
  62. package/dist/_chunks/libs/graphology-dag.d.mts +0 -607
  63. package/dist/_chunks/libs/graphology-dag.mjs +0 -1
  64. package/dist/_chunks/libs/graphology.mjs +0 -1
  65. package/dist/_chunks/libs/hast-util-sanitize.mjs +0 -1
  66. package/dist/_chunks/libs/hast-util-to-html.mjs +0 -9
  67. package/dist/_chunks/libs/is-plain-obj.mjs +0 -1
  68. package/dist/_chunks/libs/longest-streak.mjs +0 -1
  69. package/dist/_chunks/libs/markdown-table.mjs +0 -2
  70. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +0 -1
  71. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +0 -3
  72. package/dist/_chunks/libs/mdast-util-gfm.mjs +0 -15
  73. package/dist/_chunks/libs/mdast-util-to-hast.mjs +0 -11
  74. package/dist/_chunks/libs/micromark-extension-gfm.mjs +0 -1
  75. package/dist/_chunks/libs/mnemonist.d.mts +0 -164
  76. package/dist/_chunks/libs/mnemonist.mjs +0 -1
  77. package/dist/_chunks/libs/natural-compare-lite.mjs +0 -9
  78. package/dist/_chunks/libs/ohash.mjs +0 -1
  79. package/dist/_chunks/libs/rehype-sanitize.mjs +0 -1
  80. package/dist/_chunks/libs/rehype-stringify.mjs +0 -1
  81. package/dist/_chunks/libs/remark-gfm.mjs +0 -1
  82. package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +0 -3
  83. package/dist/_chunks/libs/remark-parse.mjs +0 -1
  84. package/dist/_chunks/libs/remark-rehype.mjs +0 -1
  85. package/dist/_chunks/libs/remeda.mjs +0 -2
  86. package/dist/_chunks/libs/trough.mjs +0 -1
  87. package/dist/_chunks/libs/unified.mjs +0 -1
  88. package/dist/_chunks/manual-layout.mjs +0 -1
  89. package/dist/_chunks/mnemonist.d.mts +0 -1
  90. package/dist/_chunks/model.mjs +0 -4
  91. package/dist/_chunks/rolldown-runtime.mjs +0 -1
  92. package/dist/_chunks/types.mjs +0 -1
  93. /package/dist/{_chunks → chunks}/libs/@radix-ui/colors.mjs +0 -0
@@ -1,164 +0,0 @@
1
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/default-map.d.ts
2
- /**
3
- * Mnemonist DefaultMap Typings
4
- * =============================
5
- */
6
- declare class DefaultMap<K, V> implements Iterable<[K, V]> {
7
- // Members
8
- size: number; // Constructor
9
- constructor(factory: (key: K, index: number) => V); // Methods
10
- clear(): void;
11
- set(key: K, value: V): this;
12
- delete(key: K): boolean;
13
- has(key: K): boolean;
14
- get(key: K): V;
15
- peek(key: K): V | undefined;
16
- forEach(callback: (value: V, key: K, map: this) => void, scope?: any): void;
17
- keys(): IterableIterator<K>;
18
- values(): IterableIterator<V>;
19
- entries(): IterableIterator<[K, V]>;
20
- [Symbol.iterator](): IterableIterator<[K, V]>;
21
- inspect(): any; // Statics
22
- static autoIncrement(): number;
23
- }
24
- //#endregion
25
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/default-weak-map.d.ts
26
- /**
27
- * Mnemonist DefaultWeakMap Typings
28
- * ================================
29
- */
30
- declare class DefaultWeakMap<K extends object, V> {
31
- // Constructor
32
- constructor(factory: (key: K) => V); // Methods
33
- clear(): void;
34
- set(key: K, value: V): this;
35
- delete(key: K): boolean;
36
- has(key: K): boolean;
37
- get(key: K): V;
38
- peek(key: K): V | undefined;
39
- inspect(): any;
40
- }
41
- //#endregion
42
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/linked-list.d.ts
43
- /**
44
- * Mnemonist LinkedList Typings
45
- * =============================
46
- */
47
- declare class LinkedList<T> implements Iterable<T> {
48
- // Members
49
- size: number; // Constructor
50
- constructor(); // Methods
51
- clear(): void;
52
- first(): T | undefined;
53
- last(): T | undefined;
54
- peek(): T | undefined;
55
- push(value: T): number;
56
- shift(): T | undefined;
57
- unshift(value: T): number;
58
- forEach(callback: (value: T, index: number, list: this) => void, scope?: any): void;
59
- toArray(): Array<T>;
60
- values(): IterableIterator<T>;
61
- entries(): IterableIterator<[number, T]>;
62
- [Symbol.iterator](): IterableIterator<T>;
63
- toString(): string;
64
- toJSON(): Array<T>;
65
- inspect(): any; // Statics
66
- static from<I>(iterable: Iterable<I> | {
67
- [key: string]: I;
68
- }): LinkedList<I>;
69
- }
70
- //#endregion
71
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/multi-map.d.ts
72
- /**
73
- * Mnemonist MultiMap Typings
74
- * ===========================
75
- */
76
- interface MultiMap<K, V, C extends V[] | Set<V> = V[]> extends Iterable<[K, V]> {
77
- // Members
78
- dimension: number;
79
- size: number; // Methods
80
- clear(): void;
81
- set(key: K, value: V): this;
82
- delete(key: K): boolean;
83
- remove(key: K, value: V): boolean;
84
- has(key: K): boolean;
85
- get(key: K): C | undefined;
86
- multiplicity(key: K): number;
87
- forEach(callback: (value: V, key: K, map: this) => void, scope?: any): void;
88
- forEachAssociation(callback: (value: C, key: K, map: this) => void, scope?: any): void;
89
- keys(): IterableIterator<K>;
90
- values(): IterableIterator<V>;
91
- entries(): IterableIterator<[K, V]>;
92
- containers(): IterableIterator<C>;
93
- associations(): IterableIterator<[K, C]>;
94
- [Symbol.iterator](): IterableIterator<[K, V]>;
95
- inspect(): any;
96
- toJSON(): any;
97
- }
98
- interface MultiMapConstructor {
99
- new <K, V>(container: SetConstructor): MultiMap<K, V, Set<V>>;
100
- new <K, V>(container?: ArrayConstructor): MultiMap<K, V, V[]>;
101
- from<K, V>(iterable: Iterable<[K, V]> | {
102
- [key: string]: V;
103
- }, Container: SetConstructor): MultiMap<K, V, Set<V>>;
104
- from<K, V>(iterable: Iterable<[K, V]> | {
105
- [key: string]: V;
106
- }, Container?: ArrayConstructor): MultiMap<K, V, V[]>;
107
- }
108
- declare const MultiMap: MultiMapConstructor;
109
- //#endregion
110
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/queue.d.ts
111
- /**
112
- * Mnemonist Queue Typings
113
- * ========================
114
- */
115
- declare class Queue<T> implements Iterable<T> {
116
- // Members
117
- size: number; // Constructor
118
- constructor(); // Methods
119
- clear(): void;
120
- enqueue(item: T): number;
121
- dequeue(): T | undefined;
122
- peek(): T | undefined;
123
- forEach(callback: (item: T, index: number, queue: this) => void, scope?: any): void;
124
- toArray(): Array<T>;
125
- values(): IterableIterator<T>;
126
- entries(): IterableIterator<[number, T]>;
127
- [Symbol.iterator](): IterableIterator<T>;
128
- toString(): string;
129
- toJSON(): Array<T>;
130
- inspect(): any; // Statics
131
- static from<I>(iterable: Iterable<I> | {
132
- [key: string]: I;
133
- }): Queue<I>;
134
- static of<I>(...items: Array<I>): Queue<I>;
135
- }
136
- //#endregion
137
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/stack.d.ts
138
- /**
139
- * Mnemonist Stack Typings
140
- * ========================
141
- */
142
- declare class Stack<T> implements Iterable<T> {
143
- // Members
144
- size: number; // Constructor
145
- constructor(); // Methods
146
- clear(): void;
147
- push(item: T): number;
148
- pop(): T | undefined;
149
- peek(): T | undefined;
150
- forEach(callback: (item: T, index: number, stack: this) => void, scope?: any): void;
151
- toArray(): Array<T>;
152
- values(): IterableIterator<T>;
153
- entries(): IterableIterator<[number, T]>;
154
- [Symbol.iterator](): IterableIterator<T>;
155
- toString(): string;
156
- toJSON(): Array<T>;
157
- inspect(): any; // Statics
158
- static from<I>(iterable: Iterable<I> | {
159
- [key: string]: I;
160
- }): Stack<I>;
161
- static of<I>(...items: Array<I>): Stack<I>;
162
- }
163
- //#endregion
164
- export { DefaultWeakMap as a, LinkedList as i, Queue as n, DefaultMap as o, MultiMap as r, Stack as t };
@@ -1 +0,0 @@
1
- import{r as e,t}from"../rolldown-runtime.mjs";import{i as n,r}from"./graphology-dag.mjs";var i=t((e=>{e.intersection=function(){if(arguments.length<2)throw Error(`mnemonist/Set.intersection: needs at least two arguments.`);var e=new Set,t=1/0,n=null,r,i,a=arguments.length;for(i=0;i<a;i++){if(r=arguments[i],r.size===0)return e;r.size<t&&(t=r.size,n=r)}for(var o=n.values(),s,c,l,u;s=o.next(),!s.done;){for(c=s.value,l=!0,i=0;i<a;i++)if(u=arguments[i],u!==n&&!u.has(c)){l=!1;break}l&&e.add(c)}return e},e.union=function(){if(arguments.length<2)throw Error(`mnemonist/Set.union: needs at least two arguments.`);var e=new Set,t,n=arguments.length,r,i;for(t=0;t<n;t++)for(r=arguments[t].values();i=r.next(),!i.done;)e.add(i.value);return e},e.difference=function(e,t){if(!e.size)return new Set;if(!t.size)return new Set(e);for(var n=new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);return n},e.symmetricDifference=function(e,t){for(var n=new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);for(r=t.values();i=r.next(),!i.done;)e.has(i.value)||n.add(i.value);return n},e.isSubset=function(e,t){var n=e.values(),r;if(e===t)return!0;if(e.size>t.size)return!1;for(;r=n.next(),!r.done;)if(!t.has(r.value))return!1;return!0},e.isSuperset=function(t,n){return e.isSubset(n,t)},e.add=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.add(r.value)},e.subtract=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.delete(r.value)},e.intersect=function(e,t){for(var n=e.values(),r;r=n.next(),!r.done;)t.has(r.value)||e.delete(r.value)},e.disjunct=function(e,t){for(var n=e.values(),r,i=[];r=n.next(),!r.done;)t.has(r.value)&&i.push(r.value);for(n=t.values();r=n.next(),!r.done;)e.has(r.value)||e.add(r.value);for(var a=0,o=i.length;a<o;a++)e.delete(i[a])},e.intersectionSize=function(e,t){var n;if(e.size>t.size&&(n=e,e=t,t=n),e.size===0)return 0;if(e===t)return e.size;for(var r=e.values(),i,a=0;i=r.next(),!i.done;)t.has(i.value)&&a++;return a},e.unionSize=function(t,n){var r=e.intersectionSize(t,n);return t.size+n.size-r},e.jaccard=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/(t.size+n.size-r)},e.overlap=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/Math.min(t.size,n.size)}})),a=t((e=>{var t=function(e,t){return e<t?-1:+(e>t)},n=function(e,t){return e<t?1:e>t?-1:0};function r(e){return function(t,n){return e(n,t)}}function i(e){return e===2?function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:e[1]<t[1]?-1:+(e[1]>t[1])}:function(t,n){for(var r=0;r<e;){if(t[r]<n[r])return-1;if(t[r]>n[r])return 1;r++}return 0}}e.DEFAULT_COMPARATOR=t,e.DEFAULT_REVERSE_COMPARATOR=n,e.reverseComparator=r,e.createTupleComparator=i})),o=t(((e,t)=>{var r=a(),i=n(),o=r.DEFAULT_COMPARATOR,s=r.reverseComparator;function c(e){if(this.clear(),this.comparator=e||o,typeof this.comparator!=`function`)throw Error(`mnemonist/FibonacciHeap.constructor: given comparator should be a function.`)}c.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function l(e){return{item:e,degree:0}}function u(e,t){e.root?(t.right=e.root.right,t.left=e.root,e.root.right.left=t,e.root.right=t):e.root=t}c.prototype.push=function(e){var t=l(e);return t.left=t,t.right=t,u(this,t),(!this.min||this.comparator(t.item,this.min.item)<=0)&&(this.min=t),++this.size},c.prototype.peek=function(){return this.min?this.min.item:void 0};function d(e){for(var t=[],n=e,r=!1;!(n===e&&r);)n===e&&(r=!0),t.push(n),n=n.right;return t}function f(e,t){e.root===t&&(e.root=t.right),t.left.right=t.right,t.right.left=t.left}function p(e,t){e.child?(t.right=e.child.right,t.left=e.child,e.child.right.left=t,e.child.right=t):e.child=t}function m(e,t,n){f(e,t),t.left=t,t.right=t,p(n,t),n.degree++,t.parent=n}function h(e){var t=Array(e.size),n=d(e.root),r,i,a,o,s,c;for(r=0,i=n.length;r<i;r++){for(a=n[r],s=a.degree;t[s];)o=t[s],e.comparator(a.item,o.item)>0&&(c=a,a=o,o=c),m(e,o,a),t[s]=null,s++;t[s]=a}for(r=0;r<e.size;r++)t[r]&&e.comparator(t[r].item,e.min.item)<=0&&(e.min=t[r])}c.prototype.pop=function(){if(this.size){var e=this.min;if(e.child){var t=d(e.child),n,r,i;for(r=0,i=t.length;r<i;r++)n=t[r],u(this,n),delete n.parent}return f(this,e),e===e.right?(this.min=null,this.root=null):(this.min=e.right,h(this)),this.size--,e.item}},c.prototype.inspect=function(){var e={size:this.size};return this.min&&`item`in this.min&&(e.top=this.min.item),Object.defineProperty(e,"constructor",{value:c,enumerable:!1}),e},typeof Symbol<`u`&&(c.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=c.prototype.inspect);function g(e){if(this.clear(),this.comparator=e||o,typeof this.comparator!=`function`)throw Error(`mnemonist/FibonacciHeap.constructor: given comparator should be a function.`);this.comparator=s(this.comparator)}g.prototype=c.prototype,c.from=function(e,t){var n=new c(t);return i(e,function(e){n.push(e)}),n},g.from=function(e,t){var n=new g(t);return i(e,function(e){n.push(e)}),n},c.MinFibonacciHeap=c,c.MaxFibonacciHeap=g,t.exports=c})),s=t((e=>{var t=2**8-1,n=2**16-1,r=2**32-1,i=2**7-1,a=2**15-1,o=2**31-1;e.getPointerArray=function(e){var i=e-1;if(i<=t)return Uint8Array;if(i<=n)return Uint16Array;if(i<=r)return Uint32Array;throw Error(`mnemonist: Pointer Array of size > 4294967295 is not supported.`)},e.getSignedPointerArray=function(e){var t=e-1;return t<=i?Int8Array:t<=a?Int16Array:t<=o?Int32Array:Float64Array},e.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){var r=null,i=0,a,o,c,l,u;for(l=0,u=t.length;l<u;l++)c=n?n(t[l]):t[l],o=e.getNumberType(c),a=s[o.name],a>i&&(i=a,r=o);return r},e.isTypedArray=function(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)},e.concat=function(){var e=0,t,n,r;for(t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=new arguments[0].constructor(e);for(t=0,n=0;t<r;t++)i.set(arguments[t],n),n+=arguments[t].length;return i},e.indices=function(t){for(var n=new(e.getPointerArray(t))(t),r=0;r<t;r++)n[r]=r;return n}})),c=t((e=>{var t=n(),r=s();function i(e){return Array.isArray(e)||r.isTypedArray(e)}function a(e){if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size}function o(e){var n=a(e),r=typeof n==`number`?Array(n):[],i=0;return t(e,function(e){r[i++]=e}),r}function c(e){var n=a(e),i=typeof n==`number`?r.getPointerArray(n):Array,o=typeof n==`number`?Array(n):[],s=typeof n==`number`?new i(n):[],c=0;return t(e,function(e){o[c]=e,s[c]=c++}),[o,s]}e.isArrayLike=i,e.guessLength=a,e.toArray=o,e.toArrayWithIndices=c})),l=t(((e,t)=>{var r=n(),i=a(),o=c(),s=i.DEFAULT_COMPARATOR,l=i.reverseComparator;function u(e,t,n,r){for(var i=t[r],a,o;r>n;){if(a=r-1>>1,o=t[a],e(i,o)<0){t[r]=o,r=a;continue}break}t[r]=i}function d(e,t,n){for(var r=t.length,i=n,a=t[n],o=2*n+1,s;o<r;)s=o+1,s<r&&e(t[o],t[s])>=0&&(o=s),t[n]=t[o],n=o,o=2*n+1;t[n]=a,u(e,t,i,n)}function f(e,t,n){t.push(n),u(e,t,0,t.length-1)}function p(e,t){var n=t.pop();if(t.length!==0){var r=t[0];return t[0]=n,d(e,t,0),r}return n}function m(e,t,n){if(t.length===0)throw Error(`mnemonist/heap.replace: cannot pop an empty heap.`);var r=t[0];return t[0]=n,d(e,t,0),r}function h(e,t,n){var r;return t.length!==0&&e(t[0],n)<0&&(r=t[0],t[0]=n,n=r,d(e,t,0)),n}function g(e,t){for(var n=t.length>>1;--n>=0;)d(e,t,n)}function _(e,t){for(var n=t.length,r=0,i=Array(n);r<n;)i[r++]=p(e,t);return i}function v(e,t,n){arguments.length===2&&(n=t,t=e,e=s);var i=l(e),a,c,u,d=1/0,f;if(t===1){if(o.isArrayLike(n)){for(a=0,c=n.length;a<c;a++)u=n[a],(d===1/0||e(u,d)<0)&&(d=u);return f=new n.constructor(1),f[0]=d,f}return r(n,function(t){(d===1/0||e(t,d)<0)&&(d=t)}),[d]}if(o.isArrayLike(n)){if(t>=n.length)return n.slice().sort(e);for(f=n.slice(0,t),g(i,f),a=t,c=n.length;a<c;a++)i(n[a],f[0])>0&&m(i,f,n[a]);return f.sort(e)}var p=o.guessLength(n);return p!==null&&p<t&&(t=p),f=Array(t),a=0,r(n,function(e){a<t?f[a]=e:(a===t&&g(i,f),i(e,f[0])>0&&m(i,f,e)),a++}),f.length>a&&(f.length=a),f.sort(e)}function y(e,t,n){arguments.length===2&&(n=t,t=e,e=s);var i=l(e),a,c,u,d=-1/0,f;if(t===1){if(o.isArrayLike(n)){for(a=0,c=n.length;a<c;a++)u=n[a],(d===-1/0||e(u,d)>0)&&(d=u);return f=new n.constructor(1),f[0]=d,f}return r(n,function(t){(d===-1/0||e(t,d)>0)&&(d=t)}),[d]}if(o.isArrayLike(n)){if(t>=n.length)return n.slice().sort(i);for(f=n.slice(0,t),g(e,f),a=t,c=n.length;a<c;a++)e(n[a],f[0])>0&&m(e,f,n[a]);return f.sort(i)}var p=o.guessLength(n);return p!==null&&p<t&&(t=p),f=Array(t),a=0,r(n,function(n){a<t?f[a]=n:(a===t&&g(e,f),e(n,f[0])>0&&m(e,f,n)),a++}),f.length>a&&(f.length=a),f.sort(i)}function b(e){if(this.clear(),this.comparator=e||s,typeof this.comparator!=`function`)throw Error(`mnemonist/Heap.constructor: given comparator should be a function.`)}b.prototype.clear=function(){this.items=[],this.size=0},b.prototype.push=function(e){return f(this.comparator,this.items,e),++this.size},b.prototype.peek=function(){return this.items[0]},b.prototype.pop=function(){return this.size!==0&&this.size--,p(this.comparator,this.items)},b.prototype.replace=function(e){return m(this.comparator,this.items,e)},b.prototype.pushpop=function(e){return h(this.comparator,this.items,e)},b.prototype.consume=function(){return this.size=0,_(this.comparator,this.items)},b.prototype.toArray=function(){return _(this.comparator,this.items.slice())},b.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:b,enumerable:!1}),e},typeof Symbol<`u`&&(b.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=b.prototype.inspect);function x(e){if(this.clear(),this.comparator=e||s,typeof this.comparator!=`function`)throw Error(`mnemonist/MaxHeap.constructor: given comparator should be a function.`);this.comparator=l(this.comparator)}x.prototype=b.prototype,b.from=function(e,t){var n=new b(t),r=o.isArrayLike(e)?e.slice():o.toArray(e);return g(n.comparator,r),n.items=r,n.size=r.length,n},x.from=function(e,t){var n=new x(t),r=o.isArrayLike(e)?e.slice():o.toArray(e);return g(n.comparator,r),n.items=r,n.size=r.length,n},b.siftUp=d,b.siftDown=u,b.push=f,b.pop=p,b.replace=m,b.pushpop=h,b.heapify=g,b.consume=_,b.nsmallest=v,b.nlargest=y,b.MinHeap=b,b.MaxHeap=x,t.exports=b})),u=t(((e,t)=>{var n=``;function r(e,t,n){for(var r=t.length,i=[],a=r,o=-1,s,c=0,l;a--;)o=Math.max(e[t[a]+n],o);for(l=o>>24&&32||o>>16&&24||o>>8&&16||8;c<l;c+=4){for(a=16;a--;)i[a]=[];for(a=r;a--;)i[e[t[a]+n]>>c&15].push(t[a]);for(s=0;s<16;s++)for(o=i[s].length;o--;)t[++a]=i[s][o]}}function i(e,t,n,r){return e[n]-e[r]||(n%3==2?e[n+1]-e[r+1]||t[n+2]-t[r+2]:t[n+1]-t[r+1])}function a(e,t){var n=[],o=[],s=2*t/3|0,c=t-s,l=s+1>>1,u=s,d=0,f,p=[],m=[];if(t===1)return[0];for(;u--;)n[u]=(u*3>>1)+1;for(u=3;u--;)r(e,n,u);for(d=o[(n[0]/3|0)+(n[0]%3==1?0:l)]=1,u=1;u<s;u++)(e[n[u]]!==e[n[u-1]]||e[n[u]+1]!==e[n[u-1]+1]||e[n[u]+2]!==e[n[u-1]+2])&&d++,o[(n[u]/3|0)+(n[u]%3==1?0:l)]=d;if(d<s)for(o=a(o,s),u=s;u--;)n[u]=o[u]<l?o[u]*3+1:(o[u]-l)*3+2;for(u=s;u--;)p[n[u]]=u;for(p[t]=-1,p[t+1]=-2,o=t%3==1?[t-1]:[],u=0;u<s;u++)n[u]%3==1&&o.push(n[u]-1);for(r(e,o,0),u=0,d=0,f=0;u<s&&d<c;)m[f++]=i(e,p,n[u],o[d])<0?n[u++]:o[d++];for(;u<s;)m[f++]=n[u++];for(;d<c;)m[f++]=o[d++];return m}function o(e){var t=e.length,n=t%3,r=Array(t+n),i,a;if(typeof e!=`string`){var o=Object.create(null);for(a=0;a<t;a++)o[e[a]]||(o[e[a]]=!0);var s=Object.create(null),c=Object.keys(o).sort();for(a=0,i=c.length;a<i;a++)s[c[a]]=a+1;for(a=0;a<t;a++)r[a]=s[e[a]]}else for(a=0;a<t;a++)r[a]=e.charCodeAt(a);for(a=t;a<t+n;a++)r[a]=0;return r}function s(e){this.hasArbitrarySequence=typeof e!=`string`,this.string=e,this.length=e.length,this.array=a(o(e),this.length)}s.prototype.toString=function(){return this.array.join(`,`)},s.prototype.toJSON=function(){return this.array},s.prototype.inspect=function(){for(var e=Array(this.length),t=0;t<this.length;t++)e[t]=this.string.slice(this.array[t]);return Object.defineProperty(e,"constructor",{value:s,enumerable:!1}),e},typeof Symbol<`u`&&(s.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=s.prototype.inspect);function c(e){if(this.hasArbitrarySequence=typeof e[0]!=`string`,this.size=e.length,this.hasArbitrarySequence){this.text=[];for(var t=0,r=this.size;t<r;t++)this.text.push.apply(this.text,e[t]),t<r-1&&this.text.push(n)}else this.text=e.join(n);this.firstLength=e[0].length,this.length=this.text.length,this.array=a(o(this.text),this.length)}c.prototype.longestCommonSubsequence=function(){var e=this.hasArbitrarySequence?[]:``,t,n,r,i,a;for(n=1;n<this.length;n++)if(i=this.array[n],a=this.array[n-1],!(i<this.firstLength&&a<this.firstLength)&&!(i>this.firstLength&&a>this.firstLength)){for(t=Math.min(this.length-i,this.length-a),r=0;r<t;r++)if(this.text[i+r]!==this.text[a+r]){t=r;break}t>e.length&&(e=this.text.slice(i,i+t))}return e},c.prototype.toString=function(){return this.array.join(`,`)},c.prototype.toJSON=function(){return this.array},c.prototype.inspect=function(){for(var e=Array(this.length),t=0;t<this.length;t++)e[t]=this.text.slice(this.array[t]);return Object.defineProperty(e,"constructor",{value:c,enumerable:!1}),e},typeof Symbol<`u`&&(c.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=c.prototype.inspect),s.GeneralizedSuffixArray=c,t.exports=s})),d=t(((e,t)=>{var i=r(),a=n(),o=c(),l=s(),u=function(e){return Math.max(1,Math.ceil(e*1.5))},d=function(e){return new(l.getPointerArray(e))(e)};function f(e,t){if(arguments.length<1)throw Error(`mnemonist/vector: expecting at least a byte array constructor.`);var n=t||0,r=u,i=0,a=!1;typeof t==`object`&&(n=t.initialCapacity||0,i=t.initialLength||0,r=t.policy||r,a=t.factory===!0),this.factory=a?e:null,this.ArrayClass=e,this.length=i,this.capacity=Math.max(i,n),this.policy=r,this.array=new e(this.capacity)}f.prototype.set=function(e,t){if(this.length<e)throw Error(`Vector(`+this.ArrayClass.name+`).set: index out of bounds.`);return this.array[e]=t,this},f.prototype.get=function(e){if(!(this.length<e))return this.array[e]},f.prototype.applyPolicy=function(e){var t=this.policy(e||this.capacity);if(typeof t!=`number`||t<0)throw Error(`mnemonist/vector.applyPolicy: policy returned an invalid value (expecting a positive integer).`);if(t<=this.capacity)throw Error(`mnemonist/vector.applyPolicy: policy returned a less or equal capacity to allocate.`);return t},f.prototype.reallocate=function(e){if(e===this.capacity)return this;var t=this.array;if(e<this.length&&(this.length=e),e>this.capacity)if(this.factory===null?this.array=new this.ArrayClass(e):this.array=this.factory(e),l.isTypedArray(this.array))this.array.set(t,0);else for(var n=0,r=this.length;n<r;n++)this.array[n]=t[n];else this.array=t.slice(0,e);return this.capacity=e,this},f.prototype.grow=function(e){var t;if(typeof e==`number`){if(this.capacity>=e)return this;for(t=this.capacity;t<e;)t=this.applyPolicy(t);return this.reallocate(t),this}return t=this.applyPolicy(),this.reallocate(t),this},f.prototype.resize=function(e){return e===this.length?this:e<this.length?(this.length=e,this):(this.length=e,this.reallocate(e),this)},f.prototype.push=function(e){return this.capacity===this.length&&this.grow(),this.array[this.length++]=e,this.length},f.prototype.pop=function(){if(this.length!==0)return this.array[--this.length]},f.prototype.values=function(){var e=this.array,t=this.length,n=0;return new i(function(){if(n>=t)return{done:!0};var r=e[n];return n++,{value:r,done:!1}})},f.prototype.entries=function(){var e=this.array,t=this.length,n=0;return new i(function(){if(n>=t)return{done:!0};var r=e[n];return{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(f.prototype[Symbol.iterator]=f.prototype.values),f.prototype.inspect=function(){var e=this.array.slice(0,this.length);return e.type=this.array.constructor.name,e.items=this.length,e.capacity=this.capacity,Object.defineProperty(e,"constructor",{value:f,enumerable:!1}),e},typeof Symbol<`u`&&(f.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=f.prototype.inspect),f.from=function(e,t,n){if(arguments.length<3&&(n=o.guessLength(e),typeof n!=`number`))throw Error(`mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.`);var r=new f(t,n);return a(e,function(e){r.push(e)}),r};function p(e){var t=function(t){f.call(this,e,t)};for(var n in f.prototype)f.prototype.hasOwnProperty(n)&&(t.prototype[n]=f.prototype[n]);return t.from=function(t,n){return f.from(t,e,n)},typeof Symbol<`u`&&(t.prototype[Symbol.iterator]=t.prototype.values),t}f.Int8Vector=p(Int8Array),f.Uint8Vector=p(Uint8Array),f.Uint8ClampedVector=p(Uint8ClampedArray),f.Int16Vector=p(Int16Array),f.Uint16Vector=p(Uint16Array),f.Int32Vector=p(Int32Array),f.Uint32Vector=p(Uint32Array),f.Float32Vector=p(Float32Array),f.Float64Vector=p(Float64Array),f.PointerVector=p(d),t.exports=f})),f=t(((e,t)=>{var r=n();function i(e){this.size=0,this.items=new Map,this.inverse=e}function a(){this.size=0,this.items=new Map,this.inverse=new i(this)}function o(){this.size=0,this.items.clear(),this.inverse.items.clear()}a.prototype.clear=o,i.prototype.clear=o;function s(e,t){if(this.items.has(e)){var n=this.items.get(e);if(n===t)return this;this.inverse.items.delete(n)}if(this.inverse.items.has(t)){var r=this.inverse.items.get(t);if(r===e)return this;this.items.delete(r)}return this.items.set(e,t),this.inverse.items.set(t,e),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}a.prototype.set=s,i.prototype.set=s;function c(e){if(this.items.has(e)){var t=this.items.get(e);return this.items.delete(e),this.inverse.items.delete(t),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}a.prototype.delete=c,i.prototype.delete=c,[`has`,`get`,`forEach`,`keys`,`values`,`entries`].forEach(function(e){a.prototype[e]=i.prototype[e]=function(){return Map.prototype[e].apply(this.items,arguments)}}),typeof Symbol<`u`&&(a.prototype[Symbol.iterator]=a.prototype.entries,i.prototype[Symbol.iterator]=i.prototype.entries),a.prototype.inspect=function(){var e={left:this.items,right:this.inverse.items};return Object.defineProperty(e,"constructor",{value:a,enumerable:!1}),e},typeof Symbol<`u`&&(a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=a.prototype.inspect),i.prototype.inspect=function(){var e={left:this.inverse.items,right:this.items};return Object.defineProperty(e,"constructor",{value:i,enumerable:!1}),e},typeof Symbol<`u`&&(i.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=i.prototype.inspect),a.from=function(e){var t=new a;return r(e,function(e,n){t.set(n,e)}),t},t.exports=a})),p=t((e=>{function t(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e&~(e>>1)}e.msb32=t;function n(e){return e|=e>>1,e|=e>>2,e|=e>>4,e&~(e>>1)}e.msb8=n,e.test=function(e,t){return e>>t&1},e.criticalBit8=function(e,t){return n(e^t)},e.criticalBit8Mask=function(e,t){return~n(e^t)>>>0&255},e.testCriticalBit8=function(e,t){return 1+(e|t)>>8},e.criticalBit32Mask=function(e,n){return~t(e^n)>>>0&4294967295},e.popcount=function(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127};for(var r=new Uint8Array(2**8),i=0,a=r.length;i<a;i++)r[i]=e.popcount(i);e.table8Popcount=function(e){return r[e&255]+r[e>>8&255]+r[e>>16&255]+r[e>>24&255]}})),m=t(((e,t)=>{var n=r(),i=p();function a(e){this.length=e,this.clear()}a.prototype.clear=function(){this.size=0,this.array=new Uint32Array(Math.ceil(this.length/32))},a.prototype.set=function(e,t){var n=e>>5,r=e&31,i=this.array[n],a=t===0||t===!1?this.array[n]&=~(1<<r):this.array[n]|=1<<r;return a>>>=0,a>i?this.size++:a<i&&this.size--,this},a.prototype.reset=function(e){var t=e>>5,n=e&31,r=this.array[t];return(this.array[t]&=~(1<<n))<r&&this.size--,this},a.prototype.flip=function(e){var t=e>>5,n=e&31,r=this.array[t],i=this.array[t]^=1<<n;return i>>>=0,i>r?this.size++:i<r&&this.size--,this},a.prototype.get=function(e){var t=e>>5,n=e&31;return this.array[t]>>n&1},a.prototype.test=function(e){return!!this.get(e)},a.prototype.rank=function(e){if(this.size===0)return 0;for(var t=e>>5,n=e&31,r=0,a=0;a<t;a++)r+=i.table8Popcount(this.array[a]);var o=this.array[t]&(1<<n)-1;return r+=i.table8Popcount(o),r},a.prototype.select=function(e){if(this.size===0||e>=this.length)return-1;for(var t,n=32,r=0,i=0,a=0,o=this.array.length;a<o;a++)if(t=this.array[a],t!==0){a===o-1&&(n=this.length%32||32);for(var s=0;s<n;s++,r++)if(i+=t>>s&1,i===e)return r}},a.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.length,r,i,a=32,o=0,s=this.array.length;o<s;o++){r=this.array[o],o===s-1&&(a=n%32||32);for(var c=0;c<a;c++)i=r>>c&1,e.call(t,i,o*32+c)}},a.prototype.values=function(){var e=this.length,t=!1,r,i,a=this.array,o=a.length,s=0,c=-1,l=32;return new n(function n(){if(!t){if(s>=o)return{done:!0};s===o-1&&(l=e%32||32),r=a[s++],t=!0,c=-1}return c++,c>=l?(t=!1,n()):(i=r>>c&1,{value:i})})},a.prototype.entries=function(){var e=this.length,t=!1,r,i,a=this.array,o,s=a.length,c=0,l=-1,u=32;return new n(function n(){if(!t){if(c>=s)return{done:!0};c===s-1&&(u=e%32||32),r=a[c++],t=!0,l=-1}return l++,o=~-c*32+l,l>=u?(t=!1,n()):(i=r>>l&1,{value:[o,i]})})},typeof Symbol<`u`&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){var e=new Uint8Array(this.length);return this.forEach(function(t,n){e[n]=t}),Object.defineProperty(e,"constructor",{value:a,enumerable:!1}),e},typeof Symbol<`u`&&(a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=a.prototype.inspect),a.prototype.toJSON=function(){return Array.from(this.array)},t.exports=a})),h=t(((e,t)=>{var n=r(),i=p(),a=function(e){return Math.max(1,Math.ceil(e*1.5))};function o(e){return new Uint32Array(Math.ceil(e/32))}function s(e){var t=e||0,n=a;typeof e==`object`&&(t=e.initialLength||e.initialCapacity||0,n=e.policy||n),this.size=0,this.length=t,this.capacity=Math.ceil(this.length/32)*32,this.policy=n,this.array=o(this.capacity)}s.prototype.set=function(e,t){if(this.length<e)throw Error(`BitVector.set: index out of bounds.`);var n=e>>5,r=e&31,i=this.array[n],a=t===0||t===!1?this.array[n]&=~(1<<r):this.array[n]|=1<<r;return a>>>=0,a>i?this.size++:a<i&&this.size--,this},s.prototype.reset=function(e){var t=e>>5,n=e&31,r=this.array[t];return(this.array[t]&=~(1<<n))<r&&this.size--,this},s.prototype.flip=function(e){var t=e>>5,n=e&31,r=this.array[t],i=this.array[t]^=1<<n;return i>>>=0,i>r?this.size++:i<r&&this.size--,this},s.prototype.applyPolicy=function(e){var t=this.policy(e||this.capacity);if(typeof t!=`number`||t<0)throw Error(`mnemonist/bit-vector.applyPolicy: policy returned an invalid value (expecting a positive integer).`);if(t<=this.capacity)throw Error(`mnemonist/bit-vector.applyPolicy: policy returned a less or equal capacity to allocate.`);return Math.ceil(t/32)*32},s.prototype.reallocate=function(e){var t=e;if(e=Math.ceil(e/32)*32,t<this.length&&(this.length=t),e===this.capacity)return this;var n=this.array,r=e/32;return r===this.array.length?this:(r>this.array.length?(this.array=new Uint32Array(r),this.array.set(n,0)):this.array=n.slice(0,r),this.capacity=e,this)},s.prototype.grow=function(e){var t;if(typeof e==`number`){if(this.capacity>=e)return this;for(t=this.capacity;t<e;)t=this.applyPolicy(t);return this.reallocate(t),this}return t=this.applyPolicy(),this.reallocate(t),this},s.prototype.resize=function(e){return e===this.length?this:e<this.length?(this.length=e,this):(this.length=e,this.reallocate(e),this)},s.prototype.push=function(e){if(this.capacity===this.length&&this.grow(),e===0||e===!1)return++this.length;this.size++;var t=this.length++,n=t>>5,r=t&31;return this.array[n]|=1<<r,this.length},s.prototype.pop=function(){if(this.length!==0){var e=--this.length,t=e>>5,n=e&31;return this.array[t]>>n&1}},s.prototype.get=function(e){if(!(this.length<e)){var t=e>>5,n=e&31;return this.array[t]>>n&1}},s.prototype.test=function(e){return this.length<e?!1:!!this.get(e)},s.prototype.rank=function(e){if(this.size===0)return 0;for(var t=e>>5,n=e&31,r=0,a=0;a<t;a++)r+=i.table8Popcount(this.array[a]);var o=this.array[t]&(1<<n)-1;return r+=i.table8Popcount(o),r},s.prototype.select=function(e){if(this.size===0||e>=this.length)return-1;for(var t,n=32,r=0,i=0,a=0,o=this.array.length;a<o;a++)if(t=this.array[a],t!==0){a===o-1&&(n=this.length%32||32);for(var s=0;s<n;s++,r++)if(i+=t>>s&1,i===e)return r}},s.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.length,r,i,a=32,o=0,s=this.array.length;o<s;o++){r=this.array[o],o===s-1&&(a=n%32||32);for(var c=0;c<a;c++)i=r>>c&1,e.call(t,i,o*32+c)}},s.prototype.values=function(){var e=this.length,t=!1,r,i,a=this.array,o=a.length,s=0,c=-1,l=32;return new n(function n(){if(!t){if(s>=o)return{done:!0};s===o-1&&(l=e%32||32),r=a[s++],t=!0,c=-1}return c++,c>=l?(t=!1,n()):(i=r>>c&1,{value:i})})},s.prototype.entries=function(){var e=this.length,t=!1,r,i,a=this.array,o,s=a.length,c=0,l=-1,u=32;return new n(function n(){if(!t){if(c>=s)return{done:!0};c===s-1&&(u=e%32||32),r=a[c++],t=!0,l=-1}return l++,o=~-c*32+l,l>=u?(t=!1,n()):(i=r>>l&1,{value:[o,i]})})},typeof Symbol<`u`&&(s.prototype[Symbol.iterator]=s.prototype.values),s.prototype.inspect=function(){var e=new Uint8Array(this.length);return this.forEach(function(t,n){e[n]=t}),Object.defineProperty(e,"constructor",{value:s,enumerable:!1}),e},typeof Symbol<`u`&&(s.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=s.prototype.inspect),s.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},t.exports=s})),g=t(((e,t)=>{function n(e,t){return(e&65535)*t+(((e>>>16)*t&65535)<<16)&4294967295}function r(e,t){return(e&65535)+(t>>>16)+(((e>>>16)+t&65535)<<16)&4294967295}function i(e,t){return e<<t|e>>>32-t}t.exports=function e(t,a){var o=3432918353,s=461845907,c=15,l=13,u=5,d=1801774676,f=t,p,m,h;for(m=0,h=a.length-4;m<=h;m+=4)p=a[m]|a[m+1]<<8|a[m+2]<<16|a[m+3]<<24,p=n(p,o),p=i(p,c),p=n(p,s),f^=p,f=i(f,l),f=n(f,u),f=r(f,d);switch(p=0,a.length&3){case 3:p^=a[m+2]<<16;case 2:p^=a[m+1]<<8;case 1:p^=a[m],p=n(p,o),p=i(p,c),p=n(p,s),f^=p;default:}return f^=a.length,f^=f>>>16,f=n(f,2246822507),f^=f>>>13,f=n(f,3266489909),f^=f>>>16,f>>>0}})),_=t(((e,t)=>{var r=g(),i=n(),a=Math.LN2*Math.LN2,o={errorRate:.005};function s(e){var t=new Uint16Array(e.length),n,r;for(n=0,r=e.length;n<r;n++)t[n]=e.charCodeAt(n);return t}function c(e,t,n){return r(t*4221880213&4294967295,n)%(e*8)}function l(e){var t={};if(!e)throw Error(`mnemonist/BloomFilter.constructor: a BloomFilter must be created with a capacity.`);if(typeof e==`object`?t=e:t.capacity=e,typeof t.capacity!=`number`||t.capacity<=0)throw Error("mnemonist/BloomFilter.constructor: `capacity` option should be a positive integer.");if(this.capacity=t.capacity,this.errorRate=t.errorRate||o.errorRate,typeof this.errorRate!=`number`||t.errorRate<=0)throw Error("mnemonist/BloomFilter.constructor: `errorRate` option should be a positive float.");this.clear()}l.prototype.clear=function(){var e=-1/a*this.capacity*Math.log(this.errorRate)/8|0;this.hashFunctions=e*8/this.capacity*Math.LN2|0,this.data=new Uint8Array(e)},l.prototype.add=function(e){for(var t=s(e),n=0,r=this.hashFunctions;n<r;n++){var i=c(this.data.length,n,t),a=1<<(7&i);this.data[i>>3]|=a}return this},l.prototype.test=function(e){for(var t=s(e),n=0,r=this.hashFunctions;n<r;n++){var i=c(this.data.length,n,t);if(!(this.data[i>>3]&1<<(7&i)))return!1}return!0},l.prototype.toJSON=function(){return this.data},l.from=function(e,t){if(!t&&(t=e.length||e.size,typeof t!=`number`))throw Error(`BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.`);var n=new l(t);return i(e,function(e){n.add(e)}),n},t.exports=l})),v=t(((e,t)=>{var r=n();function i(e){if(typeof e!=`function`)throw Error("mnemonist/BKTree.constructor: given `distance` should be a function.");this.distance=e,this.clear()}i.prototype.add=function(e){if(!this.root)return this.root={item:e,children:{}},this.size++,this;for(var t=this.root,n;n=this.distance(e,t.item),t.children[n];)t=t.children[n];return t.children[n]={item:e,children:{}},this.size++,this},i.prototype.search=function(e,t){if(!this.root)return[];for(var n=[],r=[this.root],i,a,o,s,c;r.length;)for(i=r.pop(),o=this.distance(t,i.item),o<=e&&n.push({item:i.item,distance:o}),s=o-e,c=o+e+1;s<c;s++)a=i.children[s],a&&r.push(a);return n},i.prototype.clear=function(){this.size=0,this.root=null},i.prototype.toJSON=function(){return this.root},i.prototype.inspect=function(){for(var e=[],t=[this.root],n,r;t.length;)if(n=t.pop(),n)for(r in e.push(n.item),n.children)t.push(n.children[r]);return Object.defineProperty(e,"constructor",{value:i,enumerable:!1}),e},typeof Symbol<`u`&&(i.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=i.prototype.inspect),i.from=function(e,t){var n=new i(t);return r(e,function(e){n.add(e)}),n},t.exports=i})),y=t(((e,t)=>{var n=c(),i=r();function a(e,t){if(arguments.length<2)throw Error(`mnemonist/fixed-deque: expecting an Array class and a capacity.`);if(typeof t!=`number`||t<=0)throw Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=e,this.capacity=t,this.items=new e(this.capacity),this.clear()}a.prototype.clear=function(){this.start=0,this.size=0},a.prototype.push=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.push: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start+this.size;return t>=this.capacity&&(t-=this.capacity),this.items[t]=e,++this.size},a.prototype.unshift=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.unshift: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start-1;return this.start===0&&(t=this.capacity-1),this.items[t]=e,this.start=t,++this.size},a.prototype.pop=function(){if(this.size!==0){this.size--;var e=this.start+this.size;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},a.prototype.shift=function(){if(this.size!==0){var e=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[e]}},a.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},a.prototype.peekLast=function(){if(this.size!==0){var e=this.start+this.size-1;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},a.prototype.get=function(e){if(!(this.size===0||e>=this.capacity))return e=this.start+e,e>=this.capacity&&(e-=this.capacity),this.items[e]},a.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.capacity,r=this.size,i=this.start,a=0;a<r;)e.call(t,this.items[i],a,this),i++,a++,i===n&&(i=0)},a.prototype.toArray=function(){var e=this.start+this.size;if(e<this.capacity)return this.items.slice(this.start,e);for(var t=new this.ArrayClass(this.size),n=this.capacity,r=this.size,i=this.start,a=0;a<r;)t[a]=this.items[i],i++,a++,i===n&&(i=0);return t},a.prototype.values=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,a++,r===t&&(r=0),{value:i,done:!1}})},a.prototype.entries=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,r===t&&(r=0),{value:[a++,i],done:!1}})},typeof Symbol<`u`&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){var e=this.toArray();return e.type=this.ArrayClass.name,e.capacity=this.capacity,Object.defineProperty(e,"constructor",{value:a,enumerable:!1}),e},typeof Symbol<`u`&&(a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=a.prototype.inspect),a.from=function(e,t,r){if(arguments.length<3&&(r=n.guessLength(e),typeof r!=`number`))throw Error(`mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.`);var i=new a(t,r);if(n.isArrayLike(e)){var o,s;for(o=0,s=e.length;o<s;o++)i.items[o]=e[o];return i.size=s,i}return n.forEach(e,function(e){i.push(e)}),i},t.exports=a})),b=t(((e,t)=>{var n=c(),r=y();function i(e,t){if(arguments.length<2)throw Error(`mnemonist/circular-buffer: expecting an Array class and a capacity.`);if(typeof t!=`number`||t<=0)throw Error("mnemonist/circular-buffer: `capacity` should be a positive number.");this.ArrayClass=e,this.capacity=t,this.items=new e(this.capacity),this.clear()}function a(e){i.prototype[e]=r.prototype[e]}Object.keys(r.prototype).forEach(a),typeof Symbol<`u`&&Object.getOwnPropertySymbols(r.prototype).forEach(a),i.prototype.push=function(e){var t=this.start+this.size;return t>=this.capacity&&(t-=this.capacity),this.items[t]=e,this.size===this.capacity?(t++,t>=this.capacity?this.start=0:this.start=t,this.size):++this.size},i.prototype.unshift=function(e){var t=this.start-1;return this.start===0&&(t=this.capacity-1),this.items[t]=e,this.size===this.capacity?(this.start=t,this.size):(this.start=t,++this.size)},i.from=function(e,t,r){if(arguments.length<3&&(r=n.guessLength(e),typeof r!=`number`))throw Error(`mnemonist/circular-buffer.from: could not guess iterable length. Please provide desired capacity as last argument.`);var a=new i(t,r);if(n.isArrayLike(e)){var o,s;for(o=0,s=e.length;o<s;o++)a.items[o]=e[o];return a.size=s,a}return n.forEach(e,function(e){a.push(e)}),a},t.exports=i})),x=t(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultMap.constructor: expecting a function.`);this.items=new Map,this.factory=e,this.size=0}n.prototype.clear=function(){this.items.clear(),this.size=0},n.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e,this.size),this.items.set(e,t),this.size++),t},n.prototype.peek=function(e){return this.items.get(e)},n.prototype.set=function(e,t){return this.items.set(e,t),this.size=this.items.size,this},n.prototype.has=function(e){return this.items.has(e)},n.prototype.delete=function(e){var t=this.items.delete(e);return this.size=this.items.size,t},n.prototype.forEach=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},n.prototype.entries=function(){return this.items.entries()},n.prototype.keys=function(){return this.items.keys()},n.prototype.values=function(){return this.items.values()},typeof Symbol<`u`&&(n.prototype[Symbol.iterator]=n.prototype.entries),n.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(n.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=n.prototype.inspect),n.autoIncrement=function(){var e=0;return function(){return e++}},t.exports=n})),S=t(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultWeakMap.constructor: expecting a function.`);this.items=new WeakMap,this.factory=e}n.prototype.clear=function(){this.items=new WeakMap},n.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e),this.items.set(e,t)),t},n.prototype.peek=function(e){return this.items.get(e)},n.prototype.set=function(e,t){return this.items.set(e,t),this},n.prototype.has=function(e){return this.items.has(e)},n.prototype.delete=function(e){return this.items.delete(e)},n.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(n.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=n.prototype.inspect),t.exports=n})),C=t(((e,t)=>{var n=s();function r(e){var t=n.getPointerArray(e),r=n.getPointerArray(Math.log2(e));this.size=e,this.dimension=e,this.parents=new t(e),this.ranks=new r(e);for(var i=0;i<e;i++)this.parents[i]=i}r.prototype.find=function(e){for(var t=e,n,r;n=this.parents[t],t!==n;)t=n;for(;r=this.parents[e],r!==t;)this.parents[e]=t,e=r;return t},r.prototype.union=function(e,t){var n=this.find(e),r=this.find(t);if(n===r)return this;this.dimension--;var i=this.ranks[e],a=this.ranks[t];return i<a?this.parents[n]=r:i>a?this.parents[r]=n:(this.parents[r]=n,this.ranks[n]++),this},r.prototype.connected=function(e,t){return this.find(e)===this.find(t)},r.prototype.mapping=function(){for(var e=n.getPointerArray(this.dimension),t={},r=new e(this.size),i=0,a,o=0,s=this.parents.length;o<s;o++)a=this.find(o),t[a]===void 0?(r[o]=i,t[a]=i++):r[o]=t[a];return r},r.prototype.compile=function(){for(var e={},t=Array(this.dimension),n=0,r,i=0,a=this.parents.length;i<a;i++)r=this.find(i),e[r]===void 0?(t[n]=[i],e[r]=n++):t[e[r]].push(i);return t},r.prototype.inspect=function(){var e=this.compile();return Object.defineProperty(e,"constructor",{value:r,enumerable:!1}),e},typeof Symbol<`u`&&(r.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=r.prototype.inspect),t.exports=r})),w=t(((e,t)=>{var n=a(),r=l(),i=n.DEFAULT_COMPARATOR,o=n.reverseComparator;function s(e,t,n,i){for(var a=n,o=i,s=t[i],c=2*i+1,l;c<a;)l=c+1,l<a&&e(t[c],t[l])>=0&&(c=l),t[i]=t[c],i=c,c=2*i+1;t[i]=s,r.siftDown(e,t,o,i)}function c(e,t,n,r){for(var i=r,a=new e(r),o,c;i>0;)o=n[--i],i!==0&&(c=n[0],n[0]=o,s(t,n,--r,0),o=c),a[i]=o;return a}function u(e,t,n){if(arguments.length===2&&(n=t,t=null),this.ArrayClass=e,this.capacity=n,this.items=new e(n),this.clear(),this.comparator=t||i,typeof n!=`number`&&n<=0)throw Error(`mnemonist/FixedReverseHeap.constructor: capacity should be a number > 0.`);if(typeof this.comparator!=`function`)throw Error(`mnemonist/FixedReverseHeap.constructor: given comparator should be a function.`);this.comparator=o(this.comparator)}u.prototype.clear=function(){this.size=0},u.prototype.push=function(e){return this.size<this.capacity?(this.items[this.size]=e,r.siftDown(this.comparator,this.items,0,this.size),this.size++):this.comparator(e,this.items[0])>0&&r.replace(this.comparator,this.items,e),this.size},u.prototype.peek=function(){return this.items[0]},u.prototype.consume=function(){var e=c(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,e},u.prototype.toArray=function(){return c(this.ArrayClass,this.comparator,this.items.slice(0,this.size),this.size)},u.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:u,enumerable:!1}),e},typeof Symbol<`u`&&(u.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=u.prototype.inspect),t.exports=u})),T=t(((e,t)=>{var r=n(),i=function(e){return e};function a(e){if(this.items=new Map,this.clear(),Array.isArray(e)?(this.writeHashFunction=e[0],this.readHashFunction=e[1]):(this.writeHashFunction=e,this.readHashFunction=e),this.writeHashFunction||=i,this.readHashFunction||=i,typeof this.writeHashFunction!=`function`||typeof this.readHashFunction!=`function`)throw Error(`mnemonist/FuzzyMap.constructor: invalid hash function given.`)}a.prototype.clear=function(){this.items.clear(),this.size=0},a.prototype.add=function(e){var t=this.writeHashFunction(e);return this.items.set(t,e),this.size=this.items.size,this},a.prototype.set=function(e,t){return e=this.writeHashFunction(e),this.items.set(e,t),this.size=this.items.size,this},a.prototype.get=function(e){return e=this.readHashFunction(e),this.items.get(e)},a.prototype.has=function(e){return e=this.readHashFunction(e),this.items.has(e)},a.prototype.forEach=function(e,t){t=arguments.length>1?t:this,this.items.forEach(function(n){e.call(t,n,n)})},a.prototype.values=function(){return this.items.values()},typeof Symbol<`u`&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){var e=Array.from(this.items.values());return Object.defineProperty(e,"constructor",{value:a,enumerable:!1}),e},typeof Symbol<`u`&&(a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=a.prototype.inspect),a.from=function(e,t,n){var i=new a(t);return r(e,function(e,t){n?i.set(t,e):i.add(e)}),i},t.exports=a})),E=t(((e,t)=>{var i=r(),a=n();function o(e){this.Container=e||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:o,enumerable:!1})}o.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},o.prototype.set=function(e,t){var n=this.items.get(e),r;return n||(this.dimension++,n=new this.Container,this.items.set(e,n)),this.Container===Set?(r=n.size,n.add(t),r<n.size&&this.size++):(n.push(t),this.size++),this},o.prototype.delete=function(e){var t=this.items.get(e);return t?(this.size-=this.Container===Set?t.size:t.length,this.dimension--,this.items.delete(e),!0):!1},o.prototype.remove=function(e,t){var n=this.items.get(e),r,i;return n?this.Container===Set?(r=n.delete(t),r&&this.size--,n.size===0&&(this.items.delete(e),this.dimension--),r):(i=n.indexOf(t),i===-1?!1:(this.size--,n.length===1?(this.items.delete(e),this.dimension--,!0):(n.splice(i,1),!0))):!1},o.prototype.has=function(e){return this.items.has(e)},o.prototype.get=function(e){return this.items.get(e)},o.prototype.multiplicity=function(e){var t=this.items.get(e);return t===void 0?0:this.Container===Set?t.size:t.length},o.prototype.count=o.prototype.multiplicity,o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;var n;function r(r){e.call(t,r,n)}this.items.forEach(function(e,t){n=t,e.forEach(r)})},o.prototype.forEachAssociation=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},o.prototype.keys=function(){return this.items.keys()},o.prototype.values=function(){var e=this.items.values(),t=!1,n,r,a,o;return this.Container===Set?new i(function i(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,n=r.value.values()}return r=n.next(),r.done?(t=!1,i()):{done:!1,value:r.value}}):new i(function i(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,n=r.value,a=0,o=n.length}return a>=o?(t=!1,i()):{done:!1,value:n[a++]}})},o.prototype.entries=function(){var e=this.items.entries(),t=!1,n,r,a,o,s;return this.Container===Set?new i(function i(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,a=r.value[0],n=r.value[1].values()}return r=n.next(),r.done?(t=!1,i()):{done:!1,value:[a,r.value]}}):new i(function i(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,a=r.value[0],n=r.value[1],o=0,s=n.length}return o>=s?(t=!1,i()):{done:!1,value:[a,n[o++]]}})},o.prototype.containers=function(){return this.items.values()},o.prototype.associations=function(){return this.items.entries()},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.entries),o.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.prototype.toJSON=function(){return this.items},o.from=function(e,t){var n=new o(t);return a(e,function(e,t){n.set(t,e)}),n},t.exports=o})),D=t(((e,t)=>{var r=E(),i=n(),a=function(e){return e};function o(e,t){if(this.items=new r(t),this.clear(),Array.isArray(e)?(this.writeHashFunction=e[0],this.readHashFunction=e[1]):(this.writeHashFunction=e,this.readHashFunction=e),this.writeHashFunction||=a,this.readHashFunction||=a,typeof this.writeHashFunction!=`function`||typeof this.readHashFunction!=`function`)throw Error(`mnemonist/FuzzyMultiMap.constructor: invalid hash function given.`)}o.prototype.clear=function(){this.items.clear(),this.size=0,this.dimension=0},o.prototype.add=function(e){var t=this.writeHashFunction(e);return this.items.set(t,e),this.size=this.items.size,this.dimension=this.items.dimension,this},o.prototype.set=function(e,t){return e=this.writeHashFunction(e),this.items.set(e,t),this.size=this.items.size,this.dimension=this.items.dimension,this},o.prototype.get=function(e){return e=this.readHashFunction(e),this.items.get(e)},o.prototype.has=function(e){return e=this.readHashFunction(e),this.items.has(e)},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this,this.items.forEach(function(n){e.call(t,n,n)})},o.prototype.values=function(){return this.items.values()},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.inspect=function(){var e=Array.from(this);return Object.defineProperty(e,"constructor",{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e,t,n,r){arguments.length===3&&typeof n==`boolean`&&(r=n,n=Array);var a=new o(t,n);return i(e,function(e,t){r?a.set(t,e):a.add(e)}),a},t.exports=o})),ee=t(((e,t)=>{var n=1024;function r(e){return(e&e-1)==0}function i(e,t){if(arguments.length<1)throw Error(`mnemonist/hashed-array-tree: expecting at least a byte array constructor.`);var i=t||0,a=n,o=0;if(typeof t==`object`&&(i=t.initialCapacity||0,o=t.initialLength||0,a=t.blockSize||n),!a||!r(a))throw Error(`mnemonist/hashed-array-tree: block size should be a power of two.`);var s=Math.ceil(Math.max(o,i)/a);this.ArrayClass=e,this.length=o,this.capacity=s*a,this.blockSize=a,this.offsetMask=a-1,this.blockMask=Math.log2(a),this.blocks=Array(s);for(var c=0;c<s;c++)this.blocks[c]=new this.ArrayClass(this.blockSize)}i.prototype.set=function(e,t){if(this.length<e)throw Error(`HashedArrayTree(`+this.ArrayClass.name+`).set: index out of bounds.`);var n=e>>this.blockMask,r=e&this.offsetMask;return this.blocks[n][r]=t,this},i.prototype.get=function(e){if(!(this.length<e)){var t=e>>this.blockMask,n=e&this.offsetMask;return this.blocks[t][n]}},i.prototype.grow=function(e){if(typeof e!=`number`&&(e=this.capacity+this.blockSize),this.capacity>=e)return this;for(;this.capacity<e;)this.blocks.push(new this.ArrayClass(this.blockSize)),this.capacity+=this.blockSize;return this},i.prototype.resize=function(e){return e===this.length?this:e<this.length?(this.length=e,this):(this.length=e,this.grow(e),this)},i.prototype.push=function(e){this.capacity===this.length&&this.grow();var t=this.length,n=t>>this.blockMask,r=t&this.offsetMask;return this.blocks[n][r]=e,++this.length},i.prototype.pop=function(){if(this.length!==0)return this.blocks[this.blocks.length-1][--this.length&this.offsetMask]},i.prototype.inspect=function(){for(var e=new this.ArrayClass(this.length),t,n=0,r=this.length;n<r;n++)t=n>>this.blockMask,e[n]=this.blocks[t][n&this.offsetMask];return e.type=this.ArrayClass.name,e.items=this.length,e.capacity=this.capacity,e.blockSize=this.blockSize,Object.defineProperty(e,"constructor",{value:i,enumerable:!1}),e},typeof Symbol<`u`&&(i.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=i.prototype.inspect),t.exports=i})),O=t(((e,t)=>{var n=r(),i=c();function a(e,t){if(arguments.length<2)throw Error(`mnemonist/fixed-stack: expecting an Array class and a capacity.`);if(typeof t!=`number`||t<=0)throw Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=t,this.ArrayClass=e,this.items=new this.ArrayClass(this.capacity),this.clear()}a.prototype.clear=function(){this.size=0},a.prototype.push=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-stack.push: stack capacity (`+this.capacity+`) exceeded!`);return this.items[this.size++]=e,this.size},a.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},a.prototype.peek=function(){return this.items[this.size-1]},a.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.items.length;n<r;n++)e.call(t,this.items[r-n-1],n,this)},a.prototype.toArray=function(){for(var e=new this.ArrayClass(this.size),t=this.size-1,n=this.size;n--;)e[n]=this.items[t-n];return e},a.prototype.values=function(){var e=this.items,t=this.size,r=0;return new n(function(){if(r>=t)return{done:!0};var n=e[t-r-1];return r++,{value:n,done:!1}})},a.prototype.entries=function(){var e=this.items,t=this.size,r=0;return new n(function(){if(r>=t)return{done:!0};var n=e[t-r-1];return{value:[r++,n],done:!1}})},typeof Symbol<`u`&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.toString=function(){return this.toArray().join(`,`)},a.prototype.toJSON=function(){return this.toArray()},a.prototype.inspect=function(){var e=this.toArray();return e.type=this.ArrayClass.name,e.capacity=this.capacity,Object.defineProperty(e,"constructor",{value:a,enumerable:!1}),e},typeof Symbol<`u`&&(a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=a.prototype.inspect),a.from=function(e,t,n){if(arguments.length<3&&(n=i.guessLength(e),typeof n!=`number`))throw Error(`mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.`);var r=new a(t,n);if(i.isArrayLike(e)){var o,s;for(o=0,s=e.length;o<s;o++)r.items[o]=e[o];return r.size=s,r}return i.forEach(e,function(e){r.push(e)}),r},t.exports=a})),k=t(((e,t)=>{var n=c(),r=s(),i=O();function a(e,t,n,r,i,o,s,c){var l=s+(c-s)/2|0,u=~-l,d=-~l,f=n[l];r[o]=f+1;var p=t?t(e[f]):e[f][1],m=o*2+1,h=o*2+2,g=-1/0,_=-1/0;s<=u&&(g=a(e,t,n,r,i,m,s,u)),d<=c&&(_=a(e,t,n,r,i,h,d,c));var v=Math.max(p,g,_),y=f;return v===g?y=i[r[m]-1]:v===_&&(y=i[r[h]-1]),i[f]=y,v}function o(e,t){this.size=e.length,this.intervals=e;var n=null,o=null;Array.isArray(t)&&(n=t[0],o=t[1]);var s=e.length,c=r.getPointerArray(s+1),l=new c(s),u;for(u=1;u<s;u++)l[u]=u;l.sort(function(t,r){return t=e[t],r=e[r],n?(t=n(t),r=n(r)):(t=t[0],r=r[0]),t<r?-1:+(t>r)});var d=Math.ceil(Math.log2(s+1)),f=new c(2**d-1),p=new c(s);a(e,o,l,f,p,0,0,s-1),l=null,this.height=d,this.tree=f,this.augmentations=p,this.startGetter=n,this.endGetter=o,this.stack=new i(c,this.height)}o.prototype.intervalsContainingPoint=function(e){var t=[],n=this.stack;n.clear(),n.push(0);for(var r=this.tree.length,i,a,o,s,c,l,u,d,f;n.size;)i=n.pop(),a=this.tree[i]-1,o=this.intervals[a],s=this.intervals[this.augmentations[a]],u=this.endGetter?this.endGetter(s):s[1],!(e>u)&&(d=i*2+1,d<r&&this.tree[d]!==0&&n.push(d),c=this.startGetter?this.startGetter(o):o[0],l=this.endGetter?this.endGetter(o):o[1],e>=c&&e<=l&&t.push(o),!(e<c)&&(f=i*2+2,f<r&&this.tree[f]!==0&&n.push(f)));return t},o.prototype.intervalsOverlappingInterval=function(e){var t=this.startGetter?this.startGetter(e):e[0],n=this.endGetter?this.endGetter(e):e[1],r=[],i=this.stack;i.clear(),i.push(0);for(var a=this.tree.length,o,s,c,l,u,d,f,p,m;i.size;)o=i.pop(),s=this.tree[o]-1,c=this.intervals[s],l=this.intervals[this.augmentations[s]],f=this.endGetter?this.endGetter(l):l[1],!(t>f)&&(p=o*2+1,p<a&&this.tree[p]!==0&&i.push(p),u=this.startGetter?this.startGetter(c):c[0],d=this.endGetter?this.endGetter(c):c[1],n>=u&&t<=d&&r.push(c),!(n<u)&&(m=o*2+2,m<a&&this.tree[m]!==0&&i.push(m)));return r},o.prototype.inspect=function(){var e=this.intervals.slice();return Object.defineProperty(e,"constructor",{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e,t){return n.isArrayLike(e)?new o(e,t):new o(Array.from(e),t)},t.exports=o})),A=t((e=>{e.search=function(e,t,n,r){var i=0;n=n===void 0?0:n,r=r===void 0?e.length:r,r--;for(var a;n<=r;)if(i=n+r>>>1,a=e[i],a>t)r=~-i;else if(a<t)n=-~i;else return i;return-1},e.searchWithComparator=function(e,t,n){for(var r=0,i=0,a=~-t.length,o;i<=a;)if(r=i+a>>>1,o=e(t[r],n),o>0)a=~-r;else if(o<0)i=-~r;else return r;return-1},e.lowerBound=function(e,t,n,r){var i=0;for(n=n===void 0?0:n,r=r===void 0?e.length:r;n<r;)i=n+r>>>1,t<=e[i]?r=i:n=-~i;return n},e.lowerBoundWithComparator=function(e,t,n){for(var r=0,i=0,a=t.length;i<a;)r=i+a>>>1,e(n,t[r])<=0?a=r:i=-~r;return i},e.lowerBoundIndices=function(e,t,n,r,i){var a=0;for(r=r===void 0?0:r,i=i===void 0?e.length:i;r<i;)a=r+i>>>1,n<=e[t[a]]?i=a:r=-~a;return r},e.upperBound=function(e,t,n,r){var i=0;for(n=n===void 0?0:n,r=r===void 0?e.length:r;n<r;)i=n+r>>>1,t>=e[i]?n=-~i:r=i;return n},e.upperBoundWithComparator=function(e,t,n){for(var r=0,i=0,a=t.length;i<a;)r=i+a>>>1,e(n,t[r])>=0?i=-~r:a=r;return i}})),j=t((e=>{var t=s(),n=c().isArrayLike,r=A(),i=o();function a(e,n){if(e.length===0)return n.slice();if(n.length===0)return e.slice();var r;e[0]>n[0]&&(r=e,e=n,n=r);var i=e[e.length-1],a=n[0];if(i<=a)return t.isTypedArray(e)?t.concat(e,n):e.concat(n);var o=new e.constructor(e.length+n.length),s,c,l;for(s=0,c=e.length;s<c&&(l=e[s],l<=a);s++)o[s]=l;for(var u=s,d=e.length,f=0,p=n.length,m,h;u<d&&f<p;)m=e[u],h=n[f],m<=h?(o[s++]=m,u++):(o[s++]=h,f++);for(;u<d;)o[s++]=e[u++];for(;f<p;)o[s++]=n[f++];return o}function l(e,n){if(e.length===0)return n.slice();if(n.length===0)return e.slice();var r;e[0]>n[0]&&(r=e,e=n,n=r);var i=e[e.length-1],a=n[0];if(i<a)return t.isTypedArray(e)?t.concat(e,n):e.concat(n);var o=new e.constructor,s,c,l;for(s=0,c=e.length;s<c&&(l=e[s],l<a);s++)o.push(l);for(var u=s,d=e.length,f=0,p=n.length,m,h;u<d&&f<p;)m=e[u],h=n[f],m<=h?((o.length===0||o[o.length-1]!==m)&&o.push(m),u++):((o.length===0||o[o.length-1]!==h)&&o.push(h),f++);for(;u<d;)m=e[u++],(o.length===0||o[o.length-1]!==m)&&o.push(m);for(;f<p;)h=n[f++],(o.length===0||o[o.length-1]!==h)&&o.push(h);return o}e.intersectionUniqueArrays=function(e,t){if(e.length===0||t.length===0)return new e.constructor(0);var n;e[0]>t[0]&&(n=e,e=t,t=n);var i=e[e.length-1],a=t[0];if(i<a)return new e.constructor(0);for(var o=new e.constructor,s=r.lowerBound(e,a),c=e.length,l=0,u=r.upperBound(t,i),d,f;s<c&&l<u;)d=e[s],f=t[l],d<f?s=r.lowerBound(e,f,s+1):d>f?l=r.lowerBound(t,d,l+1):(o.push(d),s++,l++);return o};function u(e){var n=0,r=-1/0,o,s,c,l=[];for(s=0,c=e.length;s<c;s++)o=e[s].length,o!==0&&(l.push(e[s]),n+=o,o>r&&(r=o));if(l.length===0)return new e[0].constructor(0);if(l.length===1)return l[0].slice();if(l.length===2)return a(l[0],l[1]);e=l;var u=new e[0].constructor(n),d=new(t.getPointerArray(r))(e.length),f=new i(function(t,n){return t=e[t][d[t]],n=e[n][d[n]],t<n?-1:+(t>n)});for(s=0;s<c;s++)f.push(s);s=0;for(var p,m;f.size;)p=f.pop(),m=e[p][d[p]++],u[s++]=m,d[p]<e[p].length&&f.push(p);return u}function d(e){var n=-1/0,r,a,o,s=[];for(a=0,o=e.length;a<o;a++)r=e[a].length,r!==0&&(s.push(e[a]),r>n&&(n=r));if(s.length===0)return new e[0].constructor(0);if(s.length===1)return s[0].slice();if(s.length===2)return l(s[0],s[1]);e=s;var c=new e[0].constructor,u=new(t.getPointerArray(n))(e.length),d=new i(function(t,n){return t=e[t][u[t]],n=e[n][u[n]],t<n?-1:+(t>n)});for(a=0;a<o;a++)d.push(a);for(var f,p;d.size;)f=d.pop(),p=e[f][u[f]++],(c.length===0||c[c.length-1]!==p)&&c.push(p),u[f]<e[f].length&&d.push(f);return c}e.kWayIntersectionUniqueArrays=function(e){var t=-1/0,n=-1/0,i=1/0,a,o,s,c,l;for(c=0,l=e.length;c<l;c++){if(s=e[c].length,s===0)return[];s>t&&(t=s),a=e[c][0],o=e[c][s-1],a>n&&(n=a),o<i&&(i=o)}if(n>i)return[];if(n===i)return[n];var u,d,f=e[0],p,m,h,g,_,v,y=n;for(c=1;c<l;c++){for(u=f,d=e[c],f=[],p=0,m=r.lowerBound(d,y),h=u.length,g=d.length;p<h&&m<g;)_=u[p],v=d[m],_<v?p=r.lowerBound(u,v,p+1):_>v?m=r.lowerBound(d,_,m+1):(f.push(_),p++,m++);if(f.length===0)return f;y=f[0]}return f},e.merge=function(){if(arguments.length===2){if(n(arguments[0]))return a(arguments[0],arguments[1])}else if(n(arguments[0]))return u(arguments);return null},e.unionUnique=function(){if(arguments.length===2){if(n(arguments[0]))return l(arguments[0],arguments[1])}else if(n(arguments[0]))return d(arguments);return null},e.intersectionUnique=function(){if(arguments.length===2){if(n(arguments[0]))return e.intersectionUniqueArrays(arguments[0],arguments[1])}else if(n(arguments[0]))return e.kWayIntersectionUniqueArrays(arguments);return null}})),te=t(((e,t)=>{var i=r(),a=n(),o=j();function s(e){return e}function c(e){if(this.clear(),Array.isArray(e)?(this.documentTokenizer=e[0],this.queryTokenizer=e[1]):(this.documentTokenizer=e,this.queryTokenizer=e),this.documentTokenizer||=s,this.queryTokenizer||=s,typeof this.documentTokenizer!=`function`)throw Error(`mnemonist/InvertedIndex.constructor: document tokenizer is not a function.`);if(typeof this.queryTokenizer!=`function`)throw Error(`mnemonist/InvertedIndex.constructor: query tokenizer is not a function.`)}c.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},c.prototype.add=function(e){this.size++;var t=this.items.length;this.items.push(e);var n=this.documentTokenizer(e);if(!Array.isArray(n))throw Error(`mnemonist/InvertedIndex.add: tokenizer function should return an array of tokens.`);for(var r=new Set,i,a,o=0,s=n.length;o<s;o++)i=n[o],!r.has(i)&&(r.add(i),a=this.mapping.get(i),a||(a=[],this.mapping.set(i,a)),a.push(t));return this.dimension=this.mapping.size,this},c.prototype.get=function(e){if(!this.size)return[];var t=this.queryTokenizer(e);if(!Array.isArray(t))throw Error(`mnemonist/InvertedIndex.query: tokenizer function should return an array of tokens.`);if(!t.length)return[];var n=this.mapping.get(t[0]),r,i,a;if(n===void 0||n.length===0)return[];if(t.length>1)for(i=1,a=t.length;i<a;i++){if(r=this.mapping.get(t[i]),r===void 0||r.length===0)return[];n=o.intersectionUniqueArrays(n,r)}var s=Array(n.length);for(i=0,a=s.length;i<a;i++)s[i]=this.items[n[i]];return s},c.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.documents.length;n<r;n++)e.call(t,this.documents[n],n,this)},c.prototype.documents=function(){var e=this.items,t=e.length,n=0;return new i(function(){return n>=t?{done:!0}:{value:e[n++],done:!1}})},c.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<`u`&&(c.prototype[Symbol.iterator]=c.prototype.documents),c.prototype.inspect=function(){var e=this.items.slice();return Object.defineProperty(e,"constructor",{value:c,enumerable:!1}),e},typeof Symbol<`u`&&(c.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=c.prototype.inspect),c.from=function(e,t){var n=new c(t);return a(e,function(e){n.add(e)}),n},t.exports=c})),M=t((e=>{var t=new Float64Array(64),n=new Float64Array(64);function r(e,r,i){var a,o,s,c,l;for(t[0]=r,n[0]=i,o=0;o>=0;)if(s=t[o],c=n[o]-1,s<c){for(a=e[s];s<c;){for(;e[c]>=a&&s<c;)c--;for(s<c&&(e[s++]=e[c]);e[s]<=a&&s<c;)s++;s<c&&(e[c--]=e[s])}e[s]=a,t[o+1]=s+1,n[o+1]=n[o],n[o++]=s,n[o]-t[o]>n[o-1]-t[o-1]&&(l=t[o],t[o]=t[o-1],t[o-1]=l,l=n[o],n[o]=n[o-1],n[o-1]=l)}else o--;return e}e.inplaceQuickSort=r;function i(e,r,i,a){var o,s,c,l,u,d;for(t[0]=i,n[0]=a,s=0;s>=0;)if(c=t[s],l=n[s]-1,c<l){for(u=r[c],o=e[u];c<l;){for(;e[r[l]]>=o&&c<l;)l--;for(c<l&&(r[c++]=r[l]);e[r[c]]<=o&&c<l;)c++;c<l&&(r[l--]=r[c])}r[c]=u,t[s+1]=c+1,n[s+1]=n[s],n[s++]=c,n[s]-t[s]>n[s-1]-t[s-1]&&(d=t[s],t[s]=t[s-1],t[s-1]=d,d=n[s],n[s]=n[s-1],n[s-1]=d)}else s--;return r}e.inplaceQuickSortIndices=i})),ne=t(((e,t)=>{var n=c(),r=s(),i=a().createTupleComparator,o=w(),l=M().inplaceQuickSortIndices;function u(e,t,n,r){var i,a=0,o;for(i=0;i<e;i++)o=t[i][n]-r[i],a+=o*o;return a}function d(e,t){var n=t.length,i=Array(e),a=Array(n),o,s=new(r.getPointerArray(n))(n),c,l,u,d=!0;for(c=0;c<e;c++){for(o=new Float64Array(n),l=0;l<n;l++)u=t[l],o[l]=u[1][c],d&&(a[l]=u[0],s[l]=l);d=!1,i[c]=o}return{axes:i,ids:s,labels:a}}function f(e,t,n,i){for(var a=i.length,o=r.getPointerArray(a+1),s=new o(a),c=new o(a),u=new o(a),d=[[0,0,n.length,-1,0]],f,p,m,h,g,_,v,y,b=0;d.length!==0;)f=d.pop(),y=f[0],_=f[1],v=f[2],p=f[3],m=f[4],l(t[y],n,_,v),a=v-_,h=_+(a>>>1),g=n[h],s[b]=g,p>-1&&(m===0?c[p]=b+1:u[p]=b+1),y=(y+1)%e,h!==_&&h!==v-1&&d.push([y,h+1,v,b,1]),h!==_&&d.push([y,_,h,b,0]),b++;return{axes:t,labels:i,pivots:s,lefts:c,rights:u}}function p(e,t){this.dimensions=e,this.visited=0,this.axes=t.axes,this.labels=t.labels,this.pivots=t.pivots,this.lefts=t.lefts,this.rights=t.rights,this.size=this.labels.length}p.prototype.nearestNeighbor=function(e){var t=1/0,n=null,r=this.dimensions,i=this.axes,a=this.pivots,o=this.lefts,s=this.rights,c=0;function l(d,f){c++;var p=o[f],m=s[f],h=a[f],g=u(r,i,h,e);if(!(g<t&&(n=h,t=g,g===0))){var _=i[d][h]-e[d];d=(d+1)%r,_>0?p!==0&&l(d,p-1):m!==0&&l(d,m-1),_*_<t&&(_>0?m!==0&&l(d,m-1):p!==0&&l(d,p-1))}}return l(0,0),this.visited=c,this.labels[n]};var m=i(3),h=i(2);p.prototype.kNearestNeighbors=function(e,t){if(e<=0)throw Error(`mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.`);if(e=Math.min(e,this.size),e===1)return[this.nearestNeighbor(t)];var n=new o(Array,m,e),r=this.dimensions,i=this.axes,a=this.pivots,s=this.lefts,c=this.rights,l=0;function d(o,f){var p=s[f],m=c[f],h=a[f],g=u(r,i,h,t);n.push([g,l++,h]);var _=t[o],v=i[o][h],y=_-v;o=(o+1)%r,_<v?p!==0&&d(o,p-1):m!==0&&d(o,m-1),(y*y<n.peek()[0]||n.size<e)&&(_<v?m!==0&&d(o,m-1):p!==0&&d(o,p-1))}d(0,0),this.visited=l;for(var f=n.consume(),p=0;p<f.length;p++)f[p]=this.labels[f[p][2]];return f},p.prototype.linearKNearestNeighbors=function(e,t){if(e<=0)throw Error(`mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.`);e=Math.min(e,this.size);var n=new o(Array,h,e),r,i,a;for(r=0,i=this.size;r<i;r++)a=u(this.dimensions,this.axes,this.pivots[r],t),n.push([a,r]);var s=n.consume();for(r=0;r<s.length;r++)s[r]=this.labels[this.pivots[s[r][1]]];return s},p.prototype.inspect=function(){var e=new Map;e.dimensions=this.dimensions,Object.defineProperty(e,"constructor",{value:p,enumerable:!1});var t,n,r;for(t=0;t<this.size;t++){for(r=Array(this.dimensions),n=0;n<this.dimensions;n++)r[n]=this.axes[n][t];e.set(this.labels[t],r)}return e},typeof Symbol<`u`&&(p.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=p.prototype.inspect),p.from=function(e,t){var r=d(t,n.toArray(e));return new p(t,f(t,r.axes,r.ids,r.labels))},p.fromAxes=function(e,t){t||=r.indices(e[0].length);var n=e.length;return new p(n,f(e.length,e,r.indices(t.length),t))},t.exports=p})),N=t(((e,t)=>{var i=r(),a=n();function o(){this.clear()}o.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},o.prototype.first=function(){return this.head?this.head.item:void 0},o.prototype.peek=o.prototype.first,o.prototype.last=function(){return this.tail?this.tail.item:void 0},o.prototype.push=function(e){var t={item:e,next:null};return this.head?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),this.size++,this.size},o.prototype.unshift=function(e){var t={item:e,next:null};return this.head?(this.head.next||(this.tail=this.head),t.next=this.head,this.head=t):(this.head=t,this.tail=t),this.size++,this.size},o.prototype.shift=function(){if(this.size){var e=this.head;return this.head=e.next,this.size--,e.item}},o.prototype.forEach=function(e,t){if(this.size){t=arguments.length>1?t:this;for(var n=this.head,r=0;n;)e.call(t,n.item,r,this),n=n.next,r++}},o.prototype.toArray=function(){if(!this.size)return[];for(var e=Array(this.size),t=0,n=this.size,r=this.head;t<n;t++)e[t]=r.item,r=r.next;return e},o.prototype.values=function(){var e=this.head;return new i(function(){if(!e)return{done:!0};var t=e.item;return e=e.next,{value:t,done:!1}})},o.prototype.entries=function(){var e=this.head,t=0;return new i(function(){if(!e)return{done:!0};var n=e.item;return e=e.next,t++,{value:[t-1,n],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.push(e)}),t},t.exports=o})),P=t(((e,t)=>{var i=r(),a=n(),o=s(),l=c();function u(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-cache: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-cache: capacity should be a finite positive integer.`);var r=o.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items={}}u.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},u.prototype.splayOnTop=function(e){var t=this.head;if(this.head===e)return this;var n=this.backward[e],r=this.forward[e];return this.tail===e?this.tail=n:this.backward[r]=n,this.forward[n]=r,this.backward[t]=e,this.head=e,this.forward[e]=t,this},u.prototype.set=function(e,t){var n=this.items[e];if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],delete this.items[this.K[n]]),this.items[e]=n,this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},u.prototype.setpop=function(e,t){var n=null,r=null,i=this.items[e];return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],delete this.items[r]),this.items[e]=i,this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},u.prototype.has=function(e){return e in this.items},u.prototype.get=function(e){var t=this.items[e];if(t!==void 0)return this.splayOnTop(t),this.V[t]},u.prototype.peek=function(e){var t=this.items[e];if(t!==void 0)return this.V[t]},u.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.size,i=this.head,a=this.K,o=this.V,s=this.forward;n<r;)e.call(t,o[i],a[i],this),i=s[i],n++},u.prototype.keys=function(){var e=0,t=this.size,n=this.head,r=this.K,a=this.forward;return new i(function(){if(e>=t)return{done:!0};var i=r[n];return e++,e<t&&(n=a[n]),{done:!1,value:i}})},u.prototype.values=function(){var e=0,t=this.size,n=this.head,r=this.V,a=this.forward;return new i(function(){if(e>=t)return{done:!0};var i=r[n];return e++,e<t&&(n=a[n]),{done:!1,value:i}})},u.prototype.entries=function(){var e=0,t=this.size,n=this.head,r=this.K,a=this.V,o=this.forward;return new i(function(){if(e>=t)return{done:!0};var i=r[n],s=a[n];return e++,e<t&&(n=o[n]),{done:!1,value:[i,s]}})},typeof Symbol<`u`&&(u.prototype[Symbol.iterator]=u.prototype.entries),u.prototype.inspect=function(){for(var e=new Map,t=this.entries(),n;n=t.next(),!n.done;)e.set(n.value[0],n.value[1]);return Object.defineProperty(e,"constructor",{value:u,enumerable:!1}),e},typeof Symbol<`u`&&(u.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=u.prototype.inspect),u.from=function(e,t,n,r){if(arguments.length<2){if(r=l.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new u(t,n,r);return a(e,function(e,t){i.set(t,e)}),i},t.exports=u})),F=t(((e,t)=>{var r=P(),i=n(),a=s(),o=c();function l(e,t,n){arguments.length<2?r.call(this,e):r.call(this,e,t,n);var i=a.getPointerArray(this.capacity);this.deleted=new i(this.capacity),this.deletedSize=0}for(var u in r.prototype)l.prototype[u]=r.prototype[u];typeof Symbol<`u`&&(l.prototype[Symbol.iterator]=r.prototype[Symbol.iterator]),l.prototype.clear=function(){r.prototype.clear.call(this),this.deletedSize=0},l.prototype.set=function(e,t){var n=this.items[e];if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?(n=this.deletedSize>0?this.deleted[--this.deletedSize]:this.size,this.size++):(n=this.tail,this.tail=this.backward[n],delete this.items[this.K[n]]),this.items[e]=n,this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},l.prototype.setpop=function(e,t){var n=null,r=null,i=this.items[e];return i===void 0?(this.size<this.capacity?(i=this.deletedSize>0?this.deleted[--this.deletedSize]:this.size,this.size++):(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],delete this.items[r]),this.items[e]=i,this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},l.prototype.delete=function(e){var t=this.items[e];if(t===void 0)return!1;if(delete this.items[e],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var n=this.backward[t],r=this.forward[t];return this.head===t&&(this.head=r),this.tail===t&&(this.tail=n),this.forward[n]=r,this.backward[r]=n,this.size--,this.deleted[this.deletedSize++]=t,!0},l.prototype.remove=function(e,t=void 0){var n=this.items[e];if(n===void 0)return t;var r=this.V[n];if(delete this.items[e],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,r;var i=this.backward[n],a=this.forward[n];return this.head===n&&(this.head=a),this.tail===n&&(this.tail=i),this.forward[i]=a,this.backward[a]=i,this.size--,this.deleted[this.deletedSize++]=n,r},l.from=function(e,t,n,r){if(arguments.length<2){if(r=o.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var a=new l(t,n,r);return i(e,function(e,t){a.set(t,e)}),a},t.exports=l})),I=t(((e,t)=>{var r=P(),i=n(),a=s(),o=c();function l(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-map: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-map: capacity should be a finite positive integer.`);var r=a.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items=new Map}l.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},l.prototype.set=function(e,t){var n=this.items.get(e);if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],this.items.delete(this.K[n])),this.items.set(e,n),this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},l.prototype.setpop=function(e,t){var n=null,r=null,i=this.items.get(e);return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],this.items.delete(r)),this.items.set(e,i),this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},l.prototype.has=function(e){return this.items.has(e)},l.prototype.get=function(e){var t=this.items.get(e);if(t!==void 0)return this.splayOnTop(t),this.V[t]},l.prototype.peek=function(e){var t=this.items.get(e);if(t!==void 0)return this.V[t]},l.prototype.splayOnTop=r.prototype.splayOnTop,l.prototype.forEach=r.prototype.forEach,l.prototype.keys=r.prototype.keys,l.prototype.values=r.prototype.values,l.prototype.entries=r.prototype.entries,typeof Symbol<`u`&&(l.prototype[Symbol.iterator]=l.prototype.entries),l.prototype.inspect=r.prototype.inspect,l.from=function(e,t,n,r){if(arguments.length<2){if(r=o.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var a=new l(t,n,r);return i(e,function(e,t){a.set(t,e)}),a},t.exports=l})),L=t(((e,t)=>{var r=I(),i=n(),a=s(),o=c();function l(e,t,n){arguments.length<2?r.call(this,e):r.call(this,e,t,n);var i=a.getPointerArray(this.capacity);this.deleted=new i(this.capacity),this.deletedSize=0}for(var u in r.prototype)l.prototype[u]=r.prototype[u];typeof Symbol<`u`&&(l.prototype[Symbol.iterator]=r.prototype[Symbol.iterator]),l.prototype.clear=function(){r.prototype.clear.call(this),this.deletedSize=0},l.prototype.set=function(e,t){var n=this.items.get(e);if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?(n=this.deletedSize>0?this.deleted[--this.deletedSize]:this.size,this.size++):(n=this.tail,this.tail=this.backward[n],this.items.delete(this.K[n])),this.items.set(e,n),this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},l.prototype.setpop=function(e,t){var n=null,r=null,i=this.items.get(e);return i===void 0?(this.size<this.capacity?(i=this.deletedSize>0?this.deleted[--this.deletedSize]:this.size,this.size++):(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],this.items.delete(r)),this.items.set(e,i),this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},l.prototype.delete=function(e){var t=this.items.get(e);if(t===void 0)return!1;if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var n=this.backward[t],r=this.forward[t];return this.head===t&&(this.head=r),this.tail===t&&(this.tail=n),this.forward[n]=r,this.backward[r]=n,this.size--,this.deleted[this.deletedSize++]=t,!0},l.prototype.remove=function(e,t=void 0){var n=this.items.get(e);if(n===void 0)return t;var r=this.V[n];if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,r;var i=this.backward[n],a=this.forward[n];return this.head===n&&(this.head=a),this.tail===n&&(this.tail=i),this.forward[i]=a,this.backward[a]=i,this.size--,this.deleted[this.deletedSize++]=n,r},l.from=function(e,t,n,r){if(arguments.length<2){if(r=o.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-map.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var a=new l(t,n,r);return i(e,function(e,t){a.set(t,e)}),a},t.exports=l})),R=t(((e,t)=>{var i=r(),a=n(),o=w(),s=function(e,t){return e[1]>t[1]?-1:+(e[1]<t[1])};function c(){this.items=new Map,Object.defineProperty(this.items,"constructor",{value:c,enumerable:!1}),this.clear()}c.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},c.prototype.add=function(e,t){if(t===0)return this;if(t<0)return this.remove(e,-t);if(t||=1,typeof t!=`number`)throw Error(`mnemonist/multi-set.add: given count should be a number.`);this.size+=t;let n=this.items.get(e);return n===void 0?this.dimension++:t+=n,this.items.set(e,t),this},c.prototype.set=function(e,t){var n;if(typeof t!=`number`)throw Error(`mnemonist/multi-set.set: given count should be a number.`);return t<=0?(n=this.items.get(e),n!==void 0&&(this.size-=n,this.dimension--),this.items.delete(e),this):(t||=1,n=this.items.get(e),typeof n==`number`?this.items.set(e,n+t):(this.dimension++,this.items.set(e,t)),this.size+=t,this)},c.prototype.has=function(e){return this.items.has(e)},c.prototype.delete=function(e){var t=this.items.get(e);return t===0?!1:(this.size-=t,this.dimension--,this.items.delete(e),!0)},c.prototype.remove=function(e,t){if(t!==0){if(t<0)return this.add(e,-t);if(t||=1,typeof t!=`number`)throw Error(`mnemonist/multi-set.remove: given count should be a number.`);var n=this.items.get(e);if(n!==void 0){var r=Math.max(0,n-t);r===0?(this.items.delete(e),this.size-=n,this.dimension--):(this.items.set(e,r),this.size-=t)}}},c.prototype.edit=function(e,t){var n=this.multiplicity(e);if(n!==0){var r=this.multiplicity(t);return this.items.set(t,n+r),this.items.delete(e),this}},c.prototype.multiplicity=function(e){var t=this.items.get(e);return t===void 0?0:t},c.prototype.get=c.prototype.multiplicity,c.prototype.count=c.prototype.multiplicity,c.prototype.frequency=function(e){return this.size===0?0:this.multiplicity(e)/this.size},c.prototype.top=function(e){if(typeof e!=`number`||e<=0)throw Error(`mnemonist/multi-set.top: n must be a number > 0.`);for(var t=new o(Array,s,e),n=this.items.entries(),r;r=n.next(),!r.done;)t.push(r.value);return t.consume()},c.prototype.forEach=function(e,t){t=arguments.length>1?t:this;var n;this.items.forEach(function(r,i){for(n=0;n<r;n++)e.call(t,i,i)})},c.prototype.forEachMultiplicity=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},c.prototype.keys=function(){return this.items.keys()},c.prototype.values=function(){var e=this.items.entries(),t=!1,n,r,a,o;return new i(function i(){if(!t){if(n=e.next(),n.done)return{done:!0};t=!0,r=n.value[0],a=n.value[1],o=0}return o>=a?(t=!1,i()):(o++,{done:!1,value:r})})},c.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<`u`&&(c.prototype[Symbol.iterator]=c.prototype.values),c.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(c.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=c.prototype.inspect),c.prototype.toJSON=function(){return this.items},c.from=function(e){var t=new c;return a(e,function(e){t.add(e)}),t},c.isSubset=function(e,t){var n=e.multiplicities(),r,i,a;if(e===t)return!0;if(e.dimension>t.dimension)return!1;for(;r=n.next(),!r.done;)if(i=r.value[0],a=r.value[1],t.multiplicity(i)<a)return!1;return!0},c.isSuperset=function(e,t){return c.isSubset(t,e)},t.exports=c})),z=t(((e,t)=>{var i=r(),a=n();function o(e,t,n){return((e**2-Math.abs(t-n)**2)/2|0)+e+1}function s(e,t){for(var n=0,r=0,i=t+1;r<i;r++)n+=o(e,t,r);return n}function c(e,t){return e.length>t.length?-1:e.length<t.length?1:e<t?-1:+(e>t)}function l(e,t){var n=e+1,r=t/n|0,i=r+1,a,o,s=t-r*n,c=n-s,l=Array(e+1);for(a=0;a<c;a++)l[a]=[a*r,r];var u=(a-1)*r+r;for(o=0;o<s;o++)l[a+o]=[u+o*i,i];return l}function u(e,t){var n=t.length,r=e+1,i=n/r|0,a=i+1,o,s,c,l=n-i*r,u=r-l,d=Array(e+1);for(s=0;s<u;s++)o=s*i,d[s]=t.slice(o,o+i);var f=(s-1)*i+i;for(c=0;c<l;c++)o=f+c*a,d[s+c]=t.slice(o,o+a);return d}function d(e,t,n){if(t===0)return 0;var r=n.length,i=e+1,a=r/i|0,o=a+1,s=i-(r-a*i);if(t<=s-1)return t*a;var c=t-s;return s*a+c*o}function f(e,t,n,r,i,a){var o=i-n,s=i+n,c=e-n,l=i+t-c,u=i+t+c,d=r-a;return[Math.max(0,o,l),Math.min(s,u,d)]}function p(e,t,n,r,i,a){var o=t.length,s=f(e,o-n,r,o,i,a),c=s[0],l=s[1],u=``,d=[],p,m,h;for(m=c,h=l+1;m<h;m++)p=t.slice(m,m+a),p!==u&&(d.push(p),u=p);return d}function m(e,t){if(typeof e!=`function`)throw Error("mnemonist/passjoin-index: `levenshtein` should be a function returning edit distance between two strings.");if(typeof t!=`number`||t<1)throw Error("mnemonist/passjoin-index: `k` should be a number > 0");this.levenshtein=e,this.k=t,this.clear()}m.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},m.prototype.add=function(e){var t=e.length,n=this.size;this.strings.push(e),this.size++;var r=u(this.k,e),i=this.invertedIndices[t];i===void 0&&(i={},this.invertedIndices[t]=i);var a,o,s,c,l;for(c=0,l=r.length;c<l;c++)a=r[c],s=a+c,o=i[s],o===void 0?(o=[n],i[s]=o):o.push(n);return this},m.prototype.search=function(e){var t=e.length,n=this.k,r=new Set,i,a,o,s,c,u,d,f,m,h,g,_,v,y,b;for(f=Math.max(0,t-n),m=t+n+1;f<m;f++){var x=this.invertedIndices[f];if(x!==void 0){for(d=l(n,f),h=0,g=d.length;h<g;h++)for(o=d[h][0],s=d[h][1],u=p(n,e,f,h,o,s),u.length||(u=[``]),_=0,v=u.length;_<v;_++)if(c=u[_]+h,i=x[c],i!==void 0)for(y=0,b=i.length;y<b;y++)a=this.strings[i[y]],(t<=n&&f<=n||!r.has(a)&&this.levenshtein(e,a)<=n)&&r.add(a)}}return r},m.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.strings.length;n<r;n++)e.call(t,this.strings[n],n,this)},m.prototype.values=function(){var e=this.strings,t=e.length,n=0;return new i(function(){if(n>=t)return{done:!0};var r=e[n];return n++,{value:r,done:!1}})},typeof Symbol<`u`&&(m.prototype[Symbol.iterator]=m.prototype.values),m.prototype.inspect=function(){var e=this.strings.slice();return Object.defineProperty(e,"constructor",{value:m,enumerable:!1}),e},typeof Symbol<`u`&&(m.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=m.prototype.inspect),m.from=function(e,t,n){var r=new m(t,n);return a(e,function(e){r.add(e)}),r},m.countKeys=s,m.comparator=c,m.partition=l,m.segments=u,m.segmentPos=d,m.multiMatchAwareInterval=f,m.multiMatchAwareSubstrings=p,t.exports=m})),B=t(((e,t)=>{var i=r(),a=n();function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},o.prototype.enqueue=function(e){return this.items.push(e),++this.size},o.prototype.dequeue=function(){if(this.size){var e=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,e}},o.prototype.peek=function(){if(this.size)return this.items[this.offset]},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.offset,r=0,i=this.items.length;n<i;n++,r++)e.call(t,this.items[n],r,this)},o.prototype.toArray=function(){return this.items.slice(this.offset)},o.prototype.values=function(){var e=this.items,t=this.offset;return new i(function(){if(t>=e.length)return{done:!0};var n=e[t];return t++,{value:n,done:!1}})},o.prototype.entries=function(){var e=this.items,t=this.offset,n=0;return new i(function(){if(t>=e.length)return{done:!0};var r=e[t];return t++,{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.enqueue(e)}),t},o.of=function(){return o.from(arguments)},t.exports=o})),V=t(((e,t)=>{var i=r(),a=n();function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.size=0},o.prototype.push=function(e){return this.items.push(e),++this.size},o.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},o.prototype.peek=function(){return this.items[this.size-1]},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.items.length;n<r;n++)e.call(t,this.items[r-n-1],n,this)},o.prototype.toArray=function(){for(var e=Array(this.size),t=this.size-1,n=this.size;n--;)e[n]=this.items[t-n];return e},o.prototype.values=function(){var e=this.items,t=e.length,n=0;return new i(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return n++,{value:r,done:!1}})},o.prototype.entries=function(){var e=this.items,t=e.length,n=0;return new i(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.push(e)}),t},o.of=function(){return o.from(arguments)},t.exports=o})),H=t(((e,t)=>{var n=r(),i=s().getPointerArray;function a(e){var t=i(e);this.start=0,this.size=0,this.capacity=e,this.dense=new t(e),this.sparse=new t(e)}a.prototype.clear=function(){this.start=0,this.size=0},a.prototype.has=function(e){if(this.size===0)return!1;var t=this.sparse[e];return(t<this.capacity&&t>=this.start&&t<this.start+this.size||t<(this.start+this.size)%this.capacity)&&this.dense[t]===e},a.prototype.enqueue=function(e){var t=this.sparse[e];return this.size!==0&&(t<this.capacity&&t>=this.start&&t<this.start+this.size||t<(this.start+this.size)%this.capacity)&&this.dense[t]===e?this:(t=(this.start+this.size)%this.capacity,this.dense[t]=e,this.sparse[e]=t,this.size++,this)},a.prototype.dequeue=function(){if(this.size!==0){var e=this.start;this.size--,this.start++,this.start===this.capacity&&(this.start=0);var t=this.dense[e];return this.sparse[t]=this.capacity,t}},a.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.capacity,r=this.size,i=this.start,a=0;a<r;)e.call(t,this.dense[i],a,this),i++,a++,i===n&&(i=0)},a.prototype.values=function(){var e=this.dense,t=this.capacity,r=this.size,i=this.start,a=0;return new n(function(){if(a>=r)return{done:!0};var n=e[i];return i++,a++,i===t&&(i=0),{value:n,done:!1}})},typeof Symbol<`u`&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){var e=[];return this.forEach(function(t){e.push(t)}),Object.defineProperty(e,"constructor",{value:a,enumerable:!1}),e.capacity=this.capacity,e},typeof Symbol<`u`&&(a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=a.prototype.inspect),t.exports=a})),U=t(((e,t)=>{var n=r(),i=s().getPointerArray;function a(e,t){arguments.length<2&&(t=e,e=Array);var n=i(t);this.size=0,this.length=t,this.dense=new n(t),this.sparse=new n(t),this.vals=new e(t)}a.prototype.clear=function(){this.size=0},a.prototype.has=function(e){var t=this.sparse[e];return t<this.size&&this.dense[t]===e},a.prototype.get=function(e){var t=this.sparse[e];if(t<this.size&&this.dense[t]===e)return this.vals[t]},a.prototype.set=function(e,t){var n=this.sparse[e];return n<this.size&&this.dense[n]===e?(this.vals[n]=t,this):(this.dense[this.size]=e,this.sparse[e]=this.size,this.vals[this.size]=t,this.size++,this)},a.prototype.delete=function(e){var t=this.sparse[e];return t>=this.size||this.dense[t]!==e?!1:(t=this.dense[this.size-1],this.dense[this.sparse[e]]=t,this.sparse[t]=this.sparse[e],this.size--,!0)},a.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0;n<this.size;n++)e.call(t,this.vals[n],this.dense[n])},a.prototype.keys=function(){var e=this.size,t=this.dense,r=0;return new n(function(){if(r<e){var n=t[r];return r++,{value:n}}return{done:!0}})},a.prototype.values=function(){var e=this.size,t=this.vals,r=0;return new n(function(){if(r<e){var n=t[r];return r++,{value:n}}return{done:!0}})},a.prototype.entries=function(){var e=this.size,t=this.dense,r=this.vals,i=0;return new n(function(){if(i<e){var n=[t[i],r[i]];return i++,{value:n}}return{done:!0}})},typeof Symbol<`u`&&(a.prototype[Symbol.iterator]=a.prototype.entries),a.prototype.inspect=function(){for(var e=new Map,t=0;t<this.size;t++)e.set(this.dense[t],this.vals[t]);return Object.defineProperty(e,"constructor",{value:a,enumerable:!1}),e.length=this.length,this.vals.constructor!==Array&&(e.type=this.vals.constructor.name),e},typeof Symbol<`u`&&(a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=a.prototype.inspect),t.exports=a})),W=t(((e,t)=>{var n=r(),i=s().getPointerArray;function a(e){var t=i(e);this.size=0,this.length=e,this.dense=new t(e),this.sparse=new t(e)}a.prototype.clear=function(){this.size=0},a.prototype.has=function(e){var t=this.sparse[e];return t<this.size&&this.dense[t]===e},a.prototype.add=function(e){var t=this.sparse[e];return t<this.size&&this.dense[t]===e?this:(this.dense[this.size]=e,this.sparse[e]=this.size,this.size++,this)},a.prototype.delete=function(e){var t=this.sparse[e];return t>=this.size||this.dense[t]!==e?!1:(t=this.dense[this.size-1],this.dense[this.sparse[e]]=t,this.sparse[t]=this.sparse[e],this.size--,!0)},a.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n,r=0;r<this.size;r++)n=this.dense[r],e.call(t,n,n)},a.prototype.values=function(){var e=this.size,t=this.dense,r=0;return new n(function(){if(r<e){var n=t[r];return r++,{value:n}}return{done:!0}})},typeof Symbol<`u`&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){for(var e=new Set,t=0;t<this.size;t++)e.add(this.dense[t]);return Object.defineProperty(e,"constructor",{value:a,enumerable:!1}),e.length=this.length,e},typeof Symbol<`u`&&(a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=a.prototype.inspect),t.exports=a})),G=t(((e,t)=>{var r=n(),i=2,a=2,o=new Set([0,1,2]),s={0:`Returns only the top suggestion`,1:`Returns suggestions with the smallest edit distance`,2:`Returns every suggestion (no early termination)`};function c(e){var t=new Set;return typeof e==`number`&&t.add(e),{suggestions:t,count:0}}function l(e,t,n){return{term:e||``,distance:t||0,count:n||0}}function u(e,t,n,r){r||=new Set,t++;var i,a=e.length,o;if(a>1)for(o=0;o<a;o++)i=e.substring(0,o)+e.substring(o+1),r.has(i)||(r.add(i),t<n&&u(i,t,n,r));return r}function d(e,t,n,r,i,a){var o=n.suggestions.values().next().value;t<2&&n.suggestions.size>0&&e[o].length-a.length>r.length-a.length&&(n.suggestions=new Set,n.count=0),(t===2||!n.suggestions.size||e[o].length-a.length>=r.length-a.length)&&n.suggestions.add(i)}function f(e,t){var n=e.length,r=t.length,i=[[]],a=n+r,o=new Map,s,c,l;for(i[0][0]=a,s=0;s<=n;s++)i[s+1]||(i[s+1]=[]),i[s+1][1]=s,i[s+1][0]=a;for(l=0;l<=r;l++)i[1][l+1]=l,i[0][l+1]=a;var u=e+t,d;for(s=0,c=u.length;s<c;s++)d=u[s],o.has(d)||o.set(d,0);for(s=1;s<=n;s++){var f=0;for(l=1;l<=r;l++){var p=o.get(t[l-1]),m=f;e[s-1]===t[l-1]?(i[s+1][l+1]=i[s][l],f=l):i[s+1][l+1]=Math.min(i[s][l],i[s+1][l],i[s][l+1])+1,i[s+1][l+1]=Math.min(i[s+1][l+1],i[p][m]+(s-p-1)+1+(l-m-1))}o.set(e[s-1],s)}return i[n+1][r+1]}function p(e,t,n,r,i,a){var o=a.length;if(o-r>i)return[];for(var s=[a],u=new Set,d=new Set,p=[],m,h;s.length>0&&(m=s.shift(),!(n<2&&p.length>0&&o-m.length>p[0].distance));){if(h=e[m],h!==void 0){if(typeof h==`number`&&(h=c(h)),h.count>0&&!d.has(m)){d.add(m);var g=l(m,o-m.length,h.count);if(p.push(g),n<2&&o-m.length===0)break}h.suggestions.forEach(i=>{var s=t[i];if(!d.has(s)){d.add(s);var c=0;if(a!==s)if(s.length===m.length)c=o-m.length;else if(o===m.length)c=s.length-m.length;else{for(var u=0,h=0,g=s.length;u<g&&u<o&&s[u]===a[u];)u++;for(;h<g-u&&h<o&&s[g-h-1]===a[o-h-1];)h++;c=u>0||h>0?f(s.substr(u,g-u-h),a.substr(u,o-u-h)):f(s,a)}if(n<2&&p.length>0&&p[0].distance>c&&(p=[]),!(n<2&&p.length>0&&c>p[0].distance)&&c<=r){var _=e[s];_!==void 0&&p.push(l(s,c,_.count))}}})}if(o-m.length<r){if(n<2&&p.length>0&&o-m.length>=p[0].distance)continue;for(var _=0,v=m.length;_<v;_++){var y=m.substring(0,_)+m.substring(_+1);u.has(y)||(u.add(y),s.push(y))}}}return n===0?p.slice(0,1):p}function m(e){if(e||={},this.clear(),this.maxDistance=typeof e.maxDistance==`number`?e.maxDistance:i,this.verbosity=typeof e.verbosity==`number`?e.verbosity:a,typeof this.maxDistance!=`number`||this.maxDistance<=0)throw Error("mnemonist/SymSpell.constructor: invalid `maxDistance` option. Should be a integer greater than 0.");if(!o.has(this.verbosity))throw Error("mnemonist/SymSpell.constructor: invalid `verbosity` option. Should be either 0, 1 or 2.")}m.prototype.clear=function(){this.size=0,this.dictionary=Object.create(null),this.maxLength=0,this.words=[]},m.prototype.add=function(e){var t=this.dictionary[e];if(t===void 0?(t=c(),t.count++,this.dictionary[e]=t,e.length>this.maxLength&&(this.maxLength=e.length)):(typeof t==`number`&&(t=c(t),this.dictionary[e]=t),t.count++),t.count===1){var n=this.words.length;this.words.push(e),u(e,0,this.maxDistance).forEach(t=>{var r=this.dictionary[t];r===void 0?this.dictionary[t]=n:(typeof r==`number`&&(r=c(r),this.dictionary[t]=r),r.suggestions.has(n)||d(this.words,this.verbosity,r,e,n,t))})}return this.size++,this},m.prototype.search=function(e){return p(this.dictionary,this.words,this.verbosity,this.maxDistance,this.maxLength,e)},m.prototype.inspect=function(){var e=[];for(var t in e.size=this.size,e.maxDistance=this.maxDistance,e.verbosity=this.verbosity,e.behavior=s[this.verbosity],this.dictionary)typeof this.dictionary[t]==`object`&&this.dictionary[t].count&&e.push([t,this.dictionary[t].count]);return Object.defineProperty(e,"constructor",{value:m,enumerable:!1}),e},typeof Symbol<`u`&&(m.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=m.prototype.inspect),m.from=function(e,t){var n=new m(t);return r(e,function(e){n.add(e)}),n},t.exports=m})),K=t(((e,t)=>{var i=n(),a=r(),o=`\0`;function s(e){this.mode=e===Array?`array`:`string`,this.clear()}s.prototype.clear=function(){this.root={},this.size=0},s.prototype.set=function(e,t){for(var n=this.root,r,i=0,a=e.length;i<a;i++)r=e[i],n=n[r]||(n[r]={});return o in n||this.size++,n[o]=t,this},s.prototype.update=function(e,t){for(var n=this.root,r,i=0,a=e.length;i<a;i++)r=e[i],n=n[r]||(n[r]={});return o in n||this.size++,n[o]=t(n[o]),this},s.prototype.get=function(e){var t=this.root,n,r,i;for(r=0,i=e.length;r<i;r++)if(n=e[r],t=t[n],t===void 0)return;if(o in t)return t[o]},s.prototype.delete=function(e){var t=this.root,n=null,r=null,i,a,s,c;for(s=0,c=e.length;s<c;s++){if(a=e[s],i=t,t=t[a],t===void 0)return!1;n===null?Object.keys(t).length<2&&(n=i,r=a):Object.keys(t).length>1&&(n=null,r=null)}return o in t?(this.size--,n?delete n[r]:delete t[o],!0):!1},s.prototype.has=function(e){for(var t=this.root,n,r=0,i=e.length;r<i;r++)if(n=e[r],t=t[n],t===void 0)return!1;return o in t},s.prototype.find=function(e){var t=typeof e==`string`,n=this.root,r=[],i,a,s;for(a=0,s=e.length;a<s;a++)if(i=e[a],n=n[i],n===void 0)return r;for(var c=[n],l=[e],u;c.length;)for(u in e=l.pop(),n=c.pop(),n){if(u===o){r.push([e,n[o]]);continue}c.push(n[u]),l.push(t?e+u:e.concat(u))}return r},s.prototype.values=function(e){var t=this.root,n=[],r,i,s;if(e){for(i=0,s=e.length;i<s;i++)if(r=e[i],t=t[r],t===void 0)return a.empty()}return n.push(t),new a(function(){for(var e,t=!1,r;n.length;){for(r in e=n.pop(),e){if(r===o){t=!0;continue}n.push(e[r])}if(t)return{done:!1,value:e[o]}}return{done:!0}})},s.prototype.prefixes=function(e){var t=this.root,n=[],r=[],i,s,c,l=this.mode===`string`;if(e){for(s=0,c=e.length;s<c;s++)if(i=e[s],t=t[i],t===void 0)return a.empty()}else e=l?``:[];return n.push(t),r.push(e),new a(function(){for(var e,t,i=!1,a;n.length;){for(a in e=n.pop(),t=r.pop(),e){if(a===o){i=!0;continue}n.push(e[a]),r.push(l?t+a:t.concat(a))}if(i)return{done:!1,value:t}}return{done:!0}})},s.prototype.keys=s.prototype.prefixes,s.prototype.entries=function(e){var t=this.root,n=[],r=[],i,s,c,l=this.mode===`string`;if(e){for(s=0,c=e.length;s<c;s++)if(i=e[s],t=t[i],t===void 0)return a.empty()}else e=l?``:[];return n.push(t),r.push(e),new a(function(){for(var e,t,i=!1,a;n.length;){for(a in e=n.pop(),t=r.pop(),e){if(a===o){i=!0;continue}n.push(e[a]),r.push(l?t+a:t.concat(a))}if(i)return{done:!1,value:[t,e[o]]}}return{done:!0}})},typeof Symbol<`u`&&(s.prototype[Symbol.iterator]=s.prototype.entries),s.prototype.inspect=function(){for(var e=Array(this.size),t=this.entries(),n,r=0;n=t.next(),!n.done;)e[r++]=n.value;return Object.defineProperty(e,"constructor",{value:s,enumerable:!1}),e},typeof Symbol<`u`&&(s.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=s.prototype.inspect),s.prototype.toJSON=function(){return this.root},s.from=function(e){var t=new s;return i(e,function(e,n){t.set(n,e)}),t},s.SENTINEL=o,t.exports=s})),q=t(((e,t)=>{var r=n(),i=K(),a=`\0`;function o(e){this.mode=e===Array?`array`:`string`,this.clear()}for(var s in i.prototype)o.prototype[s]=i.prototype[s];delete o.prototype.set,delete o.prototype.get,delete o.prototype.values,delete o.prototype.entries,o.prototype.add=function(e){for(var t=this.root,n,r=0,i=e.length;r<i;r++)n=e[r],t=t[n]||(t[n]={});return a in t||this.size++,t[a]=!0,this},o.prototype.find=function(e){var t=typeof e==`string`,n=this.root,r=[],i,o,s;for(o=0,s=e.length;o<s;o++)if(i=e[o],n=n[i],n===void 0)return r;for(var c=[n],l=[e],u;c.length;)for(u in e=l.pop(),n=c.pop(),n){if(u===a){r.push(e);continue}c.push(n[u]),l.push(t?e+u:e.concat(u))}return r},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.keys),o.prototype.inspect=function(){for(var e=new Set,t=this.keys(),n;n=t.next(),!n.done;)e.add(n.value);return Object.defineProperty(e,"constructor",{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.prototype.toJSON=function(){return this.root},o.from=function(e){var t=new o;return r(e,function(e){t.add(e)}),t},o.SENTINEL=a,t.exports=o})),J=t(((e,t)=>{var n=c(),r=s(),i=M().inplaceQuickSortIndices,a=A().lowerBoundIndices,o=l(),u=r.getPointerArray;function d(e,t){return e.distance<t.distance?1:e.distance>t.distance?-1:0}function f(e,t,n){for(var r=n.length,o=u(r),s=0,c=new o(r),l=new o(r),d=new o(r),f=new Float64Array(r),p=[0,0,r],m=new Float64Array(r),h,g,_,v,y,b,x,S,C;p.length;)if(y=p.pop(),v=p.pop(),h=p.pop(),g=n[y-1],y--,C=y-v,c[h]=g,C!==0){if(C===1){x=e(t[g],t[n[v]]),f[h]=x,s++,d[h]=s,c[s]=n[v];continue}for(S=v;S<y;S++)m[n[S]]=e(t[g],t[n[S]]);i(m,n,v,y),_=v+C/2-1,x=_===(_|0)?(m[n[_]]+m[n[_+1]])/2:m[n[Math.ceil(_)]],f[h]=x,b=a(m,n,x,v,y),y-b>0&&(s++,d[h]=s,p.push(s,b,y)),b-v>0&&(s++,l[h]=s,p.push(s,v,b))}return{nodes:c,lefts:l,rights:d,mus:f}}function p(e,t){if(typeof e!=`function`)throw Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!t)throw Error(`mnemonist/VPTree.constructor: you must provide items to the tree. A VPTree cannot be updated after its creation.`);this.distance=e,this.heap=new o(d),this.D=0;var r=n.toArrayWithIndices(t);this.items=r[0];var i=r[1];this.size=i.length;var a=f(e,this.items,i);this.nodes=a.nodes,this.lefts=a.lefts,this.rights=a.rights,this.mus=a.mus}p.prototype.nearestNeighbors=function(e,t){var n=this.heap,r=[0],i=1/0,a,o,s,c,l,u,d;for(this.D=0;r.length;)a=r.pop(),o=this.nodes[a],s=this.items[o],d=this.distance(s,t),this.D++,d<i&&(n.push({distance:d,item:s}),n.size>e&&n.pop(),n.size>=e&&(i=n.peek().distance)),c=this.lefts[a],l=this.rights[a],!(!c&&!l)&&(u=this.mus[a],d<u?(c&&d<u+i&&r.push(c),l&&d>=u-i&&r.push(l)):(l&&d>=u-i&&r.push(l),c&&d<u+i&&r.push(c)));for(var f=Array(n.size),p=n.size-1;p>=0;p--)f[p]=n.pop();return f},p.prototype.neighbors=function(e,t){var n=[],r=[0],i,a,o,s,c,l,u;for(this.D=0;r.length;)i=r.pop(),a=this.nodes[i],o=this.items[a],u=this.distance(o,t),this.D++,u<=e&&n.push({distance:u,item:o}),s=this.lefts[i],c=this.rights[i],!(!s&&!c)&&(l=this.mus[i],u<l?(s&&u<l+e&&r.push(s),c&&u>=l-e&&r.push(c)):(c&&u>=l-e&&r.push(c),s&&u<l+e&&r.push(s)));return n},p.prototype.inspect=function(){var e=this.items.slice();return Object.defineProperty(e,"constructor",{value:p,enumerable:!1}),e},typeof Symbol<`u`&&(p.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=p.prototype.inspect),p.from=function(e,t){return new p(t,e)},t.exports=p})),Y=e(i(),1),X=e(o(),1),Z=e(l(),1),re=e(u(),1),Q=e(d(),1);f(),m(),h(),_(),v(),b();var ie=e(x(),1),ae=e(S(),1);y(),C(),w(),T(),D(),ee(),k(),te(),ne();var oe=e(N(),1);P(),F();var se=e(I(),1);L();var ce=e(E(),1);R(),z();var le=e(B(),1);O();var $=e(V(),1);H(),U(),W(),G(),q(),K(),J(),X.default.MinFibonacciHeap,X.default.MaxFibonacciHeap,Z.default.MinHeap,Z.default.MaxHeap,re.default.GeneralizedSuffixArray,Q.default.Uint8Vector,Q.default.Uint8ClampedVector,Q.default.Int8Vector,Q.default.Uint16Vector,Q.default.Int16Vector,Q.default.Uint32Vector,Q.default.Int32Vector,Q.default.Float32Vector,Q.default.Float64Vector,Q.default.PointerVector;export{ce as a,$ as c,se as i,ae as n,le as o,oe as r,Y as s,ie as t};
@@ -1,9 +0,0 @@
1
- import{t as e}from"../rolldown-runtime.mjs";var t=e(((e,t)=>{
2
- /*
3
- * @version 1.4.0
4
- * @date 2015-10-26
5
- * @stability 3 - Stable
6
- * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
7
- * @license MIT License
8
- */
9
- var n=function(e,t){var n,r,i=1,a=0,o=0,s=String.alphabet;function c(e,t,r){if(r){for(n=t;r=c(e,n),r<76&&r>65;)++n;return+e.slice(t-1,n)}return r=s&&s.indexOf(e.charAt(t)),r>-1?r+76:(r=e.charCodeAt(t)||0,r<45||r>127?r:r<46?65:r<48?r-1:r<58?r+18:r<65?r-11:r<91?r+11:r<97?r-37:r<123?r+5:r-63)}if((e+=``)!=(t+=``)){for(;i;)if(r=c(e,a++),i=c(t,o++),r<76&&i<76&&r>66&&i>66&&(r=c(e,a,a),i=c(t,o,a=n),o=n),r!=i)return r<i?-1:1}return 0};try{t.exports=n}catch{String.naturalCompare=n}}));export{t};
@@ -1 +0,0 @@
1
- function e(e){return typeof e==`string`?`'${e}'`:new t().serialize(e)}const t=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}(),n=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],i=[];var a=class{_data=new o;_hash=new o([...n]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,a=n[0],o=n[1],s=n[2],c=n[3],l=n[4],u=n[5],d=n[6],f=n[7];for(let n=0;n<64;n++){if(n<16)i[n]=e[t+n]|0;else{let e=i[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=i[n-2],a=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;i[n]=t+i[n-7]+a+i[n-16]}let p=l&u^~l&d,m=a&o^a&s^o&s,h=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),g=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),_=f+g+p+r[n]+i[n],v=h+m;f=d,d=u,u=l,l=c+_|0,c=s,s=o,o=a,a=_+v|0}n[0]=n[0]+a|0,n[1]=n[1]+o|0,n[2]=n[2]+s|0,n[3]=n[3]+c|0,n[4]=n[4]+l|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0}_append(e){typeof e==`string`&&(e=o.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new o(t,i)}},o=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function s(e){return new a().finalize(e).toBase64()}function c(t){return s(e(t))}export{c as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./hast-util-sanitize.mjs";function t(t){return function(n){return e(n,t)}}export{t};
@@ -1 +0,0 @@
1
- import{t as e}from"./hast-util-to-html.mjs";function t(t){let n=this,r={...n.data(`settings`),...t};n.compiler=i;function i(t){return e(t,r)}}export{t};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./mdast-util-gfm.mjs";import{t as n}from"./micromark-extension-gfm.mjs";const r={};function i(i){let a=this,o=i||r,s=a.data(),c=s.micromarkExtensions||=[],l=s.fromMarkdownExtensions||=[],u=s.toMarkdownExtensions||=[];c.push(n(o)),l.push(t()),u.push(e(o))}export{i as t};
@@ -1,3 +0,0 @@
1
- import{r as e}from"./mdast-util-gfm.mjs";const t=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,n=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,r=({legacyTitle:r=!1,tagName:a=`div`}={})=>o=>{e(o,`blockquote`,(e,o,s)=>{let c=``,l=``,u=!0,d=e.children.map(e=>{if(u&&e.type===`paragraph`){let i=e.children[0],a=i.type===`text`?i.value:``,o=r?n:t,s=a.match(o);if(s&&(u=!1,c=s[1].toLocaleLowerCase(),l=r&&s[2]||c.toLocaleUpperCase(),a.includes(`
2
- `)&&(e.children[0]={type:`text`,value:a.replace(o,``).replace(/^\n+/,``)}),!a.includes(`
3
- `))){let t=[];e.children.forEach((e,n)=>{n!=0&&(n==1&&e.type===`break`||t.push(e))}),e.children=[...t]}}return e});c&&(e.data={hName:a,hProperties:{className:[`markdown-alert`,`markdown-alert-${c}`],dir:`auto`}},d.unshift({type:`paragraph`,children:[i(c),{type:`text`,value:l.replace(/^\//,``)}],data:{hProperties:{className:`markdown-alert-title`,dir:`auto`}}})),e.children=[...d]})};function i(e){return{type:`emphasis`,data:{hName:`svg`,hProperties:{className:[`octicon`],viewBox:`0 0 16 16`,width:`16`,height:`16`,ariaHidden:`true`}},children:[{type:`emphasis`,data:{hName:`path`,hProperties:{d:a[e]??``}},children:[]}]}}const a={note:`M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z`,tip:`M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z`,important:`M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z`,warning:`M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z`,caution:`M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z`};export{r as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./mdast-util-from-markdown.mjs";function t(t){let n=this;n.parser=r;function r(r){return e(r,{...n.data(`settings`),...t,extensions:n.data(`micromarkExtensions`)||[],mdastExtensions:n.data(`fromMarkdownExtensions`)||[]})}}export{t};
@@ -1 +0,0 @@
1
- import{t as e}from"./mdast-util-to-hast.mjs";function t(t,n){return t&&`run`in t?async function(r,i){let a=e(r,{file:i,...n});await t.run(a,i)}:function(r,i){return e(r,{file:i,...t||n})}}export{t};
@@ -1,2 +0,0 @@
1
- function e(e,t,n){let r=n=>e(n,...t);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:t})}function t(t,n,r){let i=t.length-n.length;if(i===0)return t(...n);if(i===1)return e(t,n,r);throw Error(`Wrong number of arguments`)}function n(...e){return t(r,e)}const r=(e,t)=>t.every(t=>t(e));function i(...e){return t(a,e)}const a=(e,t)=>t.some(t=>t(e));function o(...e){return t(s,e)}const s=(e,t)=>[...e,...t];function c(e){return()=>e}const l={done:!0,hasNext:!1},u={done:!1,hasNext:!1},d=()=>l,f=e=>({hasNext:!0,next:e,done:!1});function p(e,...t){let n=e,r=t.map(e=>`lazy`in e?h(e):void 0),i=0;for(;i<t.length;){if(r[i]===void 0||!g(n)){let e=t[i];n=e(n),i+=1;continue}let e=[];for(let n=i;n<t.length;n++){let t=r[n];if(t===void 0||(e.push(t),t.isSingle))break}let a=[];for(let t of n)if(m(t,a,e))break;let{isSingle:o}=e.at(-1);n=o?a[0]:a,i+=e.length}return n}function m(e,t,n){if(n.length===0)return t.push(e),!1;let r=e,i=u,a=!1;for(let[e,o]of n.entries()){let{index:s,items:c}=o;if(c.push(r),i=o(r,s,c),o.index+=1,i.hasNext){if(i.hasMany??!1){for(let r of i.next)if(m(r,t,n.slice(e+1)))return!0;return a}r=i.next}if(!i.hasNext)break;i.done&&(a=!0)}return i.hasNext&&t.push(r),a}function h(e){let{lazy:t,lazyArgs:n}=e,r=t(...n);return Object.assign(r,{isSingle:t.single??!1,index:0,items:[]})}function g(e){return typeof e==`string`||typeof e==`object`&&!!e&&Symbol.iterator in e}function ee(e,t){let n=t.length-e.length;if(n===1){let[n,...r]=t;return p(n,{lazy:e,lazyArgs:r})}if(n===0){let n={lazy:e,lazyArgs:t};return Object.assign(e=>p(e,n),n)}throw Error(`Wrong number of arguments`)}function te(...e){return t(ne,e,re)}const ne=(e,t)=>t<0?[...e]:e.slice(t);function re(e){if(e<=0)return f;let t=e;return e=>t>0?(--t,u):{done:!1,hasNext:!0,next:e}}function _(...e){return t(v,e)}const v=(e,t)=>e.length>=t,y={asc:(e,t)=>e>t,desc:(e,t)=>e<t};function b(e,t){let[n,...r]=t;if(!S(n))return e(n,x(...r));let i=x(n,...r);return t=>e(t,i)}function x(e,t,...n){let r=typeof e==`function`?e:e[0],i=typeof e==`function`?`asc`:e[1],{[i]:a}=y,o=t===void 0?void 0:x(t,...n);return(e,t)=>{let n=r(e),i=r(t);return a(n,i)?1:a(i,n)?-1:o?.(e,t)??0}}function S(e){if(C(e))return!0;if(typeof e!=`object`||!Array.isArray(e))return!1;let[t,n,...r]=e;return C(t)&&typeof n==`string`&&n in y&&r.length===0}const C=e=>typeof e==`function`&&e.length===1;function w(...e){return t(T,e)}function T(e,t){for(let[n,r]of e.entries())if(!t(r,n,e))return e.slice(n);return[]}function E(...e){return t(Object.entries,e)}function D(...e){return t(O,e,k)}const O=(e,t)=>e.filter(t),k=e=>(t,n,r)=>e(t,n,r)?{done:!1,hasNext:!0,next:t}:u,A=e=>Object.assign(e,{single:!0});function j(...e){return t(M,e)}const M=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}};function N(...e){return t(P,e,A(F))}const P=([e])=>e,F=()=>I,I=e=>({hasNext:!0,next:e,done:!0});function L(...e){return t(R,e,z)}const R=(e,t)=>e.flatMap(t),z=e=>(t,n,r)=>{let i=e(t,n,r);return Array.isArray(i)?{done:!1,hasNext:!0,hasMany:!0,next:i}:{done:!1,hasNext:!0,next:i}};function B(...e){return t(V,e,H)}function V(e,t){return e.forEach(t),e}const H=e=>(t,n,r)=>(e(t,n,r),{done:!1,hasNext:!0,next:t});function U(...e){return t(Object.fromEntries,e)}function W(...e){return t(G,e)}function G(e,t){let n={};for(let[r,i]of e.entries())n[i]=t(i,r,e);return n}function K(...e){return t(q,e)}const q=(e,t)=>{let n=Object.create(null);for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);if(a!==void 0){let e=n[a];e===void 0?n[a]=[i]:e.push(i)}}return Object.setPrototypeOf(n,Object.prototype),n};function J(...e){return t(Y,e)}function Y(e,t){if(e===t||Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;if(Array.isArray(e))return X(e,t);if(e instanceof Map)return ie(e,t);if(e instanceof Set)return ae(e,t);if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp)return e.toString()===t.toString();if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let[n,r]of Object.entries(e))if(!(n in t)||!Y(r,t[n]))return!1;return!0}function X(e,t){if(e.length!==t.length)return!1;for(let[n,r]of e.entries())if(!Y(r,t[n]))return!1;return!0}function ie(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e.entries())if(!t.has(n)||!Y(r,t.get(n)))return!1;return!0}function ae(e,t){if(e.size!==t.size)return!1;let n=[...t];for(let t of e){let e=!1;for(let[r,i]of n.entries())if(Y(t,i)){e=!0,n.splice(r,1);break}if(!e)return!1}return!0}function oe(e){return Array.isArray(e)}function se(e){return typeof e==`boolean`}function ce(e){return e!==void 0}function le(e){return e===``||e===void 0?!0:Array.isArray(e)?e.length===0:Object.keys(e).length===0}function ue(e){if(e==null||e===``)return!0;if(typeof e!=`object`)return!1;if(`length`in e&&typeof e.length==`number`)return e.length===0;if(`size`in e&&typeof e.size==`number`)return e.size===0;for(let t in e)return!1;return Object.getOwnPropertySymbols(e).length===0}const de=e=>typeof e==`function`;function fe(e){return e!=null}function pe(e){return t=>!e(t)}function me(e){return e==null}function he(e){return typeof e==`number`&&!Number.isNaN(e)}function ge(...e){return t(_e,e)}function _e(e,t){if(e===t||Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map)return ve(e,t);if(e instanceof Set&&t instanceof Set)return ye(e,t);let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n){if(!Object.hasOwn(t,r))return!1;let{[r]:n}=e,{[r]:i}=t;if(n!==i||!Object.is(n,i))return!1}return!0}function ve(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e){let e=t.get(n);if(r!==e||!Object.is(r,e))return!1}return!0}function ye(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function be(e){return typeof e==`string`}function xe(e){return!!e}function Se(...e){return t(Object.keys,e)}function Ce(...e){return t(we,e)}const we=e=>e.at(-1);function Te(...e){return t(Ee,e,De)}const Ee=(e,t)=>e.map(t),De=e=>(t,n,r)=>({done:!1,hasNext:!0,next:e(t,n,r)});function Oe(...e){return t(ke,e)}function ke(e,t){let n={};for(let[r,i]of e.entries()){let[a,o]=t(i,r,e);n[a]=o}return n}function Ae(...e){return t(je,e)}function je(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=t(i,r,e);return n}function Me(...e){return t(Ne,e)}function Ne(e,t){if(!_(t,1))return{...e};if(!_(t,2)){let{[t[0]]:n,...r}=e;return r}let n={...e};for(let e of t)delete n[e];return n}function Pe(...e){return t(Fe,e)}function Fe(e,t){let n={...e};for(let[r,i]of Object.entries(n))t(i,r,e)&&delete n[r];return n}function Ie(e){let t=!1,n;return()=>(t||=(n=e(),!0),n)}function Le(...e){return t(Re,e)}const Re=e=>e.length===1?e[0]:void 0;function ze(...e){return t(Be,e)}const Be=(e,t)=>{let n=[[],[]];for(let[r,i]of e.entries())t(i,r,e)?n[0].push(i):n[1].push(i);return n};function Ve(...e){return t(He,e)}function He(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Ue(...e){return t(We,e)}function We(e,t){let n={};for(let[r,i]of Object.entries(e))t(i,r,e)&&(n[r]=i);return n}function Ge(...e){return t=>p(t,...e)}function Ke(e,...t){return typeof e==`string`||typeof e==`number`||typeof e==`symbol`?n=>Z(n,e,...t):Z(e,...t)}function Z(e,...t){let n=e;for(let e of t){if(n==null)return;n=n[e]}return n}function qe(...e){return t(Je,e)}function Je(e,t,n){let r={};for(let[i,a]of e.entries()){let o=t(a,i,e);r[o]=n(a,i,e)}return r}function Ye(e,t){let n=Math.ceil(e),r=Math.floor(t);if(r<n)throw RangeError(`randomInteger: The range [${e.toString()},${t.toString()}] contains no integer`);return Math.floor(Math.random()*(r-n+1)+n)}function Xe(...e){return t(Ze,e)}const Ze=(e,t,n)=>e.reduce(t,n);function Qe(...e){return t($e,e)}function $e(e){return[...e].reverse()}function et(...e){return t(tt,e)}function tt(e,t){let n=[...e];return n.sort(t),n}function nt(...e){return b(Q,e)}const Q=(e,t)=>[...e].sort(t);function rt(e,t,n){return typeof t==`number`||t===void 0?n=>n.split(e,t):e.split(t,n)}function it(...e){return t(at,e,ot)}const at=(e,t)=>t<0?[]:e.slice(0,t);function ot(e){if(e<=0)return d;let t=e;return e=>(--t,{done:t<=0,hasNext:!0,next:e})}function st(...e){return t(ct,e)}function ct(e,t){let n=[];for(let[r,i]of e.entries()){if(!t(i,r,e))break;n.push(i)}return n}new Set([`-`,`_`,...` .
2
- .\v.\f.\r. .….\xA0. . . . . . . . . . . . .\u2028.\u2029. . . .`.split(`.`)]);function lt(...e){return ee(ut,e)}function ut(){let e=new Set;return t=>e.has(t)?u:(e.add(t),{done:!1,hasNext:!0,next:t})}function dt(...e){return t(Object.values,e)}function ft(...e){return e.length===2?(t,...n)=>$(t,...e,...n):$(...e)}const $=(e,t,n,...r)=>t(e,...r)?typeof n==`function`?n(e,...r):n.onTrue(e,...r):typeof n==`function`?e:n.onFalse(e,...r);function pt(...e){return t(mt,e,ht)}const mt=(e,t)=>e.length<t.length?e.map((e,n)=>[e,t[n]]):t.map((t,n)=>[e[n],t]),ht=e=>(t,n)=>({hasNext:!0,next:[t,e[n]],done:n>=e.length-1});export{te as $,ge as A,oe as B,Ae as C,Se as D,Ce as E,de as F,B as G,K as H,ue as I,j as J,L as K,le as L,me as M,pe as N,xe as O,fe as P,_ as Q,ce as R,Me as S,Te as T,W as U,J as V,U as W,E as X,D as Y,w as Z,Ve as _,st as a,Ie as b,nt as c,Xe as d,p as et,Ye as f,Ue as g,Ge as h,lt as i,n as it,he as j,be as k,et as l,Ke as m,ft as n,o as nt,it as o,qe as p,N as q,dt as r,i as rt,rt as s,pt as t,c as tt,Qe as u,ze as v,Oe as w,Pe as x,Le as y,se as z};
@@ -1 +0,0 @@
1
- function e(){let e=[],n={run:r,use:i};return n;function r(...n){let r=-1,i=n.pop();if(typeof i!=`function`)throw TypeError(`Expected function as last argument, not `+i);a(null,...n);function a(o,...s){let c=e[++r],l=-1;if(o){i(o);return}for(;++l<n.length;)(s[l]===null||s[l]===void 0)&&(s[l]=n[l]);n=s,c?t(c,a)(...s):i(null,...s)}}function i(t){if(typeof t!=`function`)throw TypeError("Expected `middelware` to be a function, not "+t);return e.push(t),n}}function t(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}export{e as t};
@@ -1 +0,0 @@
1
- import{r as e}from"../rolldown-runtime.mjs";import"./devlop.mjs";import{n as t}from"./mdast-util-from-markdown.mjs";import{t as n}from"./bail.mjs";import{t as r}from"./extend.mjs";import{t as i}from"./is-plain-obj.mjs";import{t as a}from"./trough.mjs";var o=e(r(),1),s=class extends Error{constructor(e,n,r){super(),typeof n==`string`&&(r=n,n=void 0);let i=``,a={},o=!1;if(n&&(a=`line`in n&&`column`in n||`start`in n&&`end`in n?{place:n}:`type`in n?{ancestors:[n],place:n.position}:{...n}),typeof e==`string`?i=e:!a.cause&&e&&(o=!0,i=e.message,a.cause=e),!a.ruleId&&!a.source&&typeof r==`string`){let e=r.indexOf(`:`);e===-1?a.ruleId=r:(a.source=r.slice(0,e),a.ruleId=r.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){let e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}let s=a.place&&`start`in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=t(a.place)||`1:1`,this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack==`string`?a.cause.stack:``,this.actual,this.expected,this.note,this.url}};s.prototype.file=``,s.prototype.name=``,s.prototype.reason=``,s.prototype.message=``,s.prototype.stack=``,s.prototype.column=void 0,s.prototype.line=void 0,s.prototype.ancestors=void 0,s.prototype.cause=void 0,s.prototype.fatal=void 0,s.prototype.place=void 0,s.prototype.ruleId=void 0,s.prototype.source=void 0;const c={basename:l,dirname:u,extname:d,join:f,sep:`/`};function l(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);h(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function u(e){if(h(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function d(e){h(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function f(...e){let t=-1,n;for(;++t<e.length;)h(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:p(n)}function p(e){h(e);let t=e.codePointAt(0)===47,n=m(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function m(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function h(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}const g={cwd:_};function _(){return`/`}function v(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function y(e){if(typeof e==`string`)e=new URL(e);else if(!v(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return b(e)}function b(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}const x=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`];var S=class{constructor(e){let t;t=e?v(e)?{path:e}:typeof e==`string`||E(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:g.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<x.length;){let e=x[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)x.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?c.basename(this.path):void 0}set basename(e){w(e,`basename`),C(e,`basename`),this.path=c.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?c.dirname(this.path):void 0}set dirname(e){T(this.basename,`dirname`),this.path=c.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?c.extname(this.path):void 0}set extname(e){if(C(e,`extname`),T(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=c.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){v(e)&&(e=y(e)),w(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?c.basename(this.path,this.extname):void 0}set stem(e){w(e,`stem`),C(e,`stem`),this.path=c.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new s(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function C(e,t){if(e&&e.includes(c.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+c.sep+"`")}function w(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function T(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function E(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}const D=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),O={}.hasOwnProperty,k=new class e extends D{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=a()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,o.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(M(`data`,this.frozen),this.namespace[e]=t,this):O.call(this.namespace,e)&&this.namespace[e]||void 0:e?(M(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=F(e),n=this.parser||this.Parser;return A(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),A(`process`,this.parser||this.Parser),j(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=F(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);L(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,r;return this.freeze(),A(`processSync`,this.parser||this.Parser),j(`processSync`,this.compiler||this.Compiler),this.process(e,i),P(`processSync`,`process`,t),r;function i(e,i){t=!0,n(e),r=i}}run(e,t,n){N(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=F(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let r=!1,i;return this.run(e,t,a),P(`runSync`,`run`,r),i;function a(e,t){n(e),i=t,r=!0}}stringify(e,t){this.freeze();let n=F(t),r=this.compiler||this.Compiler;return j(`stringify`,r),N(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(M(`use`,this.frozen),e!=null)if(typeof e==`function`)l(e,t);else if(typeof e==`object`)Array.isArray(e)?c(e):s(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function a(e){if(typeof e==`function`)l(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;l(t,n)}else s(e);else throw TypeError("Expected usable value, not `"+e+"`")}function s(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(e.plugins),e.settings&&(r.settings=(0,o.default)(!0,r.settings,e.settings))}function c(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];a(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function l(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(a===-1)n.push([e,...t]);else if(t.length>0){let[r,...s]=t,c=n[a][1];i(c)&&i(r)&&(r=(0,o.default)(!0,c,r)),n[a]=[e,r,...s]}}}}().freeze();function A(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function j(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function M(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function N(e){if(!i(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function P(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function F(e){return I(e)?e:new S(e)}function I(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function L(e){return typeof e==`string`||R(e)}function R(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}export{k as t};
@@ -1 +0,0 @@
1
- import{C as e,H as t,K as n,M as r,O as i,Q as a,T as o,V as s,X as c,Y as l,_ as u,c as d,et as f,h as p,i as m,j as h,m as g}from"./libs/remeda.mjs";import{Sn as _,Wt as v,Yt as y,_t as b,g as x,gt as S,h as C,jt as w}from"./types.mjs";import{castDraft as T,produce as E}from"immer";function D(e,t){let{nodes:n,edges:r,hasManualLayout:i,...a}=e,o=new Map(n.map(e=>[e.id,e])),s=new Map(r.map(e=>[e.id,e])),c=t.nodes.map(e=>{let t=o.get(e.id);return t?{...t,x:e.x,y:e.y,width:e.width,height:e.height,labelBBox:e.labelBBox}:e}),l=t.edges.map(e=>{let t=s.get(e.id);return t?{...t,points:e.points,label:e.label,labelBBox:e.labelBBox,...e.controlPoints!=null&&{controlPoints:e.controlPoints}}:e}),u={...t,...a,[b]:`layouted`,bounds:t.bounds,nodes:c,edges:l};return i?u[S]=`auto`:delete u[S],u}function O(r){return f(r,l(e=>!!e.notation),t(g(`notation`)),e(p(t(g(`shape`)),e(p(t(g(`color`)),e(p(o(g(`kind`)),m())),c(),o(([e,t])=>({kinds:t,color:e})))),c(),n(([e,t])=>t.map(({color:t,kinds:n})=>({shape:e,color:t,kinds:n}))))),c(),n(([e,t])=>t.map(({shape:t,color:n,kinds:r})=>({title:e,shape:t,color:n,kinds:r}))),d(g(`shape`),g(`title`),[e=>e.kinds.length,`desc`]))}const k=(e,t)=>e===t||r(e)&&r(t)?!1:!s(e,t);function A(e,t){e.color=t.color,e.kind=t.kind,e.navigateTo=t.navigateTo??null,e.links=t.links?[...t.links]:null,e.tags=[...t.tags],r(t.style.border)?delete e.style.border:e.style.border=t.style.border,h(t.style.opacity)?e.style.opacity=t.style.opacity:delete e.style.opacity,r(t.style.multiple)?delete e.style.multiple:e.style.multiple=t.style.multiple}function j(e,t,n){if(k(t.icon??`none`,e.icon??`none`)){let a=i(e.icon)&&e.icon!==`none`;switch(!0){case a&&i(t.icon)&&t.icon!==`none`:return e.icon=t.icon,!0;case a&&(r(t.icon)||t.icon===`none`):return e.icon=`none`,!0;case!a&&i(t.icon)&&t.icon!==`none`:return n?(e.icon=t.icon,!0):!1}}return!0}function M(e,t,n){let i=!0;return k(e.style.iconColor,t.style.iconColor)&&(r(t.style.iconColor)?delete e.style.iconColor:e.style.iconColor=t.style.iconColor),k(e.style.iconSize,t.style.iconSize)&&(n?r(t.style.iconSize)?delete e.style.iconSize:e.style.iconSize=t.style.iconSize:i=!1),k(e.style.iconPosition,t.style.iconPosition)&&(n?r(t.style.iconPosition)?delete e.style.iconPosition:e.style.iconPosition=t.style.iconPosition:i=!1),i}function N(e,t){return e?`md`in t?(e.md=t.md,delete e.txt,e):(`txt`in t&&(e.txt=t.txt,delete e.md),e):t}function P(e,t,n){let i=!0;return k(e.title,t.title)&&(n?e.title=t.title:i=!1),k(e.description,t.description)&&(r(t.description)?delete e.description:n?e.description=N(e.description,t.description):i=!1),k(e.technology,t.technology)&&(r(t.technology)?delete e.technology:n?e.technology=t.technology:i=!1),i}function F(e,t,n){return e.title=t.title,r(t.description)?delete e.description:e.description=N(e.description,t.description),r(t.technology)?delete e.technology:e.technology=t.technology,!0}function I(e,t){_(e.id===t.id,`applyManualLayout: view ids do not match`),_(e._stage===`layouted`,`applyManualLayout: expected layouted view`),_(t._stage===`layouted`,`applyManualLayout: expected layouted snapshot`),_(e._layout!==`manual`,`applyManualLayout: expected auto-layouted view`);let n=new Set;e._type!==t._type&&n.add(`type-changed`);let r=L(t.nodes,e.nodes,n),i=R(t.edges,e.edges,n),o=O(r);return E(t,s=>{s.title=e.title??t.title,s.description=e.description??t.description,s.tags=e.tags?[...e.tags]:null,s.links=e.links?[...e.links]:null,s.sourcePath=e.sourcePath,s[S]=`manual`,o&&o.length>0?s.notation={nodes:o}:delete s.notation,s.nodes=T(r),s.edges=T(i),C(e)&&s._type===`dynamic`&&(s.variant=e.variant),x(e)&&s._type===`element`&&(e.viewOf?s.viewOf=e.viewOf:delete s.viewOf,e.extends?s.extends=e.extends:delete s.extends);let c=[...n];a(c,1)?s.drifts=c:(s.hash=e.hash,delete s.drifts)})}function L(e,t,n){let i=new Map(t.map(e=>[e.id,e])),o=e.map(e=>{let t=i.get(e.id);return t?(i.delete(t.id),E(e,i=>{A(i,t);let o=new Set,s=e.children.length>0,c=t.children.length>0;(k(i.modelRef,t.modelRef)||k(i.deploymentRef,t.deploymentRef))&&o.add(`modelRef-changed`),c&&!s&&o.add(`became-compound`),!c&&s&&o.add(`became-leaf`),k(i.parent,t.parent)&&o.add(`parent-changed`);let l=i.width+5>=t.width&&i.height+5>=t.height;k(i.shape,t.shape)&&(l?i.shape=t.shape:o.add(`shape-changed`)),M(i,t,l)||o.add(`label-changed`),j(i,t,l&&c===s)||o.add(`label-changed`),(s?F:P)(i,t,l)||o.add(`label-changed`),k(i.notes,t.notes)&&(r(t.notes)?delete i.notes:i.notes=N(i.notes,t.notes)),k(e.notation,t.notation)&&(i.notation=t.notation??null),s&&c&&w(new Set(e.children),new Set(t.children)).size>0&&o.add(`children-changed`);let u=[...o];a(u,1)?(n.add(`nodes-drift`),i.drifts=u):delete i.drifts})):(n.add(`nodes-removed`),{...e,drifts:[`removed`]})});return i.size>0&&n.add(`nodes-added`),o}function R(e,t,n){let i=new Map(t.map(e=>[e.id,e])),o=e.map(e=>{let t=i.get(e.id)??f(i.values(),y(t=>t.source===e.source&&t.target===e.target),v());return t&&i.delete(t.id),E(e,i=>{if(!t){i.drifts=[`removed`],n.add(`edges-removed`);return}let o=new Set,s=e.id===t.id;switch(!0){case s&&e.source==t.source&&e.target==t.target:k(i.dir??`forward`,t.dir??`forward`)&&o.add(`direction-changed`);break;case s&&e.source==t.target&&e.target==t.source:e.source!==e.target&&o.add(`direction-changed`);break;case s:e.source!=t.source&&o.add(`source-changed`),e.target!=t.target&&o.add(`target-changed`);break;default:_(e.id!=t.id,`Unexpected case in edge drift detection, ids should not match`),_(e.source==t.source,`Unexpected case in edge drift detection, sources should match`),_(e.target==t.target,`Unexpected case in edge drift detection, targets should match`),k(i.dir??`forward`,t.dir??`forward`)&&o.add(`direction-changed`);break}if(i.color=t.color,i.line=t.line,i.navigateTo=t.navigateTo??null,i.tags=t.tags?[...t.tags]:null,k(e.notes,t.notes)&&(r(e.notes)!==r(t.notes)&&o.add(`notes-changed`),i.notes=t.notes??e.notes),t.astPath?i.astPath=t.astPath:delete i.astPath,k(u(e,[`label`,`description`,`technology`,`labelBBox`]),u(t,[`label`,`description`,`technology`,`labelBBox`])))switch(!0){case t.labelBBox&&!e.labelBBox:o.add(`label-added`);break;case e.labelBBox&&!t.labelBBox:o.add(`label-removed`);break;case!!e.labelBBox&&!!t.labelBBox:t.labelBBox.width*t.labelBBox.height>(e.labelBBox.width+5)*(e.labelBBox.height+5)&&(i.labelBBox.width=Math.round(t.labelBBox.width),i.labelBBox.height=Math.round(t.labelBBox.height)),k(e.label,t.label)&&(r(t.label)!==r(e.label)&&o.add(`label-changed`),i.label=t.label??e.label),k(e.description,t.description)&&(r(t.description)!==r(e.description)&&o.add(`label-changed`),t.description&&(i.description=N(e.description,t.description))),k(e.technology,t.technology)&&(r(t.technology)!==r(e.technology)&&o.add(`label-changed`),i.technology=t.technology??e.technology??null);break;default:_(!e.labelBBox,`Unexpected case in edge labelBBox drift detection`),_(!t.labelBBox,`Unexpected case in next labelBBox drift detection`);break}let c=[...o];a(c,1)?(n.add(`edges-drift`),i.drifts=c):delete i.drifts})});return i.size>0&&n.add(`edges-added`),o}function z(e,t){let{drifts:n,...r}=I(e,t);if(!n||n.length===0)return E(e,e=>{delete e.drifts,e[S]=`auto`});let i=new Set;n.includes(`type-changed`)&&i.add(`type-changed`);let o=new Map(r.nodes.map(e=>[e.id,e])),s=new Map(r.edges.map(e=>[e.id,e])),c=e.nodes.map(e=>{let t=o.get(e.id);return t&&o.delete(t.id),E(e,e=>{if(!t){i.add(`nodes-added`),e.drifts=[`added`];return}t.drifts?(i.add(`nodes-drift`),e.drifts=[...t.drifts]):delete e.drifts})});o.size>0&&i.add(`nodes-removed`);let l=e.edges.map(e=>{let t=s.get(e.id)??f(s.values(),y(t=>t.source===e.source&&t.target===e.target),v());return t&&s.delete(t.id),E(e,e=>{if(!t){i.add(`edges-added`),e.drifts=[`added`];return}t.drifts?(i.add(`edges-drift`),e.drifts=[...t.drifts]):delete e.drifts})});s.size>0&&i.add(`edges-removed`);let u=[...i];return E(e,e=>{a(u,1)?e.drifts=u:delete e.drifts,e.nodes=T(c),e.edges=T(l),e[S]=`auto`})}export{D as i,I as n,O as r,z as t};
@@ -1 +0,0 @@
1
- import "./libs/mnemonist.mjs";