@cntrl-site/components 1.0.103 → 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.
Files changed (48) hide show
  1. package/dist/Components/helpers/LazyVideo/LazyVideo.d.ts +4 -0
  2. package/dist/Components/utils/index.d.ts +1 -0
  3. package/dist/Components/utils/observeIntersection.d.ts +4 -0
  4. package/dist/Components/utils/useLazyVideos.d.ts +12 -0
  5. package/dist/Grid-BBpdl60K.js +374 -0
  6. package/dist/Grid-DS53S_gA.mjs +1576 -0
  7. package/dist/{Helix-BmkAKT1G.mjs → Helix-BPn9V1sg.mjs} +53 -53
  8. package/dist/{Helix-2Vr-9WBa.js → Helix-DcgsCc4D.js} +2 -2
  9. package/dist/{Hive-BGMWinrW.mjs → Hive-D6-R6TwM.mjs} +114 -111
  10. package/dist/Hive-n8Fz-j3o.js +321 -0
  11. package/dist/LazyVideo-CdAWymKO.mjs +15 -0
  12. package/dist/LazyVideo-imbU18js.js +1 -0
  13. package/dist/Marquee-DOIRRCu4.js +133 -0
  14. package/dist/Marquee-O_PDwlIb.mjs +564 -0
  15. package/dist/MarqueeText-DkaO2lQ5.js +132 -0
  16. package/dist/MarqueeText-Rzt2fJYt.mjs +517 -0
  17. package/dist/{Mercury-DuKJQ1Zo.mjs → Mercury-C9D10TTT.mjs} +55 -54
  18. package/dist/Mercury-DynO-NxY.js +267 -0
  19. package/dist/{PretextComponent-CGycuNNn.js → PretextComponent-BnsS2zJ6.js} +1 -1
  20. package/dist/{PretextComponent-DN8cyZ8x.mjs → PretextComponent-j-OsRZTx.mjs} +7 -7
  21. package/dist/Waterfall-DC2WQ3GT.js +287 -0
  22. package/dist/{Waterfall-A0FjM2my.mjs → Waterfall-Yud2VR62.mjs} +299 -295
  23. package/dist/{components-DTCDEBo0.js → components-B9Vdjf0w.js} +1 -1
  24. package/dist/{components-BFJINCME.mjs → components-D2LyuDm-.mjs} +1 -1
  25. package/dist/elements.js +1 -1
  26. package/dist/elements.mjs +7 -7
  27. package/dist/elements.node.js +1 -1
  28. package/dist/elements.node.mjs +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/index.mjs +2 -2
  31. package/dist/observeIntersection-B0f3L2iK.mjs +23 -0
  32. package/dist/observeIntersection-DxGj9Ctt.js +1 -0
  33. package/dist/sources.js +147 -59
  34. package/dist/sources.mjs +155 -67
  35. package/dist/useLazyVideos-CdCbc2j0.js +1 -0
  36. package/dist/useLazyVideos-CxXyEjRQ.mjs +52 -0
  37. package/dist/utils.js +1 -1
  38. package/dist/utils.mjs +14 -12
  39. package/package.json +5 -3
  40. package/dist/Grid-CemGhf3F.js +0 -374
  41. package/dist/Grid-cfQsXW3b.mjs +0 -1553
  42. package/dist/Hive-BC6zQBsv.js +0 -321
  43. package/dist/Marquee-BYClHHws.mjs +0 -551
  44. package/dist/Marquee-vmHaTGIP.js +0 -133
  45. package/dist/MarqueeText-4Rip_sQX.mjs +0 -515
  46. package/dist/MarqueeText-E6OubMOG.js +0 -132
  47. package/dist/Mercury-BwF_XW2w.js +0 -267
  48. package/dist/Waterfall-DnPDHbCL.js +0 -287
@@ -1,11 +1,11 @@
1
1
  import { Form as at } from "./Form-BX5_41nb.mjs";
2
2
  import { OnelinerForm as lt } from "./OnelinerForm-BEu7_sho.mjs";
3
- import { Marquee as pt } from "./Marquee-BYClHHws.mjs";
4
- import { MarqueeText as rt } from "./MarqueeText-4Rip_sQX.mjs";
3
+ import { Marquee as pt } from "./Marquee-O_PDwlIb.mjs";
4
+ import { MarqueeText as rt } from "./MarqueeText-Rzt2fJYt.mjs";
5
5
  import { TestimonialGrid as st } from "./TestimonialGrid-CPu4qQ6B.mjs";
6
6
  import { TestimonialSingle as ct } from "./TestimonialSingle-DLdnAVF7.mjs";
7
- import { Grid as yt } from "./Grid-cfQsXW3b.mjs";
8
- import { Hive as mt } from "./Hive-BGMWinrW.mjs";
7
+ import { Grid as yt } from "./Grid-DS53S_gA.mjs";
8
+ import { Hive as mt } from "./Hive-D6-R6TwM.mjs";
9
9
  import { J as x, w as i, x as K, y as U, z as gt } from "./utils-FxC9rcxw.mjs";
10
10
  import { createListTextStylePanelTab as dt, LIST_TEXT_STYLE_PREFIXES as A, applyListColumnCountChange as ut, List as ht, getListColumnTextSettingKey as l, COLUMN_TEXT_PREFIXES as ft, COLUMN_CONTENT_KEYS as k, normalizeListColumnVerticalAlign as bt, CUT_LABEL_TEXT_PREFIX as z, COLUMN_VALIGN_BASIC_OPTIONS as N } from "./List-DW7fyJbf.mjs";
11
11
  import { FAQ as St } from "./FAQ-CZ39u4m8.mjs";
@@ -14,10 +14,10 @@ import { LightboxJournal as vt } from "./LightboxJournal-D59ex6wH.mjs";
14
14
  import { ClickGallerie as Ct } from "./ClickGallerie-QSOQjSdv.mjs";
15
15
  import { Scale as Tt } from "./Scale-TnkWtRrs.mjs";
16
16
  import { SimpleButton as Mt } from "./SimpleButton-C-o2W9bS.mjs";
17
- import { Waterfall as wt } from "./Waterfall-A0FjM2my.mjs";
17
+ import { Waterfall as wt } from "./Waterfall-Yud2VR62.mjs";
18
18
  import { Slider20 as Lt } from "./Slider20-Dm8BeCli.mjs";
19
- import { Mercury as It } from "./Mercury-DuKJQ1Zo.mjs";
20
- import { Helix as Ht } from "./Helix-BmkAKT1G.mjs";
19
+ import { Mercury as It } from "./Mercury-C9D10TTT.mjs";
20
+ import { Helix as Ht } from "./Helix-BPn9V1sg.mjs";
21
21
  import { Burger as Wt } from "./Burger-EMSn7TPB.mjs";
22
22
  import { settingsForEditablePreset as tt, SHAPE_IDS as et, Pretext as Pt } from "./Pretext-10CcyP1E.mjs";
23
23
  const At = [
@@ -0,0 +1,287 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("react"),Pt=require("react-dom"),Et=require("./getImageRect-BQhQXvT8.js"),Je=require("./scalingValue-CSHYgTZl.js"),en=require("./useScopedStyles-Bf6yohVQ.js"),tn=require("./LazyVideo-imbU18js.js"),nn=require("./textStylesToCss-CNN3zZTV.js"),rn=require("./useLazyVideos-CdCbc2j0.js"),on=require("./HiveLightboxTitles-DlyptAaK.js");function an(e){return`
2
+ .${e}-titles-row {
3
+ position: relative;
4
+ flex: 0 1 auto;
5
+ z-index: 2;
6
+ box-sizing: border-box;
7
+ pointer-events: none;
8
+ word-break: break-word;
9
+ min-width: 0;
10
+ display: flex;
11
+ flex-direction: row;
12
+ align-items: baseline;
13
+ }
14
+ .${e}-titles-row-header {
15
+ flex: 1;
16
+ align-items: baseline;
17
+ }
18
+ .${e}-titles-row-header-controls {
19
+ display: flex;
20
+ flex-direction: row;
21
+ align-items: baseline;
22
+ flex-shrink: 0;
23
+ }
24
+ .${e}-close-icon {
25
+ position: relative;
26
+ flex-shrink: 0;
27
+ align-self: center;
28
+ pointer-events: auto;
29
+ z-index: 2;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ border: none;
34
+ background-color: transparent;
35
+ padding: 0;
36
+ }
37
+ .${e}-close-icon-inner {
38
+ all: unset;
39
+ position: relative;
40
+ cursor: pointer;
41
+ width: 100%;
42
+ height: 100%;
43
+ pointer-events: auto;
44
+ }
45
+ .${e}-close-icon-img {
46
+ position: absolute;
47
+ top: 50%;
48
+ left: 50%;
49
+ transform: translate(-50%, -50%);
50
+ }
51
+ .${e}-titles-baseline-strut {
52
+ width: 0;
53
+ overflow: hidden;
54
+ flex-shrink: 0;
55
+ pointer-events: none;
56
+ white-space: nowrap;
57
+ }
58
+ .${e}-titles-row-titles {
59
+ position: relative;
60
+ flex: 1;
61
+ min-width: 0;
62
+ align-self: flex-start;
63
+ }
64
+ .${e}-titles-stack {
65
+ position: relative;
66
+ display: flex;
67
+ flex-direction: row;
68
+ align-items: baseline;
69
+ align-self: flex-start;
70
+ min-width: 0;
71
+ }
72
+ .${e}-titles-row-two-row {
73
+ display: flex;
74
+ flex: 1;
75
+ height: 100%;
76
+ min-height: 0;
77
+ align-self: stretch;
78
+ flex-direction: column;
79
+ width: 100%;
80
+ }
81
+ .${e}-titles-row-top {
82
+ display: flex;
83
+ flex-direction: row;
84
+ align-items: baseline;
85
+ width: 100%;
86
+ flex-shrink: 0;
87
+ margin-bottom: 0;
88
+ }
89
+ .${e}-titles-row-top .${e}-title-cell[data-title="title1"] {
90
+ flex: 0 0 auto;
91
+ min-width: 0;
92
+ }
93
+ .${e}-titles-row-bottom-wrap {
94
+ display: flex;
95
+ flex-direction: column;
96
+ width: 100%;
97
+ margin-top: auto;
98
+ flex-shrink: 0;
99
+ }
100
+ .${e}-titles-row-bottom-area {
101
+ position: relative;
102
+ flex: 1;
103
+ min-height: 0;
104
+ display: flex;
105
+ flex-direction: column;
106
+ width: 100%;
107
+ }
108
+ .${e}-titles-row-bottom {
109
+ position: relative;
110
+ display: flex;
111
+ flex-direction: row;
112
+ align-items: flex-end;
113
+ width: 100%;
114
+ }
115
+ .${e}-titles-row-bottom .${e}-title-cell {
116
+ flex: 0 0 auto;
117
+ }
118
+ .${e}-title-cell {
119
+ position: relative;
120
+ flex: 0 0 auto;
121
+ min-width: 0;
122
+ box-sizing: border-box;
123
+ }
124
+ .${e}-text-bar-cell {
125
+ position: relative;
126
+ flex: 0 1 auto;
127
+ min-width: 0;
128
+ display: flex;
129
+ align-items: baseline;
130
+ }
131
+ .${e}-title1,
132
+ .${e}-title2,
133
+ .${e}-title3 {
134
+ margin: 0;
135
+ min-width: 0;
136
+ }
137
+ .${e}-title-resize-handle {
138
+ background: transparent;
139
+ }
140
+ .${e}-lightbox {
141
+ position: fixed;
142
+ inset: 0;
143
+ z-index: 9997;
144
+ overscroll-behavior: none;
145
+ overflow: hidden;
146
+ }
147
+ .${e}-lightbox-editor {
148
+ inset: auto;
149
+ top: var(--cntrl-article-top, 0);
150
+ left: var(--cntrl-article-left, 0);
151
+ width: var(--cntrl-article-width, 100vw) !important;
152
+ height: var(--cntrl-viewport-height, 100vh) !important;
153
+ }
154
+ .${e}-lightbox-edit-mode {
155
+ z-index: 1;
156
+ }
157
+ .${e}-lightbox-dismiss-area {
158
+ position: relative;
159
+ width: 100%;
160
+ height: 100%;
161
+ }
162
+ .${e}-lightbox-overlay-content {
163
+ position: absolute;
164
+ inset: 0;
165
+ z-index: 3;
166
+ pointer-events: none;
167
+ display: flex;
168
+ flex-direction: column;
169
+ isolation: isolate;
170
+ }
171
+ .${e}-lightbox-content-area {
172
+ position: relative;
173
+ display: flex;
174
+ flex-direction: row;
175
+ align-items: flex-start;
176
+ flex: 1;
177
+ min-width: 0;
178
+ min-height: 0;
179
+ }
180
+ .${e}-lightbox-content-area-stacked {
181
+ align-items: stretch;
182
+ align-self: stretch;
183
+ }
184
+ .${e}-text-bar-cell-stacked {
185
+ align-self: stretch;
186
+ flex: 1;
187
+ min-width: 0;
188
+ min-height: 0;
189
+ height: 100%;
190
+ flex-direction: column;
191
+ align-items: stretch;
192
+ }
193
+ .${e}-control {
194
+ position: relative;
195
+ z-index: 2;
196
+ pointer-events: auto;
197
+ flex-shrink: 0;
198
+ }
199
+ `}const Z=500,Ne=650,_="cubic-bezier(0.22, 1, 0.36, 1)",ln=72,cn=50,sn=1e4,un=650,fn=500;function dn(e,n){const r=e.width/n.width,i=e.height/n.height,a=e.left-n.left,c=e.top-n.top;return`translate(${a}px, ${c}px) scale(${r}, ${i})`}function Ft(e,n){if(n==="contain"&&e instanceof HTMLImageElement){const i=Et.getDisplayedImageRect(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const r=e.getBoundingClientRect();return{left:r.left,top:r.top,width:r.width,height:r.height}}function hn(e,n,r){const i=e.querySelector(`[data-waterfall-index="${n}"]`);return i instanceof HTMLElement?Ft(i,r):null}function pn(e){return e.reduce((n,r,i)=>{var a;return(a=r.image)!=null&&a.assetId&&n.push({gridIndex:i,items:[r.image],entry:{title1:r.title??"",title2:r.subtitle??"",title3:r.caption??""}}),n},[])}function We(e,n,r){var a;if(e.length<=1)return null;const i=(n+r+e.length)%e.length;return((a=e[i])==null?void 0:a.items[0])??null}function Ht(e,n,r){if(e.length<=2)return null;const i=(n+r+e.length)%e.length;return We(e,i,r)}const gn=.03;function Nt(e){return e.width*gn}const ft={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Ze(e,n){return{left:e.left-n.left,top:e.top-n.top,width:e.width,height:e.height}}function At(e){const n=e.getBoundingClientRect();return{width:n.width,height:n.height,left:n.left,top:n.top}}function mn(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function dt(e,n,r){const i=e.getBoundingClientRect(),a=i.width,c=i.height,g=n/r,f=a/c;if(g>f){const y=a/g;return{width:a,height:y,left:i.left,top:i.top+(c-y)/2}}const $=c*g;return{width:$,height:c,left:i.left+(a-$)/2,top:i.top}}function wn(e,n){return!e||!(n!=null&&n.width)||!(n!=null&&n.height)?null:dt(e,n.width,n.height)}function vn(e,n){if(Pe(e)){const i=document.createElement("video"),a=()=>{i.videoWidth>0&&i.videoHeight>0&&n(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",a)};i.addEventListener("loadedmetadata",a),i.preload="auto",i.src=e.assetId,i.load();return}const r=new Image;r.onload=()=>{r.naturalWidth>0&&r.naturalHeight>0&&n(e.assetId,r.naturalWidth,r.naturalHeight)},r.src=e.assetId}function xn(e){const n=new Set,r=[];for(const i of e){const a=i.image;!(a!=null&&a.assetId)||n.has(a.assetId)||(n.add(a.assetId),r.push(a))}return r}function yn({mediaList:e}){const[n,r]=o.useState(null);return rn.useLazyVideos(n,{preload:"metadata"}),e.length===0?null:s.jsx("div",{ref:r,"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(i=>Pe(i)?s.jsx("video",{src:i.assetId,preload:"none",muted:!0,playsInline:!0},i.assetId):s.jsx("img",{src:i.assetId,alt:""},i.assetId))})}function Ce(e,n,r){const{width:i,height:a,top:c}=e,{left:g,width:f}=r,$=Nt(r);return n==="left"?{left:g+$-i,top:c,width:i,height:a}:{left:g+f-$,top:c,width:i,height:a}}function Qe(e,n,r){const i=Ce(e,n,r);return{...i,left:2*i.left-e.left}}function bn(e,n,r){const{left:i,width:a}=r,c=Nt(r);return n==="left"?{left:i,top:e.top,width:c,height:e.height}:{left:i+a-c,top:e.top,width:c,height:e.height}}function Wt(e,n,r,i){const a=Ce(e,"left",i),c=Ce(e,"right",i),g=Qe(e,"left",i),f=Qe(e,"right",i);if(r===1)switch(n){case"center":return{start:e,end:a};case"right-adjacent":return{start:c,end:e};case"left-adjacent":return{start:a,end:g};case"far-right":return{start:f,end:c};default:return{start:e,end:e}}switch(n){case"center":return{start:e,end:c};case"left-adjacent":return{start:a,end:e};case"right-adjacent":return{start:c,end:f};case"far-left":return{start:g,end:a};default:return{start:e,end:e}}}function $n(e,n,r,i){const{start:a,end:c}=Wt(e,n,r,i);return{x:c.left-a.left,y:c.top-a.top}}function Sn(e,n,r){const i=Ce(e,n,r),a=Qe(e,n,r);return{x:a.left-i.left,y:a.top-i.top}}function Pe(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function In({src:e,phase:n,onMediaElement:r,wrapperStyle:i,videoStyle:a,onLoadedMetadata:c,onTransitionEnd:g}){const f=o.useRef(null);return o.useEffect(()=>{const $=f.current;return r==null||r($??null),()=>{$==null||$.pause(),r==null||r(null)}},[e,r]),s.jsx("div",{style:i,onTransitionEnd:g,children:s.jsx("video",{ref:f,src:e,controls:n==="open",playsInline:!0,preload:"auto",onLoadedMetadata:c,onClick:$=>$.stopPropagation(),style:a},e)})}function Ke({media:e,style:n,onTransitionEnd:r,onMeasure:i}){return Pe(e)?s.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:n,onLoadedMetadata:a=>{const c=a.currentTarget;c.videoWidth>0&&c.videoHeight>0&&(i==null||i(e.assetId,c.videoWidth,c.videoHeight))},onTransitionEnd:r}):s.jsx("img",{src:e.assetId,alt:e.name,style:n,onLoad:a=>{const c=a.currentTarget;c.naturalWidth>0&&c.naturalHeight>0&&(i==null||i(e.assetId,c.naturalWidth,c.naturalHeight))},onTransitionEnd:r})}function Ln({prefix:e,items:n,index:r,entry:i,settings:a,isEditor:c,isEditMode:g,isPreviewMode:f,canNavigate:$,lightboxEntries:y,entryIdx:K,layoutId:et,sourceRect:ae,resolveCloseSourceRect:ge,onClose:ze,onPrev:J,onNext:je}){const He=o.useRef(null),V=o.useRef(null),M=o.useRef(null),Q=o.useRef(new Map),[le,Oe]=o.useState(0),P=o.useRef(null),ee=o.useRef(0),L=o.useRef(0),C=o.useRef("none"),A=o.useRef(!1),me=o.useRef(!1),we=o.useRef(!1),ce=o.useRef(null),W=o.useRef(null),xe=o.useRef(null),te=o.useRef(()=>{}),se=o.useRef(null),ue=o.useRef(null),fe=o.useRef(null),ne=o.useRef(!1),[j,ve]=o.useState(null),[H,E]=o.useState(ft),[tt,nt]=o.useState(0),[m,ye]=o.useState("opening"),[B,be]=o.useState(0),[h,v]=o.useState(0),[b,z]=o.useState(!1),[F,re]=o.useState(null),[de,$e]=o.useState(null),[De,Se]=o.useState(null),[zt,rt]=o.useState(!1),[Ot,Dt]=o.useState(null),[ht,ot]=o.useState(!1),_e=o.useRef(!1),[q,Ie]=o.useState(!1),[_t,pt]=o.useState(!1),gt=o.useRef(r),mt=o.useRef(void 0),p=n[r],Ve=p?Pe(p):!1,G=h!==0||b,it=!g&&(!c||!!f),oe=$&&!g,he=y.length>1,Le=o.useCallback((t,l)=>n.length<=1?null:n[(t+l+n.length)%n.length]??null,[n]),k=he?We(y,K,-1):Le(r,-1),R=he?We(y,K,1):Le(r,1),at=F===-1&&G?he&&de!==null?We(y,de,-1):De!==null?Le(De,-1):null:null,lt=F===1&&G?he&&de!==null?We(y,de,1):De!==null?Le(De,1):null:null,Vt=at&&at.assetId!==(k==null?void 0:k.assetId)?at:null,Mt=lt&&lt.assetId!==(R==null?void 0:R.assetId)?lt:null,Bt=k&&oe?(()=>{const t=he?Ht(y,K,-1):n.length>2?Le((r-1+n.length)%n.length,-1):null;return t&&t.assetId!==k.assetId?t:null})():null,qt=R&&oe?(()=>{const t=he?Ht(y,K,1):n.length>2?Le((r+1)%n.length,1):null;return t&&t.assetId!==R.assetId?t:null})():null,Me=Vt??Bt,Be=Mt??qt,pe=o.useCallback((t,l,d)=>{if(!t||!l||!d)return;const u=Q.current,x=u.get(t);(x==null?void 0:x.width)===l&&(x==null?void 0:x.height)===d||(u.set(t,{width:l,height:d}),Oe(D=>D+1))},[]),ke=o.useCallback(t=>{if(!(t!=null&&t.assetId))return null;const l=Q.current.get(t.assetId);return wn(V.current,l)},[le,tt]),qe=o.useCallback(()=>{if(!p)return;const t=ke(p);if(t){ve(t);return}const l=V.current;l&&ve(At(l))},[p,ke]),Ge=o.useCallback(t=>{if(he){const l=y.length;$e((K+t+l)%l),Se(null);return}n.length>1&&(Se((r+t+n.length)%n.length),$e(null))},[he,y.length,K,n.length,r]),T=o.useCallback(t=>{we.current=t,z(t)},[]),S=o.useCallback(()=>{ce.current!==null&&(window.clearTimeout(ce.current),ce.current=null)},[]),wt=o.useCallback(()=>{S(),ce.current=window.setTimeout(()=>{S(),T(!1)},Ne+32)},[S,T]),vt=o.useCallback(()=>{const t=He.current;if(!t){E({left:0,top:0,width:typeof window<"u"?window.innerWidth:ft.width,height:typeof window<"u"?window.innerHeight:ft.height});return}const l=t.getBoundingClientRect();E({left:l.left,top:l.top,width:l.width,height:l.height})},[]),xt=o.useCallback((t,l)=>{if(G){if(q&&!b)return`translate(${h}px, 0px)`;if(b&&F!==null){const d=ke(t);if(!d)return;const{x:u,y:x}=$n(d,l,F,H);return`translate(${u}px, ${x}px)`}if(b)return"translate(0px, 0px)"}},[G,q,b,h,F,H,ke]),Re=o.useCallback(()=>{const t=W.current;W.current=null,S(),T(!1),re(null),$e(null),Se(null),v(0),Ie(!1),A.current=!1,L.current=0,C.current="none",t===-1?J():t===1&&je()},[S,T,J,je]),Xe=o.useCallback(()=>{S(),ce.current=window.setTimeout(()=>{W.current!==null&&Re()},Ne+32)},[S,Re]),yt=o.useCallback(()=>{S(),W.current=null,T(!1),re(null),$e(null),Se(null),v(0),Ie(!1),A.current=!1,L.current=0,C.current="none"},[S,T]),bt=o.useCallback(t=>{if(!(!oe||!j)){if(we.current){if(W.current===t){xe.current=t,Re();return}yt()}S(),Ge(t),W.current=t,re(t),T(!0),Xe()}},[oe,j,Re,yt,S,Ge,T,Xe]);te.current=bt;const ie=o.useCallback(()=>{se.current=null,ne.current=!1,ue.current!==null&&(window.clearInterval(ue.current),ue.current=null),fe.current!==null&&(window.clearTimeout(fe.current),fe.current=null)},[]),ct=o.useCallback(t=>{ue.current!==null&&window.clearInterval(ue.current);const l=ne.current?fn:un;ue.current=window.setInterval(()=>{te.current(t)},l)},[]),$t=o.useCallback(t=>{se.current!==t&&(ie(),se.current=t,ne.current=!1,te.current(t),ct(t),fe.current=window.setTimeout(()=>{fe.current=null,se.current===t&&(ne.current=!0,ct(t))},sn))},[ie,ct]),X=o.useCallback(()=>{const t=V.current;if(!t)return;const l=p==null?void 0:p.assetId,d=l?Q.current.get(l):void 0;if(d!=null&&d.width&&(d!=null&&d.height)){ve(dt(t,d.width,d.height));return}const u=M.current;if(u&&l&&(u.src===l||u.currentSrc===l)){const{width:D,height:w}=mn(u);if(D&&w){pe(l,D,w),ve(dt(t,D,w));return}}const x=At(t);!x.width||!x.height||ve(x)},[p==null?void 0:p.assetId,pe]),St=o.useCallback(t=>{if(M.current=t,!!t){if(t instanceof HTMLVideoElement){t.readyState>=1&&t.videoWidth>0&&X();return}t.complete&&t.naturalWidth>0&&X()}},[X]),Ae=o.useCallback(()=>{vt(),X(),nt(t=>t+1)},[vt,X]);o.useEffect(()=>{Ae();const t=V.current,l=He.current,d=new ResizeObserver(()=>Ae());return t&&d.observe(t),l&&d.observe(l),window.addEventListener("resize",Ae),()=>{d.disconnect(),window.removeEventListener("resize",Ae)}},[Ae,r,et]),o.useLayoutEffect(()=>{if(!p)return;const t=M.current;if(t){if(t instanceof HTMLImageElement&&t.complete&&t.naturalWidth>0){X();return}t instanceof HTMLVideoElement&&t.readyState>=1&&t.videoWidth>0&&X()}},[p==null?void 0:p.assetId,r,X]),o.useEffect(()=>{qe()},[qe,le]),o.useEffect(()=>{const t=new Set,l=[],d=u=>{!(u!=null&&u.assetId)||t.has(u.assetId)||(t.add(u.assetId),l.push(u))};n.forEach(d),y.forEach(u=>u.items.forEach(d)),l.forEach(u=>{Q.current.has(u.assetId)||vn(u,pe)})},[n,y,pe]),o.useEffect(()=>{if(m!=="opening"||!j)return;if(!ae){ye("open");return}rt(!1);const t=requestAnimationFrame(()=>{requestAnimationFrame(()=>{rt(!0),ye("open")})});return()=>cancelAnimationFrame(t)},[m,j,ae]),o.useEffect(()=>{if(m!=="closing")return;const t=setTimeout(()=>ze(),Z);return()=>clearTimeout(t)},[m,ze]),o.useEffect(()=>()=>{S()},[S]),o.useLayoutEffect(()=>{gt.current===r&&mt.current===(p==null?void 0:p.assetId)||(S(),W.current=null,re(null),$e(null),Se(null),be(0),v(0),T(!1),pt(!1),Ie(!1),ee.current=0,L.current=0,C.current="none",A.current=!1,P.current=null,me.current=!1,M.current=null,qe(),gt.current=r,mt.current=p==null?void 0:p.assetId)},[r,p==null?void 0:p.assetId,T,S,qe]),o.useLayoutEffect(()=>{const t=xe.current;t!==null&&(xe.current=null,requestAnimationFrame(()=>{te.current(t)}))},[r,K,p==null?void 0:p.assetId]),o.useLayoutEffect(()=>{if(m==="opening"){_e.current=!1,ot(!1);return}if(m!=="open"||_e.current)return;if(!k&&!R){_e.current=!0;return}ot(!1);const t=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ot(!0),_e.current=!0})});return()=>cancelAnimationFrame(t)},[m,k==null?void 0:k.assetId,R==null?void 0:R.assetId]),o.useEffect(()=>{if(m!=="open")return;const t=()=>{const w=I=>{I.stopPropagation(),I.preventDefault(),document.removeEventListener("click",w,!0)};document.addEventListener("click",w,!0)},l=w=>{const I=w<0?1:-1;S(),Ge(I),W.current=I,re(I),T(!0),Xe()},d=w=>{if(Math.abs(w)>cn&&oe){l(w);return}W.current=null,re(null),$e(null),Se(null),T(!0),v(0),wt()},u=w=>{if(w.touches.length!==1||we.current)return;const I=w.touches[0];me.current=!0,P.current={x:I.clientX,y:I.clientY},C.current="none",L.current=0,A.current=!1},x=w=>{if(!P.current||w.touches.length!==1||we.current)return;const I=w.touches[0],Y=I.clientX-P.current.x,U=I.clientY-P.current.y;if(C.current==="none"){if(Math.abs(Y)<10&&Math.abs(U)<10)return;if(Math.abs(Y)>Math.abs(U)){if(!oe)return;C.current="horizontal"}else if(U>0){if(!it)return;C.current="vertical"}else return}if(C.current==="horizontal"){A.current=!0,Ie(!0),L.current=Y,v(Y),w.preventDefault();return}C.current==="vertical"&&(A.current=!0,Ie(!0),ee.current=U,be(U),w.preventDefault())},D=()=>{if(!P.current)return;const w=C.current,I=A.current;if(I&&w==="horizontal")d(L.current),t();else if(I&&w==="vertical"){const Y=ee.current;if(it&&Y>ln){const U=window.innerHeight;ee.current=U,pt(!0),be(U),ye("closing")}else ee.current=0,be(0);t()}else w==="horizontal"&&Math.abs(L.current)>0&&(d(L.current),t());P.current=null,C.current="none",L.current=0,A.current=!1,Ie(!1)};return document.addEventListener("touchstart",u,{passive:!0}),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("touchend",D),document.addEventListener("touchcancel",D),()=>{document.removeEventListener("touchstart",u),document.removeEventListener("touchmove",x),document.removeEventListener("touchend",D),document.removeEventListener("touchcancel",D)}},[m,oe,T,wt,S,it,Xe,Ge]);const st=o.useCallback(()=>{const t=(ge==null?void 0:ge())??ae??null;t&&j&&(Dt(t),rt(!0)),ye("closing")},[ge,ae,j]);o.useEffect(()=>{const t=u=>{if(u.key==="Escape"){if(c&&f||m==="closing")return;ie(),st();return}if(u.key!=="ArrowLeft"&&u.key!=="ArrowRight"||m!=="open"||!oe)return;u.preventDefault();const x=u.key==="ArrowLeft"?-1:1;u.repeat&&se.current===x||$t(x)},l=u=>{if(u.key!=="ArrowLeft"&&u.key!=="ArrowRight")return;const x=u.key==="ArrowLeft"?-1:1;se.current===x&&ie()},d=()=>{ie()};return window.addEventListener("keydown",t),window.addEventListener("keyup",l),window.addEventListener("blur",d),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",l),window.removeEventListener("blur",d),ie()}},[m,c,f,st,oe,$t,ie]),o.useEffect(()=>{m!=="open"&&ie()},[m,ie]);const It=()=>{m==="closing"||g||st()},N=m==="open",Ye=m==="closing",Gt=B>0?Math.max(0,1-B/500):1,Xt=B>0?Math.max(.35,1-B/500):1,Te=o.useCallback(t=>{if(!(t.propertyName!=="transform"||!we.current)){if(W.current!==null){Re();return}S(),T(!1)}},[S,T,Re]),ut=m==="closing"?Ot??ae:ae,Yt=ut&&j&&(m==="opening"||Ye)?dn(ut,j):void 0,Ut=G&&p?xt(p,"center"):B>0?`translateY(${B}px)`:Yt,O=j?Ze(j,H):null,Lt=!!(ut&&j),Zt=Lt&&(m==="closing"||m==="open"&&zt),kt={position:"absolute",top:O==null?void 0:O.top,left:O==null?void 0:O.left,width:O==null?void 0:O.width,height:O==null?void 0:O.height,objectFit:"contain",transformOrigin:"top left",transform:Ut,opacity:B>0?Xt:Lt?1:m==="opening"||Ye?0:1,transition:q&&!b?"none":b?`transform ${Ne}ms ${_}`:_t?`transform ${Z}ms ${_}, opacity ${Z}ms ${_}`:Zt?`transform ${Z}ms ${_}`:m==="opening"||Ye?`opacity ${Z}ms ${_}`:"none",pointerEvents:Ve&&N&&!G?"auto":"none",touchAction:Ve&&N?"none":void 0,zIndex:1,overflow:Ve?"hidden":void 0},Kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:N&&!G?"auto":"none"},Ue=(t,l,d="adjacent")=>{const u=ke(t);if(!u)return{display:"none"};const x=d==="far"?l==="left"?"far-left":"far-right":l==="left"?"left-adjacent":"right-adjacent",{start:D}=F!==null?Wt(u,x,F,H):{start:d==="far"?Qe(u,l,H):Ce(u,l,H)},w=Ze(D,H),I=xt(t,x),Y=!G&&d==="adjacent"&&N&&!ht?Sn(u,l,H):null,U=d==="far"&&G&&F===(l==="left"?-1:1),Jt=q&&!b?!1:b,Qt=d==="adjacent"&&N&&ht&&!G;return{position:"absolute",top:w.top,left:w.left,width:w.width,height:w.height,objectFit:"contain",transform:I??(Y?`translate(${Y.x}px, ${Y.y}px)`:void 0),opacity:d==="far"?N&&U?1:0:N?1:0,transition:Jt?d==="far"?`transform ${Ne}ms ${_}`:`transform ${Ne}ms ${_}, opacity ${Z}ms ${_}`:Qt?`transform ${Z}ms ${_}`:m==="opening"||Ye?`opacity ${Z}ms ${_}`:"none",pointerEvents:"none",zIndex:1}},Rt=(t,l)=>{const d=ke(t);return d?bn(Ce(d,l,H),l,H):null},Tt=t=>l=>{if(!g){if(me.current){me.current=!1;return}l.stopPropagation(),bt(t)}},Ct=k?Rt(k,"left"):null,jt=R?Rt(R,"right"):null,Ee=Ct?Ze(Ct,H):null,Fe=jt?Ze(jt,H):null;return s.jsxs("div",{ref:He,className:[`${e}-lightbox`,c?`${e}-lightbox-editor`:"",g?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:m==="open"?"none":void 0},onClick:It,children:[s.jsx("div",{style:{position:"absolute",inset:0,background:a.backgroundColor??"#FFFFFF",opacity:N?Gt:0,transition:q?"none":`opacity ${Z}ms ${_}`,pointerEvents:"none"}}),s.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[s.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[s.jsx("div",{style:{height:"10%"}}),s.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:s.jsx("div",{ref:V,style:{width:"100%",height:"100%"}})}),s.jsx("div",{style:{height:"10%"}})]}),s.jsx("div",{style:{position:"absolute",inset:0,opacity:N?1:0,transition:q?"none":`opacity ${Z}ms ${_}`,pointerEvents:"none"},children:s.jsx(on.HiveLightboxTitles,{prefix:e,entry:i,settings:a,isEditor:c,isEditMode:g,isPreviewMode:f,onClose:It})})]}),N&&Me&&s.jsx(Ke,{media:Me,style:Ue(Me,"left","far"),onMeasure:pe,onTransitionEnd:Te},`far-prev-${Me.assetId}`),N&&k&&s.jsxs(s.Fragment,{children:[s.jsx(Ke,{media:k,style:Ue(k,"left"),onMeasure:pe,onTransitionEnd:Te},`prev-${k.assetId}`),Ee&&s.jsx("div",{style:{position:"absolute",top:Ee.top,left:Ee.left,width:Ee.width,height:Ee.height,cursor:g||q?"default":"pointer",pointerEvents:g||q?"none":"auto",zIndex:3},onClick:Tt(-1)})]}),N&&R&&s.jsxs(s.Fragment,{children:[s.jsx(Ke,{media:R,style:Ue(R,"right"),onMeasure:pe,onTransitionEnd:Te},`next-${R.assetId}`),Fe&&s.jsx("div",{style:{position:"absolute",top:Fe.top,left:Fe.left,width:Fe.width,height:Fe.height,cursor:g||q?"default":"pointer",pointerEvents:g||q?"none":"auto",zIndex:3},onClick:Tt(1)})]}),N&&Be&&s.jsx(Ke,{media:Be,style:Ue(Be,"right","far"),onMeasure:pe,onTransitionEnd:Te},`far-next-${Be.assetId}`),j&&p&&(Ve?s.jsx(In,{src:p.assetId,phase:m,onMediaElement:St,wrapperStyle:kt,videoStyle:Kt,onLoadedMetadata:X,onTransitionEnd:Te},`${r}-${p.assetId}`):s.jsx("img",{ref:St,src:p.assetId,alt:p.name,onLoad:X,onTransitionEnd:Te,style:kt},`${r}-${p.assetId}`))]})}const kn=20,Rn=.18;function Tn(e){return`
200
+ .${e}-wrapper {
201
+ box-sizing: border-box;
202
+ max-width: 100%;
203
+ overflow: visible;
204
+ overflow-wrap: anywhere;
205
+ word-break: break-word;
206
+ }
207
+ .${e}-item {
208
+ display: inline;
209
+ white-space: normal;
210
+ max-width: 100%;
211
+ }
212
+ .${e}-item-title {
213
+ display: inline;
214
+ white-space: pre-wrap;
215
+ overflow-wrap: anywhere;
216
+ word-break: break-word;
217
+ }
218
+ .${e}-type-a.${e}-wrapper,
219
+ .${e}-type-a .${e}-item-title {
220
+ text-align: left;
221
+ }
222
+ .${e}-type-b.${e}-wrapper,
223
+ .${e}-type-b .${e}-item-title {
224
+ text-align: center;
225
+ }
226
+ .${e}-type-c.${e}-wrapper,
227
+ .${e}-type-c .${e}-item-title {
228
+ text-align: right;
229
+ }
230
+ .${e}-item-image {
231
+ display: inline-block;
232
+ vertical-align: baseline;
233
+ position: relative;
234
+ z-index: 1;
235
+ height: 0;
236
+ width: calc(1cap * var(--${e}-image-aspect));
237
+ margin: 0 var(--${e}-image-inline-gap);
238
+ }
239
+ .${e}-item-image-fit {
240
+ width: calc(1cap * var(--${e}-item-media-aspect, var(--${e}-image-aspect)));
241
+ }
242
+ .${e}-item-image img,
243
+ .${e}-item-image video {
244
+ position: absolute;
245
+ left: 0;
246
+ bottom: 0;
247
+ display: block;
248
+ height: 1cap;
249
+ width: 100%;
250
+ max-height: none;
251
+ object-position: bottom;
252
+ }
253
+ .${e}-item-image-hover-scale img,
254
+ .${e}-item-image-hover-scale video {
255
+ transition: transform 0.3s ease;
256
+ }
257
+ .${e}-item-image-hover-scale:hover {
258
+ z-index: 10;
259
+ }
260
+ .${e}-item-image-hover-scale:hover img,
261
+ .${e}-item-image-hover-scale:hover video {
262
+ transform: scale(var(--${e}-image-hover-scale, 1.2));
263
+ }
264
+ .${e}-item-image-hover-saturate img,
265
+ .${e}-item-image-hover-saturate video {
266
+ filter: grayscale(100%);
267
+ transition: filter 0.3s ease;
268
+ }
269
+ .${e}-item-image-hover-saturate:hover img,
270
+ .${e}-item-image-hover-saturate:hover video {
271
+ filter: grayscale(0%);
272
+ }
273
+ .${e}-item-gap-host {
274
+ display: inline-block;
275
+ vertical-align: top;
276
+ height: var(--${e}-line-height);
277
+ position: relative;
278
+ flex-shrink: 0;
279
+ }
280
+ .${e}-item-gap-control {
281
+ position: absolute;
282
+ top: 0;
283
+ z-index: 2;
284
+ pointer-events: auto;
285
+ }
286
+ ${an(e)}
287
+ `}function Cn(e){const{imageDisplay:n}=e??{},r=(n==null?void 0:n.ratioValue)??"1:1",i=(n==null?void 0:n.reversed)??!1,[a,c]=r.split(":").map(Number),g=i?c:a,f=i?a:c;return f>0?g/f:1}function jn(e){const n=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!n||!r?null:n/r}function Hn(e,n,r){const i=(e==null?void 0:e.titleFontSize)??.07,a=(e==null?void 0:e.titleLineHeight)??i;return{[`--${n}-line-height`]:Je.scalingValue(a,r??!1),[`--${n}-image-inline-gap`]:Je.scalingValue(i*Rn,r??!1),[`--${n}-image-aspect`]:Cn(e)}}function An(e,n){var i,a;const r={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((a=e==null?void 0:e.titleFontSettings)==null?void 0:a.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return nn.textStylesToCss(r,n)}function En(e){var a;const n=((a=e==null?void 0:e.imageDisplay)==null?void 0:a.display)==="cover",r=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:n?"cover":"contain",pointerEvents:"auto",...r?{cursor:"pointer"}:null};return{objectFitMode:n?"cover":"contain",imageStyle:i}}function Fn(e,n,r,i,a,c){if(!(!e||!n))return g=>{var $;const f=(($=g.currentTarget.closest(`.${i}-item`))==null?void 0:$.querySelector(`[data-waterfall-index="${r}"]`))??(g.currentTarget instanceof HTMLImageElement||g.currentTarget instanceof HTMLVideoElement?g.currentTarget:null);c(r,f?Ft(f,a):void 0)}}function Nn({settings:e,content:n,isEditor:r,isPreviewMode:i,isEditMode:a,layoutId:c,portalId:g}){const{prefix:f}=en.useScopedStyles(),$=o.useMemo(()=>Tn(f),[f]),y=n??[],K=(e==null?void 0:e.type)??"a",et=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,ae=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,ge=Je.scalingValue(ae,r??!1),ze=`max(${ge}, ${kn}px)`,{objectFitMode:J,imageStyle:je}=En(e),He=An(e,r),V=o.useRef(null),[M,Q]=o.useState(!1),[le,Oe]=o.useState([]),[P,ee]=o.useState(0),[L,C]=o.useState(0),[A,me]=o.useState(null),[we,ce]=o.useState({title1:"",title2:"",title3:""}),W=(!r||i)&&!M,xe=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},te=xe.sizeType??"none",se=W&&te!=="none"?`${f}-item-image-hover-${te}`:void 0,ue=(xe.value??120)/100,fe=o.useCallback(h=>{!h||te!=="scale"||(h.style.transformOrigin=Et.getContainedMediaTransformOrigin(h))},[te]),ne=o.useCallback(h=>{if(h){if(J==="contain"){const v=jn(h);if(v){const b=h.closest(`.${f}-item-image`);b instanceof HTMLElement&&b.style.setProperty(`--${f}-item-media-aspect`,String(v))}}fe(h)}},[f,fe,J]),j={width:Je.scalingValue(et,r??!1),...He,...Hn(e,f,r),[`--${f}-image-hover-scale`]:String(ue)},ve=(()=>{const h={},v=V.current?getComputedStyle(V.current).getPropertyValue("--cntrl-article-width").trim():"";return v&&(h["--cntrl-article-width"]=v),h})(),H=((e==null?void 0:e.lightbox)??"on")==="on"&&(!r||i||a),E=o.useMemo(()=>pn(y),[y]),tt=o.useMemo(()=>xn(y),[y]),nt=(h,v)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||r&&!a&&!i)return;const b=E.findIndex(F=>F.gridIndex===h);if(b<0)return;const z=E[b];C(b),Oe(z.items),ee(0),ce(z.entry),me(v??null),Q(!0)},m=o.useCallback(()=>{Q(!1),me(null)},[]),ye=o.useCallback(()=>{const h=E[L];return!h||!V.current?A:hn(V.current,h.gridIndex,J)??A},[E,L,A,J]),B=o.useCallback(h=>{if(E.length>1){const v=E.length,b=(L+h+v)%v,z=E[b];C(b),Oe(z.items),ee(0),ce(z.entry);return}ee(v=>(v+h+le.length)%le.length)},[E,L,le.length]),be=E.length>1||le.length>1;return o.useEffect(()=>{if(!M||typeof document>"u")return;const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}},[M]),o.useEffect(()=>{!r||a||i||Q(!1)},[r,a,i]),o.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&Q(!1)},[e==null?void 0:e.lightbox]),s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:$}}),s.jsx(yn,{mediaList:tt}),s.jsx("div",{ref:V,className:`${f}-wrapper ${f}-type-${K}`,style:j,children:y.map((h,v)=>{var F,re;const b=!!((F=h.image)!=null&&F.assetId),z=Fn(!!H,b,v,f,J,nt);return s.jsxs("div",{className:`${f}-item`,children:[h.title?s.jsx("span",{className:`${f}-item-title`,onClick:z,style:z?{cursor:"pointer"}:void 0,children:h.title}):null,(re=h.image)!=null&&re.assetId?s.jsx("span",{className:[`${f}-item-image`,J==="contain"?`${f}-item-image-fit`:void 0,se].filter(Boolean).join(" "),children:h.image.type==="video"?s.jsx(tn.LazyVideo,{ref:ne,src:h.image.assetId,"data-waterfall-index":v,style:je,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:z,onLoadedMetadata:de=>ne(de.currentTarget)}):s.jsx("img",{ref:ne,src:h.image.assetId,alt:h.image.name??"","data-waterfall-index":v,style:je,onClick:z,onLoad:de=>ne(de.currentTarget)})}):null,v<y.length-1&&s.jsx("div",{className:`${f}-item-gap-host`,style:{width:ge},children:a&&!M&&s.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${f}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:ze,height:"100%"}})})]},v)})}),M&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const h=(g?document.getElementById(g):null)??document.body;return Pt.createPortal(s.jsx("div",{style:ve,"data-selection":"none",children:s.jsx(Ln,{prefix:f,items:le,index:P,entry:we,settings:e,isEditor:r,isEditMode:a,isPreviewMode:i,canNavigate:be,lightboxEntries:E,entryIdx:L,layoutId:c,sourceRect:A,resolveCloseSourceRect:ye,onClose:m,onPrev:()=>B(-1),onNext:()=>B(1)})}),h)})()]})}exports.Waterfall=Nn;