@baleada/logic 0.24.18 → 0.24.20
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/lib/index.cjs +854 -640
- package/lib/index.d.ts +239 -123
- package/lib/index.js +847 -631
- package/package.json +15 -13
package/lib/index.cjs
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var BezierEasing = require('bezier-easing');
|
|
4
4
|
var lazyCollections = require('lazy-collections');
|
|
5
|
-
var fastFuzzy = require('fast-fuzzy');
|
|
6
|
-
var createDOMPurify = require('dompurify');
|
|
7
|
-
var slugify = require('@sindresorhus/slugify');
|
|
8
5
|
var arrayShuffle = require('array-shuffle');
|
|
9
6
|
var klona = require('klona');
|
|
10
7
|
var dequal = require('dequal');
|
|
@@ -13,6 +10,9 @@ var perfectFreehand = require('perfect-freehand');
|
|
|
13
10
|
var polygonClipping = require('polygon-clipping');
|
|
14
11
|
var ky = require('ky');
|
|
15
12
|
var clsx = require('clsx');
|
|
13
|
+
var fastFuzzy = require('fast-fuzzy');
|
|
14
|
+
var createDOMPurify = require('dompurify');
|
|
15
|
+
var slugify = require('@sindresorhus/slugify');
|
|
16
16
|
|
|
17
17
|
function createClip(content) {
|
|
18
18
|
return (string) => {
|
|
@@ -47,10 +47,8 @@ function createResults(candidates, options = {}) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
function fromShorthandAliasToLonghandAlias(shorthand) {
|
|
50
|
-
if (capitalLetterRE.test(shorthand))
|
|
51
|
-
|
|
52
|
-
if (shorthand in keycombosBySpecialCharacter)
|
|
53
|
-
return keycombosBySpecialCharacter[shorthand];
|
|
50
|
+
if (capitalLetterRE.test(shorthand)) return `shift+${shorthand.toLowerCase()}`;
|
|
51
|
+
if (shorthand in keycombosBySpecialCharacter) return keycombosBySpecialCharacter[shorthand];
|
|
54
52
|
return shorthand;
|
|
55
53
|
}
|
|
56
54
|
const capitalLetterRE = /^[A-Z]$/;
|
|
@@ -102,16 +100,11 @@ function createAliases(options = {}) {
|
|
|
102
100
|
}
|
|
103
101
|
|
|
104
102
|
function fromAliasToCode(alias) {
|
|
105
|
-
if (alias in partialCodesByAlias)
|
|
106
|
-
|
|
107
|
-
if (alias
|
|
108
|
-
|
|
109
|
-
if (
|
|
110
|
-
return `Key${alias.toUpperCase()}`;
|
|
111
|
-
if (digitRE.test(alias))
|
|
112
|
-
return `Digit${alias}`;
|
|
113
|
-
if (functionRE.test(alias))
|
|
114
|
-
return alias.toUpperCase();
|
|
103
|
+
if (alias in partialCodesByAlias) return partialCodesByAlias[alias];
|
|
104
|
+
if (alias in keyStatusKeysByAlias) return keyStatusKeysByAlias[alias];
|
|
105
|
+
if (letterRE.test(alias)) return `Key${alias.toUpperCase()}`;
|
|
106
|
+
if (digitRE.test(alias)) return `Digit${alias}`;
|
|
107
|
+
if (functionRE.test(alias)) return alias.toUpperCase();
|
|
115
108
|
return "unsupported";
|
|
116
109
|
}
|
|
117
110
|
const digitRE = /^[0-9]$/;
|
|
@@ -237,8 +230,7 @@ function createReverse() {
|
|
|
237
230
|
};
|
|
238
231
|
}
|
|
239
232
|
function createSlice(from, to) {
|
|
240
|
-
if (from < 0 || to && to < 0)
|
|
241
|
-
return (array) => array.slice(from, to);
|
|
233
|
+
if (from < 0 || to && to < 0) return (array) => array.slice(from, to);
|
|
242
234
|
const toSliced = to ? lazyCollections.slice(from, to - 1) : lazyCollections.slice(from);
|
|
243
235
|
return (array) => {
|
|
244
236
|
return from === to ? [] : lazyCollections.pipe(
|
|
@@ -353,8 +345,7 @@ function createFindAsync(predicate) {
|
|
|
353
345
|
return async (array) => {
|
|
354
346
|
for (let i = 0; i < array.length; i++) {
|
|
355
347
|
const item = array[i], is = await predicate(item, i);
|
|
356
|
-
if (is)
|
|
357
|
-
return item;
|
|
348
|
+
if (is) return item;
|
|
358
349
|
}
|
|
359
350
|
};
|
|
360
351
|
}
|
|
@@ -362,8 +353,7 @@ function createFindIndexAsync(predicate) {
|
|
|
362
353
|
return async (array) => {
|
|
363
354
|
for (let i = 0; i < array.length; i++) {
|
|
364
355
|
const item = array[i], is = await predicate(item, i);
|
|
365
|
-
if (is)
|
|
366
|
-
return i;
|
|
356
|
+
if (is) return i;
|
|
367
357
|
}
|
|
368
358
|
};
|
|
369
359
|
}
|
|
@@ -428,11 +418,18 @@ function createBreadthPathConfig(directedAcyclic) {
|
|
|
428
418
|
return { predicatePathable, toTraversalCandidates };
|
|
429
419
|
}
|
|
430
420
|
|
|
421
|
+
var __defProp$i = Object.defineProperty;
|
|
422
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
423
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
431
424
|
class Recognizeable {
|
|
432
|
-
maxSequenceLength;
|
|
433
|
-
effects;
|
|
434
|
-
effectApi;
|
|
435
425
|
constructor(sequence, options = {}) {
|
|
426
|
+
__publicField$i(this, "maxSequenceLength");
|
|
427
|
+
__publicField$i(this, "effects");
|
|
428
|
+
__publicField$i(this, "effectApi");
|
|
429
|
+
__publicField$i(this, "computedMetadata");
|
|
430
|
+
__publicField$i(this, "computedStatus");
|
|
431
|
+
__publicField$i(this, "computedStops");
|
|
432
|
+
__publicField$i(this, "computedSequence");
|
|
436
433
|
const defaultOptions = {
|
|
437
434
|
maxSequenceLength: true,
|
|
438
435
|
effects: {}
|
|
@@ -458,7 +455,6 @@ class Recognizeable {
|
|
|
458
455
|
};
|
|
459
456
|
this.ready();
|
|
460
457
|
}
|
|
461
|
-
computedMetadata;
|
|
462
458
|
resetComputedMetadata() {
|
|
463
459
|
this.computedMetadata = {};
|
|
464
460
|
}
|
|
@@ -468,7 +464,6 @@ class Recognizeable {
|
|
|
468
464
|
denied() {
|
|
469
465
|
this.computedStatus = "denied";
|
|
470
466
|
}
|
|
471
|
-
computedStatus;
|
|
472
467
|
ready() {
|
|
473
468
|
this.computedStatus = "ready";
|
|
474
469
|
}
|
|
@@ -478,7 +473,6 @@ class Recognizeable {
|
|
|
478
473
|
set sequence(sequence) {
|
|
479
474
|
this.setSequence(sequence);
|
|
480
475
|
}
|
|
481
|
-
computedStops;
|
|
482
476
|
get stops() {
|
|
483
477
|
return this.computedStops;
|
|
484
478
|
}
|
|
@@ -488,7 +482,6 @@ class Recognizeable {
|
|
|
488
482
|
get metadata() {
|
|
489
483
|
return this.computedMetadata;
|
|
490
484
|
}
|
|
491
|
-
computedSequence;
|
|
492
485
|
setSequence(sequence) {
|
|
493
486
|
this.computedSequence = sequence;
|
|
494
487
|
return this;
|
|
@@ -497,11 +490,9 @@ class Recognizeable {
|
|
|
497
490
|
this.recognizing();
|
|
498
491
|
const type = this.toType(sequenceItem), pushSequence = (sequenceItem2) => {
|
|
499
492
|
newSequence.push(sequenceItem2);
|
|
500
|
-
if (this.maxSequenceLength !== true && newSequence.length > this.maxSequenceLength)
|
|
501
|
-
newSequence.shift();
|
|
493
|
+
if (this.maxSequenceLength !== true && newSequence.length > this.maxSequenceLength) newSequence.shift();
|
|
502
494
|
}, newSequence = [];
|
|
503
|
-
for (const previousSequenceItem of this.sequence)
|
|
504
|
-
pushSequence(previousSequenceItem);
|
|
495
|
+
for (const previousSequenceItem of this.sequence) pushSequence(previousSequenceItem);
|
|
505
496
|
pushSequence(sequenceItem);
|
|
506
497
|
this.effectApi.getSequence = () => newSequence;
|
|
507
498
|
this.effectApi.pushSequence = pushSequence;
|
|
@@ -560,11 +551,17 @@ function isEffectConfig(effectOrConfig) {
|
|
|
560
551
|
return typeof effectOrConfig === "object";
|
|
561
552
|
}
|
|
562
553
|
|
|
554
|
+
var __defProp$h = Object.defineProperty;
|
|
555
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
556
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
563
557
|
class Listenable {
|
|
564
|
-
computedRecognizeable;
|
|
565
|
-
recognizeableEffectsKeys;
|
|
566
|
-
computedActive;
|
|
567
558
|
constructor(type, options) {
|
|
559
|
+
__publicField$h(this, "computedRecognizeable");
|
|
560
|
+
__publicField$h(this, "recognizeableEffectsKeys");
|
|
561
|
+
__publicField$h(this, "computedActive");
|
|
562
|
+
__publicField$h(this, "computedStatus");
|
|
563
|
+
__publicField$h(this, "computedType");
|
|
564
|
+
__publicField$h(this, "implementation");
|
|
568
565
|
if (type === "recognizeable") {
|
|
569
566
|
this.computedRecognizeable = new Recognizeable([], options?.recognizeable);
|
|
570
567
|
this.recognizeableEffectsKeys = Object.keys(options?.recognizeable?.effects);
|
|
@@ -573,7 +570,6 @@ class Listenable {
|
|
|
573
570
|
this.setType(type);
|
|
574
571
|
this.ready();
|
|
575
572
|
}
|
|
576
|
-
computedStatus;
|
|
577
573
|
ready() {
|
|
578
574
|
this.computedStatus = "ready";
|
|
579
575
|
}
|
|
@@ -592,8 +588,6 @@ class Listenable {
|
|
|
592
588
|
get recognizeable() {
|
|
593
589
|
return this.computedRecognizeable;
|
|
594
590
|
}
|
|
595
|
-
computedType;
|
|
596
|
-
implementation;
|
|
597
591
|
setType(type) {
|
|
598
592
|
this.stop();
|
|
599
593
|
this.computedType = type;
|
|
@@ -670,8 +664,7 @@ class Listenable {
|
|
|
670
664
|
sequenceItem,
|
|
671
665
|
{ listenInjection: { effect, optionsByType } }
|
|
672
666
|
);
|
|
673
|
-
if (this.recognizeable.status === "recognized")
|
|
674
|
-
effect(sequenceItem);
|
|
667
|
+
if (this.recognizeable.status === "recognized") effect(sequenceItem);
|
|
675
668
|
}, optionsByType = {};
|
|
676
669
|
for (const type of this.recognizeableEffectsKeys) {
|
|
677
670
|
optionsByType[type] = {
|
|
@@ -724,8 +717,7 @@ class Listenable {
|
|
|
724
717
|
stop(stoppable);
|
|
725
718
|
this.active.delete(stoppable);
|
|
726
719
|
}
|
|
727
|
-
if (shouldUpdateStatus)
|
|
728
|
-
this.stopped();
|
|
720
|
+
if (shouldUpdateStatus) this.stopped();
|
|
729
721
|
break;
|
|
730
722
|
}
|
|
731
723
|
return this;
|
|
@@ -864,7 +856,7 @@ const observerAssertionsByType = {
|
|
|
864
856
|
resize: (observer) => observer instanceof ResizeObserver
|
|
865
857
|
};
|
|
866
858
|
|
|
867
|
-
const defaultOptions$
|
|
859
|
+
const defaultOptions$i = {
|
|
868
860
|
minDuration: 0,
|
|
869
861
|
preventsDefaultUnlessDenied: true,
|
|
870
862
|
toCode: (alias) => fromAliasToCode(alias),
|
|
@@ -880,7 +872,7 @@ function createKeypress(keycomboOrKeycombos, options = {}) {
|
|
|
880
872
|
onDown,
|
|
881
873
|
onUp,
|
|
882
874
|
onVisibilitychange
|
|
883
|
-
} = { ...defaultOptions$
|
|
875
|
+
} = { ...defaultOptions$i, ...options }, {
|
|
884
876
|
matchPredicatesByKeycombo,
|
|
885
877
|
getDownCombos,
|
|
886
878
|
predicateValid,
|
|
@@ -897,8 +889,7 @@ function createKeypress(keycomboOrKeycombos, options = {}) {
|
|
|
897
889
|
toAliases,
|
|
898
890
|
getRequest: () => request
|
|
899
891
|
}), fromComboToAliasesLength = createAliasesLength({ toLonghand }), maybeAddWindowBlurListener = () => {
|
|
900
|
-
if (windowBlurStatus === "added")
|
|
901
|
-
return;
|
|
892
|
+
if (windowBlurStatus === "added") return;
|
|
902
893
|
window.addEventListener("blur", onWindowBlur);
|
|
903
894
|
windowBlurStatus = "added";
|
|
904
895
|
}, onWindowBlur = () => {
|
|
@@ -927,13 +918,11 @@ function createKeypress(keycomboOrKeycombos, options = {}) {
|
|
|
927
918
|
) {
|
|
928
919
|
denied();
|
|
929
920
|
localStatus = getStatus();
|
|
930
|
-
if (lazyCollections.includes(event.key)(unsupportedKeys))
|
|
931
|
-
clearStatuses();
|
|
921
|
+
if (lazyCollections.includes(event.key)(unsupportedKeys)) clearStatuses();
|
|
932
922
|
onDown?.(toHookApi(api));
|
|
933
923
|
return;
|
|
934
924
|
}
|
|
935
|
-
if (preventsDefaultUnlessDenied)
|
|
936
|
-
event.preventDefault();
|
|
925
|
+
if (preventsDefaultUnlessDenied) event.preventDefault();
|
|
937
926
|
const { getMetadata } = api, metadata = getMetadata();
|
|
938
927
|
metadata.keycombo = downCombos[0];
|
|
939
928
|
localStatus = "recognizing";
|
|
@@ -961,12 +950,9 @@ function createKeypress(keycomboOrKeycombos, options = {}) {
|
|
|
961
950
|
const { denied } = api, key = fromEventToKeyStatusCode(event);
|
|
962
951
|
if (localStatus === "denied") {
|
|
963
952
|
denied();
|
|
964
|
-
if (lazyCollections.includes(event.key)(unsupportedKeys))
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
deleteStatus(key);
|
|
968
|
-
if (!predicateSomeKeyDown(statuses))
|
|
969
|
-
localStatus = "recognizing";
|
|
953
|
+
if (lazyCollections.includes(event.key)(unsupportedKeys)) clearStatuses();
|
|
954
|
+
else deleteStatus(key);
|
|
955
|
+
if (!predicateSomeKeyDown(statuses)) localStatus = "recognizing";
|
|
970
956
|
onUp?.(toHookApi(api));
|
|
971
957
|
return;
|
|
972
958
|
}
|
|
@@ -975,8 +961,7 @@ function createKeypress(keycomboOrKeycombos, options = {}) {
|
|
|
975
961
|
if (downCombos.length && matches) {
|
|
976
962
|
const { getMetadata } = api, metadata = getMetadata();
|
|
977
963
|
metadata.keycombo = downCombos[0];
|
|
978
|
-
if (preventsDefaultUnlessDenied)
|
|
979
|
-
event.preventDefault();
|
|
964
|
+
if (preventsDefaultUnlessDenied) event.preventDefault();
|
|
980
965
|
localStatus = "recognizing";
|
|
981
966
|
onUp?.(toHookApi(api));
|
|
982
967
|
return;
|
|
@@ -986,8 +971,7 @@ function createKeypress(keycomboOrKeycombos, options = {}) {
|
|
|
986
971
|
onUp?.(toHookApi(api));
|
|
987
972
|
};
|
|
988
973
|
const visibilitychange = (event, api) => {
|
|
989
|
-
if (document.visibilityState === "hidden")
|
|
990
|
-
onWindowBlur();
|
|
974
|
+
if (document.visibilityState === "hidden") onWindowBlur();
|
|
991
975
|
onVisibilitychange?.(toHookApi(api));
|
|
992
976
|
};
|
|
993
977
|
return {
|
|
@@ -1017,7 +1001,7 @@ class Keypress extends Listenable {
|
|
|
1017
1001
|
}
|
|
1018
1002
|
}
|
|
1019
1003
|
|
|
1020
|
-
const defaultOptions$
|
|
1004
|
+
const defaultOptions$h = {
|
|
1021
1005
|
minDuration: 0,
|
|
1022
1006
|
preventsDefaultUnlessDenied: true,
|
|
1023
1007
|
toCode: (alias) => fromAliasToCode(alias),
|
|
@@ -1033,7 +1017,7 @@ function createKeyrelease(keycomboOrKeycombos, options = {}) {
|
|
|
1033
1017
|
onDown,
|
|
1034
1018
|
onUp,
|
|
1035
1019
|
onVisibilitychange
|
|
1036
|
-
} = { ...defaultOptions$
|
|
1020
|
+
} = { ...defaultOptions$h, ...options }, {
|
|
1037
1021
|
matchPredicatesByKeycombo,
|
|
1038
1022
|
getDownCombos,
|
|
1039
1023
|
predicateValid,
|
|
@@ -1050,8 +1034,7 @@ function createKeyrelease(keycomboOrKeycombos, options = {}) {
|
|
|
1050
1034
|
toAliases,
|
|
1051
1035
|
getRequest: () => request
|
|
1052
1036
|
}), fromComboToAliasesLength = createAliasesLength({ toLonghand }), maybeAddWindowBlurListener = () => {
|
|
1053
|
-
if (windowBlurStatus === "added")
|
|
1054
|
-
return;
|
|
1037
|
+
if (windowBlurStatus === "added") return;
|
|
1055
1038
|
window.addEventListener("blur", onWindowBlur);
|
|
1056
1039
|
windowBlurStatus = "added";
|
|
1057
1040
|
}, onWindowBlur = () => {
|
|
@@ -1080,13 +1063,11 @@ function createKeyrelease(keycomboOrKeycombos, options = {}) {
|
|
|
1080
1063
|
) {
|
|
1081
1064
|
denied();
|
|
1082
1065
|
localStatus = getStatus();
|
|
1083
|
-
if (lazyCollections.includes(event.key)(unsupportedKeys))
|
|
1084
|
-
clearStatuses();
|
|
1066
|
+
if (lazyCollections.includes(event.key)(unsupportedKeys)) clearStatuses();
|
|
1085
1067
|
onDown?.(toHookApi(api));
|
|
1086
1068
|
return;
|
|
1087
1069
|
}
|
|
1088
|
-
if (preventsDefaultUnlessDenied)
|
|
1089
|
-
event.preventDefault();
|
|
1070
|
+
if (preventsDefaultUnlessDenied) event.preventDefault();
|
|
1090
1071
|
const { getMetadata } = api;
|
|
1091
1072
|
localStatus = "recognizing";
|
|
1092
1073
|
stop();
|
|
@@ -1106,14 +1087,10 @@ function createKeyrelease(keycomboOrKeycombos, options = {}) {
|
|
|
1106
1087
|
denied
|
|
1107
1088
|
} = api, metadata = getMetadata(), key = fromEventToKeyStatusCode(event);
|
|
1108
1089
|
if (["denied", "recognized"].includes(localStatus)) {
|
|
1109
|
-
if (localStatus === "denied")
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
else
|
|
1114
|
-
deleteStatus(key);
|
|
1115
|
-
if (!predicateSomeKeyDown(statuses))
|
|
1116
|
-
localStatus = "recognizing";
|
|
1090
|
+
if (localStatus === "denied") denied();
|
|
1091
|
+
if (lazyCollections.includes(event.key)(unsupportedKeys)) clearStatuses();
|
|
1092
|
+
else deleteStatus(key);
|
|
1093
|
+
if (!predicateSomeKeyDown(statuses)) localStatus = "recognizing";
|
|
1117
1094
|
onUp?.(toHookApi(api));
|
|
1118
1095
|
return;
|
|
1119
1096
|
}
|
|
@@ -1129,8 +1106,7 @@ function createKeyrelease(keycomboOrKeycombos, options = {}) {
|
|
|
1129
1106
|
localStatus = status;
|
|
1130
1107
|
metadata.keycombo = downCombos[0];
|
|
1131
1108
|
}
|
|
1132
|
-
if (preventsDefaultUnlessDenied)
|
|
1133
|
-
event.preventDefault();
|
|
1109
|
+
if (preventsDefaultUnlessDenied) event.preventDefault();
|
|
1134
1110
|
onUp?.(toHookApi(api));
|
|
1135
1111
|
};
|
|
1136
1112
|
const recognize = (event, api) => {
|
|
@@ -1176,7 +1152,7 @@ class Keyrelease extends Listenable {
|
|
|
1176
1152
|
}
|
|
1177
1153
|
}
|
|
1178
1154
|
|
|
1179
|
-
const defaultOptions$
|
|
1155
|
+
const defaultOptions$g = {
|
|
1180
1156
|
minDuration: 0,
|
|
1181
1157
|
maxInterval: 5e3,
|
|
1182
1158
|
// VS Code default
|
|
@@ -1195,7 +1171,7 @@ function createKeychord(keycombos, options = {}) {
|
|
|
1195
1171
|
onDown,
|
|
1196
1172
|
onUp,
|
|
1197
1173
|
onVisibilitychange
|
|
1198
|
-
} = { ...defaultOptions$
|
|
1174
|
+
} = { ...defaultOptions$g, ...options }, narrowedKeycombos = keycombos.split(" "), keyStates = createMap((keycombo) => createKeyState({
|
|
1199
1175
|
keycomboOrKeycombos: keycombo,
|
|
1200
1176
|
toLonghand,
|
|
1201
1177
|
toCode,
|
|
@@ -1224,8 +1200,7 @@ function createKeychord(keycombos, options = {}) {
|
|
|
1224
1200
|
return;
|
|
1225
1201
|
}
|
|
1226
1202
|
const { getMetadata } = api, metadata = getMetadata(), downCombos = keyStates[playedIndex].getDownCombos();
|
|
1227
|
-
if (playedIndex === 0)
|
|
1228
|
-
metadata.played = [];
|
|
1203
|
+
if (playedIndex === 0) metadata.played = [];
|
|
1229
1204
|
if (
|
|
1230
1205
|
// NOT BUILDING VALID COMBO
|
|
1231
1206
|
!keyStates[playedIndex].predicateValid(event) || downCombos.length > 1 && fromComboToAliasesLength(downCombos[0]) === fromComboToAliasesLength(downCombos[1]) || playedIndex > 0 && event.timeStamp - metadata.played[playedIndex - 1].times.end > maxInterval
|
|
@@ -1233,14 +1208,12 @@ function createKeychord(keycombos, options = {}) {
|
|
|
1233
1208
|
denied();
|
|
1234
1209
|
localStatuses[playedIndex] = getStatus();
|
|
1235
1210
|
if (lazyCollections.includes(event.key)(unsupportedKeys)) {
|
|
1236
|
-
for (const { clearStatuses } of keyStates)
|
|
1237
|
-
clearStatuses();
|
|
1211
|
+
for (const { clearStatuses } of keyStates) clearStatuses();
|
|
1238
1212
|
}
|
|
1239
1213
|
onDown?.(toHookApi(api));
|
|
1240
1214
|
return;
|
|
1241
1215
|
}
|
|
1242
|
-
if (preventsDefaultUnlessDenied)
|
|
1243
|
-
event.preventDefault();
|
|
1216
|
+
if (preventsDefaultUnlessDenied) event.preventDefault();
|
|
1244
1217
|
localStatuses[playedIndex] = "recognizing";
|
|
1245
1218
|
keyStates[playedIndex].stop();
|
|
1246
1219
|
storeKeyboardTimeMetadata({
|
|
@@ -1262,21 +1235,16 @@ function createKeychord(keycombos, options = {}) {
|
|
|
1262
1235
|
denied
|
|
1263
1236
|
} = api, metadata = getMetadata(), key = fromEventToKeyStatusCode(event);
|
|
1264
1237
|
if (["denied", "recognized"].includes(localStatuses[playedIndex])) {
|
|
1265
|
-
if (localStatuses[playedIndex] === "denied")
|
|
1266
|
-
denied();
|
|
1238
|
+
if (localStatuses[playedIndex] === "denied") denied();
|
|
1267
1239
|
for (const { clearStatuses, deleteStatus } of keyStates) {
|
|
1268
|
-
if (lazyCollections.includes(event.key)(unsupportedKeys))
|
|
1269
|
-
|
|
1270
|
-
else
|
|
1271
|
-
deleteStatus(key);
|
|
1240
|
+
if (lazyCollections.includes(event.key)(unsupportedKeys)) clearStatuses();
|
|
1241
|
+
else deleteStatus(key);
|
|
1272
1242
|
}
|
|
1273
1243
|
if (!predicateSomeKeyDown(keyStates[playedIndex].statuses)) {
|
|
1274
1244
|
if (localStatuses[playedIndex] === "denied" || playedIndex === narrowedKeycombos.length - 1 && localStatuses[playedIndex] === "recognized") {
|
|
1275
1245
|
playedIndex = 0;
|
|
1276
|
-
for (let i = 0; i < localStatuses.length; i++)
|
|
1277
|
-
|
|
1278
|
-
for (const { clearStatuses } of keyStates)
|
|
1279
|
-
clearStatuses();
|
|
1246
|
+
for (let i = 0; i < localStatuses.length; i++) localStatuses[i] = "recognizing";
|
|
1247
|
+
for (const { clearStatuses } of keyStates) clearStatuses();
|
|
1280
1248
|
}
|
|
1281
1249
|
}
|
|
1282
1250
|
onUp?.(toHookApi(api));
|
|
@@ -1296,14 +1264,11 @@ function createKeychord(keycombos, options = {}) {
|
|
|
1296
1264
|
keycombo: downCombos[0]
|
|
1297
1265
|
};
|
|
1298
1266
|
}
|
|
1299
|
-
if (preventsDefaultUnlessDenied)
|
|
1300
|
-
event.preventDefault();
|
|
1267
|
+
if (preventsDefaultUnlessDenied) event.preventDefault();
|
|
1301
1268
|
if (playedIndex === narrowedKeycombos.length - 1 && !predicateSomeKeyDown(keyStates[playedIndex].statuses)) {
|
|
1302
1269
|
playedIndex = 0;
|
|
1303
|
-
for (let i = 0; i < localStatuses.length; i++)
|
|
1304
|
-
|
|
1305
|
-
for (const { clearStatuses } of keyStates)
|
|
1306
|
-
clearStatuses();
|
|
1270
|
+
for (let i = 0; i < localStatuses.length; i++) localStatuses[i] = "recognizing";
|
|
1271
|
+
for (const { clearStatuses } of keyStates) clearStatuses();
|
|
1307
1272
|
}
|
|
1308
1273
|
onUp?.(toHookApi(api));
|
|
1309
1274
|
};
|
|
@@ -1322,8 +1287,7 @@ function createKeychord(keycombos, options = {}) {
|
|
|
1322
1287
|
};
|
|
1323
1288
|
const visibilitychange = (event, api) => {
|
|
1324
1289
|
if (document.visibilityState === "hidden") {
|
|
1325
|
-
for (const { clearStatuses } of keyStates)
|
|
1326
|
-
clearStatuses();
|
|
1290
|
+
for (const { clearStatuses } of keyStates) clearStatuses();
|
|
1327
1291
|
localStatuses[playedIndex] = "recognizing";
|
|
1328
1292
|
keyStates[playedIndex].stop();
|
|
1329
1293
|
playedIndex = 0;
|
|
@@ -1371,11 +1335,11 @@ class Konami extends Listenable {
|
|
|
1371
1335
|
}
|
|
1372
1336
|
}
|
|
1373
1337
|
|
|
1374
|
-
const defaultOptions$
|
|
1338
|
+
const defaultOptions$f = {
|
|
1375
1339
|
minDuration: 0,
|
|
1376
1340
|
minDistance: 0
|
|
1377
1341
|
};
|
|
1378
|
-
function
|
|
1342
|
+
function createPointerpress(options = {}) {
|
|
1379
1343
|
const {
|
|
1380
1344
|
minDuration,
|
|
1381
1345
|
minDistance,
|
|
@@ -1383,31 +1347,31 @@ function createMousepress(options = {}) {
|
|
|
1383
1347
|
onOut,
|
|
1384
1348
|
onMove,
|
|
1385
1349
|
onUp
|
|
1386
|
-
} = { ...defaultOptions$
|
|
1350
|
+
} = { ...defaultOptions$f, ...options }, stop = (target) => {
|
|
1387
1351
|
window.cancelAnimationFrame(request);
|
|
1388
|
-
target.removeEventListener("
|
|
1352
|
+
target.removeEventListener("pointermove", pointermoveEffect);
|
|
1389
1353
|
};
|
|
1390
1354
|
let request;
|
|
1391
|
-
let
|
|
1392
|
-
let
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1395
|
-
|
|
1355
|
+
let pointermoveEffect;
|
|
1356
|
+
let pointerStatus;
|
|
1357
|
+
const pointerdown = (event, api) => {
|
|
1358
|
+
pointerStatus = "down";
|
|
1359
|
+
pointermoveEffect = (event2) => pointermove(event2, api);
|
|
1396
1360
|
storePointerStartMetadata({ event, api });
|
|
1397
1361
|
storePointerMoveMetadata({ event, api });
|
|
1398
1362
|
storePointerTimeMetadata({
|
|
1399
1363
|
event,
|
|
1400
1364
|
api,
|
|
1401
|
-
getShouldStore: () =>
|
|
1365
|
+
getShouldStore: () => pointerStatus === "down",
|
|
1402
1366
|
setRequest: (newRequest) => request = newRequest,
|
|
1403
1367
|
// @ts-expect-error
|
|
1404
1368
|
recognize
|
|
1405
1369
|
});
|
|
1406
|
-
const { listenInjection: { optionsByType: {
|
|
1407
|
-
target.addEventListener("
|
|
1370
|
+
const { listenInjection: { optionsByType: { pointerdown: { target } } } } = api;
|
|
1371
|
+
target.addEventListener("pointermove", pointermoveEffect);
|
|
1408
1372
|
onDown?.(toHookApi(api));
|
|
1409
1373
|
};
|
|
1410
|
-
const
|
|
1374
|
+
const pointermove = (event, api) => {
|
|
1411
1375
|
const { pushSequence } = api;
|
|
1412
1376
|
pushSequence(event);
|
|
1413
1377
|
storePointerMoveMetadata({ event, api });
|
|
@@ -1420,325 +1384,43 @@ function createMousepress(options = {}) {
|
|
|
1420
1384
|
recognized();
|
|
1421
1385
|
}
|
|
1422
1386
|
};
|
|
1423
|
-
const
|
|
1424
|
-
const { denied, listenInjection: { optionsByType: {
|
|
1387
|
+
const pointerout = (event, api) => {
|
|
1388
|
+
const { denied, listenInjection: { optionsByType: { pointerout: { target } } } } = api;
|
|
1425
1389
|
if (event.target !== target && target.contains?.(event.relatedTarget)) {
|
|
1426
1390
|
onOut?.(toHookApi(api));
|
|
1427
1391
|
return;
|
|
1428
1392
|
}
|
|
1429
|
-
if (
|
|
1393
|
+
if (pointerStatus === "down") {
|
|
1430
1394
|
denied();
|
|
1431
1395
|
stop(target);
|
|
1432
|
-
|
|
1396
|
+
pointerStatus = "out";
|
|
1433
1397
|
}
|
|
1434
1398
|
onOut?.(toHookApi(api));
|
|
1435
1399
|
};
|
|
1436
|
-
const
|
|
1437
|
-
const { denied, listenInjection: { optionsByType: {
|
|
1438
|
-
if (
|
|
1439
|
-
return;
|
|
1400
|
+
const pointerup = (event, api) => {
|
|
1401
|
+
const { denied, listenInjection: { optionsByType: { pointerup: { target } } } } = api;
|
|
1402
|
+
if (pointerStatus !== "down") return;
|
|
1440
1403
|
denied();
|
|
1441
1404
|
stop(target);
|
|
1442
|
-
|
|
1443
|
-
onUp?.(toHookApi(api));
|
|
1444
|
-
};
|
|
1445
|
-
return {
|
|
1446
|
-
mousedown: {
|
|
1447
|
-
effect: mousedown,
|
|
1448
|
-
stop
|
|
1449
|
-
},
|
|
1450
|
-
mouseout,
|
|
1451
|
-
mouseup
|
|
1452
|
-
};
|
|
1453
|
-
}
|
|
1454
|
-
class Mousepress extends Listenable {
|
|
1455
|
-
constructor(options) {
|
|
1456
|
-
super(
|
|
1457
|
-
"recognizeable",
|
|
1458
|
-
{
|
|
1459
|
-
recognizeable: {
|
|
1460
|
-
effects: createMousepress(options)
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
);
|
|
1464
|
-
}
|
|
1465
|
-
get metadata() {
|
|
1466
|
-
return this.recognizeable.metadata;
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
const defaultOptions$h = {
|
|
1471
|
-
minDuration: 0,
|
|
1472
|
-
minDistance: 0,
|
|
1473
|
-
minVelocity: 0
|
|
1474
|
-
};
|
|
1475
|
-
function createMouserelease(options = {}) {
|
|
1476
|
-
const {
|
|
1477
|
-
minDuration,
|
|
1478
|
-
minDistance,
|
|
1479
|
-
minVelocity,
|
|
1480
|
-
onDown,
|
|
1481
|
-
onOut,
|
|
1482
|
-
onMove,
|
|
1483
|
-
onUp
|
|
1484
|
-
} = { ...defaultOptions$h, ...options }, stop = (target) => {
|
|
1485
|
-
window.cancelAnimationFrame(request);
|
|
1486
|
-
target.removeEventListener("mousemove", mousemoveEffect);
|
|
1487
|
-
};
|
|
1488
|
-
let request;
|
|
1489
|
-
let mousemoveEffect;
|
|
1490
|
-
let mouseStatus;
|
|
1491
|
-
const mousedown = (event, api) => {
|
|
1492
|
-
mouseStatus = "down";
|
|
1493
|
-
mousemoveEffect = (event2) => mousemove(event2, api);
|
|
1494
|
-
storePointerStartMetadata({ event, api });
|
|
1495
|
-
storePointerMoveMetadata({ event, api });
|
|
1496
|
-
storePointerTimeMetadata({
|
|
1497
|
-
event,
|
|
1498
|
-
api,
|
|
1499
|
-
getShouldStore: () => mouseStatus === "down",
|
|
1500
|
-
setRequest: (newRequest) => request = newRequest
|
|
1501
|
-
});
|
|
1502
|
-
const { listenInjection: { optionsByType: { mousedown: { target } } } } = api;
|
|
1503
|
-
target.addEventListener("mousemove", mousemoveEffect);
|
|
1504
|
-
onDown?.(toHookApi(api));
|
|
1505
|
-
};
|
|
1506
|
-
const mousemove = (event, api) => {
|
|
1507
|
-
storePointerMoveMetadata({ event, api });
|
|
1508
|
-
onMove?.(toHookApi(api));
|
|
1509
|
-
};
|
|
1510
|
-
const mouseout = (event, api) => {
|
|
1511
|
-
const { denied, listenInjection: { optionsByType: { mouseout: { target } } } } = api;
|
|
1512
|
-
if (event.target !== target && target.contains?.(event.relatedTarget)) {
|
|
1513
|
-
onOut?.(toHookApi(api));
|
|
1514
|
-
return;
|
|
1515
|
-
}
|
|
1516
|
-
if (mouseStatus === "down") {
|
|
1517
|
-
denied();
|
|
1518
|
-
stop(target);
|
|
1519
|
-
mouseStatus = "leave";
|
|
1520
|
-
}
|
|
1521
|
-
onOut?.(toHookApi(api));
|
|
1522
|
-
};
|
|
1523
|
-
const mouseup = (event, api) => {
|
|
1524
|
-
if (mouseStatus !== "down")
|
|
1525
|
-
return;
|
|
1526
|
-
storePointerMoveMetadata({ event, api });
|
|
1527
|
-
const { listenInjection: { optionsByType: { mouseup: { target } } } } = api;
|
|
1528
|
-
stop(target);
|
|
1529
|
-
mouseStatus = "up";
|
|
1530
|
-
recognize(event, api);
|
|
1405
|
+
pointerStatus = "up";
|
|
1531
1406
|
onUp?.(toHookApi(api));
|
|
1532
1407
|
};
|
|
1533
|
-
const recognize = (event, api) => {
|
|
1534
|
-
const { getMetadata, recognized, denied } = api, metadata = getMetadata();
|
|
1535
|
-
if (metadata.duration >= minDuration && metadata.distance.straight.fromStart >= minDistance && metadata.velocity >= minVelocity) {
|
|
1536
|
-
recognized();
|
|
1537
|
-
return;
|
|
1538
|
-
}
|
|
1539
|
-
denied();
|
|
1540
|
-
};
|
|
1541
1408
|
return {
|
|
1542
|
-
|
|
1543
|
-
effect:
|
|
1409
|
+
pointerdown: {
|
|
1410
|
+
effect: pointerdown,
|
|
1544
1411
|
stop
|
|
1545
1412
|
},
|
|
1546
|
-
|
|
1547
|
-
|
|
1413
|
+
pointerout,
|
|
1414
|
+
pointerup
|
|
1548
1415
|
};
|
|
1549
1416
|
}
|
|
1550
|
-
class
|
|
1417
|
+
class Pointerpress extends Listenable {
|
|
1551
1418
|
constructor(options) {
|
|
1552
1419
|
super(
|
|
1553
1420
|
"recognizeable",
|
|
1554
1421
|
{
|
|
1555
1422
|
recognizeable: {
|
|
1556
|
-
effects:
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
);
|
|
1560
|
-
}
|
|
1561
|
-
get metadata() {
|
|
1562
|
-
return this.recognizeable.metadata;
|
|
1563
|
-
}
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
const defaultOptions$g = {
|
|
1567
|
-
minDuration: 0,
|
|
1568
|
-
minDistance: 0
|
|
1569
|
-
};
|
|
1570
|
-
function createTouchpress(options = {}) {
|
|
1571
|
-
const {
|
|
1572
|
-
minDuration,
|
|
1573
|
-
minDistance,
|
|
1574
|
-
onStart,
|
|
1575
|
-
onCancel,
|
|
1576
|
-
onMove,
|
|
1577
|
-
onEnd
|
|
1578
|
-
} = { ...defaultOptions$g, ...options }, stop = () => {
|
|
1579
|
-
window.cancelAnimationFrame(request);
|
|
1580
|
-
};
|
|
1581
|
-
let request;
|
|
1582
|
-
let totalTouches = 0;
|
|
1583
|
-
const touchstart = (event, api) => {
|
|
1584
|
-
const { denied } = api;
|
|
1585
|
-
totalTouches++;
|
|
1586
|
-
if (totalTouches > 1) {
|
|
1587
|
-
stop();
|
|
1588
|
-
denied();
|
|
1589
|
-
onStart?.(toHookApi(api));
|
|
1590
|
-
return;
|
|
1591
|
-
}
|
|
1592
|
-
storePointerStartMetadata({ event, api });
|
|
1593
|
-
storePointerMoveMetadata({ event, api });
|
|
1594
|
-
storePointerTimeMetadata({
|
|
1595
|
-
event,
|
|
1596
|
-
api,
|
|
1597
|
-
getShouldStore: () => totalTouches === 1,
|
|
1598
|
-
setRequest: (newRequest) => request = newRequest,
|
|
1599
|
-
// @ts-expect-error
|
|
1600
|
-
recognize
|
|
1601
|
-
});
|
|
1602
|
-
onStart?.(toHookApi(api));
|
|
1603
|
-
};
|
|
1604
|
-
const touchmove = (event, api) => {
|
|
1605
|
-
const { getStatus } = api;
|
|
1606
|
-
if (getStatus() !== "denied") {
|
|
1607
|
-
storePointerMoveMetadata({ event, api });
|
|
1608
|
-
recognize(event, api);
|
|
1609
|
-
}
|
|
1610
|
-
onMove?.(toHookApi(api));
|
|
1611
|
-
};
|
|
1612
|
-
const recognize = (event, api) => {
|
|
1613
|
-
const { getMetadata, recognized } = api, metadata = getMetadata();
|
|
1614
|
-
if (metadata.duration >= minDuration && metadata.distance.straight.fromStart >= minDistance) {
|
|
1615
|
-
recognized();
|
|
1616
|
-
}
|
|
1617
|
-
};
|
|
1618
|
-
const touchcancel = (event, api) => {
|
|
1619
|
-
const { denied } = api;
|
|
1620
|
-
stop();
|
|
1621
|
-
denied();
|
|
1622
|
-
totalTouches--;
|
|
1623
|
-
onCancel?.(toHookApi(api));
|
|
1624
|
-
};
|
|
1625
|
-
const touchend = (event, api) => {
|
|
1626
|
-
const { denied } = api;
|
|
1627
|
-
stop();
|
|
1628
|
-
denied();
|
|
1629
|
-
totalTouches--;
|
|
1630
|
-
onEnd?.(toHookApi(api));
|
|
1631
|
-
};
|
|
1632
|
-
return {
|
|
1633
|
-
touchstart,
|
|
1634
|
-
touchmove,
|
|
1635
|
-
touchcancel,
|
|
1636
|
-
touchend
|
|
1637
|
-
};
|
|
1638
|
-
}
|
|
1639
|
-
class Touchpress extends Listenable {
|
|
1640
|
-
constructor(options) {
|
|
1641
|
-
super(
|
|
1642
|
-
"recognizeable",
|
|
1643
|
-
{
|
|
1644
|
-
recognizeable: {
|
|
1645
|
-
effects: createTouchpress(options)
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
);
|
|
1649
|
-
}
|
|
1650
|
-
get metadata() {
|
|
1651
|
-
return this.recognizeable.metadata;
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
const defaultOptions$f = {
|
|
1656
|
-
minDuration: 0,
|
|
1657
|
-
minDistance: 0,
|
|
1658
|
-
minVelocity: 0
|
|
1659
|
-
};
|
|
1660
|
-
function createTouchrelease(options = {}) {
|
|
1661
|
-
const {
|
|
1662
|
-
minDuration,
|
|
1663
|
-
minDistance,
|
|
1664
|
-
minVelocity,
|
|
1665
|
-
onStart,
|
|
1666
|
-
onCancel,
|
|
1667
|
-
onMove,
|
|
1668
|
-
onEnd
|
|
1669
|
-
} = { ...defaultOptions$f, ...options }, stop = () => {
|
|
1670
|
-
window.cancelAnimationFrame(request);
|
|
1671
|
-
};
|
|
1672
|
-
let request;
|
|
1673
|
-
let totalTouches = 0;
|
|
1674
|
-
const touchstart = (event, api) => {
|
|
1675
|
-
const { denied } = api;
|
|
1676
|
-
totalTouches++;
|
|
1677
|
-
if (totalTouches > 1) {
|
|
1678
|
-
stop();
|
|
1679
|
-
denied();
|
|
1680
|
-
onStart?.(toHookApi(api));
|
|
1681
|
-
return;
|
|
1682
|
-
}
|
|
1683
|
-
storePointerStartMetadata({ event, api });
|
|
1684
|
-
storePointerMoveMetadata({ event, api });
|
|
1685
|
-
storePointerTimeMetadata({
|
|
1686
|
-
event,
|
|
1687
|
-
api,
|
|
1688
|
-
getShouldStore: () => totalTouches === 1,
|
|
1689
|
-
setRequest: (newRequest) => request = newRequest
|
|
1690
|
-
});
|
|
1691
|
-
onStart?.(toHookApi(api));
|
|
1692
|
-
};
|
|
1693
|
-
const touchmove = (event, api) => {
|
|
1694
|
-
const { getStatus } = api;
|
|
1695
|
-
if (getStatus() !== "denied")
|
|
1696
|
-
storePointerMoveMetadata({ event, api });
|
|
1697
|
-
onMove?.(toHookApi(api));
|
|
1698
|
-
};
|
|
1699
|
-
const touchcancel = (event, api) => {
|
|
1700
|
-
const { denied } = api;
|
|
1701
|
-
stop();
|
|
1702
|
-
denied();
|
|
1703
|
-
totalTouches--;
|
|
1704
|
-
onCancel?.(toHookApi(api));
|
|
1705
|
-
};
|
|
1706
|
-
const touchend = (event, api) => {
|
|
1707
|
-
const { denied } = api;
|
|
1708
|
-
if (totalTouches !== 1) {
|
|
1709
|
-
stop();
|
|
1710
|
-
denied();
|
|
1711
|
-
onEnd?.(toHookApi(api));
|
|
1712
|
-
return;
|
|
1713
|
-
}
|
|
1714
|
-
storePointerMoveMetadata({ event, api });
|
|
1715
|
-
stop();
|
|
1716
|
-
totalTouches--;
|
|
1717
|
-
recognize(event, api);
|
|
1718
|
-
onEnd?.(toHookApi(api));
|
|
1719
|
-
};
|
|
1720
|
-
const recognize = (event, api) => {
|
|
1721
|
-
const { getMetadata, recognized, denied } = api, metadata = getMetadata();
|
|
1722
|
-
if (metadata.duration >= minDuration && metadata.distance.straight.fromStart >= minDistance && metadata.velocity >= minVelocity) {
|
|
1723
|
-
recognized();
|
|
1724
|
-
} else {
|
|
1725
|
-
denied();
|
|
1726
|
-
}
|
|
1727
|
-
};
|
|
1728
|
-
return {
|
|
1729
|
-
touchstart,
|
|
1730
|
-
touchmove,
|
|
1731
|
-
touchcancel,
|
|
1732
|
-
touchend
|
|
1733
|
-
};
|
|
1734
|
-
}
|
|
1735
|
-
class Touchrelease extends Listenable {
|
|
1736
|
-
constructor(options) {
|
|
1737
|
-
super(
|
|
1738
|
-
"recognizeable",
|
|
1739
|
-
{
|
|
1740
|
-
recognizeable: {
|
|
1741
|
-
effects: createTouchrelease(options)
|
|
1423
|
+
effects: createPointerpress(options)
|
|
1742
1424
|
}
|
|
1743
1425
|
}
|
|
1744
1426
|
);
|
|
@@ -1751,7 +1433,7 @@ class Touchrelease extends Listenable {
|
|
|
1751
1433
|
const defaultOptions$e = {
|
|
1752
1434
|
minDuration: 0
|
|
1753
1435
|
};
|
|
1754
|
-
function
|
|
1436
|
+
function createPointerhover(options = {}) {
|
|
1755
1437
|
const {
|
|
1756
1438
|
minDuration,
|
|
1757
1439
|
onOver,
|
|
@@ -1760,16 +1442,16 @@ function createHover(options = {}) {
|
|
|
1760
1442
|
window.cancelAnimationFrame(request);
|
|
1761
1443
|
};
|
|
1762
1444
|
let request;
|
|
1763
|
-
let
|
|
1764
|
-
const
|
|
1765
|
-
if (
|
|
1766
|
-
|
|
1445
|
+
let pointerStatus = "exited";
|
|
1446
|
+
const pointerover = (event, api) => {
|
|
1447
|
+
if (pointerStatus === "exited") {
|
|
1448
|
+
pointerStatus = "entered";
|
|
1767
1449
|
storePointerStartMetadata({ event, api });
|
|
1768
1450
|
storePointerMoveMetadata({ event, api });
|
|
1769
1451
|
storePointerTimeMetadata({
|
|
1770
1452
|
event,
|
|
1771
1453
|
api,
|
|
1772
|
-
getShouldStore: () =>
|
|
1454
|
+
getShouldStore: () => pointerStatus === "entered",
|
|
1773
1455
|
setRequest: (newRequest) => request = newRequest,
|
|
1774
1456
|
// @ts-expect-error
|
|
1775
1457
|
recognize
|
|
@@ -1786,38 +1468,34 @@ function createHover(options = {}) {
|
|
|
1786
1468
|
recognized();
|
|
1787
1469
|
}
|
|
1788
1470
|
};
|
|
1789
|
-
const
|
|
1790
|
-
const { denied, listenInjection: { optionsByType: {
|
|
1471
|
+
const pointerout = (event, api) => {
|
|
1472
|
+
const { denied, listenInjection: { optionsByType: { pointerout: { target } } } } = api;
|
|
1791
1473
|
if (event.target !== target && target.contains?.(event.relatedTarget)) {
|
|
1792
1474
|
onOut?.(toHookApi(api));
|
|
1793
1475
|
return;
|
|
1794
1476
|
}
|
|
1795
|
-
if (
|
|
1477
|
+
if (pointerStatus === "entered") {
|
|
1796
1478
|
denied();
|
|
1797
1479
|
stop();
|
|
1798
|
-
|
|
1480
|
+
pointerStatus = "exited";
|
|
1799
1481
|
}
|
|
1800
1482
|
onOut?.(toHookApi(api));
|
|
1801
1483
|
};
|
|
1802
|
-
const touchstart = (event) => {
|
|
1803
|
-
event.preventDefault();
|
|
1804
|
-
};
|
|
1805
1484
|
return {
|
|
1806
|
-
|
|
1807
|
-
effect:
|
|
1485
|
+
pointerover: {
|
|
1486
|
+
effect: pointerover,
|
|
1808
1487
|
stop
|
|
1809
1488
|
},
|
|
1810
|
-
|
|
1811
|
-
touchstart
|
|
1489
|
+
pointerout
|
|
1812
1490
|
};
|
|
1813
1491
|
}
|
|
1814
|
-
class
|
|
1492
|
+
class Pointerhover extends Listenable {
|
|
1815
1493
|
constructor(options) {
|
|
1816
1494
|
super(
|
|
1817
1495
|
"recognizeable",
|
|
1818
1496
|
{
|
|
1819
1497
|
recognizeable: {
|
|
1820
|
-
effects:
|
|
1498
|
+
effects: createPointerhover(options)
|
|
1821
1499
|
}
|
|
1822
1500
|
}
|
|
1823
1501
|
);
|
|
@@ -1838,8 +1516,7 @@ function createTerminal(graph) {
|
|
|
1838
1516
|
function createChildren(graph) {
|
|
1839
1517
|
return function* (node) {
|
|
1840
1518
|
const outgoing = createOutgoing(graph)(node);
|
|
1841
|
-
for (const edge of outgoing)
|
|
1842
|
-
yield edge.to;
|
|
1519
|
+
for (const edge of outgoing) yield edge.to;
|
|
1843
1520
|
};
|
|
1844
1521
|
}
|
|
1845
1522
|
function createIndegree(graph) {
|
|
@@ -1910,11 +1587,9 @@ function createSiblings(graph) {
|
|
|
1910
1587
|
function createFind(node) {
|
|
1911
1588
|
return (tree) => {
|
|
1912
1589
|
for (const treeNode of tree) {
|
|
1913
|
-
if (treeNode.node === node)
|
|
1914
|
-
return treeNode;
|
|
1590
|
+
if (treeNode.node === node) return treeNode;
|
|
1915
1591
|
const found = createFind(node)(treeNode.children);
|
|
1916
|
-
if (found)
|
|
1917
|
-
return found;
|
|
1592
|
+
if (found) return found;
|
|
1918
1593
|
}
|
|
1919
1594
|
};
|
|
1920
1595
|
}
|
|
@@ -1945,8 +1620,7 @@ function createLayers$1(options = {}) {
|
|
|
1945
1620
|
const layers = [];
|
|
1946
1621
|
for (const { path } of toSteps(directedAcyclic)) {
|
|
1947
1622
|
const node = path.at(-1), depth = path.length - 1;
|
|
1948
|
-
if (!layers[depth] && depth > 0)
|
|
1949
|
-
yield layers[depth - 1];
|
|
1623
|
+
if (!layers[depth] && depth > 0) yield layers[depth - 1];
|
|
1950
1624
|
(layers[depth] || (layers[depth] = [])).push(node);
|
|
1951
1625
|
}
|
|
1952
1626
|
yield layers.at(-1);
|
|
@@ -2038,8 +1712,7 @@ function createSteps$1(configure, options = {}) {
|
|
|
2038
1712
|
yield { path, state: JSON.parse(JSON.stringify(state)) };
|
|
2039
1713
|
function* toStep() {
|
|
2040
1714
|
if (predicateExhausted(location)) {
|
|
2041
|
-
if (lazyCollections.includes(location)(roots))
|
|
2042
|
-
return;
|
|
1715
|
+
if (lazyCollections.includes(location)(roots)) return;
|
|
2043
1716
|
state[location].status = "unset";
|
|
2044
1717
|
delete state[location].value;
|
|
2045
1718
|
const path3 = toPath(state);
|
|
@@ -2053,8 +1726,7 @@ function createSteps$1(configure, options = {}) {
|
|
|
2053
1726
|
yield { path: path2, state: JSON.parse(JSON.stringify(state)) };
|
|
2054
1727
|
stepFromEffect(location);
|
|
2055
1728
|
const newLocation = path2.at(-1);
|
|
2056
|
-
if (predicateSteppable(newLocation))
|
|
2057
|
-
location = newLocation;
|
|
1729
|
+
if (predicateSteppable(newLocation)) location = newLocation;
|
|
2058
1730
|
yield* toStep();
|
|
2059
1731
|
}
|
|
2060
1732
|
yield* toStep();
|
|
@@ -2064,10 +1736,8 @@ function createRoots(options = {}) {
|
|
|
2064
1736
|
return function* (directedAcyclic) {
|
|
2065
1737
|
const { nodes } = directedAcyclic, predicateRoot = createRoot(directedAcyclic);
|
|
2066
1738
|
for (const node of nodes) {
|
|
2067
|
-
if (predicateRoot(node))
|
|
2068
|
-
|
|
2069
|
-
if (options.kind === "arborescence")
|
|
2070
|
-
break;
|
|
1739
|
+
if (predicateRoot(node)) yield node;
|
|
1740
|
+
if (options.kind === "arborescence") break;
|
|
2071
1741
|
}
|
|
2072
1742
|
};
|
|
2073
1743
|
}
|
|
@@ -2243,8 +1913,7 @@ function createSteps(configure, options = {}) {
|
|
|
2243
1913
|
yield { path, state: JSON.parse(JSON.stringify(state)) };
|
|
2244
1914
|
async function* toStep() {
|
|
2245
1915
|
if (predicateExhausted(location)) {
|
|
2246
|
-
if (lazyCollections.includes(location)(roots))
|
|
2247
|
-
return;
|
|
1916
|
+
if (lazyCollections.includes(location)(roots)) return;
|
|
2248
1917
|
state[location].status = "unset";
|
|
2249
1918
|
delete state[location].value;
|
|
2250
1919
|
const path3 = await toPath(state);
|
|
@@ -2258,8 +1927,7 @@ function createSteps(configure, options = {}) {
|
|
|
2258
1927
|
yield { path: path2, state: JSON.parse(JSON.stringify(state)) };
|
|
2259
1928
|
stepFromEffect(location);
|
|
2260
1929
|
const newLocation = path2.at(-1);
|
|
2261
|
-
if (predicateSteppable(newLocation))
|
|
2262
|
-
location = newLocation;
|
|
1930
|
+
if (predicateSteppable(newLocation)) location = newLocation;
|
|
2263
1931
|
yield* await toStep();
|
|
2264
1932
|
}
|
|
2265
1933
|
yield* await toStep();
|
|
@@ -2337,53 +2005,44 @@ function createFocusable(order, options = {}) {
|
|
|
2337
2005
|
switch (order) {
|
|
2338
2006
|
case "first":
|
|
2339
2007
|
return (element) => {
|
|
2340
|
-
if (predicatesElement && predicateFocusable(element))
|
|
2341
|
-
return element;
|
|
2008
|
+
if (predicatesElement && predicateFocusable(element)) return element;
|
|
2342
2009
|
for (let i = 0; i < element.children.length; i++) {
|
|
2343
2010
|
const focusable = createFocusable(order, { predicatesElement: true })(element.children[i]);
|
|
2344
|
-
if (focusable)
|
|
2345
|
-
return focusable;
|
|
2011
|
+
if (focusable) return focusable;
|
|
2346
2012
|
}
|
|
2347
2013
|
};
|
|
2348
2014
|
case "last":
|
|
2349
2015
|
return (element) => {
|
|
2350
|
-
if (predicatesElement && predicateFocusable(element))
|
|
2351
|
-
return element;
|
|
2016
|
+
if (predicatesElement && predicateFocusable(element)) return element;
|
|
2352
2017
|
for (let i = element.children.length - 1; i > -1; i--) {
|
|
2353
2018
|
const focusable = createFocusable(order, { predicatesElement: true })(element.children[i]);
|
|
2354
|
-
if (focusable)
|
|
2355
|
-
return focusable;
|
|
2019
|
+
if (focusable) return focusable;
|
|
2356
2020
|
}
|
|
2357
2021
|
};
|
|
2358
2022
|
case "next":
|
|
2359
2023
|
return (element) => {
|
|
2360
|
-
if (predicatesElement && predicateFocusable(element))
|
|
2361
|
-
return element;
|
|
2024
|
+
if (predicatesElement && predicateFocusable(element)) return element;
|
|
2362
2025
|
const focusable = createFocusable("first")(element);
|
|
2363
|
-
if (focusable)
|
|
2364
|
-
return focusable;
|
|
2026
|
+
if (focusable) return focusable;
|
|
2365
2027
|
let current = element;
|
|
2366
2028
|
while (current && current !== document.documentElement) {
|
|
2367
2029
|
const nextSibling = current.nextElementSibling;
|
|
2368
2030
|
if (nextSibling) {
|
|
2369
2031
|
const focusable2 = createFocusable("first", { predicatesElement: true })(nextSibling);
|
|
2370
|
-
if (focusable2)
|
|
2371
|
-
return focusable2;
|
|
2032
|
+
if (focusable2) return focusable2;
|
|
2372
2033
|
}
|
|
2373
2034
|
current = current.nextElementSibling || current.parentElement;
|
|
2374
2035
|
}
|
|
2375
2036
|
};
|
|
2376
2037
|
case "previous":
|
|
2377
2038
|
return (element) => {
|
|
2378
|
-
if (predicatesElement && predicateFocusable(element))
|
|
2379
|
-
return element;
|
|
2039
|
+
if (predicatesElement && predicateFocusable(element)) return element;
|
|
2380
2040
|
let current = element;
|
|
2381
2041
|
while (current && current !== document.documentElement) {
|
|
2382
2042
|
const previousSibling = current.previousElementSibling;
|
|
2383
2043
|
if (previousSibling) {
|
|
2384
2044
|
const focusable = createFocusable("last", { predicatesElement: true })(previousSibling);
|
|
2385
|
-
if (focusable)
|
|
2386
|
-
return focusable;
|
|
2045
|
+
if (focusable) return focusable;
|
|
2387
2046
|
}
|
|
2388
2047
|
current = current.previousElementSibling || current.parentElement;
|
|
2389
2048
|
}
|
|
@@ -2425,19 +2084,16 @@ const createKeycomboMatch$1 = (keycombo, options = {}) => {
|
|
|
2425
2084
|
const implicitModifier = lazyCollections.find(
|
|
2426
2085
|
(modifier) => code.includes(modifier)
|
|
2427
2086
|
)(modifiers);
|
|
2428
|
-
if (implicitModifier)
|
|
2429
|
-
implicitModifierAliases2.push(implicitModifier.toLowerCase());
|
|
2087
|
+
if (implicitModifier) implicitModifierAliases2.push(implicitModifier.toLowerCase());
|
|
2430
2088
|
}
|
|
2431
2089
|
return implicitModifierAliases2;
|
|
2432
2090
|
})();
|
|
2433
2091
|
return (descriptor) => {
|
|
2434
2092
|
const statuses = [];
|
|
2435
|
-
if (descriptor.code)
|
|
2436
|
-
createSet(fromEventToKeyStatusCode(descriptor), "down")(statuses);
|
|
2093
|
+
if (descriptor.code) createSet(fromEventToKeyStatusCode(descriptor), "down")(statuses);
|
|
2437
2094
|
for (const modifier of modifiers) {
|
|
2438
2095
|
const prefix = modifier === "Control" ? "ctrl" : modifier.toLowerCase();
|
|
2439
|
-
if (descriptor[`${prefix}Key`])
|
|
2440
|
-
createSet(modifier, "down")(statuses);
|
|
2096
|
+
if (descriptor[`${prefix}Key`]) createSet(modifier, "down")(statuses);
|
|
2441
2097
|
}
|
|
2442
2098
|
const descriptors = createMap(
|
|
2443
2099
|
([code]) => {
|
|
@@ -2548,8 +2204,7 @@ function createEvery(predicate) {
|
|
|
2548
2204
|
function createSome(predicate) {
|
|
2549
2205
|
return (object) => {
|
|
2550
2206
|
for (const key in object) {
|
|
2551
|
-
if (predicate(key, object[key]))
|
|
2552
|
-
return true;
|
|
2207
|
+
if (predicate(key, object[key])) return true;
|
|
2553
2208
|
}
|
|
2554
2209
|
return false;
|
|
2555
2210
|
};
|
|
@@ -2630,8 +2285,7 @@ function createDelete$2(key, options = {}) {
|
|
|
2630
2285
|
const index = lazyCollections.findIndex(
|
|
2631
2286
|
([candidate]) => predicateKey(candidate)
|
|
2632
2287
|
)(associativeArray);
|
|
2633
|
-
if (index === -1)
|
|
2634
|
-
return associativeArray;
|
|
2288
|
+
if (index === -1) return associativeArray;
|
|
2635
2289
|
associativeArray.splice(index, 1);
|
|
2636
2290
|
return associativeArray;
|
|
2637
2291
|
};
|
|
@@ -2701,11 +2355,9 @@ const createKeycomboDown = (keycombo, options = {}) => {
|
|
|
2701
2355
|
};
|
|
2702
2356
|
|
|
2703
2357
|
function fromKeyboardEventDescriptorToAliases(descriptor) {
|
|
2704
|
-
if (descriptor.shiftKey && descriptor.code in aliasesByShiftCode)
|
|
2705
|
-
return [aliasesByShiftCode[descriptor.code]];
|
|
2358
|
+
if (descriptor.shiftKey && descriptor.code in aliasesByShiftCode) return [aliasesByShiftCode[descriptor.code]];
|
|
2706
2359
|
const withoutModifierSide = toWithoutModifierSide(descriptor.code);
|
|
2707
|
-
if (withoutModifierSide in aliasListsByModifier)
|
|
2708
|
-
return aliasListsByModifier[withoutModifierSide];
|
|
2360
|
+
if (withoutModifierSide in aliasListsByModifier) return aliasListsByModifier[withoutModifierSide];
|
|
2709
2361
|
return descriptor.code in aliasesByCode ? [aliasesByCode[descriptor.code]] : [descriptor.code.match(aliasCaptureRE)?.[1].toLowerCase() || "unsupported"];
|
|
2710
2362
|
}
|
|
2711
2363
|
const toWithoutModifierSide = createClip(/(?:Left|Right)$/);
|
|
@@ -2876,8 +2528,7 @@ function createToIntl(_Intl) {
|
|
|
2876
2528
|
params,
|
|
2877
2529
|
{ predicateKey: createDeepEqual(params) }
|
|
2878
2530
|
)(intls);
|
|
2879
|
-
if (intl)
|
|
2880
|
-
return intl;
|
|
2531
|
+
if (intl) return intl;
|
|
2881
2532
|
const newIntl = new _Intl(...params);
|
|
2882
2533
|
createSet$2(
|
|
2883
2534
|
params,
|
|
@@ -2944,7 +2595,7 @@ function toHookApi({
|
|
|
2944
2595
|
};
|
|
2945
2596
|
}
|
|
2946
2597
|
|
|
2947
|
-
function
|
|
2598
|
+
function toPointerPoint(event) {
|
|
2948
2599
|
return {
|
|
2949
2600
|
x: event.clientX,
|
|
2950
2601
|
y: event.clientY
|
|
@@ -2986,11 +2637,9 @@ function storeKeyboardTimeMetadata({
|
|
|
2986
2637
|
setRequest,
|
|
2987
2638
|
recognize
|
|
2988
2639
|
}) {
|
|
2989
|
-
if (!getShouldStore())
|
|
2990
|
-
return;
|
|
2640
|
+
if (!getShouldStore()) return;
|
|
2991
2641
|
const { getStatus, listenInjection: { effect } } = api, timeMetadata = getTimeMetadata();
|
|
2992
|
-
if (!timeMetadata.times)
|
|
2993
|
-
timeMetadata.times = createClone()(initialMetadata$3.times);
|
|
2642
|
+
if (!timeMetadata.times) timeMetadata.times = createClone()(initialMetadata$3.times);
|
|
2994
2643
|
timeMetadata.times.start = Math.round(event.timeStamp);
|
|
2995
2644
|
timeMetadata.times.end = Math.round(event.timeStamp);
|
|
2996
2645
|
const frameEffect = (timestamp) => {
|
|
@@ -2998,18 +2647,15 @@ function storeKeyboardTimeMetadata({
|
|
|
2998
2647
|
timeMetadata.duration = Math.max(0, timeMetadata.times.end - timeMetadata.times.start);
|
|
2999
2648
|
if (recognize) {
|
|
3000
2649
|
recognize(event, api);
|
|
3001
|
-
if (getStatus() === "recognized")
|
|
3002
|
-
effect(event);
|
|
2650
|
+
if (getStatus() === "recognized") effect(event);
|
|
3003
2651
|
}
|
|
3004
2652
|
}, storeDuration = () => {
|
|
3005
2653
|
const sequence = api.getSequence();
|
|
3006
2654
|
if (!document.body.contains(
|
|
3007
2655
|
lazyCollections.at(-1)(sequence).target
|
|
3008
|
-
))
|
|
3009
|
-
return;
|
|
2656
|
+
)) return;
|
|
3010
2657
|
const request = requestAnimationFrame((timestamp) => {
|
|
3011
|
-
if (!getShouldStore())
|
|
3012
|
-
return;
|
|
2658
|
+
if (!getShouldStore()) return;
|
|
3013
2659
|
frameEffect(timestamp);
|
|
3014
2660
|
storeDuration();
|
|
3015
2661
|
});
|
|
@@ -3027,9 +2673,8 @@ const initialMetadata$2 = {
|
|
|
3027
2673
|
};
|
|
3028
2674
|
function storePointerStartMetadata({ event, api }) {
|
|
3029
2675
|
const { getMetadata } = api, metadata = getMetadata();
|
|
3030
|
-
const point = event instanceof MouseEvent ?
|
|
3031
|
-
if (!metadata.points)
|
|
3032
|
-
metadata.points = createClone()(initialMetadata$2.points);
|
|
2676
|
+
const point = event instanceof MouseEvent || event instanceof PointerEvent ? toPointerPoint(event) : toTouchMovePoint(event);
|
|
2677
|
+
if (!metadata.points) metadata.points = createClone()(initialMetadata$2.points);
|
|
3033
2678
|
metadata.points.start = point;
|
|
3034
2679
|
metadata.points.end = point;
|
|
3035
2680
|
}
|
|
@@ -3067,7 +2712,7 @@ function storePointerMoveMetadata({ event, api }) {
|
|
|
3067
2712
|
}
|
|
3068
2713
|
const { x: previousX, y: previousY } = metadata.points.end, { x: startX, y: startY } = metadata.points.start, { x: newX, y: newY } = (() => {
|
|
3069
2714
|
if (event instanceof MouseEvent) {
|
|
3070
|
-
return
|
|
2715
|
+
return toPointerPoint(event);
|
|
3071
2716
|
}
|
|
3072
2717
|
if (event instanceof TouchEvent) {
|
|
3073
2718
|
if (event.type === "touchmove") {
|
|
@@ -3135,17 +2780,14 @@ function storePointerTimeMetadata({
|
|
|
3135
2780
|
metadata.velocity = metadata.distance.straight.fromPrevious / durationFromPrevious || 0;
|
|
3136
2781
|
const event2 = getSequence().at(-1);
|
|
3137
2782
|
recognize?.(event2, api);
|
|
3138
|
-
if (getStatus() === "recognized")
|
|
3139
|
-
effect(event2);
|
|
2783
|
+
if (getStatus() === "recognized") effect(event2);
|
|
3140
2784
|
}, storeDuration = () => {
|
|
3141
2785
|
const sequence = api.getSequence();
|
|
3142
2786
|
if (!document.contains(
|
|
3143
2787
|
lazyCollections.at(-1)(sequence).target
|
|
3144
|
-
))
|
|
3145
|
-
return;
|
|
2788
|
+
)) return;
|
|
3146
2789
|
const request = requestAnimationFrame((timestamp) => {
|
|
3147
|
-
if (!getShouldStore())
|
|
3148
|
-
return;
|
|
2790
|
+
if (!getShouldStore()) return;
|
|
3149
2791
|
frameEffect(timestamp);
|
|
3150
2792
|
storeDuration();
|
|
3151
2793
|
});
|
|
@@ -3285,6 +2927,12 @@ function toInterpolated({ previous, next, progress }, options = {}) {
|
|
|
3285
2927
|
}
|
|
3286
2928
|
}
|
|
3287
2929
|
|
|
2930
|
+
var __defProp$g = Object.defineProperty;
|
|
2931
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2932
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2933
|
+
function defineAnimateableKeyframes(keyframes) {
|
|
2934
|
+
return keyframes;
|
|
2935
|
+
}
|
|
3288
2936
|
const defaultOptions$8 = {
|
|
3289
2937
|
duration: 0,
|
|
3290
2938
|
// delay not supported, because it can be effectd by delayable
|
|
@@ -3307,22 +2955,37 @@ const defaultAnimateOptions = {
|
|
|
3307
2955
|
}
|
|
3308
2956
|
};
|
|
3309
2957
|
class Animateable {
|
|
3310
|
-
initialDuration;
|
|
3311
|
-
iterationLimit;
|
|
3312
|
-
alternates;
|
|
3313
|
-
controlPoints;
|
|
3314
|
-
reversedControlPoints;
|
|
3315
|
-
toAnimationProgress;
|
|
3316
|
-
reversedToAnimationProgress;
|
|
3317
|
-
playCache;
|
|
3318
|
-
reverseCache;
|
|
3319
|
-
pauseCache;
|
|
3320
|
-
seekCache;
|
|
3321
|
-
alternateCache;
|
|
3322
|
-
visibilitychange;
|
|
3323
|
-
getEaseables;
|
|
3324
|
-
getReversedEaseables;
|
|
3325
2958
|
constructor(keyframes, options = {}) {
|
|
2959
|
+
__publicField$g(this, "initialDuration");
|
|
2960
|
+
__publicField$g(this, "iterationLimit");
|
|
2961
|
+
__publicField$g(this, "alternates");
|
|
2962
|
+
__publicField$g(this, "controlPoints");
|
|
2963
|
+
__publicField$g(this, "reversedControlPoints");
|
|
2964
|
+
__publicField$g(this, "toAnimationProgress");
|
|
2965
|
+
__publicField$g(this, "reversedToAnimationProgress");
|
|
2966
|
+
__publicField$g(this, "playCache");
|
|
2967
|
+
__publicField$g(this, "reverseCache");
|
|
2968
|
+
__publicField$g(this, "pauseCache");
|
|
2969
|
+
__publicField$g(this, "seekCache");
|
|
2970
|
+
__publicField$g(this, "alternateCache");
|
|
2971
|
+
__publicField$g(this, "visibilitychange");
|
|
2972
|
+
__publicField$g(this, "getEaseables");
|
|
2973
|
+
__publicField$g(this, "getReversedEaseables");
|
|
2974
|
+
__publicField$g(this, "computedStatus");
|
|
2975
|
+
__publicField$g(this, "computedTime");
|
|
2976
|
+
__publicField$g(this, "computedProgress");
|
|
2977
|
+
__publicField$g(this, "computedIterations");
|
|
2978
|
+
__publicField$g(this, "computedKeyframes");
|
|
2979
|
+
__publicField$g(this, "reversedKeyframes");
|
|
2980
|
+
__publicField$g(this, "properties");
|
|
2981
|
+
__publicField$g(this, "easeables");
|
|
2982
|
+
__publicField$g(this, "reversedEaseables");
|
|
2983
|
+
__publicField$g(this, "computedPlaybackRate");
|
|
2984
|
+
__publicField$g(this, "duration");
|
|
2985
|
+
__publicField$g(this, "totalTimeInvisible");
|
|
2986
|
+
__publicField$g(this, "invisibleAt");
|
|
2987
|
+
__publicField$g(this, "computedRequest");
|
|
2988
|
+
__publicField$g(this, "startTime");
|
|
3326
2989
|
this.initialDuration = options?.duration || defaultOptions$8.duration;
|
|
3327
2990
|
this.controlPoints = fromTimingToControlPoints(options?.timing || defaultOptions$8.timing);
|
|
3328
2991
|
this.iterationLimit = options?.iterations || defaultOptions$8.iterations;
|
|
@@ -3345,25 +3008,21 @@ class Animateable {
|
|
|
3345
3008
|
this.resetProgress();
|
|
3346
3009
|
this.resetIterations();
|
|
3347
3010
|
}
|
|
3348
|
-
computedStatus;
|
|
3349
3011
|
ready() {
|
|
3350
3012
|
this.computedStatus = "ready";
|
|
3351
3013
|
}
|
|
3352
|
-
computedTime;
|
|
3353
3014
|
resetTime() {
|
|
3354
3015
|
this.computedTime = {
|
|
3355
3016
|
elapsed: 0,
|
|
3356
3017
|
remaining: this.duration
|
|
3357
3018
|
};
|
|
3358
3019
|
}
|
|
3359
|
-
computedProgress;
|
|
3360
3020
|
resetProgress() {
|
|
3361
3021
|
this.computedProgress = {
|
|
3362
3022
|
time: 0,
|
|
3363
3023
|
animation: 0
|
|
3364
3024
|
};
|
|
3365
3025
|
}
|
|
3366
|
-
computedIterations;
|
|
3367
3026
|
resetIterations() {
|
|
3368
3027
|
this.computedIterations = 0;
|
|
3369
3028
|
}
|
|
@@ -3394,11 +3053,6 @@ class Animateable {
|
|
|
3394
3053
|
get progress() {
|
|
3395
3054
|
return this.computedProgress;
|
|
3396
3055
|
}
|
|
3397
|
-
computedKeyframes;
|
|
3398
|
-
reversedKeyframes;
|
|
3399
|
-
properties;
|
|
3400
|
-
easeables;
|
|
3401
|
-
reversedEaseables;
|
|
3402
3056
|
setKeyframes(keyframes) {
|
|
3403
3057
|
this.stop();
|
|
3404
3058
|
this.computedKeyframes = Array.from(keyframes).sort(({ progress: progressA }, { progress: progressB }) => progressA - progressB);
|
|
@@ -3412,9 +3066,6 @@ class Animateable {
|
|
|
3412
3066
|
this.reversedEaseables = this.getReversedEaseables({ keyframes: this.reversedKeyframes, properties: this.properties });
|
|
3413
3067
|
return this;
|
|
3414
3068
|
}
|
|
3415
|
-
computedPlaybackRate;
|
|
3416
|
-
duration;
|
|
3417
|
-
totalTimeInvisible;
|
|
3418
3069
|
setPlaybackRate(playbackRate) {
|
|
3419
3070
|
const narrowedPlaybackRate = Math.max(0, playbackRate);
|
|
3420
3071
|
this.computedPlaybackRate = narrowedPlaybackRate;
|
|
@@ -3560,7 +3211,6 @@ class Animateable {
|
|
|
3560
3211
|
reversed() {
|
|
3561
3212
|
this.computedStatus = "reversed";
|
|
3562
3213
|
}
|
|
3563
|
-
invisibleAt;
|
|
3564
3214
|
listenForVisibilitychange() {
|
|
3565
3215
|
if (this.visibilitychange.active.size === 0) {
|
|
3566
3216
|
this.totalTimeInvisible = 0;
|
|
@@ -3576,7 +3226,6 @@ class Animateable {
|
|
|
3576
3226
|
});
|
|
3577
3227
|
}
|
|
3578
3228
|
}
|
|
3579
|
-
computedRequest;
|
|
3580
3229
|
createAnimate(type) {
|
|
3581
3230
|
return (effect, options = {}) => {
|
|
3582
3231
|
const { interpolate: interpolateOptions } = createDeepMerge(options)(defaultAnimateOptions);
|
|
@@ -3597,7 +3246,6 @@ class Animateable {
|
|
|
3597
3246
|
return this;
|
|
3598
3247
|
};
|
|
3599
3248
|
}
|
|
3600
|
-
startTime;
|
|
3601
3249
|
setStartTimeAndStatus(type, timestamp) {
|
|
3602
3250
|
switch (type) {
|
|
3603
3251
|
case "play":
|
|
@@ -4188,17 +3836,23 @@ const easingsNetInOutBack = [
|
|
|
4188
3836
|
1.6
|
|
4189
3837
|
];
|
|
4190
3838
|
|
|
3839
|
+
var __defProp$f = Object.defineProperty;
|
|
3840
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3841
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4191
3842
|
const defaultOptions$7 = {
|
|
4192
3843
|
name: "baleada"
|
|
4193
3844
|
};
|
|
4194
3845
|
class Broadcastable {
|
|
4195
|
-
name;
|
|
4196
3846
|
constructor(state, options = {}) {
|
|
3847
|
+
__publicField$f(this, "name");
|
|
3848
|
+
__publicField$f(this, "computedStatus");
|
|
3849
|
+
__publicField$f(this, "computedChannel");
|
|
3850
|
+
__publicField$f(this, "computedError");
|
|
3851
|
+
__publicField$f(this, "computedState");
|
|
4197
3852
|
this.setState(state);
|
|
4198
3853
|
this.name = options.name ?? defaultOptions$7.name;
|
|
4199
3854
|
this.ready();
|
|
4200
3855
|
}
|
|
4201
|
-
computedStatus;
|
|
4202
3856
|
ready() {
|
|
4203
3857
|
this.computedStatus = "ready";
|
|
4204
3858
|
}
|
|
@@ -4211,15 +3865,12 @@ class Broadcastable {
|
|
|
4211
3865
|
get status() {
|
|
4212
3866
|
return this.computedStatus;
|
|
4213
3867
|
}
|
|
4214
|
-
computedChannel;
|
|
4215
3868
|
get channel() {
|
|
4216
3869
|
return this.computedChannel || (this.computedChannel = new BroadcastChannel(this.name));
|
|
4217
3870
|
}
|
|
4218
|
-
computedError;
|
|
4219
3871
|
get error() {
|
|
4220
3872
|
return this.computedError;
|
|
4221
3873
|
}
|
|
4222
|
-
computedState;
|
|
4223
3874
|
setState(state) {
|
|
4224
3875
|
this.computedState = state;
|
|
4225
3876
|
return this;
|
|
@@ -4260,12 +3911,19 @@ function toMessageListenParams(instance, effect) {
|
|
|
4260
3911
|
];
|
|
4261
3912
|
}
|
|
4262
3913
|
|
|
3914
|
+
var __defProp$e = Object.defineProperty;
|
|
3915
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3916
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4263
3917
|
const defaultOptions$6 = {
|
|
4264
3918
|
locales: "en",
|
|
4265
3919
|
collator: { sensitivity: "base" }
|
|
4266
3920
|
};
|
|
4267
3921
|
class Compareable {
|
|
4268
3922
|
constructor(string, options = {}) {
|
|
3923
|
+
__publicField$e(this, "computedStatus");
|
|
3924
|
+
__publicField$e(this, "computedCollator");
|
|
3925
|
+
__publicField$e(this, "computedComparison");
|
|
3926
|
+
__publicField$e(this, "computedString");
|
|
4269
3927
|
const locales = options.locales || defaultOptions$6.locales, collatorOptions = { ...defaultOptions$6.collator, ...options.collator }, key = locales + lazyCollections.pipe(
|
|
4270
3928
|
createEntries(),
|
|
4271
3929
|
lazyCollections.sort((a, b) => a[0] < b[0] ? -1 : 1),
|
|
@@ -4275,7 +3933,6 @@ class Compareable {
|
|
|
4275
3933
|
this.setString(string);
|
|
4276
3934
|
this.ready();
|
|
4277
3935
|
}
|
|
4278
|
-
computedStatus;
|
|
4279
3936
|
ready() {
|
|
4280
3937
|
this.computedStatus = "ready";
|
|
4281
3938
|
}
|
|
@@ -4288,15 +3945,12 @@ class Compareable {
|
|
|
4288
3945
|
get status() {
|
|
4289
3946
|
return this.computedStatus;
|
|
4290
3947
|
}
|
|
4291
|
-
computedCollator;
|
|
4292
3948
|
get collator() {
|
|
4293
3949
|
return this.computedCollator;
|
|
4294
3950
|
}
|
|
4295
|
-
computedComparison;
|
|
4296
3951
|
get comparison() {
|
|
4297
3952
|
return this.computedComparison;
|
|
4298
3953
|
}
|
|
4299
|
-
computedString;
|
|
4300
3954
|
setString(string) {
|
|
4301
3955
|
this.computedString = string;
|
|
4302
3956
|
return this;
|
|
@@ -4316,6 +3970,9 @@ class Compareable {
|
|
|
4316
3970
|
}
|
|
4317
3971
|
const cache = {};
|
|
4318
3972
|
|
|
3973
|
+
var __defProp$d = Object.defineProperty;
|
|
3974
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3975
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4319
3976
|
const defaultOptions$5 = {
|
|
4320
3977
|
segment: {
|
|
4321
3978
|
from: "start",
|
|
@@ -4328,11 +3985,14 @@ const defaultCompleteOptions = {
|
|
|
4328
3985
|
select: "completionEnd"
|
|
4329
3986
|
};
|
|
4330
3987
|
class Completeable {
|
|
4331
|
-
segmentFrom;
|
|
4332
|
-
segmentTo;
|
|
4333
|
-
divider;
|
|
4334
|
-
computedDividerIndices;
|
|
4335
3988
|
constructor(string, options = {}) {
|
|
3989
|
+
__publicField$d(this, "segmentFrom");
|
|
3990
|
+
__publicField$d(this, "segmentTo");
|
|
3991
|
+
__publicField$d(this, "divider");
|
|
3992
|
+
__publicField$d(this, "computedDividerIndices");
|
|
3993
|
+
__publicField$d(this, "computedStatus");
|
|
3994
|
+
__publicField$d(this, "computedString");
|
|
3995
|
+
__publicField$d(this, "computedSelection");
|
|
4336
3996
|
this.constructing();
|
|
4337
3997
|
this.segmentFrom = options?.segment?.from || defaultOptions$5.segment.from;
|
|
4338
3998
|
this.segmentTo = options?.segment?.to || defaultOptions$5.segment.to;
|
|
@@ -4345,7 +4005,6 @@ class Completeable {
|
|
|
4345
4005
|
constructing() {
|
|
4346
4006
|
this.computedStatus = "constructing";
|
|
4347
4007
|
}
|
|
4348
|
-
computedStatus;
|
|
4349
4008
|
ready() {
|
|
4350
4009
|
this.computedStatus = "ready";
|
|
4351
4010
|
}
|
|
@@ -4379,6 +4038,7 @@ class Completeable {
|
|
|
4379
4038
|
return 0;
|
|
4380
4039
|
case "selection":
|
|
4381
4040
|
return this.selection.start;
|
|
4041
|
+
// No arithmetic needed, because the first character of the selection should be included
|
|
4382
4042
|
case "divider":
|
|
4383
4043
|
return this.dividerIndices.before + 1;
|
|
4384
4044
|
}
|
|
@@ -4389,11 +4049,11 @@ class Completeable {
|
|
|
4389
4049
|
return this.string.length;
|
|
4390
4050
|
case "selection":
|
|
4391
4051
|
return this.selection.end;
|
|
4052
|
+
// No arithmetic needed, because the browser sets selection end as the first character not highlighted in the selection
|
|
4392
4053
|
case "divider":
|
|
4393
4054
|
return this.dividerIndices.after;
|
|
4394
4055
|
}
|
|
4395
4056
|
}
|
|
4396
|
-
computedString;
|
|
4397
4057
|
setString(string) {
|
|
4398
4058
|
this.computedString = string;
|
|
4399
4059
|
switch (this.status) {
|
|
@@ -4405,7 +4065,6 @@ class Completeable {
|
|
|
4405
4065
|
}
|
|
4406
4066
|
return this;
|
|
4407
4067
|
}
|
|
4408
|
-
computedSelection;
|
|
4409
4068
|
setSelection(selection) {
|
|
4410
4069
|
this.computedSelection = selection;
|
|
4411
4070
|
this.setDividerIndices();
|
|
@@ -4496,12 +4155,19 @@ function toNextMatch({ string, re, from }) {
|
|
|
4496
4155
|
return indexOf;
|
|
4497
4156
|
}
|
|
4498
4157
|
|
|
4158
|
+
var __defProp$c = Object.defineProperty;
|
|
4159
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4160
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4499
4161
|
class Copyable {
|
|
4500
|
-
computedIsClipboardText;
|
|
4501
|
-
copyListenable;
|
|
4502
|
-
cutListenable;
|
|
4503
|
-
copyAndCutEffect;
|
|
4504
4162
|
constructor(string, options = {}) {
|
|
4163
|
+
__publicField$c(this, "computedIsClipboardText");
|
|
4164
|
+
__publicField$c(this, "copyListenable");
|
|
4165
|
+
__publicField$c(this, "cutListenable");
|
|
4166
|
+
__publicField$c(this, "copyAndCutEffect");
|
|
4167
|
+
__publicField$c(this, "computedStatus");
|
|
4168
|
+
__publicField$c(this, "computedString");
|
|
4169
|
+
__publicField$c(this, "computedResponse");
|
|
4170
|
+
__publicField$c(this, "computedError");
|
|
4505
4171
|
this.computedIsClipboardText = false;
|
|
4506
4172
|
this.copyListenable = new Listenable("copy");
|
|
4507
4173
|
this.cutListenable = new Listenable("cut");
|
|
@@ -4512,7 +4178,6 @@ class Copyable {
|
|
|
4512
4178
|
this.setString(string);
|
|
4513
4179
|
this.ready();
|
|
4514
4180
|
}
|
|
4515
|
-
computedStatus;
|
|
4516
4181
|
ready() {
|
|
4517
4182
|
this.computedStatus = "ready";
|
|
4518
4183
|
}
|
|
@@ -4534,13 +4199,10 @@ class Copyable {
|
|
|
4534
4199
|
get error() {
|
|
4535
4200
|
return this.computedError;
|
|
4536
4201
|
}
|
|
4537
|
-
computedString;
|
|
4538
4202
|
setString(string) {
|
|
4539
4203
|
this.computedString = string;
|
|
4540
4204
|
return this;
|
|
4541
4205
|
}
|
|
4542
|
-
computedResponse;
|
|
4543
|
-
computedError;
|
|
4544
4206
|
async copy(options = { kind: "clipboard" }) {
|
|
4545
4207
|
this.copying();
|
|
4546
4208
|
const { kind } = options;
|
|
@@ -4588,13 +4250,19 @@ class Copyable {
|
|
|
4588
4250
|
}
|
|
4589
4251
|
}
|
|
4590
4252
|
|
|
4253
|
+
var __defProp$b = Object.defineProperty;
|
|
4254
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4255
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4591
4256
|
const defaultOptions$4 = {
|
|
4592
4257
|
delay: 0,
|
|
4593
4258
|
executions: 1
|
|
4594
4259
|
};
|
|
4595
4260
|
class Delayable {
|
|
4596
|
-
animateable;
|
|
4597
4261
|
constructor(effect, options = {}) {
|
|
4262
|
+
__publicField$b(this, "animateable");
|
|
4263
|
+
__publicField$b(this, "computedStatus");
|
|
4264
|
+
__publicField$b(this, "computedEffect");
|
|
4265
|
+
__publicField$b(this, "frameEffect");
|
|
4598
4266
|
this.animateable = new Animateable(
|
|
4599
4267
|
[
|
|
4600
4268
|
{ progress: 0, properties: { progress: 0 } },
|
|
@@ -4608,7 +4276,6 @@ class Delayable {
|
|
|
4608
4276
|
this.setEffect(effect);
|
|
4609
4277
|
this.ready();
|
|
4610
4278
|
}
|
|
4611
|
-
computedStatus;
|
|
4612
4279
|
ready() {
|
|
4613
4280
|
this.computedStatus = "ready";
|
|
4614
4281
|
}
|
|
@@ -4630,14 +4297,12 @@ class Delayable {
|
|
|
4630
4297
|
get progress() {
|
|
4631
4298
|
return this.animateable.progress.time;
|
|
4632
4299
|
}
|
|
4633
|
-
computedEffect;
|
|
4634
4300
|
setEffect(effect) {
|
|
4635
4301
|
this.stop();
|
|
4636
4302
|
this.computedEffect = effect;
|
|
4637
4303
|
this.setFrameEffect(effect);
|
|
4638
4304
|
return this;
|
|
4639
4305
|
}
|
|
4640
|
-
frameEffect;
|
|
4641
4306
|
setFrameEffect(effect) {
|
|
4642
4307
|
this.frameEffect = (frame) => {
|
|
4643
4308
|
const { properties: { progress }, timestamp } = frame;
|
|
@@ -4735,18 +4400,22 @@ class Delayable {
|
|
|
4735
4400
|
}
|
|
4736
4401
|
}
|
|
4737
4402
|
|
|
4403
|
+
var __defProp$a = Object.defineProperty;
|
|
4404
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4405
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4738
4406
|
const defaultOptions$3 = {
|
|
4739
4407
|
toD: (stroke) => stroke.length === 0 ? "" : toD(stroke)
|
|
4740
4408
|
};
|
|
4741
4409
|
class Drawable {
|
|
4742
|
-
computedD;
|
|
4743
|
-
toD;
|
|
4744
4410
|
constructor(stroke, options = {}) {
|
|
4411
|
+
__publicField$a(this, "computedD");
|
|
4412
|
+
__publicField$a(this, "toD");
|
|
4413
|
+
__publicField$a(this, "computedStatus");
|
|
4414
|
+
__publicField$a(this, "computedStroke");
|
|
4745
4415
|
this.toD = options?.toD || defaultOptions$3.toD;
|
|
4746
4416
|
this.setStroke(stroke);
|
|
4747
4417
|
this.ready();
|
|
4748
4418
|
}
|
|
4749
|
-
computedStatus;
|
|
4750
4419
|
ready() {
|
|
4751
4420
|
this.computedStatus = "ready";
|
|
4752
4421
|
}
|
|
@@ -4762,7 +4431,6 @@ class Drawable {
|
|
|
4762
4431
|
get d() {
|
|
4763
4432
|
return this.computedD;
|
|
4764
4433
|
}
|
|
4765
|
-
computedStroke;
|
|
4766
4434
|
setStroke(stroke) {
|
|
4767
4435
|
this.computedStroke = stroke;
|
|
4768
4436
|
this.computedD = this.toD(stroke);
|
|
@@ -4782,8 +4450,7 @@ class Drawable {
|
|
|
4782
4450
|
}
|
|
4783
4451
|
}
|
|
4784
4452
|
function toD(stroke) {
|
|
4785
|
-
if (stroke.length < 4)
|
|
4786
|
-
return "";
|
|
4453
|
+
if (stroke.length < 4) return "";
|
|
4787
4454
|
let a = stroke[0];
|
|
4788
4455
|
let b = stroke[1];
|
|
4789
4456
|
const c = stroke[2];
|
|
@@ -4796,8 +4463,7 @@ function toD(stroke) {
|
|
|
4796
4463
|
return `${result}Z`;
|
|
4797
4464
|
}
|
|
4798
4465
|
function toFlattenedD(stroke) {
|
|
4799
|
-
if (stroke.length === 0)
|
|
4800
|
-
return "";
|
|
4466
|
+
if (stroke.length === 0) return "";
|
|
4801
4467
|
const faces = polygonClipping.union([stroke]);
|
|
4802
4468
|
const flattenedD = [];
|
|
4803
4469
|
for (const face of faces) {
|
|
@@ -4809,12 +4475,18 @@ function toFlattenedD(stroke) {
|
|
|
4809
4475
|
}
|
|
4810
4476
|
const toSpaceSeparated = lazyCollections.join(" ");
|
|
4811
4477
|
|
|
4478
|
+
var __defProp$9 = Object.defineProperty;
|
|
4479
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4480
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4812
4481
|
class Resolveable {
|
|
4813
4482
|
constructor(getPromise, options = {}) {
|
|
4483
|
+
__publicField$9(this, "computedStatus");
|
|
4484
|
+
__publicField$9(this, "computedGetPromise");
|
|
4485
|
+
__publicField$9(this, "computedValue");
|
|
4486
|
+
__publicField$9(this, "computedError");
|
|
4814
4487
|
this.setGetPromise(getPromise);
|
|
4815
4488
|
this.ready();
|
|
4816
4489
|
}
|
|
4817
|
-
computedStatus;
|
|
4818
4490
|
ready() {
|
|
4819
4491
|
this.computedStatus = "ready";
|
|
4820
4492
|
}
|
|
@@ -4833,13 +4505,10 @@ class Resolveable {
|
|
|
4833
4505
|
get error() {
|
|
4834
4506
|
return this.computedError;
|
|
4835
4507
|
}
|
|
4836
|
-
computedGetPromise;
|
|
4837
4508
|
setGetPromise(getPromise) {
|
|
4838
4509
|
this.computedGetPromise = getPromise;
|
|
4839
4510
|
return this;
|
|
4840
4511
|
}
|
|
4841
|
-
computedValue;
|
|
4842
|
-
computedError;
|
|
4843
4512
|
async resolve() {
|
|
4844
4513
|
this.resolving();
|
|
4845
4514
|
try {
|
|
@@ -4862,13 +4531,23 @@ class Resolveable {
|
|
|
4862
4531
|
}
|
|
4863
4532
|
}
|
|
4864
4533
|
|
|
4534
|
+
var __defProp$8 = Object.defineProperty;
|
|
4535
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4536
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4865
4537
|
class Fetchable {
|
|
4866
|
-
computedArrayBuffer;
|
|
4867
|
-
computedBlob;
|
|
4868
|
-
computedFormData;
|
|
4869
|
-
computedJson;
|
|
4870
|
-
computedText;
|
|
4871
4538
|
constructor(resource, options = {}) {
|
|
4539
|
+
__publicField$8(this, "computedArrayBuffer");
|
|
4540
|
+
__publicField$8(this, "computedBlob");
|
|
4541
|
+
__publicField$8(this, "computedFormData");
|
|
4542
|
+
__publicField$8(this, "computedJson");
|
|
4543
|
+
__publicField$8(this, "computedText");
|
|
4544
|
+
__publicField$8(this, "computedStatus");
|
|
4545
|
+
__publicField$8(this, "computedKy");
|
|
4546
|
+
__publicField$8(this, "computedAbortController");
|
|
4547
|
+
__publicField$8(this, "computedRetryCount", 0);
|
|
4548
|
+
__publicField$8(this, "computedResource");
|
|
4549
|
+
__publicField$8(this, "computedResponse");
|
|
4550
|
+
__publicField$8(this, "computedError");
|
|
4872
4551
|
this.setResource(resource);
|
|
4873
4552
|
this.computedKy = ky.create(narrowOptions(options.ky));
|
|
4874
4553
|
this.computedArrayBuffer = new Resolveable(async () => "arrayBuffer" in this.response ? await this.response.arrayBuffer() : void 0);
|
|
@@ -4878,7 +4557,6 @@ class Fetchable {
|
|
|
4878
4557
|
this.computedText = new Resolveable(async () => "text" in this.response ? await this.response.text() : void 0);
|
|
4879
4558
|
this.ready();
|
|
4880
4559
|
}
|
|
4881
|
-
computedStatus;
|
|
4882
4560
|
ready() {
|
|
4883
4561
|
this.computedStatus = "ready";
|
|
4884
4562
|
}
|
|
@@ -4891,17 +4569,13 @@ class Fetchable {
|
|
|
4891
4569
|
get status() {
|
|
4892
4570
|
return this.computedStatus;
|
|
4893
4571
|
}
|
|
4894
|
-
computedKy;
|
|
4895
4572
|
get ky() {
|
|
4896
4573
|
return this.computedKy;
|
|
4897
4574
|
}
|
|
4898
|
-
computedAbortController;
|
|
4899
4575
|
get abortController() {
|
|
4900
|
-
if (!this.computedAbortController)
|
|
4901
|
-
this.computedAbortController = new AbortController();
|
|
4576
|
+
if (!this.computedAbortController) this.computedAbortController = new AbortController();
|
|
4902
4577
|
return this.computedAbortController;
|
|
4903
4578
|
}
|
|
4904
|
-
computedRetryCount = 0;
|
|
4905
4579
|
get retryCount() {
|
|
4906
4580
|
return this.computedRetryCount;
|
|
4907
4581
|
}
|
|
@@ -4926,13 +4600,10 @@ class Fetchable {
|
|
|
4926
4600
|
get text() {
|
|
4927
4601
|
return this.computedText;
|
|
4928
4602
|
}
|
|
4929
|
-
computedResource;
|
|
4930
4603
|
setResource(resource) {
|
|
4931
4604
|
this.computedResource = resource;
|
|
4932
4605
|
return this;
|
|
4933
4606
|
}
|
|
4934
|
-
computedResponse;
|
|
4935
|
-
computedError;
|
|
4936
4607
|
async fetch(options = {}) {
|
|
4937
4608
|
this.fetching();
|
|
4938
4609
|
try {
|
|
@@ -4956,10 +4627,8 @@ class Fetchable {
|
|
|
4956
4627
|
this.fetched();
|
|
4957
4628
|
} catch (error) {
|
|
4958
4629
|
this.computedError = error;
|
|
4959
|
-
if (error.name === "AbortError")
|
|
4960
|
-
|
|
4961
|
-
else
|
|
4962
|
-
this.errored();
|
|
4630
|
+
if (error.name === "AbortError") this.aborted();
|
|
4631
|
+
else this.errored();
|
|
4963
4632
|
}
|
|
4964
4633
|
return this;
|
|
4965
4634
|
}
|
|
@@ -5008,17 +4677,21 @@ class Fetchable {
|
|
|
5008
4677
|
}
|
|
5009
4678
|
}
|
|
5010
4679
|
function narrowOptions(options) {
|
|
5011
|
-
if (!options)
|
|
5012
|
-
return {};
|
|
4680
|
+
if (!options) return {};
|
|
5013
4681
|
return predicateFunction(options) ? options({ stop: ky.stop }) : options;
|
|
5014
4682
|
}
|
|
5015
4683
|
|
|
4684
|
+
var __defProp$7 = Object.defineProperty;
|
|
4685
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4686
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5016
4687
|
class Fullscreenable {
|
|
5017
4688
|
constructor(getElement, options = {}) {
|
|
4689
|
+
__publicField$7(this, "computedStatus");
|
|
4690
|
+
__publicField$7(this, "computedGetElement");
|
|
4691
|
+
__publicField$7(this, "computedError");
|
|
5018
4692
|
this.setGetElement(getElement);
|
|
5019
4693
|
this.ready();
|
|
5020
4694
|
}
|
|
5021
|
-
computedStatus;
|
|
5022
4695
|
ready() {
|
|
5023
4696
|
this.computedStatus = "ready";
|
|
5024
4697
|
}
|
|
@@ -5037,7 +4710,6 @@ class Fullscreenable {
|
|
|
5037
4710
|
get error() {
|
|
5038
4711
|
return this.computedError;
|
|
5039
4712
|
}
|
|
5040
|
-
computedGetElement;
|
|
5041
4713
|
setGetElement(getElement) {
|
|
5042
4714
|
this.computedGetElement = () => getElement();
|
|
5043
4715
|
return this;
|
|
@@ -5046,7 +4718,6 @@ class Fullscreenable {
|
|
|
5046
4718
|
await this.fullscreen(options);
|
|
5047
4719
|
return this;
|
|
5048
4720
|
}
|
|
5049
|
-
computedError;
|
|
5050
4721
|
async fullscreen(options = {}) {
|
|
5051
4722
|
try {
|
|
5052
4723
|
await this.element.requestFullscreen(options);
|
|
@@ -5078,12 +4749,18 @@ class Fullscreenable {
|
|
|
5078
4749
|
}
|
|
5079
4750
|
}
|
|
5080
4751
|
|
|
4752
|
+
var __defProp$6 = Object.defineProperty;
|
|
4753
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4754
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5081
4755
|
class Grantable {
|
|
5082
4756
|
constructor(descriptor, options = {}) {
|
|
4757
|
+
__publicField$6(this, "computedStatus");
|
|
4758
|
+
__publicField$6(this, "computedDescriptor");
|
|
4759
|
+
__publicField$6(this, "computedPermission");
|
|
4760
|
+
__publicField$6(this, "computedError");
|
|
5083
4761
|
this.setDescriptor(descriptor);
|
|
5084
4762
|
this.ready();
|
|
5085
4763
|
}
|
|
5086
|
-
computedStatus;
|
|
5087
4764
|
ready() {
|
|
5088
4765
|
this.computedStatus = "ready";
|
|
5089
4766
|
}
|
|
@@ -5102,13 +4779,10 @@ class Grantable {
|
|
|
5102
4779
|
get status() {
|
|
5103
4780
|
return this.computedStatus;
|
|
5104
4781
|
}
|
|
5105
|
-
computedDescriptor;
|
|
5106
4782
|
setDescriptor(descriptor) {
|
|
5107
4783
|
this.computedDescriptor = descriptor;
|
|
5108
4784
|
return this;
|
|
5109
4785
|
}
|
|
5110
|
-
computedPermission;
|
|
5111
|
-
computedError;
|
|
5112
4786
|
async grant() {
|
|
5113
4787
|
this.granting();
|
|
5114
4788
|
try {
|
|
@@ -5131,6 +4805,9 @@ class Grantable {
|
|
|
5131
4805
|
}
|
|
5132
4806
|
}
|
|
5133
4807
|
|
|
4808
|
+
var __defProp$5 = Object.defineProperty;
|
|
4809
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4810
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5134
4811
|
const defaultOptions$2 = {
|
|
5135
4812
|
initialLocation: 0
|
|
5136
4813
|
};
|
|
@@ -5141,22 +4818,22 @@ const defaultNextAndPreviousOptions = {
|
|
|
5141
4818
|
};
|
|
5142
4819
|
class Navigateable {
|
|
5143
4820
|
constructor(array, options = {}) {
|
|
4821
|
+
__publicField$5(this, "computedStatus");
|
|
4822
|
+
__publicField$5(this, "computedArray");
|
|
4823
|
+
__publicField$5(this, "computedLocation");
|
|
5144
4824
|
this.setArray(array);
|
|
5145
4825
|
this.navigate(options?.initialLocation ?? defaultOptions$2.initialLocation);
|
|
5146
4826
|
this.ready();
|
|
5147
4827
|
}
|
|
5148
|
-
computedStatus;
|
|
5149
4828
|
ready() {
|
|
5150
4829
|
this.computedStatus = "ready";
|
|
5151
4830
|
}
|
|
5152
|
-
computedArray;
|
|
5153
4831
|
get array() {
|
|
5154
4832
|
return this.computedArray;
|
|
5155
4833
|
}
|
|
5156
4834
|
set array(value) {
|
|
5157
4835
|
this.setArray(value);
|
|
5158
4836
|
}
|
|
5159
|
-
computedLocation;
|
|
5160
4837
|
get location() {
|
|
5161
4838
|
return this.computedLocation;
|
|
5162
4839
|
}
|
|
@@ -5275,6 +4952,183 @@ class Navigateable {
|
|
|
5275
4952
|
}
|
|
5276
4953
|
}
|
|
5277
4954
|
|
|
4955
|
+
var __defProp$4 = Object.defineProperty;
|
|
4956
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4957
|
+
var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4958
|
+
function createDefineObjectStore() {
|
|
4959
|
+
return (transaction, storeName) => {
|
|
4960
|
+
return transaction.objectStore(storeName);
|
|
4961
|
+
};
|
|
4962
|
+
}
|
|
4963
|
+
class Operateable {
|
|
4964
|
+
constructor(objectStore, options = {}) {
|
|
4965
|
+
__publicField$4(this, "listenables", []);
|
|
4966
|
+
__publicField$4(this, "computedObjectStore");
|
|
4967
|
+
__publicField$4(this, "computedStatus");
|
|
4968
|
+
__publicField$4(this, "computedError");
|
|
4969
|
+
this.computedObjectStore = objectStore;
|
|
4970
|
+
this.ready();
|
|
4971
|
+
}
|
|
4972
|
+
ready() {
|
|
4973
|
+
this.computedStatus = "ready";
|
|
4974
|
+
}
|
|
4975
|
+
get objectStore() {
|
|
4976
|
+
return this.computedObjectStore;
|
|
4977
|
+
}
|
|
4978
|
+
set objectStore(objectStore) {
|
|
4979
|
+
this.setObjectStore(objectStore);
|
|
4980
|
+
}
|
|
4981
|
+
get status() {
|
|
4982
|
+
return this.computedStatus;
|
|
4983
|
+
}
|
|
4984
|
+
get error() {
|
|
4985
|
+
return this.computedError;
|
|
4986
|
+
}
|
|
4987
|
+
setObjectStore(objectStore) {
|
|
4988
|
+
this.stop();
|
|
4989
|
+
this.computedObjectStore = objectStore;
|
|
4990
|
+
return this;
|
|
4991
|
+
}
|
|
4992
|
+
operate(descriptors) {
|
|
4993
|
+
if (!descriptors.length) {
|
|
4994
|
+
this.operated();
|
|
4995
|
+
return this;
|
|
4996
|
+
}
|
|
4997
|
+
this.operating();
|
|
4998
|
+
const [present, ...future] = descriptors, { operation } = present, request = (() => {
|
|
4999
|
+
switch (operation) {
|
|
5000
|
+
case "add": {
|
|
5001
|
+
const { value, key } = present;
|
|
5002
|
+
return this.objectStore.add(value, key);
|
|
5003
|
+
}
|
|
5004
|
+
case "put": {
|
|
5005
|
+
const { value, key } = present;
|
|
5006
|
+
return this.objectStore.put(value, key);
|
|
5007
|
+
}
|
|
5008
|
+
case "get": {
|
|
5009
|
+
const { query } = present;
|
|
5010
|
+
return this.objectStore.get(query);
|
|
5011
|
+
}
|
|
5012
|
+
case "getKey": {
|
|
5013
|
+
const { query } = present;
|
|
5014
|
+
return this.objectStore.getKey(query);
|
|
5015
|
+
}
|
|
5016
|
+
case "getAll": {
|
|
5017
|
+
const { query, count } = present;
|
|
5018
|
+
return this.objectStore.getAll(query, count);
|
|
5019
|
+
}
|
|
5020
|
+
case "getAllKeys": {
|
|
5021
|
+
const { query, count } = present;
|
|
5022
|
+
return this.objectStore.getAllKeys(query, count);
|
|
5023
|
+
}
|
|
5024
|
+
case "getAllRecords": {
|
|
5025
|
+
const { query, count } = present;
|
|
5026
|
+
return this.objectStore.getAllRecords(query, count);
|
|
5027
|
+
}
|
|
5028
|
+
case "delete": {
|
|
5029
|
+
const { query } = present;
|
|
5030
|
+
return this.objectStore.delete(query);
|
|
5031
|
+
}
|
|
5032
|
+
case "clear":
|
|
5033
|
+
return this.objectStore.clear();
|
|
5034
|
+
case "count": {
|
|
5035
|
+
const { query } = present;
|
|
5036
|
+
return this.objectStore.count(query);
|
|
5037
|
+
}
|
|
5038
|
+
case "openCursor": {
|
|
5039
|
+
const { query, direction } = present;
|
|
5040
|
+
return this.objectStore.openCursor(query, direction);
|
|
5041
|
+
}
|
|
5042
|
+
case "openKeyCursor": {
|
|
5043
|
+
const { query, direction } = present;
|
|
5044
|
+
return this.objectStore.openKeyCursor(query, direction);
|
|
5045
|
+
}
|
|
5046
|
+
}
|
|
5047
|
+
})(), listenables = [
|
|
5048
|
+
new Listenable("success").listen(
|
|
5049
|
+
() => {
|
|
5050
|
+
if (!operation.includes("Cursor") || !request.result) stopListenables();
|
|
5051
|
+
if ("effect" in present) present.effect?.(request.result);
|
|
5052
|
+
if (!future.length) {
|
|
5053
|
+
this.operated();
|
|
5054
|
+
return;
|
|
5055
|
+
}
|
|
5056
|
+
this.operate(future);
|
|
5057
|
+
},
|
|
5058
|
+
{ target: request }
|
|
5059
|
+
),
|
|
5060
|
+
new Listenable("error").listen(
|
|
5061
|
+
() => {
|
|
5062
|
+
stopListenables();
|
|
5063
|
+
this.computedError = request.error;
|
|
5064
|
+
this.errored();
|
|
5065
|
+
},
|
|
5066
|
+
{ target: request }
|
|
5067
|
+
)
|
|
5068
|
+
], stopListenables = () => this.stopListenables(listenables);
|
|
5069
|
+
this.listenables.push(...listenables);
|
|
5070
|
+
return this;
|
|
5071
|
+
}
|
|
5072
|
+
operating() {
|
|
5073
|
+
this.computedStatus = "operating";
|
|
5074
|
+
}
|
|
5075
|
+
operated() {
|
|
5076
|
+
this.computedStatus = "operated";
|
|
5077
|
+
}
|
|
5078
|
+
errored() {
|
|
5079
|
+
this.computedStatus = "errored";
|
|
5080
|
+
}
|
|
5081
|
+
add(descriptor) {
|
|
5082
|
+
return this.operate([{ ...descriptor, operation: "add" }]);
|
|
5083
|
+
}
|
|
5084
|
+
put(descriptor) {
|
|
5085
|
+
return this.operate([{ ...descriptor, operation: "put" }]);
|
|
5086
|
+
}
|
|
5087
|
+
get(descriptor) {
|
|
5088
|
+
return this.operate([{ ...descriptor, operation: "get" }]);
|
|
5089
|
+
}
|
|
5090
|
+
getKey(descriptor) {
|
|
5091
|
+
return this.operate([{ ...descriptor, operation: "getKey" }]);
|
|
5092
|
+
}
|
|
5093
|
+
getAll(descriptor) {
|
|
5094
|
+
return this.operate([{ ...descriptor, operation: "getAll" }]);
|
|
5095
|
+
}
|
|
5096
|
+
getAllKeys(descriptor) {
|
|
5097
|
+
return this.operate([{ ...descriptor, operation: "getAllKeys" }]);
|
|
5098
|
+
}
|
|
5099
|
+
getAllRecords(descriptor) {
|
|
5100
|
+
return this.operate([{ ...descriptor, operation: "getAllRecords" }]);
|
|
5101
|
+
}
|
|
5102
|
+
delete(descriptor) {
|
|
5103
|
+
return this.operate([{ ...descriptor, operation: "delete" }]);
|
|
5104
|
+
}
|
|
5105
|
+
clear(descriptor) {
|
|
5106
|
+
return this.operate([{ ...descriptor, operation: "clear" }]);
|
|
5107
|
+
}
|
|
5108
|
+
count(descriptor) {
|
|
5109
|
+
return this.operate([{ ...descriptor, operation: "count" }]);
|
|
5110
|
+
}
|
|
5111
|
+
openCursor(descriptor) {
|
|
5112
|
+
return this.operate([{ ...descriptor, operation: "openCursor" }]);
|
|
5113
|
+
}
|
|
5114
|
+
openKeyCursor(descriptor) {
|
|
5115
|
+
return this.operate([{ ...descriptor, operation: "openKeyCursor" }]);
|
|
5116
|
+
}
|
|
5117
|
+
stop() {
|
|
5118
|
+
this.stopListenables(this.listenables);
|
|
5119
|
+
return this;
|
|
5120
|
+
}
|
|
5121
|
+
stopListenables(listenables) {
|
|
5122
|
+
for (const listenable of listenables) listenable.stop();
|
|
5123
|
+
this.listenables = createFilter(
|
|
5124
|
+
(l) => !lazyCollections.includes(l)(listenables)
|
|
5125
|
+
)(this.listenables);
|
|
5126
|
+
}
|
|
5127
|
+
}
|
|
5128
|
+
|
|
5129
|
+
var __defProp$3 = Object.defineProperty;
|
|
5130
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5131
|
+
var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5278
5132
|
const defaultOptions$1 = {
|
|
5279
5133
|
initialPicks: []
|
|
5280
5134
|
};
|
|
@@ -5284,33 +5138,36 @@ const defaultPickOptions = {
|
|
|
5284
5138
|
};
|
|
5285
5139
|
class Pickable {
|
|
5286
5140
|
constructor(array, options = {}) {
|
|
5141
|
+
__publicField$3(this, "computedStatus");
|
|
5142
|
+
__publicField$3(this, "computedArray");
|
|
5143
|
+
__publicField$3(this, "computedPicks");
|
|
5144
|
+
__publicField$3(this, "computedFirst");
|
|
5145
|
+
__publicField$3(this, "computedLast");
|
|
5146
|
+
__publicField$3(this, "toItems", createMap((index) => this.array[index]));
|
|
5147
|
+
__publicField$3(this, "computedMultiple");
|
|
5148
|
+
__publicField$3(this, "toPossiblePicks");
|
|
5287
5149
|
this.setArray(array);
|
|
5288
5150
|
this.pick(options.initialPicks ?? defaultOptions$1.initialPicks);
|
|
5289
5151
|
this.ready();
|
|
5290
5152
|
}
|
|
5291
|
-
computedStatus;
|
|
5292
5153
|
ready() {
|
|
5293
5154
|
this.computedStatus = "ready";
|
|
5294
5155
|
}
|
|
5295
|
-
computedArray;
|
|
5296
5156
|
get array() {
|
|
5297
5157
|
return this.computedArray;
|
|
5298
5158
|
}
|
|
5299
5159
|
set array(array) {
|
|
5300
5160
|
this.setArray(array);
|
|
5301
5161
|
}
|
|
5302
|
-
computedPicks;
|
|
5303
5162
|
get picks() {
|
|
5304
5163
|
return this.computedPicks;
|
|
5305
5164
|
}
|
|
5306
5165
|
set picks(indices) {
|
|
5307
5166
|
this.pick(indices);
|
|
5308
5167
|
}
|
|
5309
|
-
computedFirst;
|
|
5310
5168
|
get first() {
|
|
5311
5169
|
return this.computedFirst;
|
|
5312
5170
|
}
|
|
5313
|
-
computedLast;
|
|
5314
5171
|
get last() {
|
|
5315
5172
|
return this.computedLast;
|
|
5316
5173
|
}
|
|
@@ -5323,15 +5180,12 @@ class Pickable {
|
|
|
5323
5180
|
get items() {
|
|
5324
5181
|
return this.toItems(this.picks);
|
|
5325
5182
|
}
|
|
5326
|
-
toItems = createMap((index) => this.array[index]);
|
|
5327
|
-
computedMultiple;
|
|
5328
5183
|
get multiple() {
|
|
5329
5184
|
return this.computedMultiple;
|
|
5330
5185
|
}
|
|
5331
5186
|
get status() {
|
|
5332
5187
|
return this.computedStatus;
|
|
5333
5188
|
}
|
|
5334
|
-
toPossiblePicks;
|
|
5335
5189
|
setArray(array) {
|
|
5336
5190
|
this.computedArray = array;
|
|
5337
5191
|
this.toPossiblePicks = createFilter((index) => index >= 0 && index < array.length);
|
|
@@ -5346,8 +5200,7 @@ class Pickable {
|
|
|
5346
5200
|
narrowIndices,
|
|
5347
5201
|
this.toPossiblePicks,
|
|
5348
5202
|
(possiblePicks) => {
|
|
5349
|
-
if (replace === "all")
|
|
5350
|
-
return allowsDuplicates ? possiblePicks : toUnique(possiblePicks);
|
|
5203
|
+
if (replace === "all") return allowsDuplicates ? possiblePicks : toUnique(possiblePicks);
|
|
5351
5204
|
const maybeWithoutDuplicates = allowsDuplicates ? possiblePicks : createFilter(
|
|
5352
5205
|
(possiblePick) => typeof lazyCollections.find((pick) => pick === possiblePick)(this.picks || []) !== "number"
|
|
5353
5206
|
)(possiblePicks);
|
|
@@ -5424,12 +5277,18 @@ function narrowIndices(indexOrIndices) {
|
|
|
5424
5277
|
}
|
|
5425
5278
|
const toUnique = createUnique();
|
|
5426
5279
|
|
|
5280
|
+
var __defProp$2 = Object.defineProperty;
|
|
5281
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5282
|
+
var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5427
5283
|
class Shareable {
|
|
5428
5284
|
constructor(shareData, options = {}) {
|
|
5285
|
+
__publicField$2(this, "computedStatus");
|
|
5286
|
+
__publicField$2(this, "computedCan");
|
|
5287
|
+
__publicField$2(this, "computedError");
|
|
5288
|
+
__publicField$2(this, "computedState");
|
|
5429
5289
|
this.setShareData(shareData);
|
|
5430
5290
|
this.ready();
|
|
5431
5291
|
}
|
|
5432
|
-
computedStatus;
|
|
5433
5292
|
ready() {
|
|
5434
5293
|
this.computedStatus = "ready";
|
|
5435
5294
|
}
|
|
@@ -5442,15 +5301,12 @@ class Shareable {
|
|
|
5442
5301
|
get status() {
|
|
5443
5302
|
return this.computedStatus;
|
|
5444
5303
|
}
|
|
5445
|
-
computedCan;
|
|
5446
5304
|
get can() {
|
|
5447
5305
|
return this.computedCan;
|
|
5448
5306
|
}
|
|
5449
|
-
computedError;
|
|
5450
5307
|
get error() {
|
|
5451
5308
|
return this.computedError;
|
|
5452
5309
|
}
|
|
5453
|
-
computedState;
|
|
5454
5310
|
setShareData(shareData) {
|
|
5455
5311
|
this.computedState = shareData;
|
|
5456
5312
|
this.computedCan = new Resolveable(async () => await navigator.canShare(shareData));
|
|
@@ -5478,14 +5334,22 @@ class Shareable {
|
|
|
5478
5334
|
}
|
|
5479
5335
|
}
|
|
5480
5336
|
|
|
5337
|
+
var __defProp$1 = Object.defineProperty;
|
|
5338
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5339
|
+
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5481
5340
|
const defaultOptions = {
|
|
5482
5341
|
kind: "local",
|
|
5483
5342
|
statusKeySuffix: " status"
|
|
5484
5343
|
};
|
|
5485
5344
|
class Storeable {
|
|
5486
|
-
kind;
|
|
5487
|
-
statusKeySuffix;
|
|
5488
5345
|
constructor(key, options = {}) {
|
|
5346
|
+
__publicField$1(this, "kind");
|
|
5347
|
+
__publicField$1(this, "statusKeySuffix");
|
|
5348
|
+
__publicField$1(this, "computedStatus");
|
|
5349
|
+
__publicField$1(this, "computedKey");
|
|
5350
|
+
__publicField$1(this, "computedStatusKey");
|
|
5351
|
+
__publicField$1(this, "computedString");
|
|
5352
|
+
__publicField$1(this, "computedError");
|
|
5489
5353
|
this.constructing();
|
|
5490
5354
|
this.kind = options.kind ?? defaultOptions.kind;
|
|
5491
5355
|
this.statusKeySuffix = options.statusKeySuffix ?? defaultOptions.statusKeySuffix;
|
|
@@ -5495,7 +5359,6 @@ class Storeable {
|
|
|
5495
5359
|
constructing() {
|
|
5496
5360
|
this.computedStatus = "constructing";
|
|
5497
5361
|
}
|
|
5498
|
-
computedStatus;
|
|
5499
5362
|
ready() {
|
|
5500
5363
|
this.computedStatus = "ready";
|
|
5501
5364
|
if (getDomAvailability() === "available") {
|
|
@@ -5533,8 +5396,6 @@ class Storeable {
|
|
|
5533
5396
|
get error() {
|
|
5534
5397
|
return this.computedError;
|
|
5535
5398
|
}
|
|
5536
|
-
computedKey;
|
|
5537
|
-
computedStatusKey;
|
|
5538
5399
|
setKey(key) {
|
|
5539
5400
|
let string;
|
|
5540
5401
|
switch (this.status) {
|
|
@@ -5560,8 +5421,6 @@ class Storeable {
|
|
|
5560
5421
|
}
|
|
5561
5422
|
return this;
|
|
5562
5423
|
}
|
|
5563
|
-
computedString;
|
|
5564
|
-
computedError;
|
|
5565
5424
|
store(string) {
|
|
5566
5425
|
try {
|
|
5567
5426
|
this.storage.setItem(this.key, string);
|
|
@@ -5599,6 +5458,363 @@ class Storeable {
|
|
|
5599
5458
|
}
|
|
5600
5459
|
}
|
|
5601
5460
|
|
|
5461
|
+
var __defProp = Object.defineProperty;
|
|
5462
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5463
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5464
|
+
class Transactable {
|
|
5465
|
+
constructor(name, options = {}) {
|
|
5466
|
+
__publicField(this, "computedStatus");
|
|
5467
|
+
__publicField(this, "listenables", []);
|
|
5468
|
+
__publicField(this, "computedDb");
|
|
5469
|
+
__publicField(this, "computedError");
|
|
5470
|
+
__publicField(this, "computedName");
|
|
5471
|
+
this.constructing();
|
|
5472
|
+
this.computedName = name;
|
|
5473
|
+
this.ready();
|
|
5474
|
+
}
|
|
5475
|
+
constructing() {
|
|
5476
|
+
this.computedStatus = "constructing";
|
|
5477
|
+
}
|
|
5478
|
+
ready() {
|
|
5479
|
+
this.computedStatus = "ready";
|
|
5480
|
+
}
|
|
5481
|
+
get name() {
|
|
5482
|
+
return this.computedName;
|
|
5483
|
+
}
|
|
5484
|
+
set name(name) {
|
|
5485
|
+
this.setName(name);
|
|
5486
|
+
}
|
|
5487
|
+
get db() {
|
|
5488
|
+
return this.computedDb;
|
|
5489
|
+
}
|
|
5490
|
+
get error() {
|
|
5491
|
+
return this.computedError;
|
|
5492
|
+
}
|
|
5493
|
+
get status() {
|
|
5494
|
+
return this.computedStatus;
|
|
5495
|
+
}
|
|
5496
|
+
setName(name) {
|
|
5497
|
+
this.stop();
|
|
5498
|
+
this.computedName = name;
|
|
5499
|
+
return this;
|
|
5500
|
+
}
|
|
5501
|
+
open(options = {}) {
|
|
5502
|
+
const { version } = options, status = this.status;
|
|
5503
|
+
this.opening();
|
|
5504
|
+
switch (status) {
|
|
5505
|
+
// IDB is not open-ish, IDB is not expected to open
|
|
5506
|
+
case "constructing":
|
|
5507
|
+
case "ready":
|
|
5508
|
+
case "openerrored":
|
|
5509
|
+
case "closed":
|
|
5510
|
+
case "deleted":
|
|
5511
|
+
case "closing":
|
|
5512
|
+
case "deleteerrored":
|
|
5513
|
+
case "deleting":
|
|
5514
|
+
this.requestOpen(options);
|
|
5515
|
+
return this;
|
|
5516
|
+
// IDB is not open-ish, IDB is expected to open
|
|
5517
|
+
case "opening":
|
|
5518
|
+
return this;
|
|
5519
|
+
// IDB is open-ish
|
|
5520
|
+
case "openblocked":
|
|
5521
|
+
case "opened":
|
|
5522
|
+
case "transacting":
|
|
5523
|
+
case "transacted":
|
|
5524
|
+
case "transacterrored":
|
|
5525
|
+
case "transactaborted":
|
|
5526
|
+
case "upgradeneeded":
|
|
5527
|
+
if (version ?? -1 > this.db.version) {
|
|
5528
|
+
this.requestOpen(options);
|
|
5529
|
+
return this;
|
|
5530
|
+
}
|
|
5531
|
+
this[status]();
|
|
5532
|
+
return this;
|
|
5533
|
+
}
|
|
5534
|
+
}
|
|
5535
|
+
requestOpen(options) {
|
|
5536
|
+
const { version, upgradeEffect } = options, request = indexedDB.open(this.computedName, version), listenables = [
|
|
5537
|
+
new Listenable("success").listen(
|
|
5538
|
+
() => {
|
|
5539
|
+
stopListenables();
|
|
5540
|
+
switch (this.status) {
|
|
5541
|
+
case "closing":
|
|
5542
|
+
request.result.close();
|
|
5543
|
+
this.closed();
|
|
5544
|
+
return;
|
|
5545
|
+
case "deleting":
|
|
5546
|
+
const db = request.result;
|
|
5547
|
+
db.close();
|
|
5548
|
+
this.requestDelete();
|
|
5549
|
+
return;
|
|
5550
|
+
default:
|
|
5551
|
+
this.computedDb = request.result;
|
|
5552
|
+
this.opened();
|
|
5553
|
+
return;
|
|
5554
|
+
}
|
|
5555
|
+
},
|
|
5556
|
+
{ target: request }
|
|
5557
|
+
),
|
|
5558
|
+
new Listenable("blocked").listen(
|
|
5559
|
+
() => {
|
|
5560
|
+
switch (this.status) {
|
|
5561
|
+
case "closing":
|
|
5562
|
+
request.result.close();
|
|
5563
|
+
this.closed();
|
|
5564
|
+
stopListenables();
|
|
5565
|
+
return;
|
|
5566
|
+
case "deleting":
|
|
5567
|
+
const db = request.result;
|
|
5568
|
+
db.close();
|
|
5569
|
+
this.requestDelete();
|
|
5570
|
+
stopListenables();
|
|
5571
|
+
return;
|
|
5572
|
+
default:
|
|
5573
|
+
this.openblocked();
|
|
5574
|
+
return;
|
|
5575
|
+
}
|
|
5576
|
+
},
|
|
5577
|
+
{ target: request }
|
|
5578
|
+
),
|
|
5579
|
+
new Listenable("error").listen(
|
|
5580
|
+
() => {
|
|
5581
|
+
stopListenables();
|
|
5582
|
+
switch (this.status) {
|
|
5583
|
+
case "closing":
|
|
5584
|
+
request.result?.close();
|
|
5585
|
+
this.closed();
|
|
5586
|
+
return;
|
|
5587
|
+
case "deleting":
|
|
5588
|
+
const db = request.result;
|
|
5589
|
+
db?.close();
|
|
5590
|
+
this.requestDelete();
|
|
5591
|
+
return;
|
|
5592
|
+
default:
|
|
5593
|
+
this.computedError = request.error;
|
|
5594
|
+
this.openerrored();
|
|
5595
|
+
return;
|
|
5596
|
+
}
|
|
5597
|
+
},
|
|
5598
|
+
{ target: request }
|
|
5599
|
+
),
|
|
5600
|
+
new Listenable("upgradeneeded").listen(
|
|
5601
|
+
() => {
|
|
5602
|
+
switch (this.status) {
|
|
5603
|
+
case "closing":
|
|
5604
|
+
request.result.close();
|
|
5605
|
+
return;
|
|
5606
|
+
case "deleting":
|
|
5607
|
+
const db = request.result;
|
|
5608
|
+
db.close();
|
|
5609
|
+
this.requestDelete();
|
|
5610
|
+
return;
|
|
5611
|
+
default:
|
|
5612
|
+
this.computedDb = request.result;
|
|
5613
|
+
this.upgradeneeded();
|
|
5614
|
+
upgradeEffect?.(request.result);
|
|
5615
|
+
return;
|
|
5616
|
+
}
|
|
5617
|
+
},
|
|
5618
|
+
{ target: request }
|
|
5619
|
+
)
|
|
5620
|
+
], stopListenables = () => this.stopListenables(listenables);
|
|
5621
|
+
this.listenables.push(...listenables);
|
|
5622
|
+
}
|
|
5623
|
+
opening() {
|
|
5624
|
+
this.computedStatus = "opening";
|
|
5625
|
+
}
|
|
5626
|
+
opened() {
|
|
5627
|
+
this.computedStatus = "opened";
|
|
5628
|
+
}
|
|
5629
|
+
openblocked() {
|
|
5630
|
+
this.computedStatus = "openblocked";
|
|
5631
|
+
}
|
|
5632
|
+
openerrored() {
|
|
5633
|
+
this.computedStatus = "openerrored";
|
|
5634
|
+
}
|
|
5635
|
+
upgradeneeded() {
|
|
5636
|
+
this.computedStatus = "upgradeneeded";
|
|
5637
|
+
}
|
|
5638
|
+
transact(effect, options = {}) {
|
|
5639
|
+
const {
|
|
5640
|
+
storeNames = [],
|
|
5641
|
+
mode = "readonly",
|
|
5642
|
+
...transactionOptions
|
|
5643
|
+
} = options, transaction = this.db.transaction(storeNames, mode, transactionOptions), listenables = [
|
|
5644
|
+
new Listenable("complete").listen(
|
|
5645
|
+
() => {
|
|
5646
|
+
switch (this.status) {
|
|
5647
|
+
case "closing":
|
|
5648
|
+
this.closed();
|
|
5649
|
+
break;
|
|
5650
|
+
default:
|
|
5651
|
+
this.transacted();
|
|
5652
|
+
break;
|
|
5653
|
+
}
|
|
5654
|
+
stopListenables();
|
|
5655
|
+
},
|
|
5656
|
+
{ target: transaction }
|
|
5657
|
+
),
|
|
5658
|
+
new Listenable("error").listen(
|
|
5659
|
+
() => {
|
|
5660
|
+
this.transacterrored();
|
|
5661
|
+
this.computedError = transaction.error;
|
|
5662
|
+
stopListenables();
|
|
5663
|
+
},
|
|
5664
|
+
{ target: transaction }
|
|
5665
|
+
),
|
|
5666
|
+
new Listenable("abort").listen(
|
|
5667
|
+
() => {
|
|
5668
|
+
this.transactaborted();
|
|
5669
|
+
stopListenables();
|
|
5670
|
+
},
|
|
5671
|
+
{ target: transaction }
|
|
5672
|
+
)
|
|
5673
|
+
], stopListenables = () => this.stopListenables(listenables);
|
|
5674
|
+
this.listenables.push(...listenables);
|
|
5675
|
+
this.transacting();
|
|
5676
|
+
effect(transaction);
|
|
5677
|
+
return this;
|
|
5678
|
+
}
|
|
5679
|
+
transacted() {
|
|
5680
|
+
this.computedStatus = "transacted";
|
|
5681
|
+
}
|
|
5682
|
+
transacterrored() {
|
|
5683
|
+
this.computedStatus = "transacterrored";
|
|
5684
|
+
}
|
|
5685
|
+
transactaborted() {
|
|
5686
|
+
this.computedStatus = "transactaborted";
|
|
5687
|
+
}
|
|
5688
|
+
transacting() {
|
|
5689
|
+
this.computedStatus = "transacting";
|
|
5690
|
+
}
|
|
5691
|
+
readonly(effect, options = {}) {
|
|
5692
|
+
return this.transact(effect, { ...options, mode: "readonly" });
|
|
5693
|
+
}
|
|
5694
|
+
readwrite(effect, options = {}) {
|
|
5695
|
+
return this.transact(effect, { ...options, mode: "readwrite" });
|
|
5696
|
+
}
|
|
5697
|
+
versionchange(effect, options = {}) {
|
|
5698
|
+
return this.transact(effect, { ...options, mode: "versionchange" });
|
|
5699
|
+
}
|
|
5700
|
+
close() {
|
|
5701
|
+
const status = this.status;
|
|
5702
|
+
this.closing();
|
|
5703
|
+
switch (status) {
|
|
5704
|
+
// IDB is not closed, IDB is not expected to close
|
|
5705
|
+
case "opened":
|
|
5706
|
+
case "transacting":
|
|
5707
|
+
case "transacted":
|
|
5708
|
+
case "transacterrored":
|
|
5709
|
+
case "transactaborted":
|
|
5710
|
+
this.db.close();
|
|
5711
|
+
this.closed();
|
|
5712
|
+
return this;
|
|
5713
|
+
// IDB is not closed, IDB is expected to close & update status
|
|
5714
|
+
case "opening":
|
|
5715
|
+
case "openblocked":
|
|
5716
|
+
case "upgradeneeded":
|
|
5717
|
+
case "closing":
|
|
5718
|
+
return this;
|
|
5719
|
+
// IDB is expected to close & delete
|
|
5720
|
+
case "deleting":
|
|
5721
|
+
this.deleting();
|
|
5722
|
+
return this;
|
|
5723
|
+
// IDB is closed
|
|
5724
|
+
case "constructing":
|
|
5725
|
+
case "ready":
|
|
5726
|
+
case "openerrored":
|
|
5727
|
+
case "closed":
|
|
5728
|
+
case "deleted":
|
|
5729
|
+
case "deleteerrored":
|
|
5730
|
+
this.closed();
|
|
5731
|
+
return this;
|
|
5732
|
+
}
|
|
5733
|
+
}
|
|
5734
|
+
closing() {
|
|
5735
|
+
this.computedStatus = "closing";
|
|
5736
|
+
}
|
|
5737
|
+
closed() {
|
|
5738
|
+
this.computedStatus = "closed";
|
|
5739
|
+
}
|
|
5740
|
+
delete() {
|
|
5741
|
+
const status = this.status;
|
|
5742
|
+
this.deleting();
|
|
5743
|
+
switch (status) {
|
|
5744
|
+
// IDB is neither closed nor deleted, IDB is not expected to close nor delete
|
|
5745
|
+
case "opened":
|
|
5746
|
+
case "transacting":
|
|
5747
|
+
case "transacted":
|
|
5748
|
+
case "transacterrored":
|
|
5749
|
+
case "transactaborted":
|
|
5750
|
+
this.db.close();
|
|
5751
|
+
this.closed();
|
|
5752
|
+
this.requestDelete();
|
|
5753
|
+
return this;
|
|
5754
|
+
// IDB is neither closed nor deleted, IDB is expected to close & delete & update status
|
|
5755
|
+
case "opening":
|
|
5756
|
+
case "openblocked":
|
|
5757
|
+
case "upgradeneeded":
|
|
5758
|
+
case "deleting":
|
|
5759
|
+
return this;
|
|
5760
|
+
// IDB is closed, not deleted, IDB is not expected to delete
|
|
5761
|
+
case "constructing":
|
|
5762
|
+
case "ready":
|
|
5763
|
+
case "openerrored":
|
|
5764
|
+
case "closed":
|
|
5765
|
+
case "deleteerrored":
|
|
5766
|
+
this.requestDelete();
|
|
5767
|
+
return this;
|
|
5768
|
+
// IDB is closed & deleted
|
|
5769
|
+
case "deleted":
|
|
5770
|
+
this.deleted();
|
|
5771
|
+
return this;
|
|
5772
|
+
// Precluded
|
|
5773
|
+
case "closing":
|
|
5774
|
+
return this;
|
|
5775
|
+
}
|
|
5776
|
+
}
|
|
5777
|
+
requestDelete() {
|
|
5778
|
+
const request = indexedDB.deleteDatabase(this.computedName), listenables = [
|
|
5779
|
+
new Listenable("success").listen(
|
|
5780
|
+
() => {
|
|
5781
|
+
this.deleted();
|
|
5782
|
+
stopListenables();
|
|
5783
|
+
},
|
|
5784
|
+
{ target: request }
|
|
5785
|
+
),
|
|
5786
|
+
new Listenable("error").listen(
|
|
5787
|
+
() => {
|
|
5788
|
+
this.computedError = request.error;
|
|
5789
|
+
this.deleteerrored();
|
|
5790
|
+
stopListenables();
|
|
5791
|
+
},
|
|
5792
|
+
{ target: request }
|
|
5793
|
+
)
|
|
5794
|
+
], stopListenables = () => this.stopListenables(listenables);
|
|
5795
|
+
this.listenables.push(...listenables);
|
|
5796
|
+
}
|
|
5797
|
+
deleting() {
|
|
5798
|
+
this.computedStatus = "deleting";
|
|
5799
|
+
}
|
|
5800
|
+
deleteerrored() {
|
|
5801
|
+
this.computedStatus = "deleteerrored";
|
|
5802
|
+
}
|
|
5803
|
+
deleted() {
|
|
5804
|
+
this.computedStatus = "deleted";
|
|
5805
|
+
}
|
|
5806
|
+
stop() {
|
|
5807
|
+
this.stopListenables(this.listenables);
|
|
5808
|
+
return this;
|
|
5809
|
+
}
|
|
5810
|
+
stopListenables(listenables) {
|
|
5811
|
+
for (const listenable of listenables) listenable.stop();
|
|
5812
|
+
this.listenables = createFilter(
|
|
5813
|
+
(l) => !lazyCollections.includes(l)(listenables)
|
|
5814
|
+
)(this.listenables);
|
|
5815
|
+
}
|
|
5816
|
+
}
|
|
5817
|
+
|
|
5602
5818
|
exports.Animateable = Animateable;
|
|
5603
5819
|
exports.Broadcastable = Broadcastable;
|
|
5604
5820
|
exports.Compareable = Compareable;
|
|
@@ -5609,22 +5825,21 @@ exports.Drawable = Drawable;
|
|
|
5609
5825
|
exports.Fetchable = Fetchable;
|
|
5610
5826
|
exports.Fullscreenable = Fullscreenable;
|
|
5611
5827
|
exports.Grantable = Grantable;
|
|
5612
|
-
exports.Hover = Hover;
|
|
5613
5828
|
exports.Keychord = Keychord;
|
|
5614
5829
|
exports.Keypress = Keypress;
|
|
5615
5830
|
exports.Keyrelease = Keyrelease;
|
|
5616
5831
|
exports.Konami = Konami;
|
|
5617
5832
|
exports.Listenable = Listenable;
|
|
5618
|
-
exports.Mousepress = Mousepress;
|
|
5619
|
-
exports.Mouserelease = Mouserelease;
|
|
5620
5833
|
exports.Navigateable = Navigateable;
|
|
5834
|
+
exports.Operateable = Operateable;
|
|
5621
5835
|
exports.Pickable = Pickable;
|
|
5836
|
+
exports.Pointerhover = Pointerhover;
|
|
5837
|
+
exports.Pointerpress = Pointerpress;
|
|
5622
5838
|
exports.Recognizeable = Recognizeable;
|
|
5623
5839
|
exports.Resolveable = Resolveable;
|
|
5624
5840
|
exports.Shareable = Shareable;
|
|
5625
5841
|
exports.Storeable = Storeable;
|
|
5626
|
-
exports.
|
|
5627
|
-
exports.Touchrelease = Touchrelease;
|
|
5842
|
+
exports.Transactable = Transactable;
|
|
5628
5843
|
exports.createArrayFormat = createFormat$2;
|
|
5629
5844
|
exports.createAssociativeArrayClear = createClear$2;
|
|
5630
5845
|
exports.createAssociativeArrayDelete = createDelete$2;
|
|
@@ -5650,6 +5865,7 @@ exports.createDecisionTreeSteps = createDepthFirstSteps$1;
|
|
|
5650
5865
|
exports.createDecisionTreeTree = createTree$1;
|
|
5651
5866
|
exports.createDeepEqual = createDeepEqual;
|
|
5652
5867
|
exports.createDeepMerge = createDeepMerge;
|
|
5868
|
+
exports.createDefineObjectStore = createDefineObjectStore;
|
|
5653
5869
|
exports.createDelete = createDelete$1;
|
|
5654
5870
|
exports.createDepthPathConfig = createDepthPathConfig;
|
|
5655
5871
|
exports.createDetermine = createDetermine;
|
|
@@ -5681,7 +5897,6 @@ exports.createGraph = createGraph;
|
|
|
5681
5897
|
exports.createGreater = createGreater;
|
|
5682
5898
|
exports.createGreaterOrEqual = createGreaterOrEqual;
|
|
5683
5899
|
exports.createHas = createHas;
|
|
5684
|
-
exports.createHover = createHover;
|
|
5685
5900
|
exports.createIncoming = createIncoming;
|
|
5686
5901
|
exports.createIndegree = createIndegree;
|
|
5687
5902
|
exports.createInsert = createInsert;
|
|
@@ -5697,8 +5912,6 @@ exports.createList = createList;
|
|
|
5697
5912
|
exports.createMap = createMap;
|
|
5698
5913
|
exports.createMapAsync = createMapAsync;
|
|
5699
5914
|
exports.createMix = createMix;
|
|
5700
|
-
exports.createMousepress = createMousepress;
|
|
5701
|
-
exports.createMouserelease = createMouserelease;
|
|
5702
5915
|
exports.createNumber = createNumber;
|
|
5703
5916
|
exports.createNumberFormat = createFormat;
|
|
5704
5917
|
exports.createOmit = createOmit;
|
|
@@ -5706,6 +5919,8 @@ exports.createOnlyChild = createOnlyChild;
|
|
|
5706
5919
|
exports.createOutdegree = createOutdegree;
|
|
5707
5920
|
exports.createOutgoing = createOutgoing;
|
|
5708
5921
|
exports.createPick = createPick;
|
|
5922
|
+
exports.createPointerhover = createPointerhover;
|
|
5923
|
+
exports.createPointerpress = createPointerpress;
|
|
5709
5924
|
exports.createReduce = createReduce;
|
|
5710
5925
|
exports.createReduceAsync = createReduceAsync;
|
|
5711
5926
|
exports.createRemove = createRemove;
|
|
@@ -5725,13 +5940,12 @@ exports.createSort = createSort;
|
|
|
5725
5940
|
exports.createSwap = createSwap;
|
|
5726
5941
|
exports.createTerminal = createTerminal;
|
|
5727
5942
|
exports.createTotalSiblings = createTotalSiblings;
|
|
5728
|
-
exports.createTouchpress = createTouchpress;
|
|
5729
|
-
exports.createTouchrelease = createTouchrelease;
|
|
5730
5943
|
exports.createTreeFind = createFind;
|
|
5731
5944
|
exports.createTry = createTry;
|
|
5732
5945
|
exports.createTryAsync = createTryAsync;
|
|
5733
5946
|
exports.createUnique = createUnique;
|
|
5734
5947
|
exports.createValue = createValue$1;
|
|
5948
|
+
exports.defineAnimateableKeyframes = defineAnimateableKeyframes;
|
|
5735
5949
|
exports.defineAssociativeArray = defineAssociativeArray;
|
|
5736
5950
|
exports.defineGraph = defineGraph;
|
|
5737
5951
|
exports.defineGraphAsync = defineGraphAsync;
|