@flemo/core 1.28.0 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/engine/governedCompiled.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +875 -948
- package/dist/transition/__tests__/swipeSettle.test.d.ts +1 -0
- package/dist/transition/animateInline.d.ts +1 -0
- package/dist/transition/compileTransitionStyles.d.ts +2 -2
- package/dist/transition/swipeSettle.d.ts +11 -0
- package/package.json +3 -3
- package/dist/core/engine/lowPowerCadence.d.ts +0 -6
- package/dist/transition/settleScrub.d.ts +0 -19
- /package/dist/core/engine/__tests__/{lowPowerCadence.test.d.ts → createSwipeController.releaseClock.test.d.ts} +0 -0
- /package/dist/{transition/__tests__/settleScrub.test.d.ts → core/engine/__tests__/createSwipeController.revealHold.test.d.ts} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -587,7 +587,7 @@ var M = (e, t, n) => {
|
|
|
587
587
|
let s = await Promise.race([a, o]);
|
|
588
588
|
i(), s && r();
|
|
589
589
|
};
|
|
590
|
-
function
|
|
590
|
+
function F(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;
|
|
@@ -784,14 +784,14 @@ function te(e) {
|
|
|
784
784
|
}
|
|
785
785
|
//#endregion
|
|
786
786
|
//#region src/navigate/createStepController.ts
|
|
787
|
-
var
|
|
787
|
+
var te = (e) => {
|
|
788
788
|
let t = e;
|
|
789
789
|
return t?.step ? t.params ?? {} : null;
|
|
790
|
-
},
|
|
790
|
+
}, ne = (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 re(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 ie(e) {
|
|
|
849
849
|
}
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function ie(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 ae(e, t) {
|
|
|
859
859
|
}
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/transition/store.ts
|
|
862
|
-
function
|
|
862
|
+
function ae(t = "cupertino") {
|
|
863
863
|
return e((e) => ({
|
|
864
864
|
defaultTransitionName: t,
|
|
865
865
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -867,18 +867,18 @@ function oe(t = "cupertino") {
|
|
|
867
867
|
}
|
|
868
868
|
//#endregion
|
|
869
869
|
//#region src/utils/matchesPathname.ts
|
|
870
|
-
function
|
|
870
|
+
function oe(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 se = (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 ce() {
|
|
882
882
|
return e((e) => ({
|
|
883
883
|
dragStatus: "IDLE",
|
|
884
884
|
replaceTransitionStatus: "IDLE",
|
|
@@ -892,8 +892,8 @@ function le() {
|
|
|
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: se(i.topBar, o?.topBar),
|
|
896
|
+
bottomBar: se(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 le() {
|
|
|
942
942
|
}
|
|
943
943
|
//#endregion
|
|
944
944
|
//#region src/core/createRouterScope.ts
|
|
945
|
-
var
|
|
945
|
+
var le = {
|
|
946
946
|
mark: () => {},
|
|
947
947
|
consume: () => !1
|
|
948
|
-
},
|
|
949
|
-
function
|
|
948
|
+
}, ue = /* @__PURE__ */ new Map();
|
|
949
|
+
function de(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 = ue.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();
|
|
@@ -979,25 +979,25 @@ function fe(e) {
|
|
|
979
979
|
layoutId: p.layoutId
|
|
980
980
|
},
|
|
981
981
|
url: p.pathname
|
|
982
|
-
}) : o, h = a ?
|
|
982
|
+
}) : o, h = a ? le : _(), g = {
|
|
983
983
|
history: c([p], 0),
|
|
984
984
|
navigate: ee(),
|
|
985
|
-
transition:
|
|
986
|
-
screen:
|
|
985
|
+
transition: ae(i),
|
|
986
|
+
screen: ce(),
|
|
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) => oe(t, e),
|
|
993
993
|
persistent: !!s,
|
|
994
994
|
life: { alive: !0 }
|
|
995
995
|
};
|
|
996
|
-
return s &&
|
|
996
|
+
return s && ue.set(s, g), g;
|
|
997
997
|
}
|
|
998
998
|
//#endregion
|
|
999
999
|
//#region src/screen/createScreenSelector.ts
|
|
1000
|
-
function
|
|
1000
|
+
function fe(e, t) {
|
|
1001
1001
|
return e.map((n, r) => ({
|
|
1002
1002
|
...n,
|
|
1003
1003
|
isActive: r === t,
|
|
@@ -1010,16 +1010,16 @@ function pe(e, t) {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
//#endregion
|
|
1012
1012
|
//#region src/core/engine/driverPolicy.ts
|
|
1013
|
-
var
|
|
1013
|
+
var pe = "flemo:motion-driver-force", me = !1, he = () => {
|
|
1014
1014
|
try {
|
|
1015
1015
|
try {
|
|
1016
|
-
typeof localStorage < "u" && localStorage.removeItem(
|
|
1016
|
+
typeof localStorage < "u" && localStorage.removeItem(pe);
|
|
1017
1017
|
} catch {}
|
|
1018
1018
|
if (typeof sessionStorage > "u") return null;
|
|
1019
|
-
let e = sessionStorage.getItem(
|
|
1019
|
+
let e = sessionStorage.getItem(pe);
|
|
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 ? (!me && typeof console < "u" && (me = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${
|
|
1022
|
+
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!me && typeof console < "u" && (me = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${pe}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(pe), null);
|
|
1023
1023
|
} catch {
|
|
1024
1024
|
return null;
|
|
1025
1025
|
}
|
|
@@ -1041,139 +1041,94 @@ var F = "flemo:motion-driver-force", me = !1, he = () => {
|
|
|
1041
1041
|
return t ? t === "raf" : e;
|
|
1042
1042
|
},
|
|
1043
1043
|
pinnedDriver: he
|
|
1044
|
-
}))(!0), be =
|
|
1044
|
+
}))(!0), be = () => !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0, xe = 14, Se = 22, Ce = 2, we = 1.5, Te = "flemo:sixty", Ee = () => {
|
|
1045
1045
|
try {
|
|
1046
|
-
return typeof sessionStorage < "u"
|
|
1047
|
-
} catch {
|
|
1048
|
-
return !1;
|
|
1049
|
-
}
|
|
1050
|
-
}, Ae = (e) => {
|
|
1051
|
-
try {
|
|
1052
|
-
typeof sessionStorage < "u" && sessionStorage.setItem(De, e ? "1" : "0");
|
|
1053
|
-
} catch {}
|
|
1054
|
-
}, je = !1, Me = !1, Ne = !1, Pe = 12, Fe = 8, Ie = [], L = null, Le = !1, Re = !1, ze = !1, Be = () => {
|
|
1055
|
-
if (Le || !Oe()) return;
|
|
1056
|
-
Le = !0;
|
|
1057
|
-
let e = (t) => {
|
|
1058
|
-
if (L !== null && (Ie.push(t - L), Ie.length > Pe && Ie.shift(), Ie.length >= Fe)) {
|
|
1059
|
-
let e = [...Ie].sort((e, t) => e - t), t = e.slice(1, e.length - 1), n = t[t.length >> 1];
|
|
1060
|
-
t[t.length - 1] - t[0] <= Se && (Re = n >= be && n <= xe, ze = !0);
|
|
1061
|
-
}
|
|
1062
|
-
L = t, requestAnimationFrame(e);
|
|
1063
|
-
};
|
|
1064
|
-
requestAnimationFrame(e);
|
|
1065
|
-
}, Ve = () => je || ze && Re, He = () => Oe(), Ue = (e = 0) => {
|
|
1066
|
-
if (Me || !Oe()) return;
|
|
1067
|
-
Me = !0;
|
|
1068
|
-
let t = [], n = null, r = (i) => {
|
|
1069
|
-
if (n !== null && t.push(i - n), n = i, t.length < we) {
|
|
1070
|
-
requestAnimationFrame(r);
|
|
1071
|
-
return;
|
|
1072
|
-
}
|
|
1073
|
-
Me = !1;
|
|
1074
|
-
let a = [...t].sort((e, t) => e - t), o = a.slice(0, a.length - 1), s = o[0] >= be && o[o.length - 1] <= xe && o[o.length - 1] - o[0] <= Se, c = o[o.length - 1] <= Ce;
|
|
1075
|
-
if (s || c) {
|
|
1076
|
-
je = s, s && o[Math.floor(o.length / 2)], Ae(je);
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
/* v8 ignore next 3 -- setTimeout exists in every runtime under test. */
|
|
1080
|
-
e + 1 < Ee && typeof setTimeout == "function" && setTimeout(() => Ue(e + 1), Te);
|
|
1081
|
-
};
|
|
1082
|
-
requestAnimationFrame(r);
|
|
1083
|
-
}, We = () => {
|
|
1084
|
-
Be(), Ue(), !(Ne || typeof document > "u" || typeof document.addEventListener != "function") && (Ne = !0, document.addEventListener("visibilitychange", () => {
|
|
1085
|
-
document.visibilityState === "visible" && Ue();
|
|
1086
|
-
}));
|
|
1087
|
-
};
|
|
1088
|
-
Oe() && (je = ke(), Be(), Ue());
|
|
1089
|
-
var Ge = 14, Ke = 22, qe = 2, Je = 1.5, Ye = "flemo:sixty", Xe = () => {
|
|
1090
|
-
try {
|
|
1091
|
-
return typeof sessionStorage < "u" ? sessionStorage.getItem(Ye) : null;
|
|
1046
|
+
return typeof sessionStorage < "u" ? sessionStorage.getItem(Te) : null;
|
|
1092
1047
|
} catch {
|
|
1093
1048
|
return null;
|
|
1094
1049
|
}
|
|
1095
|
-
},
|
|
1050
|
+
}, De = (e) => {
|
|
1096
1051
|
try {
|
|
1097
|
-
typeof sessionStorage < "u" && sessionStorage.setItem(
|
|
1052
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(Te, e);
|
|
1098
1053
|
} catch {}
|
|
1099
|
-
},
|
|
1100
|
-
if (!(!Number.isFinite(e) || e <= 0) &&
|
|
1054
|
+
}, Oe = Ee(), ke = Oe === "high", Ae = Oe !== null && Oe !== "high" ? Math.min(Ce, Math.max(0, parseInt(Oe, 10) || 0)) : 0, je = () => typeof navigator > "u" || (navigator.maxTouchPoints ?? 0) === 0, Me = (e, t) => {
|
|
1055
|
+
if (!(!Number.isFinite(e) || e <= 0) && je()) {
|
|
1101
1056
|
if (e < 12) {
|
|
1102
1057
|
if (t !== void 0 && t > 24) return;
|
|
1103
|
-
|
|
1058
|
+
ke = !0, Ae = 0, De("high");
|
|
1104
1059
|
return;
|
|
1105
1060
|
}
|
|
1106
|
-
if (e >=
|
|
1107
|
-
|
|
1061
|
+
if (e >= xe && e <= Se) {
|
|
1062
|
+
Ae = Math.min(Ce, Ae + 1), ke || De(String(Ae));
|
|
1108
1063
|
return;
|
|
1109
1064
|
}
|
|
1110
|
-
e <
|
|
1065
|
+
e < xe && (Ae = 0, ke || De("0"));
|
|
1111
1066
|
}
|
|
1112
|
-
},
|
|
1067
|
+
}, Ne = () => !ke && Ae >= Ce, Pe = () => Ne() && I() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && typeof window < "u" && (window.devicePixelRatio || 1) >= we, L = (e) => {
|
|
1113
1068
|
try {
|
|
1114
1069
|
return typeof sessionStorage < "u" ? sessionStorage.getItem(e) : null;
|
|
1115
1070
|
} catch {
|
|
1116
1071
|
return null;
|
|
1117
1072
|
}
|
|
1118
|
-
},
|
|
1119
|
-
let e =
|
|
1073
|
+
}, Fe = () => L("flemo:landing-snap") === "on", Ie = () => {
|
|
1074
|
+
let e = L("flemo:imghold");
|
|
1120
1075
|
return e === "on" || e === "off" ? e : null;
|
|
1121
|
-
},
|
|
1076
|
+
}, Le = () => I() && (navigator.maxTouchPoints ?? 0) > 0, Re = () => {
|
|
1122
1077
|
try {
|
|
1123
1078
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:settle-gate") : null;
|
|
1124
|
-
return e === "on" ? !0 : e === "off" ? !1 :
|
|
1079
|
+
return e === "on" ? !0 : e === "off" ? !1 : be() || Pe() || Le() || _e();
|
|
1125
1080
|
} catch {
|
|
1126
1081
|
return !1;
|
|
1127
1082
|
}
|
|
1128
|
-
},
|
|
1129
|
-
let e =
|
|
1083
|
+
}, ze = () => L("flemo:handoff") === "on", Be = () => L("flemo:arrivalhold") !== "off", Ve = () => {
|
|
1084
|
+
let e = L("flemo:deskflip");
|
|
1130
1085
|
return e === "on" || e !== "off" && _e();
|
|
1131
|
-
},
|
|
1132
|
-
let e =
|
|
1133
|
-
return e === "on" || e !== "off" &&
|
|
1134
|
-
},
|
|
1135
|
-
let e =
|
|
1136
|
-
return e === "defer" || e !== "sync" &&
|
|
1137
|
-
},
|
|
1138
|
-
let e =
|
|
1086
|
+
}, He = () => {
|
|
1087
|
+
let e = L("flemo:creep");
|
|
1088
|
+
return e === "on" || e !== "off" && be();
|
|
1089
|
+
}, Ue = () => {
|
|
1090
|
+
let e = L("flemo:relcommit");
|
|
1091
|
+
return e === "defer" || e !== "sync" && be();
|
|
1092
|
+
}, We = () => {
|
|
1093
|
+
let e = L("flemo:deskhead");
|
|
1139
1094
|
return e === "on" || e !== "off" && _e();
|
|
1140
|
-
},
|
|
1141
|
-
let e =
|
|
1095
|
+
}, Ge = () => L("flemo:preraster") === "on", Ke = () => Ge(), qe = () => {
|
|
1096
|
+
let e = L("flemo:imgoffload");
|
|
1142
1097
|
return e === "on" || e === "off" ? e : null;
|
|
1143
|
-
},
|
|
1144
|
-
if (
|
|
1145
|
-
let e =
|
|
1146
|
-
return
|
|
1147
|
-
},
|
|
1148
|
-
if (
|
|
1149
|
-
let e =
|
|
1150
|
-
return
|
|
1151
|
-
},
|
|
1152
|
-
if (
|
|
1153
|
-
let e =
|
|
1154
|
-
return
|
|
1155
|
-
},
|
|
1156
|
-
if (
|
|
1157
|
-
let e =
|
|
1158
|
-
return
|
|
1159
|
-
},
|
|
1160
|
-
if (
|
|
1161
|
-
let e =
|
|
1162
|
-
return
|
|
1163
|
-
},
|
|
1098
|
+
}, Je, Ye = () => {
|
|
1099
|
+
if (Je !== void 0) return Je;
|
|
1100
|
+
let e = L("flemo:apply");
|
|
1101
|
+
return Je = e === "scrub" ? e : null, Je;
|
|
1102
|
+
}, Xe, Ze = () => {
|
|
1103
|
+
if (Xe !== void 0) return Xe;
|
|
1104
|
+
let e = L("flemo:handoff");
|
|
1105
|
+
return Xe = e === "on" ? e : null, Xe;
|
|
1106
|
+
}, Qe, $e = () => {
|
|
1107
|
+
if (Qe !== void 0) return Qe;
|
|
1108
|
+
let e = L("flemo:snap");
|
|
1109
|
+
return Qe = e === "always" || e === "off" || e === "gate" || e === "hybrid" ? e : null, Qe;
|
|
1110
|
+
}, et, tt = () => {
|
|
1111
|
+
if (et !== void 0) return et;
|
|
1112
|
+
let e = L("flemo:snapband"), t = e === null ? NaN : Number(e);
|
|
1113
|
+
return et = Number.isFinite(t) && t > 0 ? t : 4, et;
|
|
1114
|
+
}, nt, rt = () => {
|
|
1115
|
+
if (nt !== void 0) return nt;
|
|
1116
|
+
let e = L("flemo:handoffms"), t = e === null ? NaN : Number(e);
|
|
1117
|
+
return nt = Number.isFinite(t) && t >= 0 ? t : 100, nt;
|
|
1118
|
+
}, it, at = () => (it === void 0 && (it = L("flemo:layers") === "resident"), it), ot, st = () => (ot === void 0 && (ot = L("flemo:freeze") === "shallow"), ot);
|
|
1164
1119
|
//#endregion
|
|
1165
1120
|
//#region src/screen/computeScreenFreeze.ts
|
|
1166
|
-
function
|
|
1121
|
+
function ct(e) {
|
|
1167
1122
|
if (e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex) return "immediate";
|
|
1168
1123
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
1169
|
-
return !e.isActive && t ?
|
|
1124
|
+
return !e.isActive && t ? st() ? "live" : "deferred" : "live";
|
|
1170
1125
|
}
|
|
1171
|
-
function
|
|
1172
|
-
return
|
|
1126
|
+
function lt(e) {
|
|
1127
|
+
return ct(e) !== "live";
|
|
1173
1128
|
}
|
|
1174
1129
|
//#endregion
|
|
1175
1130
|
//#region src/transition/createTransition.ts
|
|
1176
|
-
function
|
|
1131
|
+
function ut({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
1177
1132
|
return {
|
|
1178
1133
|
name: e,
|
|
1179
1134
|
initial: t,
|
|
@@ -1194,7 +1149,7 @@ function Pt({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exi
|
|
|
1194
1149
|
}
|
|
1195
1150
|
//#endregion
|
|
1196
1151
|
//#region src/transition/createRawTransition.ts
|
|
1197
|
-
function
|
|
1152
|
+
function dt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
1198
1153
|
return {
|
|
1199
1154
|
name: e,
|
|
1200
1155
|
initial: t,
|
|
@@ -1215,15 +1170,15 @@ function Ft({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1215
1170
|
}
|
|
1216
1171
|
//#endregion
|
|
1217
1172
|
//#region src/transition/cupertino.ts
|
|
1218
|
-
var
|
|
1173
|
+
var ft = (e, t, n) => {
|
|
1219
1174
|
let [r, i] = t, [a, o] = n;
|
|
1220
1175
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1221
|
-
},
|
|
1176
|
+
}, pt = 30, mt = .7, ht = [
|
|
1222
1177
|
.32,
|
|
1223
1178
|
.72,
|
|
1224
1179
|
0,
|
|
1225
1180
|
1
|
|
1226
|
-
],
|
|
1181
|
+
], gt = ut({
|
|
1227
1182
|
name: "cupertino",
|
|
1228
1183
|
initial: { x: "100%" },
|
|
1229
1184
|
idle: {
|
|
@@ -1233,29 +1188,29 @@ var It = (e, t, n) => {
|
|
|
1233
1188
|
enter: {
|
|
1234
1189
|
value: { x: 0 },
|
|
1235
1190
|
options: {
|
|
1236
|
-
duration:
|
|
1237
|
-
ease:
|
|
1191
|
+
duration: mt,
|
|
1192
|
+
ease: ht
|
|
1238
1193
|
}
|
|
1239
1194
|
},
|
|
1240
1195
|
enterBack: {
|
|
1241
1196
|
value: { x: "100%" },
|
|
1242
1197
|
options: {
|
|
1243
|
-
duration:
|
|
1244
|
-
ease:
|
|
1198
|
+
duration: mt,
|
|
1199
|
+
ease: ht
|
|
1245
1200
|
}
|
|
1246
1201
|
},
|
|
1247
1202
|
exit: {
|
|
1248
|
-
value: { x: `-${
|
|
1203
|
+
value: { x: `-${pt}%` },
|
|
1249
1204
|
options: {
|
|
1250
|
-
duration:
|
|
1251
|
-
ease:
|
|
1205
|
+
duration: mt,
|
|
1206
|
+
ease: ht
|
|
1252
1207
|
}
|
|
1253
1208
|
},
|
|
1254
1209
|
exitBack: {
|
|
1255
1210
|
value: { x: 0 },
|
|
1256
1211
|
options: {
|
|
1257
|
-
duration:
|
|
1258
|
-
ease:
|
|
1212
|
+
duration: mt,
|
|
1213
|
+
ease: ht
|
|
1259
1214
|
}
|
|
1260
1215
|
},
|
|
1261
1216
|
options: {
|
|
@@ -1263,24 +1218,24 @@ var It = (e, t, n) => {
|
|
|
1263
1218
|
swipeDirection: "x",
|
|
1264
1219
|
onSwipeStart: async () => !0,
|
|
1265
1220
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1266
|
-
let { offset: o } = t, s = o.x, c =
|
|
1267
|
-
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 +
|
|
1221
|
+
let { offset: o } = t, s = o.x, c = ft(s, [0, window.innerWidth], [0, 100]);
|
|
1222
|
+
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + pt / 100 * c}%` }, { duration: 0 }), c;
|
|
1268
1223
|
},
|
|
1269
1224
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1270
1225
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1271
1226
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1272
|
-
duration:
|
|
1273
|
-
ease:
|
|
1274
|
-
}), n(i, { x: c ? 0 : `-${
|
|
1275
|
-
duration:
|
|
1276
|
-
ease:
|
|
1227
|
+
duration: mt,
|
|
1228
|
+
ease: ht
|
|
1229
|
+
}), n(i, { x: c ? 0 : `-${pt}%` }, {
|
|
1230
|
+
duration: mt,
|
|
1231
|
+
ease: ht
|
|
1277
1232
|
})]), c;
|
|
1278
1233
|
}
|
|
1279
1234
|
}
|
|
1280
|
-
}),
|
|
1235
|
+
}), _t = (e, t, n) => {
|
|
1281
1236
|
let [r, i] = t, [a, o] = n;
|
|
1282
1237
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1283
|
-
},
|
|
1238
|
+
}, vt = ut({
|
|
1284
1239
|
name: "layout",
|
|
1285
1240
|
initial: { opacity: .97 },
|
|
1286
1241
|
idle: {
|
|
@@ -1308,7 +1263,7 @@ var It = (e, t, n) => {
|
|
|
1308
1263
|
swipeDirection: "y",
|
|
1309
1264
|
onSwipeStart: async () => !0,
|
|
1310
1265
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1311
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1266
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = _t(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);
|
|
1312
1267
|
return i?.(!0, 100), n(r, {
|
|
1313
1268
|
y: f,
|
|
1314
1269
|
opacity: c
|
|
@@ -1325,7 +1280,7 @@ var It = (e, t, n) => {
|
|
|
1325
1280
|
}, { duration: .3 })]), c;
|
|
1326
1281
|
}
|
|
1327
1282
|
}
|
|
1328
|
-
}),
|
|
1283
|
+
}), yt = ut({
|
|
1329
1284
|
name: "material",
|
|
1330
1285
|
initial: { y: "100%" },
|
|
1331
1286
|
idle: {
|
|
@@ -1433,7 +1388,7 @@ var It = (e, t, n) => {
|
|
|
1433
1388
|
})]), c;
|
|
1434
1389
|
}
|
|
1435
1390
|
}
|
|
1436
|
-
}),
|
|
1391
|
+
}), bt = ut({
|
|
1437
1392
|
name: "none",
|
|
1438
1393
|
initial: {},
|
|
1439
1394
|
idle: {
|
|
@@ -1456,20 +1411,20 @@ var It = (e, t, n) => {
|
|
|
1456
1411
|
value: {},
|
|
1457
1412
|
options: { duration: 0 }
|
|
1458
1413
|
}
|
|
1459
|
-
}),
|
|
1460
|
-
["none",
|
|
1461
|
-
["cupertino",
|
|
1462
|
-
["material",
|
|
1463
|
-
["layout",
|
|
1414
|
+
}), xt = /* @__PURE__ */ new Map([
|
|
1415
|
+
["none", bt],
|
|
1416
|
+
["cupertino", gt],
|
|
1417
|
+
["material", yt],
|
|
1418
|
+
["layout", vt]
|
|
1464
1419
|
]);
|
|
1465
1420
|
//#endregion
|
|
1466
1421
|
//#region src/transition/resolveTransition.ts
|
|
1467
|
-
function
|
|
1468
|
-
return
|
|
1422
|
+
function St(e) {
|
|
1423
|
+
return xt.get(e) ?? xt.get("none");
|
|
1469
1424
|
}
|
|
1470
1425
|
//#endregion
|
|
1471
1426
|
//#region src/transition/decorator/createDecorator.ts
|
|
1472
|
-
function
|
|
1427
|
+
function Ct({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1473
1428
|
return {
|
|
1474
1429
|
name: e,
|
|
1475
1430
|
initial: t,
|
|
@@ -1490,7 +1445,7 @@ function qt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1490
1445
|
}
|
|
1491
1446
|
//#endregion
|
|
1492
1447
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1493
|
-
function
|
|
1448
|
+
function wt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1494
1449
|
return {
|
|
1495
1450
|
name: e,
|
|
1496
1451
|
initial: t,
|
|
@@ -1511,30 +1466,30 @@ function Jt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1511
1466
|
}
|
|
1512
1467
|
//#endregion
|
|
1513
1468
|
//#region src/transition/decorator/overlay.ts
|
|
1514
|
-
var
|
|
1469
|
+
var Tt = "rgba(0, 0, 0, 0.1)", Et = Ct({
|
|
1515
1470
|
name: "overlay",
|
|
1516
1471
|
initial: {
|
|
1517
1472
|
opacity: 0,
|
|
1518
|
-
backgroundColor:
|
|
1473
|
+
backgroundColor: Tt
|
|
1519
1474
|
},
|
|
1520
1475
|
idle: {
|
|
1521
1476
|
value: {
|
|
1522
1477
|
opacity: 0,
|
|
1523
|
-
backgroundColor:
|
|
1478
|
+
backgroundColor: Tt
|
|
1524
1479
|
},
|
|
1525
1480
|
options: { duration: 0 }
|
|
1526
1481
|
},
|
|
1527
1482
|
enter: {
|
|
1528
1483
|
value: {
|
|
1529
1484
|
opacity: 1,
|
|
1530
|
-
backgroundColor:
|
|
1485
|
+
backgroundColor: Tt
|
|
1531
1486
|
},
|
|
1532
1487
|
options: { duration: .7 }
|
|
1533
1488
|
},
|
|
1534
1489
|
exit: {
|
|
1535
1490
|
value: {
|
|
1536
1491
|
opacity: 0,
|
|
1537
|
-
backgroundColor:
|
|
1492
|
+
backgroundColor: Tt
|
|
1538
1493
|
},
|
|
1539
1494
|
options: { duration: .7 }
|
|
1540
1495
|
},
|
|
@@ -1543,10 +1498,10 @@ var Yt = "rgba(0, 0, 0, 0.1)", Xt = qt({
|
|
|
1543
1498
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1544
1499
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1545
1500
|
}
|
|
1546
|
-
}),
|
|
1501
|
+
}), R = /* @__PURE__ */ new Map([["overlay", Et]]);
|
|
1547
1502
|
//#endregion
|
|
1548
1503
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1549
|
-
function
|
|
1504
|
+
function Dt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1550
1505
|
return {
|
|
1551
1506
|
name: e,
|
|
1552
1507
|
initial: t,
|
|
@@ -1567,7 +1522,7 @@ function Zt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1567
1522
|
}
|
|
1568
1523
|
//#endregion
|
|
1569
1524
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1570
|
-
function
|
|
1525
|
+
function Ot({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1571
1526
|
return {
|
|
1572
1527
|
name: e,
|
|
1573
1528
|
initial: t,
|
|
@@ -1588,7 +1543,7 @@ function Qt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1588
1543
|
}
|
|
1589
1544
|
//#endregion
|
|
1590
1545
|
//#region src/transition/partTransition/partTransition.ts
|
|
1591
|
-
var
|
|
1546
|
+
var z = /* @__PURE__ */ new Map(), kt = {
|
|
1592
1547
|
"IDLE-true": "self",
|
|
1593
1548
|
"IDLE-false": "self",
|
|
1594
1549
|
"PUSHING-true": "initial",
|
|
@@ -1599,17 +1554,17 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1599
1554
|
"POPPING-false": "PUSHING-false",
|
|
1600
1555
|
"COMPLETED-true": "self",
|
|
1601
1556
|
"COMPLETED-false": "self"
|
|
1602
|
-
},
|
|
1557
|
+
}, At = Object.keys(kt), jt = (e) => {
|
|
1603
1558
|
if (!e) return 0;
|
|
1604
1559
|
let t = e.duration;
|
|
1605
1560
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1606
|
-
},
|
|
1607
|
-
let n =
|
|
1561
|
+
}, Mt = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, Nt = (e, t) => {
|
|
1562
|
+
let n = kt[t];
|
|
1608
1563
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1609
|
-
},
|
|
1610
|
-
let n =
|
|
1564
|
+
}, B = (e, t) => {
|
|
1565
|
+
let n = Nt(e, t);
|
|
1611
1566
|
if (n === null) return null;
|
|
1612
|
-
let r = e.variants[t], i =
|
|
1567
|
+
let r = e.variants[t], i = jt(r.options), a = Mt(r.options);
|
|
1613
1568
|
return i <= 0 && a <= 0 ? null : {
|
|
1614
1569
|
from: n,
|
|
1615
1570
|
to: r.value,
|
|
@@ -1617,7 +1572,7 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1617
1572
|
delay: a,
|
|
1618
1573
|
ease: r.options?.ease
|
|
1619
1574
|
};
|
|
1620
|
-
},
|
|
1575
|
+
}, Pt = At, Ft = "translateZ(0.02px)", It = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), Lt = (e) => typeof e == "object" && !!e && !Array.isArray(e), Rt = /* @__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(".")), zt = (e, t) => t.startsWith("--") || Rt.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, Bt = (e, t) => typeof t == "number" ? zt(t, e) : typeof t == "string" ? t : "", Vt = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Ht = /* @__PURE__ */ new Set([
|
|
1621
1576
|
"x",
|
|
1622
1577
|
"y",
|
|
1623
1578
|
"z",
|
|
@@ -1628,7 +1583,7 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1628
1583
|
"rotateX",
|
|
1629
1584
|
"rotateY",
|
|
1630
1585
|
"rotateZ"
|
|
1631
|
-
]),
|
|
1586
|
+
]), Ut = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, Wt = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, Gt = /^1(\.0+)?$/, Kt = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && Gt.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && Wt.test(t.trim()) : t === 0 || typeof t == "string" && Ut.test(t.trim()), qt = (e, t) => {
|
|
1632
1587
|
switch (e) {
|
|
1633
1588
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1634
1589
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1642,16 +1597,16 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1642
1597
|
case "rotateY": return `rotateY(${t})`;
|
|
1643
1598
|
default: return "";
|
|
1644
1599
|
}
|
|
1645
|
-
},
|
|
1600
|
+
}, Jt = (e) => {
|
|
1646
1601
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1647
|
-
if (!
|
|
1602
|
+
if (!Lt(e)) return;
|
|
1648
1603
|
let n = [];
|
|
1649
1604
|
for (let r of Object.keys(e)) {
|
|
1650
|
-
let i = e[r], a =
|
|
1651
|
-
if (a !== "") if (
|
|
1605
|
+
let i = e[r], a = Bt(r, i);
|
|
1606
|
+
if (a !== "") if (Ht.has(r)) n.push(`${r}:${a}`);
|
|
1652
1607
|
else {
|
|
1653
|
-
let e = t.get(
|
|
1654
|
-
e.add(a), t.set(
|
|
1608
|
+
let e = t.get(Vt(r)) ?? /* @__PURE__ */ new Set();
|
|
1609
|
+
e.add(a), t.set(Vt(r), e);
|
|
1655
1610
|
}
|
|
1656
1611
|
}
|
|
1657
1612
|
r.add(n.sort().join("|"));
|
|
@@ -1661,13 +1616,13 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1661
1616
|
n = r.size > 1;
|
|
1662
1617
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1663
1618
|
return n && a.push("transform"), a;
|
|
1664
|
-
},
|
|
1665
|
-
if (!
|
|
1619
|
+
}, Yt = (e) => {
|
|
1620
|
+
if (!Lt(e)) return [];
|
|
1666
1621
|
let t = [], n = !0, r = [];
|
|
1667
1622
|
for (let i of Object.keys(e)) {
|
|
1668
|
-
let a = e[i], o =
|
|
1669
|
-
o !== "" && (
|
|
1670
|
-
property:
|
|
1623
|
+
let a = e[i], o = Bt(i, a);
|
|
1624
|
+
o !== "" && (Ht.has(i) ? (t.push(qt(i, o)), Kt(i, a) || (n = !1)) : r.push({
|
|
1625
|
+
property: Vt(i),
|
|
1671
1626
|
value: o
|
|
1672
1627
|
}));
|
|
1673
1628
|
}
|
|
@@ -1675,7 +1630,7 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1675
1630
|
property: "transform",
|
|
1676
1631
|
value: n ? "none" : t.join(" ")
|
|
1677
1632
|
}), r;
|
|
1678
|
-
},
|
|
1633
|
+
}, V = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), Xt = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1679
1634
|
linear: "linear",
|
|
1680
1635
|
easeIn: "ease-in",
|
|
1681
1636
|
easeOut: "ease-out",
|
|
@@ -1685,33 +1640,33 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1685
1640
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1686
1641
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1687
1642
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1688
|
-
}[e] ?? "ease" : "ease",
|
|
1643
|
+
}[e] ?? "ease" : "ease", Zt = (e, t) => {
|
|
1689
1644
|
let [n, r] = t.split("-");
|
|
1690
1645
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1691
|
-
},
|
|
1646
|
+
}, Qt = (e, t) => {
|
|
1692
1647
|
let [n, r] = t.split("-");
|
|
1693
1648
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1694
|
-
},
|
|
1649
|
+
}, $t = (e, t) => {
|
|
1695
1650
|
let [n, r] = t.split("-");
|
|
1696
1651
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1697
|
-
},
|
|
1652
|
+
}, en = (e, t) => {
|
|
1698
1653
|
let [n, r] = t.split("-");
|
|
1699
1654
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1700
|
-
},
|
|
1701
|
-
"-
|
|
1655
|
+
}, tn = (e, t, n) => `flemo-${e}-${It(t)}-${n}`, nn = [
|
|
1656
|
+
"-gov",
|
|
1702
1657
|
"-deskhead",
|
|
1703
|
-
"-
|
|
1704
|
-
],
|
|
1705
|
-
let o =
|
|
1658
|
+
"-govcreep"
|
|
1659
|
+
], rn = (e, t) => e === t || nn.some((n) => e === `${t}${n}`), an = (e, t, n, r, i, a) => {
|
|
1660
|
+
let o = Yt(r), s = Yt(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 = jt(i.options), p = Mt(i.options), m = Xt(i.options?.ease), h = a(t, n), g = e === "screen" ? `${h},\n${$t(t, n)}` : h;
|
|
1706
1661
|
if (s.length === 0 && o.length === 0) return "";
|
|
1707
|
-
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${
|
|
1708
|
-
let _ =
|
|
1662
|
+
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${V(s)}\n animation: none;\n}`;
|
|
1663
|
+
let _ = tn(e, t, n), v = [
|
|
1709
1664
|
`@keyframes ${_} {`,
|
|
1710
1665
|
" from {",
|
|
1711
|
-
|
|
1666
|
+
V(u).replace(/^/gm, " "),
|
|
1712
1667
|
" }",
|
|
1713
1668
|
" to {",
|
|
1714
|
-
|
|
1669
|
+
V(d).replace(/^/gm, " "),
|
|
1715
1670
|
" }",
|
|
1716
1671
|
"}"
|
|
1717
1672
|
].join("\n"), y = [
|
|
@@ -1723,7 +1678,7 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1723
1678
|
].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) => {
|
|
1724
1679
|
if (e === "part" || r <= 0 || f <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1725
1680
|
let a = f + r, c = (r / a * 100).toFixed(3), l = `${_}-${n}`, m = g.split(",\n").map((e) => `:root[${t}] ${e}`).join(",\n");
|
|
1726
|
-
return `\n@keyframes ${l} {\n 0%, ${c}% {\n${
|
|
1681
|
+
return `\n@keyframes ${l} {\n 0%, ${c}% {\n${V(u).replace(/^/gm, " ")}\n }\n 100% {\n${V(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}`;
|
|
1727
1682
|
}, 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 = (() => {
|
|
1728
1683
|
/* v8 ignore next */
|
|
1729
1684
|
if (e === "part") return "";
|
|
@@ -1735,69 +1690,69 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1735
1690
|
let e = u.find((e) => e.property === "transform");
|
|
1736
1691
|
if (!e) return [...u, {
|
|
1737
1692
|
property: "transform",
|
|
1738
|
-
value:
|
|
1693
|
+
value: Ft
|
|
1739
1694
|
}];
|
|
1740
1695
|
let t = e.value === "none" ? "" : `${e.value} `;
|
|
1741
1696
|
return u.map((e) => e.property === "transform" ? {
|
|
1742
1697
|
property: "transform",
|
|
1743
|
-
value: `${t}${
|
|
1698
|
+
value: `${t}${Ft}`
|
|
1744
1699
|
} : e);
|
|
1745
|
-
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-
|
|
1746
|
-
return `\n@keyframes ${c} {\n 0% {\n${
|
|
1747
|
-
})(), T = S("data-flemo-
|
|
1748
|
-
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${
|
|
1749
|
-
},
|
|
1700
|
+
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-govcreep`, l = g.split(",\n").map((e) => `:root[data-flemo-governed][data-flemo-creep] ${e}`).join(",\n");
|
|
1701
|
+
return `\n@keyframes ${c} {\n 0% {\n${V(u).replace(/^/gm, " ")}\n }\n ${a}% {\n${V(r).replace(/^/gm, " ")}\n }\n 100% {\n${V(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}`;
|
|
1702
|
+
})(), T = S("data-flemo-governed", "gov", b(n), !0), E = C("data-flemo-governed", 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], N = M === "PUSHING" || M === "REPLACING" ? " contain: layout;\n" : "";
|
|
1703
|
+
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${V(l)}\n` : ""}${ee}${N}}`}${T}${E}${w}${D}${O}${e === "screen" && n.endsWith("-false") && on(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park"] {\n animation: none;\n${V(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && on(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${V(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && on(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park-over"] {\n animation: none;\n${V(s)}\n opacity: 0.02;\n}` : ""}`;
|
|
1704
|
+
}, on = (e) => {
|
|
1750
1705
|
if (!e) return !1;
|
|
1751
1706
|
if (e.opacity === 0) return !0;
|
|
1752
1707
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1753
1708
|
return t(e.x) || t(e.y);
|
|
1754
|
-
},
|
|
1755
|
-
let i =
|
|
1756
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1757
|
-
},
|
|
1709
|
+
}, sn = (e, t, n, r) => {
|
|
1710
|
+
let i = Yt(r.value);
|
|
1711
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${V(i)}\n}`;
|
|
1712
|
+
}, cn = (e, t, n = []) => {
|
|
1758
1713
|
let r = [];
|
|
1759
1714
|
for (let t of e) {
|
|
1760
1715
|
let e = t.name;
|
|
1761
|
-
for (let n of
|
|
1762
|
-
let i = t.variants[n], a =
|
|
1716
|
+
for (let n of At) {
|
|
1717
|
+
let i = t.variants[n], a = kt[n];
|
|
1763
1718
|
if (a === "self") {
|
|
1764
|
-
r.push(
|
|
1719
|
+
r.push(sn(Zt, e, n, i));
|
|
1765
1720
|
continue;
|
|
1766
1721
|
}
|
|
1767
1722
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1768
|
-
r.push(
|
|
1723
|
+
r.push(an("screen", e, n, o, i, Zt));
|
|
1769
1724
|
}
|
|
1770
1725
|
}
|
|
1771
1726
|
for (let e of t) {
|
|
1772
1727
|
let t = e.name;
|
|
1773
|
-
for (let n of
|
|
1774
|
-
let i = e.variants[n], a =
|
|
1728
|
+
for (let n of Pt) {
|
|
1729
|
+
let i = e.variants[n], a = kt[n];
|
|
1775
1730
|
if (a === "self") {
|
|
1776
|
-
r.push(
|
|
1731
|
+
r.push(sn(Qt, t, n, i));
|
|
1777
1732
|
continue;
|
|
1778
1733
|
}
|
|
1779
1734
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1780
|
-
r.push(
|
|
1735
|
+
r.push(an("decorator", t, n, o, i, Qt));
|
|
1781
1736
|
}
|
|
1782
1737
|
}
|
|
1783
1738
|
for (let e of n) {
|
|
1784
1739
|
let t = e.name;
|
|
1785
|
-
for (let n of
|
|
1786
|
-
let i = e.variants[n], a =
|
|
1740
|
+
for (let n of Pt) {
|
|
1741
|
+
let i = e.variants[n], a = kt[n];
|
|
1787
1742
|
if (a === "self") {
|
|
1788
|
-
r.push(
|
|
1743
|
+
r.push(sn(en, t, n, i));
|
|
1789
1744
|
continue;
|
|
1790
1745
|
}
|
|
1791
1746
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1792
|
-
r.push(
|
|
1747
|
+
r.push(an("part", t, n, o, i, en));
|
|
1793
1748
|
}
|
|
1794
1749
|
}
|
|
1795
1750
|
return [
|
|
1796
1751
|
...r.filter((e) => e.length > 0),
|
|
1797
|
-
|
|
1798
|
-
|
|
1752
|
+
ln,
|
|
1753
|
+
un
|
|
1799
1754
|
].join("\n\n");
|
|
1800
|
-
},
|
|
1755
|
+
}, ln = [
|
|
1801
1756
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1802
1757
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1803
1758
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
@@ -1808,145 +1763,73 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1808
1763
|
"[data-flemo-anim-hold=\"park-over\"] [data-flemo-part-name] {",
|
|
1809
1764
|
" animation-play-state: paused !important;",
|
|
1810
1765
|
"}"
|
|
1811
|
-
].join("\n"),
|
|
1766
|
+
].join("\n"), un = [
|
|
1812
1767
|
"[data-flemo-held-arrival] {",
|
|
1813
1768
|
" display: none !important;",
|
|
1814
1769
|
"}"
|
|
1815
|
-
].join("\n"),
|
|
1816
|
-
let n =
|
|
1770
|
+
].join("\n"), H = (e, t) => {
|
|
1771
|
+
let n = kt[t];
|
|
1817
1772
|
if (n === "self") return !1;
|
|
1818
|
-
let r = e.variants[t], i =
|
|
1773
|
+
let r = e.variants[t], i = jt(r.options), a = Mt(r.options);
|
|
1819
1774
|
if (i <= 0 && a <= 0) return !1;
|
|
1820
|
-
let o =
|
|
1775
|
+
let o = Yt(n === "initial" ? e.initial : e.variants[n].value), s = Yt(r.value);
|
|
1821
1776
|
return o.length > 0 || s.length > 0;
|
|
1822
|
-
},
|
|
1777
|
+
}, dn = {
|
|
1823
1778
|
REPLACING: 33,
|
|
1824
1779
|
PUSHING: 33,
|
|
1825
1780
|
POPPING: 17
|
|
1826
|
-
},
|
|
1781
|
+
}, fn = {
|
|
1827
1782
|
REPLACING: 180,
|
|
1828
1783
|
PUSHING: 100,
|
|
1829
1784
|
POPPING: 80
|
|
1830
|
-
},
|
|
1831
|
-
function
|
|
1785
|
+
}, pn = "data-flemo";
|
|
1786
|
+
function mn() {
|
|
1832
1787
|
if (f()) return;
|
|
1833
|
-
let e =
|
|
1834
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1788
|
+
let e = cn(xt.values(), R.values(), z.values()), t = document.head.querySelector(`style[${pn}]`);
|
|
1789
|
+
t || (t = document.createElement("style"), t.setAttribute(pn, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1835
1790
|
}
|
|
1836
1791
|
//#endregion
|
|
1837
1792
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1838
|
-
var
|
|
1793
|
+
var hn = /* @__PURE__ */ new Map(), gn = /* @__PURE__ */ new Map(), _n = /* @__PURE__ */ new Map(), vn = (e, t) => {
|
|
1839
1794
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1840
|
-
},
|
|
1795
|
+
}, yn = (e, t) => {
|
|
1841
1796
|
let n = (e.get(t) ?? 1) - 1;
|
|
1842
1797
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1843
1798
|
};
|
|
1844
|
-
function
|
|
1845
|
-
for (let t of e)
|
|
1846
|
-
for (let e of t)
|
|
1847
|
-
for (let e of n)
|
|
1848
|
-
return
|
|
1849
|
-
for (let t of e)
|
|
1850
|
-
for (let e of t)
|
|
1851
|
-
for (let e of n)
|
|
1852
|
-
|
|
1799
|
+
function bn(e, t, n = []) {
|
|
1800
|
+
for (let t of e) xt.set(t.name, t), vn(hn, t.name);
|
|
1801
|
+
for (let e of t) R.set(e.name, e), vn(gn, e.name);
|
|
1802
|
+
for (let e of n) z.set(e.name, e), vn(_n, e.name);
|
|
1803
|
+
return mn(), () => {
|
|
1804
|
+
for (let t of e) yn(hn, t.name) && xt.delete(t.name);
|
|
1805
|
+
for (let e of t) yn(gn, e.name) && R.delete(e.name);
|
|
1806
|
+
for (let e of n) yn(_n, e.name) && z.delete(e.name);
|
|
1807
|
+
mn();
|
|
1853
1808
|
};
|
|
1854
1809
|
}
|
|
1855
1810
|
//#endregion
|
|
1856
1811
|
//#region src/transition/enteringInitialStyle.ts
|
|
1857
|
-
function
|
|
1812
|
+
function xn(e) {
|
|
1858
1813
|
let { initial: t, isActive: n, status: r } = e;
|
|
1859
1814
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1860
1815
|
let i = {};
|
|
1861
1816
|
return typeof t.x == "number" && (i.transform = `translate3d(${t.x}px, 0, 0)`), typeof t.x == "string" && (i.transform = `translate3d(${t.x}, 0, 0)`), typeof t.y == "number" && (i.transform = `translate3d(0, ${t.y}px, 0)`), typeof t.y == "string" && (i.transform = `translate3d(0, ${t.y}, 0)`), typeof t.opacity == "number" && (i.opacity = `${t.opacity}`), i;
|
|
1862
1817
|
}
|
|
1863
1818
|
//#endregion
|
|
1864
|
-
//#region src/transition/
|
|
1865
|
-
var
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
}), Kn = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), qn = ((e = Gn()) => {
|
|
1869
|
-
let t = /* @__PURE__ */ new Map(), n = null, r = () => {
|
|
1870
|
-
t.size === 0 && n !== null && (e.cancel(n), n = null);
|
|
1871
|
-
}, i = (e, n) => {
|
|
1872
|
-
let i = t.get(e);
|
|
1873
|
-
if (i) {
|
|
1874
|
-
if (t.delete(e), clearTimeout(i.backstop), e.isConnected && n !== "drop") if (n === "end") for (let e of i.decls) i.writeFinal(e);
|
|
1875
|
-
else {
|
|
1876
|
-
let t = getComputedStyle(e);
|
|
1877
|
-
for (let e of i.decls) {
|
|
1878
|
-
let n = t.getPropertyValue(e.property);
|
|
1879
|
-
n !== "" && i.writeFinal({
|
|
1880
|
-
property: e.property,
|
|
1881
|
-
value: n
|
|
1882
|
-
});
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
i.animation.cancel(), i.resolve(), r();
|
|
1886
|
-
}
|
|
1887
|
-
}, a = (r) => {
|
|
1888
|
-
n = null;
|
|
1889
|
-
for (let e of [...t.values()]) {
|
|
1890
|
-
e.startTime === null && (e.startTime = r);
|
|
1891
|
-
let t = r - e.startTime;
|
|
1892
|
-
t >= e.totalMs ? i(e.element, "end") : e.animation.currentTime = Math.max(0, t);
|
|
1893
|
-
}
|
|
1894
|
-
t.size > 0 && (n = e.request(a));
|
|
1895
|
-
};
|
|
1896
|
-
return {
|
|
1897
|
-
settle: (r, o, s, c, l) => {
|
|
1898
|
-
if (typeof r.animate != "function") return null;
|
|
1899
|
-
i(r, "current");
|
|
1900
|
-
let u = {};
|
|
1901
|
-
for (let e of o) u[Kn(e.property)] = e.value;
|
|
1902
|
-
let d;
|
|
1903
|
-
try {
|
|
1904
|
-
d = r.animate([u], {
|
|
1905
|
-
duration: Math.max(0, s.durationMs),
|
|
1906
|
-
delay: Math.max(0, s.delayMs),
|
|
1907
|
-
easing: s.easing,
|
|
1908
|
-
fill: "forwards"
|
|
1909
|
-
}), d.pause(), d.currentTime = 0;
|
|
1910
|
-
} catch {
|
|
1911
|
-
return null;
|
|
1912
|
-
}
|
|
1913
|
-
let f = Math.max(0, s.durationMs) + Math.max(0, s.delayMs);
|
|
1914
|
-
return new Promise((s) => {
|
|
1915
|
-
let u = {
|
|
1916
|
-
element: r,
|
|
1917
|
-
animation: d,
|
|
1918
|
-
decls: o,
|
|
1919
|
-
totalMs: f,
|
|
1920
|
-
startTime: null,
|
|
1921
|
-
writeFinal: c,
|
|
1922
|
-
resolve: s,
|
|
1923
|
-
backstop: setTimeout(() => i(r, "end"), f + 60),
|
|
1924
|
-
owner: l
|
|
1925
|
-
};
|
|
1926
|
-
t.set(r, u), n === null && (n = e.request(a));
|
|
1927
|
-
});
|
|
1928
|
-
},
|
|
1929
|
-
takeover: (e, n) => {
|
|
1930
|
-
let r = t.get(e);
|
|
1931
|
-
r && (n === void 0 || r.owner === n) && i(e, "current");
|
|
1932
|
-
},
|
|
1933
|
-
cancel: (e, n) => {
|
|
1934
|
-
let r = t.get(e);
|
|
1935
|
-
r && (n === void 0 || r.owner === n) && i(e, "drop");
|
|
1936
|
-
}
|
|
1937
|
-
};
|
|
1938
|
-
})(), Jn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Yn = /* @__PURE__ */ new WeakMap(), Xn = Symbol("flemo-inline-writer"), Zn = /* @__PURE__ */ new WeakMap(), G = (e, t, n = Xn) => {
|
|
1939
|
-
let r = Yn.get(e);
|
|
1940
|
-
r || (r = /* @__PURE__ */ new Map(), Yn.set(e, r));
|
|
1819
|
+
//#region src/transition/animateInline.ts
|
|
1820
|
+
var Sn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Cn = /* @__PURE__ */ new WeakMap(), wn = Symbol("flemo-inline-writer"), Tn = /* @__PURE__ */ new WeakMap(), U = (e, t, n = wn) => {
|
|
1821
|
+
let r = Cn.get(e);
|
|
1822
|
+
r || (r = /* @__PURE__ */ new Map(), Cn.set(e, r));
|
|
1941
1823
|
let i = r.get(t);
|
|
1942
1824
|
i || (i = {
|
|
1943
1825
|
original: e.style.getPropertyValue(t),
|
|
1944
1826
|
owners: /* @__PURE__ */ new Set()
|
|
1945
1827
|
}, r.set(t, i)), i.owners.add(n);
|
|
1946
|
-
},
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1828
|
+
}, En = (e, t) => {
|
|
1829
|
+
Sn(e) && (U(e, "transition", t), e.style.transition = "none", Tn.set(e, t));
|
|
1830
|
+
}, W = (e, t, n) => {
|
|
1831
|
+
let r = Cn.get(e);
|
|
1832
|
+
(!n || Tn.get(e) === n) && (e.style.transition = "", Tn.delete(e));
|
|
1950
1833
|
let i = (t) => {
|
|
1951
1834
|
let i = r?.get(t);
|
|
1952
1835
|
if (!i) {
|
|
@@ -1964,27 +1847,19 @@ var Gn = () => ({
|
|
|
1964
1847
|
return;
|
|
1965
1848
|
}
|
|
1966
1849
|
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1967
|
-
},
|
|
1968
|
-
if (!
|
|
1969
|
-
let i = e, a =
|
|
1850
|
+
}, G = (e, t, n = {}, r) => {
|
|
1851
|
+
if (!Sn(e)) return Promise.resolve();
|
|
1852
|
+
let i = e, a = Yt(t);
|
|
1970
1853
|
if (a.length === 0) return Promise.resolve();
|
|
1971
|
-
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c =
|
|
1854
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = Xt(n.ease);
|
|
1972
1855
|
if (o <= 0 && s <= 0) {
|
|
1973
|
-
|
|
1974
|
-
for (let e of a)
|
|
1856
|
+
i.style.transition = "none", Tn.set(i, r);
|
|
1857
|
+
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1975
1858
|
return Promise.resolve();
|
|
1976
1859
|
}
|
|
1977
|
-
let l =
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
easing: c
|
|
1981
|
-
}, (e) => {
|
|
1982
|
-
G(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1983
|
-
}, r) : null;
|
|
1984
|
-
if (l) return l;
|
|
1985
|
-
let u = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1986
|
-
i.style.transition = u, Zn.set(i, r), i.offsetWidth;
|
|
1987
|
-
for (let e of a) G(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1860
|
+
let l = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1861
|
+
i.style.transition = l, Tn.set(i, r), i.offsetWidth;
|
|
1862
|
+
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1988
1863
|
return new Promise((e) => {
|
|
1989
1864
|
let t = !1, n = () => {
|
|
1990
1865
|
t || (t = !0, i.removeEventListener("transitionend", r), e());
|
|
@@ -1993,65 +1868,65 @@ var Gn = () => ({
|
|
|
1993
1868
|
};
|
|
1994
1869
|
i.addEventListener("transitionend", r), setTimeout(n, (o + s) * 1e3 + 60);
|
|
1995
1870
|
});
|
|
1996
|
-
},
|
|
1871
|
+
}, Dn = (e) => {
|
|
1997
1872
|
if (typeof e.querySelectorAll == "function") {
|
|
1998
1873
|
e.tagName === "IMG" && !e.hasAttribute("decoding") && e.setAttribute("decoding", "async");
|
|
1999
1874
|
for (let t of Array.from(e.querySelectorAll("img:not([decoding])"))) t.setAttribute("decoding", "async");
|
|
2000
1875
|
}
|
|
2001
|
-
},
|
|
2002
|
-
function
|
|
2003
|
-
let e =
|
|
2004
|
-
if (
|
|
1876
|
+
}, On = 0, kn = [], An = [];
|
|
1877
|
+
function jn() {
|
|
1878
|
+
let e = On === 0;
|
|
1879
|
+
if (On += 1, e) for (let e of An) e();
|
|
2005
1880
|
let t = !1;
|
|
2006
1881
|
return () => {
|
|
2007
|
-
if (t || (t = !0, --
|
|
2008
|
-
let e =
|
|
2009
|
-
|
|
1882
|
+
if (t || (t = !0, --On, On > 0)) return;
|
|
1883
|
+
let e = kn;
|
|
1884
|
+
kn = [];
|
|
2010
1885
|
for (let t of e) t();
|
|
2011
1886
|
};
|
|
2012
1887
|
}
|
|
2013
|
-
var
|
|
2014
|
-
function
|
|
2015
|
-
return
|
|
2016
|
-
|
|
1888
|
+
var Mn = () => On > 0;
|
|
1889
|
+
function Nn(e) {
|
|
1890
|
+
return An.push(e), () => {
|
|
1891
|
+
An = An.filter((t) => t !== e);
|
|
2017
1892
|
};
|
|
2018
1893
|
}
|
|
2019
|
-
function
|
|
2020
|
-
|
|
1894
|
+
function Pn(e) {
|
|
1895
|
+
On === 0 ? e() : kn.push(e);
|
|
2021
1896
|
}
|
|
2022
1897
|
//#endregion
|
|
2023
1898
|
//#region src/core/engine/imageDecodeOffloader.ts
|
|
2024
|
-
var
|
|
1899
|
+
var Fn = 8, In = 2, K = 96, Ln = 15e3, Rn = 3e3, zn = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", q = "data-flemo-image-src", Bn = "flemo-image-scale-v1", Vn = /* @__PURE__ */ new Set([
|
|
2025
1900
|
"PUSHING",
|
|
2026
1901
|
"POPPING",
|
|
2027
1902
|
"REPLACING"
|
|
2028
|
-
]),
|
|
1903
|
+
]), Hn = (e) => {
|
|
2029
1904
|
let t = e.closest("[data-flemo-screen]");
|
|
2030
|
-
return !!t &&
|
|
2031
|
-
},
|
|
1905
|
+
return !!t && Vn.has(t.getAttribute("data-flemo-status") ?? "");
|
|
1906
|
+
}, Un = (e) => {
|
|
2032
1907
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
2033
1908
|
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
2034
1909
|
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
2035
|
-
},
|
|
1910
|
+
}, Wn = "onmessage = async (e) => {\n const { url, targetWidth, neededArea, ratio } = e.data;\n try {\n const response = await fetch(url);\n if (!response.ok) throw new Error(\"http \" + response.status);\n const blob = await response.blob();\n const full = await createImageBitmap(blob);\n if (full.width * full.height <= neededArea * ratio) {\n full.close();\n postMessage({ url, skip: true });\n return;\n }\n const scale = targetWidth / full.width;\n const canvas = new OffscreenCanvas(targetWidth, Math.max(1, Math.round(full.height * scale)));\n const context = canvas.getContext(\"2d\");\n context.imageSmoothingQuality = \"high\";\n context.drawImage(full, 0, 0, canvas.width, canvas.height);\n full.close();\n const out = await canvas.convertToBlob({ type: \"image/jpeg\", quality: 0.85 });\n postMessage({ url, blob: out });\n } catch (error) {\n postMessage({ url, error: String(error) });\n }\n};", Gn = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", Kn = async (e, t) => {
|
|
2036
1911
|
try {
|
|
2037
1912
|
if (typeof caches > "u") return;
|
|
2038
|
-
await (await caches.open(
|
|
1913
|
+
await (await caches.open(Bn)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
2039
1914
|
} catch {}
|
|
2040
|
-
},
|
|
1915
|
+
}, qn = async (e) => {
|
|
2041
1916
|
try {
|
|
2042
1917
|
if (typeof caches > "u") return null;
|
|
2043
|
-
let t = await (await caches.open(
|
|
1918
|
+
let t = await (await caches.open(Bn)).match(e);
|
|
2044
1919
|
return t ? await t.blob() : null;
|
|
2045
1920
|
} catch {
|
|
2046
1921
|
return null;
|
|
2047
1922
|
}
|
|
2048
1923
|
};
|
|
2049
|
-
function
|
|
2050
|
-
if (!
|
|
1924
|
+
function Jn(e) {
|
|
1925
|
+
if (!Gn()) return () => {};
|
|
2051
1926
|
let t = null, n = !1, r = /* @__PURE__ */ new Map(), i = (e) => !!e && e !== "skip" && e !== "opaque", a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new WeakSet(), l = /* @__PURE__ */ new Set(), u = () => typeof devicePixelRatio == "number" ? devicePixelRatio : 1, d = () => {
|
|
2052
1927
|
if (t) return t;
|
|
2053
1928
|
try {
|
|
2054
|
-
t = new Worker(URL.createObjectURL(new Blob([
|
|
1929
|
+
t = new Worker(URL.createObjectURL(new Blob([Wn])));
|
|
2055
1930
|
} catch {
|
|
2056
1931
|
return null;
|
|
2057
1932
|
}
|
|
@@ -2066,7 +1941,7 @@ function br(e) {
|
|
|
2066
1941
|
return;
|
|
2067
1942
|
}
|
|
2068
1943
|
let a = URL.createObjectURL(n);
|
|
2069
|
-
l.add(a),
|
|
1944
|
+
l.add(a), Kn(t, n), f(t, a);
|
|
2070
1945
|
}, t;
|
|
2071
1946
|
}, f = (e, t) => {
|
|
2072
1947
|
r.has(e) || r.set(e, t);
|
|
@@ -2075,21 +1950,21 @@ function br(e) {
|
|
|
2075
1950
|
let n = () => {
|
|
2076
1951
|
t ? e.style.visibility = t : e.style.removeProperty("visibility");
|
|
2077
1952
|
};
|
|
2078
|
-
if (!
|
|
1953
|
+
if (!Mn()) {
|
|
2079
1954
|
n();
|
|
2080
1955
|
return;
|
|
2081
1956
|
}
|
|
2082
1957
|
let r = !1, i = () => {
|
|
2083
1958
|
r || (r = !0, clearTimeout(o), a.delete(i), n());
|
|
2084
|
-
}, o = setTimeout(i,
|
|
2085
|
-
a.add(i),
|
|
1959
|
+
}, o = setTimeout(i, Rn);
|
|
1960
|
+
a.add(i), Pn(i);
|
|
2086
1961
|
}, m = (e, t) => {
|
|
2087
1962
|
let n = () => {
|
|
2088
|
-
if (
|
|
2089
|
-
|
|
1963
|
+
if (Mn()) {
|
|
1964
|
+
Pn(t);
|
|
2090
1965
|
return;
|
|
2091
1966
|
}
|
|
2092
|
-
if (!
|
|
1967
|
+
if (!Hn(e) || typeof requestAnimationFrame != "function") {
|
|
2093
1968
|
t();
|
|
2094
1969
|
return;
|
|
2095
1970
|
}
|
|
@@ -2101,10 +1976,10 @@ function br(e) {
|
|
|
2101
1976
|
e.style.visibility = "hidden";
|
|
2102
1977
|
let r = !1, i = () => {
|
|
2103
1978
|
r || (r = !0, clearTimeout(o), a.delete(i), t(), n ? e.style.visibility = n : e.style.removeProperty("visibility"));
|
|
2104
|
-
}, o = setTimeout(i,
|
|
1979
|
+
}, o = setTimeout(i, Rn);
|
|
2105
1980
|
a.add(i), m(e, i);
|
|
2106
|
-
}, g = (e, t) => !
|
|
2107
|
-
e.setAttribute(
|
|
1981
|
+
}, g = (e, t) => !Mn() && !Hn(e) ? !1 : (e.setAttribute(q, t), h(e, () => {}), !0), _ = (e, t, a) => {
|
|
1982
|
+
e.setAttribute(q, t), e.src = a, h(e, () => {
|
|
2108
1983
|
/* v8 ignore next -- disposal runs pending reveals; nothing to repair. */
|
|
2109
1984
|
if (n) return;
|
|
2110
1985
|
let a = r.get(t);
|
|
@@ -2115,12 +1990,12 @@ function br(e) {
|
|
|
2115
1990
|
if (n) {
|
|
2116
1991
|
if (s.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
2117
1992
|
if (i(t)) {
|
|
2118
|
-
e.setAttribute(
|
|
1993
|
+
e.setAttribute(q, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
2119
1994
|
let r = e.closest("picture");
|
|
2120
1995
|
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
2121
1996
|
e.src = t;
|
|
2122
1997
|
}
|
|
2123
|
-
} else e.getAttribute("src") ===
|
|
1998
|
+
} else e.getAttribute("src") === zn && (i(t) ? e.src = t : (e.removeAttribute(q), e.src = n.url));
|
|
2124
1999
|
p(e, n.previousVisibility);
|
|
2125
2000
|
}
|
|
2126
2001
|
}, y = /* @__PURE__ */ new Map(), b = !1, x = () => {
|
|
@@ -2129,14 +2004,14 @@ function br(e) {
|
|
|
2129
2004
|
y.clear();
|
|
2130
2005
|
for (let [t, n] of e) C(t, n.boxWidth, n.boxHeight);
|
|
2131
2006
|
}, S = () => {
|
|
2132
|
-
b || (b = !0,
|
|
2007
|
+
b || (b = !0, Pn(() => {
|
|
2133
2008
|
if (n) return;
|
|
2134
2009
|
let e = globalThis.requestIdleCallback;
|
|
2135
2010
|
typeof e == "function" ? e(() => x()) : typeof setTimeout == "function" ? setTimeout(x, 400) : x();
|
|
2136
2011
|
}));
|
|
2137
2012
|
}, C = (e, t, n) => {
|
|
2138
2013
|
if (r.has(e) || o.has(e)) return;
|
|
2139
|
-
if (
|
|
2014
|
+
if (Mn() && I()) {
|
|
2140
2015
|
y.has(e) || y.set(e, {
|
|
2141
2016
|
boxWidth: t,
|
|
2142
2017
|
boxHeight: n
|
|
@@ -2146,28 +2021,28 @@ function br(e) {
|
|
|
2146
2021
|
let i = d();
|
|
2147
2022
|
if (!i) return;
|
|
2148
2023
|
o.add(e);
|
|
2149
|
-
let a = Math.round(Math.max(
|
|
2024
|
+
let a = Math.round(Math.max(K, t * u()) * In), s = Math.max(t * n, 9216) * u() ** 2;
|
|
2150
2025
|
i.postMessage({
|
|
2151
2026
|
url: e,
|
|
2152
2027
|
targetWidth: a,
|
|
2153
2028
|
neededArea: s,
|
|
2154
2029
|
ratio: 8
|
|
2155
2030
|
});
|
|
2156
|
-
}, w =
|
|
2031
|
+
}, w = Nn(() => {
|
|
2157
2032
|
if (I() && !(!t || o.size === 0)) {
|
|
2158
2033
|
t.terminate(), t = null;
|
|
2159
2034
|
for (let e of o) {
|
|
2160
2035
|
if (y.has(e)) continue;
|
|
2161
2036
|
let t = {
|
|
2162
|
-
boxWidth:
|
|
2163
|
-
boxHeight:
|
|
2037
|
+
boxWidth: K,
|
|
2038
|
+
boxHeight: K
|
|
2164
2039
|
};
|
|
2165
2040
|
for (let [n, r] of s) {
|
|
2166
2041
|
if (r.url !== e) continue;
|
|
2167
2042
|
let i = n.getBoundingClientRect();
|
|
2168
2043
|
t = {
|
|
2169
|
-
boxWidth: i.width ||
|
|
2170
|
-
boxHeight: i.height ||
|
|
2044
|
+
boxWidth: i.width || K,
|
|
2045
|
+
boxHeight: i.height || K
|
|
2171
2046
|
};
|
|
2172
2047
|
break;
|
|
2173
2048
|
}
|
|
@@ -2181,17 +2056,17 @@ function br(e) {
|
|
|
2181
2056
|
let a = {
|
|
2182
2057
|
url: "",
|
|
2183
2058
|
previousVisibility: e.style.visibility,
|
|
2184
|
-
timeout: setTimeout(() => v(e, null),
|
|
2059
|
+
timeout: setTimeout(() => v(e, null), Ln),
|
|
2185
2060
|
responsive: !0
|
|
2186
2061
|
}, o = () => {
|
|
2187
2062
|
/* v8 ignore next -- consider() only routes elements with an https src
|
|
2188
2063
|
here, so the final fallback arm is unreachable. */
|
|
2189
2064
|
let t = e.currentSrc || e.getAttribute("src") || "", i = e.getBoundingClientRect();
|
|
2190
|
-
if (!(/^https?:/.test(t) &&
|
|
2065
|
+
if (!(/^https?:/.test(t) && Un({
|
|
2191
2066
|
naturalWidth: e.naturalWidth,
|
|
2192
2067
|
naturalHeight: e.naturalHeight,
|
|
2193
|
-
boxWidth: i.width ||
|
|
2194
|
-
boxHeight: i.height ||
|
|
2068
|
+
boxWidth: i.width || K,
|
|
2069
|
+
boxHeight: i.height || K,
|
|
2195
2070
|
devicePixelRatio: u()
|
|
2196
2071
|
}))) {
|
|
2197
2072
|
v(e, null);
|
|
@@ -2203,7 +2078,7 @@ function br(e) {
|
|
|
2203
2078
|
v(e, o);
|
|
2204
2079
|
return;
|
|
2205
2080
|
}
|
|
2206
|
-
|
|
2081
|
+
qn(t).then((a) => {
|
|
2207
2082
|
if (!(n || !s.has(e))) {
|
|
2208
2083
|
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
2209
2084
|
releases every held element of the url first, so a still-held
|
|
@@ -2219,7 +2094,7 @@ function br(e) {
|
|
|
2219
2094
|
l.add(e), f(t, e);
|
|
2220
2095
|
return;
|
|
2221
2096
|
}
|
|
2222
|
-
C(t, i.width ||
|
|
2097
|
+
C(t, i.width || K, i.height || K);
|
|
2223
2098
|
}
|
|
2224
2099
|
});
|
|
2225
2100
|
};
|
|
@@ -2242,20 +2117,20 @@ function br(e) {
|
|
|
2242
2117
|
if (c.add(e), e.complete && e.naturalWidth > 0) {
|
|
2243
2118
|
if (!t) {
|
|
2244
2119
|
let t = e.getBoundingClientRect();
|
|
2245
|
-
C(a, t.width ||
|
|
2120
|
+
C(a, t.width || K, t.height || K);
|
|
2246
2121
|
return;
|
|
2247
2122
|
}
|
|
2248
2123
|
let n = e.getBoundingClientRect();
|
|
2249
|
-
if (!
|
|
2124
|
+
if (!Un({
|
|
2250
2125
|
naturalWidth: e.naturalWidth,
|
|
2251
2126
|
naturalHeight: e.naturalHeight,
|
|
2252
|
-
boxWidth: n.width ||
|
|
2253
|
-
boxHeight: n.height ||
|
|
2127
|
+
boxWidth: n.width || K,
|
|
2128
|
+
boxHeight: n.height || K,
|
|
2254
2129
|
devicePixelRatio: u()
|
|
2255
2130
|
})) return;
|
|
2256
2131
|
let o = r.get(a);
|
|
2257
2132
|
if (i(o)) {
|
|
2258
|
-
|
|
2133
|
+
Mn() || Hn(e) ? _(e, a, o) : (e.setAttribute(q, a), e.src = o);
|
|
2259
2134
|
return;
|
|
2260
2135
|
}
|
|
2261
2136
|
if (o === "opaque") {
|
|
@@ -2271,14 +2146,14 @@ function br(e) {
|
|
|
2271
2146
|
return;
|
|
2272
2147
|
}
|
|
2273
2148
|
if (o) {
|
|
2274
|
-
|
|
2149
|
+
Mn() || Hn(e) ? _(e, a, o) : (e.setAttribute(q, a), e.src = o);
|
|
2275
2150
|
return;
|
|
2276
2151
|
}
|
|
2277
2152
|
s.set(e, {
|
|
2278
2153
|
url: a,
|
|
2279
2154
|
previousVisibility: e.style.visibility,
|
|
2280
|
-
timeout: setTimeout(() => v(e, null),
|
|
2281
|
-
}), e.style.visibility = "hidden", e.setAttribute(
|
|
2155
|
+
timeout: setTimeout(() => v(e, null), Ln)
|
|
2156
|
+
}), e.style.visibility = "hidden", e.setAttribute(q, a), e.src = zn, qn(a).then((t) => {
|
|
2282
2157
|
if (n || r.has(a)) return;
|
|
2283
2158
|
if (t) {
|
|
2284
2159
|
let e = URL.createObjectURL(t);
|
|
@@ -2288,7 +2163,7 @@ function br(e) {
|
|
|
2288
2163
|
let i = () => {
|
|
2289
2164
|
if (n) return;
|
|
2290
2165
|
let t = e.getBoundingClientRect();
|
|
2291
|
-
C(a, t.width ||
|
|
2166
|
+
C(a, t.width || K, t.height || K);
|
|
2292
2167
|
};
|
|
2293
2168
|
typeof requestAnimationFrame == "function" ? requestAnimationFrame(i) : i();
|
|
2294
2169
|
});
|
|
@@ -2305,21 +2180,21 @@ function br(e) {
|
|
|
2305
2180
|
let k = (e) => {
|
|
2306
2181
|
let t = e.getAttribute("src") ?? "", n = s.get(e);
|
|
2307
2182
|
if (n && !n.responsive) {
|
|
2308
|
-
t === n.url && (e.src =
|
|
2183
|
+
t === n.url && (e.src = zn);
|
|
2309
2184
|
return;
|
|
2310
2185
|
}
|
|
2311
|
-
let a = e.getAttribute(
|
|
2186
|
+
let a = e.getAttribute(q);
|
|
2312
2187
|
if (a) if (t === a) {
|
|
2313
2188
|
let t = r.get(a);
|
|
2314
2189
|
i(t) && (e.src = t);
|
|
2315
|
-
} else t !==
|
|
2190
|
+
} else t !== zn && !t.startsWith("blob:") && e.removeAttribute(q);
|
|
2316
2191
|
}, A = !1, j = new MutationObserver((t) => {
|
|
2317
2192
|
if (!n) {
|
|
2318
|
-
if (
|
|
2193
|
+
if (Mn()) {
|
|
2319
2194
|
if (A) return;
|
|
2320
|
-
A = !0,
|
|
2195
|
+
A = !0, Pn(() => {
|
|
2321
2196
|
if (A = !1, !n) {
|
|
2322
|
-
for (let t of Array.from(e.querySelectorAll(`img[${
|
|
2197
|
+
for (let t of Array.from(e.querySelectorAll(`img[${q}]`))) k(t);
|
|
2323
2198
|
for (let e of [...s.keys()]) k(e);
|
|
2324
2199
|
}
|
|
2325
2200
|
});
|
|
@@ -2341,23 +2216,23 @@ function br(e) {
|
|
|
2341
2216
|
l.clear();
|
|
2342
2217
|
};
|
|
2343
2218
|
}
|
|
2344
|
-
var
|
|
2345
|
-
function
|
|
2346
|
-
return typeof document > "u" || !document.body ? () => {} : (
|
|
2347
|
-
dispose:
|
|
2219
|
+
var Yn = null;
|
|
2220
|
+
function Xn() {
|
|
2221
|
+
return typeof document > "u" || !document.body ? () => {} : (Yn ? Yn.count += 1 : Yn = {
|
|
2222
|
+
dispose: Jn(document.body),
|
|
2348
2223
|
count: 1
|
|
2349
2224
|
}, () => {
|
|
2350
|
-
|
|
2225
|
+
Yn && (--Yn.count, Yn.count <= 0 && (Yn.dispose(), Yn = null));
|
|
2351
2226
|
});
|
|
2352
2227
|
}
|
|
2353
2228
|
//#endregion
|
|
2354
2229
|
//#region src/core/engine/arrivalHold.ts
|
|
2355
|
-
var
|
|
2356
|
-
function
|
|
2230
|
+
var Zn = "data-flemo-held-arrival";
|
|
2231
|
+
function Qn(e) {
|
|
2357
2232
|
if (typeof MutationObserver > "u") return () => {};
|
|
2358
2233
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
2359
2234
|
let n = t instanceof Element ? t : t.parentElement;
|
|
2360
|
-
return !n || n === e || n.closest(`[data-flemo-part-name], [${
|
|
2235
|
+
return !n || n === e || n.closest(`[data-flemo-part-name], [${Zn}], [${q}]`) !== null;
|
|
2361
2236
|
}, 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), {
|
|
2362
2237
|
glass: t,
|
|
2363
2238
|
latest: n,
|
|
@@ -2387,12 +2262,12 @@ function wr(e) {
|
|
|
2387
2262
|
if (i.type === "childList") {
|
|
2388
2263
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
2389
2264
|
if (e instanceof Element && t.delete(e)) {
|
|
2390
|
-
e.removeAttribute(
|
|
2265
|
+
e.removeAttribute(Zn);
|
|
2391
2266
|
continue;
|
|
2392
2267
|
}
|
|
2393
2268
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
2394
2269
|
}
|
|
2395
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
2270
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(Zn, ""), t.add(e), l(i.target).added.push(e));
|
|
2396
2271
|
}
|
|
2397
2272
|
}
|
|
2398
2273
|
for (let [e, t] of u) {
|
|
@@ -2427,7 +2302,7 @@ function wr(e) {
|
|
|
2427
2302
|
c.disconnect();
|
|
2428
2303
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
2429
2304
|
n.clear();
|
|
2430
|
-
for (let e of t) e instanceof HTMLElement &&
|
|
2305
|
+
for (let e of t) e instanceof HTMLElement && Dn(e), e.removeAttribute(Zn);
|
|
2431
2306
|
t.clear();
|
|
2432
2307
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
2433
2308
|
i.clear();
|
|
@@ -2437,57 +2312,57 @@ function wr(e) {
|
|
|
2437
2312
|
}
|
|
2438
2313
|
//#endregion
|
|
2439
2314
|
//#region src/core/engine/compositorWarmUp.ts
|
|
2440
|
-
var
|
|
2315
|
+
var $n = "data-flemo-warm", er = 3e3, tr = [{ backgroundPosition: "0px 0px" }, { backgroundPosition: "48px 0px" }], nr = {
|
|
2441
2316
|
duration: 500,
|
|
2442
2317
|
iterations: Infinity,
|
|
2443
2318
|
direction: "alternate",
|
|
2444
2319
|
easing: "linear"
|
|
2445
|
-
},
|
|
2446
|
-
|
|
2320
|
+
}, rr = "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;", ir = "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==", J = null, ar = null, or = null, sr = null, cr = 0, lr = () => {
|
|
2321
|
+
cr = 0, sr?.cancel(), sr = null, or?.remove(), or = null;
|
|
2447
2322
|
};
|
|
2448
|
-
function
|
|
2323
|
+
function ur() {
|
|
2449
2324
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
2450
|
-
if (
|
|
2451
|
-
|
|
2325
|
+
if (cr += 1, !or) {
|
|
2326
|
+
or = document.createElement("div"), or.setAttribute($n, ""), or.setAttribute("aria-hidden", "true"), or.setAttribute("style", rr), document.body.appendChild(or);
|
|
2452
2327
|
try {
|
|
2453
|
-
|
|
2328
|
+
sr = or.animate(tr, nr);
|
|
2454
2329
|
} catch {
|
|
2455
|
-
|
|
2330
|
+
sr = null;
|
|
2456
2331
|
}
|
|
2457
|
-
if (!
|
|
2458
|
-
|
|
2459
|
-
let e =
|
|
2460
|
-
|
|
2332
|
+
if (!J && Pe()) try {
|
|
2333
|
+
J = document.createElement("video"), J.muted = !0, J.loop = !0, J.playsInline = !0, J.setAttribute("aria-hidden", "true"), J.setAttribute("data-flemo-warm-video", ""), J.setAttribute("style", "position:fixed;top:0;left:52px;width:8px;height:8px;pointer-events:none;opacity:0.02;"), J.src = ir, document.body.appendChild(J), J.play()?.catch?.(() => {});
|
|
2334
|
+
let e = J;
|
|
2335
|
+
ar = () => {
|
|
2461
2336
|
document.visibilityState === "hidden" ? e.pause() : e.play()?.catch?.(() => {});
|
|
2462
|
-
}, document.addEventListener("visibilitychange",
|
|
2337
|
+
}, document.addEventListener("visibilitychange", ar);
|
|
2463
2338
|
} catch {
|
|
2464
|
-
|
|
2339
|
+
J = null;
|
|
2465
2340
|
}
|
|
2466
2341
|
}
|
|
2467
2342
|
let e = !1, t = setTimeout(() => {
|
|
2468
|
-
e || (e = !0, --
|
|
2469
|
-
},
|
|
2343
|
+
e || (e = !0, --cr, cr <= 0 && lr());
|
|
2344
|
+
}, er);
|
|
2470
2345
|
return () => {
|
|
2471
|
-
e || (e = !0, clearTimeout(t), --
|
|
2346
|
+
e || (e = !0, clearTimeout(t), --cr, cr <= 0 && lr());
|
|
2472
2347
|
};
|
|
2473
2348
|
}
|
|
2474
2349
|
//#endregion
|
|
2475
2350
|
//#region src/core/engine/emulationNotice.ts
|
|
2476
|
-
var
|
|
2351
|
+
var dr = () => {
|
|
2477
2352
|
if (typeof navigator > "u") return !1;
|
|
2478
2353
|
let e = navigator.platform ?? "";
|
|
2479
2354
|
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
2480
|
-
},
|
|
2481
|
-
|
|
2482
|
-
},
|
|
2355
|
+
}, fr = !1, pr = () => {
|
|
2356
|
+
fr || !I() || !dr() || (fr = !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."));
|
|
2357
|
+
}, mr = "data-flemo-img-hold", hr = (e) => !(e.complete && e.naturalWidth > 0), gr = 4, _r = (e) => {
|
|
2483
2358
|
if (!(e.complete && e.naturalWidth > 0)) return !1;
|
|
2484
2359
|
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);
|
|
2485
|
-
return e.naturalWidth * e.naturalHeight > r *
|
|
2486
|
-
},
|
|
2487
|
-
function
|
|
2360
|
+
return e.naturalWidth * e.naturalHeight > r * gr;
|
|
2361
|
+
}, vr = (e, t) => hr(e) || !t && _r(e);
|
|
2362
|
+
function yr(e, t, n = !1) {
|
|
2488
2363
|
if (!e || typeof document > "u" || typeof MutationObserver != "function" || typeof setTimeout != "function") return () => {};
|
|
2489
2364
|
let r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
2490
|
-
e.getAttribute(
|
|
2365
|
+
e.getAttribute(mr) === null && (r.has(e) || !vr(e, n) || (r.set(e, e.style.display), e.style.display = "none", e.setAttribute(mr, "")));
|
|
2491
2366
|
};
|
|
2492
2367
|
for (let t of e.querySelectorAll("img")) i(t);
|
|
2493
2368
|
let a = new MutationObserver((e) => {
|
|
@@ -2501,7 +2376,7 @@ function Wr(e, t, n = !1) {
|
|
|
2501
2376
|
let o = !1, s = () => {
|
|
2502
2377
|
if (!o) {
|
|
2503
2378
|
o = !0, a.disconnect();
|
|
2504
|
-
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(
|
|
2379
|
+
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(mr);
|
|
2505
2380
|
r.clear();
|
|
2506
2381
|
}
|
|
2507
2382
|
}, c = setTimeout(s, Math.max(0, t));
|
|
@@ -2511,25 +2386,25 @@ function Wr(e, t, n = !1) {
|
|
|
2511
2386
|
}
|
|
2512
2387
|
//#endregion
|
|
2513
2388
|
//#region src/core/engine/invisibleAnimationHold.ts
|
|
2514
|
-
var
|
|
2389
|
+
var br = () => {}, xr = .004, Sr = (e, t) => {
|
|
2515
2390
|
let n = e.ownerDocument?.defaultView;
|
|
2516
2391
|
if (!n) return !1;
|
|
2517
2392
|
let r = e;
|
|
2518
2393
|
for (; r;) {
|
|
2519
|
-
if (Number(n.getComputedStyle(r).opacity) <=
|
|
2394
|
+
if (Number(n.getComputedStyle(r).opacity) <= xr) return !0;
|
|
2520
2395
|
if (r === t) break;
|
|
2521
2396
|
r = r.parentElement;
|
|
2522
2397
|
}
|
|
2523
2398
|
return !1;
|
|
2524
2399
|
};
|
|
2525
|
-
function
|
|
2526
|
-
if (typeof e.getAnimations != "function") return
|
|
2400
|
+
function Cr(e) {
|
|
2401
|
+
if (typeof e.getAnimations != "function") return br;
|
|
2527
2402
|
let t = /* @__PURE__ */ new Set(), n = () => {
|
|
2528
2403
|
for (let n of e.getAnimations({ subtree: !0 })) {
|
|
2529
2404
|
if (t.size >= 128) return;
|
|
2530
2405
|
if (t.has(n) || (n.animationName ?? "").startsWith("flemo-") || n.playState !== "running") continue;
|
|
2531
2406
|
let r = n.effect?.target;
|
|
2532
|
-
if (r instanceof Element &&
|
|
2407
|
+
if (r instanceof Element && Sr(r, e)) try {
|
|
2533
2408
|
n.pause(), t.add(n);
|
|
2534
2409
|
} catch {}
|
|
2535
2410
|
}
|
|
@@ -2558,7 +2433,7 @@ function Jr(e) {
|
|
|
2558
2433
|
}
|
|
2559
2434
|
//#endregion
|
|
2560
2435
|
//#region src/transition/cubicBezier.ts
|
|
2561
|
-
var
|
|
2436
|
+
var wr = (e, t, n, r) => {
|
|
2562
2437
|
let i = (t) => 3 * (1 - t) * (1 - t) * t * e + 3 * (1 - t) * t * t * n + t ** 3, a = (e) => 3 * (1 - e) * (1 - e) * e * t + 3 * (1 - e) * e * e * r + e ** 3;
|
|
2563
2438
|
return (e) => {
|
|
2564
2439
|
if (e <= 0) return 0;
|
|
@@ -2570,7 +2445,7 @@ var Yr = (e, t, n, r) => {
|
|
|
2570
2445
|
}
|
|
2571
2446
|
return a((t + n) / 2);
|
|
2572
2447
|
};
|
|
2573
|
-
},
|
|
2448
|
+
}, Tr = (e) => e, Er = {
|
|
2574
2449
|
ease: [
|
|
2575
2450
|
.25,
|
|
2576
2451
|
.1,
|
|
@@ -2625,20 +2500,20 @@ var Yr = (e, t, n, r) => {
|
|
|
2625
2500
|
.66,
|
|
2626
2501
|
-.56
|
|
2627
2502
|
]
|
|
2628
|
-
},
|
|
2503
|
+
}, Dr = (e) => {
|
|
2629
2504
|
if (Array.isArray(e)) {
|
|
2630
2505
|
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2631
2506
|
let [t, n, r, i] = e;
|
|
2632
|
-
return
|
|
2507
|
+
return wr(t, n, r, i);
|
|
2633
2508
|
}
|
|
2634
|
-
return
|
|
2509
|
+
return Tr;
|
|
2635
2510
|
}
|
|
2636
|
-
return typeof e == "string" ? e === "linear" ?
|
|
2637
|
-
},
|
|
2511
|
+
return typeof e == "string" ? e === "linear" ? Tr : wr(...Er[e] ?? Er.ease) : wr(...Er.ease);
|
|
2512
|
+
}, Or = 1 / 255, kr = 400, Ar = 24, jr = /* @__PURE__ */ new Set([
|
|
2638
2513
|
"x",
|
|
2639
2514
|
"y",
|
|
2640
2515
|
"opacity"
|
|
2641
|
-
]),
|
|
2516
|
+
]), Mr = (e, t, n) => {
|
|
2642
2517
|
if (!e || typeof e != "object") return;
|
|
2643
2518
|
let r = e[t];
|
|
2644
2519
|
if (r === void 0) return;
|
|
@@ -2656,7 +2531,7 @@ var Yr = (e, t, n, r) => {
|
|
|
2656
2531
|
return Number.isNaN(e) ? null : e;
|
|
2657
2532
|
}
|
|
2658
2533
|
return null;
|
|
2659
|
-
},
|
|
2534
|
+
}, Nr = (e, t, n) => {
|
|
2660
2535
|
let r = /* @__PURE__ */ new Set();
|
|
2661
2536
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2662
2537
|
if (r.size === 0) return null;
|
|
@@ -2664,28 +2539,28 @@ var Yr = (e, t, n, r) => {
|
|
|
2664
2539
|
for (let a of r) {
|
|
2665
2540
|
let r = e.from && typeof e.from == "object" ? e.from[a] : void 0, o = e.to && typeof e.to == "object" ? e.to[a] : void 0;
|
|
2666
2541
|
if (r !== void 0 && r === o) continue;
|
|
2667
|
-
if (!
|
|
2668
|
-
let s =
|
|
2542
|
+
if (!jr.has(a)) return null;
|
|
2543
|
+
let s = Mr(e.from, a, t), c = Mr(e.to, a, t);
|
|
2669
2544
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2670
2545
|
let l = Math.abs(c - s);
|
|
2671
2546
|
if (l === 0) continue;
|
|
2672
|
-
let u = a === "opacity" ?
|
|
2547
|
+
let u = a === "opacity" ? Or : 1 / Math.max(1, n);
|
|
2673
2548
|
i = Math.min(i, u / l);
|
|
2674
2549
|
}
|
|
2675
2550
|
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2676
|
-
},
|
|
2551
|
+
}, Pr = (e, t, n) => {
|
|
2677
2552
|
if (e.duration <= 0) return null;
|
|
2678
|
-
let r =
|
|
2553
|
+
let r = Nr(e, t, n);
|
|
2679
2554
|
if (r === null) return null;
|
|
2680
|
-
let i =
|
|
2681
|
-
for (let e =
|
|
2555
|
+
let i = Dr(e.ease), a = kr;
|
|
2556
|
+
for (let e = kr; e >= 0 && !(Math.abs(1 - i(e / kr)) > r); --e) a = e;
|
|
2682
2557
|
if (a === 0) return null;
|
|
2683
|
-
let o = (e.delay + e.duration * (a /
|
|
2684
|
-
return (e.delay + e.duration) * 1e3 - o <
|
|
2685
|
-
},
|
|
2558
|
+
let o = (e.delay + e.duration * (a / kr)) * 1e3;
|
|
2559
|
+
return (e.delay + e.duration) * 1e3 - o < Ar ? null : o;
|
|
2560
|
+
}, Fr = 1e3 / 120, Ir = 4, Y = 400, Lr = 4, X = (e) => {
|
|
2686
2561
|
let t = +e.toFixed(5);
|
|
2687
2562
|
return Object.is(t, -0) ? 0 : t;
|
|
2688
|
-
},
|
|
2563
|
+
}, Rr = (e, t, n) => {
|
|
2689
2564
|
if (e.duration <= 0) return null;
|
|
2690
2565
|
let r = Number.isFinite(n) && n > 0 ? n : 1, i = /* @__PURE__ */ new Set();
|
|
2691
2566
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) i.add(e);
|
|
@@ -2694,37 +2569,37 @@ var Yr = (e, t, n, r) => {
|
|
|
2694
2569
|
let i = e.from && typeof e.from == "object" ? e.from[n] : void 0, o = e.to && typeof e.to == "object" ? e.to[n] : void 0;
|
|
2695
2570
|
if (i !== void 0 && i === o) continue;
|
|
2696
2571
|
if (n !== "x" && n !== "y") return null;
|
|
2697
|
-
let s =
|
|
2572
|
+
let s = Mr(e.from, n, t), c = Mr(e.to, n, t);
|
|
2698
2573
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2699
2574
|
a = Math.max(a, Math.abs(c - s) * r);
|
|
2700
2575
|
}
|
|
2701
|
-
if (a <
|
|
2702
|
-
let o =
|
|
2703
|
-
for (let e = 0; e <=
|
|
2704
|
-
let c = e.duration * 1e3 /
|
|
2576
|
+
if (a < Ir) return null;
|
|
2577
|
+
let o = Dr(e.ease), s = Array(401);
|
|
2578
|
+
for (let e = 0; e <= Y; e += 1) s[e] = o(e / Y);
|
|
2579
|
+
let c = e.duration * 1e3 / Y, l = 40 / a * c / Fr, u = Y, d = 0;
|
|
2705
2580
|
for (let e = 399; e >= 0 && (d = Math.max(d, Math.abs(s[e + 1] - s[e])), !(d > l)); --e) u = e;
|
|
2706
|
-
for (let e = u; e <
|
|
2581
|
+
for (let e = u; e < Y; e += 1) if (s[e + 1] < s[e] || s[e] > 1) return null;
|
|
2707
2582
|
let f = (1 - s[u]) * a;
|
|
2708
2583
|
if (f <= 1) return null;
|
|
2709
2584
|
let p = Math.min(480, Math.floor(f)), m = u, h = (e) => {
|
|
2710
2585
|
let t = 1 - e / a;
|
|
2711
|
-
for (; m <
|
|
2586
|
+
for (; m < Y && s[m] < t;) m += 1;
|
|
2712
2587
|
if (m === 0) return 0;
|
|
2713
2588
|
let n = s[m - 1], r = s[m], i = r === n ? 1 : Math.max(0, Math.min(1, (t - n) / (r - n)));
|
|
2714
|
-
return (m - 1 + i) /
|
|
2589
|
+
return (m - 1 + i) / Y * 100;
|
|
2715
2590
|
}, g = h(p), _ = [];
|
|
2716
|
-
for (let e = 0; 100 /
|
|
2591
|
+
for (let e = 0; 100 / Y * e < g; e += Lr) _.push(`${X(s[e])} ${X(e / Y * 100)}%`);
|
|
2717
2592
|
let v = g;
|
|
2718
2593
|
for (let e = p; e >= 2; --e) {
|
|
2719
2594
|
let t = h(e - 1);
|
|
2720
2595
|
if (t > v) {
|
|
2721
|
-
let n =
|
|
2722
|
-
_.push(`${n} ${
|
|
2596
|
+
let n = X(1 - e / a);
|
|
2597
|
+
_.push(`${n} ${X(v)}%`, `${n} ${X(t)}%`);
|
|
2723
2598
|
}
|
|
2724
2599
|
v = t;
|
|
2725
2600
|
}
|
|
2726
|
-
return _.push(`1 ${
|
|
2727
|
-
},
|
|
2601
|
+
return _.push(`1 ${X(v)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2602
|
+
}, zr = 12, Br = (e, t, n, r) => {
|
|
2728
2603
|
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2729
2604
|
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
2730
2605
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) a.add(e);
|
|
@@ -2733,30 +2608,30 @@ var Yr = (e, t, n, r) => {
|
|
|
2733
2608
|
let r = e.from && typeof e.from == "object" ? e.from[n] : void 0, a = e.to && typeof e.to == "object" ? e.to[n] : void 0;
|
|
2734
2609
|
if (r !== void 0 && r === a) continue;
|
|
2735
2610
|
if (n !== "x" && n !== "y") return null;
|
|
2736
|
-
let s =
|
|
2611
|
+
let s = Mr(e.from, n, t), c = Mr(e.to, n, t);
|
|
2737
2612
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2738
2613
|
o = Math.max(o, Math.abs(c - s) * i);
|
|
2739
2614
|
}
|
|
2740
|
-
if (o <
|
|
2741
|
-
let s =
|
|
2742
|
-
for (let e = 0; e <=
|
|
2743
|
-
let l = e.duration * 1e3, u = l /
|
|
2615
|
+
if (o < zr) return null;
|
|
2616
|
+
let s = Dr(e.ease), c = Array(401);
|
|
2617
|
+
for (let e = 0; e <= Y; e += 1) c[e] = s(e / Y);
|
|
2618
|
+
let l = e.duration * 1e3, u = l / Y, d = 1 / o * (u / r), f = Y, p = 0;
|
|
2744
2619
|
for (let e = 399; e >= 0 && (p = Math.max(p, Math.abs(c[e + 1] - c[e])), !(p > d)); --e) f = e;
|
|
2745
|
-
if (f === 0 || f >=
|
|
2746
|
-
for (let e = f; e <
|
|
2620
|
+
if (f === 0 || f >= Y) return null;
|
|
2621
|
+
for (let e = f; e < Y; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2747
2622
|
let m = (1 - c[f]) * o;
|
|
2748
|
-
if (m <= 1 || m >
|
|
2749
|
-
let h = f /
|
|
2623
|
+
if (m <= 1 || m > zr) return null;
|
|
2624
|
+
let h = f / Y * 100, g = m * r / l * 100;
|
|
2750
2625
|
if (h + g >= 100) return null;
|
|
2751
2626
|
let _ = [];
|
|
2752
|
-
for (let e = 0; e <= f; e +=
|
|
2753
|
-
return _.push(`${
|
|
2754
|
-
},
|
|
2627
|
+
for (let e = 0; e <= f; e += Lr) _.push(`${X(c[e])} ${X(e / Y * 100)}%`);
|
|
2628
|
+
return _.push(`${X(c[f])} ${X(h)}%`), _.push(`1 ${X(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2629
|
+
}, Vr = /* @__PURE__ */ new WeakMap(), Hr = Symbol("flemo-layer-owner"), Ur = (e, t) => {
|
|
2755
2630
|
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2756
|
-
},
|
|
2631
|
+
}, Wr = (e, t) => {
|
|
2757
2632
|
let n = e.trim() === "none" ? "" : e.trim();
|
|
2758
2633
|
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2759
|
-
},
|
|
2634
|
+
}, Gr = (e, t) => {
|
|
2760
2635
|
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2761
2636
|
for (let e of t.willChange.split(",")) {
|
|
2762
2637
|
let t = e.trim();
|
|
@@ -2767,13 +2642,13 @@ var Yr = (e, t, n, r) => {
|
|
|
2767
2642
|
e.containment && (r = !0);
|
|
2768
2643
|
}
|
|
2769
2644
|
e.style.willChange = [...n].join(", ");
|
|
2770
|
-
let i =
|
|
2645
|
+
let i = Wr(t.contain, r);
|
|
2771
2646
|
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2772
|
-
},
|
|
2773
|
-
let i =
|
|
2647
|
+
}, Z = (e, t, n = !1, r = Hr) => {
|
|
2648
|
+
let i = Jt(t), a = Vr.get(e);
|
|
2774
2649
|
if (i.length === 0) {
|
|
2775
2650
|
if (!a) return;
|
|
2776
|
-
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending),
|
|
2651
|
+
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), Ur(e, a), Vr.delete(e)) : Gr(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), Ur(e, a), Vr.delete(e));
|
|
2777
2652
|
return;
|
|
2778
2653
|
}
|
|
2779
2654
|
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
@@ -2782,18 +2657,18 @@ var Yr = (e, t, n, r) => {
|
|
|
2782
2657
|
willChange: e.style.willChange,
|
|
2783
2658
|
contain: e.style.contain,
|
|
2784
2659
|
pending: null
|
|
2785
|
-
},
|
|
2660
|
+
}, Vr.set(e, a)), a.owners.set(r, {
|
|
2786
2661
|
properties: i,
|
|
2787
2662
|
containment: n
|
|
2788
|
-
}), a.settleOwner = null,
|
|
2789
|
-
},
|
|
2790
|
-
let n =
|
|
2663
|
+
}), a.settleOwner = null, Gr(e, a);
|
|
2664
|
+
}, Q = (e, t = Hr) => {
|
|
2665
|
+
let n = Vr.get(e);
|
|
2791
2666
|
if (!(!n || !n.owners.has(t))) {
|
|
2792
2667
|
if (n.owners.delete(t), n.owners.size > 0) {
|
|
2793
|
-
|
|
2668
|
+
Gr(e, n);
|
|
2794
2669
|
return;
|
|
2795
2670
|
}
|
|
2796
|
-
if (
|
|
2671
|
+
if (at() && typeof e.closest == "function" && e.closest("[data-flemo-screen]")) {
|
|
2797
2672
|
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");
|
|
2798
2673
|
return;
|
|
2799
2674
|
}
|
|
@@ -2801,33 +2676,33 @@ var Yr = (e, t, n, r) => {
|
|
|
2801
2676
|
guard shields exotic embedders, where an immediate demotion is simply
|
|
2802
2677
|
the pre-hold behavior. */
|
|
2803
2678
|
if (n.settleOwner = t, n.pending != null && clearTimeout(n.pending), typeof setTimeout != "function") {
|
|
2804
|
-
|
|
2679
|
+
Ur(e, n), Vr.delete(e);
|
|
2805
2680
|
return;
|
|
2806
2681
|
}
|
|
2807
|
-
|
|
2682
|
+
Kr(e, n);
|
|
2808
2683
|
}
|
|
2809
|
-
},
|
|
2684
|
+
}, Kr = (e, t) => {
|
|
2810
2685
|
t.pending = setTimeout(() => {
|
|
2811
|
-
if (t.pending = null,
|
|
2812
|
-
|
|
2813
|
-
|
|
2686
|
+
if (t.pending = null, Mn()) {
|
|
2687
|
+
Pn(() => {
|
|
2688
|
+
Vr.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null && Kr(e, t);
|
|
2814
2689
|
});
|
|
2815
2690
|
return;
|
|
2816
2691
|
}
|
|
2817
|
-
|
|
2692
|
+
Ur(e, t), Vr.delete(e);
|
|
2818
2693
|
}, 300);
|
|
2819
|
-
},
|
|
2694
|
+
}, qr = (e, t, n) => {
|
|
2820
2695
|
let r = e.driver;
|
|
2821
2696
|
return r === "native" || r === "player" ? r : "player";
|
|
2822
|
-
},
|
|
2697
|
+
}, Jr = 1e3 / 60 * 2, Yr = "flemo-", Xr = /* @__PURE__ */ new WeakMap(), Zr = (e, t, n) => {
|
|
2823
2698
|
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2824
2699
|
let e = r.animationName;
|
|
2825
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2700
|
+
if (typeof e != "string" || !e.startsWith(Yr) || r.playState !== "running" || Xr.get(r) === n) continue;
|
|
2826
2701
|
let i = r.startTime;
|
|
2827
|
-
typeof i == "number" && (r.startTime = i + t,
|
|
2702
|
+
typeof i == "number" && (r.startTime = i + t, Xr.set(r, n));
|
|
2828
2703
|
}
|
|
2829
|
-
},
|
|
2830
|
-
function
|
|
2704
|
+
}, Qr = /* @__PURE__ */ new WeakSet(), $r = 1e3, ei = 3e3;
|
|
2705
|
+
function ti(e, t, n) {
|
|
2831
2706
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2832
2707
|
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2833
2708
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -2841,7 +2716,7 @@ function Oi(e, t, n) {
|
|
|
2841
2716
|
i = !0, m.disconnect();
|
|
2842
2717
|
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2843
2718
|
let e = t.animationName;
|
|
2844
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2719
|
+
if (typeof e != "string" || !e.startsWith(Yr) || t.playState !== "running" || Qr.has(t)) continue;
|
|
2845
2720
|
let n = t.currentTime;
|
|
2846
2721
|
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2847
2722
|
try {
|
|
@@ -2849,18 +2724,18 @@ function Oi(e, t, n) {
|
|
|
2849
2724
|
} catch {
|
|
2850
2725
|
continue;
|
|
2851
2726
|
}
|
|
2852
|
-
|
|
2727
|
+
Qr.add(t), c.push(t);
|
|
2853
2728
|
}
|
|
2854
2729
|
}
|
|
2855
2730
|
if (c.length === 0) return;
|
|
2856
|
-
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f,
|
|
2857
|
-
let e =
|
|
2731
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, $r));
|
|
2732
|
+
let e = oi(t, () => {
|
|
2858
2733
|
a || n?.();
|
|
2859
2734
|
});
|
|
2860
2735
|
if (l = e, typeof setTimeout == "function") {
|
|
2861
2736
|
let t = setTimeout(() => {
|
|
2862
2737
|
l === e && (l = null), e();
|
|
2863
|
-
},
|
|
2738
|
+
}, ei), n = e;
|
|
2864
2739
|
l = () => {
|
|
2865
2740
|
clearTimeout(t), n();
|
|
2866
2741
|
};
|
|
@@ -2875,16 +2750,16 @@ function Oi(e, t, n) {
|
|
|
2875
2750
|
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2876
2751
|
};
|
|
2877
2752
|
}
|
|
2878
|
-
var
|
|
2879
|
-
function
|
|
2753
|
+
var ni = 150, ri = 4e3, ii = 400;
|
|
2754
|
+
function ai(e, t, n = !0, r = !1) {
|
|
2880
2755
|
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2881
2756
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2882
2757
|
let i = [], a = /* @__PURE__ */ new Map();
|
|
2883
2758
|
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2884
2759
|
let t = e.animationName;
|
|
2885
|
-
if (typeof t != "string" || !t.startsWith(
|
|
2760
|
+
if (typeof t != "string" || !t.startsWith(Yr) || e.playState !== "running" || Qr.has(e)) continue;
|
|
2886
2761
|
let n = e.currentTime;
|
|
2887
|
-
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (
|
|
2762
|
+
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (Qr.add(e), i.push(e), a.set(e, typeof n == "number" ? n : 0));
|
|
2888
2763
|
}
|
|
2889
2764
|
if (i.length === 0) return () => {};
|
|
2890
2765
|
let o = 0, s = null, c = !1, l = !1, u = !1, d = null, f = null, p = 0, m = (e) => {
|
|
@@ -2897,7 +2772,7 @@ function Mi(e, t, n = !0, r = !1) {
|
|
|
2897
2772
|
if (typeof r != "number" || typeof i != "number") continue;
|
|
2898
2773
|
let o = (a.get(n) ?? 0) + e;
|
|
2899
2774
|
n.startTime = i + (r - o), a.set(n, o);
|
|
2900
|
-
let s = r +
|
|
2775
|
+
let s = r + ri;
|
|
2901
2776
|
t = Math.max(t, s - o);
|
|
2902
2777
|
}
|
|
2903
2778
|
return t;
|
|
@@ -2905,7 +2780,7 @@ function Mi(e, t, n = !0, r = !1) {
|
|
|
2905
2780
|
if (c) return;
|
|
2906
2781
|
if (d === null && (d = e), f !== null) {
|
|
2907
2782
|
let t = e - f;
|
|
2908
|
-
p += Math.min(Math.max(0, t),
|
|
2783
|
+
p += Math.min(Math.max(0, t), Jr);
|
|
2909
2784
|
}
|
|
2910
2785
|
if (f = e, !l) {
|
|
2911
2786
|
if (l = !0, r) {
|
|
@@ -2917,7 +2792,7 @@ function Mi(e, t, n = !0, r = !1) {
|
|
|
2917
2792
|
if (typeof n != "number" || typeof r != "number") continue;
|
|
2918
2793
|
let i = a.get(t) ?? 0;
|
|
2919
2794
|
if (n <= i + 33.333333333333336) continue;
|
|
2920
|
-
let o = n - (i +
|
|
2795
|
+
let o = n - (i + Jr);
|
|
2921
2796
|
t.startTime = r + o, e = Math.max(e, o);
|
|
2922
2797
|
}
|
|
2923
2798
|
e > 0 && t?.(e);
|
|
@@ -2931,13 +2806,13 @@ function Mi(e, t, n = !0, r = !1) {
|
|
|
2931
2806
|
if (e.playState !== "running") continue;
|
|
2932
2807
|
let t = e.startTime;
|
|
2933
2808
|
if (typeof t == "number") {
|
|
2934
|
-
e.startTime = t +
|
|
2809
|
+
e.startTime = t + ri;
|
|
2935
2810
|
continue;
|
|
2936
2811
|
}
|
|
2937
2812
|
let n = e.timeline?.currentTime;
|
|
2938
|
-
typeof n == "number" && (e.startTime = n +
|
|
2813
|
+
typeof n == "number" && (e.startTime = n + ri);
|
|
2939
2814
|
}
|
|
2940
|
-
typeof setTimeout == "function" && (s = setTimeout(() => m(p +
|
|
2815
|
+
typeof setTimeout == "function" && (s = setTimeout(() => m(p + Jr), ii)), o = requestAnimationFrame(h);
|
|
2941
2816
|
return;
|
|
2942
2817
|
}
|
|
2943
2818
|
if (!u) {
|
|
@@ -2960,13 +2835,13 @@ function Mi(e, t, n = !0, r = !1) {
|
|
|
2960
2835
|
t?.(g);
|
|
2961
2836
|
return;
|
|
2962
2837
|
}
|
|
2963
|
-
e - d <
|
|
2838
|
+
e - d < ni && (o = requestAnimationFrame(h));
|
|
2964
2839
|
};
|
|
2965
2840
|
return o = requestAnimationFrame(h), () => {
|
|
2966
|
-
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p +
|
|
2841
|
+
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p + Jr);
|
|
2967
2842
|
};
|
|
2968
2843
|
}
|
|
2969
|
-
function
|
|
2844
|
+
function oi(e, t) {
|
|
2970
2845
|
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2971
2846
|
exotic embedders. */
|
|
2972
2847
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
@@ -2975,8 +2850,8 @@ function Ni(e, t) {
|
|
|
2975
2850
|
if (r !== null) {
|
|
2976
2851
|
let n = o - r;
|
|
2977
2852
|
if (n > 33.333333333333336) {
|
|
2978
|
-
let r = n -
|
|
2979
|
-
for (let t of e()) t &&
|
|
2853
|
+
let r = n - Jr;
|
|
2854
|
+
for (let t of e()) t && Zr(t, r, o);
|
|
2980
2855
|
t?.(r);
|
|
2981
2856
|
}
|
|
2982
2857
|
}
|
|
@@ -2987,29 +2862,29 @@ function Ni(e, t) {
|
|
|
2987
2862
|
i = !0, cancelAnimationFrame(n);
|
|
2988
2863
|
};
|
|
2989
2864
|
}
|
|
2990
|
-
var
|
|
2991
|
-
function
|
|
2865
|
+
var si = /* @__PURE__ */ new WeakMap();
|
|
2866
|
+
function ci(e, t, n, r = !0, i = !1) {
|
|
2992
2867
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2993
|
-
let a =
|
|
2994
|
-
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () =>
|
|
2868
|
+
let a = si.get(e);
|
|
2869
|
+
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () => li(e);
|
|
2995
2870
|
let o = null, s = !1, c = !1, l = () => {
|
|
2996
|
-
s || c || (s = !0, u.disconnect(), o =
|
|
2871
|
+
s || c || (s = !0, u.disconnect(), o = ai(t, n, r, i));
|
|
2997
2872
|
}, u = new MutationObserver(() => {
|
|
2998
2873
|
e.getAttribute("data-flemo-anim-hold") === "false" && l();
|
|
2999
2874
|
});
|
|
3000
2875
|
return e.getAttribute("data-flemo-anim-hold") === "false" ? l() : u.observe(e, {
|
|
3001
2876
|
attributes: !0,
|
|
3002
2877
|
attributeFilter: ["data-flemo-anim-hold"]
|
|
3003
|
-
}),
|
|
2878
|
+
}), si.set(e, {
|
|
3004
2879
|
refs: 1,
|
|
3005
2880
|
pendingDrop: null,
|
|
3006
2881
|
dispose: () => {
|
|
3007
|
-
c = !0, u.disconnect(), o?.(),
|
|
2882
|
+
c = !0, u.disconnect(), o?.(), si.delete(e);
|
|
3008
2883
|
}
|
|
3009
|
-
}), () =>
|
|
2884
|
+
}), () => li(e);
|
|
3010
2885
|
}
|
|
3011
|
-
var
|
|
3012
|
-
let t =
|
|
2886
|
+
var li = (e) => {
|
|
2887
|
+
let t = si.get(e);
|
|
3013
2888
|
if (t && (--t.refs, !(t.refs > 0))) {
|
|
3014
2889
|
/* v8 ignore next 4 -- setTimeout exists in every runtime under test. */
|
|
3015
2890
|
if (typeof setTimeout != "function") {
|
|
@@ -3018,36 +2893,36 @@ var Ii = (e) => {
|
|
|
3018
2893
|
}
|
|
3019
2894
|
t.pendingDrop !== null && clearTimeout(t.pendingDrop), t.pendingDrop = setTimeout(t.dispose, 0);
|
|
3020
2895
|
}
|
|
3021
|
-
},
|
|
3022
|
-
let e =
|
|
3023
|
-
|
|
2896
|
+
}, ui = !1, di = 0, fi = [], pi = () => {
|
|
2897
|
+
let e = fi;
|
|
2898
|
+
fi = [];
|
|
3024
2899
|
for (let t of e) t();
|
|
3025
|
-
},
|
|
3026
|
-
if (
|
|
3027
|
-
|
|
2900
|
+
}, mi = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), hi = () => {
|
|
2901
|
+
if (ui || typeof window > "u" || typeof window.fetch != "function") return;
|
|
2902
|
+
ui = !0;
|
|
3028
2903
|
let e = window.fetch.bind(window);
|
|
3029
|
-
window.fetch = (...t) => e(...t).then((e) =>
|
|
3030
|
-
|
|
2904
|
+
window.fetch = (...t) => e(...t).then((e) => di <= 0 || mi(e) ? e : new Promise((t) => {
|
|
2905
|
+
fi.push(() => t(e));
|
|
3031
2906
|
}), (e) => {
|
|
3032
|
-
if (
|
|
2907
|
+
if (di <= 0) throw e;
|
|
3033
2908
|
return new Promise((t, n) => {
|
|
3034
|
-
|
|
2909
|
+
fi.push(() => n(e));
|
|
3035
2910
|
});
|
|
3036
2911
|
});
|
|
3037
|
-
},
|
|
3038
|
-
function
|
|
2912
|
+
}, gi = 2e3;
|
|
2913
|
+
function _i(e = gi) {
|
|
3039
2914
|
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
3040
|
-
if (
|
|
3041
|
-
|
|
2915
|
+
if (hi(), !ui) return () => {};
|
|
2916
|
+
di += 1;
|
|
3042
2917
|
let t = !1, n = null, r = () => {
|
|
3043
|
-
t || (t = !0, n !== null && clearTimeout(n),
|
|
2918
|
+
t || (t = !0, n !== null && clearTimeout(n), di = Math.max(0, di - 1), di === 0 && pi());
|
|
3044
2919
|
};
|
|
3045
|
-
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(
|
|
2920
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(gi, e))), r;
|
|
3046
2921
|
}
|
|
3047
|
-
|
|
2922
|
+
hi();
|
|
3048
2923
|
//#endregion
|
|
3049
2924
|
//#region src/core/engine/transitionPlayer.ts
|
|
3050
|
-
var
|
|
2925
|
+
var vi = [
|
|
3051
2926
|
"x",
|
|
3052
2927
|
"y",
|
|
3053
2928
|
"z",
|
|
@@ -3058,7 +2933,7 @@ var Gi = [
|
|
|
3058
2933
|
"rotateX",
|
|
3059
2934
|
"rotateY",
|
|
3060
2935
|
"rotateZ"
|
|
3061
|
-
],
|
|
2936
|
+
], yi = new Set(vi), bi = {
|
|
3062
2937
|
x: 0,
|
|
3063
2938
|
y: 0,
|
|
3064
2939
|
z: 0,
|
|
@@ -3069,7 +2944,7 @@ var Gi = [
|
|
|
3069
2944
|
rotateX: 0,
|
|
3070
2945
|
rotateY: 0,
|
|
3071
2946
|
rotateZ: 0
|
|
3072
|
-
},
|
|
2947
|
+
}, xi = (e, t) => {
|
|
3073
2948
|
if (typeof t == "number") return {
|
|
3074
2949
|
value: t,
|
|
3075
2950
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -3088,18 +2963,18 @@ var Gi = [
|
|
|
3088
2963
|
value: i,
|
|
3089
2964
|
unit: a === "" && i === 0 ? "px" : a
|
|
3090
2965
|
};
|
|
3091
|
-
},
|
|
3092
|
-
let n = e.match(
|
|
3093
|
-
if (n.length !== r.length || e.replace(
|
|
2966
|
+
}, Si = /-?\d*\.?\d+/g, Ci = (e, t) => {
|
|
2967
|
+
let n = e.match(Si) ?? [], r = t.match(Si) ?? [];
|
|
2968
|
+
if (n.length !== r.length || e.replace(Si, " ") !== t.replace(Si, " ")) return null;
|
|
3094
2969
|
let i = n.map(Number), a = r.map(Number);
|
|
3095
2970
|
return (t) => {
|
|
3096
2971
|
let n = 0;
|
|
3097
|
-
return e.replace(
|
|
2972
|
+
return e.replace(Si, () => {
|
|
3098
2973
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
3099
2974
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
3100
2975
|
});
|
|
3101
2976
|
};
|
|
3102
|
-
},
|
|
2977
|
+
}, wi = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Ti = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ei = (e) => Ti(e) ? Object.keys(e) : [], Di = (e, t) => Ti(e) ? e[t] : void 0, Oi = {
|
|
3103
2978
|
x: 0,
|
|
3104
2979
|
y: 0,
|
|
3105
2980
|
z: 0,
|
|
@@ -3110,41 +2985,41 @@ var Gi = [
|
|
|
3110
2985
|
rotateX: 2,
|
|
3111
2986
|
rotateY: 2,
|
|
3112
2987
|
rotateZ: 2
|
|
3113
|
-
},
|
|
2988
|
+
}, ki = (e) => {
|
|
3114
2989
|
let t = 0, n = -1;
|
|
3115
2990
|
for (let r of e) {
|
|
3116
|
-
if (!
|
|
3117
|
-
let e =
|
|
2991
|
+
if (!yi.has(r)) continue;
|
|
2992
|
+
let e = Oi[r];
|
|
3118
2993
|
if (e < t) return !1;
|
|
3119
2994
|
if (t = e, e === 2) {
|
|
3120
|
-
let e =
|
|
2995
|
+
let e = vi.indexOf(r);
|
|
3121
2996
|
if (e < n) return !1;
|
|
3122
2997
|
n = e;
|
|
3123
2998
|
}
|
|
3124
2999
|
}
|
|
3125
3000
|
return !0;
|
|
3126
|
-
},
|
|
3001
|
+
}, Ai = (e) => {
|
|
3127
3002
|
let t = [];
|
|
3128
3003
|
for (let n of e) {
|
|
3129
|
-
if (!
|
|
3130
|
-
let e =
|
|
3004
|
+
if (!yi.has(n)) continue;
|
|
3005
|
+
let e = Oi[n] === 0 ? "T" : n;
|
|
3131
3006
|
(e !== "T" || t[t.length - 1] !== "T") && t.push(e);
|
|
3132
3007
|
}
|
|
3133
3008
|
return t;
|
|
3134
|
-
},
|
|
3135
|
-
let n =
|
|
3009
|
+
}, ji = (e, t) => {
|
|
3010
|
+
let n = Ai(e), r = Ai(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
3136
3011
|
return i.every((e, t) => a[t] === e);
|
|
3137
|
-
},
|
|
3138
|
-
let n =
|
|
3139
|
-
if (!
|
|
3012
|
+
}, Mi = (e, t) => {
|
|
3013
|
+
let n = Ei(e.from), r = Ei(e.to);
|
|
3014
|
+
if (!ki(n) || !ki(r) || !ji(n, r)) return null;
|
|
3140
3015
|
let i = /* @__PURE__ */ new Set([...n, ...r]), a = [], o = null, s = [], c = [];
|
|
3141
3016
|
for (let n of i) {
|
|
3142
|
-
let r =
|
|
3143
|
-
if (
|
|
3017
|
+
let r = Di(e.from, n), i = Di(e.to, n);
|
|
3018
|
+
if (yi.has(n)) {
|
|
3144
3019
|
let e = n, o = {
|
|
3145
|
-
value:
|
|
3020
|
+
value: bi[e],
|
|
3146
3021
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
3147
|
-
}, s = r === void 0 ? o :
|
|
3022
|
+
}, s = r === void 0 ? o : xi(e, r), c = i === void 0 ? o : xi(e, i);
|
|
3148
3023
|
if (!s || !c || s.unit !== c.unit && s.value !== 0 && c.value !== 0) return null;
|
|
3149
3024
|
let l = s.value === 0 && s.unit !== c.unit ? c.unit : s.unit, u = l === "%", d = 0;
|
|
3150
3025
|
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), a.push({
|
|
@@ -3175,15 +3050,15 @@ var Gi = [
|
|
|
3175
3050
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
3176
3051
|
if (l === u) {
|
|
3177
3052
|
c.push({
|
|
3178
|
-
property:
|
|
3053
|
+
property: wi(n),
|
|
3179
3054
|
value: l
|
|
3180
3055
|
});
|
|
3181
3056
|
continue;
|
|
3182
3057
|
}
|
|
3183
|
-
let d =
|
|
3058
|
+
let d = Ci(l, u);
|
|
3184
3059
|
if (!d) return null;
|
|
3185
3060
|
s.push({
|
|
3186
|
-
property:
|
|
3061
|
+
property: wi(n),
|
|
3187
3062
|
mix: d
|
|
3188
3063
|
});
|
|
3189
3064
|
}
|
|
@@ -3193,26 +3068,26 @@ var Gi = [
|
|
|
3193
3068
|
strings: s,
|
|
3194
3069
|
constants: c
|
|
3195
3070
|
};
|
|
3196
|
-
},
|
|
3197
|
-
if (!
|
|
3071
|
+
}, Ni = 1, Pi = 1e3 / 60, Fi = (e) => !I() && e > 0 && e < 3, Ii = .6, Li = 600, Ri = (e, t) => {
|
|
3072
|
+
if (!Pe()) return !1;
|
|
3198
3073
|
for (let n of e.transforms) {
|
|
3199
3074
|
if (n.prop !== "x" && n.prop !== "y") continue;
|
|
3200
3075
|
let e = Math.abs(n.to.value - n.from.value);
|
|
3201
3076
|
if (n.from.unit === "%") {
|
|
3202
|
-
if (e / 100 >=
|
|
3203
|
-
} else if (e * Math.max(1, t) >=
|
|
3077
|
+
if (e / 100 >= Ii) return !1;
|
|
3078
|
+
} else if (e * Math.max(1, t) >= Li) return !1;
|
|
3204
3079
|
}
|
|
3205
3080
|
return !0;
|
|
3206
|
-
},
|
|
3081
|
+
}, zi = 12, Bi = (e, t, n, r, i = Pi) => {
|
|
3207
3082
|
let a = 0, o = 0, s = !1, c = [], l = !0;
|
|
3208
|
-
for (let u of
|
|
3083
|
+
for (let u of vi) {
|
|
3209
3084
|
let d = e.find((e) => e.prop === u);
|
|
3210
3085
|
if (!d) continue;
|
|
3211
3086
|
let f = d.from.value + (d.to.value - d.from.value) * t;
|
|
3212
3087
|
if (d.from.unit === "%" && (f *= d.percentBase), u === "x" || u === "y") {
|
|
3213
|
-
let e = u === "x" ? r.x : r.y, t =
|
|
3088
|
+
let e = u === "x" ? r.x : r.y, t = $e(), c = e === null ? Infinity : Math.abs(f - e) * n, p = t === null && r.glide === !0, m = p ? !1 : t === "always" || t === null && Fi(n) ? !0 : t === "off" ? !1 : t === "hybrid" ? c >= tt() : e === null || c * Pi / Math.max(1, i) >= Ni, h = d.to.value;
|
|
3214
3089
|
d.from.unit === "%" && (h *= d.percentBase);
|
|
3215
|
-
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 <=
|
|
3090
|
+
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 <= zi), x = u === "x" ? "writtenX" : "writtenY", S;
|
|
3216
3091
|
if (b) {
|
|
3217
3092
|
let e = _ ?? r[x] ?? f, t = 1 / n, i = Math.abs(h - e) <= t + 1e-6 ? h : e + Math.sign(h - e) * t;
|
|
3218
3093
|
S = Math.round(i * 1e3) / 1e3, r[g] = i, r[x] = null, i !== h && (r.pendingLanding = !0);
|
|
@@ -3220,42 +3095,42 @@ var Gi = [
|
|
|
3220
3095
|
u === "x" ? (r.x = f, a = S) : (r.y = f, o = S), s = !0, S !== 0 && (l = !1);
|
|
3221
3096
|
continue;
|
|
3222
3097
|
}
|
|
3223
|
-
let p =
|
|
3098
|
+
let p = bi[u];
|
|
3224
3099
|
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)`);
|
|
3225
3100
|
}
|
|
3226
3101
|
return !s && c.length === 0 ? "" : l ? "none" : [...s ? [`translate3d(${a}px, ${o}px, 0)`] : [], ...c].join(" ");
|
|
3227
|
-
},
|
|
3102
|
+
}, Vi = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), Hi = (e) => {
|
|
3228
3103
|
let t = {};
|
|
3229
|
-
for (let n of
|
|
3104
|
+
for (let n of Yt(e)) t[Vi(n.property)] = n.value;
|
|
3230
3105
|
return t;
|
|
3231
|
-
},
|
|
3106
|
+
}, Ui = (e, t) => {
|
|
3232
3107
|
if (typeof e.animate != "function") return null;
|
|
3233
3108
|
try {
|
|
3234
|
-
let n = e.animate([
|
|
3109
|
+
let n = e.animate([Hi(t.from), Hi(t.to)], {
|
|
3235
3110
|
duration: Math.max(0, t.duration * 1e3),
|
|
3236
3111
|
delay: Math.max(0, t.delay * 1e3),
|
|
3237
|
-
easing:
|
|
3112
|
+
easing: Xt(t.ease),
|
|
3238
3113
|
fill: "both"
|
|
3239
3114
|
});
|
|
3240
3115
|
return n.pause(), n.currentTime = 0, n;
|
|
3241
3116
|
} catch {
|
|
3242
3117
|
return null;
|
|
3243
3118
|
}
|
|
3244
|
-
},
|
|
3245
|
-
Number.isFinite(e) && (e <
|
|
3246
|
-
},
|
|
3119
|
+
}, Wi = 1.6, Gi = 1e3 / 600, Ki = 28, qi = 42, Ji = Pi, Yi = () => Ji, Xi = (e) => {
|
|
3120
|
+
Number.isFinite(e) && (e < Gi || e > qi || (Ji = Math.min(Pi, Math.max(Gi, e))));
|
|
3121
|
+
}, Zi = () => ({
|
|
3247
3122
|
request: (e) => requestAnimationFrame(e),
|
|
3248
3123
|
cancel: (e) => cancelAnimationFrame(e),
|
|
3249
3124
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
3250
|
-
}),
|
|
3125
|
+
}), Qi = ((e = Zi()) => {
|
|
3251
3126
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
3252
3127
|
join: (n, r) => {
|
|
3253
|
-
let i =
|
|
3128
|
+
let i = Ye() === "scrub", s = !i && !I() && Ze() === "on" && r.status !== "PUSHING" && r.status !== "REPLACING", c = i ? null : Mi(r.motion, r.element), l = !c || s ? Ui(r.element, r.motion) : null, u = l ? null : c;
|
|
3254
3129
|
if (!u && !l) return null;
|
|
3255
3130
|
let d = t.get(n);
|
|
3256
3131
|
d || (d = {
|
|
3257
3132
|
tracks: [],
|
|
3258
|
-
frameIntervalMs:
|
|
3133
|
+
frameIntervalMs: Ji,
|
|
3259
3134
|
recentGaps: [],
|
|
3260
3135
|
navCutMs: null,
|
|
3261
3136
|
navComplete: null,
|
|
@@ -3265,7 +3140,7 @@ var Gi = [
|
|
|
3265
3140
|
lastTime: null,
|
|
3266
3141
|
frameHandle: null
|
|
3267
3142
|
}, t.set(n, d));
|
|
3268
|
-
let f =
|
|
3143
|
+
let f = Pr(r.motion, r.element, e.devicePixelRatio() || 1), p = {
|
|
3269
3144
|
...r,
|
|
3270
3145
|
onComplete: void 0,
|
|
3271
3146
|
parsed: u,
|
|
@@ -3279,19 +3154,19 @@ var Gi = [
|
|
|
3279
3154
|
snapMemory: {
|
|
3280
3155
|
x: null,
|
|
3281
3156
|
y: null,
|
|
3282
|
-
glide: u ?
|
|
3157
|
+
glide: u ? Ri(u, e.devicePixelRatio() || 1) : !1
|
|
3283
3158
|
}
|
|
3284
3159
|
};
|
|
3285
3160
|
d.tracks.push(p), d.navCutMs = d.tracks.some((e) => e.cutMs === null) ? null : Math.max(...d.tracks.map((e) => e.cutMs));
|
|
3286
3161
|
let m = Symbol("flemo-player-track");
|
|
3287
|
-
if (
|
|
3288
|
-
u.transforms.length > 0 &&
|
|
3289
|
-
for (let e of u.strings)
|
|
3290
|
-
for (let e of u.constants)
|
|
3162
|
+
if (En(p.element, m), U(p.element, "animation", m), p.element.style.animation = "none", u) {
|
|
3163
|
+
u.transforms.length > 0 && U(p.element, "transform", m), u.opacity && U(p.element, "opacity", m);
|
|
3164
|
+
for (let e of u.strings) U(p.element, e.property, m);
|
|
3165
|
+
for (let e of u.constants) U(p.element, e.property, m);
|
|
3291
3166
|
a(p, 0);
|
|
3292
3167
|
}
|
|
3293
3168
|
return r.role === "active" && (r.onComplete && (d.navComplete = r.onComplete), d.started || (d.started = !0, o(n, d))), () => {
|
|
3294
|
-
p.detached = !0, p.scrub?.cancel(),
|
|
3169
|
+
p.detached = !0, p.scrub?.cancel(), W(p.element, void 0, m);
|
|
3295
3170
|
let r = t.get(n);
|
|
3296
3171
|
r && (r.tracks = r.tracks.filter((e) => e !== p), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
3297
3172
|
};
|
|
@@ -3306,13 +3181,13 @@ var Gi = [
|
|
|
3306
3181
|
}
|
|
3307
3182
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
3308
3183
|
let t = r.get(e);
|
|
3309
|
-
return t || (t =
|
|
3184
|
+
return t || (t = Dr(e.motion.ease), r.set(e, t)), t;
|
|
3310
3185
|
};
|
|
3311
3186
|
function a(t, n, r) {
|
|
3312
3187
|
let { element: i, parsed: a } = t;
|
|
3313
3188
|
if (!(!a || !i.isConnected)) {
|
|
3314
3189
|
if (a.transforms.length > 0) {
|
|
3315
|
-
let o =
|
|
3190
|
+
let o = Bi(a.transforms, n, e.devicePixelRatio(), t.snapMemory, r);
|
|
3316
3191
|
o !== "" && (i.style.transform = o);
|
|
3317
3192
|
}
|
|
3318
3193
|
if (a.opacity) {
|
|
@@ -3333,10 +3208,10 @@ var Gi = [
|
|
|
3333
3208
|
if (c - u <= 0 || !r.remainderPlan || !(1 - i(r)(c > 0 ? u / c : 0) > .001)) return r.handoff = !1, !1;
|
|
3334
3209
|
let d;
|
|
3335
3210
|
try {
|
|
3336
|
-
d = o.animate([
|
|
3211
|
+
d = o.animate([Hi(r.motion.from), Hi(r.motion.to)], {
|
|
3337
3212
|
duration: c,
|
|
3338
3213
|
delay: -u,
|
|
3339
|
-
easing:
|
|
3214
|
+
easing: Xt(r.motion.ease),
|
|
3340
3215
|
fill: "both"
|
|
3341
3216
|
});
|
|
3342
3217
|
} catch {
|
|
@@ -3350,12 +3225,12 @@ var Gi = [
|
|
|
3350
3225
|
let l = r.startTime ?? c;
|
|
3351
3226
|
if (r.lastTime !== null) {
|
|
3352
3227
|
let e = c - r.lastTime;
|
|
3353
|
-
if (n.onFrameGap?.(e), e >=
|
|
3228
|
+
if (n.onFrameGap?.(e), e >= Gi && e <= qi) {
|
|
3354
3229
|
r.recentGaps.push(e), r.recentGaps.length > 7 && r.recentGaps.shift();
|
|
3355
|
-
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 >=
|
|
3356
|
-
r.frameIntervalMs = Math.min(i ?
|
|
3230
|
+
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 >= Ki);
|
|
3231
|
+
r.frameIntervalMs = Math.min(i ? qi : Pi, Math.max(Gi, n)), Ji = r.frameIntervalMs, n < 12 && Me(n, t[t.length - 1]);
|
|
3357
3232
|
}
|
|
3358
|
-
e >
|
|
3233
|
+
e > Wi * r.frameIntervalMs && (l += e - r.frameIntervalMs);
|
|
3359
3234
|
}
|
|
3360
3235
|
r.startTime = l, r.lastTime = c;
|
|
3361
3236
|
let u = !0, d = !1;
|
|
@@ -3376,7 +3251,7 @@ var Gi = [
|
|
|
3376
3251
|
continue;
|
|
3377
3252
|
}
|
|
3378
3253
|
let i = o + n, a = Math.min(Math.max(0, f), i);
|
|
3379
|
-
if (t.handoff && f >=
|
|
3254
|
+
if (t.handoff && f >= rt() && f < i && s(e, r, t, a)) {
|
|
3380
3255
|
u = !1;
|
|
3381
3256
|
continue;
|
|
3382
3257
|
}
|
|
@@ -3394,7 +3269,7 @@ var Gi = [
|
|
|
3394
3269
|
}
|
|
3395
3270
|
return n;
|
|
3396
3271
|
})();
|
|
3397
|
-
|
|
3272
|
+
Qi.onFrameGap = (e) => {
|
|
3398
3273
|
if (typeof window < "u") {
|
|
3399
3274
|
let t = window.__flemoPlayerGaps ??= [];
|
|
3400
3275
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -3402,102 +3277,102 @@ Ta.onFrameGap = (e) => {
|
|
|
3402
3277
|
};
|
|
3403
3278
|
//#endregion
|
|
3404
3279
|
//#region src/core/engine/types.ts
|
|
3405
|
-
var
|
|
3280
|
+
var $i = "data-flemo-skip-animation", $ = () => {}, ea = 400, ta = 4, na = 100, ra = 1500, ia = "data-flemo-part-name", aa = /* @__PURE__ */ new WeakMap(), oa = "data-flemo-anim-hold", sa = (e) => {
|
|
3406
3281
|
let t = e.parentElement ?? e;
|
|
3407
|
-
return Array.from(t.querySelectorAll(`[${
|
|
3282
|
+
return Array.from(t.querySelectorAll(`[${ia}]`)).filter((n) => {
|
|
3408
3283
|
let r = n.closest("[data-flemo-screen]");
|
|
3409
3284
|
return !r || r === e || !t.contains(r);
|
|
3410
3285
|
});
|
|
3411
|
-
},
|
|
3286
|
+
}, ca = (e, t) => {
|
|
3412
3287
|
let [n, r] = t.split("-");
|
|
3413
|
-
return
|
|
3414
|
-
},
|
|
3288
|
+
return sa(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
3289
|
+
}, la = (e, t) => {
|
|
3415
3290
|
let n = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3416
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3291
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ia}][data-flemo-status="${t}"]`)).filter((e) => {
|
|
3417
3292
|
if (n === null) return !0;
|
|
3418
3293
|
let t = e.closest("[data-flemo-router]");
|
|
3419
3294
|
return !t || t.getAttribute("data-flemo-router") === n;
|
|
3420
3295
|
});
|
|
3421
|
-
},
|
|
3296
|
+
}, ua = (e, t) => la(e, t).filter((e) => e.parentElement?.closest(`[${oa}]`) == null), da = (e) => {
|
|
3422
3297
|
let t = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3423
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3424
|
-
if (e.parentElement?.closest(`[${
|
|
3298
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ia}][${oa}]`)).filter((e) => {
|
|
3299
|
+
if (e.parentElement?.closest(`[${oa}]`) != null) return !1;
|
|
3425
3300
|
if (t === null) return !0;
|
|
3426
3301
|
let n = e.closest("[data-flemo-router]");
|
|
3427
3302
|
return !n || n.getAttribute("data-flemo-router") === t;
|
|
3428
3303
|
});
|
|
3429
|
-
},
|
|
3304
|
+
}, fa = (e, t, n) => {
|
|
3430
3305
|
let r = 0;
|
|
3431
3306
|
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3432
|
-
if (!
|
|
3433
|
-
let n =
|
|
3307
|
+
if (!H(t, e)) continue;
|
|
3308
|
+
let n = B(t, e);
|
|
3434
3309
|
n && (r = Math.max(r, (n.delay + n.duration) * 1e3));
|
|
3435
3310
|
}
|
|
3436
|
-
for (let t of
|
|
3437
|
-
let e =
|
|
3438
|
-
if (!e || !
|
|
3439
|
-
let a =
|
|
3311
|
+
for (let t of la(e, n)) {
|
|
3312
|
+
let e = z.get(t.getAttribute(ia)), i = `${n}-${t.getAttribute("data-flemo-active")}`;
|
|
3313
|
+
if (!e || !H(e, i)) continue;
|
|
3314
|
+
let a = B(e, i);
|
|
3440
3315
|
a && (r = Math.max(r, (a.delay + a.duration) * 1e3));
|
|
3441
3316
|
}
|
|
3442
|
-
let i = t.decoratorName ?
|
|
3317
|
+
let i = t.decoratorName ? R.get(t.decoratorName) : void 0;
|
|
3443
3318
|
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3444
|
-
if (!
|
|
3445
|
-
let t =
|
|
3319
|
+
if (!H(i, e)) continue;
|
|
3320
|
+
let t = B(i, e);
|
|
3446
3321
|
t && (r = Math.max(r, (t.delay + t.duration) * 1e3));
|
|
3447
3322
|
}
|
|
3448
3323
|
return r;
|
|
3449
|
-
},
|
|
3450
|
-
|
|
3451
|
-
},
|
|
3452
|
-
|
|
3453
|
-
},
|
|
3454
|
-
if (
|
|
3455
|
-
|
|
3456
|
-
let e = ++
|
|
3457
|
-
if (e !==
|
|
3458
|
-
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length <
|
|
3324
|
+
}, pa = (e) => e === "POPPING" && !ze() || e === "PUSHING" && Re() && !ze(), ma = 12, ha = null, ga = () => {
|
|
3325
|
+
ha = typeof requestAnimationFrame == "function" ? requestAnimationFrame(ga) : null;
|
|
3326
|
+
}, _a = () => (ha === null && typeof requestAnimationFrame == "function" && (ha = requestAnimationFrame(ga)), $), va = !1, ya = 0, ba = () => {
|
|
3327
|
+
va &&= (ya += 1, !1);
|
|
3328
|
+
}, xa = 2, Sa = 8, Ca = () => {
|
|
3329
|
+
if (va || typeof requestAnimationFrame != "function") return;
|
|
3330
|
+
va = !0;
|
|
3331
|
+
let e = ++ya, t = [], n = xa, r = null, i = (a) => {
|
|
3332
|
+
if (e !== ya) return;
|
|
3333
|
+
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < Sa) {
|
|
3459
3334
|
requestAnimationFrame(i);
|
|
3460
3335
|
return;
|
|
3461
3336
|
}
|
|
3462
|
-
|
|
3337
|
+
va = !1;
|
|
3463
3338
|
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
3464
|
-
|
|
3339
|
+
Xi(s), Me(s, o[o.length - 1]);
|
|
3465
3340
|
};
|
|
3466
3341
|
requestAnimationFrame(i);
|
|
3467
|
-
},
|
|
3468
|
-
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = I() &&
|
|
3469
|
-
if (
|
|
3470
|
-
|
|
3471
|
-
let e = f(
|
|
3472
|
-
e && (
|
|
3473
|
-
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (
|
|
3342
|
+
}, wa = (e, t, n, r) => {
|
|
3343
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = I() && Fe(), u = !l && I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Yi() < ma, d = (l || u) && typeof window < "u" && window.devicePixelRatio || 1, f = (e, t) => e ? l ? Rr(e, t, d) : u ? Br(e, t, d, Yi()) : null : null;
|
|
3344
|
+
if (H(t, n)) {
|
|
3345
|
+
Z(i, t, c, r);
|
|
3346
|
+
let e = f(B(t, n) ?? null, i);
|
|
3347
|
+
e && (U(i, "animation-timing-function", r), i.style.animationTimingFunction = e);
|
|
3348
|
+
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (Z(n, t, c, r), e && (U(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
3474
3349
|
}
|
|
3475
3350
|
if (a && t.decoratorName) {
|
|
3476
|
-
let e =
|
|
3477
|
-
e &&
|
|
3351
|
+
let e = R.get(t.decoratorName);
|
|
3352
|
+
e && H(e, n) && Z(a, e, c, r);
|
|
3478
3353
|
}
|
|
3479
|
-
for (let e of
|
|
3480
|
-
let t =
|
|
3481
|
-
if (t &&
|
|
3482
|
-
|
|
3483
|
-
let i = f(
|
|
3484
|
-
i && (
|
|
3354
|
+
for (let e of ca(i, n)) {
|
|
3355
|
+
let t = z.get(e.getAttribute(ia));
|
|
3356
|
+
if (t && H(t, n)) {
|
|
3357
|
+
Z(e, t, c, r);
|
|
3358
|
+
let i = f(B(t, n) ?? null, e);
|
|
3359
|
+
i && (U(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
3485
3360
|
}
|
|
3486
3361
|
}
|
|
3487
|
-
},
|
|
3362
|
+
}, Ta = (e, t) => {
|
|
3488
3363
|
let { scope: n, decorator: r, bars: i } = e;
|
|
3489
3364
|
if (n) {
|
|
3490
|
-
|
|
3491
|
-
for (let e of
|
|
3365
|
+
Q(n, t);
|
|
3366
|
+
for (let e of sa(n)) Q(e, t);
|
|
3492
3367
|
}
|
|
3493
|
-
r &&
|
|
3494
|
-
for (let e of i ?? []) e &&
|
|
3495
|
-
},
|
|
3368
|
+
r && Q(r, t);
|
|
3369
|
+
for (let e of i ?? []) e && Q(e, t);
|
|
3370
|
+
}, Ea = 4, Da = (e) => `${Math.round(e * 1e3) / 1e3}s`, Oa = (e) => {
|
|
3496
3371
|
let { element: t, expectedName: n, motion: r } = e, i = !1, a = !1, o = (n) => {
|
|
3497
|
-
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" && (
|
|
3372
|
+
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" && (U(t, "animation-delay", e.writer), t.style.animationDelay = Da(n.seconds), a = !0), i = !1;
|
|
3498
3373
|
}, s = (a) => {
|
|
3499
|
-
if (i || a.target !== t || !
|
|
3500
|
-
if (!e.isLive() || e.budgetUsed() >=
|
|
3374
|
+
if (i || a.target !== t || !rn(a.animationName, n)) return;
|
|
3375
|
+
if (!e.isLive() || e.budgetUsed() >= Ea) {
|
|
3501
3376
|
e.onTerminal();
|
|
3502
3377
|
return;
|
|
3503
3378
|
}
|
|
@@ -3520,15 +3395,14 @@ var Ea = "data-flemo-skip-animation", $ = () => {}, Da = 400, Oa = 4, ka = 100,
|
|
|
3520
3395
|
t.addEventListener("animationcancel", s);
|
|
3521
3396
|
},
|
|
3522
3397
|
detach: () => {
|
|
3523
|
-
t.removeEventListener("animationcancel", s), a &&= (
|
|
3398
|
+
t.removeEventListener("animationcancel", s), a &&= (W(t, ["animation-delay"], e.writer), !1);
|
|
3524
3399
|
},
|
|
3525
3400
|
fullRestart: () => {
|
|
3526
3401
|
o({ mode: "clear" });
|
|
3527
3402
|
}
|
|
3528
3403
|
};
|
|
3529
3404
|
};
|
|
3530
|
-
function
|
|
3531
|
-
We();
|
|
3405
|
+
function ka(e) {
|
|
3532
3406
|
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = null, i = null, a = null, o = null, c = null, l = () => {
|
|
3533
3407
|
if (!c) return;
|
|
3534
3408
|
let { land: e, cancel: t } = c;
|
|
@@ -3553,20 +3427,20 @@ function no(e) {
|
|
|
3553
3427
|
let { getElements: d, transitionName: f, prevTransitionName: p, status: m, isActive: h, animHoldReleased: g } = c, _ = m === "PUSHING" || m === "POPPING" || m === "REPLACING";
|
|
3554
3428
|
if (h) {
|
|
3555
3429
|
let { scope: e } = d();
|
|
3556
|
-
if (e) if (_ && !g) for (let t of
|
|
3557
|
-
else for (let t of
|
|
3430
|
+
if (e) if (_ && !g) for (let t of ua(e, m)) t.setAttribute(oa, "true");
|
|
3431
|
+
else for (let t of da(e)) t.removeAttribute(oa);
|
|
3558
3432
|
}
|
|
3559
3433
|
if (_) {
|
|
3560
3434
|
let { scope: e, bars: n } = d();
|
|
3561
3435
|
if (e) {
|
|
3562
|
-
|
|
3563
|
-
for (let n of
|
|
3564
|
-
for (let e of n ?? []) e &&
|
|
3436
|
+
Dn(e), W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3437
|
+
for (let n of sa(e)) W(n, ["animation-timing-function", "animation-duration"], t);
|
|
3438
|
+
for (let e of n ?? []) e && W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3565
3439
|
}
|
|
3566
3440
|
}
|
|
3567
|
-
_ && (
|
|
3441
|
+
_ && (pr(), o &&= (clearTimeout(o), null), a ||= ur()), !_ && a && !o && (typeof setTimeout == "function" ? o = setTimeout(() => {
|
|
3568
3442
|
o = null, a?.(), a = null;
|
|
3569
|
-
},
|
|
3443
|
+
}, ea) : (a(), a = null));
|
|
3570
3444
|
let v = _ && (h ? m === "PUSHING" || m === "REPLACING" : m === "POPPING"), y = _ && !v;
|
|
3571
3445
|
if (!y && i) {
|
|
3572
3446
|
let e = i;
|
|
@@ -3576,39 +3450,37 @@ function no(e) {
|
|
|
3576
3450
|
let e = r;
|
|
3577
3451
|
r = null, _ ? e() : u(e);
|
|
3578
3452
|
}
|
|
3579
|
-
if (v && !r &&
|
|
3453
|
+
if (v && !r && Be()) {
|
|
3580
3454
|
l();
|
|
3581
3455
|
let { scope: e } = d();
|
|
3582
3456
|
if (e) {
|
|
3583
|
-
|
|
3584
|
-
let t =
|
|
3457
|
+
En(e);
|
|
3458
|
+
let t = Qn(e), n = Cr(e), i = fa(e, St(f), m), a = _i(i + ra), o = Ie() === "on" ? yr(e, i + ra) : $, s = jn();
|
|
3585
3459
|
r = () => {
|
|
3586
3460
|
a(), o(), n(), t(), s();
|
|
3587
3461
|
};
|
|
3588
3462
|
}
|
|
3589
3463
|
}
|
|
3590
|
-
if (y && !i &&
|
|
3464
|
+
if (y && !i && Be()) {
|
|
3591
3465
|
l();
|
|
3592
3466
|
let { scope: e } = d();
|
|
3593
|
-
e &&
|
|
3467
|
+
e && Ie() === "on" && (i = yr(e, fa(e, St(f), m) + ra, !0));
|
|
3594
3468
|
}
|
|
3595
3469
|
let b = (t, n, r) => {
|
|
3596
3470
|
let i = e.getTransitionTaskId();
|
|
3597
3471
|
if (!i || (ye.pinnedDriver(), I() && s.pendingTaskIds.some((e) => e !== i))) return null;
|
|
3598
|
-
if (I() && ye.pinnedDriver() !== "raf") return
|
|
3599
|
-
if (_e() || !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 &&
|
|
3600
|
-
if (!I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && He() && (m === "REPLACING" || m === "POPPING" || m === "PUSHING")) return Ue(), null;
|
|
3601
|
-
if (!ye.playerAllowed()) return null;
|
|
3472
|
+
if (I() && ye.pinnedDriver() !== "raf") return Ca(), null;
|
|
3473
|
+
if (_e() || !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && pa(t.split("-")[0]) || !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && be() && (m === "REPLACING" || m === "POPPING" || m === "PUSHING") || !ye.playerAllowed()) return null;
|
|
3602
3474
|
let { scope: a, decorator: o, bars: c } = d();
|
|
3603
3475
|
if (!a) return null;
|
|
3604
|
-
let l =
|
|
3476
|
+
let l = St(f);
|
|
3605
3477
|
if (ye.pinnedDriver() !== "raf") {
|
|
3606
3478
|
let e = t.split("-")[0];
|
|
3607
|
-
if (
|
|
3479
|
+
if (qr(l, e, a) === "native") return null;
|
|
3608
3480
|
}
|
|
3609
|
-
let u =
|
|
3481
|
+
let u = B(l, t);
|
|
3610
3482
|
if (!u) return null;
|
|
3611
|
-
let p = [], h =
|
|
3483
|
+
let p = [], h = Qi.join(i, {
|
|
3612
3484
|
element: a,
|
|
3613
3485
|
motion: u,
|
|
3614
3486
|
role: n,
|
|
@@ -3619,7 +3491,7 @@ function no(e) {
|
|
|
3619
3491
|
p.push(h);
|
|
3620
3492
|
for (let e of c ?? []) {
|
|
3621
3493
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
3622
|
-
let n =
|
|
3494
|
+
let n = Qi.join(i, {
|
|
3623
3495
|
element: e,
|
|
3624
3496
|
motion: u,
|
|
3625
3497
|
role: "passive",
|
|
@@ -3628,9 +3500,9 @@ function no(e) {
|
|
|
3628
3500
|
n && p.push(n);
|
|
3629
3501
|
}
|
|
3630
3502
|
if (o && l.decoratorName) {
|
|
3631
|
-
let e =
|
|
3503
|
+
let e = R.get(l.decoratorName), n = e ? B(e, t) : null;
|
|
3632
3504
|
if (n) {
|
|
3633
|
-
let e =
|
|
3505
|
+
let e = Qi.join(i, {
|
|
3634
3506
|
element: o,
|
|
3635
3507
|
motion: n,
|
|
3636
3508
|
role: "passive",
|
|
@@ -3639,10 +3511,10 @@ function no(e) {
|
|
|
3639
3511
|
e && p.push(e);
|
|
3640
3512
|
}
|
|
3641
3513
|
}
|
|
3642
|
-
for (let e of
|
|
3643
|
-
let n =
|
|
3514
|
+
for (let e of ca(a, t)) {
|
|
3515
|
+
let n = z.get(e.getAttribute(ia)), r = n ? B(n, t) : null;
|
|
3644
3516
|
if (!r) continue;
|
|
3645
|
-
let a =
|
|
3517
|
+
let a = Qi.join(i, {
|
|
3646
3518
|
element: e,
|
|
3647
3519
|
motion: r,
|
|
3648
3520
|
role: "passive"
|
|
@@ -3651,8 +3523,8 @@ function no(e) {
|
|
|
3651
3523
|
}
|
|
3652
3524
|
return () => p.forEach((e) => e());
|
|
3653
3525
|
}, x = (e, n) => {
|
|
3654
|
-
let r = [], { decorator: i, bars: a } = d(), o =
|
|
3655
|
-
let a = 0, o =
|
|
3526
|
+
let r = [], { decorator: i, bars: a } = d(), o = St(f), s = (e, n, i) => {
|
|
3527
|
+
let a = 0, o = Oa({
|
|
3656
3528
|
element: e,
|
|
3657
3529
|
expectedName: n,
|
|
3658
3530
|
motion: i,
|
|
@@ -3665,15 +3537,15 @@ function no(e) {
|
|
|
3665
3537
|
onTerminal: $
|
|
3666
3538
|
});
|
|
3667
3539
|
o.attach(), r.push(o.detach);
|
|
3668
|
-
}, c =
|
|
3540
|
+
}, c = tn("screen", f, n), l = B(o, n);
|
|
3669
3541
|
if (l) for (let e of a ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || s(e, c, l);
|
|
3670
3542
|
if (i && o.decoratorName) {
|
|
3671
|
-
let e =
|
|
3672
|
-
t && s(i,
|
|
3543
|
+
let e = R.get(o.decoratorName), t = e ? B(e, n) : null;
|
|
3544
|
+
t && s(i, tn("decorator", o.decoratorName, n), t);
|
|
3673
3545
|
}
|
|
3674
|
-
for (let t of
|
|
3675
|
-
let e = t.getAttribute(
|
|
3676
|
-
i && s(t,
|
|
3546
|
+
for (let t of ca(e, n)) {
|
|
3547
|
+
let e = t.getAttribute(ia), r = z.get(e), i = r ? B(r, n) : null;
|
|
3548
|
+
i && s(t, tn("part", e, n), i);
|
|
3677
3549
|
}
|
|
3678
3550
|
return r;
|
|
3679
3551
|
};
|
|
@@ -3681,12 +3553,12 @@ function no(e) {
|
|
|
3681
3553
|
if (m === "COMPLETED") {
|
|
3682
3554
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3683
3555
|
if (e) {
|
|
3684
|
-
|
|
3685
|
-
for (let t of
|
|
3556
|
+
W(e);
|
|
3557
|
+
for (let t of sa(e)) W(t);
|
|
3686
3558
|
}
|
|
3687
|
-
n &&
|
|
3688
|
-
for (let e of r ?? []) e &&
|
|
3689
|
-
return
|
|
3559
|
+
n && W(n);
|
|
3560
|
+
for (let e of r ?? []) e && W(e, void 0, t);
|
|
3561
|
+
return Ta({
|
|
3690
3562
|
scope: e,
|
|
3691
3563
|
decorator: n,
|
|
3692
3564
|
bars: r ?? []
|
|
@@ -3694,22 +3566,22 @@ function no(e) {
|
|
|
3694
3566
|
}
|
|
3695
3567
|
if (m === "REPLACING" && p !== f && e.setReplaceTransitionStatus("PENDING"), _) {
|
|
3696
3568
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3697
|
-
e &&
|
|
3569
|
+
e && wa({
|
|
3698
3570
|
scope: e,
|
|
3699
3571
|
decorator: n,
|
|
3700
3572
|
bars: r ?? []
|
|
3701
|
-
},
|
|
3573
|
+
}, St(f), `${m}-false`, t);
|
|
3702
3574
|
}
|
|
3703
3575
|
if (_ && g) {
|
|
3704
3576
|
let e = `${m}-false`, n = b(e, "passive");
|
|
3705
3577
|
if (n) return n;
|
|
3706
3578
|
let { scope: r } = d();
|
|
3707
3579
|
if (r) {
|
|
3708
|
-
let n =
|
|
3709
|
-
if (
|
|
3710
|
-
let a =
|
|
3580
|
+
let n = St(f), i = [];
|
|
3581
|
+
if (H(n, e)) {
|
|
3582
|
+
let a = B(n, e), o = 0, s = Oa({
|
|
3711
3583
|
element: r,
|
|
3712
|
-
expectedName:
|
|
3584
|
+
expectedName: tn("screen", f, e),
|
|
3713
3585
|
motion: a,
|
|
3714
3586
|
writer: t,
|
|
3715
3587
|
isLive: () => r.isConnected && r.getAttribute("data-flemo-skip-animation") !== "true",
|
|
@@ -3727,15 +3599,15 @@ function no(e) {
|
|
|
3727
3599
|
return $;
|
|
3728
3600
|
}
|
|
3729
3601
|
if (m === "COMPLETED") {
|
|
3730
|
-
|
|
3602
|
+
ba(), e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
3731
3603
|
let { scope: n, decorator: r, bars: i } = d();
|
|
3732
3604
|
if (n) {
|
|
3733
|
-
|
|
3734
|
-
for (let e of
|
|
3605
|
+
W(n), W(n, ["transform", "opacity"]), n.removeAttribute($i);
|
|
3606
|
+
for (let e of sa(n)) W(e);
|
|
3735
3607
|
}
|
|
3736
|
-
r && (
|
|
3737
|
-
for (let e of i ?? []) e &&
|
|
3738
|
-
return
|
|
3608
|
+
r && (W(r), r.removeAttribute($i));
|
|
3609
|
+
for (let e of i ?? []) e && W(e, void 0, t);
|
|
3610
|
+
return Ta({
|
|
3739
3611
|
scope: n,
|
|
3740
3612
|
decorator: r,
|
|
3741
3613
|
bars: i ?? []
|
|
@@ -3746,19 +3618,19 @@ function no(e) {
|
|
|
3746
3618
|
if (!S) return $;
|
|
3747
3619
|
let C = e.getTransitionTaskId(), w = $, T = () => {
|
|
3748
3620
|
w(), C && (s.resolveTask(C), n.delete(C));
|
|
3749
|
-
}, E =
|
|
3621
|
+
}, E = St(f), D = `${m}-true`, O = S.getAttribute($i) === "true", k = !O && H(E, D);
|
|
3750
3622
|
if (!O) {
|
|
3751
3623
|
let { decorator: e, bars: n } = d();
|
|
3752
|
-
|
|
3624
|
+
wa({
|
|
3753
3625
|
scope: S,
|
|
3754
3626
|
decorator: e,
|
|
3755
3627
|
bars: n ?? []
|
|
3756
3628
|
}, E, D, t);
|
|
3757
3629
|
}
|
|
3758
|
-
k && I() && (typeof navigator < "u" && navigator.maxTouchPoints === 0 ||
|
|
3759
|
-
let A = `${m}-false`, j =
|
|
3760
|
-
for (let e of
|
|
3761
|
-
let t =
|
|
3630
|
+
k && I() && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || Yi() < ma) && (w = _a());
|
|
3631
|
+
let A = `${m}-false`, j = H(E, A) ? B(E, A) : null, ee = [];
|
|
3632
|
+
for (let e of la(S, m)) {
|
|
3633
|
+
let t = z.get(e.getAttribute(ia)), n = `${m}-${e.getAttribute("data-flemo-active")}`, r = t && H(t, n) ? B(t, n) : null;
|
|
3762
3634
|
r && ee.push({
|
|
3763
3635
|
element: e,
|
|
3764
3636
|
motion: r
|
|
@@ -3768,10 +3640,10 @@ function no(e) {
|
|
|
3768
3640
|
for (let { motion: e } of ee) M = Math.max(M, (e.delay + e.duration) * 1e3);
|
|
3769
3641
|
let N = [];
|
|
3770
3642
|
{
|
|
3771
|
-
let e = E.decoratorName ?
|
|
3643
|
+
let e = E.decoratorName ? R.get(E.decoratorName) : void 0;
|
|
3772
3644
|
if (e) for (let t of [`${m}-true`, `${m}-false`]) {
|
|
3773
|
-
if (!
|
|
3774
|
-
let n =
|
|
3645
|
+
if (!H(e, t)) continue;
|
|
3646
|
+
let n = B(e, t);
|
|
3775
3647
|
n && (N.push(n), M = Math.max(M, (n.delay + n.duration) * 1e3));
|
|
3776
3648
|
}
|
|
3777
3649
|
}
|
|
@@ -3779,94 +3651,94 @@ function no(e) {
|
|
|
3779
3651
|
if (!O && M > 0) {
|
|
3780
3652
|
if (!g) return C && s.markGateHeld(C), $;
|
|
3781
3653
|
let e = M + 50;
|
|
3782
|
-
C && s.anchorGate(C, e +
|
|
3654
|
+
C && s.anchorGate(C, e + ra);
|
|
3783
3655
|
let t = setTimeout(T, e);
|
|
3784
3656
|
return () => clearTimeout(t);
|
|
3785
3657
|
}
|
|
3786
3658
|
return queueMicrotask(T), $;
|
|
3787
3659
|
}
|
|
3788
|
-
let P =
|
|
3660
|
+
let P = B(E, D);
|
|
3789
3661
|
if (C) if (g) {
|
|
3790
3662
|
let e = (P.delay + P.duration) * 1e3;
|
|
3791
|
-
s.anchorGate(C, Math.max(e, M) +
|
|
3663
|
+
s.anchorGate(C, Math.max(e, M) + ra);
|
|
3792
3664
|
} else s.markGateHeld(C);
|
|
3793
|
-
let
|
|
3794
|
-
|
|
3795
|
-
let
|
|
3665
|
+
let F = !O && !!P, te = E.driver === "native" && !I(), ne = !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && be(), re = I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ge(), ie = !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && pa(m), ae = ne || re || ie, oe = _e() && We(), se = null;
|
|
3666
|
+
F && !I() && !te && !ne && !ie && !oe && (se = ci(S, () => [S.ownerDocument.documentElement], () => aa.get(S)?.(), !1));
|
|
3667
|
+
let ce = ae ? fn[m] ?? 0 : oe ? dn[m] ?? 0 : 0, le = ne && (m === "PUSHING" || m === "POPPING");
|
|
3796
3668
|
{
|
|
3797
3669
|
let e = S.ownerDocument.documentElement;
|
|
3798
|
-
|
|
3670
|
+
ae && He() ? e.setAttribute("data-flemo-creep", "true") : e.removeAttribute("data-flemo-creep"), ae ? e.setAttribute("data-flemo-governed", "true") : e.removeAttribute("data-flemo-governed"), oe ? e.setAttribute("data-flemo-desk-head", "true") : e.removeAttribute("data-flemo-desk-head");
|
|
3799
3671
|
}
|
|
3800
|
-
let
|
|
3801
|
-
|
|
3802
|
-
let
|
|
3803
|
-
|
|
3804
|
-
}, me = 0, he, ve = [],
|
|
3805
|
-
ve.forEach((e) => cancelAnimationFrame(e)), ve = [],
|
|
3806
|
-
},
|
|
3672
|
+
let ue = null;
|
|
3673
|
+
F && te && (ue = ti(S, () => [S.ownerDocument.documentElement], () => aa.get(S)?.()));
|
|
3674
|
+
let de = tn("screen", f, D), fe, pe = () => {
|
|
3675
|
+
fe !== void 0 && (clearTimeout(fe), fe = void 0);
|
|
3676
|
+
}, me = 0, he, ve = [], xe, Se = () => {
|
|
3677
|
+
ve.forEach((e) => cancelAnimationFrame(e)), ve = [], xe !== void 0 && clearTimeout(xe), xe = void 0;
|
|
3678
|
+
}, Ce = () => {
|
|
3807
3679
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
3808
3680
|
shields exotic embedders. */
|
|
3809
3681
|
if (typeof requestAnimationFrame != "function") {
|
|
3810
3682
|
T();
|
|
3811
3683
|
return;
|
|
3812
3684
|
}
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
},
|
|
3685
|
+
xe = setTimeout(() => {
|
|
3686
|
+
Se(), T();
|
|
3687
|
+
}, na);
|
|
3816
3688
|
let e = (t) => {
|
|
3817
3689
|
if (t <= 0) {
|
|
3818
|
-
|
|
3690
|
+
Se(), T();
|
|
3819
3691
|
return;
|
|
3820
3692
|
}
|
|
3821
3693
|
ve.push(requestAnimationFrame(() => e(t - 1)));
|
|
3822
3694
|
};
|
|
3823
|
-
e(
|
|
3824
|
-
},
|
|
3695
|
+
e(ta);
|
|
3696
|
+
}, we = () => {
|
|
3825
3697
|
if (me <= 0) {
|
|
3826
|
-
|
|
3698
|
+
Ce();
|
|
3827
3699
|
return;
|
|
3828
3700
|
}
|
|
3829
|
-
he = setTimeout(
|
|
3830
|
-
},
|
|
3831
|
-
e.target === S &&
|
|
3701
|
+
he = setTimeout(Ce, me);
|
|
3702
|
+
}, Te = $, Ee = $, De = (e) => {
|
|
3703
|
+
e.target === S && rn(e.animationName, de) && (S.removeEventListener("animationend", De), pe(), Te(), we());
|
|
3832
3704
|
};
|
|
3833
|
-
S.addEventListener("animationend",
|
|
3834
|
-
let
|
|
3835
|
-
me = Math.max(0, M -
|
|
3836
|
-
let
|
|
3705
|
+
S.addEventListener("animationend", De);
|
|
3706
|
+
let Oe = F && g ? b(D, "active", Ce) : null, ke = (P.delay + P.duration) * 1e3, Ae = Math.max(ke, M) + 1500, je = C ? setTimeout(() => void s.resolveTask(C), Ae) : void 0;
|
|
3707
|
+
me = Math.max(0, M - ke);
|
|
3708
|
+
let Me = ke * 1 + ce + 250, Ne = () => C !== null && e.getTransitionTaskId() === C && S.isConnected && S.getAttribute("data-flemo-skip-animation") !== "true" && H(E, D), Pe = Oa({
|
|
3837
3709
|
element: S,
|
|
3838
|
-
expectedName:
|
|
3710
|
+
expectedName: de,
|
|
3839
3711
|
motion: P,
|
|
3840
3712
|
writer: t,
|
|
3841
|
-
isLive:
|
|
3713
|
+
isLive: Ne,
|
|
3842
3714
|
budgetUsed: () => n.get(C) ?? 0,
|
|
3843
3715
|
spendBudget: () => {
|
|
3844
|
-
|
|
3716
|
+
Ee(), n.set(C, (n.get(C) ?? 0) + 1);
|
|
3845
3717
|
},
|
|
3846
3718
|
onTerminal: T
|
|
3847
3719
|
});
|
|
3848
|
-
|
|
3849
|
-
let
|
|
3850
|
-
|
|
3851
|
-
},
|
|
3852
|
-
if (
|
|
3853
|
-
|
|
3720
|
+
Te = Pe.detach;
|
|
3721
|
+
let L = !1, Fe = () => {
|
|
3722
|
+
pe(), fe = setTimeout(Le, Me);
|
|
3723
|
+
}, Le = () => {
|
|
3724
|
+
if (pe(), Ne() && !L) {
|
|
3725
|
+
L = !0, Ee(), Pe.fullRestart(), Fe();
|
|
3854
3726
|
return;
|
|
3855
3727
|
}
|
|
3856
3728
|
T();
|
|
3857
|
-
},
|
|
3858
|
-
|
|
3859
|
-
|
|
3729
|
+
}, Re = !Oe && g, ze = Re ? x(S, D) : [];
|
|
3730
|
+
Re && (Pe.attach(), C && Fe()), Re && (te || ne) && aa.set(S, () => {
|
|
3731
|
+
Ee(), C && fe !== void 0 && Fe();
|
|
3860
3732
|
});
|
|
3861
|
-
let
|
|
3862
|
-
|
|
3863
|
-
}) : null,
|
|
3864
|
-
|
|
3733
|
+
let Ve = Re && te ? oi(() => [S.ownerDocument.documentElement], () => {
|
|
3734
|
+
Ee(), C && fe !== void 0 && Fe();
|
|
3735
|
+
}) : null, Ue, Ge = () => {
|
|
3736
|
+
Ue !== void 0 && (clearTimeout(Ue), Ue = void 0);
|
|
3865
3737
|
};
|
|
3866
|
-
if (
|
|
3867
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
3738
|
+
if (Ee = Ge, Re && C && !le && !ie) {
|
|
3739
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = Pr(P, S, e), n = j ? Pr(j, S, e) : 0, r = 0;
|
|
3868
3740
|
for (let { element: t, motion: n } of ee) {
|
|
3869
|
-
let i =
|
|
3741
|
+
let i = Pr(n, t, e);
|
|
3870
3742
|
if (i === null) {
|
|
3871
3743
|
r = null;
|
|
3872
3744
|
break;
|
|
@@ -3877,7 +3749,7 @@ function no(e) {
|
|
|
3877
3749
|
if (N.length > 0) {
|
|
3878
3750
|
let t = d().decorator;
|
|
3879
3751
|
if (t) for (let n of N) {
|
|
3880
|
-
let r =
|
|
3752
|
+
let r = Pr(n, t, e);
|
|
3881
3753
|
if (r === null) {
|
|
3882
3754
|
i = null;
|
|
3883
3755
|
break;
|
|
@@ -3886,37 +3758,45 @@ function no(e) {
|
|
|
3886
3758
|
}
|
|
3887
3759
|
}
|
|
3888
3760
|
let a = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3889
|
-
a !== null && a + 17 <
|
|
3890
|
-
|
|
3891
|
-
}, a * 1 + 17 +
|
|
3761
|
+
a !== null && a + 17 < ke + me && (Ue = setTimeout(() => {
|
|
3762
|
+
Ue = void 0, Ne() && (S.removeEventListener("animationend", De), pe(), Te(), Ce());
|
|
3763
|
+
}, a * 1 + 17 + ce));
|
|
3892
3764
|
}
|
|
3893
3765
|
return () => {
|
|
3894
|
-
if (w(),
|
|
3895
|
-
|
|
3896
|
-
for (let e of
|
|
3766
|
+
if (w(), je !== void 0 && clearTimeout(je), he !== void 0 && clearTimeout(he), Se(), ue?.(), se?.(), Ve?.(), Ge(), S.removeEventListener("animationend", De), Re) {
|
|
3767
|
+
Pe.detach();
|
|
3768
|
+
for (let e of ze) e();
|
|
3897
3769
|
}
|
|
3898
|
-
|
|
3770
|
+
pe(), Oe?.(), C && e.getTransitionTaskId() !== C && n.delete(C);
|
|
3899
3771
|
};
|
|
3900
3772
|
},
|
|
3901
3773
|
activeResumeEntryCount: () => n.size
|
|
3902
3774
|
};
|
|
3903
3775
|
}
|
|
3904
3776
|
//#endregion
|
|
3777
|
+
//#region src/transition/swipeSettle.ts
|
|
3778
|
+
var Aa = .12, ja = .28, Ma = ({ remainingPx: e, spanPx: t, velocityPxPerSecond: n, authoredSeconds: r, reversing: i = !1, minSeconds: a = i ? ja : Aa }) => {
|
|
3779
|
+
let o = Math.abs(e);
|
|
3780
|
+
if (o <= .5) return 0;
|
|
3781
|
+
let s = Math.abs(t), c = s > 0 ? r * Math.min(1, o / s) : r, l = Math.abs(n), u = !i && l > 0 ? o / l : Infinity;
|
|
3782
|
+
return Math.min(r, Math.max(a, Math.min(c, u)));
|
|
3783
|
+
};
|
|
3784
|
+
//#endregion
|
|
3905
3785
|
//#region src/utils/findScrollable.ts
|
|
3906
|
-
function
|
|
3907
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
3786
|
+
function Na(e, t) {
|
|
3787
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = Pa(e);
|
|
3908
3788
|
if (!o) return {
|
|
3909
3789
|
element: null,
|
|
3910
3790
|
hasMarker: !1
|
|
3911
3791
|
};
|
|
3912
3792
|
let s = o.closest?.(r);
|
|
3913
|
-
if (s instanceof HTMLElement &&
|
|
3793
|
+
if (s instanceof HTMLElement && Fa(s, n) && (!a || Ia(s, n))) return {
|
|
3914
3794
|
element: s,
|
|
3915
3795
|
hasMarker: !0
|
|
3916
3796
|
};
|
|
3917
3797
|
let c = o, l = 0;
|
|
3918
3798
|
for (; c && l < i;) {
|
|
3919
|
-
if (
|
|
3799
|
+
if (Fa(c, n) && (!a || Ia(c, n))) return {
|
|
3920
3800
|
element: c,
|
|
3921
3801
|
hasMarker: !1
|
|
3922
3802
|
};
|
|
@@ -3927,7 +3807,7 @@ function ro(e, t) {
|
|
|
3927
3807
|
hasMarker: !1
|
|
3928
3808
|
};
|
|
3929
3809
|
}
|
|
3930
|
-
function
|
|
3810
|
+
function Pa(e) {
|
|
3931
3811
|
if (!e) return null;
|
|
3932
3812
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
3933
3813
|
if (n && n.length) {
|
|
@@ -3935,34 +3815,34 @@ function io(e) {
|
|
|
3935
3815
|
}
|
|
3936
3816
|
return e instanceof HTMLElement ? e : null;
|
|
3937
3817
|
}
|
|
3938
|
-
function
|
|
3818
|
+
function Fa(e, t) {
|
|
3939
3819
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
3940
3820
|
}
|
|
3941
|
-
function
|
|
3942
|
-
if (!
|
|
3821
|
+
function Ia(e, t) {
|
|
3822
|
+
if (!Fa(e, t) || typeof window > "u") return !1;
|
|
3943
3823
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
3944
3824
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
3945
3825
|
}
|
|
3946
3826
|
//#endregion
|
|
3947
3827
|
//#region src/screen/computeBarRiding.ts
|
|
3948
|
-
function
|
|
3828
|
+
function La(e, t) {
|
|
3949
3829
|
return !!e && !!t && e.id === t.id;
|
|
3950
3830
|
}
|
|
3951
|
-
function
|
|
3831
|
+
function Ra(e) {
|
|
3952
3832
|
if (e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev) return {
|
|
3953
3833
|
app: !1,
|
|
3954
3834
|
nav: !1
|
|
3955
3835
|
};
|
|
3956
3836
|
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);
|
|
3957
3837
|
return {
|
|
3958
|
-
app: e.hasTopBar && !
|
|
3959
|
-
nav: e.hasNavBar && !
|
|
3838
|
+
app: e.hasTopBar && !La(t, r),
|
|
3839
|
+
nav: e.hasNavBar && !La(n, i)
|
|
3960
3840
|
};
|
|
3961
3841
|
}
|
|
3962
3842
|
//#endregion
|
|
3963
3843
|
//#region src/core/engine/createSwipeController.ts
|
|
3964
|
-
var
|
|
3965
|
-
function
|
|
3844
|
+
var za = "data-flemo-skip-animation";
|
|
3845
|
+
function Ba(e) {
|
|
3966
3846
|
let t = Symbol("flemo-swipe-layer"), n = null, r = null, i = {
|
|
3967
3847
|
current: [],
|
|
3968
3848
|
prev: []
|
|
@@ -4011,9 +3891,9 @@ function uo(e) {
|
|
|
4011
3891
|
y: e.clientY
|
|
4012
3892
|
}, m = t, x = Math.max(x, Math.abs(e.clientX - f.x), Math.abs(e.clientY - f.y));
|
|
4013
3893
|
}, w = (r, a, o) => {
|
|
4014
|
-
let s =
|
|
4015
|
-
if (r === e.getElements().scope) for (let e of i.current)
|
|
4016
|
-
else if (r === n) for (let e of i.prev)
|
|
3894
|
+
let s = G(r, a, o, t);
|
|
3895
|
+
if (r === e.getElements().scope) for (let e of i.current) G(e, a, o, t);
|
|
3896
|
+
else if (r === n) for (let e of i.prev) G(e, a, o, t);
|
|
4017
3897
|
return s;
|
|
4018
3898
|
}, T = (e, t) => {
|
|
4019
3899
|
if (!e) return null;
|
|
@@ -4028,22 +3908,30 @@ function uo(e) {
|
|
|
4028
3908
|
let t = e.getAttribute("data-flemo-bar-id");
|
|
4029
3909
|
return t === null ? {} : { id: e.getAttribute("data-flemo-bar-id-type") === "number" ? Number(t) : t };
|
|
4030
3910
|
}, 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();
|
|
4031
|
-
m && l && !
|
|
3911
|
+
m && l && !La(l, d) && p.push(m), h && u && !La(u, f) && p.push(h);
|
|
4032
3912
|
let g = [];
|
|
4033
|
-
n && (o && d && !
|
|
3913
|
+
n && (o && d && !La(d, l) && g.push(o), s && f && !La(f, u) && g.push(s)), i = {
|
|
4034
3914
|
current: p,
|
|
4035
3915
|
prev: g
|
|
4036
3916
|
};
|
|
4037
|
-
for (let n of p)
|
|
4038
|
-
for (let n of g)
|
|
3917
|
+
for (let n of p) Z(n, e.getTransition(), !1, t);
|
|
3918
|
+
for (let n of g) Z(n, e.getTransition(), !1, t);
|
|
4039
3919
|
}, D = () => {
|
|
4040
|
-
|
|
4041
|
-
|
|
3920
|
+
let { scope: i, decorator: a } = e.getElements(), o = e.getTransition();
|
|
3921
|
+
i && Z(i, o, !1, t), n && Z(n, o, !1, t);
|
|
3922
|
+
let s = e.getDecorator();
|
|
3923
|
+
s && (a && Z(a, s, !1, t), r && Z(r, s, !1, t));
|
|
3924
|
+
}, O = () => {
|
|
3925
|
+
let { scope: i, decorator: a } = e.getElements();
|
|
3926
|
+
i && Q(i, t), n && Q(n, t), a && Q(a, t), r && Q(r, t);
|
|
3927
|
+
}, k = () => {
|
|
3928
|
+
for (let e of i.current) W(e, void 0, t), Q(e, t);
|
|
3929
|
+
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
4042
3930
|
i = {
|
|
4043
3931
|
current: [],
|
|
4044
3932
|
prev: []
|
|
4045
3933
|
};
|
|
4046
|
-
},
|
|
3934
|
+
}, A = (t) => {
|
|
4047
3935
|
let { screenContainer: n } = e.getElements(), r = (e) => {
|
|
4048
3936
|
let t = T(e, "[data-flemo-screen]");
|
|
4049
3937
|
return Array.from(e.querySelectorAll("[data-flemo-part-name]")).filter((e) => {
|
|
@@ -4055,26 +3943,26 @@ function uo(e) {
|
|
|
4055
3943
|
current: r(n),
|
|
4056
3944
|
prev: r(t)
|
|
4057
3945
|
};
|
|
4058
|
-
},
|
|
4059
|
-
let
|
|
4060
|
-
let
|
|
4061
|
-
if (!
|
|
4062
|
-
let
|
|
4063
|
-
animate: (e, n, r) =>
|
|
4064
|
-
element:
|
|
4065
|
-
active:
|
|
3946
|
+
}, j = (e, n, r, i) => {
|
|
3947
|
+
let o = (a, o) => {
|
|
3948
|
+
let s = z.get(a.getAttribute("data-flemo-part-name"));
|
|
3949
|
+
if (!s) return;
|
|
3950
|
+
let c = {
|
|
3951
|
+
animate: i ?? ((e, n, r) => G(e, n, r, t)),
|
|
3952
|
+
element: a,
|
|
3953
|
+
active: o
|
|
4066
3954
|
};
|
|
4067
|
-
e === "swipe" ?
|
|
3955
|
+
e === "swipe" ? s.onSwipe?.(n, r, c) : e === "start" ? s.onSwipeStart?.(n, c) : s.onSwipeEnd?.(n, c);
|
|
4068
3956
|
};
|
|
4069
|
-
for (let e of a.current)
|
|
4070
|
-
for (let e of a.prev)
|
|
4071
|
-
},
|
|
4072
|
-
for (let e of [...a.current, ...a.prev])
|
|
3957
|
+
for (let e of a.current) o(e, !0);
|
|
3958
|
+
for (let e of a.prev) o(e, !1);
|
|
3959
|
+
}, ee = () => {
|
|
3960
|
+
for (let e of [...a.current, ...a.prev]) W(e, void 0, t);
|
|
4073
3961
|
a = {
|
|
4074
3962
|
current: [],
|
|
4075
3963
|
prev: []
|
|
4076
3964
|
};
|
|
4077
|
-
},
|
|
3965
|
+
}, M = async (t) => {
|
|
4078
3966
|
let i = e.getTransition();
|
|
4079
3967
|
if (!i.swipeDirection || e.getViewportScrollHeight() > 10) {
|
|
4080
3968
|
s = !1;
|
|
@@ -4090,7 +3978,7 @@ function uo(e) {
|
|
|
4090
3978
|
s = !1;
|
|
4091
3979
|
return;
|
|
4092
3980
|
}
|
|
4093
|
-
c = !0, x = 0, f = {
|
|
3981
|
+
c = !0, re = ie(), ae = 0, ne = (typeof performance > "u" ? Date.now() : performance.now()) + te, x = 0, f = {
|
|
4094
3982
|
x: t.clientX,
|
|
4095
3983
|
y: t.clientY
|
|
4096
3984
|
}, p = {
|
|
@@ -4099,29 +3987,50 @@ function uo(e) {
|
|
|
4099
3987
|
}, m = t.timeStamp, h = {
|
|
4100
3988
|
x: 0,
|
|
4101
3989
|
y: 0
|
|
4102
|
-
}, a.setPointerCapture(t.pointerId), E(u),
|
|
3990
|
+
}, a.setPointerCapture(t.pointerId), E(u), A(u), D();
|
|
4103
3991
|
let g = e.getDecorator(), _ = await i.onSwipeStart(t, b(t), {
|
|
4104
3992
|
animate: w,
|
|
4105
3993
|
currentScreen: a,
|
|
4106
3994
|
prevScreen: n,
|
|
4107
3995
|
onStart: (e) => {
|
|
4108
3996
|
g?.onSwipeStart?.(e, {
|
|
4109
|
-
animate:
|
|
3997
|
+
animate: G,
|
|
4110
3998
|
currentDecorator: l,
|
|
4111
3999
|
prevDecorator: r
|
|
4112
|
-
}),
|
|
4000
|
+
}), j("start", e, 0);
|
|
4113
4001
|
}
|
|
4114
4002
|
});
|
|
4115
|
-
_ && !d ? e.setDragStatus("PENDING") : _ || (e.setDragStatus("IDLE"), c = !1, s = !1, S(t),
|
|
4116
|
-
},
|
|
4117
|
-
let t =
|
|
4003
|
+
_ && !d ? e.setDragStatus("PENDING") : _ || (e.setDragStatus("IDLE"), c = !1, s = !1, S(t), k(), O(), ee());
|
|
4004
|
+
}, N = (e) => {
|
|
4005
|
+
let t = M(e);
|
|
4118
4006
|
u = t, t.finally(() => {
|
|
4119
4007
|
u = null;
|
|
4120
4008
|
});
|
|
4121
|
-
},
|
|
4009
|
+
}, P = null, F = 0, te = 200, ne = 0, re = !0, ie = () => {
|
|
4010
|
+
let e = n?.parentElement;
|
|
4011
|
+
return !e || !e.isConnected || typeof getComputedStyle != "function" || getComputedStyle(e).display !== "none";
|
|
4012
|
+
}, ae = 0, oe = (e) => re ? !0 : e >= ne ? (re = !0, !0) : ie() ? ae ? (re = !0, !0) : (ae = e, !1) : (ae = 0, !1), se = () => {
|
|
4013
|
+
F && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(F), F = 0, re = !0;
|
|
4014
|
+
let e = P;
|
|
4015
|
+
P = null, e && ue(e);
|
|
4016
|
+
}, ce = (e = typeof performance > "u" ? Date.now() : performance.now()) => {
|
|
4017
|
+
if (F = 0, !oe(e)) {
|
|
4018
|
+
P && typeof requestAnimationFrame == "function" && (F = requestAnimationFrame(ce));
|
|
4019
|
+
return;
|
|
4020
|
+
}
|
|
4021
|
+
let t = P;
|
|
4022
|
+
P = null, t && ue(t);
|
|
4023
|
+
}, le = (e) => {
|
|
4024
|
+
if (P = e, !F) {
|
|
4025
|
+
if (typeof requestAnimationFrame != "function") {
|
|
4026
|
+
ce();
|
|
4027
|
+
return;
|
|
4028
|
+
}
|
|
4029
|
+
F = requestAnimationFrame(ce);
|
|
4030
|
+
}
|
|
4031
|
+
}, ue = (t) => {
|
|
4122
4032
|
let i = e.getTransition();
|
|
4123
4033
|
if (!i.swipeDirection || !c || u || e.getViewportScrollHeight() > 10) return;
|
|
4124
|
-
C(t);
|
|
4125
4034
|
let { scope: a, decorator: o } = e.getElements(), s = e.getDecorator();
|
|
4126
4035
|
i.onSwipe(t, b(t), {
|
|
4127
4036
|
animate: w,
|
|
@@ -4129,23 +4038,20 @@ function uo(e) {
|
|
|
4129
4038
|
prevScreen: n,
|
|
4130
4039
|
onProgress: (e, t) => {
|
|
4131
4040
|
s?.onSwipe?.(e, t, {
|
|
4132
|
-
animate:
|
|
4041
|
+
animate: G,
|
|
4133
4042
|
currentDecorator: o,
|
|
4134
4043
|
prevDecorator: r
|
|
4135
|
-
}),
|
|
4044
|
+
}), j("swipe", e, t);
|
|
4136
4045
|
}
|
|
4137
4046
|
});
|
|
4138
|
-
},
|
|
4047
|
+
}, de = async (o, s = !1) => {
|
|
4139
4048
|
u && await u;
|
|
4140
4049
|
let l = e.getTransition();
|
|
4141
4050
|
if (!l.swipeDirection || !c) return;
|
|
4142
|
-
c = !1;
|
|
4051
|
+
se(), c = !1;
|
|
4143
4052
|
let { scope: d, decorator: f } = e.getElements();
|
|
4144
4053
|
S(o);
|
|
4145
|
-
let p = e.getDecorator(), m = s || x < 6
|
|
4146
|
-
...n,
|
|
4147
|
-
duration: 0
|
|
4148
|
-
}) : w, h = s ? {
|
|
4054
|
+
let p = e.getDecorator(), m = s || x < 6, h = s ? {
|
|
4149
4055
|
point: {
|
|
4150
4056
|
x: o.clientX,
|
|
4151
4057
|
y: o.clientY
|
|
@@ -4162,23 +4068,44 @@ function uo(e) {
|
|
|
4162
4068
|
x: 0,
|
|
4163
4069
|
y: 0
|
|
4164
4070
|
}
|
|
4165
|
-
} : b(o), g =
|
|
4166
|
-
|
|
4071
|
+
} : b(o), g = l.swipeDirection, _ = d?.getBoundingClientRect(), v = (g === "y" ? _?.height : _?.width) || (typeof window > "u" ? 0 : g === "y" ? window.innerHeight : window.innerWidth), y = g === "y" ? h.offset.y : h.offset.x, C = g === "y" ? h.velocity.y : h.velocity.x, T = Math.abs(y), E = Math.abs(C), D = Math.sign(y), A = D !== 0 && Math.sign(C) === -D && E >= 300, M = !1, N = (e) => ((t, n, r) => {
|
|
4072
|
+
let i = typeof r?.duration == "number" ? r.duration : 0;
|
|
4073
|
+
return i <= 0 ? e(t, n, r) : e(t, n, {
|
|
4074
|
+
...r,
|
|
4075
|
+
duration: Ma({
|
|
4076
|
+
remainingPx: M ? v - T : T,
|
|
4077
|
+
spanPx: v,
|
|
4078
|
+
velocityPxPerSecond: E,
|
|
4079
|
+
authoredSeconds: i,
|
|
4080
|
+
reversing: !M && !A
|
|
4081
|
+
})
|
|
4082
|
+
});
|
|
4083
|
+
}), P = m ? (e, t, n) => w(e, t, {
|
|
4084
|
+
...n,
|
|
4085
|
+
duration: 0
|
|
4086
|
+
}) : N(w), F = m ? (e, t, n) => G(e, t, {
|
|
4087
|
+
...n,
|
|
4088
|
+
duration: 0
|
|
4089
|
+
}) : N(G), te = m ? (e, n, r) => G(e, n, {
|
|
4090
|
+
...r,
|
|
4091
|
+
duration: 0
|
|
4092
|
+
}, t) : N((e, n, r) => G(e, n, r, t)), ne = await l.onSwipeEnd(o, h, {
|
|
4093
|
+
animate: P,
|
|
4167
4094
|
currentScreen: d,
|
|
4168
4095
|
prevScreen: n,
|
|
4169
4096
|
onStart: (e) => {
|
|
4170
4097
|
let t = !s && e;
|
|
4171
|
-
p?.onSwipeEnd?.(t, {
|
|
4172
|
-
animate:
|
|
4098
|
+
M = t, p?.onSwipeEnd?.(t, {
|
|
4099
|
+
animate: F,
|
|
4173
4100
|
currentDecorator: f,
|
|
4174
4101
|
prevDecorator: r
|
|
4175
|
-
}),
|
|
4102
|
+
}), j("end", t, 0, te);
|
|
4176
4103
|
}
|
|
4177
4104
|
});
|
|
4178
|
-
if (!s &&
|
|
4179
|
-
d?.setAttribute(
|
|
4180
|
-
for (let e of i.current)
|
|
4181
|
-
for (let e of i.prev)
|
|
4105
|
+
if (!s && ne) {
|
|
4106
|
+
d?.setAttribute(za, "true"), f?.setAttribute(za, "true");
|
|
4107
|
+
for (let e of i.current) Q(e, t);
|
|
4108
|
+
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
4182
4109
|
i = {
|
|
4183
4110
|
current: [],
|
|
4184
4111
|
prev: []
|
|
@@ -4186,14 +4113,14 @@ function uo(e) {
|
|
|
4186
4113
|
current: [],
|
|
4187
4114
|
prev: []
|
|
4188
4115
|
}, e.back();
|
|
4189
|
-
} else d &&
|
|
4116
|
+
} else d && W(d, void 0, t), n && W(n, void 0, t), f && W(f), r && W(r), k(), O(), ee(), e.setDragStatus("IDLE");
|
|
4190
4117
|
};
|
|
4191
4118
|
return {
|
|
4192
4119
|
pointerDown: (t) => {
|
|
4193
|
-
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g =
|
|
4120
|
+
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g = Na(t.target, {
|
|
4194
4121
|
direction: "x",
|
|
4195
4122
|
verifyByScroll: !0
|
|
4196
|
-
}), _ =
|
|
4123
|
+
}), _ = Na(t.target, {
|
|
4197
4124
|
direction: "y",
|
|
4198
4125
|
verifyByScroll: !0
|
|
4199
4126
|
}), v = t.clientX, y = t.clientY);
|
|
@@ -4201,7 +4128,7 @@ function uo(e) {
|
|
|
4201
4128
|
pointerMove: (t) => {
|
|
4202
4129
|
if (t.pointerId !== l || e.getViewportScrollHeight() > 10) return;
|
|
4203
4130
|
if (c) {
|
|
4204
|
-
|
|
4131
|
+
C(t), le(t);
|
|
4205
4132
|
return;
|
|
4206
4133
|
}
|
|
4207
4134
|
if (!o) return;
|
|
@@ -4215,48 +4142,48 @@ function uo(e) {
|
|
|
4215
4142
|
return;
|
|
4216
4143
|
}
|
|
4217
4144
|
let r = !g.element && !_.element, i = t.clientX - v, a = t.clientY - y, u = n === "x" ? i : a, d = n === "x" ? a : i;
|
|
4218
|
-
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,
|
|
4145
|
+
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, N(t);
|
|
4219
4146
|
else {
|
|
4220
4147
|
let e = _.element && _.element.scrollTop <= 0, r = g.element && g.element.scrollLeft <= 0 && g.hasMarker;
|
|
4221
|
-
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0,
|
|
4148
|
+
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0, N(t));
|
|
4222
4149
|
}
|
|
4223
4150
|
},
|
|
4224
4151
|
pointerUp: (e) => {
|
|
4225
|
-
e.pointerId === l && (o = !1, s = !1, l = null, c &&
|
|
4152
|
+
e.pointerId === l && (o = !1, s = !1, l = null, c && de(e));
|
|
4226
4153
|
},
|
|
4227
4154
|
pointerCancel: (e) => {
|
|
4228
|
-
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c &&
|
|
4155
|
+
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c && de(e, !0));
|
|
4229
4156
|
},
|
|
4230
4157
|
shouldPreventTouch: () => s
|
|
4231
4158
|
};
|
|
4232
4159
|
}
|
|
4233
4160
|
//#endregion
|
|
4234
4161
|
//#region src/screen/pendingNetwork.ts
|
|
4235
|
-
var
|
|
4236
|
-
|
|
4237
|
-
},
|
|
4238
|
-
if (!(
|
|
4239
|
-
if (
|
|
4162
|
+
var Va = 0, Ha = !1, Ua = () => {
|
|
4163
|
+
Va = Math.max(0, Va - 1);
|
|
4164
|
+
}, Wa = () => {
|
|
4165
|
+
if (!(Ha || typeof window > "u")) {
|
|
4166
|
+
if (Ha = !0, typeof window.fetch == "function") {
|
|
4240
4167
|
let e = window.fetch.bind(window);
|
|
4241
4168
|
window.fetch = (...t) => {
|
|
4242
|
-
|
|
4169
|
+
Va += 1;
|
|
4243
4170
|
let n;
|
|
4244
4171
|
try {
|
|
4245
4172
|
n = e(...t);
|
|
4246
4173
|
} catch (e) {
|
|
4247
|
-
throw
|
|
4174
|
+
throw Ua(), e;
|
|
4248
4175
|
}
|
|
4249
|
-
return n.then((e) => (
|
|
4250
|
-
throw
|
|
4176
|
+
return n.then((e) => (Ua(), e), (e) => {
|
|
4177
|
+
throw Ua(), e;
|
|
4251
4178
|
});
|
|
4252
4179
|
};
|
|
4253
4180
|
}
|
|
4254
4181
|
if (typeof XMLHttpRequest == "function") {
|
|
4255
4182
|
let e = XMLHttpRequest.prototype.send;
|
|
4256
4183
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
4257
|
-
|
|
4184
|
+
Va += 1;
|
|
4258
4185
|
let n = !1, r = () => {
|
|
4259
|
-
n || (n = !0,
|
|
4186
|
+
n || (n = !0, Ua());
|
|
4260
4187
|
};
|
|
4261
4188
|
this.addEventListener("loadend", r);
|
|
4262
4189
|
try {
|
|
@@ -4267,28 +4194,28 @@ var fo = 0, po = !1, mo = () => {
|
|
|
4267
4194
|
};
|
|
4268
4195
|
}
|
|
4269
4196
|
}
|
|
4270
|
-
},
|
|
4197
|
+
}, Ga = () => (Wa(), Va > 0);
|
|
4271
4198
|
//#endregion
|
|
4272
4199
|
//#region src/screen/animStartAnchor.ts
|
|
4273
|
-
function
|
|
4200
|
+
function Ka(e) {
|
|
4274
4201
|
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
4275
4202
|
}
|
|
4276
|
-
var
|
|
4277
|
-
function
|
|
4278
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
4203
|
+
var qa = 300, Ja = 20;
|
|
4204
|
+
function Ya(e) {
|
|
4205
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, Ja);
|
|
4279
4206
|
}
|
|
4280
|
-
function
|
|
4281
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
4207
|
+
function Xa(e) {
|
|
4208
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of Ya(e)) t.decode().catch(() => {});
|
|
4282
4209
|
}
|
|
4283
|
-
var
|
|
4210
|
+
var Za = 3, Qa = 40, $a = (e) => {
|
|
4284
4211
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
4285
4212
|
let t = Math.max(1, e.querySelectorAll("*").length);
|
|
4286
4213
|
/* v8 ignore stop */
|
|
4287
|
-
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length *
|
|
4288
|
-
},
|
|
4214
|
+
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * Qa) / t < Za;
|
|
4215
|
+
}, eo = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
4289
4216
|
let t = e.animationName;
|
|
4290
4217
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
4291
|
-
}),
|
|
4218
|
+
}), to = (e) => {
|
|
4292
4219
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
4293
4220
|
which already requires querySelectorAll. */
|
|
4294
4221
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -4296,12 +4223,12 @@ var So = 3, Co = 40, wo = (e) => {
|
|
|
4296
4223
|
the guard shields exotic embedders. */
|
|
4297
4224
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
4298
4225
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
4299
|
-
if (r >=
|
|
4226
|
+
if (r >= Ja) break;
|
|
4300
4227
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
4301
4228
|
}
|
|
4302
4229
|
return !1;
|
|
4303
4230
|
};
|
|
4304
|
-
function
|
|
4231
|
+
function no(e, t = {}) {
|
|
4305
4232
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
4306
4233
|
if (n) return;
|
|
4307
4234
|
let r = t.scope;
|
|
@@ -4309,7 +4236,7 @@ function Do(e, t = {}) {
|
|
|
4309
4236
|
e();
|
|
4310
4237
|
return;
|
|
4311
4238
|
}
|
|
4312
|
-
let i =
|
|
4239
|
+
let i = Ya(r);
|
|
4313
4240
|
if (i.length === 0) {
|
|
4314
4241
|
e();
|
|
4315
4242
|
return;
|
|
@@ -4327,15 +4254,15 @@ function Do(e, t = {}) {
|
|
|
4327
4254
|
return;
|
|
4328
4255
|
}
|
|
4329
4256
|
let i = () => !n.renderSettleOnly && (f() || d());
|
|
4330
|
-
if (!n.renderSettleOnly &&
|
|
4257
|
+
if (!n.renderSettleOnly && !$a(r)) {
|
|
4331
4258
|
e();
|
|
4332
4259
|
return;
|
|
4333
4260
|
}
|
|
4334
4261
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
4335
4262
|
the fallback only shields exotic embedders. */
|
|
4336
|
-
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () =>
|
|
4263
|
+
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () => $a(r) && eo(r), f = () => Ga() || to(r), p = () => {
|
|
4337
4264
|
u || (u = !0, v.disconnect(), clearTimeout(y), clearTimeout(b), clearTimeout(x), c.forEach((e) => cancelAnimationFrame(e)), c = [], e());
|
|
4338
|
-
}, m = () => n.renderSettleOnly ? 6 :
|
|
4265
|
+
}, m = () => n.renderSettleOnly ? 6 : !$a(r) && !i() ? 2 : 6, h = !1, g = () => {
|
|
4339
4266
|
if (!n.renderSettleOnly) {
|
|
4340
4267
|
p();
|
|
4341
4268
|
return;
|
|
@@ -4414,14 +4341,14 @@ function Do(e, t = {}) {
|
|
|
4414
4341
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
4415
4342
|
};
|
|
4416
4343
|
}
|
|
4417
|
-
function
|
|
4418
|
-
let n =
|
|
4344
|
+
function ro(e, t = {}) {
|
|
4345
|
+
let n = no(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
4419
4346
|
return () => {
|
|
4420
4347
|
n(), clearTimeout(i);
|
|
4421
4348
|
};
|
|
4422
4349
|
}
|
|
4423
|
-
var
|
|
4424
|
-
function
|
|
4350
|
+
var io = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
4351
|
+
function ao() {
|
|
4425
4352
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
4426
4353
|
clearTimeout(n.backstop), e.delete(t);
|
|
4427
4354
|
let r = [...n.members];
|
|
@@ -4431,14 +4358,14 @@ function Ao() {
|
|
|
4431
4358
|
return { join: (r, i, a) => {
|
|
4432
4359
|
let o = e.get(r);
|
|
4433
4360
|
if (o) {
|
|
4434
|
-
let e =
|
|
4361
|
+
let e = io(a);
|
|
4435
4362
|
if (e > o.backstopMs) {
|
|
4436
4363
|
clearTimeout(o.backstop);
|
|
4437
4364
|
let n = o;
|
|
4438
4365
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
4439
4366
|
}
|
|
4440
4367
|
} else {
|
|
4441
|
-
let n =
|
|
4368
|
+
let n = io(a), i = {
|
|
4442
4369
|
members: /* @__PURE__ */ new Set(),
|
|
4443
4370
|
backstop: setTimeout(() => t(r, i), n),
|
|
4444
4371
|
backstopMs: n
|
|
@@ -4448,7 +4375,7 @@ function Ao() {
|
|
|
4448
4375
|
let s = o, c = {
|
|
4449
4376
|
release: i,
|
|
4450
4377
|
ready: !1,
|
|
4451
|
-
cancelReadiness:
|
|
4378
|
+
cancelReadiness: no(() => {
|
|
4452
4379
|
c.ready = !0, n(s) && t(r, s);
|
|
4453
4380
|
}, a)
|
|
4454
4381
|
};
|
|
@@ -4465,7 +4392,7 @@ function Ao() {
|
|
|
4465
4392
|
}
|
|
4466
4393
|
//#endregion
|
|
4467
4394
|
//#region src/screen/observeBarHeight.ts
|
|
4468
|
-
function
|
|
4395
|
+
function oo(e, t) {
|
|
4469
4396
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
4470
4397
|
let n = new ResizeObserver(([e]) => {
|
|
4471
4398
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -4476,31 +4403,31 @@ function jo(e, t) {
|
|
|
4476
4403
|
}
|
|
4477
4404
|
//#endregion
|
|
4478
4405
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
4479
|
-
var
|
|
4406
|
+
var so = 0, co = 0, lo = 0, uo = !1, fo = /* @__PURE__ */ new Set(), po = 0, mo = () => {
|
|
4480
4407
|
let e = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
4481
4408
|
e = e < 0 ? 0 : e;
|
|
4482
|
-
let t = e -
|
|
4483
|
-
t = t < 0 ? 0 : t,
|
|
4484
|
-
for (let n of [...
|
|
4485
|
-
},
|
|
4486
|
-
cancelAnimationFrame(
|
|
4409
|
+
let t = e - so;
|
|
4410
|
+
t = t < 0 ? 0 : t, so ||= e, co = e, lo = t, uo = !0;
|
|
4411
|
+
for (let n of [...fo]) n(e, t);
|
|
4412
|
+
}, ho = () => {
|
|
4413
|
+
cancelAnimationFrame(po), po = requestAnimationFrame(mo);
|
|
4487
4414
|
};
|
|
4488
|
-
function
|
|
4489
|
-
let t =
|
|
4490
|
-
return
|
|
4491
|
-
|
|
4415
|
+
function go(e) {
|
|
4416
|
+
let t = fo.size === 0;
|
|
4417
|
+
return fo.add(e), t && (window.visualViewport?.addEventListener("resize", ho), window.visualViewport?.addEventListener("scroll", ho)), uo && (e(co, lo), t && ho()), () => {
|
|
4418
|
+
fo.delete(e), !(fo.size > 0) && (cancelAnimationFrame(po), window.visualViewport?.removeEventListener("resize", ho), window.visualViewport?.removeEventListener("scroll", ho));
|
|
4492
4419
|
};
|
|
4493
4420
|
}
|
|
4494
4421
|
//#endregion
|
|
4495
4422
|
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
4496
|
-
var
|
|
4497
|
-
function
|
|
4498
|
-
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !I()) return
|
|
4499
|
-
if (
|
|
4500
|
-
|
|
4423
|
+
var _o = () => {}, vo = "data-flemo-gpu-prewarm", yo = 2e3, bo = 1200, xo = 120, So = 3, Co = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", wo = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", To = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", Eo = "cold", Do = 0, Oo = null;
|
|
4424
|
+
function ko() {
|
|
4425
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !I()) return _o;
|
|
4426
|
+
if (Do += 1, Eo === "cold") {
|
|
4427
|
+
Eo = "scheduled";
|
|
4501
4428
|
let e = () => document.querySelector("[data-flemo-status=\"PUSHING\"],[data-flemo-status=\"POPPING\"],[data-flemo-status=\"REPLACING\"]") !== null, t = () => {
|
|
4502
|
-
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout:
|
|
4503
|
-
|
|
4429
|
+
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: yo }) : null, t = e === null ? setTimeout(n, bo) : null;
|
|
4430
|
+
Oo = () => {
|
|
4504
4431
|
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
4505
4432
|
};
|
|
4506
4433
|
}, n = () => {
|
|
@@ -4508,13 +4435,13 @@ function $o() {
|
|
|
4508
4435
|
t();
|
|
4509
4436
|
return;
|
|
4510
4437
|
}
|
|
4511
|
-
|
|
4438
|
+
Oo = null, Eo = "done";
|
|
4512
4439
|
let n = document.createElement("div");
|
|
4513
|
-
n.setAttribute(
|
|
4440
|
+
n.setAttribute(vo, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", Co);
|
|
4514
4441
|
let r = document.createElement("div");
|
|
4515
|
-
r.setAttribute("style",
|
|
4442
|
+
r.setAttribute("style", wo), r.textContent = "flemo";
|
|
4516
4443
|
let i = document.createElement("div");
|
|
4517
|
-
i.setAttribute("style",
|
|
4444
|
+
i.setAttribute("style", To);
|
|
4518
4445
|
let a = document.createElement("div");
|
|
4519
4446
|
a.setAttribute("style", "width:96px;font-size:11px;color:#123;will-change:transform;transform:translate3d(0,0,0);");
|
|
4520
4447
|
let o = document.createElement("div");
|
|
@@ -4535,14 +4462,14 @@ function $o() {
|
|
|
4535
4462
|
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);
|
|
4536
4463
|
try {
|
|
4537
4464
|
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4538
|
-
duration:
|
|
4539
|
-
iterations:
|
|
4465
|
+
duration: xo,
|
|
4466
|
+
iterations: So
|
|
4540
4467
|
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
4541
|
-
duration:
|
|
4542
|
-
iterations:
|
|
4468
|
+
duration: xo,
|
|
4469
|
+
iterations: So
|
|
4543
4470
|
}), a.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4544
|
-
duration:
|
|
4545
|
-
iterations:
|
|
4471
|
+
duration: xo,
|
|
4472
|
+
iterations: So
|
|
4546
4473
|
});
|
|
4547
4474
|
} catch {}
|
|
4548
4475
|
setTimeout(() => n.remove(), 450);
|
|
@@ -4551,12 +4478,12 @@ function $o() {
|
|
|
4551
4478
|
}
|
|
4552
4479
|
let e = !1;
|
|
4553
4480
|
return () => {
|
|
4554
|
-
e || (e = !0,
|
|
4481
|
+
e || (e = !0, Do = Math.max(0, Do - 1), Do === 0 && Eo === "scheduled" && (Oo?.(), Oo = null, Eo = "cold"));
|
|
4555
4482
|
};
|
|
4556
4483
|
}
|
|
4557
4484
|
//#endregion
|
|
4558
4485
|
//#region src/utils/isOpaqueColor.ts
|
|
4559
|
-
function
|
|
4486
|
+
function Ao(e) {
|
|
4560
4487
|
let t = e.trim().toLowerCase();
|
|
4561
4488
|
if (t === "transparent" || t === "") return !1;
|
|
4562
4489
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -4567,7 +4494,7 @@ function es(e) {
|
|
|
4567
4494
|
}
|
|
4568
4495
|
//#endregion
|
|
4569
4496
|
//#region src/utils/buildRoutePath.ts
|
|
4570
|
-
function
|
|
4497
|
+
function jo(e, n) {
|
|
4571
4498
|
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();
|
|
4572
4499
|
return {
|
|
4573
4500
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -4575,4 +4502,4 @@ function ts(e, n) {
|
|
|
4575
4502
|
};
|
|
4576
4503
|
}
|
|
4577
4504
|
//#endregion
|
|
4578
|
-
export {
|
|
4505
|
+
export { qa as ANIM_HOLD_RELEASE_BACKSTOP_MS, Aa as MIN_SETTLE_SECONDS, q as OFFLOADED_SRC_ATTR, Fn as OVERSIZE_AREA_RATIO, $i as SKIP_ANIMATION_ATTR, s as TaskManager, s as TaskManger, Ka as animHoldKey, G as animateInline, tn as animationName, ne as appendParamsQuery, mn as applyTransitionStyles, jo as buildRoutePath, Ia as canProgrammaticallyScroll, W as clearInlineAnimation, Jt as collectAnimatedProperties, cn as compileTransitionStyles, Ra as computeBarRiding, lt as computeScreenFreeze, ct as computeScreenFreezeMode, b as consumeSelfInducedPop, ao as createAnimHoldCoordinator, g as createBrowserHistoryDriver, Ct as createDecorator, c as createHistoryStore, x as createHistorySync, Jn as createImageDecodeOffloader, j as createMemoryHistoryDriver, ee as createNavigateStore, F as createNavigationController, Dt as createPartTransition, wt as createRawDecorator, Ot as createRawPartTransition, dt as createRawTransition, de as createRouterScope, fe as createScreenSelector, ce as createScreenStore, _ as createSelfPopGuard, re as createStepController, Ba as createSwipeController, ut as createTransition, ka as createTransitionEngine, ae as createTransitionStore, gt as cupertino, R as decoratorMap, I as detectBlinkEngine, Xa as eagerlyDecodeImages, Xt as easingToCss, ko as ensureGpuPipelinePrewarm, Xn as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, xn as enteringInitialStyle, Na as findScrollable, l as getMatchedPathPattern, u as getParams, be as governedCompiledActive, ur as holdCompositorWarm, ve as isDesktopBlink, ge as isLegacyAndroidBlink, Ao as isOpaqueColor, f as isServer, vt as layout, y as markSelfInducedPop, oe as matchesPathname, yt as material, bt as none, oo as observeBarHeight, go as observeViewportScrollHeight, Fa as overflowsAxis, Et as overlay, z as partTransitionMap, Ue as readDeferReleaseCommitFlag, Ve as readDesktopReleaseFlipFlag, qe as readImageOffloadOverride, Ge as readPrerasterFlag, Ke as readRestLayerPromotionFlag, Re as readSettleGateFlag, te as readStepParams, bn as registerTransitionDefinitions, A as releaseScopeHistorySync, St as resolveTransition, ro as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, La as sharedBarsMatch, Un as shouldOffloadImage, Pe as steadySixtyPlayerEligible, ie as subscribeStepParamsRestore, Ma as swipeSettleSeconds, Yt as targetToDecls, xt as transitionMap, H as variantHasAnimation };
|