@cntrl-site/components 1.0.104 → 1.0.105
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/Components/utils/observeIntersection.d.ts +4 -0
- package/dist/Components/utils/useLazyVideos.d.ts +0 -3
- package/dist/{Grid-Bq6bk2AQ.js → Grid-BBpdl60K.js} +1 -1
- package/dist/{Grid-B2_o1dvz.mjs → Grid-DS53S_gA.mjs} +2 -2
- package/dist/{Helix-BrKQzGX5.mjs → Helix-BPn9V1sg.mjs} +1 -1
- package/dist/{Helix-B7rxlvKq.js → Helix-DcgsCc4D.js} +1 -1
- package/dist/{Hive-BusARSOi.mjs → Hive-D6-R6TwM.mjs} +2 -2
- package/dist/{Hive-Dh5nKPGm.js → Hive-n8Fz-j3o.js} +1 -1
- package/dist/{LazyVideo-D8eVYFyw.mjs → LazyVideo-CdAWymKO.mjs} +1 -1
- package/dist/{LazyVideo-Cn_vmMq8.js → LazyVideo-imbU18js.js} +1 -1
- package/dist/Marquee-DOIRRCu4.js +133 -0
- package/dist/{Marquee-CdtAqhQE.mjs → Marquee-O_PDwlIb.mjs} +55 -54
- package/dist/MarqueeText-DkaO2lQ5.js +132 -0
- package/dist/MarqueeText-Rzt2fJYt.mjs +517 -0
- package/dist/{Mercury-BRqlbk4i.mjs → Mercury-C9D10TTT.mjs} +1 -1
- package/dist/{Mercury-C-O2VGkK.js → Mercury-DynO-NxY.js} +1 -1
- package/dist/{PretextComponent-D5P0AjnL.js → PretextComponent-BnsS2zJ6.js} +1 -1
- package/dist/{PretextComponent-s4DDfmzY.mjs → PretextComponent-j-OsRZTx.mjs} +7 -7
- package/dist/{Waterfall-fdiHR0Rc.js → Waterfall-DC2WQ3GT.js} +1 -1
- package/dist/{Waterfall-DKuh4bnv.mjs → Waterfall-Yud2VR62.mjs} +2 -2
- package/dist/{components-DzNixU7Q.js → components-B9Vdjf0w.js} +1 -1
- package/dist/{components-Yf9Zjska.mjs → components-D2LyuDm-.mjs} +1 -1
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +7 -7
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -2
- package/dist/observeIntersection-B0f3L2iK.mjs +23 -0
- package/dist/observeIntersection-DxGj9Ctt.js +1 -0
- package/dist/sources.js +24 -12
- package/dist/sources.mjs +28 -16
- package/dist/useLazyVideos-CdCbc2j0.js +1 -0
- package/dist/useLazyVideos-CxXyEjRQ.mjs +52 -0
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +1 -1
- package/dist/Marquee-DUN8wUax.js +0 -133
- package/dist/MarqueeText-4Rip_sQX.mjs +0 -515
- package/dist/MarqueeText-E6OubMOG.js +0 -132
- package/dist/useLazyVideos-BbgdvELi.js +0 -1
- package/dist/useLazyVideos-CZLyNolX.mjs +0 -72
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
export declare const NEAR_VIEWPORT_MARGIN = "100% 0px";
|
|
2
1
|
type VideoPreload = 'none' | 'metadata' | 'auto';
|
|
3
|
-
type IntersectionListener = (isIntersecting: boolean) => void;
|
|
4
|
-
export declare function observeIntersection(element: Element, rootMargin: string, listener: IntersectionListener): () => void;
|
|
5
2
|
export declare function raisePreload(video: HTMLVideoElement, preload: VideoPreload): void;
|
|
6
3
|
export declare function playVideo(video: HTMLVideoElement): void;
|
|
7
4
|
export declare function pauseVideo(video: HTMLVideoElement): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),Nt=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const p=require("./scalingValue-CSHYgTZl.js"),Yt=require("./buildColorVars-CE2D5cQV.js"),Ut=require("./useScopedStyles-Bf6yohVQ.js"),Vt=require("./useLazyVideos-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),Nt=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const p=require("./scalingValue-CSHYgTZl.js"),Yt=require("./buildColorVars-CE2D5cQV.js"),Ut=require("./useScopedStyles-Bf6yohVQ.js"),Vt=require("./useLazyVideos-CdCbc2j0.js"),r=require("react"),Kt=require("react-dom"),Te=require("./textStylesToCss-CNN3zZTV.js"),Zt=require("./SvgImage-DFlmxAoL.js"),Mt=require("./LazyVideo-imbU18js.js");function Jt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rt(e){return((e==null?void 0:e.trim().length)??0)>0}function yt(e,n,i,a){return n!==void 0&&n<(e??.01)?`${i} ${a}`:i}function xt(e,n,i,a){const o=e??.01;return n===void 0||n>=o?{}:{[`--${i}-title-leading-gap`]:p.scalingValue((o-n)/2,a)}}function Qt(e){return`
|
|
2
2
|
.${e}-wrapper {
|
|
3
3
|
display: grid;
|
|
4
4
|
align-items: start;
|
|
@@ -4,12 +4,12 @@ import { S as ei, a as ti } from "./react-splide.esm-DQqds4PL.mjs";
|
|
|
4
4
|
import { s as m } from "./scalingValue-C9JH5L6O.mjs";
|
|
5
5
|
import { b as ii } from "./buildColorVars-CLyWQm5K.mjs";
|
|
6
6
|
import { u as ni } from "./useScopedStyles-DhBG3557.mjs";
|
|
7
|
-
import { u as Bt } from "./useLazyVideos-
|
|
7
|
+
import { u as Bt } from "./useLazyVideos-CxXyEjRQ.mjs";
|
|
8
8
|
import { useMemo as Rt, useState as k, useRef as $, useEffect as B, useCallback as ce, useLayoutEffect as Dt } from "react";
|
|
9
9
|
import { createPortal as ri } from "react-dom";
|
|
10
10
|
import { o as bt, t as St } from "./textStylesToCss-05Mn6I_2.mjs";
|
|
11
11
|
import { S as oi } from "./SvgImage-B5mR9y6q.mjs";
|
|
12
|
-
import { L as Gt } from "./LazyVideo-
|
|
12
|
+
import { L as Gt } from "./LazyVideo-CdAWymKO.mjs";
|
|
13
13
|
function li(e) {
|
|
14
14
|
return `calc(var(--cntrl-article-width, 100vw) * ${e / 1440})`;
|
|
15
15
|
}
|
|
@@ -2,7 +2,7 @@ import { jsxs as ce, Fragment as ie, jsx as h } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as V, useMemo as y, useEffect as Ee } from "react";
|
|
3
3
|
import { s as ae } from "./scalingValue-C9JH5L6O.mjs";
|
|
4
4
|
import { u as xe } from "./useScopedStyles-DhBG3557.mjs";
|
|
5
|
-
import { L as Re } from "./LazyVideo-
|
|
5
|
+
import { L as Re } from "./LazyVideo-CdAWymKO.mjs";
|
|
6
6
|
const Te = 10, _e = 400, Se = 1, Fe = 1120 / 1440, Ae = 140 / 1440, we = 550 / 1440, Ne = 13, De = 4, $e = 38 / 100, Ce = 28 / 100, de = 2.8, Le = 0.9, fe = 0.22, He = 0.5, Pe = 1, Ue = 1.5, ge = 0, ze = 0.85;
|
|
7
7
|
function We(e) {
|
|
8
8
|
return `
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),f=require("react"),ne=require("./scalingValue-CSHYgTZl.js"),Me=require("./useScopedStyles-Bf6yohVQ.js"),xe=require("./LazyVideo-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),f=require("react"),ne=require("./scalingValue-CSHYgTZl.js"),Me=require("./useScopedStyles-Bf6yohVQ.js"),xe=require("./LazyVideo-imbU18js.js"),Ie=10,Oe=400,Re=1,Ee=1120/1440,Se=140/1440,Te=550/1440,_e=13,Fe=4,Ae=38/100,we=28/100,se=2.8,Ne=.9,le=.22,De=.5,$e=1,Ce=1.5,He=0,Le=.85;function Pe(e){return`
|
|
2
2
|
.${e}-wrapper {
|
|
3
3
|
position: relative;
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as kt, Fragment as be, jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { s as se } from "./scalingValue-C9JH5L6O.mjs";
|
|
3
3
|
import { u as un } from "./useScopedStyles-DhBG3557.mjs";
|
|
4
|
-
import { u as dn } from "./useLazyVideos-
|
|
5
|
-
import { L as fn } from "./LazyVideo-
|
|
4
|
+
import { u as dn } from "./useLazyVideos-CxXyEjRQ.mjs";
|
|
5
|
+
import { L as fn } from "./LazyVideo-CdAWymKO.mjs";
|
|
6
6
|
import { useRef as w, useState as $, useMemo as $e, useCallback as m, useEffect as G, useLayoutEffect as le } from "react";
|
|
7
7
|
import { createPortal as hn } from "react-dom";
|
|
8
8
|
import { H as gn } from "./HiveLightboxTitles-DhEeFKWs.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),ne=require("./scalingValue-CSHYgTZl.js"),nn=require("./useScopedStyles-Bf6yohVQ.js"),rn=require("./useLazyVideos-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),ne=require("./scalingValue-CSHYgTZl.js"),nn=require("./useScopedStyles-Bf6yohVQ.js"),rn=require("./useLazyVideos-CdCbc2j0.js"),on=require("./LazyVideo-imbU18js.js"),r=require("react"),sn=require("react-dom"),an=require("./HiveLightboxTitles-DlyptAaK.js"),ln=require("./getImageRect-BQhQXvT8.js");function cn(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function un(t){return`
|
|
2
2
|
.${t}-wrapper {
|
|
3
3
|
display: grid;
|
|
4
4
|
align-items: start;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as f, useState as n, useCallback as p } from "react";
|
|
3
|
-
import { u as l } from "./useLazyVideos-
|
|
3
|
+
import { u as l } from "./useLazyVideos-CxXyEjRQ.mjs";
|
|
4
4
|
const c = f(({ autoPlay: s = !1, nearPreload: a = "auto", ...t }, o) => {
|
|
5
5
|
const [i, r] = n(null);
|
|
6
6
|
l(i, { autoPlay: s, preload: a });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),o=require("react"),l=require("./useLazyVideos-
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),o=require("react"),l=require("./useLazyVideos-CdCbc2j0.js"),i=o.forwardRef(({autoPlay:t=!1,nearPreload:a="auto",...u},e)=>{const[d,n]=o.useState(null);l.useLazyVideos(d,{autoPlay:t,preload:a});const r=o.useCallback(s=>{n(s),typeof e=="function"?e(s):e&&(e.current=s)},[e]);return c.jsx("video",{...u,ref:r,preload:"none"})});i.displayName="LazyVideo";exports.LazyVideo=i;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),o=require("react"),P=require("classnames"),qe=require("./scalingValue-CSHYgTZl.js"),Ce=require("./useScopedStyles-Bf6yohVQ.js"),se=require("./observeIntersection-DxGj9Ctt.js"),Y=require("./useLazyVideos-CdCbc2j0.js");function Se(e,n){const r=n>0?`${n}px`:"0px";return`
|
|
2
|
+
.${e}-marquee-wrapper {
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: auto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@keyframes ${e}-marquee-left {
|
|
9
|
+
from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
|
|
10
|
+
to { -webkit-transform: translate3d(-${r}, 0, 0); transform: translate3d(-${r}, 0, 0); }
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@keyframes ${e}-marquee-right {
|
|
14
|
+
from { -webkit-transform: translate3d(-${r}, 0, 0); transform: translate3d(-${r}, 0, 0); }
|
|
15
|
+
to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.${e}-marquee-track {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
width: max-content;
|
|
22
|
+
will-change: transform;
|
|
23
|
+
backface-visibility: hidden;
|
|
24
|
+
-webkit-backface-visibility: hidden;
|
|
25
|
+
flex-wrap: nowrap;
|
|
26
|
+
-webkit-animation-timing-function: linear;
|
|
27
|
+
animation-timing-function: linear;
|
|
28
|
+
-webkit-animation-iteration-count: infinite;
|
|
29
|
+
animation-iteration-count: infinite;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.${e}-marquee-track[data-direction="left"] {
|
|
33
|
+
-webkit-animation-name: ${e}-marquee-left;
|
|
34
|
+
animation-name: ${e}-marquee-left;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.${e}-marquee-track[data-direction="right"] {
|
|
38
|
+
-webkit-animation-name: ${e}-marquee-right;
|
|
39
|
+
animation-name: ${e}-marquee-right;
|
|
40
|
+
}
|
|
41
|
+
.${e}-marquee-row {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: row;
|
|
44
|
+
align-items: flex-start;
|
|
45
|
+
}
|
|
46
|
+
.${e}-marquee-set {
|
|
47
|
+
flex: 0 0 auto;
|
|
48
|
+
}
|
|
49
|
+
.${e}-marquee-static {
|
|
50
|
+
justify-content: center;
|
|
51
|
+
overflow-x: auto;
|
|
52
|
+
}
|
|
53
|
+
.${e}-marquee-card {
|
|
54
|
+
position: relative;
|
|
55
|
+
flex: 0 0 auto;
|
|
56
|
+
align-self: flex-start;
|
|
57
|
+
}
|
|
58
|
+
.${e}-wrapper {
|
|
59
|
+
position: relative;
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
order: 1;
|
|
63
|
+
}
|
|
64
|
+
.${e}-cover {
|
|
65
|
+
position: absolute;
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
top: 0;
|
|
69
|
+
left: 0;
|
|
70
|
+
}
|
|
71
|
+
.${e}-elements-overlay {
|
|
72
|
+
position: relative;
|
|
73
|
+
inset: 0;
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
}
|
|
78
|
+
.${e}-control {
|
|
79
|
+
position: relative;
|
|
80
|
+
z-index: 2;
|
|
81
|
+
width: 100%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.${e}-marquee-link {
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
align-items: center;
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 100%;
|
|
91
|
+
text-decoration: none;
|
|
92
|
+
color: inherit;
|
|
93
|
+
}
|
|
94
|
+
.${e}-marquee-link-contain {
|
|
95
|
+
width: auto;
|
|
96
|
+
height: auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.${e}-control::before {
|
|
100
|
+
content: "";
|
|
101
|
+
position: absolute;
|
|
102
|
+
top: 0;
|
|
103
|
+
left: 0;
|
|
104
|
+
width: 100%;
|
|
105
|
+
height: 100%;
|
|
106
|
+
min-height: 20px;
|
|
107
|
+
pointer-events: auto;
|
|
108
|
+
z-index: 10;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.${e}-gap-control {
|
|
112
|
+
position: relative;
|
|
113
|
+
z-index: 2;
|
|
114
|
+
pointer-events: auto;
|
|
115
|
+
height: 100%;
|
|
116
|
+
}
|
|
117
|
+
.${e}-image-hover-brightness img,
|
|
118
|
+
.${e}-image-hover-brightness video {
|
|
119
|
+
transition: filter 0.3s ease;
|
|
120
|
+
}
|
|
121
|
+
.${e}-image-hover-brightness:hover img,
|
|
122
|
+
.${e}-image-hover-brightness:hover video {
|
|
123
|
+
filter: brightness(1.25);
|
|
124
|
+
}
|
|
125
|
+
.${e}-image-hover-grayscale img,
|
|
126
|
+
.${e}-image-hover-grayscale video {
|
|
127
|
+
transition: filter 0.3s ease;
|
|
128
|
+
}
|
|
129
|
+
.${e}-image-hover-grayscale:hover img,
|
|
130
|
+
.${e}-image-hover-grayscale:hover video {
|
|
131
|
+
filter: grayscale(100%);
|
|
132
|
+
}
|
|
133
|
+
`}const Ee=30,ke=20,ce=3,Ne=12,Me=32,Ae=3,_e=250,We=.5,Ie=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Ve=(e,n)=>Array.from({length:n},()=>e).flat(),je=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},ve=e=>e.reduce((n,r)=>n+(r.offsetWidth||r.getBoundingClientRect().width),0),ye=(e,n)=>{if(n<=0||e.children.length<n)return 0;const r=e.children[0],f=e.children[n-1];if(!r||!f)return 0;const p=getComputedStyle(e),d=Number.parseFloat(p.columnGap||p.gap||"0")||0,b=f.getBoundingClientRect().right-r.getBoundingClientRect().left;if(b>0)return b;const q=Array.from({length:n},(w,_)=>e.children[_]),m=ve(q);return m<=0?0:m+d*Math.max(0,n-1)},Te=e=>{const n=e.getBoundingClientRect().width;if(n>0)return n;const r=e.offsetWidth;if(r>0)return r;const f=ve(Array.from(e.children));if(f<=0)return 0;const p=getComputedStyle(e),d=Number.parseFloat(p.columnGap||p.gap||"0")||0,b=Number.parseFloat(p.paddingRight)||0;return f+d*Math.max(0,e.children.length-1)+b},Le=(e,n)=>{const r=n.getBoundingClientRect(),f=e.getBoundingClientRect();return f.right>r.left&&f.left<r.right},Oe=(e,n)=>{const r=e.querySelectorAll(`[data-marquee-item-index="${n}"]`);return Array.from(r).some(f=>Le(f,e))},He=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const n=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(n)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")},Be=e=>e?e instanceof HTMLVideoElement?e.readyState>=1:e.complete:!1,ze=({item:e,prefix:n,imageFit:r,imageMaxWidth:f,imageMaxHeight:p,cornerRadius:d,imageHoverClass:b,isFirstSet:q,scaled:m,onFirstSetImageDone:w})=>{var N,M,L,O;const _=o.useRef(null),U=!!((N=e.image)!=null&&N.assetId&&He(e.image));o.useLayoutEffect(()=>{q&&Be(_.current)&&(w==null||w())},[q,(M=e.image)==null?void 0:M.assetId,w]);const j=r.display==="cover",S=r.ratioValue??"1:1",F=r.reversed??!1,[G,C]=S.split(":").map(Number),X=(F?C:G)/(F?G:C),E=f/X,D=E>p?p:E,W=E>p?p*X:f,J=m(W),k=m(D),Z={borderRadius:m(d)},x=j?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...Z}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:m(f),maxHeight:m(p),objectFit:"contain",...Z},I=((L=e.image)==null?void 0:L.assetId)&&(U?v.jsx("video",{ref:V=>{_.current=V},src:e.image.assetId,style:x,muted:!0,loop:!0,playsInline:!0,preload:"none",onLoadedMetadata:q?w:void 0,onError:q?w:void 0}):v.jsx("img",{ref:V=>{_.current=V},src:e.image.assetId,alt:((O=e.image)==null?void 0:O.name)??"",style:x,onLoad:q?w:void 0,onError:q?w:void 0}));return v.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...j?{width:J}:{width:"max-content",maxWidth:m(f),minWidth:0}},children:v.jsx("div",{className:b,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...j?{width:J,height:k,overflow:"hidden",...Z}:{width:"max-content",maxWidth:m(f),height:m(p)}},children:I&&e.link?v.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:P(`${n}-marquee-link`,!j&&`${n}-marquee-link-contain`),children:I}):I})})},Ue=({settings:e,content:n,isEditor:r,isPreviewMode:f,isEditMode:p})=>{const{prefix:d}=Ce.useScopedStyles(),[b,q]=o.useState(0),m=b>0?Math.round(b):0,w=o.useMemo(()=>Se(d,m),[d,m]),{speed:_,direction:U,pauseOnHover:j,gap:S,imageMaxWidth:F,imageMaxHeight:G,hoverEffect:C,cornerRadius:le=0}=e,T=o.useMemo(()=>je(e.imageFit),[e.imageFit]),X=T.display!=="cover",E=(n==null?void 0:n.length)??0,D=!!p,W=!r||!!f,J=W&&C!=="off"&&C!=="randomize"?`${d}-image-hover-${C}`:void 0,k=r?!!f:!0,x=((n==null?void 0:n.length)??0)>0&&(k||!!r),I=Math.max(0,_)*Ee,N=t=>qe.scalingValue(t,r??!1),M=o.useRef(null),L=o.useRef(null),O=o.useRef(null),[V,ue]=o.useState(0),ee=k&&j==="on",[be,de]=o.useState(!1),[H,te]=o.useState({}),ne=o.useRef(H);ne.current=H;const re=o.useRef(null),ae=o.useRef(0),K=o.useRef(null),fe=o.useMemo(()=>(n??[]).map(t=>{var a;return((a=t.image)==null?void 0:a.assetId)??""}).join("\0"),[n]),[B,me]=o.useState(ce),oe=o.useMemo(()=>{const t=n??[];return t.length===0||!(k||!!r)?t:Ve(t,B)},[n,k,B,r]),he=o.useMemo(()=>(n??[]).filter(t=>{var a;return!!((a=t.image)!=null&&a.assetId)}).length,[n]),ge=x?Ae:1;o.useLayoutEffect(()=>{ae.current=0,te({}),re.current=null,me(ce),q(0)},[fe]),o.useEffect(()=>{if(!W||C!=="randomize")return;const t=M.current;if(!t)return;const a=c=>{te(l=>{const y=Array.from(c).filter(g=>g in l&&!Oe(t,g));if(y.length===0)return l;const h={...l};return y.forEach(g=>{delete h[g]}),h})},i=new IntersectionObserver(c=>{const l=new Set;for(const y of c){const h=y.target.dataset.marqueeItemIndex,g=h!==void 0?Number(h):NaN;Number.isNaN(g)||l.add(g)}l.size>0&&a(l)},{root:t,threshold:0});Object.keys(H).forEach(c=>{const l=Number(c);t.querySelectorAll(`[data-marquee-item-index="${l}"]`).forEach(y=>i.observe(y))});const u={current:0},s=()=>{const c=Object.keys(ne.current);c.length!==0&&(a(c.map(Number)),u.current=requestAnimationFrame(s))};return Object.keys(ne.current).length>0&&(u.current=requestAnimationFrame(s)),()=>{cancelAnimationFrame(u.current),i.disconnect()}},[C,H,W]),o.useEffect(()=>{const t=M.current;if(!t||typeof IntersectionObserver>"u")return;let a=!1,i=!1,u;const s=()=>{const h=t.querySelectorAll("video");if(!a){h.forEach(Y.pauseVideo);return}const g=t.getBoundingClientRect(),A=g.width*We;h.forEach($=>{const Q=$.getBoundingClientRect(),z=Q.right>g.left&&Q.left<g.right;Q.right>g.left-A&&Q.left<g.right+A?Y.raisePreload($,"auto"):X&&Y.raisePreload($,"metadata"),i&&z?$.paused&&Y.playVideo($):Y.pauseVideo($)})},c=()=>{a&&u===void 0?u=setInterval(s,_e):!a&&u!==void 0&&(clearInterval(u),u=void 0),s()},l=se.observeIntersection(t,se.NEAR_VIEWPORT_MARGIN,h=>{a=h,c()}),y=se.observeIntersection(t,"0px",h=>{i=h,c()});return()=>{l(),y(),clearInterval(u)}},[x,X]),o.useLayoutEffect(()=>{if(!x)return;const t=M.current,a=O.current;if(!t||!a)return;const i={current:0},u=()=>{const l=t.getBoundingClientRect().width||t.offsetWidth,y=Te(a),h=re.current,g=typeof h=="number"&&Math.abs(h-y)<=.25;re.current=y;let A=B,$=0;if((k||r)&&E>0&&l>0){const R=ye(a,E);if(R>=Me){$=R;const ie=Math.min(Ne,Math.max(ce,Math.ceil(l/R)+1));A=ie,ie!==B&&me(ie)}}const z=A!==B&&$>0?$*A:y>0?y:$>0?$*A:(()=>{const R=ye(a,E);return R>0?R*A:0})();z>0?q(R=>R<=0?z:!g||Math.round(R)===Math.round(z)?R:z):!g&&b<=0&&(cancelAnimationFrame(i.current),i.current=requestAnimationFrame(u))},s=()=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame(u)};K.current=s,s();const c=new ResizeObserver(s);return c.observe(t),c.observe(a),()=>{K.current=null,cancelAnimationFrame(i.current),c.disconnect()}},[k,x,b,fe,B,E,r]),o.useLayoutEffect(()=>{if(!x||m<=0)return;const t=L.current;t&&Ie(t)},[x,m,U,I]),o.useLayoutEffect(()=>{if(!x||b<=0){ue(0);return}const t=L.current,a=O.current;if(!t||!a)return;const i=()=>{const s=t.offsetHeight||t.getBoundingClientRect().height,c=Array.from(a.children).reduce((y,h)=>Math.max(y,h.offsetHeight||h.getBoundingClientRect().height),0),l=s>0?s:c;ue(l>0?l:0)};i();const u=new ResizeObserver(i);return u.observe(t),u.observe(a),()=>u.disconnect()},[x,ge,oe,r,S,F,G,b,T,H]),o.useLayoutEffect(()=>{if(!r||!D||!x||typeof window>"u")return;const t=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(t)},[r,D,x,U,b,V,S,oe]);const xe=()=>{ee&&de(!0)},we=()=>{ee&&de(!1)},$e=o.useCallback(()=>{var t;ae.current=Math.min(he,ae.current+1),(t=K.current)==null||t.call(K)},[he]),Re=o.useCallback((t,a)=>{te(i=>{const u=i[t]??a,s=(n??[]).filter(l=>l!==u);if(s.length===0)return i;const c=s[Math.floor(Math.random()*s.length)];return{...i,[t]:c}})},[n]),pe=(t,a,i,u)=>{const s=W&&C==="randomize"&&T.display==="cover"?H[i]??t:t,c=`max(${N(S)}, ${ke}px)`,l=`calc(-0.5 * (${c} + ${N(S)}))`;return v.jsxs("div",{className:`${d}-marquee-card`,"data-marquee-item-index":i,onMouseEnter:W&&C==="randomize"&&T.display==="cover"?()=>Re(i,t):void 0,children:[v.jsx(ze,{item:s,prefix:d,imageFit:T,imageMaxWidth:F,imageMaxHeight:G,cornerRadius:le,imageHoverClass:J,isEditor:r,isFirstSet:u,scaled:N,onFirstSetImageDone:$e}),D&&v.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${d}-gap-control`,style:{position:"absolute",top:0,right:l,width:c,height:"100%"}})]},`${a}-${i}`)};if(x){const t=k?ee&&be?"paused":"running":"paused",a=m>0&&I>0?m/I*1e3:0,i=`${Math.max(0,a)/1e3}s`;return v.jsxs("div",{ref:M,className:P(`${d}-wrapper`,`${d}-marquee-wrapper`),"aria-label":"Marquee",style:V>0?{height:V}:void 0,children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:w}}),v.jsx("div",{ref:L,className:`${d}-marquee-track`,"data-direction":U,onMouseEnter:xe,onMouseLeave:we,style:{WebkitAnimationDuration:i,animationDuration:i,WebkitAnimationPlayState:t,animationPlayState:t},children:Array.from({length:ge},(u,s)=>v.jsx("div",{ref:s===0?O:void 0,className:P(`${d}-marquee-row`,`${d}-marquee-set`),style:{gap:N(S),paddingRight:N(S)},"aria-hidden":s>0,children:oe.map((c,l)=>pe(c,s,l,s===0&&l<E))},`set-${s}`))})]})}return v.jsxs("div",{ref:M,className:`${d}-wrapper`,children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:w}}),v.jsx("div",{className:P(`${d}-marquee-row`,`${d}-marquee-static`),style:{gap:N(S),transform:"none"},"aria-label":"Marquee",children:n==null?void 0:n.map((t,a)=>pe(t,0,a))},"marquee-static")]})};exports.Marquee=Ue;
|
|
@@ -3,9 +3,10 @@ import { useState as J, useMemo as Z, useRef as _, useLayoutEffect as U, useEffe
|
|
|
3
3
|
import te from "classnames";
|
|
4
4
|
import { s as _e } from "./scalingValue-C9JH5L6O.mjs";
|
|
5
5
|
import { u as We } from "./useScopedStyles-DhBG3557.mjs";
|
|
6
|
-
import { o as $e, N as Me
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { o as $e, N as Me } from "./observeIntersection-B0f3L2iK.mjs";
|
|
7
|
+
import { p as xe, r as Re, a as Ie } from "./useLazyVideos-CxXyEjRQ.mjs";
|
|
8
|
+
function Te(e, r) {
|
|
9
|
+
const n = r > 0 ? `${r}px` : "0px";
|
|
9
10
|
return `
|
|
10
11
|
.${e}-marquee-wrapper {
|
|
11
12
|
overflow: hidden;
|
|
@@ -15,11 +16,11 @@ function Te(e, n) {
|
|
|
15
16
|
|
|
16
17
|
@keyframes ${e}-marquee-left {
|
|
17
18
|
from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
|
|
18
|
-
to { -webkit-transform: translate3d(-${
|
|
19
|
+
to { -webkit-transform: translate3d(-${n}, 0, 0); transform: translate3d(-${n}, 0, 0); }
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
@keyframes ${e}-marquee-right {
|
|
22
|
-
from { -webkit-transform: translate3d(-${
|
|
23
|
+
from { -webkit-transform: translate3d(-${n}, 0, 0); transform: translate3d(-${n}, 0, 0); }
|
|
23
24
|
to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -142,7 +143,7 @@ function Te(e, n) {
|
|
|
142
143
|
}
|
|
143
144
|
const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue = (e) => {
|
|
144
145
|
e.style.setProperty("animation-name", "none"), e.style.setProperty("-webkit-animation-name", "none"), e.offsetHeight, e.style.removeProperty("animation-name"), e.style.removeProperty("-webkit-animation-name");
|
|
145
|
-
}, Fe = (e,
|
|
146
|
+
}, Fe = (e, r) => Array.from({ length: r }, () => e).flat(), Ge = (e) => typeof e == "string" ? {
|
|
146
147
|
display: e.toLowerCase() === "cover" ? "cover" : "fit",
|
|
147
148
|
ratioValue: "16:9",
|
|
148
149
|
reversed: !1
|
|
@@ -151,40 +152,40 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
151
152
|
ratioValue: (e == null ? void 0 : e.ratioValue) ?? "16:9",
|
|
152
153
|
reversed: (e == null ? void 0 : e.reversed) ?? !1
|
|
153
154
|
}, qe = (e) => e.reduce(
|
|
154
|
-
(
|
|
155
|
+
(r, n) => r + (n.offsetWidth || n.getBoundingClientRect().width),
|
|
155
156
|
0
|
|
156
|
-
), Ce = (e,
|
|
157
|
-
if (
|
|
158
|
-
const
|
|
159
|
-
if (!
|
|
160
|
-
const p = getComputedStyle(e), u = Number.parseFloat(p.columnGap || p.gap || "0") || 0, v = d.getBoundingClientRect().right -
|
|
157
|
+
), Ce = (e, r) => {
|
|
158
|
+
if (r <= 0 || e.children.length < r) return 0;
|
|
159
|
+
const n = e.children[0], d = e.children[r - 1];
|
|
160
|
+
if (!n || !d) return 0;
|
|
161
|
+
const p = getComputedStyle(e), u = Number.parseFloat(p.columnGap || p.gap || "0") || 0, v = d.getBoundingClientRect().right - n.getBoundingClientRect().left;
|
|
161
162
|
if (v > 0) return v;
|
|
162
|
-
const R = Array.from({ length:
|
|
163
|
-
return f <= 0 ? 0 : f + u * Math.max(0,
|
|
163
|
+
const R = Array.from({ length: r }, (b, W) => e.children[W]), f = qe(R);
|
|
164
|
+
return f <= 0 ? 0 : f + u * Math.max(0, r - 1);
|
|
164
165
|
}, Xe = (e) => {
|
|
165
|
-
const
|
|
166
|
-
if (n > 0) return n;
|
|
167
|
-
const r = e.offsetWidth;
|
|
166
|
+
const r = e.getBoundingClientRect().width;
|
|
168
167
|
if (r > 0) return r;
|
|
168
|
+
const n = e.offsetWidth;
|
|
169
|
+
if (n > 0) return n;
|
|
169
170
|
const d = qe(Array.from(e.children));
|
|
170
171
|
if (d <= 0) return 0;
|
|
171
172
|
const p = getComputedStyle(e), u = Number.parseFloat(p.columnGap || p.gap || "0") || 0, v = Number.parseFloat(p.paddingRight) || 0;
|
|
172
173
|
return d + u * Math.max(0, e.children.length - 1) + v;
|
|
173
|
-
}, De = (e,
|
|
174
|
-
const
|
|
175
|
-
return d.right >
|
|
176
|
-
}, Ke = (e,
|
|
177
|
-
const
|
|
178
|
-
return Array.from(
|
|
174
|
+
}, De = (e, r) => {
|
|
175
|
+
const n = r.getBoundingClientRect(), d = e.getBoundingClientRect();
|
|
176
|
+
return d.right > n.left && d.left < n.right;
|
|
177
|
+
}, Ke = (e, r) => {
|
|
178
|
+
const n = e.querySelectorAll(`[data-marquee-item-index="${r}"]`);
|
|
179
|
+
return Array.from(n).some((d) => De(d, e));
|
|
179
180
|
}, Qe = (e) => {
|
|
180
181
|
if (e.type === "video") return !0;
|
|
181
182
|
if (e.type === "image") return !1;
|
|
182
|
-
const
|
|
183
|
-
return /\.(mp4|webm|ogg|mov)(\?|$)/i.test(
|
|
183
|
+
const r = e.name ?? "";
|
|
184
|
+
return /\.(mp4|webm|ogg|mov)(\?|$)/i.test(r) ? !0 : /\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId ?? "");
|
|
184
185
|
}, Ye = (e) => e ? e instanceof HTMLVideoElement ? e.readyState >= 1 : e.complete : !1, Je = ({
|
|
185
186
|
item: e,
|
|
186
|
-
prefix:
|
|
187
|
-
imageFit:
|
|
187
|
+
prefix: r,
|
|
188
|
+
imageFit: n,
|
|
188
189
|
imageMaxWidth: d,
|
|
189
190
|
imageMaxHeight: p,
|
|
190
191
|
cornerRadius: u,
|
|
@@ -198,7 +199,7 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
198
199
|
U(() => {
|
|
199
200
|
R && Ye(W.current) && (b == null || b());
|
|
200
201
|
}, [R, (N = e.image) == null ? void 0 : N.assetId, b]);
|
|
201
|
-
const V =
|
|
202
|
+
const V = n.display === "cover", q = n.ratioValue ?? "1:1", G = n.reversed ?? !1, [X, C] = q.split(":").map(Number), D = (G ? C : X) / (G ? X : C), E = d / D, K = E > p ? p : E, M = E > p ? p * D : d, P = f(M), k = f(K), ee = {
|
|
202
203
|
borderRadius: f(u)
|
|
203
204
|
}, y = V ? {
|
|
204
205
|
pointerEvents: "auto",
|
|
@@ -274,12 +275,12 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
274
275
|
height: f(p)
|
|
275
276
|
}
|
|
276
277
|
},
|
|
277
|
-
children: I && e.link ? /* @__PURE__ */ x("a", { href: e.link, target: "_self", rel: "noopener noreferrer", className: te(`${
|
|
278
|
+
children: I && e.link ? /* @__PURE__ */ x("a", { href: e.link, target: "_self", rel: "noopener noreferrer", className: te(`${r}-marquee-link`, !V && `${r}-marquee-link-contain`), children: I }) : I
|
|
278
279
|
}
|
|
279
280
|
)
|
|
280
281
|
}
|
|
281
282
|
);
|
|
282
|
-
},
|
|
283
|
+
}, it = ({ settings: e, content: r, isEditor: n, isPreviewMode: d, isEditMode: p }) => {
|
|
283
284
|
const { prefix: u } = We(), [v, R] = J(0), f = v > 0 ? Math.round(v) : 0, b = Z(() => Te(u, f), [u, f]), {
|
|
284
285
|
speed: W,
|
|
285
286
|
direction: F,
|
|
@@ -289,29 +290,29 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
289
290
|
imageMaxHeight: X,
|
|
290
291
|
hoverEffect: C,
|
|
291
292
|
cornerRadius: de = 0
|
|
292
|
-
} = e, H = Z(() => Ge(e.imageFit), [e.imageFit]), D = H.display !== "cover", E = (
|
|
293
|
+
} = e, H = Z(() => Ge(e.imageFit), [e.imageFit]), D = H.display !== "cover", E = (r == null ? void 0 : r.length) ?? 0, K = !!p, M = !n || !!d, P = M && C !== "off" && C !== "randomize" ? `${u}-image-hover-${C}` : void 0, k = n ? !!d : !0, y = ((r == null ? void 0 : r.length) ?? 0) > 0 && (k || !!n), I = Math.max(0, W) * Ve, S = (t) => _e(t, n ?? !1), N = _(null), O = _(null), B = _(null), [T, fe] = J(0), re = k && V === "on", [Ee, me] = J(!1), [L, ne] = J({}), ae = _(L);
|
|
293
294
|
ae.current = L;
|
|
294
|
-
const ie = _(null), oe = _(0), Q = _(null), he = Z(() => (
|
|
295
|
+
const ie = _(null), oe = _(0), Q = _(null), he = Z(() => (r ?? []).map((t) => {
|
|
295
296
|
var a;
|
|
296
297
|
return ((a = t.image) == null ? void 0 : a.assetId) ?? "";
|
|
297
|
-
}).join("\0"), [
|
|
298
|
-
const t =
|
|
299
|
-
return t.length === 0 || !(k || !!
|
|
300
|
-
}, [
|
|
301
|
-
() => (
|
|
298
|
+
}).join("\0"), [r]), [z, pe] = J(ue), se = Z(() => {
|
|
299
|
+
const t = r ?? [];
|
|
300
|
+
return t.length === 0 || !(k || !!n) ? t : Fe(t, z);
|
|
301
|
+
}, [r, k, z, n]), ge = Z(
|
|
302
|
+
() => (r ?? []).filter((t) => {
|
|
302
303
|
var a;
|
|
303
304
|
return !!((a = t.image) != null && a.assetId);
|
|
304
305
|
}).length,
|
|
305
|
-
[
|
|
306
|
+
[r]
|
|
306
307
|
), ve = y ? Le : 1;
|
|
307
308
|
U(() => {
|
|
308
|
-
oe.current = 0,
|
|
309
|
+
oe.current = 0, ne({}), ie.current = null, pe(ue), R(0);
|
|
309
310
|
}, [he]), be(() => {
|
|
310
311
|
if (!M || C !== "randomize") return;
|
|
311
312
|
const t = N.current;
|
|
312
313
|
if (!t) return;
|
|
313
314
|
const a = (s) => {
|
|
314
|
-
|
|
315
|
+
ne((c) => {
|
|
315
316
|
const g = Array.from(s).filter(
|
|
316
317
|
(h) => h in c && !Ke(t, h)
|
|
317
318
|
);
|
|
@@ -373,7 +374,7 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
373
374
|
const c = t.getBoundingClientRect().width || t.offsetWidth, g = Xe(a), m = ie.current, h = typeof m == "number" && Math.abs(m - g) <= 0.25;
|
|
374
375
|
ie.current = g;
|
|
375
376
|
let A = z, w = 0;
|
|
376
|
-
if ((k ||
|
|
377
|
+
if ((k || n) && E > 0 && c > 0) {
|
|
377
378
|
const $ = Ce(a, E);
|
|
378
379
|
if ($ >= Be) {
|
|
379
380
|
w = $;
|
|
@@ -400,7 +401,7 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
400
401
|
return s.observe(t), s.observe(a), () => {
|
|
401
402
|
Q.current = null, cancelAnimationFrame(i.current), s.disconnect();
|
|
402
403
|
};
|
|
403
|
-
}, [k, y, v, he, z, E,
|
|
404
|
+
}, [k, y, v, he, z, E, n]), U(() => {
|
|
404
405
|
if (!y || f <= 0) return;
|
|
405
406
|
const t = O.current;
|
|
406
407
|
t && Ue(t);
|
|
@@ -421,17 +422,17 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
421
422
|
i();
|
|
422
423
|
const l = new ResizeObserver(i);
|
|
423
424
|
return l.observe(t), l.observe(a), () => l.disconnect();
|
|
424
|
-
}, [y, ve, se,
|
|
425
|
-
if (!
|
|
425
|
+
}, [y, ve, se, n, q, G, X, v, H, L]), U(() => {
|
|
426
|
+
if (!n || !K || !y || typeof window > "u") return;
|
|
426
427
|
const t = requestAnimationFrame(() => {
|
|
427
428
|
window.dispatchEvent(new Event("scroll"));
|
|
428
429
|
});
|
|
429
430
|
return () => cancelAnimationFrame(t);
|
|
430
|
-
}, [
|
|
431
|
+
}, [n, K, y, F, v, T, q, se]);
|
|
431
432
|
const ke = () => {
|
|
432
|
-
|
|
433
|
+
re && me(!0);
|
|
433
434
|
}, Se = () => {
|
|
434
|
-
|
|
435
|
+
re && me(!1);
|
|
435
436
|
}, Ne = we(() => {
|
|
436
437
|
var t;
|
|
437
438
|
oe.current = Math.min(
|
|
@@ -439,13 +440,13 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
439
440
|
oe.current + 1
|
|
440
441
|
), (t = Q.current) == null || t.call(Q);
|
|
441
442
|
}, [ge]), Ae = we((t, a) => {
|
|
442
|
-
|
|
443
|
-
const l = i[t] ?? a, o = (
|
|
443
|
+
ne((i) => {
|
|
444
|
+
const l = i[t] ?? a, o = (r ?? []).filter((c) => c !== l);
|
|
444
445
|
if (o.length === 0) return i;
|
|
445
446
|
const s = o[Math.floor(Math.random() * o.length)];
|
|
446
447
|
return { ...i, [t]: s };
|
|
447
448
|
});
|
|
448
|
-
}, [
|
|
449
|
+
}, [r]), ye = (t, a, i, l) => {
|
|
449
450
|
const o = M && C === "randomize" && H.display === "cover" ? L[i] ?? t : t, s = `max(${S(q)}, ${He}px)`, c = `calc(-0.5 * (${s} + ${S(q)}))`;
|
|
450
451
|
return /* @__PURE__ */ le(
|
|
451
452
|
"div",
|
|
@@ -464,7 +465,7 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
464
465
|
imageMaxHeight: X,
|
|
465
466
|
cornerRadius: de,
|
|
466
467
|
imageHoverClass: P,
|
|
467
|
-
isEditor:
|
|
468
|
+
isEditor: n,
|
|
468
469
|
isFirstSet: l,
|
|
469
470
|
scaled: S,
|
|
470
471
|
onFirstSetImageDone: Ne
|
|
@@ -491,7 +492,7 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
491
492
|
);
|
|
492
493
|
};
|
|
493
494
|
if (y) {
|
|
494
|
-
const t = k ?
|
|
495
|
+
const t = k ? re && Ee ? "paused" : "running" : "paused", a = f > 0 && I > 0 ? f / I * 1e3 : 0, i = `${Math.max(0, a) / 1e3}s`;
|
|
495
496
|
return /* @__PURE__ */ le(
|
|
496
497
|
"div",
|
|
497
498
|
{
|
|
@@ -550,7 +551,7 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
550
551
|
className: te(`${u}-marquee-row`, `${u}-marquee-static`),
|
|
551
552
|
style: { gap: S(q), transform: "none" },
|
|
552
553
|
"aria-label": "Marquee",
|
|
553
|
-
children:
|
|
554
|
+
children: r == null ? void 0 : r.map(
|
|
554
555
|
(t, a) => ye(t, 0, a)
|
|
555
556
|
)
|
|
556
557
|
},
|
|
@@ -559,5 +560,5 @@ const Ve = 30, He = 20, ue = 3, Oe = 12, Be = 32, Le = 3, ze = 250, je = 0.5, Ue
|
|
|
559
560
|
] });
|
|
560
561
|
};
|
|
561
562
|
export {
|
|
562
|
-
|
|
563
|
+
it as Marquee
|
|
563
564
|
};
|