@eslint-react/jsx 0.8.10-beta.4 → 0.8.10
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/index.cjs +101 -101
- package/dist/index.js +101 -101
- package/dist/index.mjs +101 -101
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -785,22 +785,22 @@ function add64(out, aHi, aLo, bHi, bLo) {
|
|
|
785
785
|
*/ const hash = (self)=>{
|
|
786
786
|
switch(typeof self){
|
|
787
787
|
case "number":
|
|
788
|
-
return number(self);
|
|
788
|
+
return number$1(self);
|
|
789
789
|
case "bigint":
|
|
790
|
-
return string(self.toString(10));
|
|
790
|
+
return string$1(self.toString(10));
|
|
791
791
|
case "boolean":
|
|
792
|
-
return string(String(self));
|
|
792
|
+
return string$1(String(self));
|
|
793
793
|
case "symbol":
|
|
794
|
-
return string(String(self));
|
|
794
|
+
return string$1(String(self));
|
|
795
795
|
case "string":
|
|
796
|
-
return string(self);
|
|
796
|
+
return string$1(self);
|
|
797
797
|
case "undefined":
|
|
798
|
-
return string("undefined");
|
|
798
|
+
return string$1("undefined");
|
|
799
799
|
case "function":
|
|
800
800
|
case "object":
|
|
801
801
|
{
|
|
802
802
|
if (self === null) {
|
|
803
|
-
return string("null");
|
|
803
|
+
return string$1("null");
|
|
804
804
|
}
|
|
805
805
|
if (isHash(self)) {
|
|
806
806
|
return self[symbol$1]();
|
|
@@ -817,14 +817,14 @@ function add64(out, aHi, aLo, bHi, bLo) {
|
|
|
817
817
|
* @category hashing
|
|
818
818
|
*/ const random = (self)=>{
|
|
819
819
|
if (!randomHashCache.has(self)) {
|
|
820
|
-
randomHashCache.set(self, number(pcgr.integer(Number.MAX_SAFE_INTEGER)));
|
|
820
|
+
randomHashCache.set(self, number$1(pcgr.integer(Number.MAX_SAFE_INTEGER)));
|
|
821
821
|
}
|
|
822
822
|
return randomHashCache.get(self);
|
|
823
823
|
};
|
|
824
824
|
/**
|
|
825
825
|
* @since 2.0.0
|
|
826
826
|
* @category hashing
|
|
827
|
-
*/ const combine$
|
|
827
|
+
*/ const combine$2 = (b)=>(self)=>self * 53 ^ b;
|
|
828
828
|
/**
|
|
829
829
|
* @since 2.0.0
|
|
830
830
|
* @category hashing
|
|
@@ -836,7 +836,7 @@ function add64(out, aHi, aLo, bHi, bLo) {
|
|
|
836
836
|
/**
|
|
837
837
|
* @since 2.0.0
|
|
838
838
|
* @category hashing
|
|
839
|
-
*/ const number = (n)=>{
|
|
839
|
+
*/ const number$1 = (n)=>{
|
|
840
840
|
if (n !== n || n === Infinity) {
|
|
841
841
|
return 0;
|
|
842
842
|
}
|
|
@@ -852,7 +852,7 @@ function add64(out, aHi, aLo, bHi, bLo) {
|
|
|
852
852
|
/**
|
|
853
853
|
* @since 2.0.0
|
|
854
854
|
* @category hashing
|
|
855
|
-
*/ const string = (str)=>{
|
|
855
|
+
*/ const string$1 = (str)=>{
|
|
856
856
|
let h = 5381, i = str.length;
|
|
857
857
|
while(i){
|
|
858
858
|
h = h * 33 ^ str.charCodeAt(--i);
|
|
@@ -865,7 +865,7 @@ function add64(out, aHi, aLo, bHi, bLo) {
|
|
|
865
865
|
*/ const structureKeys = (o, keys)=>{
|
|
866
866
|
let h = 12289;
|
|
867
867
|
for(let i = 0; i < keys.length; i++){
|
|
868
|
-
h ^= pipe(string(keys[i]), combine$
|
|
868
|
+
h ^= pipe(string$1(keys[i]), combine$2(hash(o[keys[i]])));
|
|
869
869
|
}
|
|
870
870
|
return optimize(h);
|
|
871
871
|
};
|
|
@@ -876,10 +876,10 @@ function add64(out, aHi, aLo, bHi, bLo) {
|
|
|
876
876
|
/**
|
|
877
877
|
* @since 2.0.0
|
|
878
878
|
* @category hashing
|
|
879
|
-
*/ const array$
|
|
879
|
+
*/ const array$3 = (arr)=>{
|
|
880
880
|
let h = 6151;
|
|
881
881
|
for(let i = 0; i < arr.length; i++){
|
|
882
|
-
h = pipe(h, combine$
|
|
882
|
+
h = pipe(h, combine$2(hash(arr[i])));
|
|
883
883
|
}
|
|
884
884
|
return optimize(h);
|
|
885
885
|
};
|
|
@@ -925,7 +925,7 @@ function compareBoth(self, that) {
|
|
|
925
925
|
*/ /**
|
|
926
926
|
* @category constructors
|
|
927
927
|
* @since 2.0.0
|
|
928
|
-
*/ const make$
|
|
928
|
+
*/ const make$a = (isEquivalent)=>(self, that)=>self === that || isEquivalent(self, that);
|
|
929
929
|
/**
|
|
930
930
|
* @since 2.0.0
|
|
931
931
|
*/ /**
|
|
@@ -1071,7 +1071,7 @@ const SomeProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1071
1071
|
return isOption$1(that) && isSome$1(that) && equals(that.value, this.value);
|
|
1072
1072
|
},
|
|
1073
1073
|
[symbol$1] () {
|
|
1074
|
-
return combine$
|
|
1074
|
+
return combine$2(hash(this._tag))(hash(this.value));
|
|
1075
1075
|
},
|
|
1076
1076
|
toJSON () {
|
|
1077
1077
|
return {
|
|
@@ -1088,7 +1088,7 @@ const NoneProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1088
1088
|
return isOption$1(that) && isNone$1(that);
|
|
1089
1089
|
},
|
|
1090
1090
|
[symbol$1] () {
|
|
1091
|
-
return combine$
|
|
1091
|
+
return combine$2(hash(this._tag));
|
|
1092
1092
|
},
|
|
1093
1093
|
toJSON () {
|
|
1094
1094
|
return {
|
|
@@ -1101,7 +1101,7 @@ const NoneProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1101
1101
|
/** @internal */ const isNone$1 = (fa)=>fa._tag === "None";
|
|
1102
1102
|
/** @internal */ const isSome$1 = (fa)=>fa._tag === "Some";
|
|
1103
1103
|
/** @internal */ const none$1 = /*#__PURE__*/ Object.create(NoneProto);
|
|
1104
|
-
/** @internal */ const some$
|
|
1104
|
+
/** @internal */ const some$5 = (value)=>{
|
|
1105
1105
|
const a = Object.create(SomeProto);
|
|
1106
1106
|
a.value = value;
|
|
1107
1107
|
return a;
|
|
@@ -1130,7 +1130,7 @@ const RightProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Commo
|
|
|
1130
1130
|
return isEither$1(that) && isRight$1(that) && equals(that.right, this.right);
|
|
1131
1131
|
},
|
|
1132
1132
|
[symbol$1] () {
|
|
1133
|
-
return combine$
|
|
1133
|
+
return combine$2(hash(this._tag))(hash(this.right));
|
|
1134
1134
|
},
|
|
1135
1135
|
toJSON () {
|
|
1136
1136
|
return {
|
|
@@ -1147,7 +1147,7 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1147
1147
|
return isEither$1(that) && isLeft$1(that) && equals(that.left, this.left);
|
|
1148
1148
|
},
|
|
1149
1149
|
[symbol$1] () {
|
|
1150
|
-
return combine$
|
|
1150
|
+
return combine$2(hash(this._tag))(hash(this.left));
|
|
1151
1151
|
},
|
|
1152
1152
|
toJSON () {
|
|
1153
1153
|
return {
|
|
@@ -1170,14 +1170,14 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1170
1170
|
a.right = right;
|
|
1171
1171
|
return a;
|
|
1172
1172
|
};
|
|
1173
|
-
/** @internal */ const getLeft$2 = (self)=>isRight$1(self) ? none$1 : some$
|
|
1174
|
-
/** @internal */ const getRight$2 = (self)=>isLeft$1(self) ? none$1 : some$
|
|
1173
|
+
/** @internal */ const getLeft$2 = (self)=>isRight$1(self) ? none$1 : some$5(self.left);
|
|
1174
|
+
/** @internal */ const getRight$2 = (self)=>isLeft$1(self) ? none$1 : some$5(self.right);
|
|
1175
1175
|
/**
|
|
1176
1176
|
* @since 2.0.0
|
|
1177
1177
|
*/ /**
|
|
1178
1178
|
* @category constructors
|
|
1179
1179
|
* @since 2.0.0
|
|
1180
|
-
*/ const make$
|
|
1180
|
+
*/ const make$9 = (compare)=>(self, that)=>self === that ? 0 : compare(self, that);
|
|
1181
1181
|
/**
|
|
1182
1182
|
* @category symbols
|
|
1183
1183
|
* @since 2.0.0
|
|
@@ -1195,7 +1195,7 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1195
1195
|
*
|
|
1196
1196
|
* @category constructors
|
|
1197
1197
|
* @since 2.0.0
|
|
1198
|
-
*/ const some$
|
|
1198
|
+
*/ const some$4 = some$5;
|
|
1199
1199
|
/**
|
|
1200
1200
|
* Tests if a value is a `Option`.
|
|
1201
1201
|
*
|
|
@@ -1263,7 +1263,7 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1263
1263
|
*
|
|
1264
1264
|
* @category pattern matching
|
|
1265
1265
|
* @since 2.0.0
|
|
1266
|
-
*/ const match$
|
|
1266
|
+
*/ const match$2 = /*#__PURE__*/ dual(2, (self, { onNone, onSome })=>isNone(self) ? onNone() : onSome(self.value));
|
|
1267
1267
|
/**
|
|
1268
1268
|
* Returns a type guard from a `Option` returning function.
|
|
1269
1269
|
* This function ensures that a type guard definition is type-safe.
|
|
@@ -1298,7 +1298,7 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1298
1298
|
* @since 2.0.0
|
|
1299
1299
|
*/ const fromIterable$5 = (collection)=>{
|
|
1300
1300
|
for (const a of collection){
|
|
1301
|
-
return some$
|
|
1301
|
+
return some$4(a);
|
|
1302
1302
|
}
|
|
1303
1303
|
return none();
|
|
1304
1304
|
};
|
|
@@ -1436,7 +1436,7 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1436
1436
|
*
|
|
1437
1437
|
* @category conversions
|
|
1438
1438
|
* @since 2.0.0
|
|
1439
|
-
*/ const fromNullable$
|
|
1439
|
+
*/ const fromNullable$2 = (nullableValue)=>nullableValue == null ? none() : some$4(nullableValue);
|
|
1440
1440
|
/**
|
|
1441
1441
|
* This API is useful for lifting a function that returns `null` or `undefined` into the `Option` context.
|
|
1442
1442
|
*
|
|
@@ -1455,7 +1455,7 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1455
1455
|
*
|
|
1456
1456
|
* @category conversions
|
|
1457
1457
|
* @since 2.0.0
|
|
1458
|
-
*/ const liftNullable = (f)=>(...a)=>fromNullable$
|
|
1458
|
+
*/ const liftNullable$1 = (f)=>(...a)=>fromNullable$2(f(...a));
|
|
1459
1459
|
/**
|
|
1460
1460
|
* Returns the value of the `Option` if it is a `Some`, otherwise returns `null`.
|
|
1461
1461
|
*
|
|
@@ -1504,7 +1504,7 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1504
1504
|
* @since 2.0.0
|
|
1505
1505
|
*/ const liftThrowable = (f)=>(...a)=>{
|
|
1506
1506
|
try {
|
|
1507
|
-
return some$
|
|
1507
|
+
return some$4(f(...a));
|
|
1508
1508
|
} catch (e) {
|
|
1509
1509
|
return none();
|
|
1510
1510
|
}
|
|
@@ -1559,7 +1559,7 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1559
1559
|
*
|
|
1560
1560
|
* @category transforming
|
|
1561
1561
|
* @since 2.0.0
|
|
1562
|
-
*/ const map$5 = /*#__PURE__*/ dual(2, (self, f)=>isNone(self) ? none() : some$
|
|
1562
|
+
*/ const map$5 = /*#__PURE__*/ dual(2, (self, f)=>isNone(self) ? none() : some$4(f(self.value)));
|
|
1563
1563
|
/**
|
|
1564
1564
|
* Maps the `Some` value of this `Option` to the specified constant value.
|
|
1565
1565
|
*
|
|
@@ -1576,13 +1576,13 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1576
1576
|
*/ const asUnit = /*#__PURE__*/ as(undefined);
|
|
1577
1577
|
/**
|
|
1578
1578
|
* @since 2.0.0
|
|
1579
|
-
*/ const unit = /*#__PURE__*/ some$
|
|
1579
|
+
*/ const unit = /*#__PURE__*/ some$4(undefined);
|
|
1580
1580
|
/**
|
|
1581
1581
|
* Applies a function to the value of an `Option` and flattens the result, if the input is `Some`.
|
|
1582
1582
|
*
|
|
1583
1583
|
* @category transforming
|
|
1584
1584
|
* @since 2.0.0
|
|
1585
|
-
*/ const flatMap$
|
|
1585
|
+
*/ const flatMap$4 = /*#__PURE__*/ dual(2, (self, f)=>isNone(self) ? none() : f(self.value));
|
|
1586
1586
|
/**
|
|
1587
1587
|
* This is `flatMap` + `fromNullable`, useful when working with optional values.
|
|
1588
1588
|
*
|
|
@@ -1622,19 +1622,19 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1622
1622
|
*
|
|
1623
1623
|
* @category transforming
|
|
1624
1624
|
* @since 2.0.0
|
|
1625
|
-
*/ const flatMapNullable = /*#__PURE__*/ dual(2, (self, f)=>isNone(self) ? none() : fromNullable$
|
|
1625
|
+
*/ const flatMapNullable$1 = /*#__PURE__*/ dual(2, (self, f)=>isNone(self) ? none() : fromNullable$2(f(self.value)));
|
|
1626
1626
|
/**
|
|
1627
1627
|
* @category transforming
|
|
1628
1628
|
* @since 2.0.0
|
|
1629
|
-
*/ const flatten$
|
|
1629
|
+
*/ const flatten$2 = /*#__PURE__*/ flatMap$4(identity$1);
|
|
1630
1630
|
/**
|
|
1631
1631
|
* @category transforming
|
|
1632
1632
|
* @since 2.0.0
|
|
1633
|
-
*/ const zipRight = /*#__PURE__*/ dual(2, (self, that)=>flatMap$
|
|
1633
|
+
*/ const zipRight = /*#__PURE__*/ dual(2, (self, that)=>flatMap$4(self, ()=>that));
|
|
1634
1634
|
/**
|
|
1635
1635
|
* @category transforming
|
|
1636
1636
|
* @since 2.0.0
|
|
1637
|
-
*/ const composeK = /*#__PURE__*/ dual(2, (afb, bfc)=>(a)=>flatMap$
|
|
1637
|
+
*/ const composeK = /*#__PURE__*/ dual(2, (afb, bfc)=>(a)=>flatMap$4(afb(a), bfc));
|
|
1638
1638
|
/**
|
|
1639
1639
|
* Sequences the specified `that` `Option` but ignores its value.
|
|
1640
1640
|
*
|
|
@@ -1666,11 +1666,11 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1666
1666
|
*
|
|
1667
1667
|
* @category transforming
|
|
1668
1668
|
* @since 2.0.0
|
|
1669
|
-
*/ const tap = /*#__PURE__*/ dual(2, (self, f)=>flatMap$
|
|
1669
|
+
*/ const tap = /*#__PURE__*/ dual(2, (self, f)=>flatMap$4(self, (a)=>map$5(f(a), ()=>a)));
|
|
1670
1670
|
/**
|
|
1671
1671
|
* @category combining
|
|
1672
1672
|
* @since 2.0.0
|
|
1673
|
-
*/ const product = (self, that)=>isSome(self) && isSome(that) ? some$
|
|
1673
|
+
*/ const product = (self, that)=>isSome(self) && isSome(that) ? some$4([
|
|
1674
1674
|
self.value,
|
|
1675
1675
|
that.value
|
|
1676
1676
|
]) : none();
|
|
@@ -1690,7 +1690,7 @@ const LeftProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
1690
1690
|
}
|
|
1691
1691
|
out.push(o.value);
|
|
1692
1692
|
}
|
|
1693
|
-
return some$
|
|
1693
|
+
return some$4(out);
|
|
1694
1694
|
};
|
|
1695
1695
|
/**
|
|
1696
1696
|
* Takes a structure of `Option`s and returns an `Option` of values with the same structure.
|
|
@@ -1720,7 +1720,7 @@ const all$1 = (input)=>{
|
|
|
1720
1720
|
}
|
|
1721
1721
|
out.push(o.value);
|
|
1722
1722
|
}
|
|
1723
|
-
return some$
|
|
1723
|
+
return some$4(out);
|
|
1724
1724
|
}
|
|
1725
1725
|
const out = {};
|
|
1726
1726
|
for (const key of Object.keys(input)){
|
|
@@ -1730,7 +1730,7 @@ const all$1 = (input)=>{
|
|
|
1730
1730
|
}
|
|
1731
1731
|
out[key] = o.value;
|
|
1732
1732
|
}
|
|
1733
|
-
return some$
|
|
1733
|
+
return some$4(out);
|
|
1734
1734
|
};
|
|
1735
1735
|
/**
|
|
1736
1736
|
* Zips two `Option` values together using a provided function, returning a new `Option` of the result.
|
|
@@ -1815,11 +1815,11 @@ const all$1 = (input)=>{
|
|
|
1815
1815
|
}
|
|
1816
1816
|
const e = f(self.value);
|
|
1817
1817
|
return isLeft$1(e) ? [
|
|
1818
|
-
some$
|
|
1818
|
+
some$4(e.left),
|
|
1819
1819
|
none()
|
|
1820
1820
|
] : [
|
|
1821
1821
|
none(),
|
|
1822
|
-
some$
|
|
1822
|
+
some$4(e.right)
|
|
1823
1823
|
];
|
|
1824
1824
|
});
|
|
1825
1825
|
/**
|
|
@@ -1869,7 +1869,7 @@ const all$1 = (input)=>{
|
|
|
1869
1869
|
*
|
|
1870
1870
|
* @category filtering
|
|
1871
1871
|
* @since 2.0.0
|
|
1872
|
-
*/ const filter$
|
|
1872
|
+
*/ const filter$4 = /*#__PURE__*/ dual(2, (self, predicate)=>filterMap$4(self, (b)=>predicate(b) ? some$5(b) : none$1));
|
|
1873
1873
|
/**
|
|
1874
1874
|
* @example
|
|
1875
1875
|
* import { none, some, getEquivalence } from 'effect/Option'
|
|
@@ -1884,7 +1884,7 @@ const all$1 = (input)=>{
|
|
|
1884
1884
|
*
|
|
1885
1885
|
* @category equivalence
|
|
1886
1886
|
* @since 2.0.0
|
|
1887
|
-
*/ const getEquivalence$5 = (isEquivalent)=>make$
|
|
1887
|
+
*/ const getEquivalence$5 = (isEquivalent)=>make$a((x, y)=>x === y || (isNone(x) ? isNone(y) : isNone(y) ? false : isEquivalent(x.value, y.value)));
|
|
1888
1888
|
/**
|
|
1889
1889
|
* The `Order` instance allows `Option` values to be compared with
|
|
1890
1890
|
* `compare`, whenever there is an `Order` instance for
|
|
@@ -1906,7 +1906,7 @@ const all$1 = (input)=>{
|
|
|
1906
1906
|
*
|
|
1907
1907
|
* @category sorting
|
|
1908
1908
|
* @since 2.0.0
|
|
1909
|
-
*/ const getOrder = (O)=>make$
|
|
1909
|
+
*/ const getOrder$1 = (O)=>make$9((self, that)=>isSome(self) ? isSome(that) ? O(self.value, that.value) : 1 : -1);
|
|
1910
1910
|
/**
|
|
1911
1911
|
* Lifts a binary function into `Option`.
|
|
1912
1912
|
*
|
|
@@ -1931,7 +1931,7 @@ const all$1 = (input)=>{
|
|
|
1931
1931
|
*
|
|
1932
1932
|
* @category lifting
|
|
1933
1933
|
* @since 2.0.0
|
|
1934
|
-
*/ const liftPredicate = (predicate)=>(b)=>predicate(b) ? some$
|
|
1934
|
+
*/ const liftPredicate$1 = (predicate)=>(b)=>predicate(b) ? some$4(b) : none();
|
|
1935
1935
|
/**
|
|
1936
1936
|
* Returns a function that checks if a `Option` contains a given value using a provided `isEquivalent` function.
|
|
1937
1937
|
*
|
|
@@ -1991,13 +1991,13 @@ const let_ = /*#__PURE__*/ dual(3, (self, name, f)=>map$5(self, (a)=>Object.assi
|
|
|
1991
1991
|
/**
|
|
1992
1992
|
* @category do notation
|
|
1993
1993
|
* @since 2.0.0
|
|
1994
|
-
*/ const bind = /*#__PURE__*/ dual(3, (self, name, f)=>flatMap$
|
|
1994
|
+
*/ const bind = /*#__PURE__*/ dual(3, (self, name, f)=>flatMap$4(self, (a)=>map$5(f(a), (b)=>Object.assign({}, a, {
|
|
1995
1995
|
[name]: b
|
|
1996
1996
|
}))));
|
|
1997
1997
|
/**
|
|
1998
1998
|
* @category do notation
|
|
1999
1999
|
* @since 2.0.0
|
|
2000
|
-
*/ const Do = /*#__PURE__*/ some$
|
|
2000
|
+
*/ const Do = /*#__PURE__*/ some$4({});
|
|
2001
2001
|
const adapter$1 = /*#__PURE__*/ adapter$2();
|
|
2002
2002
|
/**
|
|
2003
2003
|
* @category generators
|
|
@@ -2006,7 +2006,7 @@ const adapter$1 = /*#__PURE__*/ adapter$2();
|
|
|
2006
2006
|
const iterator = f(adapter$1);
|
|
2007
2007
|
let state = iterator.next();
|
|
2008
2008
|
if (state.done) {
|
|
2009
|
-
return some$
|
|
2009
|
+
return some$4(state.value);
|
|
2010
2010
|
} else {
|
|
2011
2011
|
let current = state.value.value;
|
|
2012
2012
|
if (isNone(current)) {
|
|
@@ -2021,7 +2021,7 @@ const adapter$1 = /*#__PURE__*/ adapter$2();
|
|
|
2021
2021
|
}
|
|
2022
2022
|
}
|
|
2023
2023
|
}
|
|
2024
|
-
return some$
|
|
2024
|
+
return some$4(state.value);
|
|
2025
2025
|
}
|
|
2026
2026
|
};
|
|
2027
2027
|
var Option = /*#__PURE__*/ Object.freeze({
|
|
@@ -2038,14 +2038,14 @@ var Option = /*#__PURE__*/ Object.freeze({
|
|
|
2038
2038
|
contains: contains$2,
|
|
2039
2039
|
containsWith: containsWith$2,
|
|
2040
2040
|
exists: exists,
|
|
2041
|
-
filter: filter$
|
|
2041
|
+
filter: filter$4,
|
|
2042
2042
|
filterMap: filterMap$4,
|
|
2043
2043
|
firstSomeOf: firstSomeOf,
|
|
2044
|
-
flatMap: flatMap$
|
|
2045
|
-
flatMapNullable: flatMapNullable,
|
|
2046
|
-
flatten: flatten$
|
|
2044
|
+
flatMap: flatMap$4,
|
|
2045
|
+
flatMapNullable: flatMapNullable$1,
|
|
2046
|
+
flatten: flatten$2,
|
|
2047
2047
|
fromIterable: fromIterable$5,
|
|
2048
|
-
fromNullable: fromNullable$
|
|
2048
|
+
fromNullable: fromNullable$2,
|
|
2049
2049
|
gen: gen$1,
|
|
2050
2050
|
getEquivalence: getEquivalence$5,
|
|
2051
2051
|
getLeft: getLeft$1,
|
|
@@ -2054,18 +2054,18 @@ var Option = /*#__PURE__*/ Object.freeze({
|
|
|
2054
2054
|
getOrThrow: getOrThrow$1,
|
|
2055
2055
|
getOrThrowWith: getOrThrowWith$1,
|
|
2056
2056
|
getOrUndefined: getOrUndefined$1,
|
|
2057
|
-
getOrder: getOrder,
|
|
2057
|
+
getOrder: getOrder$1,
|
|
2058
2058
|
getRight: getRight$1,
|
|
2059
2059
|
isNone: isNone,
|
|
2060
2060
|
isOption: isOption,
|
|
2061
2061
|
isSome: isSome,
|
|
2062
2062
|
let: let_,
|
|
2063
2063
|
lift2: lift2,
|
|
2064
|
-
liftNullable: liftNullable,
|
|
2065
|
-
liftPredicate: liftPredicate,
|
|
2064
|
+
liftNullable: liftNullable$1,
|
|
2065
|
+
liftPredicate: liftPredicate$1,
|
|
2066
2066
|
liftThrowable: liftThrowable,
|
|
2067
2067
|
map: map$5,
|
|
2068
|
-
match: match$
|
|
2068
|
+
match: match$2,
|
|
2069
2069
|
none: none,
|
|
2070
2070
|
orElse: orElse$1,
|
|
2071
2071
|
orElseEither: orElseEither,
|
|
@@ -2073,7 +2073,7 @@ var Option = /*#__PURE__*/ Object.freeze({
|
|
|
2073
2073
|
product: product,
|
|
2074
2074
|
productMany: productMany,
|
|
2075
2075
|
reduceCompact: reduceCompact,
|
|
2076
|
-
some: some$
|
|
2076
|
+
some: some$4,
|
|
2077
2077
|
tap: tap,
|
|
2078
2078
|
toArray: toArray$2,
|
|
2079
2079
|
toRefinement: toRefinement,
|
|
@@ -2123,7 +2123,7 @@ const emptyArray = [];
|
|
|
2123
2123
|
*
|
|
2124
2124
|
* @category equivalence
|
|
2125
2125
|
* @since 2.0.0
|
|
2126
|
-
*/ const getEquivalence$1 = (isEquivalent)=>make$
|
|
2126
|
+
*/ const getEquivalence$1 = (isEquivalent)=>make$a((self, that)=>self.length === that.length && toReadonlyArray(self).every((value, i)=>isEquivalent(value, unsafeGet(that, i))));
|
|
2127
2127
|
const _equivalence$1 = /*#__PURE__*/ getEquivalence$1(equals);
|
|
2128
2128
|
const ChunkProto = {
|
|
2129
2129
|
[TypeId$4]: {
|
|
@@ -2145,7 +2145,7 @@ const ChunkProto = {
|
|
|
2145
2145
|
return isChunk(that) && _equivalence$1(this, that);
|
|
2146
2146
|
},
|
|
2147
2147
|
[symbol$1] () {
|
|
2148
|
-
return array$
|
|
2148
|
+
return array$3(toReadonlyArray(this));
|
|
2149
2149
|
},
|
|
2150
2150
|
[Symbol.iterator] () {
|
|
2151
2151
|
switch(this.backing._tag){
|
|
@@ -2569,7 +2569,7 @@ const copyToArray = (self, array, initial)=>{
|
|
|
2569
2569
|
return self;
|
|
2570
2570
|
},
|
|
2571
2571
|
context (self) {
|
|
2572
|
-
return make$
|
|
2572
|
+
return make$6(this, self);
|
|
2573
2573
|
}
|
|
2574
2574
|
};
|
|
2575
2575
|
const tagRegistry = /*#__PURE__*/ globalValue("effect/Context/Tag/tagRegistry", ()=>new Map());
|
|
@@ -2612,7 +2612,7 @@ const tagRegistry = /*#__PURE__*/ globalValue("effect/Context/Tag/tagRegistry",
|
|
|
2612
2612
|
return false;
|
|
2613
2613
|
},
|
|
2614
2614
|
[symbol$1] () {
|
|
2615
|
-
return number(this.unsafeMap.size);
|
|
2615
|
+
return number$1(this.unsafeMap.size);
|
|
2616
2616
|
},
|
|
2617
2617
|
pipe () {
|
|
2618
2618
|
return pipeArguments(this, arguments);
|
|
@@ -2638,7 +2638,7 @@ const tagRegistry = /*#__PURE__*/ globalValue("effect/Context/Tag/tagRegistry",
|
|
|
2638
2638
|
/** @internal */ const isContext = (u)=>hasProperty(u, TypeId$3);
|
|
2639
2639
|
const _empty$3 = /*#__PURE__*/ makeContext(/*#__PURE__*/ new Map());
|
|
2640
2640
|
/** @internal */ const empty$7 = ()=>_empty$3;
|
|
2641
|
-
/** @internal */ const make$
|
|
2641
|
+
/** @internal */ const make$6 = (tag, service)=>makeContext(new Map([
|
|
2642
2642
|
[
|
|
2643
2643
|
tag,
|
|
2644
2644
|
service
|
|
@@ -3017,7 +3017,7 @@ const HashMapProto = {
|
|
|
3017
3017
|
[symbol$1] () {
|
|
3018
3018
|
let hash$1 = hash(HashMapSymbolKey);
|
|
3019
3019
|
for (const item of this){
|
|
3020
|
-
hash$1 ^= pipe(hash(item[0]), combine$
|
|
3020
|
+
hash$1 ^= pipe(hash(item[0]), combine$2(hash(item[1])));
|
|
3021
3021
|
}
|
|
3022
3022
|
return hash$1;
|
|
3023
3023
|
},
|
|
@@ -3098,7 +3098,7 @@ const visitLazy = (node, f, cont = undefined)=>{
|
|
|
3098
3098
|
case "LeafNode":
|
|
3099
3099
|
{
|
|
3100
3100
|
if (isSome(node.value)) {
|
|
3101
|
-
return some$
|
|
3101
|
+
return some$4({
|
|
3102
3102
|
value: f(node.key, node.value.value),
|
|
3103
3103
|
cont
|
|
3104
3104
|
});
|
|
@@ -3184,7 +3184,7 @@ const _empty$2 = /*#__PURE__*/ makeImpl$1(false, 0, /*#__PURE__*/ new EmptyNode(
|
|
|
3184
3184
|
}
|
|
3185
3185
|
}
|
|
3186
3186
|
});
|
|
3187
|
-
/** @internal */ const set$
|
|
3187
|
+
/** @internal */ const set$3 = /*#__PURE__*/ dual(3, (self, key, value)=>modifyAt(self, key, ()=>some$4(value)));
|
|
3188
3188
|
/** @internal */ const setTree = /*#__PURE__*/ dual(3, (self, newRoot, newSize)=>{
|
|
3189
3189
|
if (self._editable) {
|
|
3190
3190
|
self._root = newRoot;
|
|
@@ -3241,7 +3241,7 @@ const HashSetProto = {
|
|
|
3241
3241
|
return keys$1(this._keyMap);
|
|
3242
3242
|
},
|
|
3243
3243
|
[symbol$1] () {
|
|
3244
|
-
return combine$
|
|
3244
|
+
return combine$2(hash(this._keyMap))(hash(HashSetSymbolKey));
|
|
3245
3245
|
},
|
|
3246
3246
|
[symbol] (that) {
|
|
3247
3247
|
if (isHashSet(that)) {
|
|
@@ -3284,7 +3284,7 @@ const _empty$1 = /*#__PURE__*/ makeImpl(/*#__PURE__*/ empty$5());
|
|
|
3284
3284
|
f(transient);
|
|
3285
3285
|
return endMutation(transient);
|
|
3286
3286
|
});
|
|
3287
|
-
/** @internal */ const add$1 = /*#__PURE__*/ dual(2, (self, value)=>self._keyMap._editable ? (set$
|
|
3287
|
+
/** @internal */ const add$1 = /*#__PURE__*/ dual(2, (self, value)=>self._keyMap._editable ? (set$3(value, true)(self._keyMap), self) : makeImpl(set$3(value, true)(self._keyMap)));
|
|
3288
3288
|
/** @internal */ const union$1 = /*#__PURE__*/ dual(2, (self, that)=>mutate(empty$4(), (set)=>{
|
|
3289
3289
|
forEach$2(self, (value)=>add$1(set, value));
|
|
3290
3290
|
for (const value of that){
|
|
@@ -3344,7 +3344,7 @@ const MutableRefProto = {
|
|
|
3344
3344
|
/**
|
|
3345
3345
|
* @since 2.0.0
|
|
3346
3346
|
* @category constructors
|
|
3347
|
-
*/ const make$
|
|
3347
|
+
*/ const make$5 = (value)=>{
|
|
3348
3348
|
const ref = Object.create(MutableRefProto);
|
|
3349
3349
|
ref.current = value;
|
|
3350
3350
|
return ref;
|
|
@@ -3362,27 +3362,27 @@ const MutableRefProto = {
|
|
|
3362
3362
|
/**
|
|
3363
3363
|
* @since 2.0.0
|
|
3364
3364
|
* @category numeric
|
|
3365
|
-
*/ const decrement = (self)=>update(self, (n)=>n - 1);
|
|
3365
|
+
*/ const decrement = (self)=>update$2(self, (n)=>n - 1);
|
|
3366
3366
|
/**
|
|
3367
3367
|
* @since 2.0.0
|
|
3368
3368
|
* @category numeric
|
|
3369
|
-
*/ const decrementAndGet = (self)=>updateAndGet(self, (n)=>n - 1);
|
|
3369
|
+
*/ const decrementAndGet = (self)=>updateAndGet$2(self, (n)=>n - 1);
|
|
3370
3370
|
/**
|
|
3371
3371
|
* @since 2.0.0
|
|
3372
3372
|
* @category general
|
|
3373
|
-
*/ const get = (self)=>self.current;
|
|
3373
|
+
*/ const get$2 = (self)=>self.current;
|
|
3374
3374
|
/**
|
|
3375
3375
|
* @since 2.0.0
|
|
3376
3376
|
* @category numeric
|
|
3377
|
-
*/ const getAndDecrement = (self)=>getAndUpdate(self, (n)=>n - 1);
|
|
3377
|
+
*/ const getAndDecrement = (self)=>getAndUpdate$2(self, (n)=>n - 1);
|
|
3378
3378
|
/**
|
|
3379
3379
|
* @since 2.0.0
|
|
3380
3380
|
* @category numeric
|
|
3381
|
-
*/ const getAndIncrement = (self)=>getAndUpdate(self, (n)=>n + 1);
|
|
3381
|
+
*/ const getAndIncrement = (self)=>getAndUpdate$2(self, (n)=>n + 1);
|
|
3382
3382
|
/**
|
|
3383
3383
|
* @since 2.0.0
|
|
3384
3384
|
* @category general
|
|
3385
|
-
*/ const getAndSet = /*#__PURE__*/ dual(2, (self, value)=>{
|
|
3385
|
+
*/ const getAndSet$2 = /*#__PURE__*/ dual(2, (self, value)=>{
|
|
3386
3386
|
const ret = self.current;
|
|
3387
3387
|
self.current = value;
|
|
3388
3388
|
return ret;
|
|
@@ -3390,63 +3390,63 @@ const MutableRefProto = {
|
|
|
3390
3390
|
/**
|
|
3391
3391
|
* @since 2.0.0
|
|
3392
3392
|
* @category general
|
|
3393
|
-
*/ const getAndUpdate = /*#__PURE__*/ dual(2, (self, f)=>getAndSet(self, f(get(self))));
|
|
3393
|
+
*/ const getAndUpdate$2 = /*#__PURE__*/ dual(2, (self, f)=>getAndSet$2(self, f(get$2(self))));
|
|
3394
3394
|
/**
|
|
3395
3395
|
* @since 2.0.0
|
|
3396
3396
|
* @category numeric
|
|
3397
|
-
*/ const increment = (self)=>update(self, (n)=>n + 1);
|
|
3397
|
+
*/ const increment = (self)=>update$2(self, (n)=>n + 1);
|
|
3398
3398
|
/**
|
|
3399
3399
|
* @since 2.0.0
|
|
3400
3400
|
* @category numeric
|
|
3401
|
-
*/ const incrementAndGet = (self)=>updateAndGet(self, (n)=>n + 1);
|
|
3401
|
+
*/ const incrementAndGet = (self)=>updateAndGet$2(self, (n)=>n + 1);
|
|
3402
3402
|
/**
|
|
3403
3403
|
* @since 2.0.0
|
|
3404
3404
|
* @category general
|
|
3405
|
-
*/ const set = /*#__PURE__*/ dual(2, (self, value)=>{
|
|
3405
|
+
*/ const set$2 = /*#__PURE__*/ dual(2, (self, value)=>{
|
|
3406
3406
|
self.current = value;
|
|
3407
3407
|
return self;
|
|
3408
3408
|
});
|
|
3409
3409
|
/**
|
|
3410
3410
|
* @since 2.0.0
|
|
3411
3411
|
* @category general
|
|
3412
|
-
*/ const setAndGet = /*#__PURE__*/ dual(2, (self, value)=>{
|
|
3412
|
+
*/ const setAndGet$2 = /*#__PURE__*/ dual(2, (self, value)=>{
|
|
3413
3413
|
self.current = value;
|
|
3414
3414
|
return self.current;
|
|
3415
3415
|
});
|
|
3416
3416
|
/**
|
|
3417
3417
|
* @since 2.0.0
|
|
3418
3418
|
* @category general
|
|
3419
|
-
*/ const update = /*#__PURE__*/ dual(2, (self, f)=>set(self, f(get(self))));
|
|
3419
|
+
*/ const update$2 = /*#__PURE__*/ dual(2, (self, f)=>set$2(self, f(get$2(self))));
|
|
3420
3420
|
/**
|
|
3421
3421
|
* @since 2.0.0
|
|
3422
3422
|
* @category general
|
|
3423
|
-
*/ const updateAndGet = /*#__PURE__*/ dual(2, (self, f)=>setAndGet(self, f(get(self))));
|
|
3423
|
+
*/ const updateAndGet$2 = /*#__PURE__*/ dual(2, (self, f)=>setAndGet$2(self, f(get$2(self))));
|
|
3424
3424
|
/**
|
|
3425
3425
|
* @since 2.0.0
|
|
3426
3426
|
* @category boolean
|
|
3427
|
-
*/ const toggle = (self)=>update(self, (_)=>!_);
|
|
3427
|
+
*/ const toggle = (self)=>update$2(self, (_)=>!_);
|
|
3428
3428
|
var MutableRef = /*#__PURE__*/ Object.freeze({
|
|
3429
3429
|
__proto__: null,
|
|
3430
3430
|
compareAndSet: compareAndSet,
|
|
3431
3431
|
decrement: decrement,
|
|
3432
3432
|
decrementAndGet: decrementAndGet,
|
|
3433
|
-
get: get,
|
|
3433
|
+
get: get$2,
|
|
3434
3434
|
getAndDecrement: getAndDecrement,
|
|
3435
3435
|
getAndIncrement: getAndIncrement,
|
|
3436
|
-
getAndSet: getAndSet,
|
|
3437
|
-
getAndUpdate: getAndUpdate,
|
|
3436
|
+
getAndSet: getAndSet$2,
|
|
3437
|
+
getAndUpdate: getAndUpdate$2,
|
|
3438
3438
|
increment: increment,
|
|
3439
3439
|
incrementAndGet: incrementAndGet,
|
|
3440
|
-
make: make$
|
|
3441
|
-
set: set,
|
|
3442
|
-
setAndGet: setAndGet,
|
|
3440
|
+
make: make$5,
|
|
3441
|
+
set: set$2,
|
|
3442
|
+
setAndGet: setAndGet$2,
|
|
3443
3443
|
toggle: toggle,
|
|
3444
|
-
update: update,
|
|
3445
|
-
updateAndGet: updateAndGet
|
|
3444
|
+
update: update$2,
|
|
3445
|
+
updateAndGet: updateAndGet$2
|
|
3446
3446
|
});
|
|
3447
3447
|
/** @internal */ const ArrayProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Array.prototype), {
|
|
3448
3448
|
[symbol$1] () {
|
|
3449
|
-
return array$
|
|
3449
|
+
return array$3(this);
|
|
3450
3450
|
},
|
|
3451
3451
|
[symbol] (that) {
|
|
3452
3452
|
if (Array.isArray(that) && this.length === that.length) {
|
|
@@ -3648,7 +3648,7 @@ function variance$1(a) {
|
|
|
3648
3648
|
_V: identity$1
|
|
3649
3649
|
}
|
|
3650
3650
|
};
|
|
3651
|
-
/** @internal */ const make$
|
|
3651
|
+
/** @internal */ const make$3 = (params)=>{
|
|
3652
3652
|
const differ = Object.create(DifferProto);
|
|
3653
3653
|
differ.empty = params.empty;
|
|
3654
3654
|
differ.diff = params.diff;
|
|
@@ -3656,7 +3656,7 @@ function variance$1(a) {
|
|
|
3656
3656
|
differ.patch = params.patch;
|
|
3657
3657
|
return differ;
|
|
3658
3658
|
};
|
|
3659
|
-
/** @internal */ const environment = ()=>make$
|
|
3659
|
+
/** @internal */ const environment = ()=>make$3({
|
|
3660
3660
|
empty: empty$1(),
|
|
3661
3661
|
combine: (first, second)=>combine(second)(first),
|
|
3662
3662
|
diff: (oldValue, newValue)=>diff(oldValue, newValue),
|
|
@@ -3679,7 +3679,7 @@ function variance$1(a) {
|
|
|
3679
3679
|
/** @internal */ const proto = {
|
|
3680
3680
|
[CauseTypeId]: variance,
|
|
3681
3681
|
[symbol$1] () {
|
|
3682
|
-
return pipe(hash(CauseSymbolKey), combine$
|
|
3682
|
+
return pipe(hash(CauseSymbolKey), combine$2(hash(flattenCause(this))));
|
|
3683
3683
|
},
|
|
3684
3684
|
[symbol] (that) {
|
|
3685
3685
|
return isCause(that) && causeEquals(this, that);
|
|
@@ -3763,7 +3763,7 @@ function variance$1(a) {
|
|
|
3763
3763
|
empty$8()
|
|
3764
3764
|
], ([parallel, sequential], cause)=>{
|
|
3765
3765
|
const [par, seq] = evaluateCause(cause);
|
|
3766
|
-
return some$
|
|
3766
|
+
return some$4([
|
|
3767
3767
|
pipe(parallel, union(par)),
|
|
3768
3768
|
pipe(sequential, appendAll$1(seq))
|
|
3769
3769
|
]);
|
|
@@ -3773,7 +3773,7 @@ function variance$1(a) {
|
|
|
3773
3773
|
empty$8()
|
|
3774
3774
|
], ([parallel, sequential], cause)=>{
|
|
3775
3775
|
const [par, seq] = evaluateCause(cause);
|
|
3776
|
-
return some$
|
|
3776
|
+
return some$4([
|
|
3777
3777
|
pipe(parallel, union(par)),
|
|
3778
3778
|
pipe(sequential, appendAll$1(seq))
|
|
3779
3779
|
]);
|
|
@@ -4329,7 +4329,7 @@ const originalSymbol = /*#__PURE__*/ Symbol.for("effect/OriginalAnnotation");
|
|
|
4329
4329
|
// -----------------------------------------------------------------------------
|
|
4330
4330
|
/** @internal */ const currentSpanFromFiber = (fiber)=>{
|
|
4331
4331
|
const span = fiber.getFiberRef(currentContext).unsafeMap.get(spanTag);
|
|
4332
|
-
return span !== undefined && span._tag === "Span" ? some$
|
|
4332
|
+
return span !== undefined && span._tag === "Span" ? some$4(span) : none();
|
|
4333
4333
|
};
|
|
4334
4334
|
/**
|
|
4335
4335
|
* @example
|