@blackglory/structures 0.2.5 → 0.3.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 (55) hide show
  1. package/CHANGELOG.md +166 -0
  2. package/README.md +50 -13
  3. package/dist/es2015/index.min.mjs +16 -2
  4. package/dist/es2015/index.min.mjs.map +1 -1
  5. package/dist/es2015/index.mjs +1661 -488
  6. package/dist/es2015/index.mjs.map +1 -1
  7. package/dist/es2015/index.umd.js +1666 -489
  8. package/dist/es2015/index.umd.js.map +1 -1
  9. package/dist/es2015/index.umd.min.js +15 -2
  10. package/dist/es2015/index.umd.min.js.map +1 -1
  11. package/dist/es2018/index.min.mjs +16 -2
  12. package/dist/es2018/index.min.mjs.map +1 -1
  13. package/dist/es2018/index.mjs +1661 -488
  14. package/dist/es2018/index.mjs.map +1 -1
  15. package/dist/es2018/index.umd.js +1666 -489
  16. package/dist/es2018/index.umd.js.map +1 -1
  17. package/dist/es2018/index.umd.min.js +15 -2
  18. package/dist/es2018/index.umd.min.js.map +1 -1
  19. package/lib/es2015/box.d.ts +6 -0
  20. package/lib/es2015/box.js +30 -0
  21. package/lib/es2015/box.js.map +1 -0
  22. package/lib/es2015/expirable-map.d.ts +4 -4
  23. package/lib/es2015/expirable-map.js +38 -38
  24. package/lib/es2015/expirable-map.js.map +1 -1
  25. package/lib/es2015/finite-state-machine.d.ts +13 -0
  26. package/lib/es2015/finite-state-machine.js +46 -0
  27. package/lib/es2015/finite-state-machine.js.map +1 -0
  28. package/lib/es2015/index.d.ts +3 -0
  29. package/lib/es2015/index.js +3 -0
  30. package/lib/es2015/index.js.map +1 -1
  31. package/lib/es2015/observable-finite-state-machine.d.ts +13 -0
  32. package/lib/es2015/observable-finite-state-machine.js +28 -0
  33. package/lib/es2015/observable-finite-state-machine.js.map +1 -0
  34. package/lib/es2015/tlru-map.d.ts +4 -4
  35. package/lib/es2015/tlru-map.js +36 -36
  36. package/lib/es2015/tlru-map.js.map +1 -1
  37. package/lib/es2018/box.d.ts +6 -0
  38. package/lib/es2018/box.js +30 -0
  39. package/lib/es2018/box.js.map +1 -0
  40. package/lib/es2018/expirable-map.d.ts +4 -4
  41. package/lib/es2018/expirable-map.js +38 -38
  42. package/lib/es2018/expirable-map.js.map +1 -1
  43. package/lib/es2018/finite-state-machine.d.ts +13 -0
  44. package/lib/es2018/finite-state-machine.js +46 -0
  45. package/lib/es2018/finite-state-machine.js.map +1 -0
  46. package/lib/es2018/index.d.ts +3 -0
  47. package/lib/es2018/index.js +3 -0
  48. package/lib/es2018/index.js.map +1 -1
  49. package/lib/es2018/observable-finite-state-machine.d.ts +13 -0
  50. package/lib/es2018/observable-finite-state-machine.js +28 -0
  51. package/lib/es2018/observable-finite-state-machine.js.map +1 -0
  52. package/lib/es2018/tlru-map.d.ts +4 -4
  53. package/lib/es2018/tlru-map.js +36 -36
  54. package/lib/es2018/tlru-map.js.map +1 -1
  55. package/package.json +26 -24
package/CHANGELOG.md ADDED
@@ -0,0 +1,166 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
+
5
+ ## [0.3.0](https://github.com/BlackGlory/structures/compare/v0.2.8...v0.3.0) (2021-12-13)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * Replace `ObervableFiniteStateMachine.stateChangedObservable` with
11
+ `observeStateChanges()`
12
+
13
+ * replace stateChangedObservable with observeStateChanges ([9708384](https://github.com/BlackGlory/structures/commit/970838452b2ef3b6299379b393eb45fbbc488e55))
14
+
15
+ ### [0.2.8](https://github.com/BlackGlory/structures/compare/v0.2.7...v0.2.8) (2021-12-13)
16
+
17
+
18
+ ### Features
19
+
20
+ * add FiniteStateMachine ([219d440](https://github.com/BlackGlory/structures/commit/219d440b5bb0bc6684166dc2d13d786285368c27))
21
+ * add ObservableFiniteStateMachine ([49e3b97](https://github.com/BlackGlory/structures/commit/49e3b97c2238b1567f7588b6c337063c40e0eec9))
22
+
23
+ ### [0.2.7](https://github.com/BlackGlory/structures/compare/v0.2.6...v0.2.7) (2021-12-13)
24
+
25
+
26
+ ### Features
27
+
28
+ * add Box ([bce499f](https://github.com/BlackGlory/structures/commit/bce499f4debbed179c628fa1b3917f9ba2f9e513))
29
+
30
+ ### [0.2.6](https://github.com/BlackGlory/structures/compare/v0.2.5...v0.2.6) (2021-10-14)
31
+
32
+ ### [0.2.5](https://github.com/BlackGlory/structures/compare/v0.2.4...v0.2.5) (2021-09-16)
33
+
34
+
35
+ ### Features
36
+
37
+ * add ExpirableMap ([70d2bc3](https://github.com/BlackGlory/structures/commit/70d2bc359be26aa8719fd81286918989bd9cf265))
38
+ * add TLRUMap ([21c5460](https://github.com/BlackGlory/structures/commit/21c5460b122c976a4e551d422ddfa3b3cdadd093))
39
+
40
+ ### [0.2.4](https://github.com/BlackGlory/structures/compare/v0.2.3...v0.2.4) (2021-09-15)
41
+
42
+
43
+ ### Bug Fixes
44
+
45
+ * memory leak ([ea8c035](https://github.com/BlackGlory/structures/commit/ea8c035a28b80fad4df411cf4f07d07abe594ee8))
46
+
47
+ ### [0.2.3](https://github.com/BlackGlory/structures/compare/v0.2.2...v0.2.3) (2021-07-28)
48
+
49
+
50
+ ### Features
51
+
52
+ * add HashMap ([f605460](https://github.com/BlackGlory/structures/commit/f605460e766c4117cb64bd2be552cfc300281aa8))
53
+
54
+ ### [0.2.2](https://github.com/BlackGlory/structures/compare/v0.2.1...v0.2.2) (2021-07-04)
55
+
56
+ ### [0.2.1](https://github.com/BlackGlory/structures/compare/v0.2.0...v0.2.1) (2021-05-16)
57
+
58
+ ## [0.2.0](https://github.com/BlackGlory/structures/compare/v0.1.15...v0.2.0) (2021-05-16)
59
+
60
+
61
+ ### ⚠ BREAKING CHANGES
62
+
63
+ * rewrite
64
+ * rename LRU to LRUMap
65
+
66
+ ### Features
67
+
68
+ * add LRU#clear, LRU#delete ([cdac3dc](https://github.com/BlackGlory/structures/commit/cdac3dcb1521abb0360d04f36097cc9b8027a09c))
69
+ * improve Cons ([4564103](https://github.com/BlackGlory/structures/commit/456410346050b5c83c11c85808f447ffcb3484b2))
70
+ * improve HashSet, Queue ([da0f515](https://github.com/BlackGlory/structures/commit/da0f5150c04af76d1dc93f2227e00099dacb0280))
71
+ * rewrite ([902152b](https://github.com/BlackGlory/structures/commit/902152b0ed00fcb44b90df7e443b62a6147d796a))
72
+
73
+
74
+ ### Bug Fixes
75
+
76
+ * bundle ([0abacc1](https://github.com/BlackGlory/structures/commit/0abacc18c95884206ecb7d6323614bae826ff38c))
77
+
78
+
79
+ * rename LRU to LRUMap ([7f0b8bb](https://github.com/BlackGlory/structures/commit/7f0b8bb3c35cd72bb8b9705ad0c40f09cc2353a2))
80
+
81
+ ### [0.1.15](https://github.com/BlackGlory/structures/compare/v0.1.14...v0.1.15) (2021-05-15)
82
+
83
+
84
+ ### Features
85
+
86
+ * add LRU ([c1f8550](https://github.com/BlackGlory/structures/commit/c1f855022a4c4ac770fddc7d59aed1cfcf49d75f))
87
+
88
+ ### [0.1.14](https://github.com/BlackGlory/structures/compare/v0.1.13...v0.1.14) (2021-03-16)
89
+
90
+
91
+ ### Features
92
+
93
+ * add Queue#remove ([b5f4ad6](https://github.com/BlackGlory/structures/commit/b5f4ad65c43f74edca9bafa43db9dad8b33ad098))
94
+
95
+ ### [0.1.13](https://github.com/BlackGlory/structures/compare/v0.1.12...v0.1.13) (2021-02-28)
96
+
97
+
98
+ ### Features
99
+
100
+ * add Cons ([2a5effa](https://github.com/BlackGlory/structures/commit/2a5effa269cd5089763b458aa749d9b29ea76492))
101
+
102
+ ### [0.1.12](https://github.com/BlackGlory/structures/compare/v0.1.11...v0.1.12) (2021-02-04)
103
+
104
+ ### [0.1.11](https://github.com/BlackGlory/structures/compare/v0.1.10...v0.1.11) (2021-02-03)
105
+
106
+
107
+ ### Bug Fixes
108
+
109
+ * bundle ([5206cfa](https://github.com/BlackGlory/structures/commit/5206cfa0947330843ef052e69283844661fbc465))
110
+
111
+ ### [0.1.10](https://github.com/BlackGlory/structures/compare/v0.1.9...v0.1.10) (2021-02-03)
112
+
113
+ ### [0.1.9](https://github.com/BlackGlory/structures/compare/v0.1.8...v0.1.9) (2021-01-20)
114
+
115
+ ### [0.1.8](https://github.com/BlackGlory/structures/compare/v0.1.7...v0.1.8) (2021-01-15)
116
+
117
+
118
+ ### Bug Fixes
119
+
120
+ * esm bundle ([7fa7e00](https://github.com/BlackGlory/structures/commit/7fa7e004ec290c1ecb4e7e7f4dcb5bc5c472cbd9))
121
+
122
+ ### [0.1.7](https://github.com/BlackGlory/structures/compare/v0.1.6...v0.1.7) (2021-01-15)
123
+
124
+ ### [0.1.6](https://github.com/BlackGlory/structures/compare/v0.1.5...v0.1.6) (2021-01-05)
125
+
126
+
127
+ ### Features
128
+
129
+ * add empty ([d66a13b](https://github.com/BlackGlory/structures/commit/d66a13b3b737fd825e265079897640ba07996dda))
130
+
131
+ ### [0.1.5](https://github.com/BlackGlory/structures/compare/v0.1.4...v0.1.5) (2021-01-04)
132
+
133
+
134
+ ### Bug Fixes
135
+
136
+ * bundle ([4fa790b](https://github.com/BlackGlory/structures/commit/4fa790bc06f08dc7adb6bd27ac43345dce1e00f7))
137
+
138
+ ### [0.1.4](https://github.com/BlackGlory/structures/compare/v0.1.3...v0.1.4) (2021-01-03)
139
+
140
+ ### [0.1.3](https://github.com/BlackGlory/structures/compare/v0.1.2...v0.1.3) (2020-12-19)
141
+
142
+
143
+ ### Features
144
+
145
+ * add methods ([55266e9](https://github.com/BlackGlory/structures/commit/55266e94a0d6035121a360404617c538a97f4143))
146
+
147
+ ### [0.1.2](https://github.com/BlackGlory/structures/compare/v0.1.1...v0.1.2) (2020-12-19)
148
+
149
+
150
+ ### Features
151
+
152
+ * add Emitter ([0cbcddc](https://github.com/BlackGlory/structures/commit/0cbcddca5520a0e5a496950936ef487634acd252))
153
+
154
+ ### [0.1.1](https://github.com/BlackGlory/structures/compare/v0.1.0...v0.1.1) (2020-12-19)
155
+
156
+
157
+ ### Features
158
+
159
+ * add HashSet ([3cd0b59](https://github.com/BlackGlory/structures/commit/3cd0b59a5a06eeb9c99e23d634b2116eab3de090))
160
+
161
+ ## 0.1.0 (2020-12-19)
162
+
163
+
164
+ ### Features
165
+
166
+ * add Queue ([dfd0c23](https://github.com/BlackGlory/structures/commit/dfd0c237753f4030bb5de11bf311b96170649216))
package/README.md CHANGED
@@ -1,9 +1,7 @@
1
1
  # structures
2
-
3
2
  Common structures.
4
3
 
5
4
  ## Install
6
-
7
5
  ```sh
8
6
  npm install --save @blackglory/structures
9
7
  # or
@@ -11,23 +9,28 @@ yarn add @blackglory/structures
11
9
  ```
12
10
 
13
11
  ## API
12
+ ### Box
13
+ ```ts
14
+ class Box<T> {
15
+ constructor(value: T)
14
16
 
15
- ### Cons
17
+ get(): T
18
+ set(value: T): void
19
+ }
20
+ ```
16
21
 
22
+ ### Cons
17
23
  #### convertConsToArray
18
-
19
24
  ```ts
20
25
  function convertConsToArray<T>([value, next]: Cons<T>): T[]
21
26
  ```
22
27
 
23
28
  #### convertArrayToCons
24
-
25
29
  ```ts
26
30
  function convertArrayToCons<T>([value, ...next]: T[]): Cons<T>
27
31
  ```
28
32
 
29
33
  ### Emitter
30
-
31
34
  ```ts
32
35
  type Handler<T> = (vale: T) => void
33
36
 
@@ -41,7 +44,6 @@ class Emitter<T> {
41
44
  ```
42
45
 
43
46
  ### HashMap
44
-
45
47
  ```ts
46
48
  class HashMap<K, V, H = unknown> {
47
49
  get [Symbol.toStringTag](): string
@@ -58,7 +60,6 @@ class HashMap<K, V, H = unknown> {
58
60
  ```
59
61
 
60
62
  ### HashSet
61
-
62
63
  ```ts
63
64
  class HashSet<V, H = unknown> implements Iterable<V> {
64
65
  get [Symbol.toStringTag](): string
@@ -76,7 +77,6 @@ class HashSet<V, H = unknown> implements Iterable<V> {
76
77
  ```
77
78
 
78
79
  ### LRUMap
79
-
80
80
  ```ts
81
81
  class LRUMap<K, V> {
82
82
  get [Symbol.toStringTag](): string
@@ -93,7 +93,6 @@ class LRUMap<K, V> {
93
93
  ```
94
94
 
95
95
  ### ExpirableMap
96
-
97
96
  ```ts
98
97
  class ExpirableMap<K, V> {
99
98
  get[Symbol.toStringTag](): string
@@ -110,7 +109,6 @@ class ExpirableMap<K, V> {
110
109
  ```
111
110
 
112
111
  ### TLRUMap
113
-
114
112
  ```ts
115
113
  class TLRUMap<K, V> {
116
114
  get[Symbol.toStringTag](): string
@@ -127,7 +125,6 @@ class TLRUMap<K, V> {
127
125
  ```
128
126
 
129
127
  ### Queue
130
-
131
128
  ```ts
132
129
  class Queue<T> {
133
130
  get [Symbol.toStringTag](): string
@@ -141,7 +138,6 @@ class Queue<T> {
141
138
  ```
142
139
 
143
140
  ### TrieMap
144
-
145
141
  ```ts
146
142
  class TrieMap<K extends Iterable<T>, V, T = UnpackedIterable<K>> {
147
143
  get [Symbol.toStringTag](): string
@@ -152,3 +148,44 @@ class TrieMap<K extends Iterable<T>, V, T = UnpackedIterable<K>> {
152
148
  delete(key: K): boolean
153
149
  }
154
150
  ```
151
+
152
+ ### FiniteStateMachine
153
+ ```ts
154
+ type IFiniteStateMachineSchema<State extends string, Event extends string> =
155
+ Record<State, Partial<Record<Event, State>>>
156
+
157
+ class FiniteStateMachine<State extends string, Event extends string> {
158
+ get state(): State
159
+
160
+ constructor(
161
+ schema: IFiniteStateMachineSchema<State, Event>
162
+ , initialState: State
163
+ )
164
+
165
+ matches(state: State): boolean
166
+
167
+ /**
168
+ * @throws {BadEventError}
169
+ */
170
+ send(event: Event): void
171
+ }
172
+ ```
173
+
174
+ ### ObservableFiniteStateMachine
175
+ ```ts
176
+ interface IFiniteStateMachineStateChange<
177
+ State extends string
178
+ , Event extends string
179
+ > {
180
+ event: Event
181
+ oldState: State
182
+ newState: State
183
+ }
184
+
185
+ class ObservableFiniteStateMachine<
186
+ State extends string
187
+ , Event extends string
188
+ > extends FiniteStateMachine<State, Event> {
189
+ observeStateChanges(): Observable<IFiniteStateMachineStateChange<State, Event>>
190
+ }
191
+ ```
@@ -1,4 +1,3 @@
1
- function t([e,n]){return null===n?[e]:[e,...t(n)]}function e([t,...n]){return[t,n.length?e(n):null]}
2
1
  /*! *****************************************************************************
3
2
  Copyright (c) Microsoft Corporation.
4
3
 
@@ -12,5 +11,20 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
11
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
12
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
13
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function n(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function r(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}var i,o,s,a;class c{constructor(){i.set(this,new Map)}get[(i=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}on(t,e){n(this,i,"f").has(t)||n(this,i,"f").set(t,new Set);n(this,i,"f").get(t).add(e)}off(t,e){if(!n(this,i,"f").has(t))return;const r=n(this,i,"f").get(t);r.delete(e),0===r.size&&n(this,i,"f").delete(t)}emit(t,e){if(!n(this,i,"f").has(t))return;n(this,i,"f").get(t).forEach((t=>t(e)))}}class u{constructor(t){this.hash=t,o.set(this,new Map)}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,o,"f").size}set(t,e){return n(this,o,"f").set(this.hash(t),e),this}has(t){return n(this,o,"f").has(this.hash(t))}get(t){return n(this,o,"f").get(this.hash(t))}delete(t){return n(this,o,"f").delete(this.hash(t))}clear(){n(this,o,"f").clear()}}class f{constructor(t){this.hash=t,s.set(this,new Map)}get[(s=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,s,"f").size}[Symbol.iterator](){return n(this,s,"f").values()}add(t){return n(this,s,"f").set(this.hash(t),t),this}delete(t){return n(this,s,"f").delete(this.hash(t))}has(t){return n(this,s,"f").has(this.hash(t))}clear(){n(this,s,"f").clear()}values(){return n(this,s,"f").values()}}class l{constructor(){a.set(this,[])}get[(a=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,a,"f").length}empty(){n(this,a,"f").length=0}enqueue(...t){n(this,a,"f").push(...t)}dequeue(){return n(this,a,"f").shift()}remove(t){let e;for(;(e=n(this,a,"f").indexOf(t))>=0;)n(this,a,"f").splice(e,1)}}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},y={},h={CustomError:void 0};class m extends Error{get name(){return this.constructor.name}}h.CustomError=m;var v={ExpectedError:void 0};const p=h;class g extends p.CustomError{}v.ExpectedError=g;var b={AssertionError:void 0};const w=h;class T extends w.CustomError{}b.AssertionError=T;var A={};A.normalize=void 0,A.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var S={refute:void 0};const I=v;S.refute=function(t,e){if(t)throw new I.ExpectedError(e)};var x={assert:void 0};const E=b;var B,k,O;x.assert=function(t,e){if(!t)throw new E.AssertionError(e)},B=y,k=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),(O=d&&d.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||k(e,t,n)})(h,B),O(v,B),O(b,B),O(A,B),O(S,B),O(x,B);var N={},j={},R={},q={},_={};_.go=void 0,_.go=function(t){return t()},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(_,t)}(q),R.chunkAsync=void 0;const z=q,D=y;R.chunkAsync=function(t,e){return D.assert(Number.isInteger(e),"The parameter size must be an integer"),D.assert(e>0,"The parameter size must be greater than 0"),z.go((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var U={},J={},M={};function P(t){return Array.isArray(t)}M.isntEmptyArray=M.isEmptyArray=M.isntArray=M.isArray=void 0,M.isArray=P,M.isntArray=function(t){return!P(t)},M.isEmptyArray=function(t){return 0===t.length},M.isntEmptyArray=function(t){return 0!==t.length};var C={},W={};function F(t){return null===t}W.isntNull=W.isNull=void 0,W.isNull=F,W.isntNull=function(t){return!F(t)};var L={};function K(t){return void 0===t}L.isntUndefined=L.isUndefined=void 0,L.isUndefined=K,L.isntUndefined=function(t){return!K(t)},C.isntAsyncIterable=C.isAsyncIterable=void 0;const V=W,G=L;function H(t){return V.isntNull(t)&&G.isntUndefined(t)&&"function"==typeof t[Symbol.asyncIterator]}C.isAsyncIterable=H,C.isntAsyncIterable=function(t){return!H(t)};var Q={};function X(t){return"bigint"==typeof t}Q.isntBigInt=Q.isBigInt=void 0,Q.isBigInt=X,Q.isntBigInt=function(t){return!X(t)};var Y={};function Z(t){return"boolean"==typeof t}Y.isntBoolean=Y.isBoolean=void 0,Y.isBoolean=Z,Y.isntBoolean=function(t){return!Z(t)};var $={},tt={};function et(t){return"string"==typeof t}tt.isntString=tt.isString=void 0,tt.isString=et,tt.isntString=function(t){return!et(t)},$.isntChar=$.isChar=void 0;const nt=tt;function rt(t){return nt.isString(t)&&1===t.length}$.isChar=rt,$.isntChar=function(t){return!rt(t)};var it={};function ot(t){return t instanceof Date}it.isntDate=it.isDate=void 0,it.isDate=ot,it.isntDate=function(t){return!ot(t)};var st={};st.inEnum=void 0,st.inEnum=function(t,e){return Object.values(e).includes(t)};var at={};function ct(t){return!t}at.isntFalsy=at.isFalsy=void 0,at.isFalsy=ct,at.isntFalsy=function(t){return!ct(t)};var ut={};function ft(t){return"function"==typeof t}ut.isntFunction=ut.isFunction=void 0,ut.isFunction=ft,ut.isntFunction=function(t){return!ft(t)};var lt={};lt.isntIterable=lt.isIterable=void 0;const dt=W,yt=L;function ht(t){return dt.isntNull(t)&&yt.isntUndefined(t)&&"function"==typeof t[Symbol.iterator]}lt.isIterable=ht,lt.isntIterable=function(t){return!ht(t)};var mt={},vt={};function pt(t){return null!==t&&"object"==typeof t}vt.isntEmptyObject=vt.isEmptyObject=vt.isRecord=vt.isntObject=vt.isObject=void 0,vt.isObject=pt,vt.isntObject=function(t){return!pt(t)},vt.isRecord=function(t){return pt(t)},vt.isEmptyObject=function(t){return 0===Object.keys(t).length},vt.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var gt={};function bt(t){return"number"==typeof t}gt.isntNumber=gt.isNumber=void 0,gt.isNumber=bt,gt.isntNumber=function(t){return!bt(t)},mt.isntJsonRpcError=mt.isJsonRpcError=mt.isntJsonRpcSuccess=mt.isJsonRpcSuccess=mt.isntJsonRpcRequest=mt.isJsonRpcRequest=mt.isntJsonRpcNotification=mt.isJsonRpcNotification=void 0;const wt=M,Tt=vt,At=tt,St=gt,It=L;function xt(t){return At.isString(t)||St.isNumber(t)}function Et(t){return wt.isArray(t)||Tt.isObject(t)}function Bt(t){return Tt.isRecord(t)&&At.isString(t.jsonrpc)&&At.isString(t.method)&&It.isUndefined(t.id)&&Et(t.params)}function kt(t){return Tt.isRecord(t)&&At.isString(t.jsonrpc)&&At.isString(t.method)&&xt(t.id)&&Et(t.params)}function Ot(t){return Tt.isRecord(t)&&At.isString(t.jsonrpc)&&At.isString(t.id)&&It.isntUndefined(t.result)}function Nt(t){return Tt.isRecord(t)&&At.isString(t.jsonrpc)&&xt(t.id)&&function(t){return Tt.isRecord(t)&&St.isNumber(t.code)&&At.isString(t.message)&&(It.isUndefined(t.data)||Tt.isObject(t.data))}(t.error)}mt.isJsonRpcNotification=Bt,mt.isntJsonRpcNotification=function(t){return!Bt(t)},mt.isJsonRpcRequest=kt,mt.isntJsonRpcRequest=function(t){return!kt(t)},mt.isJsonRpcSuccess=Ot,mt.isntJsonRpcSuccess=function(t){return!Ot(t)},mt.isJsonRpcError=Nt,mt.isntJsonRpcError=function(t){return!Nt(t)};var jt={};jt.isntJson=jt.isJson=void 0,jt.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},jt.isntJson=function t(e){return!t()};var Rt={};Rt.isAbsoluteURL=void 0,Rt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(M,t),n(C,t),n(Q,t),n(Y,t),n($,t),n(it,t),n(st,t),n(at,t),n(ut,t),n(lt,t),n(mt,t),n(jt,t),n(W,t),n(gt,t),n(vt,t),n(tt,t),n(L,t),n(Rt,t)}(J),U.chunkByAsync=void 0;const qt=J;U.chunkByAsync=function(t,e){return qt.isAsyncIterable(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var _t={};_t.chunkBy=void 0,_t.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var zt={chunk:void 0};const Dt=q,Ut=y;zt.chunk=function(t,e){return Ut.assert(Number.isInteger(e),"The parameter size must be an integer"),Ut.assert(e>0,"The parameter size must be greater than 0"),Dt.go((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Jt={concatAsync:void 0};const Mt=J,Pt=q;Jt.concatAsync=function(t,...e){return Pt.go((async function*(){for(const n of[t,...e])if(Mt.isAsyncIterable(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Ct={concat:void 0};const Wt=q;Ct.concat=function(t,...e){return Wt.go((function*(){for(const n of[t,...e])yield*n}))};var Ft={},Lt={};Lt.copyIterable=Lt.copyAsyncIterable=void 0,Lt.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Lt.copyIterable=function*(t){for(const e of t)yield e},Ft.dropAsync=void 0;const Kt=q,Vt=Lt,Gt=y;Ft.dropAsync=function(t,e){return Gt.assert(Number.isInteger(e),"The parameter count must be an integer"),Gt.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?Vt.copyAsyncIterable(t):Kt.go((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Ht={dropRightAsync:void 0};const Qt=q,Xt=Lt,Yt=y;Ht.dropRightAsync=function(t,e){return Yt.assert(Number.isInteger(e),"The parameter count must be an integer"),Yt.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?Xt.copyAsyncIterable(t):Qt.go((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Zt={dropRight:void 0};const $t=q,te=Lt,ee=y;Zt.dropRight=function(t,e){return ee.assert(Number.isInteger(e),"The parameter count must be an integer"),ee.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?te.copyIterable(t):$t.go((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var ne={dropUntilAsync:void 0};const re=J;ne.dropUntilAsync=function(t,e){return re.isAsyncIterable(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var ie={};ie.dropUntil=void 0,ie.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var oe={drop:void 0};const se=q,ae=Lt,ce=y;oe.drop=function(t,e){return ce.assert(Number.isInteger(e),"The parameter count must be an integer"),ce.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?ae.copyIterable(t):se.go((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var ue={filterAsync:void 0};const fe=J;ue.filterAsync=function(t,e){return fe.isAsyncIterable(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var le={};le.filter=void 0,le.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var de={},ye={},he={flattenByAsync:void 0};const me=J;function ve(t){return me.isIterable(t)&&me.isntChar(t)}he.flattenByAsync=function(t,e){return me.isAsyncIterable(t)?async function*(t){const r=1;for await(const i of t)ve(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)ve(i)&&await e(i,r)?yield*n(i,r+1):yield i}},ye.flattenDeepAsync=void 0;const pe=he,ge=y;ye.flattenDeepAsync=function(t,e=1/0){return ge.assert(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),ge.assert(e>=0,"The parameter depth must be greater than or equal to 0"),pe.flattenByAsync(t,((t,n)=>n<=e))},de.flattenAsync=void 0;const be=ye;de.flattenAsync=function(t){return be.flattenDeepAsync(t,1)};var we={flattenBy:void 0};const Te=J;we.flattenBy=function(t,e){return function*t(n,r){for(const o of n)i=o,Te.isIterable(i)&&Te.isntChar(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var Ae={flattenDeep:void 0};const Se=we,Ie=y;Ae.flattenDeep=function(t,e=1/0){return Ie.assert(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),Ie.assert(e>=0,"The parameter depth must be greater than or equal to 0"),Se.flattenBy(t,((t,n)=>n<=e))};var xe={flatten:void 0};const Ee=Ae;xe.flatten=function(t){return Ee.flattenDeep(t,1)};var Be={mapAsync:void 0};const ke=J;Be.mapAsync=function(t,e){return ke.isAsyncIterable(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var Oe={};Oe.map=void 0,Oe.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ne={repeatAsync:void 0};const je=q,Re=y;Ne.repeatAsync=function(t,e){return Re.assert(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),Re.assert(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),je.go((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var qe={repeat:void 0};const _e=q,ze=y;qe.repeat=function(t,e){return ze.assert(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),ze.assert(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),_e.go((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var De={sliceAsync:void 0};const Ue=q,Je=y;De.sliceAsync=function(t,e,n=1/0){return Je.assert(Number.isInteger(e),"The parameter start must be an integer"),Je.assert(e>=0,"The parameter start must be greater than or equal to 0"),Je.assert(Number.isInteger(n),"The parameter end must be an integer"),Je.assert(n>=e,"The parameter end must be greater than or equal to start"),Ue.go((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Me={slice:void 0};const Pe=q,Ce=y;Me.slice=function(t,e,n=1/0){return Ce.assert(Number.isInteger(e),"The parameter start must be an integer"),Ce.assert(e>=0,"The parameter start must be greater than or equal to 0"),Ce.assert(Number.isInteger(n),"The parameter end must be an integer"),Ce.assert(n>=e,"The parameter end must be greater than or equal to start"),Pe.go((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var We={};We.splitAsync=void 0,We.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Fe={splitByAsync:void 0};const Le=J;Fe.splitByAsync=function(t,e){return Le.isAsyncIterable(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Ke={};Ke.splitBy=void 0,Ke.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Ve={};Ve.split=void 0,Ve.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ge={takeAsync:void 0};const He=q,Qe=y;Ge.takeAsync=function(t,e){return Qe.assert(Number.isInteger(e),"The parameter count must be an integer"),Qe.assert(e>=0,"The parameter count must be greater than or equal to 0"),He.go((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Xe={takeRightAsync:void 0};const Ye=q,Ze=y;Xe.takeRightAsync=function(t,e){return Ze.assert(Number.isInteger(e),"The parameter count must be an integer"),Ze.assert(e>=0,"The parameter count must be greater than or equal to 0"),Ye.go((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var $e={takeRight:void 0};const tn=q,en=y;$e.takeRight=function(t,e){return en.assert(Number.isInteger(e),"The parameter count must be an integer"),en.assert(e>=0,"The parameter count must be greater than or equal to 0"),tn.go((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var nn={takeUntilAsync:void 0};const rn=J;nn.takeUntilAsync=function(t,e){return rn.isAsyncIterable(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var on={};on.takeUntil=void 0,on.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var sn={take:void 0};const an=q,cn=y;sn.take=function(t,e){return cn.assert(Number.isInteger(e),"The parameter count must be an integer"),cn.assert(e>=0,"The parameter count must be greater than or equal to 0"),an.go((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var un={tapAsync:void 0};const fn=J;un.tapAsync=function(t,e){return fn.isAsyncIterable(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var ln={};ln.tap=void 0,ln.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var dn={};dn.toAsyncIterable=void 0,dn.toAsyncIterable=async function*(t){for(const e of t)yield e};var yn={};yn.transformAsync=void 0,yn.transformAsync=async function*(t,e){yield*e(t)};var hn={};hn.transform=void 0,hn.transform=function*(t,e){yield*e(t)};var mn={};mn.uniqAsync=void 0,mn.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var vn={uniqByAsync:void 0};const pn=J;vn.uniqByAsync=function(t,e){return pn.isAsyncIterable(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var gn={};gn.uniqBy=void 0,gn.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var bn={};bn.uniq=void 0,bn.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var wn={zipAsync:void 0};const Tn=J;var An;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(An||(An={})),wn.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>Tn.isAsyncIterable(t)?[An.Async,t[Symbol.asyncIterator]()]:[An.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===An.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===An.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var Sn={};Sn.zip=void 0,Sn.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(R,t),n(U,t),n(_t,t),n(zt,t),n(Jt,t),n(Ct,t),n(Ft,t),n(Ht,t),n(Zt,t),n(ne,t),n(ie,t),n(oe,t),n(ue,t),n(le,t),n(de,t),n(he,t),n(we,t),n(ye,t),n(Ae,t),n(xe,t),n(Be,t),n(Oe,t),n(Ne,t),n(qe,t),n(De,t),n(Me,t),n(We,t),n(Fe,t),n(Ke,t),n(Ve,t),n(Ge,t),n(Xe,t),n($e,t),n(nn,t),n(on,t),n(sn,t),n(un,t),n(ln,t),n(dn,t),n(yn,t),n(hn,t),n(mn,t),n(vn,t),n(gn,t),n(bn,t),n(wn,t),n(Sn,t)}(j);var In={},xn={};xn.consume=void 0,xn.consume=function(t,e){return e(t)};var En={eachAsync:void 0};const Bn=J;En.eachAsync=function(t,e){return Bn.isAsyncIterable(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var kn={};kn.each=void 0,kn.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var On={everyAsync:void 0};const Nn=J;On.everyAsync=function(t,e){return Nn.isAsyncIterable(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var jn={};jn.every=void 0,jn.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Rn={findAsync:void 0};const qn=J;Rn.findAsync=function(t,e){return qn.isAsyncIterable(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var _n={};_n.find=void 0,_n.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var zn={};zn.firstAsync=void 0,zn.firstAsync=async function(t){for await(const e of t)return e};var Dn={};Dn.first=void 0,Dn.first=function(t){for(const e of t)return e};var Un={};Un.includesAsync=void 0,Un.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Jn={};Jn.includes=void 0,Jn.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Mn={};Mn.matchAsync=void 0,Mn.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Pn={};Pn.match=void 0,Pn.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Cn={reduceAsync:void 0};const Wn=J;Cn.reduceAsync=function(t,e,n){return Wn.isUndefined(n)?function(t,e){return Wn.isAsyncIterable(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return Wn.isAsyncIterable(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var Fn={reduce:void 0};const Ln=J;Fn.reduce=function(t,e,n){return Ln.isUndefined(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Kn={someAsync:void 0};const Vn=J;Kn.someAsync=function(t,e){return Vn.isAsyncIterable(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Gn={};Gn.some=void 0,Gn.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Hn={};Hn.lastAsync=void 0,Hn.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Qn={};Qn.last=void 0,Qn.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Xn={toArrayAsync:void 0};const Yn=xn;Xn.toArrayAsync=function(t){return Yn.consume(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Zn={toArray:void 0};const $n=xn;Zn.toArray=function(t){return $n.consume(t,(t=>Array.from(t)))};var tr={toSetAsync:void 0};const er=xn;tr.toSetAsync=function(t){return er.consume(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var nr={toSet:void 0};const rr=xn;var ir,or;nr.toSet=function(t){return rr.consume(t,(t=>new Set(t)))},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(xn,t),n(En,t),n(kn,t),n(On,t),n(jn,t),n(Rn,t),n(_n,t),n(zn,t),n(Dn,t),n(Un,t),n(Jn,t),n(Mn,t),n(Pn,t),n(Cn,t),n(Fn,t),n(Kn,t),n(Gn,t),n(Hn,t),n(Qn,t),n(Xn,t),n(Zn,t),n(tr,t),n(nr,t)}(In),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(j,t),n(In,t)}(N);class sr{constructor(t){ir.set(this,void 0),or.set(this,new Map),y.assert(Number.isInteger(t),"The parameter limit must be an integer"),y.assert(t>0,"The parameter limit must be a positive value"),r(this,ir,t,"f")}get[(ir=new WeakMap,or=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,or,"f").size}set(t,e){return n(this,or,"f").has(t)?this.updateItem(t,e):(n(this,or,"f").size===n(this,ir,"f")&&n(this,or,"f").delete(this.getColdestKey()),n(this,or,"f").set(t,e)),this}has(t){return n(this,or,"f").has(t)}get(t){if(!this.has(t))return;const e=n(this,or,"f").get(t);return this.updateItem(t,e),e}delete(t){return n(this,or,"f").delete(t)}clear(){n(this,or,"f").clear()}updateItem(t,e){n(this,or,"f").delete(t),n(this,or,"f").set(t,e)}getColdestKey(){return N.first(n(this,or,"f").keys())}}var ar={},cr={};cr.setTimeout=void 0,cr.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var ur={setSchedule:void 0};const fr=cr;ur.setSchedule=function(t,e){const n=t-Date.now();return(0,fr.setTimeout)(n,e)};var lr={};lr.setInterval=void 0,lr.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var dr={setImmediate:void 0};const yr=cr;dr.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,yr.setTimeout)(0,t)};var hr={setTimeoutLoop:void 0};const mr=cr;hr.setTimeoutLoop=function(t,e){let n=!1,r=(0,mr.setTimeout)(t,(async function i(){await e(),n||(r=(0,mr.setTimeout)(t,i))}));return()=>{n=!0,r()}};var vr={setDynamicTimeoutLoop:void 0};const pr=cr;var gr,br,wr,Tr,Ar,Sr;vr.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,pr.setTimeout)(t,(async function i(){const o=Date.now();await e();const s=Date.now()-o;n||(r=(0,pr.setTimeout)(Math.max(t-s,0),i))}));return()=>{n=!0,r()}},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(cr,t),n(ur,t),n(lr,t),n(dr,t),n(hr,t),n(vr,t)}(ar);class Ir{constructor(){gr.set(this,new Map),br.set(this,void 0),this.itemsSortedByExpirationTime=[]}get[(gr=new WeakMap,br=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,gr,"f").size}set(t,e,r){return n(this,gr,"f").set(t,e),this.removeItem(t),this.addItem(t,Date.now()+r),this}has(t){return n(this,gr,"f").has(t)}get(t){return n(this,gr,"f").get(t)}delete(t){const e=n(this,gr,"f").delete(t);if(e){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout()}return e}clear(){var t;n(this,gr,"f").clear(),null===(t=n(this,br,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime=[]}addItem(t,e){for(let n=0;n<this.itemsSortedByExpirationTime.length;n++){if(e<this.itemsSortedByExpirationTime[n].expirationTime)return this.itemsSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleTimeout())}this.itemsSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemsSortedByExpirationTime.length&&this.rescheduleTimeout()}removeItem(t){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout())}clearExpiredItems(t){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemsSortedByExpirationTime.splice(0,e):this.itemsSortedByExpirationTime.splice(0,this.itemsSortedByExpirationTime.length)).forEach((t=>n(this,gr,"f").delete(t.key)))}rescheduleTimeout(){var t;if(null===(t=n(this,br,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime.length>0){const t=this.itemsSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ar.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleTimeout()}));r(this,br,(()=>{e(),r(this,br,void 0,"f")}),"f")}}}}class xr{constructor(t){wr.set(this,void 0),Tr.set(this,new Map),Ar.set(this,void 0),this.itemsSortedByExpirationTime=[],y.assert(Number.isInteger(t),"The parameter limit must be an integer"),y.assert(t>0,"The parameter limit must be a positive value"),r(this,wr,t,"f")}get[(wr=new WeakMap,Tr=new WeakMap,Ar=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,Tr,"f").size}set(t,e,r){return n(this,Tr,"f").has(t)?(this.updateItem(t,e),this.removeItem(t),this.addItem(t,Date.now()+r)):(n(this,Tr,"f").size===n(this,wr,"f")&&n(this,Tr,"f").delete(this.getColdestKey()),n(this,Tr,"f").set(t,e),this.addItem(t,Date.now()+r)),this}has(t){return n(this,Tr,"f").has(t)}get(t){if(this.has(t)){const e=n(this,Tr,"f").get(t);return this.updateItem(t,e),e}}delete(t){const e=n(this,Tr,"f").delete(t);if(e){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout()}return e}clear(){var t;n(this,Tr,"f").clear(),null===(t=n(this,Ar,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime=[]}updateItem(t,e){n(this,Tr,"f").delete(t),n(this,Tr,"f").set(t,e)}addItem(t,e){for(let n=0;n<this.itemsSortedByExpirationTime.length;n++){if(e<this.itemsSortedByExpirationTime[n].expirationTime)return this.itemsSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleTimeout())}this.itemsSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemsSortedByExpirationTime.length&&this.rescheduleTimeout()}removeItem(t){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout())}clearExpiredItems(t){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemsSortedByExpirationTime.splice(0,e):this.itemsSortedByExpirationTime.splice(0,this.itemsSortedByExpirationTime.length)).forEach((t=>n(this,Tr,"f").delete(t.key)))}rescheduleTimeout(){var t;if(null===(t=n(this,Ar,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime.length>0){const t=this.itemsSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ar.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleTimeout()}));r(this,Ar,(()=>{e(),r(this,Ar,void 0,"f")}),"f")}}}getColdestKey(){return N.first(n(this,Tr,"f").keys())}}class Er{constructor(t){this.value=t,this.children=new Map}}class Br{constructor(){Sr.set(this,new Er)}get[(Sr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(t,e){let r=n(this,Sr,"f");for(const e of t)r.children.has(e)||r.children.set(e,new Er),r=r.children.get(e);return r.value=e,this}has(t){let e=n(this,Sr,"f");for(const n of t){if(!e.children.has(n))return!1;e=e.children.get(n)}return void 0!==e.value}get(t){let e=n(this,Sr,"f");for(const n of t){if(!e.children.has(n))return;e=e.children.get(n)}return e.value}delete(t){const e=[];let r=n(this,Sr,"f");for(const n of t){if(!r.children.has(n))return!1;e.push(r),r=r.children.get(n)}if(delete r.value,0===r.children.size)for(const[n,r]of N.toArray(N.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}export{c as Emitter,Ir as ExpirableMap,u as HashMap,f as HashSet,sr as LRUMap,l as Queue,xr as TLRUMap,Br as TrieMap,e as convertArrayToCons,t as convertConsToArray};
14
+ ***************************************************************************** */
15
+ function t(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function e(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}var n,r,i,o,s;class a{constructor(t){n.set(this,void 0),e(this,n,t,"f")}set(t){e(this,n,t,"f")}get(){return t(this,n,"f")}}function c([t,e]){return null===e?[t]:[t,...c(e)]}function u([t,...e]){return[t,e.length?u(e):null]}n=new WeakMap;class f{constructor(){r.set(this,new Map)}get[(r=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}on(e,n){t(this,r,"f").has(e)||t(this,r,"f").set(e,new Set);t(this,r,"f").get(e).add(n)}off(e,n){if(!t(this,r,"f").has(e))return;const i=t(this,r,"f").get(e);i.delete(n),0===i.size&&t(this,r,"f").delete(e)}emit(e,n){if(!t(this,r,"f").has(e))return;t(this,r,"f").get(e).forEach((t=>t(n)))}}class l{constructor(t){this.hash=t,i.set(this,new Map)}get[(i=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,i,"f").size}set(e,n){return t(this,i,"f").set(this.hash(e),n),this}has(e){return t(this,i,"f").has(this.hash(e))}get(e){return t(this,i,"f").get(this.hash(e))}delete(e){return t(this,i,"f").delete(this.hash(e))}clear(){t(this,i,"f").clear()}}class d{constructor(t){this.hash=t,o.set(this,new Map)}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,o,"f").size}[Symbol.iterator](){return t(this,o,"f").values()}add(e){return t(this,o,"f").set(this.hash(e),e),this}delete(e){return t(this,o,"f").delete(this.hash(e))}has(e){return t(this,o,"f").has(this.hash(e))}clear(){t(this,o,"f").clear()}values(){return t(this,o,"f").values()}}class h{constructor(){s.set(this,[])}get[(s=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,s,"f").length}empty(){t(this,s,"f").length=0}enqueue(...e){t(this,s,"f").push(...e)}dequeue(){return t(this,s,"f").shift()}remove(e){let n;for(;(n=t(this,s,"f").indexOf(e))>=0;)t(this,s,"f").splice(n,1)}}var y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},p={},v={CustomError:void 0};class m extends Error{get name(){return this.constructor.name}}v.CustomError=m;var b={ExpectedError:void 0};const g=v;class w extends g.CustomError{}b.ExpectedError=w;var S={AssertionError:void 0};const A=v;class T extends A.CustomError{}S.AssertionError=T;var I={};I.normalize=void 0,I.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var E={refute:void 0};const x=b;E.refute=function(t,e){if(t)throw new x.ExpectedError(e)};var _={assert:void 0};const O=S;var B,j,M;_.assert=function(t,e){if(!t)throw new O.AssertionError(e)},B=p,j=y&&y.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),(M=y&&y.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||j(e,t,n)})(v,B),M(b,B),M(S,B),M(I,B),M(E,B),M(_,B);var R={},k={},N={},C={},J={};J.go=void 0,J.go=function(t){return t()},function(t){var e=y&&y.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(y&&y.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(J,t)}(C),N.chunkAsync=void 0;const P=C,U=p;N.chunkAsync=function(t,e){return(0,U.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,U.assert)(e>0,"The parameter size must be greater than 0"),(0,P.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var q={},D={},z={};function F(t){return Array.isArray(t)}z.isntEmptyArray=z.isEmptyArray=z.isntArray=z.isArray=void 0,z.isArray=F,z.isntArray=function(t){return!F(t)},z.isEmptyArray=function(t){return 0===t.length},z.isntEmptyArray=function(t){return 0!==t.length};var W={},L={};function K(t){return null===t}L.isntNull=L.isNull=void 0,L.isNull=K,L.isntNull=function(t){return!K(t)};var H={};function V(t){return void 0===t}H.isntUndefined=H.isUndefined=void 0,H.isUndefined=V,H.isntUndefined=function(t){return!V(t)},W.isntAsyncIterable=W.isAsyncIterable=void 0;const Y=L,$=H;function G(t){return(0,Y.isntNull)(t)&&(0,$.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}W.isAsyncIterable=G,W.isntAsyncIterable=function(t){return!G(t)};var Q={};function X(t){return"bigint"==typeof t}Q.isntBigInt=Q.isBigInt=void 0,Q.isBigInt=X,Q.isntBigInt=function(t){return!X(t)};var Z={};function tt(t){return"boolean"==typeof t}Z.isntBoolean=Z.isBoolean=void 0,Z.isBoolean=tt,Z.isntBoolean=function(t){return!tt(t)};var et={},nt={};function rt(t){return"string"==typeof t}nt.isntString=nt.isString=void 0,nt.isString=rt,nt.isntString=function(t){return!rt(t)},et.isntChar=et.isChar=void 0;const it=nt;function ot(t){return(0,it.isString)(t)&&1===t.length}et.isChar=ot,et.isntChar=function(t){return!ot(t)};var st={};function at(t){return t instanceof Date}st.isntDate=st.isDate=void 0,st.isDate=at,st.isntDate=function(t){return!at(t)};var ct={};ct.inEnum=void 0,ct.inEnum=function(t,e){return Object.values(e).includes(t)};var ut={};function ft(t){return t instanceof Error}ut.isntError=ut.isError=void 0,ut.isError=ft,ut.isntError=function(t){return!ft(t)};var lt={};function dt(t){return!t}lt.isntFalsy=lt.isFalsy=void 0,lt.isFalsy=dt,lt.isntFalsy=function(t){return!dt(t)};var ht={};function yt(t){return"function"==typeof t}ht.isntFunction=ht.isFunction=void 0,ht.isFunction=yt,ht.isntFunction=function(t){return!yt(t)};var pt={};pt.isntIterable=pt.isIterable=void 0;const vt=L,mt=H;function bt(t){return(0,vt.isntNull)(t)&&(0,mt.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}pt.isIterable=bt,pt.isntIterable=function(t){return!bt(t)};var gt={},wt={};function St(t){return null!==t&&"object"==typeof t}wt.isntEmptyObject=wt.isEmptyObject=wt.isRecord=wt.isntObject=wt.isObject=void 0,wt.isObject=St,wt.isntObject=function(t){return!St(t)},wt.isRecord=function(t){return St(t)},wt.isEmptyObject=function(t){return 0===Object.keys(t).length},wt.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var At={};function Tt(t){return"number"==typeof t}At.isntNumber=At.isNumber=void 0,At.isNumber=Tt,At.isntNumber=function(t){return!Tt(t)},gt.isntJsonRpcError=gt.isJsonRpcError=gt.isntJsonRpcSuccess=gt.isJsonRpcSuccess=gt.isntJsonRpcRequest=gt.isJsonRpcRequest=gt.isntJsonRpcNotification=gt.isJsonRpcNotification=void 0;const It=z,Et=wt,xt=nt,_t=At,Ot=H;function Bt(t){return(0,xt.isString)(t)||(0,_t.isNumber)(t)}function jt(t){return(0,It.isArray)(t)||(0,Et.isObject)(t)}function Mt(t){return(0,Et.isRecord)(t)&&(0,xt.isString)(t.jsonrpc)&&(0,xt.isString)(t.method)&&(0,Ot.isUndefined)(t.id)&&jt(t.params)}function Rt(t){return(0,Et.isRecord)(t)&&(0,xt.isString)(t.jsonrpc)&&(0,xt.isString)(t.method)&&Bt(t.id)&&jt(t.params)}function kt(t){return(0,Et.isRecord)(t)&&(0,xt.isString)(t.jsonrpc)&&(0,xt.isString)(t.id)&&(0,Ot.isntUndefined)(t.result)}function Nt(t){return(0,Et.isRecord)(t)&&(0,xt.isString)(t.jsonrpc)&&Bt(t.id)&&function(t){return(0,Et.isRecord)(t)&&(0,_t.isNumber)(t.code)&&(0,xt.isString)(t.message)&&((0,Ot.isUndefined)(t.data)||(0,Et.isObject)(t.data))}(t.error)}gt.isJsonRpcNotification=Mt,gt.isntJsonRpcNotification=function(t){return!Mt(t)},gt.isJsonRpcRequest=Rt,gt.isntJsonRpcRequest=function(t){return!Rt(t)},gt.isJsonRpcSuccess=kt,gt.isntJsonRpcSuccess=function(t){return!kt(t)},gt.isJsonRpcError=Nt,gt.isntJsonRpcError=function(t){return!Nt(t)};var Ct={};Ct.isntJson=Ct.isJson=void 0,Ct.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Ct.isntJson=function t(e){return!t()};var Jt={};Jt.isAbsoluteURL=void 0,Jt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=y&&y.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=y&&y.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(z,t),n(W,t),n(Q,t),n(Z,t),n(et,t),n(st,t),n(ct,t),n(ut,t),n(lt,t),n(ht,t),n(pt,t),n(gt,t),n(Ct,t),n(L,t),n(At,t),n(wt,t),n(nt,t),n(H,t),n(Jt,t)}(D),q.chunkByAsync=void 0;const Pt=D;q.chunkByAsync=function(t,e){return(0,Pt.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Ut={};Ut.chunkBy=void 0,Ut.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var qt={chunk:void 0};const Dt=C,zt=p;qt.chunk=function(t,e){return(0,zt.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,zt.assert)(e>0,"The parameter size must be greater than 0"),(0,Dt.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ft={concatAsync:void 0};const Wt=D,Lt=C;Ft.concatAsync=function(t,...e){return(0,Lt.go)((async function*(){for(const n of[t,...e])if((0,Wt.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Kt={concat:void 0};const Ht=C;Kt.concat=function(t,...e){return(0,Ht.go)((function*(){for(const n of[t,...e])yield*n}))};var Vt={},Yt={};Yt.copyIterable=Yt.copyAsyncIterable=void 0,Yt.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Yt.copyIterable=function*(t){for(const e of t)yield e},Vt.dropAsync=void 0;const $t=C,Gt=Yt,Qt=p;Vt.dropAsync=function(t,e){return(0,Qt.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Qt.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Gt.copyAsyncIterable)(t):(0,$t.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Xt={dropRightAsync:void 0};const Zt=C,te=Yt,ee=p;Xt.dropRightAsync=function(t,e){return(0,ee.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,ee.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,te.copyAsyncIterable)(t):(0,Zt.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var ne={dropRight:void 0};const re=C,ie=Yt,oe=p;ne.dropRight=function(t,e){return(0,oe.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,oe.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,ie.copyIterable)(t):(0,re.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var se={dropUntilAsync:void 0};const ae=D;se.dropUntilAsync=function(t,e){return(0,ae.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var ce={};ce.dropUntil=void 0,ce.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var ue={drop:void 0};const fe=C,le=Yt,de=p;ue.drop=function(t,e){return(0,de.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,de.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,le.copyIterable)(t):(0,fe.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var he={filterAsync:void 0};const ye=D;he.filterAsync=function(t,e){return(0,ye.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var pe={};pe.filter=void 0,pe.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var ve={},me={},be={flattenByAsync:void 0};const ge=D;function we(t){return(0,ge.isIterable)(t)&&(0,ge.isntChar)(t)}be.flattenByAsync=function(t,e){return(0,ge.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)we(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)we(i)&&await e(i,r)?yield*n(i,r+1):yield i}},me.flattenDeepAsync=void 0;const Se=be,Ae=p;me.flattenDeepAsync=function(t,e=1/0){return(0,Ae.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Ae.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Se.flattenByAsync)(t,((t,n)=>n<=e))},ve.flattenAsync=void 0;const Te=me;ve.flattenAsync=function(t){return(0,Te.flattenDeepAsync)(t,1)};var Ie={flattenBy:void 0};const Ee=D;Ie.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,Ee.isIterable)(i=o)&&(0,Ee.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var xe={flattenDeep:void 0};const _e=Ie,Oe=p;xe.flattenDeep=function(t,e=1/0){return(0,Oe.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Oe.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,_e.flattenBy)(t,((t,n)=>n<=e))};var Be={flatten:void 0};const je=xe;Be.flatten=function(t){return(0,je.flattenDeep)(t,1)};var Me={mapAsync:void 0};const Re=D;Me.mapAsync=function(t,e){return(0,Re.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var ke={};ke.map=void 0,ke.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ne={repeatAsync:void 0};const Ce=C,Je=p;Ne.repeatAsync=function(t,e){return(0,Je.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Je.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Ce.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Pe={repeat:void 0};const Ue=C,qe=p;Pe.repeat=function(t,e){return(0,qe.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,qe.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Ue.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var De={sliceAsync:void 0};const ze=C,Fe=p;De.sliceAsync=function(t,e,n=1/0){return(0,Fe.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Fe.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Fe.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Fe.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ze.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var We={slice:void 0};const Le=C,Ke=p;We.slice=function(t,e,n=1/0){return(0,Ke.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Ke.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Ke.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Ke.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Le.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var He={};He.splitAsync=void 0,He.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ve={splitByAsync:void 0};const Ye=D;Ve.splitByAsync=function(t,e){return(0,Ye.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var $e={};$e.splitBy=void 0,$e.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Ge={};Ge.split=void 0,Ge.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Qe={takeAsync:void 0};const Xe=C,Ze=p;Qe.takeAsync=function(t,e){return(0,Ze.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ze.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Xe.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var tn={takeRightAsync:void 0};const en=C,nn=p;tn.takeRightAsync=function(t,e){return(0,nn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,nn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,en.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var rn={takeRight:void 0};const on=C,sn=p;rn.takeRight=function(t,e){return(0,sn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,sn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,on.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var an={takeUntilAsync:void 0};const cn=D;an.takeUntilAsync=function(t,e){return(0,cn.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var un={};un.takeUntil=void 0,un.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var fn={take:void 0};const ln=C,dn=p;fn.take=function(t,e){return(0,dn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,dn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,ln.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var hn={tapAsync:void 0};const yn=D;hn.tapAsync=function(t,e){return(0,yn.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var pn={};pn.tap=void 0,pn.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var vn={};vn.toAsyncIterable=void 0,vn.toAsyncIterable=async function*(t){for(const e of t)yield e};var mn={};mn.transformAsync=void 0,mn.transformAsync=async function*(t,e){yield*e(t)};var bn={};bn.transform=void 0,bn.transform=function*(t,e){yield*e(t)};var gn={};gn.uniqAsync=void 0,gn.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var wn={uniqByAsync:void 0};const Sn=D;wn.uniqByAsync=function(t,e){return(0,Sn.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var An={};An.uniqBy=void 0,An.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var Tn={};Tn.uniq=void 0,Tn.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var In={zipAsync:void 0};const En=D;var xn;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(xn||(xn={})),In.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,En.isAsyncIterable)(t)?[xn.Async,t[Symbol.asyncIterator]()]:[xn.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===xn.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===xn.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var _n={};_n.zip=void 0,_n.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=y&&y.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=y&&y.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(N,t),n(q,t),n(Ut,t),n(qt,t),n(Ft,t),n(Kt,t),n(Vt,t),n(Xt,t),n(ne,t),n(se,t),n(ce,t),n(ue,t),n(he,t),n(pe,t),n(ve,t),n(be,t),n(Ie,t),n(me,t),n(xe,t),n(Be,t),n(Me,t),n(ke,t),n(Ne,t),n(Pe,t),n(De,t),n(We,t),n(He,t),n(Ve,t),n($e,t),n(Ge,t),n(Qe,t),n(tn,t),n(rn,t),n(an,t),n(un,t),n(fn,t),n(hn,t),n(pn,t),n(vn,t),n(mn,t),n(bn,t),n(gn,t),n(wn,t),n(An,t),n(Tn,t),n(In,t),n(_n,t)}(k);var On={},Bn={};Bn.consume=void 0,Bn.consume=function(t,e){return e(t)};var jn={eachAsync:void 0};const Mn=D;jn.eachAsync=function(t,e){return(0,Mn.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var Rn={};Rn.each=void 0,Rn.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var kn={everyAsync:void 0};const Nn=D;kn.everyAsync=function(t,e){return(0,Nn.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Cn={};Cn.every=void 0,Cn.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Jn={findAsync:void 0};const Pn=D;Jn.findAsync=function(t,e){return(0,Pn.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Un={};Un.find=void 0,Un.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var qn={};qn.firstAsync=void 0,qn.firstAsync=async function(t){for await(const e of t)return e};var Dn={};Dn.first=void 0,Dn.first=function(t){for(const e of t)return e};var zn={};zn.includesAsync=void 0,zn.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Fn={};Fn.includes=void 0,Fn.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Wn={};Wn.matchAsync=void 0,Wn.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Ln={};Ln.match=void 0,Ln.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Kn={reduceAsync:void 0};const Hn=D;Kn.reduceAsync=function(t,e,n){return(0,Hn.isUndefined)(n)?function(t,e){return(0,Hn.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Hn.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var Vn={reduce:void 0};const Yn=D;Vn.reduce=function(t,e,n){return(0,Yn.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var $n={someAsync:void 0};const Gn=D;$n.someAsync=function(t,e){return(0,Gn.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Qn={};Qn.some=void 0,Qn.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Xn={};Xn.lastAsync=void 0,Xn.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Zn={};Zn.last=void 0,Zn.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var tr={toArrayAsync:void 0};const er=Bn;tr.toArrayAsync=function(t){return(0,er.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var nr={toArray:void 0};const rr=Bn;nr.toArray=function(t){return(0,rr.consume)(t,(t=>Array.from(t)))};var ir={toSetAsync:void 0};const or=Bn;ir.toSetAsync=function(t){return(0,or.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var sr={toSet:void 0};const ar=Bn;var cr,ur;sr.toSet=function(t){return(0,ar.consume)(t,(t=>new Set(t)))},function(t){var e=y&&y.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=y&&y.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Bn,t),n(jn,t),n(Rn,t),n(kn,t),n(Cn,t),n(Jn,t),n(Un,t),n(qn,t),n(Dn,t),n(zn,t),n(Fn,t),n(Wn,t),n(Ln,t),n(Kn,t),n(Vn,t),n($n,t),n(Qn,t),n(Xn,t),n(Zn,t),n(tr,t),n(nr,t),n(ir,t),n(sr,t)}(On),function(t){var e=y&&y.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=y&&y.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(k,t),n(On,t)}(R);class fr{constructor(t){cr.set(this,void 0),ur.set(this,new Map),p.assert(Number.isInteger(t),"The parameter limit must be an integer"),p.assert(t>0,"The parameter limit must be a positive value"),e(this,cr,t,"f")}get[(cr=new WeakMap,ur=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,ur,"f").size}set(e,n){return t(this,ur,"f").has(e)?this.updateItem(e,n):(t(this,ur,"f").size===t(this,cr,"f")&&t(this,ur,"f").delete(this.getColdestKey()),t(this,ur,"f").set(e,n)),this}has(e){return t(this,ur,"f").has(e)}get(e){if(!this.has(e))return;const n=t(this,ur,"f").get(e);return this.updateItem(e,n),n}delete(e){return t(this,ur,"f").delete(e)}clear(){t(this,ur,"f").clear()}updateItem(e,n){t(this,ur,"f").delete(e),t(this,ur,"f").set(e,n)}getColdestKey(){return R.first(t(this,ur,"f").keys())}}var lr={},dr={},hr={},yr={};yr.random=void 0,yr.random=function(t,e){return Math.random()*(e-t)+t};var pr={};pr.randomInt=void 0,pr.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var vr={};vr.randomIntInclusive=void 0,vr.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var e=y&&y.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=y&&y.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(yr,t),n(pr,t),n(vr,t)}(hr),dr.calculateExponentialBackoffTimeout=void 0;const mr=hr;dr.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:e,maxTimeout:n=1/0,factor:r=2,jitter:i=!0}){const o=Math.min(r**e*t,n);return i?(0,mr.randomIntInclusive)(0,o):o};var br={};br.setTimeout=void 0,br.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var gr={setSchedule:void 0};const wr=br;gr.setSchedule=function(t,e){const n=t-Date.now();return(0,wr.setTimeout)(n,e)};var Sr={};Sr.setInterval=void 0,Sr.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var Ar={setImmediate:void 0};const Tr=br;Ar.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,Tr.setTimeout)(0,t)};var Ir={setTimeoutLoop:void 0};const Er=br;Ir.setTimeoutLoop=function(t,e){let n=!1,r=(0,Er.setTimeout)(t,(async function i(){await e(),n||(r=(0,Er.setTimeout)(t,i))}));return()=>{n=!0,r()}};var xr={setDynamicTimeoutLoop:void 0};const _r=br;var Or,Br,jr,Mr,Rr,kr,Nr;xr.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,_r.setTimeout)(t,(async function i(){const o=Date.now();await e();const s=Date.now()-o;n||(r=(0,_r.setTimeout)(Math.max(t-s,0),i))}));return()=>{n=!0,r()}},function(t){var e=y&&y.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=y&&y.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(dr,t),n(br,t),n(gr,t),n(Sr,t),n(Ar,t),n(Ir,t),n(xr,t)}(lr);class Cr{constructor(){Or.set(this,new Map),Br.set(this,void 0),this.itemMetadataSortedByExpirationTime=[]}get[(Or=new WeakMap,Br=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,Or,"f").size}set(e,n,r){return t(this,Or,"f").set(e,n),this.removeItemMetadata(e),this.addItemMetadata(e,Date.now()+r),this}has(e){return t(this,Or,"f").has(e)}get(e){return t(this,Or,"f").get(e)}delete(e){const n=t(this,Or,"f").delete(e);if(n){const t=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.key===e));this.itemMetadataSortedByExpirationTime.splice(t,1),0===t&&this.rescheduleClearTimeout()}return n}clear(){var e;t(this,Or,"f").clear(),null===(e=t(this,Br,"f"))||void 0===e||e.call(this),this.itemMetadataSortedByExpirationTime=[]}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(e){const n=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.expirationTime>e));(n>=0?this.itemMetadataSortedByExpirationTime.splice(0,n):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((e=>t(this,Or,"f").delete(e.key)))}rescheduleClearTimeout(){var n;if(null===(n=t(this,Br,"f"))||void 0===n||n.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const n=lr.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));e(this,Br,(()=>{n(),e(this,Br,void 0,"f")}),"f")}}}}class Jr{constructor(t){jr.set(this,void 0),Mr.set(this,new Map),Rr.set(this,void 0),this.itemMetadataSortedByExpirationTime=[],p.assert(Number.isInteger(t),"The parameter limit must be an integer"),p.assert(t>0,"The parameter limit must be a positive value"),e(this,jr,t,"f")}get[(jr=new WeakMap,Mr=new WeakMap,Rr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,Mr,"f").size}set(e,n,r){return t(this,Mr,"f").has(e)?(this.updateItem(e,n),this.removeItemMetadata(e),this.addItemMetadata(e,Date.now()+r)):(t(this,Mr,"f").size===t(this,jr,"f")&&t(this,Mr,"f").delete(this.getColdestKey()),t(this,Mr,"f").set(e,n),this.addItemMetadata(e,Date.now()+r)),this}has(e){return t(this,Mr,"f").has(e)}get(e){if(this.has(e)){const n=t(this,Mr,"f").get(e);return this.updateItem(e,n),n}}delete(e){const n=t(this,Mr,"f").delete(e);if(n){const t=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.key===e));this.itemMetadataSortedByExpirationTime.splice(t,1),0===t&&this.rescheduleClearTimeout()}return n}clear(){var e;t(this,Mr,"f").clear(),null===(e=t(this,Rr,"f"))||void 0===e||e.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(e,n){t(this,Mr,"f").delete(e),t(this,Mr,"f").set(e,n)}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(e){const n=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.expirationTime>e));(n>=0?this.itemMetadataSortedByExpirationTime.splice(0,n):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((e=>t(this,Mr,"f").delete(e.key)))}rescheduleClearTimeout(){var n;if(null===(n=t(this,Rr,"f"))||void 0===n||n.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const n=lr.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));e(this,Rr,(()=>{n(),e(this,Rr,void 0,"f")}),"f")}}}getColdestKey(){return R.first(t(this,Mr,"f").keys())}}class Pr{constructor(t){this.value=t,this.children=new Map}}class Ur{constructor(){kr.set(this,new Pr)}get[(kr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(e,n){let r=t(this,kr,"f");for(const t of e)r.children.has(t)||r.children.set(t,new Pr),r=r.children.get(t);return r.value=n,this}has(e){let n=t(this,kr,"f");for(const t of e){if(!n.children.has(t))return!1;n=n.children.get(t)}return void 0!==n.value}get(e){let n=t(this,kr,"f");for(const t of e){if(!n.children.has(t))return;n=n.children.get(t)}return n.value}delete(e){const n=[];let r=t(this,kr,"f");for(const t of e){if(!r.children.has(t))return!1;n.push(r),r=r.children.get(t)}if(delete r.value,0===r.children.size)for(const[t,r]of R.toArray(R.zip(e,n)).reverse())if(r.children.delete(t),0!==r.children.size)break;return!0}}class qr{constructor(t,n){this.schema=t,Nr.set(this,void 0),e(this,Nr,n,"f")}get state(){return t(this,Nr,"f")}matches(e){return t(this,Nr,"f")===e}send(t){if(!(t in this.schema[this.state]))throw new Dr(this.state,t);e(this,Nr,this.schema[this.state][t],"f")}}Nr=new WeakMap;class Dr extends p.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
16
+ /*! *****************************************************************************
17
+ Copyright (c) Microsoft Corporation.
18
+
19
+ Permission to use, copy, modify, and/or distribute this software for any
20
+ purpose with or without fee is hereby granted.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
23
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
24
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
25
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
26
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
27
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28
+ PERFORMANCE OF THIS SOFTWARE.
29
+ ***************************************************************************** */var zr=function(t,e){return(zr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function Fr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}zr(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Wr(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Lr(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Kr(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}function Hr(t){return"function"==typeof t}function Vr(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Yr=Vr((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function $r(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Gr=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=Wr(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(Hr(c))try{c()}catch(t){i=t instanceof Yr?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var f=Wr(u),l=f.next();!l.done;l=f.next()){var d=l.value;try{Zr(d)}catch(t){i=null!=i?i:[],t instanceof Yr?i=Kr(Kr([],Lr(i)),Lr(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}}if(i)throw new Yr(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Zr(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&$r(e,t)},t.prototype.remove=function(e){var n=this._teardowns;n&&$r(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Qr=Gr.EMPTY;function Xr(t){return t instanceof Gr||t&&"closed"in t&&Hr(t.remove)&&Hr(t.add)&&Hr(t.unsubscribe)}function Zr(t){Hr(t)?t():t.unsubscribe()}var ti={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ei={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ei.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,Kr([],Lr(t)))},clearTimeout:function(t){var e=ei.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ni(t){ei.setTimeout((function(){throw t}))}function ri(){}var ii=null;function oi(t){if(ti.useDeprecatedSynchronousErrorHandling){var e=!ii;if(e&&(ii={errorThrown:!1,error:null}),t(),e){var n=ii,r=n.errorThrown,i=n.error;if(ii=null,r)throw i}}else t()}var si=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Xr(e)&&e.add(n)):n.destination=fi,n}return Fr(e,t),e.create=function(t,e,n){return new ai(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Gr),ai=function(t){function e(e,n,r){var i,o=t.call(this)||this;if(Hr(e))i=e;else if(e){var s;i=e.next,n=e.error,r=e.complete,o&&ti.useDeprecatedNextContext?(s=Object.create(e)).unsubscribe=function(){return o.unsubscribe()}:s=e,i=null==i?void 0:i.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return o.destination={next:i?ci(i):ri,error:ci(null!=n?n:ui),complete:r?ci(r):ri},o}return Fr(e,t),e}(si);function ci(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{t.apply(void 0,Kr([],Lr(e)))}catch(t){ni(t)}}}function ui(t){throw t}var fi={closed:!0,next:ri,error:ui,complete:ri},li="function"==typeof Symbol&&Symbol.observable||"@@observable";function di(t){return t}function hi(t){return 0===t.length?di:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var yi=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof si||function(t){return t&&Hr(t.next)&&Hr(t.error)&&Hr(t.complete)}(r)&&Xr(r)?t:new ai(t,e,n);return oi((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=pi(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),null==i||i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[li]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return hi(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=pi(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function pi(t){var e;return null!==(e=null!=t?t:ti.Promise)&&void 0!==e?e:Promise}var vi=Vr((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),mi=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Fr(e,t),e.prototype.lift=function(t){var e=new bi(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new vi},e.prototype.next=function(t){var e=this;oi((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){var i=e.observers.slice();try{for(var o=Wr(i),s=o.next();!s.done;s=o.next()){s.value.next(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;oi((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;oi((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=e.hasError,r=e.isStopped,i=e.observers;return n||r?Qr:(i.push(t),new Gr((function(){return $r(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new yi;return t.source=this,t},e.create=function(t,e){return new bi(t,e)},e}(yi),bi=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Fr(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:Qr},e}(mi),gi={},wi={};function Si(t){return Array.isArray(t)}wi.isntEmptyArray=wi.isEmptyArray=wi.isntArray=wi.isArray=void 0,wi.isArray=Si,wi.isntArray=function(t){return!Si(t)},wi.isEmptyArray=function(t){return 0===t.length},wi.isntEmptyArray=function(t){return 0!==t.length};var Ai={},Ti={};function Ii(t){return null===t}Ti.isntNull=Ti.isNull=void 0,Ti.isNull=Ii,Ti.isntNull=function(t){return!Ii(t)};var Ei={};function xi(t){return void 0===t}Ei.isntUndefined=Ei.isUndefined=void 0,Ei.isUndefined=xi,Ei.isntUndefined=function(t){return!xi(t)},Ai.isntAsyncIterable=Ai.isAsyncIterable=void 0;const _i=Ti,Oi=Ei;function Bi(t){return(0,_i.isntNull)(t)&&(0,Oi.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}Ai.isAsyncIterable=Bi,Ai.isntAsyncIterable=function(t){return!Bi(t)};var ji={};function Mi(t){return"bigint"==typeof t}ji.isntBigInt=ji.isBigInt=void 0,ji.isBigInt=Mi,ji.isntBigInt=function(t){return!Mi(t)};var Ri={};function ki(t){return"boolean"==typeof t}Ri.isntBoolean=Ri.isBoolean=void 0,Ri.isBoolean=ki,Ri.isntBoolean=function(t){return!ki(t)};var Ni={},Ci={};function Ji(t){return"string"==typeof t}Ci.isntString=Ci.isString=void 0,Ci.isString=Ji,Ci.isntString=function(t){return!Ji(t)},Ni.isntChar=Ni.isChar=void 0;const Pi=Ci;function Ui(t){return(0,Pi.isString)(t)&&1===t.length}Ni.isChar=Ui,Ni.isntChar=function(t){return!Ui(t)};var qi={};function Di(t){return t instanceof Date}qi.isntDate=qi.isDate=void 0,qi.isDate=Di,qi.isntDate=function(t){return!Di(t)};var zi={};zi.inEnum=void 0,zi.inEnum=function(t,e){return Object.values(e).includes(t)};var Fi={};function Wi(t){return t instanceof Error}Fi.isntError=Fi.isError=void 0,Fi.isError=Wi,Fi.isntError=function(t){return!Wi(t)};var Li={};function Ki(t){return!t}Li.isntFalsy=Li.isFalsy=void 0,Li.isFalsy=Ki,Li.isntFalsy=function(t){return!Ki(t)};var Hi={};function Vi(t){return"function"==typeof t}Hi.isntFunction=Hi.isFunction=void 0,Hi.isFunction=Vi,Hi.isntFunction=function(t){return!Vi(t)};var Yi={};Yi.isntIterable=Yi.isIterable=void 0;const $i=Ti,Gi=Ei;function Qi(t){return(0,$i.isntNull)(t)&&(0,Gi.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Yi.isIterable=Qi,Yi.isntIterable=function(t){return!Qi(t)};var Xi={},Zi={};function to(t){return null!==t&&"object"==typeof t}Zi.isntEmptyObject=Zi.isEmptyObject=Zi.isRecord=Zi.isntObject=Zi.isObject=void 0,Zi.isObject=to,Zi.isntObject=function(t){return!to(t)},Zi.isRecord=function(t){return to(t)},Zi.isEmptyObject=function(t){return 0===Object.keys(t).length},Zi.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var eo={};function no(t){return"number"==typeof t}eo.isntNumber=eo.isNumber=void 0,eo.isNumber=no,eo.isntNumber=function(t){return!no(t)},Xi.isntJsonRpcError=Xi.isJsonRpcError=Xi.isntJsonRpcSuccess=Xi.isJsonRpcSuccess=Xi.isntJsonRpcRequest=Xi.isJsonRpcRequest=Xi.isntJsonRpcNotification=Xi.isJsonRpcNotification=void 0;const ro=wi,io=Zi,oo=Ci,so=eo,ao=Ei;function co(t){return(0,oo.isString)(t)||(0,so.isNumber)(t)}function uo(t){return(0,ro.isArray)(t)||(0,io.isObject)(t)}function fo(t){return(0,io.isRecord)(t)&&(0,oo.isString)(t.jsonrpc)&&(0,oo.isString)(t.method)&&(0,ao.isUndefined)(t.id)&&uo(t.params)}function lo(t){return(0,io.isRecord)(t)&&(0,oo.isString)(t.jsonrpc)&&(0,oo.isString)(t.method)&&co(t.id)&&uo(t.params)}function ho(t){return(0,io.isRecord)(t)&&(0,oo.isString)(t.jsonrpc)&&(0,oo.isString)(t.id)&&"result"in t}function yo(t){return(0,io.isRecord)(t)&&(0,oo.isString)(t.jsonrpc)&&co(t.id)&&function(t){return(0,io.isRecord)(t)&&(0,so.isNumber)(t.code)&&(0,oo.isString)(t.message)&&((0,ao.isUndefined)(t.data)||(0,io.isObject)(t.data))}(t.error)}Xi.isJsonRpcNotification=fo,Xi.isntJsonRpcNotification=function(t){return!fo(t)},Xi.isJsonRpcRequest=lo,Xi.isntJsonRpcRequest=function(t){return!lo(t)},Xi.isJsonRpcSuccess=ho,Xi.isntJsonRpcSuccess=function(t){return!ho(t)},Xi.isJsonRpcError=yo,Xi.isntJsonRpcError=function(t){return!yo(t)};var po={};po.isntJson=po.isJson=void 0,po.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},po.isntJson=function t(e){return!t()};var vo={};vo.isAbsoluteURL=void 0,vo.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=y&&y.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=y&&y.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(wi,t),n(Ai,t),n(ji,t),n(Ri,t),n(Ni,t),n(qi,t),n(zi,t),n(Fi,t),n(Li,t),n(Hi,t),n(Yi,t),n(Xi,t),n(po,t),n(Ti,t),n(eo,t),n(Zi,t),n(Ci,t),n(Ei,t),n(vo,t)}(gi);class mo extends qr{constructor(){super(...arguments),this.stateChanges=new mi}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const n=this.state;this.stateChanges.next({event:t,oldState:e,newState:n}),gi.isEmptyObject(this.schema[n])&&this.stateChanges.complete()}}export{Dr as BadEventError,a as Box,f as Emitter,Cr as ExpirableMap,qr as FiniteStateMachine,l as HashMap,d as HashSet,fr as LRUMap,mo as ObservableFiniteStateMachine,h as Queue,Jr as TLRUMap,Ur as TrieMap,u as convertArrayToCons,c as convertConsToArray};
16
30
  //# sourceMappingURL=index.min.mjs.map