compostjs 0.0.11 → 0.1.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.
- package/dist/compost.js +34 -28
- package/dist/core.js +94 -73
- package/dist/fable_modules/fable-library-js.4.28.0/Array.d.ts +123 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Array.js +1242 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Async.d.ts +26 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Async.js +145 -0
- package/dist/fable_modules/fable-library-js.4.28.0/AsyncBuilder.d.ts +59 -0
- package/dist/fable_modules/fable-library-js.4.28.0/AsyncBuilder.js +183 -0
- package/dist/fable_modules/fable-library-js.4.28.0/BigInt.d.ts +115 -0
- package/dist/fable_modules/fable-library-js.4.28.0/BigInt.js +283 -0
- package/dist/fable_modules/fable-library-js.4.28.0/BitConverter.d.ts +27 -0
- package/dist/fable_modules/fable-library-js.4.28.0/BitConverter.js +138 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Boolean.d.ts +3 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Boolean.js +21 -0
- package/dist/fable_modules/fable-library-js.4.28.0/CHANGELOG.md +100 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Char.d.ts +65 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Char.js +169 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Choice.d.ts +121 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Choice.js +184 -0
- package/dist/fable_modules/fable-library-js.4.28.0/CollectionUtil.d.ts +7 -0
- package/dist/fable_modules/fable-library-js.4.28.0/CollectionUtil.js +182 -0
- package/dist/fable_modules/fable-library-js.4.28.0/ConditionalWeakTable.d.ts +9 -0
- package/dist/fable_modules/fable-library-js.4.28.0/ConditionalWeakTable.js +21 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Date.d.ts +70 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Date.js +748 -0
- package/dist/fable_modules/fable-library-js.4.28.0/DateOffset.d.ts +63 -0
- package/dist/fable_modules/fable-library-js.4.28.0/DateOffset.js +268 -0
- package/dist/fable_modules/fable-library-js.4.28.0/DateOnly.d.ts +18 -0
- package/dist/fable_modules/fable-library-js.4.28.0/DateOnly.js +124 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Decimal.d.ts +45 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Decimal.js +212 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Double.d.ts +11 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Double.js +46 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Encoding.d.ts +12 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Encoding.js +173 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Event.d.ts +31 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Event.js +93 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Collections.d.ts +7 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Collections.js +27 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.CompilerServices.d.ts +12 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.CompilerServices.js +27 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.d.ts +17 -0
- package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.js +69 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Global.d.ts +24 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Global.js +8 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Guid.d.ts +10 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Guid.js +142 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Int32.d.ts +28 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Int32.js +135 -0
- package/dist/fable_modules/fable-library-js.4.28.0/List.d.ts +143 -0
- package/dist/fable_modules/fable-library-js.4.28.0/List.js +1273 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Long.d.ts +3 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Long.js +46 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MailboxProcessor.d.ts +25 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MailboxProcessor.js +93 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Map.d.ts +178 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Map.js +1396 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MapUtil.d.ts +12 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MapUtil.js +127 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MutableMap.d.ts +52 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MutableMap.js +327 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MutableSet.d.ts +39 -0
- package/dist/fable_modules/fable-library-js.4.28.0/MutableSet.js +233 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Native.d.ts +2 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Native.js +8 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Numeric.d.ts +19 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Numeric.js +71 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Observable.d.ts +32 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Observable.js +113 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Option.d.ts +28 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Option.js +96 -0
- package/dist/fable_modules/fable-library-js.4.28.0/README.md +3 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Random.d.ts +37 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Random.js +170 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Range.d.ts +12 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Range.js +45 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Reflection.d.ts +119 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Reflection.js +461 -0
- package/dist/fable_modules/fable-library-js.4.28.0/RegExp.d.ts +10 -0
- package/dist/fable_modules/fable-library-js.4.28.0/RegExp.js +131 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Result.d.ts +37 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Result.js +165 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Seq.d.ts +165 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Seq.js +1378 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Seq2.d.ts +18 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Seq2.js +111 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Set.d.ts +190 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Set.js +1789 -0
- package/dist/fable_modules/fable-library-js.4.28.0/String.d.ts +58 -0
- package/dist/fable_modules/fable-library-js.4.28.0/String.js +554 -0
- package/dist/fable_modules/fable-library-js.4.28.0/System.Collections.Generic.d.ts +79 -0
- package/dist/fable_modules/fable-library-js.4.28.0/System.Collections.Generic.js +317 -0
- package/dist/fable_modules/fable-library-js.4.28.0/System.Text.d.ts +38 -0
- package/dist/fable_modules/fable-library-js.4.28.0/System.Text.js +162 -0
- package/dist/fable_modules/fable-library-js.4.28.0/SystemException.d.ts +5 -0
- package/dist/fable_modules/fable-library-js.4.28.0/SystemException.js +5 -0
- package/dist/fable_modules/fable-library-js.4.28.0/TimeOnly.d.ts +15 -0
- package/dist/fable_modules/fable-library-js.4.28.0/TimeOnly.js +122 -0
- package/dist/fable_modules/fable-library-js.4.28.0/TimeSpan.d.ts +34 -0
- package/dist/fable_modules/fable-library-js.4.28.0/TimeSpan.js +177 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Timer.d.ts +19 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Timer.js +67 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Types.d.ts +58 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Types.js +208 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Unicode.13.0.0.d.ts +2 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Unicode.13.0.0.js +4 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Uri.d.ts +31 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Uri.js +159 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Util.d.ts +210 -0
- package/dist/fable_modules/fable-library-js.4.28.0/Util.js +769 -0
- package/dist/fable_modules/fable-library-js.4.28.0/big.d.ts +338 -0
- package/dist/fable_modules/fable-library-js.4.28.0/lib/big.d.ts +5 -0
- package/dist/fable_modules/fable-library-js.4.28.0/lib/big.js +825 -0
- package/dist/fable_modules/fable-library-js.4.28.0/package.json +24 -0
- package/dist/fable_modules/project_cracked.json +1 -0
- package/package.json +5 -4
- package/.claude/settings.local.json +0 -11
- package/copy-latest.sh +0 -1
- package/dist/fable-library.2.10.1/Array.js +0 -1336
- package/dist/fable-library.2.10.1/Async.js +0 -121
- package/dist/fable-library.2.10.1/AsyncBuilder.js +0 -200
- package/dist/fable-library.2.10.1/Date.js +0 -501
- package/dist/fable-library.2.10.1/Decimal.js +0 -208
- package/dist/fable-library.2.10.1/Event.js +0 -193
- package/dist/fable-library.2.10.1/Int32.js +0 -157
- package/dist/fable-library.2.10.1/List.js +0 -1234
- package/dist/fable-library.2.10.1/Long.js +0 -155
- package/dist/fable-library.2.10.1/Map.js +0 -1292
- package/dist/fable-library.2.10.1/MutableMap.js +0 -360
- package/dist/fable-library.2.10.1/MutableSet.js +0 -279
- package/dist/fable-library.2.10.1/Observable.js +0 -131
- package/dist/fable-library.2.10.1/Option.js +0 -118
- package/dist/fable-library.2.10.1/Reflection.js +0 -345
- package/dist/fable-library.2.10.1/RegExp.js +0 -118
- package/dist/fable-library.2.10.1/Seq.js +0 -917
- package/dist/fable-library.2.10.1/Set.js +0 -1692
- package/dist/fable-library.2.10.1/String.js +0 -679
- package/dist/fable-library.2.10.1/Types.js +0 -308
- package/dist/fable-library.2.10.1/Util.js +0 -761
- package/dist/helpers.js +0 -31
- package/dist/lib/big.js +0 -905
- package/dist/lib/long.js +0 -1375
- package/index.html +0 -49
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
import { declare, FSharpRef } from "./Types";
|
|
2
|
-
import { iterateIndexed, toIterator, getEnumerator, delay, collect, map, sumBy, iterate } from "./Seq";
|
|
3
|
-
import { class_type } from "./Reflection";
|
|
4
|
-
import { equals, getItemFromDict, tryGetValue } from "./Util";
|
|
5
|
-
import { format } from "./String";
|
|
6
|
-
export const MutableMap$00602 = declare(function Fable_Collections_MutableMap(pairs, comparer) {
|
|
7
|
-
const $this$$1 = this;
|
|
8
|
-
const this$ = new FSharpRef(null);
|
|
9
|
-
$this$$1.comparer = comparer;
|
|
10
|
-
this$.contents = $this$$1;
|
|
11
|
-
$this$$1.hashMap = new Map([]);
|
|
12
|
-
$this$$1["init@20-1"] = 1;
|
|
13
|
-
iterate(function (pair) {
|
|
14
|
-
MutableMap$00602$$Add$$5BDDA1(this$.contents, pair[0], pair[1]);
|
|
15
|
-
}, pairs);
|
|
16
|
-
void null;
|
|
17
|
-
});
|
|
18
|
-
export function MutableMap$00602$reflection($gen$$4, $gen$$5) {
|
|
19
|
-
return class_type("Fable.Collections.MutableMap`2", [$gen$$4, $gen$$5], MutableMap$00602);
|
|
20
|
-
}
|
|
21
|
-
export function MutableMap$00602$$$$002Ector$$6623D9B3(pairs, comparer) {
|
|
22
|
-
return this instanceof MutableMap$00602 ? MutableMap$00602.call(this, pairs, comparer) : new MutableMap$00602(pairs, comparer);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function MutableMap$00602$$TryFindIndex$$2B595(this$$$1, k) {
|
|
26
|
-
const h = this$$$1.comparer.GetHashCode(k) | 0;
|
|
27
|
-
const matchValue = tryGetValue(this$$$1.hashMap, h, null);
|
|
28
|
-
|
|
29
|
-
if (matchValue[0]) {
|
|
30
|
-
return [true, h, matchValue[1].findIndex(function (pair$$1) {
|
|
31
|
-
return this$$$1.comparer.Equals(k, pair$$1[0]);
|
|
32
|
-
})];
|
|
33
|
-
} else {
|
|
34
|
-
return [false, h, -1];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function MutableMap$00602$$TryFind$$2B595(this$$$2, k$$1) {
|
|
39
|
-
const matchValue$$1 = MutableMap$00602$$TryFindIndex$$2B595(this$$$2, k$$1);
|
|
40
|
-
var $target$$10;
|
|
41
|
-
|
|
42
|
-
if (matchValue$$1[0]) {
|
|
43
|
-
if (matchValue$$1[2] > -1) {
|
|
44
|
-
$target$$10 = 0;
|
|
45
|
-
} else {
|
|
46
|
-
$target$$10 = 1;
|
|
47
|
-
}
|
|
48
|
-
} else {
|
|
49
|
-
$target$$10 = 1;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
switch ($target$$10) {
|
|
53
|
-
case 0:
|
|
54
|
-
{
|
|
55
|
-
return getItemFromDict(this$$$2.hashMap, matchValue$$1[1])[matchValue$$1[2]];
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
case 1:
|
|
59
|
-
{
|
|
60
|
-
return undefined;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
export function MutableMap$00602$$get_Comparer(this$$$3) {
|
|
65
|
-
return this$$$3.comparer;
|
|
66
|
-
}
|
|
67
|
-
export function MutableMap$00602$$Clear(this$$$4) {
|
|
68
|
-
this$$$4.hashMap.clear();
|
|
69
|
-
}
|
|
70
|
-
export function MutableMap$00602$$get_Count(this$$$5) {
|
|
71
|
-
const source = this$$$5.hashMap.values();
|
|
72
|
-
return sumBy(function projection(pairs$$2) {
|
|
73
|
-
return pairs$$2.length;
|
|
74
|
-
}, source, {
|
|
75
|
-
GetZero() {
|
|
76
|
-
return 0;
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
Add($x$$2, $y$$3) {
|
|
80
|
-
return $x$$2 + $y$$3;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
}) | 0;
|
|
84
|
-
}
|
|
85
|
-
export function MutableMap$00602$$get_Item$$2B595(this$$$6, k$$2) {
|
|
86
|
-
const matchValue$$2 = MutableMap$00602$$TryFind$$2B595(this$$$6, k$$2);
|
|
87
|
-
|
|
88
|
-
if (matchValue$$2 != null) {
|
|
89
|
-
const pair$$2 = matchValue$$2;
|
|
90
|
-
return pair$$2[1];
|
|
91
|
-
} else {
|
|
92
|
-
throw new Error("The item was not found in collection");
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
export function MutableMap$00602$$set_Item$$5BDDA1(this$$$7, k$$3, v) {
|
|
96
|
-
const matchValue$$3 = MutableMap$00602$$TryFindIndex$$2B595(this$$$7, k$$3);
|
|
97
|
-
var $target$$20;
|
|
98
|
-
|
|
99
|
-
if (matchValue$$3[0]) {
|
|
100
|
-
if (matchValue$$3[2] > -1) {
|
|
101
|
-
$target$$20 = 0;
|
|
102
|
-
} else {
|
|
103
|
-
$target$$20 = 1;
|
|
104
|
-
}
|
|
105
|
-
} else {
|
|
106
|
-
$target$$20 = 1;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
switch ($target$$20) {
|
|
110
|
-
case 0:
|
|
111
|
-
{
|
|
112
|
-
getItemFromDict(this$$$7.hashMap, matchValue$$3[1])[matchValue$$3[2]] = [k$$3, v];
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
case 1:
|
|
117
|
-
{
|
|
118
|
-
if (matchValue$$3[0]) {
|
|
119
|
-
const value = void getItemFromDict(this$$$7.hashMap, matchValue$$3[1]).push([k$$3, v]);
|
|
120
|
-
void null;
|
|
121
|
-
} else {
|
|
122
|
-
this$$$7.hashMap.set(matchValue$$3[1], [[k$$3, v]]);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
export function MutableMap$00602$$Add$$5BDDA1(this$$$8, k$$4, v$$1) {
|
|
130
|
-
const matchValue$$4 = MutableMap$00602$$TryFindIndex$$2B595(this$$$8, k$$4);
|
|
131
|
-
var $target$$24;
|
|
132
|
-
|
|
133
|
-
if (matchValue$$4[0]) {
|
|
134
|
-
if (matchValue$$4[2] > -1) {
|
|
135
|
-
$target$$24 = 0;
|
|
136
|
-
} else {
|
|
137
|
-
$target$$24 = 1;
|
|
138
|
-
}
|
|
139
|
-
} else {
|
|
140
|
-
$target$$24 = 1;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
switch ($target$$24) {
|
|
144
|
-
case 0:
|
|
145
|
-
{
|
|
146
|
-
const msg = format("An item with the same key has already been added. Key: {0}", k$$4);
|
|
147
|
-
throw new Error(msg);
|
|
148
|
-
break;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
case 1:
|
|
152
|
-
{
|
|
153
|
-
if (matchValue$$4[0]) {
|
|
154
|
-
const value$$1 = void getItemFromDict(this$$$8.hashMap, matchValue$$4[1]).push([k$$4, v$$1]);
|
|
155
|
-
void null;
|
|
156
|
-
} else {
|
|
157
|
-
this$$$8.hashMap.set(matchValue$$4[1], [[k$$4, v$$1]]);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
export function MutableMap$00602$$ContainsKey$$2B595(this$$$9, k$$5) {
|
|
165
|
-
const matchValue$$5 = MutableMap$00602$$TryFindIndex$$2B595(this$$$9, k$$5);
|
|
166
|
-
var $target$$27;
|
|
167
|
-
|
|
168
|
-
if (matchValue$$5[0]) {
|
|
169
|
-
if (matchValue$$5[2] > -1) {
|
|
170
|
-
$target$$27 = 0;
|
|
171
|
-
} else {
|
|
172
|
-
$target$$27 = 1;
|
|
173
|
-
}
|
|
174
|
-
} else {
|
|
175
|
-
$target$$27 = 1;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
switch ($target$$27) {
|
|
179
|
-
case 0:
|
|
180
|
-
{
|
|
181
|
-
return true;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
case 1:
|
|
185
|
-
{
|
|
186
|
-
return false;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
export function MutableMap$00602$$Remove$$2B595(this$$$10, k$$6) {
|
|
191
|
-
const matchValue$$6 = MutableMap$00602$$TryFindIndex$$2B595(this$$$10, k$$6);
|
|
192
|
-
var $target$$30;
|
|
193
|
-
|
|
194
|
-
if (matchValue$$6[0]) {
|
|
195
|
-
if (matchValue$$6[2] > -1) {
|
|
196
|
-
$target$$30 = 0;
|
|
197
|
-
} else {
|
|
198
|
-
$target$$30 = 1;
|
|
199
|
-
}
|
|
200
|
-
} else {
|
|
201
|
-
$target$$30 = 1;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
switch ($target$$30) {
|
|
205
|
-
case 0:
|
|
206
|
-
{
|
|
207
|
-
getItemFromDict(this$$$10.hashMap, matchValue$$6[1]).splice(matchValue$$6[2], 1);
|
|
208
|
-
return true;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
case 1:
|
|
212
|
-
{
|
|
213
|
-
return false;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
MutableMap$00602.prototype[Symbol.iterator] = function () {
|
|
219
|
-
var elems;
|
|
220
|
-
const this$$$11 = this;
|
|
221
|
-
return toIterator((elems = delay(function () {
|
|
222
|
-
return collect(function (pairs$$3) {
|
|
223
|
-
return map(function (pair$$3) {
|
|
224
|
-
return pair$$3;
|
|
225
|
-
}, pairs$$3);
|
|
226
|
-
}, this$$$11.hashMap.values());
|
|
227
|
-
}), getEnumerator(elems)));
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
MutableMap$00602.prototype.Add = function (item) {
|
|
231
|
-
const this$$$12 = this;
|
|
232
|
-
MutableMap$00602$$Add$$5BDDA1(this$$$12, item[0], item[1]);
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
MutableMap$00602.prototype.Clear = function () {
|
|
236
|
-
const this$$$13 = this;
|
|
237
|
-
MutableMap$00602$$Clear(this$$$13);
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
MutableMap$00602.prototype.Contains = function (item$$1) {
|
|
241
|
-
var p;
|
|
242
|
-
const this$$$14 = this;
|
|
243
|
-
const matchValue$$7 = MutableMap$00602$$TryFind$$2B595(this$$$14, item$$1[0]);
|
|
244
|
-
var $target$$31;
|
|
245
|
-
|
|
246
|
-
if (matchValue$$7 != null) {
|
|
247
|
-
if (p = matchValue$$7, equals(p[1], item$$1[1])) {
|
|
248
|
-
$target$$31 = 0;
|
|
249
|
-
} else {
|
|
250
|
-
$target$$31 = 1;
|
|
251
|
-
}
|
|
252
|
-
} else {
|
|
253
|
-
$target$$31 = 1;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
switch ($target$$31) {
|
|
257
|
-
case 0:
|
|
258
|
-
{
|
|
259
|
-
return true;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
case 1:
|
|
263
|
-
{
|
|
264
|
-
return false;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
MutableMap$00602.prototype.CopyTo = function (array, arrayIndex) {
|
|
270
|
-
const this$$$15 = this;
|
|
271
|
-
iterateIndexed(function action(i$$10, e) {
|
|
272
|
-
array[arrayIndex + i$$10] = e;
|
|
273
|
-
}, this$$$15);
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
Object.defineProperty(MutableMap$00602.prototype, "Count", {
|
|
277
|
-
"get": function () {
|
|
278
|
-
const this$$$16 = this;
|
|
279
|
-
return MutableMap$00602$$get_Count(this$$$16) | 0;
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
Object.defineProperty(MutableMap$00602.prototype, "IsReadOnly", {
|
|
283
|
-
"get": function () {
|
|
284
|
-
return false;
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
MutableMap$00602.prototype.Remove = function (item$$2) {
|
|
289
|
-
const this$$$18 = this;
|
|
290
|
-
const matchValue$$8 = MutableMap$00602$$TryFind$$2B595(this$$$18, item$$2[0]);
|
|
291
|
-
|
|
292
|
-
if (matchValue$$8 != null) {
|
|
293
|
-
const pair$$4 = matchValue$$8;
|
|
294
|
-
|
|
295
|
-
if (equals(pair$$4[1], item$$2[1])) {
|
|
296
|
-
const value$$2 = MutableMap$00602$$Remove$$2B595(this$$$18, item$$2[0]);
|
|
297
|
-
void value$$2;
|
|
298
|
-
} else {
|
|
299
|
-
void null;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
return true;
|
|
303
|
-
} else {
|
|
304
|
-
return false;
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
Object.defineProperty(MutableMap$00602.prototype, "size", {
|
|
309
|
-
"get": function () {
|
|
310
|
-
const this$$$19 = this;
|
|
311
|
-
return MutableMap$00602$$get_Count(this$$$19) | 0;
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
MutableMap$00602.prototype.clear = function () {
|
|
316
|
-
const this$$$20 = this;
|
|
317
|
-
MutableMap$00602$$Clear(this$$$20);
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
MutableMap$00602.prototype.delete = function (k$$7) {
|
|
321
|
-
const this$$$21 = this;
|
|
322
|
-
return MutableMap$00602$$Remove$$2B595(this$$$21, k$$7);
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
MutableMap$00602.prototype.entries = function () {
|
|
326
|
-
const this$$$22 = this;
|
|
327
|
-
return map(function mapping(x) {
|
|
328
|
-
return x;
|
|
329
|
-
}, this$$$22);
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
MutableMap$00602.prototype.get = function (k$$8) {
|
|
333
|
-
const this$$$23 = this;
|
|
334
|
-
return MutableMap$00602$$get_Item$$2B595(this$$$23, k$$8);
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
MutableMap$00602.prototype.has = function (k$$9) {
|
|
338
|
-
const this$$$24 = this;
|
|
339
|
-
return MutableMap$00602$$ContainsKey$$2B595(this$$$24, k$$9);
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
MutableMap$00602.prototype.keys = function () {
|
|
343
|
-
const this$$$25 = this;
|
|
344
|
-
return map(function mapping$$1(pair$$5) {
|
|
345
|
-
return pair$$5[0];
|
|
346
|
-
}, this$$$25);
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
MutableMap$00602.prototype.set = function (k$$10, v$$2) {
|
|
350
|
-
const this$$$26 = this;
|
|
351
|
-
MutableMap$00602$$set_Item$$5BDDA1(this$$$26, k$$10, v$$2);
|
|
352
|
-
return this$$$26;
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
MutableMap$00602.prototype.values = function () {
|
|
356
|
-
const this$$$27 = this;
|
|
357
|
-
return map(function mapping$$2(pair$$6) {
|
|
358
|
-
return pair$$6[1];
|
|
359
|
-
}, this$$$27);
|
|
360
|
-
};
|
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import { declare, FSharpRef } from "./Types";
|
|
2
|
-
import { iterateIndexed, toIterator, getEnumerator, delay, collect, map, sumBy, iterate } from "./Seq";
|
|
3
|
-
import { class_type } from "./Reflection";
|
|
4
|
-
import { getItemFromDict, tryGetValue } from "./Util";
|
|
5
|
-
import { some } from "./Option";
|
|
6
|
-
export const MutableSet$00601 = declare(function Fable_Collections_MutableSet(items, comparer) {
|
|
7
|
-
const $this$$1 = this;
|
|
8
|
-
const this$ = new FSharpRef(null);
|
|
9
|
-
$this$$1.comparer = comparer;
|
|
10
|
-
this$.contents = $this$$1;
|
|
11
|
-
$this$$1.hashMap = new Map([]);
|
|
12
|
-
$this$$1["init@21-2"] = 1;
|
|
13
|
-
iterate(function (item) {
|
|
14
|
-
const value = MutableSet$00601$$Add$$2B595(this$.contents, item);
|
|
15
|
-
void value;
|
|
16
|
-
}, items);
|
|
17
|
-
void null;
|
|
18
|
-
});
|
|
19
|
-
export function MutableSet$00601$reflection($gen$$4) {
|
|
20
|
-
return class_type("Fable.Collections.MutableSet`1", [$gen$$4], MutableSet$00601);
|
|
21
|
-
}
|
|
22
|
-
export function MutableSet$00601$$$$002Ector$$Z6150332D(items, comparer) {
|
|
23
|
-
return this instanceof MutableSet$00601 ? MutableSet$00601.call(this, items, comparer) : new MutableSet$00601(items, comparer);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function MutableSet$00601$$TryFindIndex$$2B595(this$$$1, k) {
|
|
27
|
-
const h = this$$$1.comparer.GetHashCode(k) | 0;
|
|
28
|
-
const matchValue = tryGetValue(this$$$1.hashMap, h, null);
|
|
29
|
-
|
|
30
|
-
if (matchValue[0]) {
|
|
31
|
-
return [true, h, matchValue[1].findIndex(function (v) {
|
|
32
|
-
return this$$$1.comparer.Equals(k, v);
|
|
33
|
-
})];
|
|
34
|
-
} else {
|
|
35
|
-
return [false, h, -1];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function MutableSet$00601$$TryFind$$2B595(this$$$2, k$$1) {
|
|
40
|
-
const matchValue$$1 = MutableSet$00601$$TryFindIndex$$2B595(this$$$2, k$$1);
|
|
41
|
-
var $target$$9;
|
|
42
|
-
|
|
43
|
-
if (matchValue$$1[0]) {
|
|
44
|
-
if (matchValue$$1[2] > -1) {
|
|
45
|
-
$target$$9 = 0;
|
|
46
|
-
} else {
|
|
47
|
-
$target$$9 = 1;
|
|
48
|
-
}
|
|
49
|
-
} else {
|
|
50
|
-
$target$$9 = 1;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
switch ($target$$9) {
|
|
54
|
-
case 0:
|
|
55
|
-
{
|
|
56
|
-
return some(getItemFromDict(this$$$2.hashMap, matchValue$$1[1])[matchValue$$1[2]]);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
case 1:
|
|
60
|
-
{
|
|
61
|
-
return undefined;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export function MutableSet$00601$$get_Comparer(this$$$3) {
|
|
67
|
-
return this$$$3.comparer;
|
|
68
|
-
}
|
|
69
|
-
export function MutableSet$00601$$Clear(this$$$4) {
|
|
70
|
-
this$$$4.hashMap.clear();
|
|
71
|
-
}
|
|
72
|
-
export function MutableSet$00601$$get_Count(this$$$5) {
|
|
73
|
-
const source = this$$$5.hashMap.values();
|
|
74
|
-
return sumBy(function projection(pairs) {
|
|
75
|
-
return pairs.length;
|
|
76
|
-
}, source, {
|
|
77
|
-
GetZero() {
|
|
78
|
-
return 0;
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
Add($x$$2, $y$$3) {
|
|
82
|
-
return $x$$2 + $y$$3;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
}) | 0;
|
|
86
|
-
}
|
|
87
|
-
export function MutableSet$00601$$Add$$2B595(this$$$6, k$$2) {
|
|
88
|
-
const matchValue$$2 = MutableSet$00601$$TryFindIndex$$2B595(this$$$6, k$$2);
|
|
89
|
-
var $target$$16;
|
|
90
|
-
|
|
91
|
-
if (matchValue$$2[0]) {
|
|
92
|
-
if (matchValue$$2[2] > -1) {
|
|
93
|
-
$target$$16 = 0;
|
|
94
|
-
} else {
|
|
95
|
-
$target$$16 = 1;
|
|
96
|
-
}
|
|
97
|
-
} else {
|
|
98
|
-
$target$$16 = 1;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
switch ($target$$16) {
|
|
102
|
-
case 0:
|
|
103
|
-
{
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
case 1:
|
|
108
|
-
{
|
|
109
|
-
if (matchValue$$2[0]) {
|
|
110
|
-
const value$$1 = void getItemFromDict(this$$$6.hashMap, matchValue$$2[1]).push(k$$2);
|
|
111
|
-
void null;
|
|
112
|
-
return true;
|
|
113
|
-
} else {
|
|
114
|
-
this$$$6.hashMap.set(matchValue$$2[1], [k$$2]);
|
|
115
|
-
return true;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
export function MutableSet$00601$$Contains$$2B595(this$$$7, k$$3) {
|
|
121
|
-
const matchValue$$3 = MutableSet$00601$$TryFindIndex$$2B595(this$$$7, k$$3);
|
|
122
|
-
var $target$$19;
|
|
123
|
-
|
|
124
|
-
if (matchValue$$3[0]) {
|
|
125
|
-
if (matchValue$$3[2] > -1) {
|
|
126
|
-
$target$$19 = 0;
|
|
127
|
-
} else {
|
|
128
|
-
$target$$19 = 1;
|
|
129
|
-
}
|
|
130
|
-
} else {
|
|
131
|
-
$target$$19 = 1;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
switch ($target$$19) {
|
|
135
|
-
case 0:
|
|
136
|
-
{
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
case 1:
|
|
141
|
-
{
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
export function MutableSet$00601$$Remove$$2B595(this$$$8, k$$4) {
|
|
147
|
-
const matchValue$$4 = MutableSet$00601$$TryFindIndex$$2B595(this$$$8, k$$4);
|
|
148
|
-
var $target$$22;
|
|
149
|
-
|
|
150
|
-
if (matchValue$$4[0]) {
|
|
151
|
-
if (matchValue$$4[2] > -1) {
|
|
152
|
-
$target$$22 = 0;
|
|
153
|
-
} else {
|
|
154
|
-
$target$$22 = 1;
|
|
155
|
-
}
|
|
156
|
-
} else {
|
|
157
|
-
$target$$22 = 1;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
switch ($target$$22) {
|
|
161
|
-
case 0:
|
|
162
|
-
{
|
|
163
|
-
getItemFromDict(this$$$8.hashMap, matchValue$$4[1]).splice(matchValue$$4[2], 1);
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
case 1:
|
|
168
|
-
{
|
|
169
|
-
return false;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
MutableSet$00601.prototype[Symbol.iterator] = function () {
|
|
175
|
-
var elems;
|
|
176
|
-
const this$$$9 = this;
|
|
177
|
-
return toIterator((elems = delay(function () {
|
|
178
|
-
return collect(function (values$$1) {
|
|
179
|
-
return map(function (value$$2) {
|
|
180
|
-
return value$$2;
|
|
181
|
-
}, values$$1);
|
|
182
|
-
}, this$$$9.hashMap.values());
|
|
183
|
-
}), getEnumerator(elems)));
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
MutableSet$00601.prototype.Add = function (item$$1) {
|
|
187
|
-
const this$$$10 = this;
|
|
188
|
-
const value$$3 = MutableSet$00601$$Add$$2B595(this$$$10, item$$1);
|
|
189
|
-
void value$$3;
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
MutableSet$00601.prototype.Clear = function () {
|
|
193
|
-
const this$$$11 = this;
|
|
194
|
-
MutableSet$00601$$Clear(this$$$11);
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
MutableSet$00601.prototype.Contains = function (item$$2) {
|
|
198
|
-
const this$$$12 = this;
|
|
199
|
-
return MutableSet$00601$$Contains$$2B595(this$$$12, item$$2);
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
MutableSet$00601.prototype.CopyTo = function (array, arrayIndex) {
|
|
203
|
-
const this$$$13 = this;
|
|
204
|
-
iterateIndexed(function action(i$$8, e) {
|
|
205
|
-
array[arrayIndex + i$$8] = e;
|
|
206
|
-
}, this$$$13);
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
Object.defineProperty(MutableSet$00601.prototype, "Count", {
|
|
210
|
-
"get": function () {
|
|
211
|
-
const this$$$14 = this;
|
|
212
|
-
return MutableSet$00601$$get_Count(this$$$14) | 0;
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
Object.defineProperty(MutableSet$00601.prototype, "IsReadOnly", {
|
|
216
|
-
"get": function () {
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
MutableSet$00601.prototype.Remove = function (item$$3) {
|
|
222
|
-
const this$$$16 = this;
|
|
223
|
-
return MutableSet$00601$$Remove$$2B595(this$$$16, item$$3);
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
Object.defineProperty(MutableSet$00601.prototype, "size", {
|
|
227
|
-
"get": function () {
|
|
228
|
-
const this$$$17 = this;
|
|
229
|
-
return MutableSet$00601$$get_Count(this$$$17) | 0;
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
MutableSet$00601.prototype.add = function (k$$5) {
|
|
234
|
-
const this$$$18 = this;
|
|
235
|
-
const value$$4 = MutableSet$00601$$Add$$2B595(this$$$18, k$$5);
|
|
236
|
-
void value$$4;
|
|
237
|
-
return this$$$18;
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
MutableSet$00601.prototype.add_ = function (k$$6) {
|
|
241
|
-
const this$$$19 = this;
|
|
242
|
-
return MutableSet$00601$$Add$$2B595(this$$$19, k$$6);
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
MutableSet$00601.prototype.clear = function () {
|
|
246
|
-
const this$$$20 = this;
|
|
247
|
-
MutableSet$00601$$Clear(this$$$20);
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
MutableSet$00601.prototype.delete = function (k$$7) {
|
|
251
|
-
const this$$$21 = this;
|
|
252
|
-
return MutableSet$00601$$Remove$$2B595(this$$$21, k$$7);
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
MutableSet$00601.prototype.has = function (k$$8) {
|
|
256
|
-
const this$$$22 = this;
|
|
257
|
-
return MutableSet$00601$$Contains$$2B595(this$$$22, k$$8);
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
MutableSet$00601.prototype.keys = function () {
|
|
261
|
-
const this$$$23 = this;
|
|
262
|
-
return map(function mapping(x) {
|
|
263
|
-
return x;
|
|
264
|
-
}, this$$$23);
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
MutableSet$00601.prototype.values = function () {
|
|
268
|
-
const this$$$24 = this;
|
|
269
|
-
return map(function mapping$$1(x$$1) {
|
|
270
|
-
return x$$1;
|
|
271
|
-
}, this$$$24);
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
MutableSet$00601.prototype.entries = function () {
|
|
275
|
-
const this$$$25 = this;
|
|
276
|
-
return map(function mapping$$2(v$$1) {
|
|
277
|
-
return [v$$1, v$$1];
|
|
278
|
-
}, this$$$25);
|
|
279
|
-
};
|