@quoreadmin/ui 1.10.0 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index105.js +2 -2
- package/dist/index111.js +1 -1
- package/dist/index115.js +2 -2
- package/dist/index119.js +3 -3
- package/dist/index131.js +91 -83
- package/dist/{index135.js → index136.js} +1 -1
- package/dist/{index137.js → index138.js} +2 -2
- package/dist/{index146.js → index147.js} +3 -3
- package/dist/{index148.js → index149.js} +1 -1
- package/dist/{index150.js → index151.js} +6 -6
- package/dist/{index161.js → index162.js} +1 -1
- package/dist/{index164.js → index165.js} +1 -1
- package/dist/{index168.js → index169.js} +9 -9
- package/dist/index172.js +111 -492
- package/dist/index173.js +471 -5498
- package/dist/index174.js +5511 -80
- package/dist/index175.js +86 -856
- package/dist/index176.js +844 -21
- package/dist/index177.js +23 -265
- package/dist/index178.js +256 -126
- package/dist/index179.js +146 -1195
- package/dist/index180.js +1139 -712
- package/dist/index181.js +704 -1240
- package/dist/index182.js +1280 -248
- package/dist/index183.js +266 -96
- package/dist/index184.js +106 -2
- package/dist/index185.js +2 -1376
- package/dist/index186.js +1378 -0
- package/dist/index188.js +12 -12
- package/dist/index189.js +10 -10
- package/dist/index190.js +12 -12
- package/dist/index191.js +14 -21
- package/dist/index192.js +23 -757
- package/dist/index193.js +759 -1144
- package/dist/index194.js +1144 -1234
- package/dist/index195.js +1205 -11248
- package/dist/index196.js +11277 -36
- package/dist/index197.js +36 -44
- package/dist/index198.js +42 -1226
- package/dist/index199.js +1230 -0
- package/dist/index201.js +5830 -99
- package/dist/index202.js +188 -16
- package/dist/index203.js +25 -8
- package/dist/index204.js +16 -76
- package/dist/index205.js +74 -249
- package/dist/index206.js +229 -13660
- package/dist/index207.js +13684 -27
- package/dist/index208.js +26 -62
- package/dist/index209.js +40 -215
- package/dist/index210.js +206 -279
- package/dist/index211.js +281 -265
- package/dist/index212.js +293 -31
- package/dist/index213.js +81 -109
- package/dist/index214.js +404 -33
- package/dist/index215.js +22 -26
- package/dist/index216.js +122 -31
- package/dist/index217.js +35 -48
- package/dist/index218.js +80 -43
- package/dist/index219.js +19 -3
- package/dist/index220.js +20 -9
- package/dist/index221.js +19 -18
- package/dist/index222.js +20 -10
- package/dist/index223.js +20 -10
- package/dist/index224.js +3633 -36
- package/dist/index225.js +55 -21
- package/dist/index226.js +73 -84
- package/dist/index227.js +50 -405
- package/dist/index228.js +214 -21
- package/dist/index229.js +10 -161
- package/dist/index230.js +57 -20
- package/dist/index231.js +61 -20
- package/dist/index232.js +54 -22
- package/dist/index233.js +66 -190
- package/dist/index234.js +714 -58
- package/dist/index235.js +39 -31
- package/dist/index236.js +60 -36
- package/dist/index237.js +11 -161
- package/dist/index238.js +681 -204
- package/dist/index239.js +819 -36
- package/dist/index240.js +33 -10
- package/dist/index241.js +109 -120
- package/dist/index242.js +34 -36
- package/dist/index243.js +26 -80
- package/dist/index244.js +35 -19
- package/dist/index245.js +50 -19
- package/dist/index246.js +42 -19
- package/dist/index247.js +3 -19
- package/dist/index248.js +9 -22
- package/dist/index249.js +18 -21
- package/dist/index250.js +10 -20
- package/dist/index251.js +9 -835
- package/dist/index252.js +34 -697
- package/dist/index253.js +21 -176
- package/dist/index254.js +160 -21
- package/dist/index255.js +228 -20
- package/dist/index256.js +36 -19
- package/dist/index257.js +10 -3
- package/dist/index258.js +21 -186
- package/dist/index259.js +21 -132
- package/dist/index260.js +20 -1223
- package/dist/index261.js +836 -20
- package/dist/index262.js +701 -21
- package/dist/index263.js +176 -22
- package/dist/index264.js +15 -22
- package/dist/index265.js +7 -7
- package/dist/index266.js +13 -13
- package/dist/index267.js +2 -1
- package/dist/index268.js +187 -2
- package/dist/index269.js +120 -3623
- package/dist/index270.js +155 -49
- package/dist/index271.js +1214 -68
- package/dist/index272.js +20 -52
- package/dist/index273.js +22 -215
- package/dist/index274.js +20 -10
- package/dist/index275.js +22 -57
- package/dist/index276.js +29 -61
- package/dist/index277.js +20 -54
- package/dist/index278.js +20 -75
- package/dist/index279.js +2 -726
- package/dist/index280.js +2 -42
- package/dist/index281.js +22 -64
- package/dist/index282.js +199 -11
- package/dist/index283.js +63 -698
- package/dist/index284.js +33 -819
- package/dist/index285.js +34 -247
- package/dist/index286.js +253 -8
- package/dist/index287.js +8 -138
- package/dist/index288.js +123 -68
- package/dist/index289.js +83 -3
- package/dist/index290.js +2 -27
- package/dist/index291.js +71 -46
- package/dist/index292.js +1528 -73
- package/dist/index293.js +386 -26
- package/dist/index294.js +2731 -22
- package/dist/index295.js +85 -21
- package/dist/index296.js +3792 -16
- package/dist/index297.js +60 -17
- package/dist/index298.js +15 -23
- package/dist/index299.js +84 -2
- package/dist/index300.js +190 -250
- package/dist/index301.js +244 -4
- package/dist/index302.js +3 -140
- package/dist/index303.js +24 -70
- package/dist/index304.js +50 -83
- package/dist/index305.js +25 -28
- package/dist/index306.js +21 -15
- package/dist/index307.js +21 -74
- package/dist/index308.js +16 -4
- package/dist/index309.js +17 -2
- package/dist/index310.js +22 -82
- package/dist/index311.js +77 -51
- package/dist/index312.js +21 -5
- package/dist/index313.js +934 -4
- package/dist/index314.js +21 -178
- package/dist/index315.js +19 -62
- package/dist/index316.js +20 -75
- package/dist/index317.js +69 -1534
- package/dist/index318.js +19 -386
- package/dist/index319.js +19 -2731
- package/dist/index320.js +21 -85
- package/dist/index321.js +22 -3792
- package/dist/index322.js +63 -60
- package/dist/index323.js +256 -73
- package/dist/index324.js +5 -21
- package/dist/index325.js +130 -925
- package/dist/index326.js +72 -21
- package/dist/index327.js +85 -18
- package/dist/index328.js +28 -19
- package/dist/index329.js +15 -68
- package/dist/index330.js +75 -19
- package/dist/index331.js +4 -19
- package/dist/index332.js +2 -22
- package/dist/index333.js +82 -21
- package/dist/index334.js +53 -63
- package/dist/index335.js +6 -15
- package/dist/index336.js +4 -83
- package/dist/index337.js +165 -188
- package/dist/index338.js +56 -239
- package/dist/index339.js +75 -9
- package/dist/index340.js +36 -12
- package/dist/index341.js +8 -54
- package/dist/index342.js +12 -11
- package/dist/index343.js +52 -11
- package/dist/index344.js +9 -55
- package/dist/index345.js +13 -51
- package/dist/index346.js +51 -24
- package/dist/index347.js +52 -2
- package/dist/index348.js +31 -5
- package/dist/index349.js +2 -2
- package/dist/index350.js +4 -22
- package/dist/index351.js +2 -41
- package/dist/index352.js +23 -2
- package/dist/index353.js +40 -10
- package/dist/index354.js +2 -20
- package/dist/index355.js +10 -9
- package/dist/index356.js +20 -10
- package/dist/index357.js +9 -16
- package/dist/index358.js +10 -2
- package/dist/index359.js +16 -8
- package/dist/index360.js +2 -10
- package/dist/index361.js +8 -13
- package/dist/index362.js +9 -36
- package/dist/index363.js +14 -19
- package/dist/index364.js +19 -56
- package/dist/index365.js +19 -28
- package/dist/index366.js +62 -5
- package/dist/index367.js +36 -51
- package/dist/index368.js +19 -7
- package/dist/index369.js +56 -11
- package/dist/index370.js +29 -7
- package/dist/index371.js +6 -27
- package/dist/index372.js +52 -2
- package/dist/index373.js +6 -69
- package/dist/index374.js +11 -166
- package/dist/index375.js +7 -20
- package/dist/index376.js +28 -20
- package/dist/index377.js +2 -64
- package/dist/index378.js +70 -37
- package/dist/index379.js +166 -12
- package/dist/index38.js +3 -2
- package/dist/index380.js +101 -7
- package/dist/index381.js +90 -30
- package/dist/index382.js +98 -11
- package/dist/index383.js +17 -4
- package/dist/index384.js +30 -3
- package/dist/index385.js +10 -11
- package/dist/index386.js +3 -4
- package/dist/index387.js +4 -33
- package/dist/index388.js +12 -30
- package/dist/index389.js +7 -28
- package/dist/index39.js +1 -1
- package/dist/index390.js +12 -61
- package/dist/index391.js +4 -100
- package/dist/index392.js +33 -17
- package/dist/index393.js +31 -91
- package/dist/index394.js +27 -97
- package/dist/index395.js +61 -3
- package/dist/index396.js +3 -2
- package/dist/index397.js +2 -2
- package/dist/index398.js +2 -17
- package/dist/index399.js +15 -11
- package/dist/index40.js +1 -1
- package/dist/index400.js +13 -6
- package/dist/index401.js +6 -32
- package/dist/index402.js +34 -0
- package/dist/index41.js +1 -1
- package/dist/index42.js +1 -1
- package/dist/index43.js +1 -1
- package/dist/index44.js +1 -1
- package/dist/index45.js +1 -1
- package/dist/index46.js +1 -1
- package/dist/index47.js +1 -1
- package/dist/index48.js +1 -1
- package/dist/index49.js +2 -2
- package/dist/index50.js +1 -1
- package/dist/index51.js +2 -2
- package/dist/index52.js +1 -1
- package/dist/index53.js +1 -1
- package/dist/index54.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index59.js +1 -1
- package/dist/index61.js +5 -5
- package/dist/index62.js +1 -1
- package/dist/index74.js +2 -2
- package/dist/index78.js +1 -1
- package/dist/index83.js +1 -1
- package/dist/index88.js +1 -1
- package/dist/index90.js +3 -3
- package/dist/index92.js +2 -2
- package/dist/index98.js +2 -2
- package/dist/src/components/page-layout/page-layout.vue.d.ts +3 -0
- package/package.json +1 -1
- package/dist/index171.js +0 -116
- package/dist/index187.js +0 -20
- package/dist/index200.js +0 -5940
- /package/dist/{index133.js → index134.js} +0 -0
- /package/dist/{index140.js → index141.js} +0 -0
- /package/dist/{index142.js → index143.js} +0 -0
- /package/dist/{index144.js → index145.js} +0 -0
- /package/dist/{index152.js → index153.js} +0 -0
- /package/dist/{index154.js → index155.js} +0 -0
- /package/dist/{index156.js → index157.js} +0 -0
- /package/dist/{index159.js → index160.js} +0 -0
- /package/dist/{index166.js → index167.js} +0 -0
package/dist/index181.js
CHANGED
|
@@ -1,1310 +1,774 @@
|
|
|
1
|
-
import st from "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { inertia as mt } from "./index217.js";
|
|
8
|
-
import { animate as bt } from "./index218.js";
|
|
9
|
-
import { velocityPerSecond as ht } from "./index219.js";
|
|
10
|
-
import { number as vt, alpha as C, scale as j } from "./index220.js";
|
|
11
|
-
import { filter as P } from "./index221.js";
|
|
12
|
-
import { px as c, progressPercentage as F, degrees as O } from "./index222.js";
|
|
13
|
-
import { color as b } from "./index223.js";
|
|
14
|
-
import { cubicBezier as gt } from "./index224.js";
|
|
15
|
-
import { bounceOut as Ot, bounceInOut as Tt, bounceIn as At, anticipate as xt, backOut as jt, backInOut as Vt, backIn as St, circOut as Ct, circInOut as Et, circIn as Nt, easeOut as Pt, easeInOut as _t, easeIn as wt, linear as Rt } from "./index225.js";
|
|
16
|
-
const R = {};
|
|
17
|
-
class Mt {
|
|
18
|
-
subscriptions = /* @__PURE__ */ new Set();
|
|
19
|
-
add(e) {
|
|
20
|
-
return this.subscriptions.add(e), () => this.subscriptions.delete(e);
|
|
21
|
-
}
|
|
22
|
-
notify(e, i, r) {
|
|
23
|
-
if (this.subscriptions.size)
|
|
24
|
-
for (const n of this.subscriptions) n(e, i, r);
|
|
25
|
-
}
|
|
26
|
-
clear() {
|
|
27
|
-
this.subscriptions.clear();
|
|
1
|
+
import { ref as Z, getCurrentInstance as tt, onMounted as et, onUnmounted as st, unref as w, nextTick as nt } from "vue";
|
|
2
|
+
function rt() {
|
|
3
|
+
try {
|
|
4
|
+
return "constructor" in GestureEvent;
|
|
5
|
+
} catch {
|
|
6
|
+
return !1;
|
|
28
7
|
}
|
|
29
8
|
}
|
|
30
|
-
function
|
|
31
|
-
return
|
|
9
|
+
function j() {
|
|
10
|
+
return typeof window < "u" && "ontouchstart" in window;
|
|
32
11
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* The current state of the `MotionValue`.
|
|
36
|
-
*/
|
|
37
|
-
current;
|
|
38
|
-
/**
|
|
39
|
-
* The previous state of the `MotionValue`.
|
|
40
|
-
*/
|
|
41
|
-
prev;
|
|
42
|
-
/**
|
|
43
|
-
* Duration, in milliseconds, since last updating frame.
|
|
44
|
-
*/
|
|
45
|
-
timeDelta = 0;
|
|
46
|
-
/**
|
|
47
|
-
* Timestamp of the last time this `MotionValue` was updated.
|
|
48
|
-
*/
|
|
49
|
-
lastUpdated = 0;
|
|
50
|
-
/**
|
|
51
|
-
* Functions to notify when the `MotionValue` updates.
|
|
52
|
-
*/
|
|
53
|
-
updateSubscribers = new Mt();
|
|
54
|
-
/**
|
|
55
|
-
* A reference to the currently-controlling Popmotion animation
|
|
56
|
-
*/
|
|
57
|
-
stopAnimation;
|
|
58
|
-
/**
|
|
59
|
-
* Tracks whether this value can output a velocity.
|
|
60
|
-
*/
|
|
61
|
-
canTrackVelocity = !1;
|
|
62
|
-
/**
|
|
63
|
-
* init - The initiating value
|
|
64
|
-
* config - Optional configuration options
|
|
65
|
-
*/
|
|
66
|
-
constructor(e) {
|
|
67
|
-
this.prev = this.current = e, this.canTrackVelocity = z(this.current);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
71
|
-
*
|
|
72
|
-
* It returns a function that, when called, will cancel the subscription.
|
|
73
|
-
*/
|
|
74
|
-
onChange(e) {
|
|
75
|
-
return this.updateSubscribers.add(e);
|
|
76
|
-
}
|
|
77
|
-
clearListeners() {
|
|
78
|
-
this.updateSubscribers.clear();
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Sets the state of the `MotionValue`.
|
|
82
|
-
*
|
|
83
|
-
* @param v
|
|
84
|
-
* @param render
|
|
85
|
-
*/
|
|
86
|
-
set(e) {
|
|
87
|
-
this.updateAndNotify(e);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Update and notify `MotionValue` subscribers.
|
|
91
|
-
*
|
|
92
|
-
* @param v
|
|
93
|
-
* @param render
|
|
94
|
-
*/
|
|
95
|
-
updateAndNotify = (e) => {
|
|
96
|
-
this.prev = this.current, this.current = e;
|
|
97
|
-
const { delta: i, timestamp: r } = dt();
|
|
98
|
-
this.lastUpdated !== r && (this.timeDelta = i, this.lastUpdated = r), D.postRender(this.scheduleVelocityCheck), this.updateSubscribers.notify(this.current);
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Returns the latest state of `MotionValue`
|
|
102
|
-
*
|
|
103
|
-
* @returns - The latest state of `MotionValue`
|
|
104
|
-
*/
|
|
105
|
-
get() {
|
|
106
|
-
return this.current;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Get previous value.
|
|
110
|
-
*
|
|
111
|
-
* @returns - The previous latest state of `MotionValue`
|
|
112
|
-
*/
|
|
113
|
-
getPrevious() {
|
|
114
|
-
return this.prev;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Returns the latest velocity of `MotionValue`
|
|
118
|
-
*
|
|
119
|
-
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
|
|
120
|
-
*/
|
|
121
|
-
getVelocity() {
|
|
122
|
-
return this.canTrackVelocity ? ht(Number.parseFloat(this.current) - Number.parseFloat(this.prev), this.timeDelta) : 0;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Schedule a velocity check for the next frame.
|
|
126
|
-
*/
|
|
127
|
-
scheduleVelocityCheck = () => D.postRender(this.velocityCheck);
|
|
128
|
-
/**
|
|
129
|
-
* Updates `prev` with `current` if the value hasn't been updated this frame.
|
|
130
|
-
* This ensures velocity calculations return `0`.
|
|
131
|
-
*/
|
|
132
|
-
velocityCheck = ({ timestamp: e }) => {
|
|
133
|
-
this.canTrackVelocity || (this.canTrackVelocity = z(this.current)), e !== this.lastUpdated && (this.prev = this.current);
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* Registers a new animation to control this `MotionValue`. Only one
|
|
137
|
-
* animation can drive a `MotionValue` at one time.
|
|
138
|
-
*/
|
|
139
|
-
start(e) {
|
|
140
|
-
return this.stop(), new Promise((i) => {
|
|
141
|
-
const { stop: r } = e(i);
|
|
142
|
-
this.stopAnimation = r;
|
|
143
|
-
}).then(() => this.clearAnimation());
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Stop the currently active animation.
|
|
147
|
-
*/
|
|
148
|
-
stop() {
|
|
149
|
-
this.stopAnimation && this.stopAnimation(), this.clearAnimation();
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Returns `true` if this value is currently animating.
|
|
153
|
-
*/
|
|
154
|
-
isAnimating() {
|
|
155
|
-
return !!this.stopAnimation;
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Clear the current animation reference.
|
|
159
|
-
*/
|
|
160
|
-
clearAnimation() {
|
|
161
|
-
this.stopAnimation = null;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Destroy and clean up subscribers to this `MotionValue`.
|
|
165
|
-
*/
|
|
166
|
-
destroy() {
|
|
167
|
-
this.updateSubscribers.clear(), this.stop();
|
|
168
|
-
}
|
|
12
|
+
function V(e) {
|
|
13
|
+
return "pointerId" in e ? null : e.type === "touchend" ? e.changedTouches : e.targetTouches;
|
|
169
14
|
}
|
|
170
|
-
function
|
|
171
|
-
return
|
|
15
|
+
function Y(e) {
|
|
16
|
+
return Array.from(V(e)).map((t) => t.identifier);
|
|
172
17
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
const n = (o) => {
|
|
177
|
-
t.value[o] && (t.value[o].stop(), t.value[o].destroy(), delete t.value[o]);
|
|
178
|
-
};
|
|
179
|
-
r ? qt(r) ? r.forEach(n) : n(r) : Object.keys(t.value).forEach(n);
|
|
180
|
-
}, i = (r, n, o) => {
|
|
181
|
-
if (t.value[r])
|
|
182
|
-
return t.value[r];
|
|
183
|
-
const s = kt(n);
|
|
184
|
-
return s.onChange((a) => o[r] = a), t.value[r] = s, s;
|
|
185
|
-
};
|
|
186
|
-
return pt(e), {
|
|
187
|
-
motionValues: t,
|
|
188
|
-
get: i,
|
|
189
|
-
stop: e
|
|
190
|
-
};
|
|
18
|
+
function L(e) {
|
|
19
|
+
const t = "buttons" in e ? e.buttons : 0, { shiftKey: s, altKey: n, metaKey: r, ctrlKey: i } = e;
|
|
20
|
+
return { buttons: t, shiftKey: s, altKey: n, metaKey: r, ctrlKey: i };
|
|
191
21
|
}
|
|
192
|
-
|
|
193
|
-
|
|
22
|
+
const it = (e) => e;
|
|
23
|
+
function G(e, t = it) {
|
|
24
|
+
const s = V(e), { clientX: n, clientY: r } = s ? s[0] : e;
|
|
25
|
+
return t([n, r]);
|
|
194
26
|
}
|
|
195
|
-
function
|
|
196
|
-
return {
|
|
197
|
-
type: "spring",
|
|
198
|
-
stiffness: 500,
|
|
199
|
-
damping: 25,
|
|
200
|
-
restDelta: 0.5,
|
|
201
|
-
restSpeed: 10
|
|
202
|
-
};
|
|
27
|
+
function $() {
|
|
203
28
|
}
|
|
204
|
-
function
|
|
205
|
-
return {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
restSpeed: 10
|
|
29
|
+
function F(...e) {
|
|
30
|
+
return e.length === 0 ? $ : e.length === 1 ? e[0] : function() {
|
|
31
|
+
var t;
|
|
32
|
+
for (let s of e)
|
|
33
|
+
t = s.apply(this, arguments) || t;
|
|
34
|
+
return t;
|
|
211
35
|
};
|
|
212
36
|
}
|
|
213
|
-
function
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
};
|
|
37
|
+
function g(e, t) {
|
|
38
|
+
if (e === void 0) {
|
|
39
|
+
if (t === void 0)
|
|
40
|
+
throw new Error("Must define fallback value if undefined is expected");
|
|
41
|
+
e = t;
|
|
42
|
+
}
|
|
43
|
+
return Array.isArray(e) ? e : [e, e];
|
|
221
44
|
}
|
|
222
|
-
function
|
|
223
|
-
return
|
|
224
|
-
type: "keyframes",
|
|
225
|
-
ease: "linear",
|
|
226
|
-
duration: 300
|
|
227
|
-
};
|
|
45
|
+
function K(e, ...t) {
|
|
46
|
+
return typeof e == "function" ? e(...t) : e;
|
|
228
47
|
}
|
|
229
|
-
function
|
|
48
|
+
function _(e) {
|
|
230
49
|
return {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
50
|
+
_active: !1,
|
|
51
|
+
_blocked: !1,
|
|
52
|
+
_intentional: [!1, !1],
|
|
53
|
+
_movement: [0, 0],
|
|
54
|
+
_initial: [0, 0],
|
|
55
|
+
_bounds: [
|
|
56
|
+
[-1 / 0, 1 / 0],
|
|
57
|
+
[-1 / 0, 1 / 0]
|
|
58
|
+
],
|
|
59
|
+
_lastEventType: void 0,
|
|
60
|
+
_dragStarted: !1,
|
|
61
|
+
_dragPreventScroll: !1,
|
|
62
|
+
_dragIsTap: !0,
|
|
63
|
+
_dragDelayed: !1,
|
|
64
|
+
event: void 0,
|
|
65
|
+
intentional: !1,
|
|
66
|
+
values: [0, 0],
|
|
67
|
+
velocities: [0, 0],
|
|
68
|
+
delta: [0, 0],
|
|
69
|
+
movement: [0, 0],
|
|
70
|
+
offset: [0, 0],
|
|
71
|
+
lastOffset: [0, 0],
|
|
72
|
+
direction: [0, 0],
|
|
73
|
+
initial: [0, 0],
|
|
74
|
+
previous: [0, 0],
|
|
75
|
+
first: !1,
|
|
76
|
+
last: !1,
|
|
77
|
+
active: !1,
|
|
78
|
+
timeStamp: 0,
|
|
79
|
+
startTime: 0,
|
|
80
|
+
elapsedTime: 0,
|
|
81
|
+
cancel: $,
|
|
82
|
+
canceled: !1,
|
|
83
|
+
memo: void 0,
|
|
84
|
+
args: void 0,
|
|
85
|
+
...e
|
|
234
86
|
};
|
|
235
87
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
zIndex: U,
|
|
331
|
-
filter: P,
|
|
332
|
-
WebkitFilter: P,
|
|
333
|
-
// SVG
|
|
334
|
-
fillOpacity: C,
|
|
335
|
-
strokeOpacity: C,
|
|
336
|
-
numOctaves: U
|
|
337
|
-
}, M = (t) => J[t];
|
|
338
|
-
function _(t, e) {
|
|
339
|
-
return e && typeof t == "number" && e.transform ? e.transform(t) : t;
|
|
88
|
+
function P() {
|
|
89
|
+
const e = {
|
|
90
|
+
hovering: !1,
|
|
91
|
+
scrolling: !1,
|
|
92
|
+
wheeling: !1,
|
|
93
|
+
dragging: !1,
|
|
94
|
+
moving: !1,
|
|
95
|
+
pinching: !1,
|
|
96
|
+
touches: 0,
|
|
97
|
+
buttons: 0,
|
|
98
|
+
down: !1,
|
|
99
|
+
shiftKey: !1,
|
|
100
|
+
altKey: !1,
|
|
101
|
+
metaKey: !1,
|
|
102
|
+
ctrlKey: !1,
|
|
103
|
+
locked: !1
|
|
104
|
+
}, t = _({
|
|
105
|
+
_pointerId: void 0,
|
|
106
|
+
axis: void 0,
|
|
107
|
+
xy: [0, 0],
|
|
108
|
+
vxvy: [0, 0],
|
|
109
|
+
velocity: 0,
|
|
110
|
+
distance: 0,
|
|
111
|
+
tap: !1,
|
|
112
|
+
swipe: [0, 0]
|
|
113
|
+
}), s = _({
|
|
114
|
+
// @ts-expect-error when used _pointerIds we can assert its type will be [number, number]
|
|
115
|
+
_pointerIds: [],
|
|
116
|
+
da: [0, 0],
|
|
117
|
+
vdva: [0, 0],
|
|
118
|
+
// @ts-expect-error origin can never be passed as undefined in userland
|
|
119
|
+
origin: void 0,
|
|
120
|
+
turns: 0
|
|
121
|
+
}), n = _({
|
|
122
|
+
axis: void 0,
|
|
123
|
+
xy: [0, 0],
|
|
124
|
+
vxvy: [0, 0],
|
|
125
|
+
velocity: 0,
|
|
126
|
+
distance: 0
|
|
127
|
+
}), r = _({
|
|
128
|
+
axis: void 0,
|
|
129
|
+
xy: [0, 0],
|
|
130
|
+
vxvy: [0, 0],
|
|
131
|
+
velocity: 0,
|
|
132
|
+
distance: 0
|
|
133
|
+
}), i = _({
|
|
134
|
+
axis: void 0,
|
|
135
|
+
xy: [0, 0],
|
|
136
|
+
vxvy: [0, 0],
|
|
137
|
+
velocity: 0,
|
|
138
|
+
distance: 0
|
|
139
|
+
});
|
|
140
|
+
return { shared: e, drag: t, pinch: s, wheel: n, move: r, scroll: i };
|
|
141
|
+
}
|
|
142
|
+
var ot = Object.defineProperty, at = (e, t, s) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, h = (e, t, s) => (at(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
143
|
+
class ct {
|
|
144
|
+
constructor(t) {
|
|
145
|
+
this.classes = t, h(this, "nativeRefs"), h(this, "config"), h(this, "handlers"), h(this, "state"), h(this, "timeouts"), h(this, "domListeners"), h(this, "windowListeners"), h(this, "pointerIds", /* @__PURE__ */ new Set()), h(this, "touchIds", /* @__PURE__ */ new Set()), h(this, "supportsTouchEvents", j()), h(this, "supportsGestureEvents", rt()), h(this, "bind", (...s) => {
|
|
146
|
+
const n = {};
|
|
147
|
+
for (let r of this.classes)
|
|
148
|
+
new r(this, s).addBindings(n);
|
|
149
|
+
for (let r in this.nativeRefs)
|
|
150
|
+
p(
|
|
151
|
+
n,
|
|
152
|
+
r,
|
|
153
|
+
(i) => this.nativeRefs[r]({ ...this.state.shared, event: i, args: s })
|
|
154
|
+
);
|
|
155
|
+
return this.config.domTarget ? pt(this, n) : gt(this, n);
|
|
156
|
+
}), h(this, "clean", () => {
|
|
157
|
+
const { eventOptions: s, domTarget: n } = this.config, r = w(n);
|
|
158
|
+
r && b(r, B(this.domListeners), s), Object.values(this.timeouts).forEach(clearTimeout), ft(this);
|
|
159
|
+
}), h(this, "reset", () => {
|
|
160
|
+
this.state = P();
|
|
161
|
+
}), this.classes = t, this.state = P(), this.timeouts = {}, this.domListeners = [], this.windowListeners = {};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function lt(e, t) {
|
|
165
|
+
"pointerId" in t ? e.pointerIds.add(t.pointerId) : e.touchIds = new Set(Y(t));
|
|
166
|
+
}
|
|
167
|
+
function ut(e, t) {
|
|
168
|
+
"pointerId" in t ? e.pointerIds.delete(t.pointerId) : Y(t).forEach((s) => e.touchIds.delete(s));
|
|
169
|
+
}
|
|
170
|
+
function ft(e) {
|
|
171
|
+
const {
|
|
172
|
+
config: { window: t, eventOptions: s },
|
|
173
|
+
windowListeners: n
|
|
174
|
+
} = e, r = w(t);
|
|
175
|
+
if (r) {
|
|
176
|
+
for (let i in n) {
|
|
177
|
+
const a = n[i];
|
|
178
|
+
b(r, a, s);
|
|
179
|
+
}
|
|
180
|
+
e.windowListeners = {};
|
|
181
|
+
}
|
|
340
182
|
}
|
|
341
|
-
function
|
|
342
|
-
|
|
343
|
-
|
|
183
|
+
function ht({ config: e, windowListeners: t }, s, n = e.eventOptions) {
|
|
184
|
+
const r = w(e.window);
|
|
185
|
+
r && (b(r, t[s], n), delete t[s]);
|
|
344
186
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
easeInOut: _t,
|
|
349
|
-
easeOut: Pt,
|
|
350
|
-
circIn: Nt,
|
|
351
|
-
circInOut: Et,
|
|
352
|
-
circOut: Ct,
|
|
353
|
-
backIn: St,
|
|
354
|
-
backInOut: Vt,
|
|
355
|
-
backOut: jt,
|
|
356
|
-
anticipate: xt,
|
|
357
|
-
bounceIn: At,
|
|
358
|
-
bounceInOut: Tt,
|
|
359
|
-
bounceOut: Ot
|
|
360
|
-
};
|
|
361
|
-
function W(t) {
|
|
362
|
-
if (Array.isArray(t)) {
|
|
363
|
-
const [e, i, r, n] = t;
|
|
364
|
-
return gt(e, i, r, n);
|
|
365
|
-
} else if (typeof t == "string")
|
|
366
|
-
return Ut[t];
|
|
367
|
-
return t;
|
|
187
|
+
function dt({ config: e, windowListeners: t }, s, n = [], r = e.eventOptions) {
|
|
188
|
+
const i = w(e.window);
|
|
189
|
+
i && (b(i, t[s], r), X(i, t[s] = n, r));
|
|
368
190
|
}
|
|
369
|
-
function
|
|
370
|
-
|
|
191
|
+
function pt({ config: e, domListeners: t }, s) {
|
|
192
|
+
const { eventOptions: n, domTarget: r } = e, i = w(r);
|
|
193
|
+
if (!i)
|
|
194
|
+
throw new Error("domTarget must be defined");
|
|
195
|
+
b(i, B(t), n);
|
|
196
|
+
for (let [a, o] of Object.entries(s)) {
|
|
197
|
+
const u = a.slice(2).toLowerCase();
|
|
198
|
+
t.push([u, F(...o)]);
|
|
199
|
+
}
|
|
200
|
+
X(i, t, n);
|
|
371
201
|
}
|
|
372
|
-
function
|
|
373
|
-
|
|
202
|
+
function gt({ config: e }, t) {
|
|
203
|
+
const s = {}, n = e.eventOptions.capture ? "Capture" : "";
|
|
204
|
+
for (let [r, i] of Object.entries(t)) {
|
|
205
|
+
const a = Array.isArray(i) ? i : [i], o = r + n;
|
|
206
|
+
s[o] = F(...a);
|
|
207
|
+
}
|
|
208
|
+
return s;
|
|
374
209
|
}
|
|
375
|
-
function
|
|
376
|
-
return
|
|
210
|
+
function B(e = []) {
|
|
211
|
+
return e.splice(0, e.length);
|
|
377
212
|
}
|
|
378
|
-
function
|
|
379
|
-
|
|
380
|
-
return e && (n.offset = e), t && (n.ease = Wt(t) ? t.map(W) : W(t)), i && (n.elapsed = -i), n;
|
|
213
|
+
function p(e, t, s) {
|
|
214
|
+
e[t] || (e[t] = []), e[t].push(s);
|
|
381
215
|
}
|
|
382
|
-
function
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}), {
|
|
387
|
-
...e,
|
|
388
|
-
...Yt(t)
|
|
389
|
-
};
|
|
216
|
+
function X(e, t = [], s = {}) {
|
|
217
|
+
if (e)
|
|
218
|
+
for (let [n, r] of t)
|
|
219
|
+
e.addEventListener(n, r, s);
|
|
390
220
|
}
|
|
391
|
-
function
|
|
392
|
-
|
|
221
|
+
function b(e, t = [], s = {}) {
|
|
222
|
+
if (e)
|
|
223
|
+
for (let [n, r] of t)
|
|
224
|
+
e.removeEventListener(n, r, s);
|
|
393
225
|
}
|
|
394
|
-
function
|
|
395
|
-
return
|
|
226
|
+
function x(e, t) {
|
|
227
|
+
return e.map((s, n) => s + t[n]);
|
|
396
228
|
}
|
|
397
|
-
function
|
|
398
|
-
|
|
399
|
-
let s = o.from === null || o.from === void 0 ? e.get() : o.from;
|
|
400
|
-
const a = X(t, i);
|
|
401
|
-
s === "none" && a && typeof i == "string" && (s = It(t, i));
|
|
402
|
-
const l = X(t, s);
|
|
403
|
-
function p(f) {
|
|
404
|
-
const y = {
|
|
405
|
-
from: s,
|
|
406
|
-
to: i,
|
|
407
|
-
velocity: r.velocity ? r.velocity : e.getVelocity(),
|
|
408
|
-
onUpdate: (d) => e.set(d)
|
|
409
|
-
};
|
|
410
|
-
return o.type === "inertia" || o.type === "decay" ? mt({ ...y, ...o }) : bt({
|
|
411
|
-
...Zt(o, y, t),
|
|
412
|
-
onUpdate: (d) => {
|
|
413
|
-
y.onUpdate(d), o.onUpdate && o.onUpdate(d);
|
|
414
|
-
},
|
|
415
|
-
onComplete: () => {
|
|
416
|
-
n && n(), f && f();
|
|
417
|
-
}
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
function u(f) {
|
|
421
|
-
return e.set(i), n && n(), f && f(), { stop: () => {
|
|
422
|
-
} };
|
|
423
|
-
}
|
|
424
|
-
return !l || !a || o.type === !1 ? u : p;
|
|
229
|
+
function H(e, t) {
|
|
230
|
+
return e.map((s, n) => s - t[n]);
|
|
425
231
|
}
|
|
426
|
-
function
|
|
427
|
-
|
|
428
|
-
return { motionValues: t, stop: e, push: (n, o, s, a = {}, l) => {
|
|
429
|
-
const p = s[n], u = i(n, p, s);
|
|
430
|
-
if (a && a.immediate) {
|
|
431
|
-
u.set(o);
|
|
432
|
-
return;
|
|
433
|
-
}
|
|
434
|
-
const f = $t(n, u, o, a, l);
|
|
435
|
-
u.start(f);
|
|
436
|
-
} };
|
|
232
|
+
function C(e) {
|
|
233
|
+
return Math.hypot(...e);
|
|
437
234
|
}
|
|
438
|
-
function
|
|
439
|
-
const
|
|
440
|
-
|
|
441
|
-
i,
|
|
442
|
-
(f) => {
|
|
443
|
-
s.value = Object.values(f).filter((y) => y.isAnimating()).length > 0;
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
immediate: !0,
|
|
447
|
-
deep: !0
|
|
448
|
-
}
|
|
449
|
-
);
|
|
450
|
-
const a = (f) => {
|
|
451
|
-
if (!o || !o[f])
|
|
452
|
-
throw new Error(`The variant ${f} does not exist.`);
|
|
453
|
-
return o[f];
|
|
454
|
-
}, l = (f) => {
|
|
455
|
-
typeof f == "string" && (f = a(f));
|
|
456
|
-
const y = Object.entries(f).map(([v, S]) => {
|
|
457
|
-
if (v !== "transition")
|
|
458
|
-
return new Promise(
|
|
459
|
-
(ot) => (
|
|
460
|
-
// @ts-expect-error - Fix errors later for typescript 5
|
|
461
|
-
r(v, S, t, f.transition || G(v, f[v]), ot)
|
|
462
|
-
)
|
|
463
|
-
);
|
|
464
|
-
}).filter(Boolean);
|
|
465
|
-
async function d() {
|
|
466
|
-
await Promise.all(y), f.transition?.onComplete?.();
|
|
467
|
-
}
|
|
468
|
-
return Promise.all([d()]);
|
|
469
|
-
};
|
|
470
|
-
return {
|
|
471
|
-
isAnimating: s,
|
|
472
|
-
apply: l,
|
|
473
|
-
set: (f) => {
|
|
474
|
-
const y = yt(f) ? f : a(f);
|
|
475
|
-
Object.entries(y).forEach(([d, v]) => {
|
|
476
|
-
d !== "transition" && r(d, v, t, {
|
|
477
|
-
immediate: !0
|
|
478
|
-
});
|
|
479
|
-
});
|
|
480
|
-
},
|
|
481
|
-
leave: async (f) => {
|
|
482
|
-
let y;
|
|
483
|
-
if (o && (o.leave && (y = o.leave), !o.leave && o.initial && (y = o.initial)), !y) {
|
|
484
|
-
f();
|
|
485
|
-
return;
|
|
486
|
-
}
|
|
487
|
-
await l(y), f();
|
|
488
|
-
},
|
|
489
|
-
stop: n
|
|
490
|
-
};
|
|
235
|
+
function mt(e, t, s) {
|
|
236
|
+
const n = C(t), r = n === 0 ? 0 : 1 / n, i = s === 0 ? 0 : 1 / s, a = i * n, o = t.map((c) => i * c), u = t.map((c) => r * c), f = C(e);
|
|
237
|
+
return { velocities: o, velocity: a, distance: f, direction: u };
|
|
491
238
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
const n = x(i), o = g(!1), s = g(!1), a = g(!1), l = A(() => {
|
|
495
|
-
let u = [...Object.keys(e.value || {})];
|
|
496
|
-
return n && (n.hovered && (u = [...u, ...Object.keys(n.hovered)]), n.tapped && (u = [...u, ...Object.keys(n.tapped)]), n.focused && (u = [...u, ...Object.keys(n.focused)])), u;
|
|
497
|
-
}), p = A(() => {
|
|
498
|
-
const u = {};
|
|
499
|
-
Object.assign(u, e.value), o.value && n.hovered && Object.assign(u, n.hovered), s.value && n.tapped && Object.assign(u, n.tapped), a.value && n.focused && Object.assign(u, n.focused);
|
|
500
|
-
for (const f in u)
|
|
501
|
-
l.value.includes(f) || delete u[f];
|
|
502
|
-
return u;
|
|
503
|
-
});
|
|
504
|
-
n.hovered && (m(t, "mouseenter", () => o.value = !0), m(t, "mouseleave", () => {
|
|
505
|
-
o.value = !1, s.value = !1;
|
|
506
|
-
})), n.tapped && (ee() && (m(t, "mousedown", () => s.value = !0), m(t, "mouseup", () => s.value = !1)), Qt() && (m(t, "pointerdown", () => s.value = !0), m(t, "pointerup", () => s.value = !1)), te() && (m(t, "touchstart", () => s.value = !0), m(t, "touchend", () => s.value = !1))), n.focused && (m(t, "focus", () => a.value = !0), m(t, "blur", () => a.value = !1)), h([o, s, a], () => {
|
|
507
|
-
r(p.value);
|
|
508
|
-
});
|
|
239
|
+
function M(e) {
|
|
240
|
+
return Math.sign ? Math.sign(e) : +(e > 0) - +(e < 0) || +e;
|
|
509
241
|
}
|
|
510
|
-
function
|
|
511
|
-
|
|
512
|
-
h(
|
|
513
|
-
() => e,
|
|
514
|
-
() => {
|
|
515
|
-
n && (n.initial && (t("initial"), r.value = "initial"), n.enter && (r.value = "enter"));
|
|
516
|
-
},
|
|
517
|
-
{
|
|
518
|
-
immediate: !0,
|
|
519
|
-
flush: "pre"
|
|
520
|
-
}
|
|
521
|
-
);
|
|
242
|
+
function vt(e, t, s) {
|
|
243
|
+
return Math.max(t, Math.min(e, s));
|
|
522
244
|
}
|
|
523
|
-
function
|
|
524
|
-
|
|
525
|
-
t,
|
|
526
|
-
(i) => {
|
|
527
|
-
i && e(i);
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
immediate: !0
|
|
531
|
-
}
|
|
532
|
-
);
|
|
245
|
+
function yt(e, t) {
|
|
246
|
+
return Math.pow(e, t * 5);
|
|
533
247
|
}
|
|
534
|
-
function
|
|
535
|
-
|
|
536
|
-
r && (r.visible || r.visibleOnce) && ft(t, ([{ isIntersecting: n }]) => {
|
|
537
|
-
r.visible ? n ? i.value = "visible" : i.value = "initial" : r.visibleOnce && (n && i.value !== "visibleOnce" ? i.value = "visibleOnce" : i.value || (i.value = "initial"));
|
|
538
|
-
});
|
|
248
|
+
function z(e, t, s) {
|
|
249
|
+
return t === 0 || Math.abs(t) === 1 / 0 ? yt(e, s) : e * t * s / (t + s * e);
|
|
539
250
|
}
|
|
540
|
-
function
|
|
541
|
-
|
|
542
|
-
lifeCycleHooks: !0,
|
|
543
|
-
visibilityHooks: !0,
|
|
544
|
-
eventListeners: !0
|
|
545
|
-
}) {
|
|
546
|
-
e.lifeCycleHooks && re(t), e.syncVariants && ne(t), e.visibilityHooks && oe(t), e.eventListeners && ie(t);
|
|
251
|
+
function R(e, t, s, n = 0.15) {
|
|
252
|
+
return n === 0 ? vt(e, t, s) : e < t ? -z(t - e, s - t, n) + t : e > s ? +z(e - s, s - t, n) + s : e;
|
|
547
253
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
254
|
+
var _t = Object.defineProperty, wt = (e, t, s) => t in e ? _t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, T = (e, t, s) => (wt(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
255
|
+
const v = /* @__PURE__ */ new Map(), bt = (e) => e;
|
|
256
|
+
class St {
|
|
257
|
+
/**
|
|
258
|
+
* Creates an instance of a gesture recognizer.
|
|
259
|
+
* @param stateKey drag, move, pinch, etc.
|
|
260
|
+
* @param controller the controller attached to the gesture
|
|
261
|
+
* @param [args] the args that should be passed to the gesture handler
|
|
262
|
+
*/
|
|
263
|
+
constructor(t, s = []) {
|
|
264
|
+
this.controller = t, this.args = s, T(this, "debounced", !0), T(this, "setTimeout", (n, r = 140, ...i) => {
|
|
265
|
+
clearTimeout(this.controller.timeouts[this.stateKey]), this.controller.timeouts[this.stateKey] = window.setTimeout(
|
|
266
|
+
n,
|
|
267
|
+
r,
|
|
268
|
+
...i
|
|
269
|
+
);
|
|
270
|
+
}), T(this, "clearTimeout", () => {
|
|
271
|
+
clearTimeout(this.controller.timeouts[this.stateKey]);
|
|
272
|
+
}), T(this, "fireGestureHandler", (n = !1) => {
|
|
273
|
+
if (this.state._blocked)
|
|
274
|
+
return this.debounced || (this.state._active = !1, this.clean()), null;
|
|
275
|
+
if (!n && !this.state.intentional && !this.config.triggerAllEvents)
|
|
276
|
+
return null;
|
|
277
|
+
if (this.state.intentional) {
|
|
278
|
+
const u = this.state.active, f = this.state._active;
|
|
279
|
+
this.state.active = f, this.state.first = f && !u, this.state.last = u && !f, this.controller.state.shared[this.ingKey] = f;
|
|
559
280
|
}
|
|
560
|
-
i.
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
281
|
+
const r = this.controller.pointerIds.size || this.controller.touchIds.size, i = this.controller.state.shared.buttons > 0 || r > 0, a = {
|
|
282
|
+
...this.controller.state.shared,
|
|
283
|
+
...this.state,
|
|
284
|
+
...this.mapStateValues(this.state),
|
|
285
|
+
// Sets xy or da to the gesture state values
|
|
286
|
+
locked: !!document.pointerLockElement,
|
|
287
|
+
touches: r,
|
|
288
|
+
down: i
|
|
289
|
+
}, o = this.handler(a);
|
|
290
|
+
return this.state.memo = o !== void 0 ? o : this.state.memo, a;
|
|
291
|
+
}), this.controller = t, this.args = s;
|
|
292
|
+
}
|
|
293
|
+
// Returns the gesture config
|
|
294
|
+
get config() {
|
|
295
|
+
return this.controller.config[this.stateKey];
|
|
296
|
+
}
|
|
297
|
+
// Is the gesture enabled
|
|
298
|
+
get enabled() {
|
|
299
|
+
return this.controller.config.enabled && this.config.enabled;
|
|
300
|
+
}
|
|
301
|
+
// Returns the controller state for a given gesture
|
|
302
|
+
get state() {
|
|
303
|
+
return this.controller.state[this.stateKey];
|
|
304
|
+
}
|
|
305
|
+
// Returns the gesture handler
|
|
306
|
+
get handler() {
|
|
307
|
+
return this.controller.handlers[this.stateKey];
|
|
308
|
+
}
|
|
309
|
+
get transform() {
|
|
310
|
+
return this.config.transform || this.controller.config.transform || bt;
|
|
311
|
+
}
|
|
312
|
+
// Convenience method to update the shared state
|
|
313
|
+
updateSharedState(t) {
|
|
314
|
+
Object.assign(this.controller.state.shared, t);
|
|
315
|
+
}
|
|
316
|
+
// Convenience method to update the gesture state
|
|
317
|
+
updateGestureState(t) {
|
|
318
|
+
Object.assign(this.state, t);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Returns state properties depending on the movement and state.
|
|
322
|
+
*
|
|
323
|
+
* Should be overriden for custom behavior, doesn't do anything in the implementation
|
|
324
|
+
* below.
|
|
325
|
+
*/
|
|
326
|
+
checkIntentionality(t, s) {
|
|
327
|
+
return { _intentional: t, _blocked: !1 };
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Returns basic movement properties for the gesture based on the next values and current state.
|
|
331
|
+
*/
|
|
332
|
+
getMovement(t) {
|
|
333
|
+
const { rubberband: s, threshold: n } = this.config, {
|
|
334
|
+
_bounds: r,
|
|
335
|
+
_initial: i,
|
|
336
|
+
_active: a,
|
|
337
|
+
_intentional: o,
|
|
338
|
+
lastOffset: u,
|
|
339
|
+
movement: f
|
|
340
|
+
} = this.state, c = this.getInternalMovement(t, this.state), S = this.transform(n).map(Math.abs), E = o[0] === !1 ? N(c[0], S[0]) : o[0], D = o[1] === !1 ? N(c[1], S[1]) : o[1], m = this.checkIntentionality([E, D], c);
|
|
341
|
+
if (m._blocked)
|
|
342
|
+
return { ...m, _movement: c, delta: [0, 0] };
|
|
343
|
+
const d = m._intentional, J = c;
|
|
344
|
+
let y = [
|
|
345
|
+
d[0] !== !1 ? c[0] - d[0] : 0,
|
|
346
|
+
d[1] !== !1 ? c[1] - d[1] : 0
|
|
347
|
+
];
|
|
348
|
+
const Q = x(y, u), A = a ? s : [0, 0];
|
|
349
|
+
return y = W(r, x(y, i), A), {
|
|
350
|
+
...m,
|
|
351
|
+
intentional: d[0] !== !1 || d[1] !== !1,
|
|
352
|
+
_initial: i,
|
|
353
|
+
_movement: J,
|
|
354
|
+
movement: y,
|
|
355
|
+
values: t,
|
|
356
|
+
offset: W(r, Q, A),
|
|
357
|
+
delta: H(y, f)
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
// Cleans the gesture. Can be overriden by gestures.
|
|
361
|
+
clean() {
|
|
362
|
+
this.clearTimeout();
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
function N(e, t) {
|
|
366
|
+
return Math.abs(e) >= t ? M(e) * t : !1;
|
|
367
|
+
}
|
|
368
|
+
function W(e, [t, s], [n, r]) {
|
|
369
|
+
const [[i, a], [o, u]] = e;
|
|
370
|
+
return [
|
|
371
|
+
R(t, i, a, n),
|
|
372
|
+
R(s, o, u, r)
|
|
373
|
+
];
|
|
374
|
+
}
|
|
375
|
+
function O({ state: e }, t, s) {
|
|
376
|
+
const { timeStamp: n, type: r } = t, i = e.values, a = s ? 0 : n - e.startTime;
|
|
377
|
+
return { _lastEventType: r, event: t, timeStamp: n, elapsedTime: a, previous: i };
|
|
378
|
+
}
|
|
379
|
+
function Tt({ state: e, config: t, stateKey: s, args: n }, r, i) {
|
|
380
|
+
const a = e.offset, o = i.timeStamp, { initial: u, bounds: f } = t, c = {
|
|
381
|
+
...P()[s],
|
|
382
|
+
_active: !0,
|
|
383
|
+
args: n,
|
|
384
|
+
values: r,
|
|
385
|
+
initial: r,
|
|
386
|
+
offset: a,
|
|
387
|
+
lastOffset: a,
|
|
388
|
+
startTime: o
|
|
569
389
|
};
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
(
|
|
574
|
-
(i) => {
|
|
575
|
-
i && e(i);
|
|
576
|
-
},
|
|
577
|
-
{
|
|
578
|
-
immediate: !0
|
|
579
|
-
}
|
|
580
|
-
);
|
|
581
|
-
}
|
|
582
|
-
const ae = {
|
|
583
|
-
x: "translateX",
|
|
584
|
-
y: "translateY",
|
|
585
|
-
z: "translateZ"
|
|
586
|
-
};
|
|
587
|
-
function tt(t = {}, e = !0) {
|
|
588
|
-
const i = V({ ...t }), r = g("");
|
|
589
|
-
return h(
|
|
590
|
-
i,
|
|
591
|
-
(n) => {
|
|
592
|
-
let o = "", s = !1;
|
|
593
|
-
if (e && (n.x || n.y || n.z)) {
|
|
594
|
-
const a = [n.x || 0, n.y || 0, n.z || 0].map((l) => _(l, c)).join(",");
|
|
595
|
-
o += `translate3d(${a}) `, s = !0;
|
|
596
|
-
}
|
|
597
|
-
for (const [a, l] of Object.entries(n)) {
|
|
598
|
-
if (e && (a === "x" || a === "y" || a === "z"))
|
|
599
|
-
continue;
|
|
600
|
-
const p = M(a), u = _(l, p);
|
|
601
|
-
o += `${ae[a] || a}(${u}) `;
|
|
602
|
-
}
|
|
603
|
-
e && !s && (o += "translateZ(0px) "), r.value = o.trim();
|
|
604
|
-
},
|
|
605
|
-
{
|
|
606
|
-
immediate: !0,
|
|
607
|
-
deep: !0
|
|
608
|
-
}
|
|
609
|
-
), {
|
|
610
|
-
state: i,
|
|
611
|
-
transform: r
|
|
390
|
+
return {
|
|
391
|
+
...c,
|
|
392
|
+
_initial: K(u, c),
|
|
393
|
+
_bounds: K(f, c)
|
|
612
394
|
};
|
|
613
395
|
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
function
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
let i, r;
|
|
641
|
-
const { state: n, style: o } = Q();
|
|
642
|
-
return k(t, (s) => {
|
|
643
|
-
r = s;
|
|
644
|
-
for (const a of Object.keys(J))
|
|
645
|
-
s.style[a] === null || s.style[a] === "" || q(a) || it(a) || (n[a] = s.style[a]);
|
|
646
|
-
i && Object.entries(i).forEach(([a, l]) => s.style[a] = l), e && e(n);
|
|
647
|
-
}), h(
|
|
648
|
-
o,
|
|
649
|
-
(s) => {
|
|
650
|
-
if (!r) {
|
|
651
|
-
i = s;
|
|
652
|
-
return;
|
|
653
|
-
}
|
|
654
|
-
for (const a in s) r.style[a] = s[a];
|
|
655
|
-
},
|
|
656
|
-
{
|
|
657
|
-
immediate: !0
|
|
396
|
+
class It extends St {
|
|
397
|
+
/**
|
|
398
|
+
* Returns the real movement (without taking intentionality into account)
|
|
399
|
+
*/
|
|
400
|
+
getInternalMovement(t, s) {
|
|
401
|
+
return H(t, s.initial);
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* In coordinates-based gesture, this function will detect the first intentional axis,
|
|
405
|
+
* lock the gesture axis if lockDirection is specified in the config, block the gesture
|
|
406
|
+
* if the first intentional axis doesn't match the specified axis in config.
|
|
407
|
+
*/
|
|
408
|
+
checkIntentionality(t, s) {
|
|
409
|
+
if (t[0] === !1 && t[1] === !1)
|
|
410
|
+
return { _intentional: t, axis: this.state.axis };
|
|
411
|
+
const [n, r] = s.map(Math.abs), i = this.state.axis || (n > r ? "x" : n < r ? "y" : void 0);
|
|
412
|
+
return !this.config.axis && !this.config.lockDirection ? { _intentional: t, _blocked: !1, axis: i } : i ? this.config.axis && i !== this.config.axis ? { _intentional: t, _blocked: !0, axis: i } : (t[i === "x" ? 1 : 0] = !1, { _intentional: t, _blocked: !1, axis: i }) : { _intentional: [!1, !1], _blocked: !1, axis: i };
|
|
413
|
+
}
|
|
414
|
+
getKinematics(t, s) {
|
|
415
|
+
const n = this.getMovement(t);
|
|
416
|
+
if (!n._blocked) {
|
|
417
|
+
const r = s.timeStamp - this.state.timeStamp;
|
|
418
|
+
Object.assign(
|
|
419
|
+
n,
|
|
420
|
+
mt(n.movement, n.delta, r)
|
|
421
|
+
);
|
|
658
422
|
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
423
|
+
return n;
|
|
424
|
+
}
|
|
425
|
+
mapStateValues(t) {
|
|
426
|
+
return { xy: t.values, vxvy: t.velocities };
|
|
427
|
+
}
|
|
662
428
|
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
const i = (r) => r.endsWith("px") || r.endsWith("deg") ? Number.parseFloat(r) : Number.isNaN(Number(r)) ? Number(r) : r;
|
|
668
|
-
return e.reduce((r, n) => {
|
|
669
|
-
if (!n)
|
|
670
|
-
return r;
|
|
671
|
-
const [o, s] = n.split("("), l = s.split(",").map((u) => i(u.endsWith(")") ? u.replace(")", "") : u.trim())), p = l.length === 1 ? l[0] : l;
|
|
672
|
-
return {
|
|
673
|
-
...r,
|
|
674
|
-
[o]: p
|
|
675
|
-
};
|
|
676
|
-
}, {});
|
|
429
|
+
var Et = Object.defineProperty, Dt = (e, t, s) => t in e ? Et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, l = (e, t, s) => (Dt(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
430
|
+
const Ot = 3;
|
|
431
|
+
function U(e) {
|
|
432
|
+
"persist" in e && typeof e.persist == "function" && e.persist();
|
|
677
433
|
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
if (r === 0) {
|
|
683
|
-
n.forEach((o) => t[o] = 0);
|
|
434
|
+
class Pt extends It {
|
|
435
|
+
constructor() {
|
|
436
|
+
super(...arguments), l(this, "ingKey", "dragging"), l(this, "stateKey", "drag"), l(this, "setPointerCapture", (t) => {
|
|
437
|
+
if (this.config.useTouch || document.pointerLockElement)
|
|
684
438
|
return;
|
|
439
|
+
const { target: s, pointerId: n } = t;
|
|
440
|
+
s && "setPointerCapture" in s && s.setPointerCapture(n), this.updateGestureState({
|
|
441
|
+
_dragTarget: s,
|
|
442
|
+
_dragPointerId: n
|
|
443
|
+
});
|
|
444
|
+
}), l(this, "releasePointerCapture", () => {
|
|
445
|
+
if (this.config.useTouch || document.pointerLockElement)
|
|
446
|
+
return;
|
|
447
|
+
const { _dragTarget: t, _dragPointerId: s } = this.state;
|
|
448
|
+
if (s && t && "releasePointerCapture" in t && (!("hasPointerCapture" in t) || t.hasPointerCapture(s)))
|
|
449
|
+
try {
|
|
450
|
+
t.releasePointerCapture(s);
|
|
451
|
+
} catch {
|
|
452
|
+
}
|
|
453
|
+
}), l(this, "preventScroll", (t) => {
|
|
454
|
+
this.state._dragPreventScroll && t.cancelable && t.preventDefault();
|
|
455
|
+
}), l(this, "getEventId", (t) => this.config.useTouch ? t.changedTouches[0].identifier : t.pointerId), l(this, "isValidEvent", (t) => this.state._pointerId === this.getEventId(t)), l(this, "shouldPreventWindowScrollY", this.config.preventWindowScrollY && this.controller.supportsTouchEvents), l(this, "setUpWindowScrollDetection", (t) => {
|
|
456
|
+
U(t), dt(
|
|
457
|
+
this.controller,
|
|
458
|
+
this.stateKey,
|
|
459
|
+
[
|
|
460
|
+
["touchmove", this.preventScroll],
|
|
461
|
+
["touchend", this.clean.bind(this)],
|
|
462
|
+
["touchcancel", this.clean.bind(this)]
|
|
463
|
+
],
|
|
464
|
+
{ passive: !1 }
|
|
465
|
+
), this.setTimeout(this.startDrag.bind(this), 250, t);
|
|
466
|
+
}), l(this, "setUpDelayedDragTrigger", (t) => {
|
|
467
|
+
this.state._dragDelayed = !0, U(t), this.setTimeout(this.startDrag.bind(this), this.config.delay, t);
|
|
468
|
+
}), l(this, "setStartState", (t) => {
|
|
469
|
+
const s = G(t, this.transform);
|
|
470
|
+
this.updateSharedState(L(t)), this.updateGestureState({
|
|
471
|
+
...Tt(this, s, t),
|
|
472
|
+
...O(this, t, !0),
|
|
473
|
+
_pointerId: this.getEventId(t)
|
|
474
|
+
// setting pointerId locks the gesture to this specific event
|
|
475
|
+
}), this.updateGestureState(this.getMovement(s));
|
|
476
|
+
}), l(this, "onDragStart", (t) => {
|
|
477
|
+
lt(this.controller, t), !(!this.enabled || this.state._active) && (this.setStartState(t), this.setPointerCapture(t), this.shouldPreventWindowScrollY ? this.setUpWindowScrollDetection(t) : this.config.delay > 0 ? this.setUpDelayedDragTrigger(t) : this.startDrag(t, !0));
|
|
478
|
+
}), l(this, "onDragChange", (t) => {
|
|
479
|
+
if (
|
|
480
|
+
// if the gesture was canceled or
|
|
481
|
+
this.state.canceled || // if onDragStart wasn't fired or
|
|
482
|
+
!this.state._active || // if the event pointerId doesn't match the one that initiated the drag
|
|
483
|
+
!this.isValidEvent(t) || // if the event has the same timestamp as the previous event
|
|
484
|
+
// note that checking type equality is ONLY for tests ¯\_(ツ)_/¯
|
|
485
|
+
this.state._lastEventType === t.type && t.timeStamp === this.state.timeStamp
|
|
486
|
+
)
|
|
487
|
+
return;
|
|
488
|
+
let s;
|
|
489
|
+
if (document.pointerLockElement) {
|
|
490
|
+
const { movementX: u, movementY: f } = t;
|
|
491
|
+
s = x(this.transform([u, f]), this.state.values);
|
|
492
|
+
} else
|
|
493
|
+
s = G(t, this.transform);
|
|
494
|
+
const n = this.getKinematics(s, t);
|
|
495
|
+
if (!this.state._dragStarted) {
|
|
496
|
+
if (this.state._dragDelayed) {
|
|
497
|
+
this.startDrag(t);
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
if (this.shouldPreventWindowScrollY)
|
|
501
|
+
if (!this.state._dragPreventScroll && n.axis)
|
|
502
|
+
if (n.axis === "x")
|
|
503
|
+
this.startDrag(t);
|
|
504
|
+
else {
|
|
505
|
+
this.state._active = !1;
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
else
|
|
509
|
+
return;
|
|
510
|
+
else
|
|
511
|
+
return;
|
|
685
512
|
}
|
|
686
|
-
r
|
|
687
|
-
|
|
513
|
+
const r = L(t);
|
|
514
|
+
this.updateSharedState(r);
|
|
515
|
+
const i = O(this, t), a = C(n._movement);
|
|
516
|
+
let { _dragIsTap: o } = this.state;
|
|
517
|
+
o && a >= Ot && (o = !1), this.updateGestureState({ ...i, ...n, _dragIsTap: o }), this.fireGestureHandler();
|
|
518
|
+
}), l(this, "onDragEnd", (t) => {
|
|
519
|
+
if (ut(this.controller, t), !this.isValidEvent(t) || (this.clean(), !this.state._active))
|
|
520
|
+
return;
|
|
521
|
+
this.state._active = !1;
|
|
522
|
+
const s = this.state._dragIsTap, [n, r] = this.state.velocities, [i, a] = this.state.movement, [o, u] = this.state._intentional, [f, c] = this.config.swipeVelocity, [S, E] = this.config.swipeDistance, D = this.config.swipeDuration, m = {
|
|
523
|
+
...O(this, t),
|
|
524
|
+
...this.getMovement(this.state.values)
|
|
525
|
+
}, d = [0, 0];
|
|
526
|
+
m.elapsedTime < D && (o !== !1 && Math.abs(n) > f && Math.abs(i) > S && (d[0] = M(n)), u !== !1 && Math.abs(r) > c && Math.abs(a) > E && (d[1] = M(r))), this.updateSharedState({ buttons: 0 }), this.updateGestureState({ ...m, tap: s, swipe: d }), this.fireGestureHandler(this.config.filterTaps && s === !0);
|
|
527
|
+
}), l(this, "clean", () => {
|
|
528
|
+
super.clean(), this.state._dragStarted = !1, this.releasePointerCapture(), ht(this.controller, this.stateKey);
|
|
529
|
+
}), l(this, "onCancel", () => {
|
|
530
|
+
this.state.canceled || (this.updateGestureState({ canceled: !0, _active: !1 }), this.updateSharedState({ buttons: 0 }), nt(this.fireGestureHandler));
|
|
531
|
+
}), l(this, "onClick", (t) => {
|
|
532
|
+
this.state._dragIsTap || t.stopPropagation();
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
startDrag(t, s = !1) {
|
|
536
|
+
// if the gesture isn't active (probably means)
|
|
537
|
+
!this.state._active || // if the drag has already started we should ignore subsequent attempts
|
|
538
|
+
this.state._dragStarted || (s || this.setStartState(t), this.updateGestureState({
|
|
539
|
+
_dragStarted: !0,
|
|
540
|
+
_dragPreventScroll: !0,
|
|
541
|
+
cancel: this.onCancel
|
|
542
|
+
}), this.clearTimeout(), this.fireGestureHandler());
|
|
543
|
+
}
|
|
544
|
+
addBindings(t) {
|
|
545
|
+
if (this.config.useTouch ? (p(t, "onTouchStart", this.onDragStart), p(t, "onTouchMove", this.onDragChange), p(t, "onTouchEnd", this.onDragEnd), p(t, "onTouchCancel", this.onDragEnd)) : (p(t, "onPointerDown", this.onDragStart), p(t, "onPointerMove", this.onDragChange), p(t, "onPointerUp", this.onDragEnd), p(t, "onPointerCancel", this.onDragEnd)), this.config.filterTaps) {
|
|
546
|
+
const s = this.controller.config.eventOptions.capture ? "onClick" : "onClickCapture";
|
|
547
|
+
p(t, s, this.onClick);
|
|
688
548
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
function xt(e, t) {
|
|
552
|
+
let s, n = [], r, i = !1;
|
|
553
|
+
function a(...o) {
|
|
554
|
+
return i && s === this && t(o, n) || (r = e.apply(this, o), i = !0, s = this, n = o), r;
|
|
555
|
+
}
|
|
556
|
+
return a;
|
|
557
|
+
}
|
|
558
|
+
function I(e, t) {
|
|
559
|
+
if (e === t)
|
|
560
|
+
return !0;
|
|
561
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
562
|
+
if (e.constructor !== t.constructor)
|
|
563
|
+
return !1;
|
|
564
|
+
let s, n, r;
|
|
565
|
+
if (Array.isArray(e)) {
|
|
566
|
+
if (s = e.length, s !== t.length)
|
|
567
|
+
return !1;
|
|
568
|
+
for (n = s; n-- !== 0; )
|
|
569
|
+
if (!I(e[n], t[n]))
|
|
570
|
+
return !1;
|
|
571
|
+
return !0;
|
|
692
572
|
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
573
|
+
let i;
|
|
574
|
+
if (typeof Map == "function" && e instanceof Map && t instanceof Map) {
|
|
575
|
+
if (e.size !== t.size)
|
|
576
|
+
return !1;
|
|
577
|
+
for (i = e.entries(); !(n = i.next()).done; )
|
|
578
|
+
if (!t.has(n.value[0]))
|
|
579
|
+
return !1;
|
|
580
|
+
for (i = e.entries(); !(n = i.next()).done; )
|
|
581
|
+
if (!I(n.value[1], t.get(n.value[0])))
|
|
582
|
+
return !1;
|
|
583
|
+
return !0;
|
|
696
584
|
}
|
|
697
|
-
if (
|
|
698
|
-
|
|
699
|
-
|
|
585
|
+
if (typeof Set == "function" && e instanceof Set && t instanceof Set) {
|
|
586
|
+
if (e.size !== t.size)
|
|
587
|
+
return !1;
|
|
588
|
+
for (i = e.entries(); !(n = i.next()).done; )
|
|
589
|
+
if (!t.has(n.value[0]))
|
|
590
|
+
return !1;
|
|
591
|
+
return !0;
|
|
700
592
|
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
593
|
+
if (e.constructor === RegExp)
|
|
594
|
+
return e.source === t.source && e.flags === t.flags;
|
|
595
|
+
if (e.valueOf !== Object.prototype.valueOf)
|
|
596
|
+
return e.valueOf() === t.valueOf();
|
|
597
|
+
if (e.toString !== Object.prototype.toString)
|
|
598
|
+
return e.toString() === t.toString();
|
|
599
|
+
if (r = Object.keys(e), s = r.length, s !== Object.keys(t).length)
|
|
600
|
+
return !1;
|
|
601
|
+
for (n = s; n-- !== 0; )
|
|
602
|
+
if (!Object.prototype.hasOwnProperty.call(t, r[n]))
|
|
603
|
+
return !1;
|
|
604
|
+
if (typeof Element < "u" && e instanceof Element)
|
|
605
|
+
return !1;
|
|
606
|
+
for (n = s; n-- !== 0; )
|
|
607
|
+
if (!(r[n] === "_owner" && e.$$typeof) && !I(e[r[n]], t[r[n]]))
|
|
608
|
+
return !1;
|
|
609
|
+
return !0;
|
|
610
|
+
}
|
|
611
|
+
return e !== e && t !== t;
|
|
612
|
+
}
|
|
613
|
+
function Ct(e, t) {
|
|
614
|
+
try {
|
|
615
|
+
return I(e, t);
|
|
616
|
+
} catch (s) {
|
|
617
|
+
if ((s.message || "").match(/stack|recursion/i))
|
|
618
|
+
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
619
|
+
throw s;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
function k(e = {}, t) {
|
|
623
|
+
const s = {};
|
|
624
|
+
for (const [n, r] of Object.entries(t))
|
|
625
|
+
switch (typeof r) {
|
|
626
|
+
case "function":
|
|
627
|
+
s[n] = r.call(s, e[n], n, e);
|
|
628
|
+
break;
|
|
629
|
+
case "object":
|
|
630
|
+
s[n] = k(e[n], r);
|
|
631
|
+
break;
|
|
632
|
+
case "boolean":
|
|
633
|
+
r && (s[n] = e[n]);
|
|
634
|
+
break;
|
|
720
635
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
p[a] && p[a] === l || (p[a] = l);
|
|
736
|
-
});
|
|
737
|
-
},
|
|
738
|
-
{
|
|
739
|
-
immediate: !0,
|
|
740
|
-
deep: !0
|
|
636
|
+
return s;
|
|
637
|
+
}
|
|
638
|
+
const Mt = 180, kt = 0.15, At = 0.5, Lt = 50, Gt = 250, Kt = {
|
|
639
|
+
threshold(e = 0) {
|
|
640
|
+
return g(e);
|
|
641
|
+
},
|
|
642
|
+
rubberband(e = 0) {
|
|
643
|
+
switch (e) {
|
|
644
|
+
case !0:
|
|
645
|
+
return g(kt);
|
|
646
|
+
case !1:
|
|
647
|
+
return g(0);
|
|
648
|
+
default:
|
|
649
|
+
return g(e);
|
|
741
650
|
}
|
|
742
|
-
), k(t, () => e), {
|
|
743
|
-
motionProperties: i,
|
|
744
|
-
style: n,
|
|
745
|
-
transform: o
|
|
746
|
-
};
|
|
747
|
-
}
|
|
748
|
-
function ge(t = {}) {
|
|
749
|
-
const e = x(t), i = g();
|
|
750
|
-
return {
|
|
751
|
-
state: A(() => {
|
|
752
|
-
if (i.value)
|
|
753
|
-
return e[i.value];
|
|
754
|
-
}),
|
|
755
|
-
variant: i
|
|
756
|
-
};
|
|
757
|
-
}
|
|
758
|
-
function Oe(t, e = {}, i) {
|
|
759
|
-
const { motionProperties: r } = ve(t), { variant: n, state: o } = ge(e), s = Jt(r, e), a = {
|
|
760
|
-
target: t,
|
|
761
|
-
variant: n,
|
|
762
|
-
variants: e,
|
|
763
|
-
state: o,
|
|
764
|
-
motionProperties: r,
|
|
765
|
-
...s
|
|
766
|
-
};
|
|
767
|
-
return se(a, i), a;
|
|
768
|
-
}
|
|
769
|
-
const Te = {
|
|
770
|
-
initial: {
|
|
771
|
-
opacity: 0
|
|
772
|
-
},
|
|
773
|
-
enter: {
|
|
774
|
-
opacity: 1
|
|
775
|
-
}
|
|
776
|
-
}, Ae = {
|
|
777
|
-
initial: {
|
|
778
|
-
opacity: 0
|
|
779
|
-
},
|
|
780
|
-
visible: {
|
|
781
|
-
opacity: 1
|
|
782
|
-
}
|
|
783
|
-
}, xe = {
|
|
784
|
-
initial: {
|
|
785
|
-
opacity: 0
|
|
786
|
-
},
|
|
787
|
-
visibleOnce: {
|
|
788
|
-
opacity: 1
|
|
789
|
-
}
|
|
790
|
-
}, je = {
|
|
791
|
-
initial: {
|
|
792
|
-
scale: 0,
|
|
793
|
-
opacity: 0
|
|
794
|
-
},
|
|
795
|
-
enter: {
|
|
796
|
-
scale: 1,
|
|
797
|
-
opacity: 1
|
|
798
|
-
}
|
|
799
|
-
}, Ve = {
|
|
800
|
-
initial: {
|
|
801
|
-
scale: 0,
|
|
802
|
-
opacity: 0
|
|
803
|
-
},
|
|
804
|
-
visible: {
|
|
805
|
-
scale: 1,
|
|
806
|
-
opacity: 1
|
|
807
|
-
}
|
|
808
|
-
}, Se = {
|
|
809
|
-
initial: {
|
|
810
|
-
scale: 0,
|
|
811
|
-
opacity: 0
|
|
812
|
-
},
|
|
813
|
-
visibleOnce: {
|
|
814
|
-
scale: 1,
|
|
815
|
-
opacity: 1
|
|
816
|
-
}
|
|
817
|
-
}, Ce = {
|
|
818
|
-
initial: {
|
|
819
|
-
x: -100,
|
|
820
|
-
rotate: 90,
|
|
821
|
-
opacity: 0
|
|
822
|
-
},
|
|
823
|
-
enter: {
|
|
824
|
-
x: 0,
|
|
825
|
-
rotate: 0,
|
|
826
|
-
opacity: 1
|
|
827
|
-
}
|
|
828
|
-
}, Ee = {
|
|
829
|
-
initial: {
|
|
830
|
-
x: -100,
|
|
831
|
-
rotate: 90,
|
|
832
|
-
opacity: 0
|
|
833
|
-
},
|
|
834
|
-
visible: {
|
|
835
|
-
x: 0,
|
|
836
|
-
rotate: 0,
|
|
837
|
-
opacity: 1
|
|
838
|
-
}
|
|
839
|
-
}, Ne = {
|
|
840
|
-
initial: {
|
|
841
|
-
x: -100,
|
|
842
|
-
rotate: 90,
|
|
843
|
-
opacity: 0
|
|
844
|
-
},
|
|
845
|
-
visibleOnce: {
|
|
846
|
-
x: 0,
|
|
847
|
-
rotate: 0,
|
|
848
|
-
opacity: 1
|
|
849
|
-
}
|
|
850
|
-
}, Pe = {
|
|
851
|
-
initial: {
|
|
852
|
-
x: 100,
|
|
853
|
-
rotate: -90,
|
|
854
|
-
opacity: 0
|
|
855
|
-
},
|
|
856
|
-
enter: {
|
|
857
|
-
x: 0,
|
|
858
|
-
rotate: 0,
|
|
859
|
-
opacity: 1
|
|
860
|
-
}
|
|
861
|
-
}, _e = {
|
|
862
|
-
initial: {
|
|
863
|
-
x: 100,
|
|
864
|
-
rotate: -90,
|
|
865
|
-
opacity: 0
|
|
866
|
-
},
|
|
867
|
-
visible: {
|
|
868
|
-
x: 0,
|
|
869
|
-
rotate: 0,
|
|
870
|
-
opacity: 1
|
|
871
|
-
}
|
|
872
|
-
}, we = {
|
|
873
|
-
initial: {
|
|
874
|
-
x: 100,
|
|
875
|
-
rotate: -90,
|
|
876
|
-
opacity: 0
|
|
877
|
-
},
|
|
878
|
-
visibleOnce: {
|
|
879
|
-
x: 0,
|
|
880
|
-
rotate: 0,
|
|
881
|
-
opacity: 1
|
|
882
|
-
}
|
|
883
|
-
}, Re = {
|
|
884
|
-
initial: {
|
|
885
|
-
y: -100,
|
|
886
|
-
rotate: -90,
|
|
887
|
-
opacity: 0
|
|
888
|
-
},
|
|
889
|
-
enter: {
|
|
890
|
-
y: 0,
|
|
891
|
-
rotate: 0,
|
|
892
|
-
opacity: 1
|
|
893
|
-
}
|
|
894
|
-
}, Me = {
|
|
895
|
-
initial: {
|
|
896
|
-
y: -100,
|
|
897
|
-
rotate: -90,
|
|
898
|
-
opacity: 0
|
|
899
|
-
},
|
|
900
|
-
visible: {
|
|
901
|
-
y: 0,
|
|
902
|
-
rotate: 0,
|
|
903
|
-
opacity: 1
|
|
904
|
-
}
|
|
905
|
-
}, Le = {
|
|
906
|
-
initial: {
|
|
907
|
-
y: -100,
|
|
908
|
-
rotate: -90,
|
|
909
|
-
opacity: 0
|
|
910
|
-
},
|
|
911
|
-
visibleOnce: {
|
|
912
|
-
y: 0,
|
|
913
|
-
rotate: 0,
|
|
914
|
-
opacity: 1
|
|
915
|
-
}
|
|
916
|
-
}, ke = {
|
|
917
|
-
initial: {
|
|
918
|
-
y: 100,
|
|
919
|
-
rotate: 90,
|
|
920
|
-
opacity: 0
|
|
921
651
|
},
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
rotate: 0,
|
|
925
|
-
opacity: 1
|
|
926
|
-
}
|
|
927
|
-
}, qe = {
|
|
928
|
-
initial: {
|
|
929
|
-
y: 100,
|
|
930
|
-
rotate: 90,
|
|
931
|
-
opacity: 0
|
|
932
|
-
},
|
|
933
|
-
visible: {
|
|
934
|
-
y: 0,
|
|
935
|
-
rotate: 0,
|
|
936
|
-
opacity: 1
|
|
937
|
-
}
|
|
938
|
-
}, Be = {
|
|
939
|
-
initial: {
|
|
940
|
-
y: 100,
|
|
941
|
-
rotate: 90,
|
|
942
|
-
opacity: 0
|
|
943
|
-
},
|
|
944
|
-
visibleOnce: {
|
|
945
|
-
y: 0,
|
|
946
|
-
rotate: 0,
|
|
947
|
-
opacity: 1
|
|
948
|
-
}
|
|
949
|
-
}, De = {
|
|
950
|
-
initial: {
|
|
951
|
-
x: -100,
|
|
952
|
-
opacity: 0
|
|
953
|
-
},
|
|
954
|
-
enter: {
|
|
955
|
-
x: 0,
|
|
956
|
-
opacity: 1
|
|
957
|
-
}
|
|
958
|
-
}, Fe = {
|
|
959
|
-
initial: {
|
|
960
|
-
x: -100,
|
|
961
|
-
opacity: 0
|
|
962
|
-
},
|
|
963
|
-
visible: {
|
|
964
|
-
x: 0,
|
|
965
|
-
opacity: 1
|
|
966
|
-
}
|
|
967
|
-
}, ze = {
|
|
968
|
-
initial: {
|
|
969
|
-
x: -100,
|
|
970
|
-
opacity: 0
|
|
971
|
-
},
|
|
972
|
-
visibleOnce: {
|
|
973
|
-
x: 0,
|
|
974
|
-
opacity: 1
|
|
975
|
-
}
|
|
976
|
-
}, Ie = {
|
|
977
|
-
initial: {
|
|
978
|
-
x: 100,
|
|
979
|
-
opacity: 0
|
|
980
|
-
},
|
|
981
|
-
enter: {
|
|
982
|
-
x: 0,
|
|
983
|
-
opacity: 1
|
|
984
|
-
}
|
|
985
|
-
}, Ue = {
|
|
986
|
-
initial: {
|
|
987
|
-
x: 100,
|
|
988
|
-
opacity: 0
|
|
989
|
-
},
|
|
990
|
-
visible: {
|
|
991
|
-
x: 0,
|
|
992
|
-
opacity: 1
|
|
993
|
-
}
|
|
994
|
-
}, We = {
|
|
995
|
-
initial: {
|
|
996
|
-
x: 100,
|
|
997
|
-
opacity: 0
|
|
998
|
-
},
|
|
999
|
-
visibleOnce: {
|
|
1000
|
-
x: 0,
|
|
1001
|
-
opacity: 1
|
|
1002
|
-
}
|
|
1003
|
-
}, Xe = {
|
|
1004
|
-
initial: {
|
|
1005
|
-
y: -100,
|
|
1006
|
-
opacity: 0
|
|
1007
|
-
},
|
|
1008
|
-
enter: {
|
|
1009
|
-
y: 0,
|
|
1010
|
-
opacity: 1
|
|
1011
|
-
}
|
|
1012
|
-
}, Ye = {
|
|
1013
|
-
initial: {
|
|
1014
|
-
y: -100,
|
|
1015
|
-
opacity: 0
|
|
1016
|
-
},
|
|
1017
|
-
visible: {
|
|
1018
|
-
y: 0,
|
|
1019
|
-
opacity: 1
|
|
1020
|
-
}
|
|
1021
|
-
}, Ze = {
|
|
1022
|
-
initial: {
|
|
1023
|
-
y: -100,
|
|
1024
|
-
opacity: 0
|
|
1025
|
-
},
|
|
1026
|
-
visibleOnce: {
|
|
1027
|
-
y: 0,
|
|
1028
|
-
opacity: 1
|
|
1029
|
-
}
|
|
1030
|
-
}, He = {
|
|
1031
|
-
initial: {
|
|
1032
|
-
y: 100,
|
|
1033
|
-
opacity: 0
|
|
1034
|
-
},
|
|
1035
|
-
enter: {
|
|
1036
|
-
y: 0,
|
|
1037
|
-
opacity: 1
|
|
1038
|
-
}
|
|
1039
|
-
}, Ke = {
|
|
1040
|
-
initial: {
|
|
1041
|
-
y: 100,
|
|
1042
|
-
opacity: 0
|
|
1043
|
-
},
|
|
1044
|
-
visible: {
|
|
1045
|
-
y: 0,
|
|
1046
|
-
opacity: 1
|
|
1047
|
-
}
|
|
1048
|
-
}, $e = {
|
|
1049
|
-
initial: {
|
|
1050
|
-
y: 100,
|
|
1051
|
-
opacity: 0
|
|
652
|
+
enabled(e = !0) {
|
|
653
|
+
return e;
|
|
1052
654
|
},
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
opacity: 1
|
|
1056
|
-
}
|
|
1057
|
-
}, Y = {
|
|
1058
|
-
__proto__: null,
|
|
1059
|
-
fade: Te,
|
|
1060
|
-
fadeVisible: Ae,
|
|
1061
|
-
fadeVisibleOnce: xe,
|
|
1062
|
-
pop: je,
|
|
1063
|
-
popVisible: Ve,
|
|
1064
|
-
popVisibleOnce: Se,
|
|
1065
|
-
rollBottom: ke,
|
|
1066
|
-
rollLeft: Ce,
|
|
1067
|
-
rollRight: Pe,
|
|
1068
|
-
rollTop: Re,
|
|
1069
|
-
rollVisibleBottom: qe,
|
|
1070
|
-
rollVisibleLeft: Ee,
|
|
1071
|
-
rollVisibleOnceBottom: Be,
|
|
1072
|
-
rollVisibleOnceLeft: Ne,
|
|
1073
|
-
rollVisibleOnceRight: we,
|
|
1074
|
-
rollVisibleOnceTop: Le,
|
|
1075
|
-
rollVisibleRight: _e,
|
|
1076
|
-
rollVisibleTop: Me,
|
|
1077
|
-
slideBottom: He,
|
|
1078
|
-
slideLeft: De,
|
|
1079
|
-
slideRight: Ie,
|
|
1080
|
-
slideTop: Xe,
|
|
1081
|
-
slideVisibleBottom: Ke,
|
|
1082
|
-
slideVisibleLeft: Fe,
|
|
1083
|
-
slideVisibleOnceBottom: $e,
|
|
1084
|
-
slideVisibleOnceLeft: ze,
|
|
1085
|
-
slideVisibleOnceRight: We,
|
|
1086
|
-
slideVisibleOnceTop: Ze,
|
|
1087
|
-
slideVisibleRight: Ue,
|
|
1088
|
-
slideVisibleTop: Ye
|
|
1089
|
-
}, Ge = /* @__PURE__ */ Symbol(
|
|
1090
|
-
""
|
|
1091
|
-
), rt = {
|
|
1092
|
-
// Preset to be loaded
|
|
1093
|
-
preset: {
|
|
1094
|
-
type: String,
|
|
1095
|
-
required: !1
|
|
655
|
+
triggerAllEvents(e = !1) {
|
|
656
|
+
return e;
|
|
1096
657
|
},
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
type: Object,
|
|
1100
|
-
required: !1
|
|
658
|
+
initial(e = 0) {
|
|
659
|
+
return typeof e == "function" ? e : g(e);
|
|
1101
660
|
},
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
661
|
+
transform: !0
|
|
662
|
+
}, q = {
|
|
663
|
+
...Kt,
|
|
664
|
+
axis: !0,
|
|
665
|
+
lockDirection(e = !1) {
|
|
666
|
+
return e;
|
|
1106
667
|
},
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
668
|
+
bounds(e = {}) {
|
|
669
|
+
if (typeof e == "function")
|
|
670
|
+
return (i) => q.bounds(e(i));
|
|
671
|
+
const {
|
|
672
|
+
left: t = -1 / 0,
|
|
673
|
+
right: s = 1 / 0,
|
|
674
|
+
top: n = -1 / 0,
|
|
675
|
+
bottom: r = 1 / 0
|
|
676
|
+
} = e;
|
|
677
|
+
return [
|
|
678
|
+
[t, s],
|
|
679
|
+
[n, r]
|
|
680
|
+
];
|
|
681
|
+
}
|
|
682
|
+
}, zt = typeof window < "u" && window.document && window.document.createElement, Rt = {
|
|
683
|
+
enabled(e = !0) {
|
|
684
|
+
return e;
|
|
1111
685
|
},
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
required: !1
|
|
686
|
+
domTarget: !0,
|
|
687
|
+
window(e = zt ? window : void 0) {
|
|
688
|
+
return e;
|
|
1116
689
|
},
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
required: !1
|
|
690
|
+
eventOptions({ passive: e = !0, capture: t = !1 } = {}) {
|
|
691
|
+
return { passive: e, capture: t };
|
|
1120
692
|
},
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
693
|
+
transform: !0
|
|
694
|
+
}, Nt = {
|
|
695
|
+
...q,
|
|
696
|
+
useTouch(e = !0) {
|
|
697
|
+
return e && j();
|
|
1125
698
|
},
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
required: !1
|
|
699
|
+
preventWindowScrollY(e = !1) {
|
|
700
|
+
return e;
|
|
1129
701
|
},
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
702
|
+
threshold(e, t, { filterTaps: s = !1, lockDirection: n = !1, axis: r = void 0 }) {
|
|
703
|
+
const i = g(
|
|
704
|
+
e,
|
|
705
|
+
s ? 3 : n || r ? 1 : 0
|
|
706
|
+
);
|
|
707
|
+
return this.filterTaps = s, i;
|
|
1134
708
|
},
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
required: !1
|
|
709
|
+
swipeVelocity(e = At) {
|
|
710
|
+
return g(e);
|
|
1138
711
|
},
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
required: !1
|
|
712
|
+
swipeDistance(e = Lt) {
|
|
713
|
+
return g(e);
|
|
1142
714
|
},
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
type: [Number, String],
|
|
1146
|
-
required: !1
|
|
715
|
+
swipeDuration(e = Gt) {
|
|
716
|
+
return e;
|
|
1147
717
|
},
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
718
|
+
delay(e = 0) {
|
|
719
|
+
switch (e) {
|
|
720
|
+
case !0:
|
|
721
|
+
return Mt;
|
|
722
|
+
case !1:
|
|
723
|
+
return 0;
|
|
724
|
+
default:
|
|
725
|
+
return e;
|
|
726
|
+
}
|
|
1151
727
|
}
|
|
1152
728
|
};
|
|
1153
|
-
function
|
|
1154
|
-
return
|
|
729
|
+
function Wt(e) {
|
|
730
|
+
return k(
|
|
731
|
+
e,
|
|
732
|
+
Rt
|
|
733
|
+
);
|
|
1155
734
|
}
|
|
1156
|
-
function
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
for (const i in t)
|
|
1162
|
-
e[i] = w(t[i]);
|
|
1163
|
-
return e;
|
|
1164
|
-
}
|
|
1165
|
-
return t;
|
|
735
|
+
function Ut(e = {}) {
|
|
736
|
+
return k(
|
|
737
|
+
e,
|
|
738
|
+
Nt
|
|
739
|
+
);
|
|
1166
740
|
}
|
|
1167
|
-
function
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
for (const u of ["delay", "duration"]) {
|
|
1180
|
-
if (p[u] == null)
|
|
1181
|
-
continue;
|
|
1182
|
-
const f = Number.parseInt(
|
|
1183
|
-
p[u]
|
|
1184
|
-
);
|
|
1185
|
-
for (const y of ["enter", "visible", "visibleOnce"]) {
|
|
1186
|
-
const d = l[y];
|
|
1187
|
-
d != null && (d.transition ??= {}, d.transition[u] = f);
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
return l;
|
|
1191
|
-
}
|
|
1192
|
-
const s = A(() => {
|
|
1193
|
-
const l = st(
|
|
1194
|
-
{},
|
|
1195
|
-
n.value,
|
|
1196
|
-
r.value,
|
|
1197
|
-
t.variants || {}
|
|
1198
|
-
);
|
|
1199
|
-
return o({ ...l }, t);
|
|
741
|
+
function jt({
|
|
742
|
+
domTarget: e,
|
|
743
|
+
eventOptions: t,
|
|
744
|
+
window: s,
|
|
745
|
+
enabled: n,
|
|
746
|
+
...r
|
|
747
|
+
}) {
|
|
748
|
+
const i = Wt({
|
|
749
|
+
domTarget: e,
|
|
750
|
+
eventOptions: t,
|
|
751
|
+
window: s,
|
|
752
|
+
enabled: n
|
|
1200
753
|
});
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
y.style[v] = S;
|
|
1216
|
-
}, l;
|
|
1217
|
-
}
|
|
1218
|
-
return {
|
|
1219
|
-
motionConfig: s,
|
|
1220
|
-
setNodeInstance: a
|
|
1221
|
-
};
|
|
754
|
+
return i.drag = Ut(r), i;
|
|
755
|
+
}
|
|
756
|
+
function Vt(e, t, s = {}) {
|
|
757
|
+
const n = Yt(e), r = new ct(n);
|
|
758
|
+
return r.config = t, r.handlers = e, r.nativeRefs = s, tt() && !t.manual && (et(r.bind), st(r.clean)), r;
|
|
759
|
+
}
|
|
760
|
+
function Yt(e) {
|
|
761
|
+
const t = /* @__PURE__ */ new Set();
|
|
762
|
+
return e.drag && t.add(v.get("drag")), e.wheel && t.add(v.get("wheel")), e.scroll && t.add(v.get("scroll")), e.move && t.add(v.get("move")), e.pinch && t.add(v.get("pinch")), e.hover && t.add(v.get("hover")), t;
|
|
763
|
+
}
|
|
764
|
+
function Ft(e, t = {}) {
|
|
765
|
+
v.set("drag", Pt);
|
|
766
|
+
const s = Z();
|
|
767
|
+
return s.value || (s.value = xt(jt, Ct)), Vt({ drag: e }, s.value(t));
|
|
1222
768
|
}
|
|
1223
|
-
Z({
|
|
1224
|
-
name: "Motion",
|
|
1225
|
-
props: {
|
|
1226
|
-
...rt,
|
|
1227
|
-
is: {
|
|
1228
|
-
type: [String, Object],
|
|
1229
|
-
default: "div"
|
|
1230
|
-
}
|
|
1231
|
-
},
|
|
1232
|
-
setup(t) {
|
|
1233
|
-
const e = H(), { motionConfig: i, setNodeInstance: r } = nt(t);
|
|
1234
|
-
return () => {
|
|
1235
|
-
const n = B(i.value.initial || {}), o = K(t.is, void 0, e);
|
|
1236
|
-
return r(o, 0, n), o;
|
|
1237
|
-
};
|
|
1238
|
-
}
|
|
1239
|
-
});
|
|
1240
|
-
Z({
|
|
1241
|
-
name: "MotionGroup",
|
|
1242
|
-
props: {
|
|
1243
|
-
...rt,
|
|
1244
|
-
is: {
|
|
1245
|
-
type: [String, Object],
|
|
1246
|
-
required: !1
|
|
1247
|
-
}
|
|
1248
|
-
},
|
|
1249
|
-
setup(t) {
|
|
1250
|
-
const e = H(), { motionConfig: i, setNodeInstance: r } = nt(t);
|
|
1251
|
-
return () => {
|
|
1252
|
-
const n = B(i.value.initial || {}), o = e.default?.() || [];
|
|
1253
|
-
for (let s = 0; s < o.length; s++) {
|
|
1254
|
-
const a = o[s];
|
|
1255
|
-
a.type === at && Array.isArray(a.children) ? a.children.forEach(function l(p, u) {
|
|
1256
|
-
if (p != null) {
|
|
1257
|
-
if (Array.isArray(p)) {
|
|
1258
|
-
l(p, u);
|
|
1259
|
-
return;
|
|
1260
|
-
}
|
|
1261
|
-
typeof p == "object" && r(p, u, n);
|
|
1262
|
-
}
|
|
1263
|
-
}) : r(a, s, n);
|
|
1264
|
-
}
|
|
1265
|
-
return t.is ? K(t.is, void 0, o) : o;
|
|
1266
|
-
};
|
|
1267
|
-
}
|
|
1268
|
-
});
|
|
1269
769
|
export {
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
Ve as popVisible,
|
|
1275
|
-
Se as popVisibleOnce,
|
|
1276
|
-
Q as reactiveStyle,
|
|
1277
|
-
tt as reactiveTransform,
|
|
1278
|
-
ke as rollBottom,
|
|
1279
|
-
Ce as rollLeft,
|
|
1280
|
-
Pe as rollRight,
|
|
1281
|
-
Re as rollTop,
|
|
1282
|
-
qe as rollVisibleBottom,
|
|
1283
|
-
Ee as rollVisibleLeft,
|
|
1284
|
-
Be as rollVisibleOnceBottom,
|
|
1285
|
-
Ne as rollVisibleOnceLeft,
|
|
1286
|
-
we as rollVisibleOnceRight,
|
|
1287
|
-
Le as rollVisibleOnceTop,
|
|
1288
|
-
_e as rollVisibleRight,
|
|
1289
|
-
Me as rollVisibleTop,
|
|
1290
|
-
He as slideBottom,
|
|
1291
|
-
De as slideLeft,
|
|
1292
|
-
Ie as slideRight,
|
|
1293
|
-
Xe as slideTop,
|
|
1294
|
-
Ke as slideVisibleBottom,
|
|
1295
|
-
Fe as slideVisibleLeft,
|
|
1296
|
-
$e as slideVisibleOnceBottom,
|
|
1297
|
-
ze as slideVisibleOnceLeft,
|
|
1298
|
-
We as slideVisibleOnceRight,
|
|
1299
|
-
Ze as slideVisibleOnceTop,
|
|
1300
|
-
Ue as slideVisibleRight,
|
|
1301
|
-
Ye as slideVisibleTop,
|
|
1302
|
-
ye as useElementStyle,
|
|
1303
|
-
be as useElementTransform,
|
|
1304
|
-
Oe as useMotion,
|
|
1305
|
-
Jt as useMotionControls,
|
|
1306
|
-
se as useMotionFeatures,
|
|
1307
|
-
ve as useMotionProperties,
|
|
1308
|
-
Gt as useMotionTransitions,
|
|
1309
|
-
ge as useMotionVariants
|
|
770
|
+
x as addV,
|
|
771
|
+
R as rubberbandIfOutOfBounds,
|
|
772
|
+
H as subV,
|
|
773
|
+
Ft as useDrag
|
|
1310
774
|
};
|