@flemo/core 1.26.0 → 1.27.1
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
|
@@ -518,12 +518,12 @@ function k(e) {
|
|
|
518
518
|
ownsPathname: e.ownsPathname
|
|
519
519
|
}));
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function A(e) {
|
|
522
522
|
e.persistent || (O.get(e)?.(), O.delete(e));
|
|
523
523
|
}
|
|
524
524
|
//#endregion
|
|
525
525
|
//#region src/history/memoryHistoryDriver.ts
|
|
526
|
-
function
|
|
526
|
+
function j(e) {
|
|
527
527
|
let t = [{
|
|
528
528
|
state: e?.state ?? null,
|
|
529
529
|
url: e?.url ?? "/"
|
|
@@ -565,7 +565,7 @@ function A(e) {
|
|
|
565
565
|
}
|
|
566
566
|
//#endregion
|
|
567
567
|
//#region src/navigate/store.ts
|
|
568
|
-
function
|
|
568
|
+
function ee() {
|
|
569
569
|
return e((e) => ({
|
|
570
570
|
status: "IDLE",
|
|
571
571
|
transitionTaskId: null,
|
|
@@ -575,11 +575,11 @@ function te() {
|
|
|
575
575
|
}
|
|
576
576
|
//#endregion
|
|
577
577
|
//#region src/navigate/createNavigationController.ts
|
|
578
|
-
var
|
|
578
|
+
var M = (e, t, n) => {
|
|
579
579
|
let { regexp: r } = i(e);
|
|
580
580
|
for (let e = t - 1; e >= 0; e--) if (r.test(n[e].pathname)) return t - e;
|
|
581
581
|
return -1;
|
|
582
|
-
},
|
|
582
|
+
}, te = (e, t) => typeof e == "number" && Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t, N = async (e, t, n, r) => {
|
|
583
583
|
let i, a = new Promise((t) => {
|
|
584
584
|
i = e.subscribe(() => t(!0));
|
|
585
585
|
}), o = new Promise((e) => setTimeout(() => e(!1), 200));
|
|
@@ -587,7 +587,7 @@ var j = (e, t, n) => {
|
|
|
587
587
|
let s = await Promise.race([a, o]);
|
|
588
588
|
i(), s && r();
|
|
589
589
|
};
|
|
590
|
-
function
|
|
590
|
+
function ne(e) {
|
|
591
591
|
let { stores: t, buildPathname: n, driver: r = g(), markSelfInduced: i = y } = e, o = () => t.history.getState().bumpTruncationEpoch(), c = () => {
|
|
592
592
|
let e = r.readState();
|
|
593
593
|
if (!e?.id) return null;
|
|
@@ -613,10 +613,10 @@ function re(e) {
|
|
|
613
613
|
}
|
|
614
614
|
let s = c(), { index: d, histories: f, addHistory: g, popHistories: _ } = t.history.getState(), v = (() => {
|
|
615
615
|
if (u?.until != null) {
|
|
616
|
-
let e =
|
|
616
|
+
let e = M(u.until, d, f);
|
|
617
617
|
return e < 0 ? 0 : e;
|
|
618
618
|
}
|
|
619
|
-
return Math.min(
|
|
619
|
+
return Math.min(te(u?.skip, 0), Math.max(0, d));
|
|
620
620
|
})(), { setStatus: y, setTransitionTaskId: b } = t.navigate.getState();
|
|
621
621
|
y("PUSHING"), b(h);
|
|
622
622
|
let { pathname: x, toPathname: S } = n(e, l ?? {}), C = {
|
|
@@ -643,7 +643,7 @@ function re(e) {
|
|
|
643
643
|
return g({
|
|
644
644
|
...C,
|
|
645
645
|
frameIndex: T + 1
|
|
646
|
-
}), await
|
|
646
|
+
}), await N(r, i, v, () => {
|
|
647
647
|
o(), r.pushState({
|
|
648
648
|
id: h,
|
|
649
649
|
index: T + 1,
|
|
@@ -673,10 +673,10 @@ function re(e) {
|
|
|
673
673
|
}
|
|
674
674
|
let s = c(), { index: d, histories: f, addHistory: g, replaceHistory: _, popHistories: v } = t.history.getState(), y = (() => {
|
|
675
675
|
if (u?.until != null) {
|
|
676
|
-
let e =
|
|
676
|
+
let e = M(u.until, d, f);
|
|
677
677
|
return e < 0 ? 0 : e + 1;
|
|
678
678
|
}
|
|
679
|
-
return Math.min(
|
|
679
|
+
return Math.min(te(u?.skip, 0) + 1, d + 1);
|
|
680
680
|
})();
|
|
681
681
|
if (y <= 0) {
|
|
682
682
|
a.abort();
|
|
@@ -708,7 +708,7 @@ function re(e) {
|
|
|
708
708
|
return v(y - 1), g({
|
|
709
709
|
...w,
|
|
710
710
|
frameIndex: E
|
|
711
|
-
}), y <= d ? await
|
|
711
|
+
}), y <= d ? await N(r, i, y, () => {
|
|
712
712
|
o(), r.pushState({
|
|
713
713
|
id: h,
|
|
714
714
|
index: E,
|
|
@@ -717,7 +717,7 @@ function re(e) {
|
|
|
717
717
|
transitionName: p,
|
|
718
718
|
layoutId: m
|
|
719
719
|
}, S);
|
|
720
|
-
}) : await
|
|
720
|
+
}) : await N(r, i, d, () => {
|
|
721
721
|
o(), r.replaceState({
|
|
722
722
|
id: h,
|
|
723
723
|
index: E,
|
|
@@ -773,10 +773,10 @@ function re(e) {
|
|
|
773
773
|
pop: async (e) => {
|
|
774
774
|
await d((t, n) => {
|
|
775
775
|
if (e?.until != null) {
|
|
776
|
-
let r =
|
|
776
|
+
let r = M(e.until, t, n);
|
|
777
777
|
return r < 0 ? 0 : r;
|
|
778
778
|
}
|
|
779
|
-
let r =
|
|
779
|
+
let r = te(e?.skip, 1);
|
|
780
780
|
return r <= 0 ? 0 : Math.min(r, t);
|
|
781
781
|
}, e?.transitionName);
|
|
782
782
|
}
|
|
@@ -784,14 +784,14 @@ function re(e) {
|
|
|
784
784
|
}
|
|
785
785
|
//#endregion
|
|
786
786
|
//#region src/navigate/createStepController.ts
|
|
787
|
-
var
|
|
787
|
+
var re = (e) => {
|
|
788
788
|
let t = e;
|
|
789
789
|
return t?.step ? t.params ?? {} : null;
|
|
790
|
-
},
|
|
790
|
+
}, ie = (e, t) => {
|
|
791
791
|
let n = new URLSearchParams(Object.fromEntries(Object.entries(t).map(([e, t]) => [e, String(t)]))).toString();
|
|
792
792
|
return n ? `${e}?${n}` : e;
|
|
793
793
|
};
|
|
794
|
-
function
|
|
794
|
+
function ae(e) {
|
|
795
795
|
let { stores: t, driver: n, markSelfInduced: r, buildStepPathname: i, applyParams: o } = e;
|
|
796
796
|
return {
|
|
797
797
|
pushStep: async (e) => {
|
|
@@ -849,7 +849,7 @@ function oe(e) {
|
|
|
849
849
|
}
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function oe(e, t) {
|
|
853
853
|
return e.subscribe((e) => {
|
|
854
854
|
let n = e.state;
|
|
855
855
|
n?.step && s.addTask(async () => {
|
|
@@ -859,7 +859,7 @@ function se(e, t) {
|
|
|
859
859
|
}
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/transition/store.ts
|
|
862
|
-
function
|
|
862
|
+
function se(t = "cupertino") {
|
|
863
863
|
return e((e) => ({
|
|
864
864
|
defaultTransitionName: t,
|
|
865
865
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -867,18 +867,18 @@ function ce(t = "cupertino") {
|
|
|
867
867
|
}
|
|
868
868
|
//#endregion
|
|
869
869
|
//#region src/utils/matchesPathname.ts
|
|
870
|
-
function
|
|
870
|
+
function ce(e, t) {
|
|
871
871
|
return i(e).regexp.test(t);
|
|
872
872
|
}
|
|
873
873
|
//#endregion
|
|
874
874
|
//#region src/screen/store.ts
|
|
875
|
-
var
|
|
875
|
+
var le = (e, t) => {
|
|
876
876
|
if (e) return e.height !== void 0 || e.id !== t?.id ? e : {
|
|
877
877
|
...e,
|
|
878
878
|
height: t?.height
|
|
879
879
|
};
|
|
880
880
|
};
|
|
881
|
-
function
|
|
881
|
+
function ue() {
|
|
882
882
|
return e((e) => ({
|
|
883
883
|
dragStatus: "IDLE",
|
|
884
884
|
replaceTransitionStatus: "IDLE",
|
|
@@ -892,8 +892,8 @@ function de() {
|
|
|
892
892
|
topBar: n.topBar ? {} : void 0,
|
|
893
893
|
bottomBar: n.bottomBar ? {} : void 0
|
|
894
894
|
}, a = e.sharedBars[t], o = e.sharedBarMetadata[t], s = {
|
|
895
|
-
topBar:
|
|
896
|
-
bottomBar:
|
|
895
|
+
topBar: le(i.topBar, o?.topBar),
|
|
896
|
+
bottomBar: le(i.bottomBar, o?.bottomBar)
|
|
897
897
|
}, c = a?.topBar === n.topBar && a?.bottomBar === n.bottomBar, l = o?.topBar?.id === s.topBar?.id && o?.topBar?.height === s.topBar?.height && o?.bottomBar?.id === s.bottomBar?.id && o?.bottomBar?.height === s.bottomBar?.height && !!o?.topBar == !!s.topBar && !!o?.bottomBar == !!s.bottomBar;
|
|
898
898
|
return c && l ? e : {
|
|
899
899
|
sharedBars: {
|
|
@@ -942,14 +942,14 @@ function de() {
|
|
|
942
942
|
}
|
|
943
943
|
//#endregion
|
|
944
944
|
//#region src/core/createRouterScope.ts
|
|
945
|
-
var
|
|
945
|
+
var de = {
|
|
946
946
|
mark: () => {},
|
|
947
947
|
consume: () => !1
|
|
948
|
-
},
|
|
949
|
-
function
|
|
948
|
+
}, fe = /* @__PURE__ */ new Map();
|
|
949
|
+
function pe(e) {
|
|
950
950
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, s = f() ? void 0 : e.persistKey;
|
|
951
951
|
if (s) {
|
|
952
|
-
let e =
|
|
952
|
+
let e = fe.get(s);
|
|
953
953
|
if (e) {
|
|
954
954
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
955
955
|
let t = e.history.getState();
|
|
@@ -969,7 +969,7 @@ function me(e) {
|
|
|
969
969
|
index: 0,
|
|
970
970
|
histories: [p]
|
|
971
971
|
}), e.hostedScope;
|
|
972
|
-
let m = a ?
|
|
972
|
+
let m = a ? j({
|
|
973
973
|
state: {
|
|
974
974
|
id: p.id,
|
|
975
975
|
index: 0,
|
|
@@ -979,25 +979,25 @@ function me(e) {
|
|
|
979
979
|
layoutId: p.layoutId
|
|
980
980
|
},
|
|
981
981
|
url: p.pathname
|
|
982
|
-
}) : o, h = a ?
|
|
982
|
+
}) : o, h = a ? de : _(), g = {
|
|
983
983
|
history: c([p], 0),
|
|
984
|
-
navigate:
|
|
985
|
-
transition:
|
|
986
|
-
screen:
|
|
984
|
+
navigate: ee(),
|
|
985
|
+
transition: se(i),
|
|
986
|
+
screen: ue(),
|
|
987
987
|
driver: m,
|
|
988
988
|
markSelfInduced: h.mark,
|
|
989
989
|
consume: h.consume,
|
|
990
990
|
routerKey: e.routerKey,
|
|
991
991
|
zoneEntryId: e.zoneEntryId,
|
|
992
|
-
ownsPathname: (e) =>
|
|
992
|
+
ownsPathname: (e) => ce(t, e),
|
|
993
993
|
persistent: !!s,
|
|
994
994
|
life: { alive: !0 }
|
|
995
995
|
};
|
|
996
|
-
return s &&
|
|
996
|
+
return s && fe.set(s, g), g;
|
|
997
997
|
}
|
|
998
998
|
//#endregion
|
|
999
999
|
//#region src/screen/createScreenSelector.ts
|
|
1000
|
-
function
|
|
1000
|
+
function me(e, t) {
|
|
1001
1001
|
return e.map((n, r) => ({
|
|
1002
1002
|
...n,
|
|
1003
1003
|
isActive: r === t,
|
|
@@ -1010,38 +1010,38 @@ function he(e, t) {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
//#endregion
|
|
1012
1012
|
//#region src/core/engine/driverPolicy.ts
|
|
1013
|
-
var
|
|
1013
|
+
var P = "flemo:motion-driver-force", he = !1, ge = () => {
|
|
1014
1014
|
try {
|
|
1015
1015
|
try {
|
|
1016
|
-
typeof localStorage < "u" && localStorage.removeItem(
|
|
1016
|
+
typeof localStorage < "u" && localStorage.removeItem(P);
|
|
1017
1017
|
} catch {}
|
|
1018
1018
|
if (typeof sessionStorage > "u") return null;
|
|
1019
|
-
let e = sessionStorage.getItem(
|
|
1019
|
+
let e = sessionStorage.getItem(P);
|
|
1020
1020
|
if (e === null) return null;
|
|
1021
1021
|
let [t, n] = e.split("@"), r = Number(n);
|
|
1022
|
-
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!
|
|
1022
|
+
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!he && typeof console < "u" && (he = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${P}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(P), null);
|
|
1023
1023
|
} catch {
|
|
1024
1024
|
return null;
|
|
1025
1025
|
}
|
|
1026
|
-
},
|
|
1026
|
+
}, F = () => {
|
|
1027
1027
|
if (typeof navigator > "u") return !1;
|
|
1028
1028
|
let e = navigator.userAgentData?.brands;
|
|
1029
1029
|
if (Array.isArray(e)) return e.some((e) => /chromium/i.test(e?.brand ?? ""));
|
|
1030
1030
|
let t = navigator.userAgent ?? "";
|
|
1031
1031
|
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t);
|
|
1032
|
-
},
|
|
1032
|
+
}, _e = () => {
|
|
1033
1033
|
if (typeof navigator > "u") return !1;
|
|
1034
1034
|
let e = navigator.userAgentData?.brands;
|
|
1035
1035
|
if (Array.isArray(e)) return !1;
|
|
1036
1036
|
let t = navigator.userAgent ?? "";
|
|
1037
1037
|
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t) && (navigator.maxTouchPoints ?? 0) > 0;
|
|
1038
|
-
},
|
|
1038
|
+
}, ve = () => typeof navigator > "u" ? !1 : !F() && navigator.maxTouchPoints === 0 && /Mac/.test(navigator.platform), ye = () => F() && typeof navigator < "u" && navigator.maxTouchPoints === 0, be = ((e = !1) => ({
|
|
1039
1039
|
playerAllowed: () => {
|
|
1040
|
-
let t =
|
|
1040
|
+
let t = ge();
|
|
1041
1041
|
return t ? t === "raf" : e;
|
|
1042
1042
|
},
|
|
1043
|
-
pinnedDriver:
|
|
1044
|
-
}))(!0), xe = 28, Se = 42, Ce = 8, we = 20, Te = 6, Ee = 400, De = 8, Oe = "flemo:lpm", ke = () => !
|
|
1043
|
+
pinnedDriver: ge
|
|
1044
|
+
}))(!0), xe = 28, Se = 42, Ce = 8, we = 20, Te = 6, Ee = 400, De = 8, Oe = "flemo:lpm", ke = () => !F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && typeof requestAnimationFrame == "function", Ae = () => {
|
|
1045
1045
|
try {
|
|
1046
1046
|
return typeof sessionStorage < "u" && sessionStorage.getItem(Oe) === "1";
|
|
1047
1047
|
} catch {
|
|
@@ -1051,18 +1051,18 @@ var N = "flemo:motion-driver-force", ge = !1, _e = () => {
|
|
|
1051
1051
|
try {
|
|
1052
1052
|
typeof sessionStorage < "u" && sessionStorage.setItem(Oe, e ? "1" : "0");
|
|
1053
1053
|
} catch {}
|
|
1054
|
-
}, Me = !1, Ne = !1, Pe = !1, Fe = 12, Ie = 8, Le = [],
|
|
1055
|
-
if (
|
|
1056
|
-
|
|
1054
|
+
}, Me = !1, Ne = !1, Pe = !1, Fe = 12, Ie = 8, Le = [], I = null, Re = !1, ze = !1, Be = !1, Ve = () => {
|
|
1055
|
+
if (Re || !ke()) return;
|
|
1056
|
+
Re = !0;
|
|
1057
1057
|
let e = (t) => {
|
|
1058
|
-
if (
|
|
1058
|
+
if (I !== null && (Le.push(t - I), Le.length > Fe && Le.shift(), Le.length >= Ie)) {
|
|
1059
1059
|
let e = [...Le].sort((e, t) => e - t), t = e.slice(1, e.length - 1), n = t[t.length >> 1];
|
|
1060
|
-
t[t.length - 1] - t[0] <= Ce && (
|
|
1060
|
+
t[t.length - 1] - t[0] <= Ce && (ze = n >= xe && n <= Se, Be = !0);
|
|
1061
1061
|
}
|
|
1062
|
-
|
|
1062
|
+
I = t, requestAnimationFrame(e);
|
|
1063
1063
|
};
|
|
1064
1064
|
requestAnimationFrame(e);
|
|
1065
|
-
}, He = () => Me || Be &&
|
|
1065
|
+
}, He = () => Me || Be && ze, Ue = () => ke(), We = (e = 0) => {
|
|
1066
1066
|
if (Ne || !ke()) return;
|
|
1067
1067
|
Ne = !0;
|
|
1068
1068
|
let t = [], n = null, r = (i) => {
|
|
@@ -1096,8 +1096,8 @@ var Ke = 14, qe = 22, Je = 2, Ye = 1.5, Xe = "flemo:sixty", Ze = () => {
|
|
|
1096
1096
|
try {
|
|
1097
1097
|
typeof sessionStorage < "u" && sessionStorage.setItem(Xe, e);
|
|
1098
1098
|
} catch {}
|
|
1099
|
-
}, $e = Ze(), et = $e === "high", tt = $e !== null && $e !== "high" ? Math.min(Je, Math.max(0, parseInt($e, 10) || 0)) : 0, nt = (e, t) => {
|
|
1100
|
-
if (!(!Number.isFinite(e) || e <= 0)) {
|
|
1099
|
+
}, $e = Ze(), et = $e === "high", tt = $e !== null && $e !== "high" ? Math.min(Je, Math.max(0, parseInt($e, 10) || 0)) : 0, nt = () => typeof navigator > "u" || (navigator.maxTouchPoints ?? 0) === 0, rt = (e, t) => {
|
|
1100
|
+
if (!(!Number.isFinite(e) || e <= 0) && nt()) {
|
|
1101
1101
|
if (e < 12) {
|
|
1102
1102
|
if (t !== void 0 && t > 24) return;
|
|
1103
1103
|
et = !0, tt = 0, Qe("high");
|
|
@@ -1109,75 +1109,75 @@ var Ke = 14, qe = 22, Je = 2, Ye = 1.5, Xe = "flemo:sixty", Ze = () => {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
e < Ke && (tt = 0, et || Qe("0"));
|
|
1111
1111
|
}
|
|
1112
|
-
},
|
|
1112
|
+
}, it = () => !et && tt >= Je, at = () => it() && F() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && typeof window < "u" && (window.devicePixelRatio || 1) >= Ye, L = (e) => {
|
|
1113
1113
|
try {
|
|
1114
1114
|
return typeof sessionStorage < "u" ? sessionStorage.getItem(e) : null;
|
|
1115
1115
|
} catch {
|
|
1116
1116
|
return null;
|
|
1117
1117
|
}
|
|
1118
|
-
},
|
|
1118
|
+
}, ot = () => L("flemo:landing-snap") === "on", st = () => {
|
|
1119
1119
|
let e = L("flemo:imghold");
|
|
1120
1120
|
return e === "on" || e === "off" ? e : null;
|
|
1121
|
-
},
|
|
1121
|
+
}, ct = () => F() && (navigator.maxTouchPoints ?? 0) > 0, lt = () => {
|
|
1122
1122
|
try {
|
|
1123
1123
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:settle-gate") : null;
|
|
1124
|
-
return e === "on" ? !0 : e === "off" ? !1 : Ue() ||
|
|
1124
|
+
return e === "on" ? !0 : e === "off" ? !1 : Ue() || at() || ct() || ve();
|
|
1125
1125
|
} catch {
|
|
1126
1126
|
return !1;
|
|
1127
1127
|
}
|
|
1128
|
-
},
|
|
1128
|
+
}, ut = () => L("flemo:handoff") === "on", dt = () => L("flemo:arrivalhold") !== "off", ft = () => {
|
|
1129
1129
|
let e = L("flemo:deskflip");
|
|
1130
|
-
return e === "on" || e !== "off" &&
|
|
1131
|
-
},
|
|
1130
|
+
return e === "on" || e !== "off" && ve();
|
|
1131
|
+
}, pt = () => {
|
|
1132
1132
|
let e = L("flemo:creep");
|
|
1133
1133
|
return e === "on" || e !== "off" && Ue();
|
|
1134
|
-
},
|
|
1134
|
+
}, mt = () => {
|
|
1135
1135
|
let e = L("flemo:relcommit");
|
|
1136
1136
|
return e === "defer" || e !== "sync" && Ue();
|
|
1137
|
-
},
|
|
1137
|
+
}, ht = () => {
|
|
1138
1138
|
let e = L("flemo:deskhead");
|
|
1139
|
-
return e === "on" || e !== "off" &&
|
|
1140
|
-
},
|
|
1139
|
+
return e === "on" || e !== "off" && ve();
|
|
1140
|
+
}, gt = () => L("flemo:preraster") === "on", _t = () => gt() || ye() || ve() || Ue(), vt = () => {
|
|
1141
1141
|
let e = L("flemo:imgoffload");
|
|
1142
1142
|
return e === "on" || e === "off" ? e : null;
|
|
1143
|
-
}, _t, vt = () => {
|
|
1144
|
-
if (_t !== void 0) return _t;
|
|
1145
|
-
let e = L("flemo:apply");
|
|
1146
|
-
return _t = e === "scrub" ? e : null, _t;
|
|
1147
1143
|
}, yt, bt = () => {
|
|
1148
1144
|
if (yt !== void 0) return yt;
|
|
1149
|
-
let e = L("flemo:
|
|
1150
|
-
return yt = e === "
|
|
1145
|
+
let e = L("flemo:apply");
|
|
1146
|
+
return yt = e === "scrub" ? e : null, yt;
|
|
1151
1147
|
}, xt, St = () => {
|
|
1152
1148
|
if (xt !== void 0) return xt;
|
|
1153
|
-
let e = L("flemo:
|
|
1154
|
-
return xt = e === "
|
|
1149
|
+
let e = L("flemo:handoff");
|
|
1150
|
+
return xt = e === "on" ? e : null, xt;
|
|
1155
1151
|
}, Ct, wt = () => {
|
|
1156
1152
|
if (Ct !== void 0) return Ct;
|
|
1157
|
-
let e = L("flemo:
|
|
1158
|
-
return Ct =
|
|
1153
|
+
let e = L("flemo:snap");
|
|
1154
|
+
return Ct = e === "always" || e === "off" || e === "gate" || e === "hybrid" ? e : null, Ct;
|
|
1159
1155
|
}, Tt, Et = () => {
|
|
1160
1156
|
if (Tt !== void 0) return Tt;
|
|
1161
|
-
let e = L("flemo:
|
|
1162
|
-
return Tt = Number.isFinite(t) && t
|
|
1157
|
+
let e = L("flemo:snapband"), t = e === null ? NaN : Number(e);
|
|
1158
|
+
return Tt = Number.isFinite(t) && t > 0 ? t : 4, Tt;
|
|
1163
1159
|
}, Dt, Ot = () => {
|
|
1164
1160
|
if (Dt !== void 0) return Dt;
|
|
1161
|
+
let e = L("flemo:handoffms"), t = e === null ? NaN : Number(e);
|
|
1162
|
+
return Dt = Number.isFinite(t) && t >= 0 ? t : 100, Dt;
|
|
1163
|
+
}, kt, At = () => {
|
|
1164
|
+
if (kt !== void 0) return kt;
|
|
1165
1165
|
let e = L("flemo:layers");
|
|
1166
|
-
return
|
|
1167
|
-
},
|
|
1166
|
+
return kt = e === "resident" || e !== "off" && Ue(), kt;
|
|
1167
|
+
}, jt, Mt = () => (jt === void 0 && (jt = L("flemo:freeze") === "shallow"), jt);
|
|
1168
1168
|
//#endregion
|
|
1169
1169
|
//#region src/screen/computeScreenFreeze.ts
|
|
1170
|
-
function
|
|
1170
|
+
function Nt(e) {
|
|
1171
1171
|
if (e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex) return "immediate";
|
|
1172
1172
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
1173
|
-
return !e.isActive && t ?
|
|
1173
|
+
return !e.isActive && t ? Mt() ? "live" : "deferred" : "live";
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1176
|
-
return
|
|
1175
|
+
function Pt(e) {
|
|
1176
|
+
return Nt(e) !== "live";
|
|
1177
1177
|
}
|
|
1178
1178
|
//#endregion
|
|
1179
1179
|
//#region src/transition/createTransition.ts
|
|
1180
|
-
function
|
|
1180
|
+
function Ft({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
1181
1181
|
return {
|
|
1182
1182
|
name: e,
|
|
1183
1183
|
initial: t,
|
|
@@ -1198,7 +1198,7 @@ function Nt({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exi
|
|
|
1198
1198
|
}
|
|
1199
1199
|
//#endregion
|
|
1200
1200
|
//#region src/transition/createRawTransition.ts
|
|
1201
|
-
function
|
|
1201
|
+
function It({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
1202
1202
|
return {
|
|
1203
1203
|
name: e,
|
|
1204
1204
|
initial: t,
|
|
@@ -1219,15 +1219,15 @@ function Pt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1219
1219
|
}
|
|
1220
1220
|
//#endregion
|
|
1221
1221
|
//#region src/transition/cupertino.ts
|
|
1222
|
-
var
|
|
1222
|
+
var Lt = (e, t, n) => {
|
|
1223
1223
|
let [r, i] = t, [a, o] = n;
|
|
1224
1224
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1225
|
-
},
|
|
1225
|
+
}, Rt = 30, zt = .7, Bt = [
|
|
1226
1226
|
.32,
|
|
1227
1227
|
.72,
|
|
1228
1228
|
0,
|
|
1229
1229
|
1
|
|
1230
|
-
],
|
|
1230
|
+
], Vt = Ft({
|
|
1231
1231
|
name: "cupertino",
|
|
1232
1232
|
initial: { x: "100%" },
|
|
1233
1233
|
idle: {
|
|
@@ -1237,29 +1237,29 @@ var Ft = (e, t, n) => {
|
|
|
1237
1237
|
enter: {
|
|
1238
1238
|
value: { x: 0 },
|
|
1239
1239
|
options: {
|
|
1240
|
-
duration:
|
|
1241
|
-
ease:
|
|
1240
|
+
duration: zt,
|
|
1241
|
+
ease: Bt
|
|
1242
1242
|
}
|
|
1243
1243
|
},
|
|
1244
1244
|
enterBack: {
|
|
1245
1245
|
value: { x: "100%" },
|
|
1246
1246
|
options: {
|
|
1247
|
-
duration:
|
|
1248
|
-
ease:
|
|
1247
|
+
duration: zt,
|
|
1248
|
+
ease: Bt
|
|
1249
1249
|
}
|
|
1250
1250
|
},
|
|
1251
1251
|
exit: {
|
|
1252
|
-
value: { x: `-${
|
|
1252
|
+
value: { x: `-${Rt}%` },
|
|
1253
1253
|
options: {
|
|
1254
|
-
duration:
|
|
1255
|
-
ease:
|
|
1254
|
+
duration: zt,
|
|
1255
|
+
ease: Bt
|
|
1256
1256
|
}
|
|
1257
1257
|
},
|
|
1258
1258
|
exitBack: {
|
|
1259
1259
|
value: { x: 0 },
|
|
1260
1260
|
options: {
|
|
1261
|
-
duration:
|
|
1262
|
-
ease:
|
|
1261
|
+
duration: zt,
|
|
1262
|
+
ease: Bt
|
|
1263
1263
|
}
|
|
1264
1264
|
},
|
|
1265
1265
|
options: {
|
|
@@ -1267,24 +1267,24 @@ var Ft = (e, t, n) => {
|
|
|
1267
1267
|
swipeDirection: "x",
|
|
1268
1268
|
onSwipeStart: async () => !0,
|
|
1269
1269
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1270
|
-
let { offset: o } = t, s = o.x, c =
|
|
1271
|
-
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 +
|
|
1270
|
+
let { offset: o } = t, s = o.x, c = Lt(s, [0, window.innerWidth], [0, 100]);
|
|
1271
|
+
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + Rt / 100 * c}%` }, { duration: 0 }), c;
|
|
1272
1272
|
},
|
|
1273
1273
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1274
1274
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1275
1275
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1276
1276
|
duration: .3,
|
|
1277
|
-
ease:
|
|
1278
|
-
}), n(i, { x: c ? 0 : `-${
|
|
1277
|
+
ease: Bt
|
|
1278
|
+
}), n(i, { x: c ? 0 : `-${Rt}%` }, {
|
|
1279
1279
|
duration: .3,
|
|
1280
|
-
ease:
|
|
1280
|
+
ease: Bt
|
|
1281
1281
|
})]), c;
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
|
-
}),
|
|
1284
|
+
}), Ht = (e, t, n) => {
|
|
1285
1285
|
let [r, i] = t, [a, o] = n;
|
|
1286
1286
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1287
|
-
},
|
|
1287
|
+
}, Ut = Ft({
|
|
1288
1288
|
name: "layout",
|
|
1289
1289
|
initial: { opacity: .97 },
|
|
1290
1290
|
idle: {
|
|
@@ -1312,7 +1312,7 @@ var Ft = (e, t, n) => {
|
|
|
1312
1312
|
swipeDirection: "y",
|
|
1313
1313
|
onSwipeStart: async () => !0,
|
|
1314
1314
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1315
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1315
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = Ht(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);
|
|
1316
1316
|
return i?.(!0, 100), n(r, {
|
|
1317
1317
|
y: f,
|
|
1318
1318
|
opacity: c
|
|
@@ -1329,7 +1329,7 @@ var Ft = (e, t, n) => {
|
|
|
1329
1329
|
}, { duration: .3 })]), c;
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
|
-
}),
|
|
1332
|
+
}), Wt = Ft({
|
|
1333
1333
|
name: "material",
|
|
1334
1334
|
initial: { y: "100%" },
|
|
1335
1335
|
idle: {
|
|
@@ -1437,7 +1437,7 @@ var Ft = (e, t, n) => {
|
|
|
1437
1437
|
})]), c;
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
|
-
}),
|
|
1440
|
+
}), Gt = Ft({
|
|
1441
1441
|
name: "none",
|
|
1442
1442
|
initial: {},
|
|
1443
1443
|
idle: {
|
|
@@ -1460,20 +1460,20 @@ var Ft = (e, t, n) => {
|
|
|
1460
1460
|
value: {},
|
|
1461
1461
|
options: { duration: 0 }
|
|
1462
1462
|
}
|
|
1463
|
-
}),
|
|
1464
|
-
["none",
|
|
1465
|
-
["cupertino",
|
|
1466
|
-
["material",
|
|
1467
|
-
["layout",
|
|
1463
|
+
}), Kt = /* @__PURE__ */ new Map([
|
|
1464
|
+
["none", Gt],
|
|
1465
|
+
["cupertino", Vt],
|
|
1466
|
+
["material", Wt],
|
|
1467
|
+
["layout", Ut]
|
|
1468
1468
|
]);
|
|
1469
1469
|
//#endregion
|
|
1470
1470
|
//#region src/transition/resolveTransition.ts
|
|
1471
|
-
function
|
|
1472
|
-
return
|
|
1471
|
+
function qt(e) {
|
|
1472
|
+
return Kt.get(e) ?? Kt.get("none");
|
|
1473
1473
|
}
|
|
1474
1474
|
//#endregion
|
|
1475
1475
|
//#region src/transition/decorator/createDecorator.ts
|
|
1476
|
-
function
|
|
1476
|
+
function Jt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1477
1477
|
return {
|
|
1478
1478
|
name: e,
|
|
1479
1479
|
initial: t,
|
|
@@ -1494,7 +1494,7 @@ function Kt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
//#endregion
|
|
1496
1496
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1497
|
-
function
|
|
1497
|
+
function Yt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1498
1498
|
return {
|
|
1499
1499
|
name: e,
|
|
1500
1500
|
initial: t,
|
|
@@ -1515,30 +1515,30 @@ function qt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1515
1515
|
}
|
|
1516
1516
|
//#endregion
|
|
1517
1517
|
//#region src/transition/decorator/overlay.ts
|
|
1518
|
-
var
|
|
1518
|
+
var Xt = "rgba(0, 0, 0, 0.1)", Zt = Jt({
|
|
1519
1519
|
name: "overlay",
|
|
1520
1520
|
initial: {
|
|
1521
1521
|
opacity: 0,
|
|
1522
|
-
backgroundColor:
|
|
1522
|
+
backgroundColor: Xt
|
|
1523
1523
|
},
|
|
1524
1524
|
idle: {
|
|
1525
1525
|
value: {
|
|
1526
1526
|
opacity: 0,
|
|
1527
|
-
backgroundColor:
|
|
1527
|
+
backgroundColor: Xt
|
|
1528
1528
|
},
|
|
1529
1529
|
options: { duration: 0 }
|
|
1530
1530
|
},
|
|
1531
1531
|
enter: {
|
|
1532
1532
|
value: {
|
|
1533
1533
|
opacity: 1,
|
|
1534
|
-
backgroundColor:
|
|
1534
|
+
backgroundColor: Xt
|
|
1535
1535
|
},
|
|
1536
1536
|
options: { duration: .7 }
|
|
1537
1537
|
},
|
|
1538
1538
|
exit: {
|
|
1539
1539
|
value: {
|
|
1540
1540
|
opacity: 0,
|
|
1541
|
-
backgroundColor:
|
|
1541
|
+
backgroundColor: Xt
|
|
1542
1542
|
},
|
|
1543
1543
|
options: { duration: .7 }
|
|
1544
1544
|
},
|
|
@@ -1547,10 +1547,10 @@ var Jt = "rgba(0, 0, 0, 0.1)", Yt = Kt({
|
|
|
1547
1547
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1548
1548
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1549
1549
|
}
|
|
1550
|
-
}), R = /* @__PURE__ */ new Map([["overlay",
|
|
1550
|
+
}), R = /* @__PURE__ */ new Map([["overlay", Zt]]);
|
|
1551
1551
|
//#endregion
|
|
1552
1552
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1553
|
-
function
|
|
1553
|
+
function Qt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1554
1554
|
return {
|
|
1555
1555
|
name: e,
|
|
1556
1556
|
initial: t,
|
|
@@ -1571,7 +1571,7 @@ function Xt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1571
1571
|
}
|
|
1572
1572
|
//#endregion
|
|
1573
1573
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1574
|
-
function
|
|
1574
|
+
function $t({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1575
1575
|
return {
|
|
1576
1576
|
name: e,
|
|
1577
1577
|
initial: t,
|
|
@@ -1592,7 +1592,7 @@ function Zt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1592
1592
|
}
|
|
1593
1593
|
//#endregion
|
|
1594
1594
|
//#region src/transition/partTransition/partTransition.ts
|
|
1595
|
-
var z = /* @__PURE__ */ new Map(),
|
|
1595
|
+
var z = /* @__PURE__ */ new Map(), en = {
|
|
1596
1596
|
"IDLE-true": "self",
|
|
1597
1597
|
"IDLE-false": "self",
|
|
1598
1598
|
"PUSHING-true": "initial",
|
|
@@ -1603,17 +1603,17 @@ var z = /* @__PURE__ */ new Map(), Qt = {
|
|
|
1603
1603
|
"POPPING-false": "PUSHING-false",
|
|
1604
1604
|
"COMPLETED-true": "self",
|
|
1605
1605
|
"COMPLETED-false": "self"
|
|
1606
|
-
},
|
|
1606
|
+
}, tn = Object.keys(en), nn = (e) => {
|
|
1607
1607
|
if (!e) return 0;
|
|
1608
1608
|
let t = e.duration;
|
|
1609
1609
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1610
|
-
},
|
|
1611
|
-
let n =
|
|
1610
|
+
}, rn = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, an = (e, t) => {
|
|
1611
|
+
let n = en[t];
|
|
1612
1612
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1613
1613
|
}, B = (e, t) => {
|
|
1614
|
-
let n =
|
|
1614
|
+
let n = an(e, t);
|
|
1615
1615
|
if (n === null) return null;
|
|
1616
|
-
let r = e.variants[t], i =
|
|
1616
|
+
let r = e.variants[t], i = nn(r.options), a = rn(r.options);
|
|
1617
1617
|
return i <= 0 && a <= 0 ? null : {
|
|
1618
1618
|
from: n,
|
|
1619
1619
|
to: r.value,
|
|
@@ -1621,7 +1621,7 @@ var z = /* @__PURE__ */ new Map(), Qt = {
|
|
|
1621
1621
|
delay: a,
|
|
1622
1622
|
ease: r.options?.ease
|
|
1623
1623
|
};
|
|
1624
|
-
},
|
|
1624
|
+
}, on = tn, sn = "translateZ(0.02px)", cn = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), ln = (e) => typeof e == "object" && !!e && !Array.isArray(e), un = /* @__PURE__ */ 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(".")), dn = (e, t) => t.startsWith("--") || un.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, fn = (e, t) => typeof t == "number" ? dn(t, e) : typeof t == "string" ? t : "", pn = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), mn = /* @__PURE__ */ new Set([
|
|
1625
1625
|
"x",
|
|
1626
1626
|
"y",
|
|
1627
1627
|
"z",
|
|
@@ -1632,7 +1632,7 @@ var z = /* @__PURE__ */ new Map(), Qt = {
|
|
|
1632
1632
|
"rotateX",
|
|
1633
1633
|
"rotateY",
|
|
1634
1634
|
"rotateZ"
|
|
1635
|
-
]),
|
|
1635
|
+
]), hn = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, gn = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, _n = /^1(\.0+)?$/, vn = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && _n.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && gn.test(t.trim()) : t === 0 || typeof t == "string" && hn.test(t.trim()), yn = (e, t) => {
|
|
1636
1636
|
switch (e) {
|
|
1637
1637
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1638
1638
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1646,16 +1646,16 @@ var z = /* @__PURE__ */ new Map(), Qt = {
|
|
|
1646
1646
|
case "rotateY": return `rotateY(${t})`;
|
|
1647
1647
|
default: return "";
|
|
1648
1648
|
}
|
|
1649
|
-
},
|
|
1649
|
+
}, bn = (e) => {
|
|
1650
1650
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1651
|
-
if (!
|
|
1651
|
+
if (!ln(e)) return;
|
|
1652
1652
|
let n = [];
|
|
1653
1653
|
for (let r of Object.keys(e)) {
|
|
1654
|
-
let i = e[r], a =
|
|
1655
|
-
if (a !== "") if (
|
|
1654
|
+
let i = e[r], a = fn(r, i);
|
|
1655
|
+
if (a !== "") if (mn.has(r)) n.push(`${r}:${a}`);
|
|
1656
1656
|
else {
|
|
1657
|
-
let e = t.get(
|
|
1658
|
-
e.add(a), t.set(
|
|
1657
|
+
let e = t.get(pn(r)) ?? /* @__PURE__ */ new Set();
|
|
1658
|
+
e.add(a), t.set(pn(r), e);
|
|
1659
1659
|
}
|
|
1660
1660
|
}
|
|
1661
1661
|
r.add(n.sort().join("|"));
|
|
@@ -1665,13 +1665,13 @@ var z = /* @__PURE__ */ new Map(), Qt = {
|
|
|
1665
1665
|
n = r.size > 1;
|
|
1666
1666
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1667
1667
|
return n && a.push("transform"), a;
|
|
1668
|
-
},
|
|
1669
|
-
if (!
|
|
1668
|
+
}, V = (e) => {
|
|
1669
|
+
if (!ln(e)) return [];
|
|
1670
1670
|
let t = [], n = !0, r = [];
|
|
1671
1671
|
for (let i of Object.keys(e)) {
|
|
1672
|
-
let a = e[i], o =
|
|
1673
|
-
o !== "" && (
|
|
1674
|
-
property:
|
|
1672
|
+
let a = e[i], o = fn(i, a);
|
|
1673
|
+
o !== "" && (mn.has(i) ? (t.push(yn(i, o)), vn(i, a) || (n = !1)) : r.push({
|
|
1674
|
+
property: pn(i),
|
|
1675
1675
|
value: o
|
|
1676
1676
|
}));
|
|
1677
1677
|
}
|
|
@@ -1679,7 +1679,7 @@ var z = /* @__PURE__ */ new Map(), Qt = {
|
|
|
1679
1679
|
property: "transform",
|
|
1680
1680
|
value: n ? "none" : t.join(" ")
|
|
1681
1681
|
}), r;
|
|
1682
|
-
},
|
|
1682
|
+
}, H = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), xn = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1683
1683
|
linear: "linear",
|
|
1684
1684
|
easeIn: "ease-in",
|
|
1685
1685
|
easeOut: "ease-out",
|
|
@@ -1689,119 +1689,119 @@ var z = /* @__PURE__ */ new Map(), Qt = {
|
|
|
1689
1689
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1690
1690
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1691
1691
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1692
|
-
}[e] ?? "ease" : "ease",
|
|
1692
|
+
}[e] ?? "ease" : "ease", Sn = (e, t) => {
|
|
1693
1693
|
let [n, r] = t.split("-");
|
|
1694
1694
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1695
|
-
},
|
|
1695
|
+
}, Cn = (e, t) => {
|
|
1696
1696
|
let [n, r] = t.split("-");
|
|
1697
1697
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1698
|
-
},
|
|
1698
|
+
}, wn = (e, t) => {
|
|
1699
1699
|
let [n, r] = t.split("-");
|
|
1700
1700
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1701
|
-
},
|
|
1701
|
+
}, Tn = (e, t) => {
|
|
1702
1702
|
let [n, r] = t.split("-");
|
|
1703
1703
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1704
|
-
},
|
|
1704
|
+
}, En = (e, t, n) => `flemo-${e}-${cn(t)}-${n}`, Dn = [
|
|
1705
1705
|
"-lpm",
|
|
1706
1706
|
"-deskhead",
|
|
1707
1707
|
"-lpmcreep"
|
|
1708
|
-
],
|
|
1709
|
-
let o =
|
|
1708
|
+
], On = (e, t) => e === t || Dn.some((n) => e === `${t}${n}`), kn = (e, t, n, r, i, a) => {
|
|
1709
|
+
let o = V(r), s = V(i.value), c = new Set(o.filter((e) => s.some((t) => t.property === e.property && t.value === e.value)).map((e) => e.property)), l = o.filter((e) => c.has(e.property)), u = o.filter((e) => !c.has(e.property)), d = s.filter((e) => !c.has(e.property)), f = nn(i.options), p = rn(i.options), m = xn(i.options?.ease), h = a(t, n), g = e === "screen" ? `${h},\n${wn(t, n)}` : h;
|
|
1710
1710
|
if (s.length === 0 && o.length === 0) return "";
|
|
1711
|
-
if (
|
|
1712
|
-
let
|
|
1713
|
-
`@keyframes ${
|
|
1711
|
+
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${H(s)}\n animation: none;\n}`;
|
|
1712
|
+
let _ = En(e, t, n), v = [
|
|
1713
|
+
`@keyframes ${_} {`,
|
|
1714
1714
|
" from {",
|
|
1715
|
-
|
|
1715
|
+
H(u).replace(/^/gm, " "),
|
|
1716
1716
|
" }",
|
|
1717
1717
|
" to {",
|
|
1718
|
-
|
|
1718
|
+
H(d).replace(/^/gm, " "),
|
|
1719
1719
|
" }",
|
|
1720
1720
|
"}"
|
|
1721
|
-
].join("\n"),
|
|
1722
|
-
`${
|
|
1723
|
-
`${
|
|
1724
|
-
|
|
1725
|
-
|
|
1721
|
+
].join("\n"), y = [
|
|
1722
|
+
`${_}`,
|
|
1723
|
+
`${f}s`,
|
|
1724
|
+
m,
|
|
1725
|
+
p > 0 ? `${p}s` : null,
|
|
1726
1726
|
"both"
|
|
1727
|
-
].filter(Boolean).join(" "),
|
|
1728
|
-
if (e === "part" || r <= 0 ||
|
|
1729
|
-
let a =
|
|
1730
|
-
return `\n@keyframes ${
|
|
1731
|
-
},
|
|
1727
|
+
].filter(Boolean).join(" "), b = (e) => e.startsWith("REPLACING") ? .18 : e.startsWith("PUSHING") ? .1 : e.startsWith("POPPING") ? .08 : 0, x = (e) => e.startsWith("REPLACING") || e.startsWith("PUSHING") ? .033 : e.startsWith("POPPING") ? .017 : 0, S = (t, n, r, i) => {
|
|
1728
|
+
if (e === "part" || r <= 0 || f <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1729
|
+
let a = f + r, c = (r / a * 100).toFixed(3), l = `${_}-${n}`, m = g.split(",\n").map((e) => `:root[${t}] ${e}`).join(",\n");
|
|
1730
|
+
return `\n@keyframes ${l} {\n 0%, ${c}% {\n${H(u).replace(/^/gm, " ")}\n }\n 100% {\n${H(d).replace(/^/gm, " ")}\n }\n}\n${m} {\n animation-name: ${l};\n animation-duration: ${a.toFixed(3)}s;\n animation-delay: ${(i ? p + r : p).toFixed(3)}s;\n}`;
|
|
1731
|
+
}, C = (t, n) => e !== "part" || n <= 0 || f <= 0 ? "" : `\n${((e = "") => g.split(",\n").map((n) => `:root[${t}]${e} ${n}`).join(",\n"))()} {\n animation-delay: ${(p + n).toFixed(3)}s;\n}`, w = (() => {
|
|
1732
1732
|
/* v8 ignore next */
|
|
1733
1733
|
if (e === "part") return "";
|
|
1734
|
-
let t =
|
|
1734
|
+
let t = b(n);
|
|
1735
1735
|
/* v8 ignore next -- same guard as headBlock's: a variant with nothing to
|
|
1736
1736
|
animate never reaches a head. */
|
|
1737
|
-
if (t <= 0 ||
|
|
1737
|
+
if (t <= 0 || f <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1738
1738
|
let r = (() => {
|
|
1739
|
-
let e =
|
|
1740
|
-
if (!e) return [...
|
|
1739
|
+
let e = u.find((e) => e.property === "transform");
|
|
1740
|
+
if (!e) return [...u, {
|
|
1741
1741
|
property: "transform",
|
|
1742
|
-
value:
|
|
1742
|
+
value: sn
|
|
1743
1743
|
}];
|
|
1744
1744
|
let t = e.value === "none" ? "" : `${e.value} `;
|
|
1745
|
-
return
|
|
1745
|
+
return u.map((e) => e.property === "transform" ? {
|
|
1746
1746
|
property: "transform",
|
|
1747
|
-
value: `${t}${
|
|
1747
|
+
value: `${t}${sn}`
|
|
1748
1748
|
} : e);
|
|
1749
|
-
})(), i =
|
|
1750
|
-
return `\n@keyframes ${
|
|
1751
|
-
})(),
|
|
1752
|
-
return `${
|
|
1753
|
-
},
|
|
1749
|
+
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-lpmcreep`, l = g.split(",\n").map((e) => `:root[data-flemo-lpm][data-flemo-creep] ${e}`).join(",\n");
|
|
1750
|
+
return `\n@keyframes ${c} {\n 0% {\n${H(u).replace(/^/gm, " ")}\n }\n ${a}% {\n${H(r).replace(/^/gm, " ")}\n }\n 100% {\n${H(d).replace(/^/gm, " ")}\n }\n}\n${l} {\n animation-name: ${c};\n animation-duration: ${i.toFixed(3)}s;\n animation-delay: ${(p + t).toFixed(3)}s;\n}`;
|
|
1751
|
+
})(), T = S("data-flemo-lpm", "lpm", b(n), !0), E = C("data-flemo-lpm", b(n)), D = S("data-flemo-desk-head", "deskhead", x(n), !1), O = C("data-flemo-desk-head", x(n)), k = new Map(u.map((e) => [e.property, e.value])), A = new Map(d.map((e) => [e.property, e.value])), j = Array.from(/* @__PURE__ */ new Set([...k.keys(), ...A.keys()])).filter((e) => k.get(e) !== A.get(e)), ee = j.length > 0 ? ` will-change: ${j.join(", ")};\n` : "", M = n.split("-")[0], te = M === "PUSHING" || M === "REPLACING" ? " contain: layout;\n" : "";
|
|
1752
|
+
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${H(l)}\n` : ""}${ee}${te}}`}${T}${E}${w}${D}${O}${e === "screen" && n.endsWith("-false") && An(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park"] {\n animation: none;\n${H(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && An(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${H(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && An(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park-over"] {\n animation: none;\n${H(s)}\n opacity: 0.02;\n}` : ""}`;
|
|
1753
|
+
}, An = (e) => {
|
|
1754
1754
|
if (!e) return !1;
|
|
1755
1755
|
if (e.opacity === 0) return !0;
|
|
1756
1756
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1757
1757
|
return t(e.x) || t(e.y);
|
|
1758
|
-
},
|
|
1759
|
-
let i =
|
|
1760
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1761
|
-
},
|
|
1758
|
+
}, jn = (e, t, n, r) => {
|
|
1759
|
+
let i = V(r.value);
|
|
1760
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${H(i)}\n}`;
|
|
1761
|
+
}, Mn = (e, t, n = []) => {
|
|
1762
1762
|
let r = [];
|
|
1763
1763
|
for (let t of e) {
|
|
1764
1764
|
let e = t.name;
|
|
1765
|
-
for (let n of
|
|
1766
|
-
let i = t.variants[n], a =
|
|
1765
|
+
for (let n of tn) {
|
|
1766
|
+
let i = t.variants[n], a = en[n];
|
|
1767
1767
|
if (a === "self") {
|
|
1768
|
-
r.push(
|
|
1768
|
+
r.push(jn(Sn, e, n, i));
|
|
1769
1769
|
continue;
|
|
1770
1770
|
}
|
|
1771
1771
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1772
|
-
r.push(
|
|
1772
|
+
r.push(kn("screen", e, n, o, i, Sn));
|
|
1773
1773
|
}
|
|
1774
1774
|
}
|
|
1775
1775
|
for (let e of t) {
|
|
1776
1776
|
let t = e.name;
|
|
1777
|
-
for (let n of
|
|
1778
|
-
let i = e.variants[n], a =
|
|
1777
|
+
for (let n of on) {
|
|
1778
|
+
let i = e.variants[n], a = en[n];
|
|
1779
1779
|
if (a === "self") {
|
|
1780
|
-
r.push(
|
|
1780
|
+
r.push(jn(Cn, t, n, i));
|
|
1781
1781
|
continue;
|
|
1782
1782
|
}
|
|
1783
1783
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1784
|
-
r.push(
|
|
1784
|
+
r.push(kn("decorator", t, n, o, i, Cn));
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
1787
|
for (let e of n) {
|
|
1788
1788
|
let t = e.name;
|
|
1789
|
-
for (let n of
|
|
1790
|
-
let i = e.variants[n], a =
|
|
1789
|
+
for (let n of on) {
|
|
1790
|
+
let i = e.variants[n], a = en[n];
|
|
1791
1791
|
if (a === "self") {
|
|
1792
|
-
r.push(
|
|
1792
|
+
r.push(jn(Tn, t, n, i));
|
|
1793
1793
|
continue;
|
|
1794
1794
|
}
|
|
1795
1795
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1796
|
-
r.push(
|
|
1796
|
+
r.push(kn("part", t, n, o, i, Tn));
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
1799
|
return [
|
|
1800
1800
|
...r.filter((e) => e.length > 0),
|
|
1801
|
-
|
|
1802
|
-
|
|
1801
|
+
Nn,
|
|
1802
|
+
Pn
|
|
1803
1803
|
].join("\n\n");
|
|
1804
|
-
},
|
|
1804
|
+
}, Nn = [
|
|
1805
1805
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1806
1806
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1807
1807
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
@@ -1812,53 +1812,53 @@ var z = /* @__PURE__ */ new Map(), Qt = {
|
|
|
1812
1812
|
"[data-flemo-anim-hold=\"park-over\"] [data-flemo-part-name] {",
|
|
1813
1813
|
" animation-play-state: paused !important;",
|
|
1814
1814
|
"}"
|
|
1815
|
-
].join("\n"),
|
|
1815
|
+
].join("\n"), Pn = [
|
|
1816
1816
|
"[data-flemo-held-arrival] {",
|
|
1817
1817
|
" display: none !important;",
|
|
1818
1818
|
"}"
|
|
1819
|
-
].join("\n"),
|
|
1820
|
-
let n =
|
|
1819
|
+
].join("\n"), U = (e, t) => {
|
|
1820
|
+
let n = en[t];
|
|
1821
1821
|
if (n === "self") return !1;
|
|
1822
|
-
let r = e.variants[t], i =
|
|
1822
|
+
let r = e.variants[t], i = nn(r.options), a = rn(r.options);
|
|
1823
1823
|
if (i <= 0 && a <= 0) return !1;
|
|
1824
|
-
let o =
|
|
1824
|
+
let o = V(n === "initial" ? e.initial : e.variants[n].value), s = V(r.value);
|
|
1825
1825
|
return o.length > 0 || s.length > 0;
|
|
1826
|
-
},
|
|
1826
|
+
}, Fn = {
|
|
1827
1827
|
REPLACING: 33,
|
|
1828
1828
|
PUSHING: 33,
|
|
1829
1829
|
POPPING: 17
|
|
1830
|
-
},
|
|
1830
|
+
}, In = {
|
|
1831
1831
|
REPLACING: 180,
|
|
1832
1832
|
PUSHING: 100,
|
|
1833
1833
|
POPPING: 80
|
|
1834
|
-
},
|
|
1835
|
-
function
|
|
1834
|
+
}, Ln = "data-flemo";
|
|
1835
|
+
function Rn() {
|
|
1836
1836
|
if (f()) return;
|
|
1837
|
-
let e =
|
|
1838
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1837
|
+
let e = Mn(Kt.values(), R.values(), z.values()), t = document.head.querySelector(`style[${Ln}]`);
|
|
1838
|
+
t || (t = document.createElement("style"), t.setAttribute(Ln, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1839
1839
|
}
|
|
1840
1840
|
//#endregion
|
|
1841
1841
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1842
|
-
var
|
|
1842
|
+
var zn = /* @__PURE__ */ new Map(), Bn = /* @__PURE__ */ new Map(), Vn = /* @__PURE__ */ new Map(), Hn = (e, t) => {
|
|
1843
1843
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1844
|
-
},
|
|
1844
|
+
}, Un = (e, t) => {
|
|
1845
1845
|
let n = (e.get(t) ?? 1) - 1;
|
|
1846
1846
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1847
1847
|
};
|
|
1848
|
-
function
|
|
1849
|
-
for (let t of e)
|
|
1850
|
-
for (let e of t) R.set(e.name, e),
|
|
1851
|
-
for (let e of n) z.set(e.name, e), Vn
|
|
1852
|
-
return
|
|
1853
|
-
for (let t of e)
|
|
1854
|
-
for (let e of t)
|
|
1855
|
-
for (let e of n)
|
|
1856
|
-
|
|
1848
|
+
function Wn(e, t, n = []) {
|
|
1849
|
+
for (let t of e) Kt.set(t.name, t), Hn(zn, t.name);
|
|
1850
|
+
for (let e of t) R.set(e.name, e), Hn(Bn, e.name);
|
|
1851
|
+
for (let e of n) z.set(e.name, e), Hn(Vn, e.name);
|
|
1852
|
+
return Rn(), () => {
|
|
1853
|
+
for (let t of e) Un(zn, t.name) && Kt.delete(t.name);
|
|
1854
|
+
for (let e of t) Un(Bn, e.name) && R.delete(e.name);
|
|
1855
|
+
for (let e of n) Un(Vn, e.name) && z.delete(e.name);
|
|
1856
|
+
Rn();
|
|
1857
1857
|
};
|
|
1858
1858
|
}
|
|
1859
1859
|
//#endregion
|
|
1860
1860
|
//#region src/transition/enteringInitialStyle.ts
|
|
1861
|
-
function
|
|
1861
|
+
function Gn(e) {
|
|
1862
1862
|
let { initial: t, isActive: n, status: r } = e;
|
|
1863
1863
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1864
1864
|
let i = {};
|
|
@@ -1866,10 +1866,10 @@ function Wn(e) {
|
|
|
1866
1866
|
}
|
|
1867
1867
|
//#endregion
|
|
1868
1868
|
//#region src/transition/settleScrub.ts
|
|
1869
|
-
var
|
|
1869
|
+
var Kn = () => ({
|
|
1870
1870
|
request: (e) => requestAnimationFrame(e),
|
|
1871
1871
|
cancel: (e) => cancelAnimationFrame(e)
|
|
1872
|
-
}),
|
|
1872
|
+
}), qn = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), Jn = ((e = Kn()) => {
|
|
1873
1873
|
let t = /* @__PURE__ */ new Map(), n = null, r = () => {
|
|
1874
1874
|
t.size === 0 && n !== null && (e.cancel(n), n = null);
|
|
1875
1875
|
}, i = (e, n) => {
|
|
@@ -1902,7 +1902,7 @@ var Gn = () => ({
|
|
|
1902
1902
|
if (typeof r.animate != "function") return null;
|
|
1903
1903
|
i(r, "current");
|
|
1904
1904
|
let u = {};
|
|
1905
|
-
for (let e of o) u[
|
|
1905
|
+
for (let e of o) u[qn(e.property)] = e.value;
|
|
1906
1906
|
let d;
|
|
1907
1907
|
try {
|
|
1908
1908
|
d = r.animate([u], {
|
|
@@ -1939,18 +1939,18 @@ var Gn = () => ({
|
|
|
1939
1939
|
r && (n === void 0 || r.owner === n) && i(e, "drop");
|
|
1940
1940
|
}
|
|
1941
1941
|
};
|
|
1942
|
-
})(),
|
|
1943
|
-
let r =
|
|
1944
|
-
r || (r = /* @__PURE__ */ new Map(),
|
|
1942
|
+
})(), Yn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Xn = /* @__PURE__ */ new WeakMap(), Zn = Symbol("flemo-inline-writer"), Qn = /* @__PURE__ */ new WeakMap(), W = (e, t, n = Zn) => {
|
|
1943
|
+
let r = Xn.get(e);
|
|
1944
|
+
r || (r = /* @__PURE__ */ new Map(), Xn.set(e, r));
|
|
1945
1945
|
let i = r.get(t);
|
|
1946
1946
|
i || (i = {
|
|
1947
1947
|
original: e.style.getPropertyValue(t),
|
|
1948
1948
|
owners: /* @__PURE__ */ new Set()
|
|
1949
1949
|
}, r.set(t, i)), i.owners.add(n);
|
|
1950
|
-
},
|
|
1951
|
-
|
|
1952
|
-
let r =
|
|
1953
|
-
(!n ||
|
|
1950
|
+
}, G = (e, t, n) => {
|
|
1951
|
+
Jn.cancel(e, n);
|
|
1952
|
+
let r = Xn.get(e);
|
|
1953
|
+
(!n || Qn.get(e) === n) && (e.style.transition = "", Qn.delete(e));
|
|
1954
1954
|
let i = (t) => {
|
|
1955
1955
|
let i = r?.get(t);
|
|
1956
1956
|
if (!i) {
|
|
@@ -1968,27 +1968,27 @@ var Gn = () => ({
|
|
|
1968
1968
|
return;
|
|
1969
1969
|
}
|
|
1970
1970
|
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1971
|
-
},
|
|
1972
|
-
if (!
|
|
1973
|
-
let i = e, a =
|
|
1971
|
+
}, K = (e, t, n = {}, r) => {
|
|
1972
|
+
if (!Yn(e)) return Promise.resolve();
|
|
1973
|
+
let i = e, a = V(t);
|
|
1974
1974
|
if (a.length === 0) return Promise.resolve();
|
|
1975
|
-
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c =
|
|
1975
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = xn(n.ease);
|
|
1976
1976
|
if (o <= 0 && s <= 0) {
|
|
1977
|
-
|
|
1978
|
-
for (let e of a)
|
|
1977
|
+
Jn.takeover(i, r), i.style.transition = "none", Qn.set(i, r);
|
|
1978
|
+
for (let e of a) W(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1979
1979
|
return Promise.resolve();
|
|
1980
1980
|
}
|
|
1981
|
-
let l = be.playerAllowed() ?
|
|
1981
|
+
let l = be.playerAllowed() ? Jn.settle(i, a, {
|
|
1982
1982
|
durationMs: o * 1e3,
|
|
1983
1983
|
delayMs: s * 1e3,
|
|
1984
1984
|
easing: c
|
|
1985
1985
|
}, (e) => {
|
|
1986
|
-
|
|
1986
|
+
W(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1987
1987
|
}, r) : null;
|
|
1988
1988
|
if (l) return l;
|
|
1989
1989
|
let u = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1990
|
-
i.style.transition = u,
|
|
1991
|
-
for (let e of a)
|
|
1990
|
+
i.style.transition = u, Qn.set(i, r), i.offsetWidth;
|
|
1991
|
+
for (let e of a) W(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1992
1992
|
return new Promise((e) => {
|
|
1993
1993
|
let t = !1, n = () => {
|
|
1994
1994
|
t || (t = !0, i.removeEventListener("transitionend", r), e());
|
|
@@ -2025,7 +2025,7 @@ function or(e) {
|
|
|
2025
2025
|
}
|
|
2026
2026
|
//#endregion
|
|
2027
2027
|
//#region src/core/engine/imageDecodeOffloader.ts
|
|
2028
|
-
var sr = 8, cr = 2,
|
|
2028
|
+
var sr = 8, cr = 2, q = 96, lr = 15e3, ur = 3e3, dr = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", J = "data-flemo-image-src", fr = "flemo-image-scale-v1", pr = /* @__PURE__ */ new Set([
|
|
2029
2029
|
"PUSHING",
|
|
2030
2030
|
"POPPING",
|
|
2031
2031
|
"REPLACING"
|
|
@@ -2107,8 +2107,8 @@ function br(e) {
|
|
|
2107
2107
|
r || (r = !0, clearTimeout(o), a.delete(i), t(), n ? e.style.visibility = n : e.style.removeProperty("visibility"));
|
|
2108
2108
|
}, o = setTimeout(i, ur);
|
|
2109
2109
|
a.add(i), m(e, i);
|
|
2110
|
-
}, g = (e, t) => !ir() && !mr(e) ? !1 : (e.setAttribute(
|
|
2111
|
-
e.setAttribute(
|
|
2110
|
+
}, g = (e, t) => !ir() && !mr(e) ? !1 : (e.setAttribute(J, t), h(e, () => {}), !0), _ = (e, t, a) => {
|
|
2111
|
+
e.setAttribute(J, t), e.src = a, h(e, () => {
|
|
2112
2112
|
/* v8 ignore next -- disposal runs pending reveals; nothing to repair. */
|
|
2113
2113
|
if (n) return;
|
|
2114
2114
|
let a = r.get(t);
|
|
@@ -2119,12 +2119,12 @@ function br(e) {
|
|
|
2119
2119
|
if (n) {
|
|
2120
2120
|
if (s.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
2121
2121
|
if (i(t)) {
|
|
2122
|
-
e.setAttribute(
|
|
2122
|
+
e.setAttribute(J, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
2123
2123
|
let r = e.closest("picture");
|
|
2124
2124
|
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
2125
2125
|
e.src = t;
|
|
2126
2126
|
}
|
|
2127
|
-
} else e.getAttribute("src") === dr && (i(t) ? e.src = t : (e.removeAttribute(
|
|
2127
|
+
} else e.getAttribute("src") === dr && (i(t) ? e.src = t : (e.removeAttribute(J), e.src = n.url));
|
|
2128
2128
|
p(e, n.previousVisibility);
|
|
2129
2129
|
}
|
|
2130
2130
|
}, y = /* @__PURE__ */ new Map(), b = !1, x = () => {
|
|
@@ -2140,7 +2140,7 @@ function br(e) {
|
|
|
2140
2140
|
}));
|
|
2141
2141
|
}, C = (e, t, n) => {
|
|
2142
2142
|
if (r.has(e) || o.has(e)) return;
|
|
2143
|
-
if (ir() &&
|
|
2143
|
+
if (ir() && F()) {
|
|
2144
2144
|
y.has(e) || y.set(e, {
|
|
2145
2145
|
boxWidth: t,
|
|
2146
2146
|
boxHeight: n
|
|
@@ -2150,7 +2150,7 @@ function br(e) {
|
|
|
2150
2150
|
let i = d();
|
|
2151
2151
|
if (!i) return;
|
|
2152
2152
|
o.add(e);
|
|
2153
|
-
let a = Math.round(Math.max(
|
|
2153
|
+
let a = Math.round(Math.max(q, t * u()) * cr), s = Math.max(t * n, 9216) * u() ** 2;
|
|
2154
2154
|
i.postMessage({
|
|
2155
2155
|
url: e,
|
|
2156
2156
|
targetWidth: a,
|
|
@@ -2158,20 +2158,20 @@ function br(e) {
|
|
|
2158
2158
|
ratio: 8
|
|
2159
2159
|
});
|
|
2160
2160
|
}, w = ar(() => {
|
|
2161
|
-
if (
|
|
2161
|
+
if (F() && !(!t || o.size === 0)) {
|
|
2162
2162
|
t.terminate(), t = null;
|
|
2163
2163
|
for (let e of o) {
|
|
2164
2164
|
if (y.has(e)) continue;
|
|
2165
2165
|
let t = {
|
|
2166
|
-
boxWidth:
|
|
2167
|
-
boxHeight:
|
|
2166
|
+
boxWidth: q,
|
|
2167
|
+
boxHeight: q
|
|
2168
2168
|
};
|
|
2169
2169
|
for (let [n, r] of s) {
|
|
2170
2170
|
if (r.url !== e) continue;
|
|
2171
2171
|
let i = n.getBoundingClientRect();
|
|
2172
2172
|
t = {
|
|
2173
|
-
boxWidth: i.width ||
|
|
2174
|
-
boxHeight: i.height ||
|
|
2173
|
+
boxWidth: i.width || q,
|
|
2174
|
+
boxHeight: i.height || q
|
|
2175
2175
|
};
|
|
2176
2176
|
break;
|
|
2177
2177
|
}
|
|
@@ -2194,8 +2194,8 @@ function br(e) {
|
|
|
2194
2194
|
if (!(/^https?:/.test(t) && hr({
|
|
2195
2195
|
naturalWidth: e.naturalWidth,
|
|
2196
2196
|
naturalHeight: e.naturalHeight,
|
|
2197
|
-
boxWidth: i.width ||
|
|
2198
|
-
boxHeight: i.height ||
|
|
2197
|
+
boxWidth: i.width || q,
|
|
2198
|
+
boxHeight: i.height || q,
|
|
2199
2199
|
devicePixelRatio: u()
|
|
2200
2200
|
}))) {
|
|
2201
2201
|
v(e, null);
|
|
@@ -2223,7 +2223,7 @@ function br(e) {
|
|
|
2223
2223
|
l.add(e), f(t, e);
|
|
2224
2224
|
return;
|
|
2225
2225
|
}
|
|
2226
|
-
C(t, i.width ||
|
|
2226
|
+
C(t, i.width || q, i.height || q);
|
|
2227
2227
|
}
|
|
2228
2228
|
});
|
|
2229
2229
|
};
|
|
@@ -2246,20 +2246,20 @@ function br(e) {
|
|
|
2246
2246
|
if (c.add(e), e.complete && e.naturalWidth > 0) {
|
|
2247
2247
|
if (!t) {
|
|
2248
2248
|
let t = e.getBoundingClientRect();
|
|
2249
|
-
C(a, t.width ||
|
|
2249
|
+
C(a, t.width || q, t.height || q);
|
|
2250
2250
|
return;
|
|
2251
2251
|
}
|
|
2252
2252
|
let n = e.getBoundingClientRect();
|
|
2253
2253
|
if (!hr({
|
|
2254
2254
|
naturalWidth: e.naturalWidth,
|
|
2255
2255
|
naturalHeight: e.naturalHeight,
|
|
2256
|
-
boxWidth: n.width ||
|
|
2257
|
-
boxHeight: n.height ||
|
|
2256
|
+
boxWidth: n.width || q,
|
|
2257
|
+
boxHeight: n.height || q,
|
|
2258
2258
|
devicePixelRatio: u()
|
|
2259
2259
|
})) return;
|
|
2260
2260
|
let o = r.get(a);
|
|
2261
2261
|
if (i(o)) {
|
|
2262
|
-
ir() || mr(e) ? _(e, a, o) : (e.setAttribute(
|
|
2262
|
+
ir() || mr(e) ? _(e, a, o) : (e.setAttribute(J, a), e.src = o);
|
|
2263
2263
|
return;
|
|
2264
2264
|
}
|
|
2265
2265
|
if (o === "opaque") {
|
|
@@ -2275,14 +2275,14 @@ function br(e) {
|
|
|
2275
2275
|
return;
|
|
2276
2276
|
}
|
|
2277
2277
|
if (o) {
|
|
2278
|
-
ir() || mr(e) ? _(e, a, o) : (e.setAttribute(
|
|
2278
|
+
ir() || mr(e) ? _(e, a, o) : (e.setAttribute(J, a), e.src = o);
|
|
2279
2279
|
return;
|
|
2280
2280
|
}
|
|
2281
2281
|
s.set(e, {
|
|
2282
2282
|
url: a,
|
|
2283
2283
|
previousVisibility: e.style.visibility,
|
|
2284
2284
|
timeout: setTimeout(() => v(e, null), lr)
|
|
2285
|
-
}), e.style.visibility = "hidden", e.setAttribute(
|
|
2285
|
+
}), e.style.visibility = "hidden", e.setAttribute(J, a), e.src = dr, yr(a).then((t) => {
|
|
2286
2286
|
if (n || r.has(a)) return;
|
|
2287
2287
|
if (t) {
|
|
2288
2288
|
let e = URL.createObjectURL(t);
|
|
@@ -2292,7 +2292,7 @@ function br(e) {
|
|
|
2292
2292
|
let i = () => {
|
|
2293
2293
|
if (n) return;
|
|
2294
2294
|
let t = e.getBoundingClientRect();
|
|
2295
|
-
C(a, t.width ||
|
|
2295
|
+
C(a, t.width || q, t.height || q);
|
|
2296
2296
|
};
|
|
2297
2297
|
typeof requestAnimationFrame == "function" ? requestAnimationFrame(i) : i();
|
|
2298
2298
|
});
|
|
@@ -2312,18 +2312,18 @@ function br(e) {
|
|
|
2312
2312
|
t === n.url && (e.src = dr);
|
|
2313
2313
|
return;
|
|
2314
2314
|
}
|
|
2315
|
-
let a = e.getAttribute(
|
|
2315
|
+
let a = e.getAttribute(J);
|
|
2316
2316
|
if (a) if (t === a) {
|
|
2317
2317
|
let t = r.get(a);
|
|
2318
2318
|
i(t) && (e.src = t);
|
|
2319
|
-
} else t !== dr && !t.startsWith("blob:") && e.removeAttribute(
|
|
2320
|
-
},
|
|
2319
|
+
} else t !== dr && !t.startsWith("blob:") && e.removeAttribute(J);
|
|
2320
|
+
}, A = !1, j = new MutationObserver((t) => {
|
|
2321
2321
|
if (!n) {
|
|
2322
2322
|
if (ir()) {
|
|
2323
|
-
if (
|
|
2324
|
-
|
|
2325
|
-
if (
|
|
2326
|
-
for (let t of Array.from(e.querySelectorAll(`img[${
|
|
2323
|
+
if (A) return;
|
|
2324
|
+
A = !0, or(() => {
|
|
2325
|
+
if (A = !1, !n) {
|
|
2326
|
+
for (let t of Array.from(e.querySelectorAll(`img[${J}]`))) k(t);
|
|
2327
2327
|
for (let e of [...s.keys()]) k(e);
|
|
2328
2328
|
}
|
|
2329
2329
|
});
|
|
@@ -2332,12 +2332,12 @@ function br(e) {
|
|
|
2332
2332
|
for (let e of t) e.attributeName === "src" && k(e.target);
|
|
2333
2333
|
}
|
|
2334
2334
|
});
|
|
2335
|
-
return
|
|
2335
|
+
return j.observe(e, {
|
|
2336
2336
|
subtree: !0,
|
|
2337
2337
|
attributes: !0,
|
|
2338
2338
|
attributeFilter: ["src"]
|
|
2339
2339
|
}), () => {
|
|
2340
|
-
n = !0, w(), O.disconnect(),
|
|
2340
|
+
n = !0, w(), O.disconnect(), j.disconnect(), t?.terminate(), t = null;
|
|
2341
2341
|
for (let e of [...s.keys()]) v(e, null);
|
|
2342
2342
|
for (let e of [...a]) e();
|
|
2343
2343
|
o.clear(), r.clear();
|
|
@@ -2361,7 +2361,7 @@ function wr(e) {
|
|
|
2361
2361
|
if (typeof MutationObserver > "u") return () => {};
|
|
2362
2362
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
2363
2363
|
let n = t instanceof Element ? t : t.parentElement;
|
|
2364
|
-
return !n || n === e || n.closest(`[data-flemo-part-name], [${Cr}], [${
|
|
2364
|
+
return !n || n === e || n.closest(`[data-flemo-part-name], [${Cr}], [${J}]`) !== null;
|
|
2365
2365
|
}, 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), {
|
|
2366
2366
|
glass: t,
|
|
2367
2367
|
latest: n,
|
|
@@ -2446,26 +2446,26 @@ var Tr = "data-flemo-warm", Er = 3e3, Dr = [{ backgroundPosition: "0px 0px" }, {
|
|
|
2446
2446
|
iterations: Infinity,
|
|
2447
2447
|
direction: "alternate",
|
|
2448
2448
|
easing: "linear"
|
|
2449
|
-
}, kr = "position:fixed;top:0;left:0;width:48px;height:48px;pointer-events:none;opacity:0.02;background-image:linear-gradient(90deg,#808080 0 24px,#909090 24px 48px);background-repeat:repeat;background-size:48px 48px;", Ar = "data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAeuEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHWTbuMU6uEElTDZ1OsggExTbuMU6uEHFO7a1Osggdg7AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmsCrXsYMPQkBNgIxMYXZmNjMuMS4xMDBXQYxMYXZmNjMuMS4xMDBEiYhAj0AAAAAAABZUrmvWrgEAAAAAAABN14EBc8WIPqUZMMrLeHecgQAitZyDdW5kiIEAhoVWX1ZQOIOBASPjg4P+UCrgkLCBCLqBCJqBAlWwhFW5gQFV7oEA7AEAAAAAAAACAAASVMNn+nNzn2PAgGfImUWjh0VOQ09ERVJEh4xMYXZmNjMuMS4xMDBzc9VjwItjxYg+pRkwyst4d2fIoEWjh0VOQ09ERVJEh5NMYXZjNjMuMS4xMDAgbGlidnB4Z8ihRaOIRFVSQVRJT05Eh5MwMDowMDowMS4wMDAwMDAwMDAAH0O2dUWq54EAo5+BAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5WBABEAsQEAARAQABgAGG/0DAAEAACjlYEAIQCxAQABEBAAGAAYb/QMAAQAAKOVgQAyALEBAAEQEAAYABhv9AwABAAAo5WBAEMAsQEAARAQABgAGG/0DAAEAACjlYEAUwCxAQABEBAAGAAYb/QMAAQAAKOVgQBkALEBAAEQEAAYABhv9AwABAAAo5SBAHUAkQEAARAQFGAAYb/QMAAQAKOXgQCFALEBAAEQEAAYADA/9AwAAAD+aACjlYEAlgCxAQABEBAAGAAYb/QMAAQAAKOXgQCnALEBAAEQEAAYADA/9AwAAAD+aACjlYEAtwCxAQABEBAAGAAYb/QMAAQAAKOXgQDIALEBAAEQEAAYADA/9AwAAAD+aACjl4EA2QCxAQABEBAAGAAwP/QMAAAA/mgAo5WBAOkAsQEAARAQFGAAYWC/0AAgAACjn4EA+oAQAgCdASoIAAgAAEcIhYWIhYSIAgIABhloAACjl4EBCwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBARsAsQEAARAQABgAGG/0DAAEAACjl4EBLACxAQABEBAAGAAwP/QMAAAA/mgAo5WBAT0AsQEAARAQABgAGG/0DAAEAACjl4EBTQCxAQABEBAAGAAwP/QMAAAA/mgAo5eBAV4AsQEAARAQABgAMD/0DAAAAP5oAKOVgQFvALEBAAEQEBRgAGFgv9AAIAAAo5+BAX+AEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5eBAZAAsQEAARAQABgAMD/0DAAAAP5oAKOVgQGhALEBAAEQEAAYABhv9AwABAAAo5WBAbEAsQEAARAQABgAGG/0DAAEAACjlYEBwgCxAQABEBAAGAAYb/QMAAQAAKOXgQHTALEBAAEQEAAYADA/9AwAAAD+aACjlYEB4wCxAQABEBAAGAAYb/QMAAQAAKOWgQH0AJEBAAEQEBRgAMD/0DAAAP5oAKOVgQIFALEBAAEQEAAYABhv9AwABAAAo5WBAhUAsQEAARAQABgAGFgYL+gMAACjlYECJgCxAQABEBAAGAAYWBgv6AwAAKOVgQI3ALEBAAEQEAAYABhYGC/oDAAAo5WBAkcAsQEAARAQABgAGFgYL+gMAACjlYECWACxAQABEBAAGAAYWBgv6AwAAKOfgQJpgBACAJ0BKggACAAARwiFhYiFhIgCAgAGGWgAAKOXgQJ5ALEBAAEQEAAYADA/9AwAAAD+aACjlYECigCxAQABEBAAGAAYb/QMAAQAAKOXgQKbALEBAAEQEAAYADA/9AwAAAD+aACjl4ECqwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBArwAsQEAARAQABgAGG/0DAAEAACjlYECzQCxAQABEBAAGAAYb/QMAAQAAKOWgQLdAJEBAAEQEBRgAMD/0DAAAP5oAKOVgQLuALEBAAEQEAAYABhv9AwABAAAo5WBAv8AsQEAARAQABgAGFgYL+gMAACjlYEDDwCxAQABEBAAGAAYWBgv6AwAAKOVgQMgALEBAAEQEAAYABhYGC/oDAAAo5WBAzEAsQEAARAQABgAGFgYGBgQAACjlYEDQQCxAQABEBAAGAAYWC/0AAgAAKOVgQNSALEBAAEQEBRgAGFgv9AAIAAAo5WBA2MAsQEAARAQABgAGFgv9AAIAACjlYEDcwCxAQABEBAAGAAYWC/0AAgAAKOVgQOEALEBAAEQEAAYABhYGBgYEAAAo5WBA5UAsQEAARAQABgAGFgYL+gMAACjlYEDpQCxAQABEBAAGAAYWBgYGBAAAKOVgQO2ALEBAAEQEAAYABhYGC/oDAAAo5WBA8cAsQEAARAQABgAGFgYGBgQAACjlYED1wCxAQABEBAAGAAYWBgv6AwAABxTu2vJu4+zgQC3iveBAfGCAbDwgQO7kLOB+reL94EB8YIBsPCCAW27kbOCAX+3i/eBAfGCAbDwggI3u5GzggJpt4v3gQHxggGw8IIDiA==",
|
|
2450
|
-
Nr = 0, Mr?.cancel(), Mr = null,
|
|
2449
|
+
}, kr = "position:fixed;top:0;left:0;width:48px;height:48px;pointer-events:none;opacity:0.02;background-image:linear-gradient(90deg,#808080 0 24px,#909090 24px 48px);background-repeat:repeat;background-size:48px 48px;", Ar = "data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAeuEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHWTbuMU6uEElTDZ1OsggExTbuMU6uEHFO7a1Osggdg7AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmsCrXsYMPQkBNgIxMYXZmNjMuMS4xMDBXQYxMYXZmNjMuMS4xMDBEiYhAj0AAAAAAABZUrmvWrgEAAAAAAABN14EBc8WIPqUZMMrLeHecgQAitZyDdW5kiIEAhoVWX1ZQOIOBASPjg4P+UCrgkLCBCLqBCJqBAlWwhFW5gQFV7oEA7AEAAAAAAAACAAASVMNn+nNzn2PAgGfImUWjh0VOQ09ERVJEh4xMYXZmNjMuMS4xMDBzc9VjwItjxYg+pRkwyst4d2fIoEWjh0VOQ09ERVJEh5NMYXZjNjMuMS4xMDAgbGlidnB4Z8ihRaOIRFVSQVRJT05Eh5MwMDowMDowMS4wMDAwMDAwMDAAH0O2dUWq54EAo5+BAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5WBABEAsQEAARAQABgAGG/0DAAEAACjlYEAIQCxAQABEBAAGAAYb/QMAAQAAKOVgQAyALEBAAEQEAAYABhv9AwABAAAo5WBAEMAsQEAARAQABgAGG/0DAAEAACjlYEAUwCxAQABEBAAGAAYb/QMAAQAAKOVgQBkALEBAAEQEAAYABhv9AwABAAAo5SBAHUAkQEAARAQFGAAYb/QMAAQAKOXgQCFALEBAAEQEAAYADA/9AwAAAD+aACjlYEAlgCxAQABEBAAGAAYb/QMAAQAAKOXgQCnALEBAAEQEAAYADA/9AwAAAD+aACjlYEAtwCxAQABEBAAGAAYb/QMAAQAAKOXgQDIALEBAAEQEAAYADA/9AwAAAD+aACjl4EA2QCxAQABEBAAGAAwP/QMAAAA/mgAo5WBAOkAsQEAARAQFGAAYWC/0AAgAACjn4EA+oAQAgCdASoIAAgAAEcIhYWIhYSIAgIABhloAACjl4EBCwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBARsAsQEAARAQABgAGG/0DAAEAACjl4EBLACxAQABEBAAGAAwP/QMAAAA/mgAo5WBAT0AsQEAARAQABgAGG/0DAAEAACjl4EBTQCxAQABEBAAGAAwP/QMAAAA/mgAo5eBAV4AsQEAARAQABgAMD/0DAAAAP5oAKOVgQFvALEBAAEQEBRgAGFgv9AAIAAAo5+BAX+AEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5eBAZAAsQEAARAQABgAMD/0DAAAAP5oAKOVgQGhALEBAAEQEAAYABhv9AwABAAAo5WBAbEAsQEAARAQABgAGG/0DAAEAACjlYEBwgCxAQABEBAAGAAYb/QMAAQAAKOXgQHTALEBAAEQEAAYADA/9AwAAAD+aACjlYEB4wCxAQABEBAAGAAYb/QMAAQAAKOWgQH0AJEBAAEQEBRgAMD/0DAAAP5oAKOVgQIFALEBAAEQEAAYABhv9AwABAAAo5WBAhUAsQEAARAQABgAGFgYL+gMAACjlYECJgCxAQABEBAAGAAYWBgv6AwAAKOVgQI3ALEBAAEQEAAYABhYGC/oDAAAo5WBAkcAsQEAARAQABgAGFgYL+gMAACjlYECWACxAQABEBAAGAAYWBgv6AwAAKOfgQJpgBACAJ0BKggACAAARwiFhYiFhIgCAgAGGWgAAKOXgQJ5ALEBAAEQEAAYADA/9AwAAAD+aACjlYECigCxAQABEBAAGAAYb/QMAAQAAKOXgQKbALEBAAEQEAAYADA/9AwAAAD+aACjl4ECqwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBArwAsQEAARAQABgAGG/0DAAEAACjlYECzQCxAQABEBAAGAAYb/QMAAQAAKOWgQLdAJEBAAEQEBRgAMD/0DAAAP5oAKOVgQLuALEBAAEQEAAYABhv9AwABAAAo5WBAv8AsQEAARAQABgAGFgYL+gMAACjlYEDDwCxAQABEBAAGAAYWBgv6AwAAKOVgQMgALEBAAEQEAAYABhYGC/oDAAAo5WBAzEAsQEAARAQABgAGFgYGBgQAACjlYEDQQCxAQABEBAAGAAYWC/0AAgAAKOVgQNSALEBAAEQEBRgAGFgv9AAIAAAo5WBA2MAsQEAARAQABgAGFgv9AAIAACjlYEDcwCxAQABEBAAGAAYWC/0AAgAAKOVgQOEALEBAAEQEAAYABhYGBgYEAAAo5WBA5UAsQEAARAQABgAGFgYL+gMAACjlYEDpQCxAQABEBAAGAAYWBgYGBAAAKOVgQO2ALEBAAEQEAAYABhYGC/oDAAAo5WBA8cAsQEAARAQABgAGFgYGBgQAACjlYED1wCxAQABEBAAGAAYWBgv6AwAABxTu2vJu4+zgQC3iveBAfGCAbDwgQO7kLOB+reL94EB8YIBsPCCAW27kbOCAX+3i/eBAfGCAbDwggI3u5GzggJpt4v3gQHxggGw8IIDiA==", Y = null, jr = null, X = null, Mr = null, Nr = 0, Pr = () => {
|
|
2450
|
+
Nr = 0, Mr?.cancel(), Mr = null, X?.remove(), X = null;
|
|
2451
2451
|
};
|
|
2452
2452
|
function Fr() {
|
|
2453
2453
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
2454
|
-
if (Nr += 1, !
|
|
2455
|
-
|
|
2454
|
+
if (Nr += 1, !X) {
|
|
2455
|
+
X = document.createElement("div"), X.setAttribute(Tr, ""), X.setAttribute("aria-hidden", "true"), X.setAttribute("style", kr), document.body.appendChild(X);
|
|
2456
2456
|
try {
|
|
2457
|
-
Mr =
|
|
2457
|
+
Mr = X.animate(Dr, Or);
|
|
2458
2458
|
} catch {
|
|
2459
2459
|
Mr = null;
|
|
2460
2460
|
}
|
|
2461
|
-
if (!
|
|
2462
|
-
|
|
2463
|
-
let e =
|
|
2461
|
+
if (!Y && at()) try {
|
|
2462
|
+
Y = document.createElement("video"), Y.muted = !0, Y.loop = !0, Y.playsInline = !0, Y.setAttribute("aria-hidden", "true"), Y.setAttribute("data-flemo-warm-video", ""), Y.setAttribute("style", "position:fixed;top:0;left:52px;width:8px;height:8px;pointer-events:none;opacity:0.02;"), Y.src = Ar, document.body.appendChild(Y), Y.play()?.catch?.(() => {});
|
|
2463
|
+
let e = Y;
|
|
2464
2464
|
jr = () => {
|
|
2465
2465
|
document.visibilityState === "hidden" ? e.pause() : e.play()?.catch?.(() => {});
|
|
2466
2466
|
}, document.addEventListener("visibilitychange", jr);
|
|
2467
2467
|
} catch {
|
|
2468
|
-
|
|
2468
|
+
Y = null;
|
|
2469
2469
|
}
|
|
2470
2470
|
}
|
|
2471
2471
|
let e = !1, t = setTimeout(() => {
|
|
@@ -2482,7 +2482,7 @@ var Ir = () => {
|
|
|
2482
2482
|
let e = navigator.platform ?? "";
|
|
2483
2483
|
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
2484
2484
|
}, Lr = !1, Rr = () => {
|
|
2485
|
-
Lr || !
|
|
2485
|
+
Lr || !F() || !Ir() || (Lr = !0, console.warn("[flemo] DevTools device emulation detected. The emulated view is composited through an extra scaling pass, so transitions can show text shimmer and settle flashes that do NOT exist in a plain window or on a real device. Judge motion quality outside device emulation."));
|
|
2486
2486
|
}, zr = "data-flemo-img-hold", Br = (e) => !(e.complete && e.naturalWidth > 0), Vr = 4, Hr = (e) => {
|
|
2487
2487
|
if (!(e.complete && e.naturalWidth > 0)) return !1;
|
|
2488
2488
|
let t = e.getBoundingClientRect(), n = typeof devicePixelRatio == "number" && devicePixelRatio > 0 ? devicePixelRatio : 1, r = Math.max(1, t.width * n) * Math.max(1, t.height * n);
|
|
@@ -2677,7 +2677,7 @@ var Yr = (e, t, n, r) => {
|
|
|
2677
2677
|
i = Math.min(i, u / l);
|
|
2678
2678
|
}
|
|
2679
2679
|
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2680
|
-
},
|
|
2680
|
+
}, ai = (e, t, n) => {
|
|
2681
2681
|
if (e.duration <= 0) return null;
|
|
2682
2682
|
let r = ii(e, t, n);
|
|
2683
2683
|
if (r === null) return null;
|
|
@@ -2686,10 +2686,10 @@ var Yr = (e, t, n, r) => {
|
|
|
2686
2686
|
if (a === 0) return null;
|
|
2687
2687
|
let o = (e.delay + e.duration * (a / ei)) * 1e3;
|
|
2688
2688
|
return (e.delay + e.duration) * 1e3 - o < ti ? null : o;
|
|
2689
|
-
},
|
|
2689
|
+
}, oi = 1e3 / 120, si = 4, Z = 400, ci = 4, Q = (e) => {
|
|
2690
2690
|
let t = +e.toFixed(5);
|
|
2691
2691
|
return Object.is(t, -0) ? 0 : t;
|
|
2692
|
-
},
|
|
2692
|
+
}, li = (e, t, n) => {
|
|
2693
2693
|
if (e.duration <= 0) return null;
|
|
2694
2694
|
let r = Number.isFinite(n) && n > 0 ? n : 1, i = /* @__PURE__ */ new Set();
|
|
2695
2695
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) i.add(e);
|
|
@@ -2702,33 +2702,33 @@ var Yr = (e, t, n, r) => {
|
|
|
2702
2702
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2703
2703
|
a = Math.max(a, Math.abs(c - s) * r);
|
|
2704
2704
|
}
|
|
2705
|
-
if (a <
|
|
2705
|
+
if (a < si) return null;
|
|
2706
2706
|
let o = Qr(e.ease), s = Array(401);
|
|
2707
|
-
for (let e = 0; e <=
|
|
2708
|
-
let c = e.duration * 1e3 /
|
|
2707
|
+
for (let e = 0; e <= Z; e += 1) s[e] = o(e / Z);
|
|
2708
|
+
let c = e.duration * 1e3 / Z, l = 40 / a * c / oi, u = Z, d = 0;
|
|
2709
2709
|
for (let e = 399; e >= 0 && (d = Math.max(d, Math.abs(s[e + 1] - s[e])), !(d > l)); --e) u = e;
|
|
2710
|
-
for (let e = u; e <
|
|
2710
|
+
for (let e = u; e < Z; e += 1) if (s[e + 1] < s[e] || s[e] > 1) return null;
|
|
2711
2711
|
let f = (1 - s[u]) * a;
|
|
2712
2712
|
if (f <= 1) return null;
|
|
2713
2713
|
let p = Math.min(480, Math.floor(f)), m = u, h = (e) => {
|
|
2714
2714
|
let t = 1 - e / a;
|
|
2715
|
-
for (; m <
|
|
2715
|
+
for (; m < Z && s[m] < t;) m += 1;
|
|
2716
2716
|
if (m === 0) return 0;
|
|
2717
2717
|
let n = s[m - 1], r = s[m], i = r === n ? 1 : Math.max(0, Math.min(1, (t - n) / (r - n)));
|
|
2718
|
-
return (m - 1 + i) /
|
|
2718
|
+
return (m - 1 + i) / Z * 100;
|
|
2719
2719
|
}, g = h(p), _ = [];
|
|
2720
|
-
for (let e = 0; 100 /
|
|
2720
|
+
for (let e = 0; 100 / Z * e < g; e += ci) _.push(`${Q(s[e])} ${Q(e / Z * 100)}%`);
|
|
2721
2721
|
let v = g;
|
|
2722
2722
|
for (let e = p; e >= 2; --e) {
|
|
2723
2723
|
let t = h(e - 1);
|
|
2724
2724
|
if (t > v) {
|
|
2725
|
-
let n =
|
|
2726
|
-
_.push(`${n} ${
|
|
2725
|
+
let n = Q(1 - e / a);
|
|
2726
|
+
_.push(`${n} ${Q(v)}%`, `${n} ${Q(t)}%`);
|
|
2727
2727
|
}
|
|
2728
2728
|
v = t;
|
|
2729
2729
|
}
|
|
2730
|
-
return _.push(`1 ${
|
|
2731
|
-
},
|
|
2730
|
+
return _.push(`1 ${Q(v)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2731
|
+
}, ui = 12, di = (e, t, n, r) => {
|
|
2732
2732
|
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2733
2733
|
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
2734
2734
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) a.add(e);
|
|
@@ -2741,26 +2741,26 @@ var Yr = (e, t, n, r) => {
|
|
|
2741
2741
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2742
2742
|
o = Math.max(o, Math.abs(c - s) * i);
|
|
2743
2743
|
}
|
|
2744
|
-
if (o <
|
|
2744
|
+
if (o < ui) return null;
|
|
2745
2745
|
let s = Qr(e.ease), c = Array(401);
|
|
2746
|
-
for (let e = 0; e <=
|
|
2747
|
-
let l = e.duration * 1e3, u = l /
|
|
2746
|
+
for (let e = 0; e <= Z; e += 1) c[e] = s(e / Z);
|
|
2747
|
+
let l = e.duration * 1e3, u = l / Z, d = 1 / o * (u / r), f = Z, p = 0;
|
|
2748
2748
|
for (let e = 399; e >= 0 && (p = Math.max(p, Math.abs(c[e + 1] - c[e])), !(p > d)); --e) f = e;
|
|
2749
|
-
if (f === 0 || f >=
|
|
2750
|
-
for (let e = f; e <
|
|
2749
|
+
if (f === 0 || f >= Z) return null;
|
|
2750
|
+
for (let e = f; e < Z; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2751
2751
|
let m = (1 - c[f]) * o;
|
|
2752
|
-
if (m <= 1 || m >
|
|
2753
|
-
let h = f /
|
|
2752
|
+
if (m <= 1 || m > ui) return null;
|
|
2753
|
+
let h = f / Z * 100, g = m * r / l * 100;
|
|
2754
2754
|
if (h + g >= 100) return null;
|
|
2755
2755
|
let _ = [];
|
|
2756
|
-
for (let e = 0; e <= f; e +=
|
|
2757
|
-
return _.push(`${
|
|
2758
|
-
},
|
|
2756
|
+
for (let e = 0; e <= f; e += ci) _.push(`${Q(c[e])} ${Q(e / Z * 100)}%`);
|
|
2757
|
+
return _.push(`${Q(c[f])} ${Q(h)}%`), _.push(`1 ${Q(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2758
|
+
}, fi = /* @__PURE__ */ new WeakMap(), pi = Symbol("flemo-layer-owner"), mi = (e, t) => {
|
|
2759
2759
|
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2760
|
-
},
|
|
2760
|
+
}, hi = (e, t) => {
|
|
2761
2761
|
let n = e.trim() === "none" ? "" : e.trim();
|
|
2762
2762
|
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2763
|
-
},
|
|
2763
|
+
}, gi = (e, t) => {
|
|
2764
2764
|
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2765
2765
|
for (let e of t.willChange.split(",")) {
|
|
2766
2766
|
let t = e.trim();
|
|
@@ -2771,13 +2771,13 @@ var Yr = (e, t, n, r) => {
|
|
|
2771
2771
|
e.containment && (r = !0);
|
|
2772
2772
|
}
|
|
2773
2773
|
e.style.willChange = [...n].join(", ");
|
|
2774
|
-
let i =
|
|
2774
|
+
let i = hi(t.contain, r);
|
|
2775
2775
|
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2776
|
-
},
|
|
2777
|
-
let i =
|
|
2776
|
+
}, _i = (e, t, n = !1, r = pi) => {
|
|
2777
|
+
let i = bn(t), a = fi.get(e);
|
|
2778
2778
|
if (i.length === 0) {
|
|
2779
2779
|
if (!a) return;
|
|
2780
|
-
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending),
|
|
2780
|
+
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), mi(e, a), fi.delete(e)) : gi(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), mi(e, a), fi.delete(e));
|
|
2781
2781
|
return;
|
|
2782
2782
|
}
|
|
2783
2783
|
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
@@ -2786,18 +2786,18 @@ var Yr = (e, t, n, r) => {
|
|
|
2786
2786
|
willChange: e.style.willChange,
|
|
2787
2787
|
contain: e.style.contain,
|
|
2788
2788
|
pending: null
|
|
2789
|
-
},
|
|
2789
|
+
}, fi.set(e, a)), a.owners.set(r, {
|
|
2790
2790
|
properties: i,
|
|
2791
2791
|
containment: n
|
|
2792
|
-
}), a.settleOwner = null,
|
|
2793
|
-
},
|
|
2794
|
-
let n =
|
|
2792
|
+
}), a.settleOwner = null, gi(e, a);
|
|
2793
|
+
}, vi = (e, t = pi) => {
|
|
2794
|
+
let n = fi.get(e);
|
|
2795
2795
|
if (!(!n || !n.owners.has(t))) {
|
|
2796
2796
|
if (n.owners.delete(t), n.owners.size > 0) {
|
|
2797
|
-
|
|
2797
|
+
gi(e, n);
|
|
2798
2798
|
return;
|
|
2799
2799
|
}
|
|
2800
|
-
if (
|
|
2800
|
+
if (At() && typeof e.closest == "function" && e.closest("[data-flemo-screen]")) {
|
|
2801
2801
|
n.pending != null && clearTimeout(n.pending), n.pending = null, n.settleOwner = null, e.style.willChange = "transform", n.contain ? e.style.contain = n.contain : e.style.removeProperty("contain");
|
|
2802
2802
|
return;
|
|
2803
2803
|
}
|
|
@@ -2805,33 +2805,33 @@ var Yr = (e, t, n, r) => {
|
|
|
2805
2805
|
guard shields exotic embedders, where an immediate demotion is simply
|
|
2806
2806
|
the pre-hold behavior. */
|
|
2807
2807
|
if (n.settleOwner = t, n.pending != null && clearTimeout(n.pending), typeof setTimeout != "function") {
|
|
2808
|
-
|
|
2808
|
+
mi(e, n), fi.delete(e);
|
|
2809
2809
|
return;
|
|
2810
2810
|
}
|
|
2811
|
-
|
|
2811
|
+
yi(e, n);
|
|
2812
2812
|
}
|
|
2813
|
-
},
|
|
2813
|
+
}, yi = (e, t) => {
|
|
2814
2814
|
t.pending = setTimeout(() => {
|
|
2815
2815
|
if (t.pending = null, ir()) {
|
|
2816
2816
|
or(() => {
|
|
2817
|
-
|
|
2817
|
+
fi.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null && yi(e, t);
|
|
2818
2818
|
});
|
|
2819
2819
|
return;
|
|
2820
2820
|
}
|
|
2821
|
-
|
|
2821
|
+
mi(e, t), fi.delete(e);
|
|
2822
2822
|
}, 300);
|
|
2823
|
-
},
|
|
2823
|
+
}, bi = (e, t, n) => {
|
|
2824
2824
|
let r = e.driver;
|
|
2825
2825
|
return r === "native" || r === "player" ? r : "player";
|
|
2826
|
-
},
|
|
2826
|
+
}, xi = 1e3 / 60 * 2, Si = "flemo-", Ci = /* @__PURE__ */ new WeakMap(), wi = (e, t, n) => {
|
|
2827
2827
|
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2828
2828
|
let e = r.animationName;
|
|
2829
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2829
|
+
if (typeof e != "string" || !e.startsWith(Si) || r.playState !== "running" || Ci.get(r) === n) continue;
|
|
2830
2830
|
let i = r.startTime;
|
|
2831
|
-
typeof i == "number" && (r.startTime = i + t,
|
|
2831
|
+
typeof i == "number" && (r.startTime = i + t, Ci.set(r, n));
|
|
2832
2832
|
}
|
|
2833
|
-
},
|
|
2834
|
-
function
|
|
2833
|
+
}, Ti = /* @__PURE__ */ new WeakSet(), Ei = 1e3, Di = 3e3;
|
|
2834
|
+
function Oi(e, t, n) {
|
|
2835
2835
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2836
2836
|
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2837
2837
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -2845,7 +2845,7 @@ function Di(e, t, n) {
|
|
|
2845
2845
|
i = !0, m.disconnect();
|
|
2846
2846
|
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2847
2847
|
let e = t.animationName;
|
|
2848
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2848
|
+
if (typeof e != "string" || !e.startsWith(Si) || t.playState !== "running" || Ti.has(t)) continue;
|
|
2849
2849
|
let n = t.currentTime;
|
|
2850
2850
|
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2851
2851
|
try {
|
|
@@ -2853,18 +2853,18 @@ function Di(e, t, n) {
|
|
|
2853
2853
|
} catch {
|
|
2854
2854
|
continue;
|
|
2855
2855
|
}
|
|
2856
|
-
|
|
2856
|
+
Ti.add(t), c.push(t);
|
|
2857
2857
|
}
|
|
2858
2858
|
}
|
|
2859
2859
|
if (c.length === 0) return;
|
|
2860
|
-
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f,
|
|
2861
|
-
let e =
|
|
2860
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, Ei));
|
|
2861
|
+
let e = Ni(t, () => {
|
|
2862
2862
|
a || n?.();
|
|
2863
2863
|
});
|
|
2864
2864
|
if (l = e, typeof setTimeout == "function") {
|
|
2865
2865
|
let t = setTimeout(() => {
|
|
2866
2866
|
l === e && (l = null), e();
|
|
2867
|
-
},
|
|
2867
|
+
}, Di), n = e;
|
|
2868
2868
|
l = () => {
|
|
2869
2869
|
clearTimeout(t), n();
|
|
2870
2870
|
};
|
|
@@ -2879,16 +2879,16 @@ function Di(e, t, n) {
|
|
|
2879
2879
|
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2880
2880
|
};
|
|
2881
2881
|
}
|
|
2882
|
-
var
|
|
2883
|
-
function
|
|
2882
|
+
var ki = 150, Ai = 4e3, ji = 400;
|
|
2883
|
+
function Mi(e, t, n = !0, r = !1) {
|
|
2884
2884
|
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2885
2885
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2886
2886
|
let i = [], a = /* @__PURE__ */ new Map();
|
|
2887
2887
|
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2888
2888
|
let t = e.animationName;
|
|
2889
|
-
if (typeof t != "string" || !t.startsWith(
|
|
2889
|
+
if (typeof t != "string" || !t.startsWith(Si) || e.playState !== "running" || Ti.has(e)) continue;
|
|
2890
2890
|
let n = e.currentTime;
|
|
2891
|
-
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (
|
|
2891
|
+
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (Ti.add(e), i.push(e), a.set(e, typeof n == "number" ? n : 0));
|
|
2892
2892
|
}
|
|
2893
2893
|
if (i.length === 0) return () => {};
|
|
2894
2894
|
let o = 0, s = null, c = !1, l = !1, u = !1, d = null, f = null, p = 0, m = (e) => {
|
|
@@ -2901,7 +2901,7 @@ function ji(e, t, n = !0, r = !1) {
|
|
|
2901
2901
|
if (typeof r != "number" || typeof i != "number") continue;
|
|
2902
2902
|
let o = (a.get(n) ?? 0) + e;
|
|
2903
2903
|
n.startTime = i + (r - o), a.set(n, o);
|
|
2904
|
-
let s = r +
|
|
2904
|
+
let s = r + Ai;
|
|
2905
2905
|
t = Math.max(t, s - o);
|
|
2906
2906
|
}
|
|
2907
2907
|
return t;
|
|
@@ -2909,7 +2909,7 @@ function ji(e, t, n = !0, r = !1) {
|
|
|
2909
2909
|
if (c) return;
|
|
2910
2910
|
if (d === null && (d = e), f !== null) {
|
|
2911
2911
|
let t = e - f;
|
|
2912
|
-
p += Math.min(Math.max(0, t),
|
|
2912
|
+
p += Math.min(Math.max(0, t), xi);
|
|
2913
2913
|
}
|
|
2914
2914
|
if (f = e, !l) {
|
|
2915
2915
|
if (l = !0, r) {
|
|
@@ -2921,7 +2921,7 @@ function ji(e, t, n = !0, r = !1) {
|
|
|
2921
2921
|
if (typeof n != "number" || typeof r != "number") continue;
|
|
2922
2922
|
let i = a.get(t) ?? 0;
|
|
2923
2923
|
if (n <= i + 33.333333333333336) continue;
|
|
2924
|
-
let o = n - (i +
|
|
2924
|
+
let o = n - (i + xi);
|
|
2925
2925
|
t.startTime = r + o, e = Math.max(e, o);
|
|
2926
2926
|
}
|
|
2927
2927
|
e > 0 && t?.(e);
|
|
@@ -2935,13 +2935,13 @@ function ji(e, t, n = !0, r = !1) {
|
|
|
2935
2935
|
if (e.playState !== "running") continue;
|
|
2936
2936
|
let t = e.startTime;
|
|
2937
2937
|
if (typeof t == "number") {
|
|
2938
|
-
e.startTime = t +
|
|
2938
|
+
e.startTime = t + Ai;
|
|
2939
2939
|
continue;
|
|
2940
2940
|
}
|
|
2941
2941
|
let n = e.timeline?.currentTime;
|
|
2942
|
-
typeof n == "number" && (e.startTime = n +
|
|
2942
|
+
typeof n == "number" && (e.startTime = n + Ai);
|
|
2943
2943
|
}
|
|
2944
|
-
typeof setTimeout == "function" && (s = setTimeout(() => m(p +
|
|
2944
|
+
typeof setTimeout == "function" && (s = setTimeout(() => m(p + xi), ji)), o = requestAnimationFrame(h);
|
|
2945
2945
|
return;
|
|
2946
2946
|
}
|
|
2947
2947
|
if (!u) {
|
|
@@ -2964,13 +2964,13 @@ function ji(e, t, n = !0, r = !1) {
|
|
|
2964
2964
|
t?.(g);
|
|
2965
2965
|
return;
|
|
2966
2966
|
}
|
|
2967
|
-
e - d <
|
|
2967
|
+
e - d < ki && (o = requestAnimationFrame(h));
|
|
2968
2968
|
};
|
|
2969
2969
|
return o = requestAnimationFrame(h), () => {
|
|
2970
|
-
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p +
|
|
2970
|
+
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p + xi);
|
|
2971
2971
|
};
|
|
2972
2972
|
}
|
|
2973
|
-
function
|
|
2973
|
+
function Ni(e, t) {
|
|
2974
2974
|
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2975
2975
|
exotic embedders. */
|
|
2976
2976
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
@@ -2979,8 +2979,8 @@ function Mi(e, t) {
|
|
|
2979
2979
|
if (r !== null) {
|
|
2980
2980
|
let n = o - r;
|
|
2981
2981
|
if (n > 33.333333333333336) {
|
|
2982
|
-
let r = n -
|
|
2983
|
-
for (let t of e()) t &&
|
|
2982
|
+
let r = n - xi;
|
|
2983
|
+
for (let t of e()) t && wi(t, r, o);
|
|
2984
2984
|
t?.(r);
|
|
2985
2985
|
}
|
|
2986
2986
|
}
|
|
@@ -2991,29 +2991,29 @@ function Mi(e, t) {
|
|
|
2991
2991
|
i = !0, cancelAnimationFrame(n);
|
|
2992
2992
|
};
|
|
2993
2993
|
}
|
|
2994
|
-
var
|
|
2995
|
-
function
|
|
2994
|
+
var Pi = /* @__PURE__ */ new WeakMap();
|
|
2995
|
+
function Fi(e, t, n, r = !0, i = !1) {
|
|
2996
2996
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2997
|
-
let a =
|
|
2998
|
-
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () =>
|
|
2997
|
+
let a = Pi.get(e);
|
|
2998
|
+
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () => Ii(e);
|
|
2999
2999
|
let o = null, s = !1, c = !1, l = () => {
|
|
3000
|
-
s || c || (s = !0, u.disconnect(), o =
|
|
3000
|
+
s || c || (s = !0, u.disconnect(), o = Mi(t, n, r, i));
|
|
3001
3001
|
}, u = new MutationObserver(() => {
|
|
3002
3002
|
e.getAttribute("data-flemo-anim-hold") === "false" && l();
|
|
3003
3003
|
});
|
|
3004
3004
|
return e.getAttribute("data-flemo-anim-hold") === "false" ? l() : u.observe(e, {
|
|
3005
3005
|
attributes: !0,
|
|
3006
3006
|
attributeFilter: ["data-flemo-anim-hold"]
|
|
3007
|
-
}),
|
|
3007
|
+
}), Pi.set(e, {
|
|
3008
3008
|
refs: 1,
|
|
3009
3009
|
pendingDrop: null,
|
|
3010
3010
|
dispose: () => {
|
|
3011
|
-
c = !0, u.disconnect(), o?.(),
|
|
3011
|
+
c = !0, u.disconnect(), o?.(), Pi.delete(e);
|
|
3012
3012
|
}
|
|
3013
|
-
}), () =>
|
|
3013
|
+
}), () => Ii(e);
|
|
3014
3014
|
}
|
|
3015
|
-
var
|
|
3016
|
-
let t =
|
|
3015
|
+
var Ii = (e) => {
|
|
3016
|
+
let t = Pi.get(e);
|
|
3017
3017
|
if (t && (--t.refs, !(t.refs > 0))) {
|
|
3018
3018
|
/* v8 ignore next 4 -- setTimeout exists in every runtime under test. */
|
|
3019
3019
|
if (typeof setTimeout != "function") {
|
|
@@ -3022,36 +3022,36 @@ var Fi = (e) => {
|
|
|
3022
3022
|
}
|
|
3023
3023
|
t.pendingDrop !== null && clearTimeout(t.pendingDrop), t.pendingDrop = setTimeout(t.dispose, 0);
|
|
3024
3024
|
}
|
|
3025
|
-
},
|
|
3026
|
-
let e =
|
|
3027
|
-
|
|
3025
|
+
}, Li = !1, Ri = 0, zi = [], Bi = () => {
|
|
3026
|
+
let e = zi;
|
|
3027
|
+
zi = [];
|
|
3028
3028
|
for (let t of e) t();
|
|
3029
|
-
},
|
|
3030
|
-
if (
|
|
3031
|
-
|
|
3029
|
+
}, Vi = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), Hi = () => {
|
|
3030
|
+
if (Li || typeof window > "u" || typeof window.fetch != "function") return;
|
|
3031
|
+
Li = !0;
|
|
3032
3032
|
let e = window.fetch.bind(window);
|
|
3033
|
-
window.fetch = (...t) => e(...t).then((e) =>
|
|
3034
|
-
|
|
3033
|
+
window.fetch = (...t) => e(...t).then((e) => Ri <= 0 || Vi(e) ? e : new Promise((t) => {
|
|
3034
|
+
zi.push(() => t(e));
|
|
3035
3035
|
}), (e) => {
|
|
3036
|
-
if (
|
|
3036
|
+
if (Ri <= 0) throw e;
|
|
3037
3037
|
return new Promise((t, n) => {
|
|
3038
|
-
|
|
3038
|
+
zi.push(() => n(e));
|
|
3039
3039
|
});
|
|
3040
3040
|
});
|
|
3041
|
-
},
|
|
3042
|
-
function
|
|
3041
|
+
}, Ui = 2e3;
|
|
3042
|
+
function Wi(e = Ui) {
|
|
3043
3043
|
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
3044
|
-
if (
|
|
3045
|
-
|
|
3044
|
+
if (Hi(), !Li) return () => {};
|
|
3045
|
+
Ri += 1;
|
|
3046
3046
|
let t = !1, n = null, r = () => {
|
|
3047
|
-
t || (t = !0, n !== null && clearTimeout(n),
|
|
3047
|
+
t || (t = !0, n !== null && clearTimeout(n), Ri = Math.max(0, Ri - 1), Ri === 0 && Bi());
|
|
3048
3048
|
};
|
|
3049
|
-
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(
|
|
3049
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(Ui, e))), r;
|
|
3050
3050
|
}
|
|
3051
|
-
|
|
3051
|
+
Hi();
|
|
3052
3052
|
//#endregion
|
|
3053
3053
|
//#region src/core/engine/transitionPlayer.ts
|
|
3054
|
-
var
|
|
3054
|
+
var Gi = [
|
|
3055
3055
|
"x",
|
|
3056
3056
|
"y",
|
|
3057
3057
|
"z",
|
|
@@ -3062,7 +3062,7 @@ var Wi = [
|
|
|
3062
3062
|
"rotateX",
|
|
3063
3063
|
"rotateY",
|
|
3064
3064
|
"rotateZ"
|
|
3065
|
-
],
|
|
3065
|
+
], Ki = new Set(Gi), qi = {
|
|
3066
3066
|
x: 0,
|
|
3067
3067
|
y: 0,
|
|
3068
3068
|
z: 0,
|
|
@@ -3073,7 +3073,7 @@ var Wi = [
|
|
|
3073
3073
|
rotateX: 0,
|
|
3074
3074
|
rotateY: 0,
|
|
3075
3075
|
rotateZ: 0
|
|
3076
|
-
},
|
|
3076
|
+
}, Ji = (e, t) => {
|
|
3077
3077
|
if (typeof t == "number") return {
|
|
3078
3078
|
value: t,
|
|
3079
3079
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -3092,18 +3092,18 @@ var Wi = [
|
|
|
3092
3092
|
value: i,
|
|
3093
3093
|
unit: a === "" && i === 0 ? "px" : a
|
|
3094
3094
|
};
|
|
3095
|
-
},
|
|
3096
|
-
let n = e.match(
|
|
3097
|
-
if (n.length !== r.length || e.replace(
|
|
3095
|
+
}, Yi = /-?\d*\.?\d+/g, Xi = (e, t) => {
|
|
3096
|
+
let n = e.match(Yi) ?? [], r = t.match(Yi) ?? [];
|
|
3097
|
+
if (n.length !== r.length || e.replace(Yi, " ") !== t.replace(Yi, " ")) return null;
|
|
3098
3098
|
let i = n.map(Number), a = r.map(Number);
|
|
3099
3099
|
return (t) => {
|
|
3100
3100
|
let n = 0;
|
|
3101
|
-
return e.replace(
|
|
3101
|
+
return e.replace(Yi, () => {
|
|
3102
3102
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
3103
3103
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
3104
3104
|
});
|
|
3105
3105
|
};
|
|
3106
|
-
},
|
|
3106
|
+
}, Zi = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Qi = (e) => typeof e == "object" && !!e && !Array.isArray(e), $i = (e) => Qi(e) ? Object.keys(e) : [], ea = (e, t) => Qi(e) ? e[t] : void 0, ta = {
|
|
3107
3107
|
x: 0,
|
|
3108
3108
|
y: 0,
|
|
3109
3109
|
z: 0,
|
|
@@ -3114,41 +3114,41 @@ var Wi = [
|
|
|
3114
3114
|
rotateX: 2,
|
|
3115
3115
|
rotateY: 2,
|
|
3116
3116
|
rotateZ: 2
|
|
3117
|
-
},
|
|
3117
|
+
}, na = (e) => {
|
|
3118
3118
|
let t = 0, n = -1;
|
|
3119
3119
|
for (let r of e) {
|
|
3120
|
-
if (!
|
|
3121
|
-
let e =
|
|
3120
|
+
if (!Ki.has(r)) continue;
|
|
3121
|
+
let e = ta[r];
|
|
3122
3122
|
if (e < t) return !1;
|
|
3123
3123
|
if (t = e, e === 2) {
|
|
3124
|
-
let e =
|
|
3124
|
+
let e = Gi.indexOf(r);
|
|
3125
3125
|
if (e < n) return !1;
|
|
3126
3126
|
n = e;
|
|
3127
3127
|
}
|
|
3128
3128
|
}
|
|
3129
3129
|
return !0;
|
|
3130
|
-
},
|
|
3130
|
+
}, ra = (e) => {
|
|
3131
3131
|
let t = [];
|
|
3132
3132
|
for (let n of e) {
|
|
3133
|
-
if (!
|
|
3134
|
-
let e =
|
|
3133
|
+
if (!Ki.has(n)) continue;
|
|
3134
|
+
let e = ta[n] === 0 ? "T" : n;
|
|
3135
3135
|
(e !== "T" || t[t.length - 1] !== "T") && t.push(e);
|
|
3136
3136
|
}
|
|
3137
3137
|
return t;
|
|
3138
|
-
}, ra = (e, t) => {
|
|
3139
|
-
let n = na(e), r = na(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
3140
|
-
return i.every((e, t) => a[t] === e);
|
|
3141
3138
|
}, ia = (e, t) => {
|
|
3142
|
-
let n =
|
|
3143
|
-
|
|
3139
|
+
let n = ra(e), r = ra(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
3140
|
+
return i.every((e, t) => a[t] === e);
|
|
3141
|
+
}, aa = (e, t) => {
|
|
3142
|
+
let n = $i(e.from), r = $i(e.to);
|
|
3143
|
+
if (!na(n) || !na(r) || !ia(n, r)) return null;
|
|
3144
3144
|
let i = /* @__PURE__ */ new Set([...n, ...r]), a = [], o = null, s = [], c = [];
|
|
3145
3145
|
for (let n of i) {
|
|
3146
|
-
let r =
|
|
3147
|
-
if (
|
|
3146
|
+
let r = ea(e.from, n), i = ea(e.to, n);
|
|
3147
|
+
if (Ki.has(n)) {
|
|
3148
3148
|
let e = n, o = {
|
|
3149
|
-
value:
|
|
3149
|
+
value: qi[e],
|
|
3150
3150
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
3151
|
-
}, s = r === void 0 ? o :
|
|
3151
|
+
}, s = r === void 0 ? o : Ji(e, r), c = i === void 0 ? o : Ji(e, i);
|
|
3152
3152
|
if (!s || !c || s.unit !== c.unit && s.value !== 0 && c.value !== 0) return null;
|
|
3153
3153
|
let l = s.value === 0 && s.unit !== c.unit ? c.unit : s.unit, u = l === "%", d = 0;
|
|
3154
3154
|
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), a.push({
|
|
@@ -3179,15 +3179,15 @@ var Wi = [
|
|
|
3179
3179
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
3180
3180
|
if (l === u) {
|
|
3181
3181
|
c.push({
|
|
3182
|
-
property:
|
|
3182
|
+
property: Zi(n),
|
|
3183
3183
|
value: l
|
|
3184
3184
|
});
|
|
3185
3185
|
continue;
|
|
3186
3186
|
}
|
|
3187
|
-
let d =
|
|
3187
|
+
let d = Xi(l, u);
|
|
3188
3188
|
if (!d) return null;
|
|
3189
3189
|
s.push({
|
|
3190
|
-
property:
|
|
3190
|
+
property: Zi(n),
|
|
3191
3191
|
mix: d
|
|
3192
3192
|
});
|
|
3193
3193
|
}
|
|
@@ -3197,26 +3197,26 @@ var Wi = [
|
|
|
3197
3197
|
strings: s,
|
|
3198
3198
|
constants: c
|
|
3199
3199
|
};
|
|
3200
|
-
},
|
|
3201
|
-
if (!
|
|
3200
|
+
}, oa = 1, sa = 1e3 / 60, ca = (e) => !F() && e > 0 && e < 3, la = .6, ua = 600, da = (e, t) => {
|
|
3201
|
+
if (!at()) return !1;
|
|
3202
3202
|
for (let n of e.transforms) {
|
|
3203
3203
|
if (n.prop !== "x" && n.prop !== "y") continue;
|
|
3204
3204
|
let e = Math.abs(n.to.value - n.from.value);
|
|
3205
3205
|
if (n.from.unit === "%") {
|
|
3206
|
-
if (e / 100 >=
|
|
3207
|
-
} else if (e * Math.max(1, t) >=
|
|
3206
|
+
if (e / 100 >= la) return !1;
|
|
3207
|
+
} else if (e * Math.max(1, t) >= ua) return !1;
|
|
3208
3208
|
}
|
|
3209
3209
|
return !0;
|
|
3210
|
-
},
|
|
3210
|
+
}, fa = 12, pa = (e, t, n, r, i = sa) => {
|
|
3211
3211
|
let a = 0, o = 0, s = !1, c = [], l = !0;
|
|
3212
|
-
for (let u of
|
|
3212
|
+
for (let u of Gi) {
|
|
3213
3213
|
let d = e.find((e) => e.prop === u);
|
|
3214
3214
|
if (!d) continue;
|
|
3215
3215
|
let f = d.from.value + (d.to.value - d.from.value) * t;
|
|
3216
3216
|
if (d.from.unit === "%" && (f *= d.percentBase), u === "x" || u === "y") {
|
|
3217
|
-
let e = u === "x" ? r.x : r.y, t =
|
|
3217
|
+
let e = u === "x" ? r.x : r.y, t = wt(), c = e === null ? Infinity : Math.abs(f - e) * n, p = t === null && r.glide === !0, m = p ? !1 : t === "always" || t === null && ca(n) ? !0 : t === "off" ? !1 : t === "hybrid" ? c >= Et() : e === null || c * sa / Math.max(1, i) >= oa, h = d.to.value;
|
|
3218
3218
|
d.from.unit === "%" && (h *= d.percentBase);
|
|
3219
|
-
let g = u === "x" ? "landingX" : "landingY", _ = r[g], v = Math.abs(f - h) * n, y = e === null ? Infinity : Math.abs(f - e) * n, b = !p && n > 0 && (_ != null || y < 1 && v <=
|
|
3219
|
+
let g = u === "x" ? "landingX" : "landingY", _ = r[g], v = Math.abs(f - h) * n, y = e === null ? Infinity : Math.abs(f - e) * n, b = !p && n > 0 && (_ != null || y < 1 && v <= fa), x = u === "x" ? "writtenX" : "writtenY", S;
|
|
3220
3220
|
if (b) {
|
|
3221
3221
|
let e = _ ?? r[x] ?? f, t = 1 / n, i = Math.abs(h - e) <= t + 1e-6 ? h : e + Math.sign(h - e) * t;
|
|
3222
3222
|
S = Math.round(i * 1e3) / 1e3, r[g] = i, r[x] = null, i !== h && (r.pendingLanding = !0);
|
|
@@ -3224,42 +3224,42 @@ var Wi = [
|
|
|
3224
3224
|
u === "x" ? (r.x = f, a = S) : (r.y = f, o = S), s = !0, S !== 0 && (l = !1);
|
|
3225
3225
|
continue;
|
|
3226
3226
|
}
|
|
3227
|
-
let p =
|
|
3227
|
+
let p = qi[u];
|
|
3228
3228
|
f !== p && (l = !1), u === "z" ? c.push(`translateZ(${f}px)`) : u === "scale" ? c.push(`scale(${f})`) : u === "scaleX" ? c.push(`scaleX(${f})`) : u === "scaleY" ? c.push(`scaleY(${f})`) : u === "rotate" || u === "rotateZ" ? c.push(`rotate(${f}deg)`) : u === "rotateX" ? c.push(`rotateX(${f}deg)`) : u === "rotateY" && c.push(`rotateY(${f}deg)`);
|
|
3229
3229
|
}
|
|
3230
3230
|
return !s && c.length === 0 ? "" : l ? "none" : [...s ? [`translate3d(${a}px, ${o}px, 0)`] : [], ...c].join(" ");
|
|
3231
|
-
},
|
|
3231
|
+
}, ma = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), ha = (e) => {
|
|
3232
3232
|
let t = {};
|
|
3233
|
-
for (let n of
|
|
3233
|
+
for (let n of V(e)) t[ma(n.property)] = n.value;
|
|
3234
3234
|
return t;
|
|
3235
|
-
},
|
|
3235
|
+
}, ga = (e, t) => {
|
|
3236
3236
|
if (typeof e.animate != "function") return null;
|
|
3237
3237
|
try {
|
|
3238
|
-
let n = e.animate([
|
|
3238
|
+
let n = e.animate([ha(t.from), ha(t.to)], {
|
|
3239
3239
|
duration: Math.max(0, t.duration * 1e3),
|
|
3240
3240
|
delay: Math.max(0, t.delay * 1e3),
|
|
3241
|
-
easing:
|
|
3241
|
+
easing: xn(t.ease),
|
|
3242
3242
|
fill: "both"
|
|
3243
3243
|
});
|
|
3244
3244
|
return n.pause(), n.currentTime = 0, n;
|
|
3245
3245
|
} catch {
|
|
3246
3246
|
return null;
|
|
3247
3247
|
}
|
|
3248
|
-
},
|
|
3249
|
-
Number.isFinite(e) && (e <
|
|
3250
|
-
},
|
|
3248
|
+
}, _a = 1.6, va = 1e3 / 600, ya = 28, ba = 42, xa = sa, Sa = () => xa, Ca = (e) => {
|
|
3249
|
+
Number.isFinite(e) && (e < va || e > ba || (xa = Math.min(sa, Math.max(va, e))));
|
|
3250
|
+
}, wa = () => ({
|
|
3251
3251
|
request: (e) => requestAnimationFrame(e),
|
|
3252
3252
|
cancel: (e) => cancelAnimationFrame(e),
|
|
3253
3253
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
3254
|
-
}),
|
|
3254
|
+
}), Ta = ((e = wa()) => {
|
|
3255
3255
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
3256
3256
|
join: (n, r) => {
|
|
3257
|
-
let i =
|
|
3257
|
+
let i = bt() === "scrub", s = !i && !F() && St() === "on" && r.status !== "PUSHING" && r.status !== "REPLACING", c = i ? null : aa(r.motion, r.element), l = !c || s ? ga(r.element, r.motion) : null, u = l ? null : c;
|
|
3258
3258
|
if (!u && !l) return null;
|
|
3259
3259
|
let d = t.get(n);
|
|
3260
3260
|
d || (d = {
|
|
3261
3261
|
tracks: [],
|
|
3262
|
-
frameIntervalMs:
|
|
3262
|
+
frameIntervalMs: xa,
|
|
3263
3263
|
recentGaps: [],
|
|
3264
3264
|
navCutMs: null,
|
|
3265
3265
|
navComplete: null,
|
|
@@ -3269,7 +3269,7 @@ var Wi = [
|
|
|
3269
3269
|
lastTime: null,
|
|
3270
3270
|
frameHandle: null
|
|
3271
3271
|
}, t.set(n, d));
|
|
3272
|
-
let f =
|
|
3272
|
+
let f = ai(r.motion, r.element, e.devicePixelRatio() || 1), p = {
|
|
3273
3273
|
...r,
|
|
3274
3274
|
onComplete: void 0,
|
|
3275
3275
|
parsed: u,
|
|
@@ -3283,19 +3283,19 @@ var Wi = [
|
|
|
3283
3283
|
snapMemory: {
|
|
3284
3284
|
x: null,
|
|
3285
3285
|
y: null,
|
|
3286
|
-
glide: u ?
|
|
3286
|
+
glide: u ? da(u, e.devicePixelRatio() || 1) : !1
|
|
3287
3287
|
}
|
|
3288
3288
|
};
|
|
3289
3289
|
d.tracks.push(p), d.navCutMs = d.tracks.some((e) => e.cutMs === null) ? null : Math.max(...d.tracks.map((e) => e.cutMs));
|
|
3290
3290
|
let m = Symbol("flemo-player-track");
|
|
3291
|
-
if (
|
|
3292
|
-
u.transforms.length > 0 &&
|
|
3293
|
-
for (let e of u.strings)
|
|
3294
|
-
for (let e of u.constants)
|
|
3291
|
+
if (Jn.takeover(p.element), W(p.element, "animation", m), p.element.style.animation = "none", u) {
|
|
3292
|
+
u.transforms.length > 0 && W(p.element, "transform", m), u.opacity && W(p.element, "opacity", m);
|
|
3293
|
+
for (let e of u.strings) W(p.element, e.property, m);
|
|
3294
|
+
for (let e of u.constants) W(p.element, e.property, m);
|
|
3295
3295
|
a(p, 0);
|
|
3296
3296
|
}
|
|
3297
3297
|
return r.role === "active" && (r.onComplete && (d.navComplete = r.onComplete), d.started || (d.started = !0, o(n, d))), () => {
|
|
3298
|
-
p.detached = !0, p.scrub?.cancel(),
|
|
3298
|
+
p.detached = !0, p.scrub?.cancel(), G(p.element, void 0, m);
|
|
3299
3299
|
let r = t.get(n);
|
|
3300
3300
|
r && (r.tracks = r.tracks.filter((e) => e !== p), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
3301
3301
|
};
|
|
@@ -3316,7 +3316,7 @@ var Wi = [
|
|
|
3316
3316
|
let { element: i, parsed: a } = t;
|
|
3317
3317
|
if (!(!a || !i.isConnected)) {
|
|
3318
3318
|
if (a.transforms.length > 0) {
|
|
3319
|
-
let o =
|
|
3319
|
+
let o = pa(a.transforms, n, e.devicePixelRatio(), t.snapMemory, r);
|
|
3320
3320
|
o !== "" && (i.style.transform = o);
|
|
3321
3321
|
}
|
|
3322
3322
|
if (a.opacity) {
|
|
@@ -3337,10 +3337,10 @@ var Wi = [
|
|
|
3337
3337
|
if (c - u <= 0 || !r.remainderPlan || !(1 - i(r)(c > 0 ? u / c : 0) > .001)) return r.handoff = !1, !1;
|
|
3338
3338
|
let d;
|
|
3339
3339
|
try {
|
|
3340
|
-
d = o.animate([
|
|
3340
|
+
d = o.animate([ha(r.motion.from), ha(r.motion.to)], {
|
|
3341
3341
|
duration: c,
|
|
3342
3342
|
delay: -u,
|
|
3343
|
-
easing:
|
|
3343
|
+
easing: xn(r.motion.ease),
|
|
3344
3344
|
fill: "both"
|
|
3345
3345
|
});
|
|
3346
3346
|
} catch {
|
|
@@ -3354,12 +3354,12 @@ var Wi = [
|
|
|
3354
3354
|
let l = r.startTime ?? c;
|
|
3355
3355
|
if (r.lastTime !== null) {
|
|
3356
3356
|
let e = c - r.lastTime;
|
|
3357
|
-
if (n.onFrameGap?.(e), e >=
|
|
3357
|
+
if (n.onFrameGap?.(e), e >= va && e <= ba) {
|
|
3358
3358
|
r.recentGaps.push(e), r.recentGaps.length > 7 && r.recentGaps.shift();
|
|
3359
|
-
let t = [...r.recentGaps].sort((e, t) => e - t), n = t[Math.floor(t.length / 2)], i = r.recentGaps.length >= 4 && r.recentGaps.every((e) => e >=
|
|
3360
|
-
r.frameIntervalMs = Math.min(i ?
|
|
3359
|
+
let t = [...r.recentGaps].sort((e, t) => e - t), n = t[Math.floor(t.length / 2)], i = r.recentGaps.length >= 4 && r.recentGaps.every((e) => e >= ya);
|
|
3360
|
+
r.frameIntervalMs = Math.min(i ? ba : sa, Math.max(va, n)), xa = r.frameIntervalMs, n < 12 && rt(n, t[t.length - 1]);
|
|
3361
3361
|
}
|
|
3362
|
-
e >
|
|
3362
|
+
e > _a * r.frameIntervalMs && (l += e - r.frameIntervalMs);
|
|
3363
3363
|
}
|
|
3364
3364
|
r.startTime = l, r.lastTime = c;
|
|
3365
3365
|
let u = !0, d = !1;
|
|
@@ -3380,7 +3380,7 @@ var Wi = [
|
|
|
3380
3380
|
continue;
|
|
3381
3381
|
}
|
|
3382
3382
|
let i = o + n, a = Math.min(Math.max(0, f), i);
|
|
3383
|
-
if (t.handoff && f >=
|
|
3383
|
+
if (t.handoff && f >= Ot() && f < i && s(e, r, t, a)) {
|
|
3384
3384
|
u = !1;
|
|
3385
3385
|
continue;
|
|
3386
3386
|
}
|
|
@@ -3398,7 +3398,7 @@ var Wi = [
|
|
|
3398
3398
|
}
|
|
3399
3399
|
return n;
|
|
3400
3400
|
})();
|
|
3401
|
-
|
|
3401
|
+
Ta.onFrameGap = (e) => {
|
|
3402
3402
|
if (typeof window < "u") {
|
|
3403
3403
|
let t = window.__flemoPlayerGaps ??= [];
|
|
3404
3404
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -3406,102 +3406,102 @@ wa.onFrameGap = (e) => {
|
|
|
3406
3406
|
};
|
|
3407
3407
|
//#endregion
|
|
3408
3408
|
//#region src/core/engine/types.ts
|
|
3409
|
-
var
|
|
3409
|
+
var Ea = "data-flemo-skip-animation", $ = () => {}, Da = 400, Oa = 4, ka = 100, Aa = 1500, ja = "data-flemo-part-name", Ma = /* @__PURE__ */ new WeakMap(), Na = "data-flemo-anim-hold", Pa = (e) => {
|
|
3410
3410
|
let t = e.parentElement ?? e;
|
|
3411
|
-
return Array.from(t.querySelectorAll(`[${
|
|
3411
|
+
return Array.from(t.querySelectorAll(`[${ja}]`)).filter((n) => {
|
|
3412
3412
|
let r = n.closest("[data-flemo-screen]");
|
|
3413
3413
|
return !r || r === e || !t.contains(r);
|
|
3414
3414
|
});
|
|
3415
|
-
},
|
|
3415
|
+
}, Fa = (e, t) => {
|
|
3416
3416
|
let [n, r] = t.split("-");
|
|
3417
|
-
return
|
|
3418
|
-
},
|
|
3417
|
+
return Pa(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
3418
|
+
}, Ia = (e, t) => {
|
|
3419
3419
|
let n = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3420
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3420
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ja}][data-flemo-status="${t}"]`)).filter((e) => {
|
|
3421
3421
|
if (n === null) return !0;
|
|
3422
3422
|
let t = e.closest("[data-flemo-router]");
|
|
3423
3423
|
return !t || t.getAttribute("data-flemo-router") === n;
|
|
3424
3424
|
});
|
|
3425
|
-
},
|
|
3425
|
+
}, La = (e, t) => Ia(e, t).filter((e) => e.parentElement?.closest(`[${Na}]`) == null), Ra = (e) => {
|
|
3426
3426
|
let t = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3427
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3428
|
-
if (e.parentElement?.closest(`[${
|
|
3427
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ja}][${Na}]`)).filter((e) => {
|
|
3428
|
+
if (e.parentElement?.closest(`[${Na}]`) != null) return !1;
|
|
3429
3429
|
if (t === null) return !0;
|
|
3430
3430
|
let n = e.closest("[data-flemo-router]");
|
|
3431
3431
|
return !n || n.getAttribute("data-flemo-router") === t;
|
|
3432
3432
|
});
|
|
3433
|
-
},
|
|
3433
|
+
}, za = (e, t, n) => {
|
|
3434
3434
|
let r = 0;
|
|
3435
3435
|
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3436
|
-
if (!
|
|
3436
|
+
if (!U(t, e)) continue;
|
|
3437
3437
|
let n = B(t, e);
|
|
3438
3438
|
n && (r = Math.max(r, (n.delay + n.duration) * 1e3));
|
|
3439
3439
|
}
|
|
3440
|
-
for (let t of
|
|
3441
|
-
let e = z.get(t.getAttribute(
|
|
3442
|
-
if (!e || !
|
|
3440
|
+
for (let t of Ia(e, n)) {
|
|
3441
|
+
let e = z.get(t.getAttribute(ja)), i = `${n}-${t.getAttribute("data-flemo-active")}`;
|
|
3442
|
+
if (!e || !U(e, i)) continue;
|
|
3443
3443
|
let a = B(e, i);
|
|
3444
3444
|
a && (r = Math.max(r, (a.delay + a.duration) * 1e3));
|
|
3445
3445
|
}
|
|
3446
3446
|
let i = t.decoratorName ? R.get(t.decoratorName) : void 0;
|
|
3447
3447
|
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3448
|
-
if (!
|
|
3448
|
+
if (!U(i, e)) continue;
|
|
3449
3449
|
let t = B(i, e);
|
|
3450
3450
|
t && (r = Math.max(r, (t.delay + t.duration) * 1e3));
|
|
3451
3451
|
}
|
|
3452
3452
|
return r;
|
|
3453
|
-
},
|
|
3454
|
-
|
|
3455
|
-
},
|
|
3456
|
-
|
|
3457
|
-
},
|
|
3458
|
-
if (
|
|
3459
|
-
|
|
3460
|
-
let e = ++
|
|
3461
|
-
if (e !==
|
|
3462
|
-
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length <
|
|
3453
|
+
}, Ba = (e) => e === "POPPING" && !ut() || e === "PUSHING" && lt() && !ut(), Va = 12, Ha = null, Ua = () => {
|
|
3454
|
+
Ha = typeof requestAnimationFrame == "function" ? requestAnimationFrame(Ua) : null;
|
|
3455
|
+
}, Wa = () => (Ha === null && typeof requestAnimationFrame == "function" && (Ha = requestAnimationFrame(Ua)), $), Ga = !1, Ka = 0, qa = () => {
|
|
3456
|
+
Ga &&= (Ka += 1, !1);
|
|
3457
|
+
}, Ja = 2, Ya = 8, Xa = () => {
|
|
3458
|
+
if (Ga || typeof requestAnimationFrame != "function") return;
|
|
3459
|
+
Ga = !0;
|
|
3460
|
+
let e = ++Ka, t = [], n = Ja, r = null, i = (a) => {
|
|
3461
|
+
if (e !== Ka) return;
|
|
3462
|
+
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < Ya) {
|
|
3463
3463
|
requestAnimationFrame(i);
|
|
3464
3464
|
return;
|
|
3465
3465
|
}
|
|
3466
|
-
|
|
3466
|
+
Ga = !1;
|
|
3467
3467
|
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
3468
|
-
|
|
3468
|
+
Ca(s), rt(s, o[o.length - 1]);
|
|
3469
3469
|
};
|
|
3470
3470
|
requestAnimationFrame(i);
|
|
3471
|
-
},
|
|
3472
|
-
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l =
|
|
3473
|
-
if (
|
|
3474
|
-
|
|
3471
|
+
}, Za = (e, t, n, r) => {
|
|
3472
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = F() && ot(), u = !l && F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Sa() < Va, d = (l || u) && typeof window < "u" && window.devicePixelRatio || 1, f = (e, t) => e ? l ? li(e, t, d) : u ? di(e, t, d, Sa()) : null : null;
|
|
3473
|
+
if (U(t, n)) {
|
|
3474
|
+
_i(i, t, c, r);
|
|
3475
3475
|
let e = f(B(t, n) ?? null, i);
|
|
3476
|
-
e && (
|
|
3477
|
-
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (
|
|
3476
|
+
e && (W(i, "animation-timing-function", r), i.style.animationTimingFunction = e);
|
|
3477
|
+
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (_i(n, t, c, r), e && (W(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
3478
3478
|
}
|
|
3479
3479
|
if (a && t.decoratorName) {
|
|
3480
3480
|
let e = R.get(t.decoratorName);
|
|
3481
|
-
e &&
|
|
3481
|
+
e && U(e, n) && _i(a, e, c, r);
|
|
3482
3482
|
}
|
|
3483
|
-
for (let e of
|
|
3484
|
-
let t = z.get(e.getAttribute(
|
|
3485
|
-
if (t &&
|
|
3486
|
-
|
|
3483
|
+
for (let e of Fa(i, n)) {
|
|
3484
|
+
let t = z.get(e.getAttribute(ja));
|
|
3485
|
+
if (t && U(t, n)) {
|
|
3486
|
+
_i(e, t, c, r);
|
|
3487
3487
|
let i = f(B(t, n) ?? null, e);
|
|
3488
|
-
i && (
|
|
3488
|
+
i && (W(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
3489
3489
|
}
|
|
3490
3490
|
}
|
|
3491
|
-
},
|
|
3491
|
+
}, Qa = (e, t) => {
|
|
3492
3492
|
let { scope: n, decorator: r, bars: i } = e;
|
|
3493
3493
|
if (n) {
|
|
3494
|
-
|
|
3495
|
-
for (let e of
|
|
3494
|
+
vi(n, t);
|
|
3495
|
+
for (let e of Pa(n)) vi(e, t);
|
|
3496
3496
|
}
|
|
3497
|
-
r &&
|
|
3498
|
-
for (let e of i ?? []) e &&
|
|
3499
|
-
},
|
|
3497
|
+
r && vi(r, t);
|
|
3498
|
+
for (let e of i ?? []) e && vi(e, t);
|
|
3499
|
+
}, $a = 4, eo = (e) => `${Math.round(e * 1e3) / 1e3}s`, to = (e) => {
|
|
3500
3500
|
let { element: t, expectedName: n, motion: r } = e, i = !1, a = !1, o = (n) => {
|
|
3501
|
-
i = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), n.mode === "clear" ? (t.style.removeProperty("animation-delay"), a = !1) : n.mode === "set" && (
|
|
3501
|
+
i = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), n.mode === "clear" ? (t.style.removeProperty("animation-delay"), a = !1) : n.mode === "set" && (W(t, "animation-delay", e.writer), t.style.animationDelay = eo(n.seconds), a = !0), i = !1;
|
|
3502
3502
|
}, s = (a) => {
|
|
3503
|
-
if (i || a.target !== t || !
|
|
3504
|
-
if (!e.isLive() || e.budgetUsed() >=
|
|
3503
|
+
if (i || a.target !== t || !On(a.animationName, n)) return;
|
|
3504
|
+
if (!e.isLive() || e.budgetUsed() >= $a) {
|
|
3505
3505
|
e.onTerminal();
|
|
3506
3506
|
return;
|
|
3507
3507
|
}
|
|
@@ -3524,14 +3524,14 @@ var Ta = "data-flemo-skip-animation", Q = () => {}, Ea = 400, Da = 4, Oa = 100,
|
|
|
3524
3524
|
t.addEventListener("animationcancel", s);
|
|
3525
3525
|
},
|
|
3526
3526
|
detach: () => {
|
|
3527
|
-
t.removeEventListener("animationcancel", s), a &&= (
|
|
3527
|
+
t.removeEventListener("animationcancel", s), a &&= (G(t, ["animation-delay"], e.writer), !1);
|
|
3528
3528
|
},
|
|
3529
3529
|
fullRestart: () => {
|
|
3530
3530
|
o({ mode: "clear" });
|
|
3531
3531
|
}
|
|
3532
3532
|
};
|
|
3533
3533
|
};
|
|
3534
|
-
function
|
|
3534
|
+
function no(e) {
|
|
3535
3535
|
Ge();
|
|
3536
3536
|
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = null, i = null, a = null, o = null, c = null, l = () => {
|
|
3537
3537
|
if (!c) return;
|
|
@@ -3557,20 +3557,20 @@ function eo(e) {
|
|
|
3557
3557
|
let { getElements: d, transitionName: f, prevTransitionName: p, status: m, isActive: h, animHoldReleased: g } = c, _ = m === "PUSHING" || m === "POPPING" || m === "REPLACING";
|
|
3558
3558
|
if (h) {
|
|
3559
3559
|
let { scope: e } = d();
|
|
3560
|
-
if (e) if (_ && !g) for (let t of
|
|
3561
|
-
else for (let t of
|
|
3560
|
+
if (e) if (_ && !g) for (let t of La(e, m)) t.setAttribute(Na, "true");
|
|
3561
|
+
else for (let t of Ra(e)) t.removeAttribute(Na);
|
|
3562
3562
|
}
|
|
3563
3563
|
if (_) {
|
|
3564
3564
|
let { scope: e, bars: n } = d();
|
|
3565
3565
|
if (e) {
|
|
3566
|
-
$n(e),
|
|
3567
|
-
for (let n of
|
|
3568
|
-
for (let e of n ?? []) e &&
|
|
3566
|
+
$n(e), G(e, ["animation-timing-function", "animation-duration"], t);
|
|
3567
|
+
for (let n of Pa(e)) G(n, ["animation-timing-function", "animation-duration"], t);
|
|
3568
|
+
for (let e of n ?? []) e && G(e, ["animation-timing-function", "animation-duration"], t);
|
|
3569
3569
|
}
|
|
3570
3570
|
}
|
|
3571
3571
|
_ && (Rr(), o &&= (clearTimeout(o), null), a ||= Fr()), !_ && a && !o && (typeof setTimeout == "function" ? o = setTimeout(() => {
|
|
3572
3572
|
o = null, a?.(), a = null;
|
|
3573
|
-
},
|
|
3573
|
+
}, Da) : (a(), a = null));
|
|
3574
3574
|
let v = _ && (h ? m === "PUSHING" || m === "REPLACING" : m === "POPPING"), y = _ && !v;
|
|
3575
3575
|
if (!y && i) {
|
|
3576
3576
|
let e = i;
|
|
@@ -3580,39 +3580,39 @@ function eo(e) {
|
|
|
3580
3580
|
let e = r;
|
|
3581
3581
|
r = null, _ ? e() : u(e);
|
|
3582
3582
|
}
|
|
3583
|
-
if (v && !r &&
|
|
3583
|
+
if (v && !r && dt()) {
|
|
3584
3584
|
l();
|
|
3585
3585
|
let { scope: e } = d();
|
|
3586
3586
|
if (e) {
|
|
3587
|
-
|
|
3588
|
-
let t = wr(e), n = Jr(e), i =
|
|
3587
|
+
Jn.takeover(e);
|
|
3588
|
+
let t = wr(e), n = Jr(e), i = za(e, qt(f), m), a = Wi(i + Aa), o = st() === "on" ? Wr(e, i + Aa) : $, s = rr();
|
|
3589
3589
|
r = () => {
|
|
3590
|
-
a(),
|
|
3590
|
+
a(), o(), n(), t(), s();
|
|
3591
3591
|
};
|
|
3592
3592
|
}
|
|
3593
3593
|
}
|
|
3594
|
-
if (y && !i &&
|
|
3594
|
+
if (y && !i && dt()) {
|
|
3595
3595
|
l();
|
|
3596
|
-
let { scope: e } = d()
|
|
3597
|
-
e && (
|
|
3596
|
+
let { scope: e } = d();
|
|
3597
|
+
e && st() === "on" && (i = Wr(e, za(e, qt(f), m) + Aa, !0));
|
|
3598
3598
|
}
|
|
3599
3599
|
let b = (t, n, r) => {
|
|
3600
3600
|
let i = e.getTransitionTaskId();
|
|
3601
|
-
if (!i || (be.pinnedDriver(),
|
|
3602
|
-
if (
|
|
3603
|
-
if (
|
|
3604
|
-
if (!
|
|
3601
|
+
if (!i || (be.pinnedDriver(), F() && s.pendingTaskIds.some((e) => e !== i))) return null;
|
|
3602
|
+
if (F() && be.pinnedDriver() !== "raf") return Xa(), null;
|
|
3603
|
+
if (ve() || !F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ba(t.split("-")[0])) return null;
|
|
3604
|
+
if (!F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ue() && (m === "REPLACING" || m === "POPPING" || m === "PUSHING")) return We(), null;
|
|
3605
3605
|
if (!be.playerAllowed()) return null;
|
|
3606
3606
|
let { scope: a, decorator: o, bars: c } = d();
|
|
3607
3607
|
if (!a) return null;
|
|
3608
|
-
let l =
|
|
3608
|
+
let l = qt(f);
|
|
3609
3609
|
if (be.pinnedDriver() !== "raf") {
|
|
3610
3610
|
let e = t.split("-")[0];
|
|
3611
|
-
if (
|
|
3611
|
+
if (bi(l, e, a) === "native") return null;
|
|
3612
3612
|
}
|
|
3613
3613
|
let u = B(l, t);
|
|
3614
3614
|
if (!u) return null;
|
|
3615
|
-
let p = [], h =
|
|
3615
|
+
let p = [], h = Ta.join(i, {
|
|
3616
3616
|
element: a,
|
|
3617
3617
|
motion: u,
|
|
3618
3618
|
role: n,
|
|
@@ -3623,7 +3623,7 @@ function eo(e) {
|
|
|
3623
3623
|
p.push(h);
|
|
3624
3624
|
for (let e of c ?? []) {
|
|
3625
3625
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
3626
|
-
let n =
|
|
3626
|
+
let n = Ta.join(i, {
|
|
3627
3627
|
element: e,
|
|
3628
3628
|
motion: u,
|
|
3629
3629
|
role: "passive",
|
|
@@ -3634,7 +3634,7 @@ function eo(e) {
|
|
|
3634
3634
|
if (o && l.decoratorName) {
|
|
3635
3635
|
let e = R.get(l.decoratorName), n = e ? B(e, t) : null;
|
|
3636
3636
|
if (n) {
|
|
3637
|
-
let e =
|
|
3637
|
+
let e = Ta.join(i, {
|
|
3638
3638
|
element: o,
|
|
3639
3639
|
motion: n,
|
|
3640
3640
|
role: "passive",
|
|
@@ -3643,10 +3643,10 @@ function eo(e) {
|
|
|
3643
3643
|
e && p.push(e);
|
|
3644
3644
|
}
|
|
3645
3645
|
}
|
|
3646
|
-
for (let e of
|
|
3647
|
-
let n = z.get(e.getAttribute(
|
|
3646
|
+
for (let e of Fa(a, t)) {
|
|
3647
|
+
let n = z.get(e.getAttribute(ja)), r = n ? B(n, t) : null;
|
|
3648
3648
|
if (!r) continue;
|
|
3649
|
-
let a =
|
|
3649
|
+
let a = Ta.join(i, {
|
|
3650
3650
|
element: e,
|
|
3651
3651
|
motion: r,
|
|
3652
3652
|
role: "passive"
|
|
@@ -3655,8 +3655,8 @@ function eo(e) {
|
|
|
3655
3655
|
}
|
|
3656
3656
|
return () => p.forEach((e) => e());
|
|
3657
3657
|
}, x = (e, n) => {
|
|
3658
|
-
let r = [], { decorator: i, bars: a } = d(), o =
|
|
3659
|
-
let a = 0, o =
|
|
3658
|
+
let r = [], { decorator: i, bars: a } = d(), o = qt(f), s = (e, n, i) => {
|
|
3659
|
+
let a = 0, o = to({
|
|
3660
3660
|
element: e,
|
|
3661
3661
|
expectedName: n,
|
|
3662
3662
|
motion: i,
|
|
@@ -3666,18 +3666,18 @@ function eo(e) {
|
|
|
3666
3666
|
spendBudget: () => {
|
|
3667
3667
|
a += 1;
|
|
3668
3668
|
},
|
|
3669
|
-
onTerminal:
|
|
3669
|
+
onTerminal: $
|
|
3670
3670
|
});
|
|
3671
3671
|
o.attach(), r.push(o.detach);
|
|
3672
|
-
}, c =
|
|
3672
|
+
}, c = En("screen", f, n), l = B(o, n);
|
|
3673
3673
|
if (l) for (let e of a ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || s(e, c, l);
|
|
3674
3674
|
if (i && o.decoratorName) {
|
|
3675
3675
|
let e = R.get(o.decoratorName), t = e ? B(e, n) : null;
|
|
3676
|
-
t && s(i,
|
|
3676
|
+
t && s(i, En("decorator", o.decoratorName, n), t);
|
|
3677
3677
|
}
|
|
3678
|
-
for (let t of
|
|
3679
|
-
let e = t.getAttribute(
|
|
3680
|
-
i && s(t,
|
|
3678
|
+
for (let t of Fa(e, n)) {
|
|
3679
|
+
let e = t.getAttribute(ja), r = z.get(e), i = r ? B(r, n) : null;
|
|
3680
|
+
i && s(t, En("part", e, n), i);
|
|
3681
3681
|
}
|
|
3682
3682
|
return r;
|
|
3683
3683
|
};
|
|
@@ -3685,35 +3685,35 @@ function eo(e) {
|
|
|
3685
3685
|
if (m === "COMPLETED") {
|
|
3686
3686
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3687
3687
|
if (e) {
|
|
3688
|
-
|
|
3689
|
-
for (let t of
|
|
3688
|
+
G(e);
|
|
3689
|
+
for (let t of Pa(e)) G(t);
|
|
3690
3690
|
}
|
|
3691
|
-
n &&
|
|
3692
|
-
for (let e of r ?? []) e &&
|
|
3693
|
-
return
|
|
3691
|
+
n && G(n);
|
|
3692
|
+
for (let e of r ?? []) e && G(e, void 0, t);
|
|
3693
|
+
return Qa({
|
|
3694
3694
|
scope: e,
|
|
3695
3695
|
decorator: n,
|
|
3696
3696
|
bars: r ?? []
|
|
3697
|
-
}, t),
|
|
3697
|
+
}, t), $;
|
|
3698
3698
|
}
|
|
3699
3699
|
if (m === "REPLACING" && p !== f && e.setReplaceTransitionStatus("PENDING"), _) {
|
|
3700
3700
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3701
|
-
e &&
|
|
3701
|
+
e && Za({
|
|
3702
3702
|
scope: e,
|
|
3703
3703
|
decorator: n,
|
|
3704
3704
|
bars: r ?? []
|
|
3705
|
-
},
|
|
3705
|
+
}, qt(f), `${m}-false`, t);
|
|
3706
3706
|
}
|
|
3707
3707
|
if (_ && g) {
|
|
3708
3708
|
let e = `${m}-false`, n = b(e, "passive");
|
|
3709
3709
|
if (n) return n;
|
|
3710
3710
|
let { scope: r } = d();
|
|
3711
3711
|
if (r) {
|
|
3712
|
-
let n =
|
|
3713
|
-
if (
|
|
3714
|
-
let a = B(n, e), o = 0, s =
|
|
3712
|
+
let n = qt(f), i = [];
|
|
3713
|
+
if (U(n, e)) {
|
|
3714
|
+
let a = B(n, e), o = 0, s = to({
|
|
3715
3715
|
element: r,
|
|
3716
|
-
expectedName:
|
|
3716
|
+
expectedName: En("screen", f, e),
|
|
3717
3717
|
motion: a,
|
|
3718
3718
|
writer: t,
|
|
3719
3719
|
isLive: () => r.isConnected && r.getAttribute("data-flemo-skip-animation") !== "true",
|
|
@@ -3721,156 +3721,156 @@ function eo(e) {
|
|
|
3721
3721
|
spendBudget: () => {
|
|
3722
3722
|
o += 1;
|
|
3723
3723
|
},
|
|
3724
|
-
onTerminal:
|
|
3724
|
+
onTerminal: $
|
|
3725
3725
|
});
|
|
3726
3726
|
s.attach(), i.push(s.detach);
|
|
3727
3727
|
}
|
|
3728
3728
|
if (i.push(...x(r, e)), i.length > 0) return () => i.forEach((e) => e());
|
|
3729
3729
|
}
|
|
3730
3730
|
}
|
|
3731
|
-
return
|
|
3731
|
+
return $;
|
|
3732
3732
|
}
|
|
3733
3733
|
if (m === "COMPLETED") {
|
|
3734
|
-
|
|
3734
|
+
qa(), e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
3735
3735
|
let { scope: n, decorator: r, bars: i } = d();
|
|
3736
3736
|
if (n) {
|
|
3737
|
-
|
|
3738
|
-
for (let e of
|
|
3737
|
+
G(n), G(n, ["transform", "opacity"]), n.removeAttribute(Ea);
|
|
3738
|
+
for (let e of Pa(n)) G(e);
|
|
3739
3739
|
}
|
|
3740
|
-
r && (
|
|
3741
|
-
for (let e of i ?? []) e &&
|
|
3742
|
-
return
|
|
3740
|
+
r && (G(r), r.removeAttribute(Ea));
|
|
3741
|
+
for (let e of i ?? []) e && G(e, void 0, t);
|
|
3742
|
+
return Qa({
|
|
3743
3743
|
scope: n,
|
|
3744
3744
|
decorator: r,
|
|
3745
3745
|
bars: i ?? []
|
|
3746
|
-
}, t),
|
|
3746
|
+
}, t), $;
|
|
3747
3747
|
}
|
|
3748
|
-
if (m === "IDLE") return
|
|
3748
|
+
if (m === "IDLE") return $;
|
|
3749
3749
|
let { scope: S } = d();
|
|
3750
|
-
if (!S) return
|
|
3751
|
-
let C = e.getTransitionTaskId(), w =
|
|
3750
|
+
if (!S) return $;
|
|
3751
|
+
let C = e.getTransitionTaskId(), w = $, T = () => {
|
|
3752
3752
|
w(), C && (s.resolveTask(C), n.delete(C));
|
|
3753
|
-
}, E =
|
|
3753
|
+
}, E = qt(f), D = `${m}-true`, O = S.getAttribute(Ea) === "true", k = !O && U(E, D);
|
|
3754
3754
|
if (!O) {
|
|
3755
3755
|
let { decorator: e, bars: n } = d();
|
|
3756
|
-
|
|
3756
|
+
Za({
|
|
3757
3757
|
scope: S,
|
|
3758
3758
|
decorator: e,
|
|
3759
3759
|
bars: n ?? []
|
|
3760
3760
|
}, E, D, t);
|
|
3761
3761
|
}
|
|
3762
|
-
k &&
|
|
3763
|
-
let
|
|
3764
|
-
for (let e of
|
|
3765
|
-
let t = z.get(e.getAttribute(
|
|
3766
|
-
r &&
|
|
3762
|
+
k && F() && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || Sa() < Va) && (w = Wa());
|
|
3763
|
+
let A = `${m}-false`, j = U(E, A) ? B(E, A) : null, ee = [];
|
|
3764
|
+
for (let e of Ia(S, m)) {
|
|
3765
|
+
let t = z.get(e.getAttribute(ja)), n = `${m}-${e.getAttribute("data-flemo-active")}`, r = t && U(t, n) ? B(t, n) : null;
|
|
3766
|
+
r && ee.push({
|
|
3767
3767
|
element: e,
|
|
3768
3768
|
motion: r
|
|
3769
3769
|
});
|
|
3770
3770
|
}
|
|
3771
|
-
let
|
|
3772
|
-
for (let { motion: e } of
|
|
3773
|
-
let
|
|
3771
|
+
let M = j ? (j.delay + j.duration) * 1e3 : 0;
|
|
3772
|
+
for (let { motion: e } of ee) M = Math.max(M, (e.delay + e.duration) * 1e3);
|
|
3773
|
+
let te = [];
|
|
3774
3774
|
{
|
|
3775
3775
|
let e = E.decoratorName ? R.get(E.decoratorName) : void 0;
|
|
3776
3776
|
if (e) for (let t of [`${m}-true`, `${m}-false`]) {
|
|
3777
|
-
if (!
|
|
3777
|
+
if (!U(e, t)) continue;
|
|
3778
3778
|
let n = B(e, t);
|
|
3779
|
-
n && (
|
|
3779
|
+
n && (te.push(n), M = Math.max(M, (n.delay + n.duration) * 1e3));
|
|
3780
3780
|
}
|
|
3781
3781
|
}
|
|
3782
3782
|
if (!k) {
|
|
3783
|
-
if (!O &&
|
|
3784
|
-
if (!g) return C && s.markGateHeld(C),
|
|
3785
|
-
let e =
|
|
3786
|
-
C && s.anchorGate(C, e +
|
|
3783
|
+
if (!O && M > 0) {
|
|
3784
|
+
if (!g) return C && s.markGateHeld(C), $;
|
|
3785
|
+
let e = M + 50;
|
|
3786
|
+
C && s.anchorGate(C, e + Aa);
|
|
3787
3787
|
let t = setTimeout(T, e);
|
|
3788
3788
|
return () => clearTimeout(t);
|
|
3789
3789
|
}
|
|
3790
|
-
return queueMicrotask(T),
|
|
3790
|
+
return queueMicrotask(T), $;
|
|
3791
3791
|
}
|
|
3792
|
-
let
|
|
3792
|
+
let N = B(E, D);
|
|
3793
3793
|
if (C) if (g) {
|
|
3794
|
-
let e = (
|
|
3795
|
-
s.anchorGate(C, Math.max(e,
|
|
3794
|
+
let e = (N.delay + N.duration) * 1e3;
|
|
3795
|
+
s.anchorGate(C, Math.max(e, M) + Aa);
|
|
3796
3796
|
} else s.markGateHeld(C);
|
|
3797
|
-
let
|
|
3798
|
-
|
|
3799
|
-
let
|
|
3797
|
+
let ne = !O && !!N, re = E.driver === "native" && !F(), ie = !F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ue(), ae = F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && _e(), oe = !F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ba(m), se = ie || ae || oe, ce = ve() && ht(), le = null;
|
|
3798
|
+
ne && !F() && !re && !ie && !oe && !ce && (le = Fi(S, () => [S.ownerDocument.documentElement], () => Ma.get(S)?.(), !1));
|
|
3799
|
+
let ue = se ? In[m] ?? 0 : ce ? Fn[m] ?? 0 : 0, de = ie && (m === "PUSHING" || m === "POPPING");
|
|
3800
3800
|
{
|
|
3801
3801
|
let e = S.ownerDocument.documentElement;
|
|
3802
|
-
|
|
3802
|
+
se && pt() ? e.setAttribute("data-flemo-creep", "true") : e.removeAttribute("data-flemo-creep"), se ? e.setAttribute("data-flemo-lpm", "true") : e.removeAttribute("data-flemo-lpm"), ce ? e.setAttribute("data-flemo-desk-head", "true") : e.removeAttribute("data-flemo-desk-head");
|
|
3803
3803
|
}
|
|
3804
|
-
let
|
|
3805
|
-
|
|
3806
|
-
let
|
|
3807
|
-
|
|
3808
|
-
},
|
|
3809
|
-
|
|
3810
|
-
},
|
|
3804
|
+
let fe = null;
|
|
3805
|
+
ne && re && (fe = Oi(S, () => [S.ownerDocument.documentElement], () => Ma.get(S)?.()));
|
|
3806
|
+
let pe = En("screen", f, D), me, P = () => {
|
|
3807
|
+
me !== void 0 && (clearTimeout(me), me = void 0);
|
|
3808
|
+
}, he = 0, ge, ye = [], xe, Se = () => {
|
|
3809
|
+
ye.forEach((e) => cancelAnimationFrame(e)), ye = [], xe !== void 0 && clearTimeout(xe), xe = void 0;
|
|
3810
|
+
}, Ce = () => {
|
|
3811
3811
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
3812
3812
|
shields exotic embedders. */
|
|
3813
3813
|
if (typeof requestAnimationFrame != "function") {
|
|
3814
3814
|
T();
|
|
3815
3815
|
return;
|
|
3816
3816
|
}
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
},
|
|
3817
|
+
xe = setTimeout(() => {
|
|
3818
|
+
Se(), T();
|
|
3819
|
+
}, ka);
|
|
3820
3820
|
let e = (t) => {
|
|
3821
3821
|
if (t <= 0) {
|
|
3822
|
-
|
|
3822
|
+
Se(), T();
|
|
3823
3823
|
return;
|
|
3824
3824
|
}
|
|
3825
|
-
|
|
3825
|
+
ye.push(requestAnimationFrame(() => e(t - 1)));
|
|
3826
3826
|
};
|
|
3827
|
-
e(
|
|
3828
|
-
},
|
|
3829
|
-
if (
|
|
3830
|
-
|
|
3827
|
+
e(Oa);
|
|
3828
|
+
}, we = () => {
|
|
3829
|
+
if (he <= 0) {
|
|
3830
|
+
Ce();
|
|
3831
3831
|
return;
|
|
3832
3832
|
}
|
|
3833
|
-
|
|
3834
|
-
},
|
|
3835
|
-
e.target === S &&
|
|
3833
|
+
ge = setTimeout(Ce, he);
|
|
3834
|
+
}, Te = $, Ee = $, De = (e) => {
|
|
3835
|
+
e.target === S && On(e.animationName, pe) && (S.removeEventListener("animationend", De), P(), Te(), we());
|
|
3836
3836
|
};
|
|
3837
|
-
S.addEventListener("animationend",
|
|
3838
|
-
let
|
|
3839
|
-
|
|
3840
|
-
let
|
|
3837
|
+
S.addEventListener("animationend", De);
|
|
3838
|
+
let Oe = ne && g ? b(D, "active", Ce) : null, ke = (N.delay + N.duration) * 1e3, Ae = Math.max(ke, M) + 1500, je = C ? setTimeout(() => void s.resolveTask(C), Ae) : void 0;
|
|
3839
|
+
he = Math.max(0, M - ke);
|
|
3840
|
+
let Me = ke * 1 + ue + 250, Ne = () => C !== null && e.getTransitionTaskId() === C && S.isConnected && S.getAttribute("data-flemo-skip-animation") !== "true" && U(E, D), Pe = to({
|
|
3841
3841
|
element: S,
|
|
3842
|
-
expectedName:
|
|
3843
|
-
motion:
|
|
3842
|
+
expectedName: pe,
|
|
3843
|
+
motion: N,
|
|
3844
3844
|
writer: t,
|
|
3845
|
-
isLive:
|
|
3845
|
+
isLive: Ne,
|
|
3846
3846
|
budgetUsed: () => n.get(C) ?? 0,
|
|
3847
3847
|
spendBudget: () => {
|
|
3848
|
-
|
|
3848
|
+
Ee(), n.set(C, (n.get(C) ?? 0) + 1);
|
|
3849
3849
|
},
|
|
3850
3850
|
onTerminal: T
|
|
3851
3851
|
});
|
|
3852
|
-
|
|
3853
|
-
let
|
|
3854
|
-
|
|
3855
|
-
},
|
|
3856
|
-
if (
|
|
3857
|
-
|
|
3852
|
+
Te = Pe.detach;
|
|
3853
|
+
let Fe = !1, Ie = () => {
|
|
3854
|
+
P(), me = setTimeout(Le, Me);
|
|
3855
|
+
}, Le = () => {
|
|
3856
|
+
if (P(), Ne() && !Fe) {
|
|
3857
|
+
Fe = !0, Ee(), Pe.fullRestart(), Ie();
|
|
3858
3858
|
return;
|
|
3859
3859
|
}
|
|
3860
3860
|
T();
|
|
3861
|
-
},
|
|
3862
|
-
|
|
3863
|
-
|
|
3861
|
+
}, I = !Oe && g, Re = I ? x(S, D) : [];
|
|
3862
|
+
I && (Pe.attach(), C && Ie()), I && (re || ie) && Ma.set(S, () => {
|
|
3863
|
+
Ee(), C && me !== void 0 && Ie();
|
|
3864
3864
|
});
|
|
3865
|
-
let
|
|
3866
|
-
|
|
3867
|
-
}) : null,
|
|
3868
|
-
|
|
3865
|
+
let ze = I && re ? Ni(() => [S.ownerDocument.documentElement], () => {
|
|
3866
|
+
Ee(), C && me !== void 0 && Ie();
|
|
3867
|
+
}) : null, Be, Ve = () => {
|
|
3868
|
+
Be !== void 0 && (clearTimeout(Be), Be = void 0);
|
|
3869
3869
|
};
|
|
3870
|
-
if (
|
|
3871
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
3872
|
-
for (let { element: t, motion: n } of
|
|
3873
|
-
let i =
|
|
3870
|
+
if (Ee = Ve, I && C && !de && !oe) {
|
|
3871
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = ai(N, S, e), n = j ? ai(j, S, e) : 0, r = 0;
|
|
3872
|
+
for (let { element: t, motion: n } of ee) {
|
|
3873
|
+
let i = ai(n, t, e);
|
|
3874
3874
|
if (i === null) {
|
|
3875
3875
|
r = null;
|
|
3876
3876
|
break;
|
|
@@ -3878,10 +3878,10 @@ function eo(e) {
|
|
|
3878
3878
|
r = Math.max(r, i);
|
|
3879
3879
|
}
|
|
3880
3880
|
let i = 0;
|
|
3881
|
-
if (
|
|
3881
|
+
if (te.length > 0) {
|
|
3882
3882
|
let t = d().decorator;
|
|
3883
|
-
if (t) for (let n of
|
|
3884
|
-
let r =
|
|
3883
|
+
if (t) for (let n of te) {
|
|
3884
|
+
let r = ai(n, t, e);
|
|
3885
3885
|
if (r === null) {
|
|
3886
3886
|
i = null;
|
|
3887
3887
|
break;
|
|
@@ -3890,48 +3890,16 @@ function eo(e) {
|
|
|
3890
3890
|
}
|
|
3891
3891
|
}
|
|
3892
3892
|
let a = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3893
|
-
a !== null && a + 17 <
|
|
3894
|
-
|
|
3895
|
-
}, a * 1 + 17 +
|
|
3896
|
-
}
|
|
3897
|
-
let Ke, qe = () => {
|
|
3898
|
-
Ke !== void 0 && (clearTimeout(Ke), Ke = void 0);
|
|
3899
|
-
};
|
|
3900
|
-
if (Oe = qe, F && r && !fe && !se && !I()) {
|
|
3901
|
-
let e = Y(M, S, 1), t = A ? Y(A, S, 1) : 0, n = 0;
|
|
3902
|
-
for (let { element: e, motion: t } of te) {
|
|
3903
|
-
let r = Y(t, e, 1);
|
|
3904
|
-
if (r === null) {
|
|
3905
|
-
n = null;
|
|
3906
|
-
break;
|
|
3907
|
-
}
|
|
3908
|
-
n = Math.max(n, r);
|
|
3909
|
-
}
|
|
3910
|
-
let i = 0;
|
|
3911
|
-
if (ne.length > 0) {
|
|
3912
|
-
let e = d().decorator;
|
|
3913
|
-
if (e) for (let t of ne) {
|
|
3914
|
-
let n = Y(t, e, 1);
|
|
3915
|
-
if (n === null) {
|
|
3916
|
-
i = null;
|
|
3917
|
-
break;
|
|
3918
|
-
}
|
|
3919
|
-
i = Math.max(i, n);
|
|
3920
|
-
}
|
|
3921
|
-
}
|
|
3922
|
-
let a = e !== null && t !== null && n !== null && i !== null ? Math.max(e, t, n, i) : null;
|
|
3923
|
-
a !== null && (Ke = setTimeout(() => {
|
|
3924
|
-
Ke = void 0;
|
|
3925
|
-
let e = r;
|
|
3926
|
-
e && (r = null, e());
|
|
3927
|
-
}, a * 1 + de));
|
|
3893
|
+
a !== null && a + 17 < ke + he && (Be = setTimeout(() => {
|
|
3894
|
+
Be = void 0, Ne() && (S.removeEventListener("animationend", De), P(), Te(), Ce());
|
|
3895
|
+
}, a * 1 + 17 + ue));
|
|
3928
3896
|
}
|
|
3929
3897
|
return () => {
|
|
3930
|
-
if (w(),
|
|
3931
|
-
|
|
3932
|
-
for (let e of
|
|
3898
|
+
if (w(), je !== void 0 && clearTimeout(je), ge !== void 0 && clearTimeout(ge), Se(), fe?.(), le?.(), ze?.(), Ve(), S.removeEventListener("animationend", De), I) {
|
|
3899
|
+
Pe.detach();
|
|
3900
|
+
for (let e of Re) e();
|
|
3933
3901
|
}
|
|
3934
|
-
|
|
3902
|
+
P(), Oe?.(), C && e.getTransitionTaskId() !== C && n.delete(C);
|
|
3935
3903
|
};
|
|
3936
3904
|
},
|
|
3937
3905
|
activeResumeEntryCount: () => n.size
|
|
@@ -3939,20 +3907,20 @@ function eo(e) {
|
|
|
3939
3907
|
}
|
|
3940
3908
|
//#endregion
|
|
3941
3909
|
//#region src/utils/findScrollable.ts
|
|
3942
|
-
function
|
|
3943
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
3910
|
+
function ro(e, t) {
|
|
3911
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = io(e);
|
|
3944
3912
|
if (!o) return {
|
|
3945
3913
|
element: null,
|
|
3946
3914
|
hasMarker: !1
|
|
3947
3915
|
};
|
|
3948
3916
|
let s = o.closest?.(r);
|
|
3949
|
-
if (s instanceof HTMLElement &&
|
|
3917
|
+
if (s instanceof HTMLElement && ao(s, n) && (!a || oo(s, n))) return {
|
|
3950
3918
|
element: s,
|
|
3951
3919
|
hasMarker: !0
|
|
3952
3920
|
};
|
|
3953
3921
|
let c = o, l = 0;
|
|
3954
3922
|
for (; c && l < i;) {
|
|
3955
|
-
if (
|
|
3923
|
+
if (ao(c, n) && (!a || oo(c, n))) return {
|
|
3956
3924
|
element: c,
|
|
3957
3925
|
hasMarker: !1
|
|
3958
3926
|
};
|
|
@@ -3963,7 +3931,7 @@ function to(e, t) {
|
|
|
3963
3931
|
hasMarker: !1
|
|
3964
3932
|
};
|
|
3965
3933
|
}
|
|
3966
|
-
function
|
|
3934
|
+
function io(e) {
|
|
3967
3935
|
if (!e) return null;
|
|
3968
3936
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
3969
3937
|
if (n && n.length) {
|
|
@@ -3971,34 +3939,34 @@ function no(e) {
|
|
|
3971
3939
|
}
|
|
3972
3940
|
return e instanceof HTMLElement ? e : null;
|
|
3973
3941
|
}
|
|
3974
|
-
function
|
|
3942
|
+
function ao(e, t) {
|
|
3975
3943
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
3976
3944
|
}
|
|
3977
|
-
function
|
|
3978
|
-
if (!
|
|
3945
|
+
function oo(e, t) {
|
|
3946
|
+
if (!ao(e, t) || typeof window > "u") return !1;
|
|
3979
3947
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
3980
3948
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
3981
3949
|
}
|
|
3982
3950
|
//#endregion
|
|
3983
3951
|
//#region src/screen/computeBarRiding.ts
|
|
3984
|
-
function
|
|
3952
|
+
function so(e, t) {
|
|
3985
3953
|
return !!e && !!t && e.id === t.id;
|
|
3986
3954
|
}
|
|
3987
|
-
function
|
|
3955
|
+
function co(e) {
|
|
3988
3956
|
if (e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev) return {
|
|
3989
3957
|
app: !1,
|
|
3990
3958
|
nav: !1
|
|
3991
3959
|
};
|
|
3992
3960
|
let t = e.hasTopBar ? { id: e.topBarId } : void 0, n = e.hasNavBar ? { id: e.bottomBarId } : void 0, r = e.partnerMetadata?.topBar ?? (e.partnerBars?.topBar ? {} : void 0), i = e.partnerMetadata?.bottomBar ?? (e.partnerBars?.bottomBar ? {} : void 0);
|
|
3993
3961
|
return {
|
|
3994
|
-
app: e.hasTopBar && !
|
|
3995
|
-
nav: e.hasNavBar && !
|
|
3962
|
+
app: e.hasTopBar && !so(t, r),
|
|
3963
|
+
nav: e.hasNavBar && !so(n, i)
|
|
3996
3964
|
};
|
|
3997
3965
|
}
|
|
3998
3966
|
//#endregion
|
|
3999
3967
|
//#region src/core/engine/createSwipeController.ts
|
|
4000
|
-
var
|
|
4001
|
-
function
|
|
3968
|
+
var lo = "data-flemo-skip-animation";
|
|
3969
|
+
function uo(e) {
|
|
4002
3970
|
let t = Symbol("flemo-swipe-layer"), n = null, r = null, i = {
|
|
4003
3971
|
current: [],
|
|
4004
3972
|
prev: []
|
|
@@ -4047,9 +4015,9 @@ function co(e) {
|
|
|
4047
4015
|
y: e.clientY
|
|
4048
4016
|
}, m = t, x = Math.max(x, Math.abs(e.clientX - f.x), Math.abs(e.clientY - f.y));
|
|
4049
4017
|
}, w = (r, a, o) => {
|
|
4050
|
-
let s =
|
|
4051
|
-
if (r === e.getElements().scope) for (let e of i.current)
|
|
4052
|
-
else if (r === n) for (let e of i.prev)
|
|
4018
|
+
let s = K(r, a, o, t);
|
|
4019
|
+
if (r === e.getElements().scope) for (let e of i.current) K(e, a, o, t);
|
|
4020
|
+
else if (r === n) for (let e of i.prev) K(e, a, o, t);
|
|
4053
4021
|
return s;
|
|
4054
4022
|
}, T = (n) => {
|
|
4055
4023
|
let r = e.getPartnerBars(), a = e.getPartnerBarMetadata?.(), o = n?.querySelector("[data-flemo-bar=\"app\"]"), s = n?.querySelector("[data-flemo-bar=\"nav\"]"), c = (e) => {
|
|
@@ -4057,17 +4025,17 @@ function co(e) {
|
|
|
4057
4025
|
let t = e.getAttribute("data-flemo-bar-id");
|
|
4058
4026
|
return t === null ? {} : { id: e.getAttribute("data-flemo-bar-id-type") === "number" ? Number(t) : t };
|
|
4059
4027
|
}, l = e.hasSharedTopBar() ? { id: e.getSharedTopBarId?.() } : void 0, u = e.hasSharedBottomBar() ? { id: e.getSharedBottomBarId?.() } : void 0, d = a?.topBar ?? (r?.topBar ? {} : c(o)), f = a?.bottomBar ?? (r?.bottomBar ? {} : c(s)), p = [], { sharedTopBar: m, sharedBottomBar: h } = e.getElements();
|
|
4060
|
-
m && l && !
|
|
4028
|
+
m && l && !so(l, d) && p.push(m), h && u && !so(u, f) && p.push(h);
|
|
4061
4029
|
let g = [];
|
|
4062
|
-
n && (o && d && !
|
|
4030
|
+
n && (o && d && !so(d, l) && g.push(o), s && f && !so(f, u) && g.push(s)), i = {
|
|
4063
4031
|
current: p,
|
|
4064
4032
|
prev: g
|
|
4065
4033
|
};
|
|
4066
|
-
for (let n of p)
|
|
4067
|
-
for (let n of g)
|
|
4034
|
+
for (let n of p) _i(n, e.getTransition(), !1, t);
|
|
4035
|
+
for (let n of g) _i(n, e.getTransition(), !1, t);
|
|
4068
4036
|
}, E = () => {
|
|
4069
|
-
for (let e of i.current)
|
|
4070
|
-
for (let e of i.prev)
|
|
4037
|
+
for (let e of i.current) G(e, void 0, t), vi(e, t);
|
|
4038
|
+
for (let e of i.prev) G(e, void 0, t), vi(e, t);
|
|
4071
4039
|
i = {
|
|
4072
4040
|
current: [],
|
|
4073
4041
|
prev: []
|
|
@@ -4083,7 +4051,7 @@ function co(e) {
|
|
|
4083
4051
|
let o = z.get(i.getAttribute("data-flemo-part-name"));
|
|
4084
4052
|
if (!o) return;
|
|
4085
4053
|
let s = {
|
|
4086
|
-
animate: (e, n, r) =>
|
|
4054
|
+
animate: (e, n, r) => K(e, n, r, t),
|
|
4087
4055
|
element: i,
|
|
4088
4056
|
active: a
|
|
4089
4057
|
};
|
|
@@ -4092,12 +4060,12 @@ function co(e) {
|
|
|
4092
4060
|
for (let e of a.current) i(e, !0);
|
|
4093
4061
|
for (let e of a.prev) i(e, !1);
|
|
4094
4062
|
}, k = () => {
|
|
4095
|
-
for (let e of [...a.current, ...a.prev])
|
|
4063
|
+
for (let e of [...a.current, ...a.prev]) G(e, void 0, t);
|
|
4096
4064
|
a = {
|
|
4097
4065
|
current: [],
|
|
4098
4066
|
prev: []
|
|
4099
4067
|
};
|
|
4100
|
-
},
|
|
4068
|
+
}, A = async (t) => {
|
|
4101
4069
|
let i = e.getTransition();
|
|
4102
4070
|
if (!i.swipeDirection || e.getViewportScrollHeight() > 10) {
|
|
4103
4071
|
s = !1;
|
|
@@ -4129,19 +4097,19 @@ function co(e) {
|
|
|
4129
4097
|
prevScreen: n,
|
|
4130
4098
|
onStart: (e) => {
|
|
4131
4099
|
g?.onSwipeStart?.(e, {
|
|
4132
|
-
animate:
|
|
4100
|
+
animate: K,
|
|
4133
4101
|
currentDecorator: l,
|
|
4134
4102
|
prevDecorator: r
|
|
4135
4103
|
}), O("start", e, 0);
|
|
4136
4104
|
}
|
|
4137
4105
|
});
|
|
4138
4106
|
_ && !d ? e.setDragStatus("PENDING") : _ || (e.setDragStatus("IDLE"), c = !1, s = !1, S(t), E(), k());
|
|
4139
|
-
},
|
|
4140
|
-
let t =
|
|
4107
|
+
}, j = (e) => {
|
|
4108
|
+
let t = A(e);
|
|
4141
4109
|
u = t, t.finally(() => {
|
|
4142
4110
|
u = null;
|
|
4143
4111
|
});
|
|
4144
|
-
},
|
|
4112
|
+
}, ee = (t) => {
|
|
4145
4113
|
let i = e.getTransition();
|
|
4146
4114
|
if (!i.swipeDirection || !c || u || e.getViewportScrollHeight() > 10) return;
|
|
4147
4115
|
C(t);
|
|
@@ -4152,13 +4120,13 @@ function co(e) {
|
|
|
4152
4120
|
prevScreen: n,
|
|
4153
4121
|
onProgress: (e, t) => {
|
|
4154
4122
|
s?.onSwipe?.(e, t, {
|
|
4155
|
-
animate:
|
|
4123
|
+
animate: K,
|
|
4156
4124
|
currentDecorator: o,
|
|
4157
4125
|
prevDecorator: r
|
|
4158
4126
|
}), O("swipe", e, t);
|
|
4159
4127
|
}
|
|
4160
4128
|
});
|
|
4161
|
-
},
|
|
4129
|
+
}, M = async (o, s = !1) => {
|
|
4162
4130
|
u && await u;
|
|
4163
4131
|
let l = e.getTransition();
|
|
4164
4132
|
if (!l.swipeDirection || !c) return;
|
|
@@ -4192,16 +4160,16 @@ function co(e) {
|
|
|
4192
4160
|
onStart: (e) => {
|
|
4193
4161
|
let t = !s && e;
|
|
4194
4162
|
p?.onSwipeEnd?.(t, {
|
|
4195
|
-
animate:
|
|
4163
|
+
animate: K,
|
|
4196
4164
|
currentDecorator: f,
|
|
4197
4165
|
prevDecorator: r
|
|
4198
4166
|
}), O("end", t, 0);
|
|
4199
4167
|
}
|
|
4200
4168
|
});
|
|
4201
4169
|
if (!s && g) {
|
|
4202
|
-
d?.setAttribute(
|
|
4203
|
-
for (let e of i.current)
|
|
4204
|
-
for (let e of i.prev)
|
|
4170
|
+
d?.setAttribute(lo, "true"), f?.setAttribute(lo, "true");
|
|
4171
|
+
for (let e of i.current) vi(e, t);
|
|
4172
|
+
for (let e of i.prev) G(e, void 0, t), vi(e, t);
|
|
4205
4173
|
i = {
|
|
4206
4174
|
current: [],
|
|
4207
4175
|
prev: []
|
|
@@ -4209,14 +4177,14 @@ function co(e) {
|
|
|
4209
4177
|
current: [],
|
|
4210
4178
|
prev: []
|
|
4211
4179
|
}, e.back();
|
|
4212
|
-
} else d &&
|
|
4180
|
+
} else d && G(d, void 0, t), n && G(n, void 0, t), f && G(f), r && G(r), E(), k(), e.setDragStatus("IDLE");
|
|
4213
4181
|
};
|
|
4214
4182
|
return {
|
|
4215
4183
|
pointerDown: (t) => {
|
|
4216
|
-
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g =
|
|
4184
|
+
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g = ro(t.target, {
|
|
4217
4185
|
direction: "x",
|
|
4218
4186
|
verifyByScroll: !0
|
|
4219
|
-
}), _ =
|
|
4187
|
+
}), _ = ro(t.target, {
|
|
4220
4188
|
direction: "y",
|
|
4221
4189
|
verifyByScroll: !0
|
|
4222
4190
|
}), v = t.clientX, y = t.clientY);
|
|
@@ -4224,7 +4192,7 @@ function co(e) {
|
|
|
4224
4192
|
pointerMove: (t) => {
|
|
4225
4193
|
if (t.pointerId !== l || e.getViewportScrollHeight() > 10) return;
|
|
4226
4194
|
if (c) {
|
|
4227
|
-
|
|
4195
|
+
ee(t);
|
|
4228
4196
|
return;
|
|
4229
4197
|
}
|
|
4230
4198
|
if (!o) return;
|
|
@@ -4238,48 +4206,48 @@ function co(e) {
|
|
|
4238
4206
|
return;
|
|
4239
4207
|
}
|
|
4240
4208
|
let r = !g.element && !_.element, i = t.clientX - v, a = t.clientY - y, u = n === "x" ? i : a, d = n === "x" ? a : i;
|
|
4241
|
-
if (!(Math.max(Math.abs(u), Math.abs(d)) < 8) && (o = !1, !(u <= 0 || Math.abs(u) <= Math.abs(d) * 3))) if (r) s = !0,
|
|
4209
|
+
if (!(Math.max(Math.abs(u), Math.abs(d)) < 8) && (o = !1, !(u <= 0 || Math.abs(u) <= Math.abs(d) * 3))) if (r) s = !0, j(t);
|
|
4242
4210
|
else {
|
|
4243
4211
|
let e = _.element && _.element.scrollTop <= 0, r = g.element && g.element.scrollLeft <= 0 && g.hasMarker;
|
|
4244
|
-
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0,
|
|
4212
|
+
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0, j(t));
|
|
4245
4213
|
}
|
|
4246
4214
|
},
|
|
4247
4215
|
pointerUp: (e) => {
|
|
4248
|
-
e.pointerId === l && (o = !1, s = !1, l = null, c &&
|
|
4216
|
+
e.pointerId === l && (o = !1, s = !1, l = null, c && M(e));
|
|
4249
4217
|
},
|
|
4250
4218
|
pointerCancel: (e) => {
|
|
4251
|
-
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c &&
|
|
4219
|
+
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c && M(e, !0));
|
|
4252
4220
|
},
|
|
4253
4221
|
shouldPreventTouch: () => s
|
|
4254
4222
|
};
|
|
4255
4223
|
}
|
|
4256
4224
|
//#endregion
|
|
4257
4225
|
//#region src/screen/pendingNetwork.ts
|
|
4258
|
-
var
|
|
4259
|
-
|
|
4260
|
-
},
|
|
4261
|
-
if (!(
|
|
4262
|
-
if (
|
|
4226
|
+
var fo = 0, po = !1, mo = () => {
|
|
4227
|
+
fo = Math.max(0, fo - 1);
|
|
4228
|
+
}, ho = () => {
|
|
4229
|
+
if (!(po || typeof window > "u")) {
|
|
4230
|
+
if (po = !0, typeof window.fetch == "function") {
|
|
4263
4231
|
let e = window.fetch.bind(window);
|
|
4264
4232
|
window.fetch = (...t) => {
|
|
4265
|
-
|
|
4233
|
+
fo += 1;
|
|
4266
4234
|
let n;
|
|
4267
4235
|
try {
|
|
4268
4236
|
n = e(...t);
|
|
4269
4237
|
} catch (e) {
|
|
4270
|
-
throw
|
|
4238
|
+
throw mo(), e;
|
|
4271
4239
|
}
|
|
4272
|
-
return n.then((e) => (
|
|
4273
|
-
throw
|
|
4240
|
+
return n.then((e) => (mo(), e), (e) => {
|
|
4241
|
+
throw mo(), e;
|
|
4274
4242
|
});
|
|
4275
4243
|
};
|
|
4276
4244
|
}
|
|
4277
4245
|
if (typeof XMLHttpRequest == "function") {
|
|
4278
4246
|
let e = XMLHttpRequest.prototype.send;
|
|
4279
4247
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
4280
|
-
|
|
4248
|
+
fo += 1;
|
|
4281
4249
|
let n = !1, r = () => {
|
|
4282
|
-
n || (n = !0,
|
|
4250
|
+
n || (n = !0, mo());
|
|
4283
4251
|
};
|
|
4284
4252
|
this.addEventListener("loadend", r);
|
|
4285
4253
|
try {
|
|
@@ -4290,28 +4258,28 @@ var lo = 0, uo = !1, fo = () => {
|
|
|
4290
4258
|
};
|
|
4291
4259
|
}
|
|
4292
4260
|
}
|
|
4293
|
-
},
|
|
4261
|
+
}, go = () => (ho(), fo > 0);
|
|
4294
4262
|
//#endregion
|
|
4295
4263
|
//#region src/screen/animStartAnchor.ts
|
|
4296
|
-
function
|
|
4264
|
+
function _o(e) {
|
|
4297
4265
|
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
4298
4266
|
}
|
|
4299
|
-
var
|
|
4300
|
-
function
|
|
4301
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
4267
|
+
var vo = 300, yo = 20;
|
|
4268
|
+
function bo(e) {
|
|
4269
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, yo);
|
|
4302
4270
|
}
|
|
4303
|
-
function
|
|
4304
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
4271
|
+
function xo(e) {
|
|
4272
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of bo(e)) t.decode().catch(() => {});
|
|
4305
4273
|
}
|
|
4306
|
-
var
|
|
4274
|
+
var So = 3, Co = 40, wo = (e) => {
|
|
4307
4275
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
4308
4276
|
let t = Math.max(1, e.querySelectorAll("*").length);
|
|
4309
4277
|
/* v8 ignore stop */
|
|
4310
|
-
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length *
|
|
4311
|
-
},
|
|
4278
|
+
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * Co) / t < So;
|
|
4279
|
+
}, To = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
4312
4280
|
let t = e.animationName;
|
|
4313
4281
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
4314
|
-
}),
|
|
4282
|
+
}), Eo = (e) => {
|
|
4315
4283
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
4316
4284
|
which already requires querySelectorAll. */
|
|
4317
4285
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -4319,12 +4287,12 @@ var bo = 3, xo = 40, So = (e) => {
|
|
|
4319
4287
|
the guard shields exotic embedders. */
|
|
4320
4288
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
4321
4289
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
4322
|
-
if (r >=
|
|
4290
|
+
if (r >= yo) break;
|
|
4323
4291
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
4324
4292
|
}
|
|
4325
4293
|
return !1;
|
|
4326
4294
|
};
|
|
4327
|
-
function
|
|
4295
|
+
function Do(e, t = {}) {
|
|
4328
4296
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
4329
4297
|
if (n) return;
|
|
4330
4298
|
let r = t.scope;
|
|
@@ -4332,7 +4300,7 @@ function To(e, t = {}) {
|
|
|
4332
4300
|
e();
|
|
4333
4301
|
return;
|
|
4334
4302
|
}
|
|
4335
|
-
let i =
|
|
4303
|
+
let i = bo(r);
|
|
4336
4304
|
if (i.length === 0) {
|
|
4337
4305
|
e();
|
|
4338
4306
|
return;
|
|
@@ -4350,15 +4318,15 @@ function To(e, t = {}) {
|
|
|
4350
4318
|
return;
|
|
4351
4319
|
}
|
|
4352
4320
|
let i = () => !n.renderSettleOnly && (f() || d());
|
|
4353
|
-
if (!n.renderSettleOnly && !
|
|
4321
|
+
if (!n.renderSettleOnly && !wo(r)) {
|
|
4354
4322
|
e();
|
|
4355
4323
|
return;
|
|
4356
4324
|
}
|
|
4357
4325
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
4358
4326
|
the fallback only shields exotic embedders. */
|
|
4359
|
-
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () =>
|
|
4327
|
+
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () => wo(r) && To(r), f = () => go() || Eo(r), p = () => {
|
|
4360
4328
|
u || (u = !0, v.disconnect(), clearTimeout(y), clearTimeout(b), clearTimeout(x), c.forEach((e) => cancelAnimationFrame(e)), c = [], e());
|
|
4361
|
-
}, m = () => n.renderSettleOnly ? 6 : !
|
|
4329
|
+
}, m = () => n.renderSettleOnly ? 6 : !wo(r) && !i() ? 2 : 6, h = !1, g = () => {
|
|
4362
4330
|
if (!n.renderSettleOnly) {
|
|
4363
4331
|
p();
|
|
4364
4332
|
return;
|
|
@@ -4437,14 +4405,14 @@ function To(e, t = {}) {
|
|
|
4437
4405
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
4438
4406
|
};
|
|
4439
4407
|
}
|
|
4440
|
-
function
|
|
4441
|
-
let n =
|
|
4408
|
+
function Oo(e, t = {}) {
|
|
4409
|
+
let n = Do(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
4442
4410
|
return () => {
|
|
4443
4411
|
n(), clearTimeout(i);
|
|
4444
4412
|
};
|
|
4445
4413
|
}
|
|
4446
|
-
var
|
|
4447
|
-
function
|
|
4414
|
+
var ko = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
4415
|
+
function Ao() {
|
|
4448
4416
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
4449
4417
|
clearTimeout(n.backstop), e.delete(t);
|
|
4450
4418
|
let r = [...n.members];
|
|
@@ -4454,14 +4422,14 @@ function Oo() {
|
|
|
4454
4422
|
return { join: (r, i, a) => {
|
|
4455
4423
|
let o = e.get(r);
|
|
4456
4424
|
if (o) {
|
|
4457
|
-
let e =
|
|
4425
|
+
let e = ko(a);
|
|
4458
4426
|
if (e > o.backstopMs) {
|
|
4459
4427
|
clearTimeout(o.backstop);
|
|
4460
4428
|
let n = o;
|
|
4461
4429
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
4462
4430
|
}
|
|
4463
4431
|
} else {
|
|
4464
|
-
let n =
|
|
4432
|
+
let n = ko(a), i = {
|
|
4465
4433
|
members: /* @__PURE__ */ new Set(),
|
|
4466
4434
|
backstop: setTimeout(() => t(r, i), n),
|
|
4467
4435
|
backstopMs: n
|
|
@@ -4471,7 +4439,7 @@ function Oo() {
|
|
|
4471
4439
|
let s = o, c = {
|
|
4472
4440
|
release: i,
|
|
4473
4441
|
ready: !1,
|
|
4474
|
-
cancelReadiness:
|
|
4442
|
+
cancelReadiness: Do(() => {
|
|
4475
4443
|
c.ready = !0, n(s) && t(r, s);
|
|
4476
4444
|
}, a)
|
|
4477
4445
|
};
|
|
@@ -4488,7 +4456,7 @@ function Oo() {
|
|
|
4488
4456
|
}
|
|
4489
4457
|
//#endregion
|
|
4490
4458
|
//#region src/screen/observeBarHeight.ts
|
|
4491
|
-
function
|
|
4459
|
+
function jo(e, t) {
|
|
4492
4460
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
4493
4461
|
let n = new ResizeObserver(([e]) => {
|
|
4494
4462
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -4499,30 +4467,31 @@ function ko(e, t) {
|
|
|
4499
4467
|
}
|
|
4500
4468
|
//#endregion
|
|
4501
4469
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
4502
|
-
var
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4470
|
+
var Mo = 0, No = 0, Po = 0, Fo = !1, Io = /* @__PURE__ */ new Set(), Lo = 0, Ro = () => {
|
|
4471
|
+
let e = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
4472
|
+
e = e < 0 ? 0 : e;
|
|
4473
|
+
let t = e - Mo;
|
|
4474
|
+
t = t < 0 ? 0 : t, Mo ||= e, No = e, Po = t, Fo = !0;
|
|
4475
|
+
for (let n of [...Io]) n(e, t);
|
|
4476
|
+
}, zo = () => {
|
|
4477
|
+
cancelAnimationFrame(Lo), Lo = requestAnimationFrame(Ro);
|
|
4478
|
+
};
|
|
4479
|
+
function Bo(e) {
|
|
4480
|
+
let t = Io.size === 0;
|
|
4481
|
+
return Io.add(e), t && (window.visualViewport?.addEventListener("resize", zo), window.visualViewport?.addEventListener("scroll", zo)), Fo && (e(No, Po), t && zo()), () => {
|
|
4482
|
+
Io.delete(e), !(Io.size > 0) && (cancelAnimationFrame(Lo), window.visualViewport?.removeEventListener("resize", zo), window.visualViewport?.removeEventListener("scroll", zo));
|
|
4514
4483
|
};
|
|
4515
4484
|
}
|
|
4516
4485
|
//#endregion
|
|
4517
4486
|
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
4518
|
-
var
|
|
4519
|
-
function
|
|
4520
|
-
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !
|
|
4521
|
-
if (
|
|
4522
|
-
|
|
4487
|
+
var Vo = () => {}, Ho = "data-flemo-gpu-prewarm", Uo = 2e3, Wo = 1200, Go = 120, Ko = 3, qo = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", Jo = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", Yo = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", Xo = "cold", Zo = 0, Qo = null;
|
|
4488
|
+
function $o() {
|
|
4489
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !F()) return Vo;
|
|
4490
|
+
if (Zo += 1, Xo === "cold") {
|
|
4491
|
+
Xo = "scheduled";
|
|
4523
4492
|
let e = () => document.querySelector("[data-flemo-status=\"PUSHING\"],[data-flemo-status=\"POPPING\"],[data-flemo-status=\"REPLACING\"]") !== null, t = () => {
|
|
4524
|
-
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout:
|
|
4525
|
-
|
|
4493
|
+
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: Uo }) : null, t = e === null ? setTimeout(n, Wo) : null;
|
|
4494
|
+
Qo = () => {
|
|
4526
4495
|
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
4527
4496
|
};
|
|
4528
4497
|
}, n = () => {
|
|
@@ -4530,13 +4499,13 @@ function Wo() {
|
|
|
4530
4499
|
t();
|
|
4531
4500
|
return;
|
|
4532
4501
|
}
|
|
4533
|
-
|
|
4502
|
+
Qo = null, Xo = "done";
|
|
4534
4503
|
let n = document.createElement("div");
|
|
4535
|
-
n.setAttribute(
|
|
4504
|
+
n.setAttribute(Ho, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", qo);
|
|
4536
4505
|
let r = document.createElement("div");
|
|
4537
|
-
r.setAttribute("style",
|
|
4506
|
+
r.setAttribute("style", Jo), r.textContent = "flemo";
|
|
4538
4507
|
let i = document.createElement("div");
|
|
4539
|
-
i.setAttribute("style",
|
|
4508
|
+
i.setAttribute("style", Yo);
|
|
4540
4509
|
let a = document.createElement("div");
|
|
4541
4510
|
a.setAttribute("style", "width:96px;font-size:11px;color:#123;will-change:transform;transform:translate3d(0,0,0);");
|
|
4542
4511
|
let o = document.createElement("div");
|
|
@@ -4557,14 +4526,14 @@ function Wo() {
|
|
|
4557
4526
|
c.setAttribute("style", "border-top:1px solid #ccd;padding:2px 0;"), c.textContent = "의원 기록 표결 발의 가나다라", a.append(o, s, c), n.append(r, i, a), document.body.appendChild(n);
|
|
4558
4527
|
try {
|
|
4559
4528
|
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4560
|
-
duration:
|
|
4561
|
-
iterations:
|
|
4529
|
+
duration: Go,
|
|
4530
|
+
iterations: Ko
|
|
4562
4531
|
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
4563
|
-
duration:
|
|
4564
|
-
iterations:
|
|
4532
|
+
duration: Go,
|
|
4533
|
+
iterations: Ko
|
|
4565
4534
|
}), a.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4566
|
-
duration:
|
|
4567
|
-
iterations:
|
|
4535
|
+
duration: Go,
|
|
4536
|
+
iterations: Ko
|
|
4568
4537
|
});
|
|
4569
4538
|
} catch {}
|
|
4570
4539
|
setTimeout(() => n.remove(), 450);
|
|
@@ -4573,12 +4542,12 @@ function Wo() {
|
|
|
4573
4542
|
}
|
|
4574
4543
|
let e = !1;
|
|
4575
4544
|
return () => {
|
|
4576
|
-
e || (e = !0,
|
|
4545
|
+
e || (e = !0, Zo = Math.max(0, Zo - 1), Zo === 0 && Xo === "scheduled" && (Qo?.(), Qo = null, Xo = "cold"));
|
|
4577
4546
|
};
|
|
4578
4547
|
}
|
|
4579
4548
|
//#endregion
|
|
4580
4549
|
//#region src/utils/isOpaqueColor.ts
|
|
4581
|
-
function
|
|
4550
|
+
function es(e) {
|
|
4582
4551
|
let t = e.trim().toLowerCase();
|
|
4583
4552
|
if (t === "transparent" || t === "") return !1;
|
|
4584
4553
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -4589,7 +4558,7 @@ function Go(e) {
|
|
|
4589
4558
|
}
|
|
4590
4559
|
//#endregion
|
|
4591
4560
|
//#region src/utils/buildRoutePath.ts
|
|
4592
|
-
function
|
|
4561
|
+
function ts(e, n) {
|
|
4593
4562
|
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();
|
|
4594
4563
|
return {
|
|
4595
4564
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -4597,4 +4566,4 @@ function Ko(e, n) {
|
|
|
4597
4566
|
};
|
|
4598
4567
|
}
|
|
4599
4568
|
//#endregion
|
|
4600
|
-
export {
|
|
4569
|
+
export { vo as ANIM_HOLD_RELEASE_BACKSTOP_MS, J as OFFLOADED_SRC_ATTR, sr as OVERSIZE_AREA_RATIO, Ea as SKIP_ANIMATION_ATTR, s as TaskManager, s as TaskManger, _o as animHoldKey, K as animateInline, En as animationName, ie as appendParamsQuery, Rn as applyTransitionStyles, ts as buildRoutePath, oo as canProgrammaticallyScroll, G as clearInlineAnimation, bn as collectAnimatedProperties, Mn as compileTransitionStyles, co as computeBarRiding, Pt as computeScreenFreeze, Nt as computeScreenFreezeMode, b as consumeSelfInducedPop, Ao as createAnimHoldCoordinator, g as createBrowserHistoryDriver, Jt as createDecorator, c as createHistoryStore, x as createHistorySync, br as createImageDecodeOffloader, j as createMemoryHistoryDriver, ee as createNavigateStore, ne as createNavigationController, Qt as createPartTransition, Yt as createRawDecorator, $t as createRawPartTransition, It as createRawTransition, pe as createRouterScope, me as createScreenSelector, ue as createScreenStore, _ as createSelfPopGuard, ae as createStepController, uo as createSwipeController, Ft as createTransition, no as createTransitionEngine, se as createTransitionStore, Vt as cupertino, R as decoratorMap, F as detectBlinkEngine, xo as eagerlyDecodeImages, xn as easingToCss, $o as ensureGpuPipelinePrewarm, Sr as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, Gn as enteringInitialStyle, ro as findScrollable, l as getMatchedPathPattern, u as getParams, Ue as governedCompiledActive, Fr as holdCompositorWarm, ye as isDesktopBlink, _e as isLegacyAndroidBlink, es as isOpaqueColor, f as isServer, Ut as layout, He as lowPowerCadenceActive, y as markSelfInducedPop, ce as matchesPathname, Wt as material, Gt as none, jo as observeBarHeight, Bo as observeViewportScrollHeight, ao as overflowsAxis, Zt as overlay, z as partTransitionMap, mt as readDeferReleaseCommitFlag, ft as readDesktopReleaseFlipFlag, vt as readImageOffloadOverride, _t as readLayerPromotionFlag, gt as readPrerasterFlag, lt as readSettleGateFlag, re as readStepParams, Wn as registerTransitionDefinitions, A as releaseScopeHistorySync, qt as resolveTransition, Oo as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, so as sharedBarsMatch, hr as shouldOffloadImage, at as steadySixtyPlayerEligible, oe as subscribeStepParamsRestore, V as targetToDecls, Kt as transitionMap, U as variantHasAnimation };
|