@orioncactuscorp/ui 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.css +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Button/Button.css +1 -1
- package/dist/components/Checkbox/Checkbox.css +1 -1
- package/dist/components/Modal/Modal.css +1 -1
- package/dist/components/Modal/Modal.js +671 -517
- package/dist/components/Modal/bottomSheetGeometry.js +88 -0
- package/dist/components/Modal/modalScrollArbitration.js +8 -7
- package/dist/components/Modal/snapPoints.js +9 -8
- package/dist/components/Modal/useModalContentBlockTransition.js +64 -0
- package/dist/components/Modal/useModalDrag.js +917 -788
- package/dist/components/Radio/Radio.css +1 -1
- package/dist/components/ScrollArea/ScrollArea.css +1 -1
- package/dist/components/ScrollArea/ScrollArea.js +250 -223
- package/dist/components/ScrollArea/useScrollAreaGeometryStabilizer.js +36 -0
- package/dist/components/TextButton/TextButton.css +1 -1
- package/dist/components/TextButton/TextButton.module.scss.js +8 -6
- package/dist/components/internal/DisclosureIndicator.js +23 -23
- package/dist/styles.css +7 -7
- package/dist/ui/src/components/Modal/Modal.d.ts +2 -2
- package/dist/ui/src/components/Modal/Modal.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/bottomSheetGeometry.d.ts +36 -0
- package/dist/ui/src/components/Modal/bottomSheetGeometry.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/index.d.ts +1 -1
- package/dist/ui/src/components/Modal/index.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/modalScrollArbitration.d.ts +2 -1
- package/dist/ui/src/components/Modal/modalScrollArbitration.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/snapPoints.d.ts +1 -0
- package/dist/ui/src/components/Modal/snapPoints.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/types.d.ts +11 -1
- package/dist/ui/src/components/Modal/types.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/useModalContentBlockTransition.d.ts +5 -0
- package/dist/ui/src/components/Modal/useModalContentBlockTransition.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/useModalDrag.d.ts +5 -1
- package/dist/ui/src/components/Modal/useModalDrag.d.ts.map +1 -1
- package/dist/ui/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/ui/src/components/ScrollArea/useScrollAreaGeometryStabilizer.d.ts +11 -0
- package/dist/ui/src/components/ScrollArea/useScrollAreaGeometryStabilizer.d.ts.map +1 -0
- package/dist/ui/src/index.d.ts +1 -1
- package/dist/ui/src/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/scss/mixins/_element.scss +161 -14
- package/src/scss/mixins/_element.test.ts +94 -5
- package/src/scss/mixins/_icon.scss +27 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { ocSpring as
|
|
3
|
-
import { resolveOcMotion as
|
|
4
|
-
import { resolveModalPopupSnapPositions as
|
|
5
|
-
import { setModalBodyTouchScrollLock as
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { useRef as P, useLayoutEffect as rt, useCallback as p, useEffect as Bt } from "react";
|
|
2
|
+
import { ocSpring as $e } from "../../utils/spring.js";
|
|
3
|
+
import { resolveOcMotion as _t } from "../../utils/motion.js";
|
|
4
|
+
import { resolveModalPopupSnapPositions as Ue } from "./snapPoints.js";
|
|
5
|
+
import { setModalBodyTouchScrollLock as jt, shouldLockModalBodyTouchScroll as We, shouldIgnoreDragTarget as zt, getScrollableAncestor as Ge, getBottomTouchDragDecision as Ke, getPopupTouchDragDecision as Je } from "./modalScrollArbitration.js";
|
|
6
|
+
import { resolveResizedBottomSheetTranslate as Qe, resolveBottomSheetRestState as Ze } from "./bottomSheetGeometry.js";
|
|
7
|
+
import { createSpringAnimator as $t } from "../../utils/spring/animator.js";
|
|
8
|
+
const F = {
|
|
8
9
|
dragStartThresholdPx: {
|
|
9
10
|
touch: 10,
|
|
10
11
|
mouse: 2
|
|
@@ -35,129 +36,129 @@ const M = {
|
|
|
35
36
|
popupDragFollower: {
|
|
36
37
|
settleDurationFactor: 1 / 6
|
|
37
38
|
}
|
|
38
|
-
},
|
|
39
|
-
duration:
|
|
40
|
-
}),
|
|
41
|
-
function
|
|
39
|
+
}, qe = $e.snappy({
|
|
40
|
+
duration: F.settleSpring.durationSeconds * F.popupDragFollower.settleDurationFactor
|
|
41
|
+
}), tr = [], er = [];
|
|
42
|
+
function Pe(r) {
|
|
42
43
|
r.cancelable !== !1 && r.preventDefault();
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function B(r, n, i) {
|
|
45
46
|
return Math.min(Math.max(r, n), i);
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
+
function we(r) {
|
|
48
49
|
return [...new Set(r)].sort((n, i) => n - i);
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function rr(r, n) {
|
|
51
52
|
return r.reduce(
|
|
52
|
-
(i,
|
|
53
|
+
(i, o) => Math.abs(o - n) < Math.abs(i - n) ? o : i
|
|
53
54
|
);
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function ve({
|
|
56
57
|
deltaX: r,
|
|
57
58
|
deltaY: n,
|
|
58
59
|
placement: i
|
|
59
60
|
}) {
|
|
60
61
|
return i === "bottom" ? Math.abs(n) : Math.hypot(r, n);
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
+
function nr(r, n, i) {
|
|
63
64
|
if (i === "down")
|
|
64
65
|
return r.find((l) => l > n + 1) ?? r[r.length - 1] ?? 0;
|
|
65
66
|
for (let l = r.length - 1; l >= 0; l -= 1) {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
return
|
|
67
|
+
const h = r[l];
|
|
68
|
+
if (h !== void 0 && h < n - 1)
|
|
69
|
+
return h;
|
|
69
70
|
}
|
|
70
71
|
return r[0] ?? 0;
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
-
const y =
|
|
74
|
-
if (
|
|
73
|
+
function or(r, n, i, o, l = i) {
|
|
74
|
+
const y = nr(r, n, o), T = o === "down" ? Math.max(i, l) : Math.min(i, l);
|
|
75
|
+
if (o === "down") {
|
|
75
76
|
if (r.filter(
|
|
76
|
-
(
|
|
77
|
+
(_) => _ > n + 1 && _ <= i + 1
|
|
77
78
|
).length === 0) return y;
|
|
78
|
-
const
|
|
79
|
-
(
|
|
79
|
+
const Q = r.filter(
|
|
80
|
+
(_) => _ > n + 1 && _ <= T + 1
|
|
80
81
|
);
|
|
81
|
-
return
|
|
82
|
+
return Q[Q.length - 1] ?? y;
|
|
82
83
|
}
|
|
83
84
|
return r.filter(
|
|
84
|
-
(
|
|
85
|
+
(b) => b < n - 1 && b >= i - 1
|
|
85
86
|
).length === 0 ? y : r.filter(
|
|
86
|
-
(
|
|
87
|
+
(b) => b < n - 1 && b >= T - 1
|
|
87
88
|
)[0] ?? y;
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function De(r, n) {
|
|
90
91
|
if (n <= 0) return 0;
|
|
91
|
-
const i = n, { resistance:
|
|
92
|
-
return r *
|
|
92
|
+
const i = n, { resistance: o } = F.rubberBand;
|
|
93
|
+
return r * o * i / (i + o * r);
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
+
function Ut({
|
|
95
96
|
targetTranslate: r,
|
|
96
97
|
minTranslate: n,
|
|
97
98
|
maxTranslate: i,
|
|
98
|
-
minBoundaryLimit:
|
|
99
|
+
minBoundaryLimit: o,
|
|
99
100
|
maxBoundaryLimit: l
|
|
100
101
|
}) {
|
|
101
|
-
return r < n ? n -
|
|
102
|
+
return r < n ? n - De(n - r, o) : r > i ? i + De(r - i, l) : r;
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
+
function Se(r) {
|
|
104
105
|
return typeof Element > "u" || !(r instanceof Element) ? !1 : !!r.closest('[data-oc-part="handle"], [data-oc-part="header"]');
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
+
function Xe(r) {
|
|
107
108
|
return typeof Element > "u" || !(r instanceof Element) ? !1 : !!r.closest(
|
|
108
109
|
'[data-oc-part="handle"], [data-oc-component="modal-navigation"]'
|
|
109
110
|
);
|
|
110
111
|
}
|
|
111
|
-
function
|
|
112
|
+
function ar(r) {
|
|
112
113
|
return typeof Element > "u" || !(r instanceof Element) ? !1 : !!r.closest('[data-oc-component="modal-navigation"]');
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function sr(r) {
|
|
115
116
|
return typeof Element > "u" || !(r instanceof Element) ? null : r.closest('[data-oc-component="modal-navigation"]');
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
+
function ir(r, n) {
|
|
118
119
|
return n ? !0 : r.pointerType ? r.pointerType === "touch" : typeof window > "u" ? !1 : window.matchMedia?.("(pointer: coarse)").matches ?? !1;
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
+
function Ye(r, n) {
|
|
121
122
|
if (!r.length)
|
|
122
123
|
return {
|
|
123
124
|
minTranslate: 0,
|
|
124
125
|
maxTranslate: 0
|
|
125
126
|
};
|
|
126
|
-
const i = r.map((
|
|
127
|
-
if (Math.abs(l -
|
|
128
|
-
const
|
|
127
|
+
const i = r.map((h) => h[n]), o = Math.min(...i), l = Math.max(...i);
|
|
128
|
+
if (Math.abs(l - o) < 0.5) {
|
|
129
|
+
const h = (o + l) / 2;
|
|
129
130
|
return {
|
|
130
|
-
minTranslate:
|
|
131
|
-
maxTranslate:
|
|
131
|
+
minTranslate: h,
|
|
132
|
+
maxTranslate: h
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
135
|
return {
|
|
135
|
-
minTranslate:
|
|
136
|
+
minTranslate: o,
|
|
136
137
|
maxTranslate: l
|
|
137
138
|
};
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
+
function Ee(r, n) {
|
|
140
141
|
for (let i = 0; i < r.length; i += 1) {
|
|
141
|
-
const
|
|
142
|
-
if (
|
|
142
|
+
const o = "item" in r && typeof r.item == "function" ? r.item(i) : r[i];
|
|
143
|
+
if (o?.identifier === n) return o;
|
|
143
144
|
}
|
|
144
145
|
return null;
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function Ae(r) {
|
|
147
148
|
if (!r) return { x: 0, y: 0 };
|
|
148
149
|
const n = window.getComputedStyle(r).transform;
|
|
149
150
|
if (!n || n === "none") return { x: 0, y: 0 };
|
|
150
151
|
const i = n.match(/^matrix\((.+)\)$/);
|
|
151
152
|
if (i) {
|
|
152
|
-
const l = i[1].split(",").map((
|
|
153
|
+
const l = i[1].split(",").map((h) => h.trim());
|
|
153
154
|
return {
|
|
154
155
|
x: Number.parseFloat(l[4] ?? "0") || 0,
|
|
155
156
|
y: Number.parseFloat(l[5] ?? "0") || 0
|
|
156
157
|
};
|
|
157
158
|
}
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
const l =
|
|
159
|
+
const o = n.match(/^matrix3d\((.+)\)$/);
|
|
160
|
+
if (o) {
|
|
161
|
+
const l = o[1].split(",").map((h) => h.trim());
|
|
161
162
|
return {
|
|
162
163
|
x: Number.parseFloat(l[12] ?? "0") || 0,
|
|
163
164
|
y: Number.parseFloat(l[13] ?? "0") || 0
|
|
@@ -165,329 +166,333 @@ function De(r) {
|
|
|
165
166
|
}
|
|
166
167
|
return { x: 0, y: 0 };
|
|
167
168
|
}
|
|
168
|
-
function
|
|
169
|
-
return
|
|
169
|
+
function Wt(r) {
|
|
170
|
+
return Ae(r).y;
|
|
170
171
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
172
|
+
function Me(r) {
|
|
173
|
+
return Ae(r);
|
|
173
174
|
}
|
|
174
|
-
function
|
|
175
|
+
function ht(r) {
|
|
175
176
|
if (!r || !/^-?\d*\.?\d+(?:px)?$/.test(r.trim())) return;
|
|
176
177
|
const n = Number.parseFloat(r);
|
|
177
178
|
return Number.isFinite(n) ? n : void 0;
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
+
function K() {
|
|
180
181
|
return Date.now();
|
|
181
182
|
}
|
|
182
|
-
function
|
|
183
|
-
const i = n -
|
|
183
|
+
function lr(r, n) {
|
|
184
|
+
const i = n - F.releaseVelocity.sampleWindowMs;
|
|
184
185
|
for (; r.length > 2 && (r[1]?.time ?? n) < i; )
|
|
185
186
|
r.shift();
|
|
186
187
|
}
|
|
187
|
-
function
|
|
188
|
-
const i = n.time ??
|
|
188
|
+
function xt(r, n) {
|
|
189
|
+
const i = n.time ?? K();
|
|
189
190
|
r.samples.push({
|
|
190
191
|
time: i,
|
|
191
192
|
pageX: n.pageX,
|
|
192
193
|
pageY: n.pageY,
|
|
193
194
|
translateX: n.translateX,
|
|
194
195
|
translateY: n.translateY
|
|
195
|
-
}),
|
|
196
|
+
}), lr(r.samples, i);
|
|
196
197
|
}
|
|
197
|
-
function
|
|
198
|
+
function At(r, n) {
|
|
198
199
|
return {
|
|
199
200
|
x: r.startTranslateX + n.pageX - r.startX,
|
|
200
201
|
y: r.startTranslate + n.pageY - r.startY
|
|
201
202
|
};
|
|
202
203
|
}
|
|
203
|
-
function
|
|
204
|
-
const i =
|
|
205
|
-
|
|
204
|
+
function Le(r, n) {
|
|
205
|
+
const i = At(r, n);
|
|
206
|
+
xt(r, {
|
|
206
207
|
pageX: n.pageX,
|
|
207
208
|
pageY: n.pageY,
|
|
208
209
|
translateX: i.x,
|
|
209
210
|
translateY: i.y
|
|
210
211
|
});
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
+
function ke({
|
|
213
214
|
session: r,
|
|
214
215
|
fallbackDeltaY: n,
|
|
215
216
|
fallbackElapsed: i
|
|
216
217
|
}) {
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
const y =
|
|
220
|
-
if (T && T !==
|
|
221
|
-
const
|
|
222
|
-
if (Number.isFinite(
|
|
223
|
-
return
|
|
218
|
+
const o = r.samples[r.samples.length - 1], { maxPxPerSecond: l, sampleWindowMs: h } = F.releaseVelocity;
|
|
219
|
+
if (o) {
|
|
220
|
+
const y = o.time - h, T = r.samples.find((v) => v.time >= y) ?? r.samples[0];
|
|
221
|
+
if (T && T !== o) {
|
|
222
|
+
const v = Math.max(o.time - T.time, 1), L = (o.translateY - T.translateY) / v * 1e3;
|
|
223
|
+
if (Number.isFinite(L))
|
|
224
|
+
return B(L, -l, l);
|
|
224
225
|
}
|
|
225
226
|
}
|
|
226
|
-
return
|
|
227
|
+
return B(
|
|
227
228
|
n / Math.max(i, 1) * 1e3,
|
|
228
229
|
-l,
|
|
229
230
|
l
|
|
230
231
|
);
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
+
function be({
|
|
233
234
|
session: r,
|
|
234
235
|
fallbackDelta: n,
|
|
235
236
|
fallbackElapsed: i
|
|
236
237
|
}) {
|
|
237
|
-
const
|
|
238
|
-
if (
|
|
239
|
-
const y =
|
|
240
|
-
if (T && T !==
|
|
241
|
-
const
|
|
242
|
-
x: (
|
|
243
|
-
y: (
|
|
238
|
+
const o = r.samples[r.samples.length - 1], { maxPxPerSecond: l, sampleWindowMs: h } = F.releaseVelocity;
|
|
239
|
+
if (o) {
|
|
240
|
+
const y = o.time - h, T = r.samples.find((v) => v.time >= y) ?? r.samples[0];
|
|
241
|
+
if (T && T !== o) {
|
|
242
|
+
const v = Math.max(o.time - T.time, 1), L = {
|
|
243
|
+
x: (o.translateX - T.translateX) / v * 1e3,
|
|
244
|
+
y: (o.translateY - T.translateY) / v * 1e3
|
|
244
245
|
};
|
|
245
|
-
if (Number.isFinite(
|
|
246
|
+
if (Number.isFinite(L.x) && Number.isFinite(L.y))
|
|
246
247
|
return {
|
|
247
|
-
x:
|
|
248
|
-
y:
|
|
248
|
+
x: B(L.x, -l, l),
|
|
249
|
+
y: B(L.y, -l, l)
|
|
249
250
|
};
|
|
250
251
|
}
|
|
251
252
|
}
|
|
252
253
|
return {
|
|
253
|
-
x:
|
|
254
|
+
x: B(
|
|
254
255
|
n.x / Math.max(i, 1) * 1e3,
|
|
255
256
|
-l,
|
|
256
257
|
l
|
|
257
258
|
),
|
|
258
|
-
y:
|
|
259
|
+
y: B(
|
|
259
260
|
n.y / Math.max(i, 1) * 1e3,
|
|
260
261
|
-l,
|
|
261
262
|
l
|
|
262
263
|
)
|
|
263
264
|
};
|
|
264
265
|
}
|
|
265
|
-
function
|
|
266
|
+
function cr({
|
|
266
267
|
currentTranslate: r,
|
|
267
268
|
releaseVelocity: n
|
|
268
269
|
}) {
|
|
269
|
-
const { lookaheadSeconds: i, maxDistancePx:
|
|
270
|
-
return r +
|
|
270
|
+
const { lookaheadSeconds: i, maxDistancePx: o } = F.snapProjection;
|
|
271
|
+
return r + B(n * i, -o, o);
|
|
271
272
|
}
|
|
272
|
-
function
|
|
273
|
+
function ur({
|
|
273
274
|
currentTranslate: r,
|
|
274
275
|
releaseVelocity: n
|
|
275
276
|
}) {
|
|
276
|
-
const { lookaheadSeconds: i, maxDistancePx:
|
|
277
|
+
const { lookaheadSeconds: i, maxDistancePx: o } = F.snapProjection;
|
|
277
278
|
return {
|
|
278
|
-
x: r.x +
|
|
279
|
+
x: r.x + B(
|
|
279
280
|
n.x * i,
|
|
280
|
-
-
|
|
281
|
-
|
|
281
|
+
-o,
|
|
282
|
+
o
|
|
282
283
|
),
|
|
283
|
-
y: r.y +
|
|
284
|
+
y: r.y + B(
|
|
284
285
|
n.y * i,
|
|
285
|
-
-
|
|
286
|
-
|
|
286
|
+
-o,
|
|
287
|
+
o
|
|
287
288
|
)
|
|
288
289
|
};
|
|
289
290
|
}
|
|
290
|
-
function
|
|
291
|
-
return Math.abs(r) / 1e3 >
|
|
291
|
+
function dr(r) {
|
|
292
|
+
return Math.abs(r) / 1e3 > F.releaseVelocity.flickThresholdPxPerMs;
|
|
292
293
|
}
|
|
293
|
-
function
|
|
294
|
-
return Math.hypot(r.x, r.y) / 1e3 >
|
|
294
|
+
function pr(r) {
|
|
295
|
+
return Math.hypot(r.x, r.y) / 1e3 > F.releaseVelocity.flickThresholdPxPerMs;
|
|
295
296
|
}
|
|
296
|
-
function
|
|
297
|
+
function J(r, n) {
|
|
297
298
|
return Math.hypot(r.x - n.x, r.y - n.y);
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
+
function Ce(r, n) {
|
|
300
301
|
return r.reduce(
|
|
301
|
-
(i,
|
|
302
|
+
(i, o) => J(o, n) < J(i, n) ? o : i
|
|
302
303
|
);
|
|
303
304
|
}
|
|
304
|
-
function
|
|
305
|
+
function fr({
|
|
305
306
|
currentTranslate: r,
|
|
306
307
|
releaseVelocity: n,
|
|
307
308
|
targets: i
|
|
308
309
|
}) {
|
|
309
|
-
const
|
|
310
|
+
const o = ur({
|
|
310
311
|
currentTranslate: r,
|
|
311
312
|
releaseVelocity: n
|
|
312
313
|
});
|
|
313
|
-
if (!
|
|
314
|
-
return
|
|
315
|
-
const l = i.filter((
|
|
316
|
-
const y =
|
|
314
|
+
if (!pr(n))
|
|
315
|
+
return Ce(i, r);
|
|
316
|
+
const l = i.filter((h) => {
|
|
317
|
+
const y = h.x - r.x, T = h.y - r.y;
|
|
317
318
|
return y * n.x + T * n.y > 0;
|
|
318
319
|
});
|
|
319
|
-
return
|
|
320
|
+
return Ce(
|
|
320
321
|
l.length ? l : i,
|
|
321
|
-
|
|
322
|
+
o
|
|
322
323
|
);
|
|
323
324
|
}
|
|
324
|
-
function
|
|
325
|
+
function Ie(r) {
|
|
325
326
|
return r === "top" || r.startsWith("top-") ? "top" : r === "bottom" || r.startsWith("bottom-") ? "bottom" : "center";
|
|
326
327
|
}
|
|
327
|
-
function
|
|
328
|
+
function gr({
|
|
328
329
|
target: r,
|
|
329
330
|
targets: n
|
|
330
331
|
}) {
|
|
331
|
-
const i = n.filter((
|
|
332
|
+
const i = n.filter((o) => o !== r);
|
|
332
333
|
if (i.length)
|
|
333
334
|
return i.reduce(
|
|
334
|
-
(
|
|
335
|
+
(o, l) => Math.min(o, J(r, l)),
|
|
335
336
|
Number.POSITIVE_INFINITY
|
|
336
337
|
);
|
|
337
338
|
}
|
|
338
|
-
function
|
|
339
|
+
function mr({
|
|
339
340
|
closeThreshold: r,
|
|
340
341
|
currentTarget: n,
|
|
341
342
|
surfaceSize: i,
|
|
342
|
-
targets:
|
|
343
|
+
targets: o
|
|
343
344
|
}) {
|
|
344
|
-
const l =
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
const l = Ie(n.key), h = l === "center" ? Math.min(i.width, i.height) : i.height, y = Math.max(
|
|
346
|
+
F.dismissal.minDistancePx,
|
|
347
|
+
h * r
|
|
347
348
|
);
|
|
348
349
|
if (l !== "center") return y;
|
|
349
|
-
const T =
|
|
350
|
+
const T = gr({
|
|
350
351
|
target: n,
|
|
351
|
-
targets:
|
|
352
|
+
targets: o
|
|
352
353
|
});
|
|
353
354
|
return !T || !Number.isFinite(T) ? y : Math.max(y, T * 0.75);
|
|
354
355
|
}
|
|
355
|
-
function
|
|
356
|
+
function hr({
|
|
356
357
|
currentTarget: r,
|
|
357
358
|
currentTranslate: n
|
|
358
359
|
}) {
|
|
359
|
-
switch (
|
|
360
|
+
switch (Ie(r.key)) {
|
|
360
361
|
case "top":
|
|
361
362
|
return r.y - n.y;
|
|
362
363
|
case "bottom":
|
|
363
364
|
return n.y - r.y;
|
|
364
365
|
case "center":
|
|
365
|
-
return
|
|
366
|
+
return J(r, n);
|
|
366
367
|
}
|
|
367
368
|
}
|
|
368
|
-
function
|
|
369
|
+
function yr({
|
|
369
370
|
closeThreshold: r,
|
|
370
371
|
currentTarget: n,
|
|
371
372
|
currentTranslate: i,
|
|
372
|
-
releaseTarget:
|
|
373
|
+
releaseTarget: o,
|
|
373
374
|
surfaceSize: l,
|
|
374
|
-
targets:
|
|
375
|
+
targets: h
|
|
375
376
|
}) {
|
|
376
|
-
if (
|
|
377
|
-
const y =
|
|
377
|
+
if (o.key !== n.key) return !1;
|
|
378
|
+
const y = hr({
|
|
378
379
|
currentTarget: n,
|
|
379
380
|
currentTranslate: i
|
|
380
381
|
});
|
|
381
|
-
return y <= 0 ? !1 : y >=
|
|
382
|
+
return y <= 0 ? !1 : y >= mr({
|
|
382
383
|
closeThreshold: r,
|
|
383
384
|
currentTarget: n,
|
|
384
385
|
surfaceSize: l,
|
|
385
|
-
targets:
|
|
386
|
+
targets: h
|
|
386
387
|
});
|
|
387
388
|
}
|
|
388
|
-
function
|
|
389
|
+
function Tr({
|
|
389
390
|
presentationState: r,
|
|
390
391
|
releaseTranslate: n,
|
|
391
392
|
visibleTranslate: i
|
|
392
393
|
}) {
|
|
393
394
|
return r !== "visible" || Math.abs(n - i) > 1;
|
|
394
395
|
}
|
|
395
|
-
function
|
|
396
|
+
function xr({
|
|
396
397
|
drag: r,
|
|
397
398
|
placement: n,
|
|
398
399
|
snapPositionCount: i
|
|
399
400
|
}) {
|
|
400
401
|
return n === "popup" && (r === "content" || r === "handle") && i > 0;
|
|
401
402
|
}
|
|
402
|
-
function
|
|
403
|
+
function Pr({
|
|
403
404
|
dismissible: r,
|
|
404
405
|
peekTranslate: n,
|
|
405
406
|
sheetHeight: i,
|
|
406
|
-
visibleTranslate:
|
|
407
|
+
visibleTranslate: o
|
|
407
408
|
}) {
|
|
408
409
|
return {
|
|
409
|
-
maxTranslate: n > 0 ? n : r ? i :
|
|
410
|
+
maxTranslate: n > 0 ? n : r ? i : o,
|
|
410
411
|
minTranslate: 0
|
|
411
412
|
};
|
|
412
413
|
}
|
|
413
|
-
function
|
|
414
|
+
function Fe(r, n = 1) {
|
|
414
415
|
const i = Math.max(n, 1);
|
|
415
416
|
return r && Math.abs(r.maxTranslate - r.minTranslate) || i;
|
|
416
417
|
}
|
|
417
|
-
function
|
|
418
|
+
function Be({
|
|
418
419
|
limit: r,
|
|
419
420
|
viewportSize: n,
|
|
420
421
|
viewportLimitRatio: i
|
|
421
422
|
}) {
|
|
422
|
-
const
|
|
423
|
-
return n <= 0 ?
|
|
423
|
+
const o = Math.max(r, 0);
|
|
424
|
+
return n <= 0 ? o : Math.min(o, n * i);
|
|
424
425
|
}
|
|
425
|
-
function
|
|
426
|
+
function wr({
|
|
426
427
|
minTranslate: r,
|
|
427
428
|
sheetHeight: n,
|
|
428
429
|
surfaceMotion: i
|
|
429
430
|
}) {
|
|
430
|
-
const
|
|
431
|
+
const o = i.parentElement?.getBoundingClientRect(), l = o?.top ?? 0, h = o && o.height > 0 ? o.height : window.innerHeight, y = i.getBoundingClientRect(), T = Wt(i), v = y.top - T + r, L = Math.max(v - l, 0), { observedViewportLimitRatio: b } = F.rubberBand;
|
|
431
432
|
return {
|
|
432
|
-
minBoundaryLimit:
|
|
433
|
-
limit:
|
|
434
|
-
viewportSize:
|
|
435
|
-
viewportLimitRatio:
|
|
433
|
+
minBoundaryLimit: Be({
|
|
434
|
+
limit: L,
|
|
435
|
+
viewportSize: h,
|
|
436
|
+
viewportLimitRatio: b.top
|
|
436
437
|
}),
|
|
437
|
-
maxBoundaryLimit:
|
|
438
|
+
maxBoundaryLimit: Be({
|
|
438
439
|
limit: n,
|
|
439
|
-
viewportSize:
|
|
440
|
-
viewportLimitRatio:
|
|
440
|
+
viewportSize: h,
|
|
441
|
+
viewportLimitRatio: b.bottom
|
|
441
442
|
})
|
|
442
443
|
};
|
|
443
444
|
}
|
|
444
|
-
function
|
|
445
|
+
function vr({
|
|
445
446
|
rubberBand: r,
|
|
446
447
|
targetTranslate: n,
|
|
447
448
|
sheetHeight: i,
|
|
448
|
-
peekTranslate:
|
|
449
|
+
peekTranslate: o,
|
|
449
450
|
bounds: l,
|
|
450
|
-
rubberBandLimits:
|
|
451
|
+
rubberBandLimits: h
|
|
451
452
|
}) {
|
|
452
|
-
const y =
|
|
453
|
-
r ?
|
|
453
|
+
const y = B(
|
|
454
|
+
r ? Ut({
|
|
454
455
|
targetTranslate: n,
|
|
455
|
-
...
|
|
456
|
+
...h,
|
|
456
457
|
...l
|
|
457
458
|
}) : n,
|
|
458
|
-
l.minTranslate -
|
|
459
|
-
l.maxTranslate +
|
|
460
|
-
), T = Math.max(-y, 0),
|
|
459
|
+
l.minTranslate - h.minBoundaryLimit,
|
|
460
|
+
l.maxTranslate + h.maxBoundaryLimit
|
|
461
|
+
), T = Math.max(-y, 0), v = Math.max(y, 0), L = o > 0 ? o : i, b = L > 0 ? 1 - v / Math.max(L, 1) : 0;
|
|
461
462
|
return {
|
|
462
463
|
translate: y,
|
|
463
464
|
overshootFillHeight: T,
|
|
464
|
-
backdropOpacity: b
|
|
465
|
+
backdropOpacity: B(b, 0, 1)
|
|
465
466
|
};
|
|
466
467
|
}
|
|
467
|
-
function
|
|
468
|
+
function kr({
|
|
468
469
|
enabled: r,
|
|
469
470
|
drag: n,
|
|
470
471
|
open: i,
|
|
471
|
-
placement:
|
|
472
|
+
placement: o,
|
|
472
473
|
surfaceMotionRef: l,
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
474
|
+
surfaceMotionNode: h,
|
|
475
|
+
backdropRef: y,
|
|
476
|
+
bodyNode: T,
|
|
477
|
+
snapHeights: v = tr,
|
|
478
|
+
sheetHeight: L,
|
|
479
|
+
snapPositions: b = er,
|
|
480
|
+
defaultSnapPosition: Q,
|
|
481
|
+
peekHeight: _,
|
|
482
|
+
peekFallback: Gt,
|
|
483
|
+
presentationState: O,
|
|
484
|
+
setPresentationState: It,
|
|
485
|
+
requestClose: nt,
|
|
486
|
+
canCloseAttempt: Kt,
|
|
487
|
+
dismissible: V = !0,
|
|
488
|
+
preserveShadowOpacity: Jt = !1,
|
|
489
|
+
visibleTranslate: D = 0,
|
|
490
|
+
shouldDeferBottomSettle: Qt,
|
|
491
|
+
closeThreshold: yt = 0.35,
|
|
492
|
+
scrollLockTimeout: Zt = 500,
|
|
493
|
+
popupSnapLayoutVersion: qt = 0
|
|
489
494
|
}) {
|
|
490
|
-
const
|
|
495
|
+
const X = P({
|
|
491
496
|
dragging: !1,
|
|
492
497
|
allowed: !1,
|
|
493
498
|
chrome: !1,
|
|
@@ -506,361 +511,407 @@ function mr({
|
|
|
506
511
|
samples: [],
|
|
507
512
|
pointerId: null,
|
|
508
513
|
touchId: null
|
|
509
|
-
}),
|
|
514
|
+
}), Z = P(T), te = P(!1), ee = P(!1), Oe = P((t) => {
|
|
510
515
|
t.preventDefault();
|
|
511
|
-
}),
|
|
516
|
+
}), Pt = P(0), Ot = P(!1), H = P(null), R = P(
|
|
512
517
|
null
|
|
513
|
-
),
|
|
518
|
+
), wt = P(null), z = P(null), Tt = P(0), j = P(null), Nt = P(!1), Vt = P(!1), re = P(O), vt = P({
|
|
519
|
+
kind: "default-snap"
|
|
520
|
+
}), ne = P(L ?? null), oe = P(D), ae = P(v), Ht = P(!1), ot = P(!1), M = xr({
|
|
514
521
|
drag: n,
|
|
515
|
-
placement:
|
|
516
|
-
snapPositionCount:
|
|
517
|
-
}),
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
}, [
|
|
521
|
-
const t =
|
|
522
|
-
t && t !==
|
|
523
|
-
}, [
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
-
}, []),
|
|
527
|
-
if (
|
|
528
|
-
|
|
529
|
-
const e =
|
|
522
|
+
placement: o,
|
|
523
|
+
snapPositionCount: b.length
|
|
524
|
+
}), se = `${Q ?? ""}:${b.join("|")}`, ie = P(b), Dt = P(Q);
|
|
525
|
+
rt(() => {
|
|
526
|
+
ie.current = b, Dt.current = Q;
|
|
527
|
+
}, [Q, se, b]), rt(() => {
|
|
528
|
+
const t = Z.current;
|
|
529
|
+
t && t !== T && jt(t, !1), Z.current = T, te.current && jt(T, !0);
|
|
530
|
+
}, [T]);
|
|
531
|
+
const at = p((t) => {
|
|
532
|
+
te.current = t, jt(Z.current, t);
|
|
533
|
+
}, []), st = p((t) => {
|
|
534
|
+
if (ee.current === t) return;
|
|
535
|
+
ee.current = t;
|
|
536
|
+
const e = Oe.current;
|
|
530
537
|
if (t) {
|
|
531
538
|
document.addEventListener("selectstart", e, !0), document.addEventListener("dragstart", e, !0);
|
|
532
539
|
return;
|
|
533
540
|
}
|
|
534
541
|
document.removeEventListener("selectstart", e, !0), document.removeEventListener("dragstart", e, !0);
|
|
535
|
-
}, []),
|
|
542
|
+
}, []), St = p(
|
|
536
543
|
({ chrome: t, target: e }) => {
|
|
537
|
-
const
|
|
544
|
+
const a = We({
|
|
538
545
|
target: e,
|
|
539
546
|
chrome: t,
|
|
540
|
-
bodyNode:
|
|
547
|
+
bodyNode: Z.current
|
|
541
548
|
});
|
|
542
|
-
return
|
|
549
|
+
return at(a), a;
|
|
543
550
|
},
|
|
544
|
-
[
|
|
545
|
-
),
|
|
546
|
-
if (
|
|
547
|
-
if (
|
|
551
|
+
[at]
|
|
552
|
+
), I = p(() => l.current?.getBoundingClientRect().height ?? window.innerHeight, [l]), Xt = p(() => {
|
|
553
|
+
if (_ !== void 0) return _;
|
|
554
|
+
if (Gt === "header")
|
|
548
555
|
return l.current?.querySelector('[data-oc-part="header"]')?.getBoundingClientRect().height ?? void 0;
|
|
549
|
-
}, [
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
556
|
+
}, [Gt, _, l]), Yt = p(
|
|
557
|
+
(t) => {
|
|
558
|
+
const e = Xt();
|
|
559
|
+
return e === void 0 || e <= 0 ? 0 : B(t - e, 0, t);
|
|
560
|
+
},
|
|
561
|
+
[Xt]
|
|
562
|
+
), $ = p(() => {
|
|
563
|
+
const t = Xt();
|
|
564
|
+
return t === void 0 || t <= 0 ? 0 : Yt(I());
|
|
565
|
+
}, [Xt, Yt, I]), Rt = p(
|
|
566
|
+
() => O === "peeked" ? $() : D,
|
|
567
|
+
[$, O, D]
|
|
568
|
+
), q = p(() => {
|
|
558
569
|
const t = l.current;
|
|
559
|
-
if (!t) return
|
|
560
|
-
const e =
|
|
570
|
+
if (!t) return Rt();
|
|
571
|
+
const e = ht(
|
|
561
572
|
t.style.getPropertyValue("--oc-modal-translate-y")
|
|
562
573
|
);
|
|
563
574
|
if (e !== void 0) return e;
|
|
564
|
-
const
|
|
575
|
+
const a = ht(
|
|
565
576
|
window.getComputedStyle(t).getPropertyValue("--oc-modal-translate-y")
|
|
566
577
|
);
|
|
567
|
-
return
|
|
568
|
-
}, [
|
|
578
|
+
return a !== void 0 ? a : Rt();
|
|
579
|
+
}, [Rt, l]), Et = p(() => {
|
|
569
580
|
const t = l.current;
|
|
570
581
|
if (!t) return { x: 0, y: 0 };
|
|
571
|
-
const e =
|
|
582
|
+
const e = ht(
|
|
572
583
|
t.style.getPropertyValue("--oc-modal-translate-x")
|
|
573
|
-
),
|
|
584
|
+
), a = ht(
|
|
574
585
|
t.style.getPropertyValue("--oc-modal-translate-y")
|
|
575
586
|
);
|
|
576
|
-
if (e !== void 0 ||
|
|
587
|
+
if (e !== void 0 || a !== void 0)
|
|
577
588
|
return {
|
|
578
589
|
x: e ?? 0,
|
|
579
|
-
y:
|
|
590
|
+
y: a ?? 0
|
|
580
591
|
};
|
|
581
592
|
const c = window.getComputedStyle(t);
|
|
582
593
|
return {
|
|
583
|
-
x:
|
|
584
|
-
y:
|
|
594
|
+
x: ht(c.getPropertyValue("--oc-modal-translate-x")) ?? 0,
|
|
595
|
+
y: ht(c.getPropertyValue("--oc-modal-translate-y")) ?? 0
|
|
585
596
|
};
|
|
586
|
-
}, [l]),
|
|
587
|
-
const t =
|
|
597
|
+
}, [l]), it = p(() => {
|
|
598
|
+
const t = q(), e = Wt(l.current);
|
|
588
599
|
return Math.abs(e - t) > 1 ? e : t;
|
|
589
|
-
}, [
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
600
|
+
}, [q, l]), Mt = p(
|
|
601
|
+
(t, e, a = 1) => Math.abs(t - e) <= a,
|
|
602
|
+
[]
|
|
603
|
+
), lt = p(() => {
|
|
604
|
+
const t = Et(), e = Me(l.current);
|
|
605
|
+
return J(e, t) > 1 ? e : t;
|
|
606
|
+
}, [Et, l]), A = p(
|
|
593
607
|
(t, {
|
|
594
608
|
active: e,
|
|
595
|
-
nextDismissible:
|
|
596
|
-
rubberBand: c = !1
|
|
609
|
+
nextDismissible: a = V,
|
|
610
|
+
rubberBand: c = !1,
|
|
611
|
+
sheetHeightOverride: s,
|
|
612
|
+
peekTranslateOverride: u,
|
|
613
|
+
settled: d
|
|
597
614
|
}) => {
|
|
598
|
-
const
|
|
599
|
-
if (!
|
|
600
|
-
const
|
|
601
|
-
dismissible:
|
|
602
|
-
peekTranslate:
|
|
603
|
-
sheetHeight:
|
|
604
|
-
visibleTranslate:
|
|
605
|
-
}),
|
|
606
|
-
minTranslate:
|
|
607
|
-
sheetHeight:
|
|
608
|
-
surfaceMotion:
|
|
609
|
-
}),
|
|
615
|
+
const f = l.current;
|
|
616
|
+
if (!f) return;
|
|
617
|
+
const g = s ?? I(), m = f.parentElement, Y = u ?? $(), k = Pr({
|
|
618
|
+
dismissible: a,
|
|
619
|
+
peekTranslate: Y,
|
|
620
|
+
sheetHeight: g,
|
|
621
|
+
visibleTranslate: D
|
|
622
|
+
}), E = wr({
|
|
623
|
+
minTranslate: k.minTranslate,
|
|
624
|
+
sheetHeight: g,
|
|
625
|
+
surfaceMotion: f
|
|
626
|
+
}), w = vr({
|
|
610
627
|
rubberBand: c,
|
|
611
628
|
targetTranslate: t,
|
|
612
|
-
sheetHeight:
|
|
613
|
-
peekTranslate:
|
|
614
|
-
bounds:
|
|
615
|
-
rubberBandLimits:
|
|
629
|
+
sheetHeight: g,
|
|
630
|
+
peekTranslate: Y,
|
|
631
|
+
bounds: k,
|
|
632
|
+
rubberBandLimits: E
|
|
616
633
|
});
|
|
617
|
-
|
|
634
|
+
X.current.lastTranslate = w.translate, f.style.setProperty(
|
|
618
635
|
"--oc-modal-translate-y",
|
|
619
|
-
`${
|
|
620
|
-
),
|
|
636
|
+
`${w.translate}px`
|
|
637
|
+
), d === "frame" || !e ? f.style.setProperty(
|
|
638
|
+
"--oc-modal-settled-translate-y",
|
|
639
|
+
`${w.translate}px`
|
|
640
|
+
) : typeof d == "number" && f.style.setProperty(
|
|
641
|
+
"--oc-modal-settled-translate-y",
|
|
642
|
+
`${d}px`
|
|
643
|
+
), Jt ? f.style.removeProperty(
|
|
644
|
+
"--_-modal-elevation-shadow-opacity"
|
|
645
|
+
) : f.style.setProperty(
|
|
621
646
|
"--_-modal-elevation-shadow-opacity",
|
|
622
|
-
String(1 -
|
|
623
|
-
),
|
|
647
|
+
String(1 - w.backdropOpacity)
|
|
648
|
+
), f.dataset.ocModalDragging = e ? "true" : "false", m?.style.setProperty(
|
|
624
649
|
"--oc-modal-overshoot-fill-height",
|
|
625
|
-
`${
|
|
626
|
-
),
|
|
650
|
+
`${w.overshootFillHeight}px`
|
|
651
|
+
), m && (m.dataset.ocModalDragging = e ? "true" : "false"), e ? f.style.setProperty("transition", "none") : f.style.removeProperty("transition"), y.current && (y.current.style.setProperty(
|
|
627
652
|
"--oc-modal-backdrop-opacity",
|
|
628
|
-
String(
|
|
629
|
-
),
|
|
653
|
+
String(w.backdropOpacity)
|
|
654
|
+
), y.current.style.transition = e ? "none" : "");
|
|
630
655
|
},
|
|
631
656
|
[
|
|
632
|
-
|
|
633
|
-
N,
|
|
634
|
-
C,
|
|
657
|
+
y,
|
|
635
658
|
V,
|
|
659
|
+
$,
|
|
660
|
+
I,
|
|
661
|
+
Jt,
|
|
636
662
|
l,
|
|
637
|
-
|
|
663
|
+
D
|
|
638
664
|
]
|
|
639
|
-
),
|
|
640
|
-
const t = l.current, e =
|
|
665
|
+
), ct = p(() => {
|
|
666
|
+
const t = l.current, e = ie.current;
|
|
641
667
|
if (!(!t || !e.length))
|
|
642
|
-
return
|
|
643
|
-
defaultSnapPosition:
|
|
668
|
+
return Ue({
|
|
669
|
+
defaultSnapPosition: Dt.current,
|
|
644
670
|
snapPositions: e,
|
|
645
671
|
surfaceMotion: t
|
|
646
672
|
});
|
|
647
|
-
}, [l]),
|
|
673
|
+
}, [l]), U = p(
|
|
648
674
|
({ destroy: t = !0 } = {}) => {
|
|
649
|
-
t &&
|
|
675
|
+
t && R.current?.destroy(), R.current = null, wt.current = null;
|
|
650
676
|
},
|
|
651
677
|
[]
|
|
652
|
-
),
|
|
678
|
+
), C = p(
|
|
653
679
|
(t, { active: e }) => {
|
|
654
|
-
const
|
|
655
|
-
if (!
|
|
656
|
-
const c =
|
|
657
|
-
x:
|
|
680
|
+
const a = l.current;
|
|
681
|
+
if (!a) return;
|
|
682
|
+
const c = ct(), s = c ? a.getBoundingClientRect() : void 0, u = c ? Ye(c.targets, "x") : void 0, d = c ? Ye(c.targets, "y") : void 0, f = Fe(u, s?.width), g = Fe(d, s?.height), m = c ? {
|
|
683
|
+
x: Ut({
|
|
658
684
|
targetTranslate: t.x,
|
|
659
685
|
minTranslate: u?.minTranslate ?? 0,
|
|
660
686
|
maxTranslate: u?.maxTranslate ?? 0,
|
|
661
|
-
minBoundaryLimit:
|
|
662
|
-
maxBoundaryLimit:
|
|
687
|
+
minBoundaryLimit: f,
|
|
688
|
+
maxBoundaryLimit: f
|
|
663
689
|
}),
|
|
664
|
-
y:
|
|
690
|
+
y: Ut({
|
|
665
691
|
targetTranslate: t.y,
|
|
666
|
-
minTranslate:
|
|
667
|
-
maxTranslate:
|
|
668
|
-
minBoundaryLimit:
|
|
669
|
-
maxBoundaryLimit:
|
|
692
|
+
minTranslate: d?.minTranslate ?? 0,
|
|
693
|
+
maxTranslate: d?.maxTranslate ?? 0,
|
|
694
|
+
minBoundaryLimit: g,
|
|
695
|
+
maxBoundaryLimit: g
|
|
670
696
|
})
|
|
671
697
|
} : t;
|
|
672
|
-
|
|
673
|
-
const
|
|
674
|
-
|
|
698
|
+
X.current.lastTranslateX = m.x, X.current.lastTranslate = m.y;
|
|
699
|
+
const Y = e ? void 0 : t.settledTranslate;
|
|
700
|
+
a.style.setProperty(
|
|
675
701
|
"--oc-modal-translate-x",
|
|
676
|
-
|
|
677
|
-
),
|
|
702
|
+
Y?.x ?? `${m.x}px`
|
|
703
|
+
), a.style.setProperty(
|
|
678
704
|
"--oc-modal-translate-y",
|
|
679
|
-
|
|
680
|
-
),
|
|
705
|
+
Y?.y ?? `${m.y}px`
|
|
706
|
+
), a.dataset.ocModalDragging = e ? "true" : "false", a.parentElement && (a.parentElement.dataset.ocModalDragging = e ? "true" : "false"), a.style.transition = e ? "none" : "";
|
|
681
707
|
},
|
|
682
|
-
[
|
|
683
|
-
),
|
|
684
|
-
|
|
685
|
-
}, [
|
|
686
|
-
(t, e =
|
|
687
|
-
|
|
708
|
+
[ct, l]
|
|
709
|
+
), S = p(() => {
|
|
710
|
+
H.current?.destroy(), H.current = null, U();
|
|
711
|
+
}, [U]), ut = p(
|
|
712
|
+
(t, e = V) => {
|
|
713
|
+
S(), A(t, {
|
|
688
714
|
active: !0,
|
|
689
715
|
nextDismissible: e,
|
|
690
|
-
rubberBand: !0
|
|
716
|
+
rubberBand: !0,
|
|
717
|
+
settled: "frame"
|
|
691
718
|
});
|
|
692
719
|
},
|
|
693
|
-
[
|
|
694
|
-
),
|
|
695
|
-
const t =
|
|
696
|
-
return
|
|
720
|
+
[A, S, V]
|
|
721
|
+
), le = p(() => {
|
|
722
|
+
const t = it(), e = lt();
|
|
723
|
+
return H.current !== null || R.current !== null ? (S(), o === "popup" && J(e, { x: 0, y: 0 }) > 0.5 ? C(e, { active: !1 }) : o === "bottom" && Math.abs(t) > 0.5 && A(t, { active: !1 }), { startTranslate: t, startTranslatePoint: e }) : { startTranslate: t, startTranslatePoint: e };
|
|
697
724
|
}, [
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
]), x =
|
|
725
|
+
C,
|
|
726
|
+
A,
|
|
727
|
+
S,
|
|
728
|
+
it,
|
|
729
|
+
lt,
|
|
730
|
+
o
|
|
731
|
+
]), x = p(() => {
|
|
705
732
|
const t = l.current;
|
|
706
|
-
t && (t.dataset.ocModalDragging = "false", t.style.removeProperty("transition"), t.parentElement && (t.parentElement.dataset.ocModalDragging = "false"),
|
|
707
|
-
}, [
|
|
733
|
+
t && (t.dataset.ocModalDragging = "false", t.style.removeProperty("transition"), t.style.removeProperty("--_-modal-elevation-shadow-opacity"), t.parentElement && (t.parentElement.dataset.ocModalDragging = "false"), y.current?.style.removeProperty("transition"), y.current?.style.removeProperty("--oc-modal-backdrop-opacity"));
|
|
734
|
+
}, [y, l]), ce = p(() => {
|
|
708
735
|
const t = l.current, e = t?.parentElement;
|
|
709
|
-
|
|
710
|
-
}, [
|
|
736
|
+
X.current.lastTranslate = 0, t?.style.removeProperty("--oc-modal-translate-y"), t?.style.removeProperty("--oc-modal-settled-translate-y"), t?.style.removeProperty("--_-modal-elevation-shadow-opacity"), e?.style.removeProperty("--oc-modal-overshoot-fill-height"), y.current?.style.removeProperty("--oc-modal-backdrop-opacity"), x();
|
|
737
|
+
}, [y, x, l]), ue = p(
|
|
711
738
|
({
|
|
712
739
|
preserveSnapPosition: t = !1,
|
|
713
740
|
resetY: e = !0
|
|
714
741
|
} = {}) => {
|
|
715
|
-
const
|
|
716
|
-
|
|
742
|
+
const a = l.current;
|
|
743
|
+
a && (t || (z.current = null), X.current.lastTranslateX = 0, a.style.removeProperty("--oc-modal-translate-x"), e && (X.current.lastTranslate = 0, a.style.removeProperty("--oc-modal-translate-y")), x());
|
|
717
744
|
},
|
|
718
745
|
[x, l]
|
|
719
|
-
),
|
|
746
|
+
), N = p(
|
|
720
747
|
(t, {
|
|
721
748
|
initialVelocity: e = 0,
|
|
722
|
-
intent:
|
|
749
|
+
intent: a = "sheet",
|
|
723
750
|
phase: c = "release",
|
|
724
751
|
from: s,
|
|
725
|
-
onComplete: u
|
|
752
|
+
onComplete: u,
|
|
753
|
+
peekTranslateOverride: d,
|
|
754
|
+
sheetHeightOverride: f
|
|
726
755
|
} = {}) => {
|
|
727
|
-
const
|
|
728
|
-
if (!
|
|
729
|
-
|
|
730
|
-
const
|
|
731
|
-
if (Math.abs(
|
|
732
|
-
|
|
756
|
+
const g = l.current;
|
|
757
|
+
if (!g) return;
|
|
758
|
+
S();
|
|
759
|
+
const m = s ?? Wt(g);
|
|
760
|
+
if (Math.abs(m - t) < 0.5) {
|
|
761
|
+
A(t, {
|
|
762
|
+
active: !1,
|
|
763
|
+
peekTranslateOverride: d,
|
|
764
|
+
sheetHeightOverride: f
|
|
765
|
+
}), x(), u?.();
|
|
733
766
|
return;
|
|
734
767
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
768
|
+
A(m, {
|
|
769
|
+
active: !0,
|
|
770
|
+
peekTranslateOverride: d,
|
|
771
|
+
// While settling, keep the scrollport at the larger of the two rest
|
|
772
|
+
// positions: expanding settles grow it up front (the growth is still
|
|
773
|
+
// offscreen), collapsing settles keep the current size until arrival
|
|
774
|
+
// so content is not clipped mid-motion. The completion frame syncs to
|
|
775
|
+
// the final target either way.
|
|
776
|
+
settled: Math.min(t, m),
|
|
777
|
+
sheetHeightOverride: f
|
|
778
|
+
});
|
|
779
|
+
const Y = _t({
|
|
780
|
+
element: g,
|
|
781
|
+
intent: a,
|
|
739
782
|
phase: c,
|
|
740
783
|
reduced: "preserve",
|
|
741
784
|
reducedMotion: !1,
|
|
742
785
|
property: "transform"
|
|
743
|
-
}),
|
|
744
|
-
value:
|
|
786
|
+
}), k = $t({
|
|
787
|
+
value: m,
|
|
745
788
|
target: t,
|
|
746
789
|
velocity: e,
|
|
747
|
-
spring:
|
|
790
|
+
spring: Y.spring,
|
|
748
791
|
epsilon: 0.5,
|
|
749
792
|
velocityEpsilon: 50,
|
|
750
793
|
stabilityWindow: 0.02,
|
|
751
|
-
onUpdate: (
|
|
752
|
-
|
|
794
|
+
onUpdate: (E) => {
|
|
795
|
+
A(E, {
|
|
796
|
+
active: !0,
|
|
797
|
+
peekTranslateOverride: d,
|
|
798
|
+
sheetHeightOverride: f
|
|
799
|
+
});
|
|
753
800
|
},
|
|
754
801
|
onComplete: () => {
|
|
755
|
-
|
|
802
|
+
H.current === k && (H.current = null), A(t, {
|
|
803
|
+
active: !1,
|
|
804
|
+
peekTranslateOverride: d,
|
|
805
|
+
sheetHeightOverride: f
|
|
806
|
+
}), x(), u?.();
|
|
756
807
|
}
|
|
757
808
|
});
|
|
758
|
-
|
|
809
|
+
H.current = k;
|
|
759
810
|
},
|
|
760
|
-
[
|
|
761
|
-
),
|
|
811
|
+
[A, S, x, l]
|
|
812
|
+
), W = p(
|
|
762
813
|
(t, {
|
|
763
814
|
from: e,
|
|
764
|
-
initialVelocity:
|
|
815
|
+
initialVelocity: a = { x: 0, y: 0 }
|
|
765
816
|
} = {}) => {
|
|
766
817
|
const c = l.current;
|
|
767
818
|
if (!c) return;
|
|
768
|
-
|
|
769
|
-
const s = e ??
|
|
770
|
-
if (
|
|
771
|
-
|
|
819
|
+
S();
|
|
820
|
+
const s = e ?? Me(c), u = { x: t.x, y: t.y };
|
|
821
|
+
if (J(s, u) < 0.5) {
|
|
822
|
+
C(t, { active: !1 }), x();
|
|
772
823
|
return;
|
|
773
824
|
}
|
|
774
|
-
|
|
775
|
-
const
|
|
825
|
+
C(s, { active: !0 });
|
|
826
|
+
const f = _t({
|
|
776
827
|
element: c,
|
|
777
828
|
intent: "gesture",
|
|
778
829
|
phase: "release",
|
|
779
830
|
reduced: "preserve",
|
|
780
831
|
reducedMotion: !1,
|
|
781
832
|
property: "transform"
|
|
782
|
-
}),
|
|
833
|
+
}), g = $t({
|
|
783
834
|
value: s,
|
|
784
835
|
target: u,
|
|
785
|
-
velocity:
|
|
786
|
-
spring:
|
|
836
|
+
velocity: a,
|
|
837
|
+
spring: f.spring,
|
|
787
838
|
epsilon: 0.5,
|
|
788
839
|
velocityEpsilon: 50,
|
|
789
840
|
stabilityWindow: 0.02,
|
|
790
|
-
onUpdate: (
|
|
791
|
-
|
|
841
|
+
onUpdate: (m) => {
|
|
842
|
+
C(m, { active: !0 });
|
|
792
843
|
},
|
|
793
844
|
onComplete: () => {
|
|
794
|
-
|
|
845
|
+
H.current === g && (H.current = null), C(t, { active: !1 }), x();
|
|
795
846
|
}
|
|
796
847
|
});
|
|
797
|
-
|
|
848
|
+
H.current = g;
|
|
798
849
|
},
|
|
799
850
|
[
|
|
800
|
-
|
|
801
|
-
|
|
851
|
+
C,
|
|
852
|
+
S,
|
|
802
853
|
x,
|
|
803
854
|
l
|
|
804
855
|
]
|
|
805
|
-
),
|
|
806
|
-
const t =
|
|
856
|
+
), dt = p(() => {
|
|
857
|
+
const t = R.current;
|
|
807
858
|
if (!t) return null;
|
|
808
859
|
const e = t.sample();
|
|
809
|
-
return
|
|
810
|
-
}, [
|
|
860
|
+
return C(e.value, { active: !0 }), e;
|
|
861
|
+
}, [C]), de = p(
|
|
811
862
|
(t) => {
|
|
812
863
|
if (!l.current) return null;
|
|
813
|
-
|
|
814
|
-
const
|
|
864
|
+
S(), C(t, { active: !0 });
|
|
865
|
+
const a = $t({
|
|
815
866
|
value: t,
|
|
816
867
|
target: t,
|
|
817
|
-
spring:
|
|
868
|
+
spring: qe,
|
|
818
869
|
autoplay: !1,
|
|
819
870
|
epsilon: 0.5,
|
|
820
871
|
velocityEpsilon: 50,
|
|
821
872
|
stabilityWindow: 0.02,
|
|
822
873
|
onUpdate: (c) => {
|
|
823
|
-
|
|
874
|
+
C(c, { active: !0 });
|
|
824
875
|
},
|
|
825
876
|
onComplete: () => {
|
|
826
|
-
const c =
|
|
827
|
-
!c ||
|
|
877
|
+
const c = wt.current;
|
|
878
|
+
!c || R.current !== a || (U({ destroy: !1 }), C(c, { active: !1 }), x());
|
|
828
879
|
}
|
|
829
880
|
});
|
|
830
|
-
return
|
|
881
|
+
return R.current = a, a;
|
|
831
882
|
},
|
|
832
883
|
[
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
884
|
+
C,
|
|
885
|
+
S,
|
|
886
|
+
U,
|
|
836
887
|
x,
|
|
837
888
|
l
|
|
838
889
|
]
|
|
839
|
-
),
|
|
890
|
+
), pe = p(
|
|
840
891
|
(t) => {
|
|
841
|
-
const e =
|
|
842
|
-
e && (
|
|
892
|
+
const e = R.current ?? de(lt());
|
|
893
|
+
e && (wt.current = null, e.setTarget(t));
|
|
843
894
|
},
|
|
844
|
-
[
|
|
845
|
-
),
|
|
895
|
+
[lt, de]
|
|
896
|
+
), pt = p(
|
|
846
897
|
(t, e) => {
|
|
847
|
-
const
|
|
848
|
-
return
|
|
898
|
+
const a = At(t, e);
|
|
899
|
+
return pe(a), dt(), a;
|
|
849
900
|
},
|
|
850
|
-
[
|
|
851
|
-
),
|
|
901
|
+
[dt, pe]
|
|
902
|
+
), Lt = p(
|
|
852
903
|
(t) => {
|
|
853
|
-
const e = l.current,
|
|
854
|
-
if (!e || !
|
|
855
|
-
|
|
904
|
+
const e = l.current, a = R.current;
|
|
905
|
+
if (!e || !a) {
|
|
906
|
+
W(t);
|
|
856
907
|
return;
|
|
857
908
|
}
|
|
858
|
-
const s =
|
|
859
|
-
if (
|
|
860
|
-
|
|
909
|
+
const s = dt() ? Et() : a.value, u = { x: t.x, y: t.y };
|
|
910
|
+
if (J(s, u) < 0.5) {
|
|
911
|
+
U(), C(t, { active: !1 }), x();
|
|
861
912
|
return;
|
|
862
913
|
}
|
|
863
|
-
const
|
|
914
|
+
const d = _t({
|
|
864
915
|
element: e,
|
|
865
916
|
intent: "gesture",
|
|
866
917
|
phase: "release",
|
|
@@ -868,145 +919,209 @@ function mr({
|
|
|
868
919
|
reducedMotion: !1,
|
|
869
920
|
property: "transform"
|
|
870
921
|
});
|
|
871
|
-
|
|
922
|
+
wt.current = t, a.setTarget(u, { spring: d.spring });
|
|
872
923
|
},
|
|
873
924
|
[
|
|
874
|
-
|
|
875
|
-
R,
|
|
876
|
-
x,
|
|
877
|
-
wt,
|
|
878
|
-
st,
|
|
925
|
+
C,
|
|
879
926
|
U,
|
|
927
|
+
x,
|
|
928
|
+
Et,
|
|
929
|
+
dt,
|
|
930
|
+
W,
|
|
880
931
|
l
|
|
881
932
|
]
|
|
882
|
-
),
|
|
933
|
+
), ft = p(
|
|
883
934
|
({
|
|
884
935
|
key: t,
|
|
885
936
|
settle: e
|
|
886
937
|
}) => {
|
|
887
|
-
if (
|
|
888
|
-
const
|
|
889
|
-
if (!
|
|
890
|
-
const c = (t ?
|
|
891
|
-
return
|
|
938
|
+
if (X.current.dragging) return !1;
|
|
939
|
+
const a = ct();
|
|
940
|
+
if (!a) return !1;
|
|
941
|
+
const c = (t ? a.targets.find((s) => s.key === t) : void 0) ?? a.defaultTarget;
|
|
942
|
+
return z.current = c.key, e ? W(c) : (S(), C(c, { active: !1 }), x()), !0;
|
|
892
943
|
},
|
|
893
944
|
[
|
|
894
|
-
|
|
895
|
-
|
|
945
|
+
C,
|
|
946
|
+
S,
|
|
896
947
|
x,
|
|
897
|
-
|
|
898
|
-
|
|
948
|
+
ct,
|
|
949
|
+
W
|
|
899
950
|
]
|
|
900
|
-
),
|
|
901
|
-
(t, { from: e, initialVelocity:
|
|
902
|
-
|
|
951
|
+
), fe = p(
|
|
952
|
+
(t, { from: e, initialVelocity: a = 0 }) => {
|
|
953
|
+
N(t, {
|
|
903
954
|
from: e,
|
|
904
|
-
initialVelocity:
|
|
955
|
+
initialVelocity: a,
|
|
905
956
|
onComplete: () => {
|
|
906
|
-
|
|
957
|
+
nt({ reason: "drag-dismiss" }, { skipAttempt: !0 });
|
|
907
958
|
}
|
|
908
959
|
});
|
|
909
960
|
},
|
|
910
|
-
[
|
|
961
|
+
[nt, N]
|
|
911
962
|
);
|
|
912
|
-
|
|
963
|
+
Bt(
|
|
913
964
|
() => () => {
|
|
914
|
-
|
|
965
|
+
S(), st(!1), l.current && x();
|
|
915
966
|
},
|
|
916
967
|
[
|
|
917
|
-
|
|
968
|
+
S,
|
|
918
969
|
x,
|
|
919
|
-
|
|
970
|
+
st,
|
|
920
971
|
l
|
|
921
972
|
]
|
|
922
|
-
),
|
|
923
|
-
if (!i || !r ||
|
|
924
|
-
|
|
973
|
+
), rt(() => {
|
|
974
|
+
if (!i || !r || o !== "bottom") {
|
|
975
|
+
Nt.current = i;
|
|
925
976
|
return;
|
|
926
977
|
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
978
|
+
if (!l.current || Qt?.()) return;
|
|
979
|
+
Vt.current = !0;
|
|
980
|
+
const t = Nt.current;
|
|
981
|
+
Nt.current = !0;
|
|
982
|
+
const e = L ?? I(), a = ne.current ?? e, c = re.current, s = ae.current, u = oe.current, d = () => {
|
|
983
|
+
ne.current = e, re.current = O, oe.current = D, ae.current = v;
|
|
984
|
+
}, f = !Mt(
|
|
985
|
+
a,
|
|
986
|
+
e
|
|
987
|
+
), g = Yt(e), m = O === "peeked" ? g : D;
|
|
931
988
|
if (!t) {
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
989
|
+
vt.current = { kind: "default-snap" }, A(e, {
|
|
990
|
+
active: !0,
|
|
991
|
+
peekTranslateOverride: g,
|
|
992
|
+
sheetHeightOverride: e
|
|
993
|
+
}), N(m, {
|
|
994
|
+
from: e,
|
|
935
995
|
intent: "sheet",
|
|
936
|
-
|
|
937
|
-
|
|
996
|
+
peekTranslateOverride: g,
|
|
997
|
+
phase: "enter",
|
|
998
|
+
sheetHeightOverride: e
|
|
999
|
+
}), d();
|
|
1000
|
+
return;
|
|
1001
|
+
}
|
|
1002
|
+
if (O === "visible" && f) {
|
|
1003
|
+
const E = l.current, w = q(), et = c === "visible" && a > 0 ? Qe({
|
|
1004
|
+
currentTranslate: w,
|
|
1005
|
+
fallbackTranslate: D,
|
|
1006
|
+
restState: vt.current,
|
|
1007
|
+
previousDefaultTranslate: u,
|
|
1008
|
+
previousSheetHeight: a,
|
|
1009
|
+
previousSnapHeights: s,
|
|
1010
|
+
targetSheetHeight: e,
|
|
1011
|
+
targetDefaultTranslate: D,
|
|
1012
|
+
targetSnapHeights: v
|
|
1013
|
+
}) : D;
|
|
1014
|
+
S(), E.style.setProperty("transition", "none"), E.style.setProperty("height", `${a}px`), E.getBoundingClientRect(), E.style.removeProperty("transition"), E.style.setProperty("height", `${e}px`), A(et, {
|
|
1015
|
+
active: !1,
|
|
1016
|
+
peekTranslateOverride: g,
|
|
1017
|
+
sheetHeightOverride: e
|
|
1018
|
+
}), d();
|
|
938
1019
|
return;
|
|
939
1020
|
}
|
|
940
|
-
if (
|
|
941
|
-
|
|
1021
|
+
if (O === "peeked") {
|
|
1022
|
+
N(g, {
|
|
1023
|
+
peekTranslateOverride: g,
|
|
1024
|
+
sheetHeightOverride: e
|
|
1025
|
+
}), d();
|
|
942
1026
|
return;
|
|
943
1027
|
}
|
|
944
|
-
if (
|
|
945
|
-
|
|
1028
|
+
if (Ot.current) {
|
|
1029
|
+
Ot.current = !1, d();
|
|
946
1030
|
return;
|
|
947
1031
|
}
|
|
948
|
-
|
|
1032
|
+
const Y = c !== O;
|
|
1033
|
+
if (!Mt(
|
|
1034
|
+
u,
|
|
1035
|
+
D
|
|
1036
|
+
)) {
|
|
1037
|
+
const E = q(), et = H.current !== null && (D > u && E < D || D < u && E > D);
|
|
1038
|
+
if (Mt(E, u) || et) {
|
|
1039
|
+
S(), A(D, {
|
|
1040
|
+
active: !1,
|
|
1041
|
+
peekTranslateOverride: g,
|
|
1042
|
+
sheetHeightOverride: e
|
|
1043
|
+
}), x(), d();
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
if (!Y) {
|
|
1048
|
+
d();
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
N(D, {
|
|
1052
|
+
peekTranslateOverride: g,
|
|
1053
|
+
sheetHeightOverride: e
|
|
1054
|
+
}), vt.current = { kind: "default-snap" }, d();
|
|
949
1055
|
}, [
|
|
950
1056
|
r,
|
|
951
|
-
|
|
952
|
-
V,
|
|
953
|
-
i,
|
|
954
|
-
a,
|
|
955
|
-
k,
|
|
956
|
-
B,
|
|
1057
|
+
Yt,
|
|
957
1058
|
I,
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
1059
|
+
q,
|
|
1060
|
+
L,
|
|
1061
|
+
v,
|
|
1062
|
+
i,
|
|
1063
|
+
o,
|
|
1064
|
+
O,
|
|
1065
|
+
Qt,
|
|
1066
|
+
A,
|
|
1067
|
+
S,
|
|
1068
|
+
x,
|
|
1069
|
+
Mt,
|
|
1070
|
+
N,
|
|
1071
|
+
h,
|
|
1072
|
+
l,
|
|
1073
|
+
D
|
|
1074
|
+
]), rt(() => {
|
|
1075
|
+
o !== "bottom" && Vt.current && (Vt.current = !1, S(), ce());
|
|
1076
|
+
}, [S, o, ce]), rt(() => {
|
|
1077
|
+
if (!i || !r || !M) {
|
|
1078
|
+
const c = !i && o === "popup" && ot.current, s = i && o !== "popup" && ot.current;
|
|
1079
|
+
ot.current && !c && (j.current !== null && (window.cancelAnimationFrame(j.current), j.current = null), S(), ue({
|
|
965
1080
|
preserveSnapPosition: s
|
|
966
|
-
})),
|
|
1081
|
+
})), ot.current && c && (S(), x()), Ht.current = i && o === "popup", ot.current = !1;
|
|
967
1082
|
return;
|
|
968
1083
|
}
|
|
969
|
-
const t =
|
|
970
|
-
|
|
1084
|
+
const t = Ht.current;
|
|
1085
|
+
Ht.current = !0, ot.current = !0;
|
|
971
1086
|
let e = null;
|
|
972
|
-
const
|
|
1087
|
+
const a = (c) => ft({
|
|
973
1088
|
key: c,
|
|
974
1089
|
settle: t
|
|
975
1090
|
});
|
|
976
|
-
return
|
|
977
|
-
|
|
1091
|
+
return a(
|
|
1092
|
+
z.current ?? Dt.current
|
|
978
1093
|
) || (e = window.requestAnimationFrame(() => {
|
|
979
|
-
e = null,
|
|
980
|
-
|
|
1094
|
+
e = null, a(
|
|
1095
|
+
z.current ?? Dt.current
|
|
981
1096
|
);
|
|
982
1097
|
})), () => {
|
|
983
1098
|
e !== null && window.cancelAnimationFrame(e);
|
|
984
1099
|
};
|
|
985
1100
|
}, [
|
|
986
|
-
|
|
1101
|
+
S,
|
|
987
1102
|
r,
|
|
988
1103
|
x,
|
|
989
1104
|
i,
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
]),
|
|
996
|
-
if (!i || !r || !
|
|
1105
|
+
o,
|
|
1106
|
+
se,
|
|
1107
|
+
M,
|
|
1108
|
+
ue,
|
|
1109
|
+
ft
|
|
1110
|
+
]), rt(() => {
|
|
1111
|
+
if (!i || !r || !M) return;
|
|
997
1112
|
const t = () => {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
key:
|
|
1113
|
+
X.current.dragging || j.current === null && (j.current = window.requestAnimationFrame(() => {
|
|
1114
|
+
j.current = null, !X.current.dragging && ft({
|
|
1115
|
+
key: z.current,
|
|
1001
1116
|
settle: !1
|
|
1002
1117
|
});
|
|
1003
1118
|
}));
|
|
1004
1119
|
};
|
|
1005
1120
|
window.addEventListener("resize", t), window.visualViewport?.addEventListener("resize", t);
|
|
1006
|
-
const e = l.current,
|
|
1121
|
+
const e = l.current, a = e?.parentElement, c = typeof ResizeObserver > "u" ? null : new ResizeObserver(t), s = (u) => {
|
|
1007
1122
|
e && u.target instanceof Element && e.contains(u.target) && t();
|
|
1008
1123
|
};
|
|
1009
|
-
return c && (e && c.observe(e),
|
|
1124
|
+
return c && (e && c.observe(e), a && c.observe(a)), e?.addEventListener(
|
|
1010
1125
|
"transitionend",
|
|
1011
1126
|
s,
|
|
1012
1127
|
!0
|
|
@@ -1023,20 +1138,20 @@ function mr({
|
|
|
1023
1138
|
"transitioncancel",
|
|
1024
1139
|
s,
|
|
1025
1140
|
!0
|
|
1026
|
-
), c?.disconnect(),
|
|
1141
|
+
), c?.disconnect(), j.current !== null && (window.cancelAnimationFrame(j.current), j.current = null);
|
|
1027
1142
|
};
|
|
1028
1143
|
}, [
|
|
1029
1144
|
r,
|
|
1030
1145
|
i,
|
|
1031
|
-
|
|
1146
|
+
M,
|
|
1032
1147
|
l,
|
|
1033
|
-
|
|
1034
|
-
]),
|
|
1035
|
-
if (
|
|
1148
|
+
ft
|
|
1149
|
+
]), rt(() => {
|
|
1150
|
+
if (qt <= 0 || !i || !r || !M)
|
|
1036
1151
|
return;
|
|
1037
1152
|
let t = window.requestAnimationFrame(() => {
|
|
1038
|
-
t = null,
|
|
1039
|
-
key:
|
|
1153
|
+
t = null, ft({
|
|
1154
|
+
key: z.current,
|
|
1040
1155
|
settle: !1
|
|
1041
1156
|
});
|
|
1042
1157
|
});
|
|
@@ -1046,260 +1161,272 @@ function mr({
|
|
|
1046
1161
|
}, [
|
|
1047
1162
|
r,
|
|
1048
1163
|
i,
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1164
|
+
M,
|
|
1165
|
+
qt,
|
|
1166
|
+
ft
|
|
1052
1167
|
]);
|
|
1053
|
-
const
|
|
1054
|
-
(t, e,
|
|
1055
|
-
if (typeof Element > "u" || !(t instanceof Element) ||
|
|
1056
|
-
const c = Date.now(), s = e > 0, u =
|
|
1057
|
-
return !
|
|
1168
|
+
const ge = p(
|
|
1169
|
+
(t, e, a) => {
|
|
1170
|
+
if (typeof Element > "u" || !(t instanceof Element) || zt(t)) return !1;
|
|
1171
|
+
const c = Date.now(), s = e > 0, u = Ge(t, Z.current);
|
|
1172
|
+
return !a && u && s && u.scrollTop > 0 || !a && Pt.current && c - Pt.current < Zt && Math.abs(q()) <= 1 ? (Pt.current = c, !1) : !0;
|
|
1058
1173
|
},
|
|
1059
|
-
[
|
|
1060
|
-
),
|
|
1174
|
+
[q, Zt]
|
|
1175
|
+
), kt = p(
|
|
1061
1176
|
({
|
|
1062
1177
|
chrome: t,
|
|
1063
1178
|
pointerId: e = null,
|
|
1064
|
-
source:
|
|
1179
|
+
source: a,
|
|
1065
1180
|
startX: c = 0,
|
|
1066
1181
|
startY: s,
|
|
1067
1182
|
touchId: u = null
|
|
1068
1183
|
}) => {
|
|
1069
|
-
const { startTranslate:
|
|
1070
|
-
|
|
1184
|
+
const { startTranslate: d, startTranslatePoint: f } = le(), g = K();
|
|
1185
|
+
X.current = {
|
|
1071
1186
|
dragging: !0,
|
|
1072
1187
|
allowed: !1,
|
|
1073
1188
|
chrome: t,
|
|
1074
1189
|
closeAllowed: null,
|
|
1075
1190
|
started: !1,
|
|
1076
|
-
source:
|
|
1191
|
+
source: a,
|
|
1077
1192
|
startX: c,
|
|
1078
1193
|
startY: s,
|
|
1079
1194
|
lastX: c,
|
|
1080
1195
|
lastY: s,
|
|
1081
|
-
startTranslateX:
|
|
1082
|
-
startTranslate:
|
|
1083
|
-
lastTranslateX:
|
|
1084
|
-
lastTranslate:
|
|
1085
|
-
startTime:
|
|
1196
|
+
startTranslateX: f.x,
|
|
1197
|
+
startTranslate: d,
|
|
1198
|
+
lastTranslateX: f.x,
|
|
1199
|
+
lastTranslate: d,
|
|
1200
|
+
startTime: g,
|
|
1086
1201
|
samples: [
|
|
1087
1202
|
{
|
|
1088
|
-
time:
|
|
1203
|
+
time: g,
|
|
1089
1204
|
pageX: c,
|
|
1090
1205
|
pageY: s,
|
|
1091
|
-
translateX:
|
|
1092
|
-
translateY:
|
|
1206
|
+
translateX: f.x,
|
|
1207
|
+
translateY: d
|
|
1093
1208
|
}
|
|
1094
1209
|
],
|
|
1095
1210
|
pointerId: e,
|
|
1096
1211
|
touchId: u
|
|
1097
1212
|
};
|
|
1098
1213
|
},
|
|
1099
|
-
[
|
|
1100
|
-
),
|
|
1214
|
+
[le]
|
|
1215
|
+
), gt = p(
|
|
1101
1216
|
(t) => {
|
|
1102
|
-
t.source === "touch" ?
|
|
1217
|
+
t.source === "touch" ? at(!1) : t.source === "pointer" && st(!1), t.dragging = !1, t.allowed = !1, t.closeAllowed = null, t.started = !1, t.source = null, t.startX = 0, t.startY = 0, t.lastX = 0, t.lastY = 0, t.startTranslateX = 0, t.startTranslate = 0, t.lastTranslateX = 0, t.lastTranslate = 0, t.pointerId = null, t.touchId = null;
|
|
1103
1218
|
},
|
|
1104
|
-
[
|
|
1105
|
-
),
|
|
1219
|
+
[st, at]
|
|
1220
|
+
), me = p(
|
|
1106
1221
|
(t, e) => {
|
|
1107
|
-
const
|
|
1108
|
-
t.startX = e.x, t.startY = e.y, t.lastX = e.x, t.lastY = e.y, t.startTranslateX = c.x, t.startTranslate =
|
|
1222
|
+
const a = it(), c = lt();
|
|
1223
|
+
t.startX = e.x, t.startY = e.y, t.lastX = e.x, t.lastY = e.y, t.startTranslateX = c.x, t.startTranslate = a, t.lastTranslateX = c.x, t.lastTranslate = a, t.startTime = K(), t.samples = [
|
|
1109
1224
|
{
|
|
1110
1225
|
time: t.startTime,
|
|
1111
1226
|
pageX: e.x,
|
|
1112
1227
|
pageY: e.y,
|
|
1113
1228
|
translateX: c.x,
|
|
1114
|
-
translateY:
|
|
1229
|
+
translateY: a
|
|
1115
1230
|
}
|
|
1116
1231
|
];
|
|
1117
1232
|
},
|
|
1118
|
-
[
|
|
1119
|
-
),
|
|
1233
|
+
[it, lt]
|
|
1234
|
+
), he = p(
|
|
1120
1235
|
({
|
|
1121
1236
|
currentTranslate: t,
|
|
1122
1237
|
dismissible: e,
|
|
1123
|
-
releaseVelocity:
|
|
1238
|
+
releaseVelocity: a,
|
|
1124
1239
|
deltaY: c,
|
|
1125
1240
|
startTranslate: s
|
|
1126
1241
|
}) => {
|
|
1127
|
-
const u =
|
|
1128
|
-
|
|
1129
|
-
(u -
|
|
1130
|
-
),
|
|
1131
|
-
(
|
|
1132
|
-
),
|
|
1133
|
-
|
|
1134
|
-
),
|
|
1242
|
+
const u = I(), d = $(), f = d > 0, g = u, m = Math.max(
|
|
1243
|
+
F.dismissal.minDistancePx,
|
|
1244
|
+
(u - d) * yt
|
|
1245
|
+
), Y = v.map(
|
|
1246
|
+
(et) => B(u - et, 0, u)
|
|
1247
|
+
), k = we(
|
|
1248
|
+
Y.length ? Y : [0]
|
|
1249
|
+
), E = cr({
|
|
1135
1250
|
currentTranslate: t,
|
|
1136
|
-
releaseVelocity:
|
|
1251
|
+
releaseVelocity: a
|
|
1137
1252
|
});
|
|
1138
|
-
|
|
1139
|
-
const
|
|
1140
|
-
return e && !
|
|
1141
|
-
|
|
1253
|
+
f && k.push(d);
|
|
1254
|
+
const w = we(k);
|
|
1255
|
+
return e && !f && c > 0 && t >= d + m ? g : dr(a) ? w.length > 1 ? or(
|
|
1256
|
+
w,
|
|
1142
1257
|
s,
|
|
1143
1258
|
t,
|
|
1144
1259
|
c > 0 ? "down" : "up",
|
|
1145
|
-
|
|
1146
|
-
) : 0 : e && t > u *
|
|
1260
|
+
E
|
|
1261
|
+
) : 0 : e && t > u * yt && !f ? g : rr(w, t);
|
|
1262
|
+
},
|
|
1263
|
+
[yt, $, I, v]
|
|
1264
|
+
), ye = p(
|
|
1265
|
+
(t) => {
|
|
1266
|
+
const e = L ?? I();
|
|
1267
|
+
vt.current = Ze({
|
|
1268
|
+
defaultTranslate: D,
|
|
1269
|
+
sheetHeight: e,
|
|
1270
|
+
snapHeights: v,
|
|
1271
|
+
translate: t
|
|
1272
|
+
});
|
|
1147
1273
|
},
|
|
1148
|
-
[
|
|
1149
|
-
),
|
|
1274
|
+
[I, L, v, D]
|
|
1275
|
+
), Ne = p(
|
|
1150
1276
|
(t) => {
|
|
1151
|
-
if (!r ||
|
|
1277
|
+
if (!r || o !== "bottom" && !M || n === !1 || t.pointerType === "touch") return;
|
|
1152
1278
|
let e = !1;
|
|
1153
|
-
if (n === "handle" &&
|
|
1279
|
+
if (n === "handle" && Xe(t.target))
|
|
1154
1280
|
e = !0;
|
|
1155
1281
|
else if (n === "handle")
|
|
1156
1282
|
return;
|
|
1157
|
-
if (!e &&
|
|
1283
|
+
if (!e && zt(t.target) || n === "content" && (e = Se(t.target), !ir(t, e)))
|
|
1158
1284
|
return;
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1285
|
+
const a = sr(t.target);
|
|
1286
|
+
kt({
|
|
1161
1287
|
chrome: e,
|
|
1162
1288
|
pointerId: t.pointerId,
|
|
1163
1289
|
source: "pointer",
|
|
1164
1290
|
startX: t.pageX,
|
|
1165
1291
|
startY: t.pageY
|
|
1166
|
-
}),
|
|
1292
|
+
}), ar(t.target) || t.preventDefault(), st(!0), !a && typeof t.currentTarget.setPointerCapture == "function" && t.currentTarget.setPointerCapture(t.pointerId);
|
|
1167
1293
|
},
|
|
1168
1294
|
[
|
|
1169
|
-
|
|
1295
|
+
kt,
|
|
1170
1296
|
n,
|
|
1171
1297
|
r,
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1298
|
+
o,
|
|
1299
|
+
M,
|
|
1300
|
+
st
|
|
1175
1301
|
]
|
|
1176
|
-
),
|
|
1302
|
+
), mt = p(
|
|
1177
1303
|
(t, e) => {
|
|
1178
|
-
if (!
|
|
1304
|
+
if (!V) return !1;
|
|
1179
1305
|
if (e <= 0) return !0;
|
|
1180
1306
|
if (t.closeAllowed !== null) return t.closeAllowed;
|
|
1181
|
-
const
|
|
1182
|
-
return t.closeAllowed =
|
|
1307
|
+
const a = Kt({ reason: "drag-dismiss" });
|
|
1308
|
+
return t.closeAllowed = a, a;
|
|
1183
1309
|
},
|
|
1184
|
-
[
|
|
1185
|
-
),
|
|
1310
|
+
[Kt, V]
|
|
1311
|
+
), bt = p(
|
|
1186
1312
|
({
|
|
1187
1313
|
closeAllowed: t,
|
|
1188
1314
|
currentTranslate: e,
|
|
1189
|
-
deltaY:
|
|
1315
|
+
deltaY: a,
|
|
1190
1316
|
releaseVelocity: c,
|
|
1191
1317
|
startTranslate: s
|
|
1192
1318
|
}) => {
|
|
1193
|
-
const
|
|
1319
|
+
const d = he({
|
|
1194
1320
|
currentTranslate: e,
|
|
1195
|
-
dismissible:
|
|
1321
|
+
dismissible: V && t !== !1,
|
|
1196
1322
|
releaseVelocity: c,
|
|
1197
|
-
deltaY:
|
|
1323
|
+
deltaY: a,
|
|
1198
1324
|
startTranslate: s
|
|
1199
|
-
}),
|
|
1200
|
-
if (
|
|
1201
|
-
|
|
1325
|
+
}), f = I(), g = $();
|
|
1326
|
+
if (d >= f - 1) {
|
|
1327
|
+
nt({ reason: "drag-dismiss" }, { commit: !1 }) ? fe(d, {
|
|
1202
1328
|
from: e,
|
|
1203
1329
|
initialVelocity: c
|
|
1204
|
-
}) :
|
|
1330
|
+
}) : N(s, {
|
|
1205
1331
|
from: e,
|
|
1206
1332
|
initialVelocity: c
|
|
1207
1333
|
});
|
|
1208
1334
|
return;
|
|
1209
1335
|
}
|
|
1210
|
-
|
|
1211
|
-
presentationState:
|
|
1212
|
-
releaseTranslate:
|
|
1213
|
-
visibleTranslate:
|
|
1214
|
-
}) && (
|
|
1336
|
+
g > 0 && d >= g - 1 ? It("peeked") : (Tr({
|
|
1337
|
+
presentationState: O,
|
|
1338
|
+
releaseTranslate: d,
|
|
1339
|
+
visibleTranslate: D
|
|
1340
|
+
}) && (Ot.current = !0), It("visible"), ye(d)), N(d, {
|
|
1215
1341
|
from: e,
|
|
1216
1342
|
initialVelocity: c
|
|
1217
1343
|
});
|
|
1218
1344
|
},
|
|
1219
1345
|
[
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
C,
|
|
1223
|
-
oe,
|
|
1346
|
+
fe,
|
|
1347
|
+
ye,
|
|
1224
1348
|
V,
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
bt,
|
|
1349
|
+
$,
|
|
1350
|
+
he,
|
|
1228
1351
|
I,
|
|
1229
|
-
|
|
1352
|
+
O,
|
|
1353
|
+
nt,
|
|
1354
|
+
It,
|
|
1355
|
+
N,
|
|
1356
|
+
D
|
|
1230
1357
|
]
|
|
1231
|
-
),
|
|
1358
|
+
), Ct = p(
|
|
1232
1359
|
({
|
|
1233
1360
|
currentTranslate: t,
|
|
1234
1361
|
releaseDelta: e,
|
|
1235
|
-
releaseTranslate:
|
|
1362
|
+
releaseTranslate: a,
|
|
1236
1363
|
releaseVelocity: c
|
|
1237
1364
|
}) => {
|
|
1238
|
-
const s =
|
|
1365
|
+
const s = ct();
|
|
1239
1366
|
if (!s) return;
|
|
1240
|
-
const u =
|
|
1241
|
-
currentTranslate:
|
|
1367
|
+
const u = fr({
|
|
1368
|
+
currentTranslate: a,
|
|
1242
1369
|
releaseVelocity: c,
|
|
1243
1370
|
targets: s.targets
|
|
1244
|
-
}),
|
|
1245
|
-
(
|
|
1246
|
-
) ?? s.defaultTarget,
|
|
1247
|
-
x:
|
|
1248
|
-
y:
|
|
1371
|
+
}), d = s.targets.find(
|
|
1372
|
+
(Y) => Y.key === z.current
|
|
1373
|
+
) ?? s.defaultTarget, g = l.current?.getBoundingClientRect(), m = {
|
|
1374
|
+
x: d.x + e.x,
|
|
1375
|
+
y: d.y + e.y
|
|
1249
1376
|
};
|
|
1250
|
-
if (
|
|
1251
|
-
closeThreshold:
|
|
1252
|
-
currentTarget:
|
|
1253
|
-
currentTranslate:
|
|
1377
|
+
if (V && g && yr({
|
|
1378
|
+
closeThreshold: yt,
|
|
1379
|
+
currentTarget: d,
|
|
1380
|
+
currentTranslate: m,
|
|
1254
1381
|
releaseTarget: u,
|
|
1255
1382
|
surfaceSize: {
|
|
1256
|
-
height:
|
|
1257
|
-
width:
|
|
1383
|
+
height: g.height,
|
|
1384
|
+
width: g.width
|
|
1258
1385
|
},
|
|
1259
1386
|
targets: s.targets
|
|
1260
|
-
}) &&
|
|
1261
|
-
|
|
1387
|
+
}) && nt({ reason: "drag-dismiss" })) {
|
|
1388
|
+
U(), x();
|
|
1262
1389
|
return;
|
|
1263
1390
|
}
|
|
1264
|
-
if (
|
|
1265
|
-
|
|
1391
|
+
if (z.current = u.key, R.current) {
|
|
1392
|
+
Lt(u);
|
|
1266
1393
|
return;
|
|
1267
1394
|
}
|
|
1268
|
-
|
|
1395
|
+
W(u, {
|
|
1269
1396
|
from: t,
|
|
1270
1397
|
initialVelocity: c
|
|
1271
1398
|
});
|
|
1272
1399
|
},
|
|
1273
1400
|
[
|
|
1274
|
-
R,
|
|
1275
|
-
ft,
|
|
1276
|
-
N,
|
|
1277
|
-
x,
|
|
1278
|
-
at,
|
|
1279
|
-
q,
|
|
1280
|
-
Dt,
|
|
1281
1401
|
U,
|
|
1402
|
+
yt,
|
|
1403
|
+
V,
|
|
1404
|
+
x,
|
|
1405
|
+
ct,
|
|
1406
|
+
nt,
|
|
1407
|
+
Lt,
|
|
1408
|
+
W,
|
|
1282
1409
|
l
|
|
1283
1410
|
]
|
|
1284
|
-
),
|
|
1411
|
+
), Ve = p(
|
|
1285
1412
|
(t) => {
|
|
1286
|
-
const e =
|
|
1287
|
-
if (!e.dragging || e.source !== "pointer" || !r ||
|
|
1413
|
+
const e = X.current;
|
|
1414
|
+
if (!e.dragging || e.source !== "pointer" || !r || o !== "bottom" && !M)
|
|
1288
1415
|
return;
|
|
1289
|
-
const
|
|
1290
|
-
if (!(!e.started &&
|
|
1416
|
+
const a = t.pageX - e.startX, c = t.pageY - e.startY, s = t.pointerType === "touch" ? F.dragStartThresholdPx.touch : F.dragStartThresholdPx.mouse;
|
|
1417
|
+
if (!(!e.started && ve({ deltaX: a, deltaY: c, placement: o }) < s)) {
|
|
1291
1418
|
if (!e.allowed) {
|
|
1292
|
-
if (
|
|
1419
|
+
if (o === "bottom" && !ge(t.target, c, e.chrome))
|
|
1293
1420
|
return;
|
|
1294
1421
|
e.allowed = !0, e.started = !0;
|
|
1295
1422
|
const u = t.currentTarget;
|
|
1296
1423
|
e.pointerId !== null && typeof u.hasPointerCapture == "function" && typeof u.setPointerCapture == "function" && !u.hasPointerCapture(e.pointerId) && u.setPointerCapture(e.pointerId);
|
|
1297
1424
|
}
|
|
1298
|
-
if (t.preventDefault(), e.lastX = t.pageX, e.lastY = t.pageY,
|
|
1299
|
-
|
|
1425
|
+
if (t.preventDefault(), e.lastX = t.pageX, e.lastY = t.pageY, o === "popup")
|
|
1426
|
+
pt(e, t), Le(e, t);
|
|
1300
1427
|
else {
|
|
1301
|
-
const u = e.startTranslate + c,
|
|
1302
|
-
|
|
1428
|
+
const u = e.startTranslate + c, d = mt(e, c);
|
|
1429
|
+
ut(u, d), xt(e, {
|
|
1303
1430
|
pageX: t.pageX,
|
|
1304
1431
|
pageY: t.pageY,
|
|
1305
1432
|
translateX: e.lastTranslateX,
|
|
@@ -1310,151 +1437,151 @@ function mr({
|
|
|
1310
1437
|
},
|
|
1311
1438
|
[
|
|
1312
1439
|
r,
|
|
1313
|
-
|
|
1440
|
+
pt,
|
|
1441
|
+
mt,
|
|
1442
|
+
o,
|
|
1443
|
+
M,
|
|
1314
1444
|
ut,
|
|
1315
|
-
|
|
1316
|
-
v,
|
|
1317
|
-
ot,
|
|
1318
|
-
ne
|
|
1445
|
+
ge
|
|
1319
1446
|
]
|
|
1320
|
-
),
|
|
1447
|
+
), tt = p(
|
|
1321
1448
|
({
|
|
1322
1449
|
currentTarget: t,
|
|
1323
1450
|
pageX: e,
|
|
1324
|
-
pageY:
|
|
1451
|
+
pageY: a,
|
|
1325
1452
|
releaseCapture: c = !0
|
|
1326
1453
|
}) => {
|
|
1327
|
-
const s =
|
|
1328
|
-
if (!s.dragging || s.source !== "pointer" || !r ||
|
|
1454
|
+
const s = X.current;
|
|
1455
|
+
if (!s.dragging || s.source !== "pointer" || !r || o !== "bottom" && !M)
|
|
1329
1456
|
return;
|
|
1330
|
-
const u = s.started,
|
|
1331
|
-
let
|
|
1457
|
+
const u = s.started, d = Number.isFinite(e) ? e : s.lastX, f = Number.isFinite(a) ? a : s.lastY, g = d - s.startX, m = f - s.startY, Y = Math.max(K() - s.startTime, 1);
|
|
1458
|
+
let k = {
|
|
1332
1459
|
x: s.lastTranslateX,
|
|
1333
1460
|
y: s.lastTranslate
|
|
1334
|
-
},
|
|
1335
|
-
const
|
|
1461
|
+
}, E = k;
|
|
1462
|
+
const w = s.startTranslate;
|
|
1336
1463
|
if (u)
|
|
1337
|
-
if (
|
|
1338
|
-
|
|
1339
|
-
pageX:
|
|
1340
|
-
pageY:
|
|
1341
|
-
}),
|
|
1464
|
+
if (o === "popup")
|
|
1465
|
+
pt(s, {
|
|
1466
|
+
pageX: d,
|
|
1467
|
+
pageY: f
|
|
1468
|
+
}), k = {
|
|
1342
1469
|
x: s.lastTranslateX,
|
|
1343
1470
|
y: s.lastTranslate
|
|
1344
|
-
},
|
|
1345
|
-
pageX:
|
|
1346
|
-
pageY:
|
|
1471
|
+
}, E = At(s, {
|
|
1472
|
+
pageX: d,
|
|
1473
|
+
pageY: f
|
|
1347
1474
|
});
|
|
1348
1475
|
else {
|
|
1349
|
-
const
|
|
1350
|
-
|
|
1476
|
+
const G = s.startTranslate + m, ze = mt(s, m);
|
|
1477
|
+
ut(G, ze), k = {
|
|
1351
1478
|
x: s.lastTranslateX,
|
|
1352
1479
|
y: s.lastTranslate
|
|
1353
1480
|
};
|
|
1354
1481
|
}
|
|
1355
|
-
const
|
|
1482
|
+
const et = s.closeAllowed;
|
|
1356
1483
|
if (c && t && s.pointerId !== null && t.hasPointerCapture(s.pointerId) && t.releasePointerCapture(s.pointerId), u) {
|
|
1357
|
-
const
|
|
1484
|
+
const G = o === "popup" ? E : {
|
|
1358
1485
|
x: s.lastTranslateX,
|
|
1359
1486
|
y: s.lastTranslate
|
|
1360
1487
|
};
|
|
1361
|
-
|
|
1362
|
-
pageX:
|
|
1363
|
-
pageY:
|
|
1364
|
-
translateX:
|
|
1365
|
-
translateY:
|
|
1488
|
+
xt(s, {
|
|
1489
|
+
pageX: d,
|
|
1490
|
+
pageY: f,
|
|
1491
|
+
translateX: G.x,
|
|
1492
|
+
translateY: G.y
|
|
1366
1493
|
});
|
|
1367
1494
|
}
|
|
1368
|
-
if (
|
|
1369
|
-
if (
|
|
1370
|
-
const
|
|
1495
|
+
if (gt(s), !!u)
|
|
1496
|
+
if (Tt.current = K() + 500, o === "popup") {
|
|
1497
|
+
const G = be({
|
|
1371
1498
|
session: s,
|
|
1372
|
-
fallbackDelta: { x:
|
|
1373
|
-
fallbackElapsed:
|
|
1499
|
+
fallbackDelta: { x: g, y: m },
|
|
1500
|
+
fallbackElapsed: Y
|
|
1374
1501
|
});
|
|
1375
|
-
|
|
1376
|
-
currentTranslate:
|
|
1377
|
-
releaseDelta: { x:
|
|
1378
|
-
releaseTranslate:
|
|
1379
|
-
releaseVelocity:
|
|
1502
|
+
Ct({
|
|
1503
|
+
currentTranslate: k,
|
|
1504
|
+
releaseDelta: { x: g, y: m },
|
|
1505
|
+
releaseTranslate: E,
|
|
1506
|
+
releaseVelocity: G
|
|
1380
1507
|
});
|
|
1381
1508
|
} else {
|
|
1382
|
-
const
|
|
1509
|
+
const G = ke({
|
|
1383
1510
|
session: s,
|
|
1384
|
-
fallbackDeltaY:
|
|
1385
|
-
fallbackElapsed:
|
|
1511
|
+
fallbackDeltaY: m,
|
|
1512
|
+
fallbackElapsed: Y
|
|
1386
1513
|
});
|
|
1387
|
-
|
|
1388
|
-
closeAllowed:
|
|
1389
|
-
currentTranslate:
|
|
1390
|
-
deltaY:
|
|
1391
|
-
releaseVelocity:
|
|
1392
|
-
startTranslate:
|
|
1514
|
+
bt({
|
|
1515
|
+
closeAllowed: et,
|
|
1516
|
+
currentTranslate: k.y,
|
|
1517
|
+
deltaY: m,
|
|
1518
|
+
releaseVelocity: G,
|
|
1519
|
+
startTranslate: w
|
|
1393
1520
|
});
|
|
1394
1521
|
}
|
|
1395
1522
|
},
|
|
1396
1523
|
[
|
|
1397
|
-
|
|
1398
|
-
|
|
1524
|
+
bt,
|
|
1525
|
+
Ct,
|
|
1399
1526
|
r,
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1527
|
+
pt,
|
|
1528
|
+
mt,
|
|
1529
|
+
o,
|
|
1530
|
+
M,
|
|
1531
|
+
gt,
|
|
1532
|
+
ut
|
|
1406
1533
|
]
|
|
1407
|
-
),
|
|
1534
|
+
), Te = p(
|
|
1408
1535
|
(t) => {
|
|
1409
|
-
|
|
1536
|
+
tt({
|
|
1410
1537
|
currentTarget: t.currentTarget,
|
|
1411
1538
|
pageX: t.pageX,
|
|
1412
1539
|
pageY: t.pageY
|
|
1413
1540
|
});
|
|
1414
1541
|
},
|
|
1415
|
-
[
|
|
1416
|
-
),
|
|
1542
|
+
[tt]
|
|
1543
|
+
), He = p(
|
|
1417
1544
|
(t) => {
|
|
1418
|
-
const e =
|
|
1419
|
-
e.pointerId !== null && t.pointerId !== e.pointerId ||
|
|
1545
|
+
const e = X.current;
|
|
1546
|
+
e.pointerId !== null && t.pointerId !== e.pointerId || tt({
|
|
1420
1547
|
pageX: t.pageX,
|
|
1421
1548
|
pageY: t.pageY,
|
|
1422
1549
|
releaseCapture: !1
|
|
1423
1550
|
});
|
|
1424
1551
|
},
|
|
1425
|
-
[
|
|
1552
|
+
[tt]
|
|
1426
1553
|
);
|
|
1427
|
-
|
|
1554
|
+
Bt(() => {
|
|
1428
1555
|
if (!r) return;
|
|
1429
1556
|
const t = (s) => {
|
|
1430
|
-
const u =
|
|
1431
|
-
!u.dragging || u.source !== "pointer" || "pointerId" in s && u.pointerId !== null && s.pointerId !== u.pointerId ||
|
|
1557
|
+
const u = X.current;
|
|
1558
|
+
!u.dragging || u.source !== "pointer" || "pointerId" in s && u.pointerId !== null && s.pointerId !== u.pointerId || tt({
|
|
1432
1559
|
pageX: s.pageX,
|
|
1433
1560
|
pageY: s.pageY,
|
|
1434
1561
|
releaseCapture: !1
|
|
1435
1562
|
});
|
|
1436
1563
|
}, e = () => {
|
|
1437
|
-
const s =
|
|
1438
|
-
!s.dragging || s.source !== "pointer" ||
|
|
1564
|
+
const s = X.current;
|
|
1565
|
+
!s.dragging || s.source !== "pointer" || tt({
|
|
1439
1566
|
pageX: s.lastX,
|
|
1440
1567
|
pageY: s.lastY,
|
|
1441
1568
|
releaseCapture: !1
|
|
1442
1569
|
});
|
|
1443
|
-
},
|
|
1444
|
-
const u =
|
|
1570
|
+
}, a = (s) => {
|
|
1571
|
+
const u = X.current;
|
|
1445
1572
|
!u.dragging || u.source !== "pointer" || s.relatedTarget === null && t(s);
|
|
1446
1573
|
}, c = (s) => {
|
|
1447
|
-
const u =
|
|
1574
|
+
const u = X.current;
|
|
1448
1575
|
!u.dragging || u.source !== "pointer" || s.relatedTarget === null && t(s);
|
|
1449
1576
|
};
|
|
1450
|
-
return document.addEventListener("pointerout",
|
|
1577
|
+
return document.addEventListener("pointerout", a, !0), document.addEventListener("mouseout", c, !0), window.addEventListener("pointerup", t, !0), window.addEventListener(
|
|
1451
1578
|
"pointercancel",
|
|
1452
1579
|
t,
|
|
1453
1580
|
!0
|
|
1454
1581
|
), window.addEventListener("blur", e), () => {
|
|
1455
1582
|
document.removeEventListener(
|
|
1456
1583
|
"pointerout",
|
|
1457
|
-
|
|
1584
|
+
a,
|
|
1458
1585
|
!0
|
|
1459
1586
|
), document.removeEventListener("mouseout", c, !0), window.removeEventListener(
|
|
1460
1587
|
"pointerup",
|
|
@@ -1466,94 +1593,95 @@ function mr({
|
|
|
1466
1593
|
!0
|
|
1467
1594
|
), window.removeEventListener("blur", e);
|
|
1468
1595
|
};
|
|
1469
|
-
}, [
|
|
1596
|
+
}, [tt, r]), Bt(() => {
|
|
1470
1597
|
if (!r) return;
|
|
1471
1598
|
const t = (e) => {
|
|
1472
|
-
const
|
|
1473
|
-
if (
|
|
1474
|
-
if (
|
|
1475
|
-
|
|
1599
|
+
const a = Tt.current;
|
|
1600
|
+
if (a <= 0) return;
|
|
1601
|
+
if (K() > a) {
|
|
1602
|
+
Tt.current = 0;
|
|
1476
1603
|
return;
|
|
1477
1604
|
}
|
|
1478
1605
|
const c = l.current;
|
|
1479
|
-
c && e.target instanceof Node && c.contains(e.target) && (
|
|
1606
|
+
c && e.target instanceof Node && c.contains(e.target) && (Tt.current = 0, e.preventDefault(), e.stopPropagation());
|
|
1480
1607
|
};
|
|
1481
1608
|
return document.addEventListener("click", t, !0), () => {
|
|
1482
1609
|
document.removeEventListener("click", t, !0);
|
|
1483
1610
|
};
|
|
1484
1611
|
}, [r, l]);
|
|
1485
|
-
const
|
|
1486
|
-
const e =
|
|
1487
|
-
return e.touchId !== null ?
|
|
1488
|
-
}, []),
|
|
1612
|
+
const Ft = p((t) => {
|
|
1613
|
+
const e = X.current;
|
|
1614
|
+
return e.touchId !== null ? Ee(t.changedTouches, e.touchId) ?? Ee(t.touches, e.touchId) : t.touches[0] ?? t.changedTouches[0] ?? null;
|
|
1615
|
+
}, []), Re = p(
|
|
1489
1616
|
(t) => {
|
|
1490
|
-
if (!r ||
|
|
1617
|
+
if (!r || o !== "bottom" && !M || n === !1 || t.touches.length !== 1) return;
|
|
1491
1618
|
let e = !1;
|
|
1492
|
-
if (n === "handle" &&
|
|
1619
|
+
if (n === "handle" && Xe(t.target))
|
|
1493
1620
|
e = !0;
|
|
1494
1621
|
else if (n === "handle")
|
|
1495
1622
|
return;
|
|
1496
|
-
if (!e &&
|
|
1497
|
-
n === "content" && (e =
|
|
1498
|
-
const
|
|
1499
|
-
|
|
1623
|
+
if (!e && zt(t.target)) return;
|
|
1624
|
+
n === "content" && (e = Se(t.target));
|
|
1625
|
+
const a = t.touches[0];
|
|
1626
|
+
o === "bottom" && St({
|
|
1500
1627
|
target: t.target,
|
|
1501
1628
|
chrome: e
|
|
1502
|
-
}),
|
|
1629
|
+
}), kt({
|
|
1503
1630
|
chrome: e,
|
|
1504
1631
|
source: "touch",
|
|
1505
|
-
startX:
|
|
1506
|
-
startY:
|
|
1507
|
-
touchId:
|
|
1632
|
+
startX: a.pageX,
|
|
1633
|
+
startY: a.pageY,
|
|
1634
|
+
touchId: a.identifier
|
|
1508
1635
|
});
|
|
1509
1636
|
},
|
|
1510
1637
|
[
|
|
1511
|
-
|
|
1638
|
+
kt,
|
|
1512
1639
|
n,
|
|
1513
1640
|
r,
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1641
|
+
o,
|
|
1642
|
+
M,
|
|
1643
|
+
St
|
|
1517
1644
|
]
|
|
1518
|
-
),
|
|
1645
|
+
), xe = p(
|
|
1519
1646
|
(t) => {
|
|
1520
|
-
const e =
|
|
1521
|
-
if (!e.dragging || e.source !== "touch" || !r ||
|
|
1647
|
+
const e = X.current;
|
|
1648
|
+
if (!e.dragging || e.source !== "touch" || !r || o !== "bottom" && !M)
|
|
1522
1649
|
return;
|
|
1523
|
-
const
|
|
1524
|
-
if (!
|
|
1525
|
-
const c =
|
|
1650
|
+
const a = Ft(t);
|
|
1651
|
+
if (!a) return;
|
|
1652
|
+
const c = a.pageX - e.startX, s = a.pageY - e.startY, u = ve({
|
|
1526
1653
|
deltaX: c,
|
|
1527
1654
|
deltaY: s,
|
|
1528
|
-
placement:
|
|
1529
|
-
}),
|
|
1655
|
+
placement: o
|
|
1656
|
+
}), d = F.dragStartThresholdPx.touch, f = o === "bottom" ? Ke({
|
|
1530
1657
|
target: t.target,
|
|
1531
1658
|
deltaY: s,
|
|
1532
1659
|
chrome: e.chrome,
|
|
1533
|
-
bodyNode:
|
|
1534
|
-
|
|
1660
|
+
bodyNode: Z.current,
|
|
1661
|
+
canExpand: it() > 1
|
|
1662
|
+
}) : Je({
|
|
1535
1663
|
target: t.target,
|
|
1536
|
-
bodyNode:
|
|
1664
|
+
bodyNode: Z.current
|
|
1537
1665
|
});
|
|
1538
|
-
if (
|
|
1539
|
-
const
|
|
1540
|
-
!
|
|
1666
|
+
if (f.preventDefault) {
|
|
1667
|
+
const m = o === "bottom" && Math.abs(c) > Math.abs(s) && Math.abs(s) < d && !e.started && u < d;
|
|
1668
|
+
!m && o === "bottom" && St({
|
|
1541
1669
|
target: t.target,
|
|
1542
1670
|
chrome: e.chrome
|
|
1543
|
-
}),
|
|
1671
|
+
}), m || Pe(t);
|
|
1544
1672
|
}
|
|
1545
|
-
if (
|
|
1546
|
-
|
|
1673
|
+
if (f.resetAnchor) {
|
|
1674
|
+
at(!1), me(e, { x: a.pageX, y: a.pageY });
|
|
1547
1675
|
return;
|
|
1548
1676
|
}
|
|
1549
|
-
if (
|
|
1550
|
-
if (e.allowed || (e.allowed = !0, e.started = !0),
|
|
1551
|
-
|
|
1677
|
+
if (f.allowDrag && !(!e.started && u < d))
|
|
1678
|
+
if (e.allowed || (e.allowed = !0, e.started = !0), f.preventDefault || Pe(t), e.lastX = a.pageX, e.lastY = a.pageY, o === "popup")
|
|
1679
|
+
pt(e, a), Le(e, a);
|
|
1552
1680
|
else {
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1555
|
-
pageX:
|
|
1556
|
-
pageY:
|
|
1681
|
+
const g = e.startTranslate + s, m = mt(e, s);
|
|
1682
|
+
ut(g, m), xt(e, {
|
|
1683
|
+
pageX: a.pageX,
|
|
1684
|
+
pageY: a.pageY,
|
|
1557
1685
|
translateX: e.lastTranslateX,
|
|
1558
1686
|
translateY: e.lastTranslate
|
|
1559
1687
|
});
|
|
@@ -1561,21 +1689,22 @@ function mr({
|
|
|
1561
1689
|
},
|
|
1562
1690
|
[
|
|
1563
1691
|
r,
|
|
1692
|
+
pt,
|
|
1693
|
+
mt,
|
|
1564
1694
|
it,
|
|
1695
|
+
Ft,
|
|
1696
|
+
o,
|
|
1697
|
+
M,
|
|
1698
|
+
me,
|
|
1699
|
+
at,
|
|
1565
1700
|
ut,
|
|
1566
|
-
|
|
1567
|
-
a,
|
|
1568
|
-
v,
|
|
1569
|
-
ae,
|
|
1570
|
-
et,
|
|
1571
|
-
ot,
|
|
1572
|
-
xt
|
|
1701
|
+
St
|
|
1573
1702
|
]
|
|
1574
1703
|
);
|
|
1575
|
-
|
|
1576
|
-
if (!i || !r ||
|
|
1704
|
+
Bt(() => {
|
|
1705
|
+
if (!i || !r || o !== "bottom" && !M || n === !1 || typeof window > "u") return;
|
|
1577
1706
|
const t = (e) => {
|
|
1578
|
-
|
|
1707
|
+
xe(e);
|
|
1579
1708
|
};
|
|
1580
1709
|
return window.addEventListener("touchmove", t, {
|
|
1581
1710
|
capture: !0,
|
|
@@ -1583,108 +1712,108 @@ function mr({
|
|
|
1583
1712
|
}), () => {
|
|
1584
1713
|
window.removeEventListener("touchmove", t, !0);
|
|
1585
1714
|
};
|
|
1586
|
-
}, [n, r,
|
|
1587
|
-
const
|
|
1715
|
+
}, [n, r, xe, i, o, M]);
|
|
1716
|
+
const _e = p(
|
|
1588
1717
|
(t) => {
|
|
1589
|
-
const e =
|
|
1590
|
-
if (!e.dragging || e.source !== "touch" || !r ||
|
|
1718
|
+
const e = X.current;
|
|
1719
|
+
if (!e.dragging || e.source !== "touch" || !r || o !== "bottom" && !M)
|
|
1591
1720
|
return;
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1594
|
-
const
|
|
1721
|
+
const a = Ft(t), c = a?.pageX ?? e.lastX, s = a?.pageY ?? e.lastY, u = e.started, d = e.closeAllowed, f = c - e.startX, g = s - e.startY, m = Math.max(K() - e.startTime, 1);
|
|
1722
|
+
o === "popup" && dt();
|
|
1723
|
+
const Y = {
|
|
1595
1724
|
x: e.lastTranslateX,
|
|
1596
1725
|
y: e.lastTranslate
|
|
1597
1726
|
};
|
|
1598
|
-
let
|
|
1599
|
-
const
|
|
1727
|
+
let k = Y;
|
|
1728
|
+
const E = e.startTranslate;
|
|
1600
1729
|
if (u) {
|
|
1601
|
-
const
|
|
1730
|
+
const w = o === "popup" ? At(e, {
|
|
1602
1731
|
pageX: c,
|
|
1603
1732
|
pageY: s
|
|
1604
1733
|
}) : {
|
|
1605
1734
|
x: e.lastTranslateX,
|
|
1606
1735
|
y: e.lastTranslate
|
|
1607
1736
|
};
|
|
1608
|
-
|
|
1737
|
+
k = w, xt(e, {
|
|
1609
1738
|
pageX: c,
|
|
1610
1739
|
pageY: s,
|
|
1611
|
-
translateX:
|
|
1612
|
-
translateY:
|
|
1740
|
+
translateX: w.x,
|
|
1741
|
+
translateY: w.y
|
|
1613
1742
|
});
|
|
1614
1743
|
}
|
|
1615
|
-
if (
|
|
1616
|
-
if (
|
|
1617
|
-
const
|
|
1744
|
+
if (gt(e), !!u)
|
|
1745
|
+
if (Tt.current = K() + 500, o === "popup") {
|
|
1746
|
+
const w = be({
|
|
1618
1747
|
session: e,
|
|
1619
|
-
fallbackDelta: { x:
|
|
1620
|
-
fallbackElapsed:
|
|
1748
|
+
fallbackDelta: { x: f, y: g },
|
|
1749
|
+
fallbackElapsed: m
|
|
1621
1750
|
});
|
|
1622
|
-
|
|
1623
|
-
currentTranslate:
|
|
1624
|
-
releaseDelta: { x:
|
|
1625
|
-
releaseTranslate:
|
|
1626
|
-
releaseVelocity:
|
|
1751
|
+
Ct({
|
|
1752
|
+
currentTranslate: Y,
|
|
1753
|
+
releaseDelta: { x: f, y: g },
|
|
1754
|
+
releaseTranslate: k,
|
|
1755
|
+
releaseVelocity: w
|
|
1627
1756
|
});
|
|
1628
1757
|
} else {
|
|
1629
|
-
const
|
|
1758
|
+
const w = ke({
|
|
1630
1759
|
session: e,
|
|
1631
|
-
fallbackDeltaY:
|
|
1632
|
-
fallbackElapsed:
|
|
1760
|
+
fallbackDeltaY: g,
|
|
1761
|
+
fallbackElapsed: m
|
|
1633
1762
|
});
|
|
1634
|
-
|
|
1635
|
-
closeAllowed:
|
|
1636
|
-
currentTranslate:
|
|
1637
|
-
deltaY:
|
|
1638
|
-
releaseVelocity:
|
|
1639
|
-
startTranslate:
|
|
1763
|
+
bt({
|
|
1764
|
+
closeAllowed: d,
|
|
1765
|
+
currentTranslate: Y.y,
|
|
1766
|
+
deltaY: g,
|
|
1767
|
+
releaseVelocity: w,
|
|
1768
|
+
startTranslate: E
|
|
1640
1769
|
});
|
|
1641
1770
|
}
|
|
1642
1771
|
},
|
|
1643
1772
|
[
|
|
1644
|
-
|
|
1645
|
-
|
|
1773
|
+
bt,
|
|
1774
|
+
Ct,
|
|
1646
1775
|
r,
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1776
|
+
Ft,
|
|
1777
|
+
o,
|
|
1778
|
+
M,
|
|
1779
|
+
gt,
|
|
1780
|
+
dt
|
|
1652
1781
|
]
|
|
1653
|
-
),
|
|
1654
|
-
const t =
|
|
1782
|
+
), je = p(() => {
|
|
1783
|
+
const t = X.current;
|
|
1655
1784
|
if (!t.dragging || t.source !== "touch") return;
|
|
1656
|
-
const e = t.started,
|
|
1785
|
+
const e = t.started, a = t.startTranslate, c = t.lastTranslate, s = {
|
|
1657
1786
|
x: t.startTranslateX,
|
|
1658
1787
|
y: t.startTranslate
|
|
1659
1788
|
}, u = {
|
|
1660
1789
|
x: t.lastTranslateX,
|
|
1661
1790
|
y: t.lastTranslate
|
|
1662
|
-
},
|
|
1663
|
-
if (
|
|
1664
|
-
if (
|
|
1665
|
-
|
|
1791
|
+
}, d = o;
|
|
1792
|
+
if (gt(t), !!e) {
|
|
1793
|
+
if (d === "popup") {
|
|
1794
|
+
R.current ? Lt(s) : W(s, { from: u });
|
|
1666
1795
|
return;
|
|
1667
1796
|
}
|
|
1668
|
-
|
|
1797
|
+
N(a, { from: c });
|
|
1669
1798
|
}
|
|
1670
1799
|
}, [
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1800
|
+
o,
|
|
1801
|
+
gt,
|
|
1802
|
+
Lt,
|
|
1803
|
+
W,
|
|
1804
|
+
N
|
|
1676
1805
|
]);
|
|
1677
1806
|
return {
|
|
1678
|
-
onPointerDown:
|
|
1679
|
-
onPointerMove:
|
|
1680
|
-
onPointerUp:
|
|
1681
|
-
onPointerCancel:
|
|
1682
|
-
onLostPointerCapture:
|
|
1683
|
-
onTouchStart:
|
|
1684
|
-
onTouchEnd:
|
|
1685
|
-
onTouchCancel:
|
|
1807
|
+
onPointerDown: Ne,
|
|
1808
|
+
onPointerMove: Ve,
|
|
1809
|
+
onPointerUp: Te,
|
|
1810
|
+
onPointerCancel: Te,
|
|
1811
|
+
onLostPointerCapture: He,
|
|
1812
|
+
onTouchStart: Re,
|
|
1813
|
+
onTouchEnd: _e,
|
|
1814
|
+
onTouchCancel: je
|
|
1686
1815
|
};
|
|
1687
1816
|
}
|
|
1688
1817
|
export {
|
|
1689
|
-
|
|
1818
|
+
kr as useModalDrag
|
|
1690
1819
|
};
|