@flemo/core 1.19.1 → 1.20.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/index.mjs
CHANGED
|
@@ -500,13 +500,13 @@ var S = [], C = !1, w = (e) => {
|
|
|
500
500
|
let n = window.history.state;
|
|
501
501
|
return n ? Object.values(n).some((e) => !!e && typeof e == "object" && e.id === t) : !1;
|
|
502
502
|
};
|
|
503
|
-
function
|
|
503
|
+
function D(e, t) {
|
|
504
504
|
for (let n = S.length - 1; n >= 0; --n) if (S[n].pathname === t) return S[n].raw?.[e] ?? null;
|
|
505
505
|
return null;
|
|
506
506
|
}
|
|
507
|
-
var
|
|
508
|
-
function
|
|
509
|
-
|
|
507
|
+
var O = /* @__PURE__ */ new WeakMap();
|
|
508
|
+
function ee(e) {
|
|
509
|
+
O.has(e) || O.set(e, x({
|
|
510
510
|
stores: e,
|
|
511
511
|
driver: e.driver,
|
|
512
512
|
consume: e.consume,
|
|
@@ -515,12 +515,12 @@ function te(e) {
|
|
|
515
515
|
ownsPathname: e.ownsPathname
|
|
516
516
|
}));
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
e.persistent || (
|
|
518
|
+
function te(e) {
|
|
519
|
+
e.persistent || (O.get(e)?.(), O.delete(e));
|
|
520
520
|
}
|
|
521
521
|
//#endregion
|
|
522
522
|
//#region src/history/memoryHistoryDriver.ts
|
|
523
|
-
function
|
|
523
|
+
function k(e) {
|
|
524
524
|
let t = [{
|
|
525
525
|
state: e?.state ?? null,
|
|
526
526
|
url: e?.url ?? "/"
|
|
@@ -562,7 +562,7 @@ function re(e) {
|
|
|
562
562
|
}
|
|
563
563
|
//#endregion
|
|
564
564
|
//#region src/navigate/store.ts
|
|
565
|
-
function
|
|
565
|
+
function A() {
|
|
566
566
|
return e((e) => ({
|
|
567
567
|
status: "IDLE",
|
|
568
568
|
transitionTaskId: null,
|
|
@@ -572,11 +572,11 @@ function O() {
|
|
|
572
572
|
}
|
|
573
573
|
//#endregion
|
|
574
574
|
//#region src/navigate/createNavigationController.ts
|
|
575
|
-
var
|
|
575
|
+
var j = (e, t, n) => {
|
|
576
576
|
let { regexp: r } = i(e);
|
|
577
577
|
for (let e = t - 1; e >= 0; e--) if (r.test(n[e].pathname)) return t - e;
|
|
578
578
|
return -1;
|
|
579
|
-
},
|
|
579
|
+
}, M = (e, t) => typeof e == "number" && Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t, N = async (e, t, n, r) => {
|
|
580
580
|
let i, a = new Promise((t) => {
|
|
581
581
|
i = e.subscribe(() => t(!0));
|
|
582
582
|
}), o = new Promise((e) => setTimeout(() => e(!1), 200));
|
|
@@ -584,7 +584,7 @@ var k = (e, t, n) => {
|
|
|
584
584
|
let s = await Promise.race([a, o]);
|
|
585
585
|
i(), s && r();
|
|
586
586
|
};
|
|
587
|
-
function
|
|
587
|
+
function ne(e) {
|
|
588
588
|
let { stores: t, buildPathname: n, driver: r = g(), markSelfInduced: i = y } = e, o = () => t.history.getState().bumpTruncationEpoch(), c = () => {
|
|
589
589
|
let e = r.readState();
|
|
590
590
|
if (!e?.id) return null;
|
|
@@ -610,10 +610,10 @@ function M(e) {
|
|
|
610
610
|
}
|
|
611
611
|
let s = c(), { index: d, histories: f, addHistory: g, popHistories: _ } = t.history.getState(), v = (() => {
|
|
612
612
|
if (u?.until != null) {
|
|
613
|
-
let e =
|
|
613
|
+
let e = j(u.until, d, f);
|
|
614
614
|
return e < 0 ? 0 : e;
|
|
615
615
|
}
|
|
616
|
-
return Math.min(
|
|
616
|
+
return Math.min(M(u?.skip, 0), Math.max(0, d));
|
|
617
617
|
})(), { setStatus: y, setTransitionTaskId: b } = t.navigate.getState();
|
|
618
618
|
y("PUSHING"), b(h);
|
|
619
619
|
let { pathname: x, toPathname: S } = n(e, l ?? {}), C = {
|
|
@@ -640,7 +640,7 @@ function M(e) {
|
|
|
640
640
|
return g({
|
|
641
641
|
...C,
|
|
642
642
|
frameIndex: T + 1
|
|
643
|
-
}), await
|
|
643
|
+
}), await N(r, i, v, () => {
|
|
644
644
|
o(), r.pushState({
|
|
645
645
|
id: h,
|
|
646
646
|
index: T + 1,
|
|
@@ -670,10 +670,10 @@ function M(e) {
|
|
|
670
670
|
}
|
|
671
671
|
let s = c(), { index: d, histories: f, addHistory: g, replaceHistory: _, popHistories: v } = t.history.getState(), y = (() => {
|
|
672
672
|
if (u?.until != null) {
|
|
673
|
-
let e =
|
|
673
|
+
let e = j(u.until, d, f);
|
|
674
674
|
return e < 0 ? 0 : e + 1;
|
|
675
675
|
}
|
|
676
|
-
return Math.min(
|
|
676
|
+
return Math.min(M(u?.skip, 0) + 1, d + 1);
|
|
677
677
|
})();
|
|
678
678
|
if (y <= 0) {
|
|
679
679
|
a.abort();
|
|
@@ -705,7 +705,7 @@ function M(e) {
|
|
|
705
705
|
return v(y - 1), g({
|
|
706
706
|
...w,
|
|
707
707
|
frameIndex: E
|
|
708
|
-
}), y <= d ? await
|
|
708
|
+
}), y <= d ? await N(r, i, y, () => {
|
|
709
709
|
o(), r.pushState({
|
|
710
710
|
id: h,
|
|
711
711
|
index: E,
|
|
@@ -714,7 +714,7 @@ function M(e) {
|
|
|
714
714
|
transitionName: p,
|
|
715
715
|
layoutId: m
|
|
716
716
|
}, S);
|
|
717
|
-
}) : await
|
|
717
|
+
}) : await N(r, i, d, () => {
|
|
718
718
|
o(), r.replaceState({
|
|
719
719
|
id: h,
|
|
720
720
|
index: E,
|
|
@@ -770,10 +770,10 @@ function M(e) {
|
|
|
770
770
|
pop: async (e) => {
|
|
771
771
|
await d((t, n) => {
|
|
772
772
|
if (e?.until != null) {
|
|
773
|
-
let r =
|
|
773
|
+
let r = j(e.until, t, n);
|
|
774
774
|
return r < 0 ? 0 : r;
|
|
775
775
|
}
|
|
776
|
-
let r =
|
|
776
|
+
let r = M(e?.skip, 1);
|
|
777
777
|
return r <= 0 ? 0 : Math.min(r, t);
|
|
778
778
|
}, e?.transitionName);
|
|
779
779
|
}
|
|
@@ -781,14 +781,14 @@ function M(e) {
|
|
|
781
781
|
}
|
|
782
782
|
//#endregion
|
|
783
783
|
//#region src/navigate/createStepController.ts
|
|
784
|
-
var
|
|
784
|
+
var re = (e) => {
|
|
785
785
|
let t = e;
|
|
786
786
|
return t?.step ? t.params ?? {} : null;
|
|
787
|
-
},
|
|
787
|
+
}, ie = (e, t) => {
|
|
788
788
|
let n = new URLSearchParams(Object.fromEntries(Object.entries(t).map(([e, t]) => [e, String(t)]))).toString();
|
|
789
789
|
return n ? `${e}?${n}` : e;
|
|
790
790
|
};
|
|
791
|
-
function
|
|
791
|
+
function P(e) {
|
|
792
792
|
let { stores: t, driver: n, markSelfInduced: r, buildStepPathname: i, applyParams: o } = e;
|
|
793
793
|
return {
|
|
794
794
|
pushStep: async (e) => {
|
|
@@ -846,7 +846,7 @@ function oe(e) {
|
|
|
846
846
|
}
|
|
847
847
|
};
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function ae(e, t) {
|
|
850
850
|
return e.subscribe((e) => {
|
|
851
851
|
let n = e.state;
|
|
852
852
|
n?.step && s.addTask(async () => {
|
|
@@ -856,7 +856,7 @@ function se(e, t) {
|
|
|
856
856
|
}
|
|
857
857
|
//#endregion
|
|
858
858
|
//#region src/transition/store.ts
|
|
859
|
-
function
|
|
859
|
+
function oe(t = "cupertino") {
|
|
860
860
|
return e((e) => ({
|
|
861
861
|
defaultTransitionName: t,
|
|
862
862
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -864,12 +864,12 @@ function ce(t = "cupertino") {
|
|
|
864
864
|
}
|
|
865
865
|
//#endregion
|
|
866
866
|
//#region src/utils/matchesPathname.ts
|
|
867
|
-
function
|
|
867
|
+
function se(e, t) {
|
|
868
868
|
return i(e).regexp.test(t);
|
|
869
869
|
}
|
|
870
870
|
//#endregion
|
|
871
871
|
//#region src/screen/store.ts
|
|
872
|
-
function
|
|
872
|
+
function F() {
|
|
873
873
|
return e((e) => ({
|
|
874
874
|
dragStatus: "IDLE",
|
|
875
875
|
replaceTransitionStatus: "IDLE",
|
|
@@ -900,21 +900,21 @@ function ue() {
|
|
|
900
900
|
}
|
|
901
901
|
//#endregion
|
|
902
902
|
//#region src/core/createRouterScope.ts
|
|
903
|
-
var
|
|
903
|
+
var ce = {
|
|
904
904
|
mark: () => {},
|
|
905
905
|
consume: () => !1
|
|
906
|
-
},
|
|
907
|
-
function
|
|
906
|
+
}, le = /* @__PURE__ */ new Map();
|
|
907
|
+
function ue(e) {
|
|
908
908
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, s = f() ? void 0 : e.persistKey;
|
|
909
909
|
if (s) {
|
|
910
|
-
let e =
|
|
910
|
+
let e = le.get(s);
|
|
911
911
|
if (e) {
|
|
912
912
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
913
913
|
let t = e.history.getState();
|
|
914
914
|
return t.setPendingIndex(t.index), e;
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
|
-
let l = d(t, n, r, i), u = (e.routerKey && !f() ?
|
|
917
|
+
let l = d(t, n, r, i), u = (e.routerKey && !f() ? D(e.routerKey, n) : null) ?? (o && !f() ? o.readState() : null), p = u?.id ? {
|
|
918
918
|
...l,
|
|
919
919
|
id: u.id,
|
|
920
920
|
params: u.params ?? l.params,
|
|
@@ -927,7 +927,7 @@ function pe(e) {
|
|
|
927
927
|
index: 0,
|
|
928
928
|
histories: [p]
|
|
929
929
|
}), e.hostedScope;
|
|
930
|
-
let m = a ?
|
|
930
|
+
let m = a ? k({
|
|
931
931
|
state: {
|
|
932
932
|
id: p.id,
|
|
933
933
|
index: 0,
|
|
@@ -937,25 +937,25 @@ function pe(e) {
|
|
|
937
937
|
layoutId: p.layoutId
|
|
938
938
|
},
|
|
939
939
|
url: p.pathname
|
|
940
|
-
}) : o, h = a ?
|
|
940
|
+
}) : o, h = a ? ce : _(), g = {
|
|
941
941
|
history: c([p], 0),
|
|
942
|
-
navigate:
|
|
943
|
-
transition:
|
|
944
|
-
screen:
|
|
942
|
+
navigate: A(),
|
|
943
|
+
transition: oe(i),
|
|
944
|
+
screen: F(),
|
|
945
945
|
driver: m,
|
|
946
946
|
markSelfInduced: h.mark,
|
|
947
947
|
consume: h.consume,
|
|
948
948
|
routerKey: e.routerKey,
|
|
949
949
|
zoneEntryId: e.zoneEntryId,
|
|
950
|
-
ownsPathname: (e) =>
|
|
950
|
+
ownsPathname: (e) => se(t, e),
|
|
951
951
|
persistent: !!s,
|
|
952
952
|
life: { alive: !0 }
|
|
953
953
|
};
|
|
954
|
-
return s &&
|
|
954
|
+
return s && le.set(s, g), g;
|
|
955
955
|
}
|
|
956
956
|
//#endregion
|
|
957
957
|
//#region src/screen/createScreenSelector.ts
|
|
958
|
-
function
|
|
958
|
+
function de(e, t) {
|
|
959
959
|
return e.map((n, r) => ({
|
|
960
960
|
...n,
|
|
961
961
|
isActive: r === t,
|
|
@@ -968,13 +968,13 @@ function me(e, t) {
|
|
|
968
968
|
}
|
|
969
969
|
//#endregion
|
|
970
970
|
//#region src/screen/computeScreenFreeze.ts
|
|
971
|
-
function
|
|
971
|
+
function I(e) {
|
|
972
972
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
973
973
|
return !e.isActive && t || e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex;
|
|
974
974
|
}
|
|
975
975
|
//#endregion
|
|
976
976
|
//#region src/transition/createTransition.ts
|
|
977
|
-
function
|
|
977
|
+
function L({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
978
978
|
return {
|
|
979
979
|
name: e,
|
|
980
980
|
initial: t,
|
|
@@ -995,7 +995,7 @@ function N({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exit
|
|
|
995
995
|
}
|
|
996
996
|
//#endregion
|
|
997
997
|
//#region src/transition/createRawTransition.ts
|
|
998
|
-
function
|
|
998
|
+
function R({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
999
999
|
return {
|
|
1000
1000
|
name: e,
|
|
1001
1001
|
initial: t,
|
|
@@ -1016,10 +1016,10 @@ function ge({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1016
1016
|
}
|
|
1017
1017
|
//#endregion
|
|
1018
1018
|
//#region src/transition/cupertino.ts
|
|
1019
|
-
var
|
|
1019
|
+
var fe = (e, t, n) => {
|
|
1020
1020
|
let [r, i] = t, [a, o] = n;
|
|
1021
1021
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1022
|
-
},
|
|
1022
|
+
}, pe = L({
|
|
1023
1023
|
name: "cupertino",
|
|
1024
1024
|
initial: { x: "100%" },
|
|
1025
1025
|
idle: {
|
|
@@ -1079,7 +1079,7 @@ var _e = (e, t, n) => {
|
|
|
1079
1079
|
swipeDirection: "x",
|
|
1080
1080
|
onSwipeStart: async () => !0,
|
|
1081
1081
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1082
|
-
let { offset: o } = t, s = o.x, c =
|
|
1082
|
+
let { offset: o } = t, s = o.x, c = fe(s, [0, window.innerWidth], [0, 100]);
|
|
1083
1083
|
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-35 + c * .35}%` }, { duration: 0 }), c;
|
|
1084
1084
|
},
|
|
1085
1085
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
@@ -1103,10 +1103,10 @@ var _e = (e, t, n) => {
|
|
|
1103
1103
|
})]), c;
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
|
-
}),
|
|
1106
|
+
}), me = (e, t, n) => {
|
|
1107
1107
|
let [r, i] = t, [a, o] = n;
|
|
1108
1108
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1109
|
-
},
|
|
1109
|
+
}, he = L({
|
|
1110
1110
|
name: "layout",
|
|
1111
1111
|
initial: { opacity: .97 },
|
|
1112
1112
|
idle: {
|
|
@@ -1134,7 +1134,7 @@ var _e = (e, t, n) => {
|
|
|
1134
1134
|
swipeDirection: "y",
|
|
1135
1135
|
onSwipeStart: async () => !0,
|
|
1136
1136
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1137
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1137
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = me(s, [0, 56], [1, .96]), l = Math.max(0, o - 56), u = Math.min(1, l / 160), d = Math.sqrt(u) * 12, f = Math.max(0, s + d), p = Math.min(56, f);
|
|
1138
1138
|
return i?.(!0, 100), n(r, {
|
|
1139
1139
|
y: f,
|
|
1140
1140
|
opacity: c
|
|
@@ -1151,7 +1151,7 @@ var _e = (e, t, n) => {
|
|
|
1151
1151
|
}, { duration: .3 })]), c;
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
|
-
}),
|
|
1154
|
+
}), ge = L({
|
|
1155
1155
|
name: "material",
|
|
1156
1156
|
initial: { y: "100%" },
|
|
1157
1157
|
idle: {
|
|
@@ -1259,7 +1259,7 @@ var _e = (e, t, n) => {
|
|
|
1259
1259
|
})]), c;
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
|
-
}),
|
|
1262
|
+
}), _e = L({
|
|
1263
1263
|
name: "none",
|
|
1264
1264
|
initial: {},
|
|
1265
1265
|
idle: {
|
|
@@ -1282,20 +1282,20 @@ var _e = (e, t, n) => {
|
|
|
1282
1282
|
value: {},
|
|
1283
1283
|
options: { duration: 0 }
|
|
1284
1284
|
}
|
|
1285
|
-
}),
|
|
1286
|
-
["none",
|
|
1287
|
-
["cupertino",
|
|
1288
|
-
["material",
|
|
1289
|
-
["layout",
|
|
1285
|
+
}), z = new Map([
|
|
1286
|
+
["none", _e],
|
|
1287
|
+
["cupertino", pe],
|
|
1288
|
+
["material", ge],
|
|
1289
|
+
["layout", he]
|
|
1290
1290
|
]);
|
|
1291
1291
|
//#endregion
|
|
1292
1292
|
//#region src/transition/resolveTransition.ts
|
|
1293
|
-
function
|
|
1294
|
-
return
|
|
1293
|
+
function B(e) {
|
|
1294
|
+
return z.get(e) ?? z.get("none");
|
|
1295
1295
|
}
|
|
1296
1296
|
//#endregion
|
|
1297
1297
|
//#region src/transition/decorator/createDecorator.ts
|
|
1298
|
-
function
|
|
1298
|
+
function ve({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1299
1299
|
return {
|
|
1300
1300
|
name: e,
|
|
1301
1301
|
initial: t,
|
|
@@ -1316,7 +1316,7 @@ function Ce({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
//#endregion
|
|
1318
1318
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1319
|
-
function
|
|
1319
|
+
function ye({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1320
1320
|
return {
|
|
1321
1321
|
name: e,
|
|
1322
1322
|
initial: t,
|
|
@@ -1337,30 +1337,30 @@ function we({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1337
1337
|
}
|
|
1338
1338
|
//#endregion
|
|
1339
1339
|
//#region src/transition/decorator/overlay.ts
|
|
1340
|
-
var
|
|
1340
|
+
var be = "rgba(0, 0, 0, 0.2)", xe = ve({
|
|
1341
1341
|
name: "overlay",
|
|
1342
1342
|
initial: {
|
|
1343
1343
|
opacity: 0,
|
|
1344
|
-
backgroundColor:
|
|
1344
|
+
backgroundColor: be
|
|
1345
1345
|
},
|
|
1346
1346
|
idle: {
|
|
1347
1347
|
value: {
|
|
1348
1348
|
opacity: 0,
|
|
1349
|
-
backgroundColor:
|
|
1349
|
+
backgroundColor: be
|
|
1350
1350
|
},
|
|
1351
1351
|
options: { duration: 0 }
|
|
1352
1352
|
},
|
|
1353
1353
|
enter: {
|
|
1354
1354
|
value: {
|
|
1355
1355
|
opacity: 1,
|
|
1356
|
-
backgroundColor:
|
|
1356
|
+
backgroundColor: be
|
|
1357
1357
|
},
|
|
1358
1358
|
options: { duration: .6 }
|
|
1359
1359
|
},
|
|
1360
1360
|
exit: {
|
|
1361
1361
|
value: {
|
|
1362
1362
|
opacity: 0,
|
|
1363
|
-
backgroundColor:
|
|
1363
|
+
backgroundColor: be
|
|
1364
1364
|
},
|
|
1365
1365
|
options: { duration: .6 }
|
|
1366
1366
|
},
|
|
@@ -1369,10 +1369,10 @@ var I = "rgba(0, 0, 0, 0.2)", Te = Ce({
|
|
|
1369
1369
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1370
1370
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1371
1371
|
}
|
|
1372
|
-
}),
|
|
1372
|
+
}), V = new Map([["overlay", xe]]);
|
|
1373
1373
|
//#endregion
|
|
1374
1374
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1375
|
-
function
|
|
1375
|
+
function Se({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1376
1376
|
return {
|
|
1377
1377
|
name: e,
|
|
1378
1378
|
initial: t,
|
|
@@ -1393,7 +1393,7 @@ function Ee({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
//#endregion
|
|
1395
1395
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1396
|
-
function
|
|
1396
|
+
function Ce({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1397
1397
|
return {
|
|
1398
1398
|
name: e,
|
|
1399
1399
|
initial: t,
|
|
@@ -1414,7 +1414,7 @@ function De({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1414
1414
|
}
|
|
1415
1415
|
//#endregion
|
|
1416
1416
|
//#region src/transition/partTransition/partTransition.ts
|
|
1417
|
-
var
|
|
1417
|
+
var H = /* @__PURE__ */ new Map(), U = {
|
|
1418
1418
|
"IDLE-true": "self",
|
|
1419
1419
|
"IDLE-false": "self",
|
|
1420
1420
|
"PUSHING-true": "initial",
|
|
@@ -1425,17 +1425,17 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1425
1425
|
"POPPING-false": "PUSHING-false",
|
|
1426
1426
|
"COMPLETED-true": "self",
|
|
1427
1427
|
"COMPLETED-false": "self"
|
|
1428
|
-
},
|
|
1428
|
+
}, we = Object.keys(U), Te = (e) => {
|
|
1429
1429
|
if (!e) return 0;
|
|
1430
1430
|
let t = e.duration;
|
|
1431
1431
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1432
|
-
},
|
|
1433
|
-
let n =
|
|
1432
|
+
}, Ee = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, De = (e, t) => {
|
|
1433
|
+
let n = U[t];
|
|
1434
1434
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1435
|
-
},
|
|
1436
|
-
let n =
|
|
1435
|
+
}, W = (e, t) => {
|
|
1436
|
+
let n = De(e, t);
|
|
1437
1437
|
if (n === null) return null;
|
|
1438
|
-
let r = e.variants[t], i =
|
|
1438
|
+
let r = e.variants[t], i = Te(r.options), a = Ee(r.options);
|
|
1439
1439
|
return i <= 0 && a <= 0 ? null : {
|
|
1440
1440
|
from: n,
|
|
1441
1441
|
to: r.value,
|
|
@@ -1443,7 +1443,7 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1443
1443
|
delay: a,
|
|
1444
1444
|
ease: r.options?.ease
|
|
1445
1445
|
};
|
|
1446
|
-
},
|
|
1446
|
+
}, Oe = we, ke = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), Ae = (e) => typeof e == "object" && !!e && !Array.isArray(e), je = new Set(/* @__PURE__ */ "opacity.scale.scaleX.scaleY.scaleZ.aspectRatio.columnCount.columns.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineHeight.lineClamp.order.orphans.tabSize.widows.zIndex.zoom.fillOpacity.floodOpacity.stopOpacity.strokeOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeWidth".split(".")), Me = (e, t) => t.startsWith("--") || je.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, Ne = (e, t) => typeof t == "number" ? Me(t, e) : typeof t == "string" ? t : "", Pe = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Fe = new Set([
|
|
1447
1447
|
"x",
|
|
1448
1448
|
"y",
|
|
1449
1449
|
"z",
|
|
@@ -1454,7 +1454,7 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1454
1454
|
"rotateX",
|
|
1455
1455
|
"rotateY",
|
|
1456
1456
|
"rotateZ"
|
|
1457
|
-
]),
|
|
1457
|
+
]), Ie = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, Le = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, Re = /^1(\.0+)?$/, ze = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 ? !0 : typeof t == "string" ? Re.test(t.trim()) : !1 : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 ? !0 : typeof t == "string" ? Le.test(t.trim()) : !1 : t === 0 ? !0 : typeof t == "string" ? Ie.test(t.trim()) : !1, Be = (e, t) => {
|
|
1458
1458
|
switch (e) {
|
|
1459
1459
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1460
1460
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1468,16 +1468,16 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1468
1468
|
case "rotateY": return `rotateY(${t})`;
|
|
1469
1469
|
default: return "";
|
|
1470
1470
|
}
|
|
1471
|
-
},
|
|
1471
|
+
}, Ve = (e) => {
|
|
1472
1472
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1473
|
-
if (!
|
|
1473
|
+
if (!Ae(e)) return;
|
|
1474
1474
|
let n = [];
|
|
1475
1475
|
for (let r of Object.keys(e)) {
|
|
1476
|
-
let i = e[r], a =
|
|
1477
|
-
if (a !== "") if (
|
|
1476
|
+
let i = e[r], a = Ne(r, i);
|
|
1477
|
+
if (a !== "") if (Fe.has(r)) n.push(`${r}:${a}`);
|
|
1478
1478
|
else {
|
|
1479
|
-
let e = t.get(
|
|
1480
|
-
e.add(a), t.set(
|
|
1479
|
+
let e = t.get(Pe(r)) ?? /* @__PURE__ */ new Set();
|
|
1480
|
+
e.add(a), t.set(Pe(r), e);
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
1483
|
r.add(n.sort().join("|"));
|
|
@@ -1487,13 +1487,13 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1487
1487
|
n = r.size > 1;
|
|
1488
1488
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1489
1489
|
return n && a.push("transform"), a;
|
|
1490
|
-
},
|
|
1491
|
-
if (!
|
|
1490
|
+
}, G = (e) => {
|
|
1491
|
+
if (!Ae(e)) return [];
|
|
1492
1492
|
let t = [], n = !0, r = [];
|
|
1493
1493
|
for (let i of Object.keys(e)) {
|
|
1494
|
-
let a = e[i], o =
|
|
1495
|
-
o !== "" && (
|
|
1496
|
-
property:
|
|
1494
|
+
let a = e[i], o = Ne(i, a);
|
|
1495
|
+
o !== "" && (Fe.has(i) ? (t.push(Be(i, o)), ze(i, a) || (n = !1)) : r.push({
|
|
1496
|
+
property: Pe(i),
|
|
1497
1497
|
value: o
|
|
1498
1498
|
}));
|
|
1499
1499
|
}
|
|
@@ -1501,7 +1501,7 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1501
1501
|
property: "transform",
|
|
1502
1502
|
value: n ? "none" : t.join(" ")
|
|
1503
1503
|
}), r;
|
|
1504
|
-
},
|
|
1504
|
+
}, K = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), He = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1505
1505
|
linear: "linear",
|
|
1506
1506
|
easeIn: "ease-in",
|
|
1507
1507
|
easeOut: "ease-out",
|
|
@@ -1511,29 +1511,29 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1511
1511
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1512
1512
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1513
1513
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1514
|
-
}[e] ?? "ease" : "ease",
|
|
1514
|
+
}[e] ?? "ease" : "ease", Ue = (e, t) => {
|
|
1515
1515
|
let [n, r] = t.split("-");
|
|
1516
1516
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1517
|
-
},
|
|
1517
|
+
}, We = (e, t) => {
|
|
1518
1518
|
let [n, r] = t.split("-");
|
|
1519
1519
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1520
|
-
},
|
|
1520
|
+
}, Ge = (e, t) => {
|
|
1521
1521
|
let [n, r] = t.split("-");
|
|
1522
1522
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1523
|
-
},
|
|
1523
|
+
}, Ke = (e, t) => {
|
|
1524
1524
|
let [n, r] = t.split("-");
|
|
1525
1525
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1526
|
-
},
|
|
1527
|
-
let o =
|
|
1526
|
+
}, q = (e, t, n) => `flemo-${e}-${ke(t)}-${n}`, qe = (e, t, n, r, i, a) => {
|
|
1527
|
+
let o = G(r), s = G(i.value), c = Te(i.options), l = Ee(i.options), u = He(i.options?.ease), d = a(t, n), f = e === "screen" ? `${d},\n${Ge(t, n)}` : d;
|
|
1528
1528
|
if (s.length === 0 && o.length === 0) return "";
|
|
1529
|
-
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${
|
|
1530
|
-
let p =
|
|
1529
|
+
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${K(s)}\n animation: none;\n}`;
|
|
1530
|
+
let p = q(e, t, n), m = [
|
|
1531
1531
|
`@keyframes ${p} {`,
|
|
1532
1532
|
" from {",
|
|
1533
|
-
|
|
1533
|
+
K(o).replace(/^/gm, " "),
|
|
1534
1534
|
" }",
|
|
1535
1535
|
" to {",
|
|
1536
|
-
|
|
1536
|
+
K(s).replace(/^/gm, " "),
|
|
1537
1537
|
" }",
|
|
1538
1538
|
"}"
|
|
1539
1539
|
].join("\n"), h = [
|
|
@@ -1543,55 +1543,60 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1543
1543
|
l > 0 ? `${l}s` : null,
|
|
1544
1544
|
"both"
|
|
1545
1545
|
].filter(Boolean).join(" "), g = new Map(o.map((e) => [e.property, e.value])), _ = new Map(s.map((e) => [e.property, e.value])), v = Array.from(new Set([...g.keys(), ..._.keys()])).filter((e) => g.get(e) !== _.get(e)), y = v.length > 0 ? ` will-change: ${v.join(", ")};\n` : "", b = n.split("-")[0];
|
|
1546
|
-
return `${m}\n${`${f} {\n animation: ${h};\n${y}${b === "PUSHING" || b === "REPLACING" ? " contain: layout;\n pointer-events: none;\n" : ""}}`}${e === "screen" && n.endsWith("-false") &&
|
|
1547
|
-
},
|
|
1546
|
+
return `${m}\n${`${f} {\n animation: ${h};\n${y}${b === "PUSHING" || b === "REPLACING" ? " contain: layout;\n pointer-events: none;\n" : ""}}`}${e === "screen" && n.endsWith("-false") && Je(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park"] {\n animation: none;\n${K(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && Je(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${K(s)}\n}` : ""}`;
|
|
1547
|
+
}, Je = (e) => {
|
|
1548
1548
|
if (!e) return !1;
|
|
1549
1549
|
if (e.opacity === 0) return !0;
|
|
1550
1550
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1551
1551
|
return t(e.x) || t(e.y);
|
|
1552
|
-
},
|
|
1553
|
-
let i =
|
|
1554
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1555
|
-
},
|
|
1552
|
+
}, Ye = (e, t, n, r) => {
|
|
1553
|
+
let i = G(r.value);
|
|
1554
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${K(i)}\n}`;
|
|
1555
|
+
}, Xe = (e, t, n = []) => {
|
|
1556
1556
|
let r = [];
|
|
1557
1557
|
for (let t of e) {
|
|
1558
1558
|
let e = t.name;
|
|
1559
|
-
for (let n of
|
|
1560
|
-
let i = t.variants[n], a =
|
|
1559
|
+
for (let n of we) {
|
|
1560
|
+
let i = t.variants[n], a = U[n];
|
|
1561
1561
|
if (a === "self") {
|
|
1562
|
-
r.push(
|
|
1562
|
+
r.push(Ye(Ue, e, n, i));
|
|
1563
1563
|
continue;
|
|
1564
1564
|
}
|
|
1565
1565
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1566
|
-
r.push(
|
|
1566
|
+
r.push(qe("screen", e, n, o, i, Ue));
|
|
1567
1567
|
}
|
|
1568
1568
|
}
|
|
1569
1569
|
for (let e of t) {
|
|
1570
1570
|
let t = e.name;
|
|
1571
|
-
for (let n of
|
|
1572
|
-
let i = e.variants[n], a =
|
|
1571
|
+
for (let n of Oe) {
|
|
1572
|
+
let i = e.variants[n], a = U[n];
|
|
1573
1573
|
if (a === "self") {
|
|
1574
|
-
r.push(
|
|
1574
|
+
r.push(Ye(We, t, n, i));
|
|
1575
1575
|
continue;
|
|
1576
1576
|
}
|
|
1577
1577
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1578
|
-
r.push(
|
|
1578
|
+
r.push(qe("decorator", t, n, o, i, We));
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
1581
|
for (let e of n) {
|
|
1582
1582
|
let t = e.name;
|
|
1583
|
-
for (let n of
|
|
1584
|
-
let i = e.variants[n], a =
|
|
1583
|
+
for (let n of Oe) {
|
|
1584
|
+
let i = e.variants[n], a = U[n];
|
|
1585
1585
|
if (a === "self") {
|
|
1586
|
-
r.push(
|
|
1586
|
+
r.push(Ye(Ke, t, n, i));
|
|
1587
1587
|
continue;
|
|
1588
1588
|
}
|
|
1589
1589
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1590
|
-
r.push(
|
|
1590
|
+
r.push(qe("part", t, n, o, i, Ke));
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
|
-
return [
|
|
1594
|
-
|
|
1593
|
+
return [
|
|
1594
|
+
...r.filter((e) => e.length > 0),
|
|
1595
|
+
Ze,
|
|
1596
|
+
$e,
|
|
1597
|
+
et
|
|
1598
|
+
].join("\n\n");
|
|
1599
|
+
}, Ze = [
|
|
1595
1600
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1596
1601
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1597
1602
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
@@ -1600,17 +1605,29 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1600
1605
|
"[data-flemo-anim-hold=\"park-under\"] [data-flemo-part-name] {",
|
|
1601
1606
|
" animation-play-state: paused !important;",
|
|
1602
1607
|
"}"
|
|
1603
|
-
].join("\n"),
|
|
1604
|
-
|
|
1608
|
+
].join("\n"), Qe = [["PUSHING", "true"], ["REPLACING", "true"]], $e = [
|
|
1609
|
+
...Qe.flatMap(([e, t], n) => [
|
|
1610
|
+
"",
|
|
1611
|
+
"::before",
|
|
1612
|
+
"::after"
|
|
1613
|
+
].map((r, i) => `[data-flemo-screen][data-flemo-status="${e}"][data-flemo-active="${t}"] :not([data-flemo-part-name])${r}${n === Qe.length - 1 && i === 2 ? " {" : ","}`)),
|
|
1614
|
+
" animation: none !important;",
|
|
1615
|
+
"}"
|
|
1616
|
+
].join("\n"), et = [
|
|
1617
|
+
"[data-flemo-held-arrival] {",
|
|
1618
|
+
" display: none !important;",
|
|
1619
|
+
"}"
|
|
1620
|
+
].join("\n"), J = (e, t) => {
|
|
1621
|
+
let n = U[t];
|
|
1605
1622
|
if (n === "self") return !1;
|
|
1606
|
-
let r = e.variants[t], i =
|
|
1623
|
+
let r = e.variants[t], i = Te(r.options), a = Ee(r.options);
|
|
1607
1624
|
if (i <= 0 && a <= 0) return !1;
|
|
1608
|
-
let o =
|
|
1625
|
+
let o = G(n === "initial" ? e.initial : e.variants[n].value), s = G(r.value);
|
|
1609
1626
|
return o.length > 0 || s.length > 0;
|
|
1610
1627
|
}, tt = "data-flemo";
|
|
1611
1628
|
function nt() {
|
|
1612
1629
|
if (f()) return;
|
|
1613
|
-
let e =
|
|
1630
|
+
let e = Xe(z.values(), V.values(), H.values()), t = document.head.querySelector(`style[${tt}]`);
|
|
1614
1631
|
t || (t = document.createElement("style"), t.setAttribute(tt, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1615
1632
|
}
|
|
1616
1633
|
//#endregion
|
|
@@ -1622,13 +1639,13 @@ var rt = /* @__PURE__ */ new Map(), it = /* @__PURE__ */ new Map(), at = /* @__P
|
|
|
1622
1639
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1623
1640
|
};
|
|
1624
1641
|
function ct(e, t, n = []) {
|
|
1625
|
-
for (let t of e)
|
|
1626
|
-
for (let e of t)
|
|
1627
|
-
for (let e of n)
|
|
1642
|
+
for (let t of e) z.set(t.name, t), ot(rt, t.name);
|
|
1643
|
+
for (let e of t) V.set(e.name, e), ot(it, e.name);
|
|
1644
|
+
for (let e of n) H.set(e.name, e), ot(at, e.name);
|
|
1628
1645
|
return nt(), () => {
|
|
1629
|
-
for (let t of e) st(rt, t.name) &&
|
|
1630
|
-
for (let e of t) st(it, e.name) &&
|
|
1631
|
-
for (let e of n) st(at, e.name) &&
|
|
1646
|
+
for (let t of e) st(rt, t.name) && z.delete(t.name);
|
|
1647
|
+
for (let e of t) st(it, e.name) && V.delete(e.name);
|
|
1648
|
+
for (let e of n) st(at, e.name) && H.delete(e.name);
|
|
1632
1649
|
nt();
|
|
1633
1650
|
};
|
|
1634
1651
|
}
|
|
@@ -1710,9 +1727,12 @@ var ut = () => ({
|
|
|
1710
1727
|
};
|
|
1711
1728
|
})(), pt = "flemo:motion-driver", mt = "flemo:motion-driver-force", ht = !1, gt = () => {
|
|
1712
1729
|
try {
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1730
|
+
try {
|
|
1731
|
+
typeof localStorage < "u" && localStorage.removeItem(mt);
|
|
1732
|
+
} catch {}
|
|
1733
|
+
if (typeof sessionStorage > "u") return null;
|
|
1734
|
+
let e = sessionStorage.getItem(mt);
|
|
1735
|
+
return e !== "css" && e !== "raf" ? null : (!ht && typeof console < "u" && (ht = !0, console.warn(`[flemo] motion driver pinned to "${e}" via sessionStorage ${mt}; remove the key to restore automatic selection.`)), e);
|
|
1716
1736
|
} catch {
|
|
1717
1737
|
return null;
|
|
1718
1738
|
}
|
|
@@ -1729,7 +1749,7 @@ var ut = () => ({
|
|
|
1729
1749
|
typeof localStorage < "u" && localStorage.setItem(pt, e);
|
|
1730
1750
|
} catch {}
|
|
1731
1751
|
}
|
|
1732
|
-
}), vt = 30, yt = 2, bt = 2,
|
|
1752
|
+
}), vt = 30, yt = 2, bt = 2, Y = ((e = _t(), t = !1) => {
|
|
1733
1753
|
let n = e.read() === "css", r = n;
|
|
1734
1754
|
n &&= !1;
|
|
1735
1755
|
let i = 0, a = 0, o = [];
|
|
@@ -1758,43 +1778,43 @@ var ut = () => ({
|
|
|
1758
1778
|
demoted: n
|
|
1759
1779
|
})
|
|
1760
1780
|
};
|
|
1761
|
-
})(),
|
|
1762
|
-
let n =
|
|
1763
|
-
n || (n = /* @__PURE__ */ new Set(),
|
|
1764
|
-
},
|
|
1781
|
+
})(), xt = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, St = /* @__PURE__ */ new WeakMap(), X = (e, t) => {
|
|
1782
|
+
let n = St.get(e);
|
|
1783
|
+
n || (n = /* @__PURE__ */ new Set(), St.set(e, n)), n.add(t);
|
|
1784
|
+
}, Z = (e, t) => {
|
|
1765
1785
|
if (ft.cancel(e), e.style.transition = "", e.style.removeProperty("animation-delay"), t) {
|
|
1766
|
-
let n =
|
|
1786
|
+
let n = St.get(e);
|
|
1767
1787
|
for (let r of t) e.style.removeProperty(r), n?.delete(r);
|
|
1768
1788
|
return;
|
|
1769
1789
|
}
|
|
1770
|
-
let n =
|
|
1790
|
+
let n = St.get(e);
|
|
1771
1791
|
if (n && n.size > 0) {
|
|
1772
1792
|
for (let t of n) e.style.removeProperty(t);
|
|
1773
1793
|
n.clear();
|
|
1774
1794
|
return;
|
|
1775
1795
|
}
|
|
1776
1796
|
e.style.removeProperty("transform"), e.style.removeProperty("opacity");
|
|
1777
|
-
},
|
|
1778
|
-
if (!
|
|
1779
|
-
let r = e, i =
|
|
1797
|
+
}, Q = (e, t, n = {}) => {
|
|
1798
|
+
if (!xt(e)) return Promise.resolve();
|
|
1799
|
+
let r = e, i = G(t);
|
|
1780
1800
|
if (i.length === 0) return Promise.resolve();
|
|
1781
|
-
let a = typeof n.duration == "number" ? n.duration : 0, o = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, s =
|
|
1801
|
+
let a = typeof n.duration == "number" ? n.duration : 0, o = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, s = He(n.ease);
|
|
1782
1802
|
if (a <= 0 && o <= 0) {
|
|
1783
1803
|
ft.takeover(r), r.style.transition = "none";
|
|
1784
|
-
for (let e of i) r.style.setProperty(e.property, e.value),
|
|
1804
|
+
for (let e of i) r.style.setProperty(e.property, e.value), X(r, e.property);
|
|
1785
1805
|
return Promise.resolve();
|
|
1786
1806
|
}
|
|
1787
|
-
let c =
|
|
1807
|
+
let c = Y.playerAllowed() ? ft.settle(r, i, {
|
|
1788
1808
|
durationMs: a * 1e3,
|
|
1789
1809
|
delayMs: o * 1e3,
|
|
1790
1810
|
easing: s
|
|
1791
1811
|
}, (e) => {
|
|
1792
|
-
r.style.setProperty(e.property, e.value),
|
|
1812
|
+
r.style.setProperty(e.property, e.value), X(r, e.property);
|
|
1793
1813
|
}) : null;
|
|
1794
1814
|
if (c) return c;
|
|
1795
1815
|
let l = i.map((e) => `${e.property} ${a}s ${s} ${o}s`).join(", ");
|
|
1796
1816
|
r.style.transition = l, r.offsetWidth;
|
|
1797
|
-
for (let e of i) r.style.setProperty(e.property, e.value),
|
|
1817
|
+
for (let e of i) r.style.setProperty(e.property, e.value), X(r, e.property);
|
|
1798
1818
|
return new Promise((e) => {
|
|
1799
1819
|
let t = !1, n = () => {
|
|
1800
1820
|
t || (t = !0, r.removeEventListener("transitionend", i), e());
|
|
@@ -1803,7 +1823,92 @@ var ut = () => ({
|
|
|
1803
1823
|
};
|
|
1804
1824
|
r.addEventListener("transitionend", i), setTimeout(n, (a + o) * 1e3 + 60);
|
|
1805
1825
|
});
|
|
1806
|
-
}, Ct =
|
|
1826
|
+
}, Ct = "data-flemo-held-arrival";
|
|
1827
|
+
function wt(e) {
|
|
1828
|
+
if (typeof MutationObserver > "u") return () => {};
|
|
1829
|
+
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
1830
|
+
let n = t instanceof Element ? t : t.parentElement;
|
|
1831
|
+
return !n || n === e ? !0 : n.closest(`[data-flemo-part-name], [${Ct}]`) !== null;
|
|
1832
|
+
}, s = (e, t, n, r) => e ? n === e.glass ? (e.pendingEcho ? e.pendingEcho = !1 : e.latest = n, e) : (e.latest = n, r(e.glass), e.pendingEcho = !0, e) : n === t ? null : (r(t), {
|
|
1833
|
+
glass: t,
|
|
1834
|
+
latest: n,
|
|
1835
|
+
pendingEcho: !0
|
|
1836
|
+
}), c = new MutationObserver((e) => {
|
|
1837
|
+
let c = /* @__PURE__ */ new Map(), l = (e) => {
|
|
1838
|
+
let t = c.get(e);
|
|
1839
|
+
return t || c.set(e, t = {
|
|
1840
|
+
removed: [],
|
|
1841
|
+
added: []
|
|
1842
|
+
}), t;
|
|
1843
|
+
}, u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
|
|
1844
|
+
for (let i of e) {
|
|
1845
|
+
if (i.type === "characterData") {
|
|
1846
|
+
let e = i.target;
|
|
1847
|
+
if (!e.isConnected || o(e)) continue;
|
|
1848
|
+
u.has(e) || u.set(e, i.oldValue);
|
|
1849
|
+
continue;
|
|
1850
|
+
}
|
|
1851
|
+
if (i.type === "attributes") {
|
|
1852
|
+
let e = i.target, t = i.attributeName;
|
|
1853
|
+
if (t.startsWith("data-flemo") || !e.isConnected || o(e)) continue;
|
|
1854
|
+
let n = d.get(e);
|
|
1855
|
+
n || d.set(e, n = /* @__PURE__ */ new Map()), n.has(t) || n.set(t, i.oldValue);
|
|
1856
|
+
continue;
|
|
1857
|
+
}
|
|
1858
|
+
if (i.type === "childList") {
|
|
1859
|
+
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
1860
|
+
if (e instanceof Element && t.delete(e)) {
|
|
1861
|
+
e.removeAttribute(Ct);
|
|
1862
|
+
continue;
|
|
1863
|
+
}
|
|
1864
|
+
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
1865
|
+
}
|
|
1866
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(Ct, ""), t.add(e), l(i.target).added.push(e));
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
for (let [e, t] of u) {
|
|
1870
|
+
let n = s(i.get(e), t, e.nodeValue, (t) => {
|
|
1871
|
+
e.nodeValue = t;
|
|
1872
|
+
});
|
|
1873
|
+
n && i.set(e, n);
|
|
1874
|
+
}
|
|
1875
|
+
for (let [e, t] of d) {
|
|
1876
|
+
let n = a.get(e);
|
|
1877
|
+
for (let [r, i] of t) {
|
|
1878
|
+
let t = s(n?.get(r), i, e.getAttribute(r), (t) => {
|
|
1879
|
+
t === null ? e.removeAttribute(r) : e.setAttribute(r, t);
|
|
1880
|
+
});
|
|
1881
|
+
t && (n || a.set(e, n = /* @__PURE__ */ new Map()), n.set(r, t));
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
for (let [e, i] of c) {
|
|
1885
|
+
if (i.removed.length === 0 || !e.isConnected) continue;
|
|
1886
|
+
let a = i.added.find((t) => t.parentNode === e) ?? Array.from(e.childNodes).find((e) => e instanceof Element && t.has(e)) ?? null;
|
|
1887
|
+
if (!(i.added.length === 0 && !a)) for (let t of i.removed) r.add(t), e.insertBefore(t, a), n.add(t);
|
|
1888
|
+
}
|
|
1889
|
+
});
|
|
1890
|
+
return c.observe(e, {
|
|
1891
|
+
childList: !0,
|
|
1892
|
+
subtree: !0,
|
|
1893
|
+
characterData: !0,
|
|
1894
|
+
characterDataOldValue: !0,
|
|
1895
|
+
attributes: !0,
|
|
1896
|
+
attributeOldValue: !0
|
|
1897
|
+
}), () => {
|
|
1898
|
+
c.disconnect();
|
|
1899
|
+
for (let e of n) e.parentNode?.removeChild(e);
|
|
1900
|
+
n.clear();
|
|
1901
|
+
for (let e of t) e.removeAttribute(Ct);
|
|
1902
|
+
t.clear();
|
|
1903
|
+
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
1904
|
+
i.clear();
|
|
1905
|
+
for (let [e, t] of a) if (e.isConnected) for (let [n, r] of t) r.latest === null ? e.removeAttribute(n) : e.setAttribute(n, r.latest);
|
|
1906
|
+
a.clear(), r.clear();
|
|
1907
|
+
};
|
|
1908
|
+
}
|
|
1909
|
+
//#endregion
|
|
1910
|
+
//#region src/transition/cubicBezier.ts
|
|
1911
|
+
var Tt = (e, t, n, r) => {
|
|
1807
1912
|
let i = (t) => 3 * (1 - t) * (1 - t) * t * e + 3 * (1 - t) * t * t * n + t ** 3, a = (e) => 3 * (1 - e) * (1 - e) * e * t + 3 * (1 - e) * e * e * r + e ** 3;
|
|
1808
1913
|
return (e) => {
|
|
1809
1914
|
if (e <= 0) return 0;
|
|
@@ -1815,7 +1920,7 @@ var ut = () => ({
|
|
|
1815
1920
|
}
|
|
1816
1921
|
return a((t + n) / 2);
|
|
1817
1922
|
};
|
|
1818
|
-
},
|
|
1923
|
+
}, Et = (e) => e, Dt = {
|
|
1819
1924
|
ease: [
|
|
1820
1925
|
.25,
|
|
1821
1926
|
.1,
|
|
@@ -1870,16 +1975,62 @@ var ut = () => ({
|
|
|
1870
1975
|
.66,
|
|
1871
1976
|
-.56
|
|
1872
1977
|
]
|
|
1873
|
-
},
|
|
1978
|
+
}, Ot = (e) => {
|
|
1874
1979
|
if (Array.isArray(e)) {
|
|
1875
1980
|
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
1876
1981
|
let [t, n, r, i] = e;
|
|
1877
|
-
return
|
|
1982
|
+
return Tt(t, n, r, i);
|
|
1878
1983
|
}
|
|
1879
|
-
return
|
|
1984
|
+
return Et;
|
|
1985
|
+
}
|
|
1986
|
+
return typeof e == "string" ? e === "linear" ? Et : Tt(...Dt[e] ?? Dt.ease) : Tt(...Dt.ease);
|
|
1987
|
+
}, kt = 1 / 255, At = 400, jt = 24, Mt = new Set([
|
|
1988
|
+
"x",
|
|
1989
|
+
"y",
|
|
1990
|
+
"opacity"
|
|
1991
|
+
]), Nt = (e, t, n) => {
|
|
1992
|
+
if (!e || typeof e != "object") return;
|
|
1993
|
+
let r = e[t];
|
|
1994
|
+
if (r === void 0) return;
|
|
1995
|
+
if (typeof r == "number") return r;
|
|
1996
|
+
if (typeof r != "string") return null;
|
|
1997
|
+
let i = r.trim();
|
|
1998
|
+
if (i.endsWith("%")) {
|
|
1999
|
+
let e = Number(i.slice(0, -1));
|
|
2000
|
+
if (Number.isNaN(e)) return null;
|
|
2001
|
+
let r = t === "y" ? n.clientHeight : n.clientWidth;
|
|
2002
|
+
return e / 100 * r;
|
|
1880
2003
|
}
|
|
1881
|
-
|
|
1882
|
-
|
|
2004
|
+
if (i.endsWith("px")) {
|
|
2005
|
+
let e = Number(i.slice(0, -2));
|
|
2006
|
+
return Number.isNaN(e) ? null : e;
|
|
2007
|
+
}
|
|
2008
|
+
return null;
|
|
2009
|
+
}, Pt = (e, t, n) => {
|
|
2010
|
+
let r = /* @__PURE__ */ new Set();
|
|
2011
|
+
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2012
|
+
if (r.size === 0) return null;
|
|
2013
|
+
let i = Infinity;
|
|
2014
|
+
for (let a of r) {
|
|
2015
|
+
if (!Mt.has(a)) return null;
|
|
2016
|
+
let r = Nt(e.from, a, t), o = Nt(e.to, a, t);
|
|
2017
|
+
if (r === null || o === null || r === void 0 || o === void 0) return null;
|
|
2018
|
+
let s = Math.abs(o - r);
|
|
2019
|
+
if (s === 0) continue;
|
|
2020
|
+
let c = a === "opacity" ? kt : 1 / Math.max(1, n);
|
|
2021
|
+
i = Math.min(i, c / s);
|
|
2022
|
+
}
|
|
2023
|
+
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2024
|
+
}, Ft = (e, t, n) => {
|
|
2025
|
+
if (e.duration <= 0) return null;
|
|
2026
|
+
let r = Pt(e, t, n);
|
|
2027
|
+
if (r === null) return null;
|
|
2028
|
+
let i = Ot(e.ease), a = At;
|
|
2029
|
+
for (let e = At; e >= 0 && !(Math.abs(1 - i(e / At)) > r); --e) a = e;
|
|
2030
|
+
if (a === 0) return null;
|
|
2031
|
+
let o = (e.delay + e.duration * (a / At)) * 1e3;
|
|
2032
|
+
return (e.delay + e.duration) * 1e3 - o < jt ? null : o;
|
|
2033
|
+
}, It = [
|
|
1883
2034
|
"x",
|
|
1884
2035
|
"y",
|
|
1885
2036
|
"z",
|
|
@@ -1890,7 +2041,7 @@ var ut = () => ({
|
|
|
1890
2041
|
"rotateX",
|
|
1891
2042
|
"rotateY",
|
|
1892
2043
|
"rotateZ"
|
|
1893
|
-
],
|
|
2044
|
+
], Lt = new Set(It), Rt = {
|
|
1894
2045
|
x: 0,
|
|
1895
2046
|
y: 0,
|
|
1896
2047
|
z: 0,
|
|
@@ -1901,7 +2052,7 @@ var ut = () => ({
|
|
|
1901
2052
|
rotateX: 0,
|
|
1902
2053
|
rotateY: 0,
|
|
1903
2054
|
rotateZ: 0
|
|
1904
|
-
},
|
|
2055
|
+
}, zt = (e, t) => {
|
|
1905
2056
|
if (typeof t == "number") return {
|
|
1906
2057
|
value: t,
|
|
1907
2058
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -1920,26 +2071,26 @@ var ut = () => ({
|
|
|
1920
2071
|
value: i,
|
|
1921
2072
|
unit: a === "" && i === 0 ? "px" : a
|
|
1922
2073
|
};
|
|
1923
|
-
},
|
|
1924
|
-
let n = e.match(
|
|
1925
|
-
if (n.length !== r.length || e.replace(
|
|
2074
|
+
}, Bt = /-?\d*\.?\d+/g, Vt = (e, t) => {
|
|
2075
|
+
let n = e.match(Bt) ?? [], r = t.match(Bt) ?? [];
|
|
2076
|
+
if (n.length !== r.length || e.replace(Bt, " ") !== t.replace(Bt, " ")) return null;
|
|
1926
2077
|
let i = n.map(Number), a = r.map(Number);
|
|
1927
2078
|
return (t) => {
|
|
1928
2079
|
let n = 0;
|
|
1929
|
-
return e.replace(
|
|
2080
|
+
return e.replace(Bt, () => {
|
|
1930
2081
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
1931
2082
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
1932
2083
|
});
|
|
1933
2084
|
};
|
|
1934
|
-
},
|
|
1935
|
-
let n = new Set([...
|
|
2085
|
+
}, Ht = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Ut = (e) => typeof e == "object" && !!e && !Array.isArray(e), Wt = (e) => Ut(e) ? Object.keys(e) : [], Gt = (e, t) => Ut(e) ? e[t] : void 0, Kt = (e, t) => {
|
|
2086
|
+
let n = new Set([...Wt(e.from), ...Wt(e.to)]), r = [], i = null, a = [], o = [];
|
|
1936
2087
|
for (let s of n) {
|
|
1937
|
-
let n =
|
|
1938
|
-
if (
|
|
2088
|
+
let n = Gt(e.from, s), c = Gt(e.to, s);
|
|
2089
|
+
if (Lt.has(s)) {
|
|
1939
2090
|
let e = s, i = {
|
|
1940
|
-
value:
|
|
2091
|
+
value: Rt[e],
|
|
1941
2092
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
1942
|
-
}, a = n === void 0 ? i :
|
|
2093
|
+
}, a = n === void 0 ? i : zt(e, n), o = c === void 0 ? i : zt(e, c);
|
|
1943
2094
|
if (!a || !o || a.unit !== o.unit && a.value !== 0 && o.value !== 0) return null;
|
|
1944
2095
|
let l = a.value === 0 && a.unit !== o.unit ? o.unit : a.unit, u = l === "%", d = 0;
|
|
1945
2096
|
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), r.push({
|
|
@@ -1970,15 +2121,15 @@ var ut = () => ({
|
|
|
1970
2121
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
1971
2122
|
if (l === u) {
|
|
1972
2123
|
o.push({
|
|
1973
|
-
property:
|
|
2124
|
+
property: Ht(s),
|
|
1974
2125
|
value: l
|
|
1975
2126
|
});
|
|
1976
2127
|
continue;
|
|
1977
2128
|
}
|
|
1978
|
-
let d =
|
|
2129
|
+
let d = Vt(l, u);
|
|
1979
2130
|
if (!d) return null;
|
|
1980
2131
|
a.push({
|
|
1981
|
-
property:
|
|
2132
|
+
property: Ht(s),
|
|
1982
2133
|
mix: d
|
|
1983
2134
|
});
|
|
1984
2135
|
}
|
|
@@ -1988,46 +2139,46 @@ var ut = () => ({
|
|
|
1988
2139
|
strings: a,
|
|
1989
2140
|
constants: o
|
|
1990
2141
|
};
|
|
1991
|
-
},
|
|
2142
|
+
}, qt = 1, Jt = (e, t, n, r) => {
|
|
1992
2143
|
let i = 0, a = 0, o = !1, s = [], c = !0;
|
|
1993
|
-
for (let l of
|
|
2144
|
+
for (let l of It) {
|
|
1994
2145
|
let u = e.find((e) => e.prop === l);
|
|
1995
2146
|
if (!u) continue;
|
|
1996
2147
|
let d = u.from.value + (u.to.value - u.from.value) * t;
|
|
1997
2148
|
if (u.from.unit === "%" && (d *= u.percentBase), l === "x" || l === "y") {
|
|
1998
|
-
let e = l === "x" ? r.x : r.y, t = (e === null || Math.abs(d - e) * n >=
|
|
2149
|
+
let e = l === "x" ? r.x : r.y, t = (e === null || Math.abs(d - e) * n >= qt) && n > 0 ? Math.round(d * n) / n : Math.round(d * 1e3) / 1e3;
|
|
1999
2150
|
l === "x" ? (r.x = d, i = t) : (r.y = d, a = t), o = !0, t !== 0 && (c = !1);
|
|
2000
2151
|
continue;
|
|
2001
2152
|
}
|
|
2002
|
-
let f =
|
|
2153
|
+
let f = Rt[l];
|
|
2003
2154
|
d !== f && (c = !1), l === "z" ? s.push(`translateZ(${d}px)`) : l === "scale" ? s.push(`scale(${d})`) : l === "scaleX" ? s.push(`scaleX(${d})`) : l === "scaleY" ? s.push(`scaleY(${d})`) : l === "rotate" || l === "rotateZ" ? s.push(`rotate(${d}deg)`) : l === "rotateX" ? s.push(`rotateX(${d}deg)`) : l === "rotateY" && s.push(`rotateY(${d}deg)`);
|
|
2004
2155
|
}
|
|
2005
2156
|
return !o && s.length === 0 ? "" : c ? "none" : [...o ? [`translate3d(${i}px, ${a}px, 0)`] : [], ...s].join(" ");
|
|
2006
|
-
},
|
|
2157
|
+
}, Yt = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), Xt = (e) => {
|
|
2007
2158
|
let t = {};
|
|
2008
|
-
for (let n of
|
|
2159
|
+
for (let n of G(e)) t[Yt(n.property)] = n.value;
|
|
2009
2160
|
return t;
|
|
2010
|
-
},
|
|
2161
|
+
}, Zt = (e, t) => {
|
|
2011
2162
|
if (typeof e.animate != "function") return null;
|
|
2012
2163
|
try {
|
|
2013
|
-
let n = e.animate([
|
|
2164
|
+
let n = e.animate([Xt(t.from), Xt(t.to)], {
|
|
2014
2165
|
duration: Math.max(0, t.duration * 1e3),
|
|
2015
2166
|
delay: Math.max(0, t.delay * 1e3),
|
|
2016
|
-
easing:
|
|
2167
|
+
easing: He(t.ease),
|
|
2017
2168
|
fill: "both"
|
|
2018
2169
|
});
|
|
2019
2170
|
return n.pause(), n.currentTime = 0, n;
|
|
2020
2171
|
} catch {
|
|
2021
2172
|
return null;
|
|
2022
2173
|
}
|
|
2023
|
-
},
|
|
2174
|
+
}, Qt = 1e3 / 60, $t = 100, en = () => ({
|
|
2024
2175
|
request: (e) => requestAnimationFrame(e),
|
|
2025
2176
|
cancel: (e) => cancelAnimationFrame(e),
|
|
2026
2177
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
2027
|
-
}),
|
|
2178
|
+
}), tn = ((e = en()) => {
|
|
2028
2179
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
2029
2180
|
join: (n, r) => {
|
|
2030
|
-
let i =
|
|
2181
|
+
let i = Kt(r.motion, r.element), s = i ? null : Zt(r.element, r.motion);
|
|
2031
2182
|
if (!i && !s) return null;
|
|
2032
2183
|
let c = t.get(n);
|
|
2033
2184
|
c || (c = {
|
|
@@ -2048,14 +2199,14 @@ var ut = () => ({
|
|
|
2048
2199
|
y: null
|
|
2049
2200
|
}
|
|
2050
2201
|
};
|
|
2051
|
-
if (c.tracks.push(l), l.element.style.animation = "none",
|
|
2052
|
-
i.transforms.length > 0 &&
|
|
2053
|
-
for (let e of i.strings)
|
|
2054
|
-
for (let e of i.constants)
|
|
2202
|
+
if (c.tracks.push(l), l.element.style.animation = "none", X(l.element, "animation"), i) {
|
|
2203
|
+
i.transforms.length > 0 && X(l.element, "transform"), i.opacity && X(l.element, "opacity");
|
|
2204
|
+
for (let e of i.strings) X(l.element, e.property);
|
|
2205
|
+
for (let e of i.constants) X(l.element, e.property);
|
|
2055
2206
|
a(l, 0);
|
|
2056
2207
|
}
|
|
2057
|
-
return r.role === "active" && !c.started && (c.started = !0,
|
|
2058
|
-
l.detached = !0, l.scrub?.cancel(),
|
|
2208
|
+
return r.role === "active" && !c.started && (c.started = !0, Y.beginRun(), o(n, c)), () => {
|
|
2209
|
+
l.detached = !0, l.scrub?.cancel(), Z(l.element);
|
|
2059
2210
|
let r = t.get(n);
|
|
2060
2211
|
r && (r.tracks = r.tracks.filter((e) => e !== l), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
2061
2212
|
};
|
|
@@ -2070,13 +2221,13 @@ var ut = () => ({
|
|
|
2070
2221
|
}
|
|
2071
2222
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
2072
2223
|
let t = r.get(e);
|
|
2073
|
-
return t || (t =
|
|
2224
|
+
return t || (t = Ot(e.motion.ease), r.set(e, t)), t;
|
|
2074
2225
|
};
|
|
2075
2226
|
function a(t, n) {
|
|
2076
2227
|
let { element: r, parsed: i } = t;
|
|
2077
2228
|
if (!(!i || !r.isConnected)) {
|
|
2078
2229
|
if (i.transforms.length > 0) {
|
|
2079
|
-
let a =
|
|
2230
|
+
let a = Jt(i.transforms, n, e.devicePixelRatio(), t.snapMemory);
|
|
2080
2231
|
a !== "" && (r.style.transform = a);
|
|
2081
2232
|
}
|
|
2082
2233
|
if (i.opacity) {
|
|
@@ -2096,7 +2247,7 @@ var ut = () => ({
|
|
|
2096
2247
|
let c = r.startTime ?? s;
|
|
2097
2248
|
if (r.lastTime !== null) {
|
|
2098
2249
|
let e = s - r.lastTime;
|
|
2099
|
-
|
|
2250
|
+
Y.reportGap(e), n.onFrameGap?.(e), e >= $t && (c += e - Qt);
|
|
2100
2251
|
}
|
|
2101
2252
|
r.startTime = c, r.lastTime = s;
|
|
2102
2253
|
let l = !0;
|
|
@@ -2112,14 +2263,14 @@ var ut = () => ({
|
|
|
2112
2263
|
a(e, i(e)(o)), o >= 1 ? (e.completed = !0, e.onComplete?.()) : l = !1;
|
|
2113
2264
|
}
|
|
2114
2265
|
if (l) {
|
|
2115
|
-
|
|
2266
|
+
Y.endRun(), t.delete(e);
|
|
2116
2267
|
return;
|
|
2117
2268
|
}
|
|
2118
2269
|
o(e, r);
|
|
2119
2270
|
}
|
|
2120
2271
|
return n;
|
|
2121
2272
|
})();
|
|
2122
|
-
|
|
2273
|
+
tn.onFrameGap = (e) => {
|
|
2123
2274
|
if (typeof window < "u") {
|
|
2124
2275
|
let t = window.__flemoPlayerGaps ??= [];
|
|
2125
2276
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -2127,23 +2278,23 @@ Q.onFrameGap = (e) => {
|
|
|
2127
2278
|
};
|
|
2128
2279
|
//#endregion
|
|
2129
2280
|
//#region src/core/engine/types.ts
|
|
2130
|
-
var
|
|
2281
|
+
var nn = "data-flemo-skip-animation", $ = () => {}, rn = "data-flemo-part-name", an = (e) => {
|
|
2131
2282
|
let t = e.parentElement ?? e;
|
|
2132
|
-
return Array.from(t.querySelectorAll(`[${
|
|
2283
|
+
return Array.from(t.querySelectorAll(`[${rn}]`)).filter((n) => {
|
|
2133
2284
|
let r = n.closest("[data-flemo-screen]");
|
|
2134
2285
|
return !r || r === e || !t.contains(r);
|
|
2135
2286
|
});
|
|
2136
|
-
},
|
|
2287
|
+
}, on = (e, t) => {
|
|
2137
2288
|
let [n, r] = t.split("-");
|
|
2138
|
-
return
|
|
2139
|
-
},
|
|
2289
|
+
return an(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
2290
|
+
}, sn = 4, cn = (e) => `${Math.round(e * 1e3) / 1e3}s`, ln = (e) => {
|
|
2140
2291
|
let { element: t, expectedName: n, motion: r } = e, i = null, a = !1, o = (e) => {
|
|
2141
|
-
a = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), e.mode === "clear" ? t.style.removeProperty("animation-delay") : e.mode === "set" && (t.style.animationDelay =
|
|
2292
|
+
a = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), e.mode === "clear" ? t.style.removeProperty("animation-delay") : e.mode === "set" && (t.style.animationDelay = cn(e.seconds)), a = !1;
|
|
2142
2293
|
}, s = (e) => {
|
|
2143
2294
|
a || e.target !== t || e.animationName !== n || i === null && (i = performance.now());
|
|
2144
2295
|
}, c = (s) => {
|
|
2145
2296
|
if (a || s.target !== t || s.animationName !== n) return;
|
|
2146
|
-
if (!e.isLive() || e.budgetUsed() >=
|
|
2297
|
+
if (!e.isLive() || e.budgetUsed() >= sn) {
|
|
2147
2298
|
e.onTerminal();
|
|
2148
2299
|
return;
|
|
2149
2300
|
}
|
|
@@ -2173,28 +2324,56 @@ var Gt = "data-flemo-skip-animation", $ = () => {}, Kt = "data-flemo-part-name",
|
|
|
2173
2324
|
}
|
|
2174
2325
|
};
|
|
2175
2326
|
};
|
|
2176
|
-
function
|
|
2177
|
-
let t = /* @__PURE__ */ new Map()
|
|
2327
|
+
function un(e) {
|
|
2328
|
+
let t = /* @__PURE__ */ new Map(), n = null, r = null, i = () => {
|
|
2329
|
+
if (!r) return;
|
|
2330
|
+
let { land: e, cancel: t } = r;
|
|
2331
|
+
r = null, t(), e();
|
|
2332
|
+
}, a = (e) => {
|
|
2333
|
+
if (typeof requestAnimationFrame != "function") {
|
|
2334
|
+
e();
|
|
2335
|
+
return;
|
|
2336
|
+
}
|
|
2337
|
+
let t = 0;
|
|
2338
|
+
t = requestAnimationFrame(() => {
|
|
2339
|
+
t = requestAnimationFrame(() => {
|
|
2340
|
+
r = null, e();
|
|
2341
|
+
});
|
|
2342
|
+
}), r = {
|
|
2343
|
+
land: e,
|
|
2344
|
+
cancel: () => cancelAnimationFrame(t)
|
|
2345
|
+
};
|
|
2346
|
+
};
|
|
2178
2347
|
return {
|
|
2179
|
-
driveScreenLifecycle: (
|
|
2180
|
-
let { getElements:
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2348
|
+
driveScreenLifecycle: (r) => {
|
|
2349
|
+
let { getElements: o, transitionName: c, prevTransitionName: l, status: u, isActive: d, animHoldReleased: f } = r, p = u === "PUSHING" || u === "POPPING" || u === "REPLACING", m = p && f && (d ? u === "PUSHING" || u === "REPLACING" : u === "POPPING");
|
|
2350
|
+
if (!m && n) {
|
|
2351
|
+
let e = n;
|
|
2352
|
+
n = null, p ? e() : a(e);
|
|
2353
|
+
}
|
|
2354
|
+
if (m && !n) {
|
|
2355
|
+
i();
|
|
2356
|
+
let { scope: e } = o();
|
|
2357
|
+
e && (n = wt(e));
|
|
2358
|
+
}
|
|
2359
|
+
let h = (t, n, r) => {
|
|
2360
|
+
let i = e.getTransitionTaskId();
|
|
2361
|
+
if (!i || s.pendingTaskIds.some((e) => e !== i) || !Y.playerAllowed()) return null;
|
|
2362
|
+
let { scope: a, decorator: l, bars: u } = o();
|
|
2363
|
+
if (!a) return null;
|
|
2364
|
+
let d = B(c), f = W(d, t);
|
|
2186
2365
|
if (!f) return null;
|
|
2187
|
-
let p = [], m =
|
|
2188
|
-
element:
|
|
2366
|
+
let p = [], m = tn.join(i, {
|
|
2367
|
+
element: a,
|
|
2189
2368
|
motion: f,
|
|
2190
2369
|
role: n,
|
|
2191
|
-
onComplete:
|
|
2370
|
+
onComplete: r
|
|
2192
2371
|
});
|
|
2193
2372
|
if (!m) return null;
|
|
2194
2373
|
p.push(m);
|
|
2195
2374
|
for (let e of u ?? []) {
|
|
2196
2375
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
2197
|
-
let t =
|
|
2376
|
+
let t = tn.join(i, {
|
|
2198
2377
|
element: e,
|
|
2199
2378
|
motion: f,
|
|
2200
2379
|
role: "passive"
|
|
@@ -2202,9 +2381,9 @@ function Qt(e) {
|
|
|
2202
2381
|
t && p.push(t);
|
|
2203
2382
|
}
|
|
2204
2383
|
if (l && d.decoratorName) {
|
|
2205
|
-
let e =
|
|
2384
|
+
let e = V.get(d.decoratorName), n = e ? W(e, t) : null;
|
|
2206
2385
|
if (n) {
|
|
2207
|
-
let e =
|
|
2386
|
+
let e = tn.join(i, {
|
|
2208
2387
|
element: l,
|
|
2209
2388
|
motion: n,
|
|
2210
2389
|
role: "passive"
|
|
@@ -2212,20 +2391,20 @@ function Qt(e) {
|
|
|
2212
2391
|
e && p.push(e);
|
|
2213
2392
|
}
|
|
2214
2393
|
}
|
|
2215
|
-
for (let e of
|
|
2216
|
-
let n =
|
|
2394
|
+
for (let e of on(a, t)) {
|
|
2395
|
+
let n = H.get(e.getAttribute(rn)), r = n ? W(n, t) : null;
|
|
2217
2396
|
if (!r) continue;
|
|
2218
|
-
let
|
|
2397
|
+
let a = tn.join(i, {
|
|
2219
2398
|
element: e,
|
|
2220
2399
|
motion: r,
|
|
2221
2400
|
role: "passive"
|
|
2222
2401
|
});
|
|
2223
|
-
|
|
2402
|
+
a && p.push(a);
|
|
2224
2403
|
}
|
|
2225
2404
|
return () => p.forEach((e) => e());
|
|
2226
|
-
},
|
|
2227
|
-
let n = [], { decorator:
|
|
2228
|
-
let i = 0, a =
|
|
2405
|
+
}, g = (e, t) => {
|
|
2406
|
+
let n = [], { decorator: r, bars: i } = o(), a = B(c), s = (e, t, r) => {
|
|
2407
|
+
let i = 0, a = ln({
|
|
2229
2408
|
element: e,
|
|
2230
2409
|
expectedName: t,
|
|
2231
2410
|
motion: r,
|
|
@@ -2237,107 +2416,154 @@ function Qt(e) {
|
|
|
2237
2416
|
onTerminal: $
|
|
2238
2417
|
});
|
|
2239
2418
|
a.attach(), n.push(a.detach);
|
|
2240
|
-
}, l =
|
|
2241
|
-
if (u) for (let e of
|
|
2242
|
-
if (
|
|
2243
|
-
let e =
|
|
2244
|
-
n &&
|
|
2419
|
+
}, l = q("screen", c, t), u = W(a, t);
|
|
2420
|
+
if (u) for (let e of i ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || s(e, l, u);
|
|
2421
|
+
if (r && a.decoratorName) {
|
|
2422
|
+
let e = V.get(a.decoratorName), n = e ? W(e, t) : null;
|
|
2423
|
+
n && s(r, q("decorator", a.decoratorName, t), n);
|
|
2245
2424
|
}
|
|
2246
|
-
for (let n of
|
|
2247
|
-
let e = n.getAttribute(
|
|
2248
|
-
i &&
|
|
2425
|
+
for (let n of on(e, t)) {
|
|
2426
|
+
let e = n.getAttribute(rn), r = H.get(e), i = r ? W(r, t) : null;
|
|
2427
|
+
i && s(n, q("part", e, t), i);
|
|
2249
2428
|
}
|
|
2250
2429
|
return n;
|
|
2251
2430
|
};
|
|
2252
|
-
if (!
|
|
2253
|
-
if (
|
|
2254
|
-
let { scope: e, decorator: t, bars: n } =
|
|
2431
|
+
if (!d) {
|
|
2432
|
+
if (u === "COMPLETED") {
|
|
2433
|
+
let { scope: e, decorator: t, bars: n } = o();
|
|
2255
2434
|
if (e) {
|
|
2256
|
-
|
|
2257
|
-
for (let t of
|
|
2435
|
+
Z(e);
|
|
2436
|
+
for (let t of an(e)) Z(t);
|
|
2258
2437
|
}
|
|
2259
|
-
t &&
|
|
2260
|
-
for (let e of n ?? []) e &&
|
|
2438
|
+
t && Z(t);
|
|
2439
|
+
for (let e of n ?? []) e && Z(e);
|
|
2261
2440
|
return $;
|
|
2262
2441
|
}
|
|
2263
|
-
if (
|
|
2264
|
-
let e = `${
|
|
2442
|
+
if (u === "REPLACING" && l !== c && e.setReplaceTransitionStatus("PENDING"), p && f) {
|
|
2443
|
+
let e = `${u}-false`, t = h(e, "passive");
|
|
2265
2444
|
if (t) return t;
|
|
2266
|
-
let { scope: n } =
|
|
2445
|
+
let { scope: n } = o();
|
|
2267
2446
|
if (n) {
|
|
2268
|
-
let t =
|
|
2269
|
-
if (
|
|
2270
|
-
let
|
|
2447
|
+
let t = B(c), r = [];
|
|
2448
|
+
if (J(t, e)) {
|
|
2449
|
+
let i = W(t, e), a = 0, o = ln({
|
|
2271
2450
|
element: n,
|
|
2272
|
-
expectedName:
|
|
2273
|
-
motion:
|
|
2451
|
+
expectedName: q("screen", c, e),
|
|
2452
|
+
motion: i,
|
|
2274
2453
|
isLive: () => n.isConnected && n.getAttribute("data-flemo-skip-animation") !== "true",
|
|
2275
|
-
budgetUsed: () =>
|
|
2454
|
+
budgetUsed: () => a,
|
|
2276
2455
|
spendBudget: () => {
|
|
2277
|
-
|
|
2456
|
+
a += 1;
|
|
2278
2457
|
},
|
|
2279
2458
|
onTerminal: $
|
|
2280
2459
|
});
|
|
2281
|
-
|
|
2460
|
+
o.attach(), r.push(o.detach);
|
|
2282
2461
|
}
|
|
2283
|
-
if (r.push(...
|
|
2462
|
+
if (r.push(...g(n, e)), r.length > 0) return () => r.forEach((e) => e());
|
|
2284
2463
|
}
|
|
2285
2464
|
}
|
|
2286
2465
|
return $;
|
|
2287
2466
|
}
|
|
2288
|
-
if (
|
|
2467
|
+
if (u === "COMPLETED") {
|
|
2289
2468
|
e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
2290
|
-
let { scope: t, decorator: n, bars:
|
|
2469
|
+
let { scope: t, decorator: n, bars: r } = o();
|
|
2291
2470
|
if (t) {
|
|
2292
|
-
|
|
2293
|
-
for (let e of
|
|
2471
|
+
Z(t), t.removeAttribute(nn);
|
|
2472
|
+
for (let e of an(t)) Z(e);
|
|
2294
2473
|
}
|
|
2295
|
-
n && (
|
|
2296
|
-
for (let e of
|
|
2474
|
+
n && (Z(n), n.removeAttribute(nn));
|
|
2475
|
+
for (let e of r ?? []) e && (Z(e), e.style.removeProperty("will-change"));
|
|
2297
2476
|
return $;
|
|
2298
2477
|
}
|
|
2299
|
-
if (
|
|
2300
|
-
let { scope:
|
|
2301
|
-
if (!
|
|
2302
|
-
let
|
|
2478
|
+
if (u === "IDLE") return $;
|
|
2479
|
+
let { scope: _ } = o();
|
|
2480
|
+
if (!_) return $;
|
|
2481
|
+
let v = e.getTransitionTaskId(), y = () => {
|
|
2303
2482
|
let n = e.getTransitionTaskId();
|
|
2304
|
-
n && s.resolveTask(n),
|
|
2305
|
-
},
|
|
2306
|
-
if (!(!
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2483
|
+
n && s.resolveTask(n), v && t.delete(v);
|
|
2484
|
+
}, b = B(c), x = `${u}-true`, S = _.getAttribute(nn) === "true";
|
|
2485
|
+
if (!(!S && J(b, x))) {
|
|
2486
|
+
if (!S) {
|
|
2487
|
+
let e = `${u}-false`;
|
|
2488
|
+
if (J(b, e)) {
|
|
2489
|
+
if (!f) return v && s.markGateHeld(v), $;
|
|
2490
|
+
v && s.anchorGate(v);
|
|
2491
|
+
let t = W(b, e), n = (t.delay + t.duration) * 1e3 + 50, r = setTimeout(y, n);
|
|
2492
|
+
return () => clearTimeout(r);
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
return queueMicrotask(y), $;
|
|
2496
|
+
}
|
|
2497
|
+
v && (f ? s.anchorGate(v) : s.markGateHeld(v));
|
|
2498
|
+
let C = W(b, x), w = !S && !!C, T = q("screen", c, x), E, D = () => {
|
|
2499
|
+
E !== void 0 && (clearTimeout(E), E = void 0);
|
|
2500
|
+
}, O = 0, ee, te = () => {
|
|
2501
|
+
if (O <= 0) {
|
|
2502
|
+
y();
|
|
2503
|
+
return;
|
|
2504
|
+
}
|
|
2505
|
+
ee = setTimeout(y, O);
|
|
2506
|
+
}, k = $, A = $, j = (e) => {
|
|
2507
|
+
e.target === _ && e.animationName === T && (_.removeEventListener("animationend", j), D(), k(), te());
|
|
2312
2508
|
};
|
|
2313
|
-
|
|
2314
|
-
let
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2509
|
+
_.addEventListener("animationend", j);
|
|
2510
|
+
let M = w && f ? h(x, "active", y) : null, N = (C.delay + C.duration) * 1e3, ne = N + 1500, re = v ? setTimeout(() => void s.resolveTask(v), ne) : void 0, ie = `${u}-false`, P = J(b, ie) ? W(b, ie) : null, ae = [];
|
|
2511
|
+
for (let e of Array.from(_.ownerDocument.querySelectorAll(`[${rn}][data-flemo-status="${u}"]`))) {
|
|
2512
|
+
let t = H.get(e.getAttribute(rn)), n = `${u}-${e.getAttribute("data-flemo-active")}`, r = t && J(t, n) ? W(t, n) : null;
|
|
2513
|
+
r && ae.push({
|
|
2514
|
+
element: e,
|
|
2515
|
+
motion: r
|
|
2516
|
+
});
|
|
2517
|
+
}
|
|
2518
|
+
let oe = P ? (P.delay + P.duration) * 1e3 : 0;
|
|
2519
|
+
for (let { motion: e } of ae) oe = Math.max(oe, (e.delay + e.duration) * 1e3);
|
|
2520
|
+
O = Math.max(0, Math.min(1e3, oe - N));
|
|
2521
|
+
let se = N + 250, F = () => v !== null && e.getTransitionTaskId() === v && _.isConnected && _.getAttribute("data-flemo-skip-animation") !== "true" && J(b, x), ce = ln({
|
|
2522
|
+
element: _,
|
|
2523
|
+
expectedName: T,
|
|
2524
|
+
motion: C,
|
|
2525
|
+
isLive: F,
|
|
2526
|
+
budgetUsed: () => t.get(v) ?? 0,
|
|
2320
2527
|
spendBudget: () => {
|
|
2321
|
-
t.set(
|
|
2528
|
+
A(), t.set(v, (t.get(v) ?? 0) + 1);
|
|
2322
2529
|
},
|
|
2323
|
-
onTerminal:
|
|
2530
|
+
onTerminal: y
|
|
2324
2531
|
});
|
|
2325
|
-
|
|
2326
|
-
let
|
|
2327
|
-
|
|
2328
|
-
},
|
|
2329
|
-
if (
|
|
2330
|
-
|
|
2532
|
+
k = ce.detach;
|
|
2533
|
+
let le = !1, ue = () => {
|
|
2534
|
+
D(), E = setTimeout(de, se);
|
|
2535
|
+
}, de = () => {
|
|
2536
|
+
if (D(), F() && !le) {
|
|
2537
|
+
le = !0, A(), ce.fullRestart(), ue();
|
|
2331
2538
|
return;
|
|
2332
2539
|
}
|
|
2333
|
-
|
|
2334
|
-
},
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2540
|
+
y();
|
|
2541
|
+
}, I = !M && f, L = I ? g(_, x) : [];
|
|
2542
|
+
I && (ce.attach(), v && ue());
|
|
2543
|
+
let R, fe = () => {
|
|
2544
|
+
R !== void 0 && (clearTimeout(R), R = void 0);
|
|
2545
|
+
};
|
|
2546
|
+
if (A = fe, I && v) {
|
|
2547
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = Ft(C, _, e), n = P ? Ft(P, _, e) : 0, r = 0;
|
|
2548
|
+
for (let { element: t, motion: n } of ae) {
|
|
2549
|
+
let i = Ft(n, t, e);
|
|
2550
|
+
if (i === null) {
|
|
2551
|
+
r = null;
|
|
2552
|
+
break;
|
|
2553
|
+
}
|
|
2554
|
+
r = Math.max(r, i);
|
|
2555
|
+
}
|
|
2556
|
+
let i = t !== null && n !== null && r !== null ? Math.max(t, n, r) : null;
|
|
2557
|
+
i !== null && i + 17 < N + O && (R = setTimeout(() => {
|
|
2558
|
+
R = void 0, F() && (_.removeEventListener("animationend", j), D(), k(), y());
|
|
2559
|
+
}, i + 17));
|
|
2560
|
+
}
|
|
2561
|
+
return () => {
|
|
2562
|
+
if (re !== void 0 && clearTimeout(re), ee !== void 0 && clearTimeout(ee), fe(), _.removeEventListener("animationend", j), I) {
|
|
2563
|
+
ce.detach();
|
|
2564
|
+
for (let e of L) e();
|
|
2339
2565
|
}
|
|
2340
|
-
|
|
2566
|
+
D(), M?.(), v && e.getTransitionTaskId() !== v && t.delete(v);
|
|
2341
2567
|
};
|
|
2342
2568
|
},
|
|
2343
2569
|
activeResumeEntryCount: () => t.size
|
|
@@ -2345,20 +2571,20 @@ function Qt(e) {
|
|
|
2345
2571
|
}
|
|
2346
2572
|
//#endregion
|
|
2347
2573
|
//#region src/utils/findScrollable.ts
|
|
2348
|
-
function
|
|
2349
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
2574
|
+
function dn(e, t) {
|
|
2575
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = fn(e);
|
|
2350
2576
|
if (!o) return {
|
|
2351
2577
|
element: null,
|
|
2352
2578
|
hasMarker: !1
|
|
2353
2579
|
};
|
|
2354
2580
|
let s = o.closest?.(r);
|
|
2355
|
-
if (s instanceof HTMLElement &&
|
|
2581
|
+
if (s instanceof HTMLElement && pn(s, n) && (!a || mn(s, n))) return {
|
|
2356
2582
|
element: s,
|
|
2357
2583
|
hasMarker: !0
|
|
2358
2584
|
};
|
|
2359
2585
|
let c = o, l = 0;
|
|
2360
2586
|
for (; c && l < i;) {
|
|
2361
|
-
if (
|
|
2587
|
+
if (pn(c, n) && (!a || mn(c, n))) return {
|
|
2362
2588
|
element: c,
|
|
2363
2589
|
hasMarker: !1
|
|
2364
2590
|
};
|
|
@@ -2369,7 +2595,7 @@ function $t(e, t) {
|
|
|
2369
2595
|
hasMarker: !1
|
|
2370
2596
|
};
|
|
2371
2597
|
}
|
|
2372
|
-
function
|
|
2598
|
+
function fn(e) {
|
|
2373
2599
|
if (!e) return null;
|
|
2374
2600
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
2375
2601
|
if (n && n.length) {
|
|
@@ -2377,18 +2603,18 @@ function en(e) {
|
|
|
2377
2603
|
}
|
|
2378
2604
|
return e instanceof HTMLElement ? e : null;
|
|
2379
2605
|
}
|
|
2380
|
-
function
|
|
2606
|
+
function pn(e, t) {
|
|
2381
2607
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
2382
2608
|
}
|
|
2383
|
-
function
|
|
2384
|
-
if (!
|
|
2609
|
+
function mn(e, t) {
|
|
2610
|
+
if (!pn(e, t) || typeof window > "u") return !1;
|
|
2385
2611
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
2386
2612
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
2387
2613
|
}
|
|
2388
2614
|
//#endregion
|
|
2389
2615
|
//#region src/core/engine/createSwipeController.ts
|
|
2390
|
-
var
|
|
2391
|
-
function
|
|
2616
|
+
var hn = "data-flemo-skip-animation";
|
|
2617
|
+
function gn(e) {
|
|
2392
2618
|
let t = null, n = null, r = {
|
|
2393
2619
|
current: [],
|
|
2394
2620
|
prev: []
|
|
@@ -2434,9 +2660,9 @@ function an(e) {
|
|
|
2434
2660
|
y: e.clientY
|
|
2435
2661
|
}, u = t;
|
|
2436
2662
|
}, v = (n, i, a) => {
|
|
2437
|
-
let o =
|
|
2438
|
-
if (n === e.getElements().scope) for (let e of r.current)
|
|
2439
|
-
else if (n === t) for (let e of r.prev)
|
|
2663
|
+
let o = Q(n, i, a);
|
|
2664
|
+
if (n === e.getElements().scope) for (let e of r.current) Q(e, i, a);
|
|
2665
|
+
else if (n === t) for (let e of r.prev) Q(e, i, a);
|
|
2440
2666
|
return o;
|
|
2441
2667
|
}, y = (t) => {
|
|
2442
2668
|
let n = e.getPartnerBars(), i = [], { sharedTopBar: a, sharedBottomBar: o } = e.getElements();
|
|
@@ -2450,12 +2676,12 @@ function an(e) {
|
|
|
2450
2676
|
current: i,
|
|
2451
2677
|
prev: s
|
|
2452
2678
|
};
|
|
2453
|
-
let c =
|
|
2679
|
+
let c = Ve(e.getTransition()).join(", ");
|
|
2454
2680
|
for (let e of i) e.style.willChange = c;
|
|
2455
2681
|
for (let e of s) e.style.willChange = c;
|
|
2456
2682
|
}, b = () => {
|
|
2457
|
-
for (let e of r.current)
|
|
2458
|
-
for (let e of r.prev)
|
|
2683
|
+
for (let e of r.current) Z(e), e.style.removeProperty("will-change");
|
|
2684
|
+
for (let e of r.prev) Z(e), e.style.removeProperty("will-change");
|
|
2459
2685
|
r = {
|
|
2460
2686
|
current: [],
|
|
2461
2687
|
prev: []
|
|
@@ -2468,10 +2694,10 @@ function an(e) {
|
|
|
2468
2694
|
};
|
|
2469
2695
|
}, S = (e, t, n) => {
|
|
2470
2696
|
let r = (r, i) => {
|
|
2471
|
-
let a =
|
|
2697
|
+
let a = H.get(r.getAttribute("data-flemo-part-name"));
|
|
2472
2698
|
if (!a) return;
|
|
2473
2699
|
let o = {
|
|
2474
|
-
animate:
|
|
2700
|
+
animate: Q,
|
|
2475
2701
|
element: r,
|
|
2476
2702
|
active: i
|
|
2477
2703
|
};
|
|
@@ -2480,7 +2706,7 @@ function an(e) {
|
|
|
2480
2706
|
for (let e of i.current) r(e, !0);
|
|
2481
2707
|
for (let e of i.prev) r(e, !1);
|
|
2482
2708
|
}, C = () => {
|
|
2483
|
-
for (let e of [...i.current, ...i.prev])
|
|
2709
|
+
for (let e of [...i.current, ...i.prev]) Z(e);
|
|
2484
2710
|
i = {
|
|
2485
2711
|
current: [],
|
|
2486
2712
|
prev: []
|
|
@@ -2509,7 +2735,7 @@ function an(e) {
|
|
|
2509
2735
|
prevScreen: t,
|
|
2510
2736
|
onStart: (e) => {
|
|
2511
2737
|
m?.onSwipeStart?.(e, {
|
|
2512
|
-
animate:
|
|
2738
|
+
animate: Q,
|
|
2513
2739
|
currentDecorator: f,
|
|
2514
2740
|
prevDecorator: n
|
|
2515
2741
|
}), S("start", e, 0);
|
|
@@ -2526,7 +2752,7 @@ function an(e) {
|
|
|
2526
2752
|
prevScreen: t,
|
|
2527
2753
|
onProgress: (e, t) => {
|
|
2528
2754
|
c?.onSwipe?.(e, t, {
|
|
2529
|
-
animate:
|
|
2755
|
+
animate: Q,
|
|
2530
2756
|
currentDecorator: o,
|
|
2531
2757
|
prevDecorator: n
|
|
2532
2758
|
}), S("swipe", e, t);
|
|
@@ -2545,15 +2771,15 @@ function an(e) {
|
|
|
2545
2771
|
prevScreen: t,
|
|
2546
2772
|
onStart: (e) => {
|
|
2547
2773
|
u?.onSwipeEnd?.(e, {
|
|
2548
|
-
animate:
|
|
2774
|
+
animate: Q,
|
|
2549
2775
|
currentDecorator: l,
|
|
2550
2776
|
prevDecorator: n
|
|
2551
2777
|
}), S("end", e, 0);
|
|
2552
2778
|
}
|
|
2553
2779
|
})) {
|
|
2554
|
-
c?.setAttribute(
|
|
2780
|
+
c?.setAttribute(hn, "true"), l?.setAttribute(hn, "true");
|
|
2555
2781
|
for (let e of r.current) e.style.removeProperty("will-change");
|
|
2556
|
-
for (let e of r.prev)
|
|
2782
|
+
for (let e of r.prev) Z(e), e.style.removeProperty("will-change");
|
|
2557
2783
|
r = {
|
|
2558
2784
|
current: [],
|
|
2559
2785
|
prev: []
|
|
@@ -2561,14 +2787,14 @@ function an(e) {
|
|
|
2561
2787
|
current: [],
|
|
2562
2788
|
prev: []
|
|
2563
2789
|
}, e.back();
|
|
2564
|
-
} else c &&
|
|
2790
|
+
} else c && Z(c), t && Z(t), l && Z(l), n && Z(n), b(), C(), e.setDragStatus("IDLE");
|
|
2565
2791
|
};
|
|
2566
2792
|
return {
|
|
2567
2793
|
pointerDown: (t) => {
|
|
2568
|
-
e.isReadyForDrag() && (f =
|
|
2794
|
+
e.isReadyForDrag() && (f = dn(t.target, {
|
|
2569
2795
|
direction: "x",
|
|
2570
2796
|
verifyByScroll: !0
|
|
2571
|
-
}), p =
|
|
2797
|
+
}), p = dn(t.target, {
|
|
2572
2798
|
direction: "y",
|
|
2573
2799
|
verifyByScroll: !0
|
|
2574
2800
|
}), m = t.clientX, h = t.clientY, (!f.element && !p.element || f.element || p.element) && (a = !0));
|
|
@@ -2597,7 +2823,7 @@ function an(e) {
|
|
|
2597
2823
|
}
|
|
2598
2824
|
//#endregion
|
|
2599
2825
|
//#region src/screen/computeBarRiding.ts
|
|
2600
|
-
function
|
|
2826
|
+
function _n(e) {
|
|
2601
2827
|
return !(e.status === "PUSHING" || e.status === "POPPING" || e.status === "REPLACING") || !e.isTopOrTopPrev ? {
|
|
2602
2828
|
app: !1,
|
|
2603
2829
|
nav: !1
|
|
@@ -2608,24 +2834,24 @@ function on(e) {
|
|
|
2608
2834
|
}
|
|
2609
2835
|
//#endregion
|
|
2610
2836
|
//#region src/screen/animStartAnchor.ts
|
|
2611
|
-
function
|
|
2837
|
+
function vn(e) {
|
|
2612
2838
|
return !(e.status === "PUSHING" || e.status === "POPPING" || e.status === "REPLACING") || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
2613
2839
|
}
|
|
2614
|
-
var
|
|
2615
|
-
function
|
|
2616
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
2840
|
+
var yn = 300, bn = 20;
|
|
2841
|
+
function xn(e) {
|
|
2842
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, bn);
|
|
2617
2843
|
}
|
|
2618
|
-
function
|
|
2619
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
2844
|
+
function Sn(e) {
|
|
2845
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of xn(e)) t.decode().catch(() => {});
|
|
2620
2846
|
}
|
|
2621
|
-
function
|
|
2847
|
+
function Cn(e, t = {}) {
|
|
2622
2848
|
let n = !1, r = 0, i = [], a = () => {
|
|
2623
2849
|
let r = t.scope;
|
|
2624
2850
|
if (t.decodeWait === !1 || !r || typeof r.querySelectorAll != "function") {
|
|
2625
2851
|
e();
|
|
2626
2852
|
return;
|
|
2627
2853
|
}
|
|
2628
|
-
let i =
|
|
2854
|
+
let i = xn(r);
|
|
2629
2855
|
if (i.length === 0) {
|
|
2630
2856
|
e();
|
|
2631
2857
|
return;
|
|
@@ -2649,13 +2875,13 @@ function fn(e, t = {}) {
|
|
|
2649
2875
|
n = !0, cancelAnimationFrame(s), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e));
|
|
2650
2876
|
};
|
|
2651
2877
|
}
|
|
2652
|
-
function
|
|
2653
|
-
let n =
|
|
2878
|
+
function wn(e, t = {}) {
|
|
2879
|
+
let n = Cn(e, t), r = setTimeout(e, 300);
|
|
2654
2880
|
return () => {
|
|
2655
2881
|
n(), clearTimeout(r);
|
|
2656
2882
|
};
|
|
2657
2883
|
}
|
|
2658
|
-
function
|
|
2884
|
+
function Tn() {
|
|
2659
2885
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
2660
2886
|
clearTimeout(n.backstop), e.delete(t);
|
|
2661
2887
|
let r = [...n.members];
|
|
@@ -2674,7 +2900,7 @@ function mn() {
|
|
|
2674
2900
|
let s = o, c = {
|
|
2675
2901
|
release: i,
|
|
2676
2902
|
ready: !1,
|
|
2677
|
-
cancelReadiness:
|
|
2903
|
+
cancelReadiness: Cn(() => {
|
|
2678
2904
|
c.ready = !0, n(s) && t(r, s);
|
|
2679
2905
|
}, a)
|
|
2680
2906
|
};
|
|
@@ -2691,7 +2917,7 @@ function mn() {
|
|
|
2691
2917
|
}
|
|
2692
2918
|
//#endregion
|
|
2693
2919
|
//#region src/screen/observeBarHeight.ts
|
|
2694
|
-
function
|
|
2920
|
+
function En(e, t) {
|
|
2695
2921
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
2696
2922
|
let n = new ResizeObserver(([e]) => {
|
|
2697
2923
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -2702,14 +2928,14 @@ function hn(e, t) {
|
|
|
2702
2928
|
}
|
|
2703
2929
|
//#endregion
|
|
2704
2930
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
2705
|
-
var
|
|
2706
|
-
function
|
|
2931
|
+
var Dn = 0;
|
|
2932
|
+
function On(e) {
|
|
2707
2933
|
let t = 0, n = () => {
|
|
2708
2934
|
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
2709
2935
|
let t = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
2710
2936
|
t = t < 0 ? 0 : t;
|
|
2711
|
-
let n = t -
|
|
2712
|
-
n = n < 0 ? 0 : n,
|
|
2937
|
+
let n = t - Dn;
|
|
2938
|
+
n = n < 0 ? 0 : n, Dn ||= t, e(t, n);
|
|
2713
2939
|
});
|
|
2714
2940
|
};
|
|
2715
2941
|
return window.visualViewport?.addEventListener("resize", n), window.visualViewport?.addEventListener("scroll", n), () => {
|
|
@@ -2718,7 +2944,7 @@ function _n(e) {
|
|
|
2718
2944
|
}
|
|
2719
2945
|
//#endregion
|
|
2720
2946
|
//#region src/utils/isOpaqueColor.ts
|
|
2721
|
-
function
|
|
2947
|
+
function kn(e) {
|
|
2722
2948
|
let t = e.trim().toLowerCase();
|
|
2723
2949
|
if (t === "transparent" || t === "") return !1;
|
|
2724
2950
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -2729,7 +2955,7 @@ function vn(e) {
|
|
|
2729
2955
|
}
|
|
2730
2956
|
//#endregion
|
|
2731
2957
|
//#region src/utils/buildRoutePath.ts
|
|
2732
|
-
function
|
|
2958
|
+
function An(e, n) {
|
|
2733
2959
|
let i = n ?? {}, a = t(e)(Object.fromEntries(Object.entries(i).map(([e, t]) => [e, String(t)]))), o = (typeof e == "string" ? r(e) : e).tokens.filter((e) => e.type === "param").map((e) => e.name), s = Object.fromEntries(Object.entries(i).filter(([e]) => !o.includes(e))), c = new URLSearchParams(s).toString();
|
|
2734
2960
|
return {
|
|
2735
2961
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -2737,4 +2963,4 @@ function yn(e, n) {
|
|
|
2737
2963
|
};
|
|
2738
2964
|
}
|
|
2739
2965
|
//#endregion
|
|
2740
|
-
export {
|
|
2966
|
+
export { yn as ANIM_HOLD_RELEASE_BACKSTOP_MS, nn as SKIP_ANIMATION_ATTR, s as TaskManger, vn as animHoldKey, Q as animateInline, q as animationName, ie as appendParamsQuery, nt as applyTransitionStyles, An as buildRoutePath, mn as canProgrammaticallyScroll, Z as clearInlineAnimation, Ve as collectAnimatedProperties, Xe as compileTransitionStyles, _n as computeBarRiding, I as computeScreenFreeze, b as consumeSelfInducedPop, Tn as createAnimHoldCoordinator, g as createBrowserHistoryDriver, ve as createDecorator, c as createHistoryStore, x as createHistorySync, k as createMemoryHistoryDriver, A as createNavigateStore, ne as createNavigationController, Se as createPartTransition, ye as createRawDecorator, Ce as createRawPartTransition, R as createRawTransition, ue as createRouterScope, de as createScreenSelector, F as createScreenStore, _ as createSelfPopGuard, P as createStepController, gn as createSwipeController, L as createTransition, un as createTransitionEngine, oe as createTransitionStore, pe as cupertino, V as decoratorMap, Sn as eagerlyDecodeImages, He as easingToCss, ee as ensureScopeHistorySync, p as ensureWindowHistoryState, lt as enteringInitialStyle, dn as findScrollable, l as getMatchedPathPattern, u as getParams, kn as isOpaqueColor, f as isServer, he as layout, y as markSelfInducedPop, se as matchesPathname, ge as material, _e as none, En as observeBarHeight, On as observeViewportScrollHeight, pn as overflowsAxis, xe as overlay, H as partTransitionMap, re as readStepParams, ct as registerTransitionDefinitions, te as releaseScopeHistorySync, B as resolveTransition, wn as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, ae as subscribeStepParamsRestore, G as targetToDecls, z as transitionMap, J as variantHasAnimation };
|