@cntrl-site/components 1.0.49 → 1.0.50

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/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),nt=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),gi=require("react-dom");function $c(e){return e.type==="object"&&e.version===1}const Cc="ControlSlider-module__wrapper___sHEkd",Tc="ControlSlider-module__hoverArrow___A-dOH",Lc="ControlSlider-module__sliderItem___QQSkR",Ic="ControlSlider-module__sliderImage___9hRl-",Rc="ControlSlider-module__arrow___05ghY",Ec="ControlSlider-module__arrowVertical___tBfVN",Mc="ControlSlider-module__nextArrow___-30Yc",kc="ControlSlider-module__arrowInner___aEra3",Pc="ControlSlider-module__arrowIcon___S4ztF",Ac="ControlSlider-module__arrowImg___2dwJW",Fc="ControlSlider-module__mirror___brd6U",Wc="ControlSlider-module__pagination___bicLF",_c="ControlSlider-module__paginationInner___bT-P-",Nc="ControlSlider-module__paginationVertical___zYqKw",Hc="ControlSlider-module__paginationItem___nTRbk",jc="ControlSlider-module__dot___p1Qun",Oc="ControlSlider-module__activeDot___LHFaj",zc="ControlSlider-module__paginationInsideBottom___R3FWn",Bc="ControlSlider-module__paginationInsideTop___V-qb-",Dc="ControlSlider-module__paginationOutsideBottom___14w8D",Vc="ControlSlider-module__paginationOutsideTop___SCLqB",Gc="ControlSlider-module__paginationInsideLeft___yOBRZ",qc="ControlSlider-module__paginationInsideRight___Rtt3o",Kc="ControlSlider-module__paginationOutsideLeft___lahaw",Uc="ControlSlider-module__paginationOutsideRight___EtuQa",Xc="ControlSlider-module__imgWrapper___UjEgB",Yc="ControlSlider-module__captionBlock___dJ6-j",Zc="ControlSlider-module__captionTextWrapper___HFlpf",Jc="ControlSlider-module__captionText___uGBVc",Qc="ControlSlider-module__active___WZK4G",ed="ControlSlider-module__withPointerEvents___t-18M",td="ControlSlider-module__topLeftAlignment___zjnGM",nd="ControlSlider-module__topCenterAlignment___gD1xW",id="ControlSlider-module__topRightAlignment___NMapS",od="ControlSlider-module__middleLeftAlignment___OnUrY",rd="ControlSlider-module__middleCenterAlignment___Tdkl0",ad="ControlSlider-module__middleRightAlignment___wEbfX",sd="ControlSlider-module__bottomLeftAlignment___cTP2-",ld="ControlSlider-module__bottomCenterAlignment___c54fB",cd="ControlSlider-module__bottomRightAlignment___kEwrz",dd="ControlSlider-module__clickOverlay___DZA28",ud="ControlSlider-module__contain___pLyq7",pd="ControlSlider-module__cover___KdDat",Xe={wrapper:Cc,hoverArrow:Tc,sliderItem:Lc,sliderImage:Ic,arrow:Rc,arrowVertical:Ec,nextArrow:Mc,arrowInner:kc,arrowIcon:Pc,arrowImg:Ac,mirror:Fc,pagination:Wc,paginationInner:_c,paginationVertical:Nc,paginationItem:Hc,dot:jc,activeDot:Oc,paginationInsideBottom:zc,paginationInsideTop:Bc,paginationOutsideBottom:Dc,paginationOutsideTop:Vc,paginationInsideLeft:Gc,paginationInsideRight:qc,paginationOutsideLeft:Kc,paginationOutsideRight:Uc,imgWrapper:Xc,captionBlock:Yc,captionTextWrapper:Zc,captionText:Jc,active:Qc,withPointerEvents:ed,topLeftAlignment:td,topCenterAlignment:nd,topRightAlignment:id,middleLeftAlignment:od,middleCenterAlignment:rd,middleRightAlignment:ad,bottomLeftAlignment:sd,bottomCenterAlignment:ld,bottomRightAlignment:cd,clickOverlay:dd,contain:ud,cover:pd};function md(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function gd(e,t,n){return t&&md(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ya="(prefers-reduced-motion: reduce)",Ci=1,hd=2,Ri=3,zi=4,yo=5,qo=6,Qo=7,fd={CREATED:Ci,MOUNTED:hd,IDLE:Ri,MOVING:zi,SCROLLING:yo,DRAGGING:qo,DESTROYED:Qo};function Wn(e){e.length=0}function Xn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ot(e){return e.bind.apply(e,[null].concat(Xn(arguments,1)))}var ul=setTimeout,oa=function(){};function Za(e){return requestAnimationFrame(e)}function cr(e,t){return typeof t===e}function oo(e){return!xa(e)&&cr("object",e)}var va=Array.isArray,pl=Ot(cr,"function"),Gn=Ot(cr,"string"),vo=Ot(cr,"undefined");function xa(e){return e===null}function ml(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function xo(e){return va(e)?e:[e]}function vn(e,t){xo(e).forEach(t)}function ba(e,t){return e.indexOf(t)>-1}function Ko(e,t){return e.push.apply(e,xo(t)),e}function Mn(e,t,n){e&&vn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){Mn(e,Gn(t)?t.split(" "):t,!0)}function bo(e,t){vn(t,e.appendChild.bind(e))}function wa(e,t){vn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ro(e,t){return ml(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function gl(e,t){var n=e?Xn(e.children):[];return t?n.filter(function(i){return ro(i,t)}):n}function wo(e,t){return t?gl(e,t)[0]:e.firstElementChild}var ao=Object.keys;function di(e,t,n){return e&&(n?ao(e).reverse():ao(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function so(e){return Xn(arguments,1).forEach(function(t){di(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Xn(arguments,1).forEach(function(t){di(t,function(n,i){va(n)?e[i]=n.slice():oo(n)?e[i]=zn({},oo(e[i])?e[i]:{},n):e[i]=n})}),e}function Ja(e,t){vn(t||ao(e),function(n){delete e[n]})}function Ln(e,t){vn(e,function(n){vn(t,function(i){n&&n.removeAttribute(i)})})}function ct(e,t,n){oo(t)?di(t,function(i,o){ct(e,o,i)}):vn(e,function(i){xa(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function Ti(e,t,n){var i=document.createElement(e);return t&&(Gn(t)?Tn(i,t):ct(i,t)),n&&bo(n,i),i}function xn(e,t,n){if(vo(n))return getComputedStyle(e)[t];xa(n)||(e.style[t]=""+n)}function lo(e,t){xn(e,"display",t)}function hl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function Qa(e,t){return e&&e.classList.contains(t)}function gn(e){return e.getBoundingClientRect()}function ui(e){vn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function fl(e){return wo(new DOMParser().parseFromString(e,"text/html").body)}function En(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function yl(e,t){return e&&e.querySelector(t)}function Sa(e,t){return t?Xn(e.querySelectorAll(t)):[]}function kn(e,t){Mn(e,t,!1)}function ra(e){return e.timeStamp}function ti(e){return Gn(e)?e:e?e+"px":""}var So="splide",$a="data-"+So;function Qi(e,t){if(!e)throw new Error("["+So+"] "+(t||""))}var qn=Math.min,er=Math.max,tr=Math.floor,co=Math.ceil,ln=Math.abs;function vl(e,t,n){return ln(e-t)<n}function Uo(e,t,n,i){var o=qn(t,n),s=er(t,n);return i?o<e&&e<s:o<=e&&e<=s}function wi(e,t,n){var i=qn(t,n),o=er(t,n);return qn(er(i,e),o)}function aa(e){return+(e>0)-+(e<0)}function sa(e,t){return vn(t,function(n){e=e.replace("%s",""+n)}),e}function Ca(e){return e<10?"0"+e:""+e}var es={};function yd(e){return""+e+Ca(es[e]=(es[e]||0)+1)}function xl(){var e=[];function t(l,d,c,u){o(l,d,function(m,x,b){var $="addEventListener"in m,h=$?m.removeEventListener.bind(m,x,c,u):m.removeListener.bind(m,c);$?m.addEventListener(x,c,u):m.addListener(c),e.push([m,x,b,c,h])})}function n(l,d,c){o(l,d,function(u,m,x){e=e.filter(function(b){return b[0]===u&&b[1]===m&&b[2]===x&&(!c||b[3]===c)?(b[4](),!1):!0})})}function i(l,d,c){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:m,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,m,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){vn(l,function(u){u&&vn(d,function(m){m.split(" ").forEach(function(x){var b=x.split(".");c(u,b[0],b[1])})})})}function s(){e.forEach(function(l){l[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Yn="mounted",la="ready",_n="move",Bi="moved",Ta="click",bl="active",wl="inactive",Sl="visible",$l="hidden",Zt="refresh",an="updated",Ei="resize",dr="resized",Cl="drag",Tl="dragging",Ll="dragged",ur="scroll",hi="scrolled",vd="overflow",La="destroy",Il="arrows:mounted",Rl="arrows:updated",El="pagination:mounted",Ml="pagination:updated",Ia="navigation:mounted",Ra="autoplay:play",kl="autoplay:playing",Ea="autoplay:pause",Ma="lazyload:loaded",Pl="sk",Al="sh",nr="ei";function qt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=xl();function i(s,l){n.bind(t,xo(s).join(" "),function(d){l.apply(l,va(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Xn(arguments,1))}return e&&e.event.on(La,n.destroy),so(n,{bus:t,on:i,off:Ot(n.unbind,t),emit:o})}function pr(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function m(){if(!c){if(l=e?qn((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return b();d=Za(m)}}function x(R){R||h(),s=o()-(R?l*e:0),c=!1,d=Za(m)}function b(){c=!0}function $(){s=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function w(R){e=R}function C(){return c}return{start:x,rewind:$,pause:b,cancel:h,set:w,isPaused:C}}function xd(e){var t=e;function n(o){t=o}function i(o){return ba(xo(o),t)}return{set:n,is:i}}function bd(e,t){var n=pr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function wd(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=xl(),d=[];function c(){var h=n.mediaQuery==="min";ao(o).sort(function(w,C){return h?+w-+C:+C-+w}).forEach(function(w){m(o[w],"("+(h?"min":"max")+"-width:"+w+"px)")}),m(s,Ya),x()}function u(h){h&&l.destroy()}function m(h,w){var C=matchMedia(w);l.bind(C,"change",x),d.push([h,C])}function x(){var h=i.is(Qo),w=n.direction,C=d.reduce(function(R,A){return zn(R,A[1].matches?A[0]:{})},{});Ja(n),$(C),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):w!==n.direction&&e.refresh()}function b(h){matchMedia(Ya).matches&&(h?zn(n,s):Ja(n,ao(s)))}function $(h,w,C){zn(n,h),w&&zn(Object.getPrototypeOf(n),h),(C||!i.is(Ci))&&e.emit(an,n)}return{setup:c,destroy:u,reduce:b,set:$}}var mr="Arrow",gr=mr+"Left",hr=mr+"Right",Fl=mr+"Up",Wl=mr+"Down",ts="rtl",fr="ttb",Pr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Fl,hr],ArrowRight:[Wl,gr]};function Sd(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===ts&&!l?1:d===fr?0:-1;return Pr[s]&&Pr[s][c]||s.replace(/width|left|right/i,function(u,m){var x=Pr[u.toLowerCase()][c]||u;return m>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(s){return s*(n.direction===ts?1:-1)}return{resolve:i,orient:o}}var Pn="role",Li="tabindex",$d="disabled",wn="aria-",$o=wn+"controls",_l=wn+"current",ns=wn+"selected",fn=wn+"label",ka=wn+"labelledby",Nl=wn+"hidden",Pa=wn+"orientation",uo=wn+"roledescription",is=wn+"live",os=wn+"busy",rs=wn+"atomic",Aa=[Pn,Li,$d,$o,_l,fn,ka,Nl,Pa,uo],In=So+"__",Zn="is-",Ar=So,as=In+"track",Cd=In+"list",yr=In+"slide",Hl=yr+"--clone",Td=yr+"__container",Fa=In+"arrows",vr=In+"arrow",jl=vr+"--prev",Ol=vr+"--next",xr=In+"pagination",zl=xr+"__page",Ld=In+"progress",Id=Ld+"__bar",Rd=In+"toggle",Ed=In+"spinner",Md=In+"sr",kd=Zn+"initialized",pi=Zn+"active",Bl=Zn+"prev",Dl=Zn+"next",ca=Zn+"visible",da=Zn+"loading",Vl=Zn+"focus-in",Gl=Zn+"overflow",Pd=[pi,ca,Bl,Dl,da,Vl,Gl],Ad={slide:yr,clone:Hl,arrows:Fa,arrow:vr,prev:jl,next:Ol,pagination:xr,page:zl,spinner:Ed};function Fd(e,t){if(pl(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ro(n,t);)n=n.parentElement;return n}var Wd=5,ss=200,ql="touchstart mousedown",Fr="touchmove mousemove",Wr="touchend touchcancel mouseup click";function _d(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],m=[],x=[],b,$,h;function w(){T(),N(),A()}function C(){o(Zt,R),o(Zt,w),o(an,A),s(document,ql+" keydown",function(L){h=L.type==="keydown"},{capture:!0}),s(l,"focusin",function(){Mn(l,Vl,!!h)})}function R(L){var I=Aa.concat("style");Wn(u),kn(l,m),kn(b,x),Ln([b,$],I),Ln(l,L?I:["style",uo])}function A(){kn(l,m),kn(b,x),m=V(Ar),x=V(as),Tn(l,m),Tn(b,x),ct(l,fn,n.label),ct(l,ka,n.labelledby)}function T(){b=E("."+as),$=wo(b,"."+Cd),Qi(b&&$,"A track/list element is missing."),Ko(u,gl($,"."+yr+":not(."+Hl+")")),di({arrows:Fa,pagination:xr,prev:jl,next:Ol,bar:Id,toggle:Rd},function(L,I){c[I]=E("."+L)}),so(c,{root:l,track:b,list:$,slides:u})}function N(){var L=l.id||yd(So),I=n.role;l.id=L,b.id=b.id||L+"-track",$.id=$.id||L+"-list",!bn(l,Pn)&&l.tagName!=="SECTION"&&I&&ct(l,Pn,I),ct(l,uo,d.carousel),ct($,Pn,"presentation")}function E(L){var I=yl(l,L);return I&&Fd(I,"."+Ar)===l?I:void 0}function V(L){return[L+"--"+n.type,L+"--"+n.direction,n.drag&&L+"--draggable",n.isNavigation&&L+"--nav",L===Ar&&pi]}return so(c,{setup:w,mount:C,destroy:R})}var Mi="slide",Di="loop",Co="fade";function Nd(e,t,n,i){var o=qt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,m=e.options,x=m.isNavigation,b=m.updateOnMove,$=m.i18n,h=m.pagination,w=m.slideFocus,C=c.Direction.resolve,R=bn(i,"style"),A=bn(i,fn),T=n>-1,N=wo(i,"."+Td),E;function V(){T||(i.id=u.id+"-slide"+Ca(t+1),ct(i,Pn,h?"tabpanel":"group"),ct(i,uo,$.slide),ct(i,fn,A||sa($.slideLabel,[t+1,e.length]))),L()}function L(){d(i,"click",Ot(l,Ta,H)),d(i,"keydown",Ot(l,Pl,H)),s([Bi,Al,hi],S),s(Ia,_),b&&s(_n,f)}function I(){E=!0,o.destroy(),kn(i,Pd),Ln(i,Aa),ct(i,"style",R),ct(i,fn,A||"")}function _(){var k=e.splides.map(function(F){var X=F.splide.Components.Slides.getAt(t);return X?X.slide.id:""}).join(" ");ct(i,fn,sa($.slideX,(T?n:t)+1)),ct(i,$o,k),ct(i,Pn,w?"button":""),w&&Ln(i,uo)}function f(){E||S()}function S(){if(!E){var k=e.index;M(),z(),Mn(i,Bl,t===k-1),Mn(i,Dl,t===k+1)}}function M(){var k=ae();k!==Qa(i,pi)&&(Mn(i,pi,k),ct(i,_l,x&&k||""),l(k?bl:wl,H))}function z(){var k=Q(),F=!k&&(!ae()||T);if(e.state.is([zi,yo])||ct(i,Nl,F||""),ct(Sa(i,m.focusableNodes||""),Li,F?-1:""),w&&ct(i,Li,F?-1:0),k!==Qa(i,ca)&&(Mn(i,ca,k),l(k?Sl:$l,H)),!k&&document.activeElement===i){var X=c.Slides.getAt(e.index);X&&hl(X.slide)}}function K(k,F,X){xn(X&&N||i,k,F)}function ae(){var k=e.index;return k===t||m.cloneStatus&&k===n}function Q(){if(e.is(Co))return ae();var k=gn(c.Elements.track),F=gn(i),X=C("left",!0),B=C("right",!0);return tr(k[X])<=co(F[X])&&tr(F[B])<=co(k[B])}function G(k,F){var X=ln(k-t);return!T&&(m.rewind||e.is(Di))&&(X=qn(X,e.length-X)),X<=F}var H={index:t,slideIndex:n,slide:i,container:N,isClone:T,mount:V,destroy:I,update:S,style:K,isWithin:G};return H}function Hd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,m=[];function x(){b(),o(Zt,$),o(Zt,b)}function b(){c.forEach(function(S,M){w(S,M,-1)})}function $(){E(function(S){S.destroy()}),Wn(m)}function h(){E(function(S){S.update()})}function w(S,M,z){var K=Nd(e,M,z,S);K.mount(),m.push(K),m.sort(function(ae,Q){return ae.index-Q.index})}function C(S){return S?V(function(M){return!M.isClone}):m}function R(S){var M=t.Controller,z=M.toIndex(S),K=M.hasFocus()?1:n.perPage;return V(function(ae){return Uo(ae.index,z,z+K-1)})}function A(S){return V(S)[0]}function T(S,M){vn(S,function(z){if(Gn(z)&&(z=fl(z)),ml(z)){var K=c[M];K?wa(z,K):bo(u,z),Tn(z,n.classes.slide),I(z,Ot(s,Ei))}}),s(Zt)}function N(S){ui(V(S).map(function(M){return M.slide})),s(Zt)}function E(S,M){C(M).forEach(S)}function V(S){return m.filter(pl(S)?S:function(M){return Gn(S)?ro(M.slide,S):ba(xo(S),M.index)})}function L(S,M,z){E(function(K){K.style(S,M,z)})}function I(S,M){var z=Sa(S,"img"),K=z.length;K?z.forEach(function(ae){l(ae,"load error",function(){--K||M()})}):M()}function _(S){return S?c.length:m.length}function f(){return m.length>n.perPage}return{mount:x,destroy:$,update:h,register:w,get:C,getIn:R,getAt:A,add:T,remove:N,forEach:E,filter:V,style:L,getLength:_,isEnough:f}}function jd(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,m=u.root,x=u.track,b=u.list,$=d.getAt,h=d.style,w,C,R;function A(){T(),s(window,"resize load",bd(Ot(l,Ei))),o([an,Zt],T),o(Ei,N)}function T(){w=n.direction===fr,xn(m,"maxWidth",ti(n.width)),xn(x,c("paddingLeft"),E(!1)),xn(x,c("paddingRight"),E(!0)),N(!0)}function N(H){var k=gn(m);(H||C.width!==k.width||C.height!==k.height)&&(xn(x,"height",V()),h(c("marginRight"),ti(n.gap)),h("width",I()),h("height",_(),!0),C=k,l(dr),R!==(R=G())&&(Mn(m,Gl,R),l(vd,R)))}function E(H){var k=n.padding,F=c(H?"right":"left");return k&&ti(k[F]||(oo(k)?0:k))||"0px"}function V(){var H="";return w&&(H=L(),Qi(H,"height or heightRatio is missing."),H="calc("+H+" - "+E(!1)+" - "+E(!0)+")"),H}function L(){return ti(n.height||gn(b).width*n.heightRatio)}function I(){return n.autoWidth?null:ti(n.fixedWidth)||(w?"":f())}function _(){return ti(n.fixedHeight)||(w?n.autoHeight?null:f():L())}function f(){var H=ti(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function S(){return gn(b)[c("width")]}function M(H,k){var F=$(H||0);return F?gn(F.slide)[c("width")]+(k?0:ae()):0}function z(H,k){var F=$(H);if(F){var X=gn(F.slide)[c("right")],B=gn(b)[c("left")];return ln(X-B)+(k?0:ae())}return 0}function K(H){return z(e.length-1)-z(0)+M(0,H)}function ae(){var H=$(0);return H&&parseFloat(xn(H.slide,c("marginRight")))||0}function Q(H){return parseFloat(xn(x,c("padding"+(H?"Right":"Left"))))||0}function G(){return e.is(Co)||K(!0)>S()}return{mount:A,resize:N,listSize:S,slideSize:M,sliderSize:K,totalSize:z,getPadding:Q,isOverflow:G}}var Od=2;function zd(e,t,n){var i=qt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function m(){o(Zt,x),o([an,Ei],$),(u=C())&&(h(u),t.Layout.resize(!0))}function x(){b(),m()}function b(){ui(c),Wn(c),i.destroy()}function $(){var R=C();u!==R&&(u<R||!R)&&i.emit(Zt)}function h(R){var A=l.get().slice(),T=A.length;if(T){for(;A.length<R;)Ko(A,A);Ko(A.slice(-R),A.slice(0,R)).forEach(function(N,E){var V=E<R,L=w(N.slide,E);V?wa(L,A[0].slide):bo(s.list,L),Ko(c,L),l.register(L,E-R+(V?0:T),N.index)})}}function w(R,A){var T=R.cloneNode(!0);return Tn(T,n.classes.clone),T.id=e.root.id+"-clone"+Ca(A+1),T}function C(){var R=n.clones;if(!e.is(Di))R=0;else if(vo(R)){var A=n[d("fixedWidth")]&&t.Layout.slideSize(0),T=A&&co(gn(s.track)[d("width")]/A);R=T||n[d("autoWidth")]&&e.length||n.perPage*Od}return R}return{mount:m,destroy:b}}function Bd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,m=d.totalSize,x=d.listSize,b=d.sliderSize,$=t.Direction,h=$.resolve,w=$.orient,C=t.Elements,R=C.list,A=C.track,T;function N(){T=t.Transition,o([Yn,dr,an,Zt],E)}function E(){t.Controller.isBusy()||(t.Scroll.cancel(),L(e.index),t.Slides.update())}function V(F,X,B,U){F!==X&&H(F>B)&&(S(),I(f(K(),F>B),!0)),l(zi),s(_n,X,B,F),T.start(X,function(){l(Ri),s(Bi,X,B,F),U&&U()})}function L(F){I(z(F,!0))}function I(F,X){if(!e.is(Co)){var B=X?F:_(F);xn(R,"transform","translate"+h("X")+"("+B+"px)"),F!==B&&s(Al)}}function _(F){if(e.is(Di)){var X=M(F),B=X>t.Controller.getEnd(),U=X<0;(U||B)&&(F=f(F,B))}return F}function f(F,X){var B=F-G(X),U=b();return F-=w(U*(co(ln(B)/U)||1))*(X?1:-1),F}function S(){I(K(),!0),T.cancel()}function M(F){for(var X=t.Slides.get(),B=0,U=1/0,j=0;j<X.length;j++){var xe=X[j].index,v=ln(z(xe,!0)-F);if(v<=U)U=v,B=xe;else break}return B}function z(F,X){var B=w(m(F-1)-Q(F));return X?ae(B):B}function K(){var F=h("left");return gn(R)[F]-gn(A)[F]+w(u(!1))}function ae(F){return n.trimSpace&&e.is(Mi)&&(F=wi(F,0,w(b(!0)-x()))),F}function Q(F){var X=n.focus;return X==="center"?(x()-c(F,!0))/2:+X*c(F)||0}function G(F){return z(F?t.Controller.getEnd():0,!!n.trimSpace)}function H(F){var X=w(f(K(),F));return F?X>=0:X<=R[h("scrollWidth")]-gn(A)[h("width")]}function k(F,X){X=vo(X)?K():X;var B=F!==!0&&w(X)<w(G(!1)),U=F!==!1&&w(X)>w(G(!0));return B||U}return{mount:N,move:V,jump:L,translate:I,shift:f,cancel:S,toIndex:M,toPosition:z,getPosition:K,getLimit:G,exceededLimit:k,reposition:E}}function Dd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,m=t.Slides,x=m.isEnough,b=m.getLength,$=n.omitEnd,h=e.is(Di),w=e.is(Mi),C=Ot(K,!1),R=Ot(K,!0),A=n.start||0,T,N=A,E,V,L;function I(){_(),o([an,Zt,nr],_),o(dr,f)}function _(){E=b(!0),V=n.perMove,L=n.perPage,T=H();var v=wi(A,0,$?T:E-1);v!==A&&(A=v,l.reposition())}function f(){T!==H()&&s(nr)}function S(v,he,Y){if(!xe()){var le=z(v),$e=G(le);$e>-1&&(he||$e!==A)&&(B($e),l.move(le,$e,N,Y))}}function M(v,he,Y,le){t.Scroll.scroll(v,he,Y,function(){var $e=G(l.toIndex(d()));B($?qn($e,T):$e),le&&le()})}function z(v){var he=A;if(Gn(v)){var Y=v.match(/([+\-<>])(\d+)?/)||[],le=Y[1],$e=Y[2];le==="+"||le==="-"?he=ae(A+ +(""+le+(+$e||1)),A):le===">"?he=$e?k(+$e):C(!0):le==="<"&&(he=R(!0))}else he=h?v:wi(v,0,T);return he}function K(v,he){var Y=V||(j()?1:L),le=ae(A+Y*(v?-1:1),A,!(V||j()));return le===-1&&w&&!vl(d(),c(!v),1)?v?0:T:he?le:G(le)}function ae(v,he,Y){if(x()||j()){var le=Q(v);le!==v&&(he=v,v=le,Y=!1),v<0||v>T?!V&&(Uo(0,v,he,!0)||Uo(T,he,v,!0))?v=k(F(v)):h?v=Y?v<0?-(E%L||L):E:v:n.rewind?v=v<0?T:0:v=-1:Y&&v!==he&&(v=k(F(he)+(v<he?-1:1)))}else v=-1;return v}function Q(v){if(w&&n.trimSpace==="move"&&v!==A)for(var he=d();he===u(v,!0)&&Uo(v,0,e.length-1,!n.rewind);)v<A?--v:++v;return v}function G(v){return h?(v+E)%E||0:v}function H(){for(var v=E-(j()||h&&V?1:L);$&&v-- >0;)if(u(E-1,!0)!==u(v,!0)){v++;break}return wi(v,0,E-1)}function k(v){return wi(j()?v:L*v,0,T)}function F(v){return j()?qn(v,T):tr((v>=T?E-1:v)/L)}function X(v){var he=l.toIndex(v);return w?wi(he,0,T):he}function B(v){v!==A&&(N=A,A=v)}function U(v){return v?N:A}function j(){return!vo(n.focus)||n.isNavigation}function xe(){return e.state.is([zi,yo])&&!!n.waitForTransition}return{mount:I,go:S,scroll:M,getNext:C,getPrev:R,getAdjacent:K,getEnd:H,setIndex:B,getIndex:U,toIndex:k,toPage:F,toDest:X,hasFocus:j,isBusy:xe}}var Vd="http://www.w3.org/2000/svg",Gd="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Mo=40;function qd(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,m=t.Controller,x=u.arrows,b=u.track,$=x,h=u.prev,w=u.next,C,R,A={};function T(){E(),o(an,N)}function N(){V(),T()}function E(){var M=n.arrows;M&&!(h&&w)&&_(),h&&w&&(so(A,{prev:h,next:w}),lo($,M?"":"none"),Tn($,R=Fa+"--"+n.direction),M&&(L(),S(),ct([h,w],$o,b.id),l(Il,h,w)))}function V(){i.destroy(),kn($,R),C?(ui(x?[h,w]:$),h=w=null):Ln([h,w],Aa)}function L(){o([Yn,Bi,Zt,hi,nr],S),s(w,"click",Ot(I,">")),s(h,"click",Ot(I,"<"))}function I(M){m.go(M,!0)}function _(){$=x||Ti("div",d.arrows),h=f(!0),w=f(!1),C=!0,bo($,[h,w]),!x&&wa($,b)}function f(M){var z='<button class="'+d.arrow+" "+(M?d.prev:d.next)+'" type="button"><svg xmlns="'+Vd+'" viewBox="0 0 '+Mo+" "+Mo+'" width="'+Mo+'" height="'+Mo+'" focusable="false"><path d="'+(n.arrowPath||Gd)+'" />';return fl(z)}function S(){if(h&&w){var M=e.index,z=m.getPrev(),K=m.getNext(),ae=z>-1&&M<z?c.last:c.prev,Q=K>-1&&M>K?c.first:c.next;h.disabled=z<0,w.disabled=K<0,ct(h,fn,ae),ct(w,fn,Q),l(Rl,h,w,z,K)}}return{arrows:A,mount:T,destroy:V,update:S}}var Kd=$a+"-interval";function Ud(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.emit,d=pr(n.interval,e.go.bind(e,">"),L),c=d.isPaused,u=t.Elements,m=t.Elements,x=m.root,b=m.toggle,$=n.autoplay,h,w,C=$==="pause";function R(){$&&(A(),b&&ct(b,$o,u.track.id),C||T(),V())}function A(){n.pauseOnHover&&s(x,"mouseenter mouseleave",function(_){h=_.type==="mouseenter",E()}),n.pauseOnFocus&&s(x,"focusin focusout",function(_){w=_.type==="focusin",E()}),b&&s(b,"click",function(){C?T():N(!0)}),o([_n,ur,Zt],d.rewind),o(_n,I)}function T(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),w=h=C=!1,V(),l(Ra))}function N(_){_===void 0&&(_=!0),C=!!_,V(),c()||(d.pause(),l(Ea))}function E(){C||(h||w?N(!1):T())}function V(){b&&(Mn(b,pi,!C),ct(b,fn,n.i18n[C?"play":"pause"]))}function L(_){var f=u.bar;f&&xn(f,"width",_*100+"%"),l(kl,_)}function I(_){var f=t.Slides.getAt(_);d.set(f&&+bn(f.slide,Kd)||n.interval)}return{mount:R,destroy:d.cancel,play:T,pause:N,isPaused:c}}function Xd(e,t,n){var i=qt(e),o=i.on;function s(){n.cover&&(o(Ma,Ot(d,!0)),o([Yn,an,Zt],Ot(l,!0)))}function l(c){t.Slides.forEach(function(u){var m=wo(u.container||u.slide,"img");m&&m.src&&d(c,m,u)})}function d(c,u,m){m.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),lo(u,c?"none":"")}return{mount:s,destroy:Ot(l,!1)}}var Yd=10,Zd=600,Jd=.6,Qd=1.5,eu=800;function tu(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,m=d.exceededLimit,x=d.translate,b=e.is(Mi),$,h,w=1;function C(){o(_n,N),o([an,Zt],E)}function R(L,I,_,f,S){var M=c();if(N(),_&&(!b||!m())){var z=t.Layout.sliderSize(),K=aa(L)*z*tr(ln(L)/z)||0;L=d.toPosition(t.Controller.toDest(L%z))+K}var ae=vl(M,L,1);w=1,I=ae?0:I||er(ln(L-M)/Qd,eu),h=f,$=pr(I,A,Ot(T,M,L,S),1),l(yo),s(ur),$.start()}function A(){l(Ri),h&&h(),s(hi)}function T(L,I,_,f){var S=c(),M=L+(I-L)*V(f),z=(M-S)*w;x(S+z),b&&!_&&m()&&(w*=Jd,ln(z)<Yd&&R(u(m(!0)),Zd,!1,h,!0))}function N(){$&&$.cancel()}function E(){$&&!$.isPaused()&&(N(),A())}function V(L){var I=n.easingFunc;return I?I(L):1-Math.pow(1-L,4)}return{mount:C,destroy:N,scroll:R,cancel:E}}var Si={passive:!1,capture:!0};function nu(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,m=t.Scroll,x=t.Controller,b=t.Elements.track,$=t.Media.reduce,h=t.Direction,w=h.resolve,C=h.orient,R=u.getPosition,A=u.exceededLimit,T,N,E,V,L,I=!1,_,f,S;function M(){l(b,Fr,oa,Si),l(b,Wr,oa,Si),l(b,ql,K,Si),l(b,"click",G,{capture:!0}),l(b,"dragstart",En),o([Yn,an],z)}function z(){var Z=n.drag;be(!Z),V=Z==="free"}function K(Z){if(_=!1,!f){var fe=$e(Z);le(Z.target)&&(fe||!Z.button)&&(x.isBusy()?En(Z,!0):(S=fe?b:window,L=c.is([zi,yo]),E=null,l(S,Fr,ae,Si),l(S,Wr,Q,Si),u.cancel(),m.cancel(),H(Z)))}}function ae(Z){if(c.is(qo)||(c.set(qo),s(Cl)),Z.cancelable)if(L){u.translate(T+Y(j(Z)));var fe=xe(Z)>ss,ye=I!==(I=A());(fe||ye)&&H(Z),_=!0,s(Tl),En(Z)}else X(Z)&&(L=F(Z),En(Z))}function Q(Z){c.is(qo)&&(c.set(Ri),s(Ll)),L&&(k(Z),En(Z)),d(S,Fr,ae),d(S,Wr,Q),L=!1}function G(Z){!f&&_&&En(Z,!0)}function H(Z){E=N,N=Z,T=R()}function k(Z){var fe=B(Z),ye=U(fe),ke=n.rewind&&n.rewindByDrag;$(!1),V?x.scroll(ye,0,n.snap):e.is(Co)?x.go(C(aa(fe))<0?ke?"<":"-":ke?">":"+"):e.is(Mi)&&I&&ke?x.go(A(!0)?">":"<"):x.go(x.toDest(ye),!0),$(!0)}function F(Z){var fe=n.dragMinThreshold,ye=oo(fe),ke=ye&&fe.mouse||0,J=(ye?fe.touch:+fe)||10;return ln(j(Z))>($e(Z)?J:ke)}function X(Z){return ln(j(Z))>ln(j(Z,!0))}function B(Z){if(e.is(Di)||!I){var fe=xe(Z);if(fe&&fe<ss)return j(Z)/fe}return 0}function U(Z){return R()+aa(Z)*qn(ln(Z)*(n.flickPower||600),V?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function j(Z,fe){return he(Z,fe)-he(v(Z),fe)}function xe(Z){return ra(Z)-ra(v(Z))}function v(Z){return N===Z&&E||N}function he(Z,fe){return($e(Z)?Z.changedTouches[0]:Z)["page"+w(fe?"Y":"X")]}function Y(Z){return Z/(I&&e.is(Mi)?Wd:1)}function le(Z){var fe=n.noDrag;return!ro(Z,"."+zl+", ."+vr)&&(!fe||!ro(Z,fe))}function $e(Z){return typeof TouchEvent<"u"&&Z instanceof TouchEvent}function re(){return L}function be(Z){f=Z}return{mount:M,disable:be,isDragging:re}}var iu={Spacebar:" ",Right:hr,Left:gr,Up:Fl,Down:Wl};function Wa(e){return e=Gn(e)?e:e.key,iu[e]||e}var ls="keydown";function ou(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,m;function x(){b(),o(an,$),o(an,b),o(_n,w)}function b(){var R=n.keyboard;R&&(u=R==="global"?window:d,s(u,ls,C))}function $(){l(u,ls)}function h(R){m=R}function w(){var R=m;m=!0,ul(function(){m=R})}function C(R){if(!m){var A=Wa(R);A===c(gr)?e.go("<"):A===c(hr)&&e.go(">")}}return{mount:x,destroy:$,disable:h}}var eo=$a+"-lazy",Xo=eo+"-srcset",ru="["+eo+"], ["+Xo+"]";function au(e,t,n){var i=qt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Bi,hi],m=[];function x(){n.lazyLoad&&(b(),o(Zt,b))}function b(){Wn(m),$(),c?R():(s(u),o(u,h),h())}function $(){t.Slides.forEach(function(A){Sa(A.slide,ru).forEach(function(T){var N=bn(T,eo),E=bn(T,Xo);if(N!==T.src||E!==T.srcset){var V=n.classes.spinner,L=T.parentElement,I=wo(L,"."+V)||Ti("span",V,L);m.push([T,A,I]),T.src||lo(T,"none")}})})}function h(){m=m.filter(function(A){var T=n.perPage*((n.preloadPages||1)+1)-1;return A[1].isWithin(e.index,T)?w(A):!0}),m.length||s(u)}function w(A){var T=A[0];Tn(A[1].slide,da),l(T,"load error",Ot(C,A)),ct(T,"src",bn(T,eo)),ct(T,"srcset",bn(T,Xo)),Ln(T,eo),Ln(T,Xo)}function C(A,T){var N=A[0],E=A[1];kn(E.slide,da),T.type!=="error"&&(ui(A[2]),lo(N,""),d(Ma,N,E),d(Ei)),c&&R()}function R(){m.length&&w(m.shift())}return{mount:x,destroy:Ot(Wn,m),check:h}}function su(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,m=u.hasFocus,x=u.getIndex,b=u.go,$=t.Direction.resolve,h=c.pagination,w=[],C,R;function A(){T(),o([an,Zt,nr],A);var f=n.pagination;h&&lo(h,f?"":"none"),f&&(o([_n,ur,hi],_),N(),_(),s(El,{list:C,items:w},I(e.index)))}function T(){C&&(ui(h?Xn(C.children):C),kn(C,R),Wn(w),C=null),i.destroy()}function N(){var f=e.length,S=n.classes,M=n.i18n,z=n.perPage,K=m()?u.getEnd()+1:co(f/z);C=h||Ti("ul",S.pagination,c.track.parentElement),Tn(C,R=xr+"--"+L()),ct(C,Pn,"tablist"),ct(C,fn,M.select),ct(C,Pa,L()===fr?"vertical":"");for(var ae=0;ae<K;ae++){var Q=Ti("li",null,C),G=Ti("button",{class:S.page,type:"button"},Q),H=d.getIn(ae).map(function(F){return F.slide.id}),k=!m()&&z>1?M.pageX:M.slideX;l(G,"click",Ot(E,ae)),n.paginationKeyboard&&l(G,"keydown",Ot(V,ae)),ct(Q,Pn,"presentation"),ct(G,Pn,"tab"),ct(G,$o,H.join(" ")),ct(G,fn,sa(k,ae+1)),ct(G,Li,-1),w.push({li:Q,button:G,page:ae})}}function E(f){b(">"+f,!0)}function V(f,S){var M=w.length,z=Wa(S),K=L(),ae=-1;z===$(hr,!1,K)?ae=++f%M:z===$(gr,!1,K)?ae=(--f+M)%M:z==="Home"?ae=0:z==="End"&&(ae=M-1);var Q=w[ae];Q&&(hl(Q.button),b(">"+ae),En(S,!0))}function L(){return n.paginationDirection||n.direction}function I(f){return w[u.toPage(f)]}function _(){var f=I(x(!0)),S=I(x());if(f){var M=f.button;kn(M,pi),Ln(M,ns),ct(M,Li,-1)}if(S){var z=S.button;Tn(z,pi),ct(z,ns,!0),ct(z,Li,"")}s(Ml,{list:C,items:w},f,S)}return{items:w,mount:A,destroy:T,getAt:I,update:_}}var lu=[" ","Enter"];function cu(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&m()}function d(){s.forEach(function(h){h.destroy()}),Wn(s)}function c(){d(),l()}function u(h,w){var C=qt(h);C.on(_n,function(R,A,T){w.go(w.is(Di)?T:R)}),s.push(C)}function m(){var h=qt(e),w=h.on;w(Ta,b),w(Pl,$),w([Yn,an],x),s.push(h),h.emit(Ia,e.splides)}function x(){ct(t.Elements.list,Pa,n.direction===fr?"vertical":"")}function b(h){e.go(h.index)}function $(h,w){ba(lu,Wa(w))&&(b(h),En(w))}return{setup:Ot(t.Media.set,{slideFocus:vo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function du(e,t,n){var i=qt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Si)}function d(u){if(u.cancelable){var m=u.deltaY,x=m<0,b=ra(u),$=n.wheelMinThreshold||0,h=n.wheelSleep||0;ln(m)>$&&b-s>h&&(e.go(x?"<":">"),s=b),c(x)&&En(u)}}function c(u){return!n.releaseWheel||e.state.is(zi)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var uu=90;function pu(e,t,n){var i=qt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=Ti("span",Md),c=pr(uu,Ot(m,!1));function u(){l&&(b(!t.Autoplay.isPaused()),ct(s,rs,!0),d.textContent="…",o(Ra,Ot(b,!0)),o(Ea,Ot(b,!1)),o([Bi,hi],Ot(m,!0)))}function m($){ct(s,os,$),$?(bo(s,d),c.start()):(ui(d),c.cancel())}function x(){Ln(s,[is,rs,os]),ui(d)}function b($){l&&ct(s,is,$?"off":"polite")}return{mount:u,disable:b,destroy:x}}var mu=Object.freeze({__proto__:null,Media:wd,Direction:Sd,Elements:_d,Slides:Hd,Layout:jd,Clones:zd,Move:Bd,Controller:Dd,Arrows:qd,Autoplay:Ud,Cover:Xd,Scroll:tu,Drag:nu,Keyboard:ou,LazyLoad:au,Pagination:su,Sync:cu,Wheel:du,Live:pu}),gu={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},hu={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Ad,i18n:gu,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function fu(e,t,n){var i=t.Slides;function o(){qt(e).on([Yn,Zt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),ul(c)}return{mount:o,start:l,cancel:oa}}function yu(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=Ot(xn,l,"transition"),c;function u(){qt(e).bind(l,"transitionend",function($){$.target===l&&c&&(x(),c())})}function m($,h){var w=i.toPosition($,!0),C=i.getPosition(),R=b($);ln(w-C)>=1&&R>=1?n.useScroll?s.scroll(w,R,!1,h):(d("transform "+R+"ms "+n.easing),i.translate(w,!0),c=h):(i.jump($),h())}function x(){d(""),s.cancel()}function b($){var h=n.rewindSpeed;if(e.is(Mi)&&h){var w=o.getIndex(!0),C=o.getEnd();if(w===0&&$>=C||w>=C&&$===0)return h}return n.speed}return{mount:u,start:m,cancel:x}}var vu=(function(){function e(n,i){this.event=qt(),this.Components={},this.state=xd(Ci),this.splides=[],this._o={},this._E={};var o=Gn(n)?yl(document,n):n;Qi(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,fn)||"",labelledby:bn(o,ka)||""},hu,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,$a)))}catch{Qi(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;Qi(l.is([Ci,Qo]),"Already mounted!"),l.set(Ci),this._C=d,this._T=o||this._T||(this.is(Co)?fu:yu),this._E=i||this._E;var c=so({},mu,this._E,{Transition:this._T});return di(c,function(u,m){var x=u(s,d,s._o);d[m]=x,x.setup&&x.setup()}),di(d,function(u){u.mount&&u.mount()}),this.emit(Yn),Tn(this.root,kd),l.set(Ri),this.emit(la),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Ri)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Xn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Zt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Ci)?qt(this).on(la,this.destroy.bind(this,i)):(di(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(La),o.destroy(),i&&Wn(this.splides),s.set(Qo)),this},gd(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),_a=vu;_a.defaults={};_a.STATES=fd;var cs=[[Yn,"onMounted"],[la,"onReady"],[_n,"onMove"],[Bi,"onMoved"],[Ta,"onClick"],[bl,"onActive"],[wl,"onInactive"],[Sl,"onVisible"],[$l,"onHidden"],[Zt,"onRefresh"],[an,"onUpdated"],[Ei,"onResize"],[dr,"onResized"],[Cl,"onDrag"],[Tl,"onDragging"],[Ll,"onDragged"],[ur,"onScroll"],[hi,"onScrolled"],[La,"onDestroy"],[Il,"onArrowsMounted"],[Rl,"onArrowsUpdated"],[El,"onPaginationMounted"],[Ml,"onPaginationUpdated"],[Ia,"onNavigationMounted"],[Ra,"onAutoplayPlay"],[kl,"onAutoplayPlaying"],[Ea,"onAutoplayPause"],[Ma,"onLazyLoadLoaded"]];function Na(...e){return e.filter(Boolean).join(" ")}function ir(e){return e!==null&&typeof e=="object"}function ua(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!ua(n,t[i]));if(ir(e)&&ir(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ua(e[o],t[o]))}return e===t}function xu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function bu(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function pa(e,t){const n=e;return bu(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ir(i)?n[o]=pa(ir(n[o])?n[o]:{},i):n[o]=i}),n}var wu=({children:e,className:t,...n})=>a.createElement("div",{className:Na("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),br=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new _a(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=pa({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!ua(this.options,e)&&(this.splide.options=e,this.options=pa({},e));const t=this.getSlides();xu(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){cs.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return a.createElement(t,{className:Na("splide",e),ref:this.splideRef,...this.omit(o,["options",...cs.map(s=>s[1])])},n?a.createElement(wu,null,i):i)}},wr=({children:e,className:t,...n})=>a.createElement("li",{className:Na("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),nt=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),gi=require("react-dom");function $c(e){return e.type==="object"&&e.version===1}const Cc="ControlSlider-module__wrapper___sHEkd",Tc="ControlSlider-module__hoverArrow___A-dOH",Lc="ControlSlider-module__sliderItem___QQSkR",Ic="ControlSlider-module__sliderImage___9hRl-",Rc="ControlSlider-module__arrow___05ghY",Ec="ControlSlider-module__arrowVertical___tBfVN",kc="ControlSlider-module__nextArrow___-30Yc",Mc="ControlSlider-module__arrowInner___aEra3",Pc="ControlSlider-module__arrowIcon___S4ztF",Ac="ControlSlider-module__arrowImg___2dwJW",Fc="ControlSlider-module__mirror___brd6U",Wc="ControlSlider-module__pagination___bicLF",_c="ControlSlider-module__paginationInner___bT-P-",Nc="ControlSlider-module__paginationVertical___zYqKw",Hc="ControlSlider-module__paginationItem___nTRbk",jc="ControlSlider-module__dot___p1Qun",Oc="ControlSlider-module__activeDot___LHFaj",zc="ControlSlider-module__paginationInsideBottom___R3FWn",Bc="ControlSlider-module__paginationInsideTop___V-qb-",Dc="ControlSlider-module__paginationOutsideBottom___14w8D",Vc="ControlSlider-module__paginationOutsideTop___SCLqB",Gc="ControlSlider-module__paginationInsideLeft___yOBRZ",qc="ControlSlider-module__paginationInsideRight___Rtt3o",Kc="ControlSlider-module__paginationOutsideLeft___lahaw",Uc="ControlSlider-module__paginationOutsideRight___EtuQa",Xc="ControlSlider-module__imgWrapper___UjEgB",Yc="ControlSlider-module__captionBlock___dJ6-j",Zc="ControlSlider-module__captionTextWrapper___HFlpf",Jc="ControlSlider-module__captionText___uGBVc",Qc="ControlSlider-module__active___WZK4G",ed="ControlSlider-module__withPointerEvents___t-18M",td="ControlSlider-module__topLeftAlignment___zjnGM",nd="ControlSlider-module__topCenterAlignment___gD1xW",id="ControlSlider-module__topRightAlignment___NMapS",od="ControlSlider-module__middleLeftAlignment___OnUrY",rd="ControlSlider-module__middleCenterAlignment___Tdkl0",ad="ControlSlider-module__middleRightAlignment___wEbfX",ld="ControlSlider-module__bottomLeftAlignment___cTP2-",sd="ControlSlider-module__bottomCenterAlignment___c54fB",cd="ControlSlider-module__bottomRightAlignment___kEwrz",dd="ControlSlider-module__clickOverlay___DZA28",ud="ControlSlider-module__contain___pLyq7",pd="ControlSlider-module__cover___KdDat",Xe={wrapper:Cc,hoverArrow:Tc,sliderItem:Lc,sliderImage:Ic,arrow:Rc,arrowVertical:Ec,nextArrow:kc,arrowInner:Mc,arrowIcon:Pc,arrowImg:Ac,mirror:Fc,pagination:Wc,paginationInner:_c,paginationVertical:Nc,paginationItem:Hc,dot:jc,activeDot:Oc,paginationInsideBottom:zc,paginationInsideTop:Bc,paginationOutsideBottom:Dc,paginationOutsideTop:Vc,paginationInsideLeft:Gc,paginationInsideRight:qc,paginationOutsideLeft:Kc,paginationOutsideRight:Uc,imgWrapper:Xc,captionBlock:Yc,captionTextWrapper:Zc,captionText:Jc,active:Qc,withPointerEvents:ed,topLeftAlignment:td,topCenterAlignment:nd,topRightAlignment:id,middleLeftAlignment:od,middleCenterAlignment:rd,middleRightAlignment:ad,bottomLeftAlignment:ld,bottomCenterAlignment:sd,bottomRightAlignment:cd,clickOverlay:dd,contain:ud,cover:pd};function md(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function gd(e,t,n){return t&&md(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ya="(prefers-reduced-motion: reduce)",Ci=1,hd=2,Ri=3,zi=4,yo=5,qo=6,Qo=7,fd={CREATED:Ci,MOUNTED:hd,IDLE:Ri,MOVING:zi,SCROLLING:yo,DRAGGING:qo,DESTROYED:Qo};function Wn(e){e.length=0}function Xn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ot(e){return e.bind.apply(e,[null].concat(Xn(arguments,1)))}var us=setTimeout,oa=function(){};function Za(e){return requestAnimationFrame(e)}function cr(e,t){return typeof t===e}function oo(e){return!xa(e)&&cr("object",e)}var va=Array.isArray,ps=Ot(cr,"function"),Gn=Ot(cr,"string"),vo=Ot(cr,"undefined");function xa(e){return e===null}function ms(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function xo(e){return va(e)?e:[e]}function vn(e,t){xo(e).forEach(t)}function ba(e,t){return e.indexOf(t)>-1}function Ko(e,t){return e.push.apply(e,xo(t)),e}function kn(e,t,n){e&&vn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){kn(e,Gn(t)?t.split(" "):t,!0)}function bo(e,t){vn(t,e.appendChild.bind(e))}function wa(e,t){vn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ro(e,t){return ms(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function gs(e,t){var n=e?Xn(e.children):[];return t?n.filter(function(i){return ro(i,t)}):n}function wo(e,t){return t?gs(e,t)[0]:e.firstElementChild}var ao=Object.keys;function di(e,t,n){return e&&(n?ao(e).reverse():ao(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function lo(e){return Xn(arguments,1).forEach(function(t){di(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Xn(arguments,1).forEach(function(t){di(t,function(n,i){va(n)?e[i]=n.slice():oo(n)?e[i]=zn({},oo(e[i])?e[i]:{},n):e[i]=n})}),e}function Ja(e,t){vn(t||ao(e),function(n){delete e[n]})}function Ln(e,t){vn(e,function(n){vn(t,function(i){n&&n.removeAttribute(i)})})}function ct(e,t,n){oo(t)?di(t,function(i,o){ct(e,o,i)}):vn(e,function(i){xa(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function Ti(e,t,n){var i=document.createElement(e);return t&&(Gn(t)?Tn(i,t):ct(i,t)),n&&bo(n,i),i}function xn(e,t,n){if(vo(n))return getComputedStyle(e)[t];xa(n)||(e.style[t]=""+n)}function so(e,t){xn(e,"display",t)}function hs(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function Qa(e,t){return e&&e.classList.contains(t)}function gn(e){return e.getBoundingClientRect()}function ui(e){vn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function fs(e){return wo(new DOMParser().parseFromString(e,"text/html").body)}function En(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ys(e,t){return e&&e.querySelector(t)}function Sa(e,t){return t?Xn(e.querySelectorAll(t)):[]}function Mn(e,t){kn(e,t,!1)}function ra(e){return e.timeStamp}function ti(e){return Gn(e)?e:e?e+"px":""}var So="splide",$a="data-"+So;function Qi(e,t){if(!e)throw new Error("["+So+"] "+(t||""))}var qn=Math.min,er=Math.max,tr=Math.floor,co=Math.ceil,sn=Math.abs;function vs(e,t,n){return sn(e-t)<n}function Uo(e,t,n,i){var o=qn(t,n),l=er(t,n);return i?o<e&&e<l:o<=e&&e<=l}function wi(e,t,n){var i=qn(t,n),o=er(t,n);return qn(er(i,e),o)}function aa(e){return+(e>0)-+(e<0)}function la(e,t){return vn(t,function(n){e=e.replace("%s",""+n)}),e}function Ca(e){return e<10?"0"+e:""+e}var el={};function yd(e){return""+e+Ca(el[e]=(el[e]||0)+1)}function xs(){var e=[];function t(s,d,c,u){o(s,d,function(m,x,b){var T="addEventListener"in m,f=T?m.removeEventListener.bind(m,x,c,u):m.removeListener.bind(m,c);T?m.addEventListener(x,c,u):m.addListener(c),e.push([m,x,b,c,f])})}function n(s,d,c){o(s,d,function(u,m,x){e=e.filter(function(b){return b[0]===u&&b[1]===m&&b[2]===x&&(!c||b[3]===c)?(b[4](),!1):!0})})}function i(s,d,c){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:m,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,m,!1,c)),s.dispatchEvent(u),u}function o(s,d,c){vn(s,function(u){u&&vn(d,function(m){m.split(" ").forEach(function(x){var b=x.split(".");c(u,b[0],b[1])})})})}function l(){e.forEach(function(s){s[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:l}}var Yn="mounted",sa="ready",_n="move",Bi="moved",Ta="click",bs="active",ws="inactive",Ss="visible",$s="hidden",Zt="refresh",an="updated",Ei="resize",dr="resized",Cs="drag",Ts="dragging",Ls="dragged",ur="scroll",hi="scrolled",vd="overflow",La="destroy",Is="arrows:mounted",Rs="arrows:updated",Es="pagination:mounted",ks="pagination:updated",Ia="navigation:mounted",Ra="autoplay:play",Ms="autoplay:playing",Ea="autoplay:pause",ka="lazyload:loaded",Ps="sk",As="sh",nr="ei";function qt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=xs();function i(l,s){n.bind(t,xo(l).join(" "),function(d){s.apply(s,va(d.detail)?d.detail:[])})}function o(l){n.dispatch(t,l,Xn(arguments,1))}return e&&e.event.on(La,n.destroy),lo(n,{bus:t,on:i,off:Ot(n.unbind,t),emit:o})}function pr(e,t,n,i){var o=Date.now,l,s=0,d,c=!0,u=0;function m(){if(!c){if(s=e?qn((o()-l)/e,1):1,n&&n(s),s>=1&&(t(),l=o(),i&&++u>=i))return b();d=Za(m)}}function x(R){R||f(),l=o()-(R?s*e:0),c=!1,d=Za(m)}function b(){c=!0}function T(){l=o(),s=0,n&&n(s)}function f(){d&&cancelAnimationFrame(d),s=0,d=0,c=!0}function L(R){e=R}function $(){return c}return{start:x,rewind:T,pause:b,cancel:f,set:L,isPaused:$}}function xd(e){var t=e;function n(o){t=o}function i(o){return ba(xo(o),t)}return{set:n,is:i}}function bd(e,t){var n=pr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function wd(e,t,n){var i=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},s=xs(),d=[];function c(){var f=n.mediaQuery==="min";ao(o).sort(function(L,$){return f?+L-+$:+$-+L}).forEach(function(L){m(o[L],"("+(f?"min":"max")+"-width:"+L+"px)")}),m(l,Ya),x()}function u(f){f&&s.destroy()}function m(f,L){var $=matchMedia(L);s.bind($,"change",x),d.push([f,$])}function x(){var f=i.is(Qo),L=n.direction,$=d.reduce(function(R,E){return zn(R,E[1].matches?E[0]:{})},{});Ja(n),T($),n.destroy?e.destroy(n.destroy==="completely"):f?(u(!0),e.mount()):L!==n.direction&&e.refresh()}function b(f){matchMedia(Ya).matches&&(f?zn(n,l):Ja(n,ao(l)))}function T(f,L,$){zn(n,f),L&&zn(Object.getPrototypeOf(n),f),($||!i.is(Ci))&&e.emit(an,n)}return{setup:c,destroy:u,reduce:b,set:T}}var mr="Arrow",gr=mr+"Left",hr=mr+"Right",Fs=mr+"Up",Ws=mr+"Down",tl="rtl",fr="ttb",Pr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Fs,hr],ArrowRight:[Ws,gr]};function Sd(e,t,n){function i(l,s,d){d=d||n.direction;var c=d===tl&&!s?1:d===fr?0:-1;return Pr[l]&&Pr[l][c]||l.replace(/width|left|right/i,function(u,m){var x=Pr[u.toLowerCase()][c]||u;return m>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(l){return l*(n.direction===tl?1:-1)}return{resolve:i,orient:o}}var Pn="role",Li="tabindex",$d="disabled",wn="aria-",$o=wn+"controls",_s=wn+"current",nl=wn+"selected",fn=wn+"label",Ma=wn+"labelledby",Ns=wn+"hidden",Pa=wn+"orientation",uo=wn+"roledescription",il=wn+"live",ol=wn+"busy",rl=wn+"atomic",Aa=[Pn,Li,$d,$o,_s,fn,Ma,Ns,Pa,uo],In=So+"__",Zn="is-",Ar=So,al=In+"track",Cd=In+"list",yr=In+"slide",Hs=yr+"--clone",Td=yr+"__container",Fa=In+"arrows",vr=In+"arrow",js=vr+"--prev",Os=vr+"--next",xr=In+"pagination",zs=xr+"__page",Ld=In+"progress",Id=Ld+"__bar",Rd=In+"toggle",Ed=In+"spinner",kd=In+"sr",Md=Zn+"initialized",pi=Zn+"active",Bs=Zn+"prev",Ds=Zn+"next",ca=Zn+"visible",da=Zn+"loading",Vs=Zn+"focus-in",Gs=Zn+"overflow",Pd=[pi,ca,Bs,Ds,da,Vs,Gs],Ad={slide:yr,clone:Hs,arrows:Fa,arrow:vr,prev:js,next:Os,pagination:xr,page:zs,spinner:Ed};function Fd(e,t){if(ps(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ro(n,t);)n=n.parentElement;return n}var Wd=5,ll=200,qs="touchstart mousedown",Fr="touchmove mousemove",Wr="touchend touchcancel mouseup click";function _d(e,t,n){var i=qt(e),o=i.on,l=i.bind,s=e.root,d=n.i18n,c={},u=[],m=[],x=[],b,T,f;function L(){C(),U(),E()}function $(){o(Zt,R),o(Zt,L),o(an,E),l(document,qs+" keydown",function(I){f=I.type==="keydown"},{capture:!0}),l(s,"focusin",function(){kn(s,Vs,!!f)})}function R(I){var w=Aa.concat("style");Wn(u),Mn(s,m),Mn(b,x),Ln([b,T],w),Ln(s,I?w:["style",uo])}function E(){Mn(s,m),Mn(b,x),m=j(Ar),x=j(al),Tn(s,m),Tn(b,x),ct(s,fn,n.label),ct(s,Ma,n.labelledby)}function C(){b=k("."+al),T=wo(b,"."+Cd),Qi(b&&T,"A track/list element is missing."),Ko(u,gs(T,"."+yr+":not(."+Hs+")")),di({arrows:Fa,pagination:xr,prev:js,next:Os,bar:Id,toggle:Rd},function(I,w){c[w]=k("."+I)}),lo(c,{root:s,track:b,list:T,slides:u})}function U(){var I=s.id||yd(So),w=n.role;s.id=I,b.id=b.id||I+"-track",T.id=T.id||I+"-list",!bn(s,Pn)&&s.tagName!=="SECTION"&&w&&ct(s,Pn,w),ct(s,uo,d.carousel),ct(T,Pn,"presentation")}function k(I){var w=ys(s,I);return w&&Fd(w,"."+Ar)===s?w:void 0}function j(I){return[I+"--"+n.type,I+"--"+n.direction,n.drag&&I+"--draggable",n.isNavigation&&I+"--nav",I===Ar&&pi]}return lo(c,{setup:L,mount:$,destroy:R})}var ki="slide",Di="loop",Co="fade";function Nd(e,t,n,i){var o=qt(e),l=o.on,s=o.emit,d=o.bind,c=e.Components,u=e.root,m=e.options,x=m.isNavigation,b=m.updateOnMove,T=m.i18n,f=m.pagination,L=m.slideFocus,$=c.Direction.resolve,R=bn(i,"style"),E=bn(i,fn),C=n>-1,U=wo(i,"."+Td),k;function j(){C||(i.id=u.id+"-slide"+Ca(t+1),ct(i,Pn,f?"tabpanel":"group"),ct(i,uo,T.slide),ct(i,fn,E||la(T.slideLabel,[t+1,e.length]))),I()}function I(){d(i,"click",Ot(s,Ta,N)),d(i,"keydown",Ot(s,Ps,N)),l([Bi,As,hi],S),l(Ia,W),b&&l(_n,h)}function w(){k=!0,o.destroy(),Mn(i,Pd),Ln(i,Aa),ct(i,"style",R),ct(i,fn,E||"")}function W(){var F=e.splides.map(function(A){var q=A.splide.Components.Slides.getAt(t);return q?q.slide.id:""}).join(" ");ct(i,fn,la(T.slideX,(C?n:t)+1)),ct(i,$o,F),ct(i,Pn,L?"button":""),L&&Ln(i,uo)}function h(){k||S()}function S(){if(!k){var F=e.index;M(),z(),kn(i,Bs,t===F-1),kn(i,Ds,t===F+1)}}function M(){var F=le();F!==Qa(i,pi)&&(kn(i,pi,F),ct(i,_s,x&&F||""),s(F?bs:ws,N))}function z(){var F=Y(),A=!F&&(!le()||C);if(e.state.is([zi,yo])||ct(i,Ns,A||""),ct(Sa(i,m.focusableNodes||""),Li,A?-1:""),L&&ct(i,Li,A?-1:0),F!==Qa(i,ca)&&(kn(i,ca,F),s(F?Ss:$s,N)),!F&&document.activeElement===i){var q=c.Slides.getAt(e.index);q&&hs(q.slide)}}function K(F,A,q){xn(q&&U||i,F,A)}function le(){var F=e.index;return F===t||m.cloneStatus&&F===n}function Y(){if(e.is(Co))return le();var F=gn(c.Elements.track),A=gn(i),q=$("left",!0),G=$("right",!0);return tr(F[q])<=co(A[q])&&tr(A[G])<=co(F[G])}function D(F,A){var q=sn(F-t);return!C&&(m.rewind||e.is(Di))&&(q=qn(q,e.length-q)),q<=A}var N={index:t,slideIndex:n,slide:i,container:U,isClone:C,mount:j,destroy:w,update:S,style:K,isWithin:D};return N}function Hd(e,t,n){var i=qt(e),o=i.on,l=i.emit,s=i.bind,d=t.Elements,c=d.slides,u=d.list,m=[];function x(){b(),o(Zt,T),o(Zt,b)}function b(){c.forEach(function(S,M){L(S,M,-1)})}function T(){k(function(S){S.destroy()}),Wn(m)}function f(){k(function(S){S.update()})}function L(S,M,z){var K=Nd(e,M,z,S);K.mount(),m.push(K),m.sort(function(le,Y){return le.index-Y.index})}function $(S){return S?j(function(M){return!M.isClone}):m}function R(S){var M=t.Controller,z=M.toIndex(S),K=M.hasFocus()?1:n.perPage;return j(function(le){return Uo(le.index,z,z+K-1)})}function E(S){return j(S)[0]}function C(S,M){vn(S,function(z){if(Gn(z)&&(z=fs(z)),ms(z)){var K=c[M];K?wa(z,K):bo(u,z),Tn(z,n.classes.slide),w(z,Ot(l,Ei))}}),l(Zt)}function U(S){ui(j(S).map(function(M){return M.slide})),l(Zt)}function k(S,M){$(M).forEach(S)}function j(S){return m.filter(ps(S)?S:function(M){return Gn(S)?ro(M.slide,S):ba(xo(S),M.index)})}function I(S,M,z){k(function(K){K.style(S,M,z)})}function w(S,M){var z=Sa(S,"img"),K=z.length;K?z.forEach(function(le){s(le,"load error",function(){--K||M()})}):M()}function W(S){return S?c.length:m.length}function h(){return m.length>n.perPage}return{mount:x,destroy:T,update:f,register:L,get:$,getIn:R,getAt:E,add:C,remove:U,forEach:k,filter:j,style:I,getLength:W,isEnough:h}}function jd(e,t,n){var i=qt(e),o=i.on,l=i.bind,s=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,m=u.root,x=u.track,b=u.list,T=d.getAt,f=d.style,L,$,R;function E(){C(),l(window,"resize load",bd(Ot(s,Ei))),o([an,Zt],C),o(Ei,U)}function C(){L=n.direction===fr,xn(m,"maxWidth",ti(n.width)),xn(x,c("paddingLeft"),k(!1)),xn(x,c("paddingRight"),k(!0)),U(!0)}function U(N){var F=gn(m);(N||$.width!==F.width||$.height!==F.height)&&(xn(x,"height",j()),f(c("marginRight"),ti(n.gap)),f("width",w()),f("height",W(),!0),$=F,s(dr),R!==(R=D())&&(kn(m,Gs,R),s(vd,R)))}function k(N){var F=n.padding,A=c(N?"right":"left");return F&&ti(F[A]||(oo(F)?0:F))||"0px"}function j(){var N="";return L&&(N=I(),Qi(N,"height or heightRatio is missing."),N="calc("+N+" - "+k(!1)+" - "+k(!0)+")"),N}function I(){return ti(n.height||gn(b).width*n.heightRatio)}function w(){return n.autoWidth?null:ti(n.fixedWidth)||(L?"":h())}function W(){return ti(n.fixedHeight)||(L?n.autoHeight?null:h():I())}function h(){var N=ti(n.gap);return"calc((100%"+(N&&" + "+N)+")/"+(n.perPage||1)+(N&&" - "+N)+")"}function S(){return gn(b)[c("width")]}function M(N,F){var A=T(N||0);return A?gn(A.slide)[c("width")]+(F?0:le()):0}function z(N,F){var A=T(N);if(A){var q=gn(A.slide)[c("right")],G=gn(b)[c("left")];return sn(q-G)+(F?0:le())}return 0}function K(N){return z(e.length-1)-z(0)+M(0,N)}function le(){var N=T(0);return N&&parseFloat(xn(N.slide,c("marginRight")))||0}function Y(N){return parseFloat(xn(x,c("padding"+(N?"Right":"Left"))))||0}function D(){return e.is(Co)||K(!0)>S()}return{mount:E,resize:U,listSize:S,slideSize:M,sliderSize:K,totalSize:z,getPadding:Y,isOverflow:D}}var Od=2;function zd(e,t,n){var i=qt(e),o=i.on,l=t.Elements,s=t.Slides,d=t.Direction.resolve,c=[],u;function m(){o(Zt,x),o([an,Ei],T),(u=$())&&(f(u),t.Layout.resize(!0))}function x(){b(),m()}function b(){ui(c),Wn(c),i.destroy()}function T(){var R=$();u!==R&&(u<R||!R)&&i.emit(Zt)}function f(R){var E=s.get().slice(),C=E.length;if(C){for(;E.length<R;)Ko(E,E);Ko(E.slice(-R),E.slice(0,R)).forEach(function(U,k){var j=k<R,I=L(U.slide,k);j?wa(I,E[0].slide):bo(l.list,I),Ko(c,I),s.register(I,k-R+(j?0:C),U.index)})}}function L(R,E){var C=R.cloneNode(!0);return Tn(C,n.classes.clone),C.id=e.root.id+"-clone"+Ca(E+1),C}function $(){var R=n.clones;if(!e.is(Di))R=0;else if(vo(R)){var E=n[d("fixedWidth")]&&t.Layout.slideSize(0),C=E&&co(gn(l.track)[d("width")]/E);R=C||n[d("autoWidth")]&&e.length||n.perPage*Od}return R}return{mount:m,destroy:b}}function Bd(e,t,n){var i=qt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,m=d.totalSize,x=d.listSize,b=d.sliderSize,T=t.Direction,f=T.resolve,L=T.orient,$=t.Elements,R=$.list,E=$.track,C;function U(){C=t.Transition,o([Yn,dr,an,Zt],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),I(e.index),t.Slides.update())}function j(A,q,G,Z){A!==q&&N(A>G)&&(S(),w(h(K(),A>G),!0)),s(zi),l(_n,q,G,A),C.start(q,function(){s(Ri),l(Bi,q,G,A),Z&&Z()})}function I(A){w(z(A,!0))}function w(A,q){if(!e.is(Co)){var G=q?A:W(A);xn(R,"transform","translate"+f("X")+"("+G+"px)"),A!==G&&l(As)}}function W(A){if(e.is(Di)){var q=M(A),G=q>t.Controller.getEnd(),Z=q<0;(Z||G)&&(A=h(A,G))}return A}function h(A,q){var G=A-D(q),Z=b();return A-=L(Z*(co(sn(G)/Z)||1))*(q?1:-1),A}function S(){w(K(),!0),C.cancel()}function M(A){for(var q=t.Slides.get(),G=0,Z=1/0,_=0;_<q.length;_++){var me=q[_].index,v=sn(z(me,!0)-A);if(v<=Z)Z=v,G=me;else break}return G}function z(A,q){var G=L(m(A-1)-Y(A));return q?le(G):G}function K(){var A=f("left");return gn(R)[A]-gn(E)[A]+L(u(!1))}function le(A){return n.trimSpace&&e.is(ki)&&(A=wi(A,0,L(b(!0)-x()))),A}function Y(A){var q=n.focus;return q==="center"?(x()-c(A,!0))/2:+q*c(A)||0}function D(A){return z(A?t.Controller.getEnd():0,!!n.trimSpace)}function N(A){var q=L(h(K(),A));return A?q>=0:q<=R[f("scrollWidth")]-gn(E)[f("width")]}function F(A,q){q=vo(q)?K():q;var G=A!==!0&&L(q)<L(D(!1)),Z=A!==!1&&L(q)>L(D(!0));return G||Z}return{mount:U,move:j,jump:I,translate:w,shift:h,cancel:S,toIndex:M,toPosition:z,getPosition:K,getLimit:D,exceededLimit:F,reposition:k}}function Dd(e,t,n){var i=qt(e),o=i.on,l=i.emit,s=t.Move,d=s.getPosition,c=s.getLimit,u=s.toPosition,m=t.Slides,x=m.isEnough,b=m.getLength,T=n.omitEnd,f=e.is(Di),L=e.is(ki),$=Ot(K,!1),R=Ot(K,!0),E=n.start||0,C,U=E,k,j,I;function w(){W(),o([an,Zt,nr],W),o(dr,h)}function W(){k=b(!0),j=n.perMove,I=n.perPage,C=N();var v=wi(E,0,T?C:k-1);v!==E&&(E=v,s.reposition())}function h(){C!==N()&&l(nr)}function S(v,fe,J){if(!me()){var de=z(v),$e=D(de);$e>-1&&(fe||$e!==E)&&(G($e),s.move(de,$e,U,J))}}function M(v,fe,J,de){t.Scroll.scroll(v,fe,J,function(){var $e=D(s.toIndex(d()));G(T?qn($e,C):$e),de&&de()})}function z(v){var fe=E;if(Gn(v)){var J=v.match(/([+\-<>])(\d+)?/)||[],de=J[1],$e=J[2];de==="+"||de==="-"?fe=le(E+ +(""+de+(+$e||1)),E):de===">"?fe=$e?F(+$e):$(!0):de==="<"&&(fe=R(!0))}else fe=f?v:wi(v,0,C);return fe}function K(v,fe){var J=j||(_()?1:I),de=le(E+J*(v?-1:1),E,!(j||_()));return de===-1&&L&&!vs(d(),c(!v),1)?v?0:C:fe?de:D(de)}function le(v,fe,J){if(x()||_()){var de=Y(v);de!==v&&(fe=v,v=de,J=!1),v<0||v>C?!j&&(Uo(0,v,fe,!0)||Uo(C,fe,v,!0))?v=F(A(v)):f?v=J?v<0?-(k%I||I):k:v:n.rewind?v=v<0?C:0:v=-1:J&&v!==fe&&(v=F(A(fe)+(v<fe?-1:1)))}else v=-1;return v}function Y(v){if(L&&n.trimSpace==="move"&&v!==E)for(var fe=d();fe===u(v,!0)&&Uo(v,0,e.length-1,!n.rewind);)v<E?--v:++v;return v}function D(v){return f?(v+k)%k||0:v}function N(){for(var v=k-(_()||f&&j?1:I);T&&v-- >0;)if(u(k-1,!0)!==u(v,!0)){v++;break}return wi(v,0,k-1)}function F(v){return wi(_()?v:I*v,0,C)}function A(v){return _()?qn(v,C):tr((v>=C?k-1:v)/I)}function q(v){var fe=s.toIndex(v);return L?wi(fe,0,C):fe}function G(v){v!==E&&(U=E,E=v)}function Z(v){return v?U:E}function _(){return!vo(n.focus)||n.isNavigation}function me(){return e.state.is([zi,yo])&&!!n.waitForTransition}return{mount:w,go:S,scroll:M,getNext:$,getPrev:R,getAdjacent:K,getEnd:N,setIndex:G,getIndex:Z,toIndex:F,toPage:A,toDest:q,hasFocus:_,isBusy:me}}var Vd="http://www.w3.org/2000/svg",Gd="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",ko=40;function qd(e,t,n){var i=qt(e),o=i.on,l=i.bind,s=i.emit,d=n.classes,c=n.i18n,u=t.Elements,m=t.Controller,x=u.arrows,b=u.track,T=x,f=u.prev,L=u.next,$,R,E={};function C(){k(),o(an,U)}function U(){j(),C()}function k(){var M=n.arrows;M&&!(f&&L)&&W(),f&&L&&(lo(E,{prev:f,next:L}),so(T,M?"":"none"),Tn(T,R=Fa+"--"+n.direction),M&&(I(),S(),ct([f,L],$o,b.id),s(Is,f,L)))}function j(){i.destroy(),Mn(T,R),$?(ui(x?[f,L]:T),f=L=null):Ln([f,L],Aa)}function I(){o([Yn,Bi,Zt,hi,nr],S),l(L,"click",Ot(w,">")),l(f,"click",Ot(w,"<"))}function w(M){m.go(M,!0)}function W(){T=x||Ti("div",d.arrows),f=h(!0),L=h(!1),$=!0,bo(T,[f,L]),!x&&wa(T,b)}function h(M){var z='<button class="'+d.arrow+" "+(M?d.prev:d.next)+'" type="button"><svg xmlns="'+Vd+'" viewBox="0 0 '+ko+" "+ko+'" width="'+ko+'" height="'+ko+'" focusable="false"><path d="'+(n.arrowPath||Gd)+'" />';return fs(z)}function S(){if(f&&L){var M=e.index,z=m.getPrev(),K=m.getNext(),le=z>-1&&M<z?c.last:c.prev,Y=K>-1&&M>K?c.first:c.next;f.disabled=z<0,L.disabled=K<0,ct(f,fn,le),ct(L,fn,Y),s(Rs,f,L,z,K)}}return{arrows:E,mount:C,destroy:j,update:S}}var Kd=$a+"-interval";function Ud(e,t,n){var i=qt(e),o=i.on,l=i.bind,s=i.emit,d=pr(n.interval,e.go.bind(e,">"),I),c=d.isPaused,u=t.Elements,m=t.Elements,x=m.root,b=m.toggle,T=n.autoplay,f,L,$=T==="pause";function R(){T&&(E(),b&&ct(b,$o,u.track.id),$||C(),j())}function E(){n.pauseOnHover&&l(x,"mouseenter mouseleave",function(W){f=W.type==="mouseenter",k()}),n.pauseOnFocus&&l(x,"focusin focusout",function(W){L=W.type==="focusin",k()}),b&&l(b,"click",function(){$?C():U(!0)}),o([_n,ur,Zt],d.rewind),o(_n,w)}function C(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),L=f=$=!1,j(),s(Ra))}function U(W){W===void 0&&(W=!0),$=!!W,j(),c()||(d.pause(),s(Ea))}function k(){$||(f||L?U(!1):C())}function j(){b&&(kn(b,pi,!$),ct(b,fn,n.i18n[$?"play":"pause"]))}function I(W){var h=u.bar;h&&xn(h,"width",W*100+"%"),s(Ms,W)}function w(W){var h=t.Slides.getAt(W);d.set(h&&+bn(h.slide,Kd)||n.interval)}return{mount:R,destroy:d.cancel,play:C,pause:U,isPaused:c}}function Xd(e,t,n){var i=qt(e),o=i.on;function l(){n.cover&&(o(ka,Ot(d,!0)),o([Yn,an,Zt],Ot(s,!0)))}function s(c){t.Slides.forEach(function(u){var m=wo(u.container||u.slide,"img");m&&m.src&&d(c,m,u)})}function d(c,u,m){m.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),so(u,c?"none":"")}return{mount:l,destroy:Ot(s,!1)}}var Yd=10,Zd=600,Jd=.6,Qd=1.5,eu=800;function tu(e,t,n){var i=qt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,m=d.exceededLimit,x=d.translate,b=e.is(ki),T,f,L=1;function $(){o(_n,U),o([an,Zt],k)}function R(I,w,W,h,S){var M=c();if(U(),W&&(!b||!m())){var z=t.Layout.sliderSize(),K=aa(I)*z*tr(sn(I)/z)||0;I=d.toPosition(t.Controller.toDest(I%z))+K}var le=vs(M,I,1);L=1,w=le?0:w||er(sn(I-M)/Qd,eu),f=h,T=pr(w,E,Ot(C,M,I,S),1),s(yo),l(ur),T.start()}function E(){s(Ri),f&&f(),l(hi)}function C(I,w,W,h){var S=c(),M=I+(w-I)*j(h),z=(M-S)*L;x(S+z),b&&!W&&m()&&(L*=Jd,sn(z)<Yd&&R(u(m(!0)),Zd,!1,f,!0))}function U(){T&&T.cancel()}function k(){T&&!T.isPaused()&&(U(),E())}function j(I){var w=n.easingFunc;return w?w(I):1-Math.pow(1-I,4)}return{mount:$,destroy:U,scroll:R,cancel:k}}var Si={passive:!1,capture:!0};function nu(e,t,n){var i=qt(e),o=i.on,l=i.emit,s=i.bind,d=i.unbind,c=e.state,u=t.Move,m=t.Scroll,x=t.Controller,b=t.Elements.track,T=t.Media.reduce,f=t.Direction,L=f.resolve,$=f.orient,R=u.getPosition,E=u.exceededLimit,C,U,k,j,I,w=!1,W,h,S;function M(){s(b,Fr,oa,Si),s(b,Wr,oa,Si),s(b,qs,K,Si),s(b,"click",D,{capture:!0}),s(b,"dragstart",En),o([Yn,an],z)}function z(){var Q=n.drag;xe(!Q),j=Q==="free"}function K(Q){if(W=!1,!h){var ye=$e(Q);de(Q.target)&&(ye||!Q.button)&&(x.isBusy()?En(Q,!0):(S=ye?b:window,I=c.is([zi,yo]),k=null,s(S,Fr,le,Si),s(S,Wr,Y,Si),u.cancel(),m.cancel(),N(Q)))}}function le(Q){if(c.is(qo)||(c.set(qo),l(Cs)),Q.cancelable)if(I){u.translate(C+J(_(Q)));var ye=me(Q)>ll,ve=w!==(w=E());(ye||ve)&&N(Q),W=!0,l(Ts),En(Q)}else q(Q)&&(I=A(Q),En(Q))}function Y(Q){c.is(qo)&&(c.set(Ri),l(Ls)),I&&(F(Q),En(Q)),d(S,Fr,le),d(S,Wr,Y),I=!1}function D(Q){!h&&W&&En(Q,!0)}function N(Q){k=U,U=Q,C=R()}function F(Q){var ye=G(Q),ve=Z(ye),ke=n.rewind&&n.rewindByDrag;T(!1),j?x.scroll(ve,0,n.snap):e.is(Co)?x.go($(aa(ye))<0?ke?"<":"-":ke?">":"+"):e.is(ki)&&w&&ke?x.go(E(!0)?">":"<"):x.go(x.toDest(ve),!0),T(!0)}function A(Q){var ye=n.dragMinThreshold,ve=oo(ye),ke=ve&&ye.mouse||0,we=(ve?ye.touch:+ye)||10;return sn(_(Q))>($e(Q)?we:ke)}function q(Q){return sn(_(Q))>sn(_(Q,!0))}function G(Q){if(e.is(Di)||!w){var ye=me(Q);if(ye&&ye<ll)return _(Q)/ye}return 0}function Z(Q){return R()+aa(Q)*qn(sn(Q)*(n.flickPower||600),j?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function _(Q,ye){return fe(Q,ye)-fe(v(Q),ye)}function me(Q){return ra(Q)-ra(v(Q))}function v(Q){return U===Q&&k||U}function fe(Q,ye){return($e(Q)?Q.changedTouches[0]:Q)["page"+L(ye?"Y":"X")]}function J(Q){return Q/(w&&e.is(ki)?Wd:1)}function de(Q){var ye=n.noDrag;return!ro(Q,"."+zs+", ."+vr)&&(!ye||!ro(Q,ye))}function $e(Q){return typeof TouchEvent<"u"&&Q instanceof TouchEvent}function oe(){return I}function xe(Q){h=Q}return{mount:M,disable:xe,isDragging:oe}}var iu={Spacebar:" ",Right:hr,Left:gr,Up:Fs,Down:Ws};function Wa(e){return e=Gn(e)?e:e.key,iu[e]||e}var sl="keydown";function ou(e,t,n){var i=qt(e),o=i.on,l=i.bind,s=i.unbind,d=e.root,c=t.Direction.resolve,u,m;function x(){b(),o(an,T),o(an,b),o(_n,L)}function b(){var R=n.keyboard;R&&(u=R==="global"?window:d,l(u,sl,$))}function T(){s(u,sl)}function f(R){m=R}function L(){var R=m;m=!0,us(function(){m=R})}function $(R){if(!m){var E=Wa(R);E===c(gr)?e.go("<"):E===c(hr)&&e.go(">")}}return{mount:x,destroy:T,disable:f}}var eo=$a+"-lazy",Xo=eo+"-srcset",ru="["+eo+"], ["+Xo+"]";function au(e,t,n){var i=qt(e),o=i.on,l=i.off,s=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Bi,hi],m=[];function x(){n.lazyLoad&&(b(),o(Zt,b))}function b(){Wn(m),T(),c?R():(l(u),o(u,f),f())}function T(){t.Slides.forEach(function(E){Sa(E.slide,ru).forEach(function(C){var U=bn(C,eo),k=bn(C,Xo);if(U!==C.src||k!==C.srcset){var j=n.classes.spinner,I=C.parentElement,w=wo(I,"."+j)||Ti("span",j,I);m.push([C,E,w]),C.src||so(C,"none")}})})}function f(){m=m.filter(function(E){var C=n.perPage*((n.preloadPages||1)+1)-1;return E[1].isWithin(e.index,C)?L(E):!0}),m.length||l(u)}function L(E){var C=E[0];Tn(E[1].slide,da),s(C,"load error",Ot($,E)),ct(C,"src",bn(C,eo)),ct(C,"srcset",bn(C,Xo)),Ln(C,eo),Ln(C,Xo)}function $(E,C){var U=E[0],k=E[1];Mn(k.slide,da),C.type!=="error"&&(ui(E[2]),so(U,""),d(ka,U,k),d(Ei)),c&&R()}function R(){m.length&&L(m.shift())}return{mount:x,destroy:Ot(Wn,m),check:f}}function lu(e,t,n){var i=qt(e),o=i.on,l=i.emit,s=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,m=u.hasFocus,x=u.getIndex,b=u.go,T=t.Direction.resolve,f=c.pagination,L=[],$,R;function E(){C(),o([an,Zt,nr],E);var h=n.pagination;f&&so(f,h?"":"none"),h&&(o([_n,ur,hi],W),U(),W(),l(Es,{list:$,items:L},w(e.index)))}function C(){$&&(ui(f?Xn($.children):$),Mn($,R),Wn(L),$=null),i.destroy()}function U(){var h=e.length,S=n.classes,M=n.i18n,z=n.perPage,K=m()?u.getEnd()+1:co(h/z);$=f||Ti("ul",S.pagination,c.track.parentElement),Tn($,R=xr+"--"+I()),ct($,Pn,"tablist"),ct($,fn,M.select),ct($,Pa,I()===fr?"vertical":"");for(var le=0;le<K;le++){var Y=Ti("li",null,$),D=Ti("button",{class:S.page,type:"button"},Y),N=d.getIn(le).map(function(A){return A.slide.id}),F=!m()&&z>1?M.pageX:M.slideX;s(D,"click",Ot(k,le)),n.paginationKeyboard&&s(D,"keydown",Ot(j,le)),ct(Y,Pn,"presentation"),ct(D,Pn,"tab"),ct(D,$o,N.join(" ")),ct(D,fn,la(F,le+1)),ct(D,Li,-1),L.push({li:Y,button:D,page:le})}}function k(h){b(">"+h,!0)}function j(h,S){var M=L.length,z=Wa(S),K=I(),le=-1;z===T(hr,!1,K)?le=++h%M:z===T(gr,!1,K)?le=(--h+M)%M:z==="Home"?le=0:z==="End"&&(le=M-1);var Y=L[le];Y&&(hs(Y.button),b(">"+le),En(S,!0))}function I(){return n.paginationDirection||n.direction}function w(h){return L[u.toPage(h)]}function W(){var h=w(x(!0)),S=w(x());if(h){var M=h.button;Mn(M,pi),Ln(M,nl),ct(M,Li,-1)}if(S){var z=S.button;Tn(z,pi),ct(z,nl,!0),ct(z,Li,"")}l(ks,{list:$,items:L},h,S)}return{items:L,mount:E,destroy:C,getAt:w,update:W}}var su=[" ","Enter"];function cu(e,t,n){var i=n.isNavigation,o=n.slideFocus,l=[];function s(){e.splides.forEach(function(f){f.isParent||(u(e,f.splide),u(f.splide,e))}),i&&m()}function d(){l.forEach(function(f){f.destroy()}),Wn(l)}function c(){d(),s()}function u(f,L){var $=qt(f);$.on(_n,function(R,E,C){L.go(L.is(Di)?C:R)}),l.push($)}function m(){var f=qt(e),L=f.on;L(Ta,b),L(Ps,T),L([Yn,an],x),l.push(f),f.emit(Ia,e.splides)}function x(){ct(t.Elements.list,Pa,n.direction===fr?"vertical":"")}function b(f){e.go(f.index)}function T(f,L){ba(su,Wa(L))&&(b(f),En(L))}return{setup:Ot(t.Media.set,{slideFocus:vo(o)?i:o},!0),mount:s,destroy:d,remount:c}}function du(e,t,n){var i=qt(e),o=i.bind,l=0;function s(){n.wheel&&o(t.Elements.track,"wheel",d,Si)}function d(u){if(u.cancelable){var m=u.deltaY,x=m<0,b=ra(u),T=n.wheelMinThreshold||0,f=n.wheelSleep||0;sn(m)>T&&b-l>f&&(e.go(x?"<":">"),l=b),c(x)&&En(u)}}function c(u){return!n.releaseWheel||e.state.is(zi)||t.Controller.getAdjacent(u)!==-1}return{mount:s}}var uu=90;function pu(e,t,n){var i=qt(e),o=i.on,l=t.Elements.track,s=n.live&&!n.isNavigation,d=Ti("span",kd),c=pr(uu,Ot(m,!1));function u(){s&&(b(!t.Autoplay.isPaused()),ct(l,rl,!0),d.textContent="…",o(Ra,Ot(b,!0)),o(Ea,Ot(b,!1)),o([Bi,hi],Ot(m,!0)))}function m(T){ct(l,ol,T),T?(bo(l,d),c.start()):(ui(d),c.cancel())}function x(){Ln(l,[il,rl,ol]),ui(d)}function b(T){s&&ct(l,il,T?"off":"polite")}return{mount:u,disable:b,destroy:x}}var mu=Object.freeze({__proto__:null,Media:wd,Direction:Sd,Elements:_d,Slides:Hd,Layout:jd,Clones:zd,Move:Bd,Controller:Dd,Arrows:qd,Autoplay:Ud,Cover:Xd,Scroll:tu,Drag:nu,Keyboard:ou,LazyLoad:au,Pagination:lu,Sync:cu,Wheel:du,Live:pu}),gu={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},hu={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Ad,i18n:gu,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function fu(e,t,n){var i=t.Slides;function o(){qt(e).on([Yn,Zt],l)}function l(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function s(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),us(c)}return{mount:o,start:s,cancel:oa}}function yu(e,t,n){var i=t.Move,o=t.Controller,l=t.Scroll,s=t.Elements.list,d=Ot(xn,s,"transition"),c;function u(){qt(e).bind(s,"transitionend",function(T){T.target===s&&c&&(x(),c())})}function m(T,f){var L=i.toPosition(T,!0),$=i.getPosition(),R=b(T);sn(L-$)>=1&&R>=1?n.useScroll?l.scroll(L,R,!1,f):(d("transform "+R+"ms "+n.easing),i.translate(L,!0),c=f):(i.jump(T),f())}function x(){d(""),l.cancel()}function b(T){var f=n.rewindSpeed;if(e.is(ki)&&f){var L=o.getIndex(!0),$=o.getEnd();if(L===0&&T>=$||L>=$&&T===0)return f}return n.speed}return{mount:u,start:m,cancel:x}}var vu=(function(){function e(n,i){this.event=qt(),this.Components={},this.state=xd(Ci),this.splides=[],this._o={},this._E={};var o=Gn(n)?ys(document,n):n;Qi(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,fn)||"",labelledby:bn(o,Ma)||""},hu,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,$a)))}catch{Qi(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var l=this,s=this.state,d=this.Components;Qi(s.is([Ci,Qo]),"Already mounted!"),s.set(Ci),this._C=d,this._T=o||this._T||(this.is(Co)?fu:yu),this._E=i||this._E;var c=lo({},mu,this._E,{Transition:this._T});return di(c,function(u,m){var x=u(l,d,l._o);d[m]=x,x.setup&&x.setup()}),di(d,function(u){u.mount&&u.mount()}),this.emit(Yn),Tn(this.root,Md),s.set(Ri),this.emit(sa),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Ri)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Xn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Zt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,l=this.state;return l.is(Ci)?qt(this).on(sa,this.destroy.bind(this,i)):(di(this._C,function(s){s.destroy&&s.destroy(i)},!0),o.emit(La),o.destroy(),i&&Wn(this.splides),l.set(Qo)),this},gd(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),_a=vu;_a.defaults={};_a.STATES=fd;var cl=[[Yn,"onMounted"],[sa,"onReady"],[_n,"onMove"],[Bi,"onMoved"],[Ta,"onClick"],[bs,"onActive"],[ws,"onInactive"],[Ss,"onVisible"],[$s,"onHidden"],[Zt,"onRefresh"],[an,"onUpdated"],[Ei,"onResize"],[dr,"onResized"],[Cs,"onDrag"],[Ts,"onDragging"],[Ls,"onDragged"],[ur,"onScroll"],[hi,"onScrolled"],[La,"onDestroy"],[Is,"onArrowsMounted"],[Rs,"onArrowsUpdated"],[Es,"onPaginationMounted"],[ks,"onPaginationUpdated"],[Ia,"onNavigationMounted"],[Ra,"onAutoplayPlay"],[Ms,"onAutoplayPlaying"],[Ea,"onAutoplayPause"],[ka,"onLazyLoadLoaded"]];function Na(...e){return e.filter(Boolean).join(" ")}function ir(e){return e!==null&&typeof e=="object"}function ua(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!ua(n,t[i]));if(ir(e)&&ir(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ua(e[o],t[o]))}return e===t}function xu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function bu(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function pa(e,t){const n=e;return bu(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ir(i)?n[o]=pa(ir(n[o])?n[o]:{},i):n[o]=i}),n}var wu=({children:e,className:t,...n})=>a.createElement("div",{className:Na("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),br=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new _a(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=pa({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!ua(this.options,e)&&(this.splide.options=e,this.options=pa({},e));const t=this.getSlides();xu(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){cl.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return a.createElement(t,{className:Na("splide",e),ref:this.splideRef,...this.omit(o,["options",...cl.map(l=>l[1])])},n?a.createElement(wu,null,i):i)}},wr=({children:e,className:t,...n})=>a.createElement("li",{className:Na("splide__slide",t),...n},e);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const Su="RichTextRenderer-module__link___BWeZ2",$u={link:Su},Cu=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Sr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Cu(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function dn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Sr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:i!==void 0?y.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const mi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:$u.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Tu(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Tu(e){return{...e.fontFamily&&{fontFamily:Sr(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Lu="SvgImage-module__svg___q3xE-",Iu="SvgImage-module__img___VsTm-",ds={svg:Lu,img:Iu},Ru=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Eu=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,rn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,l]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Ru(e)||!s?r.jsx("img",{src:e,alt:"",className:nt(ds.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:nt(ds.svg,i),style:{"--svg":Eu(e),"--fill":t,"--hover-fill":n,...o??{}}})},Mu={"top-left":Xe.topLeftAlignment,"top-center":Xe.topCenterAlignment,"top-right":Xe.topRightAlignment,"middle-left":Xe.middleLeftAlignment,"middle-center":Xe.middleCenterAlignment,"middle-right":Xe.middleRightAlignment,"bottom-left":Xe.bottomLeftAlignment,"bottom-center":Xe.bottomCenterAlignment,"bottom-right":Xe.bottomRightAlignment};function ku({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:m,fontSizeLineHeight:x,textAppearance:b,color:$}=n.imageCaption??{},[h,w]=a.useState(void 0),[C,R]=a.useState(null),[A,T]=a.useState(0),[N,E]=a.useState(0),{direction:V,transition:L,controls:I,pagination:_,imageCaption:f,triggers:S}=e,M=a.useRef(L.type),{x:z,y:K}=e.controls.offset,ae=Q=>{o&&o.go(Q)};return a.useEffect(()=>{if(!C)return;const Q=new ResizeObserver(G=>{if(!o)return;const[H]=G;w({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return Q.observe(C),()=>Q.unobserve(C)},[C]),a.useEffect(()=>{!o||M.current===L.type||(E(Q=>Q+1),M.current=L.type)},[L.type]),r.jsx("div",{className:nt(Xe.wrapper,{[Xe.editor]:i}),ref:R,children:r.jsxs("div",{className:Xe.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:L.backgroundColor&&L.type==="fade in"?L.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:nt(Xe.captionBlock),children:r.jsx("div",{className:Xe.captionTextWrapper,children:t.map((Q,G)=>r.jsx("div",{className:nt(Xe.captionText,Mu[f.alignment],{[Xe.withPointerEvents]:G===A&&i,[Xe.active]:G===A}),style:{fontFamily:Sr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":y.scalingValue(l.width,i),letterSpacing:y.scalingValue(c,i),wordSpacing:y.scalingValue(m,i),textAlign:u,fontSize:y.scalingValue(x.fontSize,i),lineHeight:y.scalingValue(x.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:$,transitionDuration:L.duration?`${Math.round(parseInt(L.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Xe.captionTextInner,style:{"--link-hover-color":f.linkHoverColor,"--link-color":f.linkColor,position:"relative",top:y.scalingValue(f.offset.y,i),left:y.scalingValue(f.offset.x,i)},children:r.jsx(mi,{content:Q.imageCaption})})},G))})}),r.jsx(br,{onMove:Q=>{T(Q.index)},ref:s,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,autoplay:S.autoPlay!==null,...S.autoPlay!==null&&{interval:parseInt(S.autoPlay)*1e3},direction:V==="horiz"||L.type==="fade in"?"ltr":"ttb",pagination:!1,drag:S.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:L.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((Q,G)=>r.jsx(wr,{children:r.jsx("div",{className:Xe.sliderItem,children:r.jsx("div",{className:Xe.imgWrapper,children:r.jsx("img",{className:nt(Xe.sliderImage,{[Xe.contain]:Q.image.objectFit==="contain",[Xe.cover]:Q.image.objectFit==="cover"}),src:Q.image.url,alt:Q.image.name??""})})})},G))},N),I.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(Xe.arrow,{[Xe.arrowVertical]:V==="vert",[Xe.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:r.jsxs("button",{onClick:()=>{ae("-1")},className:Xe.arrowInner,style:{transform:`translate(${y.scalingValue(z,i)}, ${y.scalingValue(K*(V==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&r.jsx(rn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:nt(Xe.arrowImg,Xe.mirror)}),!I.arrowsImgUrl&&r.jsx(us,{color:I.color,className:nt(Xe.arrowIcon,Xe.arrowImg,Xe.mirror)})]})}),r.jsx("div",{className:nt(Xe.arrow,Xe.nextArrow,{[Xe.arrowVertical]:V==="vert",[Xe.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:r.jsxs("button",{className:Xe.arrowInner,onClick:()=>ae("+1"),style:{transform:`translate(${y.scalingValue(z*(V==="horiz"?-1:1),i)}, ${y.scalingValue(K,i)}) scale(${e.controls.scale/100}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&r.jsx(rn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Xe.arrowImg}),!I.arrowsImgUrl&&r.jsx(us,{color:I.color,className:nt(Xe.arrowIcon,Xe.arrowImg)})]})})]}),S.triggersList.click&&r.jsx("div",{className:Xe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),_.isActive&&r.jsx("div",{className:nt(Xe.pagination,{[Xe.paginationInsideBottom]:_.position==="inside-1"&&V==="horiz",[Xe.paginationInsideTop]:_.position==="inside-2"&&V==="horiz",[Xe.paginationOutsideBottom]:_.position==="outside-1"&&V==="horiz",[Xe.paginationOutsideTop]:_.position==="outside-2"&&V==="horiz",[Xe.paginationInsideLeft]:_.position==="inside-1"&&V==="vert",[Xe.paginationInsideRight]:_.position==="inside-2"&&V==="vert",[Xe.paginationOutsideLeft]:_.position==="outside-1"&&V==="vert",[Xe.paginationOutsideRight]:_.position==="outside-2"&&V==="vert",[Xe.paginationVertical]:V==="vert"}),children:r.jsx("div",{className:Xe.paginationInner,style:{backgroundColor:_.colors[2],transform:`scale(${_.scale/100}) translate(${y.scalingValue(_.offset.x,i)}, ${y.scalingValue(_.offset.y,i)}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:t.map((Q,G)=>r.jsx("button",{onClick:()=>{o&&o.go(G)},className:nt(Xe.paginationItem),children:r.jsx("div",{className:nt(Xe.dot,{[Xe.activeDot]:G===A}),style:{backgroundColor:G===A?_.colors[0]:_.colors[1],"--pagination-hover-color":_.hover}})},G))})})]})})}function us({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Pu={element:ku,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Au="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fu="ImageRevealSlider-module__image___Qjt-e",Wu="ImageRevealSlider-module__link___N-iLG",_u="ImageRevealSlider-module__cursor___2U03d",vi={imageRevealSlider:Au,image:Fu,link:Wu,cursor:_u};function ps(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*s,d=s/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function _r(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Nu(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await _r(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await _r(e);s=l.height/l.width*o}else{const l=await _r(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function Hu({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[s,l]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[m,x]=a.useState({x:0,y:0}),[b,$]=a.useState(1),[h,w]=a.useState("none"),C=a.useRef({x:0,y:0}),[R,A]=a.useState(!1),{sizeType:T,imageWidth:N,randomRangeImageWidth:E}=e.imageSize,{revealPosition:V,visible:L}=e.position,{cursorType:I,target:_,defaultCursorScale:f,defaultCursor:S,hoverCursorScale:M,hoverCursor:z}=e.cursor;a.useEffect(()=>{if(!i)return;const Q=(k,F)=>{const X=i.getBoundingClientRect(),B=k-X.left,U=F-X.top;if(x({x:B,y:U}),I==="system"){w("none"),$(1);return}const j=B,xe=U,v=document.elementFromPoint(X.left+j,X.top+xe);if(v&&v.closest("a")){w("none"),$(1);return}const he=ps(j,xe,s)||_==="area"?{img:z??"none",scale:M}:{img:S??"none",scale:f};w(he.img),$(he.scale)},G=k=>{k.stopPropagation(),C.current={x:k.clientX,y:k.clientY},Q(k.clientX,k.clientY)},H=()=>{R&&Q(C.current.x,C.current.y)};return i.addEventListener("mousemove",G),window.addEventListener("scroll",H,!0),()=>{i.removeEventListener("mousemove",G),window.removeEventListener("scroll",H,!0)}},[i,R,m,I,_,z,S,M,f,s]),a.useEffect(()=>{R||(w("none"),$(0))},[R]);const K=async(Q,G,H,k={})=>{const{width:F,height:X,finalWidth:B}=await Nu(Q.image.url,T,N,E);let U=0,j=0;V==="same"?(U=G/2,j=H/2):(U=k.x??Math.random()*G,j=k.y??Math.random()*H);const xe=Math.min(Math.max(U,F/2),G-F/2),v=Math.min(Math.max(j,X/2),H-X/2);return{id:u.current++,url:Q.image.url,link:Q.link,name:Q.image.name,x:xe,y:v,width:B}};a.useEffect(()=>{if(!i||t.length===0)return;const Q=i.getBoundingClientRect(),G=Q.width,H=Q.height,k=[];(async()=>{const X=t[0],B=await K(X,G,H);k.push(B),l(k),c(1)})()},[T,N,E,V,i]),a.useEffect(()=>{L==="last One"&&l(Q=>Q.length>0?[Q[Q.length-1]]:[])},[L]);const ae=async Q=>{if(!i)return;const G=i.getBoundingClientRect(),H=Q.clientX-G.left,k=Q.clientY-G.top;if(_==="image"&&!ps(H,k,s))return;let F=0,X=0;V==="on Click"?(F=H,X=k):V==="same"?(F=G.width/2,X=G.height/2):(F=Math.random()*G.width,X=Math.random()*G.height);const B=t[d],U=await K(B,G.width,G.height,{x:F,y:X});l(j=>L==="all"?[...j,U]:[U]),c(j=>j>=t.length-1?0:j+1)};return r.jsxs("div",{ref:o,onClick:ae,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),className:vi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[s.map(Q=>r.jsx("div",{className:vi.wrapper,style:{top:`${Q.y}px`,left:`${Q.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:Q.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:_==="area"&&Q.link?r.jsx("a",{href:Q.link,target:"_blank",className:vi.link,children:r.jsx("img",{src:Q.url,alt:Q.name,className:vi.image},Q.id)}):r.jsx("img",{src:Q.url,alt:Q.name,className:vi.image},Q.id)},Q.id)),R&&r.jsx("div",{className:vi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const ju={element:Hu,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Ou="LightBox-module__hidden___9s-9x",zu="LightBox-module__heroImage___sTxNF",Bu="LightBox-module__background___rm9ml",Du="LightBox-module__editor___4ACaY",Vu="LightBox-module__contentStyle___Bgnsq",Gu="LightBox-module__imageStyle___tLIlB",qu="LightBox-module__imgWrapper___LuFUp",Ku="LightBox-module__contain___8-yaS",Uu="LightBox-module__cover___hNvOG",Xu="LightBox-module__caption___b6L2I",Yu="LightBox-module__captionTextInner___rCGNH",Zu="LightBox-module__lightboxSplide___XFuWC",Ju="LightBox-module__arrow___iz38X",Qu="LightBox-module__arrowVertical___Zfz81",ep="LightBox-module__nextArrow___zkAQN",tp="LightBox-module__arrowInner___p48sW",np="LightBox-module__arrowIcon___3VaFf",ip="LightBox-module__arrowImg___pNV88",op="LightBox-module__mirror___pjeXc",rp="LightBox-module__thumbsWrapper___GB-nU",ap="LightBox-module__thumbsContainerVertical___wttk5",sp="LightBox-module__thumbsContainer___osSma",lp="LightBox-module__thumbsAlignStart___MO6tY",cp="LightBox-module__thumbsAlignCenter___Q4sUx",dp="LightBox-module__thumbsAlignEnd___p4y9R",up="LightBox-module__thumbItem___HvnF3",pp="LightBox-module__closeButton___g2khP",mp="LightBox-module__fadeIn___0m5GW",gp="LightBox-module__slideInLeft___gPYwC",hp="LightBox-module__slideInRight___S-pPp",fp="LightBox-module__slideInTop___DFdAj",yp="LightBox-module__slideInBottom___m27kZ",vp="LightBox-module__fadeOut___55qBR",xp="LightBox-module__slideOutLeft___NvU7P",bp="LightBox-module__slideOutRight___SK7eC",wp="LightBox-module__slideOutTop___Vgg0z",Sp="LightBox-module__slideOutBottom___nJ0Ef",$p="LightBox-module__scaleSlide___vZriG",Fe={hidden:Ou,heroImage:zu,background:Bu,editor:Du,contentStyle:Vu,imageStyle:Gu,imgWrapper:qu,contain:Ku,cover:Uu,caption:Xu,captionTextInner:Yu,lightboxSplide:Zu,arrow:Ju,arrowVertical:Qu,nextArrow:ep,arrowInner:tp,arrowIcon:np,arrowImg:ip,mirror:op,thumbsWrapper:rp,thumbsContainerVertical:ap,thumbsContainer:sp,thumbsAlignStart:lp,thumbsAlignCenter:cp,thumbsAlignEnd:dp,thumbItem:up,closeButton:pp,fadeIn:mp,slideInLeft:gp,slideInRight:hp,slideInTop:fp,slideInBottom:yp,fadeOut:vp,slideOutLeft:xp,slideOutRight:bp,slideOutTop:wp,slideOutBottom:Sp,scaleSlide:$p},ko=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:i.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,i};function Kl(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function or(e){const t=e.getBoundingClientRect(),n=Kl(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,l=e.naturalHeight,d=i/o,c=s/l;let u,m;c>d?(u=i,m=i/c):(m=o,u=o*c);const x=t.left+n.left,b=t.top+n.top,$=(i-u)/2+x,h=(o-m)/2+b;return{x:$,y:h,width:u,height:m}}function ms(e){const t=e.getBoundingClientRect(),n=Kl(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function gs(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Cp(e,t){const n=(()=>{if(e==="fade in")return Fe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Fe.slideInLeft;case"right":return Fe.slideInRight;case"top":return Fe.slideInTop;case"bottom":return Fe.slideInBottom;default:return Fe.slideInRight}return Fe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Fe.fadeIn;if(e==="slide in")switch(t){case"left":return Fe.slideInLeft;case"right":return Fe.slideInRight;case"top":return Fe.slideInTop;case"bottom":return Fe.slideInBottom;default:return Fe.slideInRight}return Fe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Fe.fadeOut;if(e==="slide in")switch(t){case"left":return Fe.slideOutLeft;case"right":return Fe.slideOutRight;case"top":return Fe.slideOutTop;case"bottom":return Fe.slideOutBottom;default:return Fe.slideOutRight}return Fe.fadeOut})(),s=(()=>{if(e==="fade in")return Fe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Fe.slideOutLeft;case"right":return Fe.slideOutRight;case"top":return Fe.slideOutTop;case"bottom":return Fe.slideOutBottom;default:return Fe.slideOutRight}return Fe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const Tp=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:l})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:Fe.heroImage,onClick:()=>c(!0)}),r.jsx(Lp,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Lp=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var Se;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:x,wordSpacing:b,fontSizeLineHeight:$,textAppearance:h,color:w}=i.imageCaption??{},[C,R]=a.useState(0),[A,T]=a.useState(0),[N,E]=a.useState(!1),[V,L]=a.useState(!1),[I,_]=a.useState({}),f=a.useRef(null),S=a.useRef(null),M=a.useRef(null),z=a.useRef(!1),K=a.useRef(null),ae=a.useRef(null),Q=a.useRef(null),G=a.useRef(null),H=a.useRef(!1),k=a.useRef(null),[F,X]=a.useState(!1),{appear:B,triggers:U,slider:j,thumbnail:xe,controls:v,area:he,caption:Y,layout:le}=o.lightboxBlock,{appearClass:$e,backdropAppearClass:re,backdropDisappearClass:be,disappearClass:Z}=Cp(B.type,B.direction),fe=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const D=()=>{setTimeout(()=>{var W,oe;(oe=(W=f.current)==null?void 0:W.splide)==null||oe.refresh()},16)},ie=()=>{T(W=>W+1)};return window.addEventListener("ArticleEditor.Layout:change",D),window.addEventListener("ArticleEditor.ComponentContent:change",ie),()=>{window.removeEventListener("ArticleEditor.Layout:change",D),window.removeEventListener("ArticleEditor.ComponentContent:change",ie)}},[]),a.useEffect(()=>{if(!e||!xe.isActive){X(!1);return}const D=k.current;if(!D)return;const ie=()=>{j.direction==="horiz"?X(D.scrollWidth>D.clientWidth):X(D.scrollHeight>D.clientHeight)};ie();const W=new ResizeObserver(ie);return W.observe(D),()=>W.disconnect()},[e,xe.isActive,n.length,I,j.direction]);const ye=a.useCallback(()=>{const D=window.matchMedia("(max-width: 768px)").matches,ie=gs(he.color);D&&!l&&ie>.9&&(document.body.style.backgroundColor=""),E(!0),z.current=!0;const W=oe=>{oe.target===K.current&&oe.animationName&&(K.current&&ae.current&&K.current.removeEventListener("animationend",ae.current),ae.current=null,z.current&&(z.current=!1,t()),E(!1))};K.current&&(ae.current=W,K.current.addEventListener("animationend",W))},[t,he.color,l]),ke=(D,ie,W)=>{var oe,te;if(D){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&C===n.length-1?ye():(oe=f.current)==null||oe.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const ge=D.getBoundingClientRect(),de=ie-ge.left,we=W-ge.top,Me=ge.width,ee=ge.height;let ue;j.direction==="horiz"?ue=de<Me/2?"-1":"+1":ue=we<ee/2?"-1":"+1",(te=f.current)==null||te.go(ue)}}},J=D=>{if(H.current){H.current=!1;return}const ie=n[C],W=(ie==null?void 0:ie.image.objectFit)==="cover";let oe,te;if("changedTouches"in D&&D.changedTouches.length>0)oe=D.changedTouches[0].clientX,te=D.changedTouches[0].clientY;else if("clientX"in D)oe=D.clientX,te=D.clientY;else return;let ge;if(W&&M.current){const de=ms(M.current);ge=oe>=de.left&&oe<=de.right&&te>=de.top&&te<=de.bottom}else{const de=M.current?or(M.current):null;if(!de){D.target===D.currentTarget&&ye();return}ge=oe>=de.x&&oe<=de.x+de.width&&te>=de.y&&te<=de.y+de.height}ge?ke(M.current,oe,te):ye()},Ce=D=>{const ie=D.target;(ie.classList.contains(Fe.thumbsWrapper)||ie.classList.contains(Fe.thumbsContainer))&&J(D)};a.useEffect(()=>{if(!e)return;const D=ie=>{var W,oe;if(ie.key==="Escape"){ye();return}if(ie.key==="ArrowRight"){R(te=>(te+1)%Math.max(n.length,1)),(W=f.current)==null||W.go("+1");return}ie.key==="ArrowLeft"&&(R(te=>(te-1+Math.max(n.length,1))%Math.max(n.length,1)),(oe=f.current)==null||oe.go("-1"))};return window.addEventListener("keydown",D),()=>{window.removeEventListener("keydown",D)}},[e,ye,n.length]),a.useEffect(()=>{if(e){if(R(0),T(ie=>ie+1),z.current=!1,E(!1),L(!1),_({}),!fe)return;const D=new CustomEvent("page-overlay",{detail:{itemId:fe}});window.dispatchEvent(D)}return()=>{K.current&&ae.current&&(K.current.removeEventListener("animationend",ae.current),ae.current=null),L(!1)}},[e,fe]),a.useEffect(()=>{S.current!==null&&S.current!==j.type&&T(D=>D+1),S.current=j.type},[j.type]),a.useEffect(()=>{if(!e)return;const D=document.body.style.overflow,ie=window.matchMedia("(max-width: 768px)").matches,W=gs(he.color);document.body.style.overflow="hidden",L(!1);const oe=ge=>{ge.target===K.current&&!z.current&&ge.animationName&&(ie&&!l&&W>.9&&(document.body.style.backgroundColor=he.color),L(!0),K.current&&Q.current&&K.current.removeEventListener("animationend",Q.current),Q.current=null)};K.current&&(Q.current=oe,K.current.addEventListener("animationend",oe));const te=ge=>{const de=ge.target;de&&(de.closest(`.${Fe.thumbsWrapper}`)||de.closest(`.${Fe.thumbsContainer}`))||j.type!=="slide"&&ge.preventDefault()};return document.addEventListener("touchmove",te,{passive:!1}),()=>{document.body.style.overflow=D,document.removeEventListener("touchmove",te),K.current&&Q.current&&(K.current.removeEventListener("animationend",Q.current),Q.current=null),L(!1)}},[e,l,he.color,j.type]),a.useEffect(()=>{if(!e)return;const D=ie=>{var oe,te;if(z.current){ie.stopPropagation();return}if(H.current){H.current=!1;return}const W=ie.target;if(!(W&&(W.closest(`.${Fe.thumbsContainer}`)||W.closest(`.${Fe.thumbItem}`)||W.closest(`.${Fe.arrow}`)||W.closest(`.${Fe.closeButton}`)||W.closest(`.${Fe.caption}`)))){if(j.type==="slide"&&U.type==="drag"&&((te=(oe=f.current)==null?void 0:oe.splide)!=null&&te.root)){const ge=f.current.splide.root;if(W&&(ge.contains(W)||ge===W))return}if(ie.touches.length===0&&ie.changedTouches.length>0){const ge=n[C],de=(ge==null?void 0:ge.image.objectFit)==="cover",we=ie.changedTouches[0];let Me;if(de&&M.current){const ee=ms(M.current);Me=we.clientX>=ee.left&&we.clientX<=ee.right&&we.clientY>=ee.top&&we.clientY<=ee.bottom}else{const ee=M.current?or(M.current):null;if(!ee)return;Me=we.clientX>=ee.x&&we.clientX<=ee.x+ee.width&&we.clientY>=ee.y&&we.clientY<=ee.y+ee.height}if(!Me){ie.stopPropagation(),z.current=!0;const ee=ue=>{ue.stopPropagation(),ue.preventDefault(),document.removeEventListener("click",ee,!0)};document.addEventListener("click",ee,!0),ye()}}}};return document.addEventListener("touchend",D,{passive:!0}),()=>{document.removeEventListener("touchend",D)}},[e,ye,C,n]);const ce=(j.type==="scale"||j.type==="fade")&&j.direction==="vert"&&U.type==="drag";a.useEffect(()=>{var ue,Ae;if(!e||!ce||!((Ae=(ue=f.current)==null?void 0:ue.splide)!=null&&Ae.root))return;const D=f.current.splide.root,ie=30,W=(se,q)=>{if(G.current){const je=Math.abs(se-G.current.x),We=Math.abs(q-G.current.y);(je>0||We>0)&&(H.current=!0)}},oe=se=>{G.current&&(se.preventDefault(),W(se.clientX,se.clientY))},te=se=>{G.current&&se.touches.length>0&&(se.preventDefault(),W(se.touches[0].clientX,se.touches[0].clientY))},ge=(se,q)=>{if(!G.current||!f.current){G.current=null;return}const je=Math.abs(se-G.current.x),We=Math.abs(q-G.current.y);We>ie&&We>je&&f.current.go(q<G.current.y?"+1":"-1"),G.current=null},de=se=>{G.current&&ge(se.clientX,se.clientY),document.removeEventListener("pointerup",de),document.removeEventListener("pointercancel",de),document.removeEventListener("pointermove",oe)},we=se=>{if(G.current){if(se.changedTouches.length>0){const q=se.changedTouches[0];ge(q.clientX,q.clientY)}document.removeEventListener("touchend",we),document.removeEventListener("touchcancel",we),document.removeEventListener("touchmove",te)}},Me=se=>{G.current={x:se.clientX,y:se.clientY},H.current=!1,document.addEventListener("pointermove",oe,{passive:!1}),document.addEventListener("pointerup",de),document.addEventListener("pointercancel",de)},ee=se=>{se.touches.length>0&&(G.current={x:se.touches[0].clientX,y:se.touches[0].clientY},H.current=!1,document.addEventListener("touchmove",te,{passive:!1}),document.addEventListener("touchend",we),document.addEventListener("touchcancel",we))};return D.addEventListener("pointerdown",Me),D.addEventListener("touchstart",ee),()=>{D.removeEventListener("pointerdown",Me),D.removeEventListener("touchstart",ee),document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",de),document.removeEventListener("pointercancel",de),document.removeEventListener("touchmove",te),document.removeEventListener("touchend",we),document.removeEventListener("touchcancel",we),G.current=null,H.current=!1}},[e,ce,A]);const ve={backgroundColor:he.color,backdropFilter:`blur(${he.blur}px)`,animationDuration:`${parseInt(B.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:gi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:K,className:nt(Fe.background,N?be:re,{[Fe.editor]:l},{[Fe.hidden]:!e}),style:{...ve,...V&&!l&&!N?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?K:null,className:nt(Fe.contentStyle,N?Z:$e,{[Fe.editor]:l},{[Fe.hidden]:!e}),style:{animationDuration:`${parseInt(B.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(br,{onMove:D=>R(D.index),ref:f,className:Fe.lightboxSplide,options:{arrows:!1,speed:j.duration?parseInt(j.duration):500,direction:j.direction==="horiz"||j.type==="fade"||j.type==="scale"?"ltr":"ttb",pagination:!1,drag:U.type==="drag"&&!ce,perPage:1,width:"100%",height:"100%",type:j.type==="fade"||j.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":j.duration},children:n.map((D,ie)=>{const W=ko(le.position,le.offset,l),oe=`${y.scalingValue(le.padding.top,l)} ${y.scalingValue(le.padding.right,l)} ${y.scalingValue(le.padding.bottom,l)} ${y.scalingValue(le.padding.left,l)}`,te=j.type==="scale"?(()=>{const{transform:ge,...de}=W;return{...de,position:"absolute",padding:oe,boxSizing:"border-box","--position-transform":ge||"none"}})():{...W,position:"absolute",padding:oe,boxSizing:"border-box"};return r.jsx(wr,{children:r.jsx("div",{className:Fe.imgWrapper,onClick:J,children:r.jsx("img",{ref:ie===C?M:null,className:nt(Fe.imageStyle,{[Fe.contain]:D.image.objectFit==="contain",[Fe.cover]:D.image.objectFit==="cover",[Fe.scaleSlide]:j.type==="scale"}),src:D.image.url,alt:D.image.name??"",style:{...te,pointerEvents:D.image.objectFit==="contain"?"none":"auto"}})})},ie)})},A),v.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(Fe.arrow,{[Fe.arrowVertical]:j.direction==="vert"}),style:{color:v.color,"--arrow-hover-color":v.hover},children:r.jsxs("button",{className:Fe.arrowInner,style:{transform:`translate(${y.scalingValue(v.offset.x,l)}, ${y.scalingValue(v.offset.y*(j.direction==="horiz"?1:-1),l)}) scale(${v.scale}) rotate(${j.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var D;return(D=f.current)==null?void 0:D.go("-1")},"aria-label":"Previous",children:[v.arrowsImgUrl&&r.jsx(rn,{url:v.arrowsImgUrl,fill:v.color,hoverFill:v.hover,className:nt(Fe.arrowImg,Fe.mirror)}),!v.arrowsImgUrl&&r.jsx(hs,{color:v.color,className:nt(Fe.arrowIcon,Fe.arrowImg,Fe.mirror)})]})}),r.jsx("div",{className:nt(Fe.arrow,Fe.nextArrow,{[Fe.arrowVertical]:j.direction==="vert"}),style:{color:v.color,"--arrow-hover-color":v.hover},children:r.jsxs("button",{className:Fe.arrowInner,style:{transform:`translate(${y.scalingValue(v.offset.x*(j.direction==="horiz"?-1:1),l)}, ${y.scalingValue(v.offset.y,l)}) scale(${v.scale}) rotate(${j.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var D;return(D=f.current)==null?void 0:D.go("+1")},"aria-label":"Next",children:[v.arrowsImgUrl&&r.jsx(rn,{url:v.arrowsImgUrl,fill:v.color,hoverFill:v.hover,className:Fe.arrowImg}),!v.arrowsImgUrl&&r.jsx(hs,{color:v.color,className:nt(Fe.arrowIcon,Fe.arrowImg)})]})})]}),he.closeIconUrl&&(()=>{const D=ko(he.closeIconAlign,he.closeIconOffset,l),ie=`scale(${he.closeIconScale})`,W=D.transform?`${D.transform} ${ie}`:ie;return r.jsx("button",{className:Fe.closeButton,style:{...D,transform:W},onClick:ye,"aria-label":"Close lightbox",children:r.jsx(rn,{url:he.closeIconUrl,fill:he.closeIconColor??"#000000",hoverFill:he.closeIconHover??"#cccccc"})})})(),Y&&Y.isActive&&i.imageCaption&&((Se=n[C])==null?void 0:Se.imageCaption)&&r.jsx("div",{className:Fe.caption,style:{...ko(Y.alignment,Y.offset,l),fontFamily:Sr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":y.scalingValue(c.width,l),letterSpacing:y.scalingValue(m,l),wordSpacing:y.scalingValue(b,l),textAlign:x,fontSize:y.scalingValue($.fontSize,l),lineHeight:y.scalingValue($.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:w},onClick:D=>D.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Fe.captionTextInner,style:{"--link-color":Y.linkColor,"--link-hover-color":Y.linkHoverColor},children:r.jsx(mi,{content:n[C].imageCaption})})}),xe.isActive&&(()=>{const[D,ie]=xe.position.split("-"),W=j.direction==="horiz"?`${D}-left`:xe.position,oe=ko(W,xe.offset,l),te=()=>{if(j.direction==="horiz"){if(ie==="left")return"flex-start";if(ie==="center")return"center";if(ie==="right")return"flex-end"}else{if(D==="top")return"flex-start";if(D==="middle")return"center";if(D==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:k,className:Fe.thumbsWrapper,onClick:ge=>Ce(ge),style:{position:l?"absolute":"fixed",...oe,...j.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:nt(Fe.thumbsContainer,{[Fe.thumbsContainerVertical]:j.direction==="vert",[Fe.thumbsAlignStart]:xe.align==="start",[Fe.thumbsAlignCenter]:xe.align==="center",[Fe.thumbsAlignEnd]:xe.align==="end"}),style:{gap:y.scalingValue(xe.grid.gap,l),justifyContent:F?"flex-start":te()},children:n.map((ge,de)=>{const we=de===C,Me=I[de],ue=xe.grid.size*(we?xe.activeState.scale:1),Ae=()=>{if(xe.fit!=="fit")return{};if(!Me)return j.direction==="horiz"?{height:y.scalingValue(ue,l)}:{width:y.scalingValue(ue,l)};const se=Me.width/Me.height;if(j.direction==="horiz"){const q=ue,je=q*se;return{width:y.scalingValue(je,l),height:y.scalingValue(q,l)}}else{const q=ue,je=q/se;return{width:y.scalingValue(q,l),height:y.scalingValue(je,l)}}};return r.jsx("button",{className:Fe.thumbItem,style:{...j.direction==="horiz"&&xe.fit!=="fit"?{height:y.scalingValue(ue,l)}:{},...j.direction==="vert"&&xe.fit!=="fit"?{width:y.scalingValue(ue,l)}:{},...xe.fit==="cover"?{width:y.scalingValue(ue,l),height:y.scalingValue(ue,l)}:{},...Ae(),transition:we?"all 0.25s ease-out":"none",opacity:we?xe.activeState.opacity/100:xe.opacity/100,"--thumb-hover":xe.activeState.opacity/100},onClick:se=>{var q;se.stopPropagation(),R(de),(q=f.current)==null||q.go(de)},onMouseEnter:()=>{var se;xe.triggers==="hov"&&((se=f.current)==null||se.go(de))},children:r.jsx("img",{src:ge.image.url,alt:ge.image.name??"",onLoad:se=>{const q=se.currentTarget;q.naturalWidth&&q.naturalHeight&&_(je=>({...je,[de]:{width:q.naturalWidth,height:q.naturalHeight}}))},style:{objectFit:xe.fit==="cover"?"cover":"contain",...xe.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...xe.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ge.image.name}-${de}`)})})})})()]})]}),document.getElementById(s))};function hs({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ip={element:Tp,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Po(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rp(e){return`
6
+ */const Su="RichTextRenderer-module__link___BWeZ2",$u={link:Su},Cu=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Sr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Cu(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function dn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,l,s;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Sr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:i!==void 0?y.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const mi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:$u.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Tu(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Tu(e){return{...e.fontFamily&&{fontFamily:Sr(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Lu="SvgImage-module__svg___q3xE-",Iu="SvgImage-module__img___VsTm-",dl={svg:Lu,img:Iu},Ru=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Eu=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,rn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[l,s]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(d)}},[]),!Ru(e)||!l?r.jsx("img",{src:e,alt:"",className:nt(dl.img,i),style:o}):r.jsx("span",{"data-supports-mask":l,className:nt(dl.svg,i),style:{"--svg":Eu(e),"--fill":t,"--hover-fill":n,...o??{}}})},ku={"top-left":Xe.topLeftAlignment,"top-center":Xe.topCenterAlignment,"top-right":Xe.topRightAlignment,"middle-left":Xe.middleLeftAlignment,"middle-center":Xe.middleCenterAlignment,"middle-right":Xe.middleRightAlignment,"bottom-left":Xe.bottomLeftAlignment,"bottom-center":Xe.bottomCenterAlignment,"bottom-right":Xe.bottomRightAlignment};function Mu({settings:e,content:t,styles:n,isEditor:i}){const[o,l]=a.useState(null),{widthSettings:s,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:m,fontSizeLineHeight:x,textAppearance:b,color:T}=n.imageCaption??{},[f,L]=a.useState(void 0),[$,R]=a.useState(null),[E,C]=a.useState(0),[U,k]=a.useState(0),{direction:j,transition:I,controls:w,pagination:W,imageCaption:h,triggers:S}=e,M=a.useRef(I.type),{x:z,y:K}=e.controls.offset,le=Y=>{o&&o.go(Y)};return a.useEffect(()=>{if(!$)return;const Y=new ResizeObserver(D=>{if(!o)return;const[N]=D;L({width:Math.round(N.contentRect.width),height:Math.round(N.contentRect.height)})});return Y.observe($),()=>Y.unobserve($)},[$]),a.useEffect(()=>{!o||M.current===I.type||(k(Y=>Y+1),M.current=I.type)},[I.type]),r.jsx("div",{className:nt(Xe.wrapper,{[Xe.editor]:i}),ref:R,children:r.jsxs("div",{className:Xe.sliderInner,style:{width:f?f.width:"100%",height:f?f.height:"100%",backgroundColor:I.backgroundColor&&I.type==="fade in"?I.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:nt(Xe.captionBlock),children:r.jsx("div",{className:Xe.captionTextWrapper,children:t.map((Y,D)=>r.jsx("div",{className:nt(Xe.captionText,ku[h.alignment],{[Xe.withPointerEvents]:D===E&&i,[Xe.active]:D===E}),style:{fontFamily:Sr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:s.sizing==="auto"?"max-content":y.scalingValue(s.width,i),letterSpacing:y.scalingValue(c,i),wordSpacing:y.scalingValue(m,i),textAlign:u,fontSize:y.scalingValue(x.fontSize,i),lineHeight:y.scalingValue(x.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:T,transitionDuration:I.duration?`${Math.round(parseInt(I.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Xe.captionTextInner,style:{"--link-hover-color":h.linkHoverColor,"--link-color":h.linkColor,position:"relative",top:y.scalingValue(h.offset.y,i),left:y.scalingValue(h.offset.x,i)},children:r.jsx(mi,{content:Y.imageCaption})})},D))})}),r.jsx(br,{onMove:Y=>{C(Y.index)},ref:l,options:{arrows:!1,speed:I.duration?parseInt(I.duration):500,autoplay:S.autoPlay!==null,...S.autoPlay!==null&&{interval:parseInt(S.autoPlay)*1e3},direction:j==="horiz"||I.type==="fade in"?"ltr":"ttb",pagination:!1,drag:S.triggersList.drag,perPage:1,width:f?f.width:"100%",height:f?f.height:"100%",type:I.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((Y,D)=>r.jsx(wr,{children:r.jsx("div",{className:Xe.sliderItem,children:r.jsx("div",{className:Xe.imgWrapper,children:r.jsx("img",{className:nt(Xe.sliderImage,{[Xe.contain]:Y.image.objectFit==="contain",[Xe.cover]:Y.image.objectFit==="cover"}),src:Y.image.url,alt:Y.image.name??""})})})},D))},U),w.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(Xe.arrow,{[Xe.arrowVertical]:j==="vert",[Xe.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:r.jsxs("button",{onClick:()=>{le("-1")},className:Xe.arrowInner,style:{transform:`translate(${y.scalingValue(z,i)}, ${y.scalingValue(K*(j==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${j==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&r.jsx(rn,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:nt(Xe.arrowImg,Xe.mirror)}),!w.arrowsImgUrl&&r.jsx(ul,{color:w.color,className:nt(Xe.arrowIcon,Xe.arrowImg,Xe.mirror)})]})}),r.jsx("div",{className:nt(Xe.arrow,Xe.nextArrow,{[Xe.arrowVertical]:j==="vert",[Xe.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:r.jsxs("button",{className:Xe.arrowInner,onClick:()=>le("+1"),style:{transform:`translate(${y.scalingValue(z*(j==="horiz"?-1:1),i)}, ${y.scalingValue(K,i)}) scale(${e.controls.scale/100}) rotate(${j==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&r.jsx(rn,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:Xe.arrowImg}),!w.arrowsImgUrl&&r.jsx(ul,{color:w.color,className:nt(Xe.arrowIcon,Xe.arrowImg)})]})})]}),S.triggersList.click&&r.jsx("div",{className:Xe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),W.isActive&&r.jsx("div",{className:nt(Xe.pagination,{[Xe.paginationInsideBottom]:W.position==="inside-1"&&j==="horiz",[Xe.paginationInsideTop]:W.position==="inside-2"&&j==="horiz",[Xe.paginationOutsideBottom]:W.position==="outside-1"&&j==="horiz",[Xe.paginationOutsideTop]:W.position==="outside-2"&&j==="horiz",[Xe.paginationInsideLeft]:W.position==="inside-1"&&j==="vert",[Xe.paginationInsideRight]:W.position==="inside-2"&&j==="vert",[Xe.paginationOutsideLeft]:W.position==="outside-1"&&j==="vert",[Xe.paginationOutsideRight]:W.position==="outside-2"&&j==="vert",[Xe.paginationVertical]:j==="vert"}),children:r.jsx("div",{className:Xe.paginationInner,style:{backgroundColor:W.colors[2],transform:`scale(${W.scale/100}) translate(${y.scalingValue(W.offset.x,i)}, ${y.scalingValue(W.offset.y,i)}) rotate(${j==="horiz"?"0deg":"90deg"})`},children:t.map((Y,D)=>r.jsx("button",{onClick:()=>{o&&o.go(D)},className:nt(Xe.paginationItem),children:r.jsx("div",{className:nt(Xe.dot,{[Xe.activeDot]:D===E}),style:{backgroundColor:D===E?W.colors[0]:W.colors[1],"--pagination-hover-color":W.hover}})},D))})})]})})}function ul({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Pu={element:Mu,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Au="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fu="ImageRevealSlider-module__image___Qjt-e",Wu="ImageRevealSlider-module__link___N-iLG",_u="ImageRevealSlider-module__cursor___2U03d",vi={imageRevealSlider:Au,image:Fu,link:Wu,cursor:_u};function pl(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const l=i.width?Number.parseFloat(i.width):o.naturalWidth,s=o.naturalHeight/o.naturalWidth*l,d=l/2,c=s/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function _r(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Nu(e,t,n,i){let o,l;if(t==="custom"){o=n;const s=await _r(e);l=s.height/s.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const s=await _r(e);l=s.height/s.width*o}else{const s=await _r(e);o=s.width,l=s.height}return{width:o,height:l,finalWidth:`${o}px`}}function Hu({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[l,s]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[m,x]=a.useState({x:0,y:0}),[b,T]=a.useState(1),[f,L]=a.useState("none"),$=a.useRef({x:0,y:0}),[R,E]=a.useState(!1),{sizeType:C,imageWidth:U,randomRangeImageWidth:k}=e.imageSize,{revealPosition:j,visible:I}=e.position,{cursorType:w,target:W,defaultCursorScale:h,defaultCursor:S,hoverCursorScale:M,hoverCursor:z}=e.cursor;a.useEffect(()=>{if(!i)return;const Y=(F,A)=>{const q=i.getBoundingClientRect(),G=F-q.left,Z=A-q.top;if(x({x:G,y:Z}),w==="system"){L("none"),T(1);return}const _=G,me=Z,v=document.elementFromPoint(q.left+_,q.top+me);if(v&&v.closest("a")){L("none"),T(1);return}const fe=pl(_,me,l)||W==="area"?{img:z??"none",scale:M}:{img:S??"none",scale:h};L(fe.img),T(fe.scale)},D=F=>{F.stopPropagation(),$.current={x:F.clientX,y:F.clientY},Y(F.clientX,F.clientY)},N=()=>{R&&Y($.current.x,$.current.y)};return i.addEventListener("mousemove",D),window.addEventListener("scroll",N,!0),()=>{i.removeEventListener("mousemove",D),window.removeEventListener("scroll",N,!0)}},[i,R,m,w,W,z,S,M,h,l]),a.useEffect(()=>{R||(L("none"),T(0))},[R]);const K=async(Y,D,N,F={})=>{const{width:A,height:q,finalWidth:G}=await Nu(Y.image.url,C,U,k);let Z=0,_=0;j==="same"?(Z=D/2,_=N/2):(Z=F.x??Math.random()*D,_=F.y??Math.random()*N);const me=Math.min(Math.max(Z,A/2),D-A/2),v=Math.min(Math.max(_,q/2),N-q/2);return{id:u.current++,url:Y.image.url,link:Y.link,name:Y.image.name,x:me,y:v,width:G}};a.useEffect(()=>{if(!i||t.length===0)return;const Y=i.getBoundingClientRect(),D=Y.width,N=Y.height,F=[];(async()=>{const q=t[0],G=await K(q,D,N);F.push(G),s(F),c(1)})()},[C,U,k,j,i]),a.useEffect(()=>{I==="last One"&&s(Y=>Y.length>0?[Y[Y.length-1]]:[])},[I]);const le=async Y=>{if(!i)return;const D=i.getBoundingClientRect(),N=Y.clientX-D.left,F=Y.clientY-D.top;if(W==="image"&&!pl(N,F,l))return;let A=0,q=0;j==="on Click"?(A=N,q=F):j==="same"?(A=D.width/2,q=D.height/2):(A=Math.random()*D.width,q=Math.random()*D.height);const G=t[d],Z=await K(G,D.width,D.height,{x:A,y:q});s(_=>I==="all"?[..._,Z]:[Z]),c(_=>_>=t.length-1?0:_+1)};return r.jsxs("div",{ref:o,onClick:le,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),className:vi.imageRevealSlider,style:{cursor:f==="none"?"default":"none"},children:[l.map(Y=>r.jsx("div",{className:vi.wrapper,style:{top:`${Y.y}px`,left:`${Y.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:Y.width??"auto",height:"auto",cursor:f==="none"?"default":"none"},children:W==="area"&&Y.link?r.jsx("a",{href:Y.link,target:"_blank",className:vi.link,children:r.jsx("img",{src:Y.url,alt:Y.name,className:vi.image},Y.id)}):r.jsx("img",{src:Y.url,alt:Y.name,className:vi.image},Y.id)},Y.id)),R&&r.jsx("div",{className:vi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${f}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const ju={element:Hu,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Ou="LightBox-module__hidden___9s-9x",zu="LightBox-module__heroImage___sTxNF",Bu="LightBox-module__background___rm9ml",Du="LightBox-module__editor___4ACaY",Vu="LightBox-module__contentStyle___Bgnsq",Gu="LightBox-module__imageStyle___tLIlB",qu="LightBox-module__imgWrapper___LuFUp",Ku="LightBox-module__contain___8-yaS",Uu="LightBox-module__cover___hNvOG",Xu="LightBox-module__caption___b6L2I",Yu="LightBox-module__captionTextInner___rCGNH",Zu="LightBox-module__lightboxSplide___XFuWC",Ju="LightBox-module__arrow___iz38X",Qu="LightBox-module__arrowVertical___Zfz81",ep="LightBox-module__nextArrow___zkAQN",tp="LightBox-module__arrowInner___p48sW",np="LightBox-module__arrowIcon___3VaFf",ip="LightBox-module__arrowImg___pNV88",op="LightBox-module__mirror___pjeXc",rp="LightBox-module__thumbsWrapper___GB-nU",ap="LightBox-module__thumbsContainerVertical___wttk5",lp="LightBox-module__thumbsContainer___osSma",sp="LightBox-module__thumbsAlignStart___MO6tY",cp="LightBox-module__thumbsAlignCenter___Q4sUx",dp="LightBox-module__thumbsAlignEnd___p4y9R",up="LightBox-module__thumbItem___HvnF3",pp="LightBox-module__closeButton___g2khP",mp="LightBox-module__fadeIn___0m5GW",gp="LightBox-module__slideInLeft___gPYwC",hp="LightBox-module__slideInRight___S-pPp",fp="LightBox-module__slideInTop___DFdAj",yp="LightBox-module__slideInBottom___m27kZ",vp="LightBox-module__fadeOut___55qBR",xp="LightBox-module__slideOutLeft___NvU7P",bp="LightBox-module__slideOutRight___SK7eC",wp="LightBox-module__slideOutTop___Vgg0z",Sp="LightBox-module__slideOutBottom___nJ0Ef",$p="LightBox-module__scaleSlide___vZriG",Fe={hidden:Ou,heroImage:zu,background:Bu,editor:Du,contentStyle:Vu,imageStyle:Gu,imgWrapper:qu,contain:Ku,cover:Uu,caption:Xu,captionTextInner:Yu,lightboxSplide:Zu,arrow:Ju,arrowVertical:Qu,nextArrow:ep,arrowInner:tp,arrowIcon:np,arrowImg:ip,mirror:op,thumbsWrapper:rp,thumbsContainerVertical:ap,thumbsContainer:lp,thumbsAlignStart:sp,thumbsAlignCenter:cp,thumbsAlignEnd:dp,thumbItem:up,closeButton:pp,fadeIn:mp,slideInLeft:gp,slideInRight:hp,slideInTop:fp,slideInBottom:yp,fadeOut:vp,slideOutLeft:xp,slideOutRight:bp,slideOutTop:wp,slideOutBottom:Sp,scaleSlide:$p},Mo=(e,t,n)=>{const i={},[o,l]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),l==="left"?(i.left="0",i.right="auto"):l==="center"?(i.left="50%",i.right="auto"):l==="right"&&(i.left="auto",i.right="0"),o==="middle"&&l==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:l==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:i.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,i};function Ks(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function or(e){const t=e.getBoundingClientRect(),n=Ks(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,s=e.naturalHeight,d=i/o,c=l/s;let u,m;c>d?(u=i,m=i/c):(m=o,u=o*c);const x=t.left+n.left,b=t.top+n.top,T=(i-u)/2+x,f=(o-m)/2+b;return{x:T,y:f,width:u,height:m}}function ml(e){const t=e.getBoundingClientRect(),n=Ks(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function gl(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Cp(e,t){const n=(()=>{if(e==="fade in")return Fe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Fe.slideInLeft;case"right":return Fe.slideInRight;case"top":return Fe.slideInTop;case"bottom":return Fe.slideInBottom;default:return Fe.slideInRight}return Fe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Fe.fadeIn;if(e==="slide in")switch(t){case"left":return Fe.slideInLeft;case"right":return Fe.slideInRight;case"top":return Fe.slideInTop;case"bottom":return Fe.slideInBottom;default:return Fe.slideInRight}return Fe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Fe.fadeOut;if(e==="slide in")switch(t){case"left":return Fe.slideOutLeft;case"right":return Fe.slideOutRight;case"top":return Fe.slideOutTop;case"bottom":return Fe.slideOutBottom;default:return Fe.slideOutRight}return Fe.fadeOut})(),l=(()=>{if(e==="fade in")return Fe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Fe.slideOutLeft;case"right":return Fe.slideOutRight;case"top":return Fe.slideOutTop;case"bottom":return Fe.slideOutBottom;default:return Fe.slideOutRight}return Fe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:l}}const Tp=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:l,isPreviewMode:s})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:Fe.heroImage,onClick:()=>c(!0)}),r.jsx(Lp,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:l})]})},Lp=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:l,isEditor:s,metadata:d})=>{var Se;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:x,wordSpacing:b,fontSizeLineHeight:T,textAppearance:f,color:L}=i.imageCaption??{},[$,R]=a.useState(0),[E,C]=a.useState(0),[U,k]=a.useState(!1),[j,I]=a.useState(!1),[w,W]=a.useState({}),h=a.useRef(null),S=a.useRef(null),M=a.useRef(null),z=a.useRef(!1),K=a.useRef(null),le=a.useRef(null),Y=a.useRef(null),D=a.useRef(null),N=a.useRef(!1),F=a.useRef(null),[A,q]=a.useState(!1),{appear:G,triggers:Z,slider:_,thumbnail:me,controls:v,area:fe,caption:J,layout:de}=o.lightboxBlock,{appearClass:$e,backdropAppearClass:oe,backdropDisappearClass:xe,disappearClass:Q}=Cp(G.type,G.direction),ye=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const O=()=>{setTimeout(()=>{var H,re;(re=(H=h.current)==null?void 0:H.splide)==null||re.refresh()},16)},ce=()=>{C(H=>H+1)};return window.addEventListener("ArticleEditor.Layout:change",O),window.addEventListener("ArticleEditor.ComponentContent:change",ce),()=>{window.removeEventListener("ArticleEditor.Layout:change",O),window.removeEventListener("ArticleEditor.ComponentContent:change",ce)}},[]),a.useEffect(()=>{if(!e||!me.isActive){q(!1);return}const O=F.current;if(!O)return;const ce=()=>{_.direction==="horiz"?q(O.scrollWidth>O.clientWidth):q(O.scrollHeight>O.clientHeight)};ce();const H=new ResizeObserver(ce);return H.observe(O),()=>H.disconnect()},[e,me.isActive,n.length,w,_.direction]);const ve=a.useCallback(()=>{const O=window.matchMedia("(max-width: 768px)").matches,ce=gl(fe.color);O&&!s&&ce>.9&&(document.body.style.backgroundColor=""),k(!0),z.current=!0;const H=re=>{re.target===K.current&&re.animationName&&(K.current&&le.current&&K.current.removeEventListener("animationend",le.current),le.current=null,z.current&&(z.current=!1,t()),k(!1))};K.current&&(le.current=H,K.current.addEventListener("animationend",H))},[t,fe.color,s]),ke=(O,ce,H)=>{var re,ae;if(O){if(Z.type==="click"&&Z.switch==="image")Z.repeat==="close"&&$===n.length-1?ve():(re=h.current)==null||re.go("+1");else if(Z.type==="click"&&Z.switch==="50/50"){const ne=O.getBoundingClientRect(),ie=ce-ne.left,be=H-ne.top,Ce=ne.width,ee=ne.height;let pe;_.direction==="horiz"?pe=ie<Ce/2?"-1":"+1":pe=be<ee/2?"-1":"+1",(ae=h.current)==null||ae.go(pe)}}},we=O=>{if(N.current){N.current=!1;return}const ce=n[$],H=(ce==null?void 0:ce.image.objectFit)==="cover";let re,ae;if("changedTouches"in O&&O.changedTouches.length>0)re=O.changedTouches[0].clientX,ae=O.changedTouches[0].clientY;else if("clientX"in O)re=O.clientX,ae=O.clientY;else return;let ne;if(H&&M.current){const ie=ml(M.current);ne=re>=ie.left&&re<=ie.right&&ae>=ie.top&&ae<=ie.bottom}else{const ie=M.current?or(M.current):null;if(!ie){O.target===O.currentTarget&&ve();return}ne=re>=ie.x&&re<=ie.x+ie.width&&ae>=ie.y&&ae<=ie.y+ie.height}ne?ke(M.current,re,ae):ve()},Me=O=>{const ce=O.target;(ce.classList.contains(Fe.thumbsWrapper)||ce.classList.contains(Fe.thumbsContainer))&&we(O)};a.useEffect(()=>{if(!e)return;const O=ce=>{var H,re;if(ce.key==="Escape"){ve();return}if(ce.key==="ArrowRight"){R(ae=>(ae+1)%Math.max(n.length,1)),(H=h.current)==null||H.go("+1");return}ce.key==="ArrowLeft"&&(R(ae=>(ae-1+Math.max(n.length,1))%Math.max(n.length,1)),(re=h.current)==null||re.go("-1"))};return window.addEventListener("keydown",O),()=>{window.removeEventListener("keydown",O)}},[e,ve,n.length]),a.useEffect(()=>{if(e){if(R(0),C(ce=>ce+1),z.current=!1,k(!1),I(!1),W({}),!ye)return;const O=new CustomEvent("page-overlay",{detail:{itemId:ye}});window.dispatchEvent(O)}return()=>{K.current&&le.current&&(K.current.removeEventListener("animationend",le.current),le.current=null),I(!1)}},[e,ye]),a.useEffect(()=>{S.current!==null&&S.current!==_.type&&C(O=>O+1),S.current=_.type},[_.type]),a.useEffect(()=>{if(!e)return;const O=document.body.style.overflow,ce=window.matchMedia("(max-width: 768px)").matches,H=gl(fe.color);document.body.style.overflow="hidden",I(!1);const re=ne=>{ne.target===K.current&&!z.current&&ne.animationName&&(ce&&!s&&H>.9&&(document.body.style.backgroundColor=fe.color),I(!0),K.current&&Y.current&&K.current.removeEventListener("animationend",Y.current),Y.current=null)};K.current&&(Y.current=re,K.current.addEventListener("animationend",re));const ae=ne=>{const ie=ne.target;ie&&(ie.closest(`.${Fe.thumbsWrapper}`)||ie.closest(`.${Fe.thumbsContainer}`))||_.type!=="slide"&&ne.preventDefault()};return document.addEventListener("touchmove",ae,{passive:!1}),()=>{document.body.style.overflow=O,document.removeEventListener("touchmove",ae),K.current&&Y.current&&(K.current.removeEventListener("animationend",Y.current),Y.current=null),I(!1)}},[e,s,fe.color,_.type]),a.useEffect(()=>{if(!e)return;const O=ce=>{var re,ae;if(z.current){ce.stopPropagation();return}if(N.current){N.current=!1;return}const H=ce.target;if(!(H&&(H.closest(`.${Fe.thumbsContainer}`)||H.closest(`.${Fe.thumbItem}`)||H.closest(`.${Fe.arrow}`)||H.closest(`.${Fe.closeButton}`)||H.closest(`.${Fe.caption}`)))){if(_.type==="slide"&&Z.type==="drag"&&((ae=(re=h.current)==null?void 0:re.splide)!=null&&ae.root)){const ne=h.current.splide.root;if(H&&(ne.contains(H)||ne===H))return}if(ce.touches.length===0&&ce.changedTouches.length>0){const ne=n[$],ie=(ne==null?void 0:ne.image.objectFit)==="cover",be=ce.changedTouches[0];let Ce;if(ie&&M.current){const ee=ml(M.current);Ce=be.clientX>=ee.left&&be.clientX<=ee.right&&be.clientY>=ee.top&&be.clientY<=ee.bottom}else{const ee=M.current?or(M.current):null;if(!ee)return;Ce=be.clientX>=ee.x&&be.clientX<=ee.x+ee.width&&be.clientY>=ee.y&&be.clientY<=ee.y+ee.height}if(!Ce){ce.stopPropagation(),z.current=!0;const ee=pe=>{pe.stopPropagation(),pe.preventDefault(),document.removeEventListener("click",ee,!0)};document.addEventListener("click",ee,!0),ve()}}}};return document.addEventListener("touchend",O,{passive:!0}),()=>{document.removeEventListener("touchend",O)}},[e,ve,$,n]);const X=(_.type==="scale"||_.type==="fade")&&_.direction==="vert"&&Z.type==="drag";a.useEffect(()=>{var pe,Ae;if(!e||!X||!((Ae=(pe=h.current)==null?void 0:pe.splide)!=null&&Ae.root))return;const O=h.current.splide.root,ce=30,H=(se,V)=>{if(D.current){const je=Math.abs(se-D.current.x),We=Math.abs(V-D.current.y);(je>0||We>0)&&(N.current=!0)}},re=se=>{D.current&&(se.preventDefault(),H(se.clientX,se.clientY))},ae=se=>{D.current&&se.touches.length>0&&(se.preventDefault(),H(se.touches[0].clientX,se.touches[0].clientY))},ne=(se,V)=>{if(!D.current||!h.current){D.current=null;return}const je=Math.abs(se-D.current.x),We=Math.abs(V-D.current.y);We>ce&&We>je&&h.current.go(V<D.current.y?"+1":"-1"),D.current=null},ie=se=>{D.current&&ne(se.clientX,se.clientY),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("pointermove",re)},be=se=>{if(D.current){if(se.changedTouches.length>0){const V=se.changedTouches[0];ne(V.clientX,V.clientY)}document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),document.removeEventListener("touchmove",ae)}},Ce=se=>{D.current={x:se.clientX,y:se.clientY},N.current=!1,document.addEventListener("pointermove",re,{passive:!1}),document.addEventListener("pointerup",ie),document.addEventListener("pointercancel",ie)},ee=se=>{se.touches.length>0&&(D.current={x:se.touches[0].clientX,y:se.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",ae,{passive:!1}),document.addEventListener("touchend",be),document.addEventListener("touchcancel",be))};return O.addEventListener("pointerdown",Ce),O.addEventListener("touchstart",ee),()=>{O.removeEventListener("pointerdown",Ce),O.removeEventListener("touchstart",ee),document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("touchmove",ae),document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),D.current=null,N.current=!1}},[e,X,E]);const ue={backgroundColor:fe.color,backdropFilter:`blur(${fe.blur}px)`,animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:gi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:s?null:K,className:nt(Fe.background,U?xe:oe,{[Fe.editor]:s},{[Fe.hidden]:!e}),style:{...ue,...j&&!s&&!U?{position:"absolute"}:{}}}),r.jsxs("div",{ref:s?K:null,className:nt(Fe.contentStyle,U?Q:$e,{[Fe.editor]:s},{[Fe.hidden]:!e}),style:{animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(br,{onMove:O=>R(O.index),ref:h,className:Fe.lightboxSplide,options:{arrows:!1,speed:_.duration?parseInt(_.duration):500,direction:_.direction==="horiz"||_.type==="fade"||_.type==="scale"?"ltr":"ttb",pagination:!1,drag:Z.type==="drag"&&!X,perPage:1,width:"100%",height:"100%",type:_.type==="fade"||_.type==="scale"?"fade":"loop",padding:0,rewind:Z.repeat!=="close",start:0},style:{"--splide-speed":_.duration},children:n.map((O,ce)=>{const H=Mo(de.position,de.offset,s),re=`${y.scalingValue(de.padding.top,s)} ${y.scalingValue(de.padding.right,s)} ${y.scalingValue(de.padding.bottom,s)} ${y.scalingValue(de.padding.left,s)}`,ae=_.type==="scale"?(()=>{const{transform:ne,...ie}=H;return{...ie,position:"absolute",padding:re,boxSizing:"border-box","--position-transform":ne||"none"}})():{...H,position:"absolute",padding:re,boxSizing:"border-box"};return r.jsx(wr,{children:r.jsx("div",{className:Fe.imgWrapper,onClick:we,children:r.jsx("img",{ref:ce===$?M:null,className:nt(Fe.imageStyle,{[Fe.contain]:O.image.objectFit==="contain",[Fe.cover]:O.image.objectFit==="cover",[Fe.scaleSlide]:_.type==="scale"}),src:O.image.url,alt:O.image.name??"",style:{...ae,pointerEvents:O.image.objectFit==="contain"?"none":"auto"}})})},ce)})},E),v.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(Fe.arrow,{[Fe.arrowVertical]:_.direction==="vert"}),style:{color:v.color,"--arrow-hover-color":v.hover},children:r.jsxs("button",{className:Fe.arrowInner,style:{transform:`translate(${y.scalingValue(v.offset.x,s)}, ${y.scalingValue(v.offset.y*(_.direction==="horiz"?1:-1),s)}) scale(${v.scale}) rotate(${_.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=h.current)==null?void 0:O.go("-1")},"aria-label":"Previous",children:[v.arrowsImgUrl&&r.jsx(rn,{url:v.arrowsImgUrl,fill:v.color,hoverFill:v.hover,className:nt(Fe.arrowImg,Fe.mirror)}),!v.arrowsImgUrl&&r.jsx(hl,{color:v.color,className:nt(Fe.arrowIcon,Fe.arrowImg,Fe.mirror)})]})}),r.jsx("div",{className:nt(Fe.arrow,Fe.nextArrow,{[Fe.arrowVertical]:_.direction==="vert"}),style:{color:v.color,"--arrow-hover-color":v.hover},children:r.jsxs("button",{className:Fe.arrowInner,style:{transform:`translate(${y.scalingValue(v.offset.x*(_.direction==="horiz"?-1:1),s)}, ${y.scalingValue(v.offset.y,s)}) scale(${v.scale}) rotate(${_.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=h.current)==null?void 0:O.go("+1")},"aria-label":"Next",children:[v.arrowsImgUrl&&r.jsx(rn,{url:v.arrowsImgUrl,fill:v.color,hoverFill:v.hover,className:Fe.arrowImg}),!v.arrowsImgUrl&&r.jsx(hl,{color:v.color,className:nt(Fe.arrowIcon,Fe.arrowImg)})]})})]}),fe.closeIconUrl&&(()=>{const O=Mo(fe.closeIconAlign,fe.closeIconOffset,s),ce=`scale(${fe.closeIconScale})`,H=O.transform?`${O.transform} ${ce}`:ce;return r.jsx("button",{className:Fe.closeButton,style:{...O,transform:H},onClick:ve,"aria-label":"Close lightbox",children:r.jsx(rn,{url:fe.closeIconUrl,fill:fe.closeIconColor??"#000000",hoverFill:fe.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&((Se=n[$])==null?void 0:Se.imageCaption)&&r.jsx("div",{className:Fe.caption,style:{...Mo(J.alignment,J.offset,s),fontFamily:Sr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":y.scalingValue(c.width,s),letterSpacing:y.scalingValue(m,s),wordSpacing:y.scalingValue(b,s),textAlign:x,fontSize:y.scalingValue(T.fontSize,s),lineHeight:y.scalingValue(T.lineHeight,s),textTransform:f.textTransform??"none",textDecoration:f.textDecoration??"none",fontVariant:f.fontVariant??"normal",color:L},onClick:O=>O.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Fe.captionTextInner,style:{"--link-color":J.linkColor,"--link-hover-color":J.linkHoverColor},children:r.jsx(mi,{content:n[$].imageCaption})})}),me.isActive&&(()=>{const[O,ce]=me.position.split("-"),H=_.direction==="horiz"?`${O}-left`:me.position,re=Mo(H,me.offset,s),ae=()=>{if(_.direction==="horiz"){if(ce==="left")return"flex-start";if(ce==="center")return"center";if(ce==="right")return"flex-end"}else{if(O==="top")return"flex-start";if(O==="middle")return"center";if(O==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:F,className:Fe.thumbsWrapper,onClick:ne=>Me(ne),style:{position:s?"absolute":"fixed",...re,..._.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:nt(Fe.thumbsContainer,{[Fe.thumbsContainerVertical]:_.direction==="vert",[Fe.thumbsAlignStart]:me.align==="start",[Fe.thumbsAlignCenter]:me.align==="center",[Fe.thumbsAlignEnd]:me.align==="end"}),style:{gap:y.scalingValue(me.grid.gap,s),justifyContent:A?"flex-start":ae()},children:n.map((ne,ie)=>{const be=ie===$,Ce=w[ie],pe=me.grid.size*(be?me.activeState.scale:1),Ae=()=>{if(me.fit!=="fit")return{};if(!Ce)return _.direction==="horiz"?{height:y.scalingValue(pe,s)}:{width:y.scalingValue(pe,s)};const se=Ce.width/Ce.height;if(_.direction==="horiz"){const V=pe,je=V*se;return{width:y.scalingValue(je,s),height:y.scalingValue(V,s)}}else{const V=pe,je=V/se;return{width:y.scalingValue(V,s),height:y.scalingValue(je,s)}}};return r.jsx("button",{className:Fe.thumbItem,style:{..._.direction==="horiz"&&me.fit!=="fit"?{height:y.scalingValue(pe,s)}:{},..._.direction==="vert"&&me.fit!=="fit"?{width:y.scalingValue(pe,s)}:{},...me.fit==="cover"?{width:y.scalingValue(pe,s),height:y.scalingValue(pe,s)}:{},...Ae(),transition:be?"all 0.25s ease-out":"none",opacity:be?me.activeState.opacity/100:me.opacity/100,"--thumb-hover":me.activeState.opacity/100},onClick:se=>{var V;se.stopPropagation(),R(ie),(V=h.current)==null||V.go(ie)},onMouseEnter:()=>{var se;me.triggers==="hov"&&((se=h.current)==null||se.go(ie))},children:r.jsx("img",{src:ne.image.url,alt:ne.image.name??"",onLoad:se=>{const V=se.currentTarget;V.naturalWidth&&V.naturalHeight&&W(je=>({...je,[ie]:{width:V.naturalWidth,height:V.naturalHeight}}))},style:{objectFit:me.fit==="cover"?"cover":"contain",...me.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...me.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ne.image.name}-${ie}`)})})})})()]})]}),document.getElementById(l))};function hl({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ip={element:Tp,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Po(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rp(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Ep({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=y.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:x=[],buttonLabel:b,gap:$,fieldsGap:h,buttonCorners:w,buttonStroke:C,buttonPadding:R,isButtonFullWidth:A,inputCorners:T,inputStroke:N,inputPadding:E,inputColor:V,inputTextColor:L,inputBorderColor:I,placeholderColor:_,buttonColor:f,buttonTextColor:S,buttonBorderColor:M,labelTextColor:z,successColor:K,errorColor:ae,fontFamily:Q,inputFontSettings:G,inputFontSize:H,inputLineHeight:k,inputLetterSpacing:F,inputWordSpacing:X,inputTextAppearance:B,buttonFontSettings:U,buttonFontSize:j,buttonLineHeight:xe,buttonLetterSpacing:v,buttonWordSpacing:he,buttonTextAppearance:Y,labelFontSettings:le,labelFontSize:$e,labelLineHeight:re,labelLetterSpacing:be,labelWordSpacing:Z,labelTextAppearance:fe,statusFontSettings:ye,statusFontSize:ke,statusLineHeight:J,statusLetterSpacing:Ce,statusWordSpacing:ce,statusTextAppearance:ve,successMessage:Se,errorMessage:D,stateOverrides:ie}=e,W=u==="B",oe=x.slice(0,Math.min(m,x.length)),te={fontSettings:{fontFamily:Q,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:H??.01,lineHeight:k,letterSpacing:F??0,wordSpacing:X??0,textAppearance:B,color:L},ge=dn(Xt(te,t)),de=y.scalingValue(N??0,t),we=y.scalingValue((k??H??.01)+((E==null?void 0:E.top)??0)+((E==null?void 0:E.bottom)??0)+(u==="C"?N??0:(N??0)*2),t),Me={...ge,borderStyle:"solid",borderRadius:u==="C"?0:y.scalingValue(T??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:de,borderLeftWidth:0}:{borderWidth:de},paddingTop:y.scalingValue((E==null?void 0:E.top)??0,t),paddingRight:y.scalingValue((E==null?void 0:E.right)??0,t),paddingBottom:y.scalingValue((E==null?void 0:E.bottom)??0,t),paddingLeft:y.scalingValue((E==null?void 0:E.left)??0,t),height:we,minHeight:we},ee={fontSettings:{fontFamily:Q,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:j??.01,lineHeight:xe,letterSpacing:v??0,wordSpacing:he??0,textAppearance:Y,color:S},ue=dn(Xt(ee,t)),Ae=y.scalingValue(C??0,t),se={fontSettings:{fontFamily:Q,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:re,letterSpacing:be??0,wordSpacing:Z??0,textAppearance:fe,color:z},q=Xt(se,t),je={fontSettings:{fontFamily:Q,fontWeight:(ye==null?void 0:ye.fontWeight)??400,fontStyle:(ye==null?void 0:ye.fontStyle)??"normal"},fontSize:ke??.01,lineHeight:J,letterSpacing:Ce??0,wordSpacing:ce??0,textAppearance:ve,color:K},We=dn(Xt(je,t)),et=y.buildColorVars(c,{inputColor:V,inputTextColor:L,inputBorderColor:I,placeholderColor:_!=null&&_.trim()?_:"#cccccc",buttonColor:f,buttonTextColor:S,buttonBorderColor:M,labelTextColor:z,successColor:K,errorColor:ae},Mp,kp,ie),[Ye,lt]=a.useState(()=>Object.fromEntries(oe.map(Ge=>[Ge.name,""]))),[mt,De]=a.useState("idle"),[ot,$t]=a.useState(null),rt=s==="success"?"success":s==="error"?"error":mt,Ue=s==="error"?D:ot,ht=s==="filled",xt=a.useMemo(()=>{if(!ht)return Ye;let Ge=null;for(const qe of oe)(Ye[qe.name]??"").trim().length>0||(Ge=Ge??{...Ye},Ge[qe.name]="Filled");return Ge??Ye},[Ye,ht,oe]),dt=rt==="error"?y.getFormFieldValidationError(oe,xt):null,_t=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Qe=o==null?void 0:o.submitUrl,Tt=(Ge,qe)=>{lt(Pe=>({...Pe,[Ge]:qe}))},Lt=async Ge=>{if(Ge.preventDefault(),!d)return;const qe=Object.fromEntries(oe.map(gt=>{var It;return[gt.name,((It=Ye[gt.name])==null?void 0:It.trim())??""]}).filter(([,gt])=>gt));if(!Qe){De("error"),$t("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const Pe=y.getFormFieldValidationError(oe,Ye);if(Pe){De("error"),$t(Pe);return}De("submitting"),$t(null);try{const gt=await fetch(Qe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!gt.ok){const It=await gt.text();throw new Error(It||`Request failed: ${gt.status}`)}De("success"),lt(Object.fromEntries(oe.map(It=>[It.name,""])))}catch(gt){De("error"),$t(gt instanceof Error?gt.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${_t}`.trim(),style:et,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Rp(c)}}),r.jsxs("form",{onSubmit:Lt,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:oe.map((Ge,qe)=>r.jsxs(a.Fragment,{children:[qe>0&&r.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:y.scalingValue(h??0,t)}}),r.jsxs("div",{className:`${c}-field-group${W?` ${c}-labeled`:""}`,children:[W&&r.jsx("span",{className:`${c}-field-label`,style:q?{...q,lineHeight:q.fontSize}:void 0,children:Ge.label||Ge.name}),Ge.type==="textarea"?r.jsx("textarea",{name:Ge.name,autoComplete:"off",value:xt[Ge.name]??"",onChange:Pe=>Tt(Ge.name,Pe.target.value),placeholder:Ge.placeholder,className:`${c}-input`,style:Me,rows:1,"data-filled":ht||(xt[Ge.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Ge.type==="phone"?"tel":Ge.type==="email"?"email":"text",name:Ge.name,autoComplete:"off",value:xt[Ge.name]??"",onChange:Pe=>Tt(Ge.name,Pe.target.value),placeholder:Ge.placeholder,required:Ge.isRequired??Ge.type==="email",className:`${c}-input`,style:Me,"data-filled":ht||(xt[Ge.name]??"").trim().length>0})]})]},qe))}),r.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:y.scalingValue($??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(w??0,t),borderWidth:Ae,paddingTop:y.scalingValue((R==null?void 0:R.top)??0,t),paddingRight:y.scalingValue((R==null?void 0:R.right)??0,t),paddingBottom:y.scalingValue((R==null?void 0:R.bottom)??0,t),paddingLeft:y.scalingValue((R==null?void 0:R.left)??0,t),pointerEvents:d?"auto":void 0,...ue,...A?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:A?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:mt==="submitting"?"...":b})})})]}),rt==="success"&&r.jsx("p",{className:`${c}-success`,style:{...We},children:Se}),rt==="error"&&r.jsx("p",{className:`${c}-error`,style:{...We},role:"alert",children:dt??Ue??D})]})}const Mp={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},kp=["hover","focus","filled","success","error"],Pp=`import React, { useMemo, useState } from 'react';
158
+ `}function Ep({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:l}){const s=!!n,d=i&&t||!t,{prefix:c}=y.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:x=[],buttonLabel:b,gap:T,fieldsGap:f,buttonCorners:L,buttonStroke:$,buttonPadding:R,isButtonFullWidth:E,inputCorners:C,inputStroke:U,inputPadding:k,inputColor:j,inputTextColor:I,inputBorderColor:w,placeholderColor:W,buttonColor:h,buttonTextColor:S,buttonBorderColor:M,labelTextColor:z,successColor:K,errorColor:le,fontFamily:Y,inputFontSettings:D,inputFontSize:N,inputLineHeight:F,inputLetterSpacing:A,inputWordSpacing:q,inputTextAppearance:G,buttonFontSettings:Z,buttonFontSize:_,buttonLineHeight:me,buttonLetterSpacing:v,buttonWordSpacing:fe,buttonTextAppearance:J,labelFontSettings:de,labelFontSize:$e,labelLineHeight:oe,labelLetterSpacing:xe,labelWordSpacing:Q,labelTextAppearance:ye,statusFontSettings:ve,statusFontSize:ke,statusLineHeight:we,statusLetterSpacing:Me,statusWordSpacing:X,statusTextAppearance:ue,successMessage:Se,errorMessage:O,stateOverrides:ce}=e,H=u==="B",re=x.slice(0,Math.min(m,x.length)),ae={fontSettings:{fontFamily:Y,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:N??.01,lineHeight:F,letterSpacing:A??0,wordSpacing:q??0,textAppearance:G,color:I},ne=dn(Xt(ae,t)),ie=y.scalingValue(U??0,t),be=y.scalingValue((F??N??.01)+((k==null?void 0:k.top)??0)+((k==null?void 0:k.bottom)??0)+(u==="C"?U??0:(U??0)*2),t),Ce={...ne,borderStyle:"solid",borderRadius:u==="C"?0:y.scalingValue(C??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ie,borderLeftWidth:0}:{borderWidth:ie},paddingTop:y.scalingValue((k==null?void 0:k.top)??0,t),paddingRight:y.scalingValue((k==null?void 0:k.right)??0,t),paddingBottom:y.scalingValue((k==null?void 0:k.bottom)??0,t),paddingLeft:y.scalingValue((k==null?void 0:k.left)??0,t),height:be,minHeight:be},ee={fontSettings:{fontFamily:Y,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:_??.01,lineHeight:me,letterSpacing:v??0,wordSpacing:fe??0,textAppearance:J,color:S},pe=dn(Xt(ee,t)),Ae=y.scalingValue($??0,t),se={fontSettings:{fontFamily:Y,fontWeight:(de==null?void 0:de.fontWeight)??400,fontStyle:(de==null?void 0:de.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:oe,letterSpacing:xe??0,wordSpacing:Q??0,textAppearance:ye,color:z},V=Xt(se,t),je={fontSettings:{fontFamily:Y,fontWeight:(ve==null?void 0:ve.fontWeight)??400,fontStyle:(ve==null?void 0:ve.fontStyle)??"normal"},fontSize:ke??.01,lineHeight:we,letterSpacing:Me??0,wordSpacing:X??0,textAppearance:ue,color:K},We=dn(Xt(je,t)),et=y.buildColorVars(c,{inputColor:j,inputTextColor:I,inputBorderColor:w,placeholderColor:W!=null&&W.trim()?W:"#cccccc",buttonColor:h,buttonTextColor:S,buttonBorderColor:M,labelTextColor:z,successColor:K,errorColor:le},kp,Mp,ce),[Ye,st]=a.useState(()=>Object.fromEntries(re.map(Ge=>[Ge.name,""]))),[mt,De]=a.useState("idle"),[ot,$t]=a.useState(null),rt=l==="success"?"success":l==="error"?"error":mt,Ue=l==="error"?O:ot,ht=l==="filled",xt=a.useMemo(()=>{if(!ht)return Ye;let Ge=null;for(const qe of re)(Ye[qe.name]??"").trim().length>0||(Ge=Ge??{...Ye},Ge[qe.name]="Filled");return Ge??Ye},[Ye,ht,re]),dt=rt==="error"?y.getFormFieldValidationError(re,xt):null,_t=`${l&&l!=="default"?`${c}-state-${l}`:""}`.trim(),Qe=o==null?void 0:o.submitUrl,Tt=(Ge,qe)=>{st(Pe=>({...Pe,[Ge]:qe}))},Lt=async Ge=>{if(Ge.preventDefault(),!d)return;const qe=Object.fromEntries(re.map(gt=>{var It;return[gt.name,((It=Ye[gt.name])==null?void 0:It.trim())??""]}).filter(([,gt])=>gt));if(!Qe){De("error"),$t("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const Pe=y.getFormFieldValidationError(re,Ye);if(Pe){De("error"),$t(Pe);return}De("submitting"),$t(null);try{const gt=await fetch(Qe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!gt.ok){const It=await gt.text();throw new Error(It||`Request failed: ${gt.status}`)}De("success"),st(Object.fromEntries(re.map(It=>[It.name,""])))}catch(gt){De("error"),$t(gt instanceof Error?gt.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${_t}`.trim(),style:et,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Rp(c)}}),r.jsxs("form",{onSubmit:Lt,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:re.map((Ge,qe)=>r.jsxs(a.Fragment,{children:[qe>0&&r.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${c}-control`:void 0,style:{height:y.scalingValue(f??0,t)}}),r.jsxs("div",{className:`${c}-field-group${H?` ${c}-labeled`:""}`,children:[H&&r.jsx("span",{className:`${c}-field-label`,style:V?{...V,lineHeight:V.fontSize}:void 0,children:Ge.label||Ge.name}),Ge.type==="textarea"?r.jsx("textarea",{name:Ge.name,autoComplete:"off",value:xt[Ge.name]??"",onChange:Pe=>Tt(Ge.name,Pe.target.value),placeholder:Ge.placeholder,className:`${c}-input`,style:Ce,rows:1,"data-filled":ht||(xt[Ge.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Ge.type==="phone"?"tel":Ge.type==="email"?"email":"text",name:Ge.name,autoComplete:"off",value:xt[Ge.name]??"",onChange:Pe=>Tt(Ge.name,Pe.target.value),placeholder:Ge.placeholder,required:Ge.isRequired??Ge.type==="email",className:`${c}-input`,style:Ce,"data-filled":ht||(xt[Ge.name]??"").trim().length>0})]})]},qe))}),r.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${c}-control`:void 0,style:{height:y.scalingValue(T??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(L??0,t),borderWidth:Ae,paddingTop:y.scalingValue((R==null?void 0:R.top)??0,t),paddingRight:y.scalingValue((R==null?void 0:R.right)??0,t),paddingBottom:y.scalingValue((R==null?void 0:R.bottom)??0,t),paddingLeft:y.scalingValue((R==null?void 0:R.left)??0,t),pointerEvents:d?"auto":void 0,...pe,...E?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:E?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:mt==="submitting"?"...":b})})})]}),rt==="success"&&r.jsx("p",{className:`${c}-success`,style:{...We},children:Se}),rt==="error"&&r.jsx("p",{className:`${c}-error`,style:{...We},role:"alert",children:dt??Ue??O})]})}const kp={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},Mp=["hover","focus","filled","success","error"],Pp=`import React, { useMemo, useState } from 'react';
159
159
  import { CommonComponentProps } from '../props';
160
160
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
161
161
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -980,7 +980,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
980
980
  font-size: ${Fo(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const Hp=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=y.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:m=1,fontFamily:x,inputFontSettings:b,inputFontSize:$,inputLineHeight:h,inputLetterSpacing:w,inputWordSpacing:C,inputTextAppearance:R,buttonFontSettings:A,buttonFontSize:T,buttonLineHeight:N,buttonLetterSpacing:E,buttonWordSpacing:V,buttonTextAppearance:L,statusFontSettings:I,statusFontSize:_,statusLineHeight:f,statusLetterSpacing:S,statusWordSpacing:M,statusTextAppearance:z,iconMaxWidth:K,minHeight:ae,corners:Q,stroke:G,stateOverrides:H,inputPadding:k,buttonPadding:F,successMessage:X="Thanks for subscribing!",errorMessage:B="Please, fill all required fields."}=e,U=d.slice(0,Math.min(m,d.length)),[j,xe]=a.useState(()=>Object.fromEntries(U.map(se=>[se.name,""]))),[v,he]=a.useState("idle"),[Y,le]=a.useState(null),$e=o==="success"?"success":o==="error"?"error":v,re=o==="error"?B:Y,be=o==="filled",Z=a.useMemo(()=>{if(!be)return j;let se=null;for(const q of U)(j[q.name]??"").trim().length>0||(se=se??{...j},se[q.name]="Filled");return se??j},[be,j,U]),fe=$e==="error"?y.getFormFieldValidationError(U,Z):null,ye=o&&o!=="default"?`${s}-state-${o}`:"",ke=U.some(se=>(Z[se.name]??"").trim().length>0),J=ye!==`${s}-state-filled`&&ke?`${s}-state-filled`:"",Ce=`${ye} ${J}`.trim(),ce=i==null?void 0:i.submitUrl,ve=u??"",Se=(c==null?void 0:c.icon)??"",D=(c==null?void 0:c.mode)==="On",ie=ve||"Submit",W={fontSettings:{fontFamily:x,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:$??.01,lineHeight:h,letterSpacing:w??0,wordSpacing:C??0,textAppearance:R,color:e.inputTextColor??"#111111"},oe={fontSettings:{fontFamily:x,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:T??.01,lineHeight:N,letterSpacing:E??0,wordSpacing:V??0,textAppearance:L,color:e.buttonTextColor??"#ffffff"},te={fontSettings:{fontFamily:x,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:_??.01,lineHeight:f,letterSpacing:S??0,wordSpacing:M??0,textAppearance:z,color:e.successColor??"#22c55e"},ge=dn(Xt(W,t)),de=dn(Xt(oe,t)),we=dn(Xt(te,t)),Me=y.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(W==null?void 0:W.color)??"#111111",buttonTextColor:e.buttonTextColor??(oe==null?void 0:oe.color)??"#ffffff"},jp,Op,H),ee={borderRadius:y.scalingValue(Q,t),borderWidth:y.scalingValue(G,t),borderStyle:"solid"},ue={borderLeftWidth:y.scalingValue(G,t)},Ae=async se=>{if(se.preventDefault(),!l)return;const q=Object.fromEntries(U.map(We=>{var et;return[We.name,((et=j[We.name])==null?void 0:et.trim())??""]}).filter(([,We])=>We));if(!ce){he("error"),le("No integrations were found for this form.");return}if(Object.keys(q).length===0)return;const je=y.getFormFieldValidationError(U,j);if(je){he("error"),le(je);return}he("submitting"),le(null);try{const We=await fetch(ce,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)});if(!We.ok){const et=await We.text();throw new Error(et||`Request failed: ${We.status}`)}he("success"),xe(Object.fromEntries(U.map(et=>[et.name,""])))}catch(We){he("error"),le(We instanceof Error?We.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Ce}`.trim(),style:Me,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Np(s)}}),r.jsxs("form",{onSubmit:Ae,className:`${s}-form`,style:{...ee,height:y.scalingValue(ae,t),minHeight:y.scalingValue(ae,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:U.map(se=>r.jsx("input",{type:se.type==="email"?"email":se.type==="phone"?"tel":"text",name:se.name,autoComplete:"off",value:Z[se.name]??"",onChange:q=>xe(je=>({...je,[se.name]:q.target.value})),placeholder:se.placeholder,required:se.isRequired??se.type==="email",className:`${s}-input`,style:{...ge,paddingRight:y.scalingValue(k.right,t),paddingLeft:y.scalingValue(k.left,t),paddingTop:y.scalingValue(k.top,t),paddingBottom:y.scalingValue(k.bottom,t)}},se.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":ie,style:{...de,...ue,paddingRight:y.scalingValue(F.right,t),paddingLeft:y.scalingValue(F.left,t),paddingTop:y.scalingValue(F.top,t),paddingBottom:y.scalingValue(F.bottom,t),pointerEvents:l?"auto":void 0},children:v==="submitting"?"...":D?Se&&r.jsx(rn,{url:Se,className:`${s}-submitBtnIcon`,style:{maxWidth:y.scalingValue(K??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):ve})})]}),$e==="success"&&r.jsx("p",{className:`${s}-success`,style:{...we},children:X}),$e==="error"&&r.jsx("p",{className:`${s}-error`,style:{...we},role:"alert",children:fe??re??B})]})},jp={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},Op=["hover","focus","filled","success","error"],zp=`import React, { useMemo, useState } from 'react';
983
+ `}const Hp=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:l}=y.useScopedStyles(),s=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:m=1,fontFamily:x,inputFontSettings:b,inputFontSize:T,inputLineHeight:f,inputLetterSpacing:L,inputWordSpacing:$,inputTextAppearance:R,buttonFontSettings:E,buttonFontSize:C,buttonLineHeight:U,buttonLetterSpacing:k,buttonWordSpacing:j,buttonTextAppearance:I,statusFontSettings:w,statusFontSize:W,statusLineHeight:h,statusLetterSpacing:S,statusWordSpacing:M,statusTextAppearance:z,iconMaxWidth:K,minHeight:le,corners:Y,stroke:D,stateOverrides:N,inputPadding:F,buttonPadding:A,successMessage:q="Thanks for subscribing!",errorMessage:G="Please, fill all required fields."}=e,Z=d.slice(0,Math.min(m,d.length)),[_,me]=a.useState(()=>Object.fromEntries(Z.map(se=>[se.name,""]))),[v,fe]=a.useState("idle"),[J,de]=a.useState(null),$e=o==="success"?"success":o==="error"?"error":v,oe=o==="error"?G:J,xe=o==="filled",Q=a.useMemo(()=>{if(!xe)return _;let se=null;for(const V of Z)(_[V.name]??"").trim().length>0||(se=se??{..._},se[V.name]="Filled");return se??_},[xe,_,Z]),ye=$e==="error"?y.getFormFieldValidationError(Z,Q):null,ve=o&&o!=="default"?`${l}-state-${o}`:"",ke=Z.some(se=>(Q[se.name]??"").trim().length>0),we=ve!==`${l}-state-filled`&&ke?`${l}-state-filled`:"",Me=`${ve} ${we}`.trim(),X=i==null?void 0:i.submitUrl,ue=u??"",Se=(c==null?void 0:c.icon)??"",O=(c==null?void 0:c.mode)==="On",ce=ue||"Submit",H={fontSettings:{fontFamily:x,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:T??.01,lineHeight:f,letterSpacing:L??0,wordSpacing:$??0,textAppearance:R,color:e.inputTextColor??"#111111"},re={fontSettings:{fontFamily:x,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:C??.01,lineHeight:U,letterSpacing:k??0,wordSpacing:j??0,textAppearance:I,color:e.buttonTextColor??"#ffffff"},ae={fontSettings:{fontFamily:x,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:W??.01,lineHeight:h,letterSpacing:S??0,wordSpacing:M??0,textAppearance:z,color:e.successColor??"#22c55e"},ne=dn(Xt(H,t)),ie=dn(Xt(re,t)),be=dn(Xt(ae,t)),Ce=y.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(H==null?void 0:H.color)??"#111111",buttonTextColor:e.buttonTextColor??(re==null?void 0:re.color)??"#ffffff"},jp,Op,N),ee={borderRadius:y.scalingValue(Y,t),borderWidth:y.scalingValue(D,t),borderStyle:"solid"},pe={borderLeftWidth:y.scalingValue(D,t)},Ae=async se=>{if(se.preventDefault(),!s)return;const V=Object.fromEntries(Z.map(We=>{var et;return[We.name,((et=_[We.name])==null?void 0:et.trim())??""]}).filter(([,We])=>We));if(!X){fe("error"),de("No integrations were found for this form.");return}if(Object.keys(V).length===0)return;const je=y.getFormFieldValidationError(Z,_);if(je){fe("error"),de(je);return}fe("submitting"),de(null);try{const We=await fetch(X,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)});if(!We.ok){const et=await We.text();throw new Error(et||`Request failed: ${We.status}`)}fe("success"),me(Object.fromEntries(Z.map(et=>[et.name,""])))}catch(We){fe("error"),de(We instanceof Error?We.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${Me}`.trim(),style:Ce,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Np(l)}}),r.jsxs("form",{onSubmit:Ae,className:`${l}-form`,style:{...ee,height:y.scalingValue(le,t),minHeight:y.scalingValue(le,t)},children:[r.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:Z.map(se=>r.jsx("input",{type:se.type==="email"?"email":se.type==="phone"?"tel":"text",name:se.name,autoComplete:"off",value:Q[se.name]??"",onChange:V=>me(je=>({...je,[se.name]:V.target.value})),placeholder:se.placeholder,required:se.isRequired??se.type==="email",className:`${l}-input`,style:{...ne,paddingRight:y.scalingValue(F.right,t),paddingLeft:y.scalingValue(F.left,t),paddingTop:y.scalingValue(F.top,t),paddingBottom:y.scalingValue(F.bottom,t)}},se.name))}),r.jsx("div",{className:`${l}-overlayAnchor`,children:r.jsx("button",{type:s?"submit":"button",className:`${l}-submitBtn`,"aria-label":ce,style:{...ie,...pe,paddingRight:y.scalingValue(A.right,t),paddingLeft:y.scalingValue(A.left,t),paddingTop:y.scalingValue(A.top,t),paddingBottom:y.scalingValue(A.bottom,t),pointerEvents:s?"auto":void 0},children:v==="submitting"?"...":O?Se&&r.jsx(rn,{url:Se,className:`${l}-submitBtnIcon`,style:{maxWidth:y.scalingValue(K??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):ue})})]}),$e==="success"&&r.jsx("p",{className:`${l}-success`,style:{...be},children:q}),$e==="error"&&r.jsx("p",{className:`${l}-error`,style:{...be},role:"alert",children:ye??oe??G})]})},jp={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},Op=["hover","focus","filled","success","error"],zp=`import React, { useMemo, useState } from 'react';
984
984
  import { CommonComponentProps } from '../props';
985
985
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
986
986
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1689
1689
  .${e}-image-hover-grayscale:hover video {
1690
1690
  filter: grayscale(100%);
1691
1691
  }
1692
- `}const Up=30,Xp=20,Hr=3,Yp=12,Zp=32,Jp=3,Qp=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},em=(e,t)=>Array.from({length:t},()=>e).flat(),tm=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Ul=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),fs=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,m)=>e.children[m]),c=Ul(d);return c<=0?0:c+s*Math.max(0,t-1)},nm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Ul(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+l},im=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},om=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>im(i,e))},rm=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")},am=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,sm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:s,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var M,z,K,ae;const m=a.useRef(null),x=!!((M=e.image)!=null&&M.url&&rm(e.image));a.useLayoutEffect(()=>{d&&am(m.current)&&(u==null||u())},[d,(z=e.image)==null?void 0:z.url,u]);const b=n.display==="cover",$=n.ratioValue??"1:1",h=n.reversed??!1,[w,C]=$.split(":").map(Number),T=(h?C:w)/(h?w:C),N=i/T,E=N>o?o:N,V=N>o?o*T:i,L=c(V),I=c(E),_={borderTopLeftRadius:c(s.top),borderTopRightRadius:c(s.right),borderBottomRightRadius:c(s.bottom),borderBottomLeftRadius:c(s.left)},f=b?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",..._}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",..._},S=((K=e.image)==null?void 0:K.url)&&(x?r.jsx("video",{ref:Q=>{m.current=Q},src:e.image.url,style:f,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:Q=>{m.current=Q},src:e.image.url,alt:((ae=e.image)==null?void 0:ae.name)??"",style:f,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...b?{width:L}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...b?{width:L,height:I,overflow:"hidden",..._}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:S&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:nt(`${t}-marquee-link`,!b&&`${t}-marquee-link-contain`),children:S}):S})})},lm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>Kp(s,c),[s,c]),{speed:m,direction:x,pauseOnHover:b,gap:$,imageMaxWidth:h,imageMaxHeight:w,hoverEffect:C,cornerRadius:R={top:0,right:0,bottom:0,left:0}}=e,A=a.useMemo(()=>tm(e.imageFit),[e.imageFit]),T=(t==null?void 0:t.length)??0,N=!!o,E=!n||!!i,V=E&&C!=="off"&&C!=="randomize"?`${s}-image-hover-${C}`:void 0,L=n?!!i:!0,_=((t==null?void 0:t.length)??0)>0&&(L||!!n),f=Math.max(0,m)*Up,S=J=>y.scalingValue(J,n??!1),M=a.useRef(null),z=a.useRef(null),K=a.useRef(null),[ae,Q]=a.useState(0),G=L&&b==="on",[H,k]=a.useState(!1),[F,X]=a.useState({}),B=a.useRef(F);B.current=F;const U=a.useRef(null),j=a.useRef(0),xe=a.useRef(null),v=a.useMemo(()=>(t??[]).map(J=>{var Ce;return((Ce=J.image)==null?void 0:Ce.url)??""}).join("\0"),[t]),[he,Y]=a.useState(Hr),le=a.useMemo(()=>{const J=t??[];return J.length===0||!(L||!!n)?J:em(J,he)},[t,L,he,n]),$e=a.useMemo(()=>(t??[]).filter(J=>{var Ce;return!!((Ce=J.image)!=null&&Ce.url)}).length,[t]),re=_?Jp:1;a.useLayoutEffect(()=>{j.current=0,X({}),U.current=null,Y(Hr),d(0)},[v]),a.useEffect(()=>{if(!E||C!=="randomize")return;const J=M.current;if(!J)return;const Ce=D=>{X(ie=>{const W=Array.from(D).filter(te=>te in ie&&!om(J,te));if(W.length===0)return ie;const oe={...ie};return W.forEach(te=>{delete oe[te]}),oe})},ce=new IntersectionObserver(D=>{const ie=new Set;for(const W of D){const oe=W.target.dataset.marqueeItemIndex,te=oe!==void 0?Number(oe):NaN;Number.isNaN(te)||ie.add(te)}ie.size>0&&Ce(ie)},{root:J,threshold:0});Object.keys(F).forEach(D=>{const ie=Number(D);J.querySelectorAll(`[data-marquee-item-index="${ie}"]`).forEach(W=>ce.observe(W))});const ve={current:0},Se=()=>{const D=Object.keys(B.current);D.length!==0&&(Ce(D.map(Number)),ve.current=requestAnimationFrame(Se))};return Object.keys(B.current).length>0&&(ve.current=requestAnimationFrame(Se)),()=>{cancelAnimationFrame(ve.current),ce.disconnect()}},[C,F,E]),a.useLayoutEffect(()=>{if(!_)return;const J=M.current,Ce=K.current;if(!J||!Ce)return;const ce={current:0},ve=()=>{const ie=J.getBoundingClientRect().width||J.offsetWidth,W=nm(Ce),oe=U.current,te=typeof oe=="number"&&Math.abs(oe-W)<=.25;U.current=W;let ge=he,de=0;if((L||n)&&T>0&&ie>0){const ee=fs(Ce,T);if(ee>=Zp){de=ee;const ue=Math.min(Yp,Math.max(Hr,Math.ceil(ie/ee)+1));ge=ue,ue!==he&&Y(ue)}}const Me=ge!==he&&de>0?de*ge:W>0?W:de>0?de*ge:(()=>{const ee=fs(Ce,T);return ee>0?ee*ge:0})();Me>0?d(ee=>ee<=0?Me:!te||Math.round(ee)===Math.round(Me)?ee:Me):!te&&l<=0&&(cancelAnimationFrame(ce.current),ce.current=requestAnimationFrame(ve))},Se=()=>{cancelAnimationFrame(ce.current),ce.current=requestAnimationFrame(ve)};xe.current=Se,Se();const D=new ResizeObserver(Se);return D.observe(J),D.observe(Ce),()=>{xe.current=null,cancelAnimationFrame(ce.current),D.disconnect()}},[L,_,l,v,he,T,n]),a.useLayoutEffect(()=>{if(!_||c<=0)return;const J=z.current;J&&Qp(J)},[_,c,x,f]),a.useLayoutEffect(()=>{if(!_||l<=0){Q(0);return}const J=z.current,Ce=K.current;if(!J||!Ce)return;const ce=()=>{const Se=J.offsetHeight||J.getBoundingClientRect().height,D=Array.from(Ce.children).reduce((W,oe)=>Math.max(W,oe.offsetHeight||oe.getBoundingClientRect().height),0),ie=Se>0?Se:D;Q(ie>0?ie:0)};ce();const ve=new ResizeObserver(ce);return ve.observe(J),ve.observe(Ce),()=>ve.disconnect()},[_,re,le,n,$,h,w,l,A,F]),a.useLayoutEffect(()=>{if(!n||!N||!_||typeof window>"u")return;const J=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(J)},[n,N,_,x,l,ae,$,le]);const be=()=>{G&&k(!0)},Z=()=>{G&&k(!1)},fe=a.useCallback(()=>{var J;j.current=Math.min($e,j.current+1),(J=xe.current)==null||J.call(xe)},[$e]),ye=a.useCallback((J,Ce)=>{X(ce=>{const ve=ce[J]??Ce,Se=(t??[]).filter(ie=>ie!==ve);if(Se.length===0)return ce;const D=Se[Math.floor(Math.random()*Se.length)];return{...ce,[J]:D}})},[t]),ke=(J,Ce,ce,ve)=>{const Se=E&&C==="randomize"&&A.display==="cover"?F[ce]??J:J,D=`max(${S($)}, ${Xp}px)`,ie=`calc(-0.5 * (${D} + ${S($)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":ce,onMouseEnter:E&&C==="randomize"&&A.display==="cover"?()=>ye(ce,J):void 0,children:[r.jsx(sm,{item:Se,prefix:s,imageFit:A,imageMaxWidth:h,imageMaxHeight:w,cornerRadius:R,imageHoverClass:V,isEditor:n,isFirstSet:ve,scaled:S,onFirstSetImageDone:fe}),N&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:ie,width:D,height:"100%"}})]},`${Ce}-${ce}`)};if(_){const J=L?G&&H?"paused":"running":"paused",Ce=c>0&&f>0?c/f*1e3:0,ce=`${Math.max(0,Ce)/1e3}s`;return r.jsxs("div",{ref:M,className:nt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:ae>0?{height:ae}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:z,className:`${s}-marquee-track`,"data-direction":x,onMouseEnter:be,onMouseLeave:Z,style:{WebkitAnimationDuration:ce,animationDuration:ce,WebkitAnimationPlayState:J,animationPlayState:J},children:Array.from({length:re},(ve,Se)=>r.jsx("div",{ref:Se===0?K:void 0,className:nt(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:S($),paddingRight:S($)},"aria-hidden":Se>0,children:le.map((D,ie)=>ke(D,Se,ie,Se===0&&ie<T))},`set-${Se}`))})]})}return r.jsxs("div",{ref:M,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:nt(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:S($),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((J,Ce)=>ke(J,0,Ce))},"marquee-static")]})},cm=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1692
+ `}const Up=30,Xp=20,Hr=3,Yp=12,Zp=32,Jp=3,Qp=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},em=(e,t)=>Array.from({length:t},()=>e).flat(),tm=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Us=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),fl=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),l=Number.parseFloat(o.columnGap||o.gap||"0")||0,s=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(s>0)return s;const d=Array.from({length:t},(u,m)=>e.children[m]),c=Us(d);return c<=0?0:c+l*Math.max(0,t-1)},nm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Us(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),l=Number.parseFloat(o.columnGap||o.gap||"0")||0,s=Number.parseFloat(o.paddingRight)||0;return i+l*Math.max(0,e.children.length-1)+s},im=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},om=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>im(i,e))},rm=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")},am=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,lm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:l,imageHoverClass:s,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var M,z,K,le;const m=a.useRef(null),x=!!((M=e.image)!=null&&M.url&&rm(e.image));a.useLayoutEffect(()=>{d&&am(m.current)&&(u==null||u())},[d,(z=e.image)==null?void 0:z.url,u]);const b=n.display==="cover",T=n.ratioValue??"1:1",f=n.reversed??!1,[L,$]=T.split(":").map(Number),C=(f?$:L)/(f?L:$),U=i/C,k=U>o?o:U,j=U>o?o*C:i,I=c(j),w=c(k),W={borderRadius:c(l)},h=b?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...W}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...W},S=((K=e.image)==null?void 0:K.url)&&(x?r.jsx("video",{ref:Y=>{m.current=Y},src:e.image.url,style:h,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:Y=>{m.current=Y},src:e.image.url,alt:((le=e.image)==null?void 0:le.name)??"",style:h,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...b?{width:I}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...b?{width:I,height:w,overflow:"hidden",...W}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:S&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:nt(`${t}-marquee-link`,!b&&`${t}-marquee-link-contain`),children:S}):S})})},sm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),[s,d]=a.useState(0),c=s>0?Math.round(s):0,u=a.useMemo(()=>Kp(l,c),[l,c]),{speed:m,direction:x,pauseOnHover:b,gap:T,imageMaxWidth:f,imageMaxHeight:L,hoverEffect:$,cornerRadius:R=0}=e,E=a.useMemo(()=>tm(e.imageFit),[e.imageFit]),C=(t==null?void 0:t.length)??0,U=!!o,k=!n||!!i,j=k&&$!=="off"&&$!=="randomize"?`${l}-image-hover-${$}`:void 0,I=n?!!i:!0,W=((t==null?void 0:t.length)??0)>0&&(I||!!n),h=Math.max(0,m)*Up,S=we=>y.scalingValue(we,n??!1),M=a.useRef(null),z=a.useRef(null),K=a.useRef(null),[le,Y]=a.useState(0),D=I&&b==="on",[N,F]=a.useState(!1),[A,q]=a.useState({}),G=a.useRef(A);G.current=A;const Z=a.useRef(null),_=a.useRef(0),me=a.useRef(null),v=a.useMemo(()=>(t??[]).map(we=>{var Me;return((Me=we.image)==null?void 0:Me.url)??""}).join("\0"),[t]),[fe,J]=a.useState(Hr),de=a.useMemo(()=>{const we=t??[];return we.length===0||!(I||!!n)?we:em(we,fe)},[t,I,fe,n]),$e=a.useMemo(()=>(t??[]).filter(we=>{var Me;return!!((Me=we.image)!=null&&Me.url)}).length,[t]),oe=W?Jp:1;a.useLayoutEffect(()=>{_.current=0,q({}),Z.current=null,J(Hr),d(0)},[v]),a.useEffect(()=>{if(!k||$!=="randomize")return;const we=M.current;if(!we)return;const Me=O=>{q(ce=>{const H=Array.from(O).filter(ae=>ae in ce&&!om(we,ae));if(H.length===0)return ce;const re={...ce};return H.forEach(ae=>{delete re[ae]}),re})},X=new IntersectionObserver(O=>{const ce=new Set;for(const H of O){const re=H.target.dataset.marqueeItemIndex,ae=re!==void 0?Number(re):NaN;Number.isNaN(ae)||ce.add(ae)}ce.size>0&&Me(ce)},{root:we,threshold:0});Object.keys(A).forEach(O=>{const ce=Number(O);we.querySelectorAll(`[data-marquee-item-index="${ce}"]`).forEach(H=>X.observe(H))});const ue={current:0},Se=()=>{const O=Object.keys(G.current);O.length!==0&&(Me(O.map(Number)),ue.current=requestAnimationFrame(Se))};return Object.keys(G.current).length>0&&(ue.current=requestAnimationFrame(Se)),()=>{cancelAnimationFrame(ue.current),X.disconnect()}},[$,A,k]),a.useLayoutEffect(()=>{if(!W)return;const we=M.current,Me=K.current;if(!we||!Me)return;const X={current:0},ue=()=>{const ce=we.getBoundingClientRect().width||we.offsetWidth,H=nm(Me),re=Z.current,ae=typeof re=="number"&&Math.abs(re-H)<=.25;Z.current=H;let ne=fe,ie=0;if((I||n)&&C>0&&ce>0){const ee=fl(Me,C);if(ee>=Zp){ie=ee;const pe=Math.min(Yp,Math.max(Hr,Math.ceil(ce/ee)+1));ne=pe,pe!==fe&&J(pe)}}const Ce=ne!==fe&&ie>0?ie*ne:H>0?H:ie>0?ie*ne:(()=>{const ee=fl(Me,C);return ee>0?ee*ne:0})();Ce>0?d(ee=>ee<=0?Ce:!ae||Math.round(ee)===Math.round(Ce)?ee:Ce):!ae&&s<=0&&(cancelAnimationFrame(X.current),X.current=requestAnimationFrame(ue))},Se=()=>{cancelAnimationFrame(X.current),X.current=requestAnimationFrame(ue)};me.current=Se,Se();const O=new ResizeObserver(Se);return O.observe(we),O.observe(Me),()=>{me.current=null,cancelAnimationFrame(X.current),O.disconnect()}},[I,W,s,v,fe,C,n]),a.useLayoutEffect(()=>{if(!W||c<=0)return;const we=z.current;we&&Qp(we)},[W,c,x,h]),a.useLayoutEffect(()=>{if(!W||s<=0){Y(0);return}const we=z.current,Me=K.current;if(!we||!Me)return;const X=()=>{const Se=we.offsetHeight||we.getBoundingClientRect().height,O=Array.from(Me.children).reduce((H,re)=>Math.max(H,re.offsetHeight||re.getBoundingClientRect().height),0),ce=Se>0?Se:O;Y(ce>0?ce:0)};X();const ue=new ResizeObserver(X);return ue.observe(we),ue.observe(Me),()=>ue.disconnect()},[W,oe,de,n,T,f,L,s,E,A]),a.useLayoutEffect(()=>{if(!n||!U||!W||typeof window>"u")return;const we=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(we)},[n,U,W,x,s,le,T,de]);const xe=()=>{D&&F(!0)},Q=()=>{D&&F(!1)},ye=a.useCallback(()=>{var we;_.current=Math.min($e,_.current+1),(we=me.current)==null||we.call(me)},[$e]),ve=a.useCallback((we,Me)=>{q(X=>{const ue=X[we]??Me,Se=(t??[]).filter(ce=>ce!==ue);if(Se.length===0)return X;const O=Se[Math.floor(Math.random()*Se.length)];return{...X,[we]:O}})},[t]),ke=(we,Me,X,ue)=>{const Se=k&&$==="randomize"&&E.display==="cover"?A[X]??we:we,O=`max(${S(T)}, ${Xp}px)`,ce=`calc(-0.5 * (${O} + ${S(T)}))`;return r.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":X,onMouseEnter:k&&$==="randomize"&&E.display==="cover"?()=>ve(X,we):void 0,children:[r.jsx(lm,{item:Se,prefix:l,imageFit:E,imageMaxWidth:f,imageMaxHeight:L,cornerRadius:R,imageHoverClass:j,isEditor:n,isFirstSet:ue,scaled:S,onFirstSetImageDone:ye}),U&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:ce,width:O,height:"100%"}})]},`${Me}-${X}`)};if(W){const we=I?D&&N?"paused":"running":"paused",Me=c>0&&h>0?c/h*1e3:0,X=`${Math.max(0,Me)/1e3}s`;return r.jsxs("div",{ref:M,className:nt(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:le>0?{height:le}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:z,className:`${l}-marquee-track`,"data-direction":x,onMouseEnter:xe,onMouseLeave:Q,style:{WebkitAnimationDuration:X,animationDuration:X,WebkitAnimationPlayState:we,animationPlayState:we},children:Array.from({length:oe},(ue,Se)=>r.jsx("div",{ref:Se===0?K:void 0,className:nt(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:S(T),paddingRight:S(T)},"aria-hidden":Se>0,children:de.map((O,ce)=>ke(O,Se,ce,Se===0&&ce<C))},`set-${Se}`))})]})}return r.jsxs("div",{ref:M,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:nt(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:S(T),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((we,Me)=>ke(we,0,Me))},"marquee-static")]})},cm=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1693
1693
  import cn from 'classnames';
1694
1694
  import { CommonComponentProps } from '../props';
1695
1695
  import { scalingValue } from '../utils/scalingValue';
@@ -1931,20 +1931,13 @@ const isMediaReady = (el: HTMLImageElement | HTMLVideoElement | null): boolean =
1931
1931
  return el.complete;
1932
1932
  };
1933
1933
 
1934
- type CornerRadius = {
1935
- top: number;
1936
- right: number;
1937
- bottom: number;
1938
- left: number;
1939
- };
1940
-
1941
1934
  type MarqueeItemCardProps = {
1942
1935
  item: MarqueeItem;
1943
1936
  prefix: string;
1944
1937
  imageFit: MarqueeImageFit;
1945
1938
  imageMaxWidth: number;
1946
1939
  imageMaxHeight: number;
1947
- cornerRadius: CornerRadius;
1940
+ cornerRadius: number;
1948
1941
  imageHoverClass?: string;
1949
1942
  isEditor?: boolean;
1950
1943
  isFirstSet?: boolean;
@@ -1986,10 +1979,7 @@ const MarqueeItemCard = ({
1986
1979
  const coverHeightScaled = scaled(coverHeight);
1987
1980
 
1988
1981
  const radiusStyle: CSSProperties = {
1989
- borderTopLeftRadius: scaled(cornerRadius.top),
1990
- borderTopRightRadius: scaled(cornerRadius.right),
1991
- borderBottomRightRadius: scaled(cornerRadius.bottom),
1992
- borderBottomLeftRadius: scaled(cornerRadius.left),
1982
+ borderRadius: scaled(cornerRadius),
1993
1983
  };
1994
1984
 
1995
1985
  const mediaStyle: CSSProperties = isCover
@@ -2096,7 +2086,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode, isEditMode
2096
2086
  imageMaxWidth,
2097
2087
  imageMaxHeight,
2098
2088
  hoverEffect,
2099
- cornerRadius = { top: 0, right: 0, bottom: 0, left: 0 },
2089
+ cornerRadius = 0,
2100
2090
  } = settings;
2101
2091
  const imageFit = useMemo(() => normalizeImageFit(settings.imageFit), [settings.imageFit]);
2102
2092
  const originalItemCount = content?.length ?? 0;
@@ -2472,7 +2462,7 @@ export type MarqueeSettings = {
2472
2462
  ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
2473
2463
  reversed: boolean;
2474
2464
  };
2475
- cornerRadius?: CornerRadius;
2465
+ cornerRadius?: number;
2476
2466
  };
2477
2467
 
2478
2468
  type MarqueeProps = {
@@ -2482,7 +2472,7 @@ type MarqueeProps = {
2482
2472
  isPreviewMode?: boolean;
2483
2473
  isEditMode?: boolean;
2484
2474
  } & CommonComponentProps;
2485
- `,dm={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"object",scope:"layout",title:"Corner radius",display:{type:"padding-controls"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:{top:0,right:0,bottom:0,left:0}},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:{top:0,right:0,bottom:0,left:0}},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:{top:0,right:0,bottom:0,left:0}}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},um={element:lm,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:dm,sourceCode:cm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ys(e){return`
2475
+ `,dm={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},um={element:sm,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:dm,sourceCode:cm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function yl(e){return`
2486
2476
  .${e}-marquee-wrapper {
2487
2477
  overflow: hidden;
2488
2478
  width: 100%;
@@ -2569,7 +2559,7 @@ type MarqueeProps = {
2569
2559
  pointer-events: auto;
2570
2560
  z-index: 10;
2571
2561
  }
2572
- `}const pm=30,vs=2,mm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:m,cardWidth:x,corners:b,stroke:$,strokeColor:h,bgColor:w,padding:C,logoMarginTop:R,logoWidth:A,logoHeight:T,captionMarginTop:N}=e,E=!!o,V=((t==null?void 0:t.length)??0)>0,L=d>0&&(!n||i),I=V&&(L||n),_=Math.max(0,d)*pm,f=W=>y.scalingValue(W,n??!1),S=a.useRef(null),M=a.useRef(null),z=a.useRef(null),[K,ae]=a.useState(0),[Q,G]=a.useState(0),[H,k]=a.useState(0),F=L&&u==="on",[X,B]=a.useState(!1),U=a.useRef(null),[j,xe]=a.useState(0),[v,he]=a.useState(0),Y=a.useRef(null),le=W=>{var te,ge,de,we,Me;return{fontSettings:{fontFamily:(e==null?void 0:e[`${W}FontFamily`])??"Arial",fontWeight:((te=e==null?void 0:e[`${W}FontSettings`])==null?void 0:te.fontWeight)??400,fontStyle:((ge=e==null?void 0:e[`${W}FontSettings`])==null?void 0:ge.fontStyle)??"normal"},textAppearance:{textTransform:((de=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:de.textTransform)??"none",textDecoration:((we=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:we.textDecoration)??"none",fontVariant:((Me=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:Me.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${W}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${W}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${W}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${W}LineHeight`])??.01,color:(e==null?void 0:e[`${W}Color`])??"#000000"}},$e=le("text"),re=le("caption"),be=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(W=>{var oe,te;return(((oe=W.text)==null?void 0:oe.length)??0)>0||(((te=W.caption)==null?void 0:te.length)??0)>0}),[t]),Z=a.useMemo(()=>!I||(t==null?void 0:t.length)===0?1:Q<=0||K<=0?vs:Math.max(vs,Math.ceil(K/Q)+1),[I,t==null?void 0:t.length,Q,K]);a.useLayoutEffect(()=>{if(!I)return;const W=S.current,oe=z.current;if(!W||!oe)return;let te=0;const ge=()=>{const Me=W.getBoundingClientRect().width,ee=oe.getBoundingClientRect().width,ue=Y.current,Ae=typeof ue=="number"&&Math.abs(ue-ee)<=.25;if(Y.current=ee,ae(Me),typeof ee=="number"&&ee>0&&Q<=0){G(ee);return}Ae&&ee!==Q?G(ee):!Ae&&Q<=0&&(cancelAnimationFrame(te),te=requestAnimationFrame(ge))},de=()=>{cancelAnimationFrame(te),te=requestAnimationFrame(ge)};de();const we=new ResizeObserver(de);return we.observe(W),we.observe(oe),()=>{cancelAnimationFrame(te),we.disconnect()}},[L,I,Q]),a.useLayoutEffect(()=>{const W=M.current;if(!I||!W)return;const oe=Q>0?Q:0,te=oe>0&&_>0?oe/_*1e3:0,ge=`${Math.max(0,te)/1e3}s`;W.style.setProperty("--marquee-distance",`${oe}px`),W.style.setProperty("--marquee-duration",ge)},[L,I,_,Q]),a.useLayoutEffect(()=>{if(!I){k(0);return}const W=z.current,oe=M.current;if(!W||!oe)return;const te=()=>{let de=0;for(let we=0;we<W.children.length;we++){const ee=W.children[we].firstElementChild;ee&&(de=Math.max(de,ee.offsetHeight))}de<=0&&(de=oe.offsetHeight),k(de>0?de:0)};te();const ge=new ResizeObserver(te);return ge.observe(W),ge.observe(oe),()=>{ge.disconnect()}},[I,Z,t,n,m,x,C,$,b,A,T,j,v]);const fe=()=>{F&&B(!0)},ye=()=>{F&&B(!1)},ke=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),J=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),Ce=a.useCallback((W,oe,te,ge)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ke,width:"100%"},children:[r.jsx("div",{"data-controls":E?ge==null?void 0:ge.controlsName:void 0,"data-controls-axis":E?"y":void 0,className:E?`${s}-control`:void 0,style:{height:f((ge==null?void 0:ge.marginTop)??0)}}),r.jsx("div",{...ge!=null&&ge.dataMeasureKind?{"data-testimonial-measure":ge.dataMeasureKind}:{},style:{...Xt(W,n),textAlign:J,pointerEvents:"auto",...typeof(ge==null?void 0:ge.minHeightPx)=="number"&&ge.minHeightPx>0?{minHeight:ge.minHeightPx}:{}},children:r.jsx(mi,{content:oe})})]},te),[ke,J,n,E,s,f]),ce=a.useCallback((W,oe,te)=>{var ge,de,we;return r.jsxs("div",{style:{padding:`${f(C.top)} ${f(C.right)} ${f(C.bottom)} ${f(C.left)}`,width:f(x+$*2),height:"100%",borderRadius:f(b),border:`${f($)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:w}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:ke,textAlign:J},children:[W.text&&Ce($e,W.text,"text",te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(te==null?void 0:te.textMinHeightPx)=="number"&&te.textMinHeightPx>0?{minHeightPx:te.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ke,width:"100%"},children:[r.jsx("div",{"data-controls":E&&!(te!=null&&te.dataMeasureAttrs)?"logoMarginTop":void 0,className:E&&!(te!=null&&te.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:f(R)}}),r.jsx("div",{style:{width:f(A),height:f(T)},children:((ge=W.logo)==null?void 0:ge.url)&&r.jsx("img",{src:W.logo.url,alt:((de=W.logo)==null?void 0:de.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((we=W.logo)==null?void 0:we.objectFit)||"contain"}})})]}),W.caption&&Ce(re,W.caption,"caption",{...te!=null&&te.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:N,...te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(te==null?void 0:te.captionMinHeightPx)=="number"&&te.captionMinHeightPx>0?{minHeightPx:te.captionMinHeightPx}:{}})]})]},oe)},[w,N,re,x,b,T,R,A,ke,J,C.bottom,C.left,C.right,C.top,Ce,$,h,$e,n,E,s]),ve=a.useCallback(W=>{xe(W.maxTextPx),he(W.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!be){ve({maxTextPx:0,maxCaptionPx:0});return}const W=U.current;if(!W)return;const oe=()=>{y.readTestimonialTextMeasure(W,ve)};oe();const te=new ResizeObserver(oe);return te.observe(W),()=>{te.disconnect()}},[be,ve,t,ce]);const Se=be?{textMinHeightPx:j,captionMinHeightPx:v}:void 0,D=be?r.jsx("div",{ref:U,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((W,oe)=>ce(W,`measure-${oe}`,{dataMeasureAttrs:!0}))}):null,ie=(W,oe)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[ce(W,`card-${oe}`,Se),E&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(m)})`,width:f(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},oe);if(I){const W=L?F&&X?"paused":"running":"paused";return r.jsxs("div",{ref:S,className:nt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...H>0?{height:H}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ys(s)}}),D,r.jsx("div",{ref:M,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:fe,onMouseLeave:ye,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":W},children:Array.from({length:Z},(oe,te)=>r.jsx("div",{ref:te===0?z:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:f(m),paddingRight:f(m)},"aria-hidden":te>0,children:t==null?void 0:t.map((ge,de)=>ie(ge,`${te}-${de}`))},`set-${te}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ys(s)}}),D,r.jsx("div",{style:{gap:f(m),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((W,oe)=>ie(W,oe))})]})},gm=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2562
+ `}const pm=30,vl=2,mm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),{align:s,speed:d,direction:c,pauseOnHover:u,gap:m,cardWidth:x,corners:b,stroke:T,strokeColor:f,bgColor:L,padding:$,logoMarginTop:R,logoWidth:E,logoHeight:C,captionMarginTop:U}=e,k=!!o,j=((t==null?void 0:t.length)??0)>0,I=d>0&&(!n||i),w=j&&(I||n),W=Math.max(0,d)*pm,h=H=>y.scalingValue(H,n??!1),S=a.useRef(null),M=a.useRef(null),z=a.useRef(null),[K,le]=a.useState(0),[Y,D]=a.useState(0),[N,F]=a.useState(0),A=I&&u==="on",[q,G]=a.useState(!1),Z=a.useRef(null),[_,me]=a.useState(0),[v,fe]=a.useState(0),J=a.useRef(null),de=H=>{var ae,ne,ie,be,Ce;return{fontSettings:{fontFamily:(e==null?void 0:e[`${H}FontFamily`])??"Arial",fontWeight:((ae=e==null?void 0:e[`${H}FontSettings`])==null?void 0:ae.fontWeight)??400,fontStyle:((ne=e==null?void 0:e[`${H}FontSettings`])==null?void 0:ne.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((be=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:be.textDecoration)??"none",fontVariant:((Ce=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:Ce.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${H}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${H}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${H}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${H}LineHeight`])??.01,color:(e==null?void 0:e[`${H}Color`])??"#000000"}},$e=de("text"),oe=de("caption"),xe=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(H=>{var re,ae;return(((re=H.text)==null?void 0:re.length)??0)>0||(((ae=H.caption)==null?void 0:ae.length)??0)>0}),[t]),Q=a.useMemo(()=>!w||(t==null?void 0:t.length)===0?1:Y<=0||K<=0?vl:Math.max(vl,Math.ceil(K/Y)+1),[w,t==null?void 0:t.length,Y,K]);a.useLayoutEffect(()=>{if(!w)return;const H=S.current,re=z.current;if(!H||!re)return;let ae=0;const ne=()=>{const Ce=H.getBoundingClientRect().width,ee=re.getBoundingClientRect().width,pe=J.current,Ae=typeof pe=="number"&&Math.abs(pe-ee)<=.25;if(J.current=ee,le(Ce),typeof ee=="number"&&ee>0&&Y<=0){D(ee);return}Ae&&ee!==Y?D(ee):!Ae&&Y<=0&&(cancelAnimationFrame(ae),ae=requestAnimationFrame(ne))},ie=()=>{cancelAnimationFrame(ae),ae=requestAnimationFrame(ne)};ie();const be=new ResizeObserver(ie);return be.observe(H),be.observe(re),()=>{cancelAnimationFrame(ae),be.disconnect()}},[I,w,Y]),a.useLayoutEffect(()=>{const H=M.current;if(!w||!H)return;const re=Y>0?Y:0,ae=re>0&&W>0?re/W*1e3:0,ne=`${Math.max(0,ae)/1e3}s`;H.style.setProperty("--marquee-distance",`${re}px`),H.style.setProperty("--marquee-duration",ne)},[I,w,W,Y]),a.useLayoutEffect(()=>{if(!w){F(0);return}const H=z.current,re=M.current;if(!H||!re)return;const ae=()=>{let ie=0;for(let be=0;be<H.children.length;be++){const ee=H.children[be].firstElementChild;ee&&(ie=Math.max(ie,ee.offsetHeight))}ie<=0&&(ie=re.offsetHeight),F(ie>0?ie:0)};ae();const ne=new ResizeObserver(ae);return ne.observe(H),ne.observe(re),()=>{ne.disconnect()}},[w,Q,t,n,m,x,$,T,b,E,C,_,v]);const ye=()=>{A&&G(!0)},ve=()=>{A&&G(!1)},ke=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),we=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),Me=a.useCallback((H,re,ae,ne)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ke,width:"100%"},children:[r.jsx("div",{"data-controls":k?ne==null?void 0:ne.controlsName:void 0,"data-controls-axis":k?"y":void 0,className:k?`${l}-control`:void 0,style:{height:h((ne==null?void 0:ne.marginTop)??0)}}),r.jsx("div",{...ne!=null&&ne.dataMeasureKind?{"data-testimonial-measure":ne.dataMeasureKind}:{},style:{...Xt(H,n),textAlign:we,pointerEvents:"auto",...typeof(ne==null?void 0:ne.minHeightPx)=="number"&&ne.minHeightPx>0?{minHeight:ne.minHeightPx}:{}},children:r.jsx(mi,{content:re})})]},ae),[ke,we,n,k,l,h]),X=a.useCallback((H,re,ae)=>{var ne,ie,be;return r.jsxs("div",{style:{padding:`${h($.top)} ${h($.right)} ${h($.bottom)} ${h($.left)}`,width:h(x+T*2),height:"100%",borderRadius:h(b),border:`${h(T)} solid ${f}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${l}-cover`,style:{background:L}}),r.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:ke,textAlign:we},children:[H.text&&Me($e,H.text,"text",ae!=null&&ae.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ae==null?void 0:ae.textMinHeightPx)=="number"&&ae.textMinHeightPx>0?{minHeightPx:ae.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ke,width:"100%"},children:[r.jsx("div",{"data-controls":k&&!(ae!=null&&ae.dataMeasureAttrs)?"logoMarginTop":void 0,className:k&&!(ae!=null&&ae.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:h(R)}}),r.jsx("div",{style:{width:h(E),height:h(C)},children:((ne=H.logo)==null?void 0:ne.url)&&r.jsx("img",{src:H.logo.url,alt:((ie=H.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((be=H.logo)==null?void 0:be.objectFit)||"contain"}})})]}),H.caption&&Me(oe,H.caption,"caption",{...ae!=null&&ae.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:U,...ae!=null&&ae.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ae==null?void 0:ae.captionMinHeightPx)=="number"&&ae.captionMinHeightPx>0?{minHeightPx:ae.captionMinHeightPx}:{}})]})]},re)},[L,U,oe,x,b,C,R,E,ke,we,$.bottom,$.left,$.right,$.top,Me,T,f,$e,n,k,l]),ue=a.useCallback(H=>{me(H.maxTextPx),fe(H.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!xe){ue({maxTextPx:0,maxCaptionPx:0});return}const H=Z.current;if(!H)return;const re=()=>{y.readTestimonialTextMeasure(H,ue)};re();const ae=new ResizeObserver(re);return ae.observe(H),()=>{ae.disconnect()}},[xe,ue,t,X]);const Se=xe?{textMinHeightPx:_,captionMinHeightPx:v}:void 0,O=xe?r.jsx("div",{ref:Z,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((H,re)=>X(H,`measure-${re}`,{dataMeasureAttrs:!0}))}):null,ce=(H,re)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[X(H,`card-${re}`,Se),k&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${h(m)})`,width:h(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},re);if(w){const H=I?A&&q?"paused":"running":"paused";return r.jsxs("div",{ref:S,className:nt(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...N>0?{height:N}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:yl(l)}}),O,r.jsx("div",{ref:M,className:`${l}-marquee-track`,"data-direction":c,onMouseEnter:ye,onMouseLeave:ve,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":H},children:Array.from({length:Q},(re,ae)=>r.jsx("div",{ref:ae===0?z:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:h(m),paddingRight:h(m)},"aria-hidden":ae>0,children:t==null?void 0:t.map((ne,ie)=>ce(ne,`${ae}-${ie}`))},`set-${ae}`))})]})}return r.jsxs("div",{className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:yl(l)}}),O,r.jsx("div",{style:{gap:h(m),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((H,re)=>ce(H,re))})]})},gm=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2573
2563
  import cn from 'classnames';
2574
2564
  import { CommonComponentProps } from '../props';
2575
2565
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3184,7 +3174,7 @@ type TestimonialsSettings = {
3184
3174
  logoHeight: number;
3185
3175
  captionMarginTop: number;
3186
3176
  };
3187
- `,xs={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},hm={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...xs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...xs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},fm={element:mm,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:hm,sourceCode:gm,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function ym(e){return`
3177
+ `,xl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},hm={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...xl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...xl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},fm={element:mm,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:hm,sourceCode:gm,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function ym(e){return`
3188
3178
  .${e}-container {
3189
3179
  position: relative;
3190
3180
  overflow-x: clip;
@@ -3308,7 +3298,7 @@ type TestimonialsSettings = {
3308
3298
  width: 100%;
3309
3299
  height: 100%;
3310
3300
  }
3311
- `}const vm=3e3,xm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:m,textMarginTop:x,captionMarginTop:b,imageWidth:$,imageHeight:h,controlsWidth:w,controlsColor:C,controlsHoverColor:R}=e,A=d>0&&(!n||!!i),[T,N]=a.useState(0),[E,V]=a.useState(null),[L,I]=a.useState(!1),_=a.useRef(null),f=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),S=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{N(0),V(null),I(!1)},[l.length]);const M=l[T],z=E===null?null:l[E],K=re=>{var Z,fe,ye,ke,J;return{fontSettings:{fontFamily:(e==null?void 0:e[`${re}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${re}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((fe=e==null?void 0:e[`${re}FontSettings`])==null?void 0:fe.fontStyle)??"normal"},textAppearance:{textTransform:((ye=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:ye.textTransform)??"none",textDecoration:((ke=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:ke.textDecoration)??"none",fontVariant:((J=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:J.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${re}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${re}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${re}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${re}WordSpacing`])??0,color:(e==null?void 0:e[`${re}Color`])??"#000000"}},ae=K("text"),Q=K("caption"),G=l.length>1&&l.some(re=>{var be,Z;return(((be=re.text)==null?void 0:be.length)??0)>0||(((Z=re.caption)==null?void 0:Z.length)??0)>0}),H=a.useRef(null),[k,F]=a.useState(0),[X,B]=a.useState(0),U=e.controls??{mode:"Off",icon:null},j=l.length>1,xe=a.useCallback((re,be)=>!j||be===re?re:(_.current&&window.clearTimeout(_.current),V(re),I(!0),_.current=window.setTimeout(()=>{V(null),I(!1),_.current=null},300),be),[j]),v=a.useCallback(()=>{j&&N(re=>xe(re,(re-1+l.length)%l.length))},[j,xe,l.length]),he=a.useCallback(()=>{j&&N(re=>xe(re,(re+1)%l.length))},[j,xe,l.length]);a.useEffect(()=>{if(!A||!j)return;const re=Math.max(300,vm/d),be=window.setInterval(()=>{N(Z=>xe(Z,(Z+1)%l.length))},re);return()=>{window.clearInterval(be)}},[A,j,xe,l.length,d]),a.useEffect(()=>()=>{_.current&&window.clearTimeout(_.current)},[]);const Y=(re,be)=>{var J,Ce,ce,ve;const Z=be==null?void 0:be.textMinHeightPx,fe=be==null?void 0:be.captionMinHeightPx,ye=be==null?void 0:be.dataMeasureAttrs,ke=o&&!(be!=null&&be.dataMeasureAttrs)&&!(be!=null&&be.hideControls);return r.jsxs(r.Fragment,{children:[re.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"textMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:y.scalingValue(x??0,n??!1)}}),r.jsx("div",{...ye&&{"data-testimonial-measure":"text"},style:{...Xt(ae,n),...Z&&Z>0?{minHeight:Z}:{},textAlign:S,pointerEvents:"auto"},children:r.jsx(mi,{content:re.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"imageMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:y.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:y.scalingValue($??0,n??!1),height:y.scalingValue(h??0,n??!1)},children:((J=re.image)==null?void 0:J.url)&&r.jsx("img",{src:(Ce=re.image)==null?void 0:Ce.url,alt:((ce=re.image)==null?void 0:ce.name)??"",className:`${s}-icon`,style:{objectFit:((ve=re.image)==null?void 0:ve.objectFit)||"contain"}})})]}),re.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"captionMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:y.scalingValue(b??0,n??!1)}}),r.jsx("div",{...ye?{"data-testimonial-measure":"caption"}:{},style:{...Xt(Q,n),...fe&&fe>0?{minHeight:fe}:{},textAlign:S,pointerEvents:"auto"},children:r.jsx(mi,{content:re.caption})})]})]})},le=a.useCallback(re=>{F(re.maxTextPx),B(re.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!G){le({maxTextPx:0,maxCaptionPx:0});return}const re=H.current;if(!re)return;const be=()=>{y.readTestimonialTextMeasure(re,le)};be();const Z=new ResizeObserver(be);return Z.observe(re),()=>{Z.disconnect()}},[G,le,t]),!M)return r.jsx(r.Fragment,{});const $e=G?{textMinHeightPx:k,captionMinHeightPx:X}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ym(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:y.scalingValue(u??0,n??!1),alignItems:f},children:[G&&r.jsx("div",{ref:H,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((re,be)=>r.jsx("div",{style:{width:"100%"},children:Y(re,{dataMeasureAttrs:!0})},be))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[z&&L&&r.jsx("div",{className:nt(`${s}-fade-item-prev`,`${s}-fade-out`),children:Y(z,{...$e,hideControls:!0})}),r.jsx("div",{className:nt(`${s}-fade-item-current`,L?`${s}-fade-in`:void 0),children:Y(M,$e)})]})]}),U.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:y.scalingValue(w??.02,n??!1),height:y.scalingValue(w??.02,n??!1),"--arrow-hover-color":R},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:v,disabled:!j,"aria-label":"Previous testimonial",children:U.icon&&r.jsx(rn,{url:U.icon,fill:C,hoverFill:R,className:nt(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:nt(`${s}-arrow`,`${s}-next-arrow`),style:{width:y.scalingValue(w??.02,n??!1),height:y.scalingValue(w??.02,n??!1),"--arrow-hover-color":R},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:he,disabled:!j,"aria-label":"Next testimonial",children:U.icon&&r.jsx(rn,{url:U.icon,fill:C,hoverFill:R,className:`${s}-arrow-img`})})})]})]})})},bm=`import cn from 'classnames';
3301
+ `}const vm=3e3,xm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),s=t||[],{speed:d,align:c,width:u,imageMarginTop:m,textMarginTop:x,captionMarginTop:b,imageWidth:T,imageHeight:f,controlsWidth:L,controlsColor:$,controlsHoverColor:R}=e,E=d>0&&(!n||!!i),[C,U]=a.useState(0),[k,j]=a.useState(null),[I,w]=a.useState(!1),W=a.useRef(null),h=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),S=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{U(0),j(null),w(!1)},[s.length]);const M=s[C],z=k===null?null:s[k],K=oe=>{var Q,ye,ve,ke,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${oe}FontFamily`])??"Arial",fontWeight:((Q=e==null?void 0:e[`${oe}FontSettings`])==null?void 0:Q.fontWeight)??400,fontStyle:((ye=e==null?void 0:e[`${oe}FontSettings`])==null?void 0:ye.fontStyle)??"normal"},textAppearance:{textTransform:((ve=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:ve.textTransform)??"none",textDecoration:((ke=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:ke.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${oe}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${oe}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${oe}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${oe}WordSpacing`])??0,color:(e==null?void 0:e[`${oe}Color`])??"#000000"}},le=K("text"),Y=K("caption"),D=s.length>1&&s.some(oe=>{var xe,Q;return(((xe=oe.text)==null?void 0:xe.length)??0)>0||(((Q=oe.caption)==null?void 0:Q.length)??0)>0}),N=a.useRef(null),[F,A]=a.useState(0),[q,G]=a.useState(0),Z=e.controls??{mode:"Off",icon:null},_=s.length>1,me=a.useCallback((oe,xe)=>!_||xe===oe?oe:(W.current&&window.clearTimeout(W.current),j(oe),w(!0),W.current=window.setTimeout(()=>{j(null),w(!1),W.current=null},300),xe),[_]),v=a.useCallback(()=>{_&&U(oe=>me(oe,(oe-1+s.length)%s.length))},[_,me,s.length]),fe=a.useCallback(()=>{_&&U(oe=>me(oe,(oe+1)%s.length))},[_,me,s.length]);a.useEffect(()=>{if(!E||!_)return;const oe=Math.max(300,vm/d),xe=window.setInterval(()=>{U(Q=>me(Q,(Q+1)%s.length))},oe);return()=>{window.clearInterval(xe)}},[E,_,me,s.length,d]),a.useEffect(()=>()=>{W.current&&window.clearTimeout(W.current)},[]);const J=(oe,xe)=>{var we,Me,X,ue;const Q=xe==null?void 0:xe.textMinHeightPx,ye=xe==null?void 0:xe.captionMinHeightPx,ve=xe==null?void 0:xe.dataMeasureAttrs,ke=o&&!(xe!=null&&xe.dataMeasureAttrs)&&!(xe!=null&&xe.hideControls);return r.jsxs(r.Fragment,{children:[oe.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"textMarginTop":void 0,className:ke?`${l}-control`:void 0,style:{height:y.scalingValue(x??0,n??!1)}}),r.jsx("div",{...ve&&{"data-testimonial-measure":"text"},style:{...Xt(le,n),...Q&&Q>0?{minHeight:Q}:{},textAlign:S,pointerEvents:"auto"},children:r.jsx(mi,{content:oe.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"imageMarginTop":void 0,className:ke?`${l}-control`:void 0,style:{height:y.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:y.scalingValue(T??0,n??!1),height:y.scalingValue(f??0,n??!1)},children:((we=oe.image)==null?void 0:we.url)&&r.jsx("img",{src:(Me=oe.image)==null?void 0:Me.url,alt:((X=oe.image)==null?void 0:X.name)??"",className:`${l}-icon`,style:{objectFit:((ue=oe.image)==null?void 0:ue.objectFit)||"contain"}})})]}),oe.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"captionMarginTop":void 0,className:ke?`${l}-control`:void 0,style:{height:y.scalingValue(b??0,n??!1)}}),r.jsx("div",{...ve?{"data-testimonial-measure":"caption"}:{},style:{...Xt(Y,n),...ye&&ye>0?{minHeight:ye}:{},textAlign:S,pointerEvents:"auto"},children:r.jsx(mi,{content:oe.caption})})]})]})},de=a.useCallback(oe=>{A(oe.maxTextPx),G(oe.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!D){de({maxTextPx:0,maxCaptionPx:0});return}const oe=N.current;if(!oe)return;const xe=()=>{y.readTestimonialTextMeasure(oe,de)};xe();const Q=new ResizeObserver(xe);return Q.observe(oe),()=>{Q.disconnect()}},[D,de,t]),!M)return r.jsx(r.Fragment,{});const $e=D?{textMinHeightPx:F,captionMinHeightPx:q}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${l}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ym(l)}}),r.jsxs("div",{className:`${l}-wrapper`,style:{width:y.scalingValue(u??0,n??!1),alignItems:h},children:[D&&r.jsx("div",{ref:N,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((oe,xe)=>r.jsx("div",{style:{width:"100%"},children:J(oe,{dataMeasureAttrs:!0})},xe))}),r.jsxs("div",{className:`${l}-fade-stack`,children:[z&&I&&r.jsx("div",{className:nt(`${l}-fade-item-prev`,`${l}-fade-out`),children:J(z,{...$e,hideControls:!0})}),r.jsx("div",{className:nt(`${l}-fade-item-current`,I?`${l}-fade-in`:void 0),children:J(M,$e)})]})]}),Z.mode==="On"&&r.jsxs("div",{className:`${l}-controls`,children:[r.jsx("div",{className:`${l}-arrow`,style:{width:y.scalingValue(L??.02,n??!1),height:y.scalingValue(L??.02,n??!1),"--arrow-hover-color":R},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:v,disabled:!_,"aria-label":"Previous testimonial",children:Z.icon&&r.jsx(rn,{url:Z.icon,fill:$,hoverFill:R,className:nt(`${l}-arrow-img`,`${l}-mirror`)})})}),r.jsx("div",{className:nt(`${l}-arrow`,`${l}-next-arrow`),style:{width:y.scalingValue(L??.02,n??!1),height:y.scalingValue(L??.02,n??!1),"--arrow-hover-color":R},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:fe,disabled:!_,"aria-label":"Next testimonial",children:Z.icon&&r.jsx(rn,{url:Z.icon,fill:$,hoverFill:R,className:`${l}-arrow-img`})})})]})]})})},bm=`import cn from 'classnames';
3312
3302
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3313
3303
  import { CommonComponentProps } from '../props';
3314
3304
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3804,7 +3794,7 @@ type TestimonialsSettings = {
3804
3794
  icon?: string | null;
3805
3795
  };
3806
3796
  };
3807
- `,wm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" 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" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),bs={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Sm={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...bs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...bs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:wm},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},$m={element:xm,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:Sm,sourceCode:bm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Cm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ws(e){return((e==null?void 0:e.trim().length)??0)>0}function jr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Or(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((o-t)/2,i)}}function Tm(e){return`
3797
+ `,wm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" 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" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),bl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Sm={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...bl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...bl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:wm},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},$m={element:xm,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:Sm,sourceCode:bm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Cm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function wl(e){return((e==null?void 0:e.trim().length)??0)>0}function jr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Or(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((o-t)/2,i)}}function Tm(e){return`
3808
3798
  .${e}-wrapper {
3809
3799
  display: grid;
3810
3800
  align-items: start;
@@ -4128,12 +4118,26 @@ type TestimonialsSettings = {
4128
4118
  margin: 0;
4129
4119
  color: var(--${e}-lightbox-counter-color);
4130
4120
  }
4121
+ .${e}-lightbox {
4122
+ position: fixed;
4123
+ inset: 0;
4124
+ z-index: 9997;
4125
+ overscroll-behavior: none;
4126
+ overflow: hidden;
4127
+ }
4128
+ .${e}-lightbox-editor {
4129
+ inset: auto;
4130
+ top: var(--cntrl-article-top, 0);
4131
+ left: var(--cntrl-article-left, 0);
4132
+ width: var(--cntrl-article-width, 100vw) !important;
4133
+ height: var(--cntrl-viewport-height, 100vh) !important;
4134
+ }
4131
4135
  .${e}-control {
4132
4136
  position: relative;
4133
4137
  z-index: 2;
4134
4138
  width: 100%;
4135
4139
  }
4136
- `}const Rn=500,Lm=750,ni="cubic-bezier(0.22, 1, 0.36, 1)",Im=72,Rm=50;function Em(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Mm(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function km(e){const[t]=e.media;return t!=null&&t.url?t:null}function Pm(e){return!Array.isArray(e)||e.length===0?[]:Em(e)?e.flatMap(t=>{const n=Mm(t);if(!n)return[];const i=km(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function to(e){return e.type==="video"}function Am(e){e.pause(),e.removeAttribute("src"),e.load()}function Ss({media:e,className:t,style:n,onMediaClick:i}){return to(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Wo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Fm(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Wm({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{Am(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d,style:i})}function _m({items:e,index:t,imageDisplay:n,onClose:i,onPrev:o,onNext:s,counterClassName:l,counterStyle:d}){const c=n==="cover",u=a.useRef(null),m=a.useRef(null),x=a.useRef(null),b=a.useRef(null),$=a.useRef(0),h=a.useRef(0),w=a.useRef("none"),C=a.useRef(!1),R=a.useRef(!1),A=a.useRef(!1),T=a.useRef(null),[N,E]=a.useState(null),[V,L]=a.useState("opening"),[I,_]=a.useState(0),[f,S]=a.useState(0),[M,z]=a.useState(!1),[K,ae]=a.useState(!1),[Q,G]=a.useState(!1),H=a.useRef(t),k=e[t],F=k?to(k):!1,X=f!==0||M,B=a.useCallback(J=>{A.current=J,z(J)},[]),U=a.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),j=a.useCallback(()=>{U(),T.current=window.setTimeout(()=>{U(),B(!1)},Rn+32)},[U,B]),xe=a.useCallback(()=>{const J=m.current,Ce=x.current;if(!J)return;const ce=J.getBoundingClientRect(),ve=ce.width,Se=ce.height;if(!ve||!Se)return;if(n==="cover"){E({width:ve,height:Se,left:ce.left,top:ce.top});return}if(!Ce){E(Wo(J));return}const{width:D,height:ie}=Fm(Ce);if(!D||!ie){E(Wo(J));return}const W=D/ie,oe=ve/Se;if(W>oe){const te=ve/W;E({width:ve,height:te,left:ce.left,top:ce.top+(Se-te)/2})}else{const te=Se*W;E({width:te,height:Se,left:ce.left+(ve-te)/2,top:ce.top})}},[n]);a.useEffect(()=>{xe();const J=m.current;if(!J)return;const Ce=new ResizeObserver(()=>xe());return Ce.observe(J),()=>Ce.disconnect()},[xe,t]),a.useEffect(()=>{V==="opening"&&N&&L("open")},[V,N]),a.useEffect(()=>{if(V!=="closing")return;const J=setTimeout(()=>i(),Rn);return()=>clearTimeout(J)},[V,i]),a.useEffect(()=>()=>{U()},[U]),a.useLayoutEffect(()=>{if(H.current===t)return;U(),_(0),S(0),B(!1),G(!1),ae(!1),$.current=0,h.current=0,w.current="none",C.current=!1,b.current=null,R.current=!1;const J=m.current;J&&E(Wo(J)),H.current=t},[t,B,U]),a.useEffect(()=>{if(V!=="open")return;const J=()=>{const ie=W=>{W.stopPropagation(),W.preventDefault(),document.removeEventListener("click",ie,!0)};document.addEventListener("click",ie,!0)},Ce=ie=>{U(),A.current=!1,z(!1),S(0),ae(!1),C.current=!1,h.current=0,w.current="none";const W=m.current;W&&E(Wo(W)),ie<0?s():o()},ce=ie=>{if(Math.abs(ie)>Rm&&e.length>1){Ce(ie);return}B(!0),S(0),j()},ve=ie=>{if(ie.touches.length!==1||A.current)return;const W=ie.touches[0];R.current=!0,b.current={x:W.clientX,y:W.clientY},w.current="none",h.current=0,C.current=!1},Se=ie=>{if(!b.current||ie.touches.length!==1||A.current)return;const W=ie.touches[0],oe=W.clientX-b.current.x,te=W.clientY-b.current.y;if(w.current==="none"){if(Math.abs(oe)<10&&Math.abs(te)<10)return;if(Math.abs(oe)>Math.abs(te)){if(e.length<=1)return;w.current="horizontal"}else if(te>0)w.current="vertical";else return}if(w.current==="horizontal"){C.current=!0,ae(!0),h.current=oe,S(oe),ie.preventDefault();return}w.current==="vertical"&&(C.current=!0,ae(!0),$.current=te,_(te),ie.preventDefault())},D=()=>{if(!b.current)return;const ie=w.current,W=C.current;if(W&&ie==="horizontal")ce(h.current),J();else if(W&&ie==="vertical"){if($.current>Im){const te=window.innerHeight;$.current=te,G(!0),_(te),L("closing")}else $.current=0,_(0);J()}else ie==="horizontal"&&Math.abs(h.current)>0&&(ce(h.current),J());b.current=null,w.current="none",h.current=0,C.current=!1,ae(!1)};return document.addEventListener("touchstart",ve,{passive:!0}),document.addEventListener("touchmove",Se,{passive:!1}),document.addEventListener("touchend",D),document.addEventListener("touchcancel",D),()=>{document.removeEventListener("touchstart",ve),document.removeEventListener("touchmove",Se),document.removeEventListener("touchend",D),document.removeEventListener("touchcancel",D)}},[V,e.length,s,o,B,j]),a.useEffect(()=>{const J=Ce=>{Ce.key==="Escape"&&(Ce.preventDefault(),Ce.stopPropagation(),V!=="closing"&&L("closing"))};return window.addEventListener("keydown",J,!0),()=>window.removeEventListener("keydown",J,!0)},[V]);const v=()=>{V!=="closing"&&L("closing")},he=V==="open",Y=V==="closing",le=I>0?Math.max(0,1-I/500):1,$e=I>0?Math.max(.35,1-I/500):1,re=J=>{if(J.stopPropagation(),R.current){R.current=!1;return}if(e.length<=1)return;const Ce=J.currentTarget.getBoundingClientRect(),ce=J.clientY-Ce.top,ve=Math.min(52,Ce.height*.2);if(!(ce>Ce.height-ve)){if(J.clientX-Ce.left<Ce.width/2){o();return}s()}},be=J=>{if(e.length<=1)return;const Ce=J.currentTarget.getBoundingClientRect(),ce=J.clientX-Ce.left,ve=J.clientY-Ce.top,Se=Math.min(52,Ce.height*.2);if(ve>Ce.height-Se){J.currentTarget.style.cursor="default";return}J.currentTarget.style.cursor=ce<Ce.width/2?"w-resize":"e-resize"},Z=a.useCallback(J=>{J.propertyName!=="transform"||!A.current||(U(),B(!1))},[U,B]),fe=X?`translateX(${f}px)`:I>0?`translateY(${I}px)`:void 0,ye={position:"fixed",top:N==null?void 0:N.top,left:N==null?void 0:N.left,width:N==null?void 0:N.width,height:N==null?void 0:N.height,objectFit:n==="cover"?"cover":"contain",transform:fe,opacity:I>0?$e:V==="opening"||Y?0:1,transition:K&&!M?"none":M?`transform ${Rn}ms ${ni}`:Q?`transform ${Rn}ms ${ni}, opacity ${Rn}ms ${ni}`:V==="opening"||Y?`opacity ${Rn}ms ${ni}`:"none",pointerEvents:F&&he&&!X?"auto":"none",touchAction:F&&he?"none":void 0,zIndex:9998},ke=N?{position:"fixed",top:N.top,height:N.height,width:N.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:u,style:{position:"fixed",top:"var(--cntrl-article-top, 0)",left:"var(--cntrl-article-left, 0)",width:"var(--cntrl-article-width, 100vw) !important",height:"var(--cntrl-viewport-height, 100vh) !important",zIndex:9997,touchAction:V==="open"?"none":void 0},onClick:v,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:he?le:0,transition:K?"none":`opacity ${Rn}ms ${ni}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:c?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:m,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:he?1:0,transition:`opacity ${Rn}ms ${ni}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:l,style:d,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:m,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:he?1:0,transition:`opacity ${Rn}ms ${ni}`},children:e.length>1&&r.jsxs("p",{className:l,style:d,children:[t+1," / ",e.length]})})]})}),N&&k&&(F?r.jsx(Wm,{src:k.url,phase:V,mediaRef:x,mediaStyle:ye,onLoadedMetadata:xe,onClick:re,onMouseMove:be,onTransitionEnd:Z},`${t}-${k.url}`):r.jsx("img",{ref:x,src:k.url,alt:k.name,onLoad:xe,onTransitionEnd:Z,style:ye},`${t}-${k.url}`)),he&&ke&&e.length>1&&!F&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...ke,left:N.left,cursor:"w-resize",pointerEvents:X?"none":"auto"},onClick:J=>{if(R.current){R.current=!1;return}J.stopPropagation(),o()}}),r.jsx("div",{style:{...ke,left:N.left+N.width/2,cursor:"e-resize",pointerEvents:X?"none":"auto"},onClick:J=>{if(R.current){R.current=!1;return}J.stopPropagation(),s()}})]})]})}function Nm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Hm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=y.useScopedStyles(),{type:m="a",gridLayout:x,textBoxWidth:b=100,verticalGap:$,entriesCount:h,lightbox:w,imageDisplay:C,lightboxImageDisplay:R,slider:A,sliderTiming:T,direction:N,transition:E,titleMarginTop:V,subtitleMarginTop:L,titleColor:I,subtitleColor:_,lightboxCounterColor:f,titleFontFamily:S,titleFontSettings:M,titleFontSize:z,titleLineHeight:K,titleLetterSpacing:ae,titleWordSpacing:Q,titleTextAppearance:G,subtitleFontFamily:H,subtitleFontSettings:k,subtitleFontSize:F,subtitleLineHeight:X,subtitleLetterSpacing:B,subtitleWordSpacing:U,subtitleTextAppearance:j,lightboxCounterFontFamily:xe,lightboxCounterFontSettings:v,lightboxCounterFontSize:he,lightboxCounterLineHeight:Y,lightboxCounterLetterSpacing:le,lightboxCounterWordSpacing:$e,lightboxCounterTextAppearance:re,showText:be="always",alignEntries:Z="off",align:fe="top"}=e,ye={fontSettings:{fontFamily:S,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:z??.01,lineHeight:K,letterSpacing:ae??0,wordSpacing:Q??0,textAppearance:G,color:I},J={...dn(Xt(ye,n))},Ce={fontSettings:{fontFamily:H,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:F??.01,lineHeight:X,letterSpacing:B??0,wordSpacing:U??0,textAppearance:j,color:_},ve={...dn(Xt(Ce,n))},Se={fontSettings:{fontFamily:xe,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:he??.01,lineHeight:Y,letterSpacing:le??0,wordSpacing:$e??0,textAppearance:re,color:f},ie={...dn(Xt(Se,n)),...Or(he,Y,u,n)},W=jr(z,K,`${u}-item-title`,`${u}-text-tight-leading`),oe=jr(F,X,`${u}-item-subtitle`,`${u}-text-tight-leading`),te=Or(z,K,u,n),ge=Or(F,X,u,n),de=jr(he,Y,`${u}-lightbox-counter`,`${u}-text-tight-leading`),we=y.buildColorVars(u,{titleColor:I,subtitleColor:_,lightboxCounterColor:f},jm,Om),ue=`${l&&l!=="default"?`${u}-state-${l}`:""}${be==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Ae=h===0?1/0:h,se=(t??[]).slice(0,Ae),q=x.entryWidth??.2,je=(C==null?void 0:C.display)==="cover",We=(C==null?void 0:C.ratioValue)??"1:1",et=(C==null?void 0:C.reversed)??!1,[Ye,lt]=We.split(":").map(Number),ot=`${et?lt:Ye} / ${et?Ye:lt}`,$t=x.columnsCount,rt=y.scalingValue(q??0,n),Ue=rt,ht=!je&&A!=="off",xt=se.length%$t||$t,dt=xt<$t&&se.length>0,Mt=se.length-xt,_t=dt?Math.floor(($t-xt)/2)+1:1,Qe={width:Ue,...je?{aspectRatio:ot,height:"auto",overflow:"hidden"}:{height:"auto"}},Tt=`${u}-item-image-wrapper${ht?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Lt=m==="d"||m==="e"||m==="f",Ge=Z==="on",qe=`calc(${y.scalingValue(q??0,n)} * (${b} / 100))`,Pe=y.scalingValue(q*b/100,n),gt=je?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[It,kt]=a.useState("ltr"),[Dt,en]=a.useState(0),on=a.useRef(null);a.useEffect(()=>{const ze=on.current;if(!ze)return;const ut=new ResizeObserver(_e=>{en(Math.round(_e[0].contentRect.width))});return ut.observe(ze),()=>ut.disconnect()},[]);const bt=(()=>{const ze={...we},ut=on.current?getComputedStyle(on.current).getPropertyValue("--cntrl-article-width").trim():"";return ut&&(ze["--cntrl-article-width"]=ut),ze})(),[Rt,Ut]=a.useState(!1),[Kt,ft]=a.useState([]),[Jt,Te]=a.useState(0),Oe=w==="on"&&(!n||i),Ke=(ze,ut)=>{n&&!i||w!=="off"&&(ft(ze),Te(ut),Ut(!0))};a.useEffect(()=>{if(!Rt||w!=="on"||typeof document>"u")return;const ze=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ze}},[Rt,w]),a.useEffect(()=>{!n||i||Ut(!1)},[n,i]);const Ne=a.useMemo(()=>Tm(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ne}}),r.jsx("div",{style:we,children:r.jsx("div",{ref:on,className:`${u}-wrapper ${u}-type-${m}${Ge?` ${u}-align-entries`:""} ${u}-image-align-${fe} ${ue}`.trim(),style:{gridTemplateColumns:`repeat(${$t}, ${rt})`,rowGap:Ge?0:y.scalingValue($??0,n),columnGap:y.scalingValue(x.horizontalGap??0,n),width:y.scalingValue(x.wrapperWidth??0,n),...Ge?{[`--${u}-align-entries-row-gap`]:y.scalingValue($??0,n)}:{}},children:se.map((ze,ut)=>{var Gt;const _e=ws(ze.title),Je=ws(ze.subtitle),tt=(((Gt=ze.link)==null?void 0:Gt.length)??0)>0&&w==="off"?ze.link:void 0,Wt=Math.floor(ut/$t)===Math.ceil(se.length/$t)-1,Ct=dt&&ut>=Mt?`${_t+(ut-Mt)}`:void 0,st=Lt?r.jsxs("div",{className:`${u}-item-text-block`,children:[_e&&r.jsx("p",{className:W,style:{width:qe,...J,...te},children:ze.title}),_e&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(V??0,n),width:Pe}}),Je&&r.jsx("p",{className:oe,style:{width:qe,...ve,...ge},children:ze.subtitle}),Je&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Pe}})]}):null,Nt=Ge?r.jsxs("div",{className:`${u}-item-title-row`,children:[!Lt&&r.jsx("div",{"data-controls":o&&_e?"titleMarginTop":void 0,className:o&&_e?`${u}-control`:void 0,style:{height:_e?y.scalingValue(V??0,n):0,width:Pe}}),_e&&r.jsx("p",{className:W,style:{width:qe,...J,...te},children:ze.title}),Lt&&_e&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(V??0,n),width:Pe}})]}):null,At=Ge?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Lt&&r.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?y.scalingValue(L??0,n):0,width:Pe}}),Je&&r.jsx("p",{className:oe,style:{width:qe,...ve,...ge},children:ze.subtitle}),Lt&&Je&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Pe}})]}):null,Vt=tt?r.jsxs("a",{href:tt,target:"_blank",className:`${u}-item-text-link`,children:[Nt,At]}):r.jsxs(r.Fragment,{children:[Nt,At]}),zt=Pm(ze.gallery),Pt=zt.filter(pt=>pt.lightboxMedia).map(pt=>pt.lightboxMedia),Qt=r.jsx("div",{className:Tt,style:Qe,children:zt.length===0?null:A==="off"?(()=>{const{displayMedia:pt,lightboxMedia:Ft}=zt[0],Bt=Ft?Pt.findIndex(g=>g.url===Ft.url):-1;return r.jsx(Ss,{media:pt,className:`${u}-item-${to(pt)?"video":"image"}`.trim(),style:gt,onMediaClick:Oe&&Bt>=0?()=>Ke(Pt,Bt):void 0})})():r.jsxs(r.Fragment,{children:[ht&&Ge&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:zt.map(({displayMedia:pt})=>to(pt)?r.jsx("video",{src:pt.url,muted:!0,playsInline:!0},`sizer-${pt.url}`):r.jsx("img",{src:pt.url,alt:""},`sizer-${pt.url}`))}),r.jsx(br,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:T*1e3,width:"100%",height:"100%",speed:Lm,type:E==="fade"?"fade":"loop",rewind:E==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:E==="fade"?"ltr":N!=="random"?N==="horizontal"?"ltr":"ttb":It},onMoved:pt=>{if(N!=="random"||E==="fade")return;const Ft=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";kt(Ft),setTimeout(()=>{pt.refresh()},0)},children:zt.map(({displayMedia:pt,lightboxMedia:Ft},Bt)=>{const g=Ft?Pt.findIndex(pe=>pe.url===Ft.url):-1;return r.jsx(wr,{children:r.jsx(Ss,{media:pt,className:`${u}-item-${to(pt)?"video":"image"}`.trim(),style:gt,onMediaClick:Oe&&g>=0?()=>Ke(Pt,g):void 0})},Bt)})},`${E}-${q}-${N}-${T}-${Dt}-${d}`)]})}),wt=Lt?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&_e?"titleMarginTop":void 0,className:o&&_e?`${u}-control`:void 0,style:{height:_e?y.scalingValue(V??0,n):0,width:Pe}}),r.jsx("p",{className:W,style:{width:qe,...J,...te},children:ze.title}),r.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?y.scalingValue(L??0,n):0,width:Pe}}),r.jsx("p",{className:oe,style:{width:qe,...ve,...ge},children:ze.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:Ct&&!Ge?{gridColumn:Ct}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Ge&&Wt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(b??0)>100?`calc(${rt} * (${b} / 100))`:rt,...Ct&&Ge?{gridColumn:Ct}:{}},children:Ge?r.jsx(r.Fragment,{children:Lt?r.jsxs(r.Fragment,{children:[Vt,r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:Qt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:Qt}),Vt]})}):tt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:[st,Qt]}),!Lt&&r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-text-link`,children:wt})]}):r.jsxs(r.Fragment,{children:[st,Qt,wt]})})},ut)})})}),(!n||i)&&Rt&&typeof document<"u"&&w==="on"&&(()=>{const ze=(c?document.getElementById(c):null)??document.body;return gi.createPortal(r.jsx("div",{style:bt,"data-selection":"none",children:r.jsx(_m,{items:Kt,index:Jt,imageDisplay:Nm(R),onClose:()=>Ut(!1),onPrev:()=>Te(ut=>(ut-1+Kt.length)%Kt.length),onNext:()=>Te(ut=>(ut+1)%Kt.length),counterClassName:de,counterStyle:ie})}),ze)})()]})}const jm={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Om=["hover","focus","filled","success","error"],zm=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4140
+ `}const Rn=500,Lm=750,ni="cubic-bezier(0.22, 1, 0.36, 1)",Im=72,Rm=50;function Em(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function km(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Mm(e){const[t]=e.media;return t!=null&&t.url?t:null}function Pm(e){return!Array.isArray(e)||e.length===0?[]:Em(e)?e.flatMap(t=>{const n=km(t);if(!n)return[];const i=Mm(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function to(e){return e.type==="video"}function Am(e){e.pause(),e.removeAttribute("src"),e.load()}function Sl({media:e,className:t,style:n,onMediaClick:i}){return to(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Wo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Fm(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Wm({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:l,onMouseMove:s,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{Am(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:l,onMouseMove:s,onTransitionEnd:d,style:i})}function _m({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:l,onPrev:s,onNext:d,counterClassName:c,counterStyle:u}){const m=i==="cover",x=a.useRef(null),b=a.useRef(null),T=a.useRef(null),f=a.useRef(null),L=a.useRef(0),$=a.useRef(0),R=a.useRef("none"),E=a.useRef(!1),C=a.useRef(!1),U=a.useRef(!1),k=a.useRef(null),[j,I]=a.useState(null),[w,W]=a.useState("opening"),[h,S]=a.useState(0),[M,z]=a.useState(0),[K,le]=a.useState(!1),[Y,D]=a.useState(!1),[N,F]=a.useState(!1),A=a.useRef(n),q=t[n],G=q?to(q):!1,Z=M!==0||K,_=a.useCallback(X=>{U.current=X,le(X)},[]),me=a.useCallback(()=>{k.current!==null&&(window.clearTimeout(k.current),k.current=null)},[]),v=a.useCallback(()=>{me(),k.current=window.setTimeout(()=>{me(),_(!1)},Rn+32)},[me,_]),fe=a.useCallback(()=>{const X=b.current,ue=T.current;if(!X)return;const Se=X.getBoundingClientRect(),O=Se.width,ce=Se.height;if(!O||!ce)return;if(i==="cover"){I({width:O,height:ce,left:Se.left,top:Se.top});return}if(!ue){I(Wo(X));return}const{width:H,height:re}=Fm(ue);if(!H||!re){I(Wo(X));return}const ae=H/re,ne=O/ce;if(ae>ne){const ie=O/ae;I({width:O,height:ie,left:Se.left,top:Se.top+(ce-ie)/2})}else{const ie=ce*ae;I({width:ie,height:ce,left:Se.left+(O-ie)/2,top:Se.top})}},[i]);a.useEffect(()=>{fe();const X=b.current;if(!X)return;const ue=new ResizeObserver(()=>fe());return ue.observe(X),()=>ue.disconnect()},[fe,n]),a.useEffect(()=>{w==="opening"&&j&&W("open")},[w,j]),a.useEffect(()=>{if(w!=="closing")return;const X=setTimeout(()=>l(),Rn);return()=>clearTimeout(X)},[w,l]),a.useEffect(()=>()=>{me()},[me]),a.useLayoutEffect(()=>{if(A.current===n)return;me(),S(0),z(0),_(!1),F(!1),D(!1),L.current=0,$.current=0,R.current="none",E.current=!1,f.current=null,C.current=!1;const X=b.current;X&&I(Wo(X)),A.current=n},[n,_,me]),a.useEffect(()=>{if(w!=="open")return;let X=null;const ue=()=>{X&&(document.removeEventListener("click",X,!0),X=null)},Se=()=>{ue(),X=ne=>{ne.stopPropagation(),ne.preventDefault(),ue()},document.addEventListener("click",X,!0)},O=ne=>{me(),U.current=!1,le(!1),z(0),D(!1),E.current=!1,$.current=0,R.current="none";const ie=b.current;ie&&I(Wo(ie)),ne<0?d():s()},ce=ne=>{if(Math.abs(ne)>Rm&&t.length>1){O(ne);return}_(!0),z(0),v()},H=ne=>{if(ne.touches.length!==1||U.current)return;const ie=ne.touches[0];C.current=!0,f.current={x:ie.clientX,y:ie.clientY},R.current="none",$.current=0,E.current=!1},re=ne=>{if(!f.current||ne.touches.length!==1||U.current)return;const ie=ne.touches[0],be=ie.clientX-f.current.x,Ce=ie.clientY-f.current.y;if(R.current==="none"){if(Math.abs(be)<10&&Math.abs(Ce)<10)return;if(Math.abs(be)>Math.abs(Ce)){if(t.length<=1)return;R.current="horizontal"}else if(Ce>0)R.current="vertical";else return}if(R.current==="horizontal"){E.current=!0,D(!0),$.current=be,z(be),ne.preventDefault();return}R.current==="vertical"&&(E.current=!0,D(!0),L.current=Ce,S(Ce),ne.preventDefault())},ae=()=>{if(!f.current)return;const ne=R.current,ie=E.current;if(ie&&ne==="horizontal")ce($.current),Se();else if(ie&&ne==="vertical")if(L.current>Im){const Ce=window.innerHeight;L.current=Ce,F(!0),S(Ce),W("closing")}else L.current=0,S(0),Se();else ne==="horizontal"&&Math.abs($.current)>0&&(ce($.current),Se());f.current=null,R.current="none",$.current=0,E.current=!1,D(!1)};return document.addEventListener("touchstart",H,{passive:!0}),document.addEventListener("touchmove",re,{passive:!1}),document.addEventListener("touchend",ae),document.addEventListener("touchcancel",ae),()=>{document.removeEventListener("touchstart",H),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae),ue()}},[w,t.length,d,s,_,v]),a.useEffect(()=>{const X=ue=>{ue.key==="Escape"&&(ue.preventDefault(),ue.stopPropagation(),w!=="closing"&&W("closing"))};return window.addEventListener("keydown",X,!0),()=>window.removeEventListener("keydown",X,!0)},[w]);const J=()=>{w!=="closing"&&W("closing")},de=w==="open",$e=w==="closing",oe=h>0?Math.max(0,1-h/500):1,xe=h>0?Math.max(.35,1-h/500):1,Q=X=>{if(X.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const ue=X.currentTarget.getBoundingClientRect(),Se=X.clientY-ue.top,O=Math.min(52,ue.height*.2);if(!(Se>ue.height-O)){if(X.clientX-ue.left<ue.width/2){s();return}d()}},ye=X=>{if(t.length<=1)return;const ue=X.currentTarget.getBoundingClientRect(),Se=X.clientX-ue.left,O=X.clientY-ue.top,ce=Math.min(52,ue.height*.2);if(O>ue.height-ce){X.currentTarget.style.cursor="default";return}X.currentTarget.style.cursor=Se<ue.width/2?"w-resize":"e-resize"},ve=a.useCallback(X=>{X.propertyName!=="transform"||!U.current||(me(),_(!1))},[me,_]),ke=Z?`translateX(${M}px)`:h>0?`translateY(${h}px)`:void 0,we={position:"fixed",top:j==null?void 0:j.top,left:j==null?void 0:j.left,width:j==null?void 0:j.width,height:j==null?void 0:j.height,objectFit:i==="cover"?"cover":"contain",transform:ke,opacity:h>0?xe:w==="opening"||$e?0:1,transition:Y&&!K?"none":K?`transform ${Rn}ms ${ni}`:N?`transform ${Rn}ms ${ni}, opacity ${Rn}ms ${ni}`:w==="opening"||$e?`opacity ${Rn}ms ${ni}`:"none",pointerEvents:G&&de&&!Z?"auto":"none",touchAction:G&&de?"none":void 0,zIndex:9998},Me=j?{position:"fixed",top:j.top,height:j.height,width:j.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:x,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:w==="open"?"none":void 0},onClick:J,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:de?oe:0,transition:Y?"none":`opacity ${Rn}ms ${ni}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:m?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:de?1:0,transition:`opacity ${Rn}ms ${ni}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:de?1:0,transition:`opacity ${Rn}ms ${ni}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),j&&q&&(G?r.jsx(Wm,{src:q.url,phase:w,mediaRef:T,mediaStyle:we,onLoadedMetadata:fe,onClick:Q,onMouseMove:ye,onTransitionEnd:ve},`${n}-${q.url}`):r.jsx("img",{ref:T,src:q.url,alt:q.name,onLoad:fe,onTransitionEnd:ve,style:we},`${n}-${q.url}`)),de&&Me&&t.length>1&&!G&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Me,left:j.left,cursor:"w-resize",pointerEvents:Z?"none":"auto"},onClick:X=>{if(C.current){C.current=!1;return}X.stopPropagation(),s()}}),r.jsx("div",{style:{...Me,left:j.left+j.width/2,cursor:"e-resize",pointerEvents:Z?"none":"auto"},onClick:X=>{if(C.current){C.current=!1;return}X.stopPropagation(),d()}})]})]})}function Nm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Hm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:l,activeEvent:s,layoutId:d,portalId:c}){const{prefix:u}=y.useScopedStyles(),{type:m="a",gridLayout:x,textBoxWidth:b=100,verticalGap:T,entriesCount:f,lightbox:L,imageDisplay:$,lightboxImageDisplay:R,slider:E,sliderTiming:C,direction:U,transition:k,titleMarginTop:j,subtitleMarginTop:I,titleColor:w,subtitleColor:W,lightboxCounterColor:h,titleFontFamily:S,titleFontSettings:M,titleFontSize:z,titleLineHeight:K,titleLetterSpacing:le,titleWordSpacing:Y,titleTextAppearance:D,subtitleFontFamily:N,subtitleFontSettings:F,subtitleFontSize:A,subtitleLineHeight:q,subtitleLetterSpacing:G,subtitleWordSpacing:Z,subtitleTextAppearance:_,lightboxCounterFontFamily:me,lightboxCounterFontSettings:v,lightboxCounterFontSize:fe,lightboxCounterLineHeight:J,lightboxCounterLetterSpacing:de,lightboxCounterWordSpacing:$e,lightboxCounterTextAppearance:oe,showText:xe="always",alignEntries:Q="off",align:ye="top"}=e,ve={fontSettings:{fontFamily:S,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:z??.01,lineHeight:K,letterSpacing:le??0,wordSpacing:Y??0,textAppearance:D,color:w},we={...dn(Xt(ve,n))},Me={fontSettings:{fontFamily:N,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:A??.01,lineHeight:q,letterSpacing:G??0,wordSpacing:Z??0,textAppearance:_,color:W},ue={...dn(Xt(Me,n))},Se={fontSettings:{fontFamily:me,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:fe??.01,lineHeight:J,letterSpacing:de??0,wordSpacing:$e??0,textAppearance:oe,color:h},ce={...dn(Xt(Se,n)),...Or(fe,J,u,n)},H=jr(z,K,`${u}-item-title`,`${u}-text-tight-leading`),re=jr(A,q,`${u}-item-subtitle`,`${u}-text-tight-leading`),ae=Or(z,K,u,n),ne=Or(A,q,u,n),ie=jr(fe,J,`${u}-lightbox-counter`,`${u}-text-tight-leading`),be=y.buildColorVars(u,{titleColor:w,subtitleColor:W,lightboxCounterColor:h},jm,Om),pe=`${s&&s!=="default"?`${u}-state-${s}`:""}${xe==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Ae=f===0?1/0:f,se=(t??[]).slice(0,Ae),V=x.entryWidth??.2,je=($==null?void 0:$.display)==="cover",We=($==null?void 0:$.ratioValue)??"1:1",et=($==null?void 0:$.reversed)??!1,[Ye,st]=We.split(":").map(Number),ot=`${et?st:Ye} / ${et?Ye:st}`,$t=x.columnsCount,rt=y.scalingValue(V??0,n),Ue=rt,ht=!je&&E!=="off",xt=se.length%$t||$t,dt=xt<$t&&se.length>0,kt=se.length-xt,_t=dt?Math.floor(($t-xt)/2)+1:1,Qe={width:Ue,...je?{aspectRatio:ot,height:"auto",overflow:"hidden"}:{height:"auto"}},Tt=`${u}-item-image-wrapper${ht?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Lt=m==="d"||m==="e"||m==="f",Ge=Q==="on",qe=`calc(${y.scalingValue(V??0,n)} * (${b} / 100))`,Pe=y.scalingValue(V*b/100,n),gt=je?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[It,Mt]=a.useState("ltr"),[Dt,en]=a.useState(0),on=a.useRef(null);a.useEffect(()=>{const ze=on.current;if(!ze)return;const ut=new ResizeObserver(_e=>{en(Math.round(_e[0].contentRect.width))});return ut.observe(ze),()=>ut.disconnect()},[]);const bt=(()=>{const ze={...be},ut=on.current?getComputedStyle(on.current).getPropertyValue("--cntrl-article-width").trim():"";return ut&&(ze["--cntrl-article-width"]=ut),ze})(),[Rt,Ut]=a.useState(!1),[Kt,ft]=a.useState([]),[Jt,Te]=a.useState(0),Oe=L==="on"&&(!n||i),Ke=(ze,ut)=>{n&&!i||L!=="off"&&(ft(ze),Te(ut),Ut(!0))};a.useEffect(()=>{if(!Rt||L!=="on"||typeof document>"u")return;const ze=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ze}},[Rt,L]),a.useEffect(()=>{!n||i||Ut(!1)},[n,i]);const Ne=a.useMemo(()=>Tm(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ne}}),r.jsx("div",{style:be,children:r.jsx("div",{ref:on,className:`${u}-wrapper ${u}-type-${m}${Ge?` ${u}-align-entries`:""} ${u}-image-align-${ye} ${pe}`.trim(),style:{gridTemplateColumns:`repeat(${$t}, ${rt})`,rowGap:Ge?0:y.scalingValue(T??0,n),columnGap:y.scalingValue(x.horizontalGap??0,n),width:y.scalingValue(x.wrapperWidth??0,n),...Ge?{[`--${u}-align-entries-row-gap`]:y.scalingValue(T??0,n)}:{}},children:se.map((ze,ut)=>{var Gt;const _e=wl(ze.title),Je=wl(ze.subtitle),tt=(((Gt=ze.link)==null?void 0:Gt.length)??0)>0&&L==="off"?ze.link:void 0,Wt=Math.floor(ut/$t)===Math.ceil(se.length/$t)-1,Ct=dt&&ut>=kt?`${_t+(ut-kt)}`:void 0,lt=Lt?r.jsxs("div",{className:`${u}-item-text-block`,children:[_e&&r.jsx("p",{className:H,style:{width:qe,...we,...ae},children:ze.title}),_e&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(j??0,n),width:Pe}}),Je&&r.jsx("p",{className:re,style:{width:qe,...ue,...ne},children:ze.subtitle}),Je&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:Pe}})]}):null,Nt=Ge?r.jsxs("div",{className:`${u}-item-title-row`,children:[!Lt&&r.jsx("div",{"data-controls":o&&_e?"titleMarginTop":void 0,className:o&&_e?`${u}-control`:void 0,style:{height:_e?y.scalingValue(j??0,n):0,width:Pe}}),_e&&r.jsx("p",{className:H,style:{width:qe,...we,...ae},children:ze.title}),Lt&&_e&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(j??0,n),width:Pe}})]}):null,At=Ge?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Lt&&r.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?y.scalingValue(I??0,n):0,width:Pe}}),Je&&r.jsx("p",{className:re,style:{width:qe,...ue,...ne},children:ze.subtitle}),Lt&&Je&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:Pe}})]}):null,Vt=tt?r.jsxs("a",{href:tt,target:"_blank",className:`${u}-item-text-link`,children:[Nt,At]}):r.jsxs(r.Fragment,{children:[Nt,At]}),zt=Pm(ze.gallery),Pt=zt.filter(pt=>pt.lightboxMedia).map(pt=>pt.lightboxMedia),Qt=r.jsx("div",{className:Tt,style:Qe,children:zt.length===0?null:E==="off"?(()=>{const{displayMedia:pt,lightboxMedia:Ft}=zt[0],Bt=Ft?Pt.findIndex(g=>g.url===Ft.url):-1;return r.jsx(Sl,{media:pt,className:`${u}-item-${to(pt)?"video":"image"}`.trim(),style:gt,onMediaClick:Oe&&Bt>=0?()=>Ke(Pt,Bt):void 0})})():r.jsxs(r.Fragment,{children:[ht&&Ge&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:zt.map(({displayMedia:pt})=>to(pt)?r.jsx("video",{src:pt.url,muted:!0,playsInline:!0},`sizer-${pt.url}`):r.jsx("img",{src:pt.url,alt:""},`sizer-${pt.url}`))}),r.jsx(br,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:C*1e3,width:"100%",height:"100%",speed:Lm,type:k==="fade"?"fade":"loop",rewind:k==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:k==="fade"?"ltr":U!=="random"?U==="horizontal"?"ltr":"ttb":It},onMoved:pt=>{if(U!=="random"||k==="fade")return;const Ft=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Mt(Ft),setTimeout(()=>{pt.refresh()},0)},children:zt.map(({displayMedia:pt,lightboxMedia:Ft},Bt)=>{const g=Ft?Pt.findIndex(ge=>ge.url===Ft.url):-1;return r.jsx(wr,{children:r.jsx(Sl,{media:pt,className:`${u}-item-${to(pt)?"video":"image"}`.trim(),style:gt,onMediaClick:Oe&&g>=0?()=>Ke(Pt,g):void 0})},Bt)})},`${k}-${V}-${U}-${C}-${Dt}-${d}`)]})}),wt=Lt?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&_e?"titleMarginTop":void 0,className:o&&_e?`${u}-control`:void 0,style:{height:_e?y.scalingValue(j??0,n):0,width:Pe}}),r.jsx("p",{className:H,style:{width:qe,...we,...ae},children:ze.title}),r.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?y.scalingValue(I??0,n):0,width:Pe}}),r.jsx("p",{className:re,style:{width:qe,...ue,...ne},children:ze.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:Ct&&!Ge?{gridColumn:Ct}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Ge&&Wt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(b??0)>100?`calc(${rt} * (${b} / 100))`:rt,...Ct&&Ge?{gridColumn:Ct}:{}},children:Ge?r.jsx(r.Fragment,{children:Lt?r.jsxs(r.Fragment,{children:[Vt,r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:Qt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:Qt}),Vt]})}):tt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:[lt,Qt]}),!Lt&&r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-text-link`,children:wt})]}):r.jsxs(r.Fragment,{children:[lt,Qt,wt]})})},ut)})})}),(!n||i)&&Rt&&typeof document<"u"&&L==="on"&&(()=>{const ze=(c?document.getElementById(c):null)??document.body;return gi.createPortal(r.jsx("div",{style:bt,"data-selection":"none",children:r.jsx(_m,{prefix:u,items:Kt,index:Jt,imageDisplay:Nm(R),isEditor:n,onClose:()=>Ut(!1),onPrev:()=>Te(ut=>(ut-1+Kt.length)%Kt.length),onNext:()=>Te(ut=>(ut+1)%Kt.length),counterClassName:ie,counterStyle:ce})}),ze)})()]})}const jm={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Om=["hover","focus","filled","success","error"],zm=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4137
4141
  import '@splidejs/react-splide/css/core';
4138
4142
  import { CommonComponentProps } from '../props';
4139
4143
  import {
@@ -4510,6 +4514,20 @@ function getCSS(P: string): string {
4510
4514
  margin: 0;
4511
4515
  color: var(--\${P}-lightbox-counter-color);
4512
4516
  }
4517
+ .\${P}-lightbox {
4518
+ position: fixed;
4519
+ inset: 0;
4520
+ z-index: 9997;
4521
+ overscroll-behavior: none;
4522
+ overflow: hidden;
4523
+ }
4524
+ .\${P}-lightbox-editor {
4525
+ inset: auto;
4526
+ top: var(--cntrl-article-top, 0);
4527
+ left: var(--cntrl-article-left, 0);
4528
+ width: var(--cntrl-article-width, 100vw) !important;
4529
+ height: var(--cntrl-viewport-height, 100vh) !important;
4530
+ }
4513
4531
  .\${P}-control {
4514
4532
  position: relative;
4515
4533
  z-index: 2;
@@ -4533,9 +4551,11 @@ type GridProps = {
4533
4551
  type AnimRect = { top: number; left: number; width: number; height: number };
4534
4552
 
4535
4553
  type LightboxProps = {
4554
+ prefix: string;
4536
4555
  items: GridMedia[];
4537
4556
  index: number;
4538
4557
  imageDisplay: 'fit' | 'cover';
4558
+ isEditor?: boolean;
4539
4559
  onClose: () => void;
4540
4560
  onPrev: () => void;
4541
4561
  onNext: () => void;
@@ -4719,7 +4739,7 @@ function LightboxVideo({
4719
4739
  );
4720
4740
  }
4721
4741
 
4722
- function Lightbox({ items, index, imageDisplay, onClose, onPrev, onNext, counterClassName, counterStyle }: LightboxProps) {
4742
+ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, onPrev, onNext, counterClassName, counterStyle }: LightboxProps) {
4723
4743
  const isCover = imageDisplay === 'cover';
4724
4744
  const containerRef = useRef<HTMLDivElement>(null);
4725
4745
  const ghostRef = useRef<HTMLDivElement>(null);
@@ -4852,11 +4872,20 @@ function Lightbox({ items, index, imageDisplay, onClose, onPrev, onNext, counter
4852
4872
  useEffect(() => {
4853
4873
  if (phase !== 'open') return;
4854
4874
 
4875
+ let blockClick: ((clickEvent: Event) => void) | null = null;
4876
+
4877
+ const clearBlockSwipeClick = () => {
4878
+ if (!blockClick) return;
4879
+ document.removeEventListener('click', blockClick, true);
4880
+ blockClick = null;
4881
+ };
4882
+
4855
4883
  const blockSwipeClick = () => {
4856
- const blockClick = (clickEvent: Event) => {
4884
+ clearBlockSwipeClick();
4885
+ blockClick = (clickEvent: Event) => {
4857
4886
  clickEvent.stopPropagation();
4858
4887
  clickEvent.preventDefault();
4859
- document.removeEventListener('click', blockClick, true);
4888
+ clearBlockSwipeClick();
4860
4889
  };
4861
4890
  document.addEventListener('click', blockClick, true);
4862
4891
  };
@@ -4959,9 +4988,8 @@ function Lightbox({ items, index, imageDisplay, onClose, onPrev, onNext, counter
4959
4988
  } else {
4960
4989
  swipeOffsetRef.current = 0;
4961
4990
  setSwipeOffset(0);
4991
+ blockSwipeClick();
4962
4992
  }
4963
-
4964
- blockSwipeClick();
4965
4993
  } else if (axis === 'horizontal' && Math.abs(swipeDeltaXRef.current) > 0) {
4966
4994
  startNavSwipeRelease(swipeDeltaXRef.current);
4967
4995
  blockSwipeClick();
@@ -4984,6 +5012,7 @@ function Lightbox({ items, index, imageDisplay, onClose, onPrev, onNext, counter
4984
5012
  document.removeEventListener('touchmove', handleTouchMove);
4985
5013
  document.removeEventListener('touchend', handleTouchEnd);
4986
5014
  document.removeEventListener('touchcancel', handleTouchEnd);
5015
+ clearBlockSwipeClick();
4987
5016
  };
4988
5017
  }, [phase, items.length, onNext, onPrev, setNavSwipeAnimatingState, scheduleNavSwipeSnapBackEnd]);
4989
5018
 
@@ -5100,13 +5129,11 @@ function Lightbox({ items, index, imageDisplay, onClose, onPrev, onNext, counter
5100
5129
  return (
5101
5130
  <div
5102
5131
  ref={containerRef}
5132
+ className={[
5133
+ \`\${P}-lightbox\`,
5134
+ isEditor ? \`\${P}-lightbox-editor\` : '',
5135
+ ].filter(Boolean).join(' ')}
5103
5136
  style={{
5104
- position: 'fixed',
5105
- top: 'var(--cntrl-article-top, 0)',
5106
- left: 'var(--cntrl-article-left, 0)',
5107
- width: 'var(--cntrl-article-width, 100vw) !important',
5108
- height: 'var(--cntrl-viewport-height, 100vh) !important',
5109
- zIndex: 9997,
5110
5137
  touchAction: phase === 'open' ? 'none' : undefined,
5111
5138
  }}
5112
5139
  onClick={handleClose}
@@ -5837,9 +5864,11 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
5837
5864
  return createPortal(
5838
5865
  <div style={lightboxPortalStyle} data-selection="none">
5839
5866
  <Lightbox
5867
+ prefix={P}
5840
5868
  items={lightboxItems}
5841
5869
  index={lightboxIndex}
5842
5870
  imageDisplay={resolveLightboxImageDisplay(lightboxImageDisplay)}
5871
+ isEditor={isEditor}
5843
5872
  onClose={() => setLightboxOpen(false)}
5844
5873
  onPrev={() => setLightboxIndex((prev) => (prev - 1 + lightboxItems.length) % lightboxItems.length)}
5845
5874
  onNext={() => setLightboxIndex((prev) => (prev + 1) % lightboxItems.length)}
@@ -5922,7 +5951,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5922
5951
  };
5923
5952
 
5924
5953
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5925
- `,zr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Bm=["titleColor","subtitleColor","lightboxCounterColor"],Dm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Bm],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Vm={element:Hm,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Dm,sourceCode:zm},Gm=50,$s=10,Ha="cntrl-lightbox-journal",$r=Ha,ma=`${Ha}-`,Cr=e=>`${Ha}-${e}`,ja=e=>e===$r||e.startsWith(ma),Cs=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ts=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Cs(t.get(Cr(e)));if(i)return i}const n=Cs(t.get($r));if(n)return n;for(const[i]of t){if(!i.startsWith(ma))continue;const o=i.slice(ma.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ls=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Xl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{ja(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Cr(t),String(e)):i.searchParams.set($r,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},qm=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Cr(e)||i===$r:ja(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},Yl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Cr(e)):[...t.keys()].some(n=>ja(n))},Km=(e,t)=>{if(Yl(t)){if(e){window.history.back();return}qm(t)}},Um=20,Xm=2,Br=e=>`max(${e}, ${Um}px)`,ki=e=>((e==null?void 0:e.image)??[]).slice(0,Xm),Zl=e=>e.reduce((t,n)=>t+ki(n).length,0),Ym=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+ki(s).length,1),i=ki(e[t]).length;return{start:n,end:n+i-1}},Zm=(e,t)=>{const n=Zl(e),{start:i,end:o}=Ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Yo=(e,t)=>t==="B"?e.flatMap((n,i)=>ki(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:ki(n)})),Jm=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Zm(i,o)},Is=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Qm=(e,t,n)=>e==="B"?t.length>1:Zl(n)>1,hn=.004,Bn=.004,Ii={title1Width:.13,title2Width:.13,title3Width:.14},Dn=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Pi=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},po=(e,t)=>Pi(e,t),sn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Vn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Pi(e.length,n),effective:po(e.length,n)}},Jl=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Ql=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Kn=["title1","title2","title3","count"],Be=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Oa={title1:"1",title2:"2",title3:"3",count:"Count"},za=e=>[Be(e,"fontFamily"),Be(e,"fontSettings"),{type:"row",items:[Be(e,"fontSize"),Be(e,"lineHeight"),Be(e,"letterSpacing"),Be(e,"wordSpacing")]},Be(e,"textAlign"),Be(e,"textAppearance")],eg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Kn.map(e=>[Oa[e],za(e)]))}),tg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ng={title1:.02,title2:.02,title3:.02,count:.017},li=(e,t)=>{const n=i=>{const o=Be(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[tg[t]]}},ci=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??ng[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)};function ec({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:x=0,title3MarginLeft:b=0,titleRowMarginBottom:$=0,titleHeaderLayout:h="desktop",contentMarginTop:w=0,iconMarginRight:C=0,closeIcon:R=null,closeIconMaxWidth:A=0,closeIconColor:T="#000000",closeIconHoverColor:N="#cccccc"}=n,E=y.scalingValue(w,i),V=y.scalingValue(C,i),L=y.scalingValue($,i),I=h==="mobile",_=ci("title1",li(n,"title1"),i),f=ci("title2",li(n,"title2"),i),S=ci("title3",li(n,"title3"),i),M=a.useMemo(()=>({title1Width:d??Ii.title1Width,title2Width:c??Ii.title2Width,title3Width:u??Ii.title3Width}),[d,c,u]),z=a.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:b}),[x,b]),K=a.useMemo(()=>Dn(e,t,_,f,S),[e,t,_,f,S]),ae=a.useMemo(()=>K.map(ee=>M[ee.widthKey]),[K,M]),Q=a.useMemo(()=>Pi(K.length,ae),[K.length,ae]),G=a.useMemo(()=>po(K.length,ae),[K.length,ae]),H=a.useMemo(()=>K.filter(ee=>ee.prefix==="title1"),[K]),k=a.useMemo(()=>K.filter(ee=>ee.prefix==="title2"||ee.prefix==="title3"),[K]),F=a.useMemo(()=>Vn(H,M),[H,M]),X=a.useMemo(()=>Vn(k,M),[k,M]),B=!!(t.title1||t.title2||t.title3),U=R!==null;if(!(B||U))return null;const xe=(m??0)>0||o,v=(ee,ue)=>{const Ae=K.findIndex(q=>q.prefix===ee.prefix);if(!I||ue==="single-row")return{effectiveWidth:G[Ae]??0,resolvedWidth:Q[Ae]??0,maxWidth:sn(Ae,Q)};if(ue==="two-row-top"){const q=H.findIndex(je=>je.prefix===ee.prefix);return{effectiveWidth:F.effective[q]??0,resolvedWidth:F.resolved[q]??0,maxWidth:sn(q,F.resolved)}}const se=k.findIndex(q=>q.prefix===ee.prefix);return{effectiveWidth:X.effective[se]??0,resolvedWidth:X.resolved[se]??0,maxWidth:sn(se,X.resolved)}},he=(ee,ue,Ae)=>{if(!I||Ae==="single-row"){const et=ee.findIndex(De=>De.prefix===ue.prefix),Ye=ee.map(De=>M[De.widthKey]),lt=Pi(ee.length,Ye);return{effectiveWidth:po(ee.length,Ye)[et]??0,resolvedWidth:lt[et]??0,maxWidth:sn(et,lt)}}if(Ae==="two-row-top"){const et=ee.filter(De=>De.prefix==="title1"),Ye=et.findIndex(De=>De.prefix===ue.prefix),{resolved:lt,effective:mt}=Vn(et,M);return{effectiveWidth:mt[Ye]??0,resolvedWidth:lt[Ye]??0,maxWidth:sn(Ye,lt)}}const se=ee.filter(et=>et.prefix==="title2"||et.prefix==="title3"),q=se.findIndex(et=>et.prefix===ue.prefix),{resolved:je,effective:We}=Vn(se,M);return{effectiveWidth:We[q]??0,resolvedWidth:je[q]??0,maxWidth:sn(q,je)}},Y=ee=>Ql(K,Q,z,ee)+(I?0:m??0),le=()=>I?0:m??0,$e=ee=>k.slice(0,ee).reduce((ue,Ae,se)=>ue+(Ae.marginLeftKey?z[Ae.marginLeftKey]??0:0)+(X.resolved[se]??0),0),re=ee=>{const ue=k[ee];return $e(ee)+(ue.marginLeftKey?z[ue.marginLeftKey]??0:0)+(X.resolved[ee]??0)},be=(ee,ue,Ae)=>{const se=ee.marginLeftKey?z[ee.marginLeftKey]??0:0,{effectiveWidth:q,resolvedWidth:je,maxWidth:We}=Ae??v(ee,ue),et=Math.max(se,Bn),Ye=o&&ue==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":ee.prefix,style:{width:y.scalingValue(q,i),...se>0?{marginLeft:y.scalingValue(se,i)}:{}},children:[r.jsx("p",{className:ee.className,style:ee.style,children:ee.text}),Ye&&ee.marginLeftKey?r.jsx("div",{"data-controls":ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:y.scalingValue(-se,i),width:y.scalingValue(et,i),height:"100%",pointerEvents:"auto"}}):null,Ye?r.jsx("div",{"data-controls":ee.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(We),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:y.scalingValue(-hn/2,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}}):null]},ee.className)},Z=(ee="two-row")=>{const ue=K.findIndex(q=>q.prefix==="title1"),Ae=ue>=0?Q[ue]:M.title1Width,se=ee==="two-row"&&o;return r.jsx("div",{...se?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae)}:{},style:{width:y.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...se?{pointerEvents:"auto"}:{}}})},fe=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:_,"aria-hidden":"true",children:" "}),ye=ee=>{const ue=Dn(e,ee,_,f,S);return r.jsx(r.Fragment,{children:ue.map(Ae=>be(Ae,"single-row",he(ue,Ae,"single-row")))})},ke=ee=>{const ue=Dn(e,ee,_,f,S),Ae=ue.find(se=>se.prefix==="title1");return Ae?be(Ae,"two-row-top",he(ue,Ae,"two-row-top")):null},J=(ee,ue=!1)=>{const Ae=Dn(e,ee,_,f,S),se=Ae.filter(We=>We.prefix==="title2"||We.prefix==="title3"),q=o&&ue;return se.length>0||q||($??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[se.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:se.map(We=>be(We,"two-row-bottom",he(Ae,We,"two-row-bottom")))}),ue&&o?r.jsxs(r.Fragment,{children:[oe(),te()]}):null]}):null,($??0)>0||q?r.jsx("div",{"data-controls":q?"titleRowMarginBottom":void 0,"data-controls-axis":q?"y":void 0,"data-controls-reverse":q?"":void 0,className:q?`${e}-control`:void 0,style:{height:L,width:"100%",flexShrink:0,pointerEvents:q?"auto":"none"}}):null]}):null},Ce=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(A??0,i),height:y.scalingValue(A??0,i),marginRight:V,"--close-icon-hover-color":N},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ee=>{ee.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(rn,{url:R??"",fill:T,hoverFill:i&&!s?T:N,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:V,height:"100%",pointerEvents:"auto"}})]}),ce=()=>U?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Ce()}):null,ve=ee=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:ee})}),Se=ee=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[U||B?fe():null,xe?Z("two-row"):null,ve(ee),ce()]}),D=(ee,ue=!1)=>r.jsxs(r.Fragment,{children:[Se(ke(ee)),J(ee,ue)]}),ie=()=>{const ee=I?-1:K.findIndex(se=>se.prefix==="title1"),ue=!I&&(o||(m??0)>0)?(()=>{const se=m??0,q=ee>=0?Q[ee]:M.title1Width,je=Math.max(se,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:0,width:y.scalingValue(je,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ae=K.flatMap((se,q)=>{if(!se.marginLeftKey)return[];const je=z[se.marginLeftKey]??0,We=Jl(K,Q,z,q)+le(),et=Math.max(je,Bn);return r.jsx("div",{"data-controls":se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Q[q]),style:{position:"absolute",top:0,left:y.scalingValue(We,i),width:y.scalingValue(et,i),height:"100%",pointerEvents:"auto"}},se.marginLeftKey)});return ue?[ue,...Ae]:Ae},W=()=>K.map((ee,ue)=>{const Ae=sn(ue,Q),q=Y(ue)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ee.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(q,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}})},`${ee.widthKey}-junction`)}),oe=()=>k.flatMap((ee,ue)=>{if(!ee.marginLeftKey)return[];const Ae=z[ee.marginLeftKey]??0,se=$e(ue),q=Math.max(Ae,Bn),{resolvedWidth:je}=v(ee,"two-row-bottom");return r.jsx("div",{"data-controls":ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:y.scalingValue(se,i),width:y.scalingValue(q,i),height:"100%",pointerEvents:"auto"}},ee.marginLeftKey)}),te=()=>k.map((ee,ue)=>{const{maxWidth:Ae}=v(ee,"two-row-bottom"),q=re(ue)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ee.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(q,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}})},`${ee.widthKey}-junction`)}),ge=()=>!o||I?null:r.jsxs(r.Fragment,{children:[ie(),W()]}),de=!!(t.title2||t.title3||($??0)>0||o),we=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[U||B?fe():null,xe?Z("single-row"):null,B?ve(ye(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ce(),ge()]}),Me=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...de?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:de?void 0:{flex:"0 0 auto",height:"auto"},children:D(t,!0)}),ge()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:E,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...I?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${I?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${I?` ${e}-text-bar-cell-stacked`:""}`,style:I?void 0:{flex:1,minWidth:0,width:"100%"},children:I?Me():we()})})})]})}function ig(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function og(e){return`
5954
+ `,zr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Bm=["titleColor","subtitleColor","lightboxCounterColor"],Dm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Bm],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Vm={element:Hm,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Dm,sourceCode:zm},Gm=50,$l=10,Ha="cntrl-lightbox-journal",$r=Ha,ma=`${Ha}-`,Cr=e=>`${Ha}-${e}`,ja=e=>e===$r||e.startsWith(ma),Cl=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Tl=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Cl(t.get(Cr(e)));if(i)return i}const n=Cl(t.get($r));if(n)return n;for(const[i]of t){if(!i.startsWith(ma))continue;const o=i.slice(ma.length);if(!/^\d+$/.test(o))continue;const l=Number.parseInt(o,10);if(Number.isFinite(l)&&l>=1)return l}return null},Ll=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Xs=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(s=>{ja(s)&&i.searchParams.delete(s)}),t?i.searchParams.set(Cr(t),String(e)):i.searchParams.set($r,String(e));const o=n?"replaceState":"pushState",l=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",l)},qm=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Cr(e)||i===$r:ja(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},Ys=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Cr(e)):[...t.keys()].some(n=>ja(n))},Km=(e,t)=>{if(Ys(t)){if(e){window.history.back();return}qm(t)}},Um=20,Xm=2,Br=e=>`max(${e}, ${Um}px)`,Mi=e=>((e==null?void 0:e.image)??[]).slice(0,Xm),Zs=e=>e.reduce((t,n)=>t+Mi(n).length,0),Ym=(e,t)=>{const n=e.slice(0,t).reduce((o,l)=>o+Mi(l).length,1),i=Mi(e[t]).length;return{start:n,end:n+i-1}},Zm=(e,t)=>{const n=Zs(e),{start:i,end:o}=Ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Yo=(e,t)=>t==="B"?e.flatMap((n,i)=>Mi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Mi(n)})),Jm=(e,t,n,i)=>{var l;if(n==="B")return`${t+1} / ${e.length}`;const o=((l=e[t])==null?void 0:l.entryIndex)??0;return Zm(i,o)},Il=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Qm=(e,t,n)=>e==="B"?t.length>1:Zs(n)>1,hn=.004,Bn=.004,Ii={title1Width:.13,title2Width:.13,title3Width:.14},Dn=(e,t,n,i,o)=>{const l=[];return t.title1&&l.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&l.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&l.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),l},Pi=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const c=Math.min(l,d);return{overflow:l-c,widths:[d-c,...s]}},{overflow:i-1,widths:[]});return o},po=(e,t)=>Pi(e,t),ln=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Vn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Pi(e.length,n),effective:po(e.length,n)}},Js=(e,t,n,i)=>e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),Qs=(e,t,n,i)=>e.slice(0,i+1).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),Kn=["title1","title2","title3","count"],Be=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Oa={title1:"1",title2:"2",title3:"3",count:"Count"},za=e=>[Be(e,"fontFamily"),Be(e,"fontSettings"),{type:"row",items:[Be(e,"fontSize"),Be(e,"lineHeight"),Be(e,"letterSpacing"),Be(e,"wordSpacing")]},Be(e,"textAlign"),Be(e,"textAppearance")],eg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Kn.map(e=>[Oa[e],za(e)]))}),tg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ng={title1:.02,title2:.02,title3:.02,count:.017},si=(e,t)=>{const n=i=>{const o=Be(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[tg[t]]}},ci=(e,t,n)=>{var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??ng[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)};function ec({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:x=0,title3MarginLeft:b=0,titleRowMarginBottom:T=0,titleHeaderLayout:f="desktop",contentMarginTop:L=0,iconMarginRight:$=0,closeIcon:R=null,closeIconMaxWidth:E=0,closeIconColor:C="#000000",closeIconHoverColor:U="#cccccc"}=n,k=y.scalingValue(L,i),j=y.scalingValue($,i),I=y.scalingValue(T,i),w=f==="mobile",W=ci("title1",si(n,"title1"),i),h=ci("title2",si(n,"title2"),i),S=ci("title3",si(n,"title3"),i),M=a.useMemo(()=>({title1Width:d??Ii.title1Width,title2Width:c??Ii.title2Width,title3Width:u??Ii.title3Width}),[d,c,u]),z=a.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:b}),[x,b]),K=a.useMemo(()=>Dn(e,t,W,h,S),[e,t,W,h,S]),le=a.useMemo(()=>K.map(ee=>M[ee.widthKey]),[K,M]),Y=a.useMemo(()=>Pi(K.length,le),[K.length,le]),D=a.useMemo(()=>po(K.length,le),[K.length,le]),N=a.useMemo(()=>K.filter(ee=>ee.prefix==="title1"),[K]),F=a.useMemo(()=>K.filter(ee=>ee.prefix==="title2"||ee.prefix==="title3"),[K]),A=a.useMemo(()=>Vn(N,M),[N,M]),q=a.useMemo(()=>Vn(F,M),[F,M]),G=!!(t.title1||t.title2||t.title3),Z=R!==null;if(!(G||Z))return null;const me=(m??0)>0||o,v=(ee,pe)=>{const Ae=K.findIndex(V=>V.prefix===ee.prefix);if(!w||pe==="single-row")return{effectiveWidth:D[Ae]??0,resolvedWidth:Y[Ae]??0,maxWidth:ln(Ae,Y)};if(pe==="two-row-top"){const V=N.findIndex(je=>je.prefix===ee.prefix);return{effectiveWidth:A.effective[V]??0,resolvedWidth:A.resolved[V]??0,maxWidth:ln(V,A.resolved)}}const se=F.findIndex(V=>V.prefix===ee.prefix);return{effectiveWidth:q.effective[se]??0,resolvedWidth:q.resolved[se]??0,maxWidth:ln(se,q.resolved)}},fe=(ee,pe,Ae)=>{if(!w||Ae==="single-row"){const et=ee.findIndex(De=>De.prefix===pe.prefix),Ye=ee.map(De=>M[De.widthKey]),st=Pi(ee.length,Ye);return{effectiveWidth:po(ee.length,Ye)[et]??0,resolvedWidth:st[et]??0,maxWidth:ln(et,st)}}if(Ae==="two-row-top"){const et=ee.filter(De=>De.prefix==="title1"),Ye=et.findIndex(De=>De.prefix===pe.prefix),{resolved:st,effective:mt}=Vn(et,M);return{effectiveWidth:mt[Ye]??0,resolvedWidth:st[Ye]??0,maxWidth:ln(Ye,st)}}const se=ee.filter(et=>et.prefix==="title2"||et.prefix==="title3"),V=se.findIndex(et=>et.prefix===pe.prefix),{resolved:je,effective:We}=Vn(se,M);return{effectiveWidth:We[V]??0,resolvedWidth:je[V]??0,maxWidth:ln(V,je)}},J=ee=>Qs(K,Y,z,ee)+(w?0:m??0),de=()=>w?0:m??0,$e=ee=>F.slice(0,ee).reduce((pe,Ae,se)=>pe+(Ae.marginLeftKey?z[Ae.marginLeftKey]??0:0)+(q.resolved[se]??0),0),oe=ee=>{const pe=F[ee];return $e(ee)+(pe.marginLeftKey?z[pe.marginLeftKey]??0:0)+(q.resolved[ee]??0)},xe=(ee,pe,Ae)=>{const se=ee.marginLeftKey?z[ee.marginLeftKey]??0:0,{effectiveWidth:V,resolvedWidth:je,maxWidth:We}=Ae??v(ee,pe),et=Math.max(se,Bn),Ye=o&&pe==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":ee.prefix,style:{width:y.scalingValue(V,i),...se>0?{marginLeft:y.scalingValue(se,i)}:{}},children:[r.jsx("p",{className:ee.className,style:ee.style,children:ee.text}),Ye&&ee.marginLeftKey?r.jsx("div",{"data-controls":ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:y.scalingValue(-se,i),width:y.scalingValue(et,i),height:"100%",pointerEvents:"auto"}}):null,Ye?r.jsx("div",{"data-controls":ee.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(We),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:y.scalingValue(-hn/2,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}}):null]},ee.className)},Q=(ee="two-row")=>{const pe=K.findIndex(V=>V.prefix==="title1"),Ae=pe>=0?Y[pe]:M.title1Width,se=ee==="two-row"&&o;return r.jsx("div",{...se?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae)}:{},style:{width:y.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...se?{pointerEvents:"auto"}:{}}})},ye=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),ve=ee=>{const pe=Dn(e,ee,W,h,S);return r.jsx(r.Fragment,{children:pe.map(Ae=>xe(Ae,"single-row",fe(pe,Ae,"single-row")))})},ke=ee=>{const pe=Dn(e,ee,W,h,S),Ae=pe.find(se=>se.prefix==="title1");return Ae?xe(Ae,"two-row-top",fe(pe,Ae,"two-row-top")):null},we=(ee,pe=!1)=>{const Ae=Dn(e,ee,W,h,S),se=Ae.filter(We=>We.prefix==="title2"||We.prefix==="title3"),V=o&&pe;return se.length>0||V||(T??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[se.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:se.map(We=>xe(We,"two-row-bottom",fe(Ae,We,"two-row-bottom")))}),pe&&o?r.jsxs(r.Fragment,{children:[re(),ae()]}):null]}):null,(T??0)>0||V?r.jsx("div",{"data-controls":V?"titleRowMarginBottom":void 0,"data-controls-axis":V?"y":void 0,"data-controls-reverse":V?"":void 0,className:V?`${e}-control`:void 0,style:{height:I,width:"100%",flexShrink:0,pointerEvents:V?"auto":"none"}}):null]}):null},Me=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(E??0,i),height:y.scalingValue(E??0,i),marginRight:j,"--close-icon-hover-color":U},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ee=>{ee.stopPropagation(),s==null||s()},"aria-label":"Close",children:r.jsx(rn,{url:R??"",fill:C,hoverFill:i&&!l?C:U,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:j,height:"100%",pointerEvents:"auto"}})]}),X=()=>Z?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Me()}):null,ue=ee=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:ee})}),Se=ee=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Z||G?ye():null,me?Q("two-row"):null,ue(ee),X()]}),O=(ee,pe=!1)=>r.jsxs(r.Fragment,{children:[Se(ke(ee)),we(ee,pe)]}),ce=()=>{const ee=w?-1:K.findIndex(se=>se.prefix==="title1"),pe=!w&&(o||(m??0)>0)?(()=>{const se=m??0,V=ee>=0?Y[ee]:M.title1Width,je=Math.max(se,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(V),style:{position:"absolute",top:0,left:0,width:y.scalingValue(je,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ae=K.flatMap((se,V)=>{if(!se.marginLeftKey)return[];const je=z[se.marginLeftKey]??0,We=Js(K,Y,z,V)+de(),et=Math.max(je,Bn);return r.jsx("div",{"data-controls":se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Y[V]),style:{position:"absolute",top:0,left:y.scalingValue(We,i),width:y.scalingValue(et,i),height:"100%",pointerEvents:"auto"}},se.marginLeftKey)});return pe?[pe,...Ae]:Ae},H=()=>K.map((ee,pe)=>{const Ae=ln(pe,Y),V=J(pe)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ee.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(V,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}})},`${ee.widthKey}-junction`)}),re=()=>F.flatMap((ee,pe)=>{if(!ee.marginLeftKey)return[];const Ae=z[ee.marginLeftKey]??0,se=$e(pe),V=Math.max(Ae,Bn),{resolvedWidth:je}=v(ee,"two-row-bottom");return r.jsx("div",{"data-controls":ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:y.scalingValue(se,i),width:y.scalingValue(V,i),height:"100%",pointerEvents:"auto"}},ee.marginLeftKey)}),ae=()=>F.map((ee,pe)=>{const{maxWidth:Ae}=v(ee,"two-row-bottom"),V=oe(pe)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ee.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(V,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}})},`${ee.widthKey}-junction`)}),ne=()=>!o||w?null:r.jsxs(r.Fragment,{children:[ce(),H()]}),ie=!!(t.title2||t.title3||(T??0)>0||o),be=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Z||G?ye():null,me?Q("single-row"):null,G?ue(ve(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),X(),ne()]}),Ce=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ie?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:ie?void 0:{flex:"0 0 auto",height:"auto"},children:O(t,!0)}),ne()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:k,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...w?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${w?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${w?` ${e}-text-bar-cell-stacked`:""}`,style:w?void 0:{flex:1,minWidth:0,width:"100%"},children:w?Ce():be()})})})]})}function ig(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function og(e){return`
5926
5955
  .${e}-wrapper {
5927
5956
  display: grid;
5928
5957
  align-items: start;
@@ -6253,7 +6282,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
6253
6282
  pointer-events: auto;
6254
6283
  flex-shrink: 0;
6255
6284
  }
6256
- `}const Rs={url:"",name:"",objectFit:"cover"},$n=500,Ki=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",rg=72,ag=50,sg=1e4,lg=650,cg=500;function dg(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function tc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=or(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function ug(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?tc(i,n):null}function pg(e){return e.reduce((t,n,i)=>{const o=Ba(n.gallery),l=Da(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Zi(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Es(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Zi(e,i,n)}const mg=.03;function nc(e){return e.width*mg}const Dr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function _o(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Ms(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function gg(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ga(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function hg(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ga(e,t.width,t.height)}function fg(e,t){if(Vi(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function yg(e){const t=new Set,n=[];for(const i of e){const o=Ba(i.gallery),s=Da(o);for(const l of s)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function vg({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Vi(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Ai(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=nc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function rr(e,t,n){const i=Ai(e,t,n);return{...i,left:2*i.left-e.left}}function xg(e,t,n){const{left:i,width:o}=n,s=nc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function ic(e,t,n,i){const o=Ai(e,"left",i),s=Ai(e,"right",i),l=rr(e,"left",i),d=rr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function bg(e,t,n,i){const{start:o,end:s}=ic(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function wg(e,t,n){const i=Ai(e,t,n),o=rr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function oc(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Ba(e){if(!e)return;if(oc(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??Rs,i??o??Rs]}]}function Sg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function $g(e){const[t]=e.media;return t!=null&&t.url?t:null}function Da(e){if(!Array.isArray(e)||e.length===0)return[];if(oc(e)){const t=[];for(const n of e){const i=Sg(n);if(!i)continue;const o=$g(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Vi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Cg({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Vi(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Tg({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function No({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Vi(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Lg({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:b,resolveCloseSourceRect:$,onClose:h,onPrev:w,onNext:C}){const R=a.useRef(null),A=a.useRef(null),T=a.useRef(null),N=a.useRef(new Map),[E,V]=a.useState(0),L=a.useRef(null),I=a.useRef(0),_=a.useRef(0),f=a.useRef("none"),S=a.useRef(!1),M=a.useRef(!1),z=a.useRef(!1),K=a.useRef(null),ae=a.useRef(null),Q=a.useRef(null),G=a.useRef(()=>{}),H=a.useRef(null),k=a.useRef(null),F=a.useRef(null),X=a.useRef(!1),[B,U]=a.useState(null),[j,xe]=a.useState(Dr),[v,he]=a.useState(0),[Y,le]=a.useState("opening"),[$e,re]=a.useState(0),[be,Z]=a.useState(0),[fe,ye]=a.useState(!1),[ke,J]=a.useState(null),[Ce,ce]=a.useState(null),[ve,Se]=a.useState(null),[D,ie]=a.useState(!1),[W,oe]=a.useState(null),[te,ge]=a.useState(!1),de=a.useRef(!1),[we,Me]=a.useState(!1),[ee,ue]=a.useState(!1),Ae=a.useRef(n),se=a.useRef(void 0),q=t[n],je=q?Vi(q):!1,We=be!==0||fe,et=!l&&(!s||!!d),Ye=c&&!l,lt=u.length>1,mt=a.useCallback((g,pe)=>t.length<=1?null:t[(g+pe+t.length)%t.length]??null,[t]),De=lt?Zi(u,m,-1):mt(n,-1),ot=lt?Zi(u,m,1):mt(n,1),$t=ke===-1&&We?lt&&Ce!==null?Zi(u,Ce,-1):ve!==null?mt(ve,-1):null:null,rt=ke===1&&We?lt&&Ce!==null?Zi(u,Ce,1):ve!==null?mt(ve,1):null:null,Ue=$t&&$t.url!==(De==null?void 0:De.url)?$t:null,ht=rt&&rt.url!==(ot==null?void 0:ot.url)?rt:null,xt=De&&Ye?(()=>{const g=lt?Es(u,m,-1):t.length>2?mt((n-1+t.length)%t.length,-1):null;return g&&g.url!==De.url?g:null})():null,dt=ot&&Ye?(()=>{const g=lt?Es(u,m,1):t.length>2?mt((n+1)%t.length,1):null;return g&&g.url!==ot.url?g:null})():null,Mt=Ue??xt,_t=ht??dt,Qe=a.useCallback((g,pe,Re)=>{if(!g||!pe||!Re)return;const Ie=N.current,Ze=Ie.get(g);(Ze==null?void 0:Ze.width)===pe&&(Ze==null?void 0:Ze.height)===Re||(Ie.set(g,{width:pe,height:Re}),V(Et=>Et+1))},[]),Tt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const pe=N.current.get(g.url);return hg(A.current,pe)},[E,v]),Lt=a.useCallback(()=>{if(!q)return;const g=Tt(q);if(g){U(g);return}const pe=A.current;pe&&U(Ms(pe))},[q,Tt]),Ge=a.useCallback(g=>{if(lt){const pe=u.length;ce((m+g+pe)%pe),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),ce(null))},[lt,u.length,m,t.length,n]),qe=a.useCallback(g=>{z.current=g,ye(g)},[]),Pe=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),gt=a.useCallback(()=>{Pe(),K.current=window.setTimeout(()=>{Pe(),qe(!1)},Ki+32)},[Pe,qe]),It=a.useCallback(()=>{const g=R.current;if(!g){xe({left:0,top:0,width:typeof window<"u"?window.innerWidth:Dr.width,height:typeof window<"u"?window.innerHeight:Dr.height});return}const pe=g.getBoundingClientRect();xe({left:pe.left,top:pe.top,width:pe.width,height:pe.height})},[]),kt=a.useCallback((g,pe)=>{if(We){if(we&&!fe)return`translate(${be}px, 0px)`;if(fe&&ke!==null){const Re=Tt(g);if(!Re)return;const{x:Ie,y:Ze}=bg(Re,pe,ke,j);return`translate(${Ie}px, ${Ze}px)`}if(fe)return"translate(0px, 0px)"}},[We,we,fe,be,ke,j,Tt]),Dt=a.useCallback(()=>{const g=ae.current;ae.current=null,Pe(),qe(!1),J(null),ce(null),Se(null),Z(0),Me(!1),S.current=!1,_.current=0,f.current="none",g===-1?w():g===1&&C()},[Pe,qe,w,C]),en=a.useCallback(()=>{Pe(),K.current=window.setTimeout(()=>{ae.current!==null&&Dt()},Ki+32)},[Pe,Dt]),on=a.useCallback(()=>{Pe(),ae.current=null,qe(!1),J(null),ce(null),Se(null),Z(0),Me(!1),S.current=!1,_.current=0,f.current="none"},[Pe,qe]),bt=a.useCallback(g=>{if(!(!Ye||!B)){if(z.current){if(ae.current===g){Q.current=g,Dt();return}on()}Pe(),Ge(g),ae.current=g,J(g),qe(!0),en()}},[Ye,B,Dt,on,Pe,Ge,qe,en]);G.current=bt;const Rt=a.useCallback(()=>{H.current=null,X.current=!1,k.current!==null&&(window.clearInterval(k.current),k.current=null),F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),Ut=a.useCallback(g=>{k.current!==null&&window.clearInterval(k.current);const pe=X.current?cg:lg;k.current=window.setInterval(()=>{G.current(g)},pe)},[]),Kt=a.useCallback(g=>{H.current!==g&&(Rt(),H.current=g,X.current=!1,G.current(g),Ut(g),F.current=window.setTimeout(()=>{F.current=null,H.current===g&&(X.current=!0,Ut(g))},sg))},[Rt,Ut]),ft=a.useCallback(()=>{const g=A.current;if(!g)return;const pe=q==null?void 0:q.url,Re=pe?N.current.get(pe):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){U(ga(g,Re.width,Re.height));return}const Ie=T.current;if(Ie&&pe&&(Ie.src===pe||Ie.currentSrc===pe)){const{width:Et,height:Ve}=gg(Ie);if(Et&&Ve){Qe(pe,Et,Ve),U(ga(g,Et,Ve));return}}const Ze=Ms(g);!Ze.width||!Ze.height||U(Ze)},[q==null?void 0:q.url,Qe]),Jt=a.useCallback(g=>{if(T.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&ft();return}g.complete&&g.naturalWidth>0&&ft()}},[ft]),Te=a.useCallback(()=>{It(),ft(),he(g=>g+1)},[It,ft]);a.useEffect(()=>{Te();const g=A.current,pe=R.current,Re=new ResizeObserver(()=>Te());return g&&Re.observe(g),pe&&Re.observe(pe),window.addEventListener("resize",Te),()=>{Re.disconnect(),window.removeEventListener("resize",Te)}},[Te,n,x]),a.useLayoutEffect(()=>{if(!q)return;const g=T.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){ft();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&ft()}},[q==null?void 0:q.url,n,ft]),a.useEffect(()=>{Lt()},[Lt,E]),a.useEffect(()=>{const g=new Set,pe=[],Re=Ie=>{!(Ie!=null&&Ie.url)||g.has(Ie.url)||(g.add(Ie.url),pe.push(Ie))};t.forEach(Re),u.forEach(Ie=>Ie.items.forEach(Re)),pe.forEach(Ie=>{N.current.has(Ie.url)||fg(Ie,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(Y!=="opening"||!B)return;if(!b){le("open");return}ie(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ie(!0),le("open")})});return()=>cancelAnimationFrame(g)},[Y,B,b]),a.useEffect(()=>{if(Y!=="closing")return;const g=setTimeout(()=>h(),$n);return()=>clearTimeout(g)},[Y,h]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{Ae.current===n&&se.current===(q==null?void 0:q.url)||(Pe(),ae.current=null,J(null),ce(null),Se(null),re(0),Z(0),qe(!1),ue(!1),Me(!1),I.current=0,_.current=0,f.current="none",S.current=!1,L.current=null,M.current=!1,T.current=null,Lt(),Ae.current=n,se.current=q==null?void 0:q.url)},[n,q==null?void 0:q.url,qe,Pe,Lt]),a.useLayoutEffect(()=>{const g=Q.current;g!==null&&(Q.current=null,requestAnimationFrame(()=>{G.current(g)}))},[n,m,q==null?void 0:q.url]),a.useLayoutEffect(()=>{if(Y==="opening"){de.current=!1,ge(!1);return}if(Y!=="open"||de.current)return;if(!De&&!ot){de.current=!0;return}ge(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ge(!0),de.current=!0})});return()=>cancelAnimationFrame(g)},[Y,De==null?void 0:De.url,ot==null?void 0:ot.url]),a.useEffect(()=>{if(Y!=="open")return;const g=()=>{const Ve=it=>{it.stopPropagation(),it.preventDefault(),document.removeEventListener("click",Ve,!0)};document.addEventListener("click",Ve,!0)},pe=Ve=>{const it=Ve<0?1:-1;Pe(),Ge(it),ae.current=it,J(it),qe(!0),en()},Re=Ve=>{if(Math.abs(Ve)>ag&&Ye){pe(Ve);return}ae.current=null,J(null),ce(null),Se(null),qe(!0),Z(0),gt()},Ie=Ve=>{if(Ve.touches.length!==1||z.current)return;const it=Ve.touches[0];M.current=!0,L.current={x:it.clientX,y:it.clientY},f.current="none",_.current=0,S.current=!1},Ze=Ve=>{if(!L.current||Ve.touches.length!==1||z.current)return;const it=Ve.touches[0],jt=it.clientX-L.current.x,St=it.clientY-L.current.y;if(f.current==="none"){if(Math.abs(jt)<10&&Math.abs(St)<10)return;if(Math.abs(jt)>Math.abs(St)){if(!Ye)return;f.current="horizontal"}else if(St>0){if(!et)return;f.current="vertical"}else return}if(f.current==="horizontal"){S.current=!0,Me(!0),_.current=jt,Z(jt),Ve.preventDefault();return}f.current==="vertical"&&(S.current=!0,Me(!0),I.current=St,re(St),Ve.preventDefault())},Et=()=>{if(!L.current)return;const Ve=f.current,it=S.current;if(it&&Ve==="horizontal")Re(_.current),g();else if(it&&Ve==="vertical"){const jt=I.current;if(et&&jt>rg){const St=window.innerHeight;I.current=St,ue(!0),re(St),le("closing")}else I.current=0,re(0);g()}else Ve==="horizontal"&&Math.abs(_.current)>0&&(Re(_.current),g());L.current=null,f.current="none",_.current=0,S.current=!1,Me(!1)};return document.addEventListener("touchstart",Ie,{passive:!0}),document.addEventListener("touchmove",Ze,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Ie),document.removeEventListener("touchmove",Ze),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[Y,Ye,qe,gt,Pe,et,en,Ge]);const Oe=a.useCallback(()=>{const g=($==null?void 0:$())??b??null;g&&B&&(oe(g),ie(!0)),le("closing")},[$,b,B]);a.useEffect(()=>{const g=Ie=>{if(Ie.key==="Escape"){if(s&&d||Y==="closing")return;Rt(),Oe();return}if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight"||Y!=="open"||!Ye)return;Ie.preventDefault();const Ze=Ie.key==="ArrowLeft"?-1:1;Ie.repeat&&H.current===Ze||Kt(Ze)},pe=Ie=>{if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight")return;const Ze=Ie.key==="ArrowLeft"?-1:1;H.current===Ze&&Rt()},Re=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",pe),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",pe),window.removeEventListener("blur",Re),Rt()}},[Y,s,d,Oe,Ye,Kt,Rt]),a.useEffect(()=>{Y!=="open"&&Rt()},[Y,Rt]);const Ke=()=>{Y==="closing"||l||Oe()},Ne=Y==="open",ze=Y==="closing",ut=$e>0?Math.max(0,1-$e/500):1,_e=$e>0?Math.max(.35,1-$e/500):1,Je=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!z.current)){if(ae.current!==null){Dt();return}Pe(),qe(!1)}},[Pe,qe,Dt]),tt=Y==="closing"?W??b:b,Wt=tt&&B&&(Y==="opening"||ze)?dg(tt,B):void 0,Ct=We&&q?kt(q,"center"):$e>0?`translateY(${$e}px)`:Wt,st=B?_o(B,j):null,Nt=!!(tt&&B),At=Nt&&(Y==="closing"||Y==="open"&&D),Vt={position:"absolute",top:st==null?void 0:st.top,left:st==null?void 0:st.left,width:st==null?void 0:st.width,height:st==null?void 0:st.height,objectFit:"contain",transformOrigin:"top left",transform:Ct,opacity:$e>0?_e:Nt?1:Y==="opening"||ze?0:1,transition:we&&!fe?"none":fe?`transform ${Ki}ms ${pn}`:ee?`transform ${$n}ms ${pn}, opacity ${$n}ms ${pn}`:At?`transform ${$n}ms ${pn}`:Y==="opening"||ze?`opacity ${$n}ms ${pn}`:"none",pointerEvents:je&&Ne&&!We?"auto":"none",touchAction:je&&Ne?"none":void 0,zIndex:1,overflow:je?"hidden":void 0},zt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ne&&!We?"auto":"none"},Pt=(g,pe,Re="adjacent")=>{const Ie=Tt(g);if(!Ie)return{display:"none"};const Ze=Re==="far"?pe==="left"?"far-left":"far-right":pe==="left"?"left-adjacent":"right-adjacent",{start:Et}=ke!==null?ic(Ie,Ze,ke,j):{start:Re==="far"?rr(Ie,pe,j):Ai(Ie,pe,j)},Ve=_o(Et,j),it=kt(g,Ze),jt=!We&&Re==="adjacent"&&Ne&&!te?wg(Ie,pe,j):null,St=Re==="far"&&We&&ke===(pe==="left"?-1:1),cn=we&&!fe?!1:fe,un=Re==="adjacent"&&Ne&&te&&!We;return{position:"absolute",top:Ve.top,left:Ve.left,width:Ve.width,height:Ve.height,objectFit:"contain",transform:it??(jt?`translate(${jt.x}px, ${jt.y}px)`:void 0),opacity:Re==="far"?Ne&&St?1:0:Ne?1:0,transition:cn?Re==="far"?`transform ${Ki}ms ${pn}`:`transform ${Ki}ms ${pn}, opacity ${$n}ms ${pn}`:un?`transform ${$n}ms ${pn}`:Y==="opening"||ze?`opacity ${$n}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Qt=(g,pe)=>{const Re=Tt(g);return Re?xg(Ai(Re,pe,j),pe,j):null},wt=g=>pe=>{if(!l){if(M.current){M.current=!1;return}pe.stopPropagation(),bt(g)}},Gt=De?Qt(De,"left"):null,pt=ot?Qt(ot,"right"):null,Ft=Gt?_o(Gt,j):null,Bt=pt?_o(pt,j):null;return r.jsxs("div",{ref:R,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Y==="open"?"none":void 0},onClick:Ke,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ne?ut:0,transition:we?"none":`opacity ${$n}ms ${pn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:A,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Ne?1:0,transition:we?"none":`opacity ${$n}ms ${pn}`,pointerEvents:"none"},children:r.jsx(ec,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Ke})})]}),Ne&&Mt&&r.jsx(No,{media:Mt,style:Pt(Mt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${Mt.url}`),Ne&&De&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:De,style:Pt(De,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${De.url}`),Ft&&r.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||we?"default":"pointer",pointerEvents:l||we?"none":"auto",zIndex:3},onClick:wt(-1)})]}),Ne&&ot&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:ot,style:Pt(ot,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ot.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||we?"default":"pointer",pointerEvents:l||we?"none":"auto",zIndex:3},onClick:wt(1)})]}),Ne&&_t&&r.jsx(No,{media:_t,style:Pt(_t,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${_t.url}`),B&&q&&(je?r.jsx(Tg,{src:q.url,phase:Y,onMediaElement:Jt,wrapperStyle:Vt,videoStyle:zt,onLoadedMetadata:ft,onTransitionEnd:Je},`${n}-${q.url}`):r.jsx("img",{ref:Jt,src:q.url,alt:q.name,onLoad:ft,onTransitionEnd:Je,style:Vt},`${n}-${q.url}`))]})}function Ig({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:x}=e,b=(x==null?void 0:x.display)==="cover",$=(x==null?void 0:x.ratioValue)??"1:1",h=(x==null?void 0:x.reversed)??!1,[w,C]=$.split(":").map(Number),T=`${h?C:w} / ${h?w:C}`,N=c.entryWidth??.2,E=c.columnsCount,V=y.scalingValue(N,n),L=y.scalingValue(c.horizontalGap??0,n),I=V,_=V,f={width:I,...b?{aspectRatio:T,height:"auto",overflow:"hidden"}:{height:"auto"}},S=b?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},M=a.useRef(null),[z,K]=a.useState(!1),[ae,Q]=a.useState([]),[G,H]=a.useState(0),[k,F]=a.useState(0),[X,B]=a.useState(null),[U,j]=a.useState({title1:"",title2:"",title3:""}),xe=(()=>{const ve={},Se=M.current?getComputedStyle(M.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(ve["--cntrl-article-width"]=Se),ve})(),v=!n||i||o,he=a.useMemo(()=>og(d),[d]),Y=t??[],le=Y.length%E||E,$e=le<E&&Y.length>0,re=Y.length-le,be=$e?Math.floor((E-le)/2)+1:1,Z=a.useMemo(()=>pg(Y),[Y]),fe=a.useMemo(()=>yg(Y),[Y]),ye=(ve,Se,D)=>{if(n&&!o&&!i)return;const ie=Z.findIndex(oe=>oe.gridIndex===ve);if(ie<0)return;const W=Z[ie];F(ie),Q(W.items),H(Se),j(W.entry),B(D??null),K(!0)},ke=a.useCallback(()=>{K(!1),B(null)},[]),J=a.useCallback(()=>{const ve=Z[k];return!ve||!M.current?X:ug(M.current,ve.gridIndex,b?"cover":"contain")??X},[Z,k,X,b]),Ce=a.useCallback(ve=>{if(Z.length>1){const Se=Z.length,D=(k+ve+Se)%Se,ie=Z[D],W=Math.min(G,ie.items.length-1);F(D),Q(ie.items),H(W),j(ie.entry);return}H(Se=>(Se+ve+ae.length)%ae.length)},[Z,k,G,ae.length]),ce=Z.length>1||ae.length>1;return a.useEffect(()=>{if(!z||typeof document>"u")return;const ve=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ve}},[z]),a.useEffect(()=>{!n||o||i||K(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:he}}),r.jsx(vg,{mediaList:fe}),r.jsx("div",{ref:M,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${E}, ${V})`,rowGap:0,columnGap:L,width:y.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:y.scalingValue(u??0,n)},children:Y.map((ve,Se)=>{const D=Ba(ve.gallery),ie=Da(D),W=ie.filter(Me=>Me.lightboxMedia).map(Me=>Me.lightboxMedia),oe=Math.floor(Se/E)===Math.ceil(Y.length/E)-1,te=$e&&Se>=re?`${be+(Se-re)}`:void 0,ge=ie[0],de=ge!=null&&ge.lightboxMedia?W.findIndex(Me=>Me.url===ge.lightboxMedia.url):-1,we=r.jsx("div",{className:`${d}-item-image-wrapper`,style:f,children:ie.length>0&&r.jsx(Cg,{media:ge.displayMedia,gridIndex:Se,className:`${d}-item-${Vi(ge.displayMedia)?"video":"image"}`.trim(),style:S,onMediaClick:v&&de>=0?Me=>ye(Se,de,tc(Me.currentTarget,b?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,oe?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:V,...te?{gridColumn:te}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:_}})}),r.jsx("a",{className:`${d}-item-image-link`,children:we}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:_}})})]})},Se)})}),z&&typeof document<"u"&&(()=>{const ve=(l?document.getElementById(l):null)??document.body;return gi.createPortal(r.jsx("div",{style:xe,"data-selection":"none",children:r.jsx(Lg,{prefix:d,items:ae,index:G,entry:U,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ce,lightboxEntries:Z,entryIdx:k,layoutId:s,sourceRect:X,resolveCloseSourceRect:J,onClose:ke,onPrev:()=>Ce(-1),onNext:()=>Ce(1)})}),ve)})()]})}const Rg=`import { CommonComponentProps } from '../props';
6285
+ `}const Rl={url:"",name:"",objectFit:"cover"},$n=500,Ki=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",rg=72,ag=50,lg=1e4,sg=650,cg=500;function dg(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,l=e.top-t.top;return`translate(${o}px, ${l}px) scale(${n}, ${i})`}function tc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=or(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function ug(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?tc(i,n):null}function pg(e){return e.reduce((t,n,i)=>{const o=Ba(n.gallery),s=Da(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return s.length===0||t.push({gridIndex:i,items:s,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Zi(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function El(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Zi(e,i,n)}const mg=.03;function nc(e){return e.width*mg}const Dr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function _o(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function kl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function gg(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ga(e,t,n){const i=e.getBoundingClientRect(),o=i.width,l=i.height,s=t/n,d=o/l;if(s>d){const u=o/s;return{width:o,height:u,left:i.left,top:i.top+(l-u)/2}}const c=l*s;return{width:c,height:l,left:i.left+(o-c)/2,top:i.top}}function hg(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ga(e,t.width,t.height)}function fg(e,t){if(Vi(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function yg(e){const t=new Set,n=[];for(const i of e){const o=Ba(i.gallery),l=Da(o);for(const s of l)for(const d of[s.displayMedia,s.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function vg({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Vi(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Ai(e,t,n){const{width:i,height:o,top:l}=e,{left:s,width:d}=n,c=nc(n);return t==="left"?{left:s+c-i,top:l,width:i,height:o}:{left:s+d-c,top:l,width:i,height:o}}function rr(e,t,n){const i=Ai(e,t,n);return{...i,left:2*i.left-e.left}}function xg(e,t,n){const{left:i,width:o}=n,l=nc(n);return t==="left"?{left:i,top:e.top,width:l,height:e.height}:{left:i+o-l,top:e.top,width:l,height:e.height}}function ic(e,t,n,i){const o=Ai(e,"left",i),l=Ai(e,"right",i),s=rr(e,"left",i),d=rr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:l,end:e};case"left-adjacent":return{start:o,end:s};case"far-right":return{start:d,end:l};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:l};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:l,end:d};case"far-left":return{start:s,end:o};default:return{start:e,end:e}}}function bg(e,t,n,i){const{start:o,end:l}=ic(e,t,n,i);return{x:l.left-o.left,y:l.top-o.top}}function wg(e,t,n){const i=Ai(e,t,n),o=rr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function oc(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Ba(e){if(!e)return;if(oc(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??Rl,i??o??Rl]}]}function Sg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function $g(e){const[t]=e.media;return t!=null&&t.url?t:null}function Da(e){if(!Array.isArray(e)||e.length===0)return[];if(oc(e)){const t=[];for(const n of e){const i=Sg(n);if(!i)continue;const o=$g(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Vi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Cg({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Vi(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Tg({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:l,onTransitionEnd:s}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:s,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:l,onClick:c=>c.stopPropagation(),style:o},e)})}function No({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Vi(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const l=o.currentTarget;l.videoWidth>0&&l.videoHeight>0&&(i==null||i(e.url,l.videoWidth,l.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const l=o.currentTarget;l.naturalWidth>0&&l.naturalHeight>0&&(i==null||i(e.url,l.naturalWidth,l.naturalHeight))},onTransitionEnd:n})}function Lg({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:b,resolveCloseSourceRect:T,onClose:f,onPrev:L,onNext:$}){const R=a.useRef(null),E=a.useRef(null),C=a.useRef(null),U=a.useRef(new Map),[k,j]=a.useState(0),I=a.useRef(null),w=a.useRef(0),W=a.useRef(0),h=a.useRef("none"),S=a.useRef(!1),M=a.useRef(!1),z=a.useRef(!1),K=a.useRef(null),le=a.useRef(null),Y=a.useRef(null),D=a.useRef(()=>{}),N=a.useRef(null),F=a.useRef(null),A=a.useRef(null),q=a.useRef(!1),[G,Z]=a.useState(null),[_,me]=a.useState(Dr),[v,fe]=a.useState(0),[J,de]=a.useState("opening"),[$e,oe]=a.useState(0),[xe,Q]=a.useState(0),[ye,ve]=a.useState(!1),[ke,we]=a.useState(null),[Me,X]=a.useState(null),[ue,Se]=a.useState(null),[O,ce]=a.useState(!1),[H,re]=a.useState(null),[ae,ne]=a.useState(!1),ie=a.useRef(!1),[be,Ce]=a.useState(!1),[ee,pe]=a.useState(!1),Ae=a.useRef(n),se=a.useRef(void 0),V=t[n],je=V?Vi(V):!1,We=xe!==0||ye,et=!s&&(!l||!!d),Ye=c&&!s,st=u.length>1,mt=a.useCallback((g,ge)=>t.length<=1?null:t[(g+ge+t.length)%t.length]??null,[t]),De=st?Zi(u,m,-1):mt(n,-1),ot=st?Zi(u,m,1):mt(n,1),$t=ke===-1&&We?st&&Me!==null?Zi(u,Me,-1):ue!==null?mt(ue,-1):null:null,rt=ke===1&&We?st&&Me!==null?Zi(u,Me,1):ue!==null?mt(ue,1):null:null,Ue=$t&&$t.url!==(De==null?void 0:De.url)?$t:null,ht=rt&&rt.url!==(ot==null?void 0:ot.url)?rt:null,xt=De&&Ye?(()=>{const g=st?El(u,m,-1):t.length>2?mt((n-1+t.length)%t.length,-1):null;return g&&g.url!==De.url?g:null})():null,dt=ot&&Ye?(()=>{const g=st?El(u,m,1):t.length>2?mt((n+1)%t.length,1):null;return g&&g.url!==ot.url?g:null})():null,kt=Ue??xt,_t=ht??dt,Qe=a.useCallback((g,ge,Re)=>{if(!g||!ge||!Re)return;const Ie=U.current,Ze=Ie.get(g);(Ze==null?void 0:Ze.width)===ge&&(Ze==null?void 0:Ze.height)===Re||(Ie.set(g,{width:ge,height:Re}),j(Et=>Et+1))},[]),Tt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const ge=U.current.get(g.url);return hg(E.current,ge)},[k,v]),Lt=a.useCallback(()=>{if(!V)return;const g=Tt(V);if(g){Z(g);return}const ge=E.current;ge&&Z(kl(ge))},[V,Tt]),Ge=a.useCallback(g=>{if(st){const ge=u.length;X((m+g+ge)%ge),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),X(null))},[st,u.length,m,t.length,n]),qe=a.useCallback(g=>{z.current=g,ve(g)},[]),Pe=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),gt=a.useCallback(()=>{Pe(),K.current=window.setTimeout(()=>{Pe(),qe(!1)},Ki+32)},[Pe,qe]),It=a.useCallback(()=>{const g=R.current;if(!g){me({left:0,top:0,width:typeof window<"u"?window.innerWidth:Dr.width,height:typeof window<"u"?window.innerHeight:Dr.height});return}const ge=g.getBoundingClientRect();me({left:ge.left,top:ge.top,width:ge.width,height:ge.height})},[]),Mt=a.useCallback((g,ge)=>{if(We){if(be&&!ye)return`translate(${xe}px, 0px)`;if(ye&&ke!==null){const Re=Tt(g);if(!Re)return;const{x:Ie,y:Ze}=bg(Re,ge,ke,_);return`translate(${Ie}px, ${Ze}px)`}if(ye)return"translate(0px, 0px)"}},[We,be,ye,xe,ke,_,Tt]),Dt=a.useCallback(()=>{const g=le.current;le.current=null,Pe(),qe(!1),we(null),X(null),Se(null),Q(0),Ce(!1),S.current=!1,W.current=0,h.current="none",g===-1?L():g===1&&$()},[Pe,qe,L,$]),en=a.useCallback(()=>{Pe(),K.current=window.setTimeout(()=>{le.current!==null&&Dt()},Ki+32)},[Pe,Dt]),on=a.useCallback(()=>{Pe(),le.current=null,qe(!1),we(null),X(null),Se(null),Q(0),Ce(!1),S.current=!1,W.current=0,h.current="none"},[Pe,qe]),bt=a.useCallback(g=>{if(!(!Ye||!G)){if(z.current){if(le.current===g){Y.current=g,Dt();return}on()}Pe(),Ge(g),le.current=g,we(g),qe(!0),en()}},[Ye,G,Dt,on,Pe,Ge,qe,en]);D.current=bt;const Rt=a.useCallback(()=>{N.current=null,q.current=!1,F.current!==null&&(window.clearInterval(F.current),F.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Ut=a.useCallback(g=>{F.current!==null&&window.clearInterval(F.current);const ge=q.current?cg:sg;F.current=window.setInterval(()=>{D.current(g)},ge)},[]),Kt=a.useCallback(g=>{N.current!==g&&(Rt(),N.current=g,q.current=!1,D.current(g),Ut(g),A.current=window.setTimeout(()=>{A.current=null,N.current===g&&(q.current=!0,Ut(g))},lg))},[Rt,Ut]),ft=a.useCallback(()=>{const g=E.current;if(!g)return;const ge=V==null?void 0:V.url,Re=ge?U.current.get(ge):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){Z(ga(g,Re.width,Re.height));return}const Ie=C.current;if(Ie&&ge&&(Ie.src===ge||Ie.currentSrc===ge)){const{width:Et,height:Ve}=gg(Ie);if(Et&&Ve){Qe(ge,Et,Ve),Z(ga(g,Et,Ve));return}}const Ze=kl(g);!Ze.width||!Ze.height||Z(Ze)},[V==null?void 0:V.url,Qe]),Jt=a.useCallback(g=>{if(C.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&ft();return}g.complete&&g.naturalWidth>0&&ft()}},[ft]),Te=a.useCallback(()=>{It(),ft(),fe(g=>g+1)},[It,ft]);a.useEffect(()=>{Te();const g=E.current,ge=R.current,Re=new ResizeObserver(()=>Te());return g&&Re.observe(g),ge&&Re.observe(ge),window.addEventListener("resize",Te),()=>{Re.disconnect(),window.removeEventListener("resize",Te)}},[Te,n,x]),a.useLayoutEffect(()=>{if(!V)return;const g=C.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){ft();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&ft()}},[V==null?void 0:V.url,n,ft]),a.useEffect(()=>{Lt()},[Lt,k]),a.useEffect(()=>{const g=new Set,ge=[],Re=Ie=>{!(Ie!=null&&Ie.url)||g.has(Ie.url)||(g.add(Ie.url),ge.push(Ie))};t.forEach(Re),u.forEach(Ie=>Ie.items.forEach(Re)),ge.forEach(Ie=>{U.current.has(Ie.url)||fg(Ie,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(J!=="opening"||!G)return;if(!b){de("open");return}ce(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(!0),de("open")})});return()=>cancelAnimationFrame(g)},[J,G,b]),a.useEffect(()=>{if(J!=="closing")return;const g=setTimeout(()=>f(),$n);return()=>clearTimeout(g)},[J,f]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{Ae.current===n&&se.current===(V==null?void 0:V.url)||(Pe(),le.current=null,we(null),X(null),Se(null),oe(0),Q(0),qe(!1),pe(!1),Ce(!1),w.current=0,W.current=0,h.current="none",S.current=!1,I.current=null,M.current=!1,C.current=null,Lt(),Ae.current=n,se.current=V==null?void 0:V.url)},[n,V==null?void 0:V.url,qe,Pe,Lt]),a.useLayoutEffect(()=>{const g=Y.current;g!==null&&(Y.current=null,requestAnimationFrame(()=>{D.current(g)}))},[n,m,V==null?void 0:V.url]),a.useLayoutEffect(()=>{if(J==="opening"){ie.current=!1,ne(!1);return}if(J!=="open"||ie.current)return;if(!De&&!ot){ie.current=!0;return}ne(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ne(!0),ie.current=!0})});return()=>cancelAnimationFrame(g)},[J,De==null?void 0:De.url,ot==null?void 0:ot.url]),a.useEffect(()=>{if(J!=="open")return;const g=()=>{const Ve=it=>{it.stopPropagation(),it.preventDefault(),document.removeEventListener("click",Ve,!0)};document.addEventListener("click",Ve,!0)},ge=Ve=>{const it=Ve<0?1:-1;Pe(),Ge(it),le.current=it,we(it),qe(!0),en()},Re=Ve=>{if(Math.abs(Ve)>ag&&Ye){ge(Ve);return}le.current=null,we(null),X(null),Se(null),qe(!0),Q(0),gt()},Ie=Ve=>{if(Ve.touches.length!==1||z.current)return;const it=Ve.touches[0];M.current=!0,I.current={x:it.clientX,y:it.clientY},h.current="none",W.current=0,S.current=!1},Ze=Ve=>{if(!I.current||Ve.touches.length!==1||z.current)return;const it=Ve.touches[0],jt=it.clientX-I.current.x,St=it.clientY-I.current.y;if(h.current==="none"){if(Math.abs(jt)<10&&Math.abs(St)<10)return;if(Math.abs(jt)>Math.abs(St)){if(!Ye)return;h.current="horizontal"}else if(St>0){if(!et)return;h.current="vertical"}else return}if(h.current==="horizontal"){S.current=!0,Ce(!0),W.current=jt,Q(jt),Ve.preventDefault();return}h.current==="vertical"&&(S.current=!0,Ce(!0),w.current=St,oe(St),Ve.preventDefault())},Et=()=>{if(!I.current)return;const Ve=h.current,it=S.current;if(it&&Ve==="horizontal")Re(W.current),g();else if(it&&Ve==="vertical"){const jt=w.current;if(et&&jt>rg){const St=window.innerHeight;w.current=St,pe(!0),oe(St),de("closing")}else w.current=0,oe(0);g()}else Ve==="horizontal"&&Math.abs(W.current)>0&&(Re(W.current),g());I.current=null,h.current="none",W.current=0,S.current=!1,Ce(!1)};return document.addEventListener("touchstart",Ie,{passive:!0}),document.addEventListener("touchmove",Ze,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Ie),document.removeEventListener("touchmove",Ze),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[J,Ye,qe,gt,Pe,et,en,Ge]);const Oe=a.useCallback(()=>{const g=(T==null?void 0:T())??b??null;g&&G&&(re(g),ce(!0)),de("closing")},[T,b,G]);a.useEffect(()=>{const g=Ie=>{if(Ie.key==="Escape"){if(l&&d||J==="closing")return;Rt(),Oe();return}if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight"||J!=="open"||!Ye)return;Ie.preventDefault();const Ze=Ie.key==="ArrowLeft"?-1:1;Ie.repeat&&N.current===Ze||Kt(Ze)},ge=Ie=>{if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight")return;const Ze=Ie.key==="ArrowLeft"?-1:1;N.current===Ze&&Rt()},Re=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",ge),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",ge),window.removeEventListener("blur",Re),Rt()}},[J,l,d,Oe,Ye,Kt,Rt]),a.useEffect(()=>{J!=="open"&&Rt()},[J,Rt]);const Ke=()=>{J==="closing"||s||Oe()},Ne=J==="open",ze=J==="closing",ut=$e>0?Math.max(0,1-$e/500):1,_e=$e>0?Math.max(.35,1-$e/500):1,Je=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!z.current)){if(le.current!==null){Dt();return}Pe(),qe(!1)}},[Pe,qe,Dt]),tt=J==="closing"?H??b:b,Wt=tt&&G&&(J==="opening"||ze)?dg(tt,G):void 0,Ct=We&&V?Mt(V,"center"):$e>0?`translateY(${$e}px)`:Wt,lt=G?_o(G,_):null,Nt=!!(tt&&G),At=Nt&&(J==="closing"||J==="open"&&O),Vt={position:"absolute",top:lt==null?void 0:lt.top,left:lt==null?void 0:lt.left,width:lt==null?void 0:lt.width,height:lt==null?void 0:lt.height,objectFit:"contain",transformOrigin:"top left",transform:Ct,opacity:$e>0?_e:Nt?1:J==="opening"||ze?0:1,transition:be&&!ye?"none":ye?`transform ${Ki}ms ${pn}`:ee?`transform ${$n}ms ${pn}, opacity ${$n}ms ${pn}`:At?`transform ${$n}ms ${pn}`:J==="opening"||ze?`opacity ${$n}ms ${pn}`:"none",pointerEvents:je&&Ne&&!We?"auto":"none",touchAction:je&&Ne?"none":void 0,zIndex:1,overflow:je?"hidden":void 0},zt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ne&&!We?"auto":"none"},Pt=(g,ge,Re="adjacent")=>{const Ie=Tt(g);if(!Ie)return{display:"none"};const Ze=Re==="far"?ge==="left"?"far-left":"far-right":ge==="left"?"left-adjacent":"right-adjacent",{start:Et}=ke!==null?ic(Ie,Ze,ke,_):{start:Re==="far"?rr(Ie,ge,_):Ai(Ie,ge,_)},Ve=_o(Et,_),it=Mt(g,Ze),jt=!We&&Re==="adjacent"&&Ne&&!ae?wg(Ie,ge,_):null,St=Re==="far"&&We&&ke===(ge==="left"?-1:1),cn=be&&!ye?!1:ye,un=Re==="adjacent"&&Ne&&ae&&!We;return{position:"absolute",top:Ve.top,left:Ve.left,width:Ve.width,height:Ve.height,objectFit:"contain",transform:it??(jt?`translate(${jt.x}px, ${jt.y}px)`:void 0),opacity:Re==="far"?Ne&&St?1:0:Ne?1:0,transition:cn?Re==="far"?`transform ${Ki}ms ${pn}`:`transform ${Ki}ms ${pn}, opacity ${$n}ms ${pn}`:un?`transform ${$n}ms ${pn}`:J==="opening"||ze?`opacity ${$n}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Qt=(g,ge)=>{const Re=Tt(g);return Re?xg(Ai(Re,ge,_),ge,_):null},wt=g=>ge=>{if(!s){if(M.current){M.current=!1;return}ge.stopPropagation(),bt(g)}},Gt=De?Qt(De,"left"):null,pt=ot?Qt(ot,"right"):null,Ft=Gt?_o(Gt,_):null,Bt=pt?_o(pt,_):null;return r.jsxs("div",{ref:R,className:[`${e}-lightbox`,l?`${e}-lightbox-editor`:"",s?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Ke,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ne?ut:0,transition:be?"none":`opacity ${$n}ms ${pn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:E,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Ne?1:0,transition:be?"none":`opacity ${$n}ms ${pn}`,pointerEvents:"none"},children:r.jsx(ec,{prefix:e,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,onClose:Ke})})]}),Ne&&kt&&r.jsx(No,{media:kt,style:Pt(kt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${kt.url}`),Ne&&De&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:De,style:Pt(De,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${De.url}`),Ft&&r.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:s||be?"default":"pointer",pointerEvents:s||be?"none":"auto",zIndex:3},onClick:wt(-1)})]}),Ne&&ot&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:ot,style:Pt(ot,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ot.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:s||be?"default":"pointer",pointerEvents:s||be?"none":"auto",zIndex:3},onClick:wt(1)})]}),Ne&&_t&&r.jsx(No,{media:_t,style:Pt(_t,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${_t.url}`),G&&V&&(je?r.jsx(Tg,{src:V.url,phase:J,onMediaElement:Jt,wrapperStyle:Vt,videoStyle:zt,onLoadedMetadata:ft,onTransitionEnd:Je},`${n}-${V.url}`):r.jsx("img",{ref:Jt,src:V.url,alt:V.name,onLoad:ft,onTransitionEnd:Je,style:Vt},`${n}-${V.url}`))]})}function Ig({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:l,portalId:s}){const{prefix:d}=y.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:x}=e,b=(x==null?void 0:x.display)==="cover",T=(x==null?void 0:x.ratioValue)??"1:1",f=(x==null?void 0:x.reversed)??!1,[L,$]=T.split(":").map(Number),C=`${f?$:L} / ${f?L:$}`,U=c.entryWidth??.2,k=c.columnsCount,j=y.scalingValue(U,n),I=y.scalingValue(c.horizontalGap??0,n),w=j,W=j,h={width:w,...b?{aspectRatio:C,height:"auto",overflow:"hidden"}:{height:"auto"}},S=b?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},M=a.useRef(null),[z,K]=a.useState(!1),[le,Y]=a.useState([]),[D,N]=a.useState(0),[F,A]=a.useState(0),[q,G]=a.useState(null),[Z,_]=a.useState({title1:"",title2:"",title3:""}),me=(()=>{const ue={},Se=M.current?getComputedStyle(M.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(ue["--cntrl-article-width"]=Se),ue})(),v=!n||i||o,fe=a.useMemo(()=>og(d),[d]),J=t??[],de=J.length%k||k,$e=de<k&&J.length>0,oe=J.length-de,xe=$e?Math.floor((k-de)/2)+1:1,Q=a.useMemo(()=>pg(J),[J]),ye=a.useMemo(()=>yg(J),[J]),ve=(ue,Se,O)=>{if(n&&!o&&!i)return;const ce=Q.findIndex(re=>re.gridIndex===ue);if(ce<0)return;const H=Q[ce];A(ce),Y(H.items),N(Se),_(H.entry),G(O??null),K(!0)},ke=a.useCallback(()=>{K(!1),G(null)},[]),we=a.useCallback(()=>{const ue=Q[F];return!ue||!M.current?q:ug(M.current,ue.gridIndex,b?"cover":"contain")??q},[Q,F,q,b]),Me=a.useCallback(ue=>{if(Q.length>1){const Se=Q.length,O=(F+ue+Se)%Se,ce=Q[O],H=Math.min(D,ce.items.length-1);A(O),Y(ce.items),N(H),_(ce.entry);return}N(Se=>(Se+ue+le.length)%le.length)},[Q,F,D,le.length]),X=Q.length>1||le.length>1;return a.useEffect(()=>{if(!z||typeof document>"u")return;const ue=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ue}},[z]),a.useEffect(()=>{!n||o||i||K(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:fe}}),r.jsx(vg,{mediaList:ye}),r.jsx("div",{ref:M,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${k}, ${j})`,rowGap:0,columnGap:I,width:y.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:y.scalingValue(u??0,n)},children:J.map((ue,Se)=>{const O=Ba(ue.gallery),ce=Da(O),H=ce.filter(Ce=>Ce.lightboxMedia).map(Ce=>Ce.lightboxMedia),re=Math.floor(Se/k)===Math.ceil(J.length/k)-1,ae=$e&&Se>=oe?`${xe+(Se-oe)}`:void 0,ne=ce[0],ie=ne!=null&&ne.lightboxMedia?H.findIndex(Ce=>Ce.url===ne.lightboxMedia.url):-1,be=r.jsx("div",{className:`${d}-item-image-wrapper`,style:h,children:ce.length>0&&r.jsx(Cg,{media:ne.displayMedia,gridIndex:Se,className:`${d}-item-${Vi(ne.displayMedia)?"video":"image"}`.trim(),style:S,onMediaClick:v&&ie>=0?Ce=>ve(Se,ie,tc(Ce.currentTarget,b?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,re?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:j,...ae?{gridColumn:ae}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:W}})}),r.jsx("a",{className:`${d}-item-image-link`,children:be}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:W}})})]})},Se)})}),z&&typeof document<"u"&&(()=>{const ue=(s?document.getElementById(s):null)??document.body;return gi.createPortal(r.jsx("div",{style:me,"data-selection":"none",children:r.jsx(Lg,{prefix:d,items:le,index:D,entry:Z,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:X,lightboxEntries:Q,entryIdx:F,layoutId:l,sourceRect:q,resolveCloseSourceRect:we,onClose:ke,onPrev:()=>Me(-1),onNext:()=>Me(1)})}),ue)})()]})}const Rg=`import { CommonComponentProps } from '../props';
6257
6286
  import { scalingValue, useScopedStyles } from '../utils/index';
6258
6287
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
6259
6288
  import { createPortal } from 'react-dom';
@@ -8607,7 +8636,7 @@ export function Hive({
8607
8636
  </>
8608
8637
  );
8609
8638
  }
8610
- `,Eg="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ii={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Mg(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...ii.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...ii.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...ii.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...ii.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...ii.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...ii.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...ii.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fi=Kn.filter(e=>e!=="count"),kg=Fi.reduce((e,t)=>({...e,...Mg(t)}),{}),Pg=Fi.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Arial",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Vr(e){return Fi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const Ag={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Fi.map(e=>[Oa[e],za(e)]))},Fg={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Wg=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Fg,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),_g={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Wg},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...kg},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Eg,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Pg},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Vr({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Vr({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Vr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Ag]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Ng={element:Ig,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Fi.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{...Fi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})},schema:_g,sourceCode:Rg},ks=12;function Hg(e,t="50%"){const n={position:"absolute",width:ks,height:ks,pointerEvents:"none"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function nn({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:Hg(n,i)})})}function jg(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function Og({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Gr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function zg(e){return String(e??"").trim().length>0}function Ps(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function As(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Fs(e,t,n,i,o,s,l){const d=y.scalingValue(s,l),c=y.scalingValue(0,l),u=e===0,m=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!m||i?d:c}}function Bg(e,t,n){const i=y.scalingValue(t,n),o=y.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ws=10;function Dg(e){return`
8639
+ `,Eg="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ii={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function kg(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...ii.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...ii.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...ii.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...ii.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...ii.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...ii.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...ii.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fi=Kn.filter(e=>e!=="count"),Mg=Fi.reduce((e,t)=>({...e,...kg(t)}),{}),Pg=Fi.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Arial",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Vr(e){return Fi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const Ag={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Fi.map(e=>[Oa[e],za(e)]))},Fg={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Wg=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Fg,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),_g={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Wg},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Mg},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Eg,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Pg},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Vr({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Vr({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Vr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Ag]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Ng={element:Ig,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Fi.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{...Fi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})},schema:_g,sourceCode:Rg},Ml=12;function Hg(e,t="50%"){const n={position:"absolute",width:Ml,height:Ml,pointerEvents:"none"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function nn({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:Hg(n,i)})})}function jg(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function Og({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const l=o.play();l&&l.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Gr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function zg(e){return String(e??"").trim().length>0}function Pl(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Al(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Fl(e,t,n,i,o,l,s){const d=y.scalingValue(l,s),c=y.scalingValue(0,s),u=e===0,m=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!m||i?d:c}}function Bg(e,t,n){const i=y.scalingValue(t,n),o=y.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Wl=10;function Dg(e){return`
8611
8640
  .${e}-wrapper {
8612
8641
  display: grid;
8613
8642
  align-items: start;
@@ -9038,7 +9067,7 @@ a.${e}-list-item {
9038
9067
  overflow-wrap: anywhere;
9039
9068
  word-break: break-word;
9040
9069
  }
9041
- `}const Un=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Va=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",mo=[...Va,An],Tr=["A","B","C","D","E"];function rc(e){return`${e}ColumnVerticalAlign`}const ha=["Top","Center","Bottom"];function Ga(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Tr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Vg(e){const t=Ga(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Gg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Tr.includes(n)?n:null}function ac(e,t,n){const i=Gg(e);return i?i===t?!1:Vg(n[rc(i)]):!0}function go(e){const t=Ga(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Tr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function qg(e,t,n){if(sc(e,t,n))return go(e);const i=go(e);return i.kind==="baseline"?{kind:"top"}:i}function Kg(e){const t=go(e);return t.kind==="baseline"?{kind:"top"}:t}function sc(e,t,n){return ac(e,n,t)?go(e).kind==="baseline":!1}function Ug(e){const t={};let n=!1;for(const i of Tr){const o=rc(i),s=e[o];if(e.type==="b"){const l=String(s??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}ac(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Xg(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Yg(e){const t=go(e).kind;return t==="baseline"?"center":t}function Zg(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function _s(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Jg(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function qr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=Jg(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function Qg(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function eh(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const th={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function vt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const nh={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function ih(e){return[vt(e,"textFontFamily"),vt(e,"textFontSettings"),{type:"row",items:[vt(e,"textFontSize"),vt(e,"textLineHeight"),vt(e,"textLetterSpacing"),vt(e,"textWordSpacing")]},vt(e,"textTextAlign"),vt(e,"textTextAppearance"),`${e}VerticalAlign`]}function oh(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(mo.map(e=>[nh[e],ih(e)]))}}function ar(e,t){const n=i=>{const o=vt(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===An?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ns(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return dn(Xt(n,t))}function Hs(e,t,n,i){const o=ar(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function js(e,t,n,i){const o=ar(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((s-l)/2,i)}}const yn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Wi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],_i=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ni=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],rh={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},ah=["hover","focus","filled","success","error"],Os=.004,$i=.004,Kr=$i,qa=50,ho=1440,fo=qa/ho;function lc(e){const t=typeof e=="number"&&e>0?e:ho;return qa/t}function sh(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return ho}const cc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function no(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function lh(e,t=1){const n=t/e;return Object.fromEntries(yn.map(i=>[i,n]))}function ch(){return Object.fromEntries([...Wi.map(e=>[e,0]),..._i.map(e=>[e,0])])}function dh(){return Object.fromEntries(Ni.map(e=>[e,0]))}function Ho(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:cc[t]]))}function dc(e,t,n){const i=e-fo,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function Zo(e,t,n){const i=Ka(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,l)=>s+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function uh(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Wi[o],l=_i[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=dc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function Ka(e,t,n){if(e<=0)return[];const i=yn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,m)=>u+m,0)+fo;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const m=d[u]-fo;if(m<=0)continue;const x=Math.min(c,m);d[u]-=x,c-=x}return[...d,i[e-1]]}function ph(e,t,n){if(e<=1)return{};const i=Ka(e,t,n),o={};for(let s=0;s<e-1;s+=1){const l=yn[s];i[s]!==n[l]&&(o[l]=i[s])}return o}function zs(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Un]}function mh(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function gh(e,t,n,i){const o=Math.min(i,e.length,yn.length),s={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=yn[c],m=Wi[c],x=_i[c],b=Ni[c],$=yn[l],h=Wi[l],w=_i[l],C=Ni[l],R=n[u],A=n[m],T=n[x],N=n[b];typeof R=="number"&&(s[$]=R),typeof A=="number"&&(s[h]=A),typeof T=="number"&&(s[w]=T),typeof N=="number"&&(s[C]=N)}return s}function uc(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function hh(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=no(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...lh(n,o),...ch()};if(s)for(const d of Ni)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,dh());return uc(e,l)?l:e}function fh(e,t,n){const i=Ug(e);i&&(e={...e,...i});const o=lc(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=no(e),c=no(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof s=="number"?s:typeof l=="number"?l:Un.length,x=T=>{if(u)return T;const N=Ho({...t,...T}),E=no(T),V=Zo(m,E,N),L=uh(m,V,{...t,...T});return Object.keys(L).length===0?T:{...T,...L}};if(typeof s=="number"&&s!==l)return e;const b=zs(e),$=zs(t);if(!mh(b,$))return x({...e,...gh(b,$,t,m)});if(d<c&&typeof m=="number"&&!u){const T=Ho({...t,...e});return x({...e,...ph(m,d,T)})}if(u){const T=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,N=Math.max(0,(d-o)/2);return T>N?{...e,textPaddingLR:N}:e}const h=Ho({...t,...e}),w=Zo(m,c,Ho(t)),R=Zo(m,d,h).some((T,N)=>T<(w[N]??T)),A=yn.some(T=>{const N=e[T],E=t[T];return typeof N=="number"&&typeof E=="number"&&N!==E});return R||A?x(e):e}function yh(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),s=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(fo,i-o-s-fo)}function vh(e,t){return Math.random()*(t-e)+e}function xh(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:cc[t]]))}function Ur(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function bh(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Wi[d],u=_i[d],m=Ni[d];return{key:l,textPrefix:th[l],widthKey:yn[d],width:n[yn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[m]}})}function wh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=y.useScopedStyles(),u=!!o,{columns:m,type:x,wrapperWidth:b,entriesCount:$,cellMinHeight:h,dividerWidth:w,showVisibility:C,cut:R,showCut:A,cutCellMinHeight:T,cutLabel:N,imageSize:E,imageOnHover:V,entryHoverEffect:L,entryHoverShowOption:I,rowPaddingTop:_,rowPaddingBottom:f,rowPaddingTopB:S,columnsOrder:M,textPaddingLR:z,textColor:K,backgroundColor:ae,dividerColor:Q,textHoverColor:G,backgroundHoverColor:H,dividerHoverColor:k}=e,[F,X]=a.useState(void 0),[B,U]=a.useState(null),j=V==="on"&&(!n||i),xe=(R??0)>0,v=x==="b",he=a.useRef(null),Y=a.useRef(null),[le,$e]=a.useState(null),[re,be]=a.useState(ho),Z=lc(re),fe=Math.max(0,((b??0)-Z)/2),ye=Math.min(z??0,fe),ke=Math.max(ye,$i),J=((b??0)+Z)/2;a.useLayoutEffect(()=>{if(!n){be(ho);return}const Te=()=>{be(sh(he.current))};Te();const Oe=he.current;if(!Oe)return;const Ke=new ResizeObserver(Te);Ke.observe(Oe);let Ne=Oe;for(;Ne&&!Ne.style.getPropertyValue("--cntrl-article-width");)Ne=Ne.parentElement;return Ne&&Ke.observe(Ne),()=>Ke.disconnect()},[n,l]),a.useEffect(()=>{X(void 0)},[R,A,t,$]),a.useEffect(()=>{n&&!i&&X(void 0)},[n,i]);const Ce=y.buildColorVars(c,{textColor:K,backgroundColor:ae,dividerColor:Q,textHoverColor:G,backgroundHoverColor:H,dividerHoverColor:k},rh,ah),ce=s&&s!=="default"?`${c}-state-${s}`:"",Se=`${!n||i?L==="default"?`${c}-entry-hover-default`:L==="blinds"?`${c}-entry-hover-blinds`:L==="reveal"?`${c}-entry-hover-reveal`:"":""} ${ce}`.trim(),D=L==="reveal"&&(!n||i),ie=(C==null?void 0:C[0])??!1,W=(C==null?void 0:C[1])??!1,oe=a.useRef(e),te=a.useRef(l);a.useEffect(()=>{if(!d||!n){oe.current=e,te.current=l;return}if(te.current!==l){oe.current=e,te.current=l;return}const Te=oe.current;if(!(Te!==e))return;if(typeof Te.columns=="number"&&typeof e.columns=="number"&&Te.columns!==e.columns){oe.current=e;return}const Ke=fh(e,Te,{designWidth:re});oe.current=e,uc(e,Ke)&&d(Ke)},[e,d,n,l,re]);const ge=a.useMemo(()=>xh(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),de=a.useMemo(()=>Ur(e,Wi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),we=a.useMemo(()=>Ur(e,_i),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Me=a.useMemo(()=>Ur(e,Ni),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ee=a.useMemo(()=>Array.isArray(M)&&M.length>0?M:[...Un],[M]),ue=a.useMemo(()=>bh(ee,m,ge,de,we,Me),[ee,m,ge,de,we,Me]),Ae=no(e),se=a.useMemo(()=>yn.slice(0,m).map(Te=>ge[Te]),[m,ge]),q=a.useMemo(()=>Ka(m,Ae,ge),[m,Ae,ge]),je=a.useMemo(()=>Zo(m,Ae,ge),[m,Ae,ge]),We=a.useMemo(()=>ue.map((Te,Oe)=>dc(je[Oe]??0,Te.paddingLeft,Te.paddingRight)),[ue,je]),et=a.useMemo(()=>{const Te=$===0?1/0:$;return(t??[]).slice(0,Te).map((Ke,Ne)=>({id:Ne,cells:Object.fromEntries(Un.map(ze=>[ze,Ke[ze]??""])),image:Ke.image,link:Ke.link}))},[t,$]),Ye=xe?F??R:et.length,lt=a.useMemo(()=>xe?et.slice(0,Ye):et,[et,xe,Ye]),mt=xe&&Ye<et.length,De=lt.length>1||mt,ot=[ie?`${c}-divider-top`:"",W||De?`${c}-divider-bottom`:""].filter(Boolean).join(" "),$t=!n||i,rt=()=>{if(!$t)return;const Te=F??R;if(!A){X(et.length);return}X(Math.min(Te+A,et.length))},Ue=Te=>y.scalingValue(Te,n??!1),ht=v?S??0:_??0,xt=f??0,dt=h??0,Mt=ht+dt/2,_t=Math.max(xt,Kr),Qe=Fs(0,lt.length,ie,W,mt,w??0,n??!1).borderTopWidth,Tt=le!=null?`${le}px`:`calc(${Qe} + ${Ue(Mt)})`,Lt=v?"rowPaddingTopB":"rowPaddingTop",Ge=ue[0],qe=ue[ue.length-1],Pe=We[0],gt=We[We.length-1],It=Ge&&Pe?Math.max(Pe.paddingLeft,$i):0,kt=qe&&gt?Math.max(gt.paddingRight,$i):0,Dt=Ae,en=Te=>{const Oe=he.current;if(!Oe)return{x:0,y:0};const Ke=Oe.getBoundingClientRect();return{x:Te.clientX-Ke.left+Ws,y:Te.clientY-Ke.top+Ws}},on=(Te,Oe)=>{if(!j)return;const Ke=Te.image;if(!(Ke!=null&&Ke.url)){U(null);return}const{x:Ne,y:ze}=en(Oe),ut=(E==null?void 0:E.min)??80,_e=(E==null?void 0:E.max)??320,Je=(B==null?void 0:B.rowId)===Te.id?B.widthPx:vh(ut,_e);U({rowId:Te.id,url:Ke.url,objectFit:"contain",isVideo:jg(Ke),widthPx:Je,x:Ne,y:ze})},bt=Te=>{if(!j||!B)return;const{x:Oe,y:Ke}=en(Te);U(Ne=>!Ne||Ne.x===Oe&&Ne.y===Ke?Ne:{...Ne,x:Oe,y:Ke})},Rt=()=>{U(null)},Ut=Te=>{D&&Ps(Te,c),j&&U(null)},Kt=Te=>{D&&As(Te,c)};a.useLayoutEffect(()=>{if(!u||v){$e(null);return}const Te=Y.current,Oe=Te==null?void 0:Te.parentElement;if(!Te||!Oe){$e(null);return}const Ke=()=>{const ze=Te.querySelector("[data-list-row]");if(!ze){$e(null);return}const ut=Oe.getBoundingClientRect(),_e=ze.getBoundingClientRect();$e(_e.top-ut.top+_e.height/2)};Ke();const Ne=new ResizeObserver(Ke);return Ne.observe(Te),Ne.observe(Oe),()=>Ne.disconnect()},[u,v,lt,ht,xt,dt,t,e,ue,je,re,w,ie,W,mt]);const ft=a.useMemo(()=>!v&&Va.some(Te=>{const Oe=Te.charAt(0),Ke=e[`${Te}VerticalAlign`];return sc(Ke,e,Oe)}),[v,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Je;const Te=he.current;if(!Te)return;const Oe=()=>{Te.querySelectorAll("[data-list-col]").forEach(tt=>{tt.style.transform="";const Wt=tt.querySelector(`.${c}-list-col`);Wt&&(Wt.style.minHeight="",Wt.style.height="");const Ct=tt.querySelector(`.${c}-list-col-title`);Ct&&(Ct.style.transform="")})};if(v||!ft){Oe();return}const Ke=()=>{const tt=Array.from(Te.querySelectorAll("[data-list-row]")),Wt=`${c}-list-col`,Ct=`${c}-baseline-probe`;tt.forEach(st=>{st.querySelectorAll("[data-list-col]").forEach(Nt=>{Nt.style.transform="";const At=Nt.querySelector(`.${Wt}`);At&&(At.style.minHeight="",At.style.height="");const Vt=Nt.querySelector(`.${c}-list-col-title`);Vt&&(Vt.style.transform="")})}),tt.forEach(st=>{const Nt=Array.from(st.querySelectorAll("[data-list-col]"));Qg(st,Nt,Wt)}),Te.offsetHeight,tt.forEach(st=>{const Nt=Array.from(st.querySelectorAll("[data-list-col]")),At=st.getBoundingClientRect().top,Vt=new Map,zt=Nt.map(wt=>{const Gt=wt.querySelector(`.${c}-list-col-title`),pt={el:wt,titleEl:Gt,letter:wt.getAttribute("data-col-letter")??"",kind:wt.getAttribute("data-valign")??"top",anchor:wt.getAttribute("data-valign-anchor")};return Vt.set(pt.letter,pt),pt}),Pt=new Map,Qt=(wt,Gt)=>{const pt=Pt.get(wt.letter);if(pt!==void 0)return pt;const Ft=wt.anchor?Vt.get(wt.anchor):void 0;if(wt.kind!=="baseline"||!Ft||Gt.has(wt.letter)){const Ie=qr(wt,At,Wt,Ct);return Pt.set(wt.letter,Ie),Ie}Gt.add(wt.letter);const Bt=Qt(Ft,Gt);Gt.delete(wt.letter);const g=qr(wt,At,Wt,Ct),pe=Bt-g;eh(wt.titleEl,pe);const Re=qr(wt,At,Wt,Ct);return Pt.set(wt.letter,Re),Re};zt.forEach(wt=>Qt(wt,new Set))})};let Ne=null;const ze=()=>{Ne===null&&(Ne=requestAnimationFrame(()=>{Ne=null,Ke()}))};Ke();const ut=new ResizeObserver(()=>ze());ut.observe(Te);let _e=!1;return typeof document<"u"&&((Je=document.fonts)!=null&&Je.ready)&&document.fonts.ready.then(()=>{_e||ze()}),()=>{_e=!0,Ne!==null&&(cancelAnimationFrame(Ne),Ne=null),ut.disconnect(),Oe()}},[ft,v,e,t,re,lt,je]);const Jt=a.useMemo(()=>Dg(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Jt}}),r.jsx("div",{style:Ce,children:r.jsxs("div",{ref:he,className:`${c}-wrapper ${Se}${ot?` ${ot}`:""}${v?` ${c}-type-b`:""}`.trim(),style:{width:y.scalingValue(b??0,n),...!v&&u?{[`--${c}-first-entry-handle-top`]:Tt}:{}},onMouseMove:j?bt:void 0,onMouseLeave:j?Rt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[lt.map((Te,Oe)=>{var ut;const Ke=(((ut=Te.link)==null?void 0:ut.length)??0)>0,Ne=Ke&&(!n||i)?"a":"div",ze=Fs(Oe,lt.length,ie,W,mt,w??0,n??!1);return r.jsxs(Ne,{ref:Oe===0?_e=>{Y.current=_e}:void 0,className:`${c}-list-item${Ke||I==="always"?` ${c}-list-item-has-link`:""}`,...Ke?{href:Te.link,target:"_blank"}:{},style:ze,onMouseEnter:_e=>{D&&(Ke||I==="always")&&Ps(_e,c),j&&on(Te,_e)},onMouseLeave:_e=>{D&&(Ke||I==="always")&&As(_e,c)},children:[ht>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(ht)}}),r.jsxs("div",{className:`${c}-list-cols-row${v?"":` ${c}-list-cols-row-h`}${u&&Oe===0&&v?` ${c}-list-cols-row-controls`:""}`,...v?{}:{"data-list-row":""},style:v?void 0:{minHeight:Ue(dt)},children:[ue.map((_e,Je)=>{const tt=Je===ue.length-1,Wt=We[Je],Ct=_e.paddingBottom,st=zg(Te.cells[_e.key]),Nt=v&&st&&Ct>0,At=v?{minHeight:Ue(dt)}:{width:Ue(je[Je])},Vt=v?{paddingLeft:Ue(ye),paddingRight:Ue(ye)}:{paddingLeft:Ue(Wt.paddingLeft),paddingRight:Ue(Wt.paddingRight)},zt=_e.textPrefix.charAt(0),Pt=v?Kg(e[`${_e.textPrefix}VerticalAlign`]):qg(e[`${_e.textPrefix}VerticalAlign`],e,zt),Qt=v&&st&&u&&Oe===0;return v&&!st?null:r.jsxs("div",{className:v?`${c}-list-col-wrap`:void 0,...v?{}:{"data-list-col":"","data-col-letter":zt,"data-valign":Pt.kind,...Pt.kind==="baseline"?{"data-valign-anchor":Pt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${tt?` ${c}-list-col-last`:""}`,style:{...Vt,...At,...v?{justifyContent:_s(Pt.kind)}:{}},"data-test":_e.width,children:r.jsx("span",{className:Hs(e,_e.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Ns(ar(e,_e.textPrefix),n),...js(e,_e.textPrefix,c,n),...v?{}:Xg(Pt.kind)},children:Te.cells[_e.key]??null})}),Nt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(Ct)}}),Qt&&r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":_e.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ue(Math.max(Ct,Kr))}})]},_e.key)}),u&&Oe===0&&v&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(J),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ue(ke),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(J),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ue(Math.max(ke,Ae-ke)),width:Ue(ke),height:"100%"}})]})]}),!v&&xt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(xt)}}),u&&Oe===0&&!v&&r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ue(_t)}})]},Te.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Lt,"data-controls-static-handle":"",...v?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:v?"center":"left-y",areaStyle:{position:"absolute",top:Qe,left:0,width:"100%",height:Ue(Math.max(ht,Kr))}})},"row-padding-handles"),u&&!v&&Ge&&qe&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ge.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[0]-((Pe==null?void 0:Pe.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Ue(It),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":qe.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[ue.length-1]-((gt==null?void 0:gt.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(Dt-kt),width:Ue(kt),height:"100%"}})]},"column-edge-padding-handles"),u&&!v&&ue.slice(0,-1).map((Te,Oe)=>{const Ke=ue[Oe+1],Ne=q.slice(0,Oe+1).reduce((tt,Wt)=>tt+Wt,0),ze=We[Oe],ut=We[Oe+1],_e=Math.max(ze.paddingRight,$i),Je=Math.max(ut.paddingLeft,$i);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Te.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[Oe]-ze.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(Ne-_e),width:Ue(_e),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ke.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[Oe+1]-ut.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(Ne),width:Ue(Je),height:"100%"}})]},`${Te.paddingRightKey}-padding`)}),u&&!v&&ue.slice(0,-1).map((Te,Oe)=>{const Ke=yh(Oe,q,se,Ae),ze=q.slice(0,Oe+1).reduce((ut,_e)=>ut+_e,0)-Os/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Te.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(qa),"data-controls-max-fraction":String(Ke),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ue(ze),width:Ue(Os),height:"calc(100%)",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)})]}),mt&&(()=>{const Te=ar(e,An),Oe=Yg(e.cutLabelVerticalAlign),Ke=Te.textTextAlign==="justify"||v;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ue(T??0),cursor:$t?"pointer":"default",...Bg(W,w??0,n??!1)},onClick:$t?rt:void 0,onMouseEnter:D||j?Ut:void 0,onMouseLeave:D?Kt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...v?{paddingLeft:Ue(ye),paddingRight:Ue(ye)}:{},justifyContent:Zg(Te.textTextAlign),alignItems:_s(Oe)},children:r.jsx("span",{className:Hs(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Ns(Te,n),...js(e,An,c,n),...Ke?{width:"100%"}:{}},children:N})})})})(),j&&B&&(()=>{const Te=`${B.widthPx}px`,Oe={width:Te,height:"auto",maxHeight:Te,objectFit:"contain",left:B.x,top:B.y,position:"absolute"};return r.jsx(Og,{media:B,className:B.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Oe},`${B.rowId}-${B.url}`)})()]})})]})}const Sh=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
9070
+ `}const Un=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Va=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",mo=[...Va,An],Tr=["A","B","C","D","E"];function rc(e){return`${e}ColumnVerticalAlign`}const ha=["Top","Center","Bottom"];function Ga(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Tr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Vg(e){const t=Ga(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Gg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Tr.includes(n)?n:null}function ac(e,t,n){const i=Gg(e);return i?i===t?!1:Vg(n[rc(i)]):!0}function go(e){const t=Ga(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Tr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function qg(e,t,n){if(lc(e,t,n))return go(e);const i=go(e);return i.kind==="baseline"?{kind:"top"}:i}function Kg(e){const t=go(e);return t.kind==="baseline"?{kind:"top"}:t}function lc(e,t,n){return ac(e,n,t)?go(e).kind==="baseline":!1}function Ug(e){const t={};let n=!1;for(const i of Tr){const o=rc(i),l=e[o];if(e.type==="b"){const s=String(l??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[o]="Top",n=!0);continue}ac(l,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Xg(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Yg(e){const t=go(e).kind;return t==="baseline"?"center":t}function Zg(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function _l(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Jg(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),l=o-i;return n.remove(),l}function qr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const s=Jg(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+s;const d=l.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+s}function Qg(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${i}px`,l.style.height=`${i}px`)}),i)}function eh(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const th={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function vt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const nh={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function ih(e){return[vt(e,"textFontFamily"),vt(e,"textFontSettings"),{type:"row",items:[vt(e,"textFontSize"),vt(e,"textLineHeight"),vt(e,"textLetterSpacing"),vt(e,"textWordSpacing")]},vt(e,"textTextAlign"),vt(e,"textTextAppearance"),`${e}VerticalAlign`]}function oh(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(mo.map(e=>[nh[e],ih(e)]))}}function ar(e,t){const n=i=>{const o=vt(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===An?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Nl(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return dn(Xt(n,t))}function Hl(e,t,n,i){const o=ar(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s!==void 0&&s<l?`${n} ${i}`:n}function jl(e,t,n,i){const o=ar(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s===void 0||s>=l?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((l-s)/2,i)}}const yn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Wi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],_i=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ni=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],rh={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},ah=["hover","focus","filled","success","error"],Ol=.004,$i=.004,Kr=$i,qa=50,ho=1440,fo=qa/ho;function sc(e){const t=typeof e=="number"&&e>0?e:ho;return qa/t}function lh(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return ho}const cc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function no(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function sh(e,t=1){const n=t/e;return Object.fromEntries(yn.map(i=>[i,n]))}function ch(){return Object.fromEntries([...Wi.map(e=>[e,0]),..._i.map(e=>[e,0])])}function dh(){return Object.fromEntries(Ni.map(e=>[e,0]))}function Ho(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:cc[t]]))}function dc(e,t,n){const i=e-fo,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const l=i/o;return{paddingLeft:t*l,paddingRight:n*l}}function Zo(e,t,n){const i=Ka(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((l,s)=>l+s,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function uh(e,t,n){const i={};for(let o=0;o<e;o+=1){const l=Wi[o],s=_i[o],d=typeof n[l]=="number"?n[l]:0,c=typeof n[s]=="number"?n[s]:0,u=dc(t[o]??0,d,c);u.paddingLeft!==d&&(i[l]=u.paddingLeft),u.paddingRight!==c&&(i[s]=u.paddingRight)}return i}function Ka(e,t,n){if(e<=0)return[];const i=yn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),s=o.reduce((u,m)=>u+m,0)+fo;if(t>=s)return i;const d=[...o];let c=s-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const m=d[u]-fo;if(m<=0)continue;const x=Math.min(c,m);d[u]-=x,c-=x}return[...d,i[e-1]]}function ph(e,t,n){if(e<=1)return{};const i=Ka(e,t,n),o={};for(let l=0;l<e-1;l+=1){const s=yn[l];i[l]!==n[s]&&(o[s]=i[l])}return o}function zl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Un]}function mh(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function gh(e,t,n,i){const o=Math.min(i,e.length,yn.length),l={};for(let s=0;s<o;s+=1){const d=e[s],c=t.indexOf(d);if(c===-1)continue;const u=yn[c],m=Wi[c],x=_i[c],b=Ni[c],T=yn[s],f=Wi[s],L=_i[s],$=Ni[s],R=n[u],E=n[m],C=n[x],U=n[b];typeof R=="number"&&(l[T]=R),typeof E=="number"&&(l[f]=E),typeof C=="number"&&(l[L]=C),typeof U=="number"&&(l[$]=U)}return l}function uc(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function hh(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=no(e),l=e.type==="b"||e.type===void 0&&t.type==="b",s={...e,...sh(n,o),...ch()};if(l)for(const d of Ni)typeof t[d]=="number"&&(s[d]=t[d]);else Object.assign(s,dh());return uc(e,s)?s:e}function fh(e,t,n){const i=Ug(e);i&&(e={...e,...i});const o=sc(n==null?void 0:n.designWidth),l=e.columns,s=t.columns,d=no(e),c=no(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof l=="number"?l:typeof s=="number"?s:Un.length,x=C=>{if(u)return C;const U=Ho({...t,...C}),k=no(C),j=Zo(m,k,U),I=uh(m,j,{...t,...C});return Object.keys(I).length===0?C:{...C,...I}};if(typeof l=="number"&&l!==s)return e;const b=zl(e),T=zl(t);if(!mh(b,T))return x({...e,...gh(b,T,t,m)});if(d<c&&typeof m=="number"&&!u){const C=Ho({...t,...e});return x({...e,...ph(m,d,C)})}if(u){const C=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,U=Math.max(0,(d-o)/2);return C>U?{...e,textPaddingLR:U}:e}const f=Ho({...t,...e}),L=Zo(m,c,Ho(t)),R=Zo(m,d,f).some((C,U)=>C<(L[U]??C)),E=yn.some(C=>{const U=e[C],k=t[C];return typeof U=="number"&&typeof k=="number"&&U!==k});return R||E?x(e):e}function yh(e,t,n,i){const o=t.slice(0,e).reduce((s,d)=>s+d,0),l=n.slice(e+1,t.length-1).reduce((s,d)=>s+d,0);return Math.max(fo,i-o-l-fo)}function vh(e,t){return Math.random()*(t-e)+e}function xh(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:cc[t]]))}function Ur(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function bh(e,t,n,i,o,l){return e.slice(0,t).map((s,d)=>{const c=Wi[d],u=_i[d],m=Ni[d];return{key:s,textPrefix:th[s],widthKey:yn[d],width:n[yn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:l[m]}})}function wh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l,layoutId:s,onUpdateSettings:d}){const{prefix:c}=y.useScopedStyles(),u=!!o,{columns:m,type:x,wrapperWidth:b,entriesCount:T,cellMinHeight:f,dividerWidth:L,showVisibility:$,cut:R,showCut:E,cutCellMinHeight:C,cutLabel:U,imageSize:k,imageOnHover:j,entryHoverEffect:I,entryHoverShowOption:w,rowPaddingTop:W,rowPaddingBottom:h,rowPaddingTopB:S,columnsOrder:M,textPaddingLR:z,textColor:K,backgroundColor:le,dividerColor:Y,textHoverColor:D,backgroundHoverColor:N,dividerHoverColor:F}=e,[A,q]=a.useState(void 0),[G,Z]=a.useState(null),_=j==="on"&&(!n||i),me=(R??0)>0,v=x==="b",fe=a.useRef(null),J=a.useRef(null),[de,$e]=a.useState(null),[oe,xe]=a.useState(ho),Q=sc(oe),ye=Math.max(0,((b??0)-Q)/2),ve=Math.min(z??0,ye),ke=Math.max(ve,$i),we=((b??0)+Q)/2;a.useLayoutEffect(()=>{if(!n){xe(ho);return}const Te=()=>{xe(lh(fe.current))};Te();const Oe=fe.current;if(!Oe)return;const Ke=new ResizeObserver(Te);Ke.observe(Oe);let Ne=Oe;for(;Ne&&!Ne.style.getPropertyValue("--cntrl-article-width");)Ne=Ne.parentElement;return Ne&&Ke.observe(Ne),()=>Ke.disconnect()},[n,s]),a.useEffect(()=>{q(void 0)},[R,E,t,T]),a.useEffect(()=>{n&&!i&&q(void 0)},[n,i]);const Me=y.buildColorVars(c,{textColor:K,backgroundColor:le,dividerColor:Y,textHoverColor:D,backgroundHoverColor:N,dividerHoverColor:F},rh,ah),X=l&&l!=="default"?`${c}-state-${l}`:"",Se=`${!n||i?I==="default"?`${c}-entry-hover-default`:I==="blinds"?`${c}-entry-hover-blinds`:I==="reveal"?`${c}-entry-hover-reveal`:"":""} ${X}`.trim(),O=I==="reveal"&&(!n||i),ce=($==null?void 0:$[0])??!1,H=($==null?void 0:$[1])??!1,re=a.useRef(e),ae=a.useRef(s);a.useEffect(()=>{if(!d||!n){re.current=e,ae.current=s;return}if(ae.current!==s){re.current=e,ae.current=s;return}const Te=re.current;if(!(Te!==e))return;if(typeof Te.columns=="number"&&typeof e.columns=="number"&&Te.columns!==e.columns){re.current=e;return}const Ke=fh(e,Te,{designWidth:oe});re.current=e,uc(e,Ke)&&d(Ke)},[e,d,n,s,oe]);const ne=a.useMemo(()=>xh(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ie=a.useMemo(()=>Ur(e,Wi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),be=a.useMemo(()=>Ur(e,_i),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ce=a.useMemo(()=>Ur(e,Ni),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ee=a.useMemo(()=>Array.isArray(M)&&M.length>0?M:[...Un],[M]),pe=a.useMemo(()=>bh(ee,m,ne,ie,be,Ce),[ee,m,ne,ie,be,Ce]),Ae=no(e),se=a.useMemo(()=>yn.slice(0,m).map(Te=>ne[Te]),[m,ne]),V=a.useMemo(()=>Ka(m,Ae,ne),[m,Ae,ne]),je=a.useMemo(()=>Zo(m,Ae,ne),[m,Ae,ne]),We=a.useMemo(()=>pe.map((Te,Oe)=>dc(je[Oe]??0,Te.paddingLeft,Te.paddingRight)),[pe,je]),et=a.useMemo(()=>{const Te=T===0?1/0:T;return(t??[]).slice(0,Te).map((Ke,Ne)=>({id:Ne,cells:Object.fromEntries(Un.map(ze=>[ze,Ke[ze]??""])),image:Ke.image,link:Ke.link}))},[t,T]),Ye=me?A??R:et.length,st=a.useMemo(()=>me?et.slice(0,Ye):et,[et,me,Ye]),mt=me&&Ye<et.length,De=st.length>1||mt,ot=[ce?`${c}-divider-top`:"",H||De?`${c}-divider-bottom`:""].filter(Boolean).join(" "),$t=!n||i,rt=()=>{if(!$t)return;const Te=A??R;if(!E){q(et.length);return}q(Math.min(Te+E,et.length))},Ue=Te=>y.scalingValue(Te,n??!1),ht=v?S??0:W??0,xt=h??0,dt=f??0,kt=ht+dt/2,_t=Math.max(xt,Kr),Qe=Fl(0,st.length,ce,H,mt,L??0,n??!1).borderTopWidth,Tt=de!=null?`${de}px`:`calc(${Qe} + ${Ue(kt)})`,Lt=v?"rowPaddingTopB":"rowPaddingTop",Ge=pe[0],qe=pe[pe.length-1],Pe=We[0],gt=We[We.length-1],It=Ge&&Pe?Math.max(Pe.paddingLeft,$i):0,Mt=qe&&gt?Math.max(gt.paddingRight,$i):0,Dt=Ae,en=Te=>{const Oe=fe.current;if(!Oe)return{x:0,y:0};const Ke=Oe.getBoundingClientRect();return{x:Te.clientX-Ke.left+Wl,y:Te.clientY-Ke.top+Wl}},on=(Te,Oe)=>{if(!_)return;const Ke=Te.image;if(!(Ke!=null&&Ke.url)){Z(null);return}const{x:Ne,y:ze}=en(Oe),ut=(k==null?void 0:k.min)??80,_e=(k==null?void 0:k.max)??320,Je=(G==null?void 0:G.rowId)===Te.id?G.widthPx:vh(ut,_e);Z({rowId:Te.id,url:Ke.url,objectFit:"contain",isVideo:jg(Ke),widthPx:Je,x:Ne,y:ze})},bt=Te=>{if(!_||!G)return;const{x:Oe,y:Ke}=en(Te);Z(Ne=>!Ne||Ne.x===Oe&&Ne.y===Ke?Ne:{...Ne,x:Oe,y:Ke})},Rt=()=>{Z(null)},Ut=Te=>{O&&Pl(Te,c),_&&Z(null)},Kt=Te=>{O&&Al(Te,c)};a.useLayoutEffect(()=>{if(!u||v){$e(null);return}const Te=J.current,Oe=Te==null?void 0:Te.parentElement;if(!Te||!Oe){$e(null);return}const Ke=()=>{const ze=Te.querySelector("[data-list-row]");if(!ze){$e(null);return}const ut=Oe.getBoundingClientRect(),_e=ze.getBoundingClientRect();$e(_e.top-ut.top+_e.height/2)};Ke();const Ne=new ResizeObserver(Ke);return Ne.observe(Te),Ne.observe(Oe),()=>Ne.disconnect()},[u,v,st,ht,xt,dt,t,e,pe,je,oe,L,ce,H,mt]);const ft=a.useMemo(()=>!v&&Va.some(Te=>{const Oe=Te.charAt(0),Ke=e[`${Te}VerticalAlign`];return lc(Ke,e,Oe)}),[v,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Je;const Te=fe.current;if(!Te)return;const Oe=()=>{Te.querySelectorAll("[data-list-col]").forEach(tt=>{tt.style.transform="";const Wt=tt.querySelector(`.${c}-list-col`);Wt&&(Wt.style.minHeight="",Wt.style.height="");const Ct=tt.querySelector(`.${c}-list-col-title`);Ct&&(Ct.style.transform="")})};if(v||!ft){Oe();return}const Ke=()=>{const tt=Array.from(Te.querySelectorAll("[data-list-row]")),Wt=`${c}-list-col`,Ct=`${c}-baseline-probe`;tt.forEach(lt=>{lt.querySelectorAll("[data-list-col]").forEach(Nt=>{Nt.style.transform="";const At=Nt.querySelector(`.${Wt}`);At&&(At.style.minHeight="",At.style.height="");const Vt=Nt.querySelector(`.${c}-list-col-title`);Vt&&(Vt.style.transform="")})}),tt.forEach(lt=>{const Nt=Array.from(lt.querySelectorAll("[data-list-col]"));Qg(lt,Nt,Wt)}),Te.offsetHeight,tt.forEach(lt=>{const Nt=Array.from(lt.querySelectorAll("[data-list-col]")),At=lt.getBoundingClientRect().top,Vt=new Map,zt=Nt.map(wt=>{const Gt=wt.querySelector(`.${c}-list-col-title`),pt={el:wt,titleEl:Gt,letter:wt.getAttribute("data-col-letter")??"",kind:wt.getAttribute("data-valign")??"top",anchor:wt.getAttribute("data-valign-anchor")};return Vt.set(pt.letter,pt),pt}),Pt=new Map,Qt=(wt,Gt)=>{const pt=Pt.get(wt.letter);if(pt!==void 0)return pt;const Ft=wt.anchor?Vt.get(wt.anchor):void 0;if(wt.kind!=="baseline"||!Ft||Gt.has(wt.letter)){const Ie=qr(wt,At,Wt,Ct);return Pt.set(wt.letter,Ie),Ie}Gt.add(wt.letter);const Bt=Qt(Ft,Gt);Gt.delete(wt.letter);const g=qr(wt,At,Wt,Ct),ge=Bt-g;eh(wt.titleEl,ge);const Re=qr(wt,At,Wt,Ct);return Pt.set(wt.letter,Re),Re};zt.forEach(wt=>Qt(wt,new Set))})};let Ne=null;const ze=()=>{Ne===null&&(Ne=requestAnimationFrame(()=>{Ne=null,Ke()}))};Ke();const ut=new ResizeObserver(()=>ze());ut.observe(Te);let _e=!1;return typeof document<"u"&&((Je=document.fonts)!=null&&Je.ready)&&document.fonts.ready.then(()=>{_e||ze()}),()=>{_e=!0,Ne!==null&&(cancelAnimationFrame(Ne),Ne=null),ut.disconnect(),Oe()}},[ft,v,e,t,oe,st,je]);const Jt=a.useMemo(()=>Dg(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Jt}}),r.jsx("div",{style:Me,children:r.jsxs("div",{ref:fe,className:`${c}-wrapper ${Se}${ot?` ${ot}`:""}${v?` ${c}-type-b`:""}`.trim(),style:{width:y.scalingValue(b??0,n),...!v&&u?{[`--${c}-first-entry-handle-top`]:Tt}:{}},onMouseMove:_?bt:void 0,onMouseLeave:_?Rt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[st.map((Te,Oe)=>{var ut;const Ke=(((ut=Te.link)==null?void 0:ut.length)??0)>0,Ne=Ke&&(!n||i)?"a":"div",ze=Fl(Oe,st.length,ce,H,mt,L??0,n??!1);return r.jsxs(Ne,{ref:Oe===0?_e=>{J.current=_e}:void 0,className:`${c}-list-item${Ke||w==="always"?` ${c}-list-item-has-link`:""}`,...Ke?{href:Te.link,target:"_blank"}:{},style:ze,onMouseEnter:_e=>{O&&(Ke||w==="always")&&Pl(_e,c),_&&on(Te,_e)},onMouseLeave:_e=>{O&&(Ke||w==="always")&&Al(_e,c)},children:[ht>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(ht)}}),r.jsxs("div",{className:`${c}-list-cols-row${v?"":` ${c}-list-cols-row-h`}${u&&Oe===0&&v?` ${c}-list-cols-row-controls`:""}`,...v?{}:{"data-list-row":""},style:v?void 0:{minHeight:Ue(dt)},children:[pe.map((_e,Je)=>{const tt=Je===pe.length-1,Wt=We[Je],Ct=_e.paddingBottom,lt=zg(Te.cells[_e.key]),Nt=v&&lt&&Ct>0,At=v?{minHeight:Ue(dt)}:{width:Ue(je[Je])},Vt=v?{paddingLeft:Ue(ve),paddingRight:Ue(ve)}:{paddingLeft:Ue(Wt.paddingLeft),paddingRight:Ue(Wt.paddingRight)},zt=_e.textPrefix.charAt(0),Pt=v?Kg(e[`${_e.textPrefix}VerticalAlign`]):qg(e[`${_e.textPrefix}VerticalAlign`],e,zt),Qt=v&&lt&&u&&Oe===0;return v&&!lt?null:r.jsxs("div",{className:v?`${c}-list-col-wrap`:void 0,...v?{}:{"data-list-col":"","data-col-letter":zt,"data-valign":Pt.kind,...Pt.kind==="baseline"?{"data-valign-anchor":Pt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${tt?` ${c}-list-col-last`:""}`,style:{...Vt,...At,...v?{justifyContent:_l(Pt.kind)}:{}},"data-test":_e.width,children:r.jsx("span",{className:Hl(e,_e.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Nl(ar(e,_e.textPrefix),n),...jl(e,_e.textPrefix,c,n),...v?{}:Xg(Pt.kind)},children:Te.cells[_e.key]??null})}),Nt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(Ct)}}),Qt&&r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":_e.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ue(Math.max(Ct,Kr))}})]},_e.key)}),u&&Oe===0&&v&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(we),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ue(ke),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(we),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ue(Math.max(ke,Ae-ke)),width:Ue(ke),height:"100%"}})]})]}),!v&&xt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(xt)}}),u&&Oe===0&&!v&&r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ue(_t)}})]},Te.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Lt,"data-controls-static-handle":"",...v?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:v?"center":"left-y",areaStyle:{position:"absolute",top:Qe,left:0,width:"100%",height:Ue(Math.max(ht,Kr))}})},"row-padding-handles"),u&&!v&&Ge&&qe&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ge.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[0]-((Pe==null?void 0:Pe.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Ue(It),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":qe.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[pe.length-1]-((gt==null?void 0:gt.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(Dt-Mt),width:Ue(Mt),height:"100%"}})]},"column-edge-padding-handles"),u&&!v&&pe.slice(0,-1).map((Te,Oe)=>{const Ke=pe[Oe+1],Ne=V.slice(0,Oe+1).reduce((tt,Wt)=>tt+Wt,0),ze=We[Oe],ut=We[Oe+1],_e=Math.max(ze.paddingRight,$i),Je=Math.max(ut.paddingLeft,$i);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Te.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[Oe]-ze.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(Ne-_e),width:Ue(_e),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ke.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[Oe+1]-ut.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(Ne),width:Ue(Je),height:"100%"}})]},`${Te.paddingRightKey}-padding`)}),u&&!v&&pe.slice(0,-1).map((Te,Oe)=>{const Ke=yh(Oe,V,se,Ae),ze=V.slice(0,Oe+1).reduce((ut,_e)=>ut+_e,0)-Ol/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Te.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(qa),"data-controls-max-fraction":String(Ke),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ue(ze),width:Ue(Ol),height:"calc(100%)",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)})]}),mt&&(()=>{const Te=ar(e,An),Oe=Yg(e.cutLabelVerticalAlign),Ke=Te.textTextAlign==="justify"||v;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ue(C??0),cursor:$t?"pointer":"default",...Bg(H,L??0,n??!1)},onClick:$t?rt:void 0,onMouseEnter:O||_?Ut:void 0,onMouseLeave:O?Kt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...v?{paddingLeft:Ue(ve),paddingRight:Ue(ve)}:{},justifyContent:Zg(Te.textTextAlign),alignItems:_l(Oe)},children:r.jsx("span",{className:Hl(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Nl(Te,n),...jl(e,An,c,n),...Ke?{width:"100%"}:{}},children:U})})})})(),_&&G&&(()=>{const Te=`${G.widthPx}px`,Oe={width:Te,height:"auto",maxHeight:Te,objectFit:"contain",left:G.x,top:G.y,position:"absolute"};return r.jsx(Og,{media:G,className:G.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Oe},`${G.rowId}-${G.url}`)})()]})})]})}const Sh=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
9042
9071
  import { CommonComponentProps } from '../props';
9043
9072
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
9044
9073
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -11999,7 +12028,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
11999
12028
  </>
12000
12029
  );
12001
12030
  }
12002
- `,Gi=["A","B","C","D","E"],Bs=[...ha,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],oi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function $h(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function jo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Ch(){return Object.fromEntries(Gi.map((e,t)=>{const n=Un[t],i=`${e} column`;return[n,$h(i)]}))}function Th(){const e={};for(const t of Gi)e[`${t}ColumnWidth`]=jo(`${t} column width`),e[`${t}ColumnPaddingLeft`]=jo(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=jo(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=jo(`${t} column padding bottom`);return e}function Ds(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Un]};for(const s of Gi)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function Lh(e){const t={};if(e===An)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ha]},enum:[...ha]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Bs],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Bs]}}return t[vt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[vt(e,"textFontSettings")]={...oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[vt(e,"textFontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[vt(e,"textLineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[vt(e,"textLetterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[vt(e,"textWordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[vt(e,"textTextAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[vt(e,"textTextAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Ih=mo.reduce((e,t)=>({...e,...Lh(t)}),{});function Rh(e){return{verticalAlign:e===An?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===An?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Eh(e,t={}){var n;return{...Rh(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Vs=new Set(["textFontFamily","textFontSettings"]);function Mh(e,t,n){const i=s=>n===void 0?!0:n==="common"?Vs.has(s):!Vs.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Ga(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[vt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[vt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[vt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[vt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[vt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[vt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[vt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[vt(e,"textTextAppearance")]=t.textTextAppearance),o}function Jo(e={},t){return mo.reduce((n,i)=>({...n,...Mh(i,Eh(i,e),t)}),{})}const kh=Jo(),Ph=oh();function pc(e){return[vt(e,"textFontFamily"),vt(e,"textFontSettings"),vt(e,"textFontSize"),vt(e,"textLineHeight"),vt(e,"textLetterSpacing"),vt(e,"textWordSpacing"),vt(e,"textTextAlign"),vt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Ah(){const e=[];return Va.forEach((t,n)=>{const i=Un[n],o=pc(t);for(let s=1;s<Un.length;s+=1){const l=[{name:"columns",value:s},...Array.from({length:s},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:l,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Fh=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];pc(An);const Wh=[...Gi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],ri=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],_h=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:ri[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:ri[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:ri[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:ri[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:ri[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:ri[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:ri[6],link:""}],Nh=[...Gi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Hh={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Ch(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:_h},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Th(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...Ih,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...kh,...Jo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ds({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...Jo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ds({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...Jo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Ah(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Wh.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...Gi.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Nh]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Ph]}],paletteBookmark:{items:[...Fh],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},jh={element:wh,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>hh(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...mo.map(e=>({path:`${vt(e,"textFontFamily")}`}))]},fontRelations:{...mo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${vt(t,"textFontFamily")}`}),{})},schema:Hh,sourceCode:Sh},Gs=300,Nn=.004,Oh={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"},zh=["hover","focus","filled","success","error"];function Bh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function qs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ks(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((o-t)/2,i)}}function Dh(e){return`
12031
+ `,Gi=["A","B","C","D","E"],Bl=[...ha,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],oi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function $h(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function jo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Ch(){return Object.fromEntries(Gi.map((e,t)=>{const n=Un[t],i=`${e} column`;return[n,$h(i)]}))}function Th(){const e={};for(const t of Gi)e[`${t}ColumnWidth`]=jo(`${t} column width`),e[`${t}ColumnPaddingLeft`]=jo(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=jo(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=jo(`${t} column padding bottom`);return e}function Dl(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Un]};for(const l of Gi)i[`${l}ColumnWidth`]=l==="A"?.0798:.32,i[`${l}ColumnPaddingLeft`]=0,i[`${l}ColumnPaddingRight`]=0,i[`${l}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function Lh(e){const t={};if(e===An)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ha]},enum:[...ha]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Bl],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Bl]}}return t[vt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[vt(e,"textFontSettings")]={...oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[vt(e,"textFontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[vt(e,"textLineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[vt(e,"textLetterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[vt(e,"textWordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[vt(e,"textTextAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[vt(e,"textTextAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Ih=mo.reduce((e,t)=>({...e,...Lh(t)}),{});function Rh(e){return{verticalAlign:e===An?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===An?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Eh(e,t={}){var n;return{...Rh(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Vl=new Set(["textFontFamily","textFontSettings"]);function kh(e,t,n){const i=l=>n===void 0?!0:n==="common"?Vl.has(l):!Vl.has(l),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Ga(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[vt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[vt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[vt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[vt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[vt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[vt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[vt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[vt(e,"textTextAppearance")]=t.textTextAppearance),o}function Jo(e={},t){return mo.reduce((n,i)=>({...n,...kh(i,Eh(i,e),t)}),{})}const Mh=Jo(),Ph=oh();function pc(e){return[vt(e,"textFontFamily"),vt(e,"textFontSettings"),vt(e,"textFontSize"),vt(e,"textLineHeight"),vt(e,"textLetterSpacing"),vt(e,"textWordSpacing"),vt(e,"textTextAlign"),vt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Ah(){const e=[];return Va.forEach((t,n)=>{const i=Un[n],o=pc(t);for(let l=1;l<Un.length;l+=1){const s=[{name:"columns",value:l},...Array.from({length:l},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:s,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Fh=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];pc(An);const Wh=[...Gi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],ri=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],_h=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:ri[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:ri[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:ri[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:ri[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:ri[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:ri[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:ri[6],link:""}],Nh=[...Gi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Hh={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Ch(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:_h},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Th(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...Ih,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Mh,...Jo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Dl({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...Jo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Dl({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...Jo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Ah(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Wh.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...Gi.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Nh]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Ph]}],paletteBookmark:{items:[...Fh],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},jh={element:wh,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>hh(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...mo.map(e=>({path:`${vt(e,"textFontFamily")}`}))]},fontRelations:{...mo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${vt(t,"textFontFamily")}`}),{})},schema:Hh,sourceCode:Sh},Gl=300,Nn=.004,Oh={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"},zh=["hover","focus","filled","success","error"];function Bh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ql(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Kl(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((o-t)/2,i)}}function Dh(e){return`
12003
12032
  .${e}-wrapper {
12004
12033
  box-sizing: border-box;
12005
12034
  display: flex;
@@ -12089,7 +12118,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12089
12118
  width: var(--${e}-icon-max-width);
12090
12119
  height: var(--${e}-icon-max-width);
12091
12120
  position: relative;
12092
- transition: transform ${Gs}ms ease;
12121
+ transition: transform ${Gl}ms ease;
12093
12122
  }
12094
12123
  .${e}-icon-custom {
12095
12124
  display: flex;
@@ -12124,7 +12153,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12124
12153
  .${e}-panel {
12125
12154
  display: grid;
12126
12155
  grid-template-rows: 0fr;
12127
- transition: grid-template-rows ${Gs}ms ease;
12156
+ transition: grid-template-rows ${Gl}ms ease;
12128
12157
  }
12129
12158
  .${e}-item-open .${e}-panel {
12130
12159
  grid-template-rows: 1fr;
@@ -12192,7 +12221,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12192
12221
  left: 20px;
12193
12222
  transform: translateY(-50%);
12194
12223
  }
12195
- `}function Us(e,t,n,i,o,s,l,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:l,color:d??"#000000"}}function Vh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=y.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:x="solid",entryHoverEffect:b="default",autoclose:$="off",icon:h,iconMaxWidth:w=.00833,iconPaddingRight:C=0,iconAnimation:R="rotate 45",questionColor:A="#000000",answerColor:T="#000000",dividerColor:N="#0000001F",iconColor:E="#000000",questionHoverColor:V="#666666",iconHoverColor:L="#666666",iconActiveColor:I="#000000",dividerHoverColor:_="#000000",questionFontFamily:f,questionFontSettings:S,questionFontSize:M,questionLineHeight:z,questionLetterSpacing:K,questionWordSpacing:ae,questionTextAppearance:Q,answerFontFamily:G,answerFontSettings:H,answerFontSize:k,answerLineHeight:F,answerLetterSpacing:X,answerWordSpacing:B,answerTextAppearance:U,questionPaddingLeft:j=0,questionPaddingTop:xe=0,questionPaddingBottom:v=0,answerPaddingLeft:he=0,answerPaddingRight:Y=0,answerPaddingTop:le=0,answerPaddingBottom:$e=0}=e,re=t??[],[be,Z]=a.useState(()=>new Set),fe=!n||i;a.useEffect(()=>{Z(new Set)},[$]),a.useEffect(()=>{n&&!o&&!i&&Z(new Set)},[n,o,i]);const ye=Ue=>y.scalingValue(Ue,n??!1),ke=Math.max(j,Nn),J=Math.max(xe,Nn),Ce=Math.max(v,Nn),ce=Math.max(he,Nn),ve=Math.max(Y,Nn),Se=Math.max(le,Nn),D=Math.max($e,Nn),ie=Math.max(0,(c??1)-C-w),W=Math.max(0,(c??1)-Y),oe=Math.max(0,(c??1)-he),te=Math.max(C,Nn),ge=Math.max(0,(c??1)-j-w),de=a.useMemo(()=>be.size===0?0:Math.min(...be),[be]),we=a.useCallback(Ue=>be.has(Ue),[be]),Me=fe&&b==="default"?`${l}-entry-hover-default`:"",ee=h??"",ue=ee!=="",Ae=R.replace(/^rotate /,""),se=`${l}-icon-anim-${Ae}`,q=dn(Xt(Us(f,S,M,z,K,ae,Q,A),n)),je=dn(Xt(Us(G,H,k,F,X,B,U,T),n)),We=qs(M,z,`${l}-question`,`${l}-text-tight-leading`),et=qs(k,F,`${l}-answer-text`,`${l}-text-tight-leading`),Ye=Ks(M,z,l,n),lt=Ks(k,F,l,n),mt=y.buildColorVars(l,{questionColor:A,answerColor:T,dividerColor:N,iconColor:E,questionHoverColor:V,iconHoverColor:L,iconActiveColor:I,dividerHoverColor:_},Oh,zh),De=s&&s!=="default"?`${l}-state-${s}`:"",ot=a.useCallback(Ue=>{fe&&Z(ht=>{if(ht.has(Ue)){const dt=new Set(ht);return dt.delete(Ue),dt}if($==="on")return new Set([Ue]);const xt=new Set(ht);return xt.add(Ue),xt})},[fe,$]),$t=a.useMemo(()=>Dh(l),[l]),rt={[`--${l}-divider-width`]:y.scalingValue(m,n??!1),[`--${l}-divider-style`]:x,[`--${l}-icon-max-width`]:y.scalingValue(w,n??!1),...u>0?{[`--${l}-question-min-height`]:y.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$t}}),r.jsx("div",{style:mt,children:r.jsx("div",{className:nt(`${l}-wrapper`,n&&!i&&`${l}-editor`,Me,De),style:{width:y.scalingValue(c,n??!1),maxWidth:"100%",...rt},children:re.map((Ue,ht)=>{var Tt;const xt=we(ht),dt=((Tt=Ue.question)==null?void 0:Tt.trim())??"",Mt=Ue.answer,_t=((Mt==null?void 0:Mt.length)??0)>0,Qe=d&&ht===de;return r.jsxs("div",{className:nt(`${l}-item`,xt&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[Qe&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:ye(J),zIndex:2}}),r.jsx(nn,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ie),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ye(ke),height:"100%",zIndex:2}}),r.jsx(nn,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ge),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:ye(te),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":xt,style:{...q,...Ye,paddingLeft:ye(j),paddingRight:ye(C)},onClick:()=>ot(ht),children:[xe>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:ye(xe)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:We,children:dt}),_t&&(ue?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${se}`,"aria-hidden":"true",children:r.jsx(rn,{url:ee,fill:E,hoverFill:L,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${se}`,"aria-hidden":"true"}))]}),v>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:ye(v)},"aria-hidden":"true"})]}),Qe&&r.jsx(nn,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ye(Ce),zIndex:2}})]}),_t&&Mt&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!xt,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[Qe&&xt&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:ye(Se),zIndex:2}}),r.jsx(nn,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(W),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ye(ce),height:"100%",zIndex:2}}),r.jsx(nn,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(oe),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:ye(ve),height:"100%",zIndex:2}})]}),le>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:ye(le)}}),r.jsx("div",{className:`${l}-answer`,style:{...je,...lt,paddingLeft:ye(he),paddingRight:ye(Y)},children:r.jsx("div",{className:et,children:r.jsx(mi,{content:Mt})})}),$e>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:ye($e)}}),Qe&&xt&&r.jsx(nn,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ye(D),zIndex:2}})]})})})]},ht)})})})]})}const Gh=`import { useCallback, useEffect, useMemo, useState } from 'react';
12224
+ `}function Ul(e,t,n,i,o,l,s,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:l??0,textAppearance:s,color:d??"#000000"}}function Vh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l}){const{prefix:s}=y.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:x="solid",entryHoverEffect:b="default",autoclose:T="off",icon:f,iconMaxWidth:L=.00833,iconPaddingRight:$=0,iconAnimation:R="rotate 45",questionColor:E="#000000",answerColor:C="#000000",dividerColor:U="#0000001F",iconColor:k="#000000",questionHoverColor:j="#666666",iconHoverColor:I="#666666",iconActiveColor:w="#000000",dividerHoverColor:W="#000000",questionFontFamily:h,questionFontSettings:S,questionFontSize:M,questionLineHeight:z,questionLetterSpacing:K,questionWordSpacing:le,questionTextAppearance:Y,answerFontFamily:D,answerFontSettings:N,answerFontSize:F,answerLineHeight:A,answerLetterSpacing:q,answerWordSpacing:G,answerTextAppearance:Z,questionPaddingLeft:_=0,questionPaddingTop:me=0,questionPaddingBottom:v=0,answerPaddingLeft:fe=0,answerPaddingRight:J=0,answerPaddingTop:de=0,answerPaddingBottom:$e=0}=e,oe=t??[],[xe,Q]=a.useState(()=>new Set),ye=!n||i;a.useEffect(()=>{Q(new Set)},[T]),a.useEffect(()=>{n&&!o&&!i&&Q(new Set)},[n,o,i]);const ve=Ue=>y.scalingValue(Ue,n??!1),ke=Math.max(_,Nn),we=Math.max(me,Nn),Me=Math.max(v,Nn),X=Math.max(fe,Nn),ue=Math.max(J,Nn),Se=Math.max(de,Nn),O=Math.max($e,Nn),ce=Math.max(0,(c??1)-$-L),H=Math.max(0,(c??1)-J),re=Math.max(0,(c??1)-fe),ae=Math.max($,Nn),ne=Math.max(0,(c??1)-_-L),ie=a.useMemo(()=>xe.size===0?0:Math.min(...xe),[xe]),be=a.useCallback(Ue=>xe.has(Ue),[xe]),Ce=ye&&b==="default"?`${s}-entry-hover-default`:"",ee=f??"",pe=ee!=="",Ae=R.replace(/^rotate /,""),se=`${s}-icon-anim-${Ae}`,V=dn(Xt(Ul(h,S,M,z,K,le,Y,E),n)),je=dn(Xt(Ul(D,N,F,A,q,G,Z,C),n)),We=ql(M,z,`${s}-question`,`${s}-text-tight-leading`),et=ql(F,A,`${s}-answer-text`,`${s}-text-tight-leading`),Ye=Kl(M,z,s,n),st=Kl(F,A,s,n),mt=y.buildColorVars(s,{questionColor:E,answerColor:C,dividerColor:U,iconColor:k,questionHoverColor:j,iconHoverColor:I,iconActiveColor:w,dividerHoverColor:W},Oh,zh),De=l&&l!=="default"?`${s}-state-${l}`:"",ot=a.useCallback(Ue=>{ye&&Q(ht=>{if(ht.has(Ue)){const dt=new Set(ht);return dt.delete(Ue),dt}if(T==="on")return new Set([Ue]);const xt=new Set(ht);return xt.add(Ue),xt})},[ye,T]),$t=a.useMemo(()=>Dh(s),[s]),rt={[`--${s}-divider-width`]:y.scalingValue(m,n??!1),[`--${s}-divider-style`]:x,[`--${s}-icon-max-width`]:y.scalingValue(L,n??!1),...u>0?{[`--${s}-question-min-height`]:y.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$t}}),r.jsx("div",{style:mt,children:r.jsx("div",{className:nt(`${s}-wrapper`,n&&!i&&`${s}-editor`,Ce,De),style:{width:y.scalingValue(c,n??!1),maxWidth:"100%",...rt},children:oe.map((Ue,ht)=>{var Tt;const xt=be(ht),dt=((Tt=Ue.question)==null?void 0:Tt.trim())??"",kt=Ue.answer,_t=((kt==null?void 0:kt.length)??0)>0,Qe=d&&ht===ie;return r.jsxs("div",{className:nt(`${s}-item`,xt&&`${s}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${s}-question-controls`,children:[Qe&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:ve(we),zIndex:2}}),r.jsx(nn,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ce),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(ke),height:"100%",zIndex:2}}),r.jsx(nn,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:ve(ae),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${s}-question-button`,"aria-expanded":xt,style:{...V,...Ye,paddingLeft:ve(_),paddingRight:ve($)},onClick:()=>ot(ht),children:[me>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:ve(me)},"aria-hidden":"true"}),r.jsxs("span",{className:`${s}-question-row`,children:[r.jsx("span",{className:We,children:dt}),_t&&(pe?r.jsx("span",{className:`${s}-icon ${s}-icon-custom ${se}`,"aria-hidden":"true",children:r.jsx(rn,{url:ee,fill:k,hoverFill:I,className:`${s}-icon-image`})}):r.jsx("span",{className:`${s}-icon ${s}-icon-default ${se}`,"aria-hidden":"true"}))]}),v>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:ve(v)},"aria-hidden":"true"})]}),Qe&&r.jsx(nn,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Me),zIndex:2}})]}),_t&&kt&&r.jsx("div",{className:`${s}-panel`,"aria-hidden":!xt,children:r.jsx("div",{className:`${s}-panel-inner`,children:r.jsxs("div",{className:`${s}-answer-controls`,children:[Qe&&xt&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:ve(Se),zIndex:2}}),r.jsx(nn,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(H),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(X),height:"100%",zIndex:2}}),r.jsx(nn,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(re),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:ve(ue),height:"100%",zIndex:2}})]}),de>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:ve(de)}}),r.jsx("div",{className:`${s}-answer`,style:{...je,...st,paddingLeft:ve(fe),paddingRight:ve(J)},children:r.jsx("div",{className:et,children:r.jsx(mi,{content:kt})})}),$e>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:ve($e)}}),Qe&&xt&&r.jsx(nn,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(O),zIndex:2}})]})})})]},ht)})})})]})}const Gh=`import { useCallback, useEffect, useMemo, useState } from 'react';
12196
12225
  import cn from 'classnames';
12197
12226
  import { CommonComponentProps } from '../props';
12198
12227
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -12989,7 +13018,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
12989
13018
  </>
12990
13019
  );
12991
13020
  }
12992
- `;function Hn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Xs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Kh={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:Hn("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Xs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Xs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:Hn("Question Padding Left"),questionPaddingTop:Hn("Question Padding Top"),questionPaddingBottom:Hn("Question Padding Bottom"),answerPaddingLeft:Hn("Answer Padding Left"),answerPaddingRight:Hn("Answer Padding Right"),answerPaddingTop:Hn("Answer Padding Top"),answerPaddingBottom:Hn("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...qh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Uh={element:Vh,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:Kh,sourceCode:Gh},Fn=e=>e.display==="cover",Lr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ys=100,Xh=.2,Zs=8,mc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=a.useState(0),[l,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Ys:Math.max(Ys,window.innerHeight*Xh),[]),x=a.useCallback(f=>Math.max(0,1-f/(m*1.5)),[m]),b=a.useCallback(f=>Math.max(0,1-f/(m*.45)),[m]),$=a.useCallback(f=>{const S=typeof window<"u"?window.innerHeight:800,M=Math.max(.88,1-f/S*.12);return`translateY(${f}px) scale(${M})`},[]),h=a.useCallback(()=>{c.current=null},[]),w=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),C=a.useCallback(()=>{const f=typeof window<"u"?window.innerHeight:800;d(!0),s(f),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),R=a.useCallback(f=>{!e||l||f.pointerType==="touch"&&(i!=null&&i(f.target)||(c.current={startX:f.clientX,startY:f.clientY,isLocked:null,pointerId:f.pointerId}))},[e,l,i]),A=a.useCallback(f=>{const S=c.current;if(!e||!S||f.pointerType!=="touch"||S.pointerId!==f.pointerId)return;const M=f.clientX-S.startX,z=f.clientY-S.startY;if(S.isLocked===null){if(Math.abs(M)<Zs&&Math.abs(z)<Zs)return;if(z>0&&z>Math.abs(M))S.isLocked=!0,f.currentTarget.setPointerCapture(f.pointerId);else{S.isLocked=!1,h();return}}if(!S.isLocked)return;f.preventDefault();const K=Math.max(0,z);u.current=K,s(K)},[e,h]),T=a.useCallback(f=>{const S=c.current;if(!e||!S||f.pointerType!=="touch"||S.pointerId!==f.pointerId)return;const M=S.isLocked===!0;if(f.currentTarget.hasPointerCapture(f.pointerId)&&f.currentTarget.releasePointerCapture(f.pointerId),!M){h();return}f.clientY-S.startY>=m?C():w()},[m,C,e,h,w]),N=a.useCallback(f=>{T(f)},[T]),E=a.useCallback(f=>{T(f)},[T]),V=o>0,L=l?`transform ${n}ms ease`:"none",I=l?`opacity ${n}ms ease`:"none",_=o>0||l;return{isSwipeDragging:V,backdropStyle:{opacity:x(o),transition:I},mediaAreaStyle:{transform:$(o),transition:L,touchAction:V?"none":void 0,willChange:V?"transform":void 0},overlayContentStyle:_?{opacity:b(o),transition:I}:void 0,swipeHandlers:e?{onPointerDown:R,onPointerMove:A,onPointerUp:N,onPointerCancel:E}:{},dismissAreaStyle:e?{touchAction:V?"none":"pan-x"}:void 0}},Yh="[data-lightbox-scrollable]",gc=()=>{a.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=d=>{const c=d.target;c instanceof Element&&c.closest(Yh)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},Zh=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Jh=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Qh=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},ef=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,w)=>{Jh(t),e.scrollLeft=h,w&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,x=0;const b=()=>{t.removeEventListener("transitionend",$),clearTimeout(x)},$=h=>{h.target!==t||h.propertyName!=="transform"||m||(m=!0,b(),u(n,!0))};return t.addEventListener("transitionend",$),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{m||(m=!0,b(),u(n,!0))},i+64),()=>{m||(m=!0,b(),u(l-Qh(t),!1))}},io=300,tf=900,nf=1500,of="cubic-bezier(0.16, 1, 0.3, 1)",rf=3e3,af=2,sf=16,lf=.05,cf=1,Oo=.3,df=50,uf=20,xi=.004,Hi=["title1","title2","title3"],pf={title1:"1",title2:"2",title3:"3"},mf={title1:"title1Color",title2:"title2Color",title3:"title3Color"},gf={title1:.02,title2:.02,title3:.02},zo=e=>`max(${e}, ${uf}px)`,hf=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},ff=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=hf(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Ht=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,yf=e=>[Ht(e,"fontFamily"),Ht(e,"fontSettings"),{type:"row",items:[Ht(e,"fontSize"),Ht(e,"lineHeight"),Ht(e,"letterSpacing"),Ht(e,"wordSpacing")]},Ht(e,"textAlign"),Ht(e,"textAppearance")],vf=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Hi.map(e=>[pf[e],yf(e)]))}),Ua=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},hc=(e,t)=>Ua(e,t),Bo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Js=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ua(e.length,n),effective:hc(e.length,n)}},xf=(e,t,n,i,o,s,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},Xr=(e,t)=>{const n=i=>{const o=Ht(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[mf[t]]}},bf=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Yr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??gf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},wf=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:x,closeIcon:b,closeIconMaxWidth:$,closeIconColor:h,closeIconHoverColor:w,thumbnailTrigger:C,thumbnailVisibility:R,thumbnailObjectFit:A,thumbnailActive:T,thumbnailActiveColor:N,title1Width:E,title2Width:V,title3Width:L,title1MarginLeft:I=0,title2MarginLeft:_=0,title3MarginLeft:f=0,titleRowMarginBottom:S=0,titleHeaderLayout:M="desktop",contentMarginTop:z,iconMarginLeft:K}=n,ae=p=>y.scalingValue(p,i??!1),Q=c??n.thumnailSize??.03,G=ae(Q),H=ae(u),k=ae(m??.02),F=ae(x??0),X=ae(z??0),B=zo(X),U=ae(K??0),[j,xe]=a.useState(0),v=a.useRef(j);v.current=j;const he=t[j],{title1:Y,title2:le,title3:$e}=ff(he),re=Yr("title1",Xr(n,"title1"),i),be=Yr("title2",Xr(n,"title2"),i),Z=Yr("title3",Xr(n,"title3"),i),fe=M==="mobile",ye=!o&&(!i||s),ke=ye,J=ye,Ce=ye,ce=Fn(A),ve=ce?{"--image-aspect-ratio":Lr(A)}:void 0,Se=!!(Y||le||$e),D=a.useMemo(()=>xf(e,Y,le,$e,re,be,Z),[e,j,Y,le,$e,re,be,Z]),ie=a.useMemo(()=>({title1Width:E,title2Width:V,title3Width:L}),[E,V,L]),W=a.useMemo(()=>D.map(p=>ie[p.widthKey]),[D,ie]),oe=a.useMemo(()=>Ua(D.length,W),[D.length,W]),te=a.useMemo(()=>hc(D.length,W),[D.length,W]),ge=a.useMemo(()=>D.filter(p=>p.prefix==="title1"),[D]),de=a.useMemo(()=>D.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[D]),we=a.useMemo(()=>Js(ge,ie),[ge,ie]),Me=a.useMemo(()=>Js(de,ie),[de,ie]),ee=a.useCallback((p,P)=>{const O=D.indexOf(p);if(!fe||P==="single-row")return{effectiveWidth:te[O]??0,resolvedWidth:oe[O]??0,maxWidth:Bo(O,oe)};if(P==="two-row-top"){const Le=ge.indexOf(p);return{effectiveWidth:we.effective[Le]??0,resolvedWidth:we.resolved[Le]??0,maxWidth:Bo(Le,we.resolved)}}const me=de.indexOf(p);return{effectiveWidth:Me.effective[me]??0,resolvedWidth:Me.resolved[me]??0,maxWidth:Bo(me,Me.resolved)}},[de,Me,te,oe,D,ge,we,fe]),ue=a.useCallback(p=>y.scalingValue(p,i??!1),[i]),Ae=ue(S??0),se=a.useMemo(()=>({title1MarginLeft:I,title2MarginLeft:_,title3MarginLeft:f}),[I,_,f]),q=a.useCallback(p=>D.slice(0,p+1).reduce((P,O,me)=>P+(O!=null&&O.marginLeftKey?se[O.marginLeftKey]??0:0)+(oe[me]??0),0)+(fe?0:I??0),[D,se,oe,fe,I]),je=a.useCallback(()=>fe?0:I??0,[fe,I]),We=a.useCallback(p=>de.slice(0,p).reduce((P,O,me)=>P+(O.marginLeftKey?se[O.marginLeftKey]??0:0)+(Me.resolved[me]??0),0),[de,Me.resolved,se]),et=a.useCallback(p=>{const P=de[p];return We(p)+(P.marginLeftKey?se[P.marginLeftKey]??0:0)+(Me.resolved[p]??0)},[de,Me.resolved,We,se]),Ye=(p,P)=>{const O=p.marginLeftKey?se[p.marginLeftKey]??0:0,{effectiveWidth:me,resolvedWidth:Le,maxWidth:He}=ee(p,P),at=o&&P==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...P==="single-row"?{gridArea:p.prefix}:{},width:ue(me),...O>0?{marginLeft:ue(O)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),at&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:ue(-O),width:`max(${ue(O)}, 10px)`,height:"100%",pointerEvents:"auto"}}),at&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(He),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:ue(-xi/2),width:ue(xi),height:"100%",pointerEvents:"auto"}})]},p.className)},lt=()=>{const p=fe?-1:D.findIndex(me=>me.prefix==="title1"),P=!fe&&(o||(I??0)>0)?(()=>{const me=I??0,Le=p>=0?oe[p]:E??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:0,width:`max(${ue(me)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,O=D.flatMap((me,Le)=>{if(!me.marginLeftKey)return[];const He=se[me.marginLeftKey]??0,at=bf(D,oe,se,Le)+je();return r.jsx("div",{"data-controls":me.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(oe[Le]),style:{position:"absolute",top:0,left:ue(at),width:`max(${ue(He)}, 10px)`,height:"100%",pointerEvents:"auto"}},me.marginLeftKey)});return P?[P,...O]:O},mt=()=>D.map((p,P)=>{const O=Bo(P,oe),Le=q(P)-xi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(O),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ue(Le),width:ue(xi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),De=()=>de.flatMap((p,P)=>{if(!p.marginLeftKey)return[];const O=se[p.marginLeftKey]??0,me=We(P),{resolvedWidth:Le}=ee(p,"two-row-bottom");return r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:ue(me),width:`max(${ue(O)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),ot=()=>de.map((p,P)=>{const{maxWidth:O}=ee(p,"two-row-bottom"),Le=et(P)-xi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(O),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ue(Le),width:ue(xi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),$t=a.useRef(null),rt=a.useRef(null),Ue=a.useRef(null),ht=a.useRef(null),xt=a.useRef([]),dt=a.useRef([]),Mt=a.useRef(0),_t=a.useRef(null),Qe=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Tt=a.useRef(null),Lt=a.useRef(null),Ge=a.useRef(0),qe=a.useRef("forward"),Pe=a.useRef(0),gt=a.useRef(null),It=a.useRef(!1),kt=t.length>1&&(!o||!!s),Dt=kt?3:1,en=a.useMemo(()=>Array.from({length:Dt},()=>t).flat(),[t,Dt]),[on,bt]=a.useState(!1),[Rt,Ut]=a.useState(!1),[Kt,ft]=a.useState(!0),Jt=a.useRef(null),Te=a.useRef(null),Oe=a.useRef(!1),Ke=a.useRef(!1),Ne=a.useRef(null),ze=a.useRef(null),ut=ke&&!Kt,_e=a.useCallback(()=>{ke&&(ft(!0),ze.current&&clearTimeout(ze.current),ze.current=setTimeout(()=>{Qe.current.isActive||ft(!1)},rf))},[ke]),Je=a.useCallback(()=>{o||Ke.current||(Ke.current=!0,Ut(!1),Ne.current=setTimeout(()=>{l()},io))},[o,l]),tt=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":ut?"true":"false",style:{width:y.scalingValue($??0,i),height:y.scalingValue($??0,i),marginRight:U,"--close-icon-hover-color":w},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Je,"aria-label":"Close",children:r.jsx(rn,{url:b,fill:h,hoverFill:i&&!s?h:w,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:U,height:"100%",pointerEvents:"auto"}})]}),Wt=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:ue(I??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Ct=()=>{const p=D.find(me=>me.prefix==="title1"),P=D.filter(me=>me.prefix==="title2"||me.prefix==="title3"),O=P.length>0||o||(S??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(I??0)>0||o?Wt():null,p&&Ye(p,"two-row-top"),b&&tt()]}),O?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[P.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[P.map(me=>Ye(me,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[De(),ot()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Ae,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},st=()=>r.jsxs(r.Fragment,{children:[(I??0)>0||o?Wt("single-row"):null,D.map(p=>Ye(p,"single-row")),o?r.jsxs(r.Fragment,{children:[lt(),mt()]}):null,b?tt():null]}),Nt=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Vt,mediaAreaStyle:zt,overlayContentStyle:Pt,swipeHandlers:Qt,dismissAreaStyle:wt}=mc({enabled:ye??!1,onClose:Je,animMs:io,isBlockedTarget:Nt}),Gt=()=>{if(!kt||t.length===0)return Mt.current=0,0;const p=dt.current[0],P=dt.current[t.length];if(!p||!P)return Mt.current;const O=P.offsetLeft-p.offsetLeft;return O>0&&(Mt.current=O),Mt.current},pt=(p=!1)=>{if(!kt)return;const P=rt.current,O=Gt();!P||O<=0||O<P.clientWidth*.25||(P.scrollLeft<=0?(P.scrollLeft+=O,p&&(Qe.current.scrollLeft+=O),It.current&&(Pe.current+=O)):P.scrollLeft>=O*2&&(P.scrollLeft-=O,p&&(Qe.current.scrollLeft-=O),It.current&&(Pe.current-=O)))},Ft=(p,P=(O=>(O=rt.current)==null?void 0:O.scrollLeft)()??0)=>{if(!kt)return p;let me=t.length+p,Le=1/0;for(let He=0;He<Dt;He++){const at=He*t.length+p,yt=dt.current[at];if(!yt)continue;const tn=Math.abs(yt.offsetLeft-P);tn<Le&&(Le=tn,me=at)}return me},Bt=p=>{const P=rt.current;return!p||!P?!1:p.offsetWidth>P.clientWidth+1},g=p=>{const P=rt.current;if(!p||!P||!Bt(p))return!1;const O=p.offsetLeft,me=O+p.offsetWidth;return P.scrollLeft>=O-1&&P.scrollLeft+P.clientWidth<=me+1},pe=(p=(P=>(P=rt.current)==null?void 0:P.scrollLeft)()??0)=>{for(let me=0;me<dt.current.length;me+=1){const Le=dt.current[me];if(Le&&g(Le))return me}let O={flatIndex:0,distance:1/0};return dt.current.forEach((me,Le)=>{if(!me)return;const He=Math.abs(me.offsetLeft-p);He<O.distance&&(O={flatIndex:Le,distance:He})}),O.flatIndex},Re=p=>{rt.current&&dt.current.forEach(P=>{P&&(P.style.scrollSnapAlign=Bt(P)&&p==="backward"?"end":"start")})},Ie=(p,P,O)=>{const me=p-P,Le=pe(P),He=dt.current[Le];if(g(He))return pe(p)%t.length;const at=dt.current[Le+1],yt=He?at?at.offsetLeft-He.offsetLeft:He.offsetWidth:0,tn=yt>0?me>yt*Oo?1:me<-yt*Oo?-1:0:0;return tn===0?O:kt?(O+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,O+tn))},Ze=a.useCallback((p=!1)=>{if(R!=="on"||o)return;const P=ht.current,O=v.current,me=xt.current[O];if(!P||!me||P.scrollWidth<=P.clientWidth)return;const Le=P.scrollLeft,He=Le+P.clientWidth,at=me.offsetLeft,yt=at+me.offsetWidth;if(at>=Le&&yt<=He)return;const tn=P.scrollWidth-P.clientWidth;let Yt=Le;if(!p&&Jt.current===null){const yi=xt.current[O-1],qi=xt.current[O+1],Eo=yi?me.offsetLeft-yi.offsetLeft:qi?qi.offsetLeft-me.offsetLeft:me.offsetWidth;yt>He?Yt+=Eo:at<Le&&(Yt-=Eo)}else yt>He?Yt=yt-P.clientWidth:Yt=at;P.scrollLeft=Math.max(0,Math.min(tn,Yt))},[o,R]),Et=a.useCallback((p=!1)=>{p&&(Oe.current=!0),Te.current===null&&(Te.current=requestAnimationFrame(()=>{Te.current=null;const P=Oe.current;Oe.current=!1,Ze(P)}))},[Ze]),Ve=a.useCallback(p=>{if(p===v.current)return;const P=v.current;v.current=p;const O=Math.abs(p-P)>1,me=kt&&t.length>1&&(P===t.length-1&&p===0||P===0&&p===t.length-1);xe(p),Et(O||me)},[t.length,kt,Et]),it=()=>{if(!rt.current||t.length===0||Jt.current!==null||Qe.current.isActive&&Qe.current.hasMoved)return;const p=rt.current.scrollLeft,P=pe(p)%t.length;P!==v.current&&Ve(P)},jt=()=>{Jt.current=null},St=p=>{const P=rt.current;P&&(P.style.scrollSnapType=p?"":"none")},cn=()=>{var p;(p=Lt.current)==null||p.call(Lt),Lt.current=null},un=()=>{gt.current!==null&&(cancelAnimationFrame(gt.current),gt.current=null),It.current=!1},Jn=()=>{const p=rt.current;if(!p){gt.current=null,It.current=!1;return}const P=Pe.current-p.scrollLeft;if(Math.abs(P)<.5){p.scrollLeft=Pe.current,pt(),it(),gt.current=null,It.current=!1;return}p.scrollLeft+=P*lf,pt(),it(),_e(),gt.current=requestAnimationFrame(Jn)},Qn=()=>{const p=Ue.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},To=(p,P,O,me)=>{Qn(),p.scrollLeft=P,Ge.current=p.scrollLeft,pt(),O!==void 0?(v.current=O,xe(O)):it(),St(!0),me==null||me()},Lo=(p,{behavior:P="smooth",activeIndex:O,onComplete:me}={})=>{const Le=rt.current,He=Ue.current;if(!Le||!He)return;if(un(),cn(),St(!1),P==="auto"){To(Le,p,O,me);return}const at=Math.abs(p-Le.scrollLeft),yt=Zh(at,tf,nf,Le.clientWidth*.55);Lt.current=ef(Le,He,p,{duration:yt,easing:of,onComplete:()=>{Lt.current=null,To(Le,p,O,me)}})},Rr=(p="smooth")=>{const P=rt.current;if(!P||t.length===0)return;const O=pe()%t.length,me=Ft(O,P.scrollLeft),Le=dt.current[me];Le&&Lo(Le.offsetLeft,{behavior:p,activeIndex:O})},Er=(p,P="smooth",O,me)=>{const Le=rt.current;if(!Le||t.length===0)return;const He=(me??Le.scrollLeft)-p,at=pe(p),yt=dt.current[at];if(g(yt)){St(!0),it();return}const tn=dt.current[at+1],Yt=yt?tn?tn.offsetLeft-yt.offsetLeft:yt.offsetWidth:0;if((Yt>0?He>Yt*Oo?1:He<-Yt*Oo?-1:0:0)!==0){const wc=O??at%t.length,Sc=Ie(me??Le.scrollLeft,p,wc);Sn(Sc,P);return}const qi=me??Le.scrollLeft,Eo=pe(qi),Xa=dt.current[Eo];if(Xa&&Math.abs(Xa.offsetLeft-qi)<1){St(!0),it();return}Rr("auto")},Sn=(p,P="smooth")=>{const O=rt.current;if(!O||t.length===0)return;const me=Ft(p,O.scrollLeft),Le=dt.current[me];Le&&(P==="smooth"?Jt.current=p:Jt.current=null,v.current=p,xe(p),Et(!0),Lo(Le.offsetLeft,{behavior:P,activeIndex:p,onComplete:P==="smooth"?jt:void 0}))},fi=()=>{Tt.current&&(window.removeEventListener("pointerup",Tt.current),window.removeEventListener("pointercancel",Tt.current),Tt.current=null)},Io=(p,P,O,me,Le)=>{const He=O-p,at=me-P,yt=Math.abs(He),tn=Math.abs(at);if(yt<df||yt<=tn)return!1;const Yt=He<0?1:-1,yi=kt?(Le+Yt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Le+Yt));return yi===Le?!1:(Sn(yi),!0)},ei=p=>{if(!Qe.current.isActive)return;fi();const P=rt.current;if(!P)return;const{scrollLeft:O,startActiveIndex:me,hasMoved:Le}=Qe.current,He=P.scrollLeft;pt(!0),Qe.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},bt(!1),p!==void 0&&P.hasPointerCapture(p)&&P.releasePointerCapture(p),Le?Er(O,"smooth",me,He):(St(!0),it()),_e()},Ro=(p,P)=>{const O=_t.current;_t.current=null,O&&(Io(O.startX,O.startY,p,P,O.startActiveIndex),_e())},Mr=p=>{if(!J)return;if(p.pointerType==="touch"){if(un(),St(!0),Nt(p.target))return;_t.current={startX:p.clientX,startY:p.clientY,startActiveIndex:v.current};return}if(p.pointerType!=="mouse"||p.button!==0||Nt(p.target))return;const P=rt.current;if(!P)return;un(),cn(),Qn(),Jt.current=null,Qe.current={isActive:!0,startX:p.clientX,scrollLeft:P.scrollLeft,startActiveIndex:v.current,hasMoved:!1},St(!1),_e(),P.setPointerCapture(p.pointerId),fi();const O=me=>{me.pointerType==="mouse"&&ei(me.pointerId)};Tt.current=O,window.addEventListener("pointerup",O),window.addEventListener("pointercancel",O)},kr=p=>{if(!J||p.pointerType!=="mouse")return;const P=rt.current;if(!P||!Qe.current.isActive)return;if(p.buttons===0){ei(p.pointerId);return}const O=p.clientX-Qe.current.startX;Math.abs(O)>cf&&(Qe.current.hasMoved=!0,bt(!0)),Qe.current.hasMoved&&(p.preventDefault(),P.scrollLeft=Qe.current.scrollLeft-O,pt(!0),it(),_e())},ne=p=>{if(J){if(p.pointerType==="touch"){p.type==="pointerup"?Ro(p.clientX,p.clientY):_t.current=null;return}p.pointerType==="mouse"&&ei(p.pointerId)}},Ee=p=>{!J||p.pointerType!=="mouse"||ei(p.pointerId)};return gc(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Ut(!0));return()=>{cancelAnimationFrame(p),cn(),fi(),Te.current!==null&&(cancelAnimationFrame(Te.current),Te.current=null),Ne.current&&clearTimeout(Ne.current),ze.current&&clearTimeout(ze.current)}},[]),a.useEffect(()=>{if(!ke){ft(!0);return}_e();const p=$t.current;if(!p)return;const P=()=>_e();return p.addEventListener("pointermove",P),p.addEventListener("pointerdown",P),()=>{p.removeEventListener("pointermove",P),p.removeEventListener("pointerdown",P),ze.current&&clearTimeout(ze.current)}},[ke,_e]),a.useEffect(()=>{const p=P=>{P.key==="Escape"&&Je()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Je]),a.useLayoutEffect(()=>{Gt()},[F,t.length,kt]),a.useLayoutEffect(()=>{o||Sn(v.current,"auto")},[F,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,kt]),a.useEffect(()=>{const p=rt.current;if(!p||o||!ye)return;const P=O=>{if(O.preventDefault(),Math.abs(O.deltaY)<=Math.abs(O.deltaX))return;const me=O.deltaMode===1?sf:O.deltaMode===2?p.clientHeight:1,Le=O.deltaY*me*af;if(Le!==0){if(cn(),It.current||(It.current=!0,Pe.current=p.scrollLeft,Jt.current=null,St(!1)),Pe.current+=Le,!kt){const He=p.scrollWidth-p.clientWidth;Pe.current=Math.max(0,Math.min(He,Pe.current))}_e(),gt.current===null&&(gt.current=requestAnimationFrame(Jn))}};return p.addEventListener("wheel",P,{passive:!1}),()=>{p.removeEventListener("wheel",P),un()}},[o,ye,kt]),a.useEffect(()=>{const p=rt.current;if(!p)return;const P=()=>{pt(Qe.current.isActive);const me=p.scrollLeft,Le=me-Ge.current;Ge.current=me;const He=Mt.current>0?Mt.current*.5:1/0;if(Le!==0&&Math.abs(Le)<He){const at=Le>0?"forward":"backward";at!==qe.current&&(qe.current=at,Re(at))}Qe.current.isActive&&Qe.current.hasMoved||it()};p.addEventListener("scroll",P,{passive:!0});const O=new ResizeObserver(()=>{Gt(),pt(Qe.current.isActive),Re(qe.current),it()});return O.observe(p),()=>{cn(),p.removeEventListener("scroll",P),O.disconnect()}},[t.length,kt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Je()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Rt?1:0,transition:`opacity ${io}ms ease`,pointerEvents:Rt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Vt}}),r.jsxs("div",{ref:$t,className:`${e}-lightbox-dismiss-area`,style:wt,...Qt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:zt,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:rt,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":J&&t.length>0?"true":"false","data-mouse-dragging":on?"true":"false",onPointerDown:Mr,onPointerMove:kr,onPointerUp:ne,onPointerCancel:ne,onLostPointerCapture:Ee,children:r.jsx("div",{ref:Ue,className:`${e}-lightbox-strip-track`,style:{gap:F},children:en.map((p,P)=>{const O=p.image.objectFit??"contain",me=P%t.length,Le=Math.floor(P/t.length),He=zo(F),at=`calc(-0.5 * (${He} + ${F}))`;return r.jsxs("div",{ref:yt=>dt.current[P]=yt,className:`${e}-strip-item`,style:{height:M==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:p.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:O}}),o&&me<t.length-1&&Le===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:at,width:He,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Le}-${p.image.url}-${me}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":ut?"true":"false",style:Pt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:X,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:B,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${fe?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||b)&&r.jsx("div",{className:`${e}-header ${fe?`${e}-header-two-row`:`${e}-header-single-row`}`,children:fe?Ct():Se||b?st():null})})})]}),t.length>1&&R==="on"&&(()=>{const p=zo(k),P=`calc(-0.5 * (${k} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:k},children:r.jsx("div",{ref:ht,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:O=>O.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":T,style:{gap:H,"--thumbnail-active-color":N},children:[t.map((O,me)=>{const Le=zo(H),He=`calc(-0.5 * (${Le} + ${H}))`;return r.jsxs("div",{ref:at=>{xt.current[me]=at},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":j===me?"true":"false",onClick:()=>ye&&C==="click"&&Sn(me),onMouseEnter:()=>Ce&&C==="hover"&&Sn(me),"aria-label":O.image.name?`View ${O.image.name}`:`View image ${me+1}`,"aria-current":j===me?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${ce?` ${e}-thumb-image-cover`:""}`,src:O.image.url,alt:"",draggable:!1,style:{...ve,maxWidth:G,maxHeight:G,width:A.display==="cover"?"auto":"100%",height:"auto",objectFit:A.display==="cover"?"cover":"contain"}})}),o&&me<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:He,width:Le,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${O.image.url}-${me}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:P,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Sf(e){return`
13021
+ `;function Hn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Xl={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Kh={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:Hn("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Xl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Xl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:Hn("Question Padding Left"),questionPaddingTop:Hn("Question Padding Top"),questionPaddingBottom:Hn("Question Padding Bottom"),answerPaddingLeft:Hn("Answer Padding Left"),answerPaddingRight:Hn("Answer Padding Right"),answerPaddingTop:Hn("Answer Padding Top"),answerPaddingBottom:Hn("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...qh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Uh={element:Vh,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:Kh,sourceCode:Gh},Fn=e=>e.display==="cover",Lr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Yl=100,Xh=.2,Zl=8,mc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,l]=a.useState(0),[s,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Yl:Math.max(Yl,window.innerHeight*Xh),[]),x=a.useCallback(h=>Math.max(0,1-h/(m*1.5)),[m]),b=a.useCallback(h=>Math.max(0,1-h/(m*.45)),[m]),T=a.useCallback(h=>{const S=typeof window<"u"?window.innerHeight:800,M=Math.max(.88,1-h/S*.12);return`translateY(${h}px) scale(${M})`},[]),f=a.useCallback(()=>{c.current=null},[]),L=a.useCallback(()=>{d(!0),l(0),window.setTimeout(()=>d(!1),n),f()},[n,f]),$=a.useCallback(()=>{const h=typeof window<"u"?window.innerHeight:800;d(!0),l(h),window.setTimeout(()=>{t(),f(),d(!1)},Math.min(n,200))},[n,t,f]),R=a.useCallback(h=>{!e||s||h.pointerType==="touch"&&(i!=null&&i(h.target)||(c.current={startX:h.clientX,startY:h.clientY,isLocked:null,pointerId:h.pointerId}))},[e,s,i]),E=a.useCallback(h=>{const S=c.current;if(!e||!S||h.pointerType!=="touch"||S.pointerId!==h.pointerId)return;const M=h.clientX-S.startX,z=h.clientY-S.startY;if(S.isLocked===null){if(Math.abs(M)<Zl&&Math.abs(z)<Zl)return;if(z>0&&z>Math.abs(M))S.isLocked=!0,h.currentTarget.setPointerCapture(h.pointerId);else{S.isLocked=!1,f();return}}if(!S.isLocked)return;h.preventDefault();const K=Math.max(0,z);u.current=K,l(K)},[e,f]),C=a.useCallback(h=>{const S=c.current;if(!e||!S||h.pointerType!=="touch"||S.pointerId!==h.pointerId)return;const M=S.isLocked===!0;if(h.currentTarget.hasPointerCapture(h.pointerId)&&h.currentTarget.releasePointerCapture(h.pointerId),!M){f();return}h.clientY-S.startY>=m?$():L()},[m,$,e,f,L]),U=a.useCallback(h=>{C(h)},[C]),k=a.useCallback(h=>{C(h)},[C]),j=o>0,I=s?`transform ${n}ms ease`:"none",w=s?`opacity ${n}ms ease`:"none",W=o>0||s;return{isSwipeDragging:j,backdropStyle:{opacity:x(o),transition:w},mediaAreaStyle:{transform:T(o),transition:I,touchAction:j?"none":void 0,willChange:j?"transform":void 0},overlayContentStyle:W?{opacity:b(o),transition:w}:void 0,swipeHandlers:e?{onPointerDown:R,onPointerMove:E,onPointerUp:U,onPointerCancel:k}:{},dismissAreaStyle:e?{touchAction:j?"none":"pan-x"}:void 0}},Yh="[data-lightbox-scrollable]",gc=()=>{a.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const s=d=>{const c=d.target;c instanceof Element&&c.closest(Yh)||d.preventDefault()};return document.addEventListener("touchmove",s,{passive:!1}),()=>{document.removeEventListener("touchmove",s),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=l,window.scrollTo(0,e)}},[])},Zh=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Jh=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Qh=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},ef=(e,t,n,{duration:i,easing:o,onComplete:l})=>{const s=e.scrollLeft,d=n-s,c=s-n,u=(f,L)=>{Jh(t),e.scrollLeft=f,L&&(l==null||l())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,x=0;const b=()=>{t.removeEventListener("transitionend",T),clearTimeout(x)},T=f=>{f.target!==t||f.propertyName!=="transform"||m||(m=!0,b(),u(n,!0))};return t.addEventListener("transitionend",T),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{m||(m=!0,b(),u(n,!0))},i+64),()=>{m||(m=!0,b(),u(s-Qh(t),!1))}},io=300,tf=900,nf=1500,of="cubic-bezier(0.16, 1, 0.3, 1)",rf=3e3,af=2,lf=16,sf=.05,cf=1,Oo=.3,df=50,uf=20,xi=.004,Hi=["title1","title2","title3"],pf={title1:"1",title2:"2",title3:"3"},mf={title1:"title1Color",title2:"title2Color",title3:"title3Color"},gf={title1:.02,title2:.02,title3:.02},zo=e=>`max(${e}, ${uf}px)`,hf=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},ff=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=hf(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Ht=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,yf=e=>[Ht(e,"fontFamily"),Ht(e,"fontSettings"),{type:"row",items:[Ht(e,"fontSize"),Ht(e,"lineHeight"),Ht(e,"letterSpacing"),Ht(e,"wordSpacing")]},Ht(e,"textAlign"),Ht(e,"textAppearance")],vf=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Hi.map(e=>[pf[e],yf(e)]))}),Ua=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const c=Math.min(l,d);return{overflow:l-c,widths:[d-c,...s]}},{overflow:i-1,widths:[]});return o},hc=(e,t)=>Ua(e,t),Bo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Jl=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ua(e.length,n),effective:hc(e.length,n)}},xf=(e,t,n,i,o,l,s)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:l,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:s,text:i}),d},Xr=(e,t)=>{const n=i=>{const o=Ht(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[mf[t]]}},bf=(e,t,n,i)=>e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),Yr=(e,t,n)=>{var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??gf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},wf=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:x,closeIcon:b,closeIconMaxWidth:T,closeIconColor:f,closeIconHoverColor:L,thumbnailTrigger:$,thumbnailVisibility:R,thumbnailObjectFit:E,thumbnailActive:C,thumbnailActiveColor:U,title1Width:k,title2Width:j,title3Width:I,title1MarginLeft:w=0,title2MarginLeft:W=0,title3MarginLeft:h=0,titleRowMarginBottom:S=0,titleHeaderLayout:M="desktop",contentMarginTop:z,iconMarginLeft:K}=n,le=p=>y.scalingValue(p,i??!1),Y=c??n.thumnailSize??.03,D=le(Y),N=le(u),F=le(m??.02),A=le(x??0),q=le(z??0),G=zo(q),Z=le(K??0),[_,me]=a.useState(0),v=a.useRef(_);v.current=_;const fe=t[_],{title1:J,title2:de,title3:$e}=ff(fe),oe=Yr("title1",Xr(n,"title1"),i),xe=Yr("title2",Xr(n,"title2"),i),Q=Yr("title3",Xr(n,"title3"),i),ye=M==="mobile",ve=!o&&(!i||l),ke=ve,we=ve,Me=ve,X=Fn(E),ue=X?{"--image-aspect-ratio":Lr(E)}:void 0,Se=!!(J||de||$e),O=a.useMemo(()=>xf(e,J,de,$e,oe,xe,Q),[e,_,J,de,$e,oe,xe,Q]),ce=a.useMemo(()=>({title1Width:k,title2Width:j,title3Width:I}),[k,j,I]),H=a.useMemo(()=>O.map(p=>ce[p.widthKey]),[O,ce]),re=a.useMemo(()=>Ua(O.length,H),[O.length,H]),ae=a.useMemo(()=>hc(O.length,H),[O.length,H]),ne=a.useMemo(()=>O.filter(p=>p.prefix==="title1"),[O]),ie=a.useMemo(()=>O.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[O]),be=a.useMemo(()=>Jl(ne,ce),[ne,ce]),Ce=a.useMemo(()=>Jl(ie,ce),[ie,ce]),ee=a.useCallback((p,P)=>{const B=O.indexOf(p);if(!ye||P==="single-row")return{effectiveWidth:ae[B]??0,resolvedWidth:re[B]??0,maxWidth:Bo(B,re)};if(P==="two-row-top"){const Le=ne.indexOf(p);return{effectiveWidth:be.effective[Le]??0,resolvedWidth:be.resolved[Le]??0,maxWidth:Bo(Le,be.resolved)}}const he=ie.indexOf(p);return{effectiveWidth:Ce.effective[he]??0,resolvedWidth:Ce.resolved[he]??0,maxWidth:Bo(he,Ce.resolved)}},[ie,Ce,ae,re,O,ne,be,ye]),pe=a.useCallback(p=>y.scalingValue(p,i??!1),[i]),Ae=pe(S??0),se=a.useMemo(()=>({title1MarginLeft:w,title2MarginLeft:W,title3MarginLeft:h}),[w,W,h]),V=a.useCallback(p=>O.slice(0,p+1).reduce((P,B,he)=>P+(B!=null&&B.marginLeftKey?se[B.marginLeftKey]??0:0)+(re[he]??0),0)+(ye?0:w??0),[O,se,re,ye,w]),je=a.useCallback(()=>ye?0:w??0,[ye,w]),We=a.useCallback(p=>ie.slice(0,p).reduce((P,B,he)=>P+(B.marginLeftKey?se[B.marginLeftKey]??0:0)+(Ce.resolved[he]??0),0),[ie,Ce.resolved,se]),et=a.useCallback(p=>{const P=ie[p];return We(p)+(P.marginLeftKey?se[P.marginLeftKey]??0:0)+(Ce.resolved[p]??0)},[ie,Ce.resolved,We,se]),Ye=(p,P)=>{const B=p.marginLeftKey?se[p.marginLeftKey]??0:0,{effectiveWidth:he,resolvedWidth:Le,maxWidth:He}=ee(p,P),at=o&&P==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...P==="single-row"?{gridArea:p.prefix}:{},width:pe(he),...B>0?{marginLeft:pe(B)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),at&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:pe(-B),width:`max(${pe(B)}, 10px)`,height:"100%",pointerEvents:"auto"}}),at&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(He),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:pe(-xi/2),width:pe(xi),height:"100%",pointerEvents:"auto"}})]},p.className)},st=()=>{const p=ye?-1:O.findIndex(he=>he.prefix==="title1"),P=!ye&&(o||(w??0)>0)?(()=>{const he=w??0,Le=p>=0?re[p]:k??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:0,width:`max(${pe(he)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,B=O.flatMap((he,Le)=>{if(!he.marginLeftKey)return[];const He=se[he.marginLeftKey]??0,at=bf(O,re,se,Le)+je();return r.jsx("div",{"data-controls":he.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re[Le]),style:{position:"absolute",top:0,left:pe(at),width:`max(${pe(He)}, 10px)`,height:"100%",pointerEvents:"auto"}},he.marginLeftKey)});return P?[P,...B]:B},mt=()=>O.map((p,P)=>{const B=Bo(P,re),Le=V(P)-xi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(B),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:pe(Le),width:pe(xi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),De=()=>ie.flatMap((p,P)=>{if(!p.marginLeftKey)return[];const B=se[p.marginLeftKey]??0,he=We(P),{resolvedWidth:Le}=ee(p,"two-row-bottom");return r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:pe(he),width:`max(${pe(B)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),ot=()=>ie.map((p,P)=>{const{maxWidth:B}=ee(p,"two-row-bottom"),Le=et(P)-xi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(B),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:pe(Le),width:pe(xi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),$t=a.useRef(null),rt=a.useRef(null),Ue=a.useRef(null),ht=a.useRef(null),xt=a.useRef([]),dt=a.useRef([]),kt=a.useRef(0),_t=a.useRef(null),Qe=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Tt=a.useRef(null),Lt=a.useRef(null),Ge=a.useRef(0),qe=a.useRef("forward"),Pe=a.useRef(0),gt=a.useRef(null),It=a.useRef(!1),Mt=t.length>1&&(!o||!!l),Dt=Mt?3:1,en=a.useMemo(()=>Array.from({length:Dt},()=>t).flat(),[t,Dt]),[on,bt]=a.useState(!1),[Rt,Ut]=a.useState(!1),[Kt,ft]=a.useState(!0),Jt=a.useRef(null),Te=a.useRef(null),Oe=a.useRef(!1),Ke=a.useRef(!1),Ne=a.useRef(null),ze=a.useRef(null),ut=ke&&!Kt,_e=a.useCallback(()=>{ke&&(ft(!0),ze.current&&clearTimeout(ze.current),ze.current=setTimeout(()=>{Qe.current.isActive||ft(!1)},rf))},[ke]),Je=a.useCallback(()=>{o||Ke.current||(Ke.current=!0,Ut(!1),Ne.current=setTimeout(()=>{s()},io))},[o,s]),tt=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":ut?"true":"false",style:{width:y.scalingValue(T??0,i),height:y.scalingValue(T??0,i),marginRight:Z,"--close-icon-hover-color":L},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Je,"aria-label":"Close",children:r.jsx(rn,{url:b,fill:f,hoverFill:i&&!l?f:L,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:Z,height:"100%",pointerEvents:"auto"}})]}),Wt=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:pe(w??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Ct=()=>{const p=O.find(he=>he.prefix==="title1"),P=O.filter(he=>he.prefix==="title2"||he.prefix==="title3"),B=P.length>0||o||(S??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(w??0)>0||o?Wt():null,p&&Ye(p,"two-row-top"),b&&tt()]}),B?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[P.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[P.map(he=>Ye(he,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[De(),ot()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Ae,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},lt=()=>r.jsxs(r.Fragment,{children:[(w??0)>0||o?Wt("single-row"):null,O.map(p=>Ye(p,"single-row")),o?r.jsxs(r.Fragment,{children:[st(),mt()]}):null,b?tt():null]}),Nt=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Vt,mediaAreaStyle:zt,overlayContentStyle:Pt,swipeHandlers:Qt,dismissAreaStyle:wt}=mc({enabled:ve??!1,onClose:Je,animMs:io,isBlockedTarget:Nt}),Gt=()=>{if(!Mt||t.length===0)return kt.current=0,0;const p=dt.current[0],P=dt.current[t.length];if(!p||!P)return kt.current;const B=P.offsetLeft-p.offsetLeft;return B>0&&(kt.current=B),kt.current},pt=(p=!1)=>{if(!Mt)return;const P=rt.current,B=Gt();!P||B<=0||B<P.clientWidth*.25||(P.scrollLeft<=0?(P.scrollLeft+=B,p&&(Qe.current.scrollLeft+=B),It.current&&(Pe.current+=B)):P.scrollLeft>=B*2&&(P.scrollLeft-=B,p&&(Qe.current.scrollLeft-=B),It.current&&(Pe.current-=B)))},Ft=(p,P=(B=>(B=rt.current)==null?void 0:B.scrollLeft)()??0)=>{if(!Mt)return p;let he=t.length+p,Le=1/0;for(let He=0;He<Dt;He++){const at=He*t.length+p,yt=dt.current[at];if(!yt)continue;const tn=Math.abs(yt.offsetLeft-P);tn<Le&&(Le=tn,he=at)}return he},Bt=p=>{const P=rt.current;return!p||!P?!1:p.offsetWidth>P.clientWidth+1},g=p=>{const P=rt.current;if(!p||!P||!Bt(p))return!1;const B=p.offsetLeft,he=B+p.offsetWidth;return P.scrollLeft>=B-1&&P.scrollLeft+P.clientWidth<=he+1},ge=(p=(P=>(P=rt.current)==null?void 0:P.scrollLeft)()??0)=>{for(let he=0;he<dt.current.length;he+=1){const Le=dt.current[he];if(Le&&g(Le))return he}let B={flatIndex:0,distance:1/0};return dt.current.forEach((he,Le)=>{if(!he)return;const He=Math.abs(he.offsetLeft-p);He<B.distance&&(B={flatIndex:Le,distance:He})}),B.flatIndex},Re=p=>{rt.current&&dt.current.forEach(P=>{P&&(P.style.scrollSnapAlign=Bt(P)&&p==="backward"?"end":"start")})},Ie=(p,P,B)=>{const he=p-P,Le=ge(P),He=dt.current[Le];if(g(He))return ge(p)%t.length;const at=dt.current[Le+1],yt=He?at?at.offsetLeft-He.offsetLeft:He.offsetWidth:0,tn=yt>0?he>yt*Oo?1:he<-yt*Oo?-1:0:0;return tn===0?B:Mt?(B+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,B+tn))},Ze=a.useCallback((p=!1)=>{if(R!=="on"||o)return;const P=ht.current,B=v.current,he=xt.current[B];if(!P||!he||P.scrollWidth<=P.clientWidth)return;const Le=P.scrollLeft,He=Le+P.clientWidth,at=he.offsetLeft,yt=at+he.offsetWidth;if(at>=Le&&yt<=He)return;const tn=P.scrollWidth-P.clientWidth;let Yt=Le;if(!p&&Jt.current===null){const yi=xt.current[B-1],qi=xt.current[B+1],Eo=yi?he.offsetLeft-yi.offsetLeft:qi?qi.offsetLeft-he.offsetLeft:he.offsetWidth;yt>He?Yt+=Eo:at<Le&&(Yt-=Eo)}else yt>He?Yt=yt-P.clientWidth:Yt=at;P.scrollLeft=Math.max(0,Math.min(tn,Yt))},[o,R]),Et=a.useCallback((p=!1)=>{p&&(Oe.current=!0),Te.current===null&&(Te.current=requestAnimationFrame(()=>{Te.current=null;const P=Oe.current;Oe.current=!1,Ze(P)}))},[Ze]),Ve=a.useCallback(p=>{if(p===v.current)return;const P=v.current;v.current=p;const B=Math.abs(p-P)>1,he=Mt&&t.length>1&&(P===t.length-1&&p===0||P===0&&p===t.length-1);me(p),Et(B||he)},[t.length,Mt,Et]),it=()=>{if(!rt.current||t.length===0||Jt.current!==null||Qe.current.isActive&&Qe.current.hasMoved)return;const p=rt.current.scrollLeft,P=ge(p)%t.length;P!==v.current&&Ve(P)},jt=()=>{Jt.current=null},St=p=>{const P=rt.current;P&&(P.style.scrollSnapType=p?"":"none")},cn=()=>{var p;(p=Lt.current)==null||p.call(Lt),Lt.current=null},un=()=>{gt.current!==null&&(cancelAnimationFrame(gt.current),gt.current=null),It.current=!1},Jn=()=>{const p=rt.current;if(!p){gt.current=null,It.current=!1;return}const P=Pe.current-p.scrollLeft;if(Math.abs(P)<.5){p.scrollLeft=Pe.current,pt(),it(),gt.current=null,It.current=!1;return}p.scrollLeft+=P*sf,pt(),it(),_e(),gt.current=requestAnimationFrame(Jn)},Qn=()=>{const p=Ue.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},To=(p,P,B,he)=>{Qn(),p.scrollLeft=P,Ge.current=p.scrollLeft,pt(),B!==void 0?(v.current=B,me(B)):it(),St(!0),he==null||he()},Lo=(p,{behavior:P="smooth",activeIndex:B,onComplete:he}={})=>{const Le=rt.current,He=Ue.current;if(!Le||!He)return;if(un(),cn(),St(!1),P==="auto"){To(Le,p,B,he);return}const at=Math.abs(p-Le.scrollLeft),yt=Zh(at,tf,nf,Le.clientWidth*.55);Lt.current=ef(Le,He,p,{duration:yt,easing:of,onComplete:()=>{Lt.current=null,To(Le,p,B,he)}})},Rr=(p="smooth")=>{const P=rt.current;if(!P||t.length===0)return;const B=ge()%t.length,he=Ft(B,P.scrollLeft),Le=dt.current[he];Le&&Lo(Le.offsetLeft,{behavior:p,activeIndex:B})},Er=(p,P="smooth",B,he)=>{const Le=rt.current;if(!Le||t.length===0)return;const He=(he??Le.scrollLeft)-p,at=ge(p),yt=dt.current[at];if(g(yt)){St(!0),it();return}const tn=dt.current[at+1],Yt=yt?tn?tn.offsetLeft-yt.offsetLeft:yt.offsetWidth:0;if((Yt>0?He>Yt*Oo?1:He<-Yt*Oo?-1:0:0)!==0){const wc=B??at%t.length,Sc=Ie(he??Le.scrollLeft,p,wc);Sn(Sc,P);return}const qi=he??Le.scrollLeft,Eo=ge(qi),Xa=dt.current[Eo];if(Xa&&Math.abs(Xa.offsetLeft-qi)<1){St(!0),it();return}Rr("auto")},Sn=(p,P="smooth")=>{const B=rt.current;if(!B||t.length===0)return;const he=Ft(p,B.scrollLeft),Le=dt.current[he];Le&&(P==="smooth"?Jt.current=p:Jt.current=null,v.current=p,me(p),Et(!0),Lo(Le.offsetLeft,{behavior:P,activeIndex:p,onComplete:P==="smooth"?jt:void 0}))},fi=()=>{Tt.current&&(window.removeEventListener("pointerup",Tt.current),window.removeEventListener("pointercancel",Tt.current),Tt.current=null)},Io=(p,P,B,he,Le)=>{const He=B-p,at=he-P,yt=Math.abs(He),tn=Math.abs(at);if(yt<df||yt<=tn)return!1;const Yt=He<0?1:-1,yi=Mt?(Le+Yt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Le+Yt));return yi===Le?!1:(Sn(yi),!0)},ei=p=>{if(!Qe.current.isActive)return;fi();const P=rt.current;if(!P)return;const{scrollLeft:B,startActiveIndex:he,hasMoved:Le}=Qe.current,He=P.scrollLeft;pt(!0),Qe.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},bt(!1),p!==void 0&&P.hasPointerCapture(p)&&P.releasePointerCapture(p),Le?Er(B,"smooth",he,He):(St(!0),it()),_e()},Ro=(p,P)=>{const B=_t.current;_t.current=null,B&&(Io(B.startX,B.startY,p,P,B.startActiveIndex),_e())},kr=p=>{if(!we)return;if(p.pointerType==="touch"){if(un(),St(!0),Nt(p.target))return;_t.current={startX:p.clientX,startY:p.clientY,startActiveIndex:v.current};return}if(p.pointerType!=="mouse"||p.button!==0||Nt(p.target))return;const P=rt.current;if(!P)return;un(),cn(),Qn(),Jt.current=null,Qe.current={isActive:!0,startX:p.clientX,scrollLeft:P.scrollLeft,startActiveIndex:v.current,hasMoved:!1},St(!1),_e(),P.setPointerCapture(p.pointerId),fi();const B=he=>{he.pointerType==="mouse"&&ei(he.pointerId)};Tt.current=B,window.addEventListener("pointerup",B),window.addEventListener("pointercancel",B)},Mr=p=>{if(!we||p.pointerType!=="mouse")return;const P=rt.current;if(!P||!Qe.current.isActive)return;if(p.buttons===0){ei(p.pointerId);return}const B=p.clientX-Qe.current.startX;Math.abs(B)>cf&&(Qe.current.hasMoved=!0,bt(!0)),Qe.current.hasMoved&&(p.preventDefault(),P.scrollLeft=Qe.current.scrollLeft-B,pt(!0),it(),_e())},te=p=>{if(we){if(p.pointerType==="touch"){p.type==="pointerup"?Ro(p.clientX,p.clientY):_t.current=null;return}p.pointerType==="mouse"&&ei(p.pointerId)}},Ee=p=>{!we||p.pointerType!=="mouse"||ei(p.pointerId)};return gc(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Ut(!0));return()=>{cancelAnimationFrame(p),cn(),fi(),Te.current!==null&&(cancelAnimationFrame(Te.current),Te.current=null),Ne.current&&clearTimeout(Ne.current),ze.current&&clearTimeout(ze.current)}},[]),a.useEffect(()=>{if(!ke){ft(!0);return}_e();const p=$t.current;if(!p)return;const P=()=>_e();return p.addEventListener("pointermove",P),p.addEventListener("pointerdown",P),()=>{p.removeEventListener("pointermove",P),p.removeEventListener("pointerdown",P),ze.current&&clearTimeout(ze.current)}},[ke,_e]),a.useEffect(()=>{const p=P=>{P.key==="Escape"&&Je()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Je]),a.useLayoutEffect(()=>{Gt()},[A,t.length,Mt]),a.useLayoutEffect(()=>{o||Sn(v.current,"auto")},[A,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,Mt]),a.useEffect(()=>{const p=rt.current;if(!p||o||!ve)return;const P=B=>{if(B.preventDefault(),Math.abs(B.deltaY)<=Math.abs(B.deltaX))return;const he=B.deltaMode===1?lf:B.deltaMode===2?p.clientHeight:1,Le=B.deltaY*he*af;if(Le!==0){if(cn(),It.current||(It.current=!0,Pe.current=p.scrollLeft,Jt.current=null,St(!1)),Pe.current+=Le,!Mt){const He=p.scrollWidth-p.clientWidth;Pe.current=Math.max(0,Math.min(He,Pe.current))}_e(),gt.current===null&&(gt.current=requestAnimationFrame(Jn))}};return p.addEventListener("wheel",P,{passive:!1}),()=>{p.removeEventListener("wheel",P),un()}},[o,ve,Mt]),a.useEffect(()=>{const p=rt.current;if(!p)return;const P=()=>{pt(Qe.current.isActive);const he=p.scrollLeft,Le=he-Ge.current;Ge.current=he;const He=kt.current>0?kt.current*.5:1/0;if(Le!==0&&Math.abs(Le)<He){const at=Le>0?"forward":"backward";at!==qe.current&&(qe.current=at,Re(at))}Qe.current.isActive&&Qe.current.hasMoved||it()};p.addEventListener("scroll",P,{passive:!0});const B=new ResizeObserver(()=>{Gt(),pt(Qe.current.isActive),Re(qe.current),it()});return B.observe(p),()=>{cn(),p.removeEventListener("scroll",P),B.disconnect()}},[t.length,Mt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Je()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Rt?1:0,transition:`opacity ${io}ms ease`,pointerEvents:Rt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Vt}}),r.jsxs("div",{ref:$t,className:`${e}-lightbox-dismiss-area`,style:wt,...Qt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:zt,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:rt,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":we&&t.length>0?"true":"false","data-mouse-dragging":on?"true":"false",onPointerDown:kr,onPointerMove:Mr,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:Ee,children:r.jsx("div",{ref:Ue,className:`${e}-lightbox-strip-track`,style:{gap:A},children:en.map((p,P)=>{const B=p.image.objectFit??"contain",he=P%t.length,Le=Math.floor(P/t.length),He=zo(A),at=`calc(-0.5 * (${He} + ${A}))`;return r.jsxs("div",{ref:yt=>dt.current[P]=yt,className:`${e}-strip-item`,style:{height:M==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:p.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:B}}),o&&he<t.length-1&&Le===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:at,width:He,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Le}-${p.image.url}-${he}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":ut?"true":"false",style:Pt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:q,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:G,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${ye?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||b)&&r.jsx("div",{className:`${e}-header ${ye?`${e}-header-two-row`:`${e}-header-single-row`}`,children:ye?Ct():Se||b?lt():null})})})]}),t.length>1&&R==="on"&&(()=>{const p=zo(F),P=`calc(-0.5 * (${F} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:F},children:r.jsx("div",{ref:ht,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:B=>B.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":C,style:{gap:N,"--thumbnail-active-color":U},children:[t.map((B,he)=>{const Le=zo(N),He=`calc(-0.5 * (${Le} + ${N}))`;return r.jsxs("div",{ref:at=>{xt.current[he]=at},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":_===he?"true":"false",onClick:()=>ve&&$==="click"&&Sn(he),onMouseEnter:()=>Me&&$==="hover"&&Sn(he),"aria-label":B.image.name?`View ${B.image.name}`:`View image ${he+1}`,"aria-current":_===he?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${X?` ${e}-thumb-image-cover`:""}`,src:B.image.url,alt:"",draggable:!1,style:{...ue,maxWidth:D,maxHeight:D,width:E.display==="cover"?"auto":"100%",height:"auto",objectFit:E.display==="cover"?"cover":"contain"}})}),o&&he<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:He,width:Le,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${B.image.url}-${he}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:P,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Sf(e){return`
12993
13022
  .${e}-wrapper {
12994
13023
  position: relative;
12995
13024
  width: 100%;
@@ -13386,7 +13415,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
13386
13415
  pointer-events: auto;
13387
13416
  z-index: 10;
13388
13417
  }
13389
- `}const $f=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:l}=y.useScopedStyles(),{cover:d,coverFit:c}=e,u=a.useRef(null),[m,x]=a.useState(!1),b=t??[],$=m&&b.length>0,h=()=>{b.length!==0&&x(!0)};return a.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Sf(l)}}),d&&r.jsx("div",{className:`${l}-cover ${Fn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...Fn(c)?{"--image-aspect-ratio":Lr(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${l}-cover-image ${Fn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),$&&typeof document<"u"&&(()=>{const w=(s?document.getElementById(s):null)??document.body;return gi.createPortal(r.jsx(wf,{prefix:l,images:b,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),w)})()]})},Cf=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
13418
+ `}const $f=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l})=>{const{prefix:s}=y.useScopedStyles(),{cover:d,coverFit:c}=e,u=a.useRef(null),[m,x]=a.useState(!1),b=t??[],T=m&&b.length>0,f=()=>{b.length!==0&&x(!0)};return a.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:u,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Sf(s)}}),d&&r.jsx("div",{className:`${s}-cover ${Fn(c)?`${s}-ratio-wrapper-cover`:`${s}-ratio-wrapper-fit`}`,onClick:()=>f(),style:{...Fn(c)?{"--image-aspect-ratio":Lr(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${s}-cover-image ${Fn(c)?`${s}-cover-image-cover`:`${s}-cover-image-fit`}`,src:d,alt:"cover"})})]}),T&&typeof document<"u"&&(()=>{const L=(l?document.getElementById(l):null)??document.body;return gi.createPortal(r.jsx(wf,{prefix:s,images:b,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),L)})()]})},Cf=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
13390
13419
  import { createPortal } from 'react-dom';
13391
13420
  import { CommonComponentProps } from '../props';
13392
13421
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -13944,7 +13973,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
13944
13973
  </>
13945
13974
  );
13946
13975
  };
13947
- `,Tf="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ai={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Lf(e){const t={};return t[Ht(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ht(e,"fontSettings")]={...ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ht(e,"fontSize")]={...ai.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ht(e,"lineHeight")]={...ai.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ht(e,"letterSpacing")]={...ai.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ht(e,"wordSpacing")]={...ai.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ht(e,"textAlign")]={...ai.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ht(e,"textAppearance")]={...ai.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const If=Hi.reduce((e,t)=>({...e,...Lf(t)}),{}),Rf=Hi.reduce((e,t)=>({...e,[Ht(t,"fontFamily")]:"Goudy Bookletter 1911",[Ht(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ht(t,"letterSpacing")]:0,[Ht(t,"wordSpacing")]:0,[Ht(t,"textAlign")]:"left",[Ht(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Zr(e){return Hi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ht(n,"fontSize")]=i),o!==void 0&&(t[Ht(n,"lineHeight")]=o),t},{})}const Ef=vf(),Mf={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...If,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Tf,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Rf},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...Zr({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...Zr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...Zr({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Ef]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},kf={element:$f,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Mf,sourceCode:Cf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Hi.map(e=>({path:`${Ht(e,"fontFamily")}`}))]},fontRelations:{...Hi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ht(t,"fontFamily")}`}),{})}},Pf=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:m})=>{const{type:x,coverFit:b,backgroundColor:$,imageGap:h,maxWidth:w,maxHeight:C,textTransition:R,title1Width:A,title2Width:T,title3Width:N,title1MarginLeft:E=0,title2MarginLeft:V=0,title3MarginLeft:L=0,titleRowMarginBottom:I=0,titleHeaderLayout:_="single-row",countCloseGap:f=0,closeIcon:S,closeIconMaxWidth:M,closeIconColor:z,closeIconHoverColor:K,contentMarginTop:ae=0,iconMarginRight:Q=0}=n,G=a.useCallback(ne=>y.scalingValue(ne,i??!1),[i]),H=G(h??0),k=`${w}%`,F=`${C}%`,X=G(f),B=G(ae),U=G(Q),j=ci("title1",li(n,"title1"),i),xe=ci("title2",li(n,"title2"),i),v=ci("title3",li(n,"title3"),i),he=ci("count",li(n,"count"),i),Y=_==="mobile",le=!i||!!s,$e=!o&&(!i||!!s),re=a.useMemo(()=>Yo(t,x),[t,x]),[be,Z]=a.useState(l),fe=re[be],ye=fe==null?void 0:fe.entry,[ke,J]=a.useState(!1),[Ce,ce]=a.useState(null),[ve,Se]=a.useState(!1),[D,ie]=a.useState(null),[W,oe]=a.useState(!1),[te,ge]=a.useState(0),[de,we]=a.useState(),[Me,ee]=a.useState(),[ue,Ae]=a.useState(null),se=a.useRef(null),q=a.useRef(0),je=a.useRef(0),We=a.useRef(0),et=a.useRef(!1),Ye=a.useRef(null),lt=a.useRef(null),mt=a.useRef(null),De=a.useRef(null),ot=a.useRef(null),$t=a.useRef(null),rt=a.useRef(null),Ue=a.useCallback(()=>{const ne=lt.current;if(!ne)return;const Ee=ne.closest(`.${e}-lightbox-content-area`);if(!Ee)return ne.getBoundingClientRect().width;const p=Array.from(Ee.children).reduce((P,O)=>!(O instanceof HTMLElement)||O.contains(ne)?P:P+O.getBoundingClientRect().width,0);return Ee.getBoundingClientRect().width-p},[e]),ht=a.useCallback(()=>{se.current&&(clearTimeout(se.current),se.current=null)},[]),xt=a.useCallback(ne=>{ne===q.current&&(ie(null),oe(!1))},[]),dt=a.useCallback(()=>{o||et.current||(et.current=!0,u==null||u(),J(!1),Ye.current=setTimeout(()=>{m()},300))},[o,u,m]),Mt=a.useCallback(ne=>!!(ne.closest("[data-controls]")||ne.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:_t,backdropStyle:Qe,mediaAreaStyle:Tt,overlayContentStyle:Lt,swipeHandlers:Ge,dismissAreaStyle:qe}=mc({enabled:$e,onClose:dt,animMs:300,isBlockedTarget:Mt}),Pe=a.useCallback(ne=>{d&&Xl(ne+1,c,!0)},[d,c]),gt=a.useCallback(ne=>{if(ne)return ne.getBoundingClientRect().height},[]),It=a.useCallback(ne=>{if(re.length===0)return;const Ee=(ne%re.length+re.length)%re.length;if(Ee===be)return;const p=re[be],P=re[Ee];q.current+=1;const O=q.current,me=R==="fade"&&Is(p==null?void 0:p.entry)!==Is(P==null?void 0:P.entry),Le=gt(mt.current),He=me?(()=>{const yt=Ue();gi.flushSync(()=>{Ae(P.entry)}),mt.current&&yt&&(mt.current.style.width=`${yt}px`);const tn=gt(mt.current);return mt.current&&(mt.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:yt}})():void 0,at=Math.max(Le??0,(He==null?void 0:He.measuredIncomingTitlesHeight)??0)||void 0;ge(O),ie(be),oe(!0),Z(Ee),Pe(Ee),We.current=Ee,me?(ht(),at&&we(at),He!=null&&He.incomingTitlesMeasureWidth&&ee(He.incomingTitlesMeasureWidth),ce((p==null?void 0:p.entryIndex)??null),Se(!0),je.current=P.entryIndex,se.current=setTimeout(()=>{ce(null),Se(!1),we(void 0),ee(void 0),Ae(null),se.current=null},400)):(ht(),ce(null),Se(!1),we(void 0),ee(void 0),Ae(null),je.current=P.entryIndex)},[be,ht,Ue,gt,re,Pe,R]),kt=a.useCallback(()=>{rt.current=null},[]),Dt=a.useCallback(ne=>{!le||re.length<=1||ne.pointerType==="mouse"&&ne.button!==0||ne.target.closest("[data-controls]")||(rt.current={startX:ne.clientX,startY:ne.clientY,pointerId:ne.pointerId})},[le,re.length]),en=a.useCallback(ne=>{var yt;if(!le||re.length<=1||ne.pointerType==="mouse"&&ne.button!==0)return;if(_t){kt();return}const Ee=rt.current;if(!Ee||Ee.pointerId!==ne.pointerId||(kt(),ne.target.closest("[data-controls]")))return;const P=ne.clientX-Ee.startX,O=ne.clientY-Ee.startY,me=Math.abs(P),Le=Math.abs(O);if(me>=Gm&&me>Le){It(P>0?be-1:be+1);return}if(me>$s||Le>$s)return;const He=(yt=De.current)==null?void 0:yt.getBoundingClientRect(),at=He?He.left+He.width/2:window.innerWidth/2;It(ne.clientX<at?be-1:be+1)},[be,le,It,_t,kt,re.length]),on=a.useCallback(ne=>{const Ee=rt.current;(Ee==null?void 0:Ee.pointerId)===ne.pointerId&&kt()},[kt]);gc(),a.useEffect(()=>{$t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const ne=requestAnimationFrame(()=>{J(!0),requestAnimationFrame(()=>{ot.current?ot.current.focus():De.current&&De.current.focus()})});return()=>{cancelAnimationFrame(ne),Ye.current&&clearTimeout(Ye.current),se.current&&clearTimeout(se.current);const Ee=$t.current;Ee&&document.contains(Ee)&&Ee.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var ne;R!=="fade"&&(je.current=((ne=re[be])==null?void 0:ne.entryIndex)??0,ht(),ce(null),Se(!1),we(void 0),ee(void 0))},[be,ht,re,R]),a.useEffect(()=>{const ne=Ee=>{if(Ee.key==="Escape"){dt();return}if(Ee.key==="ArrowLeft"&&re.length>1){It(be-1);return}if(Ee.key==="ArrowRight"&&re.length>1){It(be+1);return}if(Ee.key==="Tab"&&De.current){const p=De.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),P=Array.from(p).filter(He=>!He.closest('[aria-hidden="true"]'));if(P.length===0)return;const O=P[0],me=P[P.length-1],Le=document.activeElement;Ee.shiftKey?(Le===O||!De.current.contains(Le))&&(Ee.preventDefault(),me.focus()):(Le===me||!De.current.contains(Le))&&(Ee.preventDefault(),O.focus())}};return window.addEventListener("keydown",ne),()=>window.removeEventListener("keydown",ne)},[It,dt,be,re.length]),a.useLayoutEffect(()=>{ht(),q.current=0,ge(0),ie(null),oe(!1),ce(null),Se(!1),we(void 0),ee(void 0),Ae(null),Z(ne=>{const Ee=Math.max(0,re.length-1);return Math.min(ne,Ee)})},[ht,t.length,x,re.length]),a.useLayoutEffect(()=>{var p;const ne=Math.max(0,re.length-1),Ee=Math.min(Math.max(0,l),ne);We.current=Ee,je.current=((p=re[Ee])==null?void 0:p.entryIndex)??0,Z(Ee)},[l]);const bt=Ce!==null?t[Ce]:null,Rt=D!==null?re[D]:null,Ut=(ye==null?void 0:ye.title1)||(ye==null?void 0:ye.title2)||(ye==null?void 0:ye.title3)||(bt==null?void 0:bt.title1)||(bt==null?void 0:bt.title2)||(bt==null?void 0:bt.title3),Kt=Qm(x,re,t),ft=S!==null,Jt=Ut||Kt||ft,Te=Kt&&ft?{gap:X}:void 0,Oe=`${e}-titles-stack${Y?` ${e}-titles-stack-stacked`:""}`,Ke=`${e}-titles-layer-out${Y?` ${e}-titles-layer-out-stacked`:""}`,Ne=`${e}-titles-layer-out`,ze=(E??0)>0||o,ut=G(I),_e=a.useMemo(()=>({title1Width:A??Ii.title1Width,title2Width:T??Ii.title2Width,title3Width:N??Ii.title3Width}),[A,T,N]),Je=a.useMemo(()=>({title2MarginLeft:V,title3MarginLeft:L}),[V,L]),tt=a.useMemo(()=>ye?Dn(e,ye,j,xe,v):[],[e,ye,j,xe,v]),Wt=a.useMemo(()=>tt.map(ne=>_e[ne.widthKey]),[tt,_e]),Ct=a.useMemo(()=>Pi(tt.length,Wt),[tt.length,Wt]),st=a.useMemo(()=>po(tt.length,Wt),[tt.length,Wt]),Nt=a.useMemo(()=>tt.filter(ne=>ne.prefix==="title1"),[tt]),At=a.useMemo(()=>tt.filter(ne=>ne.prefix==="title2"||ne.prefix==="title3"),[tt]),Vt=a.useMemo(()=>Vn(Nt,_e),[Nt,_e]),zt=a.useMemo(()=>Vn(At,_e),[At,_e]),Pt=a.useCallback((ne,Ee)=>{const p=tt.findIndex(O=>O.prefix===ne.prefix);if(!Y||Ee==="single-row")return{effectiveWidth:st[p]??0,resolvedWidth:Ct[p]??0,maxWidth:sn(p,Ct)};if(Ee==="two-row-top"){const O=Nt.findIndex(me=>me.prefix===ne.prefix);return{effectiveWidth:Vt.effective[O]??0,resolvedWidth:Vt.resolved[O]??0,maxWidth:sn(O,Vt.resolved)}}const P=At.findIndex(O=>O.prefix===ne.prefix);return{effectiveWidth:zt.effective[P]??0,resolvedWidth:zt.resolved[P]??0,maxWidth:sn(P,zt.resolved)}},[tt,At,zt,st,Ct,Nt,Vt,Y]),Qt=a.useCallback(ne=>Ql(tt,Ct,Je,ne)+(Y?0:E??0),[tt,Ct,Je,Y,E]),wt=a.useCallback(()=>Y?0:E??0,[Y,E]),Gt=a.useCallback(ne=>At.slice(0,ne).reduce((Ee,p,P)=>Ee+(p.marginLeftKey?Je[p.marginLeftKey]??0:0)+(zt.resolved[P]??0),0),[At,zt.resolved,Je]),pt=a.useCallback(ne=>{const Ee=At[ne];return Gt(ne)+(Ee.marginLeftKey?Je[Ee.marginLeftKey]??0:0)+(zt.resolved[ne]??0)},[At,zt.resolved,Gt,Je]),Ft=a.useCallback((ne,Ee,p)=>{if(!Y||p==="single-row"){const He=ne.findIndex(Yt=>Yt.prefix===Ee.prefix),at=ne.map(Yt=>_e[Yt.widthKey]),yt=Pi(ne.length,at);return{effectiveWidth:po(ne.length,at)[He]??0,resolvedWidth:yt[He]??0,maxWidth:sn(He,yt)}}if(p==="two-row-top"){const He=ne.filter(Yt=>Yt.prefix==="title1"),at=He.findIndex(Yt=>Yt.prefix===Ee.prefix),{resolved:yt,effective:tn}=Vn(He,_e);return{effectiveWidth:tn[at]??0,resolvedWidth:yt[at]??0,maxWidth:sn(at,yt)}}const P=ne.filter(He=>He.prefix==="title2"||He.prefix==="title3"),O=P.findIndex(He=>He.prefix===Ee.prefix),{resolved:me,effective:Le}=Vn(P,_e);return{effectiveWidth:Le[O]??0,resolvedWidth:me[O]??0,maxWidth:sn(O,me)}},[_e,Y]),Bt=(ne,Ee,p)=>{const P=ne.marginLeftKey?Je[ne.marginLeftKey]??0:0,{effectiveWidth:O,resolvedWidth:me,maxWidth:Le}=p??Pt(ne,Ee),He=Math.max(P,Bn),at=o&&Ee==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":ne.prefix,style:{width:G(O),...P>0?{marginLeft:G(P)}:{}},children:[r.jsx("p",{className:ne.className,style:ne.style,children:ne.text}),at&&ne.marginLeftKey?r.jsx("div",{"data-controls":ne.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(me),style:{position:"absolute",top:0,left:G(-P),width:G(He),height:"100%",pointerEvents:"auto"}}):null,at?r.jsx("div",{"data-controls":ne.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:G(-hn/2),width:G(hn),height:"100%",pointerEvents:"auto"}}):null]},ne.className)},g=(ne="two-row")=>{const Ee=tt.findIndex(O=>O.prefix==="title1"),p=Ee>=0?Ct[Ee]:_e.title1Width,P=ne==="two-row"&&o;return r.jsx("div",{...P?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:G(E??0),flexShrink:0,alignSelf:"stretch",...P?{pointerEvents:"auto"}:{}}})},pe=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:j,"aria-hidden":"true",children:" "}),Re=()=>r.jsx("span",{className:`${e}-entry-counter`,style:he,"aria-live":"polite","aria-atomic":"true",children:Jm(re,be,x,t)}),Ie=()=>Kt?o&&ft?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Re(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Br(X)} + ${X}))`,width:Br(X),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Re():null,Ze=()=>!Kt&&!ft?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Te,children:[Ie(),ft?it():null]}),Et=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||Ut?pe():null,ze?g("single-row"):null,St(ye),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Ze(),Sn()]}),Ve=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||Ut?pe():null,ze?g("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:ve&&de?{minHeight:de}:void 0,children:[r.jsx("div",{ref:mt,className:Oe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Qn(ue||ye)}),r.jsxs("div",{ref:lt,className:Oe,style:{position:ve?"absolute":"relative",inset:ve?0:void 0,width:"100%",...ve&&Me?{width:Me,maxWidth:"100%"}:void 0},children:[bt&&ve?r.jsx("div",{className:`${Ke} ${e}-titles-fade-out`,children:Qn(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ve?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Qn(ye)})]})]}),Ze(),Sn()]}),it=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(M??0,i),height:y.scalingValue(M??0,i),marginRight:U,"--close-icon-hover-color":K},children:[r.jsx("button",{ref:ot,type:"button",className:`${e}-close-icon-inner`,onClick:dt,"aria-label":"Close",children:r.jsx(rn,{url:S??"",fill:z,hoverFill:i&&!s?z:K,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:U,height:"100%",pointerEvents:"auto"}})]}),jt=(ne,Ee)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Kt||Ut?pe():null,ze?g("two-row"):null,Ee!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ee},children:ne}):r.jsxs(r.Fragment,{children:[ne,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Ze()]}),St=ne=>{if(!ne)return null;const Ee=Dn(e,ne,j,xe,v);return r.jsx(r.Fragment,{children:Ee.map(p=>Bt(p,"single-row",Ft(Ee,p,"single-row")))})},cn=ne=>{if(!ne)return null;const Ee=Dn(e,ne,j,xe,v),p=Ee.find(P=>P.prefix==="title1");return p?Bt(p,"two-row-top",Ft(Ee,p,"two-row-top")):null},un=(ne,Ee=!1)=>{const p=ne?Dn(e,ne,j,xe,v):[],P=p.filter(Le=>Le.prefix==="title2"||Le.prefix==="title3"),O=o&&Ee;return P.length>0||O||(I??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[P.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[P.map(Le=>Bt(Le,"two-row-bottom",Ft(p,Le,"two-row-bottom"))),Ee&&o?r.jsxs(r.Fragment,{children:[Rr(),Er()]}):null]}):null,(I??0)>0||O?r.jsx("div",{"data-controls":O?"titleRowMarginBottom":void 0,"data-controls-axis":O?"y":void 0,"data-controls-reverse":O?"":void 0,className:O?`${e}-control`:void 0,style:{height:ut,width:"100%",flexShrink:0,pointerEvents:O?"auto":"none"}}):null]}):null},Jn=(ne,Ee=!1)=>r.jsxs(r.Fragment,{children:[jt(cn(ne)),un(ne,Ee)]}),Qn=ne=>Y?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Jn(ne)}):ne?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:St(ne)}):null,To=()=>{const ne=Y?-1:tt.findIndex(P=>P.prefix==="title1"),Ee=!Y&&(o||(E??0)>0)?(()=>{const P=E??0,O=ne>=0?Ct[ne]:_e.title1Width,me=Math.max(P,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(O),style:{position:"absolute",top:0,left:0,width:G(me),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=tt.flatMap((P,O)=>{if(!P.marginLeftKey)return[];const me=Je[P.marginLeftKey]??0,Le=Jl(tt,Ct,Je,O)+wt(),He=Math.max(me,Bn);return r.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ct[O]),style:{position:"absolute",top:0,left:G(Le),width:G(He),height:"100%",pointerEvents:"auto"}},P.marginLeftKey)});return Ee?[Ee,...p]:p},Lo=()=>tt.map((ne,Ee)=>{const p=sn(Ee,Ct),O=Qt(Ee)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ne.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(O),width:G(hn),height:"100%",pointerEvents:"auto"}})},`${ne.widthKey}-junction`)}),Rr=()=>At.flatMap((ne,Ee)=>{if(!ne.marginLeftKey)return[];const p=Je[ne.marginLeftKey]??0,P=Gt(Ee),O=Math.max(p,Bn),{resolvedWidth:me}=Pt(ne,"two-row-bottom");return r.jsx("div",{"data-controls":ne.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(me),style:{position:"absolute",top:0,left:G(P),width:G(O),height:"100%",pointerEvents:"auto"}},ne.marginLeftKey)}),Er=()=>At.map((ne,Ee)=>{const{maxWidth:p}=Pt(ne,"two-row-bottom"),O=pt(Ee)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ne.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(O),width:G(hn),height:"100%",pointerEvents:"auto"}})},`${ne.widthKey}-junction`)}),Sn=()=>!o||Y?null:r.jsxs(r.Fragment,{children:[To(),Lo()]}),fi=ne=>{const Ee=!ne.objectFit&&Fn(b);return{className:`${e}-slide-image-cell${Ee?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:k,maxHeight:F,...Ee?{"--image-aspect-ratio":Lr(b)}:{}}}},Io=ne=>ne.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":ne.objectFit}}:Fn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ei=ne=>{if(ne.length===0)return null;const Ee=ne.length>1,p=Br(H),P=`calc(-0.5 * (${p} + ${H}))`;if(ne.length===1){const O=ne[0];return r.jsx("div",{...fi(O),children:r.jsx("img",{...Io(O),src:O.url,alt:O.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Ee?{gap:H}:void 0,children:ne.map((O,me)=>r.jsxs("div",{...fi(O),children:[r.jsx("img",{...Io(O),src:O.url,alt:O.name??"",draggable:!1}),o&&Ee&&me<ne.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:P,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${O.url}-${me}`))})},Ro=!!(ye!=null&&ye.title2||ye!=null&&ye.title3||bt!=null&&bt.title2||bt!=null&&bt.title3||(I??0)>0||o),Mr=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:mt,className:Oe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Jn(ue||ye)}),r.jsxs("div",{ref:lt,className:`${e}-titles-row-two-row`,style:{...ve&&de?{minHeight:de}:void 0,...ve&&Me?{width:Me,maxWidth:"100%"}:void 0},children:[jt(r.jsxs("div",{className:Oe,style:{position:ve?"absolute":"relative",inset:ve?0:void 0,width:"100%"},children:[bt&&ve?r.jsx("div",{className:`${Ne} ${e}-titles-fade-out`,children:cn(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ve?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:cn(ye)})]}),ve&&de?de:void 0),Ro?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[bt&&ve?r.jsx("div",{className:`${Ke} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:un(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ve?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${Y?` ${e}-titles-layer-in-stacked`:""}`,children:un(ye,!0)})]}):null]})]}),kr=()=>{const ne=Ro;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ne?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:ne?void 0:{flex:"0 0 auto",height:"auto"},children:Jn(ye,!0)}),Sn()]})};return r.jsxs("div",{ref:De,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{_t||dt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:ke?1:0,transition:"opacity 300ms ease",pointerEvents:ke?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:$,...Qe}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...Ge,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Tt,onClick:ne=>ne.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":le&&re.length>1?"true":"false",onPointerDown:le?Dt:void 0,onPointerUp:le?en:void 0,onPointerCancel:le?on:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Rt&&W?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:ne=>{ne.target===ne.currentTarget&&xt(te)},children:r.jsx("div",{className:`${e}-slide-area`,children:ei(Rt.images)})},`slide-out-${te}`):null,r.jsx("div",{className:`${e}-slide-layer-in${W?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:fe?ei(fe.images):null})},`slide-in-${te}-${be}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Lt,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:B,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...Y?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${Y?` ${e}-lightbox-content-area-stacked`:""}`,children:Jt&&r.jsx("div",{className:`${e}-text-bar-cell${Y?` ${e}-text-bar-cell-stacked`:""}`,style:Y?void 0:{flex:1,minWidth:0,width:"100%"},children:Y?R==="fade"?Mr():kr():R==="fade"?Ve():Et()})})})]})]})]})};function Af(e){return`
13976
+ `,Tf="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ai={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Lf(e){const t={};return t[Ht(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ht(e,"fontSettings")]={...ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ht(e,"fontSize")]={...ai.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ht(e,"lineHeight")]={...ai.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ht(e,"letterSpacing")]={...ai.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ht(e,"wordSpacing")]={...ai.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ht(e,"textAlign")]={...ai.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ht(e,"textAppearance")]={...ai.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const If=Hi.reduce((e,t)=>({...e,...Lf(t)}),{}),Rf=Hi.reduce((e,t)=>({...e,[Ht(t,"fontFamily")]:"Goudy Bookletter 1911",[Ht(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ht(t,"letterSpacing")]:0,[Ht(t,"wordSpacing")]:0,[Ht(t,"textAlign")]:"left",[Ht(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Zr(e){return Hi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ht(n,"fontSize")]=i),o!==void 0&&(t[Ht(n,"lineHeight")]=o),t},{})}const Ef=vf(),kf={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...If,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Tf,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Rf},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...Zr({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...Zr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...Zr({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Ef]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Mf={element:$f,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:kf,sourceCode:Cf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Hi.map(e=>({path:`${Ht(e,"fontFamily")}`}))]},fontRelations:{...Hi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ht(t,"fontFamily")}`}),{})}},Pf=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,initialSlideIndex:s=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:m})=>{const{type:x,coverFit:b,backgroundColor:T,imageGap:f,maxWidth:L,maxHeight:$,textTransition:R,title1Width:E,title2Width:C,title3Width:U,title1MarginLeft:k=0,title2MarginLeft:j=0,title3MarginLeft:I=0,titleRowMarginBottom:w=0,titleHeaderLayout:W="single-row",countCloseGap:h=0,closeIcon:S,closeIconMaxWidth:M,closeIconColor:z,closeIconHoverColor:K,contentMarginTop:le=0,iconMarginRight:Y=0}=n,D=a.useCallback(te=>y.scalingValue(te,i??!1),[i]),N=D(f??0),F=`${L}%`,A=`${$}%`,q=D(h),G=D(le),Z=D(Y),_=ci("title1",si(n,"title1"),i),me=ci("title2",si(n,"title2"),i),v=ci("title3",si(n,"title3"),i),fe=ci("count",si(n,"count"),i),J=W==="mobile",de=!i||!!l,$e=!o&&(!i||!!l),oe=a.useMemo(()=>Yo(t,x),[t,x]),[xe,Q]=a.useState(s),ye=oe[xe],ve=ye==null?void 0:ye.entry,[ke,we]=a.useState(!1),[Me,X]=a.useState(null),[ue,Se]=a.useState(!1),[O,ce]=a.useState(null),[H,re]=a.useState(!1),[ae,ne]=a.useState(0),[ie,be]=a.useState(),[Ce,ee]=a.useState(),[pe,Ae]=a.useState(null),se=a.useRef(null),V=a.useRef(0),je=a.useRef(0),We=a.useRef(0),et=a.useRef(!1),Ye=a.useRef(null),st=a.useRef(null),mt=a.useRef(null),De=a.useRef(null),ot=a.useRef(null),$t=a.useRef(null),rt=a.useRef(null),Ue=a.useCallback(()=>{const te=st.current;if(!te)return;const Ee=te.closest(`.${e}-lightbox-content-area`);if(!Ee)return te.getBoundingClientRect().width;const p=Array.from(Ee.children).reduce((P,B)=>!(B instanceof HTMLElement)||B.contains(te)?P:P+B.getBoundingClientRect().width,0);return Ee.getBoundingClientRect().width-p},[e]),ht=a.useCallback(()=>{se.current&&(clearTimeout(se.current),se.current=null)},[]),xt=a.useCallback(te=>{te===V.current&&(ce(null),re(!1))},[]),dt=a.useCallback(()=>{o||et.current||(et.current=!0,u==null||u(),we(!1),Ye.current=setTimeout(()=>{m()},300))},[o,u,m]),kt=a.useCallback(te=>!!(te.closest("[data-controls]")||te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:_t,backdropStyle:Qe,mediaAreaStyle:Tt,overlayContentStyle:Lt,swipeHandlers:Ge,dismissAreaStyle:qe}=mc({enabled:$e,onClose:dt,animMs:300,isBlockedTarget:kt}),Pe=a.useCallback(te=>{d&&Xs(te+1,c,!0)},[d,c]),gt=a.useCallback(te=>{if(te)return te.getBoundingClientRect().height},[]),It=a.useCallback(te=>{if(oe.length===0)return;const Ee=(te%oe.length+oe.length)%oe.length;if(Ee===xe)return;const p=oe[xe],P=oe[Ee];V.current+=1;const B=V.current,he=R==="fade"&&Il(p==null?void 0:p.entry)!==Il(P==null?void 0:P.entry),Le=gt(mt.current),He=he?(()=>{const yt=Ue();gi.flushSync(()=>{Ae(P.entry)}),mt.current&&yt&&(mt.current.style.width=`${yt}px`);const tn=gt(mt.current);return mt.current&&(mt.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:yt}})():void 0,at=Math.max(Le??0,(He==null?void 0:He.measuredIncomingTitlesHeight)??0)||void 0;ne(B),ce(xe),re(!0),Q(Ee),Pe(Ee),We.current=Ee,he?(ht(),at&&be(at),He!=null&&He.incomingTitlesMeasureWidth&&ee(He.incomingTitlesMeasureWidth),X((p==null?void 0:p.entryIndex)??null),Se(!0),je.current=P.entryIndex,se.current=setTimeout(()=>{X(null),Se(!1),be(void 0),ee(void 0),Ae(null),se.current=null},400)):(ht(),X(null),Se(!1),be(void 0),ee(void 0),Ae(null),je.current=P.entryIndex)},[xe,ht,Ue,gt,oe,Pe,R]),Mt=a.useCallback(()=>{rt.current=null},[]),Dt=a.useCallback(te=>{!de||oe.length<=1||te.pointerType==="mouse"&&te.button!==0||te.target.closest("[data-controls]")||(rt.current={startX:te.clientX,startY:te.clientY,pointerId:te.pointerId})},[de,oe.length]),en=a.useCallback(te=>{var yt;if(!de||oe.length<=1||te.pointerType==="mouse"&&te.button!==0)return;if(_t){Mt();return}const Ee=rt.current;if(!Ee||Ee.pointerId!==te.pointerId||(Mt(),te.target.closest("[data-controls]")))return;const P=te.clientX-Ee.startX,B=te.clientY-Ee.startY,he=Math.abs(P),Le=Math.abs(B);if(he>=Gm&&he>Le){It(P>0?xe-1:xe+1);return}if(he>$l||Le>$l)return;const He=(yt=De.current)==null?void 0:yt.getBoundingClientRect(),at=He?He.left+He.width/2:window.innerWidth/2;It(te.clientX<at?xe-1:xe+1)},[xe,de,It,_t,Mt,oe.length]),on=a.useCallback(te=>{const Ee=rt.current;(Ee==null?void 0:Ee.pointerId)===te.pointerId&&Mt()},[Mt]);gc(),a.useEffect(()=>{$t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const te=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{ot.current?ot.current.focus():De.current&&De.current.focus()})});return()=>{cancelAnimationFrame(te),Ye.current&&clearTimeout(Ye.current),se.current&&clearTimeout(se.current);const Ee=$t.current;Ee&&document.contains(Ee)&&Ee.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var te;R!=="fade"&&(je.current=((te=oe[xe])==null?void 0:te.entryIndex)??0,ht(),X(null),Se(!1),be(void 0),ee(void 0))},[xe,ht,oe,R]),a.useEffect(()=>{const te=Ee=>{if(Ee.key==="Escape"){dt();return}if(Ee.key==="ArrowLeft"&&oe.length>1){It(xe-1);return}if(Ee.key==="ArrowRight"&&oe.length>1){It(xe+1);return}if(Ee.key==="Tab"&&De.current){const p=De.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),P=Array.from(p).filter(He=>!He.closest('[aria-hidden="true"]'));if(P.length===0)return;const B=P[0],he=P[P.length-1],Le=document.activeElement;Ee.shiftKey?(Le===B||!De.current.contains(Le))&&(Ee.preventDefault(),he.focus()):(Le===he||!De.current.contains(Le))&&(Ee.preventDefault(),B.focus())}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[It,dt,xe,oe.length]),a.useLayoutEffect(()=>{ht(),V.current=0,ne(0),ce(null),re(!1),X(null),Se(!1),be(void 0),ee(void 0),Ae(null),Q(te=>{const Ee=Math.max(0,oe.length-1);return Math.min(te,Ee)})},[ht,t.length,x,oe.length]),a.useLayoutEffect(()=>{var p;const te=Math.max(0,oe.length-1),Ee=Math.min(Math.max(0,s),te);We.current=Ee,je.current=((p=oe[Ee])==null?void 0:p.entryIndex)??0,Q(Ee)},[s]);const bt=Me!==null?t[Me]:null,Rt=O!==null?oe[O]:null,Ut=(ve==null?void 0:ve.title1)||(ve==null?void 0:ve.title2)||(ve==null?void 0:ve.title3)||(bt==null?void 0:bt.title1)||(bt==null?void 0:bt.title2)||(bt==null?void 0:bt.title3),Kt=Qm(x,oe,t),ft=S!==null,Jt=Ut||Kt||ft,Te=Kt&&ft?{gap:q}:void 0,Oe=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,Ke=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,Ne=`${e}-titles-layer-out`,ze=(k??0)>0||o,ut=D(w),_e=a.useMemo(()=>({title1Width:E??Ii.title1Width,title2Width:C??Ii.title2Width,title3Width:U??Ii.title3Width}),[E,C,U]),Je=a.useMemo(()=>({title2MarginLeft:j,title3MarginLeft:I}),[j,I]),tt=a.useMemo(()=>ve?Dn(e,ve,_,me,v):[],[e,ve,_,me,v]),Wt=a.useMemo(()=>tt.map(te=>_e[te.widthKey]),[tt,_e]),Ct=a.useMemo(()=>Pi(tt.length,Wt),[tt.length,Wt]),lt=a.useMemo(()=>po(tt.length,Wt),[tt.length,Wt]),Nt=a.useMemo(()=>tt.filter(te=>te.prefix==="title1"),[tt]),At=a.useMemo(()=>tt.filter(te=>te.prefix==="title2"||te.prefix==="title3"),[tt]),Vt=a.useMemo(()=>Vn(Nt,_e),[Nt,_e]),zt=a.useMemo(()=>Vn(At,_e),[At,_e]),Pt=a.useCallback((te,Ee)=>{const p=tt.findIndex(B=>B.prefix===te.prefix);if(!J||Ee==="single-row")return{effectiveWidth:lt[p]??0,resolvedWidth:Ct[p]??0,maxWidth:ln(p,Ct)};if(Ee==="two-row-top"){const B=Nt.findIndex(he=>he.prefix===te.prefix);return{effectiveWidth:Vt.effective[B]??0,resolvedWidth:Vt.resolved[B]??0,maxWidth:ln(B,Vt.resolved)}}const P=At.findIndex(B=>B.prefix===te.prefix);return{effectiveWidth:zt.effective[P]??0,resolvedWidth:zt.resolved[P]??0,maxWidth:ln(P,zt.resolved)}},[tt,At,zt,lt,Ct,Nt,Vt,J]),Qt=a.useCallback(te=>Qs(tt,Ct,Je,te)+(J?0:k??0),[tt,Ct,Je,J,k]),wt=a.useCallback(()=>J?0:k??0,[J,k]),Gt=a.useCallback(te=>At.slice(0,te).reduce((Ee,p,P)=>Ee+(p.marginLeftKey?Je[p.marginLeftKey]??0:0)+(zt.resolved[P]??0),0),[At,zt.resolved,Je]),pt=a.useCallback(te=>{const Ee=At[te];return Gt(te)+(Ee.marginLeftKey?Je[Ee.marginLeftKey]??0:0)+(zt.resolved[te]??0)},[At,zt.resolved,Gt,Je]),Ft=a.useCallback((te,Ee,p)=>{if(!J||p==="single-row"){const He=te.findIndex(Yt=>Yt.prefix===Ee.prefix),at=te.map(Yt=>_e[Yt.widthKey]),yt=Pi(te.length,at);return{effectiveWidth:po(te.length,at)[He]??0,resolvedWidth:yt[He]??0,maxWidth:ln(He,yt)}}if(p==="two-row-top"){const He=te.filter(Yt=>Yt.prefix==="title1"),at=He.findIndex(Yt=>Yt.prefix===Ee.prefix),{resolved:yt,effective:tn}=Vn(He,_e);return{effectiveWidth:tn[at]??0,resolvedWidth:yt[at]??0,maxWidth:ln(at,yt)}}const P=te.filter(He=>He.prefix==="title2"||He.prefix==="title3"),B=P.findIndex(He=>He.prefix===Ee.prefix),{resolved:he,effective:Le}=Vn(P,_e);return{effectiveWidth:Le[B]??0,resolvedWidth:he[B]??0,maxWidth:ln(B,he)}},[_e,J]),Bt=(te,Ee,p)=>{const P=te.marginLeftKey?Je[te.marginLeftKey]??0:0,{effectiveWidth:B,resolvedWidth:he,maxWidth:Le}=p??Pt(te,Ee),He=Math.max(P,Bn),at=o&&Ee==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":te.prefix,style:{width:D(B),...P>0?{marginLeft:D(P)}:{}},children:[r.jsx("p",{className:te.className,style:te.style,children:te.text}),at&&te.marginLeftKey?r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(he),style:{position:"absolute",top:0,left:D(-P),width:D(He),height:"100%",pointerEvents:"auto"}}):null,at?r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:D(-hn/2),width:D(hn),height:"100%",pointerEvents:"auto"}}):null]},te.className)},g=(te="two-row")=>{const Ee=tt.findIndex(B=>B.prefix==="title1"),p=Ee>=0?Ct[Ee]:_e.title1Width,P=te==="two-row"&&o;return r.jsx("div",{...P?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:D(k??0),flexShrink:0,alignSelf:"stretch",...P?{pointerEvents:"auto"}:{}}})},ge=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:_,"aria-hidden":"true",children:" "}),Re=()=>r.jsx("span",{className:`${e}-entry-counter`,style:fe,"aria-live":"polite","aria-atomic":"true",children:Jm(oe,xe,x,t)}),Ie=()=>Kt?o&&ft?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Re(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Br(q)} + ${q}))`,width:Br(q),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Re():null,Ze=()=>!Kt&&!ft?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Te,children:[Ie(),ft?it():null]}),Et=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||Ut?ge():null,ze?g("single-row"):null,St(ve),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Ze(),Sn()]}),Ve=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||Ut?ge():null,ze?g("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:ue&&ie?{minHeight:ie}:void 0,children:[r.jsx("div",{ref:mt,className:Oe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Qn(pe||ve)}),r.jsxs("div",{ref:st,className:Oe,style:{position:ue?"absolute":"relative",inset:ue?0:void 0,width:"100%",...ue&&Ce?{width:Ce,maxWidth:"100%"}:void 0},children:[bt&&ue?r.jsx("div",{className:`${Ke} ${e}-titles-fade-out`,children:Qn(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ue?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Qn(ve)})]})]}),Ze(),Sn()]}),it=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(M??0,i),height:y.scalingValue(M??0,i),marginRight:Z,"--close-icon-hover-color":K},children:[r.jsx("button",{ref:ot,type:"button",className:`${e}-close-icon-inner`,onClick:dt,"aria-label":"Close",children:r.jsx(rn,{url:S??"",fill:z,hoverFill:i&&!l?z:K,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:Z,height:"100%",pointerEvents:"auto"}})]}),jt=(te,Ee)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Kt||Ut?ge():null,ze?g("two-row"):null,Ee!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ee},children:te}):r.jsxs(r.Fragment,{children:[te,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Ze()]}),St=te=>{if(!te)return null;const Ee=Dn(e,te,_,me,v);return r.jsx(r.Fragment,{children:Ee.map(p=>Bt(p,"single-row",Ft(Ee,p,"single-row")))})},cn=te=>{if(!te)return null;const Ee=Dn(e,te,_,me,v),p=Ee.find(P=>P.prefix==="title1");return p?Bt(p,"two-row-top",Ft(Ee,p,"two-row-top")):null},un=(te,Ee=!1)=>{const p=te?Dn(e,te,_,me,v):[],P=p.filter(Le=>Le.prefix==="title2"||Le.prefix==="title3"),B=o&&Ee;return P.length>0||B||(w??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[P.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[P.map(Le=>Bt(Le,"two-row-bottom",Ft(p,Le,"two-row-bottom"))),Ee&&o?r.jsxs(r.Fragment,{children:[Rr(),Er()]}):null]}):null,(w??0)>0||B?r.jsx("div",{"data-controls":B?"titleRowMarginBottom":void 0,"data-controls-axis":B?"y":void 0,"data-controls-reverse":B?"":void 0,className:B?`${e}-control`:void 0,style:{height:ut,width:"100%",flexShrink:0,pointerEvents:B?"auto":"none"}}):null]}):null},Jn=(te,Ee=!1)=>r.jsxs(r.Fragment,{children:[jt(cn(te)),un(te,Ee)]}),Qn=te=>J?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Jn(te)}):te?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:St(te)}):null,To=()=>{const te=J?-1:tt.findIndex(P=>P.prefix==="title1"),Ee=!J&&(o||(k??0)>0)?(()=>{const P=k??0,B=te>=0?Ct[te]:_e.title1Width,he=Math.max(P,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(B),style:{position:"absolute",top:0,left:0,width:D(he),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=tt.flatMap((P,B)=>{if(!P.marginLeftKey)return[];const he=Je[P.marginLeftKey]??0,Le=Js(tt,Ct,Je,B)+wt(),He=Math.max(he,Bn);return r.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ct[B]),style:{position:"absolute",top:0,left:D(Le),width:D(He),height:"100%",pointerEvents:"auto"}},P.marginLeftKey)});return Ee?[Ee,...p]:p},Lo=()=>tt.map((te,Ee)=>{const p=ln(Ee,Ct),B=Qt(Ee)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:D(B),width:D(hn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Rr=()=>At.flatMap((te,Ee)=>{if(!te.marginLeftKey)return[];const p=Je[te.marginLeftKey]??0,P=Gt(Ee),B=Math.max(p,Bn),{resolvedWidth:he}=Pt(te,"two-row-bottom");return r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(he),style:{position:"absolute",top:0,left:D(P),width:D(B),height:"100%",pointerEvents:"auto"}},te.marginLeftKey)}),Er=()=>At.map((te,Ee)=>{const{maxWidth:p}=Pt(te,"two-row-bottom"),B=pt(Ee)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:D(B),width:D(hn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Sn=()=>!o||J?null:r.jsxs(r.Fragment,{children:[To(),Lo()]}),fi=te=>{const Ee=!te.objectFit&&Fn(b);return{className:`${e}-slide-image-cell${Ee?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:F,maxHeight:A,...Ee?{"--image-aspect-ratio":Lr(b)}:{}}}},Io=te=>te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":te.objectFit}}:Fn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ei=te=>{if(te.length===0)return null;const Ee=te.length>1,p=Br(N),P=`calc(-0.5 * (${p} + ${N}))`;if(te.length===1){const B=te[0];return r.jsx("div",{...fi(B),children:r.jsx("img",{...Io(B),src:B.url,alt:B.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Ee?{gap:N}:void 0,children:te.map((B,he)=>r.jsxs("div",{...fi(B),children:[r.jsx("img",{...Io(B),src:B.url,alt:B.name??"",draggable:!1}),o&&Ee&&he<te.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:P,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${B.url}-${he}`))})},Ro=!!(ve!=null&&ve.title2||ve!=null&&ve.title3||bt!=null&&bt.title2||bt!=null&&bt.title3||(w??0)>0||o),kr=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:mt,className:Oe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Jn(pe||ve)}),r.jsxs("div",{ref:st,className:`${e}-titles-row-two-row`,style:{...ue&&ie?{minHeight:ie}:void 0,...ue&&Ce?{width:Ce,maxWidth:"100%"}:void 0},children:[jt(r.jsxs("div",{className:Oe,style:{position:ue?"absolute":"relative",inset:ue?0:void 0,width:"100%"},children:[bt&&ue?r.jsx("div",{className:`${Ne} ${e}-titles-fade-out`,children:cn(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ue?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:cn(ve)})]}),ue&&ie?ie:void 0),Ro?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[bt&&ue?r.jsx("div",{className:`${Ke} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:un(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ue?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:un(ve,!0)})]}):null]})]}),Mr=()=>{const te=Ro;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...te?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:te?void 0:{flex:"0 0 auto",height:"auto"},children:Jn(ve,!0)}),Sn()]})};return r.jsxs("div",{ref:De,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{_t||dt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:ke?1:0,transition:"opacity 300ms ease",pointerEvents:ke?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:T,...Qe}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...Ge,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Tt,onClick:te=>te.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":de&&oe.length>1?"true":"false",onPointerDown:de?Dt:void 0,onPointerUp:de?en:void 0,onPointerCancel:de?on:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Rt&&H?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:te=>{te.target===te.currentTarget&&xt(ae)},children:r.jsx("div",{className:`${e}-slide-area`,children:ei(Rt.images)})},`slide-out-${ae}`):null,r.jsx("div",{className:`${e}-slide-layer-in${H?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:ye?ei(ye.images):null})},`slide-in-${ae}-${xe}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Lt,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:G,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...J?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${J?` ${e}-lightbox-content-area-stacked`:""}`,children:Jt&&r.jsx("div",{className:`${e}-text-bar-cell${J?` ${e}-text-bar-cell-stacked`:""}`,style:J?void 0:{flex:1,minWidth:0,width:"100%"},children:J?R==="fade"?kr():Mr():R==="fade"?Ve():Et()})})})]})]})]})};function Af(e){return`
13948
13977
  .${e}-wrapper {
13949
13978
  position: relative;
13950
13979
  width: 100%;
@@ -14478,7 +14507,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
14478
14507
  pointer-events: auto;
14479
14508
  z-index: 10;
14480
14509
  }
14481
- `}const Ff=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:l})=>{const{prefix:d}=y.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:m,type:x}=e,b=a.useRef(null),[$,h]=a.useState(!1),[w,C]=a.useState(0),R=a.useRef(!1),A=a.useRef(!1),T=a.useRef(!1),N=a.useMemo(()=>(t??[]).filter(f=>ki(f).length>0),[t]),E=$&&N.length>0,V=!n,L=a.useCallback(()=>{V&&(T.current=!0,Km(A.current,c),A.current=!1)},[V,c]),I=(f=0)=>{if(N.length===0||n&&!i&&!o)return;const S=Yo(N,x),M=Math.max(0,Math.min(f,S.length-1));if(C(M),V){const z=Yl();Xl(M+1,c,z),A.current=!z}h(!0)},_=a.useCallback(()=>{h(!1),T.current=!1},[]);return a.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),a.useEffect(()=>{if(!V||R.current)return;R.current=!0;const f=Ts(c);if(!f)return;const S=Ls(f,Yo(N,x).length);S<0||(C(S),h(!0))},[N,c,V,x]),a.useEffect(()=>{if(!V)return;const f=()=>{if(T.current){T.current=!1,h(!1);return}const S=Ts(c);if(!S){h(!1);return}const M=Ls(S,Yo(N,x).length);if(M<0){h(!1);return}A.current=!1,C(M),h(!0)};return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[N,c,V,x]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:b,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Af(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Fn(m)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>I(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Fn(m)?{"--image-aspect-ratio":Lr(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Fn(m)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),E&&typeof document<"u"&&(()=>{const f=(s?document.getElementById(s):null)??document.body;return gi.createPortal(r.jsx(Pf,{prefix:d,entries:N,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:w,enableUrlSync:V,journalItemId:c,onBeforeClose:L,onClose:_}),f)})()]})},Wf=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14510
+ `}const Ff=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l,metadata:s})=>{const{prefix:d}=y.useScopedStyles(),c=(s==null?void 0:s.itemId)??null,{cover:u,coverFit:m,type:x}=e,b=a.useRef(null),[T,f]=a.useState(!1),[L,$]=a.useState(0),R=a.useRef(!1),E=a.useRef(!1),C=a.useRef(!1),U=a.useMemo(()=>(t??[]).filter(h=>Mi(h).length>0),[t]),k=T&&U.length>0,j=!n,I=a.useCallback(()=>{j&&(C.current=!0,Km(E.current,c),E.current=!1)},[j,c]),w=(h=0)=>{if(U.length===0||n&&!i&&!o)return;const S=Yo(U,x),M=Math.max(0,Math.min(h,S.length-1));if($(M),j){const z=Ys();Xs(M+1,c,z),E.current=!z}f(!0)},W=a.useCallback(()=>{f(!1),C.current=!1},[]);return a.useEffect(()=>{!n||i||o||f(!1)},[n,i,o]),a.useEffect(()=>{if(!j||R.current)return;R.current=!0;const h=Tl(c);if(!h)return;const S=Ll(h,Yo(U,x).length);S<0||($(S),f(!0))},[U,c,j,x]),a.useEffect(()=>{if(!j)return;const h=()=>{if(C.current){C.current=!1,f(!1);return}const S=Tl(c);if(!S){f(!1);return}const M=Ll(S,Yo(U,x).length);if(M<0){f(!1);return}E.current=!1,$(M),f(!0)};return window.addEventListener("popstate",h),()=>window.removeEventListener("popstate",h)},[U,c,j,x]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:b,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Af(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Fn(m)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>w(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Fn(m)?{"--image-aspect-ratio":Lr(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Fn(m)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),k&&typeof document<"u"&&(()=>{const h=(l?document.getElementById(l):null)??document.body;return gi.createPortal(r.jsx(Pf,{prefix:d,entries:U,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:L,enableUrlSync:j,journalItemId:c,onBeforeClose:I,onClose:W}),h)})()]})},Wf=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14482
14511
  import { createPortal } from 'react-dom';
14483
14512
  import { CommonComponentProps } from '../props';
14484
14513
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15246,7 +15275,7 @@ export type LightboxJournalSettings = {
15246
15275
  closeIconColor: string;
15247
15276
  closeIconHoverColor: string;
15248
15277
  };
15249
- `,_f="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),si={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Nf(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Hf=Kn.reduce((e,t)=>({...e,...Nf(t)}),{}),jf=Kn.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Goudy Bookletter 1911",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Jr(e){return Kn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const Of=eg(),zf={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...Hf,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:_f,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...jf,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...Jr({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...Jr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Jr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Of]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Bf={element:Ff,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:zf,sourceCode:Wf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Kn.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{...Kn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})}},Df={sizeType:"custom",value:700,min:400,max:700};function sr(e,t){return{widthPx:e,heightPx:e*t}}function fa(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function Qs(e,t,n,i){const{heightPx:o}=sr(n,i);return fa(e/2,t/2,e,t,n,o)}function fc(e,t,n){for(const i of n){const{heightPx:o}=sr(i.widthPx,i.aspectRatio),s=i.widthPx/2,l=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Vf(e,t,n,i,o,s,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":fc(e,t,n)||s==="area"?l??"none":d??"none"}function el(e,t,n){var d;const{sizeType:i,value:o,min:s,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-s)+s)}function Gf(e){return`
15278
+ `,_f="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),li={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Nf(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...li.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...li.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...li.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...li.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...li.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...li.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Hf=Kn.reduce((e,t)=>({...e,...Nf(t)}),{}),jf=Kn.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Goudy Bookletter 1911",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Jr(e){return Kn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const Of=eg(),zf={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...Hf,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:_f,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...jf,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...Jr({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...Jr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Jr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Of]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Bf={element:Ff,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:zf,sourceCode:Wf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Kn.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{...Kn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})}},Df={sizeType:"custom",value:700,min:400,max:700};function lr(e,t){return{widthPx:e,heightPx:e*t}}function fa(e,t,n,i,o,l){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,l/2),i-l/2)}}function Ql(e,t,n,i){const{heightPx:o}=lr(n,i);return fa(e/2,t/2,e,t,n,o)}function fc(e,t,n){for(const i of n){const{heightPx:o}=lr(i.widthPx,i.aspectRatio),l=i.widthPx/2,s=o/2;if(e>=i.x-l&&e<=i.x+l&&t>=i.y-s&&t<=i.y+s)return!0}return!1}function Vf(e,t,n,i,o,l,s,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":fc(e,t,n)||l==="area"?s??"none":d??"none"}function es(e,t,n){var d;const{sizeType:i,value:o,min:l,max:s}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(s-l)+l)}function Gf(e){return`
15250
15279
  .${e}-root {
15251
15280
  position: absolute;
15252
15281
  top: 0;
@@ -15281,7 +15310,7 @@ export type LightboxJournalSettings = {
15281
15310
  width: 32px;
15282
15311
  height: 32px;
15283
15312
  }
15284
- `}function qf(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function Kf(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await qf(i)]));return new Map(n)}function Uf({settings:e,content:t=[],isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),m=a.useRef(0),[x,b]=a.useState({x:0,y:0}),[$,h]=a.useState("none"),w=a.useRef({x:0,y:0}),[C,R]=a.useState(!1),[A,T]=a.useState(!1),N=a.useRef(new Map),{imageSize:E=Df,cursor:V="system",target:L="area",position:I="random",visible:_="all",defaultCursor:f=null,hoverCursor:S=null}=e,M=a.useMemo(()=>Gf(i),[i]),z=a.useCallback((H,k,F=l)=>{if(!o)return;const X=o.getBoundingClientRect(),B=H-X.left,U=k-X.top;b({x:B,y:U}),h(Vf(B,U,F,o,V,L,S,f))},[o,l,V,L,S,f]);a.useEffect(()=>{const H=[...t.map(F=>F.image.url),f,S].filter(F=>!!F);if(H.length===0){N.current=new Map,T(!0);return}let k=!1;return T(!1),Kf(H).then(F=>{k||(N.current=F,T(!0))}),()=>{k=!0}},[t,f,S]),a.useEffect(()=>{if(!o)return;const H=F=>{F.stopPropagation(),w.current={x:F.clientX,y:F.clientY},z(F.clientX,F.clientY)},k=()=>{C&&z(w.current.x,w.current.y)};return o.addEventListener("mousemove",H),window.addEventListener("scroll",k,!0),()=>{o.removeEventListener("mousemove",H),window.removeEventListener("scroll",k,!0)}},[o,C,z]),a.useEffect(()=>{!o||!C||z(w.current.x,w.current.y)},[l,o,C,z]),a.useEffect(()=>{C||h("none")},[C]);const K=(H,k,F,X={})=>{var he;const B=((he=N.current.get(H.image.url))==null?void 0:he.aspectRatio)??1,U=el(H.image.url,E,N.current),{heightPx:j}=sr(U,B);let xe=0,v=0;return I==="same"?{x:xe,y:v}=Qs(k,F,U,B):(xe=X.x??Math.random()*k,v=X.y??Math.random()*F,{x:xe,y:v}=fa(xe,v,k,F,U,j)),{id:m.current++,url:H.image.url,link:H.link,name:H.image.name,x:xe,y:v,xRatio:xe/k,yRatio:v/F,aspectRatio:B,widthPx:U}},ae=()=>{if(!o)return;const H=o.getBoundingClientRect(),k=H.width,F=H.height;k===0||F===0||d(X=>X.length===0?X:X.map(B=>{const U=E.sizeType==="random"?B.widthPx:el(B.url,E,N.current),{heightPx:j}=sr(U,B.aspectRatio);if(I==="same"){const{x:he,y:Y}=Qs(k,F,U,B.aspectRatio);return{...B,x:he,y:Y,widthPx:U}}const{x:xe,y:v}=fa(B.xRatio*k,B.yRatio*F,k,F,U,j);return{...B,x:xe,y:v,widthPx:U}}))};a.useEffect(()=>{if(!o||t.length===0||!A)return;const H=o.getBoundingClientRect(),k=H.width,F=H.height,X=K(t[0],k,F);d([X]),u(1)},[E,I,o,t,A]),a.useEffect(()=>{if(!o)return;ae();const H=new ResizeObserver(ae);return H.observe(o),window.addEventListener("resize",ae),()=>{H.disconnect(),window.removeEventListener("resize",ae)}},[o,I,E,l.length]),a.useEffect(()=>{_==="last One"&&d(H=>H.length>0?[H[H.length-1]]:[])},[_]);const Q=H=>{if(!o||t.length===0||!A)return;const k=o.getBoundingClientRect(),F=H.clientX-k.left,X=H.clientY-k.top;if(L==="image"&&!fc(F,X,l))return;let B=0,U=0;I==="on Click"?(B=F,U=X):I==="same"?(B=k.width/2,U=k.height/2):(B=Math.random()*k.width,U=Math.random()*k.height);const j=t[c],xe=K(j,k.width,k.height,{x:B,y:U}),v=_==="all"?[...l,xe]:[xe];d(v),u(he=>he>=t.length-1?0:he+1),z(H.clientX,H.clientY,v)},G=V==="custom"&&$!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),r.jsxs("div",{ref:s,onClick:Q,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:`${i}-root`,style:{cursor:G?"none":"default"},children:[l.map(H=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${H.y}px`,left:`${H.x}px`,width:`${H.widthPx}px`,cursor:G?"none":"default"},children:L==="area"&&H.link?r.jsx("a",{href:H.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:H.url,alt:H.name,className:`${i}-image`})}):r.jsx("img",{src:H.url,alt:H.name,className:`${i}-image`})},H.id)),C&&G&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${$}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Xf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15313
+ `}function qf(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function Kf(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await qf(i)]));return new Map(n)}function Uf({settings:e,content:t=[],isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,l]=a.useState(null),[s,d]=a.useState([]),[c,u]=a.useState(0),m=a.useRef(0),[x,b]=a.useState({x:0,y:0}),[T,f]=a.useState("none"),L=a.useRef({x:0,y:0}),[$,R]=a.useState(!1),[E,C]=a.useState(!1),U=a.useRef(new Map),{imageSize:k=Df,cursor:j="system",target:I="area",position:w="random",visible:W="all",defaultCursor:h=null,hoverCursor:S=null}=e,M=a.useMemo(()=>Gf(i),[i]),z=a.useCallback((N,F,A=s)=>{if(!o)return;const q=o.getBoundingClientRect(),G=N-q.left,Z=F-q.top;b({x:G,y:Z}),f(Vf(G,Z,A,o,j,I,S,h))},[o,s,j,I,S,h]);a.useEffect(()=>{const N=[...t.map(A=>A.image.url),h,S].filter(A=>!!A);if(N.length===0){U.current=new Map,C(!0);return}let F=!1;return C(!1),Kf(N).then(A=>{F||(U.current=A,C(!0))}),()=>{F=!0}},[t,h,S]),a.useEffect(()=>{if(!o)return;const N=A=>{A.stopPropagation(),L.current={x:A.clientX,y:A.clientY},z(A.clientX,A.clientY)},F=()=>{$&&z(L.current.x,L.current.y)};return o.addEventListener("mousemove",N),window.addEventListener("scroll",F,!0),()=>{o.removeEventListener("mousemove",N),window.removeEventListener("scroll",F,!0)}},[o,$,z]),a.useEffect(()=>{!o||!$||z(L.current.x,L.current.y)},[s,o,$,z]),a.useEffect(()=>{$||f("none")},[$]);const K=(N,F,A,q={})=>{var fe;const G=((fe=U.current.get(N.image.url))==null?void 0:fe.aspectRatio)??1,Z=es(N.image.url,k,U.current),{heightPx:_}=lr(Z,G);let me=0,v=0;return w==="same"?{x:me,y:v}=Ql(F,A,Z,G):(me=q.x??Math.random()*F,v=q.y??Math.random()*A,{x:me,y:v}=fa(me,v,F,A,Z,_)),{id:m.current++,url:N.image.url,link:N.link,name:N.image.name,x:me,y:v,xRatio:me/F,yRatio:v/A,aspectRatio:G,widthPx:Z}},le=()=>{if(!o)return;const N=o.getBoundingClientRect(),F=N.width,A=N.height;F===0||A===0||d(q=>q.length===0?q:q.map(G=>{const Z=k.sizeType==="random"?G.widthPx:es(G.url,k,U.current),{heightPx:_}=lr(Z,G.aspectRatio);if(w==="same"){const{x:fe,y:J}=Ql(F,A,Z,G.aspectRatio);return{...G,x:fe,y:J,widthPx:Z}}const{x:me,y:v}=fa(G.xRatio*F,G.yRatio*A,F,A,Z,_);return{...G,x:me,y:v,widthPx:Z}}))};a.useEffect(()=>{if(!o||t.length===0||!E)return;const N=o.getBoundingClientRect(),F=N.width,A=N.height,q=K(t[0],F,A);d([q]),u(1)},[k,w,o,t,E]),a.useEffect(()=>{if(!o)return;le();const N=new ResizeObserver(le);return N.observe(o),window.addEventListener("resize",le),()=>{N.disconnect(),window.removeEventListener("resize",le)}},[o,w,k,s.length]),a.useEffect(()=>{W==="last One"&&d(N=>N.length>0?[N[N.length-1]]:[])},[W]);const Y=N=>{if(!o||t.length===0||!E)return;const F=o.getBoundingClientRect(),A=N.clientX-F.left,q=N.clientY-F.top;if(I==="image"&&!fc(A,q,s))return;let G=0,Z=0;w==="on Click"?(G=A,Z=q):w==="same"?(G=F.width/2,Z=F.height/2):(G=Math.random()*F.width,Z=Math.random()*F.height);const _=t[c],me=K(_,F.width,F.height,{x:G,y:Z}),v=W==="all"?[...s,me]:[me];d(v),u(fe=>fe>=t.length-1?0:fe+1),z(N.clientX,N.clientY,v)},D=j==="custom"&&T!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),r.jsxs("div",{ref:l,onClick:Y,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:`${i}-root`,style:{cursor:D?"none":"default"},children:[s.map(N=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${N.y}px`,left:`${N.x}px`,width:`${N.widthPx}px`,cursor:D?"none":"default"},children:I==="area"&&N.link?r.jsx("a",{href:N.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:N.url,alt:N.name,className:`${i}-image`})}):r.jsx("img",{src:N.url,alt:N.name,className:`${i}-image`})},N.id)),$&&D&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${T}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Xf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15285
15314
  import { CommonComponentProps } from '../props';
15286
15315
  import { useScopedStyles } from '../utils/index';
15287
15316
 
@@ -15912,7 +15941,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
15912
15941
  display: block;
15913
15942
  pointer-events: none;
15914
15943
  }
15915
- `}function ty(e){return e==="blur"?Qf:e==="greyscale"?Jf:0}function Ui(e,t=1,n=1){const i=ty(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function tl(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function ny(e,t){return t<=1?0:(e-1+t)%t}function iy(e,t=1){return!e||e.height===0?t:e.width/e.height}function oy(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,l=t*o/100;let d=s,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function nl(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function yc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function il(e,t,n){return{...yc(e),[`--${n}-stage-scale`]:t}}function ry(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function ay({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,D,ie,W,oe,te,ge;const{prefix:o}=y.useScopedStyles(),s=a.useMemo(()=>ey(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:m="greyscale"}=e,x=t??[],b=tl(x.length),[$,h]=a.useState(b.activeIndex),[w,C]=a.useState(b.backgroundIndex),[R,A]=a.useState(!1),[T,N]=a.useState(!1),[E,V]=a.useState(null),[L,I]=a.useState(null),[_,f]=a.useState(0),[S,M]=a.useState(1),[z,K]=a.useState("none"),[ae,Q]=a.useState("next"),[G,H]=a.useState({}),[k,F]=a.useState({width:0,height:0}),X=a.useRef(null),B=a.useRef(null),U=!n||!!i,j=l??60,xe=Math.max(10,Math.min(100,d??j)),v=Math.max(10,Math.min(100,c??j)),he=Math.max(100,u),Y=Ui(m),le=a.useCallback(de=>{const we=iy(de?G[de]:void 0);return oy(k.width,k.height,we,xe,v)},[k.height,k.width,G,v,xe]);a.useEffect(()=>{const de=B.current;if(!de)return;const we=new ResizeObserver(([Me])=>{const{width:ee,height:ue}=Me.contentRect;F({width:ee,height:ue})});return we.observe(de),()=>we.disconnect()},[]),a.useEffect(()=>{const de=(t??[]).map(we=>{var Me;return(Me=we.image)==null?void 0:Me.url}).filter(we=>!!we);ry(de,(we,Me)=>{H(ee=>{var ue,Ae;return((ue=ee[we])==null?void 0:ue.width)===Me.width&&((Ae=ee[we])==null?void 0:Ae.height)===Me.height?ee:{...ee,[we]:Me}})})},[t]),a.useEffect(()=>{const{backgroundIndex:de,activeIndex:we}=tl(x.length);h(we),C(de),A(!1),N(!1),V(null),I(null),f(0),M(1),K("none"),Q("next")},[x.length,t]),a.useEffect(()=>()=>{X.current&&clearTimeout(X.current)},[]);const $e=a.useCallback(de=>{var se,q,je,We;if(!U||R||x.length<=1)return;const we=de==="next"?($+1)%x.length:($-1+x.length)%x.length,Me=le((q=(se=x[$])==null?void 0:se.image)==null?void 0:q.url),ee=le((We=(je=x[we])==null?void 0:je.image)==null?void 0:We.url),ue=nl(k.width,k.height,Me),Ae=nl(k.width,k.height,ee);X.current&&clearTimeout(X.current),Q(de),N(!0),A(!0),de==="next"?(V($),I(we),f(0),M(1),K(Ui(m,0,1))):(C(ny(we,x.length)),V(we),I($),f(1),M(Ae),K(Ui(m,1,Ae))),requestAnimationFrame(()=>{N(!1),requestAnimationFrame(()=>{de==="next"?(f(1),M(ue),K(Ui(m,1,ue))):(f(0),M(1),K(Ui(m,0,1)))})}),X.current=setTimeout(()=>{de==="next"&&C($),h(we),V(null),I(null),A(!1)},he)},[$,m,k.height,k.width,le,R,U,x,he]),re=x[$],be=w!==null?x[w]:null,Z=E!==null?x[E]:null,fe=L!==null?x[L]:null,ye=x.length<=1?0:($-1+x.length)%x.length,ke=x.length<=1?0:($+1)%x.length,J=le((Se=re==null?void 0:re.image)==null?void 0:Se.url),Ce=le((D=Z==null?void 0:Z.image)==null?void 0:D.url),ce=le((ie=fe==null?void 0:fe.image)==null?void 0:ie.url),ve={[`--${o}-transition-ms`]:`${he}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:B,className:nt(`${o}-wrapper`,T&&`${o}-snap`,n&&!i&&`${o}-editor`),style:ve,"aria-label":"Zoom gallery",children:[((W=be==null?void 0:be.image)==null?void 0:W.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:be.image.url,alt:"",style:{filter:Y}})}),R&&((oe=Z==null?void 0:Z.image)==null?void 0:oe.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${ae}`),style:il(Ce,S,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:Z.image.url,alt:"",style:{filter:z}})}),R&&((te=fe==null?void 0:fe.image)==null?void 0:te.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${ae}`),style:il(ce,_,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:fe.image.url,alt:""})}),!R&&((ge=re==null?void 0:re.image)==null?void 0:ge.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-foreground`),style:yc(J),children:r.jsx("img",{className:`${o}-image`,src:re.image.url,alt:re.image.name??""})}),U&&x.length>1&&!R&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:nt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>$e("prev"),"aria-label":`Show previous image (${ye+1} of ${x.length})`}),r.jsx("button",{type:"button",className:nt(`${o}-nav`,`${o}-nav-next`),onClick:()=>$e("next"),"aria-label":`Show next image (${ke+1} of ${x.length})`})]})]})]})}const sy=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15944
+ `}function ty(e){return e==="blur"?Qf:e==="greyscale"?Jf:0}function Ui(e,t=1,n=1){const i=ty(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function ts(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function ny(e,t){return t<=1?0:(e-1+t)%t}function iy(e,t=1){return!e||e.height===0?t:e.width/e.height}function oy(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const l=e*i/100,s=t*o/100;let d=l,c=d/n;return c>s&&(c=s,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function ns(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function yc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function is(e,t,n){return{...yc(e),[`--${n}-stage-scale`]:t}}function ry(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function ay({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,O,ce,H,re,ae,ne;const{prefix:o}=y.useScopedStyles(),l=a.useMemo(()=>ey(o),[o]),{imageSize:s,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:m="greyscale"}=e,x=t??[],b=ts(x.length),[T,f]=a.useState(b.activeIndex),[L,$]=a.useState(b.backgroundIndex),[R,E]=a.useState(!1),[C,U]=a.useState(!1),[k,j]=a.useState(null),[I,w]=a.useState(null),[W,h]=a.useState(0),[S,M]=a.useState(1),[z,K]=a.useState("none"),[le,Y]=a.useState("next"),[D,N]=a.useState({}),[F,A]=a.useState({width:0,height:0}),q=a.useRef(null),G=a.useRef(null),Z=!n||!!i,_=s??60,me=Math.max(10,Math.min(100,d??_)),v=Math.max(10,Math.min(100,c??_)),fe=Math.max(100,u),J=Ui(m),de=a.useCallback(ie=>{const be=iy(ie?D[ie]:void 0);return oy(F.width,F.height,be,me,v)},[F.height,F.width,D,v,me]);a.useEffect(()=>{const ie=G.current;if(!ie)return;const be=new ResizeObserver(([Ce])=>{const{width:ee,height:pe}=Ce.contentRect;A({width:ee,height:pe})});return be.observe(ie),()=>be.disconnect()},[]),a.useEffect(()=>{const ie=(t??[]).map(be=>{var Ce;return(Ce=be.image)==null?void 0:Ce.url}).filter(be=>!!be);ry(ie,(be,Ce)=>{N(ee=>{var pe,Ae;return((pe=ee[be])==null?void 0:pe.width)===Ce.width&&((Ae=ee[be])==null?void 0:Ae.height)===Ce.height?ee:{...ee,[be]:Ce}})})},[t]),a.useEffect(()=>{const{backgroundIndex:ie,activeIndex:be}=ts(x.length);f(be),$(ie),E(!1),U(!1),j(null),w(null),h(0),M(1),K("none"),Y("next")},[x.length,t]),a.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]);const $e=a.useCallback(ie=>{var se,V,je,We;if(!Z||R||x.length<=1)return;const be=ie==="next"?(T+1)%x.length:(T-1+x.length)%x.length,Ce=de((V=(se=x[T])==null?void 0:se.image)==null?void 0:V.url),ee=de((We=(je=x[be])==null?void 0:je.image)==null?void 0:We.url),pe=ns(F.width,F.height,Ce),Ae=ns(F.width,F.height,ee);q.current&&clearTimeout(q.current),Y(ie),U(!0),E(!0),ie==="next"?(j(T),w(be),h(0),M(1),K(Ui(m,0,1))):($(ny(be,x.length)),j(be),w(T),h(1),M(Ae),K(Ui(m,1,Ae))),requestAnimationFrame(()=>{U(!1),requestAnimationFrame(()=>{ie==="next"?(h(1),M(pe),K(Ui(m,1,pe))):(h(0),M(1),K(Ui(m,0,1)))})}),q.current=setTimeout(()=>{ie==="next"&&$(T),f(be),j(null),w(null),E(!1)},fe)},[T,m,F.height,F.width,de,R,Z,x,fe]),oe=x[T],xe=L!==null?x[L]:null,Q=k!==null?x[k]:null,ye=I!==null?x[I]:null,ve=x.length<=1?0:(T-1+x.length)%x.length,ke=x.length<=1?0:(T+1)%x.length,we=de((Se=oe==null?void 0:oe.image)==null?void 0:Se.url),Me=de((O=Q==null?void 0:Q.image)==null?void 0:O.url),X=de((ce=ye==null?void 0:ye.image)==null?void 0:ce.url),ue={[`--${o}-transition-ms`]:`${fe}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsxs("div",{ref:G,className:nt(`${o}-wrapper`,C&&`${o}-snap`,n&&!i&&`${o}-editor`),style:ue,"aria-label":"Zoom gallery",children:[((H=xe==null?void 0:xe.image)==null?void 0:H.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:xe.image.url,alt:"",style:{filter:J}})}),R&&((re=Q==null?void 0:Q.image)==null?void 0:re.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${le}`),style:is(Me,S,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:Q.image.url,alt:"",style:{filter:z}})}),R&&((ae=ye==null?void 0:ye.image)==null?void 0:ae.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${le}`),style:is(X,W,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:ye.image.url,alt:""})}),!R&&((ne=oe==null?void 0:oe.image)==null?void 0:ne.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-foreground`),style:yc(we),children:r.jsx("img",{className:`${o}-image`,src:oe.image.url,alt:oe.image.name??""})}),Z&&x.length>1&&!R&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:nt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>$e("prev"),"aria-label":`Show previous image (${ve+1} of ${x.length})`}),r.jsx("button",{type:"button",className:nt(`${o}-nav`,`${o}-nav-next`),onClick:()=>$e("next"),"aria-label":`Show next image (${ke+1} of ${x.length})`})]})]})]})}const ly=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15916
15945
  import cn from 'classnames';
15917
15946
  import { CommonComponentProps } from '../props';
15918
15947
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16431,7 +16460,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16431
16460
  </>
16432
16461
  );
16433
16462
  }
16434
- `,ly={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},cy={element:ay,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:ly,sourceCode:sy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},dy={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},uy=["hover","active"],Qr={left:"flex-start",center:"center",right:"flex-end"};function py(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function my(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function gy(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,s=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${s}`,d=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,c=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${d}, ${c}`,m=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,x=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,b=`.${e}-button:hover, ${x}`,$=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
16463
+ `,sy={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},cy={element:ay,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:sy,sourceCode:ly,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},dy={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},uy=["hover","active"],Qr={left:"flex-start",center:"center",right:"flex-end"};function py(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function my(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function gy(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,l=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,s=`${o}, ${l}`,d=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,c=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${d}, ${c}`,m=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,x=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,b=`.${e}-button:hover, ${x}`,T=f=>`.${e}-hover-effect-${f}:hover, .${e}-hover-effect-${f}:focus-visible, a:focus-visible .${e}-hover-effect-${f}`;return`
16435
16464
  .${e}-root {
16436
16465
  line-height: 0;
16437
16466
  }
@@ -16461,11 +16490,11 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16461
16490
  .${e}-wrapper.${e}-editing .${e}-button {
16462
16491
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms;
16463
16492
  }
16464
- ${$("scale-up")},
16493
+ ${T("scale-up")},
16465
16494
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-scale-up {
16466
16495
  transform: scale(1.05);
16467
16496
  }
16468
- ${$("lift")},
16497
+ ${T("lift")},
16469
16498
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-lift {
16470
16499
  transform: translateY(-2px);
16471
16500
  box-shadow: ${m};
@@ -16527,9 +16556,9 @@ a:focus-visible .${e}-hover-effect-swipe::before,
16527
16556
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe::before {
16528
16557
  transform: translateX(0);
16529
16558
  }
16530
- ${$("reveal")},
16559
+ ${T("reveal")},
16531
16560
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-reveal,
16532
- ${$("swipe")},
16561
+ ${T("swipe")},
16533
16562
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe {
16534
16563
  background-color: var(--${e}-background-color);
16535
16564
  }
@@ -16596,13 +16625,13 @@ ${b} {
16596
16625
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
16597
16626
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
16598
16627
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
16599
- box-shadow: ${l};
16628
+ box-shadow: ${s};
16600
16629
  }
16601
16630
  .${e}-wrapper.${e}-state-hover .${e}-button {
16602
16631
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
16603
16632
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
16604
16633
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
16605
- box-shadow: ${l};
16634
+ box-shadow: ${s};
16606
16635
  }
16607
16636
  .${e}-button:focus,
16608
16637
  .${e}-button:focus-visible,
@@ -16671,7 +16700,7 @@ a:active .${e}-button .${e}-icon-image,
16671
16700
  height: calc(1em * var(--${e}-icon-scale, 1));
16672
16701
  width: calc(1em * var(--${e}-icon-scale, 1));
16673
16702
  }
16674
- `}function ea(e,t,n="",i,o){const s=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:s}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function ol(e,t,n="fill",i=100,o=0,s){if(!t)return null;const l=r.jsx(rn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const d=y.scalingValue(o,s);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function hy({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:s}=y.useScopedStyles(),l=a.useMemo(()=>gy(s),[s]),{type:d="a",label:c="Button",icon:u,alignment:m="center",alignA:x,order:b="text-icon",gap:$=0,iconSize:h=0,iconWidthC:w=0,dimensions:C=!1,padding:R={top:0,right:0,bottom:0,left:0},cornerRadius:A={top:0,right:0,bottom:0,left:0},boxShadow:T={top:0,left:0,right:0,bottom:0},boxShadowColor:N="rgba(0, 0, 0, 0)",innerBoxShadow:E={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:V="rgba(0, 0, 0, 0)",stroke:L=0,backgroundColor:I="#000000",textColor:_="#ffffff",borderColor:f="#ffffff",iconColor:S="#ffffff",hoverEffect:M="none",fontFamily:z,fontSettings:K,fontSize:ae,lineHeight:Q,letterSpacing:G=0,wordSpacing:H=0,textAppearance:k,stateOverrides:F,minWidth:X=0,minHeight:B=0,width:U=0,height:j=0}=e,xe=y.buildColorVars(s,{backgroundColor:I,textColor:_,borderColor:f,iconColor:S,boxShadowColor:N,innerBoxShadowColor:V},dy,uy,F),v=i&&i!=="default"?`${s}-state-${i}`:"",he=t&&!n?`${s}-editing`:"",Y=M!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${M}`:"",le=M==="reveal"||M==="swipe",$e=M==="content-roll",re=M==="reveal"&&(!t||n),be=C===!0,fe=d==="a"?x??m:m,ye=d==="c",ke=d!=="b",J={fontSettings:{fontFamily:z,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:ae??.01,lineHeight:Q,letterSpacing:G,wordSpacing:H,textAppearance:k,color:_},ce={...ke?dn(Xt(J,t)):{},[`--${s}-box-shadow-x`]:y.scalingValue(T.left,t),[`--${s}-box-shadow-y`]:y.scalingValue(T.top,t),[`--${s}-box-shadow-blur`]:y.scalingValue(T.right,t),[`--${s}-box-shadow-spread`]:y.scalingValue(T.bottom,t),[`--${s}-inner-box-shadow-x`]:y.scalingValue(E.left,t),[`--${s}-inner-box-shadow-y`]:y.scalingValue(E.top,t),[`--${s}-inner-box-shadow-blur`]:y.scalingValue(E.right,t),[`--${s}-inner-box-shadow-spread`]:y.scalingValue(E.bottom,t),paddingTop:y.scalingValue(R.top,t),paddingRight:y.scalingValue(R.right,t),paddingBottom:y.scalingValue(R.bottom,t),paddingLeft:y.scalingValue(R.left,t),borderTopLeftRadius:y.scalingValue(A.top,t),borderTopRightRadius:y.scalingValue(A.right,t),borderBottomRightRadius:y.scalingValue(A.bottom,t),borderBottomLeftRadius:y.scalingValue(A.left,t),borderWidth:y.scalingValue(L,t),...ye?{}:{justifyContent:Qr[fe],textAlign:fe},...ye&&!$e?{gap:y.scalingValue($,t)}:{},...be?{width:y.scalingValue(U,t),height:y.scalingValue(j,t)}:{minWidth:y.scalingValue(X,t),minHeight:y.scalingValue(B,t),...ye?{width:"100%"}:{}}};let ve;const Se={display:"inline-flex",alignItems:"center",justifyContent:ye?Qr[fe]:Qr[d==="a"?fe:"center"],gap:ye?y.scalingValue($,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:fe}:{}};if(d==="b"){const W=()=>ol(s,u,h>0?"fixed":"fill",100,h,t);ve=$e?ea(s,W,`${s}-icon-roll`,void 0,Se):W()}else if(d==="c"){const W=()=>{const oe=r.jsx("span",{className:`${s}-text`,style:{textAlign:fe},children:c}),te=ol(s,u,w>0?"fixed":"fill",100,w,t);return b==="icon-text"?r.jsxs(r.Fragment,{children:[te,oe]}):r.jsxs(r.Fragment,{children:[oe,te]})};ve=$e?ea(s,W,`${s}-icon-text-roll`,void 0,Se):W()}else ve=$e?ea(s,()=>c,`${s}-label-roll`,void 0,Se):le?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const D=re?W=>py(W,s):void 0,ie=re?W=>my(W,s):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${s}-root`,style:xe,children:r.jsx("div",{className:`${s}-wrapper ${v} ${he}`.trim(),children:r.jsx("div",{className:`${s}-button ${Y}`.trim(),style:ce,onMouseEnter:D,onMouseLeave:ie,role:"button",tabIndex:o||t&&!n?void 0:0,children:ve})})})]})}const fy=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
16703
+ `}function ea(e,t,n="",i,o){const l=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:l}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function os(e,t,n="fill",i=100,o=0,l){if(!t)return null;const s=r.jsx(rn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:s});if(n==="fixed"&&o>0){const d=y.scalingValue(o,l);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:s})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:s})}function hy({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:l}=y.useScopedStyles(),s=a.useMemo(()=>gy(l),[l]),{type:d="a",label:c="Button",icon:u,alignment:m="center",alignA:x,order:b="text-icon",gap:T=0,iconSize:f=0,iconWidthC:L=0,dimensions:$=!1,padding:R={top:0,right:0,bottom:0,left:0},cornerRadius:E={top:0,right:0,bottom:0,left:0},boxShadow:C={top:0,left:0,right:0,bottom:0},boxShadowColor:U="rgba(0, 0, 0, 0)",innerBoxShadow:k={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:j="rgba(0, 0, 0, 0)",stroke:I=0,backgroundColor:w="#000000",textColor:W="#ffffff",borderColor:h="#ffffff",iconColor:S="#ffffff",hoverEffect:M="none",fontFamily:z,fontSettings:K,fontSize:le,lineHeight:Y,letterSpacing:D=0,wordSpacing:N=0,textAppearance:F,stateOverrides:A,minWidth:q=0,minHeight:G=0,width:Z=0,height:_=0}=e,me=y.buildColorVars(l,{backgroundColor:w,textColor:W,borderColor:h,iconColor:S,boxShadowColor:U,innerBoxShadowColor:j},dy,uy,A),v=i&&i!=="default"?`${l}-state-${i}`:"",fe=t&&!n?`${l}-editing`:"",J=M!=="none"&&(!t||n||i==="hover")?`${l}-hover-effect-${M}`:"",de=M==="reveal"||M==="swipe",$e=M==="content-roll",oe=M==="reveal"&&(!t||n),xe=$===!0,ye=d==="a"?x??m:m,ve=d==="c",ke=d!=="b",we={fontSettings:{fontFamily:z,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:le??.01,lineHeight:Y,letterSpacing:D,wordSpacing:N,textAppearance:F,color:W},X={...ke?dn(Xt(we,t)):{},[`--${l}-box-shadow-x`]:y.scalingValue(C.left,t),[`--${l}-box-shadow-y`]:y.scalingValue(C.top,t),[`--${l}-box-shadow-blur`]:y.scalingValue(C.right,t),[`--${l}-box-shadow-spread`]:y.scalingValue(C.bottom,t),[`--${l}-inner-box-shadow-x`]:y.scalingValue(k.left,t),[`--${l}-inner-box-shadow-y`]:y.scalingValue(k.top,t),[`--${l}-inner-box-shadow-blur`]:y.scalingValue(k.right,t),[`--${l}-inner-box-shadow-spread`]:y.scalingValue(k.bottom,t),paddingTop:y.scalingValue(R.top,t),paddingRight:y.scalingValue(R.right,t),paddingBottom:y.scalingValue(R.bottom,t),paddingLeft:y.scalingValue(R.left,t),borderTopLeftRadius:y.scalingValue(E.top,t),borderTopRightRadius:y.scalingValue(E.right,t),borderBottomRightRadius:y.scalingValue(E.bottom,t),borderBottomLeftRadius:y.scalingValue(E.left,t),borderWidth:y.scalingValue(I,t),...ve?{}:{justifyContent:Qr[ye],textAlign:ye},...ve&&!$e?{gap:y.scalingValue(T,t)}:{},...xe?{width:y.scalingValue(Z,t),height:y.scalingValue(_,t)}:{minWidth:y.scalingValue(q,t),minHeight:y.scalingValue(G,t),...ve?{width:"100%"}:{}}};let ue;const Se={display:"inline-flex",alignItems:"center",justifyContent:ve?Qr[ye]:Qr[d==="a"?ye:"center"],gap:ve?y.scalingValue(T,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:ye}:{}};if(d==="b"){const H=()=>os(l,u,f>0?"fixed":"fill",100,f,t);ue=$e?ea(l,H,`${l}-icon-roll`,void 0,Se):H()}else if(d==="c"){const H=()=>{const re=r.jsx("span",{className:`${l}-text`,style:{textAlign:ye},children:c}),ae=os(l,u,L>0?"fixed":"fill",100,L,t);return b==="icon-text"?r.jsxs(r.Fragment,{children:[ae,re]}):r.jsxs(r.Fragment,{children:[re,ae]})};ue=$e?ea(l,H,`${l}-icon-text-roll`,void 0,Se):H()}else ue=$e?ea(l,()=>c,`${l}-label-roll`,void 0,Se):de?r.jsx("span",{className:`${l}-button-inner`,children:c}):c;const O=oe?H=>py(H,l):void 0,ce=oe?H=>my(H,l):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsx("div",{className:`${l}-root`,style:me,children:r.jsx("div",{className:`${l}-wrapper ${v} ${fe}`.trim(),children:r.jsx("div",{className:`${l}-button ${J}`.trim(),style:X,onMouseEnter:O,onMouseLeave:ce,role:"button",tabIndex:o||t&&!n?void 0:0,children:ue})})})]})}const fy=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
16675
16704
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
16676
16705
  import { CommonComponentProps } from '../props';
16677
16706
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -17506,7 +17535,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17506
17535
  pointer-events: auto;
17507
17536
  flex-shrink: 0;
17508
17537
  }
17509
- `}const Cn=500,Xi=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",Sy=72,$y=50,Cy=1e4,Ty=650,Ly=500;function Iy(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function vc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=or(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Ry(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?vc(i,n):null}function Ey(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function Ji(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function rl(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Ji(e,i,n)}const My=.03;function xc(e){return e.width*My}const ta={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Do(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function al(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function ky(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ya(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function Py(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ya(e,t.width,t.height)}function Ay(e,t){if(Ir(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Fy(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function Wy({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Ir(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function ji(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=xc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function lr(e,t,n){const i=ji(e,t,n);return{...i,left:2*i.left-e.left}}function _y(e,t,n){const{left:i,width:o}=n,s=xc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function bc(e,t,n,i){const o=ji(e,"left",i),s=ji(e,"right",i),l=lr(e,"left",i),d=lr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Ny(e,t,n,i){const{start:o,end:s}=bc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Hy(e,t,n){const i=ji(e,t,n),o=lr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ir(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function jy({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function Vo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Ir(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Oy({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:b,resolveCloseSourceRect:$,onClose:h,onPrev:w,onNext:C}){const R=a.useRef(null),A=a.useRef(null),T=a.useRef(null),N=a.useRef(new Map),[E,V]=a.useState(0),L=a.useRef(null),I=a.useRef(0),_=a.useRef(0),f=a.useRef("none"),S=a.useRef(!1),M=a.useRef(!1),z=a.useRef(!1),K=a.useRef(null),ae=a.useRef(null),Q=a.useRef(null),G=a.useRef(()=>{}),H=a.useRef(null),k=a.useRef(null),F=a.useRef(null),X=a.useRef(!1),[B,U]=a.useState(null),[j,xe]=a.useState(ta),[v,he]=a.useState(0),[Y,le]=a.useState("opening"),[$e,re]=a.useState(0),[be,Z]=a.useState(0),[fe,ye]=a.useState(!1),[ke,J]=a.useState(null),[Ce,ce]=a.useState(null),[ve,Se]=a.useState(null),[D,ie]=a.useState(!1),[W,oe]=a.useState(null),[te,ge]=a.useState(!1),de=a.useRef(!1),[we,Me]=a.useState(!1),[ee,ue]=a.useState(!1),Ae=a.useRef(n),se=a.useRef(void 0),q=t[n],je=q?Ir(q):!1,We=be!==0||fe,et=!l&&(!s||!!d),Ye=c&&!l,lt=u.length>1,mt=a.useCallback((g,pe)=>t.length<=1?null:t[(g+pe+t.length)%t.length]??null,[t]),De=lt?Ji(u,m,-1):mt(n,-1),ot=lt?Ji(u,m,1):mt(n,1),$t=ke===-1&&We?lt&&Ce!==null?Ji(u,Ce,-1):ve!==null?mt(ve,-1):null:null,rt=ke===1&&We?lt&&Ce!==null?Ji(u,Ce,1):ve!==null?mt(ve,1):null:null,Ue=$t&&$t.url!==(De==null?void 0:De.url)?$t:null,ht=rt&&rt.url!==(ot==null?void 0:ot.url)?rt:null,xt=De&&Ye?(()=>{const g=lt?rl(u,m,-1):t.length>2?mt((n-1+t.length)%t.length,-1):null;return g&&g.url!==De.url?g:null})():null,dt=ot&&Ye?(()=>{const g=lt?rl(u,m,1):t.length>2?mt((n+1)%t.length,1):null;return g&&g.url!==ot.url?g:null})():null,Mt=Ue??xt,_t=ht??dt,Qe=a.useCallback((g,pe,Re)=>{if(!g||!pe||!Re)return;const Ie=N.current,Ze=Ie.get(g);(Ze==null?void 0:Ze.width)===pe&&(Ze==null?void 0:Ze.height)===Re||(Ie.set(g,{width:pe,height:Re}),V(Et=>Et+1))},[]),Tt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const pe=N.current.get(g.url);return Py(A.current,pe)},[E,v]),Lt=a.useCallback(()=>{if(!q)return;const g=Tt(q);if(g){U(g);return}const pe=A.current;pe&&U(al(pe))},[q,Tt]),Ge=a.useCallback(g=>{if(lt){const pe=u.length;ce((m+g+pe)%pe),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),ce(null))},[lt,u.length,m,t.length,n]),qe=a.useCallback(g=>{z.current=g,ye(g)},[]),Pe=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),gt=a.useCallback(()=>{Pe(),K.current=window.setTimeout(()=>{Pe(),qe(!1)},Xi+32)},[Pe,qe]),It=a.useCallback(()=>{const g=R.current;if(!g){xe({left:0,top:0,width:typeof window<"u"?window.innerWidth:ta.width,height:typeof window<"u"?window.innerHeight:ta.height});return}const pe=g.getBoundingClientRect();xe({left:pe.left,top:pe.top,width:pe.width,height:pe.height})},[]),kt=a.useCallback((g,pe)=>{if(We){if(we&&!fe)return`translate(${be}px, 0px)`;if(fe&&ke!==null){const Re=Tt(g);if(!Re)return;const{x:Ie,y:Ze}=Ny(Re,pe,ke,j);return`translate(${Ie}px, ${Ze}px)`}if(fe)return"translate(0px, 0px)"}},[We,we,fe,be,ke,j,Tt]),Dt=a.useCallback(()=>{const g=ae.current;ae.current=null,Pe(),qe(!1),J(null),ce(null),Se(null),Z(0),Me(!1),S.current=!1,_.current=0,f.current="none",g===-1?w():g===1&&C()},[Pe,qe,w,C]),en=a.useCallback(()=>{Pe(),K.current=window.setTimeout(()=>{ae.current!==null&&Dt()},Xi+32)},[Pe,Dt]),on=a.useCallback(()=>{Pe(),ae.current=null,qe(!1),J(null),ce(null),Se(null),Z(0),Me(!1),S.current=!1,_.current=0,f.current="none"},[Pe,qe]),bt=a.useCallback(g=>{if(!(!Ye||!B)){if(z.current){if(ae.current===g){Q.current=g,Dt();return}on()}Pe(),Ge(g),ae.current=g,J(g),qe(!0),en()}},[Ye,B,Dt,on,Pe,Ge,qe,en]);G.current=bt;const Rt=a.useCallback(()=>{H.current=null,X.current=!1,k.current!==null&&(window.clearInterval(k.current),k.current=null),F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),Ut=a.useCallback(g=>{k.current!==null&&window.clearInterval(k.current);const pe=X.current?Ly:Ty;k.current=window.setInterval(()=>{G.current(g)},pe)},[]),Kt=a.useCallback(g=>{H.current!==g&&(Rt(),H.current=g,X.current=!1,G.current(g),Ut(g),F.current=window.setTimeout(()=>{F.current=null,H.current===g&&(X.current=!0,Ut(g))},Cy))},[Rt,Ut]),ft=a.useCallback(()=>{const g=A.current;if(!g)return;const pe=q==null?void 0:q.url,Re=pe?N.current.get(pe):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){U(ya(g,Re.width,Re.height));return}const Ie=T.current;if(Ie&&pe&&(Ie.src===pe||Ie.currentSrc===pe)){const{width:Et,height:Ve}=ky(Ie);if(Et&&Ve){Qe(pe,Et,Ve),U(ya(g,Et,Ve));return}}const Ze=al(g);!Ze.width||!Ze.height||U(Ze)},[q==null?void 0:q.url,Qe]),Jt=a.useCallback(g=>{if(T.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&ft();return}g.complete&&g.naturalWidth>0&&ft()}},[ft]),Te=a.useCallback(()=>{It(),ft(),he(g=>g+1)},[It,ft]);a.useEffect(()=>{Te();const g=A.current,pe=R.current,Re=new ResizeObserver(()=>Te());return g&&Re.observe(g),pe&&Re.observe(pe),window.addEventListener("resize",Te),()=>{Re.disconnect(),window.removeEventListener("resize",Te)}},[Te,n,x]),a.useLayoutEffect(()=>{if(!q)return;const g=T.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){ft();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&ft()}},[q==null?void 0:q.url,n,ft]),a.useEffect(()=>{Lt()},[Lt,E]),a.useEffect(()=>{const g=new Set,pe=[],Re=Ie=>{!(Ie!=null&&Ie.url)||g.has(Ie.url)||(g.add(Ie.url),pe.push(Ie))};t.forEach(Re),u.forEach(Ie=>Ie.items.forEach(Re)),pe.forEach(Ie=>{N.current.has(Ie.url)||Ay(Ie,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(Y!=="opening"||!B)return;if(!b){le("open");return}ie(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ie(!0),le("open")})});return()=>cancelAnimationFrame(g)},[Y,B,b]),a.useEffect(()=>{if(Y!=="closing")return;const g=setTimeout(()=>h(),Cn);return()=>clearTimeout(g)},[Y,h]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{Ae.current===n&&se.current===(q==null?void 0:q.url)||(Pe(),ae.current=null,J(null),ce(null),Se(null),re(0),Z(0),qe(!1),ue(!1),Me(!1),I.current=0,_.current=0,f.current="none",S.current=!1,L.current=null,M.current=!1,T.current=null,Lt(),Ae.current=n,se.current=q==null?void 0:q.url)},[n,q==null?void 0:q.url,qe,Pe,Lt]),a.useLayoutEffect(()=>{const g=Q.current;g!==null&&(Q.current=null,requestAnimationFrame(()=>{G.current(g)}))},[n,m,q==null?void 0:q.url]),a.useLayoutEffect(()=>{if(Y==="opening"){de.current=!1,ge(!1);return}if(Y!=="open"||de.current)return;if(!De&&!ot){de.current=!0;return}ge(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ge(!0),de.current=!0})});return()=>cancelAnimationFrame(g)},[Y,De==null?void 0:De.url,ot==null?void 0:ot.url]),a.useEffect(()=>{if(Y!=="open")return;const g=()=>{const Ve=it=>{it.stopPropagation(),it.preventDefault(),document.removeEventListener("click",Ve,!0)};document.addEventListener("click",Ve,!0)},pe=Ve=>{const it=Ve<0?1:-1;Pe(),Ge(it),ae.current=it,J(it),qe(!0),en()},Re=Ve=>{if(Math.abs(Ve)>$y&&Ye){pe(Ve);return}ae.current=null,J(null),ce(null),Se(null),qe(!0),Z(0),gt()},Ie=Ve=>{if(Ve.touches.length!==1||z.current)return;const it=Ve.touches[0];M.current=!0,L.current={x:it.clientX,y:it.clientY},f.current="none",_.current=0,S.current=!1},Ze=Ve=>{if(!L.current||Ve.touches.length!==1||z.current)return;const it=Ve.touches[0],jt=it.clientX-L.current.x,St=it.clientY-L.current.y;if(f.current==="none"){if(Math.abs(jt)<10&&Math.abs(St)<10)return;if(Math.abs(jt)>Math.abs(St)){if(!Ye)return;f.current="horizontal"}else if(St>0){if(!et)return;f.current="vertical"}else return}if(f.current==="horizontal"){S.current=!0,Me(!0),_.current=jt,Z(jt),Ve.preventDefault();return}f.current==="vertical"&&(S.current=!0,Me(!0),I.current=St,re(St),Ve.preventDefault())},Et=()=>{if(!L.current)return;const Ve=f.current,it=S.current;if(it&&Ve==="horizontal")Re(_.current),g();else if(it&&Ve==="vertical"){const jt=I.current;if(et&&jt>Sy){const St=window.innerHeight;I.current=St,ue(!0),re(St),le("closing")}else I.current=0,re(0);g()}else Ve==="horizontal"&&Math.abs(_.current)>0&&(Re(_.current),g());L.current=null,f.current="none",_.current=0,S.current=!1,Me(!1)};return document.addEventListener("touchstart",Ie,{passive:!0}),document.addEventListener("touchmove",Ze,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Ie),document.removeEventListener("touchmove",Ze),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[Y,Ye,qe,gt,Pe,et,en,Ge]);const Oe=a.useCallback(()=>{const g=($==null?void 0:$())??b??null;g&&B&&(oe(g),ie(!0)),le("closing")},[$,b,B]);a.useEffect(()=>{const g=Ie=>{if(Ie.key==="Escape"){if(s&&d||Y==="closing")return;Rt(),Oe();return}if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight"||Y!=="open"||!Ye)return;Ie.preventDefault();const Ze=Ie.key==="ArrowLeft"?-1:1;Ie.repeat&&H.current===Ze||Kt(Ze)},pe=Ie=>{if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight")return;const Ze=Ie.key==="ArrowLeft"?-1:1;H.current===Ze&&Rt()},Re=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",pe),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",pe),window.removeEventListener("blur",Re),Rt()}},[Y,s,d,Oe,Ye,Kt,Rt]),a.useEffect(()=>{Y!=="open"&&Rt()},[Y,Rt]);const Ke=()=>{Y==="closing"||l||Oe()},Ne=Y==="open",ze=Y==="closing",ut=$e>0?Math.max(0,1-$e/500):1,_e=$e>0?Math.max(.35,1-$e/500):1,Je=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!z.current)){if(ae.current!==null){Dt();return}Pe(),qe(!1)}},[Pe,qe,Dt]),tt=Y==="closing"?W??b:b,Wt=tt&&B&&(Y==="opening"||ze)?Iy(tt,B):void 0,Ct=We&&q?kt(q,"center"):$e>0?`translateY(${$e}px)`:Wt,st=B?Do(B,j):null,Nt=!!(tt&&B),At=Nt&&(Y==="closing"||Y==="open"&&D),Vt={position:"absolute",top:st==null?void 0:st.top,left:st==null?void 0:st.left,width:st==null?void 0:st.width,height:st==null?void 0:st.height,objectFit:"contain",transformOrigin:"top left",transform:Ct,opacity:$e>0?_e:Nt?1:Y==="opening"||ze?0:1,transition:we&&!fe?"none":fe?`transform ${Xi}ms ${mn}`:ee?`transform ${Cn}ms ${mn}, opacity ${Cn}ms ${mn}`:At?`transform ${Cn}ms ${mn}`:Y==="opening"||ze?`opacity ${Cn}ms ${mn}`:"none",pointerEvents:je&&Ne&&!We?"auto":"none",touchAction:je&&Ne?"none":void 0,zIndex:1,overflow:je?"hidden":void 0},zt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ne&&!We?"auto":"none"},Pt=(g,pe,Re="adjacent")=>{const Ie=Tt(g);if(!Ie)return{display:"none"};const Ze=Re==="far"?pe==="left"?"far-left":"far-right":pe==="left"?"left-adjacent":"right-adjacent",{start:Et}=ke!==null?bc(Ie,Ze,ke,j):{start:Re==="far"?lr(Ie,pe,j):ji(Ie,pe,j)},Ve=Do(Et,j),it=kt(g,Ze),jt=!We&&Re==="adjacent"&&Ne&&!te?Hy(Ie,pe,j):null,St=Re==="far"&&We&&ke===(pe==="left"?-1:1),cn=we&&!fe?!1:fe,un=Re==="adjacent"&&Ne&&te&&!We;return{position:"absolute",top:Ve.top,left:Ve.left,width:Ve.width,height:Ve.height,objectFit:"contain",transform:it??(jt?`translate(${jt.x}px, ${jt.y}px)`:void 0),opacity:Re==="far"?Ne&&St?1:0:Ne?1:0,transition:cn?Re==="far"?`transform ${Xi}ms ${mn}`:`transform ${Xi}ms ${mn}, opacity ${Cn}ms ${mn}`:un?`transform ${Cn}ms ${mn}`:Y==="opening"||ze?`opacity ${Cn}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},Qt=(g,pe)=>{const Re=Tt(g);return Re?_y(ji(Re,pe,j),pe,j):null},wt=g=>pe=>{if(!l){if(M.current){M.current=!1;return}pe.stopPropagation(),bt(g)}},Gt=De?Qt(De,"left"):null,pt=ot?Qt(ot,"right"):null,Ft=Gt?Do(Gt,j):null,Bt=pt?Do(pt,j):null;return r.jsxs("div",{ref:R,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Y==="open"?"none":void 0},onClick:Ke,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ne?ut:0,transition:we?"none":`opacity ${Cn}ms ${mn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:A,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Ne?1:0,transition:we?"none":`opacity ${Cn}ms ${mn}`,pointerEvents:"none"},children:r.jsx(ec,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Ke})})]}),Ne&&Mt&&r.jsx(Vo,{media:Mt,style:Pt(Mt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${Mt.url}`),Ne&&De&&r.jsxs(r.Fragment,{children:[r.jsx(Vo,{media:De,style:Pt(De,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${De.url}`),Ft&&r.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||we?"default":"pointer",pointerEvents:l||we?"none":"auto",zIndex:3},onClick:wt(-1)})]}),Ne&&ot&&r.jsxs(r.Fragment,{children:[r.jsx(Vo,{media:ot,style:Pt(ot,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ot.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||we?"default":"pointer",pointerEvents:l||we?"none":"auto",zIndex:3},onClick:wt(1)})]}),Ne&&_t&&r.jsx(Vo,{media:_t,style:Pt(_t,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${_t.url}`),B&&q&&(je?r.jsx(jy,{src:q.url,phase:Y,onMediaElement:Jt,wrapperStyle:Vt,videoStyle:zt,onLoadedMetadata:ft,onTransitionEnd:Je},`${n}-${q.url}`):r.jsx("img",{ref:Jt,src:q.url,alt:q.name,onLoad:ft,onTransitionEnd:Je,style:Vt},`${n}-${q.url}`))]})}const zy=20,By=.18;function Dy(e){return`
17538
+ `}const Cn=500,Xi=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",Sy=72,$y=50,Cy=1e4,Ty=650,Ly=500;function Iy(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,l=e.top-t.top;return`translate(${o}px, ${l}px) scale(${n}, ${i})`}function vc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=or(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Ry(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?vc(i,n):null}function Ey(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function Ji(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function rs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Ji(e,i,n)}const ky=.03;function xc(e){return e.width*ky}const ta={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Do(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function as(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function My(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ya(e,t,n){const i=e.getBoundingClientRect(),o=i.width,l=i.height,s=t/n,d=o/l;if(s>d){const u=o/s;return{width:o,height:u,left:i.left,top:i.top+(l-u)/2}}const c=l*s;return{width:c,height:l,left:i.left+(o-c)/2,top:i.top}}function Py(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ya(e,t.width,t.height)}function Ay(e,t){if(Ir(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Fy(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function Wy({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Ir(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function ji(e,t,n){const{width:i,height:o,top:l}=e,{left:s,width:d}=n,c=xc(n);return t==="left"?{left:s+c-i,top:l,width:i,height:o}:{left:s+d-c,top:l,width:i,height:o}}function sr(e,t,n){const i=ji(e,t,n);return{...i,left:2*i.left-e.left}}function _y(e,t,n){const{left:i,width:o}=n,l=xc(n);return t==="left"?{left:i,top:e.top,width:l,height:e.height}:{left:i+o-l,top:e.top,width:l,height:e.height}}function bc(e,t,n,i){const o=ji(e,"left",i),l=ji(e,"right",i),s=sr(e,"left",i),d=sr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:l,end:e};case"left-adjacent":return{start:o,end:s};case"far-right":return{start:d,end:l};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:l};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:l,end:d};case"far-left":return{start:s,end:o};default:return{start:e,end:e}}}function Ny(e,t,n,i){const{start:o,end:l}=bc(e,t,n,i);return{x:l.left-o.left,y:l.top-o.top}}function Hy(e,t,n){const i=ji(e,t,n),o=sr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ir(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function jy({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:l,onTransitionEnd:s}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:s,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:l,onClick:c=>c.stopPropagation(),style:o},e)})}function Vo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Ir(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const l=o.currentTarget;l.videoWidth>0&&l.videoHeight>0&&(i==null||i(e.url,l.videoWidth,l.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const l=o.currentTarget;l.naturalWidth>0&&l.naturalHeight>0&&(i==null||i(e.url,l.naturalWidth,l.naturalHeight))},onTransitionEnd:n})}function Oy({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:b,resolveCloseSourceRect:T,onClose:f,onPrev:L,onNext:$}){const R=a.useRef(null),E=a.useRef(null),C=a.useRef(null),U=a.useRef(new Map),[k,j]=a.useState(0),I=a.useRef(null),w=a.useRef(0),W=a.useRef(0),h=a.useRef("none"),S=a.useRef(!1),M=a.useRef(!1),z=a.useRef(!1),K=a.useRef(null),le=a.useRef(null),Y=a.useRef(null),D=a.useRef(()=>{}),N=a.useRef(null),F=a.useRef(null),A=a.useRef(null),q=a.useRef(!1),[G,Z]=a.useState(null),[_,me]=a.useState(ta),[v,fe]=a.useState(0),[J,de]=a.useState("opening"),[$e,oe]=a.useState(0),[xe,Q]=a.useState(0),[ye,ve]=a.useState(!1),[ke,we]=a.useState(null),[Me,X]=a.useState(null),[ue,Se]=a.useState(null),[O,ce]=a.useState(!1),[H,re]=a.useState(null),[ae,ne]=a.useState(!1),ie=a.useRef(!1),[be,Ce]=a.useState(!1),[ee,pe]=a.useState(!1),Ae=a.useRef(n),se=a.useRef(void 0),V=t[n],je=V?Ir(V):!1,We=xe!==0||ye,et=!s&&(!l||!!d),Ye=c&&!s,st=u.length>1,mt=a.useCallback((g,ge)=>t.length<=1?null:t[(g+ge+t.length)%t.length]??null,[t]),De=st?Ji(u,m,-1):mt(n,-1),ot=st?Ji(u,m,1):mt(n,1),$t=ke===-1&&We?st&&Me!==null?Ji(u,Me,-1):ue!==null?mt(ue,-1):null:null,rt=ke===1&&We?st&&Me!==null?Ji(u,Me,1):ue!==null?mt(ue,1):null:null,Ue=$t&&$t.url!==(De==null?void 0:De.url)?$t:null,ht=rt&&rt.url!==(ot==null?void 0:ot.url)?rt:null,xt=De&&Ye?(()=>{const g=st?rs(u,m,-1):t.length>2?mt((n-1+t.length)%t.length,-1):null;return g&&g.url!==De.url?g:null})():null,dt=ot&&Ye?(()=>{const g=st?rs(u,m,1):t.length>2?mt((n+1)%t.length,1):null;return g&&g.url!==ot.url?g:null})():null,kt=Ue??xt,_t=ht??dt,Qe=a.useCallback((g,ge,Re)=>{if(!g||!ge||!Re)return;const Ie=U.current,Ze=Ie.get(g);(Ze==null?void 0:Ze.width)===ge&&(Ze==null?void 0:Ze.height)===Re||(Ie.set(g,{width:ge,height:Re}),j(Et=>Et+1))},[]),Tt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const ge=U.current.get(g.url);return Py(E.current,ge)},[k,v]),Lt=a.useCallback(()=>{if(!V)return;const g=Tt(V);if(g){Z(g);return}const ge=E.current;ge&&Z(as(ge))},[V,Tt]),Ge=a.useCallback(g=>{if(st){const ge=u.length;X((m+g+ge)%ge),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),X(null))},[st,u.length,m,t.length,n]),qe=a.useCallback(g=>{z.current=g,ve(g)},[]),Pe=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),gt=a.useCallback(()=>{Pe(),K.current=window.setTimeout(()=>{Pe(),qe(!1)},Xi+32)},[Pe,qe]),It=a.useCallback(()=>{const g=R.current;if(!g){me({left:0,top:0,width:typeof window<"u"?window.innerWidth:ta.width,height:typeof window<"u"?window.innerHeight:ta.height});return}const ge=g.getBoundingClientRect();me({left:ge.left,top:ge.top,width:ge.width,height:ge.height})},[]),Mt=a.useCallback((g,ge)=>{if(We){if(be&&!ye)return`translate(${xe}px, 0px)`;if(ye&&ke!==null){const Re=Tt(g);if(!Re)return;const{x:Ie,y:Ze}=Ny(Re,ge,ke,_);return`translate(${Ie}px, ${Ze}px)`}if(ye)return"translate(0px, 0px)"}},[We,be,ye,xe,ke,_,Tt]),Dt=a.useCallback(()=>{const g=le.current;le.current=null,Pe(),qe(!1),we(null),X(null),Se(null),Q(0),Ce(!1),S.current=!1,W.current=0,h.current="none",g===-1?L():g===1&&$()},[Pe,qe,L,$]),en=a.useCallback(()=>{Pe(),K.current=window.setTimeout(()=>{le.current!==null&&Dt()},Xi+32)},[Pe,Dt]),on=a.useCallback(()=>{Pe(),le.current=null,qe(!1),we(null),X(null),Se(null),Q(0),Ce(!1),S.current=!1,W.current=0,h.current="none"},[Pe,qe]),bt=a.useCallback(g=>{if(!(!Ye||!G)){if(z.current){if(le.current===g){Y.current=g,Dt();return}on()}Pe(),Ge(g),le.current=g,we(g),qe(!0),en()}},[Ye,G,Dt,on,Pe,Ge,qe,en]);D.current=bt;const Rt=a.useCallback(()=>{N.current=null,q.current=!1,F.current!==null&&(window.clearInterval(F.current),F.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Ut=a.useCallback(g=>{F.current!==null&&window.clearInterval(F.current);const ge=q.current?Ly:Ty;F.current=window.setInterval(()=>{D.current(g)},ge)},[]),Kt=a.useCallback(g=>{N.current!==g&&(Rt(),N.current=g,q.current=!1,D.current(g),Ut(g),A.current=window.setTimeout(()=>{A.current=null,N.current===g&&(q.current=!0,Ut(g))},Cy))},[Rt,Ut]),ft=a.useCallback(()=>{const g=E.current;if(!g)return;const ge=V==null?void 0:V.url,Re=ge?U.current.get(ge):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){Z(ya(g,Re.width,Re.height));return}const Ie=C.current;if(Ie&&ge&&(Ie.src===ge||Ie.currentSrc===ge)){const{width:Et,height:Ve}=My(Ie);if(Et&&Ve){Qe(ge,Et,Ve),Z(ya(g,Et,Ve));return}}const Ze=as(g);!Ze.width||!Ze.height||Z(Ze)},[V==null?void 0:V.url,Qe]),Jt=a.useCallback(g=>{if(C.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&ft();return}g.complete&&g.naturalWidth>0&&ft()}},[ft]),Te=a.useCallback(()=>{It(),ft(),fe(g=>g+1)},[It,ft]);a.useEffect(()=>{Te();const g=E.current,ge=R.current,Re=new ResizeObserver(()=>Te());return g&&Re.observe(g),ge&&Re.observe(ge),window.addEventListener("resize",Te),()=>{Re.disconnect(),window.removeEventListener("resize",Te)}},[Te,n,x]),a.useLayoutEffect(()=>{if(!V)return;const g=C.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){ft();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&ft()}},[V==null?void 0:V.url,n,ft]),a.useEffect(()=>{Lt()},[Lt,k]),a.useEffect(()=>{const g=new Set,ge=[],Re=Ie=>{!(Ie!=null&&Ie.url)||g.has(Ie.url)||(g.add(Ie.url),ge.push(Ie))};t.forEach(Re),u.forEach(Ie=>Ie.items.forEach(Re)),ge.forEach(Ie=>{U.current.has(Ie.url)||Ay(Ie,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(J!=="opening"||!G)return;if(!b){de("open");return}ce(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(!0),de("open")})});return()=>cancelAnimationFrame(g)},[J,G,b]),a.useEffect(()=>{if(J!=="closing")return;const g=setTimeout(()=>f(),Cn);return()=>clearTimeout(g)},[J,f]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{Ae.current===n&&se.current===(V==null?void 0:V.url)||(Pe(),le.current=null,we(null),X(null),Se(null),oe(0),Q(0),qe(!1),pe(!1),Ce(!1),w.current=0,W.current=0,h.current="none",S.current=!1,I.current=null,M.current=!1,C.current=null,Lt(),Ae.current=n,se.current=V==null?void 0:V.url)},[n,V==null?void 0:V.url,qe,Pe,Lt]),a.useLayoutEffect(()=>{const g=Y.current;g!==null&&(Y.current=null,requestAnimationFrame(()=>{D.current(g)}))},[n,m,V==null?void 0:V.url]),a.useLayoutEffect(()=>{if(J==="opening"){ie.current=!1,ne(!1);return}if(J!=="open"||ie.current)return;if(!De&&!ot){ie.current=!0;return}ne(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ne(!0),ie.current=!0})});return()=>cancelAnimationFrame(g)},[J,De==null?void 0:De.url,ot==null?void 0:ot.url]),a.useEffect(()=>{if(J!=="open")return;const g=()=>{const Ve=it=>{it.stopPropagation(),it.preventDefault(),document.removeEventListener("click",Ve,!0)};document.addEventListener("click",Ve,!0)},ge=Ve=>{const it=Ve<0?1:-1;Pe(),Ge(it),le.current=it,we(it),qe(!0),en()},Re=Ve=>{if(Math.abs(Ve)>$y&&Ye){ge(Ve);return}le.current=null,we(null),X(null),Se(null),qe(!0),Q(0),gt()},Ie=Ve=>{if(Ve.touches.length!==1||z.current)return;const it=Ve.touches[0];M.current=!0,I.current={x:it.clientX,y:it.clientY},h.current="none",W.current=0,S.current=!1},Ze=Ve=>{if(!I.current||Ve.touches.length!==1||z.current)return;const it=Ve.touches[0],jt=it.clientX-I.current.x,St=it.clientY-I.current.y;if(h.current==="none"){if(Math.abs(jt)<10&&Math.abs(St)<10)return;if(Math.abs(jt)>Math.abs(St)){if(!Ye)return;h.current="horizontal"}else if(St>0){if(!et)return;h.current="vertical"}else return}if(h.current==="horizontal"){S.current=!0,Ce(!0),W.current=jt,Q(jt),Ve.preventDefault();return}h.current==="vertical"&&(S.current=!0,Ce(!0),w.current=St,oe(St),Ve.preventDefault())},Et=()=>{if(!I.current)return;const Ve=h.current,it=S.current;if(it&&Ve==="horizontal")Re(W.current),g();else if(it&&Ve==="vertical"){const jt=w.current;if(et&&jt>Sy){const St=window.innerHeight;w.current=St,pe(!0),oe(St),de("closing")}else w.current=0,oe(0);g()}else Ve==="horizontal"&&Math.abs(W.current)>0&&(Re(W.current),g());I.current=null,h.current="none",W.current=0,S.current=!1,Ce(!1)};return document.addEventListener("touchstart",Ie,{passive:!0}),document.addEventListener("touchmove",Ze,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Ie),document.removeEventListener("touchmove",Ze),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[J,Ye,qe,gt,Pe,et,en,Ge]);const Oe=a.useCallback(()=>{const g=(T==null?void 0:T())??b??null;g&&G&&(re(g),ce(!0)),de("closing")},[T,b,G]);a.useEffect(()=>{const g=Ie=>{if(Ie.key==="Escape"){if(l&&d||J==="closing")return;Rt(),Oe();return}if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight"||J!=="open"||!Ye)return;Ie.preventDefault();const Ze=Ie.key==="ArrowLeft"?-1:1;Ie.repeat&&N.current===Ze||Kt(Ze)},ge=Ie=>{if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight")return;const Ze=Ie.key==="ArrowLeft"?-1:1;N.current===Ze&&Rt()},Re=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",ge),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",ge),window.removeEventListener("blur",Re),Rt()}},[J,l,d,Oe,Ye,Kt,Rt]),a.useEffect(()=>{J!=="open"&&Rt()},[J,Rt]);const Ke=()=>{J==="closing"||s||Oe()},Ne=J==="open",ze=J==="closing",ut=$e>0?Math.max(0,1-$e/500):1,_e=$e>0?Math.max(.35,1-$e/500):1,Je=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!z.current)){if(le.current!==null){Dt();return}Pe(),qe(!1)}},[Pe,qe,Dt]),tt=J==="closing"?H??b:b,Wt=tt&&G&&(J==="opening"||ze)?Iy(tt,G):void 0,Ct=We&&V?Mt(V,"center"):$e>0?`translateY(${$e}px)`:Wt,lt=G?Do(G,_):null,Nt=!!(tt&&G),At=Nt&&(J==="closing"||J==="open"&&O),Vt={position:"absolute",top:lt==null?void 0:lt.top,left:lt==null?void 0:lt.left,width:lt==null?void 0:lt.width,height:lt==null?void 0:lt.height,objectFit:"contain",transformOrigin:"top left",transform:Ct,opacity:$e>0?_e:Nt?1:J==="opening"||ze?0:1,transition:be&&!ye?"none":ye?`transform ${Xi}ms ${mn}`:ee?`transform ${Cn}ms ${mn}, opacity ${Cn}ms ${mn}`:At?`transform ${Cn}ms ${mn}`:J==="opening"||ze?`opacity ${Cn}ms ${mn}`:"none",pointerEvents:je&&Ne&&!We?"auto":"none",touchAction:je&&Ne?"none":void 0,zIndex:1,overflow:je?"hidden":void 0},zt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ne&&!We?"auto":"none"},Pt=(g,ge,Re="adjacent")=>{const Ie=Tt(g);if(!Ie)return{display:"none"};const Ze=Re==="far"?ge==="left"?"far-left":"far-right":ge==="left"?"left-adjacent":"right-adjacent",{start:Et}=ke!==null?bc(Ie,Ze,ke,_):{start:Re==="far"?sr(Ie,ge,_):ji(Ie,ge,_)},Ve=Do(Et,_),it=Mt(g,Ze),jt=!We&&Re==="adjacent"&&Ne&&!ae?Hy(Ie,ge,_):null,St=Re==="far"&&We&&ke===(ge==="left"?-1:1),cn=be&&!ye?!1:ye,un=Re==="adjacent"&&Ne&&ae&&!We;return{position:"absolute",top:Ve.top,left:Ve.left,width:Ve.width,height:Ve.height,objectFit:"contain",transform:it??(jt?`translate(${jt.x}px, ${jt.y}px)`:void 0),opacity:Re==="far"?Ne&&St?1:0:Ne?1:0,transition:cn?Re==="far"?`transform ${Xi}ms ${mn}`:`transform ${Xi}ms ${mn}, opacity ${Cn}ms ${mn}`:un?`transform ${Cn}ms ${mn}`:J==="opening"||ze?`opacity ${Cn}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},Qt=(g,ge)=>{const Re=Tt(g);return Re?_y(ji(Re,ge,_),ge,_):null},wt=g=>ge=>{if(!s){if(M.current){M.current=!1;return}ge.stopPropagation(),bt(g)}},Gt=De?Qt(De,"left"):null,pt=ot?Qt(ot,"right"):null,Ft=Gt?Do(Gt,_):null,Bt=pt?Do(pt,_):null;return r.jsxs("div",{ref:R,className:[`${e}-lightbox`,l?`${e}-lightbox-editor`:"",s?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Ke,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ne?ut:0,transition:be?"none":`opacity ${Cn}ms ${mn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:E,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Ne?1:0,transition:be?"none":`opacity ${Cn}ms ${mn}`,pointerEvents:"none"},children:r.jsx(ec,{prefix:e,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,onClose:Ke})})]}),Ne&&kt&&r.jsx(Vo,{media:kt,style:Pt(kt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${kt.url}`),Ne&&De&&r.jsxs(r.Fragment,{children:[r.jsx(Vo,{media:De,style:Pt(De,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${De.url}`),Ft&&r.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:s||be?"default":"pointer",pointerEvents:s||be?"none":"auto",zIndex:3},onClick:wt(-1)})]}),Ne&&ot&&r.jsxs(r.Fragment,{children:[r.jsx(Vo,{media:ot,style:Pt(ot,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ot.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:s||be?"default":"pointer",pointerEvents:s||be?"none":"auto",zIndex:3},onClick:wt(1)})]}),Ne&&_t&&r.jsx(Vo,{media:_t,style:Pt(_t,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${_t.url}`),G&&V&&(je?r.jsx(jy,{src:V.url,phase:J,onMediaElement:Jt,wrapperStyle:Vt,videoStyle:zt,onLoadedMetadata:ft,onTransitionEnd:Je},`${n}-${V.url}`):r.jsx("img",{ref:Jt,src:V.url,alt:V.name,onLoad:ft,onTransitionEnd:Je,style:Vt},`${n}-${V.url}`))]})}const zy=20,By=.18;function Dy(e){return`
17510
17539
  .${e}-wrapper {
17511
17540
  box-sizing: border-box;
17512
17541
  max-width: 100%;
@@ -17580,7 +17609,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17580
17609
  pointer-events: auto;
17581
17610
  }
17582
17611
  ${wy(e)}
17583
- `}function Vy(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,s]=n.split(":").map(Number),l=i?s:o,d=i?o:s;return d>0?l/d:1}function Gy(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:y.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:y.scalingValue(i*By,n??!1),[`--${t}-image-aspect`]:Vy(e)}}function qy(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.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 Xt(n,t)}function Ky(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function Uy(e,t,n,i,o,s){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);s(n,d?vc(d,o):void 0)}}function Xy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),c=a.useMemo(()=>Dy(d),[d]),u=t??[],m=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,b=y.scalingValue(x,n??!1),$=`max(${b}, ${zy}px)`,{objectFitMode:h,imageStyle:w}=Ky(e),C=qy(e,n),R=a.useRef(null),[A,T]=a.useState(!1),[N,E]=a.useState([]),[V,L]=a.useState(0),[I,_]=a.useState(0),[f,S]=a.useState(null),[M,z]=a.useState({title1:"",title2:"",title3:""}),K=(!n||i)&&!A,ae=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},Q=ae.sizeType??"none",G=K&&Q!=="none"?`${d}-item-image-hover-${Q}`:void 0,H=(ae.value??120)/100,k={width:y.scalingValue(m,n??!1),...C,...Gy(e,d,n),[`--${d}-image-hover-scale`]:String(H)},F=(()=>{const le={},$e=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return $e&&(le["--cntrl-article-width"]=$e),le})(),X=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),B=a.useMemo(()=>Ey(u),[u]),U=a.useMemo(()=>Fy(u),[u]),j=(le,$e)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const re=B.findIndex(Z=>Z.gridIndex===le);if(re<0)return;const be=B[re];_(re),E(be.items),L(0),z(be.entry),S($e??null),T(!0)},xe=a.useCallback(()=>{T(!1),S(null)},[]),v=a.useCallback(()=>{const le=B[I];return!le||!R.current?f:Ry(R.current,le.gridIndex,h)??f},[B,I,f,h]),he=a.useCallback(le=>{if(B.length>1){const $e=B.length,re=(I+le+$e)%$e,be=B[re];_(re),E(be.items),L(0),z(be.entry);return}L($e=>($e+le+N.length)%N.length)},[B,I,N.length]),Y=B.length>1||N.length>1;return a.useEffect(()=>{if(!A||typeof document>"u")return;const le=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=le}},[A]),a.useEffect(()=>{!n||o||i||T(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&T(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(Wy,{mediaList:U}),r.jsx("div",{ref:R,className:`${d}-wrapper`,style:k,children:u.map((le,$e)=>{var Z,fe;const re=!!((Z=le.image)!=null&&Z.url),be=Uy(!!X,re,$e,d,h,j);return r.jsxs("div",{className:`${d}-item`,children:[le.title?r.jsx("span",{className:`${d}-item-title`,onClick:be,style:be?{cursor:"pointer"}:void 0,children:le.title}):null,(fe=le.image)!=null&&fe.url?r.jsx("span",{className:[`${d}-item-image`,G].filter(Boolean).join(" "),children:le.image.type==="video"?r.jsx("video",{src:le.image.url,"data-waterfall-index":$e,style:w,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:be}):r.jsx("img",{src:le.image.url,alt:le.image.name??"","data-waterfall-index":$e,style:w,onClick:be})}):null,$e<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:b},children:o&&!A&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:$,height:"100%"}})})]},$e)})}),A&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const le=(l?document.getElementById(l):null)??document.body;return gi.createPortal(r.jsx("div",{style:F,"data-selection":"none",children:r.jsx(Oy,{prefix:d,items:N,index:V,entry:M,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Y,lightboxEntries:B,entryIdx:I,layoutId:s,sourceRect:f,resolveCloseSourceRect:v,onClose:xe,onPrev:()=>he(-1),onNext:()=>he(1)})}),le)})()]})}const Yy=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17612
+ `}function Vy(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,l]=n.split(":").map(Number),s=i?l:o,d=i?o:l;return d>0?s/d:1}function Gy(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:y.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:y.scalingValue(i*By,n??!1),[`--${t}-image-aspect`]:Vy(e)}}function qy(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.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 Xt(n,t)}function Ky(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function Uy(e,t,n,i,o,l){if(!(!e||!t))return s=>{var c;const d=((c=s.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(s.currentTarget instanceof HTMLImageElement||s.currentTarget instanceof HTMLVideoElement?s.currentTarget:null);l(n,d?vc(d,o):void 0)}}function Xy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:l,portalId:s}){const{prefix:d}=y.useScopedStyles(),c=a.useMemo(()=>Dy(d),[d]),u=t??[],m=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,b=y.scalingValue(x,n??!1),T=`max(${b}, ${zy}px)`,{objectFitMode:f,imageStyle:L}=Ky(e),$=qy(e,n),R=a.useRef(null),[E,C]=a.useState(!1),[U,k]=a.useState([]),[j,I]=a.useState(0),[w,W]=a.useState(0),[h,S]=a.useState(null),[M,z]=a.useState({title1:"",title2:"",title3:""}),K=(!n||i)&&!E,le=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},Y=le.sizeType??"none",D=K&&Y!=="none"?`${d}-item-image-hover-${Y}`:void 0,N=(le.value??120)/100,F={width:y.scalingValue(m,n??!1),...$,...Gy(e,d,n),[`--${d}-image-hover-scale`]:String(N)},A=(()=>{const de={},$e=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return $e&&(de["--cntrl-article-width"]=$e),de})(),q=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),G=a.useMemo(()=>Ey(u),[u]),Z=a.useMemo(()=>Fy(u),[u]),_=(de,$e)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const oe=G.findIndex(Q=>Q.gridIndex===de);if(oe<0)return;const xe=G[oe];W(oe),k(xe.items),I(0),z(xe.entry),S($e??null),C(!0)},me=a.useCallback(()=>{C(!1),S(null)},[]),v=a.useCallback(()=>{const de=G[w];return!de||!R.current?h:Ry(R.current,de.gridIndex,f)??h},[G,w,h,f]),fe=a.useCallback(de=>{if(G.length>1){const $e=G.length,oe=(w+de+$e)%$e,xe=G[oe];W(oe),k(xe.items),I(0),z(xe.entry);return}I($e=>($e+de+U.length)%U.length)},[G,w,U.length]),J=G.length>1||U.length>1;return a.useEffect(()=>{if(!E||typeof document>"u")return;const de=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=de}},[E]),a.useEffect(()=>{!n||o||i||C(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&C(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(Wy,{mediaList:Z}),r.jsx("div",{ref:R,className:`${d}-wrapper`,style:F,children:u.map((de,$e)=>{var Q,ye;const oe=!!((Q=de.image)!=null&&Q.url),xe=Uy(!!q,oe,$e,d,f,_);return r.jsxs("div",{className:`${d}-item`,children:[de.title?r.jsx("span",{className:`${d}-item-title`,onClick:xe,style:xe?{cursor:"pointer"}:void 0,children:de.title}):null,(ye=de.image)!=null&&ye.url?r.jsx("span",{className:[`${d}-item-image`,D].filter(Boolean).join(" "),children:de.image.type==="video"?r.jsx("video",{src:de.image.url,"data-waterfall-index":$e,style:L,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:xe}):r.jsx("img",{src:de.image.url,alt:de.image.name??"","data-waterfall-index":$e,style:L,onClick:xe})}):null,$e<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:b},children:o&&!E&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:T,height:"100%"}})})]},$e)})}),E&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const de=(s?document.getElementById(s):null)??document.body;return gi.createPortal(r.jsx("div",{style:A,"data-selection":"none",children:r.jsx(Oy,{prefix:d,items:U,index:j,entry:M,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:J,lightboxEntries:G,entryIdx:w,layoutId:l,sourceRect:h,resolveCloseSourceRect:v,onClose:me,onPrev:()=>fe(-1),onNext:()=>fe(1)})}),de)})()]})}const Yy=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17584
17613
  import type React from 'react';
17585
17614
  import { createPortal } from 'react-dom';
17586
17615
  import { CommonComponentProps } from '../props';
@@ -18035,7 +18064,7 @@ export function Waterfall({
18035
18064
  </>
18036
18065
  );
18037
18066
  }
18038
- `,Zy="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),On={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Jy(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...On.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...On.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...On.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...On.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...On.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...On.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...On.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Oi=Kn.filter(e=>e!=="count"),Qy=Oi.reduce((e,t)=>({...e,...Jy(t)}),{}),ev=Oi.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Arial",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function na(e){return Oi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const tv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Oi.map(e=>[Oa[e],za(e)]))},Go={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},nv=[{title:"Salton Sea from Above",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],iv={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:nv},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...On.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...Qy},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Zy,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...ev},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...na({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...na({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...na({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[tv]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},ov={element:Xy,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Oi.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Oi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})},schema:iv,sourceCode:Yy},sl="500ms",ll={color:"#000000",hover:"#cccccc"},Yi={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},rv={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},ia={offset:{x:0,y:0},linkColor:"#cccccc"},cl={sizeType:"drag",value:3},av="left";function sv(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:av,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function bi(e,t,n){return`${e}: ${y.scalingValue(t/1440,n)};`}function lv(e,t){return`
18067
+ `,Zy="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),On={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Jy(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...On.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...On.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...On.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...On.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...On.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...On.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...On.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Oi=Kn.filter(e=>e!=="count"),Qy=Oi.reduce((e,t)=>({...e,...Jy(t)}),{}),ev=Oi.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Arial",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function na(e){return Oi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const tv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Oi.map(e=>[Oa[e],za(e)]))},Go={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},nv=[{title:"Salton Sea from Above",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],iv={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:nv},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...On.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...Qy},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Zy,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...ev},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...na({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...na({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...na({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[tv]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},ov={element:Xy,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Oi.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Oi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})},schema:iv,sourceCode:Yy},ls="500ms",ss={color:"#000000",hover:"#cccccc"},Yi={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},rv={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},ia={offset:{x:0,y:0},linkColor:"#cccccc"},cs={sizeType:"drag",value:3},av="left";function lv(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:av,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function bi(e,t,n){return`${e}: ${y.scalingValue(t/1440,n)};`}function sv(e,t){return`
18039
18068
  .${e}-wrapper {
18040
18069
  position: relative;
18041
18070
  width: 100%;
@@ -18237,7 +18266,7 @@ export function Waterfall({
18237
18266
  from { clip-path: inset(100% 0 0 0); }
18238
18267
  to { clip-path: inset(0 0 0 0); }
18239
18268
  }
18240
- `}function cv({settings:e,content:t,isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,s]=a.useState(null),l=sv(e,n),[d,c]=a.useState(void 0),[u,m]=a.useState(null),[x,b]=a.useState(0),[$,h]=a.useState(!1),[w,C]=a.useState(0),R=t??[],A=(e==null?void 0:e.trigger)??cl,T=A.sizeType??"drag",N=A.value??cl.value,E=(e==null?void 0:e.direction)??"horizontal",V=(e==null?void 0:e.transition)??"slide",L=(e==null?void 0:e.nav)??"classic",I=(e==null?void 0:e.navSize)??"m",_=rv[I],f=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,S=ce=>y.scalingValue(ce*f,n),M=(e==null?void 0:e.show)??"always",z=(e==null?void 0:e.controls)??null,K=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,ae=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,Q=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,G=(e==null?void 0:e.controlsColor)??ll.color,H=(e==null?void 0:e.controlsHoverColor)??ll.hover,k=(e==null?void 0:e.navColor)??Yi.colors.inactive,F=(e==null?void 0:e.navPaginationColor)??Yi.colors.pagination,X=(e==null?void 0:e.navBackgroundColor)??Yi.colors.background,B=(e==null?void 0:e.linkColor)??ia.linkColor,U=E==="horizontal",j=T==="click",xe=T==="drag",v=T==="auto",he=V==="fade in"||V==="reveal",Y=L==="classic",le=M!=="never",$e=M==="on hover",re=a.useRef(V),be=a.useRef(T),Z=a.useRef(N),fe=a.useRef(E),ye=a.useRef(L),ke=y.scalingValue(K,n),J={width:ke,height:ke,maxWidth:ke},Ce=ce=>{o&&o.go(ce)};return a.useEffect(()=>{if(!$)return;const ce=window.setTimeout(()=>h(!1),300);return()=>window.clearTimeout(ce)},[$,x]),a.useEffect(()=>{if(!u)return;const ce=new ResizeObserver(ve=>{if(!o)return;const[Se]=ve;c({width:Math.round(Se.contentRect.width),height:Math.round(Se.contentRect.height)})});return ce.observe(u),()=>ce.unobserve(u)},[u]),a.useEffect(()=>{re.current!==V&&(C(ce=>ce+1),re.current=V)},[V]),a.useEffect(()=>{be.current!==T&&(C(ce=>ce+1),be.current=T)},[T]),a.useEffect(()=>{Z.current!==N&&(C(ce=>ce+1),Z.current=N)},[N]),a.useEffect(()=>{fe.current!==E&&(C(ce=>ce+1),fe.current=E)},[E]),a.useEffect(()=>{ye.current!==L&&(C(ce=>ce+1),ye.current=L)},[L]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:lv(i,n)}}),r.jsxs("div",{className:nt(`${i}-wrapper`,{[`${i}-transition-reveal`]:V==="reveal",[`${i}-transition-reveal-vertical`]:V==="reveal"&&!U}),ref:m,children:[r.jsxs("div",{className:`${i}-slider-inner`,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:"transparent"},children:[r.jsx(br,{onMove:ce=>{h(!0),b(ce.index)},ref:s,options:{arrows:!1,speed:parseInt(sl),autoplay:v,...v&&{interval:N*1e3},direction:U||he?"ltr":"ttb",pagination:!1,drag:xe,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:he?"fade":"loop",rewind:!0},children:R.map((ce,ve)=>r.jsx(wr,{children:r.jsx("div",{className:`${i}-slider-item`,children:r.jsx("div",{className:`${i}-img-wrapper`,children:r.jsx("img",{className:nt(`${i}-slider-image`,{[`${i}-contain`]:ce.image.objectFit==="contain",[`${i}-cover`]:ce.image.objectFit==="cover"}),src:ce.image.url,alt:ce.image.name??""})})})},ve))},w),le&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(`${i}-arrow`,{[`${i}-arrow-prev`]:U,[`${i}-arrow-prev-vertical`]:!U,[`${i}-hover-arrow`]:$e}),style:{color:G,"--arrow-hover-color":H,...J},children:r.jsxs("button",{onClick:ce=>{ce.stopPropagation(),Ce("-1")},className:`${i}-arrow-inner`,style:{transform:`translate(${y.scalingValue(ae,n)}, ${y.scalingValue(Q*(U?1:-1),n)}) rotate(${U?"0deg":"90deg"})`},children:[z&&r.jsx(rn,{url:z,fill:G,hoverFill:H,className:nt(`${i}-arrow-img`,`${i}-mirror`),style:J}),!z&&r.jsx(dl,{color:G,className:nt(`${i}-arrow-icon`,`${i}-arrow-img`,`${i}-mirror`)})]})}),r.jsx("div",{className:nt(`${i}-arrow`,{[`${i}-arrow-next`]:U,[`${i}-arrow-next-vertical`]:!U,[`${i}-hover-arrow`]:$e}),style:{color:G,"--arrow-hover-color":H,...J},children:r.jsxs("button",{className:`${i}-arrow-inner`,onClick:ce=>{ce.stopPropagation(),Ce("+1")},style:{transform:`translate(${y.scalingValue(ae*(U?-1:1),n)}, ${y.scalingValue(Q,n)}) rotate(${U?"0deg":"90deg"})`},children:[z&&r.jsx(rn,{url:z,fill:G,hoverFill:H,className:`${i}-arrow-img`,style:J}),!z&&r.jsx(dl,{color:G,className:nt(`${i}-arrow-icon`,`${i}-arrow-img`)})]})})]}),j&&r.jsx("div",{className:`${i}-click-overlay`,onClick:()=>{o&&o.go("+1")}}),Y&&r.jsx("div",{className:nt(`${i}-pagination`,{[`${i}-pagination-inside-bottom`]:U,[`${i}-pagination-inside-left`]:!U}),style:U?{bottom:S(_.inset)}:{left:S(_.inset)},children:r.jsx("div",{className:nt(`${i}-pagination-inner`,{[`${i}-pagination-vertical`]:!U,[`${i}-animate-dots`]:$}),style:{backgroundColor:X,gap:S(_.gapInactive-_.activeDot+_.dot),...U?{height:S(_.activeDot+_.paddingY*2),paddingTop:S(_.paddingY),paddingBottom:S(_.paddingY),paddingLeft:S(_.paddingActive),paddingRight:S(_.paddingActive)}:{width:S(_.activeDot+_.paddingY*2),paddingLeft:S(_.paddingY),paddingRight:S(_.paddingY),paddingTop:S(_.paddingActive),paddingBottom:S(_.paddingActive)},borderRadius:S(_.borderRadius),transform:`translate(${y.scalingValue(Yi.offset.x,n)}, ${y.scalingValue(Yi.offset.y,n)})`},children:R.map((ce,ve)=>{const Se=ve===x,D=Se?_.activeDot:_.dot;return r.jsx("button",{onClick:()=>{o&&o.go(ve)},className:`${i}-pagination-item`,style:{width:S(_.activeDot)},children:r.jsx("div",{className:`${i}-dot`,style:{backgroundColor:Se?F:k,width:S(D)}})},ve)})},`${I}-${E}`)})]}),r.jsx("div",{className:`${i}-caption-block`,children:r.jsx("div",{className:`${i}-caption-text-wrapper`,children:R.map((ce,ve)=>r.jsx("div",{className:nt(`${i}-caption-text`,{[`${i}-with-pointer-events`]:ve===x&&n,[`${i}-active`]:ve===x}),style:{...l,width:"max-content",transitionDuration:`${Math.round(parseInt(sl)/2)}ms`},children:r.jsx("div",{className:`${i}-caption-text-inner`,style:{"--link-color":B,"--link-hover-color":B,position:"relative",top:y.scalingValue(ia.offset.y,n),left:y.scalingValue(ia.offset.x,n)},children:r.jsx(mi,{content:ce.imageCaption})})},ve))})})]})]})}function dl({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const dv=`import React, { useState, useEffect, useRef } from 'react';
18269
+ `}function cv({settings:e,content:t,isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,l]=a.useState(null),s=lv(e,n),[d,c]=a.useState(void 0),[u,m]=a.useState(null),[x,b]=a.useState(0),[T,f]=a.useState(!1),[L,$]=a.useState(0),R=t??[],E=(e==null?void 0:e.trigger)??cs,C=E.sizeType??"drag",U=E.value??cs.value,k=(e==null?void 0:e.direction)??"horizontal",j=(e==null?void 0:e.transition)??"slide",I=(e==null?void 0:e.nav)??"classic",w=(e==null?void 0:e.navSize)??"m",W=rv[w],h=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,S=X=>y.scalingValue(X*h,n),M=(e==null?void 0:e.show)??"always",z=(e==null?void 0:e.controls)??null,K=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,le=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,Y=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,D=(e==null?void 0:e.controlsColor)??ss.color,N=(e==null?void 0:e.controlsHoverColor)??ss.hover,F=(e==null?void 0:e.navColor)??Yi.colors.inactive,A=(e==null?void 0:e.navPaginationColor)??Yi.colors.pagination,q=(e==null?void 0:e.navBackgroundColor)??Yi.colors.background,G=(e==null?void 0:e.linkColor)??ia.linkColor,Z=k==="horizontal",_=C==="click",me=C==="drag",v=C==="auto",fe=j==="fade in"||j==="reveal",J=I==="classic",de=M!=="never",$e=M==="on hover",oe=a.useRef(j),xe=a.useRef(C),Q=a.useRef(U),ye=a.useRef(k),ve=a.useRef(I),ke=y.scalingValue(K,n),we={width:ke,height:ke,maxWidth:ke},Me=X=>{o&&o.go(X)};return a.useEffect(()=>{if(!T)return;const X=window.setTimeout(()=>f(!1),300);return()=>window.clearTimeout(X)},[T,x]),a.useEffect(()=>{if(!u)return;const X=new ResizeObserver(ue=>{if(!o)return;const[Se]=ue;c({width:Math.round(Se.contentRect.width),height:Math.round(Se.contentRect.height)})});return X.observe(u),()=>X.unobserve(u)},[u]),a.useEffect(()=>{oe.current!==j&&($(X=>X+1),oe.current=j)},[j]),a.useEffect(()=>{xe.current!==C&&($(X=>X+1),xe.current=C)},[C]),a.useEffect(()=>{Q.current!==U&&($(X=>X+1),Q.current=U)},[U]),a.useEffect(()=>{ye.current!==k&&($(X=>X+1),ye.current=k)},[k]),a.useEffect(()=>{ve.current!==I&&($(X=>X+1),ve.current=I)},[I]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:sv(i,n)}}),r.jsxs("div",{className:nt(`${i}-wrapper`,{[`${i}-transition-reveal`]:j==="reveal",[`${i}-transition-reveal-vertical`]:j==="reveal"&&!Z}),ref:m,children:[r.jsxs("div",{className:`${i}-slider-inner`,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:"transparent"},children:[r.jsx(br,{onMove:X=>{f(!0),b(X.index)},ref:l,options:{arrows:!1,speed:parseInt(ls),autoplay:v,...v&&{interval:U*1e3},direction:Z||fe?"ltr":"ttb",pagination:!1,drag:me,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:fe?"fade":"loop",rewind:!0},children:R.map((X,ue)=>r.jsx(wr,{children:r.jsx("div",{className:`${i}-slider-item`,children:r.jsx("div",{className:`${i}-img-wrapper`,children:r.jsx("img",{className:nt(`${i}-slider-image`,{[`${i}-contain`]:X.image.objectFit==="contain",[`${i}-cover`]:X.image.objectFit==="cover"}),src:X.image.url,alt:X.image.name??""})})})},ue))},L),de&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(`${i}-arrow`,{[`${i}-arrow-prev`]:Z,[`${i}-arrow-prev-vertical`]:!Z,[`${i}-hover-arrow`]:$e}),style:{color:D,"--arrow-hover-color":N,...we},children:r.jsxs("button",{onClick:X=>{X.stopPropagation(),Me("-1")},className:`${i}-arrow-inner`,style:{transform:`translate(${y.scalingValue(le,n)}, ${y.scalingValue(Y*(Z?1:-1),n)}) rotate(${Z?"0deg":"90deg"})`},children:[z&&r.jsx(rn,{url:z,fill:D,hoverFill:N,className:nt(`${i}-arrow-img`,`${i}-mirror`),style:we}),!z&&r.jsx(ds,{color:D,className:nt(`${i}-arrow-icon`,`${i}-arrow-img`,`${i}-mirror`)})]})}),r.jsx("div",{className:nt(`${i}-arrow`,{[`${i}-arrow-next`]:Z,[`${i}-arrow-next-vertical`]:!Z,[`${i}-hover-arrow`]:$e}),style:{color:D,"--arrow-hover-color":N,...we},children:r.jsxs("button",{className:`${i}-arrow-inner`,onClick:X=>{X.stopPropagation(),Me("+1")},style:{transform:`translate(${y.scalingValue(le*(Z?-1:1),n)}, ${y.scalingValue(Y,n)}) rotate(${Z?"0deg":"90deg"})`},children:[z&&r.jsx(rn,{url:z,fill:D,hoverFill:N,className:`${i}-arrow-img`,style:we}),!z&&r.jsx(ds,{color:D,className:nt(`${i}-arrow-icon`,`${i}-arrow-img`)})]})})]}),_&&r.jsx("div",{className:`${i}-click-overlay`,onClick:()=>{o&&o.go("+1")}}),J&&r.jsx("div",{className:nt(`${i}-pagination`,{[`${i}-pagination-inside-bottom`]:Z,[`${i}-pagination-inside-left`]:!Z}),style:Z?{bottom:S(W.inset)}:{left:S(W.inset)},children:r.jsx("div",{className:nt(`${i}-pagination-inner`,{[`${i}-pagination-vertical`]:!Z,[`${i}-animate-dots`]:T}),style:{backgroundColor:q,gap:S(W.gapInactive-W.activeDot+W.dot),...Z?{height:S(W.activeDot+W.paddingY*2),paddingTop:S(W.paddingY),paddingBottom:S(W.paddingY),paddingLeft:S(W.paddingActive),paddingRight:S(W.paddingActive)}:{width:S(W.activeDot+W.paddingY*2),paddingLeft:S(W.paddingY),paddingRight:S(W.paddingY),paddingTop:S(W.paddingActive),paddingBottom:S(W.paddingActive)},borderRadius:S(W.borderRadius),transform:`translate(${y.scalingValue(Yi.offset.x,n)}, ${y.scalingValue(Yi.offset.y,n)})`},children:R.map((X,ue)=>{const Se=ue===x,O=Se?W.activeDot:W.dot;return r.jsx("button",{onClick:()=>{o&&o.go(ue)},className:`${i}-pagination-item`,style:{width:S(W.activeDot)},children:r.jsx("div",{className:`${i}-dot`,style:{backgroundColor:Se?A:F,width:S(O)}})},ue)})},`${w}-${k}`)})]}),r.jsx("div",{className:`${i}-caption-block`,children:r.jsx("div",{className:`${i}-caption-text-wrapper`,children:R.map((X,ue)=>r.jsx("div",{className:nt(`${i}-caption-text`,{[`${i}-with-pointer-events`]:ue===x&&n,[`${i}-active`]:ue===x}),style:{...s,width:"max-content",transitionDuration:`${Math.round(parseInt(ls)/2)}ms`},children:r.jsx("div",{className:`${i}-caption-text-inner`,style:{"--link-color":G,"--link-hover-color":G,position:"relative",top:y.scalingValue(ia.offset.y,n),left:y.scalingValue(ia.offset.x,n)},children:r.jsx(mi,{content:X.imageCaption})})},ue))})})]})]})}function ds({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const dv=`import React, { useState, useEffect, useRef } from 'react';
18241
18270
  import { Splide, SplideSlide } from '@splidejs/react-splide';
18242
18271
  import '@splidejs/react-splide/css/core';
18243
18272
  import cn from 'classnames';
@@ -18981,4 +19010,4 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
18981
19010
  </svg>
18982
19011
  );
18983
19012
  }
18984
- `,uv={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},pv={element:cv,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:uv,sourceCode:dv,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},mv=[Pu,ju,Zf,Ip,_p,qp,um,fm,$m,Vm,Ng,jh,Uh,kf,Bf,cy,ov,by,pv];exports.components=mv;exports.isSchemaV1=$c;
19013
+ `,uv={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},pv={element:cv,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:uv,sourceCode:dv,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},mv=[Pu,ju,Zf,Ip,_p,qp,um,fm,$m,Vm,Ng,jh,Uh,Mf,Bf,cy,ov,by,pv];exports.components=mv;exports.isSchemaV1=$c;