@flemo/core 1.30.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/engine/__tests__/createSwipeController.dragHooks.test.d.ts +1 -0
- package/dist/core/engine/__tests__/createSwipeController.layerRelease.test.d.ts +1 -0
- package/dist/core/engine/__tests__/layerRiders.test.d.ts +1 -0
- package/dist/core/engine/createSwipeController.d.ts +5 -0
- package/dist/core/engine/diagnosticFlags.d.ts +1 -0
- package/dist/core/engine/flightRouting.d.ts +21 -0
- package/dist/core/engine/layerRiders.d.ts +21 -0
- package/dist/core/engine/types.d.ts +1 -0
- package/dist/dom/__tests__/stacking.test.d.ts +1 -0
- package/dist/dom/attributes.d.ts +126 -2
- package/dist/dom/stacking.d.ts +28 -0
- package/dist/history/store.d.ts +0 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.mjs +2228 -1014
- package/dist/morph/__tests__/attachMorph.test.d.ts +1 -0
- package/dist/morph/__tests__/morphAnimations.test.d.ts +1 -0
- package/dist/morph/__tests__/morphClip.test.d.ts +1 -0
- package/dist/morph/__tests__/morphGeometry.test.d.ts +1 -0
- package/dist/morph/__tests__/morphKeyframes.test.d.ts +1 -0
- package/dist/morph/__tests__/morphLayer.test.d.ts +1 -0
- package/dist/morph/__tests__/morphPaint.test.d.ts +1 -0
- package/dist/morph/__tests__/morphPose.test.d.ts +1 -0
- package/dist/morph/__tests__/morphSheet.test.d.ts +1 -0
- package/dist/morph/__tests__/morphSide.test.d.ts +1 -0
- package/dist/morph/__tests__/morphSwipe.test.d.ts +1 -0
- package/dist/morph/attachMorph.d.ts +59 -0
- package/dist/morph/morphAnimations.d.ts +2 -0
- package/dist/morph/morphClip.d.ts +31 -0
- package/dist/morph/morphGeometry.d.ts +111 -0
- package/dist/morph/morphKeyframes.d.ts +190 -0
- package/dist/morph/morphLayer.d.ts +14 -0
- package/dist/morph/morphPaint.d.ts +31 -0
- package/dist/morph/morphPose.d.ts +44 -0
- package/dist/morph/morphSheet.d.ts +9 -0
- package/dist/morph/morphSide.d.ts +43 -0
- package/dist/morph/morphSwipe.d.ts +24 -0
- package/dist/navigate/createNavigationController.d.ts +0 -1
- package/dist/transition/cubicBezier.d.ts +17 -0
- package/dist/transition/morphTransition/__tests__/createMorphTransition.test.d.ts +1 -0
- package/dist/transition/morphTransition/createMorphTransition.d.ts +13 -0
- package/dist/transition/morphTransition/createRawMorphTransition.d.ts +17 -0
- package/dist/transition/morphTransition/morphTransition.d.ts +2 -0
- package/dist/transition/morphTransition/shared.d.ts +2 -0
- package/dist/transition/morphTransition/text.d.ts +2 -0
- package/dist/transition/morphTransition/typing.d.ts +72 -0
- package/dist/transition/morphTransition/zoom.d.ts +2 -0
- package/dist/transition/registerTransitionDefinitions.d.ts +2 -1
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -294,8 +294,7 @@ function d(e, t, n, r) {
|
|
|
294
294
|
id: "root",
|
|
295
295
|
pathname: t,
|
|
296
296
|
params: u(e, t, n),
|
|
297
|
-
transitionName: r
|
|
298
|
-
layoutId: null
|
|
297
|
+
transitionName: r
|
|
299
298
|
};
|
|
300
299
|
}
|
|
301
300
|
//#endregion
|
|
@@ -312,8 +311,7 @@ function p(e, t, n = {}) {
|
|
|
312
311
|
index: 0,
|
|
313
312
|
status: "IDLE",
|
|
314
313
|
params: n,
|
|
315
|
-
transitionName: t
|
|
316
|
-
layoutId: null
|
|
314
|
+
transitionName: t
|
|
317
315
|
};
|
|
318
316
|
if (e === null) {
|
|
319
317
|
if (window.history.state?.index) return;
|
|
@@ -435,7 +433,6 @@ function x(e) {
|
|
|
435
433
|
pathname: r.pathname,
|
|
436
434
|
params: o.params,
|
|
437
435
|
transitionName: o.transitionName,
|
|
438
|
-
layoutId: o.layoutId,
|
|
439
436
|
frameIndex: o.index
|
|
440
437
|
};
|
|
441
438
|
if (_ === -1) {
|
|
@@ -572,12 +569,12 @@ function j(e) {
|
|
|
572
569
|
}
|
|
573
570
|
//#endregion
|
|
574
571
|
//#region src/navigate/store.ts
|
|
575
|
-
var
|
|
572
|
+
var M = [
|
|
576
573
|
"PUSHING",
|
|
577
574
|
"POPPING",
|
|
578
575
|
"REPLACING"
|
|
579
576
|
];
|
|
580
|
-
function
|
|
577
|
+
function ee() {
|
|
581
578
|
return e((e) => ({
|
|
582
579
|
status: "IDLE",
|
|
583
580
|
transitionTaskId: null,
|
|
@@ -587,11 +584,11 @@ function te() {
|
|
|
587
584
|
}
|
|
588
585
|
//#endregion
|
|
589
586
|
//#region src/navigate/createNavigationController.ts
|
|
590
|
-
var
|
|
587
|
+
var N = (e, t, n) => {
|
|
591
588
|
let { regexp: r } = i(e);
|
|
592
589
|
for (let e = t - 1; e >= 0; e--) if (r.test(n[e].pathname)) return t - e;
|
|
593
590
|
return -1;
|
|
594
|
-
},
|
|
591
|
+
}, te = (e, t) => typeof e == "number" && Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t, P = async (e, t, n, r) => {
|
|
595
592
|
let i, a = new Promise((t) => {
|
|
596
593
|
i = e.subscribe(() => t(!0));
|
|
597
594
|
}), o = new Promise((e) => setTimeout(() => e(!1), 200));
|
|
@@ -599,7 +596,7 @@ var ne = (e, t, n) => {
|
|
|
599
596
|
let s = await Promise.race([a, o]);
|
|
600
597
|
i(), s && r();
|
|
601
598
|
};
|
|
602
|
-
function
|
|
599
|
+
function F(e) {
|
|
603
600
|
let { stores: t, buildPathname: n, driver: r = g(), markSelfInduced: i = y } = e, o = () => t.history.getState().bumpTruncationEpoch(), c = () => {
|
|
604
601
|
let e = r.readState();
|
|
605
602
|
if (!e?.id) return null;
|
|
@@ -611,64 +608,60 @@ function N(e) {
|
|
|
611
608
|
pathname: r.readPathname(),
|
|
612
609
|
params: e.params ?? {},
|
|
613
610
|
transitionName: e.transitionName ?? "none",
|
|
614
|
-
layoutId: e.layoutId ?? null,
|
|
615
611
|
frameIndex: e.index
|
|
616
612
|
}), e;
|
|
617
613
|
}, l = async (e, l, u) => {
|
|
618
614
|
let { status: d } = t.navigate.getState();
|
|
619
615
|
if (d !== "COMPLETED" && d !== "IDLE") return;
|
|
620
|
-
let f = t.transition.getState().defaultTransitionName, { transitionName: p = f
|
|
616
|
+
let f = t.transition.getState().defaultTransitionName, { transitionName: p = f } = u ?? {}, m = s.generateTaskId();
|
|
621
617
|
(await s.addTask(async (a) => {
|
|
622
618
|
if (t.life && !t.life.alive) {
|
|
623
619
|
a.abort();
|
|
624
620
|
return;
|
|
625
621
|
}
|
|
626
|
-
let s = c(), { index: d, histories: f, addHistory:
|
|
622
|
+
let s = c(), { index: d, histories: f, addHistory: h, popHistories: g } = t.history.getState(), _ = (() => {
|
|
627
623
|
if (u?.until != null) {
|
|
628
|
-
let e =
|
|
624
|
+
let e = N(u.until, d, f);
|
|
629
625
|
return e < 0 ? 0 : e;
|
|
630
626
|
}
|
|
631
|
-
return Math.min(
|
|
632
|
-
})(), { setStatus:
|
|
633
|
-
|
|
634
|
-
let { pathname:
|
|
635
|
-
id:
|
|
636
|
-
pathname:
|
|
627
|
+
return Math.min(te(u?.skip, 0), Math.max(0, d));
|
|
628
|
+
})(), { setStatus: v, setTransitionTaskId: y } = t.navigate.getState();
|
|
629
|
+
v("PUSHING"), y(m);
|
|
630
|
+
let { pathname: b, toPathname: x } = n(e, l ?? {}), S = {
|
|
631
|
+
id: m,
|
|
632
|
+
pathname: x,
|
|
637
633
|
params: l ?? {},
|
|
638
|
-
transitionName: p
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
index: w + 1,
|
|
634
|
+
transitionName: p
|
|
635
|
+
}, C = s?.index ?? f[d]?.frameIndex ?? d;
|
|
636
|
+
if (_ === 0) return o(), r.pushState({
|
|
637
|
+
id: m,
|
|
638
|
+
index: C + 1,
|
|
644
639
|
status: "PUSHING",
|
|
645
640
|
params: l,
|
|
646
|
-
transitionName: p
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
frameIndex: w + 1
|
|
641
|
+
transitionName: p
|
|
642
|
+
}, b), h({
|
|
643
|
+
...S,
|
|
644
|
+
frameIndex: C + 1
|
|
651
645
|
}), () => {
|
|
652
|
-
|
|
646
|
+
v("COMPLETED");
|
|
653
647
|
};
|
|
654
|
-
let
|
|
655
|
-
return
|
|
656
|
-
...
|
|
657
|
-
frameIndex:
|
|
658
|
-
}), await
|
|
648
|
+
let w = f[d - _]?.frameIndex ?? d - _;
|
|
649
|
+
return h({
|
|
650
|
+
...S,
|
|
651
|
+
frameIndex: w + 1
|
|
652
|
+
}), await P(r, i, _, () => {
|
|
659
653
|
o(), r.pushState({
|
|
660
|
-
id:
|
|
661
|
-
index:
|
|
654
|
+
id: m,
|
|
655
|
+
index: w + 1,
|
|
662
656
|
status: "PUSHING",
|
|
663
657
|
params: l,
|
|
664
|
-
transitionName: p
|
|
665
|
-
|
|
666
|
-
}, x);
|
|
658
|
+
transitionName: p
|
|
659
|
+
}, b);
|
|
667
660
|
}), async () => {
|
|
668
|
-
_
|
|
661
|
+
g(_), v("COMPLETED");
|
|
669
662
|
};
|
|
670
663
|
}, {
|
|
671
|
-
id:
|
|
664
|
+
id: m,
|
|
672
665
|
control: {
|
|
673
666
|
manual: !0,
|
|
674
667
|
maxLifetimeMs: a
|
|
@@ -677,72 +670,68 @@ function N(e) {
|
|
|
677
670
|
}, u = async (e, l, u) => {
|
|
678
671
|
let { status: d } = t.navigate.getState();
|
|
679
672
|
if (d !== "COMPLETED" && d !== "IDLE") return;
|
|
680
|
-
let f = t.transition.getState().defaultTransitionName, { transitionName: p = f
|
|
673
|
+
let f = t.transition.getState().defaultTransitionName, { transitionName: p = f } = u ?? {}, m = s.generateTaskId();
|
|
681
674
|
(await s.addTask(async (a) => {
|
|
682
675
|
if (t.life && !t.life.alive) {
|
|
683
676
|
a.abort();
|
|
684
677
|
return;
|
|
685
678
|
}
|
|
686
|
-
let s = c(), { index: d, histories: f, addHistory:
|
|
679
|
+
let s = c(), { index: d, histories: f, addHistory: h, replaceHistory: g, popHistories: _ } = t.history.getState(), v = (() => {
|
|
687
680
|
if (u?.until != null) {
|
|
688
|
-
let e =
|
|
681
|
+
let e = N(u.until, d, f);
|
|
689
682
|
return e < 0 ? 0 : e + 1;
|
|
690
683
|
}
|
|
691
|
-
return Math.min(
|
|
684
|
+
return Math.min(te(u?.skip, 0) + 1, d + 1);
|
|
692
685
|
})();
|
|
693
|
-
if (
|
|
686
|
+
if (v <= 0) {
|
|
694
687
|
a.abort();
|
|
695
688
|
return;
|
|
696
689
|
}
|
|
697
|
-
let { setStatus:
|
|
698
|
-
|
|
699
|
-
let { pathname:
|
|
700
|
-
id:
|
|
701
|
-
pathname:
|
|
690
|
+
let { setStatus: y, setTransitionTaskId: b } = t.navigate.getState();
|
|
691
|
+
y("REPLACING"), b(m);
|
|
692
|
+
let { pathname: x, toPathname: S } = n(e, l ?? {}), C = {
|
|
693
|
+
id: m,
|
|
694
|
+
pathname: S,
|
|
702
695
|
params: l ?? {},
|
|
703
|
-
transitionName: p
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
index: T,
|
|
696
|
+
transitionName: p
|
|
697
|
+
}, w = s?.index ?? f[d]?.frameIndex ?? d;
|
|
698
|
+
if (v === 1) return o(), r.replaceState({
|
|
699
|
+
id: m,
|
|
700
|
+
index: w,
|
|
709
701
|
status: "REPLACING",
|
|
710
702
|
params: l,
|
|
711
|
-
transitionName: p
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
frameIndex: T
|
|
703
|
+
transitionName: p
|
|
704
|
+
}, x), h({
|
|
705
|
+
...C,
|
|
706
|
+
frameIndex: w
|
|
716
707
|
}), async () => {
|
|
717
|
-
|
|
708
|
+
g(d), y("COMPLETED");
|
|
718
709
|
};
|
|
719
|
-
let
|
|
720
|
-
return v
|
|
721
|
-
...
|
|
722
|
-
frameIndex:
|
|
723
|
-
}),
|
|
710
|
+
let T = v <= d ? (f[d - v]?.frameIndex ?? d - v) + 1 : f[0]?.frameIndex ?? 0;
|
|
711
|
+
return _(v - 1), h({
|
|
712
|
+
...C,
|
|
713
|
+
frameIndex: T
|
|
714
|
+
}), v <= d ? await P(r, i, v, () => {
|
|
724
715
|
o(), r.pushState({
|
|
725
|
-
id:
|
|
726
|
-
index:
|
|
716
|
+
id: m,
|
|
717
|
+
index: T,
|
|
727
718
|
status: "REPLACING",
|
|
728
719
|
params: l,
|
|
729
|
-
transitionName: p
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
}) : await M(r, i, d, () => {
|
|
720
|
+
transitionName: p
|
|
721
|
+
}, x);
|
|
722
|
+
}) : await P(r, i, d, () => {
|
|
733
723
|
o(), r.replaceState({
|
|
734
|
-
id:
|
|
735
|
-
index:
|
|
724
|
+
id: m,
|
|
725
|
+
index: T,
|
|
736
726
|
status: "REPLACING",
|
|
737
727
|
params: l,
|
|
738
|
-
transitionName: p
|
|
739
|
-
|
|
740
|
-
}, S);
|
|
728
|
+
transitionName: p
|
|
729
|
+
}, x);
|
|
741
730
|
}), async () => {
|
|
742
|
-
|
|
731
|
+
g(t.history.getState().index - 1), y("COMPLETED");
|
|
743
732
|
};
|
|
744
733
|
}, {
|
|
745
|
-
id:
|
|
734
|
+
id: m,
|
|
746
735
|
control: {
|
|
747
736
|
manual: !0,
|
|
748
737
|
maxLifetimeMs: a
|
|
@@ -785,10 +774,10 @@ function N(e) {
|
|
|
785
774
|
pop: async (e) => {
|
|
786
775
|
await d((t, n) => {
|
|
787
776
|
if (e?.until != null) {
|
|
788
|
-
let r =
|
|
777
|
+
let r = N(e.until, t, n);
|
|
789
778
|
return r < 0 ? 0 : r;
|
|
790
779
|
}
|
|
791
|
-
let r =
|
|
780
|
+
let r = te(e?.skip, 1);
|
|
792
781
|
return r <= 0 ? 0 : Math.min(r, t);
|
|
793
782
|
}, e?.transitionName);
|
|
794
783
|
}
|
|
@@ -796,14 +785,14 @@ function N(e) {
|
|
|
796
785
|
}
|
|
797
786
|
//#endregion
|
|
798
787
|
//#region src/navigate/createStepController.ts
|
|
799
|
-
var
|
|
788
|
+
var I = (e) => {
|
|
800
789
|
let t = e;
|
|
801
790
|
return t?.step ? t.params ?? {} : null;
|
|
802
|
-
},
|
|
791
|
+
}, ne = (e, t) => {
|
|
803
792
|
let n = new URLSearchParams(Object.fromEntries(Object.entries(t).map(([e, t]) => [e, String(t)]))).toString();
|
|
804
793
|
return n ? `${e}?${n}` : e;
|
|
805
794
|
};
|
|
806
|
-
function
|
|
795
|
+
function re(e) {
|
|
807
796
|
let { stores: t, driver: n, markSelfInduced: r, buildStepPathname: i, applyParams: o } = e;
|
|
808
797
|
return {
|
|
809
798
|
pushStep: async (e) => {
|
|
@@ -861,7 +850,7 @@ function oe(e) {
|
|
|
861
850
|
}
|
|
862
851
|
};
|
|
863
852
|
}
|
|
864
|
-
function
|
|
853
|
+
function ie(e, t) {
|
|
865
854
|
return e.subscribe((e) => {
|
|
866
855
|
let n = e.state;
|
|
867
856
|
n?.step && s.addTask(async () => {
|
|
@@ -871,7 +860,7 @@ function se(e, t) {
|
|
|
871
860
|
}
|
|
872
861
|
//#endregion
|
|
873
862
|
//#region src/transition/store.ts
|
|
874
|
-
function
|
|
863
|
+
function L(t = "cupertino") {
|
|
875
864
|
return e((e) => ({
|
|
876
865
|
defaultTransitionName: t,
|
|
877
866
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -879,18 +868,18 @@ function P(t = "cupertino") {
|
|
|
879
868
|
}
|
|
880
869
|
//#endregion
|
|
881
870
|
//#region src/utils/matchesPathname.ts
|
|
882
|
-
function
|
|
871
|
+
function ae(e, t) {
|
|
883
872
|
return i(e).regexp.test(t);
|
|
884
873
|
}
|
|
885
874
|
//#endregion
|
|
886
875
|
//#region src/screen/store.ts
|
|
887
|
-
var
|
|
876
|
+
var oe = (e, t) => {
|
|
888
877
|
if (e) return e.height !== void 0 || e.id !== t?.id ? e : {
|
|
889
878
|
...e,
|
|
890
879
|
height: t?.height
|
|
891
880
|
};
|
|
892
881
|
};
|
|
893
|
-
function
|
|
882
|
+
function R() {
|
|
894
883
|
return e((e) => ({
|
|
895
884
|
dragStatus: "IDLE",
|
|
896
885
|
replaceTransitionStatus: "IDLE",
|
|
@@ -904,8 +893,8 @@ function ue() {
|
|
|
904
893
|
topBar: n.topBar ? {} : void 0,
|
|
905
894
|
bottomBar: n.bottomBar ? {} : void 0
|
|
906
895
|
}, a = e.sharedBars[t], o = e.sharedBarMetadata[t], s = {
|
|
907
|
-
topBar:
|
|
908
|
-
bottomBar:
|
|
896
|
+
topBar: oe(i.topBar, o?.topBar),
|
|
897
|
+
bottomBar: oe(i.bottomBar, o?.bottomBar)
|
|
909
898
|
}, c = a?.topBar === n.topBar && a?.bottomBar === n.bottomBar, l = o?.topBar?.id === s.topBar?.id && o?.topBar?.height === s.topBar?.height && o?.bottomBar?.id === s.bottomBar?.id && o?.bottomBar?.height === s.bottomBar?.height && !!o?.topBar == !!s.topBar && !!o?.bottomBar == !!s.bottomBar;
|
|
910
899
|
return c && l ? e : {
|
|
911
900
|
sharedBars: {
|
|
@@ -954,14 +943,14 @@ function ue() {
|
|
|
954
943
|
}
|
|
955
944
|
//#endregion
|
|
956
945
|
//#region src/core/createRouterScope.ts
|
|
957
|
-
var
|
|
946
|
+
var se = {
|
|
958
947
|
mark: () => {},
|
|
959
948
|
consume: () => !1
|
|
960
|
-
},
|
|
961
|
-
function
|
|
949
|
+
}, ce = /* @__PURE__ */ new Map();
|
|
950
|
+
function le(e) {
|
|
962
951
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, s = f() ? void 0 : e.persistKey;
|
|
963
952
|
if (s) {
|
|
964
|
-
let e =
|
|
953
|
+
let e = ce.get(s);
|
|
965
954
|
if (e) {
|
|
966
955
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
967
956
|
let t = e.history.getState();
|
|
@@ -987,29 +976,28 @@ function pe(e) {
|
|
|
987
976
|
index: 0,
|
|
988
977
|
status: "IDLE",
|
|
989
978
|
params: p.params,
|
|
990
|
-
transitionName: p.transitionName
|
|
991
|
-
layoutId: p.layoutId
|
|
979
|
+
transitionName: p.transitionName
|
|
992
980
|
},
|
|
993
981
|
url: p.pathname
|
|
994
|
-
}) : o, h = a ?
|
|
982
|
+
}) : o, h = a ? se : _(), g = {
|
|
995
983
|
history: c([p], 0),
|
|
996
|
-
navigate:
|
|
997
|
-
transition:
|
|
998
|
-
screen:
|
|
984
|
+
navigate: ee(),
|
|
985
|
+
transition: L(i),
|
|
986
|
+
screen: R(),
|
|
999
987
|
driver: m,
|
|
1000
988
|
markSelfInduced: h.mark,
|
|
1001
989
|
consume: h.consume,
|
|
1002
990
|
routerKey: e.routerKey,
|
|
1003
991
|
zoneEntryId: e.zoneEntryId,
|
|
1004
|
-
ownsPathname: (e) =>
|
|
992
|
+
ownsPathname: (e) => ae(t, e),
|
|
1005
993
|
persistent: !!s,
|
|
1006
994
|
life: { alive: !0 }
|
|
1007
995
|
};
|
|
1008
|
-
return s &&
|
|
996
|
+
return s && ce.set(s, g), g;
|
|
1009
997
|
}
|
|
1010
998
|
//#endregion
|
|
1011
999
|
//#region src/screen/createScreenSelector.ts
|
|
1012
|
-
function
|
|
1000
|
+
function ue(e, t) {
|
|
1013
1001
|
return e.map((n, r) => ({
|
|
1014
1002
|
...n,
|
|
1015
1003
|
isActive: r === t,
|
|
@@ -1022,76 +1010,76 @@ function me(e, t) {
|
|
|
1022
1010
|
}
|
|
1023
1011
|
//#endregion
|
|
1024
1012
|
//#region src/platform/engineProbes.ts
|
|
1025
|
-
var
|
|
1013
|
+
var z = () => {
|
|
1026
1014
|
if (typeof navigator > "u") return !1;
|
|
1027
1015
|
let e = navigator.userAgentData?.brands;
|
|
1028
1016
|
if (Array.isArray(e)) return e.some((e) => /chromium/i.test(e?.brand ?? ""));
|
|
1029
1017
|
let t = navigator.userAgent ?? "";
|
|
1030
1018
|
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t);
|
|
1031
|
-
},
|
|
1019
|
+
}, de = 90, fe = () => {
|
|
1032
1020
|
if (typeof navigator > "u") return !1;
|
|
1033
1021
|
let e = navigator.userAgentData?.brands;
|
|
1034
1022
|
if (Array.isArray(e)) return !1;
|
|
1035
1023
|
let t = navigator.userAgent ?? "";
|
|
1036
|
-
return !/Android/i.test(t) || /Firefox|FxiOS/i.test(t) || (navigator.maxTouchPoints ?? 0) <= 0 ? !1 : Number(/Chrom(?:e|ium)\/(\d+)/i.exec(t)?.[1] ?? 0) <
|
|
1037
|
-
},
|
|
1024
|
+
return !/Android/i.test(t) || /Firefox|FxiOS/i.test(t) || (navigator.maxTouchPoints ?? 0) <= 0 ? !1 : Number(/Chrom(?:e|ium)\/(\d+)/i.exec(t)?.[1] ?? 0) < de;
|
|
1025
|
+
}, pe = () => typeof navigator > "u" ? !1 : !z() && navigator.maxTouchPoints === 0 && /Mac/.test(navigator.platform), me = () => z() && typeof navigator < "u" && navigator.maxTouchPoints === 0, he = () => !z() && typeof navigator < "u" && navigator.maxTouchPoints > 0, ge = 14, _e = 22, ve = 2, ye = 1.5, be = "flemo:sixty", xe = () => {
|
|
1038
1026
|
try {
|
|
1039
|
-
return typeof sessionStorage < "u" ? sessionStorage.getItem(
|
|
1027
|
+
return typeof sessionStorage < "u" ? sessionStorage.getItem(be) : null;
|
|
1040
1028
|
} catch {
|
|
1041
1029
|
return null;
|
|
1042
1030
|
}
|
|
1043
|
-
},
|
|
1031
|
+
}, Se = (e) => {
|
|
1044
1032
|
try {
|
|
1045
|
-
typeof sessionStorage < "u" && sessionStorage.setItem(
|
|
1033
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(be, e);
|
|
1046
1034
|
} catch {}
|
|
1047
|
-
},
|
|
1048
|
-
if (!(!Number.isFinite(e) || e <= 0) &&
|
|
1035
|
+
}, Ce = xe(), we = Ce === "high", Te = Ce !== null && Ce !== "high" ? Math.min(ve, Math.max(0, parseInt(Ce, 10) || 0)) : 0, Ee = () => typeof navigator > "u" || (navigator.maxTouchPoints ?? 0) === 0, De = (e, t) => {
|
|
1036
|
+
if (!(!Number.isFinite(e) || e <= 0) && Ee()) {
|
|
1049
1037
|
if (e < 12) {
|
|
1050
1038
|
if (t !== void 0 && t > 24) return;
|
|
1051
|
-
|
|
1039
|
+
we = !0, Te = 0, Se("high");
|
|
1052
1040
|
return;
|
|
1053
1041
|
}
|
|
1054
|
-
if (e >=
|
|
1055
|
-
|
|
1042
|
+
if (e >= ge && e <= _e) {
|
|
1043
|
+
Te = Math.min(ve, Te + 1), we || Se(String(Te));
|
|
1056
1044
|
return;
|
|
1057
1045
|
}
|
|
1058
|
-
e <
|
|
1046
|
+
e < ge && (Te = 0, we || Se("0"));
|
|
1059
1047
|
}
|
|
1060
|
-
},
|
|
1048
|
+
}, Oe = () => !we && Te >= ve, ke = () => Oe() && z() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && typeof window < "u" && (window.devicePixelRatio || 1) >= ye, Ae = (e) => {
|
|
1061
1049
|
try {
|
|
1062
1050
|
return typeof sessionStorage < "u" ? sessionStorage.getItem(e) : null;
|
|
1063
1051
|
} catch {
|
|
1064
1052
|
return null;
|
|
1065
1053
|
}
|
|
1066
|
-
},
|
|
1067
|
-
let e =
|
|
1054
|
+
}, je = () => {
|
|
1055
|
+
let e = Ae("flemo:imghold");
|
|
1068
1056
|
return e === "on" || e === "off" ? e : null;
|
|
1069
|
-
}, Ne = () =>
|
|
1057
|
+
}, Me = () => Ae("flemo:morph") === "on", Ne = () => z() && (navigator.maxTouchPoints ?? 0) > 0, Pe = () => {
|
|
1070
1058
|
try {
|
|
1071
1059
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:settle-gate") : null;
|
|
1072
|
-
return e === "on" ? !0 : e === "off" ? !1 :
|
|
1060
|
+
return e === "on" ? !0 : e === "off" ? !1 : he() || ke() || Ne() || pe();
|
|
1073
1061
|
} catch {
|
|
1074
1062
|
return !1;
|
|
1075
1063
|
}
|
|
1076
|
-
}, Fe = () =>
|
|
1077
|
-
let e =
|
|
1078
|
-
return e === "on" || e !== "off" &&
|
|
1064
|
+
}, Fe = () => Ae("flemo:arrivalhold") !== "off", Ie = () => {
|
|
1065
|
+
let e = Ae("flemo:deskflip");
|
|
1066
|
+
return e === "on" || e !== "off" && pe();
|
|
1079
1067
|
}, Le = () => {
|
|
1080
|
-
let e =
|
|
1081
|
-
return e === "on" || e !== "off" &&
|
|
1068
|
+
let e = Ae("flemo:creep");
|
|
1069
|
+
return e === "on" || e !== "off" && he();
|
|
1082
1070
|
}, Re = () => {
|
|
1083
|
-
let e =
|
|
1084
|
-
return e === "defer" || e !== "sync" &&
|
|
1071
|
+
let e = Ae("flemo:relcommit");
|
|
1072
|
+
return e === "defer" || e !== "sync" && he();
|
|
1085
1073
|
}, ze = () => {
|
|
1086
|
-
let e =
|
|
1087
|
-
return e === "on" || e !== "off" &&
|
|
1088
|
-
}, Be = () =>
|
|
1089
|
-
let e =
|
|
1074
|
+
let e = Ae("flemo:deskhead");
|
|
1075
|
+
return e === "on" || e !== "off" && pe();
|
|
1076
|
+
}, Be = () => Ae("flemo:preraster") === "on", Ve = () => Be(), He = () => {
|
|
1077
|
+
let e = Ae("flemo:imgoffload");
|
|
1090
1078
|
return e === "on" || e === "off" ? e : null;
|
|
1091
1079
|
}, Ue = () => {
|
|
1092
|
-
let e =
|
|
1080
|
+
let e = Ae("flemo:governed");
|
|
1093
1081
|
return e === "on" || e === "off" ? e : null;
|
|
1094
|
-
}, We, Ge = () => (We === void 0 && (We =
|
|
1082
|
+
}, We, Ge = () => (We === void 0 && (We = Ae("flemo:layers") === "resident"), We), Ke, qe = () => (Ke === void 0 && (Ke = Ae("flemo:freeze") === "shallow"), Ke);
|
|
1095
1083
|
//#endregion
|
|
1096
1084
|
//#region src/screen/computeScreenFreeze.ts
|
|
1097
1085
|
function Je(e) {
|
|
@@ -1211,31 +1199,41 @@ var Qe = (e, t, n) => {
|
|
|
1211
1199
|
}), rt = (e, t, n) => {
|
|
1212
1200
|
let [r, i] = t, [a, o] = n;
|
|
1213
1201
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1214
|
-
}, it =
|
|
1202
|
+
}, it = .4, at = [
|
|
1203
|
+
.2,
|
|
1204
|
+
.9,
|
|
1205
|
+
.3,
|
|
1206
|
+
1
|
|
1207
|
+
], ot = Xe({
|
|
1215
1208
|
name: "layout",
|
|
1216
|
-
initial: { opacity:
|
|
1209
|
+
initial: { opacity: 0 },
|
|
1217
1210
|
idle: {
|
|
1218
1211
|
value: { opacity: 1 },
|
|
1219
|
-
options: { duration:
|
|
1212
|
+
options: { duration: it }
|
|
1220
1213
|
},
|
|
1221
1214
|
enter: {
|
|
1222
1215
|
value: { opacity: 1 },
|
|
1223
|
-
options: {
|
|
1216
|
+
options: {
|
|
1217
|
+
duration: it,
|
|
1218
|
+
ease: at
|
|
1219
|
+
}
|
|
1224
1220
|
},
|
|
1225
1221
|
enterBack: {
|
|
1226
|
-
value: { opacity:
|
|
1227
|
-
options: {
|
|
1222
|
+
value: { opacity: 0 },
|
|
1223
|
+
options: {
|
|
1224
|
+
duration: it,
|
|
1225
|
+
ease: at
|
|
1226
|
+
}
|
|
1228
1227
|
},
|
|
1229
1228
|
exit: {
|
|
1230
|
-
value: { opacity:
|
|
1231
|
-
options: { duration:
|
|
1229
|
+
value: { opacity: 1 },
|
|
1230
|
+
options: { duration: it }
|
|
1232
1231
|
},
|
|
1233
1232
|
exitBack: {
|
|
1234
1233
|
value: { opacity: 1 },
|
|
1235
|
-
options: { duration:
|
|
1234
|
+
options: { duration: it }
|
|
1236
1235
|
},
|
|
1237
1236
|
options: {
|
|
1238
|
-
decoratorName: "overlay",
|
|
1239
1237
|
swipeDirection: "y",
|
|
1240
1238
|
onSwipeStart: async () => !0,
|
|
1241
1239
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
@@ -1256,7 +1254,7 @@ var Qe = (e, t, n) => {
|
|
|
1256
1254
|
}, { duration: .3 })]), c;
|
|
1257
1255
|
}
|
|
1258
1256
|
}
|
|
1259
|
-
}),
|
|
1257
|
+
}), st = Xe({
|
|
1260
1258
|
name: "material",
|
|
1261
1259
|
initial: { y: "100%" },
|
|
1262
1260
|
idle: {
|
|
@@ -1364,7 +1362,7 @@ var Qe = (e, t, n) => {
|
|
|
1364
1362
|
})]), c;
|
|
1365
1363
|
}
|
|
1366
1364
|
}
|
|
1367
|
-
}),
|
|
1365
|
+
}), ct = Xe({
|
|
1368
1366
|
name: "none",
|
|
1369
1367
|
initial: {},
|
|
1370
1368
|
idle: {
|
|
@@ -1387,20 +1385,20 @@ var Qe = (e, t, n) => {
|
|
|
1387
1385
|
value: {},
|
|
1388
1386
|
options: { duration: 0 }
|
|
1389
1387
|
}
|
|
1390
|
-
}),
|
|
1391
|
-
["none",
|
|
1388
|
+
}), lt = /* @__PURE__ */ new Map([
|
|
1389
|
+
["none", ct],
|
|
1392
1390
|
["cupertino", nt],
|
|
1393
|
-
["material",
|
|
1394
|
-
["layout",
|
|
1391
|
+
["material", st],
|
|
1392
|
+
["layout", ot]
|
|
1395
1393
|
]);
|
|
1396
1394
|
//#endregion
|
|
1397
1395
|
//#region src/transition/resolveTransition.ts
|
|
1398
|
-
function
|
|
1399
|
-
return
|
|
1396
|
+
function ut(e) {
|
|
1397
|
+
return lt.get(e) ?? lt.get("none");
|
|
1400
1398
|
}
|
|
1401
1399
|
//#endregion
|
|
1402
1400
|
//#region src/transition/decorator/createDecorator.ts
|
|
1403
|
-
function
|
|
1401
|
+
function dt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1404
1402
|
return {
|
|
1405
1403
|
name: e,
|
|
1406
1404
|
initial: t,
|
|
@@ -1421,7 +1419,7 @@ function lt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1421
1419
|
}
|
|
1422
1420
|
//#endregion
|
|
1423
1421
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1424
|
-
function
|
|
1422
|
+
function ft({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1425
1423
|
return {
|
|
1426
1424
|
name: e,
|
|
1427
1425
|
initial: t,
|
|
@@ -1442,30 +1440,30 @@ function ut({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1442
1440
|
}
|
|
1443
1441
|
//#endregion
|
|
1444
1442
|
//#region src/transition/decorator/overlay.ts
|
|
1445
|
-
var
|
|
1443
|
+
var pt = "rgba(0, 0, 0, 0.1)", mt = dt({
|
|
1446
1444
|
name: "overlay",
|
|
1447
1445
|
initial: {
|
|
1448
1446
|
opacity: 0,
|
|
1449
|
-
backgroundColor:
|
|
1447
|
+
backgroundColor: pt
|
|
1450
1448
|
},
|
|
1451
1449
|
idle: {
|
|
1452
1450
|
value: {
|
|
1453
1451
|
opacity: 0,
|
|
1454
|
-
backgroundColor:
|
|
1452
|
+
backgroundColor: pt
|
|
1455
1453
|
},
|
|
1456
1454
|
options: { duration: 0 }
|
|
1457
1455
|
},
|
|
1458
1456
|
enter: {
|
|
1459
1457
|
value: {
|
|
1460
1458
|
opacity: 1,
|
|
1461
|
-
backgroundColor:
|
|
1459
|
+
backgroundColor: pt
|
|
1462
1460
|
},
|
|
1463
1461
|
options: { duration: .7 }
|
|
1464
1462
|
},
|
|
1465
1463
|
exit: {
|
|
1466
1464
|
value: {
|
|
1467
1465
|
opacity: 0,
|
|
1468
|
-
backgroundColor:
|
|
1466
|
+
backgroundColor: pt
|
|
1469
1467
|
},
|
|
1470
1468
|
options: { duration: .7 }
|
|
1471
1469
|
},
|
|
@@ -1474,10 +1472,10 @@ var dt = "rgba(0, 0, 0, 0.1)", ft = lt({
|
|
|
1474
1472
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1475
1473
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1476
1474
|
}
|
|
1477
|
-
}),
|
|
1475
|
+
}), ht = /* @__PURE__ */ new Map([["overlay", mt]]);
|
|
1478
1476
|
//#endregion
|
|
1479
1477
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1480
|
-
function
|
|
1478
|
+
function gt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1481
1479
|
return {
|
|
1482
1480
|
name: e,
|
|
1483
1481
|
initial: t,
|
|
@@ -1498,7 +1496,7 @@ function mt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1498
1496
|
}
|
|
1499
1497
|
//#endregion
|
|
1500
1498
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1501
|
-
function
|
|
1499
|
+
function _t({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1502
1500
|
return {
|
|
1503
1501
|
name: e,
|
|
1504
1502
|
initial: t,
|
|
@@ -1519,7 +1517,129 @@ function ht({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1519
1517
|
}
|
|
1520
1518
|
//#endregion
|
|
1521
1519
|
//#region src/transition/partTransition/partTransition.ts
|
|
1522
|
-
var
|
|
1520
|
+
var vt = /* @__PURE__ */ new Map();
|
|
1521
|
+
//#endregion
|
|
1522
|
+
//#region src/transition/morphTransition/createMorphTransition.ts
|
|
1523
|
+
function yt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1524
|
+
return {
|
|
1525
|
+
name: e,
|
|
1526
|
+
initial: t,
|
|
1527
|
+
variants: {
|
|
1528
|
+
"IDLE-true": n,
|
|
1529
|
+
"IDLE-false": n,
|
|
1530
|
+
"PUSHING-true": r,
|
|
1531
|
+
"PUSHING-false": i,
|
|
1532
|
+
"REPLACING-true": r,
|
|
1533
|
+
"REPLACING-false": i,
|
|
1534
|
+
"POPPING-true": i,
|
|
1535
|
+
"POPPING-false": r,
|
|
1536
|
+
"COMPLETED-true": n,
|
|
1537
|
+
"COMPLETED-false": n
|
|
1538
|
+
},
|
|
1539
|
+
...a
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
//#endregion
|
|
1543
|
+
//#region src/transition/morphTransition/createRawMorphTransition.ts
|
|
1544
|
+
function bt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, options: l }) {
|
|
1545
|
+
return {
|
|
1546
|
+
name: e,
|
|
1547
|
+
initial: t,
|
|
1548
|
+
variants: {
|
|
1549
|
+
"IDLE-true": n,
|
|
1550
|
+
"IDLE-false": n,
|
|
1551
|
+
"PUSHING-true": r,
|
|
1552
|
+
"PUSHING-false": i,
|
|
1553
|
+
"REPLACING-true": a,
|
|
1554
|
+
"REPLACING-false": o,
|
|
1555
|
+
"POPPING-true": c,
|
|
1556
|
+
"POPPING-false": s,
|
|
1557
|
+
"COMPLETED-true": n,
|
|
1558
|
+
"COMPLETED-false": n
|
|
1559
|
+
},
|
|
1560
|
+
...l
|
|
1561
|
+
};
|
|
1562
|
+
}
|
|
1563
|
+
//#endregion
|
|
1564
|
+
//#region src/transition/morphTransition/shared.ts
|
|
1565
|
+
var xt = [
|
|
1566
|
+
.4,
|
|
1567
|
+
0,
|
|
1568
|
+
.2,
|
|
1569
|
+
1
|
|
1570
|
+
], St = yt({
|
|
1571
|
+
name: "shared",
|
|
1572
|
+
initial: {},
|
|
1573
|
+
idle: {
|
|
1574
|
+
value: { opacity: 1 },
|
|
1575
|
+
options: { duration: 0 }
|
|
1576
|
+
},
|
|
1577
|
+
enter: {
|
|
1578
|
+
value: { opacity: 1 },
|
|
1579
|
+
options: { ease: xt }
|
|
1580
|
+
},
|
|
1581
|
+
exit: {
|
|
1582
|
+
value: { opacity: 0 },
|
|
1583
|
+
options: { ease: xt }
|
|
1584
|
+
},
|
|
1585
|
+
options: {
|
|
1586
|
+
crossFade: .55,
|
|
1587
|
+
radius: !0
|
|
1588
|
+
}
|
|
1589
|
+
}), Ct = [
|
|
1590
|
+
.4,
|
|
1591
|
+
0,
|
|
1592
|
+
.2,
|
|
1593
|
+
1
|
|
1594
|
+
], wt = yt({
|
|
1595
|
+
name: "text",
|
|
1596
|
+
initial: {},
|
|
1597
|
+
idle: {
|
|
1598
|
+
value: { opacity: 1 },
|
|
1599
|
+
options: { duration: 0 }
|
|
1600
|
+
},
|
|
1601
|
+
enter: {
|
|
1602
|
+
value: { opacity: 1 },
|
|
1603
|
+
options: { ease: Ct }
|
|
1604
|
+
},
|
|
1605
|
+
exit: {
|
|
1606
|
+
value: { opacity: 0 },
|
|
1607
|
+
options: { ease: Ct }
|
|
1608
|
+
},
|
|
1609
|
+
options: {
|
|
1610
|
+
crossFade: 0,
|
|
1611
|
+
radius: !1
|
|
1612
|
+
}
|
|
1613
|
+
}), Tt = [
|
|
1614
|
+
.4,
|
|
1615
|
+
0,
|
|
1616
|
+
.2,
|
|
1617
|
+
1
|
|
1618
|
+
], Et = yt({
|
|
1619
|
+
name: "zoom",
|
|
1620
|
+
initial: {},
|
|
1621
|
+
idle: {
|
|
1622
|
+
value: { opacity: 1 },
|
|
1623
|
+
options: { duration: 0 }
|
|
1624
|
+
},
|
|
1625
|
+
enter: {
|
|
1626
|
+
value: { opacity: 1 },
|
|
1627
|
+
options: { ease: Tt }
|
|
1628
|
+
},
|
|
1629
|
+
exit: {
|
|
1630
|
+
value: { opacity: 0 },
|
|
1631
|
+
options: { ease: Tt }
|
|
1632
|
+
},
|
|
1633
|
+
options: {
|
|
1634
|
+
crossFade: .55,
|
|
1635
|
+
radius: !0,
|
|
1636
|
+
carry: "screen"
|
|
1637
|
+
}
|
|
1638
|
+
}), Dt = /* @__PURE__ */ new Map([
|
|
1639
|
+
["shared", St],
|
|
1640
|
+
["text", wt],
|
|
1641
|
+
["zoom", Et]
|
|
1642
|
+
]), Ot = "shared", kt = {
|
|
1523
1643
|
"IDLE-true": "self",
|
|
1524
1644
|
"IDLE-false": "self",
|
|
1525
1645
|
"PUSHING-true": "initial",
|
|
@@ -1527,47 +1647,24 @@ var gt = /* @__PURE__ */ new Map(), _t = {
|
|
|
1527
1647
|
"REPLACING-true": "initial",
|
|
1528
1648
|
"REPLACING-false": "IDLE-true",
|
|
1529
1649
|
"POPPING-true": "IDLE-true",
|
|
1530
|
-
"POPPING-false": "
|
|
1650
|
+
"POPPING-false": "initial",
|
|
1531
1651
|
"COMPLETED-true": "self",
|
|
1532
1652
|
"COMPLETED-false": "self"
|
|
1533
|
-
},
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
}, bt = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, xt = (e, t) => {
|
|
1538
|
-
let n = _t[t];
|
|
1539
|
-
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1540
|
-
}, z = (e, t) => {
|
|
1541
|
-
let n = xt(e, t);
|
|
1542
|
-
if (n === null) return null;
|
|
1543
|
-
let r = e.variants[t], i = yt(r.options), a = bt(r.options);
|
|
1544
|
-
return i <= 0 && a <= 0 ? null : {
|
|
1545
|
-
from: n,
|
|
1546
|
-
to: r.value,
|
|
1547
|
-
duration: i,
|
|
1548
|
-
delay: a,
|
|
1549
|
-
ease: r.options?.ease
|
|
1550
|
-
};
|
|
1551
|
-
}, St = "data-flemo-", Ct = "data-flemo-screen", wt = "data-flemo-status", Tt = "data-flemo-active", Et = "data-flemo-transition", Dt = "data-flemo-router", Ot = "data-flemo-skip-animation", kt = "data-flemo-bar", At = "data-flemo-bar-active", jt = "data-flemo-bar-status", Mt = "data-flemo-bar-riding", Nt = "data-flemo-bar-id", Pt = "data-flemo-bar-id-type", Ft = "data-flemo-bar-transition", It = "data-flemo-bar-spacer", Lt = "data-flemo-decorator", Rt = "data-flemo-decorator-name", B = "data-flemo-part-name", V = "data-flemo-anim-hold", zt = {
|
|
1653
|
+
}, At = "data-flemo-", jt = "data-flemo-screen", Mt = "data-flemo-status", Nt = "data-flemo-active", Pt = "data-flemo-transition", Ft = "data-flemo-router", It = "data-flemo-skip-animation", Lt = "data-flemo-bar", Rt = "data-flemo-bar-active", zt = "data-flemo-bar-status", Bt = "data-flemo-bar-riding", Vt = "data-flemo-bar-id", Ht = "data-flemo-bar-id-type", Ut = "data-flemo-bar-transition", Wt = "data-flemo-bar-spacer", Gt = "data-flemo-decorator", Kt = "data-flemo-decorator-name", qt = "data-flemo-layer-host", Jt = "data-flemo-layer-slot", Yt = "data-flemo-layer-owner", B = "data-flemo-part-name", V = "data-flemo-morph", Xt = {
|
|
1654
|
+
ENTER: "enter",
|
|
1655
|
+
EXIT: "exit"
|
|
1656
|
+
}, Zt = "data-flemo-morph-name", Qt = "data-flemo-morph-layer", $t = "data-flemo-morph-slot", en = "data-flemo-morph-stand-in", tn = "data-flemo-morph-ghost", nn = "data-flemo-morph-camera", rn = "data-flemo-morph-sheet", H = "data-flemo-anim-hold", an = {
|
|
1552
1657
|
HELD: "true",
|
|
1553
1658
|
RELEASED: "false",
|
|
1554
1659
|
PARK: "park",
|
|
1555
1660
|
PARK_UNDER: "park-under",
|
|
1556
1661
|
PARK_OVER: "park-over"
|
|
1557
|
-
},
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
],
|
|
1563
|
-
Ct,
|
|
1564
|
-
wt,
|
|
1565
|
-
Tt,
|
|
1566
|
-
Et,
|
|
1567
|
-
Dt,
|
|
1568
|
-
Ot,
|
|
1569
|
-
kt,
|
|
1570
|
-
At,
|
|
1662
|
+
}, on = [
|
|
1663
|
+
an.HELD,
|
|
1664
|
+
an.PARK,
|
|
1665
|
+
an.PARK_UNDER,
|
|
1666
|
+
an.PARK_OVER
|
|
1667
|
+
], sn = "data-flemo-held-arrival", cn = "data-flemo-img-hold", ln = "data-flemo-governed", un = "data-flemo-creep", dn = "data-flemo-desk-head", fn = "data-flemo-warm", pn = "data-flemo-warm-video", mn = "data-flemo-gpu-prewarm", U = "data-flemo-image-src", hn = "data-flemo-devtools-panel", W = (e) => `[${e}]`, G = (e, t) => `[${e}="${t}"]`, gn = [
|
|
1571
1668
|
jt,
|
|
1572
1669
|
Mt,
|
|
1573
1670
|
Nt,
|
|
@@ -1576,8 +1673,8 @@ var gt = /* @__PURE__ */ new Map(), _t = {
|
|
|
1576
1673
|
It,
|
|
1577
1674
|
Lt,
|
|
1578
1675
|
Rt,
|
|
1579
|
-
|
|
1580
|
-
|
|
1676
|
+
zt,
|
|
1677
|
+
Bt,
|
|
1581
1678
|
Vt,
|
|
1582
1679
|
Ht,
|
|
1583
1680
|
Ut,
|
|
@@ -1585,10 +1682,347 @@ var gt = /* @__PURE__ */ new Map(), _t = {
|
|
|
1585
1682
|
Gt,
|
|
1586
1683
|
Kt,
|
|
1587
1684
|
qt,
|
|
1685
|
+
Yt,
|
|
1588
1686
|
Jt,
|
|
1687
|
+
B,
|
|
1688
|
+
V,
|
|
1689
|
+
nn,
|
|
1690
|
+
tn,
|
|
1691
|
+
Qt,
|
|
1692
|
+
Zt,
|
|
1693
|
+
$t,
|
|
1694
|
+
en,
|
|
1695
|
+
rn,
|
|
1589
1696
|
H,
|
|
1590
|
-
|
|
1591
|
-
|
|
1697
|
+
sn,
|
|
1698
|
+
cn,
|
|
1699
|
+
ln,
|
|
1700
|
+
un,
|
|
1701
|
+
dn,
|
|
1702
|
+
fn,
|
|
1703
|
+
pn,
|
|
1704
|
+
mn,
|
|
1705
|
+
U,
|
|
1706
|
+
hn
|
|
1707
|
+
];
|
|
1708
|
+
//#endregion
|
|
1709
|
+
//#region src/morph/morphAnimations.ts
|
|
1710
|
+
function _n(e) {
|
|
1711
|
+
let t = e.animationName;
|
|
1712
|
+
return typeof t == "string" && t.length > 0 ? t : null;
|
|
1713
|
+
}
|
|
1714
|
+
function vn(e) {
|
|
1715
|
+
let t = e.effect?.target ?? null;
|
|
1716
|
+
return t instanceof Element ? t : null;
|
|
1717
|
+
}
|
|
1718
|
+
function yn(e) {
|
|
1719
|
+
let t = e.currentTime;
|
|
1720
|
+
return typeof t == "number" ? t : null;
|
|
1721
|
+
}
|
|
1722
|
+
function bn(e) {
|
|
1723
|
+
let t = /* @__PURE__ */ new Map();
|
|
1724
|
+
t.set(e, 0);
|
|
1725
|
+
let n = 1;
|
|
1726
|
+
for (let r of e.querySelectorAll("*")) t.set(r, n++);
|
|
1727
|
+
return t;
|
|
1728
|
+
}
|
|
1729
|
+
function xn(e) {
|
|
1730
|
+
let t = /* @__PURE__ */ new Map();
|
|
1731
|
+
if (typeof e.getAnimations != "function") return t;
|
|
1732
|
+
let n = bn(e);
|
|
1733
|
+
for (let r of e.getAnimations({ subtree: !0 })) {
|
|
1734
|
+
let i = vn(r);
|
|
1735
|
+
if (!i || i === e) continue;
|
|
1736
|
+
let a = _n(r), o = n.get(i);
|
|
1737
|
+
if (a === null || o === void 0) continue;
|
|
1738
|
+
let s = yn(r);
|
|
1739
|
+
s !== null && t.set(`${o}|${a}`, { time: s });
|
|
1740
|
+
}
|
|
1741
|
+
return t;
|
|
1742
|
+
}
|
|
1743
|
+
function Sn(e, t) {
|
|
1744
|
+
let n = xn(e);
|
|
1745
|
+
if (t(), n.size === 0 || typeof e.getAnimations != "function") return;
|
|
1746
|
+
let r = bn(e);
|
|
1747
|
+
for (let t of e.getAnimations({ subtree: !0 })) {
|
|
1748
|
+
let i = vn(t);
|
|
1749
|
+
if (!i || i === e) continue;
|
|
1750
|
+
let a = _n(t), o = r.get(i);
|
|
1751
|
+
if (a === null || o === void 0) continue;
|
|
1752
|
+
let s = n.get(`${o}|${a}`);
|
|
1753
|
+
if (s) try {
|
|
1754
|
+
t.currentTime = s.time;
|
|
1755
|
+
} catch {}
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
//#endregion
|
|
1759
|
+
//#region src/morph/morphClip.ts
|
|
1760
|
+
var Cn = (e) => e !== "" && e !== "visible", wn = (e) => {
|
|
1761
|
+
if (!e || !e.isConnected) return null;
|
|
1762
|
+
let t = e.getBoundingClientRect();
|
|
1763
|
+
if (t.width <= 0 || t.height <= 0) return null;
|
|
1764
|
+
let n = t.y, r = t.x, i = t.y + t.height, a = t.x + t.width;
|
|
1765
|
+
for (let t = e.parentElement; t && !t.hasAttribute("data-flemo-screen"); t = t.parentElement) {
|
|
1766
|
+
let e = "", o = "";
|
|
1767
|
+
try {
|
|
1768
|
+
let n = getComputedStyle(t);
|
|
1769
|
+
e = n.overflowX, o = n.overflowY;
|
|
1770
|
+
} catch {
|
|
1771
|
+
return null;
|
|
1772
|
+
}
|
|
1773
|
+
if (!Cn(e) && !Cn(o)) continue;
|
|
1774
|
+
let s = t.getBoundingClientRect();
|
|
1775
|
+
s.width <= 0 || s.height <= 0 || (Cn(o) && (n = Math.max(n, s.top), i = Math.min(i, s.bottom)), Cn(e) && (r = Math.max(r, s.left), a = Math.min(a, s.right)));
|
|
1776
|
+
}
|
|
1777
|
+
let o = n - t.y, s = r - t.x, c = t.y + t.height - i, l = t.x + t.width - a;
|
|
1778
|
+
if (o < .5 && s < .5 && c < .5 && l < .5) return null;
|
|
1779
|
+
let u = (e, t) => Math.min(100, Math.max(0, e / t * 100));
|
|
1780
|
+
return {
|
|
1781
|
+
top: u(o, t.height),
|
|
1782
|
+
right: u(l, t.width),
|
|
1783
|
+
bottom: u(c, t.height),
|
|
1784
|
+
left: u(s, t.width)
|
|
1785
|
+
};
|
|
1786
|
+
}, Tn = {
|
|
1787
|
+
top: 0,
|
|
1788
|
+
right: 0,
|
|
1789
|
+
bottom: 0,
|
|
1790
|
+
left: 0
|
|
1791
|
+
}, En = (e, t) => e === null && t === null ? null : {
|
|
1792
|
+
from: e ?? Tn,
|
|
1793
|
+
to: t ?? Tn
|
|
1794
|
+
}, Dn = (e) => e === "normal" ? "0px" : e, On = [
|
|
1795
|
+
{ property: "border-radius" },
|
|
1796
|
+
{ property: "background-color" },
|
|
1797
|
+
{ property: "background-size" },
|
|
1798
|
+
{ property: "background-position" },
|
|
1799
|
+
{ property: "color" },
|
|
1800
|
+
{ property: "text-shadow" },
|
|
1801
|
+
{ property: "caret-color" },
|
|
1802
|
+
{
|
|
1803
|
+
property: "border-color",
|
|
1804
|
+
sides: [
|
|
1805
|
+
"borderTopColor",
|
|
1806
|
+
"borderRightColor",
|
|
1807
|
+
"borderBottomColor",
|
|
1808
|
+
"borderLeftColor"
|
|
1809
|
+
]
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
property: "border-width",
|
|
1813
|
+
sides: [
|
|
1814
|
+
"borderTopWidth",
|
|
1815
|
+
"borderRightWidth",
|
|
1816
|
+
"borderBottomWidth",
|
|
1817
|
+
"borderLeftWidth"
|
|
1818
|
+
]
|
|
1819
|
+
},
|
|
1820
|
+
{ property: "outline-color" },
|
|
1821
|
+
{ property: "outline-width" },
|
|
1822
|
+
{ property: "outline-offset" },
|
|
1823
|
+
{ property: "box-shadow" },
|
|
1824
|
+
{ property: "filter" },
|
|
1825
|
+
{ property: "backdrop-filter" },
|
|
1826
|
+
{ property: "mix-blend-mode" },
|
|
1827
|
+
{
|
|
1828
|
+
property: "row-gap",
|
|
1829
|
+
normalize: Dn
|
|
1830
|
+
},
|
|
1831
|
+
{
|
|
1832
|
+
property: "column-gap",
|
|
1833
|
+
normalize: Dn
|
|
1834
|
+
},
|
|
1835
|
+
{ property: "object-position" },
|
|
1836
|
+
{ property: "fill" },
|
|
1837
|
+
{ property: "stroke" },
|
|
1838
|
+
{ property: "stroke-width" }
|
|
1839
|
+
], kn = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), An = (e) => {
|
|
1840
|
+
let t = {};
|
|
1841
|
+
if (!e) return t;
|
|
1842
|
+
for (let n of On) {
|
|
1843
|
+
let r = n.sides ? n.sides.map((t) => e[t] ?? "").join(" ") : e[kn(n.property)] ?? "";
|
|
1844
|
+
r.trim().length > 0 && (t[n.property] = n.normalize ? n.normalize(r) : r);
|
|
1845
|
+
}
|
|
1846
|
+
return t;
|
|
1847
|
+
}, jn = (e, t, n) => {
|
|
1848
|
+
let r = [];
|
|
1849
|
+
for (let i of On) {
|
|
1850
|
+
if (n?.has(i.property)) continue;
|
|
1851
|
+
let a = e[i.property], o = t[i.property];
|
|
1852
|
+
a !== void 0 && o !== void 0 && a !== o && r.push({
|
|
1853
|
+
property: i.property,
|
|
1854
|
+
from: a,
|
|
1855
|
+
to: o
|
|
1856
|
+
});
|
|
1857
|
+
}
|
|
1858
|
+
return r;
|
|
1859
|
+
}, K = {
|
|
1860
|
+
x: 0,
|
|
1861
|
+
y: 0,
|
|
1862
|
+
scaleX: 1,
|
|
1863
|
+
scaleY: 1,
|
|
1864
|
+
rotate: 0
|
|
1865
|
+
}, Mn = (e, t) => {
|
|
1866
|
+
if (e === void 0) return 0;
|
|
1867
|
+
if (typeof e == "number") return e;
|
|
1868
|
+
let n = e.trim();
|
|
1869
|
+
if (n === "") return 0;
|
|
1870
|
+
if (n.endsWith("%")) {
|
|
1871
|
+
let e = Number.parseFloat(n);
|
|
1872
|
+
return Number.isFinite(e) ? e / 100 * t : null;
|
|
1873
|
+
}
|
|
1874
|
+
if (n.endsWith("px")) {
|
|
1875
|
+
let e = Number.parseFloat(n);
|
|
1876
|
+
return Number.isFinite(e) ? e : null;
|
|
1877
|
+
}
|
|
1878
|
+
let r = Number.parseFloat(n);
|
|
1879
|
+
return n === String(r) && Number.isFinite(r) ? r : null;
|
|
1880
|
+
}, Nn = (e, t) => {
|
|
1881
|
+
if (e === void 0) return t;
|
|
1882
|
+
if (typeof e == "number") return e;
|
|
1883
|
+
let n = Number.parseFloat(e.trim());
|
|
1884
|
+
return Number.isFinite(n) ? n : null;
|
|
1885
|
+
}, Pn = (e) => {
|
|
1886
|
+
if (e === void 0) return 0;
|
|
1887
|
+
if (typeof e == "number") return e;
|
|
1888
|
+
let t = e.trim();
|
|
1889
|
+
if (t.endsWith("deg")) {
|
|
1890
|
+
let e = Number.parseFloat(t);
|
|
1891
|
+
return Number.isFinite(e) ? e : null;
|
|
1892
|
+
}
|
|
1893
|
+
let n = Number.parseFloat(t);
|
|
1894
|
+
return t === String(n) && Number.isFinite(n) ? n : null;
|
|
1895
|
+
}, Fn = (e, t) => {
|
|
1896
|
+
if (!e) return { ...K };
|
|
1897
|
+
let n = Mn(e.x, t.width), r = Mn(e.y, t.height);
|
|
1898
|
+
if (n === null || r === null) return null;
|
|
1899
|
+
let i = Nn(e.scale, 1);
|
|
1900
|
+
if (i === null) return null;
|
|
1901
|
+
let a = Nn(e.scaleX, i), o = Nn(e.scaleY, i);
|
|
1902
|
+
if (a === null || o === null) return null;
|
|
1903
|
+
let s = Pn(e.rotate ?? e.rotateZ);
|
|
1904
|
+
return s === null ? null : {
|
|
1905
|
+
x: n,
|
|
1906
|
+
y: r,
|
|
1907
|
+
scaleX: a,
|
|
1908
|
+
scaleY: o,
|
|
1909
|
+
rotate: s
|
|
1910
|
+
};
|
|
1911
|
+
}, In = (e) => e.x === 0 && e.y === 0 && e.scaleX === 1 && e.scaleY === 1 && e.rotate === 0, Ln = (e) => Math.round(e * 1e3) / 1e3, Rn = (e) => {
|
|
1912
|
+
if (In(e)) return "none";
|
|
1913
|
+
let t = [];
|
|
1914
|
+
return (e.x !== 0 || e.y !== 0) && t.push(`translate3d(${Ln(e.x)}px, ${Ln(e.y)}px, 0)`), (e.scaleX !== 1 || e.scaleY !== 1) && t.push(`scale(${Ln(e.scaleX)}, ${Ln(e.scaleY)})`), e.rotate !== 0 && t.push(`rotate(${Ln(e.rotate)}deg)`), t.join(" ");
|
|
1915
|
+
}, zn = (e) => {
|
|
1916
|
+
let t = e.filter((e) => !In(e)).map(Rn);
|
|
1917
|
+
return t.length === 0 ? "none" : t.join(" ");
|
|
1918
|
+
}, Bn = (e) => ({
|
|
1919
|
+
x: e.x + e.width / 2,
|
|
1920
|
+
y: e.y + e.height / 2
|
|
1921
|
+
}), Vn = /^(-?[\d.]+)px$/, Hn = (e) => {
|
|
1922
|
+
if (!e) return null;
|
|
1923
|
+
let t = Vn.exec(e.trim());
|
|
1924
|
+
if (!t) return null;
|
|
1925
|
+
let n = Number.parseFloat(t[1]);
|
|
1926
|
+
return Number.isFinite(n) ? n : null;
|
|
1927
|
+
}, Un = (e) => {
|
|
1928
|
+
let t = e.getBoundingClientRect(), n = typeof getComputedStyle == "function" ? getComputedStyle(e) : null, r = n ? Number.parseFloat(n.fontSize) : NaN, i = n ? Number.parseFloat(n.fontWeight) : NaN, a = n?.aspectRatio, o = (e) => n ? `${n[`${e}Top`]} ${n[`${e}Right`]} ${n[`${e}Bottom`]} ${n[`${e}Left`]}` : "0px 0px 0px 0px";
|
|
1929
|
+
return {
|
|
1930
|
+
rect: {
|
|
1931
|
+
x: t.left,
|
|
1932
|
+
y: t.top,
|
|
1933
|
+
width: t.width,
|
|
1934
|
+
height: t.height
|
|
1935
|
+
},
|
|
1936
|
+
fontSize: Number.isFinite(r) ? r : null,
|
|
1937
|
+
fontWeight: Number.isFinite(i) ? i : null,
|
|
1938
|
+
letterSpacing: Hn(n?.letterSpacing),
|
|
1939
|
+
wordSpacing: Hn(n?.wordSpacing),
|
|
1940
|
+
lineHeight: Hn(n?.lineHeight),
|
|
1941
|
+
aspectRatio: a && a !== "auto" ? a : null,
|
|
1942
|
+
padding: o("padding"),
|
|
1943
|
+
margin: o("margin"),
|
|
1944
|
+
paint: An(n)
|
|
1945
|
+
};
|
|
1946
|
+
}, Wn = (e, t, n) => {
|
|
1947
|
+
let r = t.scaleX === 0 ? 1 : t.scaleX, i = t.scaleY === 0 ? 1 : t.scaleY, a = Bn(e), o = {
|
|
1948
|
+
x: n.x + (a.x - n.x - t.x) / r,
|
|
1949
|
+
y: n.y + (a.y - n.y - t.y) / i
|
|
1950
|
+
}, s = e.width / r, c = e.height / i;
|
|
1951
|
+
return {
|
|
1952
|
+
x: o.x - s / 2,
|
|
1953
|
+
y: o.y - c / 2,
|
|
1954
|
+
width: s,
|
|
1955
|
+
height: c
|
|
1956
|
+
};
|
|
1957
|
+
}, Gn = /^matrix\(([^)]+)\)$/, Kn = /^translate(?:3d)?\(([^)]+)\)$/, qn = (e) => {
|
|
1958
|
+
if (typeof getComputedStyle != "function") return { ...K };
|
|
1959
|
+
let t = (getComputedStyle(e).transform ?? "").trim(), n = Kn.exec(t);
|
|
1960
|
+
if (n) {
|
|
1961
|
+
let [e, t] = n[1].split(",").map((e) => Number.parseFloat(e));
|
|
1962
|
+
return {
|
|
1963
|
+
x: Number.isFinite(e) ? e : 0,
|
|
1964
|
+
y: Number.isFinite(t) ? t : 0,
|
|
1965
|
+
scaleX: 1,
|
|
1966
|
+
scaleY: 1,
|
|
1967
|
+
rotate: 0
|
|
1968
|
+
};
|
|
1969
|
+
}
|
|
1970
|
+
let r = Gn.exec(t);
|
|
1971
|
+
if (!r) return { ...K };
|
|
1972
|
+
let i = r[1].split(",").map((e) => Number.parseFloat(e));
|
|
1973
|
+
return i.length < 6 || i.some((e) => !Number.isFinite(e)) ? { ...K } : {
|
|
1974
|
+
x: i[4],
|
|
1975
|
+
y: i[5],
|
|
1976
|
+
scaleX: i[0],
|
|
1977
|
+
scaleY: i[3],
|
|
1978
|
+
rotate: 0
|
|
1979
|
+
};
|
|
1980
|
+
}, Jn = (e, t) => {
|
|
1981
|
+
let n = Bn(e);
|
|
1982
|
+
return {
|
|
1983
|
+
x: n.x - t.x,
|
|
1984
|
+
y: n.y - t.y
|
|
1985
|
+
};
|
|
1986
|
+
}, Yn = (e, t) => {
|
|
1987
|
+
if (t.width <= 0 || t.height <= 0) return { ...K };
|
|
1988
|
+
let n = Bn(t), r = Bn(e);
|
|
1989
|
+
return {
|
|
1990
|
+
x: r.x - n.x,
|
|
1991
|
+
y: r.y - n.y,
|
|
1992
|
+
scaleX: e.width / t.width,
|
|
1993
|
+
scaleY: e.height / t.height,
|
|
1994
|
+
rotate: 0
|
|
1995
|
+
};
|
|
1996
|
+
}, Xn = {
|
|
1997
|
+
"IDLE-true": "self",
|
|
1998
|
+
"IDLE-false": "self",
|
|
1999
|
+
"PUSHING-true": "initial",
|
|
2000
|
+
"PUSHING-false": "IDLE-true",
|
|
2001
|
+
"REPLACING-true": "initial",
|
|
2002
|
+
"REPLACING-false": "IDLE-true",
|
|
2003
|
+
"POPPING-true": "IDLE-true",
|
|
2004
|
+
"POPPING-false": "PUSHING-false",
|
|
2005
|
+
"COMPLETED-true": "self",
|
|
2006
|
+
"COMPLETED-false": "self"
|
|
2007
|
+
}, Zn = Object.keys(Xn), Qn = (e) => {
|
|
2008
|
+
if (!e) return 0;
|
|
2009
|
+
let t = e.duration;
|
|
2010
|
+
return typeof t == "number" && t >= 0 ? t : 0;
|
|
2011
|
+
}, $n = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, er = (e, t) => {
|
|
2012
|
+
let n = Xn[t];
|
|
2013
|
+
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
2014
|
+
}, q = (e, t) => {
|
|
2015
|
+
let n = er(e, t);
|
|
2016
|
+
if (n === null) return null;
|
|
2017
|
+
let r = e.variants[t], i = Qn(r.options), a = $n(r.options);
|
|
2018
|
+
return i <= 0 && a <= 0 ? null : {
|
|
2019
|
+
from: n,
|
|
2020
|
+
to: r.value,
|
|
2021
|
+
duration: i,
|
|
2022
|
+
delay: a,
|
|
2023
|
+
ease: r.options?.ease
|
|
2024
|
+
};
|
|
2025
|
+
}, tr = Zn, nr = "translateZ(0.02px)", rr = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), ir = (e) => typeof e == "object" && !!e && !Array.isArray(e), ar = /* @__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(".")), or = (e, t) => t.startsWith("--") || ar.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, sr = (e, t) => typeof t == "number" ? or(t, e) : typeof t == "string" ? t : "", cr = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), lr = /* @__PURE__ */ new Set([
|
|
1592
2026
|
"x",
|
|
1593
2027
|
"y",
|
|
1594
2028
|
"z",
|
|
@@ -1599,7 +2033,7 @@ var gt = /* @__PURE__ */ new Map(), _t = {
|
|
|
1599
2033
|
"rotateX",
|
|
1600
2034
|
"rotateY",
|
|
1601
2035
|
"rotateZ"
|
|
1602
|
-
]),
|
|
2036
|
+
]), ur = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, dr = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, fr = /^1(\.0+)?$/, pr = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && fr.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && dr.test(t.trim()) : t === 0 || typeof t == "string" && ur.test(t.trim()), mr = (e, t) => {
|
|
1603
2037
|
switch (e) {
|
|
1604
2038
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1605
2039
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1613,16 +2047,18 @@ var gt = /* @__PURE__ */ new Map(), _t = {
|
|
|
1613
2047
|
case "rotateY": return `rotateY(${t})`;
|
|
1614
2048
|
default: return "";
|
|
1615
2049
|
}
|
|
1616
|
-
},
|
|
2050
|
+
}, hr = (e) => {
|
|
1617
2051
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1618
|
-
if (!
|
|
2052
|
+
if (!ir(e)) return;
|
|
1619
2053
|
let n = [];
|
|
1620
2054
|
for (let r of Object.keys(e)) {
|
|
1621
|
-
let i = e[r], a =
|
|
1622
|
-
if (a !== "")
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
2055
|
+
let i = e[r], a = sr(r, i);
|
|
2056
|
+
if (a !== "") {
|
|
2057
|
+
if (lr.has(r)) n.push(`${r}:${a}`);
|
|
2058
|
+
else {
|
|
2059
|
+
let e = t.get(cr(r)) ?? /* @__PURE__ */ new Set();
|
|
2060
|
+
e.add(a), t.set(cr(r), e);
|
|
2061
|
+
}
|
|
1626
2062
|
}
|
|
1627
2063
|
}
|
|
1628
2064
|
r.add(n.sort().join("|"));
|
|
@@ -1632,13 +2068,13 @@ var gt = /* @__PURE__ */ new Map(), _t = {
|
|
|
1632
2068
|
n = r.size > 1;
|
|
1633
2069
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1634
2070
|
return n && a.push("transform"), a;
|
|
1635
|
-
},
|
|
1636
|
-
if (!
|
|
2071
|
+
}, gr = (e) => {
|
|
2072
|
+
if (!ir(e)) return [];
|
|
1637
2073
|
let t = [], n = !0, r = [];
|
|
1638
2074
|
for (let i of Object.keys(e)) {
|
|
1639
|
-
let a = e[i], o =
|
|
1640
|
-
o !== "" && (
|
|
1641
|
-
property:
|
|
2075
|
+
let a = e[i], o = sr(i, a);
|
|
2076
|
+
o !== "" && (lr.has(i) ? (t.push(mr(i, o)), pr(i, a) || (n = !1)) : r.push({
|
|
2077
|
+
property: cr(i),
|
|
1642
2078
|
value: o
|
|
1643
2079
|
}));
|
|
1644
2080
|
}
|
|
@@ -1646,7 +2082,7 @@ var gt = /* @__PURE__ */ new Map(), _t = {
|
|
|
1646
2082
|
property: "transform",
|
|
1647
2083
|
value: n ? "none" : t.join(" ")
|
|
1648
2084
|
}), r;
|
|
1649
|
-
},
|
|
2085
|
+
}, J = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), _r = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1650
2086
|
linear: "linear",
|
|
1651
2087
|
easeIn: "ease-in",
|
|
1652
2088
|
easeOut: "ease-out",
|
|
@@ -1656,33 +2092,41 @@ var gt = /* @__PURE__ */ new Map(), _t = {
|
|
|
1656
2092
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1657
2093
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1658
2094
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1659
|
-
}[e] ?? "ease" : "ease",
|
|
2095
|
+
}[e] ?? "ease" : "ease", vr = (e, t) => {
|
|
1660
2096
|
let [n, r] = t.split("-");
|
|
1661
|
-
return
|
|
1662
|
-
},
|
|
2097
|
+
return W(jt) + G(Pt, e) + G(Mt, n) + G(Nt, r);
|
|
2098
|
+
}, yr = (e, t) => {
|
|
1663
2099
|
let [n, r] = t.split("-");
|
|
1664
|
-
return
|
|
1665
|
-
},
|
|
2100
|
+
return W(Gt) + G(Kt, e) + G(Mt, n) + G(Nt, r);
|
|
2101
|
+
}, br = (e, t) => {
|
|
1666
2102
|
let [n, r] = t.split("-");
|
|
1667
|
-
return
|
|
1668
|
-
},
|
|
2103
|
+
return W(Lt) + G(Ut, e) + G(zt, n) + G(Rt, r) + G(Bt, "true");
|
|
2104
|
+
}, xr = (e, t, n) => {
|
|
2105
|
+
let [r, i] = n.split("-");
|
|
2106
|
+
return W(e) + G(Pt, t) + G(Mt, r) + G(Nt, i);
|
|
2107
|
+
}, Sr = (e, t) => {
|
|
1669
2108
|
let [n, r] = t.split("-");
|
|
1670
|
-
return
|
|
1671
|
-
},
|
|
2109
|
+
return G(B, e) + G(Mt, n) + G(Nt, r);
|
|
2110
|
+
}, Cr = (e, t, n) => `flemo-${e}-${rr(t)}-${n}`, wr = [
|
|
1672
2111
|
"-gov",
|
|
1673
2112
|
"-deskhead",
|
|
1674
2113
|
"-govcreep"
|
|
1675
|
-
],
|
|
1676
|
-
let o =
|
|
2114
|
+
], Tr = (e, t) => e === t || wr.some((n) => e === `${t}${n}`), Er = (e, t, n, r, i, a) => {
|
|
2115
|
+
let o = gr(r), s = gr(i.value), c = new Set(o.filter((e) => s.some((t) => t.property === e.property && t.value === e.value)).map((e) => e.property)), l = o.filter((e) => c.has(e.property)), u = o.filter((e) => !c.has(e.property)), d = s.filter((e) => !c.has(e.property)), f = Qn(i.options), p = $n(i.options), m = _r(i.options?.ease), h = a(t, n), g = e === "screen" ? [
|
|
2116
|
+
h,
|
|
2117
|
+
br(t, n),
|
|
2118
|
+
xr(qt, t, n),
|
|
2119
|
+
xr(Jt, t, n)
|
|
2120
|
+
].join(",\n") : h;
|
|
1677
2121
|
if (s.length === 0 && o.length === 0) return "";
|
|
1678
|
-
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${
|
|
1679
|
-
let _ =
|
|
2122
|
+
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${J(s)}\n animation: none;\n}`;
|
|
2123
|
+
let _ = Cr(e, t, n), v = [
|
|
1680
2124
|
`@keyframes ${_} {`,
|
|
1681
2125
|
" from {",
|
|
1682
|
-
|
|
2126
|
+
J(u).replace(/^/gm, " "),
|
|
1683
2127
|
" }",
|
|
1684
2128
|
" to {",
|
|
1685
|
-
|
|
2129
|
+
J(d).replace(/^/gm, " "),
|
|
1686
2130
|
" }",
|
|
1687
2131
|
"}"
|
|
1688
2132
|
].join("\n"), y = [
|
|
@@ -1694,7 +2138,7 @@ var gt = /* @__PURE__ */ new Map(), _t = {
|
|
|
1694
2138
|
].filter(Boolean).join(" "), b = (e) => e.startsWith("REPLACING") ? .18 : e.startsWith("PUSHING") ? .1 : e.startsWith("POPPING") ? .08 : 0, x = (e) => e.startsWith("REPLACING") || e.startsWith("PUSHING") ? .033 : e.startsWith("POPPING") ? .017 : 0, S = (t, n, r, i) => {
|
|
1695
2139
|
if (e === "part" || r <= 0 || f <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1696
2140
|
let a = f + r, c = (r / a * 100).toFixed(3), l = `${_}-${n}`, m = g.split(",\n").map((e) => `:root[${t}] ${e}`).join(",\n");
|
|
1697
|
-
return `\n@keyframes ${l} {\n 0%, ${c}% {\n${
|
|
2141
|
+
return `\n@keyframes ${l} {\n 0%, ${c}% {\n${J(u).replace(/^/gm, " ")}\n }\n 100% {\n${J(d).replace(/^/gm, " ")}\n }\n}\n${m} {\n animation-name: ${l};\n animation-duration: ${a.toFixed(3)}s;\n animation-delay: ${(i ? p + r : p).toFixed(3)}s;\n}`;
|
|
1698
2142
|
}, C = (t, n) => e !== "part" || n <= 0 || f <= 0 ? "" : `\n${((e = "") => g.split(",\n").map((n) => `:root[${t}]${e} ${n}`).join(",\n"))()} {\n animation-delay: ${(p + n).toFixed(3)}s;\n}`, w = (() => {
|
|
1699
2143
|
/* v8 ignore next */
|
|
1700
2144
|
if (e === "part") return "";
|
|
@@ -1706,119 +2150,943 @@ var gt = /* @__PURE__ */ new Map(), _t = {
|
|
|
1706
2150
|
let e = u.find((e) => e.property === "transform");
|
|
1707
2151
|
if (!e) return [...u, {
|
|
1708
2152
|
property: "transform",
|
|
1709
|
-
value:
|
|
2153
|
+
value: nr
|
|
1710
2154
|
}];
|
|
1711
2155
|
let t = e.value === "none" ? "" : `${e.value} `;
|
|
1712
2156
|
return u.map((e) => e.property === "transform" ? {
|
|
1713
2157
|
property: "transform",
|
|
1714
|
-
value: `${t}${
|
|
2158
|
+
value: `${t}${nr}`
|
|
1715
2159
|
} : e);
|
|
1716
|
-
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-govcreep`, l = g.split(",\n").map((e) => `:root${
|
|
1717
|
-
return `\n@keyframes ${c} {\n 0% {\n${
|
|
1718
|
-
})(), T = S(
|
|
1719
|
-
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${
|
|
1720
|
-
},
|
|
2160
|
+
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-govcreep`, l = g.split(",\n").map((e) => `:root${W(ln)}${W(un)} ${e}`).join(",\n");
|
|
2161
|
+
return `\n@keyframes ${c} {\n 0% {\n${J(u).replace(/^/gm, " ")}\n }\n ${a}% {\n${J(r).replace(/^/gm, " ")}\n }\n 100% {\n${J(d).replace(/^/gm, " ")}\n }\n}\n${l} {\n animation-name: ${c};\n animation-duration: ${i.toFixed(3)}s;\n animation-delay: ${(p + t).toFixed(3)}s;\n}`;
|
|
2162
|
+
})(), T = S(ln, "gov", b(n), !0), E = C(ln, b(n)), D = S(dn, "deskhead", x(n), !1), O = C(dn, x(n)), k = new Map(u.map((e) => [e.property, e.value])), A = new Map(d.map((e) => [e.property, e.value])), j = Array.from(/* @__PURE__ */ new Set([...k.keys(), ...A.keys()])).filter((e) => k.get(e) !== A.get(e)), M = j.length > 0 ? ` will-change: ${j.join(", ")};\n` : "", ee = n.split("-")[0], N = ee === "PUSHING" || ee === "REPLACING" ? " contain: layout;\n" : "";
|
|
2163
|
+
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${J(l)}\n` : ""}${M}${N}}`}${T}${E}${w}${D}${O}${e === "screen" && n.endsWith("-false") && Dr(r) && s.length > 0 ? `\n${h}${G(H, an.PARK)} {\n animation: none;\n${J(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && Dr(r) && s.length > 0 ? `\n${h}${G(H, an.PARK_UNDER)} {\n animation: none;\n${J(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && Dr(r) && s.length > 0 ? `\n${h}${G(H, an.PARK_OVER)} {\n animation: none;\n${J(s)}\n opacity: 0.02;\n}` : ""}`;
|
|
2164
|
+
}, Dr = (e) => {
|
|
1721
2165
|
if (!e) return !1;
|
|
1722
2166
|
if (e.opacity === 0) return !0;
|
|
1723
2167
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1724
2168
|
return t(e.x) || t(e.y);
|
|
1725
|
-
},
|
|
1726
|
-
let i =
|
|
1727
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1728
|
-
},
|
|
2169
|
+
}, Or = (e, t, n, r) => {
|
|
2170
|
+
let i = gr(r.value);
|
|
2171
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${J(i)}\n}`;
|
|
2172
|
+
}, kr = (e, t, n = []) => {
|
|
1729
2173
|
let r = [];
|
|
1730
2174
|
for (let t of e) {
|
|
1731
2175
|
let e = t.name;
|
|
1732
|
-
for (let n of
|
|
1733
|
-
let i = t.variants[n], a =
|
|
2176
|
+
for (let n of Zn) {
|
|
2177
|
+
let i = t.variants[n], a = Xn[n];
|
|
1734
2178
|
if (a === "self") {
|
|
1735
|
-
r.push(
|
|
2179
|
+
r.push(Or(vr, e, n, i));
|
|
1736
2180
|
continue;
|
|
1737
2181
|
}
|
|
1738
2182
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1739
|
-
r.push(
|
|
2183
|
+
r.push(Er("screen", e, n, o, i, vr));
|
|
1740
2184
|
}
|
|
1741
2185
|
}
|
|
1742
2186
|
for (let e of t) {
|
|
1743
2187
|
let t = e.name;
|
|
1744
|
-
for (let n of
|
|
1745
|
-
let i = e.variants[n], a =
|
|
2188
|
+
for (let n of tr) {
|
|
2189
|
+
let i = e.variants[n], a = Xn[n];
|
|
1746
2190
|
if (a === "self") {
|
|
1747
|
-
r.push(
|
|
2191
|
+
r.push(Or(yr, t, n, i));
|
|
1748
2192
|
continue;
|
|
1749
2193
|
}
|
|
1750
2194
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1751
|
-
r.push(
|
|
2195
|
+
r.push(Er("decorator", t, n, o, i, yr));
|
|
1752
2196
|
}
|
|
1753
2197
|
}
|
|
1754
2198
|
for (let e of n) {
|
|
1755
2199
|
let t = e.name;
|
|
1756
|
-
for (let n of
|
|
1757
|
-
let i = e.variants[n], a =
|
|
2200
|
+
for (let n of tr) {
|
|
2201
|
+
let i = e.variants[n], a = Xn[n];
|
|
1758
2202
|
if (a === "self") {
|
|
1759
|
-
r.push(
|
|
2203
|
+
r.push(Or(Sr, t, n, i));
|
|
1760
2204
|
continue;
|
|
1761
2205
|
}
|
|
1762
2206
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1763
|
-
r.push(
|
|
2207
|
+
r.push(Er("part", t, n, o, i, Sr));
|
|
1764
2208
|
}
|
|
1765
2209
|
}
|
|
1766
2210
|
return [
|
|
1767
2211
|
...r.filter((e) => e.length > 0),
|
|
1768
|
-
|
|
1769
|
-
|
|
2212
|
+
Ar,
|
|
2213
|
+
jr
|
|
1770
2214
|
].join("\n\n");
|
|
1771
|
-
},
|
|
1772
|
-
[...
|
|
2215
|
+
}, Ar = [
|
|
2216
|
+
[...on.map((e) => G(H, e)), ...on.flatMap((e) => [
|
|
2217
|
+
`${G(H, e)} ${W(B)}`,
|
|
2218
|
+
`${G(H, e)} ${W(V)}`,
|
|
2219
|
+
`${G(H, e)} ${W(tn)}`
|
|
2220
|
+
])].join(",\n") + " {",
|
|
1773
2221
|
" animation-play-state: paused !important;",
|
|
1774
2222
|
"}"
|
|
1775
|
-
].join("\n"),
|
|
1776
|
-
`${
|
|
2223
|
+
].join("\n"), jr = [
|
|
2224
|
+
`${W(sn)} {`,
|
|
1777
2225
|
" display: none !important;",
|
|
1778
2226
|
"}"
|
|
1779
|
-
].join("\n"),
|
|
1780
|
-
let n =
|
|
2227
|
+
].join("\n"), Mr = (e, t) => {
|
|
2228
|
+
let n = Xn[t];
|
|
1781
2229
|
if (n === "self") return !1;
|
|
1782
|
-
let r = e.variants[t], i =
|
|
2230
|
+
let r = e.variants[t], i = Qn(r.options), a = $n(r.options);
|
|
1783
2231
|
if (i <= 0 && a <= 0) return !1;
|
|
1784
|
-
let o =
|
|
2232
|
+
let o = gr(n === "initial" ? e.initial : e.variants[n].value), s = gr(r.value);
|
|
1785
2233
|
return o.length > 0 || s.length > 0;
|
|
1786
|
-
},
|
|
2234
|
+
}, Nr = {
|
|
1787
2235
|
REPLACING: 33,
|
|
1788
2236
|
PUSHING: 33,
|
|
1789
2237
|
POPPING: 17
|
|
1790
|
-
},
|
|
2238
|
+
}, Pr = {
|
|
1791
2239
|
REPLACING: 180,
|
|
1792
2240
|
PUSHING: 100,
|
|
1793
2241
|
POPPING: 80
|
|
1794
|
-
},
|
|
1795
|
-
|
|
2242
|
+
}, Y = (e) => `${Math.round(e * 100) / 100}px`, Fr = (e) => `inset(${e.top.toFixed(2)}% ${e.right.toFixed(2)}% ${e.bottom.toFixed(2)}% ${e.left.toFixed(2)}%)`, Ir = (e) => ` left: ${Y(e.x)};\n top: ${Y(e.y)};\n width: ${Y(e.width)};\n height: ${Y(e.height)};`, Lr = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), Rr = (e) => gr(e ?? {}).filter((e) => e.property !== "transform"), zr = (e) => {
|
|
2243
|
+
let { id: t, travel: n, fade: r, paint: i, box: a, fontSize: o, fontWeight: s, letterSpacing: c, wordSpacing: l, lineHeight: u, aspectRatio: d, padding: f, margin: p, size: m, clip: h } = e, g = [], _ = [], v = _r(n.ease), y = n.start.toFixed(3), b = `flemo-morph-${t}-travel`, x = [], S = [], C = (e, t) => {
|
|
2244
|
+
x.push(e), S.push(t);
|
|
2245
|
+
}, w = null;
|
|
2246
|
+
a && (x.push(Ir(a.from)), S.push(Ir(a.to)));
|
|
2247
|
+
let T = zn([n.from, n.authoredFrom]), E = zn([n.to ?? K, n.authoredTo]);
|
|
2248
|
+
if ((T !== "none" || E !== "none") && (x.push(` transform: ${T};`), S.push(` transform: ${E};`)), o && C(` font-size: ${Y(o.from)};`, ` font-size: ${Y(o.to)};`), s && C(` font-weight: ${Math.round(s.from)};`, ` font-weight: ${Math.round(s.to)};`), c && C(` letter-spacing: ${Y(c.from)};`, ` letter-spacing: ${Y(c.to)};`), l && C(` word-spacing: ${Y(l.from)};`, ` word-spacing: ${Y(l.to)};`), u && C(` line-height: ${Y(u.from)};`, ` line-height: ${Y(u.to)};`), d && C(` aspect-ratio: ${d.from};`, ` aspect-ratio: ${d.to};`), f && C(` padding: ${f.from};`, ` padding: ${f.to};`), p && C(` margin: ${p.from};`, ` margin: ${p.to};`), m && (C(` width: ${Y(m.from.width)};`, ` width: ${Y(m.to.width)};`), C(` height: ${Y(m.from.height)};`, ` height: ${Y(m.to.height)};`)), h && C(` clip-path: ${Fr(h.from)};`, ` clip-path: ${Fr(h.to)};`), x.length > 0 && (g.push(`@keyframes ${b} {\n from {\n${x.join("\n")}\n }\n to {\n${S.join("\n")}\n }\n}`), _.push(`${b} ${n.duration.toFixed(3)}s ${v} ${y}s both`), w = b), r && r.duration > 0) {
|
|
2249
|
+
let e = Rr(r.from), i = Rr(r.to);
|
|
2250
|
+
if (e.length > 0 || i.length > 0) {
|
|
2251
|
+
let a = `flemo-morph-${t}-fade`;
|
|
2252
|
+
g.push(`@keyframes ${a} {\n from {\n${Lr(e)}\n }\n to {\n${Lr(i)}\n }\n}`);
|
|
2253
|
+
let o = (n.start + (r.delay ?? 0)).toFixed(3);
|
|
2254
|
+
_.push(`${a} ${r.duration.toFixed(3)}s ${v} ${o}s both`);
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
if (i.length > 0) {
|
|
2258
|
+
let e = `flemo-morph-${t}-paint`, r = i.map((e) => ` ${e.property}: ${e.from};`).join("\n"), a = i.map((e) => ` ${e.property}: ${e.to};`).join("\n");
|
|
2259
|
+
g.push(`@keyframes ${e} {\n from {\n${r}\n }\n to {\n${a}\n }\n}`), _.push(`${e} ${n.duration.toFixed(3)}s ${v} ${y}s both`), w ??= e;
|
|
2260
|
+
}
|
|
2261
|
+
return {
|
|
2262
|
+
rules: g,
|
|
2263
|
+
animation: _.join(", "),
|
|
2264
|
+
geometryName: w ?? b
|
|
2265
|
+
};
|
|
2266
|
+
}, Br = (e) => {
|
|
2267
|
+
let { id: t, origin: n, small: r, big: i, settling: a, duration: o, start: s, ease: c, selector: l } = e, u = r.width > 0 ? i.width / r.width : 1, d = (e) => ({
|
|
2268
|
+
x: e.x + e.width / 2,
|
|
2269
|
+
y: e.y + e.height / 2
|
|
2270
|
+
}), f = d(r), p = d(i), m = p.x - n.x - u * (f.x - n.x), h = p.y - n.y - u * (f.y - n.y), g = `translate(${Y(m)}, ${Y(h)}) scale(${Math.round(u * 1e4) / 1e4})`, _ = `flemo-morph-${t}-camera`;
|
|
2271
|
+
return {
|
|
2272
|
+
rules: [`@keyframes ${_} {\n from {\n transform: ${a ? g : "none"};\n }\n to {\n transform: ${a ? "none" : g};\n }\n}`, `${l} {\n animation-name: ${_} !important;\n animation-duration: ${o.toFixed(3)}s !important;\n animation-timing-function: ${_r(c)} !important;\n animation-delay: ${s.toFixed(3)}s !important;\n animation-fill-mode: both !important;\n}`],
|
|
2273
|
+
name: _
|
|
2274
|
+
};
|
|
2275
|
+
}, Vr = /* @__PURE__ */ new WeakMap(), Hr = (e, t) => {
|
|
2276
|
+
t ? Vr.set(e, t) : Vr.delete(e);
|
|
2277
|
+
}, Ur = (e) => {
|
|
2278
|
+
if (f()) return null;
|
|
2279
|
+
let t = Vr.get(e);
|
|
2280
|
+
if (t?.isConnected) return t;
|
|
2281
|
+
let n = document.body.querySelector(`:scope > [${Qt}]`);
|
|
2282
|
+
return n || (n = document.createElement("div"), n.setAttribute(Qt, ""), document.body.appendChild(n)), n;
|
|
2283
|
+
}, Wr = () => {
|
|
2284
|
+
if (f()) return null;
|
|
2285
|
+
let e = document.head.querySelector(`style[${rn}]`);
|
|
2286
|
+
return e || (e = document.createElement("style"), e.setAttribute(rn, ""), document.head.appendChild(e)), e.sheet;
|
|
2287
|
+
}, Gr = (e) => {
|
|
2288
|
+
let t = Wr();
|
|
2289
|
+
if (!t) return () => {};
|
|
2290
|
+
let n = [];
|
|
2291
|
+
for (let r of e) try {
|
|
2292
|
+
let e = t.insertRule(r, t.cssRules.length), i = t.cssRules[e];
|
|
2293
|
+
i && n.push(i);
|
|
2294
|
+
} catch {}
|
|
2295
|
+
return () => {
|
|
2296
|
+
for (let e of n) {
|
|
2297
|
+
let n = Array.prototype.indexOf.call(t.cssRules, e);
|
|
2298
|
+
n >= 0 && t.deleteRule(n);
|
|
2299
|
+
}
|
|
2300
|
+
n.length = 0;
|
|
2301
|
+
};
|
|
2302
|
+
}, Kr = 1e3 / 60, qr = 1e3 / 600, Jr = 42, Yr = Kr, Xr = () => Yr, Zr = (e) => {
|
|
2303
|
+
Number.isFinite(e) && (e < qr || e > Jr || (Yr = Math.min(Kr, Math.max(qr, e))));
|
|
2304
|
+
}, Qr = () => {}, $r = null, ei = () => {
|
|
2305
|
+
/* v8 ignore next 2 -- the loop only runs where rAF existed to start it; the
|
|
2306
|
+
re-check covers an environment that removes it mid-session. */
|
|
2307
|
+
$r = typeof requestAnimationFrame == "function" ? requestAnimationFrame(ei) : null;
|
|
2308
|
+
}, ti = () => ($r === null && typeof requestAnimationFrame == "function" && ($r = requestAnimationFrame(ei)), Qr), ni = !1, ri = 0, ii = () => {
|
|
2309
|
+
ni &&= (ri += 1, !1);
|
|
2310
|
+
}, ai = 2, oi = 8, si = () => {
|
|
2311
|
+
if (ni || typeof requestAnimationFrame != "function") return;
|
|
2312
|
+
ni = !0;
|
|
2313
|
+
let e = ++ri, t = [], n = ai, r = null, i = (a) => {
|
|
2314
|
+
if (e !== ri) return;
|
|
2315
|
+
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < oi) {
|
|
2316
|
+
requestAnimationFrame(i);
|
|
2317
|
+
return;
|
|
2318
|
+
}
|
|
2319
|
+
ni = !1;
|
|
2320
|
+
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
2321
|
+
Zr(s), De(s, o[o.length - 1]);
|
|
2322
|
+
};
|
|
2323
|
+
requestAnimationFrame(i);
|
|
2324
|
+
}, ci = () => typeof navigator < "u" && navigator.maxTouchPoints > 0, li = (e) => {
|
|
2325
|
+
let t = z(), n = ci(), r = !t && n && he(), i = Ue(), a = t && n && (i === "on" || i !== "off" && fe()), o = !t && n && (e === "POPPING" || e === "PUSHING" && Pe()), s = r || a || o, c = pe() && ze();
|
|
2326
|
+
return {
|
|
2327
|
+
touchGoverned: r,
|
|
2328
|
+
forceCompiled: o,
|
|
2329
|
+
governedHead: s,
|
|
2330
|
+
desktopHead: c,
|
|
2331
|
+
headMs: s ? Pr[e] ?? 0 : c ? Nr[e] ?? 0 : 0
|
|
2332
|
+
};
|
|
2333
|
+
}, ui = (e) => {
|
|
2334
|
+
let { status: t, transition: n, skipAnimation: r, hasActiveMotion: i, hasAnimation: a } = e, o = z(), { touchGoverned: s, forceCompiled: c, governedHead: l, desktopHead: u, headMs: d } = li(t);
|
|
2335
|
+
return {
|
|
2336
|
+
hasDrivableMotion: !r && i,
|
|
2337
|
+
nativeSurgeryAllowed: n.driver === "native" && !o,
|
|
2338
|
+
touchGoverned: s,
|
|
2339
|
+
forceCompiled: c,
|
|
2340
|
+
governedHead: l,
|
|
2341
|
+
desktopHead: u,
|
|
2342
|
+
birthHoldMs: d,
|
|
2343
|
+
governedSlide: s && (t === "PUSHING" || t === "POPPING"),
|
|
2344
|
+
framePacingKeepalive: a && o && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || Xr() < 12),
|
|
2345
|
+
creepHead: l && Le()
|
|
2346
|
+
};
|
|
2347
|
+
}, di = [
|
|
2348
|
+
"x",
|
|
2349
|
+
"y",
|
|
2350
|
+
"scale",
|
|
2351
|
+
"scaleX",
|
|
2352
|
+
"scaleY",
|
|
2353
|
+
"rotate"
|
|
2354
|
+
], fi = (e) => !!e && di.some((t) => e[t] !== void 0 && e[t] !== 0), pi = (e) => {
|
|
2355
|
+
if (f()) return 0;
|
|
2356
|
+
let { governedHead: t, headMs: n } = li(e);
|
|
2357
|
+
return t ? n * 2 / 1e3 : n / 1e3;
|
|
2358
|
+
}, mi = (e, t, n) => {
|
|
2359
|
+
let r = Un(e), i = {
|
|
2360
|
+
rect: r.rect,
|
|
2361
|
+
fontSize: r.fontSize,
|
|
2362
|
+
fontWeight: r.fontWeight,
|
|
2363
|
+
letterSpacing: r.letterSpacing,
|
|
2364
|
+
wordSpacing: r.wordSpacing,
|
|
2365
|
+
lineHeight: r.lineHeight,
|
|
2366
|
+
aspectRatio: r.aspectRatio,
|
|
2367
|
+
padding: r.padding,
|
|
2368
|
+
margin: r.margin,
|
|
2369
|
+
paint: r.paint,
|
|
2370
|
+
screenMoves: !1,
|
|
2371
|
+
screenDuration: 0,
|
|
2372
|
+
screenEase: void 0
|
|
2373
|
+
}, a = t.getAttribute(Pt), o = a ? lt.get(a) : void 0;
|
|
2374
|
+
if (!o) return i;
|
|
2375
|
+
let s = q(o, n);
|
|
2376
|
+
if (!s) return i;
|
|
2377
|
+
let c = qn(t), l = t.getBoundingClientRect(), u = Jn({
|
|
2378
|
+
x: l.left,
|
|
2379
|
+
y: l.top,
|
|
2380
|
+
width: l.width,
|
|
2381
|
+
height: l.height
|
|
2382
|
+
}, c);
|
|
2383
|
+
return {
|
|
2384
|
+
rect: Wn(r.rect, c, u),
|
|
2385
|
+
fontSize: r.fontSize,
|
|
2386
|
+
fontWeight: r.fontWeight,
|
|
2387
|
+
letterSpacing: r.letterSpacing,
|
|
2388
|
+
wordSpacing: r.wordSpacing,
|
|
2389
|
+
lineHeight: r.lineHeight,
|
|
2390
|
+
aspectRatio: r.aspectRatio,
|
|
2391
|
+
padding: r.padding,
|
|
2392
|
+
margin: r.margin,
|
|
2393
|
+
paint: r.paint,
|
|
2394
|
+
screenMoves: fi(s.from) || fi(s.to),
|
|
2395
|
+
screenDuration: s.duration,
|
|
2396
|
+
screenEase: s.ease
|
|
2397
|
+
};
|
|
2398
|
+
}, hi = /* @__PURE__ */ new WeakMap(), gi = 0, _i = W(jt), vi = [
|
|
2399
|
+
"color",
|
|
2400
|
+
"font",
|
|
2401
|
+
"letterSpacing",
|
|
2402
|
+
"lineHeight",
|
|
2403
|
+
"textAlign",
|
|
2404
|
+
"textTransform",
|
|
2405
|
+
"whiteSpace",
|
|
2406
|
+
"direction"
|
|
2407
|
+
], yi = (e, t) => {
|
|
2408
|
+
if (t !== "lineHeight") return e[t];
|
|
2409
|
+
let n = e.lineHeight ?? "", r = Number.parseFloat(n), i = Number.parseFloat(e.fontSize ?? "");
|
|
2410
|
+
return !n.endsWith("px") || !Number.isFinite(r) || !Number.isFinite(i) || i <= 0 ? n : String(Math.round(r / i * 1e4) / 1e4);
|
|
2411
|
+
}, bi = (e) => M.includes(e), xi = (e) => e.closest(_i), Si = (e) => e === "POPPING" ? "false" : "true", Ci = (e, t) => e.getAttribute(Nt) === Si(t), wi = (e) => e === "POPPING" ? {
|
|
2412
|
+
enter: "POPPING-false",
|
|
2413
|
+
exit: "POPPING-true"
|
|
2414
|
+
} : {
|
|
2415
|
+
enter: `${e}-true`,
|
|
2416
|
+
exit: `${e}-false`
|
|
2417
|
+
}, Ti = (e) => e < 0 ? 0 : e > 1 ? 1 : e, Ei = (e, t, n) => e !== null && t !== null && Math.abs(e - t) >= n ? {
|
|
2418
|
+
from: e,
|
|
2419
|
+
to: t
|
|
2420
|
+
} : null, Di = (e, t) => ({
|
|
2421
|
+
fontSize: Ei(e.fontSize, t.fontSize, .5),
|
|
2422
|
+
fontWeight: Ei(e.fontWeight, t.fontWeight, 1),
|
|
2423
|
+
letterSpacing: Ei(e.letterSpacing, t.letterSpacing, .01),
|
|
2424
|
+
wordSpacing: Ei(e.wordSpacing, t.wordSpacing, .01),
|
|
2425
|
+
lineHeight: Ei(e.lineHeight, t.lineHeight, .25)
|
|
2426
|
+
}), Oi = 1 / 60, ki = .4, Ai = (e) => {
|
|
2427
|
+
let t = 0, n = e;
|
|
2428
|
+
for (; n;) n.hasAttribute("data-flemo-morph") && (t += 1), n = n.parentElement;
|
|
2429
|
+
return t;
|
|
2430
|
+
}, ji = (e, t) => {
|
|
2431
|
+
let n = kt[t];
|
|
2432
|
+
if (n === "self") return null;
|
|
2433
|
+
let r = e.variants[t];
|
|
2434
|
+
return {
|
|
2435
|
+
from: n === "initial" ? e.initial : e.variants["IDLE-true"].value,
|
|
2436
|
+
to: r.value,
|
|
2437
|
+
options: r.options
|
|
2438
|
+
};
|
|
2439
|
+
}, Mi = (e) => {
|
|
2440
|
+
e.style.pointerEvents = "none", e.style.zIndex = "2147483000";
|
|
2441
|
+
}, Ni = (e, t) => {
|
|
2442
|
+
let n = t.getBoundingClientRect(), r = t.offsetWidth > 0 && n.width / t.offsetWidth || 1, i = t.offsetHeight > 0 && n.height / t.offsetHeight || 1;
|
|
2443
|
+
return {
|
|
2444
|
+
x: (e.x - n.left) / r,
|
|
2445
|
+
y: (e.y - n.top) / i,
|
|
2446
|
+
width: e.width / r,
|
|
2447
|
+
height: e.height / i
|
|
2448
|
+
};
|
|
2449
|
+
}, Pi = {
|
|
2450
|
+
left: 0,
|
|
2451
|
+
top: 0,
|
|
2452
|
+
center: .5,
|
|
2453
|
+
right: 1,
|
|
2454
|
+
bottom: 1
|
|
2455
|
+
}, Fi = (e, t) => {
|
|
2456
|
+
if (!e) return t / 2;
|
|
2457
|
+
let n = Pi[e];
|
|
2458
|
+
if (n !== void 0) return n * t;
|
|
2459
|
+
let r = Number.parseFloat(e);
|
|
2460
|
+
return Number.isFinite(r) ? e.endsWith("%") ? r / 100 * t : r : t / 2;
|
|
2461
|
+
}, Ii = (e, t) => {
|
|
2462
|
+
let n = e.getBoundingClientRect(), r = {
|
|
2463
|
+
x: n.left,
|
|
2464
|
+
y: n.top,
|
|
2465
|
+
width: n.width,
|
|
2466
|
+
height: n.height
|
|
2467
|
+
}, i = qn(e), a = Ni(Wn(r, i, Jn(r, i)), t), o = ((typeof getComputedStyle == "function" ? getComputedStyle(e) : null)?.transformOrigin ?? "").trim().split(/\s+/);
|
|
2468
|
+
return {
|
|
2469
|
+
x: a.x + Fi(o[0], a.width),
|
|
2470
|
+
y: a.y + Fi(o[1], a.height)
|
|
2471
|
+
};
|
|
2472
|
+
}, Li = (e, t, n, r, i, a, o) => {
|
|
2473
|
+
let s = Dt.get(t.name) ?? Dt.get("shared");
|
|
2474
|
+
if (!s) return;
|
|
2475
|
+
let { enter: c, exit: l } = wi(r), u = ji(s, c);
|
|
2476
|
+
if (!u) return;
|
|
2477
|
+
e.residue.get(t.element)?.(), e.residue.get(n.element)?.();
|
|
2478
|
+
let d = i ? mi(t.element, i, c) : (() => {
|
|
2479
|
+
let e = Un(t.element);
|
|
2480
|
+
return {
|
|
2481
|
+
rect: e.rect,
|
|
2482
|
+
fontSize: e.fontSize,
|
|
2483
|
+
fontWeight: e.fontWeight,
|
|
2484
|
+
letterSpacing: e.letterSpacing,
|
|
2485
|
+
wordSpacing: e.wordSpacing,
|
|
2486
|
+
lineHeight: e.lineHeight,
|
|
2487
|
+
aspectRatio: e.aspectRatio,
|
|
2488
|
+
padding: e.padding,
|
|
2489
|
+
margin: e.margin,
|
|
2490
|
+
paint: e.paint,
|
|
2491
|
+
screenMoves: !1,
|
|
2492
|
+
screenDuration: o.duration,
|
|
2493
|
+
screenEase: o.ease
|
|
2494
|
+
};
|
|
2495
|
+
})();
|
|
2496
|
+
if (d.rect.width <= 0 || d.rect.height <= 0) {
|
|
2497
|
+
X("zero-destination", t, r, d.rect);
|
|
2498
|
+
return;
|
|
2499
|
+
}
|
|
2500
|
+
if (n.snapshot.rect.width <= 0 || n.snapshot.rect.height <= 0) {
|
|
2501
|
+
X("zero-origin", t, r, n.snapshot.rect);
|
|
2502
|
+
return;
|
|
2503
|
+
}
|
|
2504
|
+
let f = Ur(a), p = t.element.parentElement;
|
|
2505
|
+
/* v8 ignore next 4 -- neither is reachable from a browser: the layer falls
|
|
2506
|
+
back to a document-level element when a binding publishes none, and a
|
|
2507
|
+
registered element that reached the pairing is in the tree. The guard is
|
|
2508
|
+
for SSR and for a binding that registers a detached node. */
|
|
2509
|
+
if (!f || !p) {
|
|
2510
|
+
X(f ? "no-home" : "no-layer", t, r);
|
|
2511
|
+
return;
|
|
2512
|
+
}
|
|
2513
|
+
let m = u.options.duration ?? d.screenDuration, h = o ? o.duration : m > 0 ? m : ki, g = d.screenMoves && d.screenEase ? d.screenEase : u.options.ease ?? d.screenEase, _ = o ? o.start : (u.options.delay ?? 0) + pi(r);
|
|
2514
|
+
Mi(f);
|
|
2515
|
+
let v = Ni(d.rect, f), y = Ni(n.snapshot.rect, f), b = {
|
|
2516
|
+
width: v.width,
|
|
2517
|
+
height: v.height
|
|
2518
|
+
}, x = Ti(s.crossFade ?? .55), S = Di(n.snapshot, d), C = jn(n.snapshot.paint, d.paint, s.radius === !1 ? /* @__PURE__ */ new Set(["border-radius"]) : void 0), w = C.find((e) => e.property === "border-radius");
|
|
2519
|
+
if (w) {
|
|
2520
|
+
let e = (e) => {
|
|
2521
|
+
if (e.includes("/")) return null;
|
|
2522
|
+
let t = e.trim().split(/\s+/), n = [];
|
|
2523
|
+
for (let e of t) {
|
|
2524
|
+
let t = /^(\d+(?:\.\d+)?)px$/.exec(e);
|
|
2525
|
+
if (!t) return null;
|
|
2526
|
+
n.push(Number(t[1]));
|
|
2527
|
+
}
|
|
2528
|
+
return n;
|
|
2529
|
+
}, t = (e) => e.width > 0 && e.height > 0 && Math.abs(e.width / e.height - 1) <= .1, r = e(w.from), i = e(w.to);
|
|
2530
|
+
if (r && i && t(n.snapshot.rect) && t(d.rect)) {
|
|
2531
|
+
let e = (e, t) => e.map((e) => `${(e / t * 100).toFixed(2)}%`).join(" ");
|
|
2532
|
+
w.from = e(r, n.snapshot.rect.width), w.to = e(i, d.rect.width);
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
let T = En(wn(n.element), wn(t.element));
|
|
2536
|
+
T && X("edge-clip", t, r, T);
|
|
2537
|
+
let E = `${gi += 1}`, D = zr({
|
|
2538
|
+
id: `${E}i`,
|
|
2539
|
+
travel: {
|
|
2540
|
+
from: K,
|
|
2541
|
+
authoredFrom: Fn(u.from, b) ?? K,
|
|
2542
|
+
authoredTo: Fn(u.to, b) ?? K,
|
|
2543
|
+
duration: h,
|
|
2544
|
+
start: _,
|
|
2545
|
+
ease: g
|
|
2546
|
+
},
|
|
2547
|
+
box: {
|
|
2548
|
+
from: y,
|
|
2549
|
+
to: v
|
|
2550
|
+
},
|
|
2551
|
+
clip: T,
|
|
2552
|
+
padding: n.snapshot.padding === d.padding ? null : {
|
|
2553
|
+
from: n.snapshot.padding,
|
|
2554
|
+
to: d.padding
|
|
2555
|
+
},
|
|
2556
|
+
fontSize: S.fontSize,
|
|
2557
|
+
fontWeight: S.fontWeight,
|
|
2558
|
+
letterSpacing: S.letterSpacing,
|
|
2559
|
+
wordSpacing: S.wordSpacing,
|
|
2560
|
+
lineHeight: S.lineHeight,
|
|
2561
|
+
fade: Rr(u.from).length > 0 ? {
|
|
2562
|
+
from: u.from,
|
|
2563
|
+
to: u.to,
|
|
2564
|
+
duration: h * x
|
|
2565
|
+
} : null,
|
|
2566
|
+
paint: C
|
|
2567
|
+
}), O = n.element, k = ji(s, l), A = O.isConnected && O !== t.element && k ? zr({
|
|
2568
|
+
id: `${E}o`,
|
|
2569
|
+
travel: {
|
|
2570
|
+
from: K,
|
|
2571
|
+
authoredFrom: K,
|
|
2572
|
+
authoredTo: K,
|
|
2573
|
+
duration: h,
|
|
2574
|
+
start: _,
|
|
2575
|
+
ease: g
|
|
2576
|
+
},
|
|
2577
|
+
fade: {
|
|
2578
|
+
from: k.to,
|
|
2579
|
+
to: k.to,
|
|
2580
|
+
duration: Oi,
|
|
2581
|
+
delay: 0
|
|
2582
|
+
},
|
|
2583
|
+
paint: []
|
|
2584
|
+
}) : null;
|
|
2585
|
+
if (o) {
|
|
2586
|
+
let i = n.snapshot.rect.x - d.rect.x, a = n.snapshot.rect.y - d.rect.y, o = Math.abs(i) >= .5 || Math.abs(a) >= .5, s = t.restSize ?? {
|
|
2587
|
+
width: d.rect.width,
|
|
2588
|
+
height: d.rect.height
|
|
2589
|
+
}, c = n.snapshot.rect.width - s.width, l = n.snapshot.rect.height - s.height, u = S.fontSize === null && (Math.abs(c) >= 1 || Math.abs(l) >= 1), f = S.fontSize !== null || S.fontWeight !== null || S.letterSpacing !== null || S.wordSpacing !== null || S.lineHeight !== null, p = n.snapshot.aspectRatio !== null && d.aspectRatio !== null && n.snapshot.aspectRatio !== d.aspectRatio, m = n.snapshot.padding !== d.padding || n.snapshot.margin !== d.margin;
|
|
2590
|
+
if (!f && !p && !m && !o && !u && C.length === 0) {
|
|
2591
|
+
X("nested-nothing-to-do", t, r);
|
|
2592
|
+
return;
|
|
2593
|
+
}
|
|
2594
|
+
let v = zr({
|
|
2595
|
+
id: `${E}n`,
|
|
2596
|
+
travel: {
|
|
2597
|
+
from: o ? {
|
|
2598
|
+
...K,
|
|
2599
|
+
x: i,
|
|
2600
|
+
y: a
|
|
2601
|
+
} : K,
|
|
2602
|
+
authoredFrom: K,
|
|
2603
|
+
authoredTo: K,
|
|
2604
|
+
duration: h,
|
|
2605
|
+
start: _,
|
|
2606
|
+
ease: g
|
|
2607
|
+
},
|
|
2608
|
+
fontSize: S.fontSize,
|
|
2609
|
+
fontWeight: S.fontWeight,
|
|
2610
|
+
letterSpacing: S.letterSpacing,
|
|
2611
|
+
wordSpacing: S.wordSpacing,
|
|
2612
|
+
lineHeight: S.lineHeight,
|
|
2613
|
+
aspectRatio: p ? {
|
|
2614
|
+
from: n.snapshot.aspectRatio,
|
|
2615
|
+
to: d.aspectRatio
|
|
2616
|
+
} : null,
|
|
2617
|
+
padding: n.snapshot.padding === d.padding ? null : {
|
|
2618
|
+
from: n.snapshot.padding,
|
|
2619
|
+
to: d.padding
|
|
2620
|
+
},
|
|
2621
|
+
margin: n.snapshot.margin === d.margin ? null : {
|
|
2622
|
+
from: n.snapshot.margin,
|
|
2623
|
+
to: d.margin
|
|
2624
|
+
},
|
|
2625
|
+
size: u ? {
|
|
2626
|
+
from: {
|
|
2627
|
+
width: n.snapshot.rect.width,
|
|
2628
|
+
height: n.snapshot.rect.height
|
|
2629
|
+
},
|
|
2630
|
+
to: s
|
|
2631
|
+
} : null,
|
|
2632
|
+
fade: null,
|
|
2633
|
+
paint: C
|
|
2634
|
+
}), y = Gr(v.rules), b = t.element.getAttribute("style");
|
|
2635
|
+
t.element.style.animation = v.animation, t.element.setAttribute(V, Xt.ENTER);
|
|
2636
|
+
let x = !1, w = !1, T = () => {
|
|
2637
|
+
x || (x = !0, X("land-nested", t, r, { backstop: w }), t.element.removeEventListener("animationend", D), clearTimeout(k), b === null ? t.element.removeAttribute("style") : t.element.setAttribute("style", b), t.element.setAttribute(V, ""), y(), e.flights.delete(t.layoutId));
|
|
2638
|
+
};
|
|
2639
|
+
function D(e) {
|
|
2640
|
+
if (e.animationName === v.geometryName) {
|
|
2641
|
+
if (h > 0 && e.elapsedTime === 0) {
|
|
2642
|
+
X("false-end-nested", t, r, { name: e.animationName });
|
|
2643
|
+
return;
|
|
2644
|
+
}
|
|
2645
|
+
T();
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
let O = (e) => setTimeout(() => {
|
|
2649
|
+
w = !0, T();
|
|
2650
|
+
}, e * 1e3 + 250), k = O(_ + h);
|
|
2651
|
+
t.element.addEventListener("animationend", D), e.flights.set(t.layoutId, {
|
|
2652
|
+
finish: T,
|
|
2653
|
+
element: t.element,
|
|
2654
|
+
duration: h,
|
|
2655
|
+
start: _,
|
|
2656
|
+
ease: g,
|
|
2657
|
+
suspendBackstop: () => clearTimeout(k),
|
|
2658
|
+
armBackstop: (e) => {
|
|
2659
|
+
clearTimeout(k), k = O(e);
|
|
2660
|
+
}
|
|
2661
|
+
});
|
|
2662
|
+
return;
|
|
2663
|
+
}
|
|
2664
|
+
let j = x > 0 && O.isConnected ? O.cloneNode(!0) : null, M = j ? zr({
|
|
2665
|
+
id: `${E}g`,
|
|
2666
|
+
travel: {
|
|
2667
|
+
from: K,
|
|
2668
|
+
to: Yn(v, y),
|
|
2669
|
+
authoredFrom: K,
|
|
2670
|
+
authoredTo: K,
|
|
2671
|
+
duration: h,
|
|
2672
|
+
start: _,
|
|
2673
|
+
ease: g
|
|
2674
|
+
},
|
|
2675
|
+
clip: T,
|
|
2676
|
+
fade: {
|
|
2677
|
+
from: { opacity: 1 },
|
|
2678
|
+
to: { opacity: 0 },
|
|
2679
|
+
duration: h * x
|
|
2680
|
+
},
|
|
2681
|
+
paint: []
|
|
2682
|
+
}) : null, ee = v.width * v.height < y.width * y.height, N = s.carry === "screen" && !o ? ee ? i : xi(O) : null, te = N && y.width > 0 && v.width > 0 ? Br({
|
|
2683
|
+
id: `${E}c`,
|
|
2684
|
+
origin: Ii(N, f),
|
|
2685
|
+
small: ee ? v : y,
|
|
2686
|
+
big: ee ? y : v,
|
|
2687
|
+
settling: ee,
|
|
2688
|
+
duration: h,
|
|
2689
|
+
start: _,
|
|
2690
|
+
ease: g,
|
|
2691
|
+
selector: G(nn, `${E}c`)
|
|
2692
|
+
}) : null, P = Gr([
|
|
2693
|
+
...D.rules,
|
|
2694
|
+
...A?.rules ?? [],
|
|
2695
|
+
...M?.rules ?? [],
|
|
2696
|
+
...te?.rules ?? []
|
|
2697
|
+
]);
|
|
2698
|
+
N && te && (e.residue.get(N)?.(), N.setAttribute(nn, `${E}c`));
|
|
2699
|
+
let F = typeof getComputedStyle == "function" ? getComputedStyle(t.element) : null, I = t.element.cloneNode(!0);
|
|
2700
|
+
for (let e of [I, ...I.querySelectorAll("*")]) e.removeAttribute(V), e.removeAttribute(Zt), e.removeAttribute($t), e.removeAttribute(B), e.removeAttribute("id"), e.removeAttribute("name"), e.removeAttribute("data-testid"), e.style.removeProperty("animation");
|
|
2701
|
+
I.setAttribute(en, ""), I.setAttribute("aria-hidden", "true"), I.inert = !0, I.style.visibility = "hidden", I.style.pointerEvents = "none", p.insertBefore(I, t.element);
|
|
2702
|
+
let ne = t.element.getAttribute("style"), re = F, ie = re ? vi.map((e) => [e, yi(re, e)]) : [];
|
|
2703
|
+
Sn(t.element, () => f.appendChild(t.element));
|
|
2704
|
+
for (let [e, n] of ie) t.element.style[e] = n;
|
|
2705
|
+
if (t.element.style.position = "absolute", t.element.style.left = `${y.x}px`, t.element.style.top = `${y.y}px`, t.element.style.width = `${y.width}px`, t.element.style.height = `${y.height}px`, t.element.style.margin = "0", t.element.style.minWidth = "0", t.element.style.minHeight = "0", t.element.style.maxWidth = "none", t.element.style.maxHeight = "none", t.element.style.contain = "layout", t.element.style.willChange = "left, top, width, height", t.element.style.zIndex = `${Ai(p) + 1}`, t.element.style.animation = D.animation, t.element.setAttribute(V, Xt.ENTER), j && M) {
|
|
2706
|
+
for (let e of [j, ...j.querySelectorAll("*")]) e !== j && e.hasAttribute("data-flemo-morph") && (e.style.opacity = "0"), e.removeAttribute(V), e.removeAttribute(Zt), e.removeAttribute(B), e.removeAttribute("id"), e.removeAttribute("name"), e.removeAttribute("data-testid");
|
|
2707
|
+
j.setAttribute(tn, ""), j.setAttribute("aria-hidden", "true"), j.inert = !0, j.style.background = "none", j.style.boxShadow = "none", j.style.borderColor = "transparent";
|
|
2708
|
+
for (let [e, t] of ie) j.style[e] = t;
|
|
2709
|
+
j.style.position = "absolute", j.style.left = `${y.x}px`, j.style.top = `${y.y}px`, j.style.width = `${y.width}px`, j.style.height = `${y.height}px`, j.style.margin = "0", j.style.minWidth = "0", j.style.minHeight = "0", j.style.maxWidth = "none", j.style.maxHeight = "none", j.style.pointerEvents = "none", j.style.willChange = "left, top, width, height", j.style.contain = "layout", j.style.zIndex = `${Ai(p) + 2}`, j.style.animation = M.animation, f.appendChild(j);
|
|
2710
|
+
}
|
|
2711
|
+
/* v8 ignore next -- as above: `departing` exists for every paired flight. */
|
|
2712
|
+
A && (O.style.setProperty("animation", A.animation), O.setAttribute(V, Xt.EXIT));
|
|
2713
|
+
let L = null, ae = !1, oe = () => {
|
|
2714
|
+
ae || (ae = !0, P());
|
|
2715
|
+
}, R = () => {
|
|
2716
|
+
L?.(), L = null, e.residue.get(O) === R && e.residue.delete(O), A && (O.style.removeProperty("animation"), O.setAttribute(V, "")), N && (e.residue.get(N) === R && e.residue.delete(N), N.getAttribute("data-flemo-morph-camera") === `${E}c` && N.removeAttribute(nn)), oe();
|
|
2717
|
+
}, se = () => {
|
|
2718
|
+
if (!O.isConnected || !bi(a.getState().status)) {
|
|
2719
|
+
R();
|
|
2720
|
+
return;
|
|
2721
|
+
}
|
|
2722
|
+
A && e.residue.set(O, R), N && te && e.residue.set(N, R), L = a.subscribe((e) => {
|
|
2723
|
+
bi(e.status) || R();
|
|
2724
|
+
});
|
|
2725
|
+
let t = setTimeout(R, (_ + h) * 1e3 + 1e3), n = L;
|
|
2726
|
+
L = () => {
|
|
2727
|
+
clearTimeout(t), n();
|
|
2728
|
+
};
|
|
2729
|
+
}, ce = () => {
|
|
2730
|
+
f.setAttribute(H, i?.getAttribute("data-flemo-anim-hold") ?? an.RELEASED);
|
|
2731
|
+
};
|
|
2732
|
+
ce();
|
|
2733
|
+
let le = typeof MutationObserver == "function" ? new MutationObserver(ce) : null;
|
|
2734
|
+
i && le?.observe(i, {
|
|
2735
|
+
attributes: !0,
|
|
2736
|
+
attributeFilter: [H]
|
|
2737
|
+
});
|
|
2738
|
+
let ue = !1, z = !1, de = () => {
|
|
2739
|
+
ue || (ue = !0, X("land", t, r, {
|
|
2740
|
+
backstop: z,
|
|
2741
|
+
hold: f.getAttribute(H),
|
|
2742
|
+
screenHold: i?.getAttribute("data-flemo-anim-hold") ?? null,
|
|
2743
|
+
elapsed: Math.round(performance.now() - pe)
|
|
2744
|
+
}), t.element.removeEventListener("animationend", fe), clearTimeout(he), le?.disconnect(), f.removeAttribute(H), ne === null ? t.element.removeAttribute("style") : t.element.setAttribute("style", ne), p.isConnected ? Sn(t.element, () => I.replaceWith(t.element)) : t.element.remove(), I.remove(), t.element.setAttribute(V, ""), j?.remove(), A || N ? se() : oe(), e.flights.delete(t.layoutId));
|
|
2745
|
+
};
|
|
2746
|
+
function fe(e) {
|
|
2747
|
+
if (e.animationName === D.geometryName) {
|
|
2748
|
+
if (h > 0 && e.elapsedTime === 0) {
|
|
2749
|
+
X("false-end", t, r, { name: e.animationName });
|
|
2750
|
+
return;
|
|
2751
|
+
}
|
|
2752
|
+
de();
|
|
2753
|
+
}
|
|
2754
|
+
}
|
|
2755
|
+
let pe = performance.now(), me = (e) => setTimeout(() => {
|
|
2756
|
+
z = !0, de();
|
|
2757
|
+
}, e * 1e3 + 250), he = me(_ + h);
|
|
2758
|
+
t.element.addEventListener("animationend", fe), e.flights.set(t.layoutId, {
|
|
2759
|
+
finish: de,
|
|
2760
|
+
element: t.element,
|
|
2761
|
+
duration: h,
|
|
2762
|
+
start: _,
|
|
2763
|
+
ease: g,
|
|
2764
|
+
suspendBackstop: () => clearTimeout(he),
|
|
2765
|
+
armBackstop: (e) => {
|
|
2766
|
+
clearTimeout(he), he = me(e);
|
|
2767
|
+
}
|
|
2768
|
+
});
|
|
2769
|
+
}, Ri = (e, t, n = !1) => {
|
|
2770
|
+
if (!e.isConnected) return !1;
|
|
2771
|
+
let r = xi(e);
|
|
2772
|
+
return r ? !n && !bi(r.getAttribute("data-flemo-status")) ? !1 : r.getAttribute(Nt) !== Si(t) : !0;
|
|
2773
|
+
}, zi = (e, t, n, r = !1) => {
|
|
2774
|
+
for (let i of e.entries.values()) {
|
|
2775
|
+
if (i.element === t.element || i.layoutId !== t.layoutId || !Ri(i.element, n, r)) continue;
|
|
2776
|
+
let e = xi(i.element);
|
|
2777
|
+
if (!e) return {
|
|
2778
|
+
snapshot: Un(i.element),
|
|
2779
|
+
element: i.element
|
|
2780
|
+
};
|
|
2781
|
+
let a = mi(i.element, e, wi(n).exit);
|
|
2782
|
+
return {
|
|
2783
|
+
snapshot: {
|
|
2784
|
+
rect: a.rect,
|
|
2785
|
+
fontSize: a.fontSize,
|
|
2786
|
+
fontWeight: a.fontWeight,
|
|
2787
|
+
letterSpacing: a.letterSpacing,
|
|
2788
|
+
wordSpacing: a.wordSpacing,
|
|
2789
|
+
lineHeight: a.lineHeight,
|
|
2790
|
+
aspectRatio: a.aspectRatio,
|
|
2791
|
+
padding: a.padding,
|
|
2792
|
+
margin: a.margin,
|
|
2793
|
+
paint: a.paint
|
|
2794
|
+
},
|
|
2795
|
+
element: i.element
|
|
2796
|
+
};
|
|
2797
|
+
}
|
|
2798
|
+
return null;
|
|
2799
|
+
}, Bi = W(V), Vi = 500, X = (e, t, n, r) => {
|
|
2800
|
+
if (!Me()) return;
|
|
2801
|
+
let i = globalThis, a = {
|
|
2802
|
+
why: e,
|
|
2803
|
+
id: t.layoutId,
|
|
2804
|
+
status: n,
|
|
2805
|
+
extra: r,
|
|
2806
|
+
t: Math.round(performance.now())
|
|
2807
|
+
}, o = i.flemoMorphTrace ??= [];
|
|
2808
|
+
o.push(a), o.length > Vi && o.shift();
|
|
2809
|
+
}, Hi = (e, t, n, r = !1, i) => {
|
|
2810
|
+
let a = i ?? t.getState().status;
|
|
2811
|
+
if (!i && !bi(a)) {
|
|
2812
|
+
X("not-transitional", n, a);
|
|
2813
|
+
return;
|
|
2814
|
+
}
|
|
2815
|
+
if (e.flights.has(n.layoutId)) {
|
|
2816
|
+
X("already-flying", n, a);
|
|
2817
|
+
return;
|
|
2818
|
+
}
|
|
2819
|
+
let o = n.element.parentElement?.closest(Bi) ?? null, s = null;
|
|
2820
|
+
if (o) {
|
|
2821
|
+
if (!r) {
|
|
2822
|
+
queueMicrotask(() => Hi(e, t, n, !0, i));
|
|
2823
|
+
return;
|
|
2824
|
+
}
|
|
2825
|
+
s = [...e.flights.values()].find((e) => e.element === o) ?? null;
|
|
2826
|
+
}
|
|
2827
|
+
let c = s ? null : xi(n.element);
|
|
2828
|
+
if (!s && (!c || !Ci(c, a))) {
|
|
2829
|
+
X(c ? "not-arriving" : "no-screen", n, a, {
|
|
2830
|
+
active: c?.getAttribute(Nt),
|
|
2831
|
+
enclosing: !!o,
|
|
2832
|
+
deferred: r
|
|
2833
|
+
});
|
|
2834
|
+
return;
|
|
2835
|
+
}
|
|
2836
|
+
let l = e.snapshots.get(n.layoutId), u = i !== void 0, d = l && l.element !== n.element && Ri(l.element, a, u) ? l : zi(e, n, a, u);
|
|
2837
|
+
if (!d) {
|
|
2838
|
+
X(l ? "self-snapshot" : "no-snapshot", n, a, { deferred: r });
|
|
2839
|
+
return;
|
|
2840
|
+
}
|
|
2841
|
+
X("start", n, a, {
|
|
2842
|
+
carrying: !!s,
|
|
2843
|
+
recovered: d !== l
|
|
2844
|
+
}), Li(e, n, d, a, c, t, s);
|
|
2845
|
+
}, Ui = (e) => {
|
|
2846
|
+
for (let [t, n] of e.snapshots) n.element.isConnected || e.snapshots.delete(t);
|
|
2847
|
+
for (let t of e.entries.values()) {
|
|
2848
|
+
if (!t.element.isConnected) continue;
|
|
2849
|
+
let n = e.snapshots.get(t.layoutId), r = xi(t.element);
|
|
2850
|
+
n && r && r.getAttribute("data-flemo-active") !== "true" || e.snapshots.set(t.layoutId, {
|
|
2851
|
+
snapshot: Un(t.element),
|
|
2852
|
+
element: t.element
|
|
2853
|
+
});
|
|
2854
|
+
}
|
|
2855
|
+
}, Wi = (e, t) => {
|
|
2856
|
+
let n = Ki(e);
|
|
2857
|
+
Ui(n);
|
|
2858
|
+
for (let r of [...n.entries.values()]) r.element.isConnected && Hi(n, e, r, !1, t);
|
|
2859
|
+
return [...n.flights.values()];
|
|
2860
|
+
}, Gi = (e) => [...Ki(e).flights.values()], Ki = (e) => {
|
|
2861
|
+
let t = hi.get(e);
|
|
2862
|
+
if (t) return t;
|
|
2863
|
+
let n = {
|
|
2864
|
+
entries: /* @__PURE__ */ new Map(),
|
|
2865
|
+
residue: /* @__PURE__ */ new Map(),
|
|
2866
|
+
snapshots: /* @__PURE__ */ new Map(),
|
|
2867
|
+
flights: /* @__PURE__ */ new Map(),
|
|
2868
|
+
/* v8 ignore next -- replaced on the line below; it exists so the field is
|
|
2869
|
+
never undefined between construction and subscription. */
|
|
2870
|
+
unsubscribe: () => {}
|
|
2871
|
+
};
|
|
2872
|
+
return n.unsubscribe = e.subscribe((e, t) => {
|
|
2873
|
+
if (e.status !== t.status && bi(e.status)) {
|
|
2874
|
+
Ui(n);
|
|
2875
|
+
for (let e of [...n.flights.values()]) e.finish();
|
|
2876
|
+
}
|
|
2877
|
+
}), hi.set(e, n), n;
|
|
2878
|
+
};
|
|
2879
|
+
function qi(e, t) {
|
|
2880
|
+
let { layoutId: n, navigateStore: r } = t, i = t.name ?? "shared", a = Ki(r), o = e.getBoundingClientRect(), s = {
|
|
2881
|
+
element: e,
|
|
2882
|
+
layoutId: String(n),
|
|
2883
|
+
name: i,
|
|
2884
|
+
restSize: o.width > 0 && o.height > 0 ? {
|
|
2885
|
+
width: o.width,
|
|
2886
|
+
height: o.height
|
|
2887
|
+
} : null
|
|
2888
|
+
};
|
|
2889
|
+
return a.entries.set(e, s), e.hasAttribute("data-flemo-morph") || e.setAttribute(V, ""), e.setAttribute(Zt, String(i)), Hi(a, r, s), () => {
|
|
2890
|
+
a.entries.get(e) === s && a.entries.delete(e);
|
|
2891
|
+
};
|
|
2892
|
+
}
|
|
2893
|
+
//#endregion
|
|
2894
|
+
//#region src/transition/cubicBezier.ts
|
|
2895
|
+
var Ji = (e, t, n, r) => {
|
|
2896
|
+
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;
|
|
2897
|
+
return (e) => {
|
|
2898
|
+
if (e <= 0) return 0;
|
|
2899
|
+
if (e >= 1) return 1;
|
|
2900
|
+
let t = 0, n = 1;
|
|
2901
|
+
for (let r = 0; r < 40; r++) {
|
|
2902
|
+
let r = (t + n) / 2;
|
|
2903
|
+
i(r) < e ? t = r : n = r;
|
|
2904
|
+
}
|
|
2905
|
+
return a((t + n) / 2);
|
|
2906
|
+
};
|
|
2907
|
+
}, Yi = (e) => {
|
|
2908
|
+
let t = Qi(e);
|
|
2909
|
+
if (!t) return (e) => e;
|
|
2910
|
+
let [n, r, i, a] = t, o = (e) => 3 * (1 - e) * (1 - e) * e * n + 3 * (1 - e) * e * e * i + e ** 3, s = (e) => 3 * (1 - e) * (1 - e) * e * r + 3 * (1 - e) * e * e * a + e ** 3;
|
|
2911
|
+
return (e) => {
|
|
2912
|
+
if (e <= 0) return 0;
|
|
2913
|
+
if (e >= 1) return 1;
|
|
2914
|
+
let t = 0, n = 1;
|
|
2915
|
+
for (let r = 0; r < 40; r++) {
|
|
2916
|
+
let r = (t + n) / 2;
|
|
2917
|
+
s(r) < e ? t = r : n = r;
|
|
2918
|
+
}
|
|
2919
|
+
return o((t + n) / 2);
|
|
2920
|
+
};
|
|
2921
|
+
}, Xi = (e) => e, Zi = {
|
|
2922
|
+
ease: [
|
|
2923
|
+
.25,
|
|
2924
|
+
.1,
|
|
2925
|
+
.25,
|
|
2926
|
+
1
|
|
2927
|
+
],
|
|
2928
|
+
easeIn: [
|
|
2929
|
+
.42,
|
|
2930
|
+
0,
|
|
2931
|
+
1,
|
|
2932
|
+
1
|
|
2933
|
+
],
|
|
2934
|
+
easeOut: [
|
|
2935
|
+
0,
|
|
2936
|
+
0,
|
|
2937
|
+
.58,
|
|
2938
|
+
1
|
|
2939
|
+
],
|
|
2940
|
+
easeInOut: [
|
|
2941
|
+
.42,
|
|
2942
|
+
0,
|
|
2943
|
+
.58,
|
|
2944
|
+
1
|
|
2945
|
+
],
|
|
2946
|
+
circIn: [
|
|
2947
|
+
0,
|
|
2948
|
+
.55,
|
|
2949
|
+
.45,
|
|
2950
|
+
1
|
|
2951
|
+
],
|
|
2952
|
+
circOut: [
|
|
2953
|
+
.55,
|
|
2954
|
+
0,
|
|
2955
|
+
1,
|
|
2956
|
+
.45
|
|
2957
|
+
],
|
|
2958
|
+
backIn: [
|
|
2959
|
+
.31,
|
|
2960
|
+
.01,
|
|
2961
|
+
.66,
|
|
2962
|
+
-.59
|
|
2963
|
+
],
|
|
2964
|
+
backOut: [
|
|
2965
|
+
.33,
|
|
2966
|
+
1.53,
|
|
2967
|
+
.69,
|
|
2968
|
+
.99
|
|
2969
|
+
],
|
|
2970
|
+
anticipate: [
|
|
2971
|
+
.36,
|
|
2972
|
+
0,
|
|
2973
|
+
.66,
|
|
2974
|
+
-.56
|
|
2975
|
+
]
|
|
2976
|
+
}, Qi = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? [...e] : null : typeof e == "string" ? e === "linear" ? null : [...Zi[e] ?? Zi.ease] : [...Zi.ease], $i = (e) => {
|
|
2977
|
+
if (Array.isArray(e)) {
|
|
2978
|
+
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2979
|
+
let [t, n, r, i] = e;
|
|
2980
|
+
return Ji(t, n, r, i);
|
|
2981
|
+
}
|
|
2982
|
+
return Xi;
|
|
2983
|
+
}
|
|
2984
|
+
return typeof e == "string" ? e === "linear" ? Xi : Ji(...Zi[e] ?? Zi.ease) : Ji(...Zi.ease);
|
|
2985
|
+
}, ea = "flemo-morph-", ta = (e) => {
|
|
2986
|
+
let t = e.animationName;
|
|
2987
|
+
return typeof t == "string" && t.startsWith(ea);
|
|
2988
|
+
}, na = (e, t) => {
|
|
2989
|
+
if (!Me()) return;
|
|
2990
|
+
let n = globalThis, r = n.flemoMorphTrace ??= [];
|
|
2991
|
+
r.push({
|
|
2992
|
+
why: e,
|
|
2993
|
+
id: "swipe",
|
|
2994
|
+
status: "DRAG",
|
|
2995
|
+
extra: t,
|
|
2996
|
+
t: Math.round(performance.now())
|
|
2997
|
+
}), r.length > 500 && r.shift();
|
|
2998
|
+
}, ra = () => typeof document > "u" || typeof document.getAnimations != "function" ? [] : document.getAnimations().filter(ta), ia = (e, t = "POPPING") => {
|
|
2999
|
+
Wi(e, t), na("swipe-begin", { flights: Gi(e).length });
|
|
3000
|
+
let n = () => Gi(e)[0] ?? null, r = () => {
|
|
3001
|
+
for (let t of Gi(e)) t.suspendBackstop();
|
|
3002
|
+
}, i = (e) => {
|
|
3003
|
+
r();
|
|
3004
|
+
for (let t of ra()) {
|
|
3005
|
+
t.pause();
|
|
3006
|
+
try {
|
|
3007
|
+
t.currentTime = e * 1e3;
|
|
3008
|
+
} catch {}
|
|
3009
|
+
}
|
|
3010
|
+
};
|
|
3011
|
+
i(0), queueMicrotask(() => i(0));
|
|
3012
|
+
let a = !1, o = null, s = 0;
|
|
3013
|
+
return {
|
|
3014
|
+
get active() {
|
|
3015
|
+
return n() !== null;
|
|
3016
|
+
},
|
|
3017
|
+
scrub: (e) => {
|
|
3018
|
+
if (a) return;
|
|
3019
|
+
let t = n();
|
|
3020
|
+
if (!t) return;
|
|
3021
|
+
let r = e < 0 ? 0 : e > 1 ? 1 : e;
|
|
3022
|
+
o = r, s += 1, i(t.start + Yi(t.ease)(r) * t.duration);
|
|
3023
|
+
},
|
|
3024
|
+
settle: (t, r) => {
|
|
3025
|
+
if (a) return;
|
|
3026
|
+
a = !0;
|
|
3027
|
+
let i = n();
|
|
3028
|
+
if (!i) {
|
|
3029
|
+
na("swipe-settle-no-flight", {
|
|
3030
|
+
commit: t,
|
|
3031
|
+
seconds: r
|
|
3032
|
+
});
|
|
3033
|
+
return;
|
|
3034
|
+
}
|
|
3035
|
+
let c = ra(), l = Math.max(r, 1 / 60);
|
|
3036
|
+
na("swipe-settle", {
|
|
3037
|
+
commit: t,
|
|
3038
|
+
seconds: r,
|
|
3039
|
+
flights: Gi(e).length,
|
|
3040
|
+
animations: c.length,
|
|
3041
|
+
at: c[0]?.currentTime ?? null,
|
|
3042
|
+
scrubs: s,
|
|
3043
|
+
lastAsked: o,
|
|
3044
|
+
duration: i.duration,
|
|
3045
|
+
start: i.start
|
|
3046
|
+
});
|
|
3047
|
+
for (let t of Gi(e)) t.armBackstop(l);
|
|
3048
|
+
let u = (c[0]?.currentTime ?? 0) / 1e3, d = i.start + i.duration, f = Math.max(t ? d - u : u, 0), p = f > 0 ? f / l : 1;
|
|
3049
|
+
for (let n of c) {
|
|
3050
|
+
let r = n.currentTime;
|
|
3051
|
+
n.playbackRate = t ? p : -p, t || n.addEventListener("finish", () => {
|
|
3052
|
+
for (let t of Gi(e)) t.finish();
|
|
3053
|
+
}, { once: !0 }), n.play();
|
|
3054
|
+
try {
|
|
3055
|
+
n.currentTime = r;
|
|
3056
|
+
} catch {}
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
};
|
|
3060
|
+
}, aa = "data-flemo";
|
|
3061
|
+
function oa() {
|
|
1796
3062
|
if (f()) return;
|
|
1797
|
-
let e =
|
|
1798
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
3063
|
+
let e = kr(lt.values(), ht.values(), vt.values()), t = document.head.querySelector(`style[${aa}]`);
|
|
3064
|
+
t || (t = document.createElement("style"), t.setAttribute(aa, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1799
3065
|
}
|
|
1800
3066
|
//#endregion
|
|
1801
3067
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1802
|
-
var
|
|
3068
|
+
var sa = /* @__PURE__ */ new Map(), ca = /* @__PURE__ */ new Map(), la = /* @__PURE__ */ new Map(), ua = /* @__PURE__ */ new Map(), da = (e, t) => {
|
|
1803
3069
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1804
|
-
},
|
|
3070
|
+
}, fa = (e, t) => {
|
|
1805
3071
|
let n = (e.get(t) ?? 1) - 1;
|
|
1806
3072
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1807
3073
|
};
|
|
1808
|
-
function
|
|
1809
|
-
for (let t of e)
|
|
1810
|
-
for (let e of t)
|
|
1811
|
-
for (let e of n)
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
for (let
|
|
1815
|
-
for (let e of
|
|
1816
|
-
|
|
3074
|
+
function pa(e, t, n = [], r = []) {
|
|
3075
|
+
for (let t of e) lt.set(t.name, t), da(sa, t.name);
|
|
3076
|
+
for (let e of t) ht.set(e.name, e), da(ca, e.name);
|
|
3077
|
+
for (let e of n) vt.set(e.name, e), da(la, e.name);
|
|
3078
|
+
for (let e of r) Dt.set(e.name, e), da(ua, e.name);
|
|
3079
|
+
return oa(), () => {
|
|
3080
|
+
for (let t of e) fa(sa, t.name) && lt.delete(t.name);
|
|
3081
|
+
for (let e of t) fa(ca, e.name) && ht.delete(e.name);
|
|
3082
|
+
for (let e of n) fa(la, e.name) && vt.delete(e.name);
|
|
3083
|
+
for (let e of r) fa(ua, e.name) && Dt.delete(e.name);
|
|
3084
|
+
oa();
|
|
1817
3085
|
};
|
|
1818
3086
|
}
|
|
1819
3087
|
//#endregion
|
|
1820
3088
|
//#region src/transition/enteringInitialStyle.ts
|
|
1821
|
-
function
|
|
3089
|
+
function ma(e) {
|
|
1822
3090
|
let { initial: t, isActive: n, status: r } = e;
|
|
1823
3091
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1824
3092
|
let i = {};
|
|
@@ -1826,19 +3094,19 @@ function Rn(e) {
|
|
|
1826
3094
|
}
|
|
1827
3095
|
//#endregion
|
|
1828
3096
|
//#region src/transition/animateInline.ts
|
|
1829
|
-
var
|
|
1830
|
-
let r =
|
|
1831
|
-
r || (r = /* @__PURE__ */ new Map(),
|
|
3097
|
+
var ha = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, ga = /* @__PURE__ */ new WeakMap(), _a = Symbol("flemo-inline-writer"), va = /* @__PURE__ */ new WeakMap(), ya = (e, t, n = _a) => {
|
|
3098
|
+
let r = ga.get(e);
|
|
3099
|
+
r || (r = /* @__PURE__ */ new Map(), ga.set(e, r));
|
|
1832
3100
|
let i = r.get(t);
|
|
1833
3101
|
i || (i = {
|
|
1834
3102
|
original: e.style.getPropertyValue(t),
|
|
1835
3103
|
owners: /* @__PURE__ */ new Set()
|
|
1836
3104
|
}, r.set(t, i)), i.owners.add(n);
|
|
1837
|
-
},
|
|
1838
|
-
|
|
1839
|
-
},
|
|
1840
|
-
let r =
|
|
1841
|
-
(!n ||
|
|
3105
|
+
}, ba = (e, t) => {
|
|
3106
|
+
ha(e) && (ya(e, "transition", t), e.style.transition = "none", va.set(e, t));
|
|
3107
|
+
}, Z = (e, t, n) => {
|
|
3108
|
+
let r = ga.get(e);
|
|
3109
|
+
(!n || va.get(e) === n) && (e.style.transition = "", va.delete(e));
|
|
1842
3110
|
let i = (t) => {
|
|
1843
3111
|
let i = r?.get(t);
|
|
1844
3112
|
if (!i) {
|
|
@@ -1856,19 +3124,19 @@ var zn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Bn = /* @_
|
|
|
1856
3124
|
return;
|
|
1857
3125
|
}
|
|
1858
3126
|
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1859
|
-
},
|
|
1860
|
-
if (!
|
|
1861
|
-
let i = e, a =
|
|
3127
|
+
}, xa = (e, t, n = {}, r) => {
|
|
3128
|
+
if (!ha(e)) return Promise.resolve();
|
|
3129
|
+
let i = e, a = gr(t);
|
|
1862
3130
|
if (a.length === 0) return Promise.resolve();
|
|
1863
|
-
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c =
|
|
3131
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = _r(n.ease);
|
|
1864
3132
|
if (o <= 0 && s <= 0) {
|
|
1865
|
-
i.style.transition = "none",
|
|
1866
|
-
for (let e of a)
|
|
3133
|
+
i.style.transition = "none", va.set(i, r);
|
|
3134
|
+
for (let e of a) ya(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1867
3135
|
return Promise.resolve();
|
|
1868
3136
|
}
|
|
1869
3137
|
let l = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1870
|
-
i.style.transition = l,
|
|
1871
|
-
for (let e of a)
|
|
3138
|
+
i.style.transition = l, va.set(i, r), i.offsetWidth;
|
|
3139
|
+
for (let e of a) ya(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1872
3140
|
return new Promise((e) => {
|
|
1873
3141
|
let t = !1, n = () => {
|
|
1874
3142
|
t || (t = !0, i.removeEventListener("transitionend", r), e());
|
|
@@ -1877,11 +3145,11 @@ var zn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Bn = /* @_
|
|
|
1877
3145
|
};
|
|
1878
3146
|
i.addEventListener("transitionend", r), setTimeout(n, (o + s) * 1e3 + 60);
|
|
1879
3147
|
});
|
|
1880
|
-
},
|
|
3148
|
+
}, Sa = (e) => `${Math.round(e * 1e3) / 1e3}s`, Ca = (e) => {
|
|
1881
3149
|
let { element: t, expectedName: n, motion: r } = e, i = !1, a = !1, o = (n) => {
|
|
1882
|
-
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" && (
|
|
3150
|
+
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" && (ya(t, "animation-delay", e.writer), t.style.animationDelay = Sa(n.seconds), a = !0), i = !1;
|
|
1883
3151
|
}, s = (a) => {
|
|
1884
|
-
if (i || a.target !== t || !
|
|
3152
|
+
if (i || a.target !== t || !Tr(a.animationName, n)) return;
|
|
1885
3153
|
if (!e.isLive() || e.budgetUsed() >= 4) {
|
|
1886
3154
|
e.onTerminal();
|
|
1887
3155
|
return;
|
|
@@ -1905,67 +3173,67 @@ var zn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Bn = /* @_
|
|
|
1905
3173
|
t.addEventListener("animationcancel", s);
|
|
1906
3174
|
},
|
|
1907
3175
|
detach: () => {
|
|
1908
|
-
t.removeEventListener("animationcancel", s), a &&= (
|
|
3176
|
+
t.removeEventListener("animationcancel", s), a &&= (Z(t, ["animation-delay"], e.writer), !1);
|
|
1909
3177
|
},
|
|
1910
3178
|
fullRestart: () => {
|
|
1911
3179
|
o({ mode: "clear" });
|
|
1912
3180
|
}
|
|
1913
3181
|
};
|
|
1914
|
-
},
|
|
3182
|
+
}, wa = (e) => {
|
|
1915
3183
|
if (typeof e.querySelectorAll == "function") {
|
|
1916
3184
|
e.tagName === "IMG" && !e.hasAttribute("decoding") && e.setAttribute("decoding", "async");
|
|
1917
3185
|
for (let t of Array.from(e.querySelectorAll("img:not([decoding])"))) t.setAttribute("decoding", "async");
|
|
1918
3186
|
}
|
|
1919
|
-
},
|
|
1920
|
-
function
|
|
1921
|
-
let e =
|
|
1922
|
-
if (
|
|
3187
|
+
}, Ta = 0, Ea = [], Da = [];
|
|
3188
|
+
function Oa() {
|
|
3189
|
+
let e = Ta === 0;
|
|
3190
|
+
if (Ta += 1, e) for (let e of Da) e();
|
|
1923
3191
|
let t = !1;
|
|
1924
3192
|
return () => {
|
|
1925
|
-
if (t || (t = !0, --
|
|
1926
|
-
let e =
|
|
1927
|
-
|
|
3193
|
+
if (t || (t = !0, --Ta, Ta > 0)) return;
|
|
3194
|
+
let e = Ea;
|
|
3195
|
+
Ea = [];
|
|
1928
3196
|
for (let t of e) t();
|
|
1929
3197
|
};
|
|
1930
3198
|
}
|
|
1931
|
-
var
|
|
1932
|
-
function
|
|
1933
|
-
return
|
|
1934
|
-
|
|
3199
|
+
var ka = () => Ta > 0;
|
|
3200
|
+
function Aa(e) {
|
|
3201
|
+
return Da.push(e), () => {
|
|
3202
|
+
Da = Da.filter((t) => t !== e);
|
|
1935
3203
|
};
|
|
1936
3204
|
}
|
|
1937
|
-
function
|
|
1938
|
-
|
|
3205
|
+
function ja(e) {
|
|
3206
|
+
Ta === 0 ? e() : Ea.push(e);
|
|
1939
3207
|
}
|
|
1940
3208
|
//#endregion
|
|
1941
3209
|
//#region src/core/engine/imageDecodeOffloader.ts
|
|
1942
|
-
var
|
|
1943
|
-
let t = e.closest(
|
|
1944
|
-
return !!t &&
|
|
1945
|
-
},
|
|
3210
|
+
var Ma = 8, Na = 2, Q = 96, Pa = 15e3, Fa = 3e3, Ia = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", La = "flemo-image-scale-v1", Ra = new Set(M), za = (e) => {
|
|
3211
|
+
let t = e.closest(W(jt));
|
|
3212
|
+
return !!t && Ra.has(t.getAttribute("data-flemo-status") ?? "");
|
|
3213
|
+
}, Ba = (e) => {
|
|
1946
3214
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
1947
3215
|
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
1948
3216
|
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
1949
|
-
},
|
|
3217
|
+
}, Va = "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};", Ha = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", Ua = async (e, t) => {
|
|
1950
3218
|
try {
|
|
1951
3219
|
if (typeof caches > "u") return;
|
|
1952
|
-
await (await caches.open(
|
|
3220
|
+
await (await caches.open(La)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
1953
3221
|
} catch {}
|
|
1954
|
-
},
|
|
3222
|
+
}, Wa = async (e) => {
|
|
1955
3223
|
try {
|
|
1956
3224
|
if (typeof caches > "u") return null;
|
|
1957
|
-
let t = await (await caches.open(
|
|
3225
|
+
let t = await (await caches.open(La)).match(e);
|
|
1958
3226
|
return t ? await t.blob() : null;
|
|
1959
3227
|
} catch {
|
|
1960
3228
|
return null;
|
|
1961
3229
|
}
|
|
1962
3230
|
};
|
|
1963
|
-
function
|
|
1964
|
-
if (!
|
|
3231
|
+
function Ga(e) {
|
|
3232
|
+
if (!Ha()) return () => {};
|
|
1965
3233
|
let t = null, n = !1, r = /* @__PURE__ */ new Map(), i = (e) => !!e && e !== "skip" && e !== "opaque", a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new WeakSet(), l = /* @__PURE__ */ new Set(), u = () => typeof devicePixelRatio == "number" ? devicePixelRatio : 1, d = () => {
|
|
1966
3234
|
if (t) return t;
|
|
1967
3235
|
try {
|
|
1968
|
-
t = new Worker(URL.createObjectURL(new Blob([
|
|
3236
|
+
t = new Worker(URL.createObjectURL(new Blob([Va])));
|
|
1969
3237
|
} catch {
|
|
1970
3238
|
return null;
|
|
1971
3239
|
}
|
|
@@ -1980,7 +3248,7 @@ function mr(e) {
|
|
|
1980
3248
|
return;
|
|
1981
3249
|
}
|
|
1982
3250
|
let a = URL.createObjectURL(n);
|
|
1983
|
-
l.add(a),
|
|
3251
|
+
l.add(a), Ua(t, n), f(t, a);
|
|
1984
3252
|
}, t;
|
|
1985
3253
|
}, f = (e, t) => {
|
|
1986
3254
|
r.has(e) || r.set(e, t);
|
|
@@ -1989,21 +3257,21 @@ function mr(e) {
|
|
|
1989
3257
|
let n = () => {
|
|
1990
3258
|
t ? e.style.visibility = t : e.style.removeProperty("visibility");
|
|
1991
3259
|
};
|
|
1992
|
-
if (!
|
|
3260
|
+
if (!ka()) {
|
|
1993
3261
|
n();
|
|
1994
3262
|
return;
|
|
1995
3263
|
}
|
|
1996
3264
|
let r = !1, i = () => {
|
|
1997
3265
|
r || (r = !0, clearTimeout(o), a.delete(i), n());
|
|
1998
|
-
}, o = setTimeout(i,
|
|
1999
|
-
a.add(i),
|
|
3266
|
+
}, o = setTimeout(i, Fa);
|
|
3267
|
+
a.add(i), ja(i);
|
|
2000
3268
|
}, m = (e, t) => {
|
|
2001
3269
|
let n = () => {
|
|
2002
|
-
if (
|
|
2003
|
-
|
|
3270
|
+
if (ka()) {
|
|
3271
|
+
ja(t);
|
|
2004
3272
|
return;
|
|
2005
3273
|
}
|
|
2006
|
-
if (!
|
|
3274
|
+
if (!za(e) || typeof requestAnimationFrame != "function") {
|
|
2007
3275
|
t();
|
|
2008
3276
|
return;
|
|
2009
3277
|
}
|
|
@@ -2015,10 +3283,10 @@ function mr(e) {
|
|
|
2015
3283
|
e.style.visibility = "hidden";
|
|
2016
3284
|
let r = !1, i = () => {
|
|
2017
3285
|
r || (r = !0, clearTimeout(o), a.delete(i), t(), n ? e.style.visibility = n : e.style.removeProperty("visibility"));
|
|
2018
|
-
}, o = setTimeout(i,
|
|
3286
|
+
}, o = setTimeout(i, Fa);
|
|
2019
3287
|
a.add(i), m(e, i);
|
|
2020
|
-
}, g = (e, t) => !
|
|
2021
|
-
e.setAttribute(
|
|
3288
|
+
}, g = (e, t) => !ka() && !za(e) ? !1 : (e.setAttribute(U, t), h(e, () => {}), !0), _ = (e, t, a) => {
|
|
3289
|
+
e.setAttribute(U, t), e.src = a, h(e, () => {
|
|
2022
3290
|
/* v8 ignore next -- disposal runs pending reveals; nothing to repair. */
|
|
2023
3291
|
if (n) return;
|
|
2024
3292
|
let a = r.get(t);
|
|
@@ -2029,12 +3297,12 @@ function mr(e) {
|
|
|
2029
3297
|
if (n) {
|
|
2030
3298
|
if (s.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
2031
3299
|
if (i(t)) {
|
|
2032
|
-
e.setAttribute(
|
|
3300
|
+
e.setAttribute(U, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
2033
3301
|
let r = e.closest("picture");
|
|
2034
3302
|
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
2035
3303
|
e.src = t;
|
|
2036
3304
|
}
|
|
2037
|
-
} else e.getAttribute("src") ===
|
|
3305
|
+
} else e.getAttribute("src") === Ia && (i(t) ? e.src = t : (e.removeAttribute(U), e.src = n.url));
|
|
2038
3306
|
p(e, n.previousVisibility);
|
|
2039
3307
|
}
|
|
2040
3308
|
}, y = /* @__PURE__ */ new Map(), b = !1, x = () => {
|
|
@@ -2043,14 +3311,14 @@ function mr(e) {
|
|
|
2043
3311
|
y.clear();
|
|
2044
3312
|
for (let [t, n] of e) C(t, n.boxWidth, n.boxHeight);
|
|
2045
3313
|
}, S = () => {
|
|
2046
|
-
b || (b = !0,
|
|
3314
|
+
b || (b = !0, ja(() => {
|
|
2047
3315
|
if (n) return;
|
|
2048
3316
|
let e = globalThis.requestIdleCallback;
|
|
2049
3317
|
typeof e == "function" ? e(() => x()) : typeof setTimeout == "function" ? setTimeout(x, 400) : x();
|
|
2050
3318
|
}));
|
|
2051
3319
|
}, C = (e, t, n) => {
|
|
2052
3320
|
if (r.has(e) || o.has(e)) return;
|
|
2053
|
-
if (
|
|
3321
|
+
if (ka() && z()) {
|
|
2054
3322
|
y.has(e) || y.set(e, {
|
|
2055
3323
|
boxWidth: t,
|
|
2056
3324
|
boxHeight: n
|
|
@@ -2060,28 +3328,28 @@ function mr(e) {
|
|
|
2060
3328
|
let i = d();
|
|
2061
3329
|
if (!i) return;
|
|
2062
3330
|
o.add(e);
|
|
2063
|
-
let a = Math.round(Math.max(
|
|
3331
|
+
let a = Math.round(Math.max(Q, t * u()) * Na), s = Math.max(t * n, 9216) * u() ** 2;
|
|
2064
3332
|
i.postMessage({
|
|
2065
3333
|
url: e,
|
|
2066
3334
|
targetWidth: a,
|
|
2067
3335
|
neededArea: s,
|
|
2068
3336
|
ratio: 8
|
|
2069
3337
|
});
|
|
2070
|
-
}, w =
|
|
2071
|
-
if (
|
|
3338
|
+
}, w = Aa(() => {
|
|
3339
|
+
if (z() && !(!t || o.size === 0)) {
|
|
2072
3340
|
t.terminate(), t = null;
|
|
2073
3341
|
for (let e of o) {
|
|
2074
3342
|
if (y.has(e)) continue;
|
|
2075
3343
|
let t = {
|
|
2076
|
-
boxWidth:
|
|
2077
|
-
boxHeight:
|
|
3344
|
+
boxWidth: Q,
|
|
3345
|
+
boxHeight: Q
|
|
2078
3346
|
};
|
|
2079
3347
|
for (let [n, r] of s) {
|
|
2080
3348
|
if (r.url !== e) continue;
|
|
2081
3349
|
let i = n.getBoundingClientRect();
|
|
2082
3350
|
t = {
|
|
2083
|
-
boxWidth: i.width ||
|
|
2084
|
-
boxHeight: i.height ||
|
|
3351
|
+
boxWidth: i.width || Q,
|
|
3352
|
+
boxHeight: i.height || Q
|
|
2085
3353
|
};
|
|
2086
3354
|
break;
|
|
2087
3355
|
}
|
|
@@ -2095,17 +3363,17 @@ function mr(e) {
|
|
|
2095
3363
|
let a = {
|
|
2096
3364
|
url: "",
|
|
2097
3365
|
previousVisibility: e.style.visibility,
|
|
2098
|
-
timeout: setTimeout(() => v(e, null),
|
|
3366
|
+
timeout: setTimeout(() => v(e, null), Pa),
|
|
2099
3367
|
responsive: !0
|
|
2100
3368
|
}, o = () => {
|
|
2101
3369
|
/* v8 ignore next -- consider() only routes elements with an https src
|
|
2102
3370
|
here, so the final fallback arm is unreachable. */
|
|
2103
3371
|
let t = e.currentSrc || e.getAttribute("src") || "", i = e.getBoundingClientRect();
|
|
2104
|
-
if (!(/^https?:/.test(t) &&
|
|
3372
|
+
if (!(/^https?:/.test(t) && Ba({
|
|
2105
3373
|
naturalWidth: e.naturalWidth,
|
|
2106
3374
|
naturalHeight: e.naturalHeight,
|
|
2107
|
-
boxWidth: i.width ||
|
|
2108
|
-
boxHeight: i.height ||
|
|
3375
|
+
boxWidth: i.width || Q,
|
|
3376
|
+
boxHeight: i.height || Q,
|
|
2109
3377
|
devicePixelRatio: u()
|
|
2110
3378
|
}))) {
|
|
2111
3379
|
v(e, null);
|
|
@@ -2117,7 +3385,7 @@ function mr(e) {
|
|
|
2117
3385
|
v(e, o);
|
|
2118
3386
|
return;
|
|
2119
3387
|
}
|
|
2120
|
-
|
|
3388
|
+
Wa(t).then((a) => {
|
|
2121
3389
|
if (!(n || !s.has(e))) {
|
|
2122
3390
|
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
2123
3391
|
releases every held element of the url first, so a still-held
|
|
@@ -2133,7 +3401,7 @@ function mr(e) {
|
|
|
2133
3401
|
l.add(e), f(t, e);
|
|
2134
3402
|
return;
|
|
2135
3403
|
}
|
|
2136
|
-
C(t, i.width ||
|
|
3404
|
+
C(t, i.width || Q, i.height || Q);
|
|
2137
3405
|
}
|
|
2138
3406
|
});
|
|
2139
3407
|
};
|
|
@@ -2156,20 +3424,20 @@ function mr(e) {
|
|
|
2156
3424
|
if (c.add(e), e.complete && e.naturalWidth > 0) {
|
|
2157
3425
|
if (!t) {
|
|
2158
3426
|
let t = e.getBoundingClientRect();
|
|
2159
|
-
C(a, t.width ||
|
|
3427
|
+
C(a, t.width || Q, t.height || Q);
|
|
2160
3428
|
return;
|
|
2161
3429
|
}
|
|
2162
3430
|
let n = e.getBoundingClientRect();
|
|
2163
|
-
if (!
|
|
3431
|
+
if (!Ba({
|
|
2164
3432
|
naturalWidth: e.naturalWidth,
|
|
2165
3433
|
naturalHeight: e.naturalHeight,
|
|
2166
|
-
boxWidth: n.width ||
|
|
2167
|
-
boxHeight: n.height ||
|
|
3434
|
+
boxWidth: n.width || Q,
|
|
3435
|
+
boxHeight: n.height || Q,
|
|
2168
3436
|
devicePixelRatio: u()
|
|
2169
3437
|
})) return;
|
|
2170
3438
|
let o = r.get(a);
|
|
2171
3439
|
if (i(o)) {
|
|
2172
|
-
|
|
3440
|
+
ka() || za(e) ? _(e, a, o) : (e.setAttribute(U, a), e.src = o);
|
|
2173
3441
|
return;
|
|
2174
3442
|
}
|
|
2175
3443
|
if (o === "opaque") {
|
|
@@ -2185,14 +3453,14 @@ function mr(e) {
|
|
|
2185
3453
|
return;
|
|
2186
3454
|
}
|
|
2187
3455
|
if (o) {
|
|
2188
|
-
|
|
3456
|
+
ka() || za(e) ? _(e, a, o) : (e.setAttribute(U, a), e.src = o);
|
|
2189
3457
|
return;
|
|
2190
3458
|
}
|
|
2191
3459
|
s.set(e, {
|
|
2192
3460
|
url: a,
|
|
2193
3461
|
previousVisibility: e.style.visibility,
|
|
2194
|
-
timeout: setTimeout(() => v(e, null),
|
|
2195
|
-
}), e.style.visibility = "hidden", e.setAttribute(
|
|
3462
|
+
timeout: setTimeout(() => v(e, null), Pa)
|
|
3463
|
+
}), e.style.visibility = "hidden", e.setAttribute(U, a), e.src = Ia, Wa(a).then((t) => {
|
|
2196
3464
|
if (n || r.has(a)) return;
|
|
2197
3465
|
if (t) {
|
|
2198
3466
|
let e = URL.createObjectURL(t);
|
|
@@ -2202,7 +3470,7 @@ function mr(e) {
|
|
|
2202
3470
|
let i = () => {
|
|
2203
3471
|
if (n) return;
|
|
2204
3472
|
let t = e.getBoundingClientRect();
|
|
2205
|
-
C(a, t.width ||
|
|
3473
|
+
C(a, t.width || Q, t.height || Q);
|
|
2206
3474
|
};
|
|
2207
3475
|
typeof requestAnimationFrame == "function" ? requestAnimationFrame(i) : i();
|
|
2208
3476
|
});
|
|
@@ -2219,21 +3487,23 @@ function mr(e) {
|
|
|
2219
3487
|
let k = (e) => {
|
|
2220
3488
|
let t = e.getAttribute("src") ?? "", n = s.get(e);
|
|
2221
3489
|
if (n && !n.responsive) {
|
|
2222
|
-
t === n.url && (e.src =
|
|
3490
|
+
t === n.url && (e.src = Ia);
|
|
2223
3491
|
return;
|
|
2224
3492
|
}
|
|
2225
|
-
let a = e.getAttribute(
|
|
2226
|
-
if (a)
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
3493
|
+
let a = e.getAttribute(U);
|
|
3494
|
+
if (a) {
|
|
3495
|
+
if (t === a) {
|
|
3496
|
+
let t = r.get(a);
|
|
3497
|
+
i(t) && (e.src = t);
|
|
3498
|
+
} else t !== Ia && !t.startsWith("blob:") && e.removeAttribute(U);
|
|
3499
|
+
}
|
|
2230
3500
|
}, A = !1, j = new MutationObserver((t) => {
|
|
2231
3501
|
if (!n) {
|
|
2232
|
-
if (
|
|
3502
|
+
if (ka()) {
|
|
2233
3503
|
if (A) return;
|
|
2234
|
-
A = !0,
|
|
3504
|
+
A = !0, ja(() => {
|
|
2235
3505
|
if (A = !1, !n) {
|
|
2236
|
-
for (let t of Array.from(e.querySelectorAll(`img[${
|
|
3506
|
+
for (let t of Array.from(e.querySelectorAll(`img[${U}]`))) k(t);
|
|
2237
3507
|
for (let e of [...s.keys()]) k(e);
|
|
2238
3508
|
}
|
|
2239
3509
|
});
|
|
@@ -2255,22 +3525,29 @@ function mr(e) {
|
|
|
2255
3525
|
l.clear();
|
|
2256
3526
|
};
|
|
2257
3527
|
}
|
|
2258
|
-
var
|
|
2259
|
-
function
|
|
2260
|
-
return typeof document > "u" || !document.body ? () => {} : (
|
|
2261
|
-
dispose:
|
|
3528
|
+
var Ka = null;
|
|
3529
|
+
function qa() {
|
|
3530
|
+
return typeof document > "u" || !document.body ? () => {} : (Ka ? Ka.count += 1 : Ka = {
|
|
3531
|
+
dispose: Ga(document.body),
|
|
2262
3532
|
count: 1
|
|
2263
3533
|
}, () => {
|
|
2264
|
-
|
|
3534
|
+
Ka && (--Ka.count, Ka.count <= 0 && (Ka.dispose(), Ka = null));
|
|
2265
3535
|
});
|
|
2266
3536
|
}
|
|
2267
3537
|
//#endregion
|
|
2268
3538
|
//#region src/core/engine/arrivalHold.ts
|
|
2269
|
-
|
|
3539
|
+
var Ja = [
|
|
3540
|
+
W(B),
|
|
3541
|
+
W(V),
|
|
3542
|
+
W($t),
|
|
3543
|
+
W(sn),
|
|
3544
|
+
W(U)
|
|
3545
|
+
].join(", ");
|
|
3546
|
+
function Ya(e) {
|
|
2270
3547
|
if (typeof MutationObserver > "u") return () => {};
|
|
2271
3548
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
2272
3549
|
let n = t instanceof Element ? t : t.parentElement;
|
|
2273
|
-
return !n || n === e || n.closest(
|
|
3550
|
+
return !n || n === e || n.closest(Ja) !== null;
|
|
2274
3551
|
}, 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), {
|
|
2275
3552
|
glass: t,
|
|
2276
3553
|
latest: n,
|
|
@@ -2300,12 +3577,12 @@ function _r(e) {
|
|
|
2300
3577
|
if (i.type === "childList") {
|
|
2301
3578
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
2302
3579
|
if (e instanceof Element && t.delete(e)) {
|
|
2303
|
-
e.removeAttribute(
|
|
3580
|
+
e.removeAttribute(sn);
|
|
2304
3581
|
continue;
|
|
2305
3582
|
}
|
|
2306
3583
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
2307
3584
|
}
|
|
2308
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
3585
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.closest(Ja) || (e.setAttribute(sn, ""), t.add(e), l(i.target).added.push(e)));
|
|
2309
3586
|
}
|
|
2310
3587
|
}
|
|
2311
3588
|
for (let [e, t] of u) {
|
|
@@ -2340,7 +3617,7 @@ function _r(e) {
|
|
|
2340
3617
|
c.disconnect();
|
|
2341
3618
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
2342
3619
|
n.clear();
|
|
2343
|
-
for (let e of t) e instanceof HTMLElement &&
|
|
3620
|
+
for (let e of t) e instanceof HTMLElement && wa(e), e.removeAttribute(sn);
|
|
2344
3621
|
t.clear();
|
|
2345
3622
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
2346
3623
|
i.clear();
|
|
@@ -2350,103 +3627,103 @@ function _r(e) {
|
|
|
2350
3627
|
}
|
|
2351
3628
|
//#endregion
|
|
2352
3629
|
//#region src/core/engine/compositorWarmUp.ts
|
|
2353
|
-
var
|
|
3630
|
+
var Xa = 3e3, Za = [{ backgroundPosition: "0px 0px" }, { backgroundPosition: "48px 0px" }], Qa = {
|
|
2354
3631
|
duration: 500,
|
|
2355
3632
|
iterations: Infinity,
|
|
2356
3633
|
direction: "alternate",
|
|
2357
3634
|
easing: "linear"
|
|
2358
|
-
},
|
|
2359
|
-
|
|
3635
|
+
}, $a = "position:fixed;top:0;left:0;width:48px;height:48px;pointer-events:none;opacity:0.02;background-image:linear-gradient(90deg,#808080 0 24px,#909090 24px 48px);background-repeat:repeat;background-size:48px 48px;", eo = "data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAeuEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHWTbuMU6uEElTDZ1OsggExTbuMU6uEHFO7a1Osggdg7AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmsCrXsYMPQkBNgIxMYXZmNjMuMS4xMDBXQYxMYXZmNjMuMS4xMDBEiYhAj0AAAAAAABZUrmvWrgEAAAAAAABN14EBc8WIPqUZMMrLeHecgQAitZyDdW5kiIEAhoVWX1ZQOIOBASPjg4P+UCrgkLCBCLqBCJqBAlWwhFW5gQFV7oEA7AEAAAAAAAACAAASVMNn+nNzn2PAgGfImUWjh0VOQ09ERVJEh4xMYXZmNjMuMS4xMDBzc9VjwItjxYg+pRkwyst4d2fIoEWjh0VOQ09ERVJEh5NMYXZjNjMuMS4xMDAgbGlidnB4Z8ihRaOIRFVSQVRJT05Eh5MwMDowMDowMS4wMDAwMDAwMDAAH0O2dUWq54EAo5+BAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5WBABEAsQEAARAQABgAGG/0DAAEAACjlYEAIQCxAQABEBAAGAAYb/QMAAQAAKOVgQAyALEBAAEQEAAYABhv9AwABAAAo5WBAEMAsQEAARAQABgAGG/0DAAEAACjlYEAUwCxAQABEBAAGAAYb/QMAAQAAKOVgQBkALEBAAEQEAAYABhv9AwABAAAo5SBAHUAkQEAARAQFGAAYb/QMAAQAKOXgQCFALEBAAEQEAAYADA/9AwAAAD+aACjlYEAlgCxAQABEBAAGAAYb/QMAAQAAKOXgQCnALEBAAEQEAAYADA/9AwAAAD+aACjlYEAtwCxAQABEBAAGAAYb/QMAAQAAKOXgQDIALEBAAEQEAAYADA/9AwAAAD+aACjl4EA2QCxAQABEBAAGAAwP/QMAAAA/mgAo5WBAOkAsQEAARAQFGAAYWC/0AAgAACjn4EA+oAQAgCdASoIAAgAAEcIhYWIhYSIAgIABhloAACjl4EBCwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBARsAsQEAARAQABgAGG/0DAAEAACjl4EBLACxAQABEBAAGAAwP/QMAAAA/mgAo5WBAT0AsQEAARAQABgAGG/0DAAEAACjl4EBTQCxAQABEBAAGAAwP/QMAAAA/mgAo5eBAV4AsQEAARAQABgAMD/0DAAAAP5oAKOVgQFvALEBAAEQEBRgAGFgv9AAIAAAo5+BAX+AEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5eBAZAAsQEAARAQABgAMD/0DAAAAP5oAKOVgQGhALEBAAEQEAAYABhv9AwABAAAo5WBAbEAsQEAARAQABgAGG/0DAAEAACjlYEBwgCxAQABEBAAGAAYb/QMAAQAAKOXgQHTALEBAAEQEAAYADA/9AwAAAD+aACjlYEB4wCxAQABEBAAGAAYb/QMAAQAAKOWgQH0AJEBAAEQEBRgAMD/0DAAAP5oAKOVgQIFALEBAAEQEAAYABhv9AwABAAAo5WBAhUAsQEAARAQABgAGFgYL+gMAACjlYECJgCxAQABEBAAGAAYWBgv6AwAAKOVgQI3ALEBAAEQEAAYABhYGC/oDAAAo5WBAkcAsQEAARAQABgAGFgYL+gMAACjlYECWACxAQABEBAAGAAYWBgv6AwAAKOfgQJpgBACAJ0BKggACAAARwiFhYiFhIgCAgAGGWgAAKOXgQJ5ALEBAAEQEAAYADA/9AwAAAD+aACjlYECigCxAQABEBAAGAAYb/QMAAQAAKOXgQKbALEBAAEQEAAYADA/9AwAAAD+aACjl4ECqwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBArwAsQEAARAQABgAGG/0DAAEAACjlYECzQCxAQABEBAAGAAYb/QMAAQAAKOWgQLdAJEBAAEQEBRgAMD/0DAAAP5oAKOVgQLuALEBAAEQEAAYABhv9AwABAAAo5WBAv8AsQEAARAQABgAGFgYL+gMAACjlYEDDwCxAQABEBAAGAAYWBgv6AwAAKOVgQMgALEBAAEQEAAYABhYGC/oDAAAo5WBAzEAsQEAARAQABgAGFgYGBgQAACjlYEDQQCxAQABEBAAGAAYWC/0AAgAAKOVgQNSALEBAAEQEBRgAGFgv9AAIAAAo5WBA2MAsQEAARAQABgAGFgv9AAIAACjlYEDcwCxAQABEBAAGAAYWC/0AAgAAKOVgQOEALEBAAEQEAAYABhYGBgYEAAAo5WBA5UAsQEAARAQABgAGFgYL+gMAACjlYEDpQCxAQABEBAAGAAYWBgYGBAAAKOVgQO2ALEBAAEQEAAYABhYGC/oDAAAo5WBA8cAsQEAARAQABgAGFgYGBgQAACjlYED1wCxAQABEBAAGAAYWBgv6AwAABxTu2vJu4+zgQC3iveBAfGCAbDwgQO7kLOB+reL94EB8YIBsPCCAW27kbOCAX+3i/eBAfGCAbDwggI3u5GzggJpt4v3gQHxggGw8IIDiA==", $ = null, to = null, no = null, ro = null, io = 0, ao = () => {
|
|
3636
|
+
io = 0, ro?.cancel(), ro = null, no?.remove(), no = null;
|
|
2360
3637
|
};
|
|
2361
|
-
function
|
|
3638
|
+
function oo() {
|
|
2362
3639
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
2363
|
-
if (
|
|
2364
|
-
|
|
3640
|
+
if (io += 1, !no) {
|
|
3641
|
+
no = document.createElement("div"), no.setAttribute(fn, ""), no.setAttribute("aria-hidden", "true"), no.setAttribute("style", $a), document.body.appendChild(no);
|
|
2365
3642
|
try {
|
|
2366
|
-
|
|
3643
|
+
ro = no.animate(Za, Qa);
|
|
2367
3644
|
} catch {
|
|
2368
|
-
|
|
3645
|
+
ro = null;
|
|
2369
3646
|
}
|
|
2370
|
-
if (
|
|
2371
|
-
|
|
2372
|
-
let e =
|
|
2373
|
-
|
|
3647
|
+
if (!$ && ke()) try {
|
|
3648
|
+
$ = document.createElement("video"), $.muted = !0, $.loop = !0, $.playsInline = !0, $.setAttribute("aria-hidden", "true"), $.setAttribute(pn, ""), $.setAttribute("style", "position:fixed;top:0;left:52px;width:8px;height:8px;pointer-events:none;opacity:0.02;"), $.src = eo, document.body.appendChild($), $.play()?.catch?.(() => {});
|
|
3649
|
+
let e = $;
|
|
3650
|
+
to = () => {
|
|
2374
3651
|
document.visibilityState === "hidden" ? e.pause() : e.play()?.catch?.(() => {});
|
|
2375
|
-
}, document.addEventListener("visibilitychange",
|
|
3652
|
+
}, document.addEventListener("visibilitychange", to);
|
|
2376
3653
|
} catch {
|
|
2377
|
-
|
|
3654
|
+
$ = null;
|
|
2378
3655
|
}
|
|
2379
3656
|
}
|
|
2380
3657
|
let e = !1, t = setTimeout(() => {
|
|
2381
|
-
e || (e = !0, --
|
|
2382
|
-
},
|
|
3658
|
+
e || (e = !0, --io, io <= 0 && ao());
|
|
3659
|
+
}, Xa);
|
|
2383
3660
|
return () => {
|
|
2384
|
-
e || (e = !0, clearTimeout(t), --
|
|
3661
|
+
e || (e = !0, clearTimeout(t), --io, io <= 0 && ao());
|
|
2385
3662
|
};
|
|
2386
3663
|
}
|
|
2387
3664
|
//#endregion
|
|
2388
3665
|
//#region src/core/engine/emulationNotice.ts
|
|
2389
|
-
var
|
|
3666
|
+
var so = () => {
|
|
2390
3667
|
if (typeof navigator > "u") return !1;
|
|
2391
3668
|
let e = navigator.platform ?? "";
|
|
2392
3669
|
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
2393
|
-
},
|
|
2394
|
-
|
|
2395
|
-
},
|
|
3670
|
+
}, co = !1, lo = () => {
|
|
3671
|
+
co || !z() || !so() || (co = !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."));
|
|
3672
|
+
}, uo = (e) => {
|
|
2396
3673
|
let t = e.parentElement ?? e;
|
|
2397
3674
|
return Array.from(t.querySelectorAll(`[${B}]`)).filter((n) => {
|
|
2398
|
-
let r = n.closest(
|
|
3675
|
+
let r = n.closest(W(jt));
|
|
2399
3676
|
return !r || r === e || !t.contains(r);
|
|
2400
3677
|
});
|
|
2401
|
-
},
|
|
3678
|
+
}, fo = (e, t) => {
|
|
2402
3679
|
let [n, r] = t.split("-");
|
|
2403
|
-
return
|
|
2404
|
-
},
|
|
2405
|
-
let n = e.closest(
|
|
2406
|
-
return Array.from(e.ownerDocument.querySelectorAll(`${
|
|
3680
|
+
return uo(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
3681
|
+
}, po = (e, t) => {
|
|
3682
|
+
let n = e.closest(W("data-flemo-router"))?.getAttribute("data-flemo-router") ?? null;
|
|
3683
|
+
return Array.from(e.ownerDocument.querySelectorAll(`${W(B)}${G(Mt, t)}`)).filter((e) => {
|
|
2407
3684
|
if (n === null) return !0;
|
|
2408
|
-
let t = e.closest(
|
|
2409
|
-
return !t || t.getAttribute(
|
|
3685
|
+
let t = e.closest(W(Ft));
|
|
3686
|
+
return !t || t.getAttribute(Ft) === n;
|
|
2410
3687
|
});
|
|
2411
|
-
},
|
|
2412
|
-
let t = e.closest(
|
|
2413
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${B}][${
|
|
3688
|
+
}, mo = (e, t) => po(e, t).filter((e) => e.parentElement?.closest(`[${H}]`) == null), ho = (e) => {
|
|
3689
|
+
let t = e.closest(W("data-flemo-router"))?.getAttribute("data-flemo-router") ?? null;
|
|
3690
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${B}][${H}]`)).filter((e) => {
|
|
2414
3691
|
/* v8 ignore next -- a part reached by a document query always has a parent;
|
|
2415
3692
|
the optional chain is a guard against a detached caller, not a path. */
|
|
2416
3693
|
if (e.parentElement?.closest("[data-flemo-anim-hold]") != null) return !1;
|
|
2417
3694
|
if (t === null) return !0;
|
|
2418
|
-
let n = e.closest(
|
|
3695
|
+
let n = e.closest(W(Ft));
|
|
2419
3696
|
return !n || n.getAttribute("data-flemo-router") === t;
|
|
2420
3697
|
});
|
|
2421
|
-
},
|
|
3698
|
+
}, go = (e, t, n) => {
|
|
2422
3699
|
let r = 0;
|
|
2423
3700
|
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
2424
|
-
if (!
|
|
2425
|
-
let n =
|
|
3701
|
+
if (!Mr(t, e)) continue;
|
|
3702
|
+
let n = q(t, e);
|
|
2426
3703
|
r = Math.max(r, (n.delay + n.duration) * 1e3);
|
|
2427
3704
|
}
|
|
2428
|
-
for (let t of
|
|
2429
|
-
let e =
|
|
2430
|
-
if (!e || !
|
|
2431
|
-
let a =
|
|
3705
|
+
for (let t of po(e, n)) {
|
|
3706
|
+
let e = vt.get(t.getAttribute(B)), i = `${n}-${t.getAttribute(Nt)}`;
|
|
3707
|
+
if (!e || !Mr(e, i)) continue;
|
|
3708
|
+
let a = q(e, i);
|
|
2432
3709
|
r = Math.max(r, (a.delay + a.duration) * 1e3);
|
|
2433
3710
|
}
|
|
2434
|
-
let i = t.decoratorName ?
|
|
3711
|
+
let i = t.decoratorName ? ht.get(t.decoratorName) : void 0;
|
|
2435
3712
|
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
2436
|
-
if (!
|
|
2437
|
-
let t =
|
|
3713
|
+
if (!Mr(i, e)) continue;
|
|
3714
|
+
let t = q(i, e);
|
|
2438
3715
|
r = Math.max(r, (t.delay + t.duration) * 1e3);
|
|
2439
3716
|
}
|
|
2440
3717
|
return r;
|
|
2441
|
-
},
|
|
3718
|
+
}, _o = cn, vo = (e) => !(e.complete && e.naturalWidth > 0), yo = 4, bo = (e) => {
|
|
2442
3719
|
if (!(e.complete && e.naturalWidth > 0)) return !1;
|
|
2443
3720
|
let t = e.getBoundingClientRect(), n = typeof devicePixelRatio == "number" && devicePixelRatio > 0 ? devicePixelRatio : 1, r = Math.max(1, t.width * n) * Math.max(1, t.height * n);
|
|
2444
|
-
return e.naturalWidth * e.naturalHeight > r *
|
|
2445
|
-
},
|
|
2446
|
-
function
|
|
3721
|
+
return e.naturalWidth * e.naturalHeight > r * yo;
|
|
3722
|
+
}, xo = (e, t) => vo(e) || !t && bo(e);
|
|
3723
|
+
function So(e, t, n = !1) {
|
|
2447
3724
|
if (!e || typeof document > "u" || typeof MutationObserver != "function" || typeof setTimeout != "function") return () => {};
|
|
2448
3725
|
let r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
2449
|
-
e.getAttribute(
|
|
3726
|
+
e.getAttribute(_o) === null && (r.has(e) || !xo(e, n) || (r.set(e, e.style.display), e.style.display = "none", e.setAttribute(_o, "")));
|
|
2450
3727
|
};
|
|
2451
3728
|
for (let t of e.querySelectorAll("img")) i(t);
|
|
2452
3729
|
let a = new MutationObserver((e) => {
|
|
@@ -2460,7 +3737,7 @@ function Ur(e, t, n = !1) {
|
|
|
2460
3737
|
let o = !1, s = () => {
|
|
2461
3738
|
if (!o) {
|
|
2462
3739
|
o = !0, a.disconnect();
|
|
2463
|
-
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(
|
|
3740
|
+
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(_o);
|
|
2464
3741
|
r.clear();
|
|
2465
3742
|
}
|
|
2466
3743
|
}, c = setTimeout(s, Math.max(0, t));
|
|
@@ -2470,25 +3747,25 @@ function Ur(e, t, n = !1) {
|
|
|
2470
3747
|
}
|
|
2471
3748
|
//#endregion
|
|
2472
3749
|
//#region src/core/engine/invisibleAnimationHold.ts
|
|
2473
|
-
var
|
|
3750
|
+
var Co = () => {}, wo = .004, To = (e, t) => {
|
|
2474
3751
|
let n = e.ownerDocument?.defaultView;
|
|
2475
3752
|
if (!n) return !1;
|
|
2476
3753
|
let r = e;
|
|
2477
3754
|
for (; r;) {
|
|
2478
|
-
if (Number(n.getComputedStyle(r).opacity) <=
|
|
3755
|
+
if (Number(n.getComputedStyle(r).opacity) <= wo) return !0;
|
|
2479
3756
|
if (r === t) break;
|
|
2480
3757
|
r = r.parentElement;
|
|
2481
3758
|
}
|
|
2482
3759
|
return !1;
|
|
2483
3760
|
};
|
|
2484
|
-
function
|
|
2485
|
-
if (typeof e.getAnimations != "function") return
|
|
3761
|
+
function Eo(e) {
|
|
3762
|
+
if (typeof e.getAnimations != "function") return Co;
|
|
2486
3763
|
let t = /* @__PURE__ */ new Set(), n = () => {
|
|
2487
3764
|
for (let n of e.getAnimations({ subtree: !0 })) {
|
|
2488
3765
|
if (t.size >= 128) return;
|
|
2489
3766
|
if (t.has(n) || (n.animationName ?? "").startsWith("flemo-") || n.playState !== "running") continue;
|
|
2490
3767
|
let r = n.effect?.target;
|
|
2491
|
-
if (r instanceof Element &&
|
|
3768
|
+
if (r instanceof Element && To(r, e)) try {
|
|
2492
3769
|
n.pause(), t.add(n);
|
|
2493
3770
|
} catch {}
|
|
2494
3771
|
}
|
|
@@ -2517,41 +3794,41 @@ function qr(e) {
|
|
|
2517
3794
|
}
|
|
2518
3795
|
//#endregion
|
|
2519
3796
|
//#region src/core/engine/responseHold.ts
|
|
2520
|
-
var
|
|
2521
|
-
let e =
|
|
2522
|
-
|
|
3797
|
+
var Do = !1, Oo = 0, ko = [], Ao = () => {
|
|
3798
|
+
let e = ko;
|
|
3799
|
+
ko = [];
|
|
2523
3800
|
for (let t of e) t();
|
|
2524
|
-
},
|
|
2525
|
-
if (
|
|
2526
|
-
|
|
3801
|
+
}, jo = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), Mo = () => {
|
|
3802
|
+
if (Do || typeof window > "u" || typeof window.fetch != "function") return;
|
|
3803
|
+
Do = !0;
|
|
2527
3804
|
let e = window.fetch.bind(window);
|
|
2528
|
-
window.fetch = (...t) => e(...t).then((e) =>
|
|
2529
|
-
|
|
3805
|
+
window.fetch = (...t) => e(...t).then((e) => Oo <= 0 || jo(e) ? e : new Promise((t) => {
|
|
3806
|
+
ko.push(() => t(e));
|
|
2530
3807
|
}), (e) => {
|
|
2531
|
-
if (
|
|
3808
|
+
if (Oo <= 0) throw e;
|
|
2532
3809
|
return new Promise((t, n) => {
|
|
2533
|
-
|
|
3810
|
+
ko.push(() => n(e));
|
|
2534
3811
|
});
|
|
2535
3812
|
});
|
|
2536
|
-
},
|
|
2537
|
-
function
|
|
3813
|
+
}, No = 2e3;
|
|
3814
|
+
function Po(e = No) {
|
|
2538
3815
|
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
2539
|
-
if (
|
|
2540
|
-
|
|
3816
|
+
if (Mo(), !Do) return () => {};
|
|
3817
|
+
Oo += 1;
|
|
2541
3818
|
let t = !1, n = null, r = () => {
|
|
2542
|
-
t || (t = !0, n !== null && clearTimeout(n),
|
|
3819
|
+
t || (t = !0, n !== null && clearTimeout(n), Oo = Math.max(0, Oo - 1), Oo === 0 && Ao());
|
|
2543
3820
|
};
|
|
2544
|
-
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(
|
|
3821
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(No, e))), r;
|
|
2545
3822
|
}
|
|
2546
|
-
|
|
3823
|
+
Mo();
|
|
2547
3824
|
//#endregion
|
|
2548
3825
|
//#region src/core/engine/flightHolds.ts
|
|
2549
|
-
var
|
|
3826
|
+
var Fo = () => {}, Io = 1500, Lo = 400, Ro = (e) => {
|
|
2550
3827
|
let t = null, n = null, r = null, i = null;
|
|
2551
3828
|
return { sync: ({ isTransitional: a, isActive: o, status: s, transitionName: c, getScope: l }) => {
|
|
2552
|
-
a && (
|
|
3829
|
+
a && (lo(), i &&= (clearTimeout(i), null), r ||= oo()), !a && r && !i && (typeof setTimeout == "function" ? i = setTimeout(() => {
|
|
2553
3830
|
i = null, r?.(), r = null;
|
|
2554
|
-
},
|
|
3831
|
+
}, Lo) : (r(), r = null));
|
|
2555
3832
|
let u = a && (o ? s === "PUSHING" || s === "REPLACING" : s === "POPPING"), d = a && !u;
|
|
2556
3833
|
if (!d && n) {
|
|
2557
3834
|
let t = n;
|
|
@@ -2565,8 +3842,8 @@ var ni = () => {}, ri = 1500, ii = 400, ai = (e) => {
|
|
|
2565
3842
|
e.landNow();
|
|
2566
3843
|
let n = l();
|
|
2567
3844
|
if (n) {
|
|
2568
|
-
|
|
2569
|
-
let e =
|
|
3845
|
+
ba(n);
|
|
3846
|
+
let e = Ya(n), r = Eo(n), i = go(n, ut(c), s), a = Po(i + Io), o = je() === "on" ? So(n, i + Io) : Fo, l = Oa();
|
|
2570
3847
|
t = () => {
|
|
2571
3848
|
a(), o(), r(), e(), l();
|
|
2572
3849
|
};
|
|
@@ -2575,54 +3852,30 @@ var ni = () => {}, ri = 1500, ii = 400, ai = (e) => {
|
|
|
2575
3852
|
if (d && !n && Fe()) {
|
|
2576
3853
|
e.landNow();
|
|
2577
3854
|
let t = l();
|
|
2578
|
-
t &&
|
|
3855
|
+
t && je() === "on" && (n = So(t, go(t, ut(c), s) + Io, !0));
|
|
2579
3856
|
}
|
|
2580
3857
|
} };
|
|
2581
|
-
},
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
},
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
if (
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < bi) {
|
|
2595
|
-
requestAnimationFrame(i);
|
|
2596
|
-
return;
|
|
2597
|
-
}
|
|
2598
|
-
gi = !1;
|
|
2599
|
-
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
2600
|
-
di(s), ke(s, o[o.length - 1]);
|
|
2601
|
-
};
|
|
2602
|
-
requestAnimationFrame(i);
|
|
2603
|
-
}, Si = () => typeof navigator < "u" && navigator.maxTouchPoints > 0, Ci = (e) => {
|
|
2604
|
-
let { status: t, transition: n, skipAnimation: r, hasActiveMotion: i, hasAnimation: a } = e, o = F(), s = Si(), c = !o && s && ve(), l = Ue(), u = o && s && (l === "on" || l !== "off" && I()), d = !o && s && (t === "POPPING" || t === "PUSHING" && Pe()), f = c || u || d, p = ge() && ze();
|
|
2605
|
-
return {
|
|
2606
|
-
hasDrivableMotion: !r && i,
|
|
2607
|
-
nativeSurgeryAllowed: n.driver === "native" && !o,
|
|
2608
|
-
touchGoverned: c,
|
|
2609
|
-
forceCompiled: d,
|
|
2610
|
-
governedHead: f,
|
|
2611
|
-
desktopHead: p,
|
|
2612
|
-
birthHoldMs: f ? kn[t] ?? 0 : p ? On[t] ?? 0 : 0,
|
|
2613
|
-
governedSlide: c && (t === "PUSHING" || t === "POPPING"),
|
|
2614
|
-
framePacingKeepalive: a && o && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || ui() < 12),
|
|
2615
|
-
creepHead: f && Le()
|
|
2616
|
-
};
|
|
2617
|
-
}, wi = 1e3 / 60 * 2, Ti = "flemo-", Ei = /* @__PURE__ */ new WeakMap(), Di = (e, t, n) => {
|
|
3858
|
+
}, zo = (e, t) => {
|
|
3859
|
+
for (let n of Array.from(e.children)) {
|
|
3860
|
+
let e = n;
|
|
3861
|
+
if (e.matches(t)) return e;
|
|
3862
|
+
}
|
|
3863
|
+
return null;
|
|
3864
|
+
}, Bo = (e) => {
|
|
3865
|
+
if (!e) return [];
|
|
3866
|
+
let t = zo(e, W(qt));
|
|
3867
|
+
if (t) return [t];
|
|
3868
|
+
let n = zo(e, W(jt))?.getAttribute(jt);
|
|
3869
|
+
return n ? Array.from(document.querySelectorAll(W(Jt) + G(Yt, n))) : [];
|
|
3870
|
+
}, Vo = (e) => e ? e.getAttribute("data-flemo-bar-riding") === "true" || e.hasAttribute("data-flemo-layer-host") || e.hasAttribute("data-flemo-layer-slot") : !1, Ho = 1e3 / 60 * 2, Uo = "flemo-", Wo = /* @__PURE__ */ new WeakMap(), Go = (e, t, n) => {
|
|
2618
3871
|
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2619
3872
|
let e = r.animationName;
|
|
2620
|
-
if (typeof e != "string" || !e.startsWith(
|
|
3873
|
+
if (typeof e != "string" || !e.startsWith(Uo) || r.playState !== "running" || Wo.get(r) === n) continue;
|
|
2621
3874
|
let i = r.startTime;
|
|
2622
|
-
typeof i == "number" && (r.startTime = i + t,
|
|
3875
|
+
typeof i == "number" && (r.startTime = i + t, Wo.set(r, n));
|
|
2623
3876
|
}
|
|
2624
|
-
},
|
|
2625
|
-
function
|
|
3877
|
+
}, Ko = /* @__PURE__ */ new WeakSet(), qo = 1e3, Jo = 3e3;
|
|
3878
|
+
function Yo(e, t, n) {
|
|
2626
3879
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2627
3880
|
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2628
3881
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -2636,7 +3889,7 @@ function ji(e, t, n) {
|
|
|
2636
3889
|
i = !0, m.disconnect();
|
|
2637
3890
|
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2638
3891
|
let e = t.animationName;
|
|
2639
|
-
if (typeof e != "string" || !e.startsWith(
|
|
3892
|
+
if (typeof e != "string" || !e.startsWith(Uo) || t.playState !== "running" || Ko.has(t)) continue;
|
|
2640
3893
|
let n = t.currentTime;
|
|
2641
3894
|
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2642
3895
|
try {
|
|
@@ -2644,18 +3897,18 @@ function ji(e, t, n) {
|
|
|
2644
3897
|
} catch {
|
|
2645
3898
|
continue;
|
|
2646
3899
|
}
|
|
2647
|
-
|
|
3900
|
+
Ko.add(t), c.push(t);
|
|
2648
3901
|
}
|
|
2649
3902
|
}
|
|
2650
3903
|
if (c.length === 0) return;
|
|
2651
|
-
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f,
|
|
2652
|
-
let e =
|
|
3904
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, qo));
|
|
3905
|
+
let e = es(t, () => {
|
|
2653
3906
|
a || n?.();
|
|
2654
3907
|
});
|
|
2655
3908
|
if (l = e, typeof setTimeout == "function") {
|
|
2656
3909
|
let t = setTimeout(() => {
|
|
2657
3910
|
l === e && (l = null), e();
|
|
2658
|
-
},
|
|
3911
|
+
}, Jo), n = e;
|
|
2659
3912
|
l = () => {
|
|
2660
3913
|
clearTimeout(t), n();
|
|
2661
3914
|
};
|
|
@@ -2665,21 +3918,21 @@ function ji(e, t, n) {
|
|
|
2665
3918
|
});
|
|
2666
3919
|
return e.getAttribute("data-flemo-anim-hold") === "false" ? p() : m.observe(e, {
|
|
2667
3920
|
attributes: !0,
|
|
2668
|
-
attributeFilter: [
|
|
3921
|
+
attributeFilter: [H]
|
|
2669
3922
|
}), () => {
|
|
2670
3923
|
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2671
3924
|
};
|
|
2672
3925
|
}
|
|
2673
|
-
var
|
|
2674
|
-
function
|
|
3926
|
+
var Xo = 150, Zo = 4e3, Qo = 400;
|
|
3927
|
+
function $o(e, t, n = !0, r = !1) {
|
|
2675
3928
|
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2676
3929
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2677
3930
|
let i = [], a = /* @__PURE__ */ new Map();
|
|
2678
3931
|
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2679
3932
|
let t = e.animationName;
|
|
2680
|
-
if (typeof t != "string" || !t.startsWith(
|
|
3933
|
+
if (typeof t != "string" || !t.startsWith(Uo) || e.playState !== "running" || Ko.has(e)) continue;
|
|
2681
3934
|
let n = e.currentTime;
|
|
2682
|
-
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (
|
|
3935
|
+
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (Ko.add(e), i.push(e), a.set(e, typeof n == "number" ? n : 0));
|
|
2683
3936
|
}
|
|
2684
3937
|
if (i.length === 0) return () => {};
|
|
2685
3938
|
let o = 0, s = null, c = !1, l = !1, u = !1, d = null, f = null, p = 0, m = (e) => {
|
|
@@ -2692,7 +3945,7 @@ function Fi(e, t, n = !0, r = !1) {
|
|
|
2692
3945
|
if (typeof r != "number" || typeof i != "number") continue;
|
|
2693
3946
|
let o = (a.get(n) ?? 0) + e;
|
|
2694
3947
|
n.startTime = i + (r - o), a.set(n, o);
|
|
2695
|
-
let s = r +
|
|
3948
|
+
let s = r + Zo;
|
|
2696
3949
|
t = Math.max(t, s - o);
|
|
2697
3950
|
}
|
|
2698
3951
|
return t;
|
|
@@ -2700,7 +3953,7 @@ function Fi(e, t, n = !0, r = !1) {
|
|
|
2700
3953
|
if (c) return;
|
|
2701
3954
|
if (d === null && (d = e), f !== null) {
|
|
2702
3955
|
let t = e - f;
|
|
2703
|
-
p += Math.min(Math.max(0, t),
|
|
3956
|
+
p += Math.min(Math.max(0, t), Ho);
|
|
2704
3957
|
}
|
|
2705
3958
|
if (f = e, !l) {
|
|
2706
3959
|
if (l = !0, r) {
|
|
@@ -2712,7 +3965,7 @@ function Fi(e, t, n = !0, r = !1) {
|
|
|
2712
3965
|
if (typeof n != "number" || typeof r != "number") continue;
|
|
2713
3966
|
let i = a.get(t) ?? 0;
|
|
2714
3967
|
if (n <= i + 33.333333333333336) continue;
|
|
2715
|
-
let o = n - (i +
|
|
3968
|
+
let o = n - (i + Ho);
|
|
2716
3969
|
t.startTime = r + o, e = Math.max(e, o);
|
|
2717
3970
|
}
|
|
2718
3971
|
e > 0 && t?.(e);
|
|
@@ -2726,13 +3979,13 @@ function Fi(e, t, n = !0, r = !1) {
|
|
|
2726
3979
|
if (e.playState !== "running") continue;
|
|
2727
3980
|
let t = e.startTime;
|
|
2728
3981
|
if (typeof t == "number") {
|
|
2729
|
-
e.startTime = t +
|
|
3982
|
+
e.startTime = t + Zo;
|
|
2730
3983
|
continue;
|
|
2731
3984
|
}
|
|
2732
3985
|
let n = e.timeline?.currentTime;
|
|
2733
|
-
typeof n == "number" && (e.startTime = n +
|
|
3986
|
+
typeof n == "number" && (e.startTime = n + Zo);
|
|
2734
3987
|
}
|
|
2735
|
-
typeof setTimeout == "function" && (s = setTimeout(() => m(p +
|
|
3988
|
+
typeof setTimeout == "function" && (s = setTimeout(() => m(p + Ho), Qo)), o = requestAnimationFrame(h);
|
|
2736
3989
|
return;
|
|
2737
3990
|
}
|
|
2738
3991
|
if (!u) {
|
|
@@ -2755,13 +4008,13 @@ function Fi(e, t, n = !0, r = !1) {
|
|
|
2755
4008
|
t?.(g);
|
|
2756
4009
|
return;
|
|
2757
4010
|
}
|
|
2758
|
-
e - d <
|
|
4011
|
+
e - d < Xo && (o = requestAnimationFrame(h));
|
|
2759
4012
|
};
|
|
2760
4013
|
return o = requestAnimationFrame(h), () => {
|
|
2761
|
-
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p +
|
|
4014
|
+
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p + Ho);
|
|
2762
4015
|
};
|
|
2763
4016
|
}
|
|
2764
|
-
function
|
|
4017
|
+
function es(e, t) {
|
|
2765
4018
|
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2766
4019
|
exotic embedders. */
|
|
2767
4020
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
@@ -2770,8 +4023,8 @@ function Ii(e, t) {
|
|
|
2770
4023
|
if (r !== null) {
|
|
2771
4024
|
let n = o - r;
|
|
2772
4025
|
if (n > 33.333333333333336) {
|
|
2773
|
-
let r = n -
|
|
2774
|
-
for (let t of e()) t &&
|
|
4026
|
+
let r = n - Ho;
|
|
4027
|
+
for (let t of e()) t && Go(t, r, o);
|
|
2775
4028
|
t?.(r);
|
|
2776
4029
|
}
|
|
2777
4030
|
}
|
|
@@ -2782,29 +4035,29 @@ function Ii(e, t) {
|
|
|
2782
4035
|
i = !0, cancelAnimationFrame(n);
|
|
2783
4036
|
};
|
|
2784
4037
|
}
|
|
2785
|
-
var
|
|
2786
|
-
function
|
|
4038
|
+
var ts = /* @__PURE__ */ new WeakMap();
|
|
4039
|
+
function ns(e, t, n, r = !0, i = !1) {
|
|
2787
4040
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2788
|
-
let a =
|
|
2789
|
-
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () =>
|
|
4041
|
+
let a = ts.get(e);
|
|
4042
|
+
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () => rs(e);
|
|
2790
4043
|
let o = null, s = !1, c = !1, l = () => {
|
|
2791
|
-
s || c || (s = !0, u.disconnect(), o =
|
|
4044
|
+
s || c || (s = !0, u.disconnect(), o = $o(t, n, r, i));
|
|
2792
4045
|
}, u = new MutationObserver(() => {
|
|
2793
4046
|
e.getAttribute("data-flemo-anim-hold") === "false" && l();
|
|
2794
4047
|
});
|
|
2795
4048
|
return e.getAttribute("data-flemo-anim-hold") === "false" ? l() : u.observe(e, {
|
|
2796
4049
|
attributes: !0,
|
|
2797
|
-
attributeFilter: [
|
|
2798
|
-
}),
|
|
4050
|
+
attributeFilter: [H]
|
|
4051
|
+
}), ts.set(e, {
|
|
2799
4052
|
refs: 1,
|
|
2800
4053
|
pendingDrop: null,
|
|
2801
4054
|
dispose: () => {
|
|
2802
|
-
c = !0, u.disconnect(), o?.(),
|
|
4055
|
+
c = !0, u.disconnect(), o?.(), ts.delete(e);
|
|
2803
4056
|
}
|
|
2804
|
-
}), () =>
|
|
4057
|
+
}), () => rs(e);
|
|
2805
4058
|
}
|
|
2806
|
-
var
|
|
2807
|
-
let t =
|
|
4059
|
+
var rs = (e) => {
|
|
4060
|
+
let t = ts.get(e);
|
|
2808
4061
|
if (t && (--t.refs, !(t.refs > 0))) {
|
|
2809
4062
|
/* v8 ignore next 4 -- setTimeout exists in every runtime under test. */
|
|
2810
4063
|
if (typeof setTimeout != "function") {
|
|
@@ -2813,87 +4066,11 @@ var zi = (e) => {
|
|
|
2813
4066
|
}
|
|
2814
4067
|
t.pendingDrop !== null && clearTimeout(t.pendingDrop), t.pendingDrop = setTimeout(t.dispose, 0);
|
|
2815
4068
|
}
|
|
2816
|
-
},
|
|
2817
|
-
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;
|
|
2818
|
-
return (e) => {
|
|
2819
|
-
if (e <= 0) return 0;
|
|
2820
|
-
if (e >= 1) return 1;
|
|
2821
|
-
let t = 0, n = 1;
|
|
2822
|
-
for (let r = 0; r < 40; r++) {
|
|
2823
|
-
let r = (t + n) / 2;
|
|
2824
|
-
i(r) < e ? t = r : n = r;
|
|
2825
|
-
}
|
|
2826
|
-
return a((t + n) / 2);
|
|
2827
|
-
};
|
|
2828
|
-
}, Vi = (e) => e, Hi = {
|
|
2829
|
-
ease: [
|
|
2830
|
-
.25,
|
|
2831
|
-
.1,
|
|
2832
|
-
.25,
|
|
2833
|
-
1
|
|
2834
|
-
],
|
|
2835
|
-
easeIn: [
|
|
2836
|
-
.42,
|
|
2837
|
-
0,
|
|
2838
|
-
1,
|
|
2839
|
-
1
|
|
2840
|
-
],
|
|
2841
|
-
easeOut: [
|
|
2842
|
-
0,
|
|
2843
|
-
0,
|
|
2844
|
-
.58,
|
|
2845
|
-
1
|
|
2846
|
-
],
|
|
2847
|
-
easeInOut: [
|
|
2848
|
-
.42,
|
|
2849
|
-
0,
|
|
2850
|
-
.58,
|
|
2851
|
-
1
|
|
2852
|
-
],
|
|
2853
|
-
circIn: [
|
|
2854
|
-
0,
|
|
2855
|
-
.55,
|
|
2856
|
-
.45,
|
|
2857
|
-
1
|
|
2858
|
-
],
|
|
2859
|
-
circOut: [
|
|
2860
|
-
.55,
|
|
2861
|
-
0,
|
|
2862
|
-
1,
|
|
2863
|
-
.45
|
|
2864
|
-
],
|
|
2865
|
-
backIn: [
|
|
2866
|
-
.31,
|
|
2867
|
-
.01,
|
|
2868
|
-
.66,
|
|
2869
|
-
-.59
|
|
2870
|
-
],
|
|
2871
|
-
backOut: [
|
|
2872
|
-
.33,
|
|
2873
|
-
1.53,
|
|
2874
|
-
.69,
|
|
2875
|
-
.99
|
|
2876
|
-
],
|
|
2877
|
-
anticipate: [
|
|
2878
|
-
.36,
|
|
2879
|
-
0,
|
|
2880
|
-
.66,
|
|
2881
|
-
-.56
|
|
2882
|
-
]
|
|
2883
|
-
}, Ui = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? [...e] : null : typeof e == "string" ? e === "linear" ? null : [...Hi[e] ?? Hi.ease] : [...Hi.ease], Wi = (e) => {
|
|
2884
|
-
if (Array.isArray(e)) {
|
|
2885
|
-
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2886
|
-
let [t, n, r, i] = e;
|
|
2887
|
-
return Bi(t, n, r, i);
|
|
2888
|
-
}
|
|
2889
|
-
return Vi;
|
|
2890
|
-
}
|
|
2891
|
-
return typeof e == "string" ? e === "linear" ? Vi : Bi(...Hi[e] ?? Hi.ease) : Bi(...Hi.ease);
|
|
2892
|
-
}, Gi = 1 / 255, Ki = 400, qi = 24, Ji = /* @__PURE__ */ new Set([
|
|
4069
|
+
}, is = 1 / 255, as = 400, os = 24, ss = /* @__PURE__ */ new Set([
|
|
2893
4070
|
"x",
|
|
2894
4071
|
"y",
|
|
2895
4072
|
"opacity"
|
|
2896
|
-
]),
|
|
4073
|
+
]), cs = (e, t, n) => {
|
|
2897
4074
|
if (!e || typeof e != "object") return;
|
|
2898
4075
|
let r = e[t];
|
|
2899
4076
|
if (r === void 0) return;
|
|
@@ -2911,7 +4088,7 @@ var zi = (e) => {
|
|
|
2911
4088
|
return Number.isNaN(e) ? null : e;
|
|
2912
4089
|
}
|
|
2913
4090
|
return null;
|
|
2914
|
-
},
|
|
4091
|
+
}, ls = (e, t, n) => {
|
|
2915
4092
|
let r = /* @__PURE__ */ new Set();
|
|
2916
4093
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2917
4094
|
if (r.size === 0) return null;
|
|
@@ -2919,25 +4096,25 @@ var zi = (e) => {
|
|
|
2919
4096
|
for (let a of r) {
|
|
2920
4097
|
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;
|
|
2921
4098
|
if (r !== void 0 && r === o) continue;
|
|
2922
|
-
if (!
|
|
2923
|
-
let s =
|
|
4099
|
+
if (!ss.has(a)) return null;
|
|
4100
|
+
let s = cs(e.from, a, t), c = cs(e.to, a, t);
|
|
2924
4101
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2925
4102
|
let l = Math.abs(c - s);
|
|
2926
4103
|
if (l === 0) continue;
|
|
2927
|
-
let u = a === "opacity" ?
|
|
4104
|
+
let u = a === "opacity" ? is : 1 / Math.max(1, n);
|
|
2928
4105
|
i = Math.min(i, u / l);
|
|
2929
4106
|
}
|
|
2930
4107
|
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2931
|
-
},
|
|
4108
|
+
}, us = (e, t, n) => {
|
|
2932
4109
|
if (e.duration <= 0) return null;
|
|
2933
|
-
let r =
|
|
4110
|
+
let r = ls(e, t, n);
|
|
2934
4111
|
if (r === null) return null;
|
|
2935
|
-
let i =
|
|
2936
|
-
for (let e =
|
|
4112
|
+
let i = $i(e.ease), a = as;
|
|
4113
|
+
for (let e = as; e >= 0 && !(Math.abs(1 - i(e / as)) > r); --e) a = e;
|
|
2937
4114
|
if (a === 0) return null;
|
|
2938
|
-
let o = (e.delay + e.duration * (a /
|
|
2939
|
-
return (e.delay + e.duration) * 1e3 - o <
|
|
2940
|
-
},
|
|
4115
|
+
let o = (e.delay + e.duration * (a / as)) * 1e3;
|
|
4116
|
+
return (e.delay + e.duration) * 1e3 - o < os ? null : o;
|
|
4117
|
+
}, ds = 400, fs = 4, ps = (e) => +e.toFixed(5) + 0, ms = 12, hs = (e, t, n, r) => {
|
|
2941
4118
|
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2942
4119
|
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
2943
4120
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) a.add(e);
|
|
@@ -2946,20 +4123,20 @@ var zi = (e) => {
|
|
|
2946
4123
|
let r = e.from && typeof e.from == "object" ? e.from[n] : void 0, a = e.to && typeof e.to == "object" ? e.to[n] : void 0;
|
|
2947
4124
|
if (r !== void 0 && r === a) continue;
|
|
2948
4125
|
if (n !== "x" && n !== "y") return null;
|
|
2949
|
-
let s =
|
|
4126
|
+
let s = cs(e.from, n, t), c = cs(e.to, n, t);
|
|
2950
4127
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2951
4128
|
o = Math.max(o, Math.abs(c - s) * i);
|
|
2952
4129
|
}
|
|
2953
|
-
if (o <
|
|
2954
|
-
let s =
|
|
2955
|
-
for (let e = 0; e <=
|
|
2956
|
-
let l = e.duration * 1e3, u = l /
|
|
4130
|
+
if (o < ms) return null;
|
|
4131
|
+
let s = $i(e.ease), c = Array(401);
|
|
4132
|
+
for (let e = 0; e <= ds; e += 1) c[e] = s(e / ds);
|
|
4133
|
+
let l = e.duration * 1e3, u = l / ds, d = 1 / o * (u / r), f = ds, p = 0;
|
|
2957
4134
|
for (let e = 399; e >= 0 && (p = Math.max(p, Math.abs(c[e + 1] - c[e])), !(p > d)); --e) f = e;
|
|
2958
|
-
if (f === 0 || f >=
|
|
2959
|
-
for (let e = f; e <
|
|
4135
|
+
if (f === 0 || f >= ds) return null;
|
|
4136
|
+
for (let e = f; e < ds; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2960
4137
|
let m = (1 - c[f]) * o;
|
|
2961
|
-
if (m <= 1 || m >
|
|
2962
|
-
let h = f /
|
|
4138
|
+
if (m <= 1 || m > ms) return null;
|
|
4139
|
+
let h = f / ds * 100, g = m * r / l * 100;
|
|
2963
4140
|
/* v8 ignore next 2 -- unreachable for a decelerating cubic bezier, and kept
|
|
2964
4141
|
anyway. The sprint's share of the timeline works out to roughly (samples
|
|
2965
4142
|
of travel remaining at the engagement velocity) / 4 percent, independent
|
|
@@ -2972,14 +4149,14 @@ var zi = (e) => {
|
|
|
2972
4149
|
that keeps one from emitting a curve that lands past its own end. */
|
|
2973
4150
|
if (h + g >= 100) return null;
|
|
2974
4151
|
let _ = [];
|
|
2975
|
-
for (let e = 0; e <= f; e +=
|
|
2976
|
-
return _.push(`${
|
|
2977
|
-
},
|
|
4152
|
+
for (let e = 0; e <= f; e += fs) _.push(`${ps(c[e])} ${ps(e / ds * 100)}%`);
|
|
4153
|
+
return _.push(`${ps(c[f])} ${ps(h)}%`), _.push(`1 ${ps(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
4154
|
+
}, gs = /* @__PURE__ */ new WeakMap(), _s = Symbol("flemo-layer-owner"), vs = (e, t) => {
|
|
2978
4155
|
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2979
|
-
},
|
|
4156
|
+
}, ys = (e, t) => {
|
|
2980
4157
|
let n = e.trim() === "none" ? "" : e.trim();
|
|
2981
4158
|
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2982
|
-
},
|
|
4159
|
+
}, bs = (e, t) => {
|
|
2983
4160
|
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2984
4161
|
for (let e of t.willChange.split(",")) {
|
|
2985
4162
|
let t = e.trim();
|
|
@@ -2990,13 +4167,13 @@ var zi = (e) => {
|
|
|
2990
4167
|
e.containment && (r = !0);
|
|
2991
4168
|
}
|
|
2992
4169
|
e.style.willChange = [...n].join(", ");
|
|
2993
|
-
let i =
|
|
4170
|
+
let i = ys(t.contain, r);
|
|
2994
4171
|
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2995
|
-
},
|
|
2996
|
-
let i =
|
|
4172
|
+
}, xs = (e, t, n = !1, r = _s) => {
|
|
4173
|
+
let i = hr(t), a = gs.get(e);
|
|
2997
4174
|
if (i.length === 0) {
|
|
2998
4175
|
if (!a) return;
|
|
2999
|
-
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending),
|
|
4176
|
+
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), vs(e, a), gs.delete(e)) : bs(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), vs(e, a), gs.delete(e));
|
|
3000
4177
|
return;
|
|
3001
4178
|
}
|
|
3002
4179
|
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
@@ -3005,18 +4182,18 @@ var zi = (e) => {
|
|
|
3005
4182
|
willChange: e.style.willChange,
|
|
3006
4183
|
contain: e.style.contain,
|
|
3007
4184
|
pending: null
|
|
3008
|
-
},
|
|
4185
|
+
}, gs.set(e, a)), a.owners.set(r, {
|
|
3009
4186
|
properties: i,
|
|
3010
4187
|
containment: n
|
|
3011
|
-
}), a.settleOwner = null,
|
|
3012
|
-
},
|
|
3013
|
-
let n =
|
|
4188
|
+
}), a.settleOwner = null, bs(e, a);
|
|
4189
|
+
}, Ss = (e, t = _s) => {
|
|
4190
|
+
let n = gs.get(e);
|
|
3014
4191
|
if (!(!n || !n.owners.has(t))) {
|
|
3015
4192
|
if (n.owners.delete(t), n.owners.size > 0) {
|
|
3016
|
-
|
|
4193
|
+
bs(e, n);
|
|
3017
4194
|
return;
|
|
3018
4195
|
}
|
|
3019
|
-
if (Ge() && typeof e.closest == "function" && e.closest(
|
|
4196
|
+
if (Ge() && typeof e.closest == "function" && e.closest(W("data-flemo-screen"))) {
|
|
3020
4197
|
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");
|
|
3021
4198
|
return;
|
|
3022
4199
|
}
|
|
@@ -3024,52 +4201,52 @@ var zi = (e) => {
|
|
|
3024
4201
|
guard shields exotic embedders, where an immediate demotion is simply
|
|
3025
4202
|
the pre-hold behavior. */
|
|
3026
4203
|
if (n.settleOwner = t, n.pending != null && clearTimeout(n.pending), typeof setTimeout != "function") {
|
|
3027
|
-
|
|
4204
|
+
vs(e, n), gs.delete(e);
|
|
3028
4205
|
return;
|
|
3029
4206
|
}
|
|
3030
|
-
|
|
4207
|
+
Cs(e, n);
|
|
3031
4208
|
}
|
|
3032
|
-
},
|
|
4209
|
+
}, Cs = (e, t) => {
|
|
3033
4210
|
t.pending = setTimeout(() => {
|
|
3034
|
-
if (t.pending = null,
|
|
3035
|
-
|
|
3036
|
-
|
|
4211
|
+
if (t.pending = null, ka()) {
|
|
4212
|
+
ja(() => {
|
|
4213
|
+
gs.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null && Cs(e, t);
|
|
3037
4214
|
});
|
|
3038
4215
|
return;
|
|
3039
4216
|
}
|
|
3040
|
-
|
|
4217
|
+
vs(e, t), gs.delete(e);
|
|
3041
4218
|
}, 300);
|
|
3042
|
-
},
|
|
3043
|
-
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l =
|
|
3044
|
-
if (
|
|
3045
|
-
|
|
3046
|
-
let e = d(
|
|
3047
|
-
e && (
|
|
3048
|
-
for (let n of o ?? []) n
|
|
4219
|
+
}, ws = (e, t, n, r) => {
|
|
4220
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = z() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Xr() < 12, u = l && typeof window < "u" && window.devicePixelRatio || 1, d = (e, t) => !e || !l ? null : hs(e, t, u, Xr());
|
|
4221
|
+
if (Mr(t, n)) {
|
|
4222
|
+
xs(i, t, c, r);
|
|
4223
|
+
let e = d(q(t, n), i);
|
|
4224
|
+
e && (ya(i, "animation-timing-function", r), i.style.animationTimingFunction = e);
|
|
4225
|
+
for (let n of o ?? []) Vo(n) && (xs(n, t, c, r), e && (ya(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
3049
4226
|
}
|
|
3050
4227
|
if (a && t.decoratorName) {
|
|
3051
|
-
let e =
|
|
3052
|
-
e &&
|
|
4228
|
+
let e = ht.get(t.decoratorName);
|
|
4229
|
+
e && Mr(e, n) && xs(a, e, c, r);
|
|
3053
4230
|
}
|
|
3054
|
-
for (let e of
|
|
3055
|
-
let t =
|
|
3056
|
-
if (t &&
|
|
3057
|
-
|
|
3058
|
-
let i = d(
|
|
3059
|
-
i && (
|
|
4231
|
+
for (let e of fo(i, n)) {
|
|
4232
|
+
let t = vt.get(e.getAttribute(B));
|
|
4233
|
+
if (t && Mr(t, n)) {
|
|
4234
|
+
xs(e, t, c, r);
|
|
4235
|
+
let i = d(q(t, n), e);
|
|
4236
|
+
i && (ya(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
3060
4237
|
}
|
|
3061
4238
|
}
|
|
3062
|
-
},
|
|
4239
|
+
}, Ts = (e, t) => {
|
|
3063
4240
|
let { scope: n, decorator: r, bars: i } = e;
|
|
3064
4241
|
if (n) {
|
|
3065
|
-
|
|
3066
|
-
for (let e of
|
|
4242
|
+
Ss(n, t);
|
|
4243
|
+
for (let e of uo(n)) Ss(e, t);
|
|
3067
4244
|
}
|
|
3068
|
-
r &&
|
|
3069
|
-
for (let e of i ?? []) e &&
|
|
3070
|
-
},
|
|
3071
|
-
function
|
|
3072
|
-
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r =
|
|
4245
|
+
r && Ss(r, t);
|
|
4246
|
+
for (let e of i ?? []) e && Ss(e, t);
|
|
4247
|
+
}, Es = () => {}, Ds = 4, Os = 100, ks = 1500, As = /* @__PURE__ */ new WeakMap();
|
|
4248
|
+
function js(e) {
|
|
4249
|
+
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = Ro({
|
|
3073
4250
|
landNow: () => a(),
|
|
3074
4251
|
scheduleLanding: (e) => o(e)
|
|
3075
4252
|
}), i = null, a = () => {
|
|
@@ -3096,15 +4273,17 @@ function ha(e) {
|
|
|
3096
4273
|
let { getElements: a, transitionName: o, prevTransitionName: c, status: l, isActive: u, animHoldReleased: d } = i, f = l === "PUSHING" || l === "POPPING" || l === "REPLACING";
|
|
3097
4274
|
if (u) {
|
|
3098
4275
|
let { scope: e } = a();
|
|
3099
|
-
if (e)
|
|
3100
|
-
|
|
4276
|
+
if (e) {
|
|
4277
|
+
if (f && !d) for (let t of mo(e, l)) t.setAttribute(H, "true");
|
|
4278
|
+
else for (let t of ho(e)) t.removeAttribute(H);
|
|
4279
|
+
}
|
|
3101
4280
|
}
|
|
3102
4281
|
if (f) {
|
|
3103
|
-
let { scope: e, bars: n } = a();
|
|
4282
|
+
let { scope: e, bars: n, screenContainer: r } = a(), i = [...n ?? [], ...Bo(r ?? null)];
|
|
3104
4283
|
if (e) {
|
|
3105
|
-
|
|
3106
|
-
for (let n of
|
|
3107
|
-
for (let e of
|
|
4284
|
+
wa(e), Z(e, ["animation-timing-function", "animation-duration"], t);
|
|
4285
|
+
for (let n of uo(e)) Z(n, ["animation-timing-function", "animation-duration"], t);
|
|
4286
|
+
for (let e of i) e && Z(e, ["animation-timing-function", "animation-duration"], t);
|
|
3108
4287
|
}
|
|
3109
4288
|
}
|
|
3110
4289
|
r.sync({
|
|
@@ -3115,12 +4294,12 @@ function ha(e) {
|
|
|
3115
4294
|
getScope: () => a().scope
|
|
3116
4295
|
});
|
|
3117
4296
|
let p = () => {
|
|
3118
|
-
if (!
|
|
4297
|
+
if (!z()) return;
|
|
3119
4298
|
let t = e.getTransitionTaskId();
|
|
3120
|
-
t && (s.pendingTaskIds.some((e) => e !== t) ||
|
|
4299
|
+
t && (s.pendingTaskIds.some((e) => e !== t) || si());
|
|
3121
4300
|
}, m = (e, n) => {
|
|
3122
|
-
let r = [], { decorator: i, bars: s } = a(), c =
|
|
3123
|
-
let a = 0, o =
|
|
4301
|
+
let r = [], { decorator: i, bars: s, screenContainer: c } = a(), l = [...s ?? [], ...Bo(c ?? null)], u = ut(o), d = (e, n, i) => {
|
|
4302
|
+
let a = 0, o = Ca({
|
|
3124
4303
|
element: e,
|
|
3125
4304
|
expectedName: n,
|
|
3126
4305
|
motion: i,
|
|
@@ -3130,54 +4309,54 @@ function ha(e) {
|
|
|
3130
4309
|
spendBudget: () => {
|
|
3131
4310
|
a += 1;
|
|
3132
4311
|
},
|
|
3133
|
-
onTerminal:
|
|
4312
|
+
onTerminal: Es
|
|
3134
4313
|
});
|
|
3135
4314
|
o.attach(), r.push(o.detach);
|
|
3136
|
-
},
|
|
3137
|
-
if (
|
|
3138
|
-
if (i &&
|
|
3139
|
-
let e =
|
|
3140
|
-
t &&
|
|
4315
|
+
}, f = Cr("screen", o, n), p = q(u, n);
|
|
4316
|
+
if (p) for (let e of l) Vo(e) && d(e, f, p);
|
|
4317
|
+
if (i && u.decoratorName) {
|
|
4318
|
+
let e = ht.get(u.decoratorName), t = e ? q(e, n) : null;
|
|
4319
|
+
t && d(i, Cr("decorator", u.decoratorName, n), t);
|
|
3141
4320
|
}
|
|
3142
|
-
for (let t of
|
|
3143
|
-
let e = t.getAttribute(B), r =
|
|
3144
|
-
i &&
|
|
4321
|
+
for (let t of fo(e, n)) {
|
|
4322
|
+
let e = t.getAttribute(B), r = vt.get(e), i = r ? q(r, n) : null;
|
|
4323
|
+
i && d(t, Cr("part", e, n), i);
|
|
3145
4324
|
}
|
|
3146
4325
|
return r;
|
|
3147
4326
|
};
|
|
3148
4327
|
if (!u) {
|
|
3149
4328
|
if (l === "COMPLETED") {
|
|
3150
|
-
let { scope: e, decorator: n, bars: r } = a();
|
|
4329
|
+
let { scope: e, decorator: n, bars: r, screenContainer: i } = a(), o = [...r ?? [], ...Bo(i ?? null)];
|
|
3151
4330
|
if (e) {
|
|
3152
|
-
|
|
3153
|
-
for (let t of
|
|
4331
|
+
Z(e);
|
|
4332
|
+
for (let t of uo(e)) Z(t);
|
|
3154
4333
|
}
|
|
3155
|
-
n &&
|
|
3156
|
-
for (let e of
|
|
3157
|
-
return
|
|
4334
|
+
n && Z(n);
|
|
4335
|
+
for (let e of o) e && Z(e, void 0, t);
|
|
4336
|
+
return Ts({
|
|
3158
4337
|
scope: e,
|
|
3159
4338
|
decorator: n,
|
|
3160
|
-
bars:
|
|
3161
|
-
}, t),
|
|
4339
|
+
bars: o
|
|
4340
|
+
}, t), Es;
|
|
3162
4341
|
}
|
|
3163
4342
|
if (l === "REPLACING" && c !== o && e.setReplaceTransitionStatus("PENDING"), f) {
|
|
3164
|
-
let { scope: e, decorator: n, bars: r } = a();
|
|
3165
|
-
e &&
|
|
4343
|
+
let { scope: e, decorator: n, bars: r, screenContainer: i } = a(), s = [...r ?? [], ...Bo(i ?? null)];
|
|
4344
|
+
e && ws({
|
|
3166
4345
|
scope: e,
|
|
3167
4346
|
decorator: n,
|
|
3168
|
-
bars:
|
|
3169
|
-
},
|
|
4347
|
+
bars: s
|
|
4348
|
+
}, ut(o), `${l}-false`, t);
|
|
3170
4349
|
}
|
|
3171
4350
|
if (f && d) {
|
|
3172
4351
|
let e = `${l}-false`;
|
|
3173
4352
|
p();
|
|
3174
4353
|
let { scope: n } = a();
|
|
3175
4354
|
if (n) {
|
|
3176
|
-
let r =
|
|
3177
|
-
if (
|
|
3178
|
-
let a =
|
|
4355
|
+
let r = ut(o), i = [];
|
|
4356
|
+
if (Mr(r, e)) {
|
|
4357
|
+
let a = q(r, e), s = 0, c = Ca({
|
|
3179
4358
|
element: n,
|
|
3180
|
-
expectedName:
|
|
4359
|
+
expectedName: Cr("screen", o, e),
|
|
3181
4360
|
motion: a,
|
|
3182
4361
|
writer: t,
|
|
3183
4362
|
isLive: () => n.isConnected && n.getAttribute("data-flemo-skip-animation") !== "true",
|
|
@@ -3185,47 +4364,47 @@ function ha(e) {
|
|
|
3185
4364
|
spendBudget: () => {
|
|
3186
4365
|
s += 1;
|
|
3187
4366
|
},
|
|
3188
|
-
onTerminal:
|
|
4367
|
+
onTerminal: Es
|
|
3189
4368
|
});
|
|
3190
4369
|
c.attach(), i.push(c.detach);
|
|
3191
4370
|
}
|
|
3192
4371
|
if (i.push(...m(n, e)), i.length > 0) return () => i.forEach((e) => e());
|
|
3193
4372
|
}
|
|
3194
4373
|
}
|
|
3195
|
-
return
|
|
4374
|
+
return Es;
|
|
3196
4375
|
}
|
|
3197
4376
|
if (l === "COMPLETED") {
|
|
3198
|
-
|
|
3199
|
-
let { scope: n, decorator: r, bars: i } = a();
|
|
4377
|
+
ii(), e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
4378
|
+
let { scope: n, decorator: r, bars: i, screenContainer: o } = a(), s = [...i ?? [], ...Bo(o ?? null)];
|
|
3200
4379
|
if (n) {
|
|
3201
|
-
|
|
3202
|
-
for (let e of
|
|
4380
|
+
Z(n), Z(n, ["transform", "opacity"]), n.removeAttribute(It);
|
|
4381
|
+
for (let e of uo(n)) Z(e);
|
|
3203
4382
|
}
|
|
3204
|
-
r && (
|
|
3205
|
-
for (let e of
|
|
3206
|
-
return
|
|
4383
|
+
r && (Z(r), r.removeAttribute(It));
|
|
4384
|
+
for (let e of s) e && Z(e, void 0, t);
|
|
4385
|
+
return Ts({
|
|
3207
4386
|
scope: n,
|
|
3208
4387
|
decorator: r,
|
|
3209
|
-
bars:
|
|
3210
|
-
}, t),
|
|
4388
|
+
bars: s
|
|
4389
|
+
}, t), Es;
|
|
3211
4390
|
}
|
|
3212
|
-
if (l === "IDLE") return
|
|
4391
|
+
if (l === "IDLE") return Es;
|
|
3213
4392
|
let { scope: h } = a();
|
|
3214
|
-
if (!h) return
|
|
3215
|
-
let g = e.getTransitionTaskId(), _ =
|
|
4393
|
+
if (!h) return Es;
|
|
4394
|
+
let g = e.getTransitionTaskId(), _ = Es, v = () => {
|
|
3216
4395
|
_(), g && (s.resolveTask(g), n.delete(g));
|
|
3217
|
-
}, y =
|
|
4396
|
+
}, y = ut(o), b = `${l}-true`, x = h.getAttribute(It) === "true", S = !x && Mr(y, b);
|
|
3218
4397
|
if (!x) {
|
|
3219
|
-
let { decorator: e, bars: n } = a();
|
|
3220
|
-
|
|
4398
|
+
let { decorator: e, bars: n, screenContainer: r } = a();
|
|
4399
|
+
ws({
|
|
3221
4400
|
scope: h,
|
|
3222
4401
|
decorator: e,
|
|
3223
|
-
bars: n ?? []
|
|
4402
|
+
bars: [...n ?? [], ...Bo(r ?? null)]
|
|
3224
4403
|
}, y, b, t);
|
|
3225
4404
|
}
|
|
3226
|
-
let C = `${l}-false`, w =
|
|
3227
|
-
for (let e of
|
|
3228
|
-
let t =
|
|
4405
|
+
let C = `${l}-false`, w = Mr(y, C) ? q(y, C) : null, T = [];
|
|
4406
|
+
for (let e of po(h, l)) {
|
|
4407
|
+
let t = vt.get(e.getAttribute(B)), n = `${l}-${e.getAttribute(Nt)}`, r = t && Mr(t, n) ? q(t, n) : null;
|
|
3229
4408
|
r && T.push({
|
|
3230
4409
|
element: e,
|
|
3231
4410
|
motion: r
|
|
@@ -3235,112 +4414,114 @@ function ha(e) {
|
|
|
3235
4414
|
for (let { motion: e } of T) E = Math.max(E, (e.delay + e.duration) * 1e3);
|
|
3236
4415
|
let D = [];
|
|
3237
4416
|
{
|
|
3238
|
-
let e = y.decoratorName ?
|
|
4417
|
+
let e = y.decoratorName ? ht.get(y.decoratorName) : void 0;
|
|
3239
4418
|
if (e) for (let t of [`${l}-true`, `${l}-false`]) {
|
|
3240
|
-
if (!
|
|
3241
|
-
let n =
|
|
4419
|
+
if (!Mr(e, t)) continue;
|
|
4420
|
+
let n = q(e, t);
|
|
3242
4421
|
n && (D.push(n), E = Math.max(E, (n.delay + n.duration) * 1e3));
|
|
3243
4422
|
}
|
|
3244
4423
|
}
|
|
3245
4424
|
if (!S) {
|
|
3246
4425
|
if (!x && E > 0) {
|
|
3247
|
-
if (!d) return g && s.markGateHeld(g),
|
|
4426
|
+
if (!d) return g && s.markGateHeld(g), Es;
|
|
3248
4427
|
let e = E + 50;
|
|
3249
|
-
g && s.anchorGate(g, e +
|
|
4428
|
+
g && s.anchorGate(g, e + ks);
|
|
3250
4429
|
let t = setTimeout(v, e);
|
|
3251
4430
|
return () => clearTimeout(t);
|
|
3252
4431
|
}
|
|
3253
|
-
return queueMicrotask(v),
|
|
4432
|
+
return queueMicrotask(v), Es;
|
|
4433
|
+
}
|
|
4434
|
+
let O = q(y, b);
|
|
4435
|
+
if (g) {
|
|
4436
|
+
if (d) {
|
|
4437
|
+
let e = (O.delay + O.duration) * 1e3;
|
|
4438
|
+
s.anchorGate(g, Math.max(e, E) + ks);
|
|
4439
|
+
} else s.markGateHeld(g);
|
|
3254
4440
|
}
|
|
3255
|
-
let
|
|
3256
|
-
if (g) if (d) {
|
|
3257
|
-
let e = (O.delay + O.duration) * 1e3;
|
|
3258
|
-
s.anchorGate(g, Math.max(e, E) + pa);
|
|
3259
|
-
} else s.markGateHeld(g);
|
|
3260
|
-
let k = Ci({
|
|
4441
|
+
let k = ui({
|
|
3261
4442
|
status: l,
|
|
3262
4443
|
transition: y,
|
|
3263
4444
|
skipAnimation: x,
|
|
3264
4445
|
hasActiveMotion: !!O,
|
|
3265
4446
|
hasAnimation: S
|
|
3266
|
-
}), { hasDrivableMotion: A, nativeSurgeryAllowed: j, touchGoverned:
|
|
3267
|
-
k.framePacingKeepalive && (_ =
|
|
3268
|
-
let
|
|
3269
|
-
A && !
|
|
4447
|
+
}), { hasDrivableMotion: A, nativeSurgeryAllowed: j, touchGoverned: M, forceCompiled: ee, governedHead: N, desktopHead: te, governedSlide: P, birthHoldMs: F } = k;
|
|
4448
|
+
k.framePacingKeepalive && (_ = ti());
|
|
4449
|
+
let I = null;
|
|
4450
|
+
A && !z() && !j && !M && !ee && !te && (I = ns(h, () => [h.ownerDocument.documentElement], () => As.get(h)?.(), !1));
|
|
3270
4451
|
{
|
|
3271
4452
|
let e = h.ownerDocument.documentElement;
|
|
3272
|
-
k.creepHead ? e.setAttribute(
|
|
4453
|
+
k.creepHead ? e.setAttribute(un, "true") : e.removeAttribute(un), N ? e.setAttribute(ln, "true") : e.removeAttribute(ln), te ? e.setAttribute(dn, "true") : e.removeAttribute(dn);
|
|
3273
4454
|
}
|
|
3274
|
-
let
|
|
3275
|
-
A && j && (
|
|
3276
|
-
let
|
|
3277
|
-
|
|
3278
|
-
},
|
|
3279
|
-
|
|
3280
|
-
},
|
|
4455
|
+
let ne = null;
|
|
4456
|
+
A && j && (ne = Yo(h, () => [h.ownerDocument.documentElement], () => As.get(h)?.()));
|
|
4457
|
+
let re = Cr("screen", o, b), ie, L = () => {
|
|
4458
|
+
ie !== void 0 && (clearTimeout(ie), ie = void 0);
|
|
4459
|
+
}, ae = 0, oe, R = [], se, ce = () => {
|
|
4460
|
+
R.forEach((e) => cancelAnimationFrame(e)), R = [], se !== void 0 && clearTimeout(se), se = void 0;
|
|
4461
|
+
}, le = () => {
|
|
3281
4462
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
3282
4463
|
shields exotic embedders. */
|
|
3283
4464
|
if (typeof requestAnimationFrame != "function") {
|
|
3284
4465
|
v();
|
|
3285
4466
|
return;
|
|
3286
4467
|
}
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
},
|
|
4468
|
+
se = setTimeout(() => {
|
|
4469
|
+
ce(), v();
|
|
4470
|
+
}, Os);
|
|
3290
4471
|
let e = (t) => {
|
|
3291
4472
|
if (t <= 0) {
|
|
3292
|
-
|
|
4473
|
+
ce(), v();
|
|
3293
4474
|
return;
|
|
3294
4475
|
}
|
|
3295
|
-
|
|
4476
|
+
R.push(requestAnimationFrame(() => e(t - 1)));
|
|
3296
4477
|
};
|
|
3297
|
-
e(
|
|
3298
|
-
},
|
|
3299
|
-
if (
|
|
3300
|
-
|
|
4478
|
+
e(Ds);
|
|
4479
|
+
}, ue = () => {
|
|
4480
|
+
if (ae <= 0) {
|
|
4481
|
+
le();
|
|
3301
4482
|
return;
|
|
3302
4483
|
}
|
|
3303
|
-
|
|
3304
|
-
},
|
|
3305
|
-
e.target === h &&
|
|
4484
|
+
oe = setTimeout(le, ae);
|
|
4485
|
+
}, de = Es, fe = Es, pe = (e) => {
|
|
4486
|
+
e.target === h && Tr(e.animationName, re) && (O && e.elapsedTime === 0 || (h.removeEventListener("animationend", pe), L(), de(), ue()));
|
|
3306
4487
|
};
|
|
3307
|
-
h.addEventListener("animationend",
|
|
3308
|
-
let
|
|
3309
|
-
|
|
3310
|
-
let
|
|
4488
|
+
h.addEventListener("animationend", pe), A && d && p();
|
|
4489
|
+
let me = (O.delay + O.duration) * 1e3, he = Math.max(me, E) + 1500, ge = g ? setTimeout(() => void s.resolveTask(g), he) : void 0;
|
|
4490
|
+
ae = Math.max(0, E - me);
|
|
4491
|
+
let _e = me + F + 250, ve = () => g !== null && e.getTransitionTaskId() === g && h.isConnected && h.getAttribute("data-flemo-skip-animation") !== "true" && Mr(y, b), ye = Ca({
|
|
3311
4492
|
element: h,
|
|
3312
|
-
expectedName:
|
|
4493
|
+
expectedName: re,
|
|
3313
4494
|
motion: O,
|
|
3314
4495
|
writer: t,
|
|
3315
|
-
isLive:
|
|
4496
|
+
isLive: ve,
|
|
3316
4497
|
budgetUsed: () => n.get(g) ?? 0,
|
|
3317
4498
|
spendBudget: () => {
|
|
3318
|
-
|
|
4499
|
+
fe(), n.set(g, (n.get(g) ?? 0) + 1);
|
|
3319
4500
|
},
|
|
3320
4501
|
onTerminal: v
|
|
3321
4502
|
});
|
|
3322
|
-
|
|
3323
|
-
let
|
|
3324
|
-
|
|
3325
|
-
},
|
|
3326
|
-
if (
|
|
3327
|
-
|
|
4503
|
+
de = ye.detach;
|
|
4504
|
+
let be = !1, xe = () => {
|
|
4505
|
+
L(), ie = setTimeout(Se, _e);
|
|
4506
|
+
}, Se = () => {
|
|
4507
|
+
if (L(), ve() && !be) {
|
|
4508
|
+
be = !0, fe(), ye.fullRestart(), xe();
|
|
3328
4509
|
return;
|
|
3329
4510
|
}
|
|
3330
4511
|
v();
|
|
3331
|
-
},
|
|
3332
|
-
|
|
3333
|
-
|
|
4512
|
+
}, Ce = d, we = Ce ? m(h, b) : [];
|
|
4513
|
+
Ce && (ye.attach(), g && xe()), Ce && (j || M) && As.set(h, () => {
|
|
4514
|
+
fe(), g && ie !== void 0 && xe();
|
|
3334
4515
|
});
|
|
3335
|
-
let
|
|
3336
|
-
|
|
3337
|
-
}) : null,
|
|
3338
|
-
|
|
4516
|
+
let Te = Ce && j ? es(() => [h.ownerDocument.documentElement], () => {
|
|
4517
|
+
fe(), g && ie !== void 0 && xe();
|
|
4518
|
+
}) : null, Ee, De = () => {
|
|
4519
|
+
Ee !== void 0 && (clearTimeout(Ee), Ee = void 0);
|
|
3339
4520
|
};
|
|
3340
|
-
if (
|
|
3341
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
4521
|
+
if (fe = De, Ce && g && !P && !ee) {
|
|
4522
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = us(O, h, e), n = w ? us(w, h, e) : 0, r = 0;
|
|
3342
4523
|
for (let { element: t, motion: n } of T) {
|
|
3343
|
-
let i =
|
|
4524
|
+
let i = us(n, t, e);
|
|
3344
4525
|
if (i === null) {
|
|
3345
4526
|
r = null;
|
|
3346
4527
|
break;
|
|
@@ -3351,7 +4532,7 @@ function ha(e) {
|
|
|
3351
4532
|
if (D.length > 0) {
|
|
3352
4533
|
let t = a().decorator;
|
|
3353
4534
|
if (t) for (let n of D) {
|
|
3354
|
-
let r =
|
|
4535
|
+
let r = us(n, t, e);
|
|
3355
4536
|
if (r === null) {
|
|
3356
4537
|
i = null;
|
|
3357
4538
|
break;
|
|
@@ -3360,16 +4541,16 @@ function ha(e) {
|
|
|
3360
4541
|
}
|
|
3361
4542
|
}
|
|
3362
4543
|
let o = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3363
|
-
o !== null && o + 17 <
|
|
3364
|
-
|
|
3365
|
-
}, o + 17 +
|
|
4544
|
+
o !== null && o + 17 < me + ae && (Ee = setTimeout(() => {
|
|
4545
|
+
Ee = void 0, ve() && (h.removeEventListener("animationend", pe), L(), de(), le());
|
|
4546
|
+
}, o + 17 + F));
|
|
3366
4547
|
}
|
|
3367
4548
|
return () => {
|
|
3368
|
-
if (_(),
|
|
3369
|
-
|
|
3370
|
-
for (let e of
|
|
4549
|
+
if (_(), ge !== void 0 && clearTimeout(ge), oe !== void 0 && clearTimeout(oe), ce(), ne?.(), I?.(), Te?.(), De(), h.removeEventListener("animationend", pe), Ce) {
|
|
4550
|
+
ye.detach();
|
|
4551
|
+
for (let e of we) e();
|
|
3371
4552
|
}
|
|
3372
|
-
|
|
4553
|
+
L(), g && e.getTransitionTaskId() !== g && n.delete(g);
|
|
3373
4554
|
};
|
|
3374
4555
|
},
|
|
3375
4556
|
activeResumeEntryCount: () => n.size
|
|
@@ -3377,14 +4558,14 @@ function ha(e) {
|
|
|
3377
4558
|
}
|
|
3378
4559
|
//#endregion
|
|
3379
4560
|
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
3380
|
-
var
|
|
3381
|
-
function
|
|
3382
|
-
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !
|
|
3383
|
-
if (
|
|
3384
|
-
|
|
3385
|
-
let e = () => document.querySelector(
|
|
3386
|
-
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout:
|
|
3387
|
-
|
|
4561
|
+
var Ms = () => {}, Ns = 2e3, Ps = 1200, Fs = 120, Is = 3, Ls = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", Rs = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", zs = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", Bs = "cold", Vs = 0, Hs = null;
|
|
4562
|
+
function Us() {
|
|
4563
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !z()) return Ms;
|
|
4564
|
+
if (Vs += 1, Bs === "cold") {
|
|
4565
|
+
Bs = "scheduled";
|
|
4566
|
+
let e = () => document.querySelector(M.map((e) => G(Mt, e)).join(",")) !== null, t = () => {
|
|
4567
|
+
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: Ns }) : null, t = e === null ? setTimeout(n, Ps) : null;
|
|
4568
|
+
Hs = () => {
|
|
3388
4569
|
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
3389
4570
|
};
|
|
3390
4571
|
}, n = () => {
|
|
@@ -3392,13 +4573,13 @@ function Da() {
|
|
|
3392
4573
|
t();
|
|
3393
4574
|
return;
|
|
3394
4575
|
}
|
|
3395
|
-
|
|
4576
|
+
Hs = null, Bs = "done";
|
|
3396
4577
|
let n = document.createElement("div");
|
|
3397
|
-
n.setAttribute(
|
|
4578
|
+
n.setAttribute(mn, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", Ls);
|
|
3398
4579
|
let r = document.createElement("div");
|
|
3399
|
-
r.setAttribute("style",
|
|
4580
|
+
r.setAttribute("style", Rs), r.textContent = "flemo";
|
|
3400
4581
|
let i = document.createElement("div");
|
|
3401
|
-
i.setAttribute("style",
|
|
4582
|
+
i.setAttribute("style", zs);
|
|
3402
4583
|
let a = document.createElement("div");
|
|
3403
4584
|
a.setAttribute("style", "width:96px;font-size:11px;color:#123;will-change:transform;transform:translate3d(0,0,0);");
|
|
3404
4585
|
let o = document.createElement("div");
|
|
@@ -3419,14 +4600,14 @@ function Da() {
|
|
|
3419
4600
|
c.setAttribute("style", "border-top:1px solid #ccd;padding:2px 0;"), c.textContent = "의원 기록 표결 발의 가나다라", a.append(o, s, c), n.append(r, i, a), document.body.appendChild(n);
|
|
3420
4601
|
try {
|
|
3421
4602
|
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
3422
|
-
duration:
|
|
3423
|
-
iterations:
|
|
4603
|
+
duration: Fs,
|
|
4604
|
+
iterations: Is
|
|
3424
4605
|
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
3425
|
-
duration:
|
|
3426
|
-
iterations:
|
|
4606
|
+
duration: Fs,
|
|
4607
|
+
iterations: Is
|
|
3427
4608
|
}), a.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
3428
|
-
duration:
|
|
3429
|
-
iterations:
|
|
4609
|
+
duration: Fs,
|
|
4610
|
+
iterations: Is
|
|
3430
4611
|
});
|
|
3431
4612
|
} catch {}
|
|
3432
4613
|
setTimeout(() => n.remove(), 450);
|
|
@@ -3435,13 +4616,13 @@ function Da() {
|
|
|
3435
4616
|
}
|
|
3436
4617
|
let e = !1;
|
|
3437
4618
|
return () => {
|
|
3438
|
-
e || (e = !0,
|
|
4619
|
+
e || (e = !0, Vs = Math.max(0, Vs - 1), Vs === 0 && Bs === "scheduled" && (Hs?.(), Hs = null, Bs = "cold"));
|
|
3439
4620
|
};
|
|
3440
4621
|
}
|
|
3441
4622
|
//#endregion
|
|
3442
4623
|
//#region src/platform/profile.ts
|
|
3443
|
-
var
|
|
3444
|
-
let t = !
|
|
4624
|
+
var Ws = (e = {}) => {
|
|
4625
|
+
let t = !z(), n = he();
|
|
3445
4626
|
return {
|
|
3446
4627
|
mainThreadPresented: t,
|
|
3447
4628
|
atomicReleaseFlip: t && (e.authoredNativeDriver === !0 || n || Ie()),
|
|
@@ -3451,40 +4632,57 @@ var Oa = (e = {}) => {
|
|
|
3451
4632
|
restLayerPromotion: Ve(),
|
|
3452
4633
|
imageDecodeOffload: typeof navigator < "u" && He() !== "off"
|
|
3453
4634
|
};
|
|
3454
|
-
},
|
|
4635
|
+
}, Gs = () => Ws().restLayerPromotion, Ks = 500, qs = 3e3, Js = [
|
|
3455
4636
|
"pointerdown",
|
|
3456
4637
|
"pointermove",
|
|
3457
4638
|
"wheel",
|
|
3458
4639
|
"touchstart",
|
|
3459
4640
|
"keydown"
|
|
3460
|
-
],
|
|
4641
|
+
], Ys = () => {
|
|
3461
4642
|
if (typeof document > "u") return () => {};
|
|
3462
4643
|
let e = null, t = null, n = 0, r = () => {
|
|
3463
4644
|
let r = Date.now();
|
|
3464
|
-
if (r - n <
|
|
4645
|
+
if (r - n < Ks) return;
|
|
3465
4646
|
n = r, t && clearTimeout(t);
|
|
3466
4647
|
let i = e;
|
|
3467
|
-
e =
|
|
4648
|
+
e = oo(), i?.(), t = setTimeout(() => {
|
|
3468
4649
|
t = null, e?.(), e = null;
|
|
3469
|
-
},
|
|
4650
|
+
}, qs);
|
|
3470
4651
|
};
|
|
3471
|
-
for (let e of
|
|
4652
|
+
for (let e of Js) document.addEventListener(e, r, { passive: !0 });
|
|
3472
4653
|
return () => {
|
|
3473
|
-
for (let e of
|
|
4654
|
+
for (let e of Js) document.removeEventListener(e, r);
|
|
3474
4655
|
t && clearTimeout(t), e?.();
|
|
3475
4656
|
};
|
|
3476
|
-
},
|
|
3477
|
-
let e = [
|
|
3478
|
-
return
|
|
4657
|
+
}, Xs = 0, Zs = null, Qs = () => {
|
|
4658
|
+
let e = [Ys(), Us()];
|
|
4659
|
+
return Ws().imageDecodeOffload && e.push(qa()), () => {
|
|
3479
4660
|
for (let t of e) t();
|
|
3480
4661
|
};
|
|
3481
|
-
},
|
|
3482
|
-
|
|
4662
|
+
}, $s = () => {
|
|
4663
|
+
Xs === 0 && (Zs = Qs()), Xs += 1;
|
|
3483
4664
|
let e = !1;
|
|
3484
4665
|
return () => {
|
|
3485
|
-
e || (e = !0, --
|
|
4666
|
+
e || (e = !0, --Xs, !(Xs > 0) && (Zs?.(), Zs = null));
|
|
3486
4667
|
};
|
|
3487
|
-
},
|
|
4668
|
+
}, ec = "auto", tc = 1e5, nc = [
|
|
4669
|
+
{
|
|
4670
|
+
role: "content",
|
|
4671
|
+
level: ec
|
|
4672
|
+
},
|
|
4673
|
+
{
|
|
4674
|
+
role: "chrome",
|
|
4675
|
+
level: ec
|
|
4676
|
+
},
|
|
4677
|
+
{
|
|
4678
|
+
role: "decorator",
|
|
4679
|
+
level: ec
|
|
4680
|
+
},
|
|
4681
|
+
{
|
|
4682
|
+
role: "overlay",
|
|
4683
|
+
level: tc
|
|
4684
|
+
}
|
|
4685
|
+
], rc = [
|
|
3488
4686
|
{
|
|
3489
4687
|
key: "flemo:sixty",
|
|
3490
4688
|
storage: "session",
|
|
@@ -3581,6 +4779,14 @@ var Oa = (e = {}) => {
|
|
|
3581
4779
|
fallback: "off",
|
|
3582
4780
|
effect: "keep screen layers resident at rest — a resident layer is a PERMANENT stacking context over the consumer's screen"
|
|
3583
4781
|
},
|
|
4782
|
+
{
|
|
4783
|
+
key: "flemo:morph",
|
|
4784
|
+
storage: "session",
|
|
4785
|
+
kind: "opt-in-diagnostic",
|
|
4786
|
+
values: "\"on\" / \"off\"",
|
|
4787
|
+
fallback: "off",
|
|
4788
|
+
effect: "trace every morph flight decision to the console — why a pair did or did not fly, and whether it landed on its own animation or on the backstop"
|
|
4789
|
+
},
|
|
3584
4790
|
{
|
|
3585
4791
|
key: "flemo:freeze",
|
|
3586
4792
|
storage: "session",
|
|
@@ -3589,7 +4795,7 @@ var Oa = (e = {}) => {
|
|
|
3589
4795
|
fallback: "off",
|
|
3590
4796
|
effect: "keep the direct prev screen live instead of freezing it"
|
|
3591
4797
|
}
|
|
3592
|
-
],
|
|
4798
|
+
], ic = [
|
|
3593
4799
|
{
|
|
3594
4800
|
key: "flemo:motion-driver",
|
|
3595
4801
|
storage: "local",
|
|
@@ -3635,7 +4841,7 @@ var Oa = (e = {}) => {
|
|
|
3635
4841
|
storage: "session",
|
|
3636
4842
|
retiredWith: "the Low Power Mode release-latency probe (2026-08-22)"
|
|
3637
4843
|
}
|
|
3638
|
-
],
|
|
4844
|
+
], ac = .12, oc = 1.6, sc = .5, cc = .28, lc = (e, t, n) => {
|
|
3639
4845
|
if (!(e > 0)) return t;
|
|
3640
4846
|
if (e >= 1) return 0;
|
|
3641
4847
|
let [r, i, a, o] = n, s = (e) => 3 * (1 - e) ** 2 * e * r + 3 * (1 - e) * e * e * a + e ** 3, c = (e) => 3 * (1 - e) ** 2 * e * i + 3 * (1 - e) * e * e * o + e ** 3, l = 0, u = 1;
|
|
@@ -3645,17 +4851,17 @@ var Oa = (e = {}) => {
|
|
|
3645
4851
|
}
|
|
3646
4852
|
let d = s((l + u) / 2);
|
|
3647
4853
|
return t * Math.min(1, Math.max(0, 1 - d));
|
|
3648
|
-
},
|
|
4854
|
+
}, uc = ({ remainingPx: e, spanPx: t, velocityPxPerSecond: n, authoredSeconds: r, authoredEase: i, reversing: a = !1, minSeconds: o = a ? cc : ac }) => {
|
|
3649
4855
|
let s = Math.abs(e);
|
|
3650
4856
|
if (s <= .5) return 0;
|
|
3651
|
-
let c = Math.abs(t), l = c > 0 ? Math.min(1, s / c) : 1, u = i && !a ?
|
|
4857
|
+
let c = Math.abs(t), l = c > 0 ? Math.min(1, s / c) : 1, u = i && !a ? lc(1 - l, r, i) : r * l, d = Math.abs(n), f = !a && d > 0 ? oc * s / d : Infinity;
|
|
3652
4858
|
return Math.min(r, Math.max(o, Math.min(u, f)));
|
|
3653
|
-
},
|
|
4859
|
+
}, dc = ({ remainingPx: e, velocityPxPerSecond: t, seconds: n, authoredSlope: r, reversing: i = !1 }) => {
|
|
3654
4860
|
let a = Math.abs(e);
|
|
3655
4861
|
if (!Number.isFinite(a) || a <= .5 || !Number.isFinite(n) || n <= 0 || !i && !Number.isFinite(t)) return null;
|
|
3656
4862
|
let o = i ? 0 : Math.abs(t) * n / a;
|
|
3657
|
-
return Math.min(
|
|
3658
|
-
},
|
|
4863
|
+
return Math.min(oc, Math.max(typeof r == "number" && r >= 0 ? Math.min(sc, r) : sc, o));
|
|
4864
|
+
}, fc = (e, t) => {
|
|
3659
4865
|
let [n, r, i, a] = e;
|
|
3660
4866
|
if (!Number.isFinite(t) || n <= 0 || t <= 0) return [
|
|
3661
4867
|
n,
|
|
@@ -3673,20 +4879,20 @@ var Oa = (e = {}) => {
|
|
|
3673
4879
|
};
|
|
3674
4880
|
//#endregion
|
|
3675
4881
|
//#region src/utils/findScrollable.ts
|
|
3676
|
-
function
|
|
3677
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
4882
|
+
function pc(e, t) {
|
|
4883
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = mc(e);
|
|
3678
4884
|
if (!o) return {
|
|
3679
4885
|
element: null,
|
|
3680
4886
|
hasMarker: !1
|
|
3681
4887
|
};
|
|
3682
4888
|
let s = o.closest?.(r);
|
|
3683
|
-
if (s instanceof HTMLElement &&
|
|
4889
|
+
if (s instanceof HTMLElement && hc(s, n) && (!a || gc(s, n))) return {
|
|
3684
4890
|
element: s,
|
|
3685
4891
|
hasMarker: !0
|
|
3686
4892
|
};
|
|
3687
4893
|
let c = o, l = 0;
|
|
3688
4894
|
for (; c && l < i;) {
|
|
3689
|
-
if (
|
|
4895
|
+
if (hc(c, n) && (!a || gc(c, n))) return {
|
|
3690
4896
|
element: c,
|
|
3691
4897
|
hasMarker: !1
|
|
3692
4898
|
};
|
|
@@ -3697,7 +4903,7 @@ function Ja(e, t) {
|
|
|
3697
4903
|
hasMarker: !1
|
|
3698
4904
|
};
|
|
3699
4905
|
}
|
|
3700
|
-
function
|
|
4906
|
+
function mc(e) {
|
|
3701
4907
|
if (!e) return null;
|
|
3702
4908
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
3703
4909
|
if (n && n.length) {
|
|
@@ -3705,33 +4911,33 @@ function Ya(e) {
|
|
|
3705
4911
|
}
|
|
3706
4912
|
return e instanceof HTMLElement ? e : null;
|
|
3707
4913
|
}
|
|
3708
|
-
function
|
|
4914
|
+
function hc(e, t) {
|
|
3709
4915
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
3710
4916
|
}
|
|
3711
|
-
function
|
|
3712
|
-
if (!
|
|
4917
|
+
function gc(e, t) {
|
|
4918
|
+
if (!hc(e, t) || typeof window > "u") return !1;
|
|
3713
4919
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
3714
4920
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
3715
4921
|
}
|
|
3716
4922
|
//#endregion
|
|
3717
4923
|
//#region src/screen/computeBarRiding.ts
|
|
3718
|
-
function
|
|
4924
|
+
function _c(e, t) {
|
|
3719
4925
|
return !!e && !!t && e.id === t.id;
|
|
3720
4926
|
}
|
|
3721
|
-
function
|
|
4927
|
+
function vc(e) {
|
|
3722
4928
|
if (e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev) return {
|
|
3723
4929
|
app: !1,
|
|
3724
4930
|
nav: !1
|
|
3725
4931
|
};
|
|
3726
4932
|
let t = e.hasTopBar ? { id: e.topBarId } : void 0, n = e.hasNavBar ? { id: e.bottomBarId } : void 0, r = e.partnerMetadata?.topBar ?? (e.partnerBars?.topBar ? {} : void 0), i = e.partnerMetadata?.bottomBar ?? (e.partnerBars?.bottomBar ? {} : void 0);
|
|
3727
4933
|
return {
|
|
3728
|
-
app: e.hasTopBar && !
|
|
3729
|
-
nav: e.hasNavBar && !
|
|
4934
|
+
app: e.hasTopBar && !_c(t, r),
|
|
4935
|
+
nav: e.hasNavBar && !_c(n, i)
|
|
3730
4936
|
};
|
|
3731
4937
|
}
|
|
3732
4938
|
//#endregion
|
|
3733
4939
|
//#region src/core/engine/createSwipeController.ts
|
|
3734
|
-
function
|
|
4940
|
+
function yc(e) {
|
|
3735
4941
|
let t = Symbol("flemo-swipe-layer"), n = null, r = null, i = {
|
|
3736
4942
|
current: [],
|
|
3737
4943
|
prev: []
|
|
@@ -3786,9 +4992,9 @@ function eo(e) {
|
|
|
3786
4992
|
y: e.clientY
|
|
3787
4993
|
}, m = t, S = Math.max(S, Math.abs(e.clientX - f.x), Math.abs(e.clientY - f.y));
|
|
3788
4994
|
}, T = (r, a, o) => {
|
|
3789
|
-
let s =
|
|
3790
|
-
if (r === e.getElements().scope) for (let e of i.current)
|
|
3791
|
-
else if (r === n) for (let e of i.prev)
|
|
4995
|
+
let s = xa(r, a, o, t);
|
|
4996
|
+
if (r === e.getElements().scope) for (let e of i.current) xa(e, a, o, t);
|
|
4997
|
+
else if (r === n) for (let e of i.prev) xa(e, a, o, t);
|
|
3792
4998
|
return s;
|
|
3793
4999
|
}, E = (e, t) => {
|
|
3794
5000
|
if (!e) return null;
|
|
@@ -3798,39 +5004,39 @@ function eo(e) {
|
|
|
3798
5004
|
}
|
|
3799
5005
|
return null;
|
|
3800
5006
|
}, D = (n) => {
|
|
3801
|
-
let r = e.getPartnerBars(), a = e.getPartnerBarMetadata?.(), o = E(n,
|
|
5007
|
+
let r = e.getPartnerBars(), a = e.getPartnerBarMetadata?.(), o = E(n, G(Lt, "app")), s = E(n, G(Lt, "nav")), c = (e) => {
|
|
3802
5008
|
if (!e) return;
|
|
3803
|
-
let t = e.getAttribute(
|
|
5009
|
+
let t = e.getAttribute(Vt);
|
|
3804
5010
|
return t === null ? {} : { id: e.getAttribute("data-flemo-bar-id-type") === "number" ? Number(t) : t };
|
|
3805
5011
|
}, l = e.hasSharedTopBar() ? { id: e.getSharedTopBarId?.() } : void 0, u = e.hasSharedBottomBar() ? { id: e.getSharedBottomBarId?.() } : void 0, d = a?.topBar ?? (r?.topBar ? {} : c(o)), f = a?.bottomBar ?? (r?.bottomBar ? {} : c(s)), p = [], { sharedTopBar: m, sharedBottomBar: h } = e.getElements();
|
|
3806
|
-
m && l && !
|
|
5012
|
+
m && l && !_c(l, d) && p.push(m), h && u && !_c(u, f) && p.push(h);
|
|
3807
5013
|
let g = [];
|
|
3808
|
-
n && (o && d && !
|
|
5014
|
+
n && (o && d && !_c(d, l) && g.push(o), s && f && !_c(f, u) && g.push(s)), p.push(...Bo(e.getElements().screenContainer)), g.push(...Bo(n)), i = {
|
|
3809
5015
|
current: p,
|
|
3810
5016
|
prev: g
|
|
3811
5017
|
};
|
|
3812
|
-
for (let n of p)
|
|
3813
|
-
for (let n of g)
|
|
5018
|
+
for (let n of p) xs(n, e.getTransition(), !1, t);
|
|
5019
|
+
for (let n of g) xs(n, e.getTransition(), !1, t);
|
|
3814
5020
|
}, O = () => {
|
|
3815
5021
|
let { scope: i, decorator: a } = e.getElements(), o = e.getTransition();
|
|
3816
|
-
i &&
|
|
5022
|
+
i && xs(i, o, !1, t), n && xs(n, o, !1, t);
|
|
3817
5023
|
let s = e.getDecorator();
|
|
3818
|
-
s && (a &&
|
|
5024
|
+
s && (a && xs(a, s, !1, t), r && xs(r, s, !1, t));
|
|
3819
5025
|
}, k = () => {
|
|
3820
5026
|
let { scope: i, decorator: a } = e.getElements();
|
|
3821
|
-
i &&
|
|
5027
|
+
i && Ss(i, t), n && Ss(n, t), a && Ss(a, t), r && Ss(r, t);
|
|
3822
5028
|
}, A = () => {
|
|
3823
|
-
for (let e of i.current)
|
|
3824
|
-
for (let e of i.prev)
|
|
5029
|
+
for (let e of i.current) Z(e, void 0, t), Ss(e, t);
|
|
5030
|
+
for (let e of i.prev) Z(e, void 0, t), Ss(e, t);
|
|
3825
5031
|
i = {
|
|
3826
5032
|
current: [],
|
|
3827
5033
|
prev: []
|
|
3828
5034
|
};
|
|
3829
5035
|
}, j = (t) => {
|
|
3830
5036
|
let { screenContainer: n } = e.getElements(), r = (e) => {
|
|
3831
|
-
let t = E(e,
|
|
3832
|
-
return Array.from(e.querySelectorAll(
|
|
3833
|
-
let n = e.closest(
|
|
5037
|
+
let t = E(e, W(jt));
|
|
5038
|
+
return Array.from(e.querySelectorAll(W(B))).filter((e) => {
|
|
5039
|
+
let n = e.closest(W(jt));
|
|
3834
5040
|
return n === null || n === t;
|
|
3835
5041
|
});
|
|
3836
5042
|
};
|
|
@@ -3838,12 +5044,12 @@ function eo(e) {
|
|
|
3838
5044
|
current: r(n),
|
|
3839
5045
|
prev: r(t)
|
|
3840
5046
|
};
|
|
3841
|
-
},
|
|
5047
|
+
}, M = (e, n, r, i) => {
|
|
3842
5048
|
let o = (a, o) => {
|
|
3843
|
-
let s =
|
|
5049
|
+
let s = vt.get(a.getAttribute(B));
|
|
3844
5050
|
if (!s) return;
|
|
3845
5051
|
let c = {
|
|
3846
|
-
animate: i ?? ((e, n, r) =>
|
|
5052
|
+
animate: i ?? ((e, n, r) => xa(e, n, r, t)),
|
|
3847
5053
|
element: a,
|
|
3848
5054
|
active: o
|
|
3849
5055
|
};
|
|
@@ -3851,13 +5057,13 @@ function eo(e) {
|
|
|
3851
5057
|
};
|
|
3852
5058
|
for (let e of a.current) o(e, !0);
|
|
3853
5059
|
for (let e of a.prev) o(e, !1);
|
|
3854
|
-
},
|
|
3855
|
-
for (let e of [...a.current, ...a.prev])
|
|
5060
|
+
}, ee = () => {
|
|
5061
|
+
for (let e of [...a.current, ...a.prev]) Z(e, void 0, t);
|
|
3856
5062
|
a = {
|
|
3857
5063
|
current: [],
|
|
3858
5064
|
prev: []
|
|
3859
5065
|
};
|
|
3860
|
-
},
|
|
5066
|
+
}, N = async (t) => {
|
|
3861
5067
|
let i = e.getTransition();
|
|
3862
5068
|
if (!i.swipeDirection || e.getViewportScrollHeight() > 10) {
|
|
3863
5069
|
s = !1;
|
|
@@ -3869,11 +5075,11 @@ function eo(e) {
|
|
|
3869
5075
|
return;
|
|
3870
5076
|
}
|
|
3871
5077
|
let u = o?.previousElementSibling ?? null;
|
|
3872
|
-
if (n = E(u,
|
|
5078
|
+
if (n = E(u, W(jt)), r = E(u, W(Gt)), !n) {
|
|
3873
5079
|
s = !1;
|
|
3874
5080
|
return;
|
|
3875
5081
|
}
|
|
3876
|
-
c = !0,
|
|
5082
|
+
c = !0, re = ie(), L = 0, ne = (typeof performance > "u" ? Date.now() : performance.now()) + I, S = 0, f = {
|
|
3877
5083
|
x: t.clientX,
|
|
3878
5084
|
y: t.clientY
|
|
3879
5085
|
}, p = {
|
|
@@ -3893,61 +5099,63 @@ function eo(e) {
|
|
|
3893
5099
|
prevScreen: n,
|
|
3894
5100
|
onStart: (e) => {
|
|
3895
5101
|
_?.onSwipeStart?.(e, {
|
|
3896
|
-
animate:
|
|
5102
|
+
animate: xa,
|
|
3897
5103
|
currentDecorator: l,
|
|
3898
5104
|
prevDecorator: r
|
|
3899
|
-
}),
|
|
5105
|
+
}), M("start", e, 0);
|
|
3900
5106
|
}
|
|
3901
5107
|
});
|
|
3902
|
-
v && !d ? e.setDragStatus("PENDING") : v || (e.setDragStatus("IDLE"), c = !1, s = !1, C(t), A(), k(),
|
|
3903
|
-
},
|
|
3904
|
-
let t =
|
|
5108
|
+
v && !d ? (e.setDragStatus("PENDING"), e.onDragStart?.()) : v || (e.setDragStatus("IDLE"), c = !1, s = !1, C(t), A(), k(), ee());
|
|
5109
|
+
}, te = (e) => {
|
|
5110
|
+
let t = N(e);
|
|
3905
5111
|
u = t, t.finally(() => {
|
|
3906
5112
|
u = null;
|
|
3907
5113
|
});
|
|
3908
|
-
},
|
|
5114
|
+
}, P = null, F = 0, I = 200, ne = 0, re = !0, ie = () => {
|
|
3909
5115
|
let e = n?.parentElement;
|
|
3910
5116
|
return !e || !e.isConnected || typeof getComputedStyle != "function" || getComputedStyle(e).display !== "none";
|
|
3911
|
-
},
|
|
3912
|
-
|
|
3913
|
-
let e =
|
|
3914
|
-
|
|
3915
|
-
},
|
|
3916
|
-
if (
|
|
3917
|
-
|
|
5117
|
+
}, L = 0, ae = (e) => re ? !0 : e >= ne ? (re = !0, !0) : ie() ? L ? (re = !0, !0) : (L = e, !1) : (L = 0, !1), oe = () => {
|
|
5118
|
+
F && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(F), F = 0, re = !0;
|
|
5119
|
+
let e = P;
|
|
5120
|
+
P = null, e && ce(e);
|
|
5121
|
+
}, R = (e = typeof performance > "u" ? Date.now() : performance.now()) => {
|
|
5122
|
+
if (F = 0, !ae(e)) {
|
|
5123
|
+
P && typeof requestAnimationFrame == "function" && (F = requestAnimationFrame(R));
|
|
3918
5124
|
return;
|
|
3919
5125
|
}
|
|
3920
|
-
let t =
|
|
3921
|
-
|
|
3922
|
-
},
|
|
3923
|
-
if (
|
|
5126
|
+
let t = P;
|
|
5127
|
+
P = null, t && ce(t);
|
|
5128
|
+
}, se = (e) => {
|
|
5129
|
+
if (P = e, !F) {
|
|
3924
5130
|
if (typeof requestAnimationFrame != "function") {
|
|
3925
|
-
|
|
5131
|
+
R();
|
|
3926
5132
|
return;
|
|
3927
5133
|
}
|
|
3928
|
-
|
|
5134
|
+
F = requestAnimationFrame(R);
|
|
3929
5135
|
}
|
|
3930
|
-
},
|
|
5136
|
+
}, ce = (t) => {
|
|
3931
5137
|
let i = e.getTransition();
|
|
3932
5138
|
if (!i.swipeDirection || !c || u || e.getViewportScrollHeight() > 10) return;
|
|
3933
|
-
let { scope: a, decorator: o } = e.getElements(), s = e.getDecorator();
|
|
3934
|
-
|
|
5139
|
+
let { scope: a, decorator: o } = e.getElements(), s = e.getDecorator(), l = x(t), d = i.swipeDirection, f = a?.getBoundingClientRect(), p = (d === "y" ? f?.height : f?.width) || (typeof window > "u" ? 0 : d === "y" ? window.innerHeight : window.innerWidth), m = Math.abs(d === "y" ? l.offset.y : l.offset.x);
|
|
5140
|
+
/* v8 ignore next -- a zero span needs both an unlaid-out screen and no
|
|
5141
|
+
window to fall back to. */
|
|
5142
|
+
i.onSwipe(t, l, {
|
|
3935
5143
|
animate: T,
|
|
3936
5144
|
currentScreen: a,
|
|
3937
5145
|
prevScreen: n,
|
|
3938
5146
|
onProgress: (e, t) => {
|
|
3939
5147
|
s?.onSwipe?.(e, t, {
|
|
3940
|
-
animate:
|
|
5148
|
+
animate: xa,
|
|
3941
5149
|
currentDecorator: o,
|
|
3942
5150
|
prevDecorator: r
|
|
3943
|
-
}),
|
|
5151
|
+
}), M("swipe", e, t);
|
|
3944
5152
|
}
|
|
3945
|
-
});
|
|
3946
|
-
},
|
|
5153
|
+
}), e.onDragProgress?.(p > 0 ? m / p : 0);
|
|
5154
|
+
}, le = async (o, s = !1) => {
|
|
3947
5155
|
u && await u;
|
|
3948
5156
|
let l = e.getTransition();
|
|
3949
5157
|
if (!l.swipeDirection || !c) return;
|
|
3950
|
-
|
|
5158
|
+
oe(), c = !1;
|
|
3951
5159
|
let { scope: d, decorator: f } = e.getElements();
|
|
3952
5160
|
C(o);
|
|
3953
5161
|
let p = e.getDecorator(), m = s || S < 6, h = s ? {
|
|
@@ -3967,74 +5175,78 @@ function eo(e) {
|
|
|
3967
5175
|
x: 0,
|
|
3968
5176
|
y: 0
|
|
3969
5177
|
}
|
|
3970
|
-
} : x(o), g = l.swipeDirection, _ = d?.getBoundingClientRect(), v = (g === "y" ? _?.height : _?.width) || (typeof window > "u" ? 0 : g === "y" ? window.innerHeight : window.innerWidth), y = g === "y" ? h.offset.y : h.offset.x, b = g === "y" ? h.velocity.y : h.velocity.x, w = Math.abs(y), E = Math.abs(b), D = Math.sign(y), O = D !== 0 && Math.sign(b) === -D && E >= 300, j = !1,
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
let a =
|
|
3974
|
-
|
|
5178
|
+
} : x(o), g = l.swipeDirection, _ = d?.getBoundingClientRect(), v = (g === "y" ? _?.height : _?.width) || (typeof window > "u" ? 0 : g === "y" ? window.innerHeight : window.innerWidth), y = g === "y" ? h.offset.y : h.offset.x, b = g === "y" ? h.velocity.y : h.velocity.x, w = Math.abs(y), E = Math.abs(b), D = Math.sign(y), O = D !== 0 && Math.sign(b) === -D && E >= 300, j = !1, N = null, te = !1, P = (t, n) => {
|
|
5179
|
+
te || (te = !0, e.onDragSettle?.(t, n));
|
|
5180
|
+
}, F = (e) => ((t, r, i) => {
|
|
5181
|
+
let a = t === d || t === n, o = typeof i?.duration == "number" ? i.duration : 0;
|
|
5182
|
+
if (o <= 0) return e(t, r, i);
|
|
5183
|
+
let s = j ? v - w : w, c = !j && !O, l = Qi(i?.ease), u = uc({
|
|
5184
|
+
remainingPx: s,
|
|
3975
5185
|
spanPx: v,
|
|
3976
5186
|
velocityPxPerSecond: E,
|
|
3977
|
-
authoredSeconds:
|
|
3978
|
-
authoredEase:
|
|
3979
|
-
reversing:
|
|
3980
|
-
})
|
|
3981
|
-
|
|
5187
|
+
authoredSeconds: o,
|
|
5188
|
+
authoredEase: l ?? void 0,
|
|
5189
|
+
reversing: c
|
|
5190
|
+
});
|
|
5191
|
+
N === null && (N = u), a && P(j, u);
|
|
5192
|
+
let f = l ? dc({
|
|
5193
|
+
remainingPx: s,
|
|
3982
5194
|
velocityPxPerSecond: E,
|
|
3983
|
-
seconds:
|
|
3984
|
-
authoredSlope:
|
|
3985
|
-
reversing:
|
|
5195
|
+
seconds: u,
|
|
5196
|
+
authoredSlope: l[0] > 0 ? l[1] / l[0] : void 0,
|
|
5197
|
+
reversing: c
|
|
3986
5198
|
}) : null;
|
|
3987
|
-
return e(t,
|
|
3988
|
-
...
|
|
3989
|
-
duration:
|
|
3990
|
-
...
|
|
5199
|
+
return e(t, r, {
|
|
5200
|
+
...i,
|
|
5201
|
+
duration: u,
|
|
5202
|
+
...l && f !== null ? { ease: fc(l, f) } : {}
|
|
3991
5203
|
});
|
|
3992
|
-
}),
|
|
5204
|
+
}), I = m ? (e, t, n) => T(e, t, {
|
|
3993
5205
|
...n,
|
|
3994
5206
|
duration: 0
|
|
3995
|
-
}) :
|
|
5207
|
+
}) : F(T), ne = m ? (e, t, n) => xa(e, t, {
|
|
3996
5208
|
...n,
|
|
3997
5209
|
duration: 0
|
|
3998
|
-
}) :
|
|
5210
|
+
}) : F(xa), re = m ? (e, n, r) => xa(e, n, {
|
|
3999
5211
|
...r,
|
|
4000
5212
|
duration: 0
|
|
4001
|
-
}, t) :
|
|
4002
|
-
animate:
|
|
5213
|
+
}, t) : F((e, n, r) => xa(e, n, r, t)), ie = await l.onSwipeEnd(o, h, {
|
|
5214
|
+
animate: I,
|
|
4003
5215
|
currentScreen: d,
|
|
4004
5216
|
prevScreen: n,
|
|
4005
5217
|
onStart: (e) => {
|
|
4006
5218
|
let t = !s && e;
|
|
4007
5219
|
j = t, p?.onSwipeEnd?.(t, {
|
|
4008
|
-
animate:
|
|
5220
|
+
animate: ne,
|
|
4009
5221
|
currentDecorator: f,
|
|
4010
5222
|
prevDecorator: r
|
|
4011
|
-
}),
|
|
5223
|
+
}), M("end", t, 0, re);
|
|
4012
5224
|
}
|
|
4013
|
-
});
|
|
4014
|
-
if (
|
|
4015
|
-
d?.setAttribute(
|
|
4016
|
-
for (let e of i.current)
|
|
4017
|
-
for (let e of i.prev)
|
|
5225
|
+
}), L = !s && ie;
|
|
5226
|
+
if (P(L, m ? 0 : N ?? 0), L) {
|
|
5227
|
+
d?.setAttribute(It, "true"), f?.setAttribute(It, "true");
|
|
5228
|
+
for (let e of i.current) Ss(e, t);
|
|
5229
|
+
for (let e of i.prev) Z(e, void 0, t), Ss(e, t);
|
|
4018
5230
|
i = {
|
|
4019
5231
|
current: [],
|
|
4020
5232
|
prev: []
|
|
4021
5233
|
}, a = {
|
|
4022
5234
|
current: [],
|
|
4023
5235
|
prev: []
|
|
4024
|
-
}, e.back();
|
|
4025
|
-
} else d &&
|
|
4026
|
-
},
|
|
4027
|
-
t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || ((c || l !== null) &&
|
|
5236
|
+
}, e.back(), k();
|
|
5237
|
+
} else d && Z(d, void 0, t), n && Z(n, void 0, t), f && Z(f), r && Z(r), A(), k(), ee(), e.setDragStatus("IDLE");
|
|
5238
|
+
}, ue = (t) => {
|
|
5239
|
+
t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || ((c || l !== null) && me(), e.isReadyForDrag() && (l = t.pointerId, d = !1, o = !0, s = !1, _ = pc(t.target, {
|
|
4028
5240
|
direction: "x",
|
|
4029
5241
|
verifyByScroll: !0
|
|
4030
|
-
}), v =
|
|
5242
|
+
}), v = pc(t.target, {
|
|
4031
5243
|
direction: "y",
|
|
4032
5244
|
verifyByScroll: !0
|
|
4033
5245
|
}), y = t.clientX, b = t.clientY));
|
|
4034
|
-
},
|
|
5246
|
+
}, z = (t) => {
|
|
4035
5247
|
if (t.pointerId !== l || e.getViewportScrollHeight() > 10) return;
|
|
4036
5248
|
if (c) {
|
|
4037
|
-
w(t),
|
|
5249
|
+
w(t), se(t);
|
|
4038
5250
|
return;
|
|
4039
5251
|
}
|
|
4040
5252
|
if (!o) return;
|
|
@@ -4048,21 +5260,23 @@ function eo(e) {
|
|
|
4048
5260
|
return;
|
|
4049
5261
|
}
|
|
4050
5262
|
let r = !_.element && !v.element, i = t.clientX - y, a = t.clientY - b, u = n === "x" ? i : a, d = n === "x" ? a : i;
|
|
4051
|
-
if (!(Math.max(Math.abs(u), Math.abs(d)) < 8) && (o = !1, !(u <= 0 || Math.abs(u) <= Math.abs(d) * 3)))
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
5263
|
+
if (!(Math.max(Math.abs(u), Math.abs(d)) < 8) && (o = !1, !(u <= 0 || Math.abs(u) <= Math.abs(d) * 3))) {
|
|
5264
|
+
if (r) s = !0, te(t);
|
|
5265
|
+
else {
|
|
5266
|
+
let e = v.element && v.element.scrollTop <= 0, r = _.element && _.element.scrollLeft <= 0 && _.hasMarker;
|
|
5267
|
+
(n === "y" && (e || _.element) || n === "x" && (r || v.element)) && (s = !0, te(t));
|
|
5268
|
+
}
|
|
4055
5269
|
}
|
|
4056
|
-
},
|
|
4057
|
-
e.pointerId === l && (o = !1, s = !1, l = null, c &&
|
|
4058
|
-
},
|
|
4059
|
-
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c &&
|
|
4060
|
-
},
|
|
4061
|
-
t.pointerId !== l || !c || t.target === e.getElements().scope &&
|
|
5270
|
+
}, de = (e) => {
|
|
5271
|
+
e.pointerId === l && (o = !1, s = !1, l = null, c && le(e));
|
|
5272
|
+
}, fe = (e) => {
|
|
5273
|
+
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c && le(e, !0));
|
|
5274
|
+
}, pe = (t) => {
|
|
5275
|
+
t.pointerId !== l || !c || t.target === e.getElements().scope && fe(t);
|
|
4062
5276
|
};
|
|
4063
|
-
function
|
|
5277
|
+
function me() {
|
|
4064
5278
|
let e = l;
|
|
4065
|
-
o = !1, s = !1, e !== null && (
|
|
5279
|
+
o = !1, s = !1, e !== null && (fe({
|
|
4066
5280
|
pointerId: e,
|
|
4067
5281
|
clientX: p.x,
|
|
4068
5282
|
clientY: p.y,
|
|
@@ -4070,42 +5284,42 @@ function eo(e) {
|
|
|
4070
5284
|
}), l = null);
|
|
4071
5285
|
}
|
|
4072
5286
|
return {
|
|
4073
|
-
pointerDown:
|
|
4074
|
-
pointerMove:
|
|
4075
|
-
pointerUp:
|
|
4076
|
-
pointerCancel:
|
|
4077
|
-
lostPointerCapture:
|
|
4078
|
-
abandon:
|
|
5287
|
+
pointerDown: ue,
|
|
5288
|
+
pointerMove: z,
|
|
5289
|
+
pointerUp: de,
|
|
5290
|
+
pointerCancel: fe,
|
|
5291
|
+
lostPointerCapture: pe,
|
|
5292
|
+
abandon: me,
|
|
4079
5293
|
shouldPreventTouch: () => s
|
|
4080
5294
|
};
|
|
4081
5295
|
}
|
|
4082
5296
|
//#endregion
|
|
4083
5297
|
//#region src/screen/pendingNetwork.ts
|
|
4084
|
-
var
|
|
4085
|
-
|
|
4086
|
-
},
|
|
4087
|
-
if (!(
|
|
4088
|
-
if (
|
|
5298
|
+
var bc = 0, xc = !1, Sc = () => {
|
|
5299
|
+
bc = Math.max(0, bc - 1);
|
|
5300
|
+
}, Cc = () => {
|
|
5301
|
+
if (!(xc || typeof window > "u")) {
|
|
5302
|
+
if (xc = !0, typeof window.fetch == "function") {
|
|
4089
5303
|
let e = window.fetch.bind(window);
|
|
4090
5304
|
window.fetch = (...t) => {
|
|
4091
|
-
|
|
5305
|
+
bc += 1;
|
|
4092
5306
|
let n;
|
|
4093
5307
|
try {
|
|
4094
5308
|
n = e(...t);
|
|
4095
5309
|
} catch (e) {
|
|
4096
|
-
throw
|
|
5310
|
+
throw Sc(), e;
|
|
4097
5311
|
}
|
|
4098
|
-
return n.then((e) => (
|
|
4099
|
-
throw
|
|
5312
|
+
return n.then((e) => (Sc(), e), (e) => {
|
|
5313
|
+
throw Sc(), e;
|
|
4100
5314
|
});
|
|
4101
5315
|
};
|
|
4102
5316
|
}
|
|
4103
5317
|
if (typeof XMLHttpRequest == "function") {
|
|
4104
5318
|
let e = XMLHttpRequest.prototype.send;
|
|
4105
5319
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
4106
|
-
|
|
5320
|
+
bc += 1;
|
|
4107
5321
|
let n = !1, r = () => {
|
|
4108
|
-
n || (n = !0,
|
|
5322
|
+
n || (n = !0, Sc());
|
|
4109
5323
|
};
|
|
4110
5324
|
this.addEventListener("loadend", r);
|
|
4111
5325
|
try {
|
|
@@ -4116,28 +5330,28 @@ var to = 0, no = !1, ro = () => {
|
|
|
4116
5330
|
};
|
|
4117
5331
|
}
|
|
4118
5332
|
}
|
|
4119
|
-
},
|
|
5333
|
+
}, wc = () => (Cc(), bc > 0);
|
|
4120
5334
|
//#endregion
|
|
4121
5335
|
//#region src/screen/animStartAnchor.ts
|
|
4122
|
-
function
|
|
5336
|
+
function Tc(e) {
|
|
4123
5337
|
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
4124
5338
|
}
|
|
4125
|
-
var
|
|
4126
|
-
function
|
|
4127
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
5339
|
+
var Ec = 300, Dc = 20;
|
|
5340
|
+
function Oc(e) {
|
|
5341
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, Dc);
|
|
4128
5342
|
}
|
|
4129
|
-
function
|
|
4130
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
5343
|
+
function kc(e) {
|
|
5344
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of Oc(e)) t.decode().catch(() => {});
|
|
4131
5345
|
}
|
|
4132
|
-
var
|
|
5346
|
+
var Ac = 3, jc = 40, Mc = (e) => {
|
|
4133
5347
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
4134
5348
|
let t = Math.max(1, e.querySelectorAll("*").length);
|
|
4135
5349
|
/* v8 ignore stop */
|
|
4136
|
-
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length *
|
|
4137
|
-
},
|
|
5350
|
+
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * jc) / t < Ac;
|
|
5351
|
+
}, Nc = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
4138
5352
|
let t = e.animationName;
|
|
4139
5353
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
4140
|
-
}),
|
|
5354
|
+
}), Pc = (e) => {
|
|
4141
5355
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
4142
5356
|
which already requires querySelectorAll. */
|
|
4143
5357
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -4145,12 +5359,12 @@ var fo = 3, po = 40, mo = (e) => {
|
|
|
4145
5359
|
the guard shields exotic embedders. */
|
|
4146
5360
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
4147
5361
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
4148
|
-
if (r >=
|
|
5362
|
+
if (r >= Dc) break;
|
|
4149
5363
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
4150
5364
|
}
|
|
4151
5365
|
return !1;
|
|
4152
5366
|
};
|
|
4153
|
-
function
|
|
5367
|
+
function Fc(e, t = {}) {
|
|
4154
5368
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
4155
5369
|
if (n) return;
|
|
4156
5370
|
let r = t.scope;
|
|
@@ -4158,7 +5372,7 @@ function _o(e, t = {}) {
|
|
|
4158
5372
|
e();
|
|
4159
5373
|
return;
|
|
4160
5374
|
}
|
|
4161
|
-
let i =
|
|
5375
|
+
let i = Oc(r);
|
|
4162
5376
|
if (i.length === 0) {
|
|
4163
5377
|
e();
|
|
4164
5378
|
return;
|
|
@@ -4176,15 +5390,15 @@ function _o(e, t = {}) {
|
|
|
4176
5390
|
return;
|
|
4177
5391
|
}
|
|
4178
5392
|
let i = () => !n.renderSettleOnly && (f() || d());
|
|
4179
|
-
if (!n.renderSettleOnly && !
|
|
5393
|
+
if (!n.renderSettleOnly && !Mc(r)) {
|
|
4180
5394
|
e();
|
|
4181
5395
|
return;
|
|
4182
5396
|
}
|
|
4183
5397
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
4184
5398
|
the fallback only shields exotic embedders. */
|
|
4185
|
-
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () =>
|
|
5399
|
+
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () => Mc(r) && Nc(r), f = () => wc() || Pc(r), p = () => {
|
|
4186
5400
|
u || (u = !0, v.disconnect(), clearTimeout(y), clearTimeout(b), clearTimeout(x), c.forEach((e) => cancelAnimationFrame(e)), c = [], e());
|
|
4187
|
-
}, m = () => n.renderSettleOnly ? 6 : !
|
|
5401
|
+
}, m = () => n.renderSettleOnly ? 6 : !Mc(r) && !i() ? 2 : 6, h = !1, g = () => {
|
|
4188
5402
|
if (!n.renderSettleOnly) {
|
|
4189
5403
|
p();
|
|
4190
5404
|
return;
|
|
@@ -4263,14 +5477,14 @@ function _o(e, t = {}) {
|
|
|
4263
5477
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
4264
5478
|
};
|
|
4265
5479
|
}
|
|
4266
|
-
function
|
|
4267
|
-
let n =
|
|
5480
|
+
function Ic(e, t = {}) {
|
|
5481
|
+
let n = Fc(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
4268
5482
|
return () => {
|
|
4269
5483
|
n(), clearTimeout(i);
|
|
4270
5484
|
};
|
|
4271
5485
|
}
|
|
4272
|
-
var
|
|
4273
|
-
function
|
|
5486
|
+
var Lc = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
5487
|
+
function Rc() {
|
|
4274
5488
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
4275
5489
|
clearTimeout(n.backstop), e.delete(t);
|
|
4276
5490
|
let r = [...n.members];
|
|
@@ -4280,14 +5494,14 @@ function bo() {
|
|
|
4280
5494
|
return { join: (r, i, a) => {
|
|
4281
5495
|
let o = e.get(r);
|
|
4282
5496
|
if (o) {
|
|
4283
|
-
let e =
|
|
5497
|
+
let e = Lc(a);
|
|
4284
5498
|
if (e > o.backstopMs) {
|
|
4285
5499
|
clearTimeout(o.backstop);
|
|
4286
5500
|
let n = o;
|
|
4287
5501
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
4288
5502
|
}
|
|
4289
5503
|
} else {
|
|
4290
|
-
let n =
|
|
5504
|
+
let n = Lc(a), i = {
|
|
4291
5505
|
members: /* @__PURE__ */ new Set(),
|
|
4292
5506
|
backstop: setTimeout(() => t(r, i), n),
|
|
4293
5507
|
backstopMs: n
|
|
@@ -4297,7 +5511,7 @@ function bo() {
|
|
|
4297
5511
|
let s = o, c = {
|
|
4298
5512
|
release: i,
|
|
4299
5513
|
ready: !1,
|
|
4300
|
-
cancelReadiness:
|
|
5514
|
+
cancelReadiness: Fc(() => {
|
|
4301
5515
|
c.ready = !0, n(s) && t(r, s);
|
|
4302
5516
|
}, a)
|
|
4303
5517
|
};
|
|
@@ -4314,7 +5528,7 @@ function bo() {
|
|
|
4314
5528
|
}
|
|
4315
5529
|
//#endregion
|
|
4316
5530
|
//#region src/screen/observeBarHeight.ts
|
|
4317
|
-
function
|
|
5531
|
+
function zc(e, t) {
|
|
4318
5532
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
4319
5533
|
let n = new ResizeObserver(([e]) => {
|
|
4320
5534
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -4325,24 +5539,24 @@ function xo(e, t) {
|
|
|
4325
5539
|
}
|
|
4326
5540
|
//#endregion
|
|
4327
5541
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
4328
|
-
var
|
|
5542
|
+
var Bc = 0, Vc = 0, Hc = 0, Uc = !1, Wc = /* @__PURE__ */ new Set(), Gc = 0, Kc = () => {
|
|
4329
5543
|
let e = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
4330
5544
|
e = e < 0 ? 0 : e;
|
|
4331
|
-
let t = e -
|
|
4332
|
-
t = t < 0 ? 0 : t,
|
|
4333
|
-
for (let n of [...
|
|
4334
|
-
},
|
|
4335
|
-
cancelAnimationFrame(
|
|
5545
|
+
let t = e - Bc;
|
|
5546
|
+
t = t < 0 ? 0 : t, Bc ||= e, Vc = e, Hc = t, Uc = !0;
|
|
5547
|
+
for (let n of [...Wc]) n(e, t);
|
|
5548
|
+
}, qc = () => {
|
|
5549
|
+
cancelAnimationFrame(Gc), Gc = requestAnimationFrame(Kc);
|
|
4336
5550
|
};
|
|
4337
|
-
function
|
|
4338
|
-
let t =
|
|
4339
|
-
return
|
|
4340
|
-
|
|
5551
|
+
function Jc(e) {
|
|
5552
|
+
let t = Wc.size === 0;
|
|
5553
|
+
return Wc.add(e), t && (window.visualViewport?.addEventListener("resize", qc), window.visualViewport?.addEventListener("scroll", qc)), Uc && (e(Vc, Hc), t && qc()), () => {
|
|
5554
|
+
Wc.delete(e), !(Wc.size > 0) && (cancelAnimationFrame(Gc), window.visualViewport?.removeEventListener("resize", qc), window.visualViewport?.removeEventListener("scroll", qc));
|
|
4341
5555
|
};
|
|
4342
5556
|
}
|
|
4343
5557
|
//#endregion
|
|
4344
5558
|
//#region src/utils/isOpaqueColor.ts
|
|
4345
|
-
function
|
|
5559
|
+
function Yc(e) {
|
|
4346
5560
|
let t = e.trim().toLowerCase();
|
|
4347
5561
|
if (t === "transparent" || t === "") return !1;
|
|
4348
5562
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -4353,7 +5567,7 @@ function jo(e) {
|
|
|
4353
5567
|
}
|
|
4354
5568
|
//#endregion
|
|
4355
5569
|
//#region src/utils/buildRoutePath.ts
|
|
4356
|
-
function
|
|
5570
|
+
function Xc(e, n) {
|
|
4357
5571
|
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();
|
|
4358
5572
|
return {
|
|
4359
5573
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -4361,4 +5575,4 @@ function Mo(e, n) {
|
|
|
4361
5575
|
};
|
|
4362
5576
|
}
|
|
4363
5577
|
//#endregion
|
|
4364
|
-
export {
|
|
5578
|
+
export { Nt as ACTIVE_ATTR, an as ANIM_HOLD, H as ANIM_HOLD_ATTR, on as ANIM_HOLD_PAUSED_VALUES, Ec as ANIM_HOLD_RELEASE_BACKSTOP_MS, Rt as BAR_ACTIVE_ATTR, Lt as BAR_ATTR, Vt as BAR_ID_ATTR, Ht as BAR_ID_TYPE_ATTR, Bt as BAR_RIDING_ATTR, Wt as BAR_SPACER_ATTR, zt as BAR_STATUS_ATTR, Ut as BAR_TRANSITION_ATTR, un as CREEP_ATTR, Gt as DECORATOR_ATTR, Kt as DECORATOR_NAME_ATTR, Ot as DEFAULT_MORPH_TRANSITION_NAME, dn as DESK_HEAD_ATTR, hn as DEVTOOLS_PANEL_ATTR, rc as DIAGNOSTIC_FLAGS, gn as FLEMO_ATTRIBUTES, At as FLEMO_ATTR_PREFIX, ln as GOVERNED_ATTR, mn as GPU_PREWARM_ATTR, sn as HELD_ARRIVAL_ATTR, cn as IMAGE_HOLD_ATTR, qt as LAYER_HOST_ATTR, Yt as LAYER_OWNER_ATTR, Jt as LAYER_SLOT_ATTR, ac as MIN_SETTLE_SECONDS, V as MORPH_ATTR, Qt as MORPH_LAYER_ATTR, Zt as MORPH_NAME_ATTR, Xt as MORPH_ROLE, rn as MORPH_SHEET_ATTR, $t as MORPH_SLOT_ATTR, U as OFFLOADED_SRC_ATTR, tc as OVERLAY_LEVEL, Ma as OVERSIZE_AREA_RATIO, B as PART_NAME_ATTR, ic as RETIRED_DIAGNOSTIC_FLAGS, Ft as ROUTER_ATTR, jt as SCREEN_ATTR, nc as SCREEN_STACKING_ORDER, It as SKIP_ANIMATION_ATTR, Mt as STATUS_ATTR, M as TRANSITIONAL_STATUS_VALUES, Pt as TRANSITION_ATTR, s as TaskManager, s as TaskManger, ec as UNNUMBERED_LEVEL, fn as WARM_ATTR, pn as WARM_VIDEO_ATTR, Tc as animHoldKey, xa as animateInline, Cr as animationName, ne as appendParamsQuery, oa as applyTransitionStyles, qi as attachMorph, W as attrSelector, G as attrValueSelector, ia as beginMorphSwipe, Xc as buildRoutePath, gc as canProgrammaticallyScroll, Z as clearInlineAnimation, hr as collectAnimatedProperties, kr as compileTransitionStyles, vc as computeBarRiding, Ye as computeScreenFreeze, Je as computeScreenFreezeMode, b as consumeSelfInducedPop, Rc as createAnimHoldCoordinator, g as createBrowserHistoryDriver, dt as createDecorator, c as createHistoryStore, x as createHistorySync, Ga as createImageDecodeOffloader, j as createMemoryHistoryDriver, yt as createMorphTransition, ee as createNavigateStore, F as createNavigationController, gt as createPartTransition, ft as createRawDecorator, bt as createRawMorphTransition, _t as createRawPartTransition, Ze as createRawTransition, le as createRouterScope, ue as createScreenSelector, R as createScreenStore, _ as createSelfPopGuard, re as createStepController, yc as createSwipeController, Xe as createTransition, js as createTransitionEngine, L as createTransitionStore, nt as cupertino, ht as decoratorMap, z as detectBlinkEngine, kc as eagerlyDecodeImages, _r as easingToCss, Us as ensureGpuPipelinePrewarm, qa as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, ma as enteringInitialStyle, pc as findScrollable, l as getMatchedPathPattern, u as getParams, he as governedCompiledActive, oo as holdCompositorWarm, me as isDesktopBlink, fe as isLegacyAndroidBlink, Yc as isOpaqueColor, f as isServer, ot as layout, y as markSelfInducedPop, ae as matchesPathname, st as material, Dt as morphTransitionMap, ct as none, zc as observeBarHeight, Jc as observeViewportScrollHeight, hc as overflowsAxis, mt as overlay, vt as partTransitionMap, I as readStepParams, Hr as registerMorphLayer, pa as registerTransitionDefinitions, A as releaseScopeHistorySync, Ws as resolvePlatformProfile, ut as resolveTransition, Gs as restLayerPromotionEnabled, Ic as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, St as shared, _c as sharedBarsMatch, Ba as shouldOffloadImage, $s as startFlemoRuntime, ke as steadySixtyDesktopProfile, ie as subscribeStepParamsRestore, uc as swipeSettleSeconds, gr as targetToDecls, wt as textMorph, lt as transitionMap, Mr as variantHasAnimation, Et as zoomMorph };
|