@flemo/core 1.22.0 → 1.23.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/TaskManger.d.ts +1 -1
- package/dist/core/engine/__tests__/emulationNotice.test.d.ts +1 -0
- package/dist/core/engine/__tests__/gpuPipelinePrewarm.test.d.ts +1 -0
- package/dist/core/engine/__tests__/imageDecodeHygiene.test.d.ts +1 -0
- package/dist/core/engine/__tests__/invisibleAnimationHold.test.d.ts +1 -0
- package/dist/core/engine/__tests__/landingPixelSnap.test.d.ts +1 -0
- package/dist/core/engine/__tests__/layerSettleHold.test.d.ts +1 -0
- package/dist/core/engine/__tests__/responseHold.test.d.ts +1 -0
- package/dist/core/engine/driverPolicy.d.ts +1 -1
- package/dist/core/engine/emulationNotice.d.ts +3 -0
- package/dist/core/engine/gpuPipelinePrewarm.d.ts +4 -0
- package/dist/core/engine/imageDecodeHygiene.d.ts +1 -0
- package/dist/core/engine/invisibleAnimationHold.d.ts +2 -0
- package/dist/core/engine/landingPixelSnap.d.ts +5 -0
- package/dist/core/engine/layerSettleHold.d.ts +5 -0
- package/dist/core/engine/motionDriverKind.d.ts +1 -1
- package/dist/core/engine/nativeStallAnchor.d.ts +2 -0
- package/dist/core/engine/responseHold.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +1454 -847
- package/dist/screen/computeScreenFreeze.d.ts +1 -0
- package/dist/transition/animateInline.d.ts +3 -3
- package/dist/transition/compileTransitionStyles.d.ts +1 -1
- package/dist/transition/settleScrub.d.ts +3 -3
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -163,19 +163,22 @@ var a = 1200, o = 2, s = new class {
|
|
|
163
163
|
rearms: t?.rearms ?? 0
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
anchorGate(e) {
|
|
167
|
-
let
|
|
168
|
-
if (
|
|
166
|
+
anchorGate(e, t) {
|
|
167
|
+
let n = this.gatePhases.get(e);
|
|
168
|
+
if (n?.phase === "anchored") return;
|
|
169
169
|
this.gatePhases.set(e, {
|
|
170
170
|
phase: "anchored",
|
|
171
|
-
rearms:
|
|
171
|
+
rearms: n?.rearms ?? 0,
|
|
172
|
+
minLifetimeMs: t ?? n?.minLifetimeMs
|
|
172
173
|
});
|
|
173
|
-
let
|
|
174
|
-
!
|
|
174
|
+
let r = this.tasks.get(e);
|
|
175
|
+
!r || r.status !== "MANUAL_PENDING" && r.status !== "SIGNAL_PENDING" || (r.backstopTimer && (clearTimeout(r.backstopTimer), delete r.backstopTimer), this.armBackstop(r));
|
|
175
176
|
}
|
|
176
177
|
armBackstop(e) {
|
|
177
178
|
let t = e.control?.maxLifetimeMs;
|
|
178
|
-
!t || t <= 0 || typeof setTimeout > "u"
|
|
179
|
+
if (!t || t <= 0 || typeof setTimeout > "u") return;
|
|
180
|
+
let n = Math.max(t, this.gatePhases.get(e.id)?.minLifetimeMs ?? 0);
|
|
181
|
+
e.backstopTimer = setTimeout(() => {
|
|
179
182
|
delete e.backstopTimer;
|
|
180
183
|
let t = this.gatePhases.get(e.id);
|
|
181
184
|
if (t?.phase === "held" && t.rearms < o) {
|
|
@@ -183,7 +186,7 @@ var a = 1200, o = 2, s = new class {
|
|
|
183
186
|
return;
|
|
184
187
|
}
|
|
185
188
|
this.resolveTask(e.id);
|
|
186
|
-
},
|
|
189
|
+
}, n);
|
|
187
190
|
}
|
|
188
191
|
async resolveTask(e) {
|
|
189
192
|
let t = this.tasks.get(e);
|
|
@@ -271,10 +274,10 @@ function l(e, t) {
|
|
|
271
274
|
//#endregion
|
|
272
275
|
//#region src/utils/getParams.ts
|
|
273
276
|
function u(e, t, r) {
|
|
274
|
-
let i =
|
|
275
|
-
return
|
|
276
|
-
...
|
|
277
|
-
...
|
|
277
|
+
let i = l(e, t), a = n(i)(t), o = new URLSearchParams(r), s = Object.fromEntries(o.entries());
|
|
278
|
+
return a ? {
|
|
279
|
+
...a.params,
|
|
280
|
+
...s
|
|
278
281
|
} : {};
|
|
279
282
|
}
|
|
280
283
|
//#endregion
|
|
@@ -374,7 +377,7 @@ function _() {
|
|
|
374
377
|
e += 1;
|
|
375
378
|
},
|
|
376
379
|
consume() {
|
|
377
|
-
return e > 0
|
|
380
|
+
return e > 0 && (--e, !0);
|
|
378
381
|
}
|
|
379
382
|
};
|
|
380
383
|
}
|
|
@@ -473,7 +476,7 @@ function x(e) {
|
|
|
473
476
|
}, _ = n.subscribe((e) => {
|
|
474
477
|
if (!i && (d = m(), h(), w(e.pathname), !r())) return c(e);
|
|
475
478
|
});
|
|
476
|
-
if (e.routerKey && e.zoneEntryId &&
|
|
479
|
+
if (e.routerKey && e.zoneEntryId && ee(n, e.zoneEntryId)) {
|
|
477
480
|
let n = t.history.getState().histories[t.history.getState().index]?.pathname, r = T(n);
|
|
478
481
|
for (let t of r) c({
|
|
479
482
|
state: t.raw?.[e.routerKey] ?? null,
|
|
@@ -495,18 +498,18 @@ var S = [], C = !1, w = (e) => {
|
|
|
495
498
|
if (!e) return [];
|
|
496
499
|
for (let t = S.length - 1; t >= 0; --t) if (S[t].pathname === e) return S.slice(t + 1);
|
|
497
500
|
return [];
|
|
498
|
-
},
|
|
501
|
+
}, ee = (e, t) => {
|
|
499
502
|
if (typeof window > "u") return !1;
|
|
500
503
|
let n = window.history.state;
|
|
501
504
|
return n ? Object.values(n).some((e) => !!e && typeof e == "object" && e.id === t) : !1;
|
|
502
505
|
};
|
|
503
|
-
function
|
|
506
|
+
function te(e, t) {
|
|
504
507
|
for (let n = S.length - 1; n >= 0; --n) if (S[n].pathname === t) return S[n].raw?.[e] ?? null;
|
|
505
508
|
return null;
|
|
506
509
|
}
|
|
507
|
-
var
|
|
508
|
-
function
|
|
509
|
-
|
|
510
|
+
var E = /* @__PURE__ */ new WeakMap();
|
|
511
|
+
function ne(e) {
|
|
512
|
+
E.has(e) || E.set(e, x({
|
|
510
513
|
stores: e,
|
|
511
514
|
driver: e.driver,
|
|
512
515
|
consume: e.consume,
|
|
@@ -515,12 +518,12 @@ function O(e) {
|
|
|
515
518
|
ownsPathname: e.ownsPathname
|
|
516
519
|
}));
|
|
517
520
|
}
|
|
518
|
-
function
|
|
519
|
-
e.persistent || (
|
|
521
|
+
function D(e) {
|
|
522
|
+
e.persistent || (E.get(e)?.(), E.delete(e));
|
|
520
523
|
}
|
|
521
524
|
//#endregion
|
|
522
525
|
//#region src/history/memoryHistoryDriver.ts
|
|
523
|
-
function
|
|
526
|
+
function re(e) {
|
|
524
527
|
let t = [{
|
|
525
528
|
state: e?.state ?? null,
|
|
526
529
|
url: e?.url ?? "/"
|
|
@@ -562,7 +565,7 @@ function ne(e) {
|
|
|
562
565
|
}
|
|
563
566
|
//#endregion
|
|
564
567
|
//#region src/navigate/store.ts
|
|
565
|
-
function
|
|
568
|
+
function O() {
|
|
566
569
|
return e((e) => ({
|
|
567
570
|
status: "IDLE",
|
|
568
571
|
transitionTaskId: null,
|
|
@@ -572,11 +575,11 @@ function re() {
|
|
|
572
575
|
}
|
|
573
576
|
//#endregion
|
|
574
577
|
//#region src/navigate/createNavigationController.ts
|
|
575
|
-
var
|
|
578
|
+
var ie = (e, t, n) => {
|
|
576
579
|
let { regexp: r } = i(e);
|
|
577
580
|
for (let e = t - 1; e >= 0; e--) if (r.test(n[e].pathname)) return t - e;
|
|
578
581
|
return -1;
|
|
579
|
-
},
|
|
582
|
+
}, ae = (e, t) => typeof e == "number" && Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t, oe = async (e, t, n, r) => {
|
|
580
583
|
let i, a = new Promise((t) => {
|
|
581
584
|
i = e.subscribe(() => t(!0));
|
|
582
585
|
}), o = new Promise((e) => setTimeout(() => e(!1), 200));
|
|
@@ -584,7 +587,7 @@ var k = (e, t, n) => {
|
|
|
584
587
|
let s = await Promise.race([a, o]);
|
|
585
588
|
i(), s && r();
|
|
586
589
|
};
|
|
587
|
-
function
|
|
590
|
+
function se(e) {
|
|
588
591
|
let { stores: t, buildPathname: n, driver: r = g(), markSelfInduced: i = y } = e, o = () => t.history.getState().bumpTruncationEpoch(), c = () => {
|
|
589
592
|
let e = r.readState();
|
|
590
593
|
if (!e?.id) return null;
|
|
@@ -610,10 +613,10 @@ function ie(e) {
|
|
|
610
613
|
}
|
|
611
614
|
let s = c(), { index: d, histories: f, addHistory: g, popHistories: _ } = t.history.getState(), v = (() => {
|
|
612
615
|
if (u?.until != null) {
|
|
613
|
-
let e =
|
|
616
|
+
let e = ie(u.until, d, f);
|
|
614
617
|
return e < 0 ? 0 : e;
|
|
615
618
|
}
|
|
616
|
-
return Math.min(
|
|
619
|
+
return Math.min(ae(u?.skip, 0), Math.max(0, d));
|
|
617
620
|
})(), { setStatus: y, setTransitionTaskId: b } = t.navigate.getState();
|
|
618
621
|
y("PUSHING"), b(h);
|
|
619
622
|
let { pathname: x, toPathname: S } = n(e, l ?? {}), C = {
|
|
@@ -640,7 +643,7 @@ function ie(e) {
|
|
|
640
643
|
return g({
|
|
641
644
|
...C,
|
|
642
645
|
frameIndex: T + 1
|
|
643
|
-
}), await
|
|
646
|
+
}), await oe(r, i, v, () => {
|
|
644
647
|
o(), r.pushState({
|
|
645
648
|
id: h,
|
|
646
649
|
index: T + 1,
|
|
@@ -679,10 +682,10 @@ function ie(e) {
|
|
|
679
682
|
}
|
|
680
683
|
let s = c(), { index: d, histories: f, addHistory: g, replaceHistory: _, popHistories: v } = t.history.getState(), y = (() => {
|
|
681
684
|
if (u?.until != null) {
|
|
682
|
-
let e =
|
|
685
|
+
let e = ie(u.until, d, f);
|
|
683
686
|
return e < 0 ? 0 : e + 1;
|
|
684
687
|
}
|
|
685
|
-
return Math.min(
|
|
688
|
+
return Math.min(ae(u?.skip, 0) + 1, d + 1);
|
|
686
689
|
})();
|
|
687
690
|
if (y <= 0) {
|
|
688
691
|
a.abort();
|
|
@@ -710,23 +713,23 @@ function ie(e) {
|
|
|
710
713
|
}), async () => {
|
|
711
714
|
_(d), b("COMPLETED");
|
|
712
715
|
};
|
|
713
|
-
let
|
|
716
|
+
let ee = y <= d ? (f[d - y]?.frameIndex ?? d - y) + 1 : f[0]?.frameIndex ?? 0;
|
|
714
717
|
return v(y - 1), g({
|
|
715
718
|
...w,
|
|
716
|
-
frameIndex:
|
|
717
|
-
}), y <= d ? await
|
|
719
|
+
frameIndex: ee
|
|
720
|
+
}), y <= d ? await oe(r, i, y, () => {
|
|
718
721
|
o(), r.pushState({
|
|
719
722
|
id: h,
|
|
720
|
-
index:
|
|
723
|
+
index: ee,
|
|
721
724
|
status: "REPLACING",
|
|
722
725
|
params: l,
|
|
723
726
|
transitionName: p,
|
|
724
727
|
layoutId: m
|
|
725
728
|
}, S);
|
|
726
|
-
}) : await
|
|
729
|
+
}) : await oe(r, i, d, () => {
|
|
727
730
|
o(), r.replaceState({
|
|
728
731
|
id: h,
|
|
729
|
-
index:
|
|
732
|
+
index: ee,
|
|
730
733
|
status: "REPLACING",
|
|
731
734
|
params: l,
|
|
732
735
|
transitionName: p,
|
|
@@ -779,10 +782,10 @@ function ie(e) {
|
|
|
779
782
|
pop: async (e) => {
|
|
780
783
|
await d((t, n) => {
|
|
781
784
|
if (e?.until != null) {
|
|
782
|
-
let r =
|
|
785
|
+
let r = ie(e.until, t, n);
|
|
783
786
|
return r < 0 ? 0 : r;
|
|
784
787
|
}
|
|
785
|
-
let r =
|
|
788
|
+
let r = ae(e?.skip, 1);
|
|
786
789
|
return r <= 0 ? 0 : Math.min(r, t);
|
|
787
790
|
}, e?.transitionName);
|
|
788
791
|
}
|
|
@@ -790,14 +793,14 @@ function ie(e) {
|
|
|
790
793
|
}
|
|
791
794
|
//#endregion
|
|
792
795
|
//#region src/navigate/createStepController.ts
|
|
793
|
-
var
|
|
796
|
+
var k = (e) => {
|
|
794
797
|
let t = e;
|
|
795
798
|
return t?.step ? t.params ?? {} : null;
|
|
796
|
-
},
|
|
799
|
+
}, ce = (e, t) => {
|
|
797
800
|
let n = new URLSearchParams(Object.fromEntries(Object.entries(t).map(([e, t]) => [e, String(t)]))).toString();
|
|
798
801
|
return n ? `${e}?${n}` : e;
|
|
799
802
|
};
|
|
800
|
-
function
|
|
803
|
+
function le(e) {
|
|
801
804
|
let { stores: t, driver: n, markSelfInduced: r, buildStepPathname: i, applyParams: o } = e;
|
|
802
805
|
return {
|
|
803
806
|
pushStep: async (e) => {
|
|
@@ -855,7 +858,7 @@ function se(e) {
|
|
|
855
858
|
}
|
|
856
859
|
};
|
|
857
860
|
}
|
|
858
|
-
function
|
|
861
|
+
function ue(e, t) {
|
|
859
862
|
return e.subscribe((e) => {
|
|
860
863
|
let n = e.state;
|
|
861
864
|
n?.step && s.addTask(async () => {
|
|
@@ -865,7 +868,7 @@ function ce(e, t) {
|
|
|
865
868
|
}
|
|
866
869
|
//#endregion
|
|
867
870
|
//#region src/transition/store.ts
|
|
868
|
-
function
|
|
871
|
+
function de(t = "cupertino") {
|
|
869
872
|
return e((e) => ({
|
|
870
873
|
defaultTransitionName: t,
|
|
871
874
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -873,12 +876,12 @@ function le(t = "cupertino") {
|
|
|
873
876
|
}
|
|
874
877
|
//#endregion
|
|
875
878
|
//#region src/utils/matchesPathname.ts
|
|
876
|
-
function
|
|
879
|
+
function fe(e, t) {
|
|
877
880
|
return i(e).regexp.test(t);
|
|
878
881
|
}
|
|
879
882
|
//#endregion
|
|
880
883
|
//#region src/screen/store.ts
|
|
881
|
-
function
|
|
884
|
+
function pe() {
|
|
882
885
|
return e((e) => ({
|
|
883
886
|
dragStatus: "IDLE",
|
|
884
887
|
replaceTransitionStatus: "IDLE",
|
|
@@ -909,21 +912,21 @@ function de() {
|
|
|
909
912
|
}
|
|
910
913
|
//#endregion
|
|
911
914
|
//#region src/core/createRouterScope.ts
|
|
912
|
-
var
|
|
915
|
+
var me = {
|
|
913
916
|
mark: () => {},
|
|
914
917
|
consume: () => !1
|
|
915
|
-
},
|
|
916
|
-
function
|
|
918
|
+
}, he = /* @__PURE__ */ new Map();
|
|
919
|
+
function ge(e) {
|
|
917
920
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, s = f() ? void 0 : e.persistKey;
|
|
918
921
|
if (s) {
|
|
919
|
-
let e =
|
|
922
|
+
let e = he.get(s);
|
|
920
923
|
if (e) {
|
|
921
924
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
922
925
|
let t = e.history.getState();
|
|
923
926
|
return t.setPendingIndex(t.index), e;
|
|
924
927
|
}
|
|
925
928
|
}
|
|
926
|
-
let l = d(t, n, r, i), u = (e.routerKey && !f() ?
|
|
929
|
+
let l = d(t, n, r, i), u = (e.routerKey && !f() ? te(e.routerKey, n) : null) ?? (o && !f() ? o.readState() : null), p = u?.id ? {
|
|
927
930
|
...l,
|
|
928
931
|
id: u.id,
|
|
929
932
|
params: u.params ?? l.params,
|
|
@@ -936,7 +939,7 @@ function pe(e) {
|
|
|
936
939
|
index: 0,
|
|
937
940
|
histories: [p]
|
|
938
941
|
}), e.hostedScope;
|
|
939
|
-
let m = a ?
|
|
942
|
+
let m = a ? re({
|
|
940
943
|
state: {
|
|
941
944
|
id: p.id,
|
|
942
945
|
index: 0,
|
|
@@ -946,25 +949,25 @@ function pe(e) {
|
|
|
946
949
|
layoutId: p.layoutId
|
|
947
950
|
},
|
|
948
951
|
url: p.pathname
|
|
949
|
-
}) : o, h = a ?
|
|
952
|
+
}) : o, h = a ? me : _(), g = {
|
|
950
953
|
history: c([p], 0),
|
|
951
|
-
navigate:
|
|
952
|
-
transition:
|
|
953
|
-
screen:
|
|
954
|
+
navigate: O(),
|
|
955
|
+
transition: de(i),
|
|
956
|
+
screen: pe(),
|
|
954
957
|
driver: m,
|
|
955
958
|
markSelfInduced: h.mark,
|
|
956
959
|
consume: h.consume,
|
|
957
960
|
routerKey: e.routerKey,
|
|
958
961
|
zoneEntryId: e.zoneEntryId,
|
|
959
|
-
ownsPathname: (e) =>
|
|
962
|
+
ownsPathname: (e) => fe(t, e),
|
|
960
963
|
persistent: !!s,
|
|
961
964
|
life: { alive: !0 }
|
|
962
965
|
};
|
|
963
|
-
return s &&
|
|
966
|
+
return s && he.set(s, g), g;
|
|
964
967
|
}
|
|
965
968
|
//#endregion
|
|
966
969
|
//#region src/screen/createScreenSelector.ts
|
|
967
|
-
function
|
|
970
|
+
function A(e, t) {
|
|
968
971
|
return e.map((n, r) => ({
|
|
969
972
|
...n,
|
|
970
973
|
isActive: r === t,
|
|
@@ -975,19 +978,32 @@ function me(e, t) {
|
|
|
975
978
|
prevTransitionName: e[t - 1]?.transitionName
|
|
976
979
|
}));
|
|
977
980
|
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
+
(() => {
|
|
982
|
+
try {
|
|
983
|
+
if (typeof location > "u" || typeof sessionStorage > "u") return;
|
|
984
|
+
/[?&]flemo-freeze=shallow\b/.test(location.search) ? sessionStorage.setItem("flemo:freeze", "shallow") : /[?&]flemo-freeze=off\b/.test(location.search) && sessionStorage.removeItem("flemo:freeze");
|
|
985
|
+
} catch {}
|
|
986
|
+
})();
|
|
987
|
+
var j, _e = () => {
|
|
988
|
+
if (j !== void 0) return j;
|
|
989
|
+
try {
|
|
990
|
+
j = typeof sessionStorage < "u" && sessionStorage.getItem("flemo:freeze") === "shallow";
|
|
991
|
+
} catch {
|
|
992
|
+
j = !1;
|
|
993
|
+
}
|
|
994
|
+
return j;
|
|
995
|
+
};
|
|
996
|
+
function ve(e) {
|
|
981
997
|
if (e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex) return "immediate";
|
|
982
998
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
983
|
-
return !e.isActive && t ? "deferred" : "live";
|
|
999
|
+
return !e.isActive && t ? _e() ? "live" : "deferred" : "live";
|
|
984
1000
|
}
|
|
985
|
-
function
|
|
986
|
-
return
|
|
1001
|
+
function ye(e) {
|
|
1002
|
+
return ve(e) !== "live";
|
|
987
1003
|
}
|
|
988
1004
|
//#endregion
|
|
989
1005
|
//#region src/transition/createTransition.ts
|
|
990
|
-
function
|
|
1006
|
+
function be({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
991
1007
|
return {
|
|
992
1008
|
name: e,
|
|
993
1009
|
initial: t,
|
|
@@ -1008,7 +1024,7 @@ function N({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exit
|
|
|
1008
1024
|
}
|
|
1009
1025
|
//#endregion
|
|
1010
1026
|
//#region src/transition/createRawTransition.ts
|
|
1011
|
-
function
|
|
1027
|
+
function xe({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
1012
1028
|
return {
|
|
1013
1029
|
name: e,
|
|
1014
1030
|
initial: t,
|
|
@@ -1029,10 +1045,15 @@ function _e({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1029
1045
|
}
|
|
1030
1046
|
//#endregion
|
|
1031
1047
|
//#region src/transition/cupertino.ts
|
|
1032
|
-
var
|
|
1048
|
+
var Se = (e, t, n) => {
|
|
1033
1049
|
let [r, i] = t, [a, o] = n;
|
|
1034
1050
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1035
|
-
},
|
|
1051
|
+
}, Ce = 30, M = .7, N = [
|
|
1052
|
+
.32,
|
|
1053
|
+
.72,
|
|
1054
|
+
0,
|
|
1055
|
+
1
|
|
1056
|
+
], P = be({
|
|
1036
1057
|
name: "cupertino",
|
|
1037
1058
|
initial: { x: "100%" },
|
|
1038
1059
|
idle: {
|
|
@@ -1042,49 +1063,29 @@ var ve = (e, t, n) => {
|
|
|
1042
1063
|
enter: {
|
|
1043
1064
|
value: { x: 0 },
|
|
1044
1065
|
options: {
|
|
1045
|
-
duration:
|
|
1046
|
-
ease:
|
|
1047
|
-
.32,
|
|
1048
|
-
.72,
|
|
1049
|
-
0,
|
|
1050
|
-
1
|
|
1051
|
-
]
|
|
1066
|
+
duration: M,
|
|
1067
|
+
ease: N
|
|
1052
1068
|
}
|
|
1053
1069
|
},
|
|
1054
1070
|
enterBack: {
|
|
1055
1071
|
value: { x: "100%" },
|
|
1056
1072
|
options: {
|
|
1057
|
-
duration:
|
|
1058
|
-
ease:
|
|
1059
|
-
.32,
|
|
1060
|
-
.72,
|
|
1061
|
-
0,
|
|
1062
|
-
1
|
|
1063
|
-
]
|
|
1073
|
+
duration: M,
|
|
1074
|
+
ease: N
|
|
1064
1075
|
}
|
|
1065
1076
|
},
|
|
1066
1077
|
exit: {
|
|
1067
|
-
value: { x:
|
|
1078
|
+
value: { x: `-${Ce}%` },
|
|
1068
1079
|
options: {
|
|
1069
|
-
duration:
|
|
1070
|
-
ease:
|
|
1071
|
-
.32,
|
|
1072
|
-
.72,
|
|
1073
|
-
0,
|
|
1074
|
-
1
|
|
1075
|
-
]
|
|
1080
|
+
duration: M,
|
|
1081
|
+
ease: N
|
|
1076
1082
|
}
|
|
1077
1083
|
},
|
|
1078
1084
|
exitBack: {
|
|
1079
1085
|
value: { x: 0 },
|
|
1080
1086
|
options: {
|
|
1081
|
-
duration:
|
|
1082
|
-
ease:
|
|
1083
|
-
.32,
|
|
1084
|
-
.72,
|
|
1085
|
-
0,
|
|
1086
|
-
1
|
|
1087
|
-
]
|
|
1087
|
+
duration: M,
|
|
1088
|
+
ease: N
|
|
1088
1089
|
}
|
|
1089
1090
|
},
|
|
1090
1091
|
options: {
|
|
@@ -1092,34 +1093,24 @@ var ve = (e, t, n) => {
|
|
|
1092
1093
|
swipeDirection: "x",
|
|
1093
1094
|
onSwipeStart: async () => !0,
|
|
1094
1095
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1095
|
-
let { offset: o } = t, s = o.x, c =
|
|
1096
|
-
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-
|
|
1096
|
+
let { offset: o } = t, s = o.x, c = Se(s, [0, window.innerWidth], [0, 100]);
|
|
1097
|
+
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + Ce / 100 * c}%` }, { duration: 0 }), c;
|
|
1097
1098
|
},
|
|
1098
1099
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1099
1100
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1100
1101
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1101
1102
|
duration: .3,
|
|
1102
|
-
ease:
|
|
1103
|
-
|
|
1104
|
-
.72,
|
|
1105
|
-
0,
|
|
1106
|
-
1
|
|
1107
|
-
]
|
|
1108
|
-
}), n(i, { x: c ? 0 : "-35%" }, {
|
|
1103
|
+
ease: N
|
|
1104
|
+
}), n(i, { x: c ? 0 : `-${Ce}%` }, {
|
|
1109
1105
|
duration: .3,
|
|
1110
|
-
ease:
|
|
1111
|
-
.32,
|
|
1112
|
-
.72,
|
|
1113
|
-
0,
|
|
1114
|
-
1
|
|
1115
|
-
]
|
|
1106
|
+
ease: N
|
|
1116
1107
|
})]), c;
|
|
1117
1108
|
}
|
|
1118
1109
|
}
|
|
1119
|
-
}),
|
|
1110
|
+
}), we = (e, t, n) => {
|
|
1120
1111
|
let [r, i] = t, [a, o] = n;
|
|
1121
1112
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1122
|
-
},
|
|
1113
|
+
}, F = be({
|
|
1123
1114
|
name: "layout",
|
|
1124
1115
|
initial: { opacity: .97 },
|
|
1125
1116
|
idle: {
|
|
@@ -1147,7 +1138,7 @@ var ve = (e, t, n) => {
|
|
|
1147
1138
|
swipeDirection: "y",
|
|
1148
1139
|
onSwipeStart: async () => !0,
|
|
1149
1140
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1150
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1141
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = we(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);
|
|
1151
1142
|
return i?.(!0, 100), n(r, {
|
|
1152
1143
|
y: f,
|
|
1153
1144
|
opacity: c
|
|
@@ -1164,7 +1155,7 @@ var ve = (e, t, n) => {
|
|
|
1164
1155
|
}, { duration: .3 })]), c;
|
|
1165
1156
|
}
|
|
1166
1157
|
}
|
|
1167
|
-
}),
|
|
1158
|
+
}), Te = be({
|
|
1168
1159
|
name: "material",
|
|
1169
1160
|
initial: { y: "100%" },
|
|
1170
1161
|
idle: {
|
|
@@ -1272,7 +1263,7 @@ var ve = (e, t, n) => {
|
|
|
1272
1263
|
})]), c;
|
|
1273
1264
|
}
|
|
1274
1265
|
}
|
|
1275
|
-
}),
|
|
1266
|
+
}), Ee = be({
|
|
1276
1267
|
name: "none",
|
|
1277
1268
|
initial: {},
|
|
1278
1269
|
idle: {
|
|
@@ -1296,19 +1287,19 @@ var ve = (e, t, n) => {
|
|
|
1296
1287
|
options: { duration: 0 }
|
|
1297
1288
|
}
|
|
1298
1289
|
}), I = /* @__PURE__ */ new Map([
|
|
1299
|
-
["none",
|
|
1300
|
-
["cupertino",
|
|
1301
|
-
["material",
|
|
1302
|
-
["layout",
|
|
1290
|
+
["none", Ee],
|
|
1291
|
+
["cupertino", P],
|
|
1292
|
+
["material", Te],
|
|
1293
|
+
["layout", F]
|
|
1303
1294
|
]);
|
|
1304
1295
|
//#endregion
|
|
1305
1296
|
//#region src/transition/resolveTransition.ts
|
|
1306
|
-
function
|
|
1297
|
+
function De(e) {
|
|
1307
1298
|
return I.get(e) ?? I.get("none");
|
|
1308
1299
|
}
|
|
1309
1300
|
//#endregion
|
|
1310
1301
|
//#region src/transition/decorator/createDecorator.ts
|
|
1311
|
-
function
|
|
1302
|
+
function Oe({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1312
1303
|
return {
|
|
1313
1304
|
name: e,
|
|
1314
1305
|
initial: t,
|
|
@@ -1329,7 +1320,7 @@ function Ce({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1329
1320
|
}
|
|
1330
1321
|
//#endregion
|
|
1331
1322
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1332
|
-
function
|
|
1323
|
+
function ke({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1333
1324
|
return {
|
|
1334
1325
|
name: e,
|
|
1335
1326
|
initial: t,
|
|
@@ -1350,42 +1341,42 @@ function we({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1350
1341
|
}
|
|
1351
1342
|
//#endregion
|
|
1352
1343
|
//#region src/transition/decorator/overlay.ts
|
|
1353
|
-
var
|
|
1344
|
+
var L = "rgba(0, 0, 0, 0.1)", Ae = Oe({
|
|
1354
1345
|
name: "overlay",
|
|
1355
1346
|
initial: {
|
|
1356
1347
|
opacity: 0,
|
|
1357
|
-
backgroundColor:
|
|
1348
|
+
backgroundColor: L
|
|
1358
1349
|
},
|
|
1359
1350
|
idle: {
|
|
1360
1351
|
value: {
|
|
1361
1352
|
opacity: 0,
|
|
1362
|
-
backgroundColor:
|
|
1353
|
+
backgroundColor: L
|
|
1363
1354
|
},
|
|
1364
1355
|
options: { duration: 0 }
|
|
1365
1356
|
},
|
|
1366
1357
|
enter: {
|
|
1367
1358
|
value: {
|
|
1368
1359
|
opacity: 1,
|
|
1369
|
-
backgroundColor:
|
|
1360
|
+
backgroundColor: L
|
|
1370
1361
|
},
|
|
1371
|
-
options: { duration: .
|
|
1362
|
+
options: { duration: .7 }
|
|
1372
1363
|
},
|
|
1373
1364
|
exit: {
|
|
1374
1365
|
value: {
|
|
1375
1366
|
opacity: 0,
|
|
1376
|
-
backgroundColor:
|
|
1367
|
+
backgroundColor: L
|
|
1377
1368
|
},
|
|
1378
|
-
options: { duration: .
|
|
1369
|
+
options: { duration: .7 }
|
|
1379
1370
|
},
|
|
1380
1371
|
options: {
|
|
1381
1372
|
onSwipeStart: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!!e }, { duration: .3 }),
|
|
1382
1373
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1383
1374
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1384
1375
|
}
|
|
1385
|
-
}),
|
|
1376
|
+
}), R = /* @__PURE__ */ new Map([["overlay", Ae]]);
|
|
1386
1377
|
//#endregion
|
|
1387
1378
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1388
|
-
function
|
|
1379
|
+
function je({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1389
1380
|
return {
|
|
1390
1381
|
name: e,
|
|
1391
1382
|
initial: t,
|
|
@@ -1406,7 +1397,7 @@ function De({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1406
1397
|
}
|
|
1407
1398
|
//#endregion
|
|
1408
1399
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1409
|
-
function
|
|
1400
|
+
function Me({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1410
1401
|
return {
|
|
1411
1402
|
name: e,
|
|
1412
1403
|
initial: t,
|
|
@@ -1427,7 +1418,7 @@ function Oe({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1427
1418
|
}
|
|
1428
1419
|
//#endregion
|
|
1429
1420
|
//#region src/transition/partTransition/partTransition.ts
|
|
1430
|
-
var
|
|
1421
|
+
var z = /* @__PURE__ */ new Map(), Ne = {
|
|
1431
1422
|
"IDLE-true": "self",
|
|
1432
1423
|
"IDLE-false": "self",
|
|
1433
1424
|
"PUSHING-true": "initial",
|
|
@@ -1438,17 +1429,17 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1438
1429
|
"POPPING-false": "PUSHING-false",
|
|
1439
1430
|
"COMPLETED-true": "self",
|
|
1440
1431
|
"COMPLETED-false": "self"
|
|
1441
|
-
},
|
|
1432
|
+
}, Pe = Object.keys(Ne), Fe = (e) => {
|
|
1442
1433
|
if (!e) return 0;
|
|
1443
1434
|
let t = e.duration;
|
|
1444
1435
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1445
|
-
},
|
|
1446
|
-
let n =
|
|
1436
|
+
}, Ie = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, Le = (e, t) => {
|
|
1437
|
+
let n = Ne[t];
|
|
1447
1438
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1448
1439
|
}, B = (e, t) => {
|
|
1449
|
-
let n =
|
|
1440
|
+
let n = Le(e, t);
|
|
1450
1441
|
if (n === null) return null;
|
|
1451
|
-
let r = e.variants[t], i =
|
|
1442
|
+
let r = e.variants[t], i = Fe(r.options), a = Ie(r.options);
|
|
1452
1443
|
return i <= 0 && a <= 0 ? null : {
|
|
1453
1444
|
from: n,
|
|
1454
1445
|
to: r.value,
|
|
@@ -1456,7 +1447,7 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1456
1447
|
delay: a,
|
|
1457
1448
|
ease: r.options?.ease
|
|
1458
1449
|
};
|
|
1459
|
-
},
|
|
1450
|
+
}, Re = Pe, ze = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), Be = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ve = /* @__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(".")), He = (e, t) => t.startsWith("--") || Ve.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, Ue = (e, t) => typeof t == "number" ? He(t, e) : typeof t == "string" ? t : "", We = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Ge = /* @__PURE__ */ new Set([
|
|
1460
1451
|
"x",
|
|
1461
1452
|
"y",
|
|
1462
1453
|
"z",
|
|
@@ -1467,7 +1458,7 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1467
1458
|
"rotateX",
|
|
1468
1459
|
"rotateY",
|
|
1469
1460
|
"rotateZ"
|
|
1470
|
-
]),
|
|
1461
|
+
]), Ke = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, qe = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, Je = /^1(\.0+)?$/, Ye = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && Je.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && qe.test(t.trim()) : t === 0 || typeof t == "string" && Ke.test(t.trim()), Xe = (e, t) => {
|
|
1471
1462
|
switch (e) {
|
|
1472
1463
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1473
1464
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1481,16 +1472,16 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1481
1472
|
case "rotateY": return `rotateY(${t})`;
|
|
1482
1473
|
default: return "";
|
|
1483
1474
|
}
|
|
1484
|
-
},
|
|
1475
|
+
}, Ze = (e) => {
|
|
1485
1476
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1486
|
-
if (!
|
|
1477
|
+
if (!Be(e)) return;
|
|
1487
1478
|
let n = [];
|
|
1488
1479
|
for (let r of Object.keys(e)) {
|
|
1489
|
-
let i = e[r], a =
|
|
1490
|
-
if (a !== "") if (
|
|
1480
|
+
let i = e[r], a = Ue(r, i);
|
|
1481
|
+
if (a !== "") if (Ge.has(r)) n.push(`${r}:${a}`);
|
|
1491
1482
|
else {
|
|
1492
|
-
let e = t.get(
|
|
1493
|
-
e.add(a), t.set(
|
|
1483
|
+
let e = t.get(We(r)) ?? /* @__PURE__ */ new Set();
|
|
1484
|
+
e.add(a), t.set(We(r), e);
|
|
1494
1485
|
}
|
|
1495
1486
|
}
|
|
1496
1487
|
r.add(n.sort().join("|"));
|
|
@@ -1501,12 +1492,12 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1501
1492
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1502
1493
|
return n && a.push("transform"), a;
|
|
1503
1494
|
}, V = (e) => {
|
|
1504
|
-
if (!
|
|
1495
|
+
if (!Be(e)) return [];
|
|
1505
1496
|
let t = [], n = !0, r = [];
|
|
1506
1497
|
for (let i of Object.keys(e)) {
|
|
1507
|
-
let a = e[i], o =
|
|
1508
|
-
o !== "" && (
|
|
1509
|
-
property:
|
|
1498
|
+
let a = e[i], o = Ue(i, a);
|
|
1499
|
+
o !== "" && (Ge.has(i) ? (t.push(Xe(i, o)), Ye(i, a) || (n = !1)) : r.push({
|
|
1500
|
+
property: We(i),
|
|
1510
1501
|
value: o
|
|
1511
1502
|
}));
|
|
1512
1503
|
}
|
|
@@ -1514,7 +1505,7 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1514
1505
|
property: "transform",
|
|
1515
1506
|
value: n ? "none" : t.join(" ")
|
|
1516
1507
|
}), r;
|
|
1517
|
-
},
|
|
1508
|
+
}, Qe = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), $e = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1518
1509
|
linear: "linear",
|
|
1519
1510
|
easeIn: "ease-in",
|
|
1520
1511
|
easeOut: "ease-out",
|
|
@@ -1524,29 +1515,29 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1524
1515
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1525
1516
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1526
1517
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1527
|
-
}[e] ?? "ease" : "ease",
|
|
1518
|
+
}[e] ?? "ease" : "ease", et = (e, t) => {
|
|
1528
1519
|
let [n, r] = t.split("-");
|
|
1529
1520
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1530
|
-
},
|
|
1521
|
+
}, tt = (e, t) => {
|
|
1531
1522
|
let [n, r] = t.split("-");
|
|
1532
1523
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1533
|
-
},
|
|
1524
|
+
}, nt = (e, t) => {
|
|
1534
1525
|
let [n, r] = t.split("-");
|
|
1535
1526
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1536
|
-
},
|
|
1527
|
+
}, rt = (e, t) => {
|
|
1537
1528
|
let [n, r] = t.split("-");
|
|
1538
1529
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1539
|
-
},
|
|
1540
|
-
let o = V(r), s = V(i.value), c =
|
|
1530
|
+
}, it = (e, t, n) => `flemo-${e}-${ze(t)}-${n}`, at = (e, t, n, r, i, a) => {
|
|
1531
|
+
let o = V(r), s = V(i.value), c = Fe(i.options), l = Ie(i.options), u = $e(i.options?.ease), d = a(t, n), f = e === "screen" ? `${d},\n${nt(t, n)}` : d;
|
|
1541
1532
|
if (s.length === 0 && o.length === 0) return "";
|
|
1542
|
-
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${
|
|
1543
|
-
let p =
|
|
1533
|
+
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${Qe(s)}\n animation: none;\n}`;
|
|
1534
|
+
let p = it(e, t, n), m = [
|
|
1544
1535
|
`@keyframes ${p} {`,
|
|
1545
1536
|
" from {",
|
|
1546
|
-
|
|
1537
|
+
Qe(o).replace(/^/gm, " "),
|
|
1547
1538
|
" }",
|
|
1548
1539
|
" to {",
|
|
1549
|
-
|
|
1540
|
+
Qe(s).replace(/^/gm, " "),
|
|
1550
1541
|
" }",
|
|
1551
1542
|
"}"
|
|
1552
1543
|
].join("\n"), h = [
|
|
@@ -1556,59 +1547,59 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1556
1547
|
l > 0 ? `${l}s` : null,
|
|
1557
1548
|
"both"
|
|
1558
1549
|
].filter(Boolean).join(" "), g = new Map(o.map((e) => [e.property, e.value])), _ = new Map(s.map((e) => [e.property, e.value])), v = Array.from(/* @__PURE__ */ new Set([...g.keys(), ..._.keys()])).filter((e) => g.get(e) !== _.get(e)), y = v.length > 0 ? ` will-change: ${v.join(", ")};\n` : "", b = n.split("-")[0];
|
|
1559
|
-
return `${m}\n${`${f} {\n animation: ${h};\n${y}${b === "PUSHING" || b === "REPLACING" ? " contain: layout;\n pointer-events: none;\n" : ""}}`}${e === "screen" && n.endsWith("-false") &&
|
|
1560
|
-
},
|
|
1550
|
+
return `${m}\n${`${f} {\n animation: ${h};\n${y}${b === "PUSHING" || b === "REPLACING" ? " contain: layout;\n pointer-events: none;\n" : ""}}`}${e === "screen" && n.endsWith("-false") && ot(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park"] {\n animation: none;\n${Qe(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && ot(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${Qe(s)}\n}` : ""}`;
|
|
1551
|
+
}, ot = (e) => {
|
|
1561
1552
|
if (!e) return !1;
|
|
1562
1553
|
if (e.opacity === 0) return !0;
|
|
1563
1554
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1564
1555
|
return t(e.x) || t(e.y);
|
|
1565
|
-
},
|
|
1556
|
+
}, st = (e, t, n, r) => {
|
|
1566
1557
|
let i = V(r.value);
|
|
1567
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1568
|
-
},
|
|
1558
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${Qe(i)}\n}`;
|
|
1559
|
+
}, ct = (e, t, n = []) => {
|
|
1569
1560
|
let r = [];
|
|
1570
1561
|
for (let t of e) {
|
|
1571
1562
|
let e = t.name;
|
|
1572
|
-
for (let n of
|
|
1573
|
-
let i = t.variants[n], a =
|
|
1563
|
+
for (let n of Pe) {
|
|
1564
|
+
let i = t.variants[n], a = Ne[n];
|
|
1574
1565
|
if (a === "self") {
|
|
1575
|
-
r.push(et
|
|
1566
|
+
r.push(st(et, e, n, i));
|
|
1576
1567
|
continue;
|
|
1577
1568
|
}
|
|
1578
1569
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1579
|
-
r.push(
|
|
1570
|
+
r.push(at("screen", e, n, o, i, et));
|
|
1580
1571
|
}
|
|
1581
1572
|
}
|
|
1582
1573
|
for (let e of t) {
|
|
1583
1574
|
let t = e.name;
|
|
1584
|
-
for (let n of
|
|
1585
|
-
let i = e.variants[n], a =
|
|
1575
|
+
for (let n of Re) {
|
|
1576
|
+
let i = e.variants[n], a = Ne[n];
|
|
1586
1577
|
if (a === "self") {
|
|
1587
|
-
r.push(
|
|
1578
|
+
r.push(st(tt, t, n, i));
|
|
1588
1579
|
continue;
|
|
1589
1580
|
}
|
|
1590
1581
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1591
|
-
r.push(
|
|
1582
|
+
r.push(at("decorator", t, n, o, i, tt));
|
|
1592
1583
|
}
|
|
1593
1584
|
}
|
|
1594
1585
|
for (let e of n) {
|
|
1595
1586
|
let t = e.name;
|
|
1596
|
-
for (let n of
|
|
1597
|
-
let i = e.variants[n], a =
|
|
1587
|
+
for (let n of Re) {
|
|
1588
|
+
let i = e.variants[n], a = Ne[n];
|
|
1598
1589
|
if (a === "self") {
|
|
1599
|
-
r.push(
|
|
1590
|
+
r.push(st(rt, t, n, i));
|
|
1600
1591
|
continue;
|
|
1601
1592
|
}
|
|
1602
1593
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1603
|
-
r.push(
|
|
1594
|
+
r.push(at("part", t, n, o, i, rt));
|
|
1604
1595
|
}
|
|
1605
1596
|
}
|
|
1606
1597
|
return [
|
|
1607
1598
|
...r.filter((e) => e.length > 0),
|
|
1608
|
-
|
|
1609
|
-
|
|
1599
|
+
lt,
|
|
1600
|
+
ut
|
|
1610
1601
|
].join("\n\n");
|
|
1611
|
-
},
|
|
1602
|
+
}, lt = [
|
|
1612
1603
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1613
1604
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1614
1605
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
@@ -1617,45 +1608,45 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1617
1608
|
"[data-flemo-anim-hold=\"park-under\"] [data-flemo-part-name] {",
|
|
1618
1609
|
" animation-play-state: paused !important;",
|
|
1619
1610
|
"}"
|
|
1620
|
-
].join("\n"),
|
|
1611
|
+
].join("\n"), ut = [
|
|
1621
1612
|
"[data-flemo-held-arrival] {",
|
|
1622
1613
|
" display: none !important;",
|
|
1623
1614
|
"}"
|
|
1624
|
-
].join("\n"),
|
|
1625
|
-
let n =
|
|
1615
|
+
].join("\n"), H = (e, t) => {
|
|
1616
|
+
let n = Ne[t];
|
|
1626
1617
|
if (n === "self") return !1;
|
|
1627
|
-
let r = e.variants[t], i =
|
|
1618
|
+
let r = e.variants[t], i = Fe(r.options), a = Ie(r.options);
|
|
1628
1619
|
if (i <= 0 && a <= 0) return !1;
|
|
1629
1620
|
let o = V(n === "initial" ? e.initial : e.variants[n].value), s = V(r.value);
|
|
1630
1621
|
return o.length > 0 || s.length > 0;
|
|
1631
|
-
},
|
|
1632
|
-
function
|
|
1622
|
+
}, dt = "data-flemo";
|
|
1623
|
+
function ft() {
|
|
1633
1624
|
if (f()) return;
|
|
1634
|
-
let e =
|
|
1635
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1625
|
+
let e = ct(I.values(), R.values(), z.values()), t = document.head.querySelector(`style[${dt}]`);
|
|
1626
|
+
t || (t = document.createElement("style"), t.setAttribute(dt, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1636
1627
|
}
|
|
1637
1628
|
//#endregion
|
|
1638
1629
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1639
|
-
var
|
|
1630
|
+
var pt = /* @__PURE__ */ new Map(), mt = /* @__PURE__ */ new Map(), ht = /* @__PURE__ */ new Map(), gt = (e, t) => {
|
|
1640
1631
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1641
|
-
},
|
|
1632
|
+
}, _t = (e, t) => {
|
|
1642
1633
|
let n = (e.get(t) ?? 1) - 1;
|
|
1643
1634
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1644
1635
|
};
|
|
1645
|
-
function
|
|
1646
|
-
for (let t of e) I.set(t.name, t),
|
|
1647
|
-
for (let e of t)
|
|
1648
|
-
for (let e of n)
|
|
1649
|
-
return
|
|
1650
|
-
for (let t of e)
|
|
1651
|
-
for (let e of t)
|
|
1652
|
-
for (let e of n)
|
|
1653
|
-
|
|
1636
|
+
function vt(e, t, n = []) {
|
|
1637
|
+
for (let t of e) I.set(t.name, t), gt(pt, t.name);
|
|
1638
|
+
for (let e of t) R.set(e.name, e), gt(mt, e.name);
|
|
1639
|
+
for (let e of n) z.set(e.name, e), gt(ht, e.name);
|
|
1640
|
+
return ft(), () => {
|
|
1641
|
+
for (let t of e) _t(pt, t.name) && I.delete(t.name);
|
|
1642
|
+
for (let e of t) _t(mt, e.name) && R.delete(e.name);
|
|
1643
|
+
for (let e of n) _t(ht, e.name) && z.delete(e.name);
|
|
1644
|
+
ft();
|
|
1654
1645
|
};
|
|
1655
1646
|
}
|
|
1656
1647
|
//#endregion
|
|
1657
1648
|
//#region src/transition/enteringInitialStyle.ts
|
|
1658
|
-
function
|
|
1649
|
+
function yt(e) {
|
|
1659
1650
|
let { initial: t, isActive: n, status: r } = e;
|
|
1660
1651
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1661
1652
|
let i = {};
|
|
@@ -1663,10 +1654,10 @@ function ft(e) {
|
|
|
1663
1654
|
}
|
|
1664
1655
|
//#endregion
|
|
1665
1656
|
//#region src/transition/settleScrub.ts
|
|
1666
|
-
var
|
|
1657
|
+
var bt = () => ({
|
|
1667
1658
|
request: (e) => requestAnimationFrame(e),
|
|
1668
1659
|
cancel: (e) => cancelAnimationFrame(e)
|
|
1669
|
-
}),
|
|
1660
|
+
}), xt = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), St = ((e = bt()) => {
|
|
1670
1661
|
let t = /* @__PURE__ */ new Map(), n = null, r = () => {
|
|
1671
1662
|
t.size === 0 && n !== null && (e.cancel(n), n = null);
|
|
1672
1663
|
}, i = (e, n) => {
|
|
@@ -1695,90 +1686,103 @@ var pt = () => ({
|
|
|
1695
1686
|
t.size > 0 && (n = e.request(a));
|
|
1696
1687
|
};
|
|
1697
1688
|
return {
|
|
1698
|
-
settle: (r, o, s, c) => {
|
|
1689
|
+
settle: (r, o, s, c, l) => {
|
|
1699
1690
|
if (typeof r.animate != "function") return null;
|
|
1700
1691
|
i(r, "current");
|
|
1701
|
-
let
|
|
1702
|
-
for (let e of o)
|
|
1703
|
-
let
|
|
1692
|
+
let u = {};
|
|
1693
|
+
for (let e of o) u[xt(e.property)] = e.value;
|
|
1694
|
+
let d;
|
|
1704
1695
|
try {
|
|
1705
|
-
|
|
1696
|
+
d = r.animate([u], {
|
|
1706
1697
|
duration: Math.max(0, s.durationMs),
|
|
1707
1698
|
delay: Math.max(0, s.delayMs),
|
|
1708
1699
|
easing: s.easing,
|
|
1709
1700
|
fill: "forwards"
|
|
1710
|
-
}),
|
|
1701
|
+
}), d.pause(), d.currentTime = 0;
|
|
1711
1702
|
} catch {
|
|
1712
1703
|
return null;
|
|
1713
1704
|
}
|
|
1714
|
-
let
|
|
1705
|
+
let f = Math.max(0, s.durationMs) + Math.max(0, s.delayMs);
|
|
1715
1706
|
return new Promise((s) => {
|
|
1716
|
-
let
|
|
1707
|
+
let u = {
|
|
1717
1708
|
element: r,
|
|
1718
|
-
animation:
|
|
1709
|
+
animation: d,
|
|
1719
1710
|
decls: o,
|
|
1720
|
-
totalMs:
|
|
1711
|
+
totalMs: f,
|
|
1721
1712
|
startTime: null,
|
|
1722
1713
|
writeFinal: c,
|
|
1723
1714
|
resolve: s,
|
|
1724
|
-
backstop: setTimeout(() => i(r, "end"),
|
|
1715
|
+
backstop: setTimeout(() => i(r, "end"), f + 60),
|
|
1716
|
+
owner: l
|
|
1725
1717
|
};
|
|
1726
|
-
t.set(r,
|
|
1718
|
+
t.set(r, u), n === null && (n = e.request(a));
|
|
1727
1719
|
});
|
|
1728
1720
|
},
|
|
1729
|
-
takeover: (e) =>
|
|
1730
|
-
|
|
1721
|
+
takeover: (e, n) => {
|
|
1722
|
+
let r = t.get(e);
|
|
1723
|
+
r && (n === void 0 || r.owner === n) && i(e, "current");
|
|
1724
|
+
},
|
|
1725
|
+
cancel: (e, n) => {
|
|
1726
|
+
let r = t.get(e);
|
|
1727
|
+
r && (n === void 0 || r.owner === n) && i(e, "drop");
|
|
1728
|
+
}
|
|
1731
1729
|
};
|
|
1732
|
-
})(),
|
|
1730
|
+
})(), Ct = "flemo:motion-driver", wt = "flemo:motion-driver-force", Tt = !1, Et = () => {
|
|
1733
1731
|
try {
|
|
1734
1732
|
try {
|
|
1735
|
-
typeof localStorage < "u" && localStorage.removeItem(
|
|
1733
|
+
typeof localStorage < "u" && localStorage.removeItem(wt);
|
|
1736
1734
|
} catch {}
|
|
1737
1735
|
if (typeof sessionStorage > "u") return null;
|
|
1738
|
-
let e = sessionStorage.getItem(
|
|
1736
|
+
let e = sessionStorage.getItem(wt);
|
|
1739
1737
|
if (e === null) return null;
|
|
1740
1738
|
let [t, n] = e.split("@"), r = Number(n);
|
|
1741
|
-
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!
|
|
1739
|
+
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!Tt && typeof console < "u" && (Tt = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${wt}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(wt), null);
|
|
1742
1740
|
} catch {
|
|
1743
1741
|
return null;
|
|
1744
1742
|
}
|
|
1745
|
-
},
|
|
1743
|
+
}, Dt = () => ({
|
|
1746
1744
|
read: () => {
|
|
1747
1745
|
try {
|
|
1748
|
-
return typeof localStorage < "u" ? localStorage.getItem(
|
|
1746
|
+
return typeof localStorage < "u" ? localStorage.getItem(Ct) : null;
|
|
1749
1747
|
} catch {
|
|
1750
1748
|
return null;
|
|
1751
1749
|
}
|
|
1752
1750
|
},
|
|
1753
1751
|
write: (e) => {
|
|
1754
1752
|
try {
|
|
1755
|
-
typeof localStorage < "u" && localStorage.setItem(
|
|
1753
|
+
typeof localStorage < "u" && localStorage.setItem(Ct, e);
|
|
1756
1754
|
} catch {}
|
|
1757
1755
|
}
|
|
1758
|
-
}),
|
|
1756
|
+
}), Ot = 30, kt = 2, At = 2, U = () => {
|
|
1757
|
+
if (typeof navigator > "u") return !1;
|
|
1758
|
+
let e = navigator.userAgentData?.brands;
|
|
1759
|
+
return Array.isArray(e) ? e.some((e) => /chromium/i.test(e?.brand ?? "")) : !1;
|
|
1760
|
+
}, jt = ((e = Dt(), t = !1, n = !0) => {
|
|
1759
1761
|
let r = n && e.read() === "css", i = r;
|
|
1760
1762
|
r &&= !1;
|
|
1761
1763
|
let a = 0, o = 0, s = [];
|
|
1762
1764
|
return {
|
|
1763
1765
|
playerAllowed: () => {
|
|
1764
|
-
let e =
|
|
1766
|
+
let e = Et();
|
|
1765
1767
|
return e ? e === "raf" : t && !r;
|
|
1766
1768
|
},
|
|
1767
|
-
pinnedDriver:
|
|
1769
|
+
pinnedDriver: Et,
|
|
1768
1770
|
beginRun: () => {
|
|
1769
1771
|
o = 0, s = [];
|
|
1770
1772
|
},
|
|
1771
1773
|
reportGap: (e) => {
|
|
1772
|
-
s.push(e)
|
|
1774
|
+
s.push(e);
|
|
1773
1775
|
},
|
|
1774
|
-
endRun: () => {
|
|
1775
|
-
let
|
|
1776
|
-
|
|
1776
|
+
endRun: (t) => {
|
|
1777
|
+
let c = Math.max(Ot, (t ?? 1e3 / 60) * 1.8);
|
|
1778
|
+
o = s.filter((e) => e >= c).length;
|
|
1779
|
+
let l = o >= kt;
|
|
1780
|
+
if (l && (a += 1), n) {
|
|
1777
1781
|
if (i) {
|
|
1778
|
-
i = !1,
|
|
1782
|
+
i = !1, l ? r = !0 : e.write("raf");
|
|
1779
1783
|
return;
|
|
1780
1784
|
}
|
|
1781
|
-
|
|
1785
|
+
l && a >= At && !r && (r = !0, e.write("css"));
|
|
1782
1786
|
}
|
|
1783
1787
|
},
|
|
1784
1788
|
stats: () => ({
|
|
@@ -1787,57 +1791,75 @@ var pt = () => ({
|
|
|
1787
1791
|
demoted: r
|
|
1788
1792
|
})
|
|
1789
1793
|
};
|
|
1790
|
-
}
|
|
1791
|
-
let
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1794
|
+
})(Dt(), !0, U()), Mt = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Nt = /* @__PURE__ */ new WeakMap(), Pt = Symbol("flemo-inline-writer"), Ft = /* @__PURE__ */ new WeakMap(), W = (e, t, n = Pt) => {
|
|
1795
|
+
let r = Nt.get(e);
|
|
1796
|
+
r || (r = /* @__PURE__ */ new Map(), Nt.set(e, r));
|
|
1797
|
+
let i = r.get(t);
|
|
1798
|
+
i || (i = {
|
|
1799
|
+
original: e.style.getPropertyValue(t),
|
|
1800
|
+
owners: /* @__PURE__ */ new Set()
|
|
1801
|
+
}, r.set(t, i)), i.owners.add(n);
|
|
1802
|
+
}, G = (e, t, n) => {
|
|
1803
|
+
St.cancel(e, n);
|
|
1804
|
+
let r = Nt.get(e);
|
|
1805
|
+
(!n || Ft.get(e) === n) && (e.style.transition = "", Ft.delete(e));
|
|
1806
|
+
let i = (t) => {
|
|
1807
|
+
let i = r?.get(t);
|
|
1808
|
+
if (!i) {
|
|
1809
|
+
n || e.style.removeProperty(t);
|
|
1810
|
+
return;
|
|
1811
|
+
}
|
|
1812
|
+
n && (i.owners.delete(n), i.owners.size > 0) || (i.original ? e.style.setProperty(t, i.original) : e.style.removeProperty(t), r.delete(t));
|
|
1813
|
+
};
|
|
1814
|
+
if (t) {
|
|
1815
|
+
for (let e of t) i(e);
|
|
1797
1816
|
return;
|
|
1798
1817
|
}
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
for (let t of n) e.style.removeProperty(t);
|
|
1802
|
-
n.clear();
|
|
1818
|
+
if (r && r.size > 0) {
|
|
1819
|
+
for (let e of [...r.keys()]) i(e);
|
|
1803
1820
|
return;
|
|
1804
1821
|
}
|
|
1805
|
-
e.style.removeProperty("transform"), e.style.removeProperty("opacity");
|
|
1806
|
-
},
|
|
1807
|
-
if (!
|
|
1808
|
-
let
|
|
1809
|
-
if (
|
|
1810
|
-
let
|
|
1811
|
-
if (
|
|
1812
|
-
|
|
1813
|
-
for (let e of i)
|
|
1822
|
+
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1823
|
+
}, K = (e, t, n = {}, r) => {
|
|
1824
|
+
if (!Mt(e)) return Promise.resolve();
|
|
1825
|
+
let i = e, a = V(t);
|
|
1826
|
+
if (a.length === 0) return Promise.resolve();
|
|
1827
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = $e(n.ease);
|
|
1828
|
+
if (o <= 0 && s <= 0) {
|
|
1829
|
+
St.takeover(i, r), i.style.transition = "none", Ft.set(i, r);
|
|
1830
|
+
for (let e of a) W(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1814
1831
|
return Promise.resolve();
|
|
1815
1832
|
}
|
|
1816
|
-
let
|
|
1817
|
-
durationMs:
|
|
1818
|
-
delayMs:
|
|
1819
|
-
easing:
|
|
1833
|
+
let l = jt.playerAllowed() ? St.settle(i, a, {
|
|
1834
|
+
durationMs: o * 1e3,
|
|
1835
|
+
delayMs: s * 1e3,
|
|
1836
|
+
easing: c
|
|
1820
1837
|
}, (e) => {
|
|
1821
|
-
r.style.setProperty(e.property, e.value)
|
|
1822
|
-
}) : null;
|
|
1823
|
-
if (
|
|
1824
|
-
let
|
|
1825
|
-
|
|
1826
|
-
for (let e of i)
|
|
1838
|
+
W(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1839
|
+
}, r) : null;
|
|
1840
|
+
if (l) return l;
|
|
1841
|
+
let u = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1842
|
+
i.style.transition = u, Ft.set(i, r), i.offsetWidth;
|
|
1843
|
+
for (let e of a) W(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1827
1844
|
return new Promise((e) => {
|
|
1828
1845
|
let t = !1, n = () => {
|
|
1829
|
-
t || (t = !0,
|
|
1830
|
-
},
|
|
1831
|
-
e.target ===
|
|
1846
|
+
t || (t = !0, i.removeEventListener("transitionend", r), e());
|
|
1847
|
+
}, r = (e) => {
|
|
1848
|
+
e.target === i && n();
|
|
1832
1849
|
};
|
|
1833
|
-
|
|
1850
|
+
i.addEventListener("transitionend", r), setTimeout(n, (o + s) * 1e3 + 60);
|
|
1834
1851
|
});
|
|
1835
|
-
},
|
|
1836
|
-
|
|
1852
|
+
}, It = (e) => {
|
|
1853
|
+
if (typeof e.querySelectorAll == "function") {
|
|
1854
|
+
e.tagName === "IMG" && !e.hasAttribute("decoding") && e.setAttribute("decoding", "async");
|
|
1855
|
+
for (let t of Array.from(e.querySelectorAll("img:not([decoding])"))) t.setAttribute("decoding", "async");
|
|
1856
|
+
}
|
|
1857
|
+
}, Lt = "data-flemo-held-arrival";
|
|
1858
|
+
function Rt(e) {
|
|
1837
1859
|
if (typeof MutationObserver > "u") return () => {};
|
|
1838
1860
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
1839
1861
|
let n = t instanceof Element ? t : t.parentElement;
|
|
1840
|
-
return !n || n === e || n.closest(`[data-flemo-part-name], [${
|
|
1862
|
+
return !n || n === e || n.closest(`[data-flemo-part-name], [${Lt}]`) !== null;
|
|
1841
1863
|
}, 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), {
|
|
1842
1864
|
glass: t,
|
|
1843
1865
|
latest: n,
|
|
@@ -1867,12 +1889,12 @@ function kt(e) {
|
|
|
1867
1889
|
if (i.type === "childList") {
|
|
1868
1890
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
1869
1891
|
if (e instanceof Element && t.delete(e)) {
|
|
1870
|
-
e.removeAttribute(
|
|
1892
|
+
e.removeAttribute(Lt);
|
|
1871
1893
|
continue;
|
|
1872
1894
|
}
|
|
1873
1895
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
1874
1896
|
}
|
|
1875
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
1897
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(Lt, ""), t.add(e), l(i.target).added.push(e));
|
|
1876
1898
|
}
|
|
1877
1899
|
}
|
|
1878
1900
|
for (let [e, t] of u) {
|
|
@@ -1907,7 +1929,7 @@ function kt(e) {
|
|
|
1907
1929
|
c.disconnect();
|
|
1908
1930
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
1909
1931
|
n.clear();
|
|
1910
|
-
for (let e of t) e.removeAttribute(
|
|
1932
|
+
for (let e of t) e instanceof HTMLElement && It(e), e.removeAttribute(Lt);
|
|
1911
1933
|
t.clear();
|
|
1912
1934
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
1913
1935
|
i.clear();
|
|
@@ -1917,34 +1939,87 @@ function kt(e) {
|
|
|
1917
1939
|
}
|
|
1918
1940
|
//#endregion
|
|
1919
1941
|
//#region src/core/engine/compositorWarmUp.ts
|
|
1920
|
-
var
|
|
1942
|
+
var zt = "data-flemo-warm", Bt = 3e3, Vt = [{ transform: "translate3d(0, 0, 0)" }, { transform: "translate3d(1px, 0, 0)" }], Ht = {
|
|
1921
1943
|
duration: 500,
|
|
1922
1944
|
iterations: Infinity,
|
|
1923
1945
|
direction: "alternate",
|
|
1924
1946
|
easing: "linear"
|
|
1925
|
-
},
|
|
1926
|
-
|
|
1947
|
+
}, Ut = "position:fixed;top:0;left:0;width:1px;height:1px;pointer-events:none;opacity:0.02;background:#888;will-change:transform;", q = null, Wt = null, Gt = 0, Kt = () => {
|
|
1948
|
+
Gt = 0, Wt?.cancel(), Wt = null, q?.remove(), q = null;
|
|
1927
1949
|
};
|
|
1928
|
-
function
|
|
1950
|
+
function qt() {
|
|
1929
1951
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
1930
|
-
if (
|
|
1931
|
-
|
|
1952
|
+
if (Gt += 1, !q) {
|
|
1953
|
+
q = document.createElement("div"), q.setAttribute(zt, ""), q.setAttribute("aria-hidden", "true"), q.setAttribute("style", Ut), document.body.appendChild(q);
|
|
1932
1954
|
try {
|
|
1933
|
-
|
|
1955
|
+
Wt = q.animate(Vt, Ht);
|
|
1934
1956
|
} catch {
|
|
1935
|
-
|
|
1957
|
+
Wt = null;
|
|
1936
1958
|
}
|
|
1937
1959
|
}
|
|
1938
1960
|
let e = !1, t = setTimeout(() => {
|
|
1939
|
-
e || (e = !0, --
|
|
1940
|
-
},
|
|
1961
|
+
e || (e = !0, --Gt, Gt <= 0 && Kt());
|
|
1962
|
+
}, Bt);
|
|
1941
1963
|
return () => {
|
|
1942
|
-
e || (e = !0, clearTimeout(t), --
|
|
1964
|
+
e || (e = !0, clearTimeout(t), --Gt, Gt <= 0 && Kt());
|
|
1965
|
+
};
|
|
1966
|
+
}
|
|
1967
|
+
//#endregion
|
|
1968
|
+
//#region src/core/engine/emulationNotice.ts
|
|
1969
|
+
var Jt = () => {
|
|
1970
|
+
if (typeof navigator > "u") return !1;
|
|
1971
|
+
let e = navigator.platform ?? "";
|
|
1972
|
+
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
1973
|
+
}, Yt = !1, Xt = () => {
|
|
1974
|
+
Yt || !U() || !Jt() || (Yt = !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."));
|
|
1975
|
+
}, Zt = () => {}, Qt = .004, $t = (e, t) => {
|
|
1976
|
+
let n = e.ownerDocument?.defaultView;
|
|
1977
|
+
if (!n) return !1;
|
|
1978
|
+
let r = e;
|
|
1979
|
+
for (; r;) {
|
|
1980
|
+
if (Number(n.getComputedStyle(r).opacity) <= Qt) return !0;
|
|
1981
|
+
if (r === t) break;
|
|
1982
|
+
r = r.parentElement;
|
|
1983
|
+
}
|
|
1984
|
+
return !1;
|
|
1985
|
+
};
|
|
1986
|
+
function en(e) {
|
|
1987
|
+
if (typeof e.getAnimations != "function") return Zt;
|
|
1988
|
+
let t = /* @__PURE__ */ new Set(), n = () => {
|
|
1989
|
+
for (let n of e.getAnimations({ subtree: !0 })) {
|
|
1990
|
+
if (t.size >= 128) return;
|
|
1991
|
+
if (t.has(n) || (n.animationName ?? "").startsWith("flemo-") || n.playState !== "running") continue;
|
|
1992
|
+
let r = n.effect?.target;
|
|
1993
|
+
if (r instanceof Element && $t(r, e)) try {
|
|
1994
|
+
n.pause(), t.add(n);
|
|
1995
|
+
} catch {}
|
|
1996
|
+
}
|
|
1997
|
+
}, r = null, i = () => {
|
|
1998
|
+
if (typeof requestAnimationFrame != "function") {
|
|
1999
|
+
n();
|
|
2000
|
+
return;
|
|
2001
|
+
}
|
|
2002
|
+
r === null && (r = requestAnimationFrame(() => {
|
|
2003
|
+
r = null, n();
|
|
2004
|
+
}));
|
|
2005
|
+
};
|
|
2006
|
+
i();
|
|
2007
|
+
let a = typeof MutationObserver == "function" ? new MutationObserver(i) : null;
|
|
2008
|
+
return a?.observe(e, {
|
|
2009
|
+
subtree: !0,
|
|
2010
|
+
childList: !0,
|
|
2011
|
+
attributes: !0
|
|
2012
|
+
}), () => {
|
|
2013
|
+
a?.disconnect(), r !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(r), r = null);
|
|
2014
|
+
for (let e of t) try {
|
|
2015
|
+
e.play();
|
|
2016
|
+
} catch {}
|
|
2017
|
+
t.clear();
|
|
1943
2018
|
};
|
|
1944
2019
|
}
|
|
1945
2020
|
//#endregion
|
|
1946
2021
|
//#region src/transition/cubicBezier.ts
|
|
1947
|
-
var
|
|
2022
|
+
var tn = (e, t, n, r) => {
|
|
1948
2023
|
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;
|
|
1949
2024
|
return (e) => {
|
|
1950
2025
|
if (e <= 0) return 0;
|
|
@@ -1956,7 +2031,7 @@ var Rt = (e, t, n, r) => {
|
|
|
1956
2031
|
}
|
|
1957
2032
|
return a((t + n) / 2);
|
|
1958
2033
|
};
|
|
1959
|
-
},
|
|
2034
|
+
}, nn = (e) => e, rn = {
|
|
1960
2035
|
ease: [
|
|
1961
2036
|
.25,
|
|
1962
2037
|
.1,
|
|
@@ -2011,20 +2086,20 @@ var Rt = (e, t, n, r) => {
|
|
|
2011
2086
|
.66,
|
|
2012
2087
|
-.56
|
|
2013
2088
|
]
|
|
2014
|
-
},
|
|
2089
|
+
}, an = (e) => {
|
|
2015
2090
|
if (Array.isArray(e)) {
|
|
2016
2091
|
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2017
2092
|
let [t, n, r, i] = e;
|
|
2018
|
-
return
|
|
2093
|
+
return tn(t, n, r, i);
|
|
2019
2094
|
}
|
|
2020
|
-
return
|
|
2095
|
+
return nn;
|
|
2021
2096
|
}
|
|
2022
|
-
return typeof e == "string" ? e === "linear" ?
|
|
2023
|
-
},
|
|
2097
|
+
return typeof e == "string" ? e === "linear" ? nn : tn(...rn[e] ?? rn.ease) : tn(...rn.ease);
|
|
2098
|
+
}, on = 1 / 255, sn = 400, cn = 24, ln = /* @__PURE__ */ new Set([
|
|
2024
2099
|
"x",
|
|
2025
2100
|
"y",
|
|
2026
2101
|
"opacity"
|
|
2027
|
-
]),
|
|
2102
|
+
]), un = (e, t, n) => {
|
|
2028
2103
|
if (!e || typeof e != "object") return;
|
|
2029
2104
|
let r = e[t];
|
|
2030
2105
|
if (r === void 0) return;
|
|
@@ -2042,31 +2117,175 @@ var Rt = (e, t, n, r) => {
|
|
|
2042
2117
|
return Number.isNaN(e) ? null : e;
|
|
2043
2118
|
}
|
|
2044
2119
|
return null;
|
|
2045
|
-
},
|
|
2120
|
+
}, dn = (e, t, n) => {
|
|
2046
2121
|
let r = /* @__PURE__ */ new Set();
|
|
2047
2122
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2048
2123
|
if (r.size === 0) return null;
|
|
2049
2124
|
let i = Infinity;
|
|
2050
2125
|
for (let a of r) {
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
if (
|
|
2054
|
-
let s =
|
|
2055
|
-
if (s === 0)
|
|
2056
|
-
let
|
|
2057
|
-
|
|
2126
|
+
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;
|
|
2127
|
+
if (r !== void 0 && r === o) continue;
|
|
2128
|
+
if (!ln.has(a)) return null;
|
|
2129
|
+
let s = un(e.from, a, t), c = un(e.to, a, t);
|
|
2130
|
+
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2131
|
+
let l = Math.abs(c - s);
|
|
2132
|
+
if (l === 0) continue;
|
|
2133
|
+
let u = a === "opacity" ? on : 1 / Math.max(1, n);
|
|
2134
|
+
i = Math.min(i, u / l);
|
|
2058
2135
|
}
|
|
2059
2136
|
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2060
|
-
},
|
|
2137
|
+
}, J = (e, t, n) => {
|
|
2061
2138
|
if (e.duration <= 0) return null;
|
|
2062
|
-
let r =
|
|
2139
|
+
let r = dn(e, t, n);
|
|
2063
2140
|
if (r === null) return null;
|
|
2064
|
-
let i =
|
|
2065
|
-
for (let e =
|
|
2141
|
+
let i = an(e.ease), a = sn;
|
|
2142
|
+
for (let e = sn; e >= 0 && !(Math.abs(1 - i(e / sn)) > r); --e) a = e;
|
|
2066
2143
|
if (a === 0) return null;
|
|
2067
|
-
let o = (e.delay + e.duration * (a /
|
|
2068
|
-
return (e.delay + e.duration) * 1e3 - o <
|
|
2069
|
-
},
|
|
2144
|
+
let o = (e.delay + e.duration * (a / sn)) * 1e3;
|
|
2145
|
+
return (e.delay + e.duration) * 1e3 - o < cn ? null : o;
|
|
2146
|
+
}, fn = 1e3 / 120, pn = 4, Y = 400, mn = 4, hn = (e) => {
|
|
2147
|
+
let t = +e.toFixed(5);
|
|
2148
|
+
return Object.is(t, -0) ? 0 : t;
|
|
2149
|
+
}, gn = (e, t, n) => {
|
|
2150
|
+
if (e.duration <= 0) return null;
|
|
2151
|
+
let r = Number.isFinite(n) && n > 0 ? n : 1, i = /* @__PURE__ */ new Set();
|
|
2152
|
+
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) i.add(e);
|
|
2153
|
+
let a = 0;
|
|
2154
|
+
for (let n of i) {
|
|
2155
|
+
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;
|
|
2156
|
+
if (i !== void 0 && i === o) continue;
|
|
2157
|
+
if (n !== "x" && n !== "y") return null;
|
|
2158
|
+
let s = un(e.from, n, t), c = un(e.to, n, t);
|
|
2159
|
+
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2160
|
+
a = Math.max(a, Math.abs(c - s) * r);
|
|
2161
|
+
}
|
|
2162
|
+
if (a < pn) return null;
|
|
2163
|
+
let o = an(e.ease), s = Array(401);
|
|
2164
|
+
for (let e = 0; e <= Y; e += 1) s[e] = o(e / Y);
|
|
2165
|
+
let c = e.duration * 1e3 / Y, l = 40 / a * c / fn, u = Y, d = 0;
|
|
2166
|
+
for (let e = 399; e >= 0 && (d = Math.max(d, Math.abs(s[e + 1] - s[e])), !(d > l)); --e) u = e;
|
|
2167
|
+
for (let e = u; e < Y; e += 1) if (s[e + 1] < s[e] || s[e] > 1) return null;
|
|
2168
|
+
let f = (1 - s[u]) * a;
|
|
2169
|
+
if (f <= 1) return null;
|
|
2170
|
+
let p = Math.min(480, Math.floor(f)), m = u, h = (e) => {
|
|
2171
|
+
let t = 1 - e / a;
|
|
2172
|
+
for (; m < Y && s[m] < t;) m += 1;
|
|
2173
|
+
if (m === 0) return 0;
|
|
2174
|
+
let n = s[m - 1], r = s[m], i = r === n ? 1 : Math.max(0, Math.min(1, (t - n) / (r - n)));
|
|
2175
|
+
return (m - 1 + i) / Y * 100;
|
|
2176
|
+
}, g = h(p), _ = [];
|
|
2177
|
+
for (let e = 0; 100 / Y * e < g; e += mn) _.push(`${hn(s[e])} ${hn(e / Y * 100)}%`);
|
|
2178
|
+
let v = g;
|
|
2179
|
+
for (let e = p; e >= 2; --e) {
|
|
2180
|
+
let t = h(e - 1);
|
|
2181
|
+
if (t > v) {
|
|
2182
|
+
let n = hn(1 - e / a);
|
|
2183
|
+
_.push(`${n} ${hn(v)}%`, `${n} ${hn(t)}%`);
|
|
2184
|
+
}
|
|
2185
|
+
v = t;
|
|
2186
|
+
}
|
|
2187
|
+
return _.push(`1 ${hn(v)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2188
|
+
};
|
|
2189
|
+
(() => {
|
|
2190
|
+
try {
|
|
2191
|
+
if (typeof location > "u" || typeof sessionStorage > "u") return;
|
|
2192
|
+
/[?&]flemo-layers=resident\b/.test(location.search) ? sessionStorage.setItem("flemo:layers", "resident") : /[?&]flemo-layers=off\b/.test(location.search) && sessionStorage.removeItem("flemo:layers");
|
|
2193
|
+
} catch {}
|
|
2194
|
+
})();
|
|
2195
|
+
var _n, vn = () => {
|
|
2196
|
+
if (_n !== void 0) return _n;
|
|
2197
|
+
try {
|
|
2198
|
+
_n = typeof sessionStorage < "u" && sessionStorage.getItem("flemo:layers") === "resident";
|
|
2199
|
+
} catch {
|
|
2200
|
+
_n = !1;
|
|
2201
|
+
}
|
|
2202
|
+
return _n;
|
|
2203
|
+
}, yn = /* @__PURE__ */ new WeakMap(), bn = Symbol("flemo-layer-owner"), xn = (e, t) => {
|
|
2204
|
+
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2205
|
+
}, Sn = (e, t) => {
|
|
2206
|
+
let n = e.trim() === "none" ? "" : e.trim();
|
|
2207
|
+
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2208
|
+
}, Cn = (e, t) => {
|
|
2209
|
+
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2210
|
+
for (let e of t.willChange.split(",")) {
|
|
2211
|
+
let t = e.trim();
|
|
2212
|
+
t && t !== "auto" && n.add(t);
|
|
2213
|
+
}
|
|
2214
|
+
for (let e of t.owners.values()) {
|
|
2215
|
+
for (let t of e.properties) n.add(t);
|
|
2216
|
+
e.containment && (r = !0);
|
|
2217
|
+
}
|
|
2218
|
+
e.style.willChange = [...n].join(", ");
|
|
2219
|
+
let i = Sn(t.contain, r);
|
|
2220
|
+
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2221
|
+
}, wn = (e, t, n = !1, r = bn) => {
|
|
2222
|
+
let i = Ze(t), a = yn.get(e);
|
|
2223
|
+
if (i.length === 0) {
|
|
2224
|
+
if (!a) return;
|
|
2225
|
+
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), xn(e, a), yn.delete(e)) : Cn(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), xn(e, a), yn.delete(e));
|
|
2226
|
+
return;
|
|
2227
|
+
}
|
|
2228
|
+
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
2229
|
+
owners: /* @__PURE__ */ new Map(),
|
|
2230
|
+
settleOwner: null,
|
|
2231
|
+
willChange: e.style.willChange,
|
|
2232
|
+
contain: e.style.contain,
|
|
2233
|
+
pending: null
|
|
2234
|
+
}, yn.set(e, a)), a.owners.set(r, {
|
|
2235
|
+
properties: i,
|
|
2236
|
+
containment: n
|
|
2237
|
+
}), a.settleOwner = null, Cn(e, a);
|
|
2238
|
+
}, X = (e, t = bn) => {
|
|
2239
|
+
let n = yn.get(e);
|
|
2240
|
+
if (!(!n || !n.owners.has(t))) {
|
|
2241
|
+
if (n.owners.delete(t), n.owners.size > 0) {
|
|
2242
|
+
Cn(e, n);
|
|
2243
|
+
return;
|
|
2244
|
+
}
|
|
2245
|
+
if (vn() && typeof e.closest == "function" && e.closest("[data-flemo-screen]")) {
|
|
2246
|
+
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");
|
|
2247
|
+
return;
|
|
2248
|
+
}
|
|
2249
|
+
/* v8 ignore next 5 -- setTimeout exists in every runtime under test; the
|
|
2250
|
+
guard shields exotic embedders, where an immediate demotion is simply
|
|
2251
|
+
the pre-hold behavior. */
|
|
2252
|
+
if (n.settleOwner = t, n.pending != null && clearTimeout(n.pending), typeof setTimeout != "function") {
|
|
2253
|
+
xn(e, n), yn.delete(e);
|
|
2254
|
+
return;
|
|
2255
|
+
}
|
|
2256
|
+
n.pending = setTimeout(() => {
|
|
2257
|
+
xn(e, n), yn.delete(e);
|
|
2258
|
+
}, 300);
|
|
2259
|
+
}
|
|
2260
|
+
}, Tn = !1, En = 0, Dn = [], On = () => {
|
|
2261
|
+
let e = Dn;
|
|
2262
|
+
Dn = [];
|
|
2263
|
+
for (let t of e) t();
|
|
2264
|
+
}, kn = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), An = () => {
|
|
2265
|
+
if (Tn || typeof window > "u" || typeof window.fetch != "function") return;
|
|
2266
|
+
Tn = !0;
|
|
2267
|
+
let e = window.fetch.bind(window);
|
|
2268
|
+
window.fetch = (...t) => e(...t).then((e) => En <= 0 || kn(e) ? e : new Promise((t) => {
|
|
2269
|
+
Dn.push(() => t(e));
|
|
2270
|
+
}), (e) => {
|
|
2271
|
+
if (En <= 0) throw e;
|
|
2272
|
+
return new Promise((t, n) => {
|
|
2273
|
+
Dn.push(() => n(e));
|
|
2274
|
+
});
|
|
2275
|
+
});
|
|
2276
|
+
}, jn = 2e3;
|
|
2277
|
+
function Mn(e = jn) {
|
|
2278
|
+
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
2279
|
+
if (An(), !Tn) return () => {};
|
|
2280
|
+
En += 1;
|
|
2281
|
+
let t = !1, n = null, r = () => {
|
|
2282
|
+
t || (t = !0, n !== null && clearTimeout(n), En = Math.max(0, En - 1), En === 0 && On());
|
|
2283
|
+
};
|
|
2284
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(jn, e))), r;
|
|
2285
|
+
}
|
|
2286
|
+
//#endregion
|
|
2287
|
+
//#region src/core/engine/transitionPlayer.ts
|
|
2288
|
+
var Nn = [
|
|
2070
2289
|
"x",
|
|
2071
2290
|
"y",
|
|
2072
2291
|
"z",
|
|
@@ -2077,7 +2296,7 @@ var Rt = (e, t, n, r) => {
|
|
|
2077
2296
|
"rotateX",
|
|
2078
2297
|
"rotateY",
|
|
2079
2298
|
"rotateZ"
|
|
2080
|
-
],
|
|
2299
|
+
], Pn = new Set(Nn), Fn = {
|
|
2081
2300
|
x: 0,
|
|
2082
2301
|
y: 0,
|
|
2083
2302
|
z: 0,
|
|
@@ -2088,7 +2307,7 @@ var Rt = (e, t, n, r) => {
|
|
|
2088
2307
|
rotateX: 0,
|
|
2089
2308
|
rotateY: 0,
|
|
2090
2309
|
rotateZ: 0
|
|
2091
|
-
},
|
|
2310
|
+
}, In = (e, t) => {
|
|
2092
2311
|
if (typeof t == "number") return {
|
|
2093
2312
|
value: t,
|
|
2094
2313
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -2097,7 +2316,7 @@ var Rt = (e, t, n, r) => {
|
|
|
2097
2316
|
let n = t.trim(), r = /^(-?\d*\.?\d+)(px|%|deg)?$/.exec(n);
|
|
2098
2317
|
if (!r) return null;
|
|
2099
2318
|
let i = parseFloat(r[1]), a = r[2] ?? "";
|
|
2100
|
-
return e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? a !== "deg" &&
|
|
2319
|
+
return e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? a !== "deg" && (a !== "" || i !== 0) ? null : {
|
|
2101
2320
|
value: i,
|
|
2102
2321
|
unit: ""
|
|
2103
2322
|
} : e === "scale" || e === "scaleX" || e === "scaleY" ? a === "" ? {
|
|
@@ -2107,145 +2326,229 @@ var Rt = (e, t, n, r) => {
|
|
|
2107
2326
|
value: i,
|
|
2108
2327
|
unit: a === "" && i === 0 ? "px" : a
|
|
2109
2328
|
};
|
|
2110
|
-
},
|
|
2111
|
-
let n = e.match(
|
|
2112
|
-
if (n.length !== r.length || e.replace(
|
|
2329
|
+
}, Ln = /-?\d*\.?\d+/g, Rn = (e, t) => {
|
|
2330
|
+
let n = e.match(Ln) ?? [], r = t.match(Ln) ?? [];
|
|
2331
|
+
if (n.length !== r.length || e.replace(Ln, " ") !== t.replace(Ln, " ")) return null;
|
|
2113
2332
|
let i = n.map(Number), a = r.map(Number);
|
|
2114
2333
|
return (t) => {
|
|
2115
2334
|
let n = 0;
|
|
2116
|
-
return e.replace(
|
|
2335
|
+
return e.replace(Ln, () => {
|
|
2117
2336
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
2118
2337
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
2119
2338
|
});
|
|
2120
2339
|
};
|
|
2121
|
-
},
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2340
|
+
}, zn = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Bn = (e) => typeof e == "object" && !!e && !Array.isArray(e), Vn = (e) => Bn(e) ? Object.keys(e) : [], Hn = (e, t) => Bn(e) ? e[t] : void 0, Un = {
|
|
2341
|
+
x: 0,
|
|
2342
|
+
y: 0,
|
|
2343
|
+
z: 0,
|
|
2344
|
+
scale: 1,
|
|
2345
|
+
scaleX: 1,
|
|
2346
|
+
scaleY: 1,
|
|
2347
|
+
rotate: 2,
|
|
2348
|
+
rotateX: 2,
|
|
2349
|
+
rotateY: 2,
|
|
2350
|
+
rotateZ: 2
|
|
2351
|
+
}, Wn = (e) => {
|
|
2352
|
+
let t = 0, n = -1;
|
|
2353
|
+
for (let r of e) {
|
|
2354
|
+
if (!Pn.has(r)) continue;
|
|
2355
|
+
let e = Un[r];
|
|
2356
|
+
if (e < t) return !1;
|
|
2357
|
+
if (t = e, e === 2) {
|
|
2358
|
+
let e = Nn.indexOf(r);
|
|
2359
|
+
if (e < n) return !1;
|
|
2360
|
+
n = e;
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
return !0;
|
|
2364
|
+
}, Gn = (e) => {
|
|
2365
|
+
let t = [];
|
|
2366
|
+
for (let n of e) {
|
|
2367
|
+
if (!Pn.has(n)) continue;
|
|
2368
|
+
let e = Un[n] === 0 ? "T" : n;
|
|
2369
|
+
(e !== "T" || t[t.length - 1] !== "T") && t.push(e);
|
|
2370
|
+
}
|
|
2371
|
+
return t;
|
|
2372
|
+
}, Kn = (e, t) => {
|
|
2373
|
+
let n = Gn(e), r = Gn(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
2374
|
+
return i.every((e, t) => a[t] === e);
|
|
2375
|
+
}, qn = (e, t) => {
|
|
2376
|
+
let n = Vn(e.from), r = Vn(e.to);
|
|
2377
|
+
if (!Wn(n) || !Wn(r) || !Kn(n, r)) return null;
|
|
2378
|
+
let i = /* @__PURE__ */ new Set([...n, ...r]), a = [], o = null, s = [], c = [];
|
|
2379
|
+
for (let n of i) {
|
|
2380
|
+
let r = Hn(e.from, n), i = Hn(e.to, n);
|
|
2381
|
+
if (Pn.has(n)) {
|
|
2382
|
+
let e = n, o = {
|
|
2383
|
+
value: Fn[e],
|
|
2128
2384
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
2129
|
-
},
|
|
2130
|
-
if (!
|
|
2131
|
-
let l =
|
|
2132
|
-
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100),
|
|
2385
|
+
}, s = r === void 0 ? o : In(e, r), c = i === void 0 ? o : In(e, i);
|
|
2386
|
+
if (!s || !c || s.unit !== c.unit && s.value !== 0 && c.value !== 0) return null;
|
|
2387
|
+
let l = s.value === 0 && s.unit !== c.unit ? c.unit : s.unit, u = l === "%", d = 0;
|
|
2388
|
+
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), a.push({
|
|
2133
2389
|
prop: e,
|
|
2134
2390
|
from: {
|
|
2135
|
-
value:
|
|
2391
|
+
value: s.value,
|
|
2136
2392
|
unit: l
|
|
2137
2393
|
},
|
|
2138
2394
|
to: {
|
|
2139
|
-
value:
|
|
2395
|
+
value: c.value,
|
|
2140
2396
|
unit: l
|
|
2141
2397
|
},
|
|
2142
2398
|
percentBase: d
|
|
2143
2399
|
});
|
|
2144
2400
|
continue;
|
|
2145
2401
|
}
|
|
2146
|
-
if (
|
|
2147
|
-
let e =
|
|
2402
|
+
if (n === "opacity") {
|
|
2403
|
+
let e = r === void 0 ? 1 : r, t = i === void 0 ? 1 : i;
|
|
2148
2404
|
if (typeof e != "number" || typeof t != "number") return null;
|
|
2149
|
-
|
|
2405
|
+
o = {
|
|
2150
2406
|
from: e,
|
|
2151
2407
|
to: t
|
|
2152
2408
|
};
|
|
2153
2409
|
continue;
|
|
2154
2410
|
}
|
|
2155
|
-
if (
|
|
2156
|
-
let l = typeof
|
|
2411
|
+
if (r === void 0 || i === void 0) return null;
|
|
2412
|
+
let l = typeof r == "number" ? `${r}` : r, u = typeof i == "number" ? `${i}` : i;
|
|
2157
2413
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
2158
2414
|
if (l === u) {
|
|
2159
|
-
|
|
2160
|
-
property:
|
|
2415
|
+
c.push({
|
|
2416
|
+
property: zn(n),
|
|
2161
2417
|
value: l
|
|
2162
2418
|
});
|
|
2163
2419
|
continue;
|
|
2164
2420
|
}
|
|
2165
|
-
let d =
|
|
2421
|
+
let d = Rn(l, u);
|
|
2166
2422
|
if (!d) return null;
|
|
2167
|
-
|
|
2168
|
-
property:
|
|
2423
|
+
s.push({
|
|
2424
|
+
property: zn(n),
|
|
2169
2425
|
mix: d
|
|
2170
2426
|
});
|
|
2171
2427
|
}
|
|
2172
2428
|
return {
|
|
2173
|
-
transforms:
|
|
2174
|
-
opacity:
|
|
2175
|
-
strings:
|
|
2176
|
-
constants:
|
|
2429
|
+
transforms: a,
|
|
2430
|
+
opacity: o,
|
|
2431
|
+
strings: s,
|
|
2432
|
+
constants: c
|
|
2177
2433
|
};
|
|
2178
|
-
},
|
|
2179
|
-
if (
|
|
2434
|
+
}, Jn = 1, Yn, Xn = () => {
|
|
2435
|
+
if (Yn !== void 0) return Yn;
|
|
2180
2436
|
try {
|
|
2181
2437
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:apply") : null;
|
|
2182
|
-
|
|
2438
|
+
Yn = e === "scrub" ? e : null;
|
|
2439
|
+
} catch {
|
|
2440
|
+
Yn = null;
|
|
2441
|
+
}
|
|
2442
|
+
return Yn;
|
|
2443
|
+
}, Zn, Qn = () => {
|
|
2444
|
+
if (Zn !== void 0) return Zn;
|
|
2445
|
+
try {
|
|
2446
|
+
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:handoff") : null;
|
|
2447
|
+
Zn = e === "on" ? e : null;
|
|
2183
2448
|
} catch {
|
|
2184
|
-
|
|
2449
|
+
Zn = null;
|
|
2185
2450
|
}
|
|
2186
|
-
return
|
|
2187
|
-
},
|
|
2188
|
-
if (
|
|
2451
|
+
return Zn;
|
|
2452
|
+
}, $n, er = () => {
|
|
2453
|
+
if ($n !== void 0) return $n;
|
|
2189
2454
|
try {
|
|
2190
2455
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:snap") : null;
|
|
2191
|
-
|
|
2456
|
+
$n = e === "always" || e === "off" || e === "gate" ? e : null;
|
|
2192
2457
|
} catch {
|
|
2193
|
-
|
|
2458
|
+
$n = null;
|
|
2194
2459
|
}
|
|
2195
|
-
return
|
|
2196
|
-
},
|
|
2460
|
+
return $n;
|
|
2461
|
+
}, tr = (e) => !U() && e > 0 && e < 3, nr = (e, t, n, r) => {
|
|
2197
2462
|
let i = 0, a = 0, o = !1, s = [], c = !0;
|
|
2198
|
-
for (let l of
|
|
2463
|
+
for (let l of Nn) {
|
|
2199
2464
|
let u = e.find((e) => e.prop === l);
|
|
2200
2465
|
if (!u) continue;
|
|
2201
2466
|
let d = u.from.value + (u.to.value - u.from.value) * t;
|
|
2202
2467
|
if (u.from.unit === "%" && (d *= u.percentBase), l === "x" || l === "y") {
|
|
2203
|
-
let e = l === "x" ? r.x : r.y, t =
|
|
2468
|
+
let e = l === "x" ? r.x : r.y, t = er(), s = (t === "always" || t === null && tr(n) || t !== "off" && (e === null || Math.abs(d - e) * n >= Jn)) && n > 0 ? Math.round(d * n) / n : Math.round(d * 1e3) / 1e3;
|
|
2204
2469
|
l === "x" ? (r.x = d, i = s) : (r.y = d, a = s), o = !0, s !== 0 && (c = !1);
|
|
2205
2470
|
continue;
|
|
2206
2471
|
}
|
|
2207
|
-
let f =
|
|
2472
|
+
let f = Fn[l];
|
|
2208
2473
|
d !== f && (c = !1), l === "z" ? s.push(`translateZ(${d}px)`) : l === "scale" ? s.push(`scale(${d})`) : l === "scaleX" ? s.push(`scaleX(${d})`) : l === "scaleY" ? s.push(`scaleY(${d})`) : l === "rotate" || l === "rotateZ" ? s.push(`rotate(${d}deg)`) : l === "rotateX" ? s.push(`rotateX(${d}deg)`) : l === "rotateY" && s.push(`rotateY(${d}deg)`);
|
|
2209
2474
|
}
|
|
2210
2475
|
return !o && s.length === 0 ? "" : c ? "none" : [...o ? [`translate3d(${i}px, ${a}px, 0)`] : [], ...s].join(" ");
|
|
2211
|
-
},
|
|
2476
|
+
}, rr = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), ir = (e) => {
|
|
2212
2477
|
let t = {};
|
|
2213
|
-
for (let n of V(e)) t[
|
|
2478
|
+
for (let n of V(e)) t[rr(n.property)] = n.value;
|
|
2214
2479
|
return t;
|
|
2215
|
-
},
|
|
2480
|
+
}, ar = (e, t) => {
|
|
2216
2481
|
if (typeof e.animate != "function") return null;
|
|
2217
2482
|
try {
|
|
2218
|
-
let n = e.animate([
|
|
2483
|
+
let n = e.animate([ir(t.from), ir(t.to)], {
|
|
2219
2484
|
duration: Math.max(0, t.duration * 1e3),
|
|
2220
2485
|
delay: Math.max(0, t.delay * 1e3),
|
|
2221
|
-
easing:
|
|
2486
|
+
easing: $e(t.ease),
|
|
2222
2487
|
fill: "both"
|
|
2223
2488
|
});
|
|
2224
2489
|
return n.pause(), n.currentTime = 0, n;
|
|
2225
2490
|
} catch {
|
|
2226
2491
|
return null;
|
|
2227
2492
|
}
|
|
2228
|
-
},
|
|
2493
|
+
}, or = 1e3 / 60, sr = 1.6, cr = 1e3 / 240, lr = 28, ur = 42, dr = or, fr = 6 * or, pr = 41, mr = (e) => Math.round(e * 1e4) / 1e4, hr = (e, t) => {
|
|
2494
|
+
let n = 0, r = 0, i = !1, a = [], o = !0;
|
|
2495
|
+
for (let s of Nn) {
|
|
2496
|
+
let c = e.find((e) => e.prop === s);
|
|
2497
|
+
if (!c) continue;
|
|
2498
|
+
let l = c.from.value + (c.to.value - c.from.value) * t;
|
|
2499
|
+
if (c.from.unit === "%" && (l *= c.percentBase), l = mr(l), s === "x" || s === "y") {
|
|
2500
|
+
s === "x" ? n = l : r = l, i = !0, l !== 0 && (o = !1);
|
|
2501
|
+
continue;
|
|
2502
|
+
}
|
|
2503
|
+
l !== Fn[s] && (o = !1), s === "z" ? a.push(`translateZ(${l}px)`) : s === "scale" ? a.push(`scale(${l})`) : s === "scaleX" ? a.push(`scaleX(${l})`) : s === "scaleY" ? a.push(`scaleY(${l})`) : s === "rotate" || s === "rotateZ" ? a.push(`rotate(${l}deg)`) : s === "rotateX" ? a.push(`rotateX(${l}deg)`) : s === "rotateY" && a.push(`rotateY(${l}deg)`);
|
|
2504
|
+
}
|
|
2505
|
+
return !i && a.length === 0 ? "" : o ? "none" : [...i ? [`translate3d(${n}px, ${r}px, 0)`] : [], ...a].join(" ");
|
|
2506
|
+
}, gr = (e, t, n) => {
|
|
2507
|
+
let r = [];
|
|
2508
|
+
for (let i = 0; i < pr; i += 1) {
|
|
2509
|
+
let a = t(n + i / 40 * (1 - n)), o = {};
|
|
2510
|
+
if (e.transforms.length > 0) {
|
|
2511
|
+
let t = hr(e.transforms, a);
|
|
2512
|
+
t !== "" && (o.transform = t);
|
|
2513
|
+
}
|
|
2514
|
+
e.opacity && (o.opacity = `${mr(e.opacity.from + (e.opacity.to - e.opacity.from) * a)}`);
|
|
2515
|
+
for (let t of e.strings) o[rr(t.property)] = t.mix(a);
|
|
2516
|
+
if (i === 0 || i === 40) for (let t of e.constants) o[rr(t.property)] = t.value;
|
|
2517
|
+
r.push(o);
|
|
2518
|
+
}
|
|
2519
|
+
return r;
|
|
2520
|
+
}, _r = () => ({
|
|
2229
2521
|
request: (e) => requestAnimationFrame(e),
|
|
2230
2522
|
cancel: (e) => cancelAnimationFrame(e),
|
|
2231
2523
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
2232
|
-
}),
|
|
2524
|
+
}), vr = ((e = _r()) => {
|
|
2233
2525
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
2234
2526
|
join: (n, r) => {
|
|
2235
|
-
let i =
|
|
2236
|
-
if (!
|
|
2237
|
-
let
|
|
2238
|
-
|
|
2527
|
+
let i = Xn() === "scrub", s = !i && !U() && Qn() === "on", c = i ? null : qn(r.motion, r.element), l = !c || s ? ar(r.element, r.motion) : null, u = l ? null : c;
|
|
2528
|
+
if (!u && !l) return null;
|
|
2529
|
+
let d = t.get(n);
|
|
2530
|
+
d || (d = {
|
|
2239
2531
|
tracks: [],
|
|
2532
|
+
frameIntervalMs: dr,
|
|
2533
|
+
recentGaps: [],
|
|
2534
|
+
navCutMs: null,
|
|
2535
|
+
navComplete: null,
|
|
2536
|
+
navCompleted: !1,
|
|
2240
2537
|
started: !1,
|
|
2538
|
+
ended: !1,
|
|
2241
2539
|
startTime: null,
|
|
2242
2540
|
lastTime: null,
|
|
2243
2541
|
frameHandle: null
|
|
2244
|
-
}, t.set(n,
|
|
2245
|
-
let
|
|
2542
|
+
}, t.set(n, d));
|
|
2543
|
+
let f = J(r.motion, r.element, e.devicePixelRatio() || 1), p = {
|
|
2246
2544
|
...r,
|
|
2247
|
-
|
|
2248
|
-
|
|
2545
|
+
onComplete: void 0,
|
|
2546
|
+
parsed: u,
|
|
2547
|
+
scrub: l,
|
|
2548
|
+
cutMs: f,
|
|
2549
|
+
handoff: s && l !== null && c !== null,
|
|
2550
|
+
handedOff: !1,
|
|
2551
|
+
remainderPlan: s && l !== null ? c : null,
|
|
2249
2552
|
completed: !1,
|
|
2250
2553
|
detached: !1,
|
|
2251
2554
|
snapMemory: {
|
|
@@ -2253,16 +2556,18 @@ var Rt = (e, t, n, r) => {
|
|
|
2253
2556
|
y: null
|
|
2254
2557
|
}
|
|
2255
2558
|
};
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2559
|
+
d.tracks.push(p), d.navCutMs = d.tracks.some((e) => e.cutMs === null) ? null : Math.max(...d.tracks.map((e) => e.cutMs));
|
|
2560
|
+
let m = Symbol("flemo-player-track");
|
|
2561
|
+
if (W(p.element, "animation", m), p.element.style.animation = "none", u) {
|
|
2562
|
+
u.transforms.length > 0 && W(p.element, "transform", m), u.opacity && W(p.element, "opacity", m);
|
|
2563
|
+
for (let e of u.strings) W(p.element, e.property, m);
|
|
2564
|
+
for (let e of u.constants) W(p.element, e.property, m);
|
|
2565
|
+
a(p, 0);
|
|
2566
|
+
}
|
|
2567
|
+
return r.role === "active" && (r.onComplete && (d.navComplete = r.onComplete), d.started || (d.started = !0, jt.beginRun(), o(n, d))), () => {
|
|
2568
|
+
p.detached = !0, p.scrub?.cancel(), G(p.element, void 0, m);
|
|
2264
2569
|
let r = t.get(n);
|
|
2265
|
-
r && (r.tracks = r.tracks.filter((e) => e !==
|
|
2570
|
+
r && (r.tracks = r.tracks.filter((e) => e !== p), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
2266
2571
|
};
|
|
2267
2572
|
},
|
|
2268
2573
|
dispose: (n) => {
|
|
@@ -2275,13 +2580,13 @@ var Rt = (e, t, n, r) => {
|
|
|
2275
2580
|
}
|
|
2276
2581
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
2277
2582
|
let t = r.get(e);
|
|
2278
|
-
return t || (t =
|
|
2583
|
+
return t || (t = an(e.motion.ease), r.set(e, t)), t;
|
|
2279
2584
|
};
|
|
2280
2585
|
function a(t, n) {
|
|
2281
2586
|
let { element: r, parsed: i } = t;
|
|
2282
2587
|
if (!(!i || !r.isConnected)) {
|
|
2283
2588
|
if (i.transforms.length > 0) {
|
|
2284
|
-
let a =
|
|
2589
|
+
let a = nr(i.transforms, n, e.devicePixelRatio(), t.snapMemory);
|
|
2285
2590
|
a !== "" && (r.style.transform = a);
|
|
2286
2591
|
}
|
|
2287
2592
|
if (i.opacity) {
|
|
@@ -2294,37 +2599,87 @@ var Rt = (e, t, n, r) => {
|
|
|
2294
2599
|
}
|
|
2295
2600
|
function o(t, n) {
|
|
2296
2601
|
n.frameHandle = e.request((e) => {
|
|
2297
|
-
n.frameHandle = null,
|
|
2602
|
+
n.frameHandle = null, l(t, n, e);
|
|
2298
2603
|
});
|
|
2299
2604
|
}
|
|
2300
|
-
function s(e
|
|
2301
|
-
|
|
2605
|
+
function s(e) {
|
|
2606
|
+
e.ended || (e.ended = !0, jt.endRun(e.frameIntervalMs));
|
|
2607
|
+
}
|
|
2608
|
+
function c(e, n, r, a) {
|
|
2609
|
+
let o = r.element, c = Math.max(0, r.motion.delay * 1e3), l = Math.max(0, r.motion.duration * 1e3), u = Math.max(0, c - a), d = Math.max(0, a - c), f = l - d;
|
|
2610
|
+
if (f <= 0) return r.handoff = !1, !1;
|
|
2611
|
+
let p = r.remainderPlan;
|
|
2612
|
+
if (!p) return r.handoff = !1, !1;
|
|
2613
|
+
let m = i(r), h = l > 0 ? d / l : 0;
|
|
2614
|
+
if (!(1 - m(h) > .001)) return r.handoff = !1, !1;
|
|
2615
|
+
let g;
|
|
2616
|
+
try {
|
|
2617
|
+
g = o.animate(gr(p, m, h), {
|
|
2618
|
+
duration: f,
|
|
2619
|
+
delay: u,
|
|
2620
|
+
easing: "linear",
|
|
2621
|
+
fill: "both"
|
|
2622
|
+
});
|
|
2623
|
+
} catch {
|
|
2624
|
+
return r.handoff = !1, !1;
|
|
2625
|
+
}
|
|
2626
|
+
if (r.scrub.cancel(), r.scrub = g, r.handedOff = !0, g.onfinish = () => {
|
|
2627
|
+
r.completed || r.detached || (r.completed = !0, r.onComplete?.(), t.get(e) === n && n.tracks.every((e) => e.completed || e.detached) && (n.navCompleted || (n.navCompleted = !0, n.navComplete?.()), s(n), t.delete(e)));
|
|
2628
|
+
}, typeof window < "u") {
|
|
2629
|
+
let e = window.__flemoHandoffs ??= [];
|
|
2630
|
+
e.push(Math.round(a)), e.length > 100 && e.splice(0, e.length - 100);
|
|
2631
|
+
}
|
|
2632
|
+
return !0;
|
|
2633
|
+
}
|
|
2634
|
+
function l(e, r, l) {
|
|
2635
|
+
let u = r.startTime ?? l;
|
|
2302
2636
|
if (r.lastTime !== null) {
|
|
2303
|
-
let e =
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2637
|
+
let e = l - r.lastTime;
|
|
2638
|
+
if (jt.reportGap(e), n.onFrameGap?.(e), e >= cr && e <= ur) {
|
|
2639
|
+
r.recentGaps.push(e), r.recentGaps.length > 7 && r.recentGaps.shift();
|
|
2640
|
+
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 >= lr);
|
|
2641
|
+
r.frameIntervalMs = Math.min(i ? ur : or, Math.max(cr, n)), dr = r.frameIntervalMs;
|
|
2642
|
+
}
|
|
2643
|
+
e > sr * r.frameIntervalMs && (u += e - r.frameIntervalMs);
|
|
2644
|
+
}
|
|
2645
|
+
r.startTime = u, r.lastTime = l;
|
|
2646
|
+
let d = !0, f = !1;
|
|
2647
|
+
for (let t of r.tracks) {
|
|
2648
|
+
if (t.completed || t.detached) continue;
|
|
2649
|
+
let n = t.motion.duration * 1e3, o = t.motion.delay * 1e3, s = l - u;
|
|
2650
|
+
if (r.navCutMs !== null && s >= r.navCutMs) {
|
|
2651
|
+
t.completed = !0, t.onComplete?.();
|
|
2314
2652
|
continue;
|
|
2315
2653
|
}
|
|
2316
|
-
|
|
2317
|
-
|
|
2654
|
+
if (t.scrub) {
|
|
2655
|
+
if (t.handedOff) {
|
|
2656
|
+
d = !1;
|
|
2657
|
+
continue;
|
|
2658
|
+
}
|
|
2659
|
+
let i = o + n, a = Math.min(Math.max(0, s), i);
|
|
2660
|
+
if (t.handoff && s >= fr && s < i && c(e, r, t, a)) {
|
|
2661
|
+
d = !1;
|
|
2662
|
+
continue;
|
|
2663
|
+
}
|
|
2664
|
+
t.scrub.currentTime = a, s >= i ? (t.completed = !0, t.onComplete?.()) : (d = !1, f = !0);
|
|
2665
|
+
continue;
|
|
2666
|
+
}
|
|
2667
|
+
let p = n <= 0 ? 1 : Math.min(1, Math.max(0, (s - o) / n));
|
|
2668
|
+
a(t, i(t)(p)), p >= 1 ? (t.completed = !0, t.onComplete?.()) : (d = !1, f = !0);
|
|
2669
|
+
}
|
|
2670
|
+
if (d) {
|
|
2671
|
+
r.navCompleted || (r.navCompleted = !0, r.navComplete?.()), s(r), t.delete(e);
|
|
2672
|
+
return;
|
|
2318
2673
|
}
|
|
2319
|
-
if (
|
|
2320
|
-
|
|
2674
|
+
if (!f) {
|
|
2675
|
+
s(r);
|
|
2321
2676
|
return;
|
|
2322
2677
|
}
|
|
2323
2678
|
o(e, r);
|
|
2324
2679
|
}
|
|
2325
2680
|
return n;
|
|
2326
2681
|
})();
|
|
2327
|
-
|
|
2682
|
+
vr.onFrameGap = (e) => {
|
|
2328
2683
|
if (typeof window < "u") {
|
|
2329
2684
|
let t = window.__flemoPlayerGaps ??= [];
|
|
2330
2685
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -2332,47 +2687,105 @@ vn.onFrameGap = (e) => {
|
|
|
2332
2687
|
};
|
|
2333
2688
|
//#endregion
|
|
2334
2689
|
//#region src/core/engine/types.ts
|
|
2335
|
-
var
|
|
2336
|
-
let n = 0, r = !1;
|
|
2337
|
-
for (let i of ["x", "y"]) {
|
|
2338
|
-
let a = Kt(e.from, i, t), o = Kt(e.to, i, t);
|
|
2339
|
-
if (!(a === void 0 && o === void 0)) {
|
|
2340
|
-
if (a === null || o === null || a === void 0 || o === void 0) return null;
|
|
2341
|
-
r = !0, n = Math.max(n, Math.abs(o - a));
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
if (!r || n === 0) return 0;
|
|
2345
|
-
let i = e.duration * 1e3;
|
|
2346
|
-
/* v8 ignore next 2 -- resolveVariantMotion never yields duration<=0 with a
|
|
2347
|
-
distance; kept so a hand-built motion cannot divide by zero. */
|
|
2348
|
-
if (i <= 0) return 0;
|
|
2349
|
-
let a = i / bn, o = Vt(e.ease), s = Math.max(1, Math.min(240, Math.ceil(a))), c = 0, l = o(0);
|
|
2350
|
-
for (let e = 1; e <= s; e++) {
|
|
2351
|
-
let t = o(e / s);
|
|
2352
|
-
c = Math.max(c, Math.abs(t - l)), l = t;
|
|
2353
|
-
}
|
|
2354
|
-
return n * c * (s / a);
|
|
2355
|
-
}, Sn = (e, t, n) => {
|
|
2690
|
+
var yr = "data-flemo-skip-animation", br = (e, t, n) => {
|
|
2356
2691
|
let r = e.driver;
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
for (let r of
|
|
2360
|
-
let a = B(e, `${t}-${r}`);
|
|
2361
|
-
if (!a) continue;
|
|
2362
|
-
let o = xn(a, n);
|
|
2363
|
-
if (o === null) return "player";
|
|
2364
|
-
i = Math.max(i, o);
|
|
2365
|
-
}
|
|
2366
|
-
return i >= 6 ? "native" : "player";
|
|
2367
|
-
}, Cn = 1e3 / 60 * 2, wn = "flemo-", Tn = (e, t, n) => {
|
|
2368
|
-
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: n })) {
|
|
2692
|
+
return r === "native" || r === "player" ? r : "player";
|
|
2693
|
+
}, xr = 1e3 / 60 * 2, Sr = "flemo-", Cr = /* @__PURE__ */ new WeakMap(), wr = (e, t, n) => {
|
|
2694
|
+
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2369
2695
|
let e = r.animationName;
|
|
2370
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2371
|
-
let
|
|
2372
|
-
typeof
|
|
2696
|
+
if (typeof e != "string" || !e.startsWith(Sr) || r.playState !== "running" || Cr.get(r) === n) continue;
|
|
2697
|
+
let i = r.startTime;
|
|
2698
|
+
typeof i == "number" && (r.startTime = i + t, Cr.set(r, n));
|
|
2373
2699
|
}
|
|
2374
|
-
};
|
|
2375
|
-
function
|
|
2700
|
+
}, Tr = /* @__PURE__ */ new WeakSet(), Er = 1e3, Dr = 3e3;
|
|
2701
|
+
function Or(e, t, n) {
|
|
2702
|
+
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2703
|
+
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2704
|
+
s !== null && (clearTimeout(s), s = null);
|
|
2705
|
+
}, d = () => {
|
|
2706
|
+
for (let e of c) try {
|
|
2707
|
+
e.playState === "paused" && e.play();
|
|
2708
|
+
} catch {}
|
|
2709
|
+
}, f = () => {
|
|
2710
|
+
a || o || (o = !0, u(), r &&= (cancelAnimationFrame(r), 0), d(), n?.());
|
|
2711
|
+
}, p = () => {
|
|
2712
|
+
i = !0, m.disconnect();
|
|
2713
|
+
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2714
|
+
let e = t.animationName;
|
|
2715
|
+
if (typeof e != "string" || !e.startsWith(Sr) || t.playState !== "running" || Tr.has(t)) continue;
|
|
2716
|
+
let n = t.currentTime;
|
|
2717
|
+
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2718
|
+
try {
|
|
2719
|
+
t.pause();
|
|
2720
|
+
} catch {
|
|
2721
|
+
continue;
|
|
2722
|
+
}
|
|
2723
|
+
Tr.add(t), c.push(t);
|
|
2724
|
+
}
|
|
2725
|
+
}
|
|
2726
|
+
if (c.length === 0) return;
|
|
2727
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, Er));
|
|
2728
|
+
let e = jr(t, () => {
|
|
2729
|
+
a || n?.();
|
|
2730
|
+
});
|
|
2731
|
+
if (l = e, typeof setTimeout == "function") {
|
|
2732
|
+
let t = setTimeout(() => {
|
|
2733
|
+
l === e && (l = null), e();
|
|
2734
|
+
}, Dr), n = e;
|
|
2735
|
+
l = () => {
|
|
2736
|
+
clearTimeout(t), n();
|
|
2737
|
+
};
|
|
2738
|
+
}
|
|
2739
|
+
}, m = new MutationObserver(() => {
|
|
2740
|
+
i || e.getAttribute("data-flemo-anim-hold") === "false" && p();
|
|
2741
|
+
});
|
|
2742
|
+
return e.getAttribute("data-flemo-anim-hold") === "false" ? p() : m.observe(e, {
|
|
2743
|
+
attributes: !0,
|
|
2744
|
+
attributeFilter: ["data-flemo-anim-hold"]
|
|
2745
|
+
}), () => {
|
|
2746
|
+
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2747
|
+
};
|
|
2748
|
+
}
|
|
2749
|
+
var kr = 150;
|
|
2750
|
+
function Ar(e, t) {
|
|
2751
|
+
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2752
|
+
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2753
|
+
let n = [], r = /* @__PURE__ */ new Map();
|
|
2754
|
+
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2755
|
+
let t = e.animationName;
|
|
2756
|
+
if (typeof t != "string" || !t.startsWith(Sr) || e.playState !== "running" || Tr.has(e)) continue;
|
|
2757
|
+
let i = e.currentTime;
|
|
2758
|
+
typeof i != "number" || i > 33.333333333333336 || (Tr.add(e), n.push(e), r.set(e, i));
|
|
2759
|
+
}
|
|
2760
|
+
if (n.length === 0) return () => {};
|
|
2761
|
+
let i = 0, a = !1, o = null, s = null, c = 0, l = (e) => {
|
|
2762
|
+
if (a) return;
|
|
2763
|
+
if (o === null && (o = e), s !== null) {
|
|
2764
|
+
let t = e - s;
|
|
2765
|
+
c += Math.min(Math.max(0, t), xr);
|
|
2766
|
+
}
|
|
2767
|
+
s = e;
|
|
2768
|
+
let u = 0;
|
|
2769
|
+
for (let e of n) {
|
|
2770
|
+
if (e.playState !== "running") continue;
|
|
2771
|
+
let t = e.currentTime, n = e.startTime;
|
|
2772
|
+
if (typeof t != "number" || typeof n != "number") continue;
|
|
2773
|
+
let i = r.get(e) ?? 0;
|
|
2774
|
+
if (t <= i + c + 33.333333333333336) continue;
|
|
2775
|
+
let a = t - (i + c);
|
|
2776
|
+
e.startTime = n + a, u = Math.max(u, a);
|
|
2777
|
+
}
|
|
2778
|
+
if (u > 0) {
|
|
2779
|
+
t?.(u);
|
|
2780
|
+
return;
|
|
2781
|
+
}
|
|
2782
|
+
e - o < kr && (i = requestAnimationFrame(l));
|
|
2783
|
+
};
|
|
2784
|
+
return i = requestAnimationFrame(l), () => {
|
|
2785
|
+
a = !0, cancelAnimationFrame(i);
|
|
2786
|
+
};
|
|
2787
|
+
}
|
|
2788
|
+
function jr(e, t) {
|
|
2376
2789
|
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2377
2790
|
exotic embedders. */
|
|
2378
2791
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
@@ -2381,10 +2794,9 @@ function En(e, t) {
|
|
|
2381
2794
|
if (r !== null) {
|
|
2382
2795
|
let n = o - r;
|
|
2383
2796
|
if (n > 33.333333333333336) {
|
|
2384
|
-
let r = n -
|
|
2385
|
-
e()
|
|
2386
|
-
|
|
2387
|
-
}), t?.(r);
|
|
2797
|
+
let r = n - xr;
|
|
2798
|
+
for (let t of e()) t && wr(t, r, o);
|
|
2799
|
+
t?.(r);
|
|
2388
2800
|
}
|
|
2389
2801
|
}
|
|
2390
2802
|
r = o, n = requestAnimationFrame(a);
|
|
@@ -2396,58 +2808,117 @@ function En(e, t) {
|
|
|
2396
2808
|
}
|
|
2397
2809
|
//#endregion
|
|
2398
2810
|
//#region src/core/engine/createTransitionEngine.ts
|
|
2399
|
-
var Z = () => {},
|
|
2811
|
+
var Z = () => {}, Mr = 400, Nr = 4, Pr = 100, Fr = 1500, Ir = "data-flemo-part-name", Lr = /* @__PURE__ */ new WeakMap(), Rr = (e) => {
|
|
2400
2812
|
let t = e.parentElement ?? e;
|
|
2401
|
-
return Array.from(t.querySelectorAll(`[${
|
|
2813
|
+
return Array.from(t.querySelectorAll(`[${Ir}]`)).filter((n) => {
|
|
2402
2814
|
let r = n.closest("[data-flemo-screen]");
|
|
2403
2815
|
return !r || r === e || !t.contains(r);
|
|
2404
2816
|
});
|
|
2405
|
-
},
|
|
2817
|
+
}, zr = (e, t) => {
|
|
2406
2818
|
let [n, r] = t.split("-");
|
|
2407
|
-
return
|
|
2408
|
-
},
|
|
2409
|
-
let
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2819
|
+
return Rr(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
2820
|
+
}, Br = (e, t) => {
|
|
2821
|
+
let n = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
2822
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${Ir}][data-flemo-status="${t}"]`)).filter((e) => {
|
|
2823
|
+
if (n === null) return !0;
|
|
2824
|
+
let t = e.closest("[data-flemo-router]");
|
|
2825
|
+
return !t || t.getAttribute("data-flemo-router") === n;
|
|
2826
|
+
});
|
|
2827
|
+
}, Vr = (e, t, n) => {
|
|
2828
|
+
let r = 0;
|
|
2829
|
+
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
2830
|
+
if (!H(t, e)) continue;
|
|
2831
|
+
let n = B(t, e);
|
|
2832
|
+
n && (r = Math.max(r, (n.delay + n.duration) * 1e3));
|
|
2833
|
+
}
|
|
2834
|
+
for (let t of Br(e, n)) {
|
|
2835
|
+
let e = z.get(t.getAttribute(Ir)), i = `${n}-${t.getAttribute("data-flemo-active")}`;
|
|
2836
|
+
if (!e || !H(e, i)) continue;
|
|
2837
|
+
let a = B(e, i);
|
|
2838
|
+
a && (r = Math.max(r, (a.delay + a.duration) * 1e3));
|
|
2839
|
+
}
|
|
2840
|
+
let i = t.decoratorName ? R.get(t.decoratorName) : void 0;
|
|
2841
|
+
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
2842
|
+
if (!H(i, e)) continue;
|
|
2843
|
+
let t = B(i, e);
|
|
2844
|
+
t && (r = Math.max(r, (t.delay + t.duration) * 1e3));
|
|
2845
|
+
}
|
|
2846
|
+
return r;
|
|
2847
|
+
}, Hr = () => {
|
|
2848
|
+
try {
|
|
2849
|
+
return typeof sessionStorage < "u" && sessionStorage.getItem("flemo:landing-snap") === "on";
|
|
2850
|
+
} catch {
|
|
2851
|
+
return !1;
|
|
2852
|
+
}
|
|
2853
|
+
}, Ur = (e, t, n, r) => {
|
|
2854
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = U() && Hr(), u = l && typeof window < "u" && window.devicePixelRatio || 1;
|
|
2855
|
+
if (H(t, n)) {
|
|
2856
|
+
wn(i, t, c, r);
|
|
2857
|
+
let e = l ? gn(B(t, n), i, u) : null;
|
|
2858
|
+
e && (W(i, "animation-timing-function", r), i.style.animationTimingFunction = e);
|
|
2859
|
+
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (wn(n, t, c, r), e && (W(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
2860
|
+
}
|
|
2861
|
+
if (a && t.decoratorName) {
|
|
2862
|
+
let e = R.get(t.decoratorName);
|
|
2863
|
+
e && H(e, n) && wn(a, e, c, r);
|
|
2864
|
+
}
|
|
2865
|
+
for (let e of zr(i, n)) {
|
|
2866
|
+
let t = z.get(e.getAttribute(Ir));
|
|
2867
|
+
if (t && H(t, n)) {
|
|
2868
|
+
wn(e, t, c, r);
|
|
2869
|
+
let i = l ? gn(B(t, n), e, u) : null;
|
|
2870
|
+
i && (W(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
}, Wr = (e, t) => {
|
|
2874
|
+
let { scope: n, decorator: r, bars: i } = e;
|
|
2875
|
+
if (n) {
|
|
2876
|
+
X(n, t);
|
|
2877
|
+
for (let e of Rr(n)) X(e, t);
|
|
2878
|
+
}
|
|
2879
|
+
r && X(r, t);
|
|
2880
|
+
for (let e of i ?? []) e && X(e, t);
|
|
2881
|
+
}, Gr = 4, Kr = (e) => `${Math.round(e * 1e3) / 1e3}s`, qr = (e) => {
|
|
2882
|
+
let { element: t, expectedName: n, motion: r } = e, i = !1, a = !1, o = (n) => {
|
|
2883
|
+
i = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), n.mode === "clear" ? (t.style.removeProperty("animation-delay"), a = !1) : n.mode === "set" && (W(t, "animation-delay", e.writer), t.style.animationDelay = Kr(n.seconds), a = !0), i = !1;
|
|
2884
|
+
}, s = (a) => {
|
|
2885
|
+
if (i || a.target !== t || a.animationName !== n) return;
|
|
2886
|
+
if (!e.isLive() || e.budgetUsed() >= Gr) {
|
|
2416
2887
|
e.onTerminal();
|
|
2417
2888
|
return;
|
|
2418
2889
|
}
|
|
2419
|
-
|
|
2420
|
-
|
|
2890
|
+
let s = Math.max(0, a.elapsedTime * 1e3), c = r.duration * 1e3;
|
|
2891
|
+
if (c > 0 && s >= c) {
|
|
2892
|
+
e.onTerminal();
|
|
2421
2893
|
return;
|
|
2422
2894
|
}
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
e.onTerminal();
|
|
2895
|
+
if (e.spendBudget(), s <= 0) {
|
|
2896
|
+
o({ mode: "keep" });
|
|
2426
2897
|
return;
|
|
2427
2898
|
}
|
|
2428
|
-
|
|
2899
|
+
o({
|
|
2429
2900
|
mode: "set",
|
|
2430
|
-
seconds:
|
|
2901
|
+
seconds: -s / 1e3
|
|
2431
2902
|
});
|
|
2432
2903
|
};
|
|
2433
2904
|
return {
|
|
2434
2905
|
attach: () => {
|
|
2435
|
-
t.addEventListener("
|
|
2906
|
+
t.addEventListener("animationcancel", s);
|
|
2436
2907
|
},
|
|
2437
2908
|
detach: () => {
|
|
2438
|
-
t.removeEventListener("
|
|
2909
|
+
t.removeEventListener("animationcancel", s), a &&= (G(t, ["animation-delay"], e.writer), !1);
|
|
2439
2910
|
},
|
|
2440
2911
|
fullRestart: () => {
|
|
2441
|
-
|
|
2912
|
+
o({ mode: "clear" });
|
|
2442
2913
|
}
|
|
2443
2914
|
};
|
|
2444
2915
|
};
|
|
2445
|
-
function
|
|
2446
|
-
let t = /* @__PURE__ */ new Map(),
|
|
2447
|
-
if (!
|
|
2448
|
-
let { land: e, cancel: t } =
|
|
2449
|
-
|
|
2450
|
-
},
|
|
2916
|
+
function Jr(e) {
|
|
2917
|
+
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = null, i = null, a = null, o = null, c = () => {
|
|
2918
|
+
if (!o) return;
|
|
2919
|
+
let { land: e, cancel: t } = o;
|
|
2920
|
+
o = null, t(), e();
|
|
2921
|
+
}, l = (e) => {
|
|
2451
2922
|
if (typeof requestAnimationFrame != "function") {
|
|
2452
2923
|
e();
|
|
2453
2924
|
return;
|
|
@@ -2455,42 +2926,55 @@ function In(e) {
|
|
|
2455
2926
|
let t = 0;
|
|
2456
2927
|
t = requestAnimationFrame(() => {
|
|
2457
2928
|
t = requestAnimationFrame(() => {
|
|
2458
|
-
|
|
2929
|
+
o = null, e();
|
|
2459
2930
|
});
|
|
2460
|
-
}),
|
|
2931
|
+
}), o = {
|
|
2461
2932
|
land: e,
|
|
2462
2933
|
cancel: () => cancelAnimationFrame(t)
|
|
2463
2934
|
};
|
|
2464
2935
|
};
|
|
2465
2936
|
return {
|
|
2466
|
-
driveScreenLifecycle: (
|
|
2467
|
-
let { getElements:
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
}
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2937
|
+
driveScreenLifecycle: (o) => {
|
|
2938
|
+
let { getElements: u, transitionName: d, prevTransitionName: f, status: p, isActive: m, animHoldReleased: h } = o, g = p === "PUSHING" || p === "POPPING" || p === "REPLACING";
|
|
2939
|
+
if (g) {
|
|
2940
|
+
let { scope: e, bars: n } = u();
|
|
2941
|
+
if (e) {
|
|
2942
|
+
It(e), G(e, ["animation-timing-function"], t);
|
|
2943
|
+
for (let n of Rr(e)) G(n, ["animation-timing-function"], t);
|
|
2944
|
+
for (let e of n ?? []) e && G(e, ["animation-timing-function"], t);
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
g && (Xt(), a &&= (clearTimeout(a), null), i ||= qt()), !g && i && !a && (typeof setTimeout == "function" ? a = setTimeout(() => {
|
|
2948
|
+
a = null, i?.(), i = null;
|
|
2949
|
+
}, Mr) : (i(), i = null));
|
|
2950
|
+
let _ = g && (m ? p === "PUSHING" || p === "REPLACING" : p === "POPPING");
|
|
2951
|
+
if (!_ && r) {
|
|
2952
|
+
let e = r;
|
|
2953
|
+
r = null, g ? e() : l(e);
|
|
2954
|
+
}
|
|
2955
|
+
if (_ && !r) {
|
|
2956
|
+
c();
|
|
2957
|
+
let { scope: e } = u();
|
|
2958
|
+
if (e) {
|
|
2959
|
+
let t = Rt(e), n = en(e), i = Mn(Vr(e, De(d), p) + Fr);
|
|
2960
|
+
r = () => {
|
|
2961
|
+
i(), n(), t();
|
|
2962
|
+
};
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
let v = (t, n, r) => {
|
|
2482
2966
|
let i = e.getTransitionTaskId();
|
|
2483
|
-
if (!i || s.pendingTaskIds.some((e) => e !== i) || !
|
|
2484
|
-
let { scope: a, decorator: o, bars: c } =
|
|
2967
|
+
if (!i || U() && s.pendingTaskIds.some((e) => e !== i) || !jt.playerAllowed()) return null;
|
|
2968
|
+
let { scope: a, decorator: o, bars: c } = u();
|
|
2485
2969
|
if (!a) return null;
|
|
2486
|
-
let
|
|
2487
|
-
if (
|
|
2970
|
+
let l = De(d);
|
|
2971
|
+
if (jt.pinnedDriver() !== "raf") {
|
|
2488
2972
|
let e = t.split("-")[0];
|
|
2489
|
-
if (
|
|
2973
|
+
if (br(l, e, a) === "native") return null;
|
|
2490
2974
|
}
|
|
2491
|
-
let f = B(
|
|
2975
|
+
let f = B(l, t);
|
|
2492
2976
|
if (!f) return null;
|
|
2493
|
-
let p = [], m =
|
|
2977
|
+
let p = [], m = vr.join(i, {
|
|
2494
2978
|
element: a,
|
|
2495
2979
|
motion: f,
|
|
2496
2980
|
role: n,
|
|
@@ -2500,17 +2984,17 @@ function In(e) {
|
|
|
2500
2984
|
p.push(m);
|
|
2501
2985
|
for (let e of c ?? []) {
|
|
2502
2986
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
2503
|
-
let t =
|
|
2987
|
+
let t = vr.join(i, {
|
|
2504
2988
|
element: e,
|
|
2505
2989
|
motion: f,
|
|
2506
2990
|
role: "passive"
|
|
2507
2991
|
});
|
|
2508
2992
|
t && p.push(t);
|
|
2509
2993
|
}
|
|
2510
|
-
if (o &&
|
|
2511
|
-
let e =
|
|
2994
|
+
if (o && l.decoratorName) {
|
|
2995
|
+
let e = R.get(l.decoratorName), n = e ? B(e, t) : null;
|
|
2512
2996
|
if (n) {
|
|
2513
|
-
let e =
|
|
2997
|
+
let e = vr.join(i, {
|
|
2514
2998
|
element: o,
|
|
2515
2999
|
motion: n,
|
|
2516
3000
|
role: "passive"
|
|
@@ -2518,10 +3002,10 @@ function In(e) {
|
|
|
2518
3002
|
e && p.push(e);
|
|
2519
3003
|
}
|
|
2520
3004
|
}
|
|
2521
|
-
for (let e of
|
|
2522
|
-
let n =
|
|
3005
|
+
for (let e of zr(a, t)) {
|
|
3006
|
+
let n = z.get(e.getAttribute(Ir)), r = n ? B(n, t) : null;
|
|
2523
3007
|
if (!r) continue;
|
|
2524
|
-
let a =
|
|
3008
|
+
let a = vr.join(i, {
|
|
2525
3009
|
element: e,
|
|
2526
3010
|
motion: r,
|
|
2527
3011
|
role: "passive"
|
|
@@ -2529,218 +3013,300 @@ function In(e) {
|
|
|
2529
3013
|
a && p.push(a);
|
|
2530
3014
|
}
|
|
2531
3015
|
return () => p.forEach((e) => e());
|
|
2532
|
-
},
|
|
2533
|
-
let
|
|
2534
|
-
let
|
|
3016
|
+
}, y = (e, n) => {
|
|
3017
|
+
let r = [], { decorator: i, bars: a } = u(), o = De(d), s = (e, n, i) => {
|
|
3018
|
+
let a = 0, o = qr({
|
|
2535
3019
|
element: e,
|
|
2536
|
-
expectedName:
|
|
2537
|
-
motion:
|
|
3020
|
+
expectedName: n,
|
|
3021
|
+
motion: i,
|
|
3022
|
+
writer: t,
|
|
2538
3023
|
isLive: () => e.isConnected,
|
|
2539
|
-
budgetUsed: () =>
|
|
3024
|
+
budgetUsed: () => a,
|
|
2540
3025
|
spendBudget: () => {
|
|
2541
|
-
|
|
3026
|
+
a += 1;
|
|
2542
3027
|
},
|
|
2543
3028
|
onTerminal: Z
|
|
2544
3029
|
});
|
|
2545
|
-
|
|
2546
|
-
},
|
|
2547
|
-
if (
|
|
2548
|
-
if (
|
|
2549
|
-
let e =
|
|
2550
|
-
|
|
3030
|
+
o.attach(), r.push(o.detach);
|
|
3031
|
+
}, c = it("screen", d, n), l = B(o, n);
|
|
3032
|
+
if (l) for (let e of a ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || s(e, c, l);
|
|
3033
|
+
if (i && o.decoratorName) {
|
|
3034
|
+
let e = R.get(o.decoratorName), t = e ? B(e, n) : null;
|
|
3035
|
+
t && s(i, it("decorator", o.decoratorName, n), t);
|
|
2551
3036
|
}
|
|
2552
|
-
for (let
|
|
2553
|
-
let e =
|
|
2554
|
-
i &&
|
|
3037
|
+
for (let t of zr(e, n)) {
|
|
3038
|
+
let e = t.getAttribute(Ir), r = z.get(e), i = r ? B(r, n) : null;
|
|
3039
|
+
i && s(t, it("part", e, n), i);
|
|
2555
3040
|
}
|
|
2556
|
-
return
|
|
3041
|
+
return r;
|
|
2557
3042
|
};
|
|
2558
|
-
if (!
|
|
2559
|
-
if (
|
|
2560
|
-
let { scope: e, decorator:
|
|
3043
|
+
if (!m) {
|
|
3044
|
+
if (p === "COMPLETED") {
|
|
3045
|
+
let { scope: e, decorator: n, bars: r } = u();
|
|
2561
3046
|
if (e) {
|
|
2562
|
-
|
|
2563
|
-
for (let t of
|
|
3047
|
+
G(e);
|
|
3048
|
+
for (let t of Rr(e)) G(t);
|
|
2564
3049
|
}
|
|
2565
|
-
|
|
2566
|
-
for (let e of
|
|
2567
|
-
return
|
|
3050
|
+
n && G(n);
|
|
3051
|
+
for (let e of r ?? []) e && G(e, void 0, t);
|
|
3052
|
+
return Wr({
|
|
3053
|
+
scope: e,
|
|
3054
|
+
decorator: n,
|
|
3055
|
+
bars: r ?? []
|
|
3056
|
+
}, t), Z;
|
|
2568
3057
|
}
|
|
2569
|
-
if (
|
|
2570
|
-
let e
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
3058
|
+
if (p === "REPLACING" && f !== d && e.setReplaceTransitionStatus("PENDING"), g) {
|
|
3059
|
+
let { scope: e, decorator: n, bars: r } = u();
|
|
3060
|
+
e && Ur({
|
|
3061
|
+
scope: e,
|
|
3062
|
+
decorator: n,
|
|
3063
|
+
bars: r ?? []
|
|
3064
|
+
}, De(d), `${p}-false`, t);
|
|
3065
|
+
}
|
|
3066
|
+
if (g && h) {
|
|
3067
|
+
let e = `${p}-false`, n = v(e, "passive");
|
|
3068
|
+
if (n) return n;
|
|
3069
|
+
let { scope: r } = u();
|
|
3070
|
+
if (r) {
|
|
3071
|
+
let n = De(d), i = [];
|
|
3072
|
+
if (H(n, e)) {
|
|
3073
|
+
let a = B(n, e), o = 0, s = qr({
|
|
3074
|
+
element: r,
|
|
3075
|
+
expectedName: it("screen", d, e),
|
|
3076
|
+
motion: a,
|
|
3077
|
+
writer: t,
|
|
3078
|
+
isLive: () => r.isConnected && r.getAttribute("data-flemo-skip-animation") !== "true",
|
|
3079
|
+
budgetUsed: () => o,
|
|
2582
3080
|
spendBudget: () => {
|
|
2583
|
-
|
|
3081
|
+
o += 1;
|
|
2584
3082
|
},
|
|
2585
3083
|
onTerminal: Z
|
|
2586
3084
|
});
|
|
2587
|
-
|
|
3085
|
+
s.attach(), i.push(s.detach);
|
|
2588
3086
|
}
|
|
2589
|
-
if (
|
|
3087
|
+
if (i.push(...y(r, e)), i.length > 0) return () => i.forEach((e) => e());
|
|
2590
3088
|
}
|
|
2591
3089
|
}
|
|
2592
3090
|
return Z;
|
|
2593
3091
|
}
|
|
2594
|
-
if (
|
|
3092
|
+
if (p === "COMPLETED") {
|
|
2595
3093
|
e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
2596
|
-
let { scope:
|
|
2597
|
-
if (
|
|
2598
|
-
|
|
2599
|
-
for (let e of
|
|
3094
|
+
let { scope: n, decorator: r, bars: i } = u();
|
|
3095
|
+
if (n) {
|
|
3096
|
+
G(n), n.removeAttribute(yr);
|
|
3097
|
+
for (let e of Rr(n)) G(e);
|
|
2600
3098
|
}
|
|
2601
|
-
|
|
2602
|
-
for (let e of
|
|
2603
|
-
return
|
|
3099
|
+
r && (G(r), r.removeAttribute(yr));
|
|
3100
|
+
for (let e of i ?? []) e && G(e, void 0, t);
|
|
3101
|
+
return Wr({
|
|
3102
|
+
scope: n,
|
|
3103
|
+
decorator: r,
|
|
3104
|
+
bars: i ?? []
|
|
3105
|
+
}, t), Z;
|
|
2604
3106
|
}
|
|
2605
|
-
if (
|
|
2606
|
-
let { scope:
|
|
2607
|
-
if (!
|
|
2608
|
-
let
|
|
2609
|
-
let
|
|
2610
|
-
|
|
2611
|
-
},
|
|
2612
|
-
if (!
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
3107
|
+
if (p === "IDLE") return Z;
|
|
3108
|
+
let { scope: b } = u();
|
|
3109
|
+
if (!b) return Z;
|
|
3110
|
+
let x = e.getTransitionTaskId(), S = () => {
|
|
3111
|
+
let t = e.getTransitionTaskId();
|
|
3112
|
+
t && s.resolveTask(t), x && n.delete(x);
|
|
3113
|
+
}, C = De(d), w = `${p}-true`, T = b.getAttribute(yr) === "true", ee = !T && H(C, w);
|
|
3114
|
+
if (!T) {
|
|
3115
|
+
let { decorator: e, bars: n } = u();
|
|
3116
|
+
Ur({
|
|
3117
|
+
scope: b,
|
|
3118
|
+
decorator: e,
|
|
3119
|
+
bars: n ?? []
|
|
3120
|
+
}, C, w, t);
|
|
3121
|
+
}
|
|
3122
|
+
let te = `${p}-false`, E = H(C, te) ? B(C, te) : null, ne = [];
|
|
3123
|
+
for (let e of Br(b, p)) {
|
|
3124
|
+
let t = z.get(e.getAttribute(Ir)), n = `${p}-${e.getAttribute("data-flemo-active")}`, r = t && H(t, n) ? B(t, n) : null;
|
|
3125
|
+
r && ne.push({
|
|
3126
|
+
element: e,
|
|
3127
|
+
motion: r
|
|
3128
|
+
});
|
|
3129
|
+
}
|
|
3130
|
+
let D = E ? (E.delay + E.duration) * 1e3 : 0;
|
|
3131
|
+
for (let { motion: e } of ne) D = Math.max(D, (e.delay + e.duration) * 1e3);
|
|
3132
|
+
let re = [];
|
|
3133
|
+
{
|
|
3134
|
+
let e = C.decoratorName ? R.get(C.decoratorName) : void 0;
|
|
3135
|
+
if (e) for (let t of [`${p}-true`, `${p}-false`]) {
|
|
3136
|
+
if (!H(e, t)) continue;
|
|
3137
|
+
let n = B(e, t);
|
|
3138
|
+
n && (re.push(n), D = Math.max(D, (n.delay + n.duration) * 1e3));
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
if (!ee) {
|
|
3142
|
+
if (!T && D > 0) {
|
|
3143
|
+
if (!h) return x && s.markGateHeld(x), Z;
|
|
3144
|
+
let e = D + 50;
|
|
3145
|
+
x && s.anchorGate(x, e + Fr);
|
|
3146
|
+
let t = setTimeout(S, e);
|
|
3147
|
+
return () => clearTimeout(t);
|
|
2621
3148
|
}
|
|
2622
|
-
return queueMicrotask(
|
|
2623
|
-
}
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
3149
|
+
return queueMicrotask(S), Z;
|
|
3150
|
+
}
|
|
3151
|
+
let O = B(C, w);
|
|
3152
|
+
if (x) if (h) {
|
|
3153
|
+
let e = (O.delay + O.duration) * 1e3;
|
|
3154
|
+
s.anchorGate(x, Math.max(e, D) + Fr);
|
|
3155
|
+
} else s.markGateHeld(x);
|
|
3156
|
+
let ie = !T && !!O, ae = C.driver === "native" && !U(), oe = null;
|
|
3157
|
+
ie && ae && (oe = Or(b, () => [b.ownerDocument.documentElement], () => Lr.get(b)?.()));
|
|
3158
|
+
let se = it("screen", d, w), k, ce = () => {
|
|
3159
|
+
k !== void 0 && (clearTimeout(k), k = void 0);
|
|
3160
|
+
}, le = 0, ue, de = [], fe, pe = () => {
|
|
3161
|
+
de.forEach((e) => cancelAnimationFrame(e)), de = [], fe !== void 0 && clearTimeout(fe), fe = void 0;
|
|
3162
|
+
}, me = () => {
|
|
2630
3163
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
2631
3164
|
shields exotic embedders. */
|
|
2632
3165
|
if (typeof requestAnimationFrame != "function") {
|
|
2633
|
-
|
|
3166
|
+
S();
|
|
2634
3167
|
return;
|
|
2635
3168
|
}
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
},
|
|
3169
|
+
fe = setTimeout(() => {
|
|
3170
|
+
pe(), S();
|
|
3171
|
+
}, Pr);
|
|
2639
3172
|
let e = (t) => {
|
|
2640
3173
|
if (t <= 0) {
|
|
2641
|
-
|
|
3174
|
+
pe(), S();
|
|
2642
3175
|
return;
|
|
2643
3176
|
}
|
|
2644
|
-
|
|
3177
|
+
de.push(requestAnimationFrame(() => e(t - 1)));
|
|
2645
3178
|
};
|
|
2646
|
-
e(
|
|
2647
|
-
},
|
|
2648
|
-
if (
|
|
2649
|
-
|
|
3179
|
+
e(Nr);
|
|
3180
|
+
}, he = () => {
|
|
3181
|
+
if (le <= 0) {
|
|
3182
|
+
me();
|
|
2650
3183
|
return;
|
|
2651
3184
|
}
|
|
2652
|
-
|
|
2653
|
-
},
|
|
2654
|
-
e.target ===
|
|
3185
|
+
ue = setTimeout(me, le);
|
|
3186
|
+
}, ge = Z, A = Z, j = Z, _e = (e) => {
|
|
3187
|
+
e.target === b && e.animationName === se && (b.removeEventListener("animationend", _e), ce(), ge(), he());
|
|
2655
3188
|
};
|
|
2656
|
-
|
|
2657
|
-
let
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
for (let { motion: e } of pe) me = Math.max(me, (e.delay + e.duration) * 1e3);
|
|
2667
|
-
te = Math.max(0, Math.min(1e3, me - le));
|
|
2668
|
-
let he = le + 250, ge = () => b !== null && e.getTransitionTaskId() === b && y.isConnected && y.getAttribute("data-flemo-skip-animation") !== "true" && W(S, C), N = Fn({
|
|
2669
|
-
element: y,
|
|
2670
|
-
expectedName: ee,
|
|
2671
|
-
motion: T,
|
|
2672
|
-
isLive: ge,
|
|
2673
|
-
budgetUsed: () => t.get(b) ?? 0,
|
|
3189
|
+
b.addEventListener("animationend", _e);
|
|
3190
|
+
let ve = ie && h ? v(w, "active", me) : null, ye = (O.delay + O.duration) * 1e3, be = Math.max(ye, D) + 1500, xe = x ? setTimeout(() => void s.resolveTask(x), be) : void 0;
|
|
3191
|
+
le = Math.max(0, D - ye);
|
|
3192
|
+
let Se = ye + 250, Ce = () => x !== null && e.getTransitionTaskId() === x && b.isConnected && b.getAttribute("data-flemo-skip-animation") !== "true" && H(C, w), M = qr({
|
|
3193
|
+
element: b,
|
|
3194
|
+
expectedName: se,
|
|
3195
|
+
motion: O,
|
|
3196
|
+
writer: t,
|
|
3197
|
+
isLive: Ce,
|
|
3198
|
+
budgetUsed: () => n.get(x) ?? 0,
|
|
2674
3199
|
spendBudget: () => {
|
|
2675
|
-
|
|
3200
|
+
A(), j(), n.set(x, (n.get(x) ?? 0) + 1);
|
|
2676
3201
|
},
|
|
2677
|
-
onTerminal:
|
|
3202
|
+
onTerminal: S
|
|
2678
3203
|
});
|
|
2679
|
-
|
|
2680
|
-
let
|
|
2681
|
-
|
|
2682
|
-
},
|
|
2683
|
-
if (
|
|
2684
|
-
|
|
3204
|
+
ge = M.detach;
|
|
3205
|
+
let N = !1, P = () => {
|
|
3206
|
+
ce(), k = setTimeout(we, Se);
|
|
3207
|
+
}, we = () => {
|
|
3208
|
+
if (ce(), Ce() && !N) {
|
|
3209
|
+
N = !0, A(), j(), M.fullRestart(), P();
|
|
2685
3210
|
return;
|
|
2686
3211
|
}
|
|
2687
|
-
|
|
2688
|
-
},
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
oe(), b && D !== void 0 && ve();
|
|
2699
|
-
}) : null, F, I = () => {
|
|
2700
|
-
F !== void 0 && (clearTimeout(F), F = void 0);
|
|
3212
|
+
S();
|
|
3213
|
+
}, F = !ve && h, Te = F ? y(b, w) : [];
|
|
3214
|
+
F && (M.attach(), x && P()), F && ae && Lr.set(b, () => {
|
|
3215
|
+
A(), j(), x && k !== void 0 && P();
|
|
3216
|
+
});
|
|
3217
|
+
let Ee = F && !U() ? Ar(() => [b.ownerDocument.documentElement], () => {
|
|
3218
|
+
A(), j(), x && k !== void 0 && P();
|
|
3219
|
+
}) : null, I = F && ae ? jr(() => [b.ownerDocument.documentElement], () => {
|
|
3220
|
+
A(), j(), x && k !== void 0 && P();
|
|
3221
|
+
}) : null, Oe, ke = () => {
|
|
3222
|
+
Oe !== void 0 && (clearTimeout(Oe), Oe = void 0);
|
|
2701
3223
|
};
|
|
2702
|
-
if (
|
|
2703
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
2704
|
-
for (let { element: t, motion: n } of
|
|
2705
|
-
let i =
|
|
3224
|
+
if (A = ke, F && x) {
|
|
3225
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = J(O, b, e), n = E ? J(E, b, e) : 0, r = 0;
|
|
3226
|
+
for (let { element: t, motion: n } of ne) {
|
|
3227
|
+
let i = J(n, t, e);
|
|
2706
3228
|
if (i === null) {
|
|
2707
3229
|
r = null;
|
|
2708
3230
|
break;
|
|
2709
3231
|
}
|
|
2710
3232
|
r = Math.max(r, i);
|
|
2711
3233
|
}
|
|
2712
|
-
let i =
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
3234
|
+
let i = 0;
|
|
3235
|
+
if (re.length > 0) {
|
|
3236
|
+
let t = u().decorator;
|
|
3237
|
+
if (t) for (let n of re) {
|
|
3238
|
+
let r = J(n, t, e);
|
|
3239
|
+
if (r === null) {
|
|
3240
|
+
i = null;
|
|
3241
|
+
break;
|
|
3242
|
+
}
|
|
3243
|
+
i = Math.max(i, r);
|
|
3244
|
+
}
|
|
3245
|
+
}
|
|
3246
|
+
let a = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3247
|
+
a !== null && a + 17 < ye + le && (Oe = setTimeout(() => {
|
|
3248
|
+
Oe = void 0, Ce() && (b.removeEventListener("animationend", _e), ce(), ge(), me());
|
|
3249
|
+
}, a + 17));
|
|
3250
|
+
}
|
|
3251
|
+
let L, Ae = () => {
|
|
3252
|
+
L !== void 0 && (clearTimeout(L), L = void 0);
|
|
3253
|
+
};
|
|
3254
|
+
if (j = Ae, F && r) {
|
|
3255
|
+
let e = J(O, b, 1), t = E ? J(E, b, 1) : 0, n = 0;
|
|
3256
|
+
for (let { element: e, motion: t } of ne) {
|
|
3257
|
+
let r = J(t, e, 1);
|
|
3258
|
+
if (r === null) {
|
|
3259
|
+
n = null;
|
|
3260
|
+
break;
|
|
3261
|
+
}
|
|
3262
|
+
n = Math.max(n, r);
|
|
3263
|
+
}
|
|
3264
|
+
let i = 0;
|
|
3265
|
+
if (re.length > 0) {
|
|
3266
|
+
let e = u().decorator;
|
|
3267
|
+
if (e) for (let t of re) {
|
|
3268
|
+
let n = J(t, e, 1);
|
|
3269
|
+
if (n === null) {
|
|
3270
|
+
i = null;
|
|
3271
|
+
break;
|
|
3272
|
+
}
|
|
3273
|
+
i = Math.max(i, n);
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
let a = e !== null && t !== null && n !== null && i !== null ? Math.max(e, t, n, i) : null;
|
|
3277
|
+
a !== null && (L = setTimeout(() => {
|
|
3278
|
+
L = void 0;
|
|
3279
|
+
let e = r;
|
|
3280
|
+
e && (r = null, e());
|
|
3281
|
+
}, a));
|
|
2716
3282
|
}
|
|
2717
3283
|
return () => {
|
|
2718
|
-
if (
|
|
2719
|
-
|
|
2720
|
-
for (let e of
|
|
3284
|
+
if (xe !== void 0 && clearTimeout(xe), ue !== void 0 && clearTimeout(ue), pe(), oe?.(), Ee?.(), I?.(), ke(), Ae(), b.removeEventListener("animationend", _e), F) {
|
|
3285
|
+
M.detach();
|
|
3286
|
+
for (let e of Te) e();
|
|
2721
3287
|
}
|
|
2722
|
-
|
|
3288
|
+
ce(), ve?.(), x && e.getTransitionTaskId() !== x && n.delete(x);
|
|
2723
3289
|
};
|
|
2724
3290
|
},
|
|
2725
|
-
activeResumeEntryCount: () =>
|
|
3291
|
+
activeResumeEntryCount: () => n.size
|
|
2726
3292
|
};
|
|
2727
3293
|
}
|
|
2728
3294
|
//#endregion
|
|
2729
3295
|
//#region src/utils/findScrollable.ts
|
|
2730
|
-
function
|
|
2731
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
3296
|
+
function Yr(e, t) {
|
|
3297
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = Xr(e);
|
|
2732
3298
|
if (!o) return {
|
|
2733
3299
|
element: null,
|
|
2734
3300
|
hasMarker: !1
|
|
2735
3301
|
};
|
|
2736
3302
|
let s = o.closest?.(r);
|
|
2737
|
-
if (s instanceof HTMLElement &&
|
|
3303
|
+
if (s instanceof HTMLElement && Zr(s, n) && (!a || Qr(s, n))) return {
|
|
2738
3304
|
element: s,
|
|
2739
3305
|
hasMarker: !0
|
|
2740
3306
|
};
|
|
2741
3307
|
let c = o, l = 0;
|
|
2742
3308
|
for (; c && l < i;) {
|
|
2743
|
-
if (
|
|
3309
|
+
if (Zr(c, n) && (!a || Qr(c, n))) return {
|
|
2744
3310
|
element: c,
|
|
2745
3311
|
hasMarker: !1
|
|
2746
3312
|
};
|
|
@@ -2751,7 +3317,7 @@ function Ln(e, t) {
|
|
|
2751
3317
|
hasMarker: !1
|
|
2752
3318
|
};
|
|
2753
3319
|
}
|
|
2754
|
-
function
|
|
3320
|
+
function Xr(e) {
|
|
2755
3321
|
if (!e) return null;
|
|
2756
3322
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
2757
3323
|
if (n && n.length) {
|
|
@@ -2759,228 +3325,227 @@ function Rn(e) {
|
|
|
2759
3325
|
}
|
|
2760
3326
|
return e instanceof HTMLElement ? e : null;
|
|
2761
3327
|
}
|
|
2762
|
-
function
|
|
3328
|
+
function Zr(e, t) {
|
|
2763
3329
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
2764
3330
|
}
|
|
2765
|
-
function
|
|
2766
|
-
if (!
|
|
3331
|
+
function Qr(e, t) {
|
|
3332
|
+
if (!Zr(e, t) || typeof window > "u") return !1;
|
|
2767
3333
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
2768
3334
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
2769
3335
|
}
|
|
2770
3336
|
//#endregion
|
|
2771
3337
|
//#region src/core/engine/createSwipeController.ts
|
|
2772
|
-
var
|
|
2773
|
-
function
|
|
2774
|
-
let t =
|
|
3338
|
+
var $r = "data-flemo-skip-animation";
|
|
3339
|
+
function ei(e) {
|
|
3340
|
+
let t = Symbol("flemo-swipe-layer"), n = null, r = null, i = {
|
|
2775
3341
|
current: [],
|
|
2776
3342
|
prev: []
|
|
2777
|
-
},
|
|
3343
|
+
}, a = {
|
|
2778
3344
|
current: [],
|
|
2779
3345
|
prev: []
|
|
2780
|
-
},
|
|
3346
|
+
}, o = !1, s = !1, c = !1, l = {
|
|
2781
3347
|
x: 0,
|
|
2782
3348
|
y: 0
|
|
2783
|
-
},
|
|
3349
|
+
}, u = {
|
|
2784
3350
|
x: 0,
|
|
2785
3351
|
y: 0
|
|
2786
|
-
},
|
|
3352
|
+
}, d = 0, f = {
|
|
2787
3353
|
x: 0,
|
|
2788
3354
|
y: 0
|
|
2789
|
-
},
|
|
3355
|
+
}, p = {
|
|
2790
3356
|
element: null,
|
|
2791
3357
|
hasMarker: !1
|
|
2792
|
-
},
|
|
3358
|
+
}, m = {
|
|
2793
3359
|
element: null,
|
|
2794
3360
|
hasMarker: !1
|
|
2795
|
-
},
|
|
3361
|
+
}, h = 0, g = 0, _ = (e) => ({
|
|
2796
3362
|
point: {
|
|
2797
3363
|
x: e.clientX,
|
|
2798
3364
|
y: e.clientY
|
|
2799
3365
|
},
|
|
2800
3366
|
offset: {
|
|
2801
|
-
x: e.clientX - c.x,
|
|
2802
|
-
y: e.clientY - c.y
|
|
2803
|
-
},
|
|
2804
|
-
delta: {
|
|
2805
3367
|
x: e.clientX - l.x,
|
|
2806
3368
|
y: e.clientY - l.y
|
|
2807
3369
|
},
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
3370
|
+
delta: {
|
|
3371
|
+
x: e.clientX - u.x,
|
|
3372
|
+
y: e.clientY - u.y
|
|
3373
|
+
},
|
|
3374
|
+
velocity: f
|
|
3375
|
+
}), v = (e) => {
|
|
3376
|
+
let t = e.timeStamp, n = Math.max(1, t - d);
|
|
3377
|
+
f = {
|
|
3378
|
+
x: (e.clientX - u.x) / n * 1e3,
|
|
3379
|
+
y: (e.clientY - u.y) / n * 1e3
|
|
3380
|
+
}, u = {
|
|
2815
3381
|
x: e.clientX,
|
|
2816
3382
|
y: e.clientY
|
|
2817
|
-
},
|
|
2818
|
-
},
|
|
2819
|
-
let
|
|
2820
|
-
if (
|
|
2821
|
-
else if (
|
|
2822
|
-
return
|
|
2823
|
-
},
|
|
2824
|
-
let
|
|
2825
|
-
|
|
2826
|
-
let
|
|
2827
|
-
if (
|
|
2828
|
-
let
|
|
2829
|
-
|
|
2830
|
-
}
|
|
2831
|
-
|
|
2832
|
-
current:
|
|
2833
|
-
prev:
|
|
3383
|
+
}, d = t;
|
|
3384
|
+
}, y = (r, a, o) => {
|
|
3385
|
+
let s = K(r, a, o, t);
|
|
3386
|
+
if (r === e.getElements().scope) for (let e of i.current) K(e, a, o, t);
|
|
3387
|
+
else if (r === n) for (let e of i.prev) K(e, a, o, t);
|
|
3388
|
+
return s;
|
|
3389
|
+
}, b = (n) => {
|
|
3390
|
+
let r = e.getPartnerBars(), a = [], { sharedTopBar: o, sharedBottomBar: s } = e.getElements();
|
|
3391
|
+
o && e.hasSharedTopBar() && !r?.topBar && a.push(o), s && e.hasSharedBottomBar() && !r?.bottomBar && a.push(s);
|
|
3392
|
+
let c = [];
|
|
3393
|
+
if (n) {
|
|
3394
|
+
let t = n.querySelector("[data-flemo-bar=\"app\"]"), r = n.querySelector("[data-flemo-bar=\"nav\"]");
|
|
3395
|
+
t && !e.hasSharedTopBar() && c.push(t), r && !e.hasSharedBottomBar() && c.push(r);
|
|
3396
|
+
}
|
|
3397
|
+
i = {
|
|
3398
|
+
current: a,
|
|
3399
|
+
prev: c
|
|
2834
3400
|
};
|
|
2835
|
-
let
|
|
2836
|
-
for (let
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
for (let e of
|
|
2840
|
-
|
|
2841
|
-
r = {
|
|
3401
|
+
for (let n of a) wn(n, e.getTransition(), !1, t);
|
|
3402
|
+
for (let n of c) wn(n, e.getTransition(), !1, t);
|
|
3403
|
+
}, x = () => {
|
|
3404
|
+
for (let e of i.current) G(e, void 0, t), X(e, t);
|
|
3405
|
+
for (let e of i.prev) G(e, void 0, t), X(e, t);
|
|
3406
|
+
i = {
|
|
2842
3407
|
current: [],
|
|
2843
3408
|
prev: []
|
|
2844
3409
|
};
|
|
2845
|
-
},
|
|
3410
|
+
}, S = (t) => {
|
|
2846
3411
|
let { screenContainer: n } = e.getElements(), r = (e) => Array.from(e.querySelectorAll("[data-flemo-part-name]"));
|
|
2847
|
-
|
|
3412
|
+
a = {
|
|
2848
3413
|
current: r(n),
|
|
2849
3414
|
prev: r(t)
|
|
2850
3415
|
};
|
|
2851
|
-
},
|
|
2852
|
-
let
|
|
2853
|
-
let
|
|
2854
|
-
if (!
|
|
2855
|
-
let
|
|
2856
|
-
animate:
|
|
2857
|
-
element:
|
|
2858
|
-
active:
|
|
3416
|
+
}, C = (e, n, r) => {
|
|
3417
|
+
let i = (i, a) => {
|
|
3418
|
+
let o = z.get(i.getAttribute("data-flemo-part-name"));
|
|
3419
|
+
if (!o) return;
|
|
3420
|
+
let s = {
|
|
3421
|
+
animate: (e, n, r) => K(e, n, r, t),
|
|
3422
|
+
element: i,
|
|
3423
|
+
active: a
|
|
2859
3424
|
};
|
|
2860
|
-
e === "swipe" ?
|
|
3425
|
+
e === "swipe" ? o.onSwipe?.(n, r, s) : e === "start" ? o.onSwipeStart?.(n, s) : o.onSwipeEnd?.(n, s);
|
|
2861
3426
|
};
|
|
2862
|
-
for (let e of
|
|
2863
|
-
for (let e of
|
|
2864
|
-
},
|
|
2865
|
-
for (let e of [...
|
|
2866
|
-
|
|
3427
|
+
for (let e of a.current) i(e, !0);
|
|
3428
|
+
for (let e of a.prev) i(e, !1);
|
|
3429
|
+
}, w = () => {
|
|
3430
|
+
for (let e of [...a.current, ...a.prev]) G(e, void 0, t);
|
|
3431
|
+
a = {
|
|
2867
3432
|
current: [],
|
|
2868
3433
|
prev: []
|
|
2869
3434
|
};
|
|
2870
|
-
},
|
|
3435
|
+
}, T = async (t) => {
|
|
2871
3436
|
let i = e.getTransition();
|
|
2872
3437
|
if (!i.swipeDirection || e.getViewportScrollHeight() > 10) return;
|
|
2873
|
-
let { scope: a, screenContainer: o, decorator:
|
|
3438
|
+
let { scope: a, screenContainer: o, decorator: s } = e.getElements();
|
|
2874
3439
|
if (!a) return;
|
|
2875
3440
|
let p = o?.previousElementSibling ?? null;
|
|
2876
|
-
if (
|
|
2877
|
-
|
|
2878
|
-
x:
|
|
2879
|
-
y:
|
|
2880
|
-
},
|
|
2881
|
-
x:
|
|
2882
|
-
y:
|
|
2883
|
-
},
|
|
3441
|
+
if (n = p?.querySelector("[data-flemo-screen]") ?? null, r = p?.querySelector("[data-flemo-decorator]") ?? null, !n) return;
|
|
3442
|
+
c = !0, l = {
|
|
3443
|
+
x: t.clientX,
|
|
3444
|
+
y: t.clientY
|
|
3445
|
+
}, u = {
|
|
3446
|
+
x: t.clientX,
|
|
3447
|
+
y: t.clientY
|
|
3448
|
+
}, d = t.timeStamp, f = {
|
|
2884
3449
|
x: 0,
|
|
2885
3450
|
y: 0
|
|
2886
|
-
}, a.setPointerCapture(
|
|
3451
|
+
}, a.setPointerCapture(t.pointerId), b(p), S(p);
|
|
2887
3452
|
let m = e.getDecorator();
|
|
2888
|
-
await i.onSwipeStart(
|
|
2889
|
-
animate:
|
|
3453
|
+
await i.onSwipeStart(t, _(t), {
|
|
3454
|
+
animate: y,
|
|
2890
3455
|
currentScreen: a,
|
|
2891
|
-
prevScreen:
|
|
3456
|
+
prevScreen: n,
|
|
2892
3457
|
onStart: (e) => {
|
|
2893
3458
|
m?.onSwipeStart?.(e, {
|
|
2894
|
-
animate:
|
|
2895
|
-
currentDecorator:
|
|
2896
|
-
prevDecorator:
|
|
2897
|
-
}),
|
|
3459
|
+
animate: K,
|
|
3460
|
+
currentDecorator: s,
|
|
3461
|
+
prevDecorator: r
|
|
3462
|
+
}), C("start", e, 0);
|
|
2898
3463
|
}
|
|
2899
|
-
}) ? e.setDragStatus("PENDING") : (e.setDragStatus("IDLE"),
|
|
2900
|
-
},
|
|
3464
|
+
}) ? e.setDragStatus("PENDING") : (e.setDragStatus("IDLE"), c = !1, x());
|
|
3465
|
+
}, ee = (t) => {
|
|
2901
3466
|
let i = e.getTransition();
|
|
2902
|
-
if (!i.swipeDirection || !
|
|
2903
|
-
|
|
2904
|
-
let { scope: a, decorator: o } = e.getElements(),
|
|
2905
|
-
i.onSwipe(
|
|
2906
|
-
animate:
|
|
3467
|
+
if (!i.swipeDirection || !c || e.getViewportScrollHeight() > 10) return;
|
|
3468
|
+
v(t);
|
|
3469
|
+
let { scope: a, decorator: o } = e.getElements(), s = e.getDecorator();
|
|
3470
|
+
i.onSwipe(t, _(t), {
|
|
3471
|
+
animate: y,
|
|
2907
3472
|
currentScreen: a,
|
|
2908
|
-
prevScreen:
|
|
3473
|
+
prevScreen: n,
|
|
2909
3474
|
onProgress: (e, t) => {
|
|
2910
|
-
|
|
2911
|
-
animate:
|
|
3475
|
+
s?.onSwipe?.(e, t, {
|
|
3476
|
+
animate: K,
|
|
2912
3477
|
currentDecorator: o,
|
|
2913
|
-
prevDecorator:
|
|
2914
|
-
}),
|
|
3478
|
+
prevDecorator: r
|
|
3479
|
+
}), C("swipe", e, t);
|
|
2915
3480
|
}
|
|
2916
3481
|
});
|
|
2917
|
-
},
|
|
2918
|
-
let
|
|
2919
|
-
if (!
|
|
2920
|
-
|
|
2921
|
-
let { scope:
|
|
2922
|
-
|
|
2923
|
-
let
|
|
2924
|
-
if (await
|
|
2925
|
-
animate:
|
|
2926
|
-
currentScreen:
|
|
2927
|
-
prevScreen:
|
|
3482
|
+
}, te = async (o) => {
|
|
3483
|
+
let s = e.getTransition();
|
|
3484
|
+
if (!s.swipeDirection || !c) return;
|
|
3485
|
+
c = !1;
|
|
3486
|
+
let { scope: l, decorator: u } = e.getElements();
|
|
3487
|
+
l && l.hasPointerCapture(o.pointerId) && l.releasePointerCapture(o.pointerId);
|
|
3488
|
+
let d = e.getDecorator();
|
|
3489
|
+
if (await s.onSwipeEnd(o, _(o), {
|
|
3490
|
+
animate: y,
|
|
3491
|
+
currentScreen: l,
|
|
3492
|
+
prevScreen: n,
|
|
2928
3493
|
onStart: (e) => {
|
|
2929
|
-
|
|
2930
|
-
animate:
|
|
2931
|
-
currentDecorator:
|
|
2932
|
-
prevDecorator:
|
|
2933
|
-
}),
|
|
3494
|
+
d?.onSwipeEnd?.(e, {
|
|
3495
|
+
animate: K,
|
|
3496
|
+
currentDecorator: u,
|
|
3497
|
+
prevDecorator: r
|
|
3498
|
+
}), C("end", e, 0);
|
|
2934
3499
|
}
|
|
2935
3500
|
})) {
|
|
2936
|
-
|
|
2937
|
-
for (let e of
|
|
2938
|
-
for (let e of
|
|
2939
|
-
|
|
3501
|
+
l?.setAttribute($r, "true"), u?.setAttribute($r, "true");
|
|
3502
|
+
for (let e of i.current) X(e, t);
|
|
3503
|
+
for (let e of i.prev) G(e, void 0, t), X(e, t);
|
|
3504
|
+
i = {
|
|
2940
3505
|
current: [],
|
|
2941
3506
|
prev: []
|
|
2942
|
-
},
|
|
3507
|
+
}, a = {
|
|
2943
3508
|
current: [],
|
|
2944
3509
|
prev: []
|
|
2945
3510
|
}, e.back();
|
|
2946
|
-
} else
|
|
3511
|
+
} else l && G(l, void 0, t), n && G(n, void 0, t), u && G(u), r && G(r), x(), w(), e.setDragStatus("IDLE");
|
|
2947
3512
|
};
|
|
2948
3513
|
return {
|
|
2949
3514
|
pointerDown: (t) => {
|
|
2950
|
-
e.isReadyForDrag() && (
|
|
3515
|
+
e.isReadyForDrag() && (p = Yr(t.target, {
|
|
2951
3516
|
direction: "x",
|
|
2952
3517
|
verifyByScroll: !0
|
|
2953
|
-
}),
|
|
3518
|
+
}), m = Yr(t.target, {
|
|
2954
3519
|
direction: "y",
|
|
2955
3520
|
verifyByScroll: !0
|
|
2956
|
-
}),
|
|
3521
|
+
}), h = t.clientX, g = t.clientY, (!p.element && !m.element || p.element || m.element) && (o = !0));
|
|
2957
3522
|
},
|
|
2958
3523
|
pointerMove: (t) => {
|
|
2959
3524
|
if (e.getViewportScrollHeight() > 10) return;
|
|
2960
|
-
if (
|
|
2961
|
-
|
|
3525
|
+
if (c) {
|
|
3526
|
+
ee(t);
|
|
2962
3527
|
return;
|
|
2963
3528
|
}
|
|
2964
|
-
let n = e.getTransition().swipeDirection, r = !
|
|
2965
|
-
if (
|
|
2966
|
-
|
|
2967
|
-
let e = t.clientY -
|
|
2968
|
-
(n === "y" && e > 0 || n === "x" && r > 0) &&
|
|
2969
|
-
} else if (
|
|
2970
|
-
let e = t.clientX -
|
|
2971
|
-
(n === "y" && (i ||
|
|
3529
|
+
let n = e.getTransition().swipeDirection, r = !p.element && !m.element;
|
|
3530
|
+
if (o && r) {
|
|
3531
|
+
o = !1, s = !0;
|
|
3532
|
+
let e = t.clientY - g, r = t.clientX - h;
|
|
3533
|
+
(n === "y" && e > 0 || n === "x" && r > 0) && T(t);
|
|
3534
|
+
} else if (o && !r) {
|
|
3535
|
+
let e = t.clientX - h, r = t.clientY - g, i = m.element && m.element.scrollTop <= 0, a = p.element && p.element.scrollLeft <= 0 && p.hasMarker;
|
|
3536
|
+
(n === "y" && (i || p.element) && r > 0 && Math.abs(e) < 2 || n === "x" && (a || m.element) && e > 0 && Math.abs(r) < 2) && (o = !1, s = !0, T(t));
|
|
2972
3537
|
}
|
|
2973
3538
|
},
|
|
2974
3539
|
pointerUp: (e) => {
|
|
2975
|
-
|
|
3540
|
+
o = !1, s = !1, c && te(e);
|
|
2976
3541
|
},
|
|
2977
|
-
shouldPreventTouch: () =>
|
|
3542
|
+
shouldPreventTouch: () => s
|
|
2978
3543
|
};
|
|
2979
3544
|
}
|
|
2980
3545
|
//#endregion
|
|
2981
3546
|
//#region src/screen/computeBarRiding.ts
|
|
2982
|
-
function
|
|
2983
|
-
return
|
|
3547
|
+
function ti(e) {
|
|
3548
|
+
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? {
|
|
2984
3549
|
app: !1,
|
|
2985
3550
|
nav: !1
|
|
2986
3551
|
} : {
|
|
@@ -2990,31 +3555,31 @@ function Un(e) {
|
|
|
2990
3555
|
}
|
|
2991
3556
|
//#endregion
|
|
2992
3557
|
//#region src/screen/pendingNetwork.ts
|
|
2993
|
-
var
|
|
2994
|
-
|
|
2995
|
-
},
|
|
2996
|
-
if (!(
|
|
2997
|
-
if (
|
|
3558
|
+
var ni = 0, ri = !1, ii = () => {
|
|
3559
|
+
ni = Math.max(0, ni - 1);
|
|
3560
|
+
}, ai = () => {
|
|
3561
|
+
if (!(ri || typeof window > "u")) {
|
|
3562
|
+
if (ri = !0, typeof window.fetch == "function") {
|
|
2998
3563
|
let e = window.fetch.bind(window);
|
|
2999
3564
|
window.fetch = (...t) => {
|
|
3000
|
-
|
|
3565
|
+
ni += 1;
|
|
3001
3566
|
let n;
|
|
3002
3567
|
try {
|
|
3003
3568
|
n = e(...t);
|
|
3004
3569
|
} catch (e) {
|
|
3005
|
-
throw
|
|
3570
|
+
throw ii(), e;
|
|
3006
3571
|
}
|
|
3007
|
-
return n.then((e) => (
|
|
3008
|
-
throw
|
|
3572
|
+
return n.then((e) => (ii(), e), (e) => {
|
|
3573
|
+
throw ii(), e;
|
|
3009
3574
|
});
|
|
3010
3575
|
};
|
|
3011
3576
|
}
|
|
3012
3577
|
if (typeof XMLHttpRequest == "function") {
|
|
3013
3578
|
let e = XMLHttpRequest.prototype.send;
|
|
3014
3579
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
3015
|
-
|
|
3580
|
+
ni += 1;
|
|
3016
3581
|
let n = !1, r = () => {
|
|
3017
|
-
n || (n = !0,
|
|
3582
|
+
n || (n = !0, ii());
|
|
3018
3583
|
};
|
|
3019
3584
|
this.addEventListener("loadend", r);
|
|
3020
3585
|
try {
|
|
@@ -3025,28 +3590,28 @@ var Wn = 0, Gn = !1, Kn = () => {
|
|
|
3025
3590
|
};
|
|
3026
3591
|
}
|
|
3027
3592
|
}
|
|
3028
|
-
},
|
|
3593
|
+
}, oi = () => (ai(), ni > 0);
|
|
3029
3594
|
//#endregion
|
|
3030
3595
|
//#region src/screen/animStartAnchor.ts
|
|
3031
|
-
function
|
|
3032
|
-
return
|
|
3596
|
+
function si(e) {
|
|
3597
|
+
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
3033
3598
|
}
|
|
3034
|
-
var
|
|
3035
|
-
function
|
|
3036
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
3599
|
+
var ci = 300, li = 20;
|
|
3600
|
+
function ui(e) {
|
|
3601
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, li);
|
|
3037
3602
|
}
|
|
3038
|
-
function
|
|
3039
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
3603
|
+
function di(e) {
|
|
3604
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of ui(e)) t.decode().catch(() => {});
|
|
3040
3605
|
}
|
|
3041
|
-
var
|
|
3606
|
+
var fi = 3, pi = 40, mi = (e) => {
|
|
3042
3607
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
3043
|
-
let t = e.querySelectorAll("*").length;
|
|
3608
|
+
let t = Math.max(1, e.querySelectorAll("*").length);
|
|
3044
3609
|
/* v8 ignore stop */
|
|
3045
|
-
return
|
|
3046
|
-
},
|
|
3610
|
+
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * pi) / t < fi;
|
|
3611
|
+
}, hi = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
3047
3612
|
let t = e.animationName;
|
|
3048
3613
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
3049
|
-
}),
|
|
3614
|
+
}), gi = (e) => {
|
|
3050
3615
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
3051
3616
|
which already requires querySelectorAll. */
|
|
3052
3617
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -3054,12 +3619,12 @@ var er = 3, tr = 40, nr = 24, rr = (e) => {
|
|
|
3054
3619
|
the guard shields exotic embedders. */
|
|
3055
3620
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
3056
3621
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
3057
|
-
if (r >=
|
|
3622
|
+
if (r >= li) break;
|
|
3058
3623
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
3059
3624
|
}
|
|
3060
3625
|
return !1;
|
|
3061
3626
|
};
|
|
3062
|
-
function
|
|
3627
|
+
function _i(e, t = {}) {
|
|
3063
3628
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
3064
3629
|
if (n) return;
|
|
3065
3630
|
let r = t.scope;
|
|
@@ -3067,7 +3632,7 @@ function or(e, t = {}) {
|
|
|
3067
3632
|
e();
|
|
3068
3633
|
return;
|
|
3069
3634
|
}
|
|
3070
|
-
let i =
|
|
3635
|
+
let i = ui(r);
|
|
3071
3636
|
if (i.length === 0) {
|
|
3072
3637
|
e();
|
|
3073
3638
|
return;
|
|
@@ -3084,15 +3649,15 @@ function or(e, t = {}) {
|
|
|
3084
3649
|
e();
|
|
3085
3650
|
return;
|
|
3086
3651
|
}
|
|
3087
|
-
if (!
|
|
3652
|
+
if (!mi(r)) {
|
|
3088
3653
|
e();
|
|
3089
3654
|
return;
|
|
3090
3655
|
}
|
|
3091
3656
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
3092
3657
|
the fallback only shields exotic embedders. */
|
|
3093
|
-
let i = typeof performance < "u" ? performance.now() : 0, o = () => (typeof performance < "u" ? performance.now() : 0) - i, s = [], c = !1, l = !1, u = () =>
|
|
3658
|
+
let i = typeof performance < "u" ? performance.now() : 0, o = () => (typeof performance < "u" ? performance.now() : 0) - i, s = [], c = !1, l = !1, u = () => mi(r) && hi(r), d = () => oi() || gi(r), f = () => {
|
|
3094
3659
|
l || (l = !0, h.disconnect(), clearTimeout(g), clearTimeout(_), clearTimeout(v), s.forEach((e) => cancelAnimationFrame(e)), s = [], e());
|
|
3095
|
-
}, p = () => !
|
|
3660
|
+
}, p = () => !mi(r) && !d() ? 2 : 6, m = () => {
|
|
3096
3661
|
s.forEach((e) => cancelAnimationFrame(e)), s = [];
|
|
3097
3662
|
let e = (t) => {
|
|
3098
3663
|
if (t <= 0) {
|
|
@@ -3150,14 +3715,14 @@ function or(e, t = {}) {
|
|
|
3150
3715
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
3151
3716
|
};
|
|
3152
3717
|
}
|
|
3153
|
-
function
|
|
3154
|
-
let n =
|
|
3718
|
+
function vi(e, t = {}) {
|
|
3719
|
+
let n = _i(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
3155
3720
|
return () => {
|
|
3156
3721
|
n(), clearTimeout(i);
|
|
3157
3722
|
};
|
|
3158
3723
|
}
|
|
3159
|
-
var
|
|
3160
|
-
function
|
|
3724
|
+
var yi = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
3725
|
+
function bi() {
|
|
3161
3726
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
3162
3727
|
clearTimeout(n.backstop), e.delete(t);
|
|
3163
3728
|
let r = [...n.members];
|
|
@@ -3167,14 +3732,14 @@ function lr() {
|
|
|
3167
3732
|
return { join: (r, i, a) => {
|
|
3168
3733
|
let o = e.get(r);
|
|
3169
3734
|
if (o) {
|
|
3170
|
-
let e =
|
|
3735
|
+
let e = yi(a);
|
|
3171
3736
|
if (e > o.backstopMs) {
|
|
3172
3737
|
clearTimeout(o.backstop);
|
|
3173
3738
|
let n = o;
|
|
3174
3739
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
3175
3740
|
}
|
|
3176
3741
|
} else {
|
|
3177
|
-
let n =
|
|
3742
|
+
let n = yi(a), i = {
|
|
3178
3743
|
members: /* @__PURE__ */ new Set(),
|
|
3179
3744
|
backstop: setTimeout(() => t(r, i), n),
|
|
3180
3745
|
backstopMs: n
|
|
@@ -3184,7 +3749,7 @@ function lr() {
|
|
|
3184
3749
|
let s = o, c = {
|
|
3185
3750
|
release: i,
|
|
3186
3751
|
ready: !1,
|
|
3187
|
-
cancelReadiness:
|
|
3752
|
+
cancelReadiness: _i(() => {
|
|
3188
3753
|
c.ready = !0, n(s) && t(r, s);
|
|
3189
3754
|
}, a)
|
|
3190
3755
|
};
|
|
@@ -3201,7 +3766,7 @@ function lr() {
|
|
|
3201
3766
|
}
|
|
3202
3767
|
//#endregion
|
|
3203
3768
|
//#region src/screen/observeBarHeight.ts
|
|
3204
|
-
function
|
|
3769
|
+
function xi(e, t) {
|
|
3205
3770
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
3206
3771
|
let n = new ResizeObserver(([e]) => {
|
|
3207
3772
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -3212,14 +3777,14 @@ function ur(e, t) {
|
|
|
3212
3777
|
}
|
|
3213
3778
|
//#endregion
|
|
3214
3779
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
3215
|
-
var
|
|
3216
|
-
function
|
|
3780
|
+
var Si = 0;
|
|
3781
|
+
function Ci(e) {
|
|
3217
3782
|
let t = 0, n = () => {
|
|
3218
3783
|
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
3219
3784
|
let t = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
3220
3785
|
t = t < 0 ? 0 : t;
|
|
3221
|
-
let n = t -
|
|
3222
|
-
n = n < 0 ? 0 : n,
|
|
3786
|
+
let n = t - Si;
|
|
3787
|
+
n = n < 0 ? 0 : n, Si ||= t, e(t, n);
|
|
3223
3788
|
});
|
|
3224
3789
|
};
|
|
3225
3790
|
return window.visualViewport?.addEventListener("resize", n), window.visualViewport?.addEventListener("scroll", n), () => {
|
|
@@ -3227,31 +3792,73 @@ function fr(e) {
|
|
|
3227
3792
|
};
|
|
3228
3793
|
}
|
|
3229
3794
|
//#endregion
|
|
3795
|
+
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
3796
|
+
var wi = () => {}, Ti = "data-flemo-gpu-prewarm", Ei = 2e3, Di = 1200, Oi = 120, ki = 3, Ai = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", ji = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", Mi = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", Ni = "cold", Pi = 0, Fi = null;
|
|
3797
|
+
function Ii() {
|
|
3798
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !U()) return wi;
|
|
3799
|
+
if (Pi += 1, Ni === "cold") {
|
|
3800
|
+
Ni = "scheduled";
|
|
3801
|
+
let e = () => document.querySelector("[data-flemo-status=\"PUSHING\"],[data-flemo-status=\"POPPING\"],[data-flemo-status=\"REPLACING\"]") !== null, t = () => {
|
|
3802
|
+
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: Ei }) : null, t = e === null ? setTimeout(n, Di) : null;
|
|
3803
|
+
Fi = () => {
|
|
3804
|
+
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
3805
|
+
};
|
|
3806
|
+
}, n = () => {
|
|
3807
|
+
if (e()) {
|
|
3808
|
+
t();
|
|
3809
|
+
return;
|
|
3810
|
+
}
|
|
3811
|
+
Fi = null, Ni = "done";
|
|
3812
|
+
let n = document.createElement("div");
|
|
3813
|
+
n.setAttribute(Ti, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", Ai);
|
|
3814
|
+
let r = document.createElement("div");
|
|
3815
|
+
r.setAttribute("style", ji), r.textContent = "flemo";
|
|
3816
|
+
let i = document.createElement("div");
|
|
3817
|
+
i.setAttribute("style", Mi), n.append(r, i), document.body.appendChild(n);
|
|
3818
|
+
try {
|
|
3819
|
+
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
3820
|
+
duration: Oi,
|
|
3821
|
+
iterations: ki
|
|
3822
|
+
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
3823
|
+
duration: Oi,
|
|
3824
|
+
iterations: ki
|
|
3825
|
+
});
|
|
3826
|
+
} catch {}
|
|
3827
|
+
setTimeout(() => n.remove(), 450);
|
|
3828
|
+
};
|
|
3829
|
+
t();
|
|
3830
|
+
}
|
|
3831
|
+
let e = !1;
|
|
3832
|
+
return () => {
|
|
3833
|
+
e || (e = !0, Pi = Math.max(0, Pi - 1), Pi === 0 && Ni === "scheduled" && (Fi?.(), Fi = null, Ni = "cold"));
|
|
3834
|
+
};
|
|
3835
|
+
}
|
|
3836
|
+
//#endregion
|
|
3230
3837
|
//#region src/core/engine/imageDecodeOffloader.ts
|
|
3231
|
-
var
|
|
3838
|
+
var Li = 8, Ri = 2, Q = 96, zi = 15e3, Bi = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", Vi = "data-flemo-image-src", Hi = "flemo-image-scale-v1", Ui = (e) => {
|
|
3232
3839
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
3233
3840
|
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
3234
3841
|
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
3235
|
-
},
|
|
3842
|
+
}, Wi = "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};", Gi = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", Ki = async (e, t) => {
|
|
3236
3843
|
try {
|
|
3237
3844
|
if (typeof caches > "u") return;
|
|
3238
|
-
await (await caches.open(
|
|
3845
|
+
await (await caches.open(Hi)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
3239
3846
|
} catch {}
|
|
3240
|
-
},
|
|
3847
|
+
}, qi = async (e) => {
|
|
3241
3848
|
try {
|
|
3242
3849
|
if (typeof caches > "u") return null;
|
|
3243
|
-
let t = await (await caches.open(
|
|
3850
|
+
let t = await (await caches.open(Hi)).match(e);
|
|
3244
3851
|
return t ? await t.blob() : null;
|
|
3245
3852
|
} catch {
|
|
3246
3853
|
return null;
|
|
3247
3854
|
}
|
|
3248
3855
|
};
|
|
3249
|
-
function
|
|
3250
|
-
if (!
|
|
3856
|
+
function Ji(e) {
|
|
3857
|
+
if (!Gi()) return () => {};
|
|
3251
3858
|
let t = null, n = !1, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new WeakSet(), s = /* @__PURE__ */ new Set(), c = () => typeof devicePixelRatio == "number" ? devicePixelRatio : 1, l = () => {
|
|
3252
3859
|
if (t) return t;
|
|
3253
3860
|
try {
|
|
3254
|
-
t = new Worker(URL.createObjectURL(new Blob([
|
|
3861
|
+
t = new Worker(URL.createObjectURL(new Blob([Wi])));
|
|
3255
3862
|
} catch {
|
|
3256
3863
|
return null;
|
|
3257
3864
|
}
|
|
@@ -3262,7 +3869,7 @@ function wr(e) {
|
|
|
3262
3869
|
return;
|
|
3263
3870
|
}
|
|
3264
3871
|
let o = URL.createObjectURL(n);
|
|
3265
|
-
s.add(o),
|
|
3872
|
+
s.add(o), Ki(t, n), u(t, o);
|
|
3266
3873
|
}, t;
|
|
3267
3874
|
}, u = (e, t) => {
|
|
3268
3875
|
r.has(e) || r.set(e, t);
|
|
@@ -3272,12 +3879,12 @@ function wr(e) {
|
|
|
3272
3879
|
if (n) {
|
|
3273
3880
|
if (a.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
3274
3881
|
if (t && t !== "skip") {
|
|
3275
|
-
e.setAttribute(
|
|
3882
|
+
e.setAttribute(Vi, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
3276
3883
|
let r = e.closest("picture");
|
|
3277
3884
|
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
3278
3885
|
e.src = t;
|
|
3279
3886
|
}
|
|
3280
|
-
} else e.getAttribute("src") ===
|
|
3887
|
+
} else e.getAttribute("src") === Bi && (t && t !== "skip" ? e.src = t : (e.removeAttribute(Vi), e.src = n.url));
|
|
3281
3888
|
n.previousVisibility ? e.style.visibility = n.previousVisibility : e.style.removeProperty("visibility");
|
|
3282
3889
|
}
|
|
3283
3890
|
}, f = (e, t, n) => {
|
|
@@ -3285,7 +3892,7 @@ function wr(e) {
|
|
|
3285
3892
|
let a = l();
|
|
3286
3893
|
if (!a) return;
|
|
3287
3894
|
i.add(e);
|
|
3288
|
-
let o = Math.round(Math.max(Q, t * c()) *
|
|
3895
|
+
let o = Math.round(Math.max(Q, t * c()) * Ri), s = Math.max(t * n, 9216) * c() ** 2;
|
|
3289
3896
|
a.postMessage({
|
|
3290
3897
|
url: e,
|
|
3291
3898
|
targetWidth: o,
|
|
@@ -3297,13 +3904,13 @@ function wr(e) {
|
|
|
3297
3904
|
let t = {
|
|
3298
3905
|
url: "",
|
|
3299
3906
|
previousVisibility: e.style.visibility,
|
|
3300
|
-
timeout: setTimeout(() => d(e, null),
|
|
3907
|
+
timeout: setTimeout(() => d(e, null), zi),
|
|
3301
3908
|
responsive: !0
|
|
3302
3909
|
}, i = () => {
|
|
3303
3910
|
/* v8 ignore next -- consider() only routes elements with an https src
|
|
3304
3911
|
here, so the final fallback arm is unreachable. */
|
|
3305
3912
|
let i = e.currentSrc || e.getAttribute("src") || "", o = e.getBoundingClientRect();
|
|
3306
|
-
if (!(/^https?:/.test(i) &&
|
|
3913
|
+
if (!(/^https?:/.test(i) && Ui({
|
|
3307
3914
|
naturalWidth: e.naturalWidth,
|
|
3308
3915
|
naturalHeight: e.naturalHeight,
|
|
3309
3916
|
boxWidth: o.width || Q,
|
|
@@ -3319,7 +3926,7 @@ function wr(e) {
|
|
|
3319
3926
|
d(e, l);
|
|
3320
3927
|
return;
|
|
3321
3928
|
}
|
|
3322
|
-
|
|
3929
|
+
qi(i).then((t) => {
|
|
3323
3930
|
if (!(n || !a.has(e))) {
|
|
3324
3931
|
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
3325
3932
|
releases every held element of the url first, so a still-held
|
|
@@ -3358,14 +3965,14 @@ function wr(e) {
|
|
|
3358
3965
|
let i = r.get(t);
|
|
3359
3966
|
if (i !== "skip") {
|
|
3360
3967
|
if (i) {
|
|
3361
|
-
e.setAttribute(
|
|
3968
|
+
e.setAttribute(Vi, t), e.src = i;
|
|
3362
3969
|
return;
|
|
3363
3970
|
}
|
|
3364
3971
|
a.set(e, {
|
|
3365
3972
|
url: t,
|
|
3366
3973
|
previousVisibility: e.style.visibility,
|
|
3367
|
-
timeout: setTimeout(() => d(e, null),
|
|
3368
|
-
}), e.style.visibility = "hidden", e.setAttribute(
|
|
3974
|
+
timeout: setTimeout(() => d(e, null), zi)
|
|
3975
|
+
}), e.style.visibility = "hidden", e.setAttribute(Vi, t), e.src = Bi, qi(t).then((i) => {
|
|
3369
3976
|
if (n || r.has(t)) return;
|
|
3370
3977
|
if (i) {
|
|
3371
3978
|
let e = URL.createObjectURL(i);
|
|
@@ -3397,9 +4004,9 @@ function wr(e) {
|
|
|
3397
4004
|
};
|
|
3398
4005
|
}
|
|
3399
4006
|
var $ = null;
|
|
3400
|
-
function
|
|
4007
|
+
function Yi() {
|
|
3401
4008
|
return typeof document > "u" || !document.body ? () => {} : ($ ? $.count += 1 : $ = {
|
|
3402
|
-
dispose:
|
|
4009
|
+
dispose: Ji(document.body),
|
|
3403
4010
|
count: 1
|
|
3404
4011
|
}, () => {
|
|
3405
4012
|
$ && (--$.count, $.count <= 0 && ($.dispose(), $ = null));
|
|
@@ -3407,7 +4014,7 @@ function Tr() {
|
|
|
3407
4014
|
}
|
|
3408
4015
|
//#endregion
|
|
3409
4016
|
//#region src/utils/isOpaqueColor.ts
|
|
3410
|
-
function
|
|
4017
|
+
function Xi(e) {
|
|
3411
4018
|
let t = e.trim().toLowerCase();
|
|
3412
4019
|
if (t === "transparent" || t === "") return !1;
|
|
3413
4020
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -3418,7 +4025,7 @@ function Er(e) {
|
|
|
3418
4025
|
}
|
|
3419
4026
|
//#endregion
|
|
3420
4027
|
//#region src/utils/buildRoutePath.ts
|
|
3421
|
-
function
|
|
4028
|
+
function Zi(e, n) {
|
|
3422
4029
|
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();
|
|
3423
4030
|
return {
|
|
3424
4031
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -3426,4 +4033,4 @@ function Dr(e, n) {
|
|
|
3426
4033
|
};
|
|
3427
4034
|
}
|
|
3428
4035
|
//#endregion
|
|
3429
|
-
export {
|
|
4036
|
+
export { ci as ANIM_HOLD_RELEASE_BACKSTOP_MS, Vi as OFFLOADED_SRC_ATTR, Li as OVERSIZE_AREA_RATIO, yr as SKIP_ANIMATION_ATTR, s as TaskManger, si as animHoldKey, K as animateInline, it as animationName, ce as appendParamsQuery, ft as applyTransitionStyles, Zi as buildRoutePath, Qr as canProgrammaticallyScroll, G as clearInlineAnimation, Ze as collectAnimatedProperties, ct as compileTransitionStyles, ti as computeBarRiding, ye as computeScreenFreeze, ve as computeScreenFreezeMode, b as consumeSelfInducedPop, bi as createAnimHoldCoordinator, g as createBrowserHistoryDriver, Oe as createDecorator, c as createHistoryStore, x as createHistorySync, Ji as createImageDecodeOffloader, re as createMemoryHistoryDriver, O as createNavigateStore, se as createNavigationController, je as createPartTransition, ke as createRawDecorator, Me as createRawPartTransition, xe as createRawTransition, ge as createRouterScope, A as createScreenSelector, pe as createScreenStore, _ as createSelfPopGuard, le as createStepController, ei as createSwipeController, be as createTransition, Jr as createTransitionEngine, de as createTransitionStore, P as cupertino, R as decoratorMap, U as detectBlinkEngine, di as eagerlyDecodeImages, $e as easingToCss, Ii as ensureGpuPipelinePrewarm, Yi as ensureImageDecodeOffloader, ne as ensureScopeHistorySync, p as ensureWindowHistoryState, yt as enteringInitialStyle, Yr as findScrollable, l as getMatchedPathPattern, u as getParams, qt as holdCompositorWarm, Xi as isOpaqueColor, f as isServer, F as layout, y as markSelfInducedPop, fe as matchesPathname, Te as material, Ee as none, xi as observeBarHeight, Ci as observeViewportScrollHeight, Zr as overflowsAxis, Ae as overlay, z as partTransitionMap, k as readStepParams, vt as registerTransitionDefinitions, D as releaseScopeHistorySync, De as resolveTransition, vi as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, Ui as shouldOffloadImage, ue as subscribeStepParamsRestore, V as targetToDecls, I as transitionMap, H as variantHasAnimation };
|