@cntrl-site/components 1.0.115-alpha.0 → 1.0.115
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/{Burger-DyORh_vF.mjs → Burger-BkVgNMGU.mjs} +1 -1
- package/dist/{Burger-B4kXX9aY.js → Burger-C3yVbQcq.js} +1 -1
- package/dist/{ChroniclesComponent-DRf1Xd9_.mjs → ChroniclesComponent-D-yEbs9w.mjs} +26 -12
- package/dist/ChroniclesComponent-Os_r2IYg.js +1 -0
- package/dist/Components/Chronicles/ChroniclesComponent.d.ts +4 -0
- package/dist/Components/Grid/Grid.d.ts +1 -0
- package/dist/Components/helpers/SvgImage/loadSvgMaskUrl.d.ts +0 -7
- package/dist/{ControlSlider-DB4nbVLT.js → ControlSlider-C8ckUIDm.js} +1 -1
- package/dist/{ControlSlider-3w-bHQEg.mjs → ControlSlider-DqKfaKMG.mjs} +1 -1
- package/dist/{FAQ-GmiwRdFq.mjs → FAQ-CJHCMSBa.mjs} +1 -1
- package/dist/{FAQ-7HEkaoU6.js → FAQ-DLh63Utr.js} +1 -1
- package/dist/Grid-OvzWvUW9.js +403 -0
- package/dist/{Grid-Dn44dvgx.mjs → Grid-t07NDMzY.mjs} +555 -528
- package/dist/{Hive-34KvKNsa.js → Hive-CzabuuCc.js} +1 -1
- package/dist/{Hive-7xHXyMM1.mjs → Hive-DyxYd5eg.mjs} +1 -1
- package/dist/{HiveLightboxTitles-BCoL46-V.mjs → HiveLightboxTitles-DhEeFKWs.mjs} +1 -1
- package/dist/{HiveLightboxTitles-DEeyQGcf.js → HiveLightboxTitles-DlyptAaK.js} +1 -1
- package/dist/{Lightbox-DzPqgKP4.mjs → Lightbox-BY99NS14.mjs} +1 -1
- package/dist/{Lightbox-Cb7lyaNt.js → Lightbox-DZckgBzK.js} +1 -1
- package/dist/{LightboxJournal-C_q7_s-B.mjs → LightboxJournal-D59ex6wH.mjs} +1 -1
- package/dist/{LightboxJournal-BFF5aKRz.js → LightboxJournal-DAEZOPDi.js} +1 -1
- package/dist/{LightboxStrip-CC2e0_9A.js → LightboxStrip-BDjI1jyH.js} +1 -1
- package/dist/{LightboxStrip-BrNj7ipX.mjs → LightboxStrip-YspzBP8N.mjs} +1 -1
- package/dist/{Mercury-BmhtFYOw.js → Mercury-B-s2Kvuq.js} +1 -1
- package/dist/{Mercury-Q788wrYQ.mjs → Mercury-CCW0Es-s.mjs} +1 -1
- package/dist/{OnelinerForm-D8WIB9Qy.mjs → OnelinerForm-BEu7_sho.mjs} +1 -1
- package/dist/{OnelinerForm-CUmY-bXL.js → OnelinerForm-C2Y_XMCY.js} +1 -1
- package/dist/{SimpleButton-DTpzfmb6.mjs → SimpleButton-C-o2W9bS.mjs} +1 -1
- package/dist/{SimpleButton-DtaCYa3y.js → SimpleButton-nGEcO2gB.js} +1 -1
- package/dist/{Slider20-q0iGgnE3.js → Slider20-BOmjDRf2.js} +1 -1
- package/dist/{Slider20-CKngROrc.mjs → Slider20-DUi6qwnd.mjs} +1 -1
- package/dist/SvgImage-B5mR9y6q.mjs +51 -0
- package/dist/SvgImage-DFlmxAoL.js +1 -0
- package/dist/{TestimonialSingle-CpEUendN.js → TestimonialSingle-BORQom3u.js} +1 -1
- package/dist/{TestimonialSingle-Bax71Hyo.mjs → TestimonialSingle-DrnyReim.mjs} +1 -1
- package/dist/{Waterfall-znaoynn5.mjs → Waterfall-3kKioKh2.mjs} +1 -1
- package/dist/{Waterfall-B9YWMhrg.js → Waterfall-DII4-WV5.js} +1 -1
- package/dist/components-D4ZrIo2M.js +1 -0
- package/dist/{components-y6LC2ILa.mjs → components-Ds6rhj3U.mjs} +29 -652
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +22 -23
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +27 -48
- package/dist/loadSvgMaskUrl-DfF7ay6h.js +1 -0
- package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +20 -0
- package/dist/sources.js +42 -5
- package/dist/sources.mjs +45 -8
- package/dist/types/Component.d.ts +0 -7
- package/dist/types/SchemaV1.d.ts +0 -3
- package/package.json +1 -1
- package/dist/ChroniclesComponent-BHZu7BbK.js +0 -1
- package/dist/Components/PopupMenu/PopupMenu.d.ts +0 -70
- package/dist/Components/PopupMenu/PopupMenuComponent.d.ts +0 -597
- package/dist/Components/PopupMenu/popupMenuLayout.d.ts +0 -176
- package/dist/Grid-BXUT_Hn6.js +0 -378
- package/dist/PopupMenu-On4dKyT3.js +0 -369
- package/dist/PopupMenu-RPz8MN6s.mjs +0 -1026
- package/dist/SvgImage-CwRq9-ec.mjs +0 -56
- package/dist/SvgImage-_QN8ngad.js +0 -1
- package/dist/components-DScrkzXw.js +0 -1
- package/dist/loadSvgMaskUrl-B6kHUyof.js +0 -1
- package/dist/loadSvgMaskUrl-DUhCVvpl.mjs +0 -39
|
@@ -17,6 +17,7 @@ export declare const ChroniclesComponent: {
|
|
|
17
17
|
content: {
|
|
18
18
|
type: "array";
|
|
19
19
|
settings: {
|
|
20
|
+
allowsCollection: true;
|
|
20
21
|
addItemWithoutImage: true;
|
|
21
22
|
allowsVideo: true;
|
|
22
23
|
};
|
|
@@ -38,6 +39,7 @@ export declare const ChroniclesComponent: {
|
|
|
38
39
|
image: {
|
|
39
40
|
type: "object";
|
|
40
41
|
label: string;
|
|
42
|
+
contentKey: "gallery";
|
|
41
43
|
display: {
|
|
42
44
|
type: string;
|
|
43
45
|
};
|
|
@@ -61,6 +63,7 @@ export declare const ChroniclesComponent: {
|
|
|
61
63
|
group: {
|
|
62
64
|
type: "string";
|
|
63
65
|
label: string;
|
|
66
|
+
contentKey: "date";
|
|
64
67
|
placeholder: string;
|
|
65
68
|
display: {
|
|
66
69
|
type: string;
|
|
@@ -69,6 +72,7 @@ export declare const ChroniclesComponent: {
|
|
|
69
72
|
title: {
|
|
70
73
|
type: "string";
|
|
71
74
|
label: string;
|
|
75
|
+
contentKey: "title";
|
|
72
76
|
placeholder: string;
|
|
73
77
|
display: {
|
|
74
78
|
type: string;
|
|
@@ -40,6 +40,7 @@ type GridSettings = {
|
|
|
40
40
|
direction: 'horizontal' | 'vertical' | 'random';
|
|
41
41
|
transition: 'fade' | 'slide';
|
|
42
42
|
showText: 'always' | 'on hover';
|
|
43
|
+
hover?: 'none' | 'zoom-in' | 'greyscale' | 'scale-down';
|
|
43
44
|
alignEntries: 'on' | 'off';
|
|
44
45
|
align?: 'top' | 'center' | 'bottom';
|
|
45
46
|
titleMarginTop: number;
|
|
@@ -1,9 +1,2 @@
|
|
|
1
1
|
export declare function isInlineMaskUrl(url: string): boolean;
|
|
2
|
-
/** A data: URL holds an SVG only when its media type says so. */
|
|
3
|
-
export declare function isSvgDataUrl(url: string): boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Whether a data: or blob: URL holds an SVG. A blob: URL, as an image is shown by in the
|
|
6
|
-
* editor while it uploads, says nothing of its type, so its blob is looked at.
|
|
7
|
-
*/
|
|
8
|
-
export declare function isInlineSvgUrl(url: string): Promise<boolean>;
|
|
9
2
|
export declare function loadSvgMaskUrl(url: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),L=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const d=require("classnames"),M=require("./RichTextRenderer-DEFXh5o6.js"),s=require("./scalingValue-CSHYgTZl.js"),k=require("./SvgImage-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),L=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const d=require("classnames"),M=require("./RichTextRenderer-DEFXh5o6.js"),s=require("./scalingValue-CSHYgTZl.js"),k=require("./SvgImage-DFlmxAoL.js"),U=require("./textStylesToCss-CNN3zZTV.js"),H="ControlSlider-module__wrapper___sHEkd",Y="ControlSlider-module__hoverArrow___A-dOH",K="ControlSlider-module__sliderItem___QQSkR",Q="ControlSlider-module__sliderImage___9hRl-",Z="ControlSlider-module__arrow___05ghY",G="ControlSlider-module__arrowVertical___tBfVN",J="ControlSlider-module__nextArrow___-30Yc",X="ControlSlider-module__arrowInner___aEra3",E="ControlSlider-module__arrowIcon___S4ztF",ee="ControlSlider-module__arrowImg___2dwJW",te="ControlSlider-module__mirror___brd6U",oe="ControlSlider-module__pagination___bicLF",ne="ControlSlider-module__paginationInner___bT-P-",ie="ControlSlider-module__paginationVertical___zYqKw",re="ControlSlider-module__paginationItem___nTRbk",le="ControlSlider-module__dot___p1Qun",ae="ControlSlider-module__activeDot___LHFaj",se="ControlSlider-module__paginationInsideBottom___R3FWn",ce="ControlSlider-module__paginationInsideTop___V-qb-",de="ControlSlider-module__paginationOutsideBottom___14w8D",_e="ControlSlider-module__paginationOutsideTop___SCLqB",me="ControlSlider-module__paginationInsideLeft___yOBRZ",ge="ControlSlider-module__paginationInsideRight___Rtt3o",pe="ControlSlider-module__paginationOutsideLeft___lahaw",ue="ControlSlider-module__paginationOutsideRight___EtuQa",he="ControlSlider-module__imgWrapper___UjEgB",fe="ControlSlider-module__captionBlock___dJ6-j",Ce="ControlSlider-module__captionTextWrapper___HFlpf",Se="ControlSlider-module__captionText___uGBVc",ve="ControlSlider-module__active___WZK4G",we="ControlSlider-module__withPointerEvents___t-18M",Ie="ControlSlider-module__topLeftAlignment___zjnGM",xe="ControlSlider-module__topCenterAlignment___gD1xW",Ae="ControlSlider-module__topRightAlignment___NMapS",ye="ControlSlider-module__middleLeftAlignment___OnUrY",Re="ControlSlider-module__middleCenterAlignment___Tdkl0",be="ControlSlider-module__middleRightAlignment___wEbfX",je="ControlSlider-module__bottomLeftAlignment___cTP2-",Le="ControlSlider-module__bottomCenterAlignment___c54fB",ke="ControlSlider-module__bottomRightAlignment___kEwrz",Ve="ControlSlider-module__clickOverlay___DZA28",Te="ControlSlider-module__contain___pLyq7",Oe="ControlSlider-module__cover___KdDat",e={wrapper:H,hoverArrow:Y,sliderItem:K,sliderImage:Q,arrow:Z,arrowVertical:G,nextArrow:J,arrowInner:X,arrowIcon:E,arrowImg:ee,mirror:te,pagination:oe,paginationInner:ne,paginationVertical:ie,paginationItem:re,dot:le,activeDot:ae,paginationInsideBottom:se,paginationInsideTop:ce,paginationOutsideBottom:de,paginationOutsideTop:_e,paginationInsideLeft:me,paginationInsideRight:ge,paginationOutsideLeft:pe,paginationOutsideRight:ue,imgWrapper:he,captionBlock:fe,captionTextWrapper:Ce,captionText:Se,active:ve,withPointerEvents:we,topLeftAlignment:Ie,topCenterAlignment:xe,topRightAlignment:Ae,middleLeftAlignment:ye,middleCenterAlignment:Re,middleRightAlignment:be,bottomLeftAlignment:je,bottomCenterAlignment:Le,bottomRightAlignment:ke,clickOverlay:Ve,contain:Te,cover:Oe},Ne={"top-left":e.topLeftAlignment,"top-center":e.topCenterAlignment,"top-right":e.topRightAlignment,"middle-left":e.middleLeftAlignment,"middle-center":e.middleCenterAlignment,"middle-right":e.middleRightAlignment,"bottom-left":e.bottomLeftAlignment,"bottom-center":e.bottomCenterAlignment,"bottom-right":e.bottomRightAlignment};function ze({settings:p,content:u,styles:T,isEditor:l}){const[_,O]=g.useState(null),{widthSettings:I,fontSettings:v,letterSpacing:N,textAlign:z,wordSpacing:B,fontSizeLineHeight:x,textAppearance:w,color:W}=T.imageCaption??{},[m,F]=g.useState(void 0),[C,q]=g.useState(null),[S,D]=g.useState(0),[$,P]=g.useState(0),{direction:n,transition:a,controls:o,pagination:i,imageCaption:h,triggers:f}=p,A=g.useRef(a.type),{x:y,y:R}=p.controls.offset,b=r=>{_&&_.go(r)};return g.useEffect(()=>{if(!C)return;const r=new ResizeObserver(c=>{if(!_)return;const[j]=c;F({width:Math.round(j.contentRect.width),height:Math.round(j.contentRect.height)})});return r.observe(C),()=>r.unobserve(C)},[C]),g.useEffect(()=>{!_||A.current===a.type||(P(r=>r+1),A.current=a.type)},[a.type]),t.jsx("div",{className:d(e.wrapper,{[e.editor]:l}),ref:q,children:t.jsxs("div",{className:e.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:a.backgroundColor&&a.type==="fade in"?a.backgroundColor:"transparent"},children:[p.imageCaption.isActive&&t.jsx("div",{className:d(e.captionBlock),children:t.jsx("div",{className:e.captionTextWrapper,children:u.map((r,c)=>t.jsx("div",{className:d(e.captionText,Ne[h.alignment],{[e.withPointerEvents]:c===S&&l,[e.active]:c===S}),style:{fontFamily:U.normalizeFontFamilyCssValue(v.fontFamily),fontWeight:v.fontWeight,fontStyle:v.fontStyle,width:I.sizing==="auto"?"max-content":s.scalingValue(I.width,l),letterSpacing:s.scalingValue(N,l),wordSpacing:s.scalingValue(B,l),textAlign:z,fontSize:s.scalingValue(x.fontSize,l),lineHeight:s.scalingValue(x.lineHeight,l),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:W,transitionDuration:a.duration?`${Math.round(parseInt(a.duration)/2)}ms`:"500ms"},children:t.jsx("div",{"data-styles":"imageCaption",className:e.captionTextInner,style:{"--link-hover-color":h.linkHoverColor,"--link-color":h.linkColor,position:"relative",top:s.scalingValue(h.offset.y,l),left:s.scalingValue(h.offset.x,l)},children:t.jsx(M.RichTextRenderer,{content:r.imageCaption})})},c))})}),t.jsx(L.Splide2,{onMove:r=>{D(r.index)},ref:O,options:{arrows:!1,speed:a.duration?parseInt(a.duration):500,autoplay:f.autoPlay!==null,...f.autoPlay!==null&&{interval:parseInt(f.autoPlay)*1e3},direction:n==="horiz"||a.type==="fade in"?"ltr":"ttb",pagination:!1,drag:f.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:a.type==="fade in"?"fade":"loop",rewind:!0},children:u.map((r,c)=>t.jsx(L.SplideSlide,{children:t.jsx("div",{className:e.sliderItem,children:t.jsx("div",{className:e.imgWrapper,children:t.jsx("img",{className:d(e.sliderImage,{[e.contain]:r.image.objectFit==="contain",[e.cover]:r.image.objectFit==="cover"}),src:r.image.assetId,alt:r.image.name??""})})})},c))},$),o.isActive&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:d(e.arrow,{[e.arrowVertical]:n==="vert",[e.hoverArrow]:o.show==="on hover"}),style:{color:o.color,"--arrow-hover-color":o.hover},children:t.jsxs("button",{onClick:()=>{b("-1")},className:e.arrowInner,style:{transform:`translate(${s.scalingValue(y,l)}, ${s.scalingValue(R*(n==="horiz"?1:-1),l)}) scale(${p.controls.scale/100}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:[o.arrowsImgUrl&&t.jsx(k.SvgImage,{url:o.arrowsImgUrl,fill:o.color,hoverFill:o.hover,className:d(e.arrowImg,e.mirror)}),!o.arrowsImgUrl&&t.jsx(V,{color:o.color,className:d(e.arrowIcon,e.arrowImg,e.mirror)})]})}),t.jsx("div",{className:d(e.arrow,e.nextArrow,{[e.arrowVertical]:n==="vert",[e.hoverArrow]:o.show==="on hover"}),style:{color:o.color,"--arrow-hover-color":o.hover},children:t.jsxs("button",{className:e.arrowInner,onClick:()=>b("+1"),style:{transform:`translate(${s.scalingValue(y*(n==="horiz"?-1:1),l)}, ${s.scalingValue(R,l)}) scale(${p.controls.scale/100}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:[o.arrowsImgUrl&&t.jsx(k.SvgImage,{url:o.arrowsImgUrl,fill:o.color,hoverFill:o.hover,className:e.arrowImg}),!o.arrowsImgUrl&&t.jsx(V,{color:o.color,className:d(e.arrowIcon,e.arrowImg)})]})})]}),f.triggersList.click&&t.jsx("div",{className:e.clickOverlay,onClick:()=>{_&&_.go("+1")}}),i.isActive&&t.jsx("div",{className:d(e.pagination,{[e.paginationInsideBottom]:i.position==="inside-1"&&n==="horiz",[e.paginationInsideTop]:i.position==="inside-2"&&n==="horiz",[e.paginationOutsideBottom]:i.position==="outside-1"&&n==="horiz",[e.paginationOutsideTop]:i.position==="outside-2"&&n==="horiz",[e.paginationInsideLeft]:i.position==="inside-1"&&n==="vert",[e.paginationInsideRight]:i.position==="inside-2"&&n==="vert",[e.paginationOutsideLeft]:i.position==="outside-1"&&n==="vert",[e.paginationOutsideRight]:i.position==="outside-2"&&n==="vert",[e.paginationVertical]:n==="vert"}),children:t.jsx("div",{className:e.paginationInner,style:{backgroundColor:i.colors[2],transform:`scale(${i.scale/100}) translate(${s.scalingValue(i.offset.x,l)}, ${s.scalingValue(i.offset.y,l)}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:u.map((r,c)=>t.jsx("button",{onClick:()=>{_&&_.go(c)},className:d(e.paginationItem),children:t.jsx("div",{className:d(e.dot,{[e.activeDot]:c===S}),style:{backgroundColor:c===S?i.colors[0]:i.colors[1],"--pagination-hover-color":i.hover}})},c))})})]})})}function V({color:p,className:u}){return t.jsx("svg",{viewBox:"0 0 10 18",className:u,children:t.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:t.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:p,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}exports.ControlSlider=ze;
|
|
@@ -5,7 +5,7 @@ import { S as q, a as K } from "./react-splide.esm-DQqds4PL.mjs";
|
|
|
5
5
|
import c from "classnames";
|
|
6
6
|
import { R as Q } from "./RichTextRenderer-D52Xto59.mjs";
|
|
7
7
|
import { s } from "./scalingValue-C9JH5L6O.mjs";
|
|
8
|
-
import { S as N } from "./SvgImage-
|
|
8
|
+
import { S as N } from "./SvgImage-B5mR9y6q.mjs";
|
|
9
9
|
import { n as Z } from "./textStylesToCss-05Mn6I_2.mjs";
|
|
10
10
|
const G = "ControlSlider-module__wrapper___sHEkd", J = "ControlSlider-module__hoverArrow___A-dOH", X = "ControlSlider-module__sliderItem___QQSkR", E = "ControlSlider-module__sliderImage___9hRl-", oo = "ControlSlider-module__arrow___05ghY", to = "ControlSlider-module__arrowVertical___tBfVN", eo = "ControlSlider-module__nextArrow___-30Yc", no = "ControlSlider-module__arrowInner___aEra3", io = "ControlSlider-module__arrowIcon___S4ztF", ro = "ControlSlider-module__arrowImg___2dwJW", lo = "ControlSlider-module__mirror___brd6U", ao = "ControlSlider-module__pagination___bicLF", so = "ControlSlider-module__paginationInner___bT-P-", co = "ControlSlider-module__paginationVertical___zYqKw", mo = "ControlSlider-module__paginationItem___nTRbk", _o = "ControlSlider-module__dot___p1Qun", go = "ControlSlider-module__activeDot___LHFaj", po = "ControlSlider-module__paginationInsideBottom___R3FWn", ho = "ControlSlider-module__paginationInsideTop___V-qb-", uo = "ControlSlider-module__paginationOutsideBottom___14w8D", fo = "ControlSlider-module__paginationOutsideTop___SCLqB", Co = "ControlSlider-module__paginationInsideLeft___yOBRZ", wo = "ControlSlider-module__paginationInsideRight___Rtt3o", vo = "ControlSlider-module__paginationOutsideLeft___lahaw", So = "ControlSlider-module__paginationOutsideRight___EtuQa", Io = "ControlSlider-module__imgWrapper___UjEgB", Ao = "ControlSlider-module__captionBlock___dJ6-j", yo = "ControlSlider-module__captionTextWrapper___HFlpf", Ro = "ControlSlider-module__captionText___uGBVc", bo = "ControlSlider-module__active___WZK4G", Lo = "ControlSlider-module__withPointerEvents___t-18M", ko = "ControlSlider-module__topLeftAlignment___zjnGM", xo = "ControlSlider-module__topCenterAlignment___gD1xW", Oo = "ControlSlider-module__topRightAlignment___NMapS", No = "ControlSlider-module__middleLeftAlignment___OnUrY", To = "ControlSlider-module__middleCenterAlignment___Tdkl0", zo = "ControlSlider-module__middleRightAlignment___wEbfX", Bo = "ControlSlider-module__bottomLeftAlignment___cTP2-", Vo = "ControlSlider-module__bottomCenterAlignment___c54fB", Wo = "ControlSlider-module__bottomRightAlignment___kEwrz", Fo = "ControlSlider-module__clickOverlay___DZA28", Do = "ControlSlider-module__contain___pLyq7", $o = "ControlSlider-module__cover___KdDat", o = {
|
|
11
11
|
wrapper: G,
|
|
@@ -5,7 +5,7 @@ import { s as $ } from "./scalingValue-C9JH5L6O.mjs";
|
|
|
5
5
|
import { b as Xt } from "./buildColorVars-CLyWQm5K.mjs";
|
|
6
6
|
import { u as Et } from "./useScopedStyles-DhBG3557.mjs";
|
|
7
7
|
import { o as J, t as U } from "./textStylesToCss-05Mn6I_2.mjs";
|
|
8
|
-
import { S as Pt } from "./SvgImage-
|
|
8
|
+
import { S as Pt } from "./SvgImage-B5mR9y6q.mjs";
|
|
9
9
|
import { R as to } from "./RichTextRenderer-D52Xto59.mjs";
|
|
10
10
|
const X = 300, m = 4e-3, oo = {
|
|
11
11
|
questionColor: "question-color",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),G=require("classnames"),p=require("./scalingValue-CSHYgTZl.js"),Gt=require("./buildColorVars-CE2D5cQV.js"),Kt=require("./useScopedStyles-Bf6yohVQ.js"),f=require("./textStylesToCss-CNN3zZTV.js"),Yt=require("./SvgImage-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),G=require("classnames"),p=require("./scalingValue-CSHYgTZl.js"),Gt=require("./buildColorVars-CE2D5cQV.js"),Kt=require("./useScopedStyles-Bf6yohVQ.js"),f=require("./textStylesToCss-CNN3zZTV.js"),Yt=require("./SvgImage-DFlmxAoL.js"),Zt=require("./RichTextRenderer-DEFXh5o6.js"),K=300,h=.004,Jt={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},Ut=["hover","focus","filled","success","error"];function Xt(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Y(t,r,n,s){return r!==void 0&&r<(t??.01)?`${n} ${s}`:n}function Z(t,r,n,s){const l=t??.01;return r===void 0||r>=l?{}:{[`--${n}-text-leading-gap`]:p.scalingValue((l-r)/2,s)}}function Et(t){return`
|
|
2
2
|
.${t}-wrapper {
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
display: flex;
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),Wt=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const f=require("./scalingValue-CSHYgTZl.js"),ni=require("./buildColorVars-CE2D5cQV.js"),ri=require("./useScopedStyles-Bf6yohVQ.js"),qt=require("./useLazyVideos-CdCbc2j0.js"),ct=require("./LinkWrapper-CTqM1ucO.js"),H=require("./EmbedMediaFrame-DsOTKE4i.js"),r=require("react"),si=require("react-dom"),Re=require("./textStylesToCss-CNN3zZTV.js"),oi=require("./SvgImage-DFlmxAoL.js"),Bt=require("./LazyVideo-imbU18js.js");function li(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Et(e){return((e==null?void 0:e.trim().length)??0)>0}function Ct(e,i,n,a){return i!==void 0&&i<(e??.01)?`${n} ${a}`:n}function It(e,i,n,a){const o=e??.01;return i===void 0||i>=o?{}:{[`--${n}-title-leading-gap`]:f.scalingValue((o-i)/2,a)}}const dt=400,ut="cubic-bezier(0.25, 0.1, 0.25, 1)",kt=1.1,ai=`${((1-1/kt)/2*100).toFixed(4)}%`,Tt="--grid-media-radius";function ci(e){return`
|
|
2
|
+
.${e}-wrapper {
|
|
3
|
+
display: grid;
|
|
4
|
+
align-items: start;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
min-height: ${li(48)};
|
|
7
|
+
}
|
|
8
|
+
.${e}-item {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
}
|
|
14
|
+
.${e}-item-inner {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: center;
|
|
18
|
+
outline: 1px solid #FF5C02;
|
|
19
|
+
}
|
|
20
|
+
.${e}-item-inner-hidden {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
.${e}-item-image-wrapper {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
align-self: center;
|
|
30
|
+
}
|
|
31
|
+
.${e}-item-image-wrapper-fit-slider {
|
|
32
|
+
display: grid;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
position: relative;
|
|
35
|
+
}
|
|
36
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer {
|
|
37
|
+
grid-area: 1 / 1;
|
|
38
|
+
width: 100%;
|
|
39
|
+
display: grid;
|
|
40
|
+
visibility: hidden;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer img {
|
|
44
|
+
grid-area: 1 / 1;
|
|
45
|
+
width: auto;
|
|
46
|
+
height: auto;
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
object-fit: contain;
|
|
49
|
+
}
|
|
50
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer video {
|
|
51
|
+
grid-area: 1 / 1;
|
|
52
|
+
width: auto;
|
|
53
|
+
height: auto;
|
|
54
|
+
max-width: 100%;
|
|
55
|
+
object-fit: contain;
|
|
56
|
+
}
|
|
57
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer div {
|
|
58
|
+
grid-area: 1 / 1;
|
|
59
|
+
width: 100%;
|
|
60
|
+
}
|
|
61
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-slider {
|
|
62
|
+
position: absolute;
|
|
63
|
+
inset: 0;
|
|
64
|
+
width: 100%;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
}
|
|
67
|
+
.${e}-item-slider .splide__track {
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
}
|
|
70
|
+
.${e}-item-image-link {
|
|
71
|
+
width: 100%;
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
align-items: center;
|
|
75
|
+
}
|
|
76
|
+
.${e}-item-text-link {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
align-items: center;
|
|
80
|
+
width: 100%;
|
|
81
|
+
color: inherit;
|
|
82
|
+
text-decoration: none;
|
|
83
|
+
}
|
|
84
|
+
.${e}-item-image {
|
|
85
|
+
width: 100%;
|
|
86
|
+
height: 100%;
|
|
87
|
+
display: block;
|
|
88
|
+
max-width: 100%;
|
|
89
|
+
}
|
|
90
|
+
.${e}-item-video {
|
|
91
|
+
width: 100%;
|
|
92
|
+
height: 100%;
|
|
93
|
+
display: block;
|
|
94
|
+
max-width: 100%;
|
|
95
|
+
}
|
|
96
|
+
.${e}-item-slider,
|
|
97
|
+
.${e}-item-slider .splide__track,
|
|
98
|
+
.${e}-item-slider .splide__list,
|
|
99
|
+
.${e}-item-slider .splide__slide {
|
|
100
|
+
width: 100%;
|
|
101
|
+
height: 100%;
|
|
102
|
+
}
|
|
103
|
+
.${e}-item-slider .splide__slide {
|
|
104
|
+
display: flex;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
align-items: center;
|
|
107
|
+
}
|
|
108
|
+
.${e}-item-title {
|
|
109
|
+
white-space: normal;
|
|
110
|
+
overflow-wrap: anywhere;
|
|
111
|
+
word-break: break-word;
|
|
112
|
+
text-align: center;
|
|
113
|
+
margin-bottom: 0px;
|
|
114
|
+
margin-top: 0px;
|
|
115
|
+
color: var(--${e}-title-color);
|
|
116
|
+
}
|
|
117
|
+
.${e}-item-subtitle {
|
|
118
|
+
white-space: normal;
|
|
119
|
+
overflow-wrap: anywhere;
|
|
120
|
+
word-break: break-word;
|
|
121
|
+
text-align: center;
|
|
122
|
+
margin-bottom: 0px;
|
|
123
|
+
margin-top: 0px;
|
|
124
|
+
color: var(--${e}-subtitle-color);
|
|
125
|
+
}
|
|
126
|
+
.${e}-text-tight-leading {
|
|
127
|
+
display: block;
|
|
128
|
+
flex-shrink: 0;
|
|
129
|
+
padding-top: var(--${e}-title-leading-gap, 0);
|
|
130
|
+
padding-bottom: var(--${e}-title-leading-gap, 0);
|
|
131
|
+
}
|
|
132
|
+
.${e}-show-text-hover .${e}-item-title,
|
|
133
|
+
.${e}-show-text-hover .${e}-item-subtitle {
|
|
134
|
+
opacity: 0;
|
|
135
|
+
transition: opacity 250ms;
|
|
136
|
+
}
|
|
137
|
+
.${e}-show-text-hover .${e}-item-inner:hover .${e}-item-title,
|
|
138
|
+
.${e}-show-text-hover .${e}-item-inner:hover .${e}-item-subtitle,
|
|
139
|
+
.${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-title,
|
|
140
|
+
.${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-subtitle {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
}
|
|
143
|
+
.${e}-hover-zoom-in .${e}-item-image,
|
|
144
|
+
.${e}-hover-zoom-in .${e}-item-video {
|
|
145
|
+
clip-path: inset(0 round var(${Tt}, 0px));
|
|
146
|
+
transition: transform ${dt}ms ${ut}, clip-path ${dt}ms ${ut};
|
|
147
|
+
}
|
|
148
|
+
.${e}-hover-scale-down .${e}-item-image,
|
|
149
|
+
.${e}-hover-scale-down .${e}-item-video {
|
|
150
|
+
transition: transform ${dt}ms ${ut};
|
|
151
|
+
}
|
|
152
|
+
.${e}-hover-greyscale .${e}-item-image-wrapper {
|
|
153
|
+
transition: filter ${dt}ms ${ut};
|
|
154
|
+
}
|
|
155
|
+
@media (hover: hover) {
|
|
156
|
+
.${e}-hover-zoom-in .${e}-item-image-wrapper:has(.${e}-item-image:hover, .${e}-item-video:hover) :is(.${e}-item-image, .${e}-item-video) {
|
|
157
|
+
transform: scale(${kt});
|
|
158
|
+
clip-path: inset(${ai} round calc(var(${Tt}, 0px) / ${kt}));
|
|
159
|
+
}
|
|
160
|
+
.${e}-hover-scale-down .${e}-item-image-wrapper:hover .${e}-item-image,
|
|
161
|
+
.${e}-hover-scale-down .${e}-item-image-wrapper:hover .${e}-item-video {
|
|
162
|
+
transform: scale(0.9);
|
|
163
|
+
}
|
|
164
|
+
.${e}-hover-greyscale:has(.${e}-item-image:hover, .${e}-item-video:hover) .${e}-item-image-wrapper:not(:has(.${e}-item-image:hover, .${e}-item-video:hover)) {
|
|
165
|
+
filter: grayscale(1);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
.${e}-type-a .${e}-item-inner,
|
|
169
|
+
.${e}-type-a .${e}-item-inner-hidden,
|
|
170
|
+
.${e}-type-d .${e}-item-inner,
|
|
171
|
+
.${e}-type-d .${e}-item-inner-hidden {
|
|
172
|
+
align-items: flex-start;
|
|
173
|
+
}
|
|
174
|
+
.${e}-type-b .${e}-item-inner,
|
|
175
|
+
.${e}-type-b .${e}-item-inner-hidden,
|
|
176
|
+
.${e}-type-e .${e}-item-inner,
|
|
177
|
+
.${e}-type-e .${e}-item-inner-hidden {
|
|
178
|
+
align-items: center;
|
|
179
|
+
}
|
|
180
|
+
.${e}-type-c .${e}-item-inner,
|
|
181
|
+
.${e}-type-c .${e}-item-inner-hidden,
|
|
182
|
+
.${e}-type-f .${e}-item-inner,
|
|
183
|
+
.${e}-type-f .${e}-item-inner-hidden {
|
|
184
|
+
align-items: flex-end;
|
|
185
|
+
}
|
|
186
|
+
.${e}-type-a .${e}-item-image-link,
|
|
187
|
+
.${e}-type-b .${e}-item-image-link,
|
|
188
|
+
.${e}-type-c .${e}-item-image-link,
|
|
189
|
+
.${e}-type-d .${e}-item-image-link,
|
|
190
|
+
.${e}-type-e .${e}-item-image-link,
|
|
191
|
+
.${e}-type-f .${e}-item-image-link {
|
|
192
|
+
align-items: center;
|
|
193
|
+
}
|
|
194
|
+
.${e}-type-a .${e}-item-title,
|
|
195
|
+
.${e}-type-a .${e}-item-subtitle,
|
|
196
|
+
.${e}-type-d .${e}-item-title,
|
|
197
|
+
.${e}-type-d .${e}-item-subtitle {
|
|
198
|
+
text-align: left;
|
|
199
|
+
}
|
|
200
|
+
.${e}-type-b .${e}-item-title,
|
|
201
|
+
.${e}-type-b .${e}-item-subtitle,
|
|
202
|
+
.${e}-type-e .${e}-item-title,
|
|
203
|
+
.${e}-type-e .${e}-item-subtitle {
|
|
204
|
+
text-align: center;
|
|
205
|
+
}
|
|
206
|
+
.${e}-type-c .${e}-item-title,
|
|
207
|
+
.${e}-type-c .${e}-item-subtitle,
|
|
208
|
+
.${e}-type-f .${e}-item-title,
|
|
209
|
+
.${e}-type-f .${e}-item-subtitle {
|
|
210
|
+
text-align: right;
|
|
211
|
+
}
|
|
212
|
+
.${e}-item-text-block {
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
align-items: flex-start;
|
|
216
|
+
width: 100%;
|
|
217
|
+
flex-shrink: 0;
|
|
218
|
+
}
|
|
219
|
+
.${e}-type-d .${e}-item-text-block {
|
|
220
|
+
align-items: flex-start;
|
|
221
|
+
}
|
|
222
|
+
.${e}-type-e .${e}-item-text-block {
|
|
223
|
+
align-items: center;
|
|
224
|
+
}
|
|
225
|
+
.${e}-type-f .${e}-item-text-block {
|
|
226
|
+
align-items: flex-end;
|
|
227
|
+
}
|
|
228
|
+
.${e}-type-a .${e}-item-text-link,
|
|
229
|
+
.${e}-type-d .${e}-item-text-link {
|
|
230
|
+
align-items: flex-start;
|
|
231
|
+
}
|
|
232
|
+
.${e}-type-b .${e}-item-text-link,
|
|
233
|
+
.${e}-type-e .${e}-item-text-link {
|
|
234
|
+
align-items: center;
|
|
235
|
+
}
|
|
236
|
+
.${e}-type-c .${e}-item-text-link,
|
|
237
|
+
.${e}-type-f .${e}-item-text-link {
|
|
238
|
+
align-items: flex-end;
|
|
239
|
+
}
|
|
240
|
+
.${e}-image-align-top .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
241
|
+
align-items: flex-start;
|
|
242
|
+
}
|
|
243
|
+
.${e}-image-align-center .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
244
|
+
align-items: center;
|
|
245
|
+
}
|
|
246
|
+
.${e}-image-align-bottom .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
247
|
+
align-items: flex-end;
|
|
248
|
+
}
|
|
249
|
+
.${e}-image-align-top .${e}-item-slider .splide__slide {
|
|
250
|
+
align-items: flex-start;
|
|
251
|
+
}
|
|
252
|
+
.${e}-image-align-center .${e}-item-slider .splide__slide {
|
|
253
|
+
align-items: center;
|
|
254
|
+
}
|
|
255
|
+
.${e}-image-align-bottom .${e}-item-slider .splide__slide {
|
|
256
|
+
align-items: flex-end;
|
|
257
|
+
}
|
|
258
|
+
.${e}-align-entries .${e}-item {
|
|
259
|
+
display: contents;
|
|
260
|
+
}
|
|
261
|
+
.${e}-align-entries .${e}-item-inner,
|
|
262
|
+
.${e}-align-entries .${e}-item-inner-hidden {
|
|
263
|
+
display: grid;
|
|
264
|
+
grid-template-rows: subgrid;
|
|
265
|
+
grid-row: span 3;
|
|
266
|
+
justify-self: center;
|
|
267
|
+
margin-bottom: var(--${e}-align-entries-row-gap, 0);
|
|
268
|
+
}
|
|
269
|
+
.${e}-align-entries .${e}-item-inner-last-row {
|
|
270
|
+
margin-bottom: 0;
|
|
271
|
+
}
|
|
272
|
+
.${e}-align-entries .${e}-item-text-link {
|
|
273
|
+
display: contents;
|
|
274
|
+
}
|
|
275
|
+
.${e}-align-entries .${e}-item-title-row,
|
|
276
|
+
.${e}-align-entries .${e}-item-subtitle-row {
|
|
277
|
+
display: flex;
|
|
278
|
+
flex-direction: column;
|
|
279
|
+
align-items: flex-start;
|
|
280
|
+
width: 100%;
|
|
281
|
+
min-height: 100%;
|
|
282
|
+
}
|
|
283
|
+
.${e}-type-a.${e}-align-entries .${e}-item-title-row,
|
|
284
|
+
.${e}-type-a.${e}-align-entries .${e}-item-subtitle-row,
|
|
285
|
+
.${e}-type-d.${e}-align-entries .${e}-item-title-row,
|
|
286
|
+
.${e}-type-d.${e}-align-entries .${e}-item-subtitle-row {
|
|
287
|
+
align-items: flex-start;
|
|
288
|
+
}
|
|
289
|
+
.${e}-type-b.${e}-align-entries .${e}-item-title-row,
|
|
290
|
+
.${e}-type-b.${e}-align-entries .${e}-item-subtitle-row,
|
|
291
|
+
.${e}-type-e.${e}-align-entries .${e}-item-title-row,
|
|
292
|
+
.${e}-type-e.${e}-align-entries .${e}-item-subtitle-row {
|
|
293
|
+
align-items: center;
|
|
294
|
+
}
|
|
295
|
+
.${e}-type-c.${e}-align-entries .${e}-item-title-row,
|
|
296
|
+
.${e}-type-c.${e}-align-entries .${e}-item-subtitle-row,
|
|
297
|
+
.${e}-type-f.${e}-align-entries .${e}-item-title-row,
|
|
298
|
+
.${e}-type-f.${e}-align-entries .${e}-item-subtitle-row {
|
|
299
|
+
align-items: flex-end;
|
|
300
|
+
}
|
|
301
|
+
.${e}-align-entries .${e}-item-image-link {
|
|
302
|
+
width: 100%;
|
|
303
|
+
height: 100%;
|
|
304
|
+
min-height: 100%;
|
|
305
|
+
display: flex;
|
|
306
|
+
flex-direction: column;
|
|
307
|
+
align-items: center;
|
|
308
|
+
justify-content: flex-start;
|
|
309
|
+
}
|
|
310
|
+
.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
311
|
+
flex-shrink: 0;
|
|
312
|
+
height: auto;
|
|
313
|
+
align-self: auto;
|
|
314
|
+
}
|
|
315
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
316
|
+
margin-top: 0;
|
|
317
|
+
margin-bottom: auto;
|
|
318
|
+
}
|
|
319
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
320
|
+
margin-top: auto;
|
|
321
|
+
margin-bottom: auto;
|
|
322
|
+
}
|
|
323
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
324
|
+
margin-top: auto;
|
|
325
|
+
margin-bottom: 0;
|
|
326
|
+
}
|
|
327
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
328
|
+
align-items: flex-start;
|
|
329
|
+
}
|
|
330
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
331
|
+
align-items: center;
|
|
332
|
+
}
|
|
333
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
334
|
+
align-items: flex-end;
|
|
335
|
+
}
|
|
336
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
337
|
+
align-items: flex-start;
|
|
338
|
+
}
|
|
339
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
340
|
+
align-items: center;
|
|
341
|
+
}
|
|
342
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
343
|
+
align-items: flex-end;
|
|
344
|
+
}
|
|
345
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-link {
|
|
346
|
+
justify-content: flex-start;
|
|
347
|
+
}
|
|
348
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-link {
|
|
349
|
+
justify-content: center;
|
|
350
|
+
}
|
|
351
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-link {
|
|
352
|
+
justify-content: flex-end;
|
|
353
|
+
}
|
|
354
|
+
.${e}-lightbox-counter {
|
|
355
|
+
margin: 0;
|
|
356
|
+
color: var(--${e}-lightbox-counter-color);
|
|
357
|
+
}
|
|
358
|
+
.${e}-lightbox {
|
|
359
|
+
position: fixed;
|
|
360
|
+
inset: 0;
|
|
361
|
+
z-index: 9997;
|
|
362
|
+
overscroll-behavior: none;
|
|
363
|
+
overflow: hidden;
|
|
364
|
+
}
|
|
365
|
+
.${e}-lightbox-editor {
|
|
366
|
+
inset: auto;
|
|
367
|
+
top: var(--cntrl-article-top, 0);
|
|
368
|
+
left: var(--cntrl-article-left, 0);
|
|
369
|
+
width: var(--cntrl-article-width, 100vw) !important;
|
|
370
|
+
height: var(--cntrl-viewport-height, 100vh) !important;
|
|
371
|
+
}
|
|
372
|
+
.${e}-control {
|
|
373
|
+
position: relative;
|
|
374
|
+
z-index: 2;
|
|
375
|
+
width: 100%;
|
|
376
|
+
}
|
|
377
|
+
.${e}-close-icon {
|
|
378
|
+
position: relative;
|
|
379
|
+
flex-shrink: 0;
|
|
380
|
+
pointer-events: auto;
|
|
381
|
+
z-index: 2;
|
|
382
|
+
display: flex;
|
|
383
|
+
align-items: center;
|
|
384
|
+
justify-content: center;
|
|
385
|
+
border: none;
|
|
386
|
+
background-color: transparent;
|
|
387
|
+
padding: 0;
|
|
388
|
+
}
|
|
389
|
+
.${e}-close-icon-inner {
|
|
390
|
+
all: unset;
|
|
391
|
+
position: relative;
|
|
392
|
+
cursor: pointer;
|
|
393
|
+
width: 100%;
|
|
394
|
+
height: 100%;
|
|
395
|
+
pointer-events: auto;
|
|
396
|
+
}
|
|
397
|
+
.${e}-close-icon-img {
|
|
398
|
+
position: absolute;
|
|
399
|
+
top: 50%;
|
|
400
|
+
left: 50%;
|
|
401
|
+
transform: translate(-50%, -50%);
|
|
402
|
+
}
|
|
403
|
+
`}function di(){return Math.random()<.5?"ltr":"ttb"}function ui(e){const i=e.Components.Autoplay;i&&(i.pause(!1),i.play())}function mi(e){const i=di();e.options.direction!==i&&(e.options={...e.options,direction:i}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ui(e)})})}const D=500,gi=750,le="cubic-bezier(0.22, 1, 0.36, 1)",hi=72,pi=50;function fi(e){if(!Array.isArray(e)||e.length===0)return!1;const i=e[0];return i!==null&&typeof i=="object"&&"media"in i&&Array.isArray(i.media)}function $i(e){const[i,n]=e.media;return n!=null&&n.assetId?n:i!=null&&i.assetId?i:null}function yi(e){const[i]=e.media;return i!=null&&i.assetId?i:null}function Gt(e){return!Array.isArray(e)||e.length===0?[]:fi(e)?e.flatMap(i=>{const n=$i(i);if(!n)return[];const a=yi(i);return[{displayMedia:n,lightboxMedia:a!=null&&a.assetId?a:null}]}):e.filter(i=>i==null?void 0:i.assetId).map(i=>({displayMedia:i,lightboxMedia:i}))}function xe(e){return!H.isEmbedMedia(e)&&e.type==="video"}function xi(e){const i=new Set,n=[];for(const a of e){const o=Gt(a.gallery);for(const x of o){const y=x.lightboxMedia;y!=null&&y.assetId&&!i.has(y.assetId)&&(i.add(y.assetId),n.push(y))}}return n}function vi({mediaList:e}){const[i,n]=r.useState(null);qt.useLazyVideos(i,{preload:"metadata"});const a=e.filter(o=>!H.isEmbedMedia(o));return a.length===0?null:t.jsx("div",{ref:n,"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:a.map(o=>xe(o)?t.jsx("video",{src:o.assetId,preload:"none",muted:!0,playsInline:!0},o.assetId):t.jsx("img",{src:o.assetId,alt:""},o.assetId))})}function wi(e){e.pause(),e.removeAttribute("src"),e.load()}const bi=".splide__slide video";function Si(e){var o;if(e.closest(".splide--fade, .splide__slide.is-active:not(.splide__slide--clone), .splide__slide.is-next"))return!0;const i=e.closest(".splide__slide");if(!i||i.classList.contains("splide__slide--clone"))return!1;const n=i.dataset.slideIndex,a=(o=i.parentElement)==null?void 0:o.querySelector(".splide__slide.is-next");return n!==void 0&&(a==null?void 0:a.dataset.slideIndex)===n}function Dt({media:e,className:i,style:n,hasLightbox:a,isSplideSlide:o=!1,onMediaClick:x}){if(H.isEmbedMedia(e))return t.jsx(H.EmbedMediaFrame,{media:e,fit:n.objectFit==="contain"?"contain":"cover",silentLoop:a,className:i,style:{...n,cursor:x?"pointer":"default"},onClick:x});if(xe(e)){const y={src:e.assetId,className:i,style:{...n,cursor:x?"pointer":"default"},muted:!0,loop:!0,playsInline:!0,onClick:x};return o?t.jsx("video",{...y,preload:"none"}):t.jsx(Bt.LazyVideo,{...y,autoPlay:!0})}return t.jsx("img",{src:e.assetId,alt:e.name,className:i,style:{...n,cursor:x?"pointer":"default"},onClick:x})}function ji({className:e,style:i,children:n}){const[a,o]=r.useState(null);return qt.useLazyVideos(a,{autoPlay:!0,selector:bi,shouldPlay:Si}),t.jsx("div",{ref:o,className:e,style:i,children:n})}function Ht(e){const i=e.getBoundingClientRect();return{width:i.width,height:i.height,left:i.left,top:i.top}}function Ci(e,i){if(!i||!i.width||!i.height||!e.width||!e.height)return e;const n=i.width/i.height,a=e.width/e.height;if(n>a){const x=e.width/n;return{width:e.width,height:x,left:e.left,top:e.top+(e.height-x)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function Ii({src:e,mediaRef:i,mediaStyle:n,onLoadedMetadata:a}){return r.useEffect(()=>{const o=i.current;if(o)return()=>{wi(o)}},[e,i]),t.jsx("video",{ref:i,src:e,muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onLoadedMetadata:a,style:n})}const ki="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",Ti=.004;function Li({prefix:e,closeIcon:i=ki,closeIconMaxWidth:n=.0125,closeIconColor:a="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:x=.01,contentMarginTop:y=.01,isEditor:q,isPreviewMode:ae,isEditMode:s,visible:V,onClose:Z}){if(!i)return null;const J=f.scalingValue(n,q),ce=f.scalingValue(x,q),ve=f.scalingValue(y,q),S=f.scalingValue(Math.max(y,Ti),q);return t.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:V?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[t.jsx("div",{style:{position:"relative",width:"100%",height:ve,flexShrink:0},children:s&&t.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:S,pointerEvents:V?"auto":"none"}})}),t.jsxs("div",{className:`${e}-close-icon`,style:{width:J,height:J,marginRight:ce,pointerEvents:V?"auto":"none"},onClick:j=>j.stopPropagation(),children:[t.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:j=>{j.stopPropagation(),Z()},children:t.jsx(oi.SvgImage,{url:i,fill:a,hoverFill:q&&!ae?a:o,className:`${e}-close-icon-img`})}),s&&t.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ce,height:"100%",pointerEvents:V?"auto":"none"}})]})]})}function _i({prefix:e,items:i,index:n,imageDisplay:a,isEditor:o,isPreviewMode:x,isEditMode:y,onClose:q,onPrev:ae,onNext:s,counterClassName:V,counterStyle:Z,closeIcon:J,closeIconMaxWidth:ce,closeIconColor:ve,closeIconHoverColor:S,iconMarginRight:j,contentMarginTop:Xe}){const we=a==="cover",ze=r.useRef(null),de=r.useRef(null),ue=r.useRef(null),L=r.useRef(null),B=r.useRef(0),_=r.useRef(0),N=r.useRef("none"),G=r.useRef(!1),Q=r.useRef(!1),Ue=r.useRef(null),k=r.useRef(0),M=r.useRef(null),R=r.useRef(!1),ie=r.useRef(null),X=r.useRef(null),Fe=r.useRef(null),Ye=r.useRef(()=>{}),[m,Ve]=r.useState(null),[c,mt]=r.useState(null),[w,be]=r.useState("opening"),[P,O]=r.useState(0),[me,W]=r.useState(0),[Ae,ne]=r.useState(null),[Me,ge]=r.useState(!1),[Se,he]=r.useState(!1),[gt,Ke]=r.useState(!1),[ht,Ze]=r.useState(null),Oe=r.useRef(n),Je=r.useRef(void 0),d=i[n],pt=d?xe(d):!1,Qe=d?H.isEmbedMedia(d):!1,je=Ae!==null,Pe=r.useCallback(l=>{const u=l.currentTarget,I=u instanceof HTMLVideoElement?{width:u.videoWidth,height:u.videoHeight}:{width:u.naturalWidth,height:u.naturalHeight};!I.width||!I.height||Ze(I)},[]);r.useEffect(()=>{Ue.current=c},[c]),r.useEffect(()=>{const l=ze.current;if(!l)return;const u=()=>mt(Ht(l));u();const I=new ResizeObserver(u);return I.observe(l),()=>I.disconnect()},[]);const C=r.useCallback(()=>{ie.current!==null&&(window.clearTimeout(ie.current),ie.current=null)},[]),U=r.useCallback(()=>{const l=X.current;X.current=null,C(),M.current=null,R.current=!1,ne(null),ge(!1),W(0),k.current=0,he(!1),G.current=!1,_.current=0,N.current="none",l===1?s():l===-1&&ae()},[C,s,ae]),Ce=r.useCallback(()=>{C(),X.current=null,M.current=null,R.current=!1,ne(null),ge(!1),W(0),k.current=0},[C]),ft=r.useCallback(()=>{C(),ie.current=window.setTimeout(()=>{X.current!==null&&U()},D+32)},[C,U]),pe=r.useCallback((l,u)=>{var ee;const I=((ee=Ue.current)==null?void 0:ee.width)??0;if(C(),M.current=l,ne(l),R.current=!0,ge(!0),u){X.current=l;const se=-l*I;k.current=se,W(se),ft();return}k.current=0,W(0),ie.current=window.setTimeout(()=>{ie.current=null,Ce()},D+32)},[C,Ce,ft]),fe=r.useCallback(l=>{if(!(i.length<=1)){if(R.current){if(X.current===l){Fe.current=l,U();return}Ce()}C(),M.current=l,ne(l),R.current=!1,ge(!1),k.current=0,W(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{pe(l,!0)})})}},[i.length,pe,U,Ce,C]);Ye.current=fe;const Ie=r.useCallback(l=>{l.propertyName!=="transform"||!R.current||X.current!==null&&U()},[U]),$e=r.useCallback(()=>{const l=de.current;if(!l)return;const u=Ht(l);!u.width||!u.height||Ve(u)},[]);r.useEffect(()=>{$e();const l=de.current;if(!l)return;const u=new ResizeObserver(()=>$e());return u.observe(l),()=>u.disconnect()},[$e]),r.useEffect(()=>{w==="opening"&&m&&be("open")},[w,m]),r.useEffect(()=>{if(w!=="closing")return;const l=setTimeout(()=>q(),D);return()=>clearTimeout(l)},[w,q]),r.useEffect(()=>()=>{C()},[C]),r.useLayoutEffect(()=>{Oe.current===n&&Je.current===(d==null?void 0:d.assetId)||(C(),X.current=null,ne(null),O(0),W(0),ge(!1),Ke(!1),he(!1),Ze(null),B.current=0,_.current=0,N.current="none",G.current=!1,R.current=!1,k.current=0,M.current=null,L.current=null,Q.current=!1,Oe.current=n,Je.current=d==null?void 0:d.assetId)},[n,d==null?void 0:d.assetId,C]),r.useLayoutEffect(()=>{const l=Fe.current;l!==null&&(Fe.current=null,requestAnimationFrame(()=>{Ye.current(l)}))},[n,d==null?void 0:d.assetId]),r.useEffect(()=>{if(w!=="open")return;let l=null;const u=()=>{l&&(document.removeEventListener("click",l,!0),l=null)},I=()=>{u(),l=h=>{h.stopPropagation(),h.preventDefault(),u()},document.addEventListener("click",l,!0)},ee=h=>{const z=h<0?1:-1;if(Math.abs(h)>pi&&i.length>1){pe(z,!0);return}pe(z,!1)},se=h=>{if(h.touches.length!==1||R.current)return;const z=h.touches[0];Q.current=!0,L.current={x:z.clientX,y:z.clientY},N.current="none",_.current=0,G.current=!1},He=h=>{if(!L.current||h.touches.length!==1||R.current)return;const z=h.touches[0],te=z.clientX-L.current.x,v=z.clientY-L.current.y;if(N.current==="none"){if(Math.abs(te)<10&&Math.abs(v)<10)return;if(Math.abs(te)>Math.abs(v)){if(i.length<=1)return;N.current="horizontal"}else if(v>0)N.current="vertical";else return}if(N.current==="horizontal"){G.current=!0,he(!0),_.current=te;const F=te<0?1:-1;M.current!==F&&(M.current=F,ne(F)),k.current=te,W(te),h.preventDefault();return}N.current==="vertical"&&(G.current=!0,he(!0),B.current=v,O(v),h.preventDefault())},Le=()=>{if(!L.current)return;const h=N.current,z=G.current;if(z&&h==="horizontal")ee(_.current),I();else if(z&&h==="vertical")if(B.current>hi){const v=window.innerHeight;B.current=v,Ke(!0),O(v),be("closing")}else B.current=0,O(0),I();else h==="horizontal"&&Math.abs(_.current)>0&&(ee(_.current),I());L.current=null,N.current="none",_.current=0,G.current=!1,he(!1)};return document.addEventListener("touchstart",se,{passive:!0}),document.addEventListener("touchmove",He,{passive:!1}),document.addEventListener("touchend",Le),document.addEventListener("touchcancel",Le),()=>{document.removeEventListener("touchstart",se),document.removeEventListener("touchmove",He),document.removeEventListener("touchend",Le),document.removeEventListener("touchcancel",Le),u()}},[w,i.length,pe]),r.useEffect(()=>{const l=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),w!=="closing"&&be("closing"))};return window.addEventListener("keydown",l,!0),()=>window.removeEventListener("keydown",l,!0)},[w]);const ke=()=>{w!=="closing"&&be("closing")},ye=w==="open",We=w==="closing",$t=P>0?Math.max(0,1-P/500):1,yt=P>0?Math.max(.35,1-P/500):1,xt=Qe&&d?{width:H.getEmbedAspect(d),height:1}:ht,g=m?we?m:Ci(m,xt):null,et={position:"fixed",top:c==null?void 0:c.top,left:c==null?void 0:c.left,width:c==null?void 0:c.width,height:c==null?void 0:c.height,zIndex:9998},Y=we?"cover":"contain",vt=me!==0||P>0?`translate(${me}px, ${P}px)`:void 0,Te=Se&&!Me?"none":Me?`transform ${D}ms ${le}`:gt?`transform ${D}ms ${le}, opacity ${D}ms ${le}`:w==="opening"||We?`opacity ${D}ms ${le}`:"none",Ee={...et,transform:vt,opacity:P>0?yt:w==="opening"||We?0:1,transition:Te,pointerEvents:"none"},De={position:"absolute",top:((g==null?void 0:g.top)??0)-((c==null?void 0:c.top)??0),left:((g==null?void 0:g.left)??0)-((c==null?void 0:c.left)??0),width:g==null?void 0:g.width,height:g==null?void 0:g.height,objectFit:Y,pointerEvents:"none"},tt=(c==null?void 0:c.width)??0,re=je?(n+Ae+i.length)%i.length:null,T=re!==null?i[re]:null,Lt={...et,transform:je?`translateX(${Ae*tt+me}px)`:void 0,opacity:1,transition:Me?`transform ${D}ms ${le}`:"none",pointerEvents:"none"},it={position:"absolute",top:((m==null?void 0:m.top)??0)-((c==null?void 0:c.top)??0),left:((m==null?void 0:m.left)??0)-((c==null?void 0:c.left)??0),width:m==null?void 0:m.width,height:m==null?void 0:m.height,objectFit:Y,pointerEvents:"none"},wt=Qe&&d&&H.getEmbedPlayback(d).controls&&g?Math.min(52,g.height*.2):0,E=g?{position:"fixed",top:g.top,height:g.height-wt,width:g.width/2,zIndex:9999}:null;return t.jsxs("div",{ref:ze,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:w==="open"?"none":void 0},onClick:ke,children:[t.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:ye?$t:0,transition:Se?"none":`opacity ${D}ms ${le}`,pointerEvents:"none"}}),t.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:we?t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:de,style:{position:"absolute",inset:0}}),t.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ye?1:0,transition:`opacity ${D}ms ${le}`,pointerEvents:"none",zIndex:9999},children:i.length>1&&t.jsxs("p",{className:V,style:Z,children:[n+1," / ",i.length]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{height:"10%"}}),t.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:t.jsx("div",{ref:de,style:{width:"100%",height:"100%"}})}),t.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ye?1:0,transition:`opacity ${D}ms ${le}`},children:i.length>1&&t.jsxs("p",{className:V,style:Z,children:[n+1," / ",i.length]})})]})}),m&&c&&T&&t.jsx("div",{style:Lt,onTransitionEnd:Ie,children:H.isEmbedMedia(T)?t.jsx("img",{src:T.thumbnail,alt:T.name,style:it},`neighbor-${re}-${T.assetId}`):xe(T)?t.jsx("video",{src:T.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",style:it},`neighbor-${re}-${T.assetId}`):t.jsx("img",{src:T.assetId,alt:T.name,style:it},`neighbor-${re}-${T.assetId}`)}),m&&c&&d&&t.jsx("div",{style:Ee,onTransitionEnd:Ie,children:Qe?t.jsx(H.EmbedMediaFrame,{media:d,fit:we?"cover":"contain",lazy:!1,startsAtOnce:!0,style:De},`${n}-${d.assetId}`):pt?t.jsx(Ii,{src:d.assetId,mediaRef:ue,mediaStyle:De,onLoadedMetadata:Pe},`${n}-${d.assetId}`):t.jsx("img",{ref:ue,src:d.assetId,alt:d.name,onLoad:Pe,style:De},`${n}-${d.assetId}`)}),ye&&E&&i.length>1&&t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{...E,left:g.left,cursor:"w-resize",pointerEvents:Se?"none":"auto"},onClick:l=>{if(Q.current){Q.current=!1;return}l.stopPropagation(),fe(-1)}}),t.jsx("div",{style:{...E,left:g.left+g.width/2,cursor:"e-resize",pointerEvents:Se?"none":"auto"},onClick:l=>{if(Q.current){Q.current=!1;return}l.stopPropagation(),fe(1)}})]}),t.jsx(Li,{prefix:e,closeIcon:J,closeIconMaxWidth:ce,closeIconColor:ve,closeIconHoverColor:S,iconMarginRight:j,contentMarginTop:Xe,isEditor:o,isPreviewMode:x,isEditMode:y,visible:ye,onClose:ke})]})}function Ni(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Ri({settings:e,content:i,isEditor:n,isPreviewMode:a,isEditMode:o,metadata:x,activeEvent:y,layoutId:q,portalId:ae}){const{prefix:s}=ri.useScopedStyles(),{type:V="a",gridLayout:Z,textBoxWidth:J=100,verticalGap:ce,entriesCount:ve,lightbox:S,imageDisplay:j,imageCorners:Xe,lightboxImageDisplay:we,slider:ze,sliderTiming:de,direction:ue,transition:L,titleMarginTop:B,subtitleMarginTop:_,titleColor:N,subtitleColor:G,lightboxCounterColor:Q,titleFontFamily:Ue,titleFontSettings:k,titleFontSize:M,titleLineHeight:R,titleLetterSpacing:ie,titleWordSpacing:X,titleTextAppearance:Fe,subtitleFontFamily:Ye,subtitleFontSettings:m,subtitleFontSize:Ve,subtitleLineHeight:c,subtitleLetterSpacing:mt,subtitleWordSpacing:w,subtitleTextAppearance:be,lightboxCounterFontFamily:P,lightboxCounterFontSettings:O,lightboxCounterFontSize:me,lightboxCounterLineHeight:W,lightboxCounterLetterSpacing:Ae,lightboxCounterWordSpacing:ne,lightboxCounterTextAppearance:Me,closeIcon:ge,closeIconMaxWidth:Se,closeIconColor:he,closeIconHoverColor:gt,iconMarginRight:Ke,contentMarginTop:ht,showText:Ze="always",hover:Oe="none",alignEntries:Je="off",align:d="top"}=e,pt={fontSettings:{fontFamily:Ue,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:M??.01,lineHeight:R,letterSpacing:ie??0,wordSpacing:X??0,textAppearance:Fe,color:N},je={...Re.omitTextColors(Re.textStylesToCss(pt,n))},Pe={fontSettings:{fontFamily:Ye,fontWeight:(m==null?void 0:m.fontWeight)??400,fontStyle:(m==null?void 0:m.fontStyle)??"normal"},fontSize:Ve??.01,lineHeight:c,letterSpacing:mt??0,wordSpacing:w??0,textAppearance:be,color:G},U={...Re.omitTextColors(Re.textStylesToCss(Pe,n))},Ce={fontSettings:{fontFamily:P,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:me??.01,lineHeight:W,letterSpacing:Ae??0,wordSpacing:ne??0,textAppearance:Me,color:Q},pe={...Re.omitTextColors(Re.textStylesToCss(Ce,n)),...It(me,W,s,n)},fe=Ct(M,R,`${s}-item-title`,`${s}-text-tight-leading`),Ie=Ct(Ve,c,`${s}-item-subtitle`,`${s}-text-tight-leading`),$e=It(M,R,s,n),ke=It(Ve,c,s,n),ye=Ct(me,W,`${s}-lightbox-counter`,`${s}-text-tight-leading`),We=ni.buildColorVars(s,{titleColor:N,subtitleColor:G,lightboxCounterColor:Q},zi,Fi),$t=y&&y!=="default"?`${s}-state-${y}`:"",yt=Ze==="on hover"&&(!n||a),xt=Oe!=="none"&&(!n||a)?` ${s}-hover-${Oe}`:"",g=`${$t}${yt?` ${s}-show-text-hover`:""}${xt}`.trim(),et=ve===0?1/0:ve,Y=(i??[]).slice(0,et),vt=r.useMemo(()=>S==="on"?xi(Y):[],[Y,S]),Te=Z.entryWidth??.2,Ee=(j==null?void 0:j.display)==="cover",De=(j==null?void 0:j.ratioValue)??"1:1",tt=(j==null?void 0:j.reversed)??!1,[re,T]=De.split(":").map(Number),wt=`${tt?T:re} / ${tt?re:T}`,E=Z.columnsCount,l=f.scalingValue(Te??0,n),u=l,I=!Ee&&ze!=="off",ee=Y.length%E||E,se=ee<E&&Y.length>0,He=Y.length-ee,Le=se?Math.floor((E-ee)/2)+1:1,h=Xe?f.scalingValue(Xe,n):void 0,z={width:u,...Ee?{aspectRatio:wt,height:"auto",overflow:"hidden"}:{height:"auto"},...h?{borderRadius:h,overflow:"hidden"}:{}},te=`${s}-item-image-wrapper${I?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),v=V==="d"||V==="e"||V==="f",F=Je==="on",_e=`calc(${f.scalingValue(Te??0,n)} * (${J} / 100))`,oe=f.scalingValue(Te*J/100,n),_t=h?{borderRadius:h,[Tt]:h}:{},Nt=Ee?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",..._t}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",..._t},[Xt,Ut]=r.useState(0),nt=r.useRef(null),Yt=L==="fade"||ue==="horizontal"?"ltr":ue==="vertical"?"ttb":"ltr";r.useEffect(()=>{const p=nt.current;if(!p)return;const b=new ResizeObserver(A=>{Ut(Math.round(A[0].contentRect.width))});return b.observe(p),()=>b.disconnect()},[]);const Kt=(()=>{const p={...We},b=nt.current?getComputedStyle(nt.current).getPropertyValue("--cntrl-article-width").trim():"";return b&&(p["--cntrl-article-width"]=b),p})(),[bt,St]=r.useState(!1),[rt,Zt]=r.useState([]),[Jt,jt]=r.useState(0),Rt=S==="on"&&(!n||a),zt=(p,b)=>{n&&!a||S!=="off"&&(Zt(p),jt(b),St(!0))};r.useEffect(()=>{if(!bt||S!=="on"||typeof document>"u")return;const p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}},[bt,S]),r.useEffect(()=>{!n||a||St(!1)},[n,a]);const Qt=r.useMemo(()=>ci(s),[s]);return t.jsxs(t.Fragment,{children:[t.jsx("style",{dangerouslySetInnerHTML:{__html:Qt}}),S==="on"&&t.jsx(vi,{mediaList:vt}),t.jsx("div",{style:We,children:t.jsx("div",{ref:nt,className:`${s}-wrapper ${s}-type-${V}${F?` ${s}-align-entries`:""} ${s}-image-align-${d} ${g}`.trim(),style:{gridTemplateColumns:`repeat(${E}, ${l})`,rowGap:F?0:f.scalingValue(ce??0,n),columnGap:f.scalingValue(Z.horizontalGap??0,n),width:f.scalingValue(Z.wrapperWidth??0,n),...F?{[`--${s}-align-entries-row-gap`]:f.scalingValue(ce??0,n)}:{}},children:Y.map((p,b)=>{var Ot;const A=Et(p.title),K=Et(p.subtitle),Ne=S==="off"&&((Ot=p.link)!=null&&Ot.value)?p.link:void 0,Pt=Math.floor(b/E)===Math.ceil(Y.length/E)-1,st=se&&b>=He?`${Le+(b-He)}`:void 0,Ft=v?t.jsxs("div",{className:`${s}-item-text-block`,children:[A&&t.jsx("p",{className:fe,style:{width:_e,...je,...$e},children:p.title}),A&&t.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:f.scalingValue(B??0,n),width:oe}}),K&&t.jsx("p",{className:Ie,style:{width:_e,...U,...ke},children:p.subtitle}),K&&t.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:f.scalingValue(_??0,n),width:oe}})]}):null,ei=F?t.jsxs("div",{className:`${s}-item-title-row`,children:[!v&&t.jsx("div",{"data-controls":o&&A?"titleMarginTop":void 0,className:o&&A?`${s}-control`:void 0,style:{height:A?f.scalingValue(B??0,n):0,width:oe}}),A&&t.jsx("p",{className:fe,style:{width:_e,...je,...$e},children:p.title}),v&&A&&t.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:f.scalingValue(B??0,n),width:oe}})]}):null,ti=F?t.jsxs("div",{className:`${s}-item-subtitle-row`,children:[!v&&t.jsx("div",{"data-controls":o&&K?"subtitleMarginTop":void 0,className:o&&K?`${s}-control`:void 0,style:{height:K?f.scalingValue(_??0,n):0,width:oe}}),K&&t.jsx("p",{className:Ie,style:{width:_e,...U,...ke},children:p.subtitle}),v&&K&&t.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:f.scalingValue(_??0,n),width:oe}})]}):null,Vt=t.jsxs(ct.LinkWrapper,{link:Ne,className:`${s}-item-text-link`,children:[ei,ti]}),qe=Gt(p.gallery),ot=qe.filter($=>$.lightboxMedia).map($=>$.lightboxMedia),lt=t.jsx(ji,{className:te,style:z,children:qe.length===0?null:ze==="off"?(()=>{const{displayMedia:$,lightboxMedia:Be}=qe[0],Ge=Be?ot.findIndex(at=>at.assetId===Be.assetId):-1;return t.jsx(Dt,{media:$,className:`${s}-item-${xe($)?"video":"image"}`.trim(),style:Nt,hasLightbox:S==="on",onMediaClick:Rt&&Ge>=0?()=>zt(ot,Ge):void 0})})():t.jsxs(t.Fragment,{children:[I&&t.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:qe.map(({displayMedia:$})=>H.isEmbedMedia($)?t.jsx("div",{style:{aspectRatio:`${H.getEmbedAspect($)}`}},`sizer-${$.assetId}`):xe($)?t.jsx(Bt.LazyVideo,{src:$.assetId,nearPreload:"metadata",muted:!0,playsInline:!0},`sizer-${$.assetId}`):t.jsx("img",{src:$.assetId,alt:""},`sizer-${$.assetId}`))}),t.jsx(Wt.Splide2,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:de*1e3,width:"100%",height:"100%",speed:gi,type:L==="fade"?"fade":"loop",rewind:L==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:Yt},onMoved:$=>{ue!=="random"||L==="fade"||mi($)},children:qe.map(({displayMedia:$,lightboxMedia:Be},Ge)=>{const at=Be?ot.findIndex(ii=>ii.assetId===Be.assetId):-1;return t.jsx(Wt.SplideSlide,{"data-slide-index":Ge,children:t.jsx(Dt,{media:$,className:`${s}-item-${xe($)?"video":"image"}`.trim(),style:Nt,hasLightbox:S==="on",isSplideSlide:!0,onMediaClick:Rt&&at>=0?()=>zt(ot,at):void 0})},Ge)})},`${L}-${Te}-${ue}-${de}-${Xt}-${q}`)]})}),At=v?null:t.jsxs(t.Fragment,{children:[t.jsx("div",{"data-controls":o&&A?"titleMarginTop":void 0,className:o&&A?`${s}-control`:void 0,style:{height:A?f.scalingValue(B??0,n):0,width:oe}}),t.jsx("p",{className:fe,style:{width:_e,...je,...$e},children:p.title}),t.jsx("div",{"data-controls":o&&K?"subtitleMarginTop":void 0,className:o&&K?`${s}-control`:void 0,style:{height:K?f.scalingValue(_??0,n):0,width:oe}}),t.jsx("p",{className:Ie,style:{width:_e,...U,...ke},children:p.subtitle})]}),Mt=Ne?t.jsx(ct.LinkWrapper,{link:Ne,className:`${s}-item-image-link`,children:lt}):t.jsx("a",{className:`${s}-item-image-link`,children:lt});return t.jsx("div",{className:`${s}-item`.trim(),style:st&&!F?{gridColumn:st}:void 0,children:t.jsx("div",{className:`${o?`${s}-item-inner`:`${s}-item-inner-hidden`}${F&&Pt?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(J??0)>100?`calc(${l} * (${J} / 100))`:l,...st&&F?{gridColumn:st}:{}},children:F?t.jsx(t.Fragment,{children:v?t.jsxs(t.Fragment,{children:[Vt,Mt]}):t.jsxs(t.Fragment,{children:[Mt,Vt]})}):Ne?t.jsxs(t.Fragment,{children:[t.jsxs(ct.LinkWrapper,{link:Ne,className:`${s}-item-image-link`,children:[Ft,lt]}),!v&&t.jsx(ct.LinkWrapper,{link:Ne,className:`${s}-item-text-link`,children:At})]}):t.jsxs(t.Fragment,{children:[Ft,lt,At]})})},b)})})}),(!n||a)&&bt&&typeof document<"u"&&S==="on"&&(()=>{const p=(ae?document.getElementById(ae):null)??document.body;return si.createPortal(t.jsx("div",{style:Kt,"data-selection":"none",children:t.jsx(_i,{prefix:s,items:rt,index:Jt,imageDisplay:Ni(we),isEditor:n,isPreviewMode:a,isEditMode:o,closeIcon:ge,closeIconMaxWidth:Se,closeIconColor:he,closeIconHoverColor:gt,iconMarginRight:Ke,contentMarginTop:ht,onClose:()=>St(!1),onPrev:()=>jt(b=>(b-1+rt.length)%rt.length),onNext:()=>jt(b=>(b+1)%rt.length),counterClassName:ye,counterStyle:pe})}),p)})()]})}const zi={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Fi=["hover","focus","filled","success","error"];exports.Grid=Ri;
|