@cntrl-site/components 1.0.21 → 1.0.22

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"),l=require("react"),Je=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Oi=require("react-dom");function tl(e){return e.type==="object"&&e.version===1}const nl="ControlSlider-module__wrapper___sHEkd",il="ControlSlider-module__hoverArrow___A-dOH",ol="ControlSlider-module__sliderItem___QQSkR",rl="ControlSlider-module__sliderImage___9hRl-",al="ControlSlider-module__arrow___05ghY",sl="ControlSlider-module__arrowVertical___tBfVN",ll="ControlSlider-module__nextArrow___-30Yc",cl="ControlSlider-module__arrowInner___aEra3",dl="ControlSlider-module__arrowIcon___S4ztF",ul="ControlSlider-module__arrowImg___2dwJW",pl="ControlSlider-module__mirror___brd6U",ml="ControlSlider-module__pagination___bicLF",gl="ControlSlider-module__paginationInner___bT-P-",hl="ControlSlider-module__paginationVertical___zYqKw",fl="ControlSlider-module__paginationItem___nTRbk",yl="ControlSlider-module__dot___p1Qun",vl="ControlSlider-module__activeDot___LHFaj",bl="ControlSlider-module__paginationInsideBottom___R3FWn",xl="ControlSlider-module__paginationInsideTop___V-qb-",wl="ControlSlider-module__paginationOutsideBottom___14w8D",Sl="ControlSlider-module__paginationOutsideTop___SCLqB",$l="ControlSlider-module__paginationInsideLeft___yOBRZ",Cl="ControlSlider-module__paginationInsideRight___Rtt3o",Tl="ControlSlider-module__paginationOutsideLeft___lahaw",Ll="ControlSlider-module__paginationOutsideRight___EtuQa",El="ControlSlider-module__imgWrapper___UjEgB",Il="ControlSlider-module__captionBlock___dJ6-j",Pl="ControlSlider-module__captionTextWrapper___HFlpf",Rl="ControlSlider-module__captionText___uGBVc",Al="ControlSlider-module__active___WZK4G",Ml="ControlSlider-module__withPointerEvents___t-18M",_l="ControlSlider-module__topLeftAlignment___zjnGM",kl="ControlSlider-module__topCenterAlignment___gD1xW",Wl="ControlSlider-module__topRightAlignment___NMapS",Fl="ControlSlider-module__middleLeftAlignment___OnUrY",Nl="ControlSlider-module__middleCenterAlignment___Tdkl0",Hl="ControlSlider-module__middleRightAlignment___wEbfX",Ol="ControlSlider-module__bottomLeftAlignment___cTP2-",Bl="ControlSlider-module__bottomCenterAlignment___c54fB",jl="ControlSlider-module__bottomRightAlignment___kEwrz",zl="ControlSlider-module__clickOverlay___DZA28",Vl="ControlSlider-module__contain___pLyq7",Dl="ControlSlider-module__cover___KdDat",Te={wrapper:nl,hoverArrow:il,sliderItem:ol,sliderImage:rl,arrow:al,arrowVertical:sl,nextArrow:ll,arrowInner:cl,arrowIcon:dl,arrowImg:ul,mirror:pl,pagination:ml,paginationInner:gl,paginationVertical:hl,paginationItem:fl,dot:yl,activeDot:vl,paginationInsideBottom:bl,paginationInsideTop:xl,paginationOutsideBottom:wl,paginationOutsideTop:Sl,paginationInsideLeft:$l,paginationInsideRight:Cl,paginationOutsideLeft:Tl,paginationOutsideRight:Ll,imgWrapper:El,captionBlock:Il,captionTextWrapper:Pl,captionText:Rl,active:Al,withPointerEvents:Ml,topLeftAlignment:_l,topCenterAlignment:kl,topRightAlignment:Wl,middleLeftAlignment:Fl,middleCenterAlignment:Nl,middleRightAlignment:Hl,bottomLeftAlignment:Ol,bottomCenterAlignment:Bl,bottomRightAlignment:jl,clickOverlay:zl,contain:Vl,cover:Dl};function ql(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 Kl(e,t,n){return t&&ql(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ea="(prefers-reduced-motion: reduce)",si=1,Gl=2,ui=3,bi=4,Bi=5,go=6,$o=7,Ul={CREATED:si,MOUNTED:Gl,IDLE:ui,MOVING:bi,SCROLLING:Bi,DRAGGING:go,DESTROYED:$o};function En(e){e.length=0}function Fn(e,t,n){return Array.prototype.slice.call(e,t,n)}function mt(e){return e.bind.apply(e,[null].concat(Fn(arguments,1)))}var is=setTimeout,pr=function(){};function ta(e){return requestAnimationFrame(e)}function Ro(e,t){return typeof t===e}function Pi(e){return!Tr(e)&&Ro("object",e)}var Cr=Array.isArray,os=mt(Ro,"function"),_n=mt(Ro,"string"),ji=mt(Ro,"undefined");function Tr(e){return e===null}function rs(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function zi(e){return Cr(e)?e:[e]}function en(e,t){zi(e).forEach(t)}function Lr(e,t){return e.indexOf(t)>-1}function ho(e,t){return e.push.apply(e,zi(t)),e}function Sn(e,t,n){e&&en(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function pn(e,t){Sn(e,_n(t)?t.split(" "):t,!0)}function Vi(e,t){en(t,e.appendChild.bind(e))}function Er(e,t){en(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Ri(e,t){return rs(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function as(e,t){var n=e?Fn(e.children):[];return t?n.filter(function(i){return Ri(i,t)}):n}function Di(e,t){return t?as(e,t)[0]:e.firstElementChild}var Ai=Object.keys;function Xn(e,t,n){return e&&(n?Ai(e).reverse():Ai(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Mi(e){return Fn(arguments,1).forEach(function(t){Xn(t,function(n,i){e[i]=t[i]})}),e}function Mn(e){return Fn(arguments,1).forEach(function(t){Xn(t,function(n,i){Cr(n)?e[i]=n.slice():Pi(n)?e[i]=Mn({},Pi(e[i])?e[i]:{},n):e[i]=n})}),e}function na(e,t){en(t||Ai(e),function(n){delete e[n]})}function mn(e,t){en(e,function(n){en(t,function(i){n&&n.removeAttribute(i)})})}function je(e,t,n){Pi(t)?Xn(t,function(i,o){je(e,o,i)}):en(e,function(i){Tr(n)||n===""?mn(i,t):i.setAttribute(t,String(n))})}function li(e,t,n){var i=document.createElement(e);return t&&(_n(t)?pn(i,t):je(i,t)),n&&Vi(n,i),i}function an(e,t,n){if(ji(n))return getComputedStyle(e)[t];Tr(n)||(e.style[t]=""+n)}function _i(e,t){an(e,"display",t)}function ss(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function sn(e,t){return e.getAttribute(t)}function ia(e,t){return e&&e.classList.contains(t)}function Yt(e){return e.getBoundingClientRect()}function Yn(e){en(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ls(e){return Di(new DOMParser().parseFromString(e,"text/html").body)}function wn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function cs(e,t){return e&&e.querySelector(t)}function Ir(e,t){return t?Fn(e.querySelectorAll(t)):[]}function $n(e,t){Sn(e,t,!1)}function mr(e){return e.timeStamp}function Vn(e){return _n(e)?e:e?e+"px":""}var qi="splide",Pr="data-"+qi;function Ti(e,t){if(!e)throw new Error("["+qi+"] "+(t||""))}var kn=Math.min,Co=Math.max,To=Math.floor,ki=Math.ceil,Dt=Math.abs;function ds(e,t,n){return Dt(e-t)<n}function fo(e,t,n,i){var o=kn(t,n),s=Co(t,n);return i?o<e&&e<s:o<=e&&e<=s}function oi(e,t,n){var i=kn(t,n),o=Co(t,n);return kn(Co(i,e),o)}function gr(e){return+(e>0)-+(e<0)}function hr(e,t){return en(t,function(n){e=e.replace("%s",""+n)}),e}function Rr(e){return e<10?"0"+e:""+e}var oa={};function Xl(e){return""+e+Rr(oa[e]=(oa[e]||0)+1)}function us(){var e=[];function t(a,d,c,p){o(a,d,function(u,T,w){var L="addEventListener"in u,m=L?u.removeEventListener.bind(u,T,c,p):u.removeListener.bind(u,c);L?u.addEventListener(T,c,p):u.addListener(c),e.push([u,T,w,c,m])})}function n(a,d,c){o(a,d,function(p,u,T){e=e.filter(function(w){return w[0]===p&&w[1]===u&&w[2]===T&&(!c||w[3]===c)?(w[4](),!1):!0})})}function i(a,d,c){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:c}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,c)),a.dispatchEvent(p),p}function o(a,d,c){en(a,function(p){p&&en(d,function(u){u.split(" ").forEach(function(T){var w=T.split(".");c(p,w[0],w[1])})})})}function s(){e.forEach(function(a){a[4]()}),En(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Nn="mounted",fr="ready",In="move",xi="moved",Ar="click",ps="active",ms="inactive",gs="visible",hs="hidden",Et="refresh",jt="updated",pi="resize",Ao="resized",fs="drag",ys="dragging",vs="dragged",Mo="scroll",Zn="scrolled",Yl="overflow",Mr="destroy",bs="arrows:mounted",xs="arrows:updated",ws="pagination:mounted",Ss="pagination:updated",_r="navigation:mounted",kr="autoplay:play",$s="autoplay:playing",Wr="autoplay:pause",Fr="lazyload:loaded",Cs="sk",Ts="sh",Lo="ei";function bt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=us();function i(s,a){n.bind(t,zi(s).join(" "),function(d){a.apply(a,Cr(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Fn(arguments,1))}return e&&e.event.on(Mr,n.destroy),Mi(n,{bus:t,on:i,off:mt(n.unbind,t),emit:o})}function _o(e,t,n,i){var o=Date.now,s,a=0,d,c=!0,p=0;function u(){if(!c){if(a=e?kn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++p>=i))return w();d=ta(u)}}function T(b){b||m(),s=o()-(b?a*e:0),c=!1,d=ta(u)}function w(){c=!0}function L(){s=o(),a=0,n&&n(a)}function m(){d&&cancelAnimationFrame(d),a=0,d=0,c=!0}function y(b){e=b}function C(){return c}return{start:T,rewind:L,pause:w,cancel:m,set:y,isPaused:C}}function Jl(e){var t=e;function n(o){t=o}function i(o){return Lr(zi(o),t)}return{set:n,is:i}}function Zl(e,t){var n=_o(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Ql(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=us(),d=[];function c(){var m=n.mediaQuery==="min";Ai(o).sort(function(y,C){return m?+y-+C:+C-+y}).forEach(function(y){u(o[y],"("+(m?"min":"max")+"-width:"+y+"px)")}),u(s,ea),T()}function p(m){m&&a.destroy()}function u(m,y){var C=matchMedia(y);a.bind(C,"change",T),d.push([m,C])}function T(){var m=i.is($o),y=n.direction,C=d.reduce(function(b,$){return Mn(b,$[1].matches?$[0]:{})},{});na(n),L(C),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):y!==n.direction&&e.refresh()}function w(m){matchMedia(ea).matches&&(m?Mn(n,s):na(n,Ai(s)))}function L(m,y,C){Mn(n,m),y&&Mn(Object.getPrototypeOf(n),m),(C||!i.is(si))&&e.emit(jt,n)}return{setup:c,destroy:p,reduce:w,set:L}}var ko="Arrow",Wo=ko+"Left",Fo=ko+"Right",Ls=ko+"Up",Es=ko+"Down",ra="rtl",No="ttb",Uo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ls,Fo],ArrowRight:[Es,Wo]};function ec(e,t,n){function i(s,a,d){d=d||n.direction;var c=d===ra&&!a?1:d===No?0:-1;return Uo[s]&&Uo[s][c]||s.replace(/width|left|right/i,function(p,u){var T=Uo[p.toLowerCase()][c]||p;return u>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function o(s){return s*(n.direction===ra?1:-1)}return{resolve:i,orient:o}}var Cn="role",ci="tabindex",tc="disabled",cn="aria-",Ki=cn+"controls",Is=cn+"current",aa=cn+"selected",Jt=cn+"label",Nr=cn+"labelledby",Ps=cn+"hidden",Hr=cn+"orientation",Wi=cn+"roledescription",sa=cn+"live",la=cn+"busy",ca=cn+"atomic",Or=[Cn,ci,tc,Ki,Is,Jt,Nr,Ps,Hr,Wi],gn=qi+"__",Hn="is-",Xo=qi,da=gn+"track",nc=gn+"list",Ho=gn+"slide",Rs=Ho+"--clone",ic=Ho+"__container",Br=gn+"arrows",Oo=gn+"arrow",As=Oo+"--prev",Ms=Oo+"--next",Bo=gn+"pagination",_s=Bo+"__page",oc=gn+"progress",rc=oc+"__bar",ac=gn+"toggle",sc=gn+"spinner",lc=gn+"sr",cc=Hn+"initialized",Jn=Hn+"active",ks=Hn+"prev",Ws=Hn+"next",yr=Hn+"visible",vr=Hn+"loading",Fs=Hn+"focus-in",Ns=Hn+"overflow",dc=[Jn,yr,ks,Ws,vr,Fs,Ns],uc={slide:Ho,clone:Rs,arrows:Br,arrow:Oo,prev:As,next:Ms,pagination:Bo,page:_s,spinner:sc};function pc(e,t){if(os(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ri(n,t);)n=n.parentElement;return n}var mc=5,ua=200,Hs="touchstart mousedown",Yo="touchmove mousemove",Jo="touchend touchcancel mouseup click";function gc(e,t,n){var i=bt(e),o=i.on,s=i.bind,a=e.root,d=n.i18n,c={},p=[],u=[],T=[],w,L,m;function y(){S(),F(),$()}function C(){o(Et,b),o(Et,y),o(jt,$),s(document,Hs+" keydown",function(x){m=x.type==="keydown"},{capture:!0}),s(a,"focusin",function(){Sn(a,Fs,!!m)})}function b(x){var I=Or.concat("style");En(p),$n(a,u),$n(w,T),mn([w,L],I),mn(a,x?I:["style",Wi])}function $(){$n(a,u),$n(w,T),u=k(Xo),T=k(da),pn(a,u),pn(w,T),je(a,Jt,n.label),je(a,Nr,n.labelledby)}function S(){w=P("."+da),L=Di(w,"."+nc),Ti(w&&L,"A track/list element is missing."),ho(p,as(L,"."+Ho+":not(."+Rs+")")),Xn({arrows:Br,pagination:Bo,prev:As,next:Ms,bar:rc,toggle:ac},function(x,I){c[I]=P("."+x)}),Mi(c,{root:a,track:w,list:L,slides:p})}function F(){var x=a.id||Xl(qi),I=n.role;a.id=x,w.id=w.id||x+"-track",L.id=L.id||x+"-list",!sn(a,Cn)&&a.tagName!=="SECTION"&&I&&je(a,Cn,I),je(a,Wi,d.carousel),je(L,Cn,"presentation")}function P(x){var I=cs(a,x);return I&&pc(I,"."+Xo)===a?I:void 0}function k(x){return[x+"--"+n.type,x+"--"+n.direction,n.drag&&x+"--draggable",n.isNavigation&&x+"--nav",x===Xo&&Jn]}return Mi(c,{setup:y,mount:C,destroy:b})}var mi="slide",wi="loop",Gi="fade";function hc(e,t,n,i){var o=bt(e),s=o.on,a=o.emit,d=o.bind,c=e.Components,p=e.root,u=e.options,T=u.isNavigation,w=u.updateOnMove,L=u.i18n,m=u.pagination,y=u.slideFocus,C=c.Direction.resolve,b=sn(i,"style"),$=sn(i,Jt),S=n>-1,F=Di(i,"."+ic),P;function k(){S||(i.id=p.id+"-slide"+Rr(t+1),je(i,Cn,m?"tabpanel":"group"),je(i,Wi,L.slide),je(i,Jt,$||hr(L.slideLabel,[t+1,e.length]))),x()}function x(){d(i,"click",mt(a,Ar,Q)),d(i,"keydown",mt(a,Cs,Q)),s([xi,Ts,Zn],R),s(_r,G),w&&s(In,f)}function I(){P=!0,o.destroy(),$n(i,dc),mn(i,Or),je(i,"style",b),je(i,Jt,$||"")}function G(){var U=e.splides.map(function(H){var J=H.splide.Components.Slides.getAt(t);return J?J.slide.id:""}).join(" ");je(i,Jt,hr(L.slideX,(S?n:t)+1)),je(i,Ki,U),je(i,Cn,y?"button":""),y&&mn(i,Wi)}function f(){P||R()}function R(){if(!P){var U=e.index;M(),j(),Sn(i,ks,t===U-1),Sn(i,Ws,t===U+1)}}function M(){var U=ue();U!==ia(i,Jn)&&(Sn(i,Jn,U),je(i,Is,T&&U||""),a(U?ps:ms,Q))}function j(){var U=V(),H=!U&&(!ue()||S);if(e.state.is([bi,Bi])||je(i,Ps,H||""),je(Ir(i,u.focusableNodes||""),ci,H?-1:""),y&&je(i,ci,H?-1:0),U!==ia(i,yr)&&(Sn(i,yr,U),a(U?gs:hs,Q)),!U&&document.activeElement===i){var J=c.Slides.getAt(e.index);J&&ss(J.slide)}}function Z(U,H,J){an(J&&F||i,U,H)}function ue(){var U=e.index;return U===t||u.cloneStatus&&U===n}function V(){if(e.is(Gi))return ue();var U=Yt(c.Elements.track),H=Yt(i),J=C("left",!0),oe=C("right",!0);return To(U[J])<=ki(H[J])&&To(H[oe])<=ki(U[oe])}function _(U,H){var J=Dt(U-t);return!S&&(u.rewind||e.is(wi))&&(J=kn(J,e.length-J)),J<=H}var Q={index:t,slideIndex:n,slide:i,container:F,isClone:S,mount:k,destroy:I,update:R,style:Z,isWithin:_};return Q}function fc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=i.bind,d=t.Elements,c=d.slides,p=d.list,u=[];function T(){w(),o(Et,L),o(Et,w)}function w(){c.forEach(function(R,M){y(R,M,-1)})}function L(){P(function(R){R.destroy()}),En(u)}function m(){P(function(R){R.update()})}function y(R,M,j){var Z=hc(e,M,j,R);Z.mount(),u.push(Z),u.sort(function(ue,V){return ue.index-V.index})}function C(R){return R?k(function(M){return!M.isClone}):u}function b(R){var M=t.Controller,j=M.toIndex(R),Z=M.hasFocus()?1:n.perPage;return k(function(ue){return fo(ue.index,j,j+Z-1)})}function $(R){return k(R)[0]}function S(R,M){en(R,function(j){if(_n(j)&&(j=ls(j)),rs(j)){var Z=c[M];Z?Er(j,Z):Vi(p,j),pn(j,n.classes.slide),I(j,mt(s,pi))}}),s(Et)}function F(R){Yn(k(R).map(function(M){return M.slide})),s(Et)}function P(R,M){C(M).forEach(R)}function k(R){return u.filter(os(R)?R:function(M){return _n(R)?Ri(M.slide,R):Lr(zi(R),M.index)})}function x(R,M,j){P(function(Z){Z.style(R,M,j)})}function I(R,M){var j=Ir(R,"img"),Z=j.length;Z?j.forEach(function(ue){a(ue,"load error",function(){--Z||M()})}):M()}function G(R){return R?c.length:u.length}function f(){return u.length>n.perPage}return{mount:T,destroy:L,update:m,register:y,get:C,getIn:b,getAt:$,add:S,remove:F,forEach:P,filter:k,style:x,getLength:G,isEnough:f}}function yc(e,t,n){var i=bt(e),o=i.on,s=i.bind,a=i.emit,d=t.Slides,c=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,w=p.list,L=d.getAt,m=d.style,y,C,b;function $(){S(),s(window,"resize load",Zl(mt(a,pi))),o([jt,Et],S),o(pi,F)}function S(){y=n.direction===No,an(u,"maxWidth",Vn(n.width)),an(T,c("paddingLeft"),P(!1)),an(T,c("paddingRight"),P(!0)),F(!0)}function F(Q){var U=Yt(u);(Q||C.width!==U.width||C.height!==U.height)&&(an(T,"height",k()),m(c("marginRight"),Vn(n.gap)),m("width",I()),m("height",G(),!0),C=U,a(Ao),b!==(b=_())&&(Sn(u,Ns,b),a(Yl,b)))}function P(Q){var U=n.padding,H=c(Q?"right":"left");return U&&Vn(U[H]||(Pi(U)?0:U))||"0px"}function k(){var Q="";return y&&(Q=x(),Ti(Q,"height or heightRatio is missing."),Q="calc("+Q+" - "+P(!1)+" - "+P(!0)+")"),Q}function x(){return Vn(n.height||Yt(w).width*n.heightRatio)}function I(){return n.autoWidth?null:Vn(n.fixedWidth)||(y?"":f())}function G(){return Vn(n.fixedHeight)||(y?n.autoHeight?null:f():x())}function f(){var Q=Vn(n.gap);return"calc((100%"+(Q&&" + "+Q)+")/"+(n.perPage||1)+(Q&&" - "+Q)+")"}function R(){return Yt(w)[c("width")]}function M(Q,U){var H=L(Q||0);return H?Yt(H.slide)[c("width")]+(U?0:ue()):0}function j(Q,U){var H=L(Q);if(H){var J=Yt(H.slide)[c("right")],oe=Yt(w)[c("left")];return Dt(J-oe)+(U?0:ue())}return 0}function Z(Q){return j(e.length-1)-j(0)+M(0,Q)}function ue(){var Q=L(0);return Q&&parseFloat(an(Q.slide,c("marginRight")))||0}function V(Q){return parseFloat(an(T,c("padding"+(Q?"Right":"Left"))))||0}function _(){return e.is(Gi)||Z(!0)>R()}return{mount:$,resize:F,listSize:R,slideSize:M,sliderSize:Z,totalSize:j,getPadding:V,isOverflow:_}}var vc=2;function bc(e,t,n){var i=bt(e),o=i.on,s=t.Elements,a=t.Slides,d=t.Direction.resolve,c=[],p;function u(){o(Et,T),o([jt,pi],L),(p=C())&&(m(p),t.Layout.resize(!0))}function T(){w(),u()}function w(){Yn(c),En(c),i.destroy()}function L(){var b=C();p!==b&&(p<b||!b)&&i.emit(Et)}function m(b){var $=a.get().slice(),S=$.length;if(S){for(;$.length<b;)ho($,$);ho($.slice(-b),$.slice(0,b)).forEach(function(F,P){var k=P<b,x=y(F.slide,P);k?Er(x,$[0].slide):Vi(s.list,x),ho(c,x),a.register(x,P-b+(k?0:S),F.index)})}}function y(b,$){var S=b.cloneNode(!0);return pn(S,n.classes.clone),S.id=e.root.id+"-clone"+Rr($+1),S}function C(){var b=n.clones;if(!e.is(wi))b=0;else if(ji(b)){var $=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=$&&ki(Yt(s.track)[d("width")]/$);b=S||n[d("autoWidth")]&&e.length||n.perPage*vc}return b}return{mount:u,destroy:w}}function xc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Layout,c=d.slideSize,p=d.getPadding,u=d.totalSize,T=d.listSize,w=d.sliderSize,L=t.Direction,m=L.resolve,y=L.orient,C=t.Elements,b=C.list,$=C.track,S;function F(){S=t.Transition,o([Nn,Ao,jt,Et],P)}function P(){t.Controller.isBusy()||(t.Scroll.cancel(),x(e.index),t.Slides.update())}function k(H,J,oe,ie){H!==J&&Q(H>oe)&&(R(),I(f(Z(),H>oe),!0)),a(bi),s(In,J,oe,H),S.start(J,function(){a(ui),s(xi,J,oe,H),ie&&ie()})}function x(H){I(j(H,!0))}function I(H,J){if(!e.is(Gi)){var oe=J?H:G(H);an(b,"transform","translate"+m("X")+"("+oe+"px)"),H!==oe&&s(Ts)}}function G(H){if(e.is(wi)){var J=M(H),oe=J>t.Controller.getEnd(),ie=J<0;(ie||oe)&&(H=f(H,oe))}return H}function f(H,J){var oe=H-_(J),ie=w();return H-=y(ie*(ki(Dt(oe)/ie)||1))*(J?1:-1),H}function R(){I(Z(),!0),S.cancel()}function M(H){for(var J=t.Slides.get(),oe=0,ie=1/0,W=0;W<J.length;W++){var ae=J[W].index,g=Dt(j(ae,!0)-H);if(g<=ie)ie=g,oe=ae;else break}return oe}function j(H,J){var oe=y(u(H-1)-V(H));return J?ue(oe):oe}function Z(){var H=m("left");return Yt(b)[H]-Yt($)[H]+y(p(!1))}function ue(H){return n.trimSpace&&e.is(mi)&&(H=oi(H,0,y(w(!0)-T()))),H}function V(H){var J=n.focus;return J==="center"?(T()-c(H,!0))/2:+J*c(H)||0}function _(H){return j(H?t.Controller.getEnd():0,!!n.trimSpace)}function Q(H){var J=y(f(Z(),H));return H?J>=0:J<=b[m("scrollWidth")]-Yt($)[m("width")]}function U(H,J){J=ji(J)?Z():J;var oe=H!==!0&&y(J)<y(_(!1)),ie=H!==!1&&y(J)>y(_(!0));return oe||ie}return{mount:F,move:k,jump:x,translate:I,shift:f,cancel:R,toIndex:M,toPosition:j,getPosition:Z,getLimit:_,exceededLimit:U,reposition:P}}function wc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=t.Move,d=a.getPosition,c=a.getLimit,p=a.toPosition,u=t.Slides,T=u.isEnough,w=u.getLength,L=n.omitEnd,m=e.is(wi),y=e.is(mi),C=mt(Z,!1),b=mt(Z,!0),$=n.start||0,S,F=$,P,k,x;function I(){G(),o([jt,Et,Lo],G),o(Ao,f)}function G(){P=w(!0),k=n.perMove,x=n.perPage,S=Q();var g=oi($,0,L?S:P-1);g!==$&&($=g,a.reposition())}function f(){S!==Q()&&s(Lo)}function R(g,te,ye){if(!ae()){var me=j(g),_e=_(me);_e>-1&&(te||_e!==$)&&(oe(_e),a.move(me,_e,F,ye))}}function M(g,te,ye,me){t.Scroll.scroll(g,te,ye,function(){var _e=_(a.toIndex(d()));oe(L?kn(_e,S):_e),me&&me()})}function j(g){var te=$;if(_n(g)){var ye=g.match(/([+\-<>])(\d+)?/)||[],me=ye[1],_e=ye[2];me==="+"||me==="-"?te=ue($+ +(""+me+(+_e||1)),$):me===">"?te=_e?U(+_e):C(!0):me==="<"&&(te=b(!0))}else te=m?g:oi(g,0,S);return te}function Z(g,te){var ye=k||(W()?1:x),me=ue($+ye*(g?-1:1),$,!(k||W()));return me===-1&&y&&!ds(d(),c(!g),1)?g?0:S:te?me:_(me)}function ue(g,te,ye){if(T()||W()){var me=V(g);me!==g&&(te=g,g=me,ye=!1),g<0||g>S?!k&&(fo(0,g,te,!0)||fo(S,te,g,!0))?g=U(H(g)):m?g=ye?g<0?-(P%x||x):P:g:n.rewind?g=g<0?S:0:g=-1:ye&&g!==te&&(g=U(H(te)+(g<te?-1:1)))}else g=-1;return g}function V(g){if(y&&n.trimSpace==="move"&&g!==$)for(var te=d();te===p(g,!0)&&fo(g,0,e.length-1,!n.rewind);)g<$?--g:++g;return g}function _(g){return m?(g+P)%P||0:g}function Q(){for(var g=P-(W()||m&&k?1:x);L&&g-- >0;)if(p(P-1,!0)!==p(g,!0)){g++;break}return oi(g,0,P-1)}function U(g){return oi(W()?g:x*g,0,S)}function H(g){return W()?kn(g,S):To((g>=S?P-1:g)/x)}function J(g){var te=a.toIndex(g);return y?oi(te,0,S):te}function oe(g){g!==$&&(F=$,$=g)}function ie(g){return g?F:$}function W(){return!ji(n.focus)||n.isNavigation}function ae(){return e.state.is([bi,Bi])&&!!n.waitForTransition}return{mount:I,go:R,scroll:M,getNext:C,getPrev:b,getAdjacent:Z,getEnd:Q,setIndex:oe,getIndex:ie,toIndex:U,toPage:H,toDest:J,hasFocus:W,isBusy:ae}}var Sc="http://www.w3.org/2000/svg",$c="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",Qi=40;function Cc(e,t,n){var i=bt(e),o=i.on,s=i.bind,a=i.emit,d=n.classes,c=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,w=p.track,L=T,m=p.prev,y=p.next,C,b,$={};function S(){P(),o(jt,F)}function F(){k(),S()}function P(){var M=n.arrows;M&&!(m&&y)&&G(),m&&y&&(Mi($,{prev:m,next:y}),_i(L,M?"":"none"),pn(L,b=Br+"--"+n.direction),M&&(x(),R(),je([m,y],Ki,w.id),a(bs,m,y)))}function k(){i.destroy(),$n(L,b),C?(Yn(T?[m,y]:L),m=y=null):mn([m,y],Or)}function x(){o([Nn,xi,Et,Zn,Lo],R),s(y,"click",mt(I,">")),s(m,"click",mt(I,"<"))}function I(M){u.go(M,!0)}function G(){L=T||li("div",d.arrows),m=f(!0),y=f(!1),C=!0,Vi(L,[m,y]),!T&&Er(L,w)}function f(M){var j='<button class="'+d.arrow+" "+(M?d.prev:d.next)+'" type="button"><svg xmlns="'+Sc+'" viewBox="0 0 '+Qi+" "+Qi+'" width="'+Qi+'" height="'+Qi+'" focusable="false"><path d="'+(n.arrowPath||$c)+'" />';return ls(j)}function R(){if(m&&y){var M=e.index,j=u.getPrev(),Z=u.getNext(),ue=j>-1&&M<j?c.last:c.prev,V=Z>-1&&M>Z?c.first:c.next;m.disabled=j<0,y.disabled=Z<0,je(m,Jt,ue),je(y,Jt,V),a(xs,m,y,j,Z)}}return{arrows:$,mount:S,destroy:k,update:R}}var Tc=Pr+"-interval";function Lc(e,t,n){var i=bt(e),o=i.on,s=i.bind,a=i.emit,d=_o(n.interval,e.go.bind(e,">"),x),c=d.isPaused,p=t.Elements,u=t.Elements,T=u.root,w=u.toggle,L=n.autoplay,m,y,C=L==="pause";function b(){L&&($(),w&&je(w,Ki,p.track.id),C||S(),k())}function $(){n.pauseOnHover&&s(T,"mouseenter mouseleave",function(G){m=G.type==="mouseenter",P()}),n.pauseOnFocus&&s(T,"focusin focusout",function(G){y=G.type==="focusin",P()}),w&&s(w,"click",function(){C?S():F(!0)}),o([In,Mo,Et],d.rewind),o(In,I)}function S(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),y=m=C=!1,k(),a(kr))}function F(G){G===void 0&&(G=!0),C=!!G,k(),c()||(d.pause(),a(Wr))}function P(){C||(m||y?F(!1):S())}function k(){w&&(Sn(w,Jn,!C),je(w,Jt,n.i18n[C?"play":"pause"]))}function x(G){var f=p.bar;f&&an(f,"width",G*100+"%"),a($s,G)}function I(G){var f=t.Slides.getAt(G);d.set(f&&+sn(f.slide,Tc)||n.interval)}return{mount:b,destroy:d.cancel,play:S,pause:F,isPaused:c}}function Ec(e,t,n){var i=bt(e),o=i.on;function s(){n.cover&&(o(Fr,mt(d,!0)),o([Nn,jt,Et],mt(a,!0)))}function a(c){t.Slides.forEach(function(p){var u=Di(p.container||p.slide,"img");u&&u.src&&d(c,u,p)})}function d(c,p,u){u.style("background",c?'center/cover no-repeat url("'+p.src+'")':"",!0),_i(p,c?"none":"")}return{mount:s,destroy:mt(a,!1)}}var Ic=10,Pc=600,Rc=.6,Ac=1.5,Mc=800;function _c(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Move,c=d.getPosition,p=d.getLimit,u=d.exceededLimit,T=d.translate,w=e.is(mi),L,m,y=1;function C(){o(In,F),o([jt,Et],P)}function b(x,I,G,f,R){var M=c();if(F(),G&&(!w||!u())){var j=t.Layout.sliderSize(),Z=gr(x)*j*To(Dt(x)/j)||0;x=d.toPosition(t.Controller.toDest(x%j))+Z}var ue=ds(M,x,1);y=1,I=ue?0:I||Co(Dt(x-M)/Ac,Mc),m=f,L=_o(I,$,mt(S,M,x,R),1),a(Bi),s(Mo),L.start()}function $(){a(ui),m&&m(),s(Zn)}function S(x,I,G,f){var R=c(),M=x+(I-x)*k(f),j=(M-R)*y;T(R+j),w&&!G&&u()&&(y*=Rc,Dt(j)<Ic&&b(p(u(!0)),Pc,!1,m,!0))}function F(){L&&L.cancel()}function P(){L&&!L.isPaused()&&(F(),$())}function k(x){var I=n.easingFunc;return I?I(x):1-Math.pow(1-x,4)}return{mount:C,destroy:F,scroll:b,cancel:P}}var ri={passive:!1,capture:!0};function kc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=i.bind,d=i.unbind,c=e.state,p=t.Move,u=t.Scroll,T=t.Controller,w=t.Elements.track,L=t.Media.reduce,m=t.Direction,y=m.resolve,C=m.orient,b=p.getPosition,$=p.exceededLimit,S,F,P,k,x,I=!1,G,f,R;function M(){a(w,Yo,pr,ri),a(w,Jo,pr,ri),a(w,Hs,Z,ri),a(w,"click",_,{capture:!0}),a(w,"dragstart",wn),o([Nn,jt],j)}function j(){var K=n.drag;de(!K),k=K==="free"}function Z(K){if(G=!1,!f){var B=_e(K);me(K.target)&&(B||!K.button)&&(T.isBusy()?wn(K,!0):(R=B?w:window,x=c.is([bi,Bi]),P=null,a(R,Yo,ue,ri),a(R,Jo,V,ri),p.cancel(),u.cancel(),Q(K)))}}function ue(K){if(c.is(go)||(c.set(go),s(fs)),K.cancelable)if(x){p.translate(S+ye(W(K)));var B=ae(K)>ua,N=I!==(I=$());(B||N)&&Q(K),G=!0,s(ys),wn(K)}else J(K)&&(x=H(K),wn(K))}function V(K){c.is(go)&&(c.set(ui),s(vs)),x&&(U(K),wn(K)),d(R,Yo,ue),d(R,Jo,V),x=!1}function _(K){!f&&G&&wn(K,!0)}function Q(K){P=F,F=K,S=b()}function U(K){var B=oe(K),N=ie(B),re=n.rewind&&n.rewindByDrag;L(!1),k?T.scroll(N,0,n.snap):e.is(Gi)?T.go(C(gr(B))<0?re?"<":"-":re?">":"+"):e.is(mi)&&I&&re?T.go($(!0)?">":"<"):T.go(T.toDest(N),!0),L(!0)}function H(K){var B=n.dragMinThreshold,N=Pi(B),re=N&&B.mouse||0,$e=(N?B.touch:+B)||10;return Dt(W(K))>(_e(K)?$e:re)}function J(K){return Dt(W(K))>Dt(W(K,!0))}function oe(K){if(e.is(wi)||!I){var B=ae(K);if(B&&B<ua)return W(K)/B}return 0}function ie(K){return b()+gr(K)*kn(Dt(K)*(n.flickPower||600),k?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function W(K,B){return te(K,B)-te(g(K),B)}function ae(K){return mr(K)-mr(g(K))}function g(K){return F===K&&P||F}function te(K,B){return(_e(K)?K.changedTouches[0]:K)["page"+y(B?"Y":"X")]}function ye(K){return K/(I&&e.is(mi)?mc:1)}function me(K){var B=n.noDrag;return!Ri(K,"."+_s+", ."+Oo)&&(!B||!Ri(K,B))}function _e(K){return typeof TouchEvent<"u"&&K instanceof TouchEvent}function X(){return x}function de(K){f=K}return{mount:M,disable:de,isDragging:X}}var Wc={Spacebar:" ",Right:Fo,Left:Wo,Up:Ls,Down:Es};function jr(e){return e=_n(e)?e:e.key,Wc[e]||e}var pa="keydown";function Fc(e,t,n){var i=bt(e),o=i.on,s=i.bind,a=i.unbind,d=e.root,c=t.Direction.resolve,p,u;function T(){w(),o(jt,L),o(jt,w),o(In,y)}function w(){var b=n.keyboard;b&&(p=b==="global"?window:d,s(p,pa,C))}function L(){a(p,pa)}function m(b){u=b}function y(){var b=u;u=!0,is(function(){u=b})}function C(b){if(!u){var $=jr(b);$===c(Wo)?e.go("<"):$===c(Fo)&&e.go(">")}}return{mount:T,destroy:L,disable:m}}var Li=Pr+"-lazy",yo=Li+"-srcset",Nc="["+Li+"], ["+yo+"]";function Hc(e,t,n){var i=bt(e),o=i.on,s=i.off,a=i.bind,d=i.emit,c=n.lazyLoad==="sequential",p=[xi,Zn],u=[];function T(){n.lazyLoad&&(w(),o(Et,w))}function w(){En(u),L(),c?b():(s(p),o(p,m),m())}function L(){t.Slides.forEach(function($){Ir($.slide,Nc).forEach(function(S){var F=sn(S,Li),P=sn(S,yo);if(F!==S.src||P!==S.srcset){var k=n.classes.spinner,x=S.parentElement,I=Di(x,"."+k)||li("span",k,x);u.push([S,$,I]),S.src||_i(S,"none")}})})}function m(){u=u.filter(function($){var S=n.perPage*((n.preloadPages||1)+1)-1;return $[1].isWithin(e.index,S)?y($):!0}),u.length||s(p)}function y($){var S=$[0];pn($[1].slide,vr),a(S,"load error",mt(C,$)),je(S,"src",sn(S,Li)),je(S,"srcset",sn(S,yo)),mn(S,Li),mn(S,yo)}function C($,S){var F=$[0],P=$[1];$n(P.slide,vr),S.type!=="error"&&(Yn($[2]),_i(F,""),d(Fr,F,P),d(pi)),c&&b()}function b(){u.length&&y(u.shift())}return{mount:T,destroy:mt(En,u),check:m}}function Oc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=i.bind,d=t.Slides,c=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,w=p.go,L=t.Direction.resolve,m=c.pagination,y=[],C,b;function $(){S(),o([jt,Et,Lo],$);var f=n.pagination;m&&_i(m,f?"":"none"),f&&(o([In,Mo,Zn],G),F(),G(),s(ws,{list:C,items:y},I(e.index)))}function S(){C&&(Yn(m?Fn(C.children):C),$n(C,b),En(y),C=null),i.destroy()}function F(){var f=e.length,R=n.classes,M=n.i18n,j=n.perPage,Z=u()?p.getEnd()+1:ki(f/j);C=m||li("ul",R.pagination,c.track.parentElement),pn(C,b=Bo+"--"+x()),je(C,Cn,"tablist"),je(C,Jt,M.select),je(C,Hr,x()===No?"vertical":"");for(var ue=0;ue<Z;ue++){var V=li("li",null,C),_=li("button",{class:R.page,type:"button"},V),Q=d.getIn(ue).map(function(H){return H.slide.id}),U=!u()&&j>1?M.pageX:M.slideX;a(_,"click",mt(P,ue)),n.paginationKeyboard&&a(_,"keydown",mt(k,ue)),je(V,Cn,"presentation"),je(_,Cn,"tab"),je(_,Ki,Q.join(" ")),je(_,Jt,hr(U,ue+1)),je(_,ci,-1),y.push({li:V,button:_,page:ue})}}function P(f){w(">"+f,!0)}function k(f,R){var M=y.length,j=jr(R),Z=x(),ue=-1;j===L(Fo,!1,Z)?ue=++f%M:j===L(Wo,!1,Z)?ue=(--f+M)%M:j==="Home"?ue=0:j==="End"&&(ue=M-1);var V=y[ue];V&&(ss(V.button),w(">"+ue),wn(R,!0))}function x(){return n.paginationDirection||n.direction}function I(f){return y[p.toPage(f)]}function G(){var f=I(T(!0)),R=I(T());if(f){var M=f.button;$n(M,Jn),mn(M,aa),je(M,ci,-1)}if(R){var j=R.button;pn(j,Jn),je(j,aa,!0),je(j,ci,"")}s(Ss,{list:C,items:y},f,R)}return{items:y,mount:$,destroy:S,getAt:I,update:G}}var Bc=[" ","Enter"];function jc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),i&&u()}function d(){s.forEach(function(m){m.destroy()}),En(s)}function c(){d(),a()}function p(m,y){var C=bt(m);C.on(In,function(b,$,S){y.go(y.is(wi)?S:b)}),s.push(C)}function u(){var m=bt(e),y=m.on;y(Ar,w),y(Cs,L),y([Nn,jt],T),s.push(m),m.emit(_r,e.splides)}function T(){je(t.Elements.list,Hr,n.direction===No?"vertical":"")}function w(m){e.go(m.index)}function L(m,y){Lr(Bc,jr(y))&&(w(m),wn(y))}return{setup:mt(t.Media.set,{slideFocus:ji(o)?i:o},!0),mount:a,destroy:d,remount:c}}function zc(e,t,n){var i=bt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",d,ri)}function d(p){if(p.cancelable){var u=p.deltaY,T=u<0,w=mr(p),L=n.wheelMinThreshold||0,m=n.wheelSleep||0;Dt(u)>L&&w-s>m&&(e.go(T?"<":">"),s=w),c(T)&&wn(p)}}function c(p){return!n.releaseWheel||e.state.is(bi)||t.Controller.getAdjacent(p)!==-1}return{mount:a}}var Vc=90;function Dc(e,t,n){var i=bt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,d=li("span",lc),c=_o(Vc,mt(u,!1));function p(){a&&(w(!t.Autoplay.isPaused()),je(s,ca,!0),d.textContent="…",o(kr,mt(w,!0)),o(Wr,mt(w,!1)),o([xi,Zn],mt(u,!0)))}function u(L){je(s,la,L),L?(Vi(s,d),c.start()):(Yn(d),c.cancel())}function T(){mn(s,[sa,ca,la]),Yn(d)}function w(L){a&&je(s,sa,L?"off":"polite")}return{mount:p,disable:w,destroy:T}}var qc=Object.freeze({__proto__:null,Media:Ql,Direction:ec,Elements:gc,Slides:fc,Layout:yc,Clones:bc,Move:xc,Controller:wc,Arrows:Cc,Autoplay:Lc,Cover:Ec,Scroll:_c,Drag:kc,Keyboard:Fc,LazyLoad:Hc,Pagination:Oc,Sync:jc,Wheel:zc,Live:Dc}),Kc={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"},Gc={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:uc,i18n:Kc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Uc(e,t,n){var i=t.Slides;function o(){bt(e).on([Nn,Et],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function a(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),is(c)}return{mount:o,start:a,cancel:pr}}function Xc(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,d=mt(an,a,"transition"),c;function p(){bt(e).bind(a,"transitionend",function(L){L.target===a&&c&&(T(),c())})}function u(L,m){var y=i.toPosition(L,!0),C=i.getPosition(),b=w(L);Dt(y-C)>=1&&b>=1?n.useScroll?s.scroll(y,b,!1,m):(d("transform "+b+"ms "+n.easing),i.translate(y,!0),c=m):(i.jump(L),m())}function T(){d(""),s.cancel()}function w(L){var m=n.rewindSpeed;if(e.is(mi)&&m){var y=o.getIndex(!0),C=o.getEnd();if(y===0&&L>=C||y>=C&&L===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var Yc=(function(){function e(n,i){this.event=bt(),this.Components={},this.state=Jl(si),this.splides=[],this._o={},this._E={};var o=_n(n)?cs(document,n):n;Ti(o,o+" is invalid."),this.root=o,i=Mn({label:sn(o,Jt)||"",labelledby:sn(o,Nr)||""},Gc,e.defaults,i||{});try{Mn(i,JSON.parse(sn(o,Pr)))}catch{Ti(!1,"Invalid JSON")}this._o=Object.create(Mn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,d=this.Components;Ti(a.is([si,$o]),"Already mounted!"),a.set(si),this._C=d,this._T=o||this._T||(this.is(Gi)?Uc:Xc),this._E=i||this._E;var c=Mi({},qc,this._E,{Transition:this._T});return Xn(c,function(p,u){var T=p(s,d,s._o);d[u]=T,T.setup&&T.setup()}),Xn(d,function(p){p.mount&&p.mount()}),this.emit(Nn),pn(this.root,cc),a.set(ui),this.emit(fr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(ui)&&(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(Fn(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(Et),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(si)?bt(this).on(fr,this.destroy.bind(this,i)):(Xn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Mr),o.destroy(),i&&En(this.splides),s.set($o)),this},Kl(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})(),zr=Yc;zr.defaults={};zr.STATES=Ul;var ma=[[Nn,"onMounted"],[fr,"onReady"],[In,"onMove"],[xi,"onMoved"],[Ar,"onClick"],[ps,"onActive"],[ms,"onInactive"],[gs,"onVisible"],[hs,"onHidden"],[Et,"onRefresh"],[jt,"onUpdated"],[pi,"onResize"],[Ao,"onResized"],[fs,"onDrag"],[ys,"onDragging"],[vs,"onDragged"],[Mo,"onScroll"],[Zn,"onScrolled"],[Mr,"onDestroy"],[bs,"onArrowsMounted"],[xs,"onArrowsUpdated"],[ws,"onPaginationMounted"],[Ss,"onPaginationUpdated"],[_r,"onNavigationMounted"],[kr,"onAutoplayPlay"],[$s,"onAutoplayPlaying"],[Wr,"onAutoplayPause"],[Fr,"onLazyLoadLoaded"]];function Vr(...e){return e.filter(Boolean).join(" ")}function Eo(e){return e!==null&&typeof e=="object"}function br(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!br(n,t[i]));if(Eo(e)&&Eo(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!br(e[o],t[o]))}return e===t}function Jc(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Zc(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 xr(e,t){const n=e;return Zc(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Eo(i)?n[o]=xr(Eo(n[o])?n[o]:{},i):n[o]=i}),n}var Qc=({children:e,className:t,...n})=>l.createElement("div",{className:Vr("splide__track",t),...n},l.createElement("ul",{className:"splide__list"},e)),Dr=class extends l.Component{constructor(){super(...arguments),this.splideRef=l.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new zr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=xr({},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&&!br(this.options,e)&&(this.splide.options=e,this.options=xr({},e));const t=this.getSlides();Jc(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){ma.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 l.createElement(t,{className:Vr("splide",e),ref:this.splideRef,...this.omit(o,["options",...ma.map(s=>s[1])])},n?l.createElement(Qc,null,i):i)}},qr=({children:e,className:t,...n})=>l.createElement("li",{className:Vr("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("react"),Xe=require("classnames"),I=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Oi=require("react-dom");function tl(e){return e.type==="object"&&e.version===1}const nl="ControlSlider-module__wrapper___sHEkd",il="ControlSlider-module__hoverArrow___A-dOH",ol="ControlSlider-module__sliderItem___QQSkR",rl="ControlSlider-module__sliderImage___9hRl-",al="ControlSlider-module__arrow___05ghY",sl="ControlSlider-module__arrowVertical___tBfVN",ll="ControlSlider-module__nextArrow___-30Yc",cl="ControlSlider-module__arrowInner___aEra3",dl="ControlSlider-module__arrowIcon___S4ztF",ul="ControlSlider-module__arrowImg___2dwJW",pl="ControlSlider-module__mirror___brd6U",ml="ControlSlider-module__pagination___bicLF",gl="ControlSlider-module__paginationInner___bT-P-",hl="ControlSlider-module__paginationVertical___zYqKw",fl="ControlSlider-module__paginationItem___nTRbk",yl="ControlSlider-module__dot___p1Qun",vl="ControlSlider-module__activeDot___LHFaj",bl="ControlSlider-module__paginationInsideBottom___R3FWn",xl="ControlSlider-module__paginationInsideTop___V-qb-",wl="ControlSlider-module__paginationOutsideBottom___14w8D",Sl="ControlSlider-module__paginationOutsideTop___SCLqB",$l="ControlSlider-module__paginationInsideLeft___yOBRZ",Cl="ControlSlider-module__paginationInsideRight___Rtt3o",Tl="ControlSlider-module__paginationOutsideLeft___lahaw",Ll="ControlSlider-module__paginationOutsideRight___EtuQa",El="ControlSlider-module__imgWrapper___UjEgB",Il="ControlSlider-module__captionBlock___dJ6-j",Pl="ControlSlider-module__captionTextWrapper___HFlpf",Al="ControlSlider-module__captionText___uGBVc",Rl="ControlSlider-module__active___WZK4G",Ml="ControlSlider-module__withPointerEvents___t-18M",_l="ControlSlider-module__topLeftAlignment___zjnGM",kl="ControlSlider-module__topCenterAlignment___gD1xW",Wl="ControlSlider-module__topRightAlignment___NMapS",Fl="ControlSlider-module__middleLeftAlignment___OnUrY",Nl="ControlSlider-module__middleCenterAlignment___Tdkl0",Hl="ControlSlider-module__middleRightAlignment___wEbfX",Ol="ControlSlider-module__bottomLeftAlignment___cTP2-",Bl="ControlSlider-module__bottomCenterAlignment___c54fB",jl="ControlSlider-module__bottomRightAlignment___kEwrz",zl="ControlSlider-module__clickOverlay___DZA28",Vl="ControlSlider-module__contain___pLyq7",Dl="ControlSlider-module__cover___KdDat",Ie={wrapper:nl,hoverArrow:il,sliderItem:ol,sliderImage:rl,arrow:al,arrowVertical:sl,nextArrow:ll,arrowInner:cl,arrowIcon:dl,arrowImg:ul,mirror:pl,pagination:ml,paginationInner:gl,paginationVertical:hl,paginationItem:fl,dot:yl,activeDot:vl,paginationInsideBottom:bl,paginationInsideTop:xl,paginationOutsideBottom:wl,paginationOutsideTop:Sl,paginationInsideLeft:$l,paginationInsideRight:Cl,paginationOutsideLeft:Tl,paginationOutsideRight:Ll,imgWrapper:El,captionBlock:Il,captionTextWrapper:Pl,captionText:Al,active:Rl,withPointerEvents:Ml,topLeftAlignment:_l,topCenterAlignment:kl,topRightAlignment:Wl,middleLeftAlignment:Fl,middleCenterAlignment:Nl,middleRightAlignment:Hl,bottomLeftAlignment:Ol,bottomCenterAlignment:Bl,bottomRightAlignment:jl,clickOverlay:zl,contain:Vl,cover:Dl};function ql(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 Kl(e,t,n){return t&&ql(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ta="(prefers-reduced-motion: reduce)",li=1,Gl=2,pi=3,xi=4,Bi=5,go=6,$o=7,Ul={CREATED:li,MOUNTED:Gl,IDLE:pi,MOVING:xi,SCROLLING:Bi,DRAGGING:go,DESTROYED:$o};function Cn(e){e.length=0}function Fn(e,t,n){return Array.prototype.slice.call(e,t,n)}function dt(e){return e.bind.apply(e,[null].concat(Fn(arguments,1)))}var os=setTimeout,mr=function(){};function na(e){return requestAnimationFrame(e)}function Ao(e,t){return typeof t===e}function Pi(e){return!Lr(e)&&Ao("object",e)}var Tr=Array.isArray,rs=dt(Ao,"function"),_n=dt(Ao,"string"),ji=dt(Ao,"undefined");function Lr(e){return e===null}function as(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function zi(e){return Tr(e)?e:[e]}function an(e,t){zi(e).forEach(t)}function Er(e,t){return e.indexOf(t)>-1}function ho(e,t){return e.push.apply(e,zi(t)),e}function bn(e,t,n){e&&an(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function gn(e,t){bn(e,_n(t)?t.split(" "):t,!0)}function Vi(e,t){an(t,e.appendChild.bind(e))}function Ir(e,t){an(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Ai(e,t){return as(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ss(e,t){var n=e?Fn(e.children):[];return t?n.filter(function(i){return Ai(i,t)}):n}function Di(e,t){return t?ss(e,t)[0]:e.firstElementChild}var Ri=Object.keys;function Gn(e,t,n){return e&&(n?Ri(e).reverse():Ri(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Mi(e){return Fn(arguments,1).forEach(function(t){Gn(t,function(n,i){e[i]=t[i]})}),e}function Mn(e){return Fn(arguments,1).forEach(function(t){Gn(t,function(n,i){Tr(n)?e[i]=n.slice():Pi(n)?e[i]=Mn({},Pi(e[i])?e[i]:{},n):e[i]=n})}),e}function ia(e,t){an(t||Ri(e),function(n){delete e[n]})}function hn(e,t){an(e,function(n){an(t,function(i){n&&n.removeAttribute(i)})})}function je(e,t,n){Pi(t)?Gn(t,function(i,o){je(e,o,i)}):an(e,function(i){Lr(n)||n===""?hn(i,t):i.setAttribute(t,String(n))})}function ci(e,t,n){var i=document.createElement(e);return t&&(_n(t)?gn(i,t):je(i,t)),n&&Vi(n,i),i}function cn(e,t,n){if(ji(n))return getComputedStyle(e)[t];Lr(n)||(e.style[t]=""+n)}function _i(e,t){cn(e,"display",t)}function ls(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function dn(e,t){return e.getAttribute(t)}function oa(e,t){return e&&e.classList.contains(t)}function tn(e){return e.getBoundingClientRect()}function Un(e){an(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function cs(e){return Di(new DOMParser().parseFromString(e,"text/html").body)}function vn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ds(e,t){return e&&e.querySelector(t)}function Pr(e,t){return t?Fn(e.querySelectorAll(t)):[]}function xn(e,t){bn(e,t,!1)}function gr(e){return e.timeStamp}function jn(e){return _n(e)?e:e?e+"px":""}var qi="splide",Ar="data-"+qi;function Ti(e,t){if(!e)throw new Error("["+qi+"] "+(t||""))}var kn=Math.min,Co=Math.max,To=Math.floor,ki=Math.ceil,qt=Math.abs;function us(e,t,n){return qt(e-t)<n}function fo(e,t,n,i){var o=kn(t,n),s=Co(t,n);return i?o<e&&e<s:o<=e&&e<=s}function ri(e,t,n){var i=kn(t,n),o=Co(t,n);return kn(Co(i,e),o)}function hr(e){return+(e>0)-+(e<0)}function fr(e,t){return an(t,function(n){e=e.replace("%s",""+n)}),e}function Rr(e){return e<10?"0"+e:""+e}var ra={};function Xl(e){return""+e+Rr(ra[e]=(ra[e]||0)+1)}function ps(){var e=[];function t(a,d,c,p){o(a,d,function(u,L,x){var E="addEventListener"in u,m=E?u.removeEventListener.bind(u,L,c,p):u.removeListener.bind(u,c);E?u.addEventListener(L,c,p):u.addListener(c),e.push([u,L,x,c,m])})}function n(a,d,c){o(a,d,function(p,u,L){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===L&&(!c||x[3]===c)?(x[4](),!1):!0})})}function i(a,d,c){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:c}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,c)),a.dispatchEvent(p),p}function o(a,d,c){an(a,function(p){p&&an(d,function(u){u.split(" ").forEach(function(L){var x=L.split(".");c(p,x[0],x[1])})})})}function s(){e.forEach(function(a){a[4]()}),Cn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Nn="mounted",yr="ready",Tn="move",wi="moved",Mr="click",ms="active",gs="inactive",hs="visible",fs="hidden",Rt="refresh",Vt="updated",mi="resize",Ro="resized",ys="drag",vs="dragging",bs="dragged",Mo="scroll",Yn="scrolled",Yl="overflow",_r="destroy",xs="arrows:mounted",ws="arrows:updated",Ss="pagination:mounted",$s="pagination:updated",kr="navigation:mounted",Wr="autoplay:play",Cs="autoplay:playing",Fr="autoplay:pause",Nr="lazyload:loaded",Ts="sk",Ls="sh",Lo="ei";function wt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ps();function i(s,a){n.bind(t,zi(s).join(" "),function(d){a.apply(a,Tr(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Fn(arguments,1))}return e&&e.event.on(_r,n.destroy),Mi(n,{bus:t,on:i,off:dt(n.unbind,t),emit:o})}function _o(e,t,n,i){var o=Date.now,s,a=0,d,c=!0,p=0;function u(){if(!c){if(a=e?kn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++p>=i))return x();d=na(u)}}function L(v){v||m(),s=o()-(v?a*e:0),c=!1,d=na(u)}function x(){c=!0}function E(){s=o(),a=0,n&&n(a)}function m(){d&&cancelAnimationFrame(d),a=0,d=0,c=!0}function y(v){e=v}function C(){return c}return{start:L,rewind:E,pause:x,cancel:m,set:y,isPaused:C}}function Jl(e){var t=e;function n(o){t=o}function i(o){return Er(zi(o),t)}return{set:n,is:i}}function Zl(e,t){var n=_o(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Ql(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=ps(),d=[];function c(){var m=n.mediaQuery==="min";Ri(o).sort(function(y,C){return m?+y-+C:+C-+y}).forEach(function(y){u(o[y],"("+(m?"min":"max")+"-width:"+y+"px)")}),u(s,ta),L()}function p(m){m&&a.destroy()}function u(m,y){var C=matchMedia(y);a.bind(C,"change",L),d.push([m,C])}function L(){var m=i.is($o),y=n.direction,C=d.reduce(function(v,$){return Mn(v,$[1].matches?$[0]:{})},{});ia(n),E(C),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):y!==n.direction&&e.refresh()}function x(m){matchMedia(ta).matches&&(m?Mn(n,s):ia(n,Ri(s)))}function E(m,y,C){Mn(n,m),y&&Mn(Object.getPrototypeOf(n),m),(C||!i.is(li))&&e.emit(Vt,n)}return{setup:c,destroy:p,reduce:x,set:E}}var ko="Arrow",Wo=ko+"Left",Fo=ko+"Right",Es=ko+"Up",Is=ko+"Down",aa="rtl",No="ttb",Xo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Es,Fo],ArrowRight:[Is,Wo]};function ec(e,t,n){function i(s,a,d){d=d||n.direction;var c=d===aa&&!a?1:d===No?0:-1;return Xo[s]&&Xo[s][c]||s.replace(/width|left|right/i,function(p,u){var L=Xo[p.toLowerCase()][c]||p;return u>0?L.charAt(0).toUpperCase()+L.slice(1):L})}function o(s){return s*(n.direction===aa?1:-1)}return{resolve:i,orient:o}}var wn="role",di="tabindex",tc="disabled",pn="aria-",Ki=pn+"controls",Ps=pn+"current",sa=pn+"selected",nn=pn+"label",Hr=pn+"labelledby",As=pn+"hidden",Or=pn+"orientation",Wi=pn+"roledescription",la=pn+"live",ca=pn+"busy",da=pn+"atomic",Br=[wn,di,tc,Ki,Ps,nn,Hr,As,Or,Wi],fn=qi+"__",Hn="is-",Yo=qi,ua=fn+"track",nc=fn+"list",Ho=fn+"slide",Rs=Ho+"--clone",ic=Ho+"__container",jr=fn+"arrows",Oo=fn+"arrow",Ms=Oo+"--prev",_s=Oo+"--next",Bo=fn+"pagination",ks=Bo+"__page",oc=fn+"progress",rc=oc+"__bar",ac=fn+"toggle",sc=fn+"spinner",lc=fn+"sr",cc=Hn+"initialized",Xn=Hn+"active",Ws=Hn+"prev",Fs=Hn+"next",vr=Hn+"visible",br=Hn+"loading",Ns=Hn+"focus-in",Hs=Hn+"overflow",dc=[Xn,vr,Ws,Fs,br,Ns,Hs],uc={slide:Ho,clone:Rs,arrows:jr,arrow:Oo,prev:Ms,next:_s,pagination:Bo,page:ks,spinner:sc};function pc(e,t){if(rs(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ai(n,t);)n=n.parentElement;return n}var mc=5,pa=200,Os="touchstart mousedown",Jo="touchmove mousemove",Zo="touchend touchcancel mouseup click";function gc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=e.root,d=n.i18n,c={},p=[],u=[],L=[],x,E,m;function y(){w(),N(),$()}function C(){o(Rt,v),o(Rt,y),o(Vt,$),s(document,Os+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),s(a,"focusin",function(){bn(a,Ns,!!m)})}function v(b){var P=Br.concat("style");Cn(p),xn(a,u),xn(x,L),hn([x,E],P),hn(a,b?P:["style",Wi])}function $(){xn(a,u),xn(x,L),u=k(Yo),L=k(ua),gn(a,u),gn(x,L),je(a,nn,n.label),je(a,Hr,n.labelledby)}function w(){x=A("."+ua),E=Di(x,"."+nc),Ti(x&&E,"A track/list element is missing."),ho(p,ss(E,"."+Ho+":not(."+Rs+")")),Gn({arrows:jr,pagination:Bo,prev:Ms,next:_s,bar:rc,toggle:ac},function(b,P){c[P]=A("."+b)}),Mi(c,{root:a,track:x,list:E,slides:p})}function N(){var b=a.id||Xl(qi),P=n.role;a.id=b,x.id=x.id||b+"-track",E.id=E.id||b+"-list",!dn(a,wn)&&a.tagName!=="SECTION"&&P&&je(a,wn,P),je(a,Wi,d.carousel),je(E,wn,"presentation")}function A(b){var P=ds(a,b);return P&&pc(P,"."+Yo)===a?P:void 0}function k(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===Yo&&Xn]}return Mi(c,{setup:y,mount:C,destroy:v})}var gi="slide",Si="loop",Gi="fade";function hc(e,t,n,i){var o=wt(e),s=o.on,a=o.emit,d=o.bind,c=e.Components,p=e.root,u=e.options,L=u.isNavigation,x=u.updateOnMove,E=u.i18n,m=u.pagination,y=u.slideFocus,C=c.Direction.resolve,v=dn(i,"style"),$=dn(i,nn),w=n>-1,N=Di(i,"."+ic),A;function k(){w||(i.id=p.id+"-slide"+Rr(t+1),je(i,wn,m?"tabpanel":"group"),je(i,Wi,E.slide),je(i,nn,$||fr(E.slideLabel,[t+1,e.length]))),b()}function b(){d(i,"click",dt(a,Mr,ee)),d(i,"keydown",dt(a,Ts,ee)),s([wi,Ls,Yn],R),s(kr,U),x&&s(Tn,f)}function P(){A=!0,o.destroy(),xn(i,dc),hn(i,Br),je(i,"style",v),je(i,nn,$||"")}function U(){var X=e.splides.map(function(F){var J=F.splide.Components.Slides.getAt(t);return J?J.slide.id:""}).join(" ");je(i,nn,fr(E.slideX,(w?n:t)+1)),je(i,Ki,X),je(i,wn,y?"button":""),y&&hn(i,Wi)}function f(){A||R()}function R(){if(!A){var X=e.index;M(),j(),bn(i,Ws,t===X-1),bn(i,Fs,t===X+1)}}function M(){var X=ue();X!==oa(i,Xn)&&(bn(i,Xn,X),je(i,Ps,L&&X||""),a(X?ms:gs,ee))}function j(){var X=z(),F=!X&&(!ue()||w);if(e.state.is([xi,Bi])||je(i,As,F||""),je(Pr(i,u.focusableNodes||""),di,F?-1:""),y&&je(i,di,F?-1:0),X!==oa(i,vr)&&(bn(i,vr,X),a(X?hs:fs,ee)),!X&&document.activeElement===i){var J=c.Slides.getAt(e.index);J&&ls(J.slide)}}function Q(X,F,J){cn(J&&N||i,X,F)}function ue(){var X=e.index;return X===t||u.cloneStatus&&X===n}function z(){if(e.is(Gi))return ue();var X=tn(c.Elements.track),F=tn(i),J=C("left",!0),oe=C("right",!0);return To(X[J])<=ki(F[J])&&To(F[oe])<=ki(X[oe])}function _(X,F){var J=qt(X-t);return!w&&(u.rewind||e.is(Si))&&(J=kn(J,e.length-J)),J<=F}var ee={index:t,slideIndex:n,slide:i,container:N,isClone:w,mount:k,destroy:P,update:R,style:Q,isWithin:_};return ee}function fc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Elements,c=d.slides,p=d.list,u=[];function L(){x(),o(Rt,E),o(Rt,x)}function x(){c.forEach(function(R,M){y(R,M,-1)})}function E(){A(function(R){R.destroy()}),Cn(u)}function m(){A(function(R){R.update()})}function y(R,M,j){var Q=hc(e,M,j,R);Q.mount(),u.push(Q),u.sort(function(ue,z){return ue.index-z.index})}function C(R){return R?k(function(M){return!M.isClone}):u}function v(R){var M=t.Controller,j=M.toIndex(R),Q=M.hasFocus()?1:n.perPage;return k(function(ue){return fo(ue.index,j,j+Q-1)})}function $(R){return k(R)[0]}function w(R,M){an(R,function(j){if(_n(j)&&(j=cs(j)),as(j)){var Q=c[M];Q?Ir(j,Q):Vi(p,j),gn(j,n.classes.slide),P(j,dt(s,mi))}}),s(Rt)}function N(R){Un(k(R).map(function(M){return M.slide})),s(Rt)}function A(R,M){C(M).forEach(R)}function k(R){return u.filter(rs(R)?R:function(M){return _n(R)?Ai(M.slide,R):Er(zi(R),M.index)})}function b(R,M,j){A(function(Q){Q.style(R,M,j)})}function P(R,M){var j=Pr(R,"img"),Q=j.length;Q?j.forEach(function(ue){a(ue,"load error",function(){--Q||M()})}):M()}function U(R){return R?c.length:u.length}function f(){return u.length>n.perPage}return{mount:L,destroy:E,update:m,register:y,get:C,getIn:v,getAt:$,add:w,remove:N,forEach:A,filter:k,style:b,getLength:U,isEnough:f}}function yc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=t.Slides,c=t.Direction.resolve,p=t.Elements,u=p.root,L=p.track,x=p.list,E=d.getAt,m=d.style,y,C,v;function $(){w(),s(window,"resize load",Zl(dt(a,mi))),o([Vt,Rt],w),o(mi,N)}function w(){y=n.direction===No,cn(u,"maxWidth",jn(n.width)),cn(L,c("paddingLeft"),A(!1)),cn(L,c("paddingRight"),A(!0)),N(!0)}function N(ee){var X=tn(u);(ee||C.width!==X.width||C.height!==X.height)&&(cn(L,"height",k()),m(c("marginRight"),jn(n.gap)),m("width",P()),m("height",U(),!0),C=X,a(Ro),v!==(v=_())&&(bn(u,Hs,v),a(Yl,v)))}function A(ee){var X=n.padding,F=c(ee?"right":"left");return X&&jn(X[F]||(Pi(X)?0:X))||"0px"}function k(){var ee="";return y&&(ee=b(),Ti(ee,"height or heightRatio is missing."),ee="calc("+ee+" - "+A(!1)+" - "+A(!0)+")"),ee}function b(){return jn(n.height||tn(x).width*n.heightRatio)}function P(){return n.autoWidth?null:jn(n.fixedWidth)||(y?"":f())}function U(){return jn(n.fixedHeight)||(y?n.autoHeight?null:f():b())}function f(){var ee=jn(n.gap);return"calc((100%"+(ee&&" + "+ee)+")/"+(n.perPage||1)+(ee&&" - "+ee)+")"}function R(){return tn(x)[c("width")]}function M(ee,X){var F=E(ee||0);return F?tn(F.slide)[c("width")]+(X?0:ue()):0}function j(ee,X){var F=E(ee);if(F){var J=tn(F.slide)[c("right")],oe=tn(x)[c("left")];return qt(J-oe)+(X?0:ue())}return 0}function Q(ee){return j(e.length-1)-j(0)+M(0,ee)}function ue(){var ee=E(0);return ee&&parseFloat(cn(ee.slide,c("marginRight")))||0}function z(ee){return parseFloat(cn(L,c("padding"+(ee?"Right":"Left"))))||0}function _(){return e.is(Gi)||Q(!0)>R()}return{mount:$,resize:N,listSize:R,slideSize:M,sliderSize:Q,totalSize:j,getPadding:z,isOverflow:_}}var vc=2;function bc(e,t,n){var i=wt(e),o=i.on,s=t.Elements,a=t.Slides,d=t.Direction.resolve,c=[],p;function u(){o(Rt,L),o([Vt,mi],E),(p=C())&&(m(p),t.Layout.resize(!0))}function L(){x(),u()}function x(){Un(c),Cn(c),i.destroy()}function E(){var v=C();p!==v&&(p<v||!v)&&i.emit(Rt)}function m(v){var $=a.get().slice(),w=$.length;if(w){for(;$.length<v;)ho($,$);ho($.slice(-v),$.slice(0,v)).forEach(function(N,A){var k=A<v,b=y(N.slide,A);k?Ir(b,$[0].slide):Vi(s.list,b),ho(c,b),a.register(b,A-v+(k?0:w),N.index)})}}function y(v,$){var w=v.cloneNode(!0);return gn(w,n.classes.clone),w.id=e.root.id+"-clone"+Rr($+1),w}function C(){var v=n.clones;if(!e.is(Si))v=0;else if(ji(v)){var $=n[d("fixedWidth")]&&t.Layout.slideSize(0),w=$&&ki(tn(s.track)[d("width")]/$);v=w||n[d("autoWidth")]&&e.length||n.perPage*vc}return v}return{mount:u,destroy:x}}function xc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Layout,c=d.slideSize,p=d.getPadding,u=d.totalSize,L=d.listSize,x=d.sliderSize,E=t.Direction,m=E.resolve,y=E.orient,C=t.Elements,v=C.list,$=C.track,w;function N(){w=t.Transition,o([Nn,Ro,Vt,Rt],A)}function A(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function k(F,J,oe,re){F!==J&&ee(F>oe)&&(R(),P(f(Q(),F>oe),!0)),a(xi),s(Tn,J,oe,F),w.start(J,function(){a(pi),s(wi,J,oe,F),re&&re()})}function b(F){P(j(F,!0))}function P(F,J){if(!e.is(Gi)){var oe=J?F:U(F);cn(v,"transform","translate"+m("X")+"("+oe+"px)"),F!==oe&&s(Ls)}}function U(F){if(e.is(Si)){var J=M(F),oe=J>t.Controller.getEnd(),re=J<0;(re||oe)&&(F=f(F,oe))}return F}function f(F,J){var oe=F-_(J),re=x();return F-=y(re*(ki(qt(oe)/re)||1))*(J?1:-1),F}function R(){P(Q(),!0),w.cancel()}function M(F){for(var J=t.Slides.get(),oe=0,re=1/0,W=0;W<J.length;W++){var se=J[W].index,h=qt(j(se,!0)-F);if(h<=re)re=h,oe=se;else break}return oe}function j(F,J){var oe=y(u(F-1)-z(F));return J?ue(oe):oe}function Q(){var F=m("left");return tn(v)[F]-tn($)[F]+y(p(!1))}function ue(F){return n.trimSpace&&e.is(gi)&&(F=ri(F,0,y(x(!0)-L()))),F}function z(F){var J=n.focus;return J==="center"?(L()-c(F,!0))/2:+J*c(F)||0}function _(F){return j(F?t.Controller.getEnd():0,!!n.trimSpace)}function ee(F){var J=y(f(Q(),F));return F?J>=0:J<=v[m("scrollWidth")]-tn($)[m("width")]}function X(F,J){J=ji(J)?Q():J;var oe=F!==!0&&y(J)<y(_(!1)),re=F!==!1&&y(J)>y(_(!0));return oe||re}return{mount:N,move:k,jump:b,translate:P,shift:f,cancel:R,toIndex:M,toPosition:j,getPosition:Q,getLimit:_,exceededLimit:X,reposition:A}}function wc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=t.Move,d=a.getPosition,c=a.getLimit,p=a.toPosition,u=t.Slides,L=u.isEnough,x=u.getLength,E=n.omitEnd,m=e.is(Si),y=e.is(gi),C=dt(Q,!1),v=dt(Q,!0),$=n.start||0,w,N=$,A,k,b;function P(){U(),o([Vt,Rt,Lo],U),o(Ro,f)}function U(){A=x(!0),k=n.perMove,b=n.perPage,w=ee();var h=ri($,0,E?w:A-1);h!==$&&($=h,a.reposition())}function f(){w!==ee()&&s(Lo)}function R(h,ae,ye){if(!se()){var he=j(h),Te=_(he);Te>-1&&(ae||Te!==$)&&(oe(Te),a.move(he,Te,N,ye))}}function M(h,ae,ye,he){t.Scroll.scroll(h,ae,ye,function(){var Te=_(a.toIndex(d()));oe(E?kn(Te,w):Te),he&&he()})}function j(h){var ae=$;if(_n(h)){var ye=h.match(/([+\-<>])(\d+)?/)||[],he=ye[1],Te=ye[2];he==="+"||he==="-"?ae=ue($+ +(""+he+(+Te||1)),$):he===">"?ae=Te?X(+Te):C(!0):he==="<"&&(ae=v(!0))}else ae=m?h:ri(h,0,w);return ae}function Q(h,ae){var ye=k||(W()?1:b),he=ue($+ye*(h?-1:1),$,!(k||W()));return he===-1&&y&&!us(d(),c(!h),1)?h?0:w:ae?he:_(he)}function ue(h,ae,ye){if(L()||W()){var he=z(h);he!==h&&(ae=h,h=he,ye=!1),h<0||h>w?!k&&(fo(0,h,ae,!0)||fo(w,ae,h,!0))?h=X(F(h)):m?h=ye?h<0?-(A%b||b):A:h:n.rewind?h=h<0?w:0:h=-1:ye&&h!==ae&&(h=X(F(ae)+(h<ae?-1:1)))}else h=-1;return h}function z(h){if(y&&n.trimSpace==="move"&&h!==$)for(var ae=d();ae===p(h,!0)&&fo(h,0,e.length-1,!n.rewind);)h<$?--h:++h;return h}function _(h){return m?(h+A)%A||0:h}function ee(){for(var h=A-(W()||m&&k?1:b);E&&h-- >0;)if(p(A-1,!0)!==p(h,!0)){h++;break}return ri(h,0,A-1)}function X(h){return ri(W()?h:b*h,0,w)}function F(h){return W()?kn(h,w):To((h>=w?A-1:h)/b)}function J(h){var ae=a.toIndex(h);return y?ri(ae,0,w):ae}function oe(h){h!==$&&(N=$,$=h)}function re(h){return h?N:$}function W(){return!ji(n.focus)||n.isNavigation}function se(){return e.state.is([xi,Bi])&&!!n.waitForTransition}return{mount:P,go:R,scroll:M,getNext:C,getPrev:v,getAdjacent:Q,getEnd:ee,setIndex:oe,getIndex:re,toIndex:X,toPage:F,toDest:J,hasFocus:W,isBusy:se}}var Sc="http://www.w3.org/2000/svg",$c="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",Qi=40;function Cc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=n.classes,c=n.i18n,p=t.Elements,u=t.Controller,L=p.arrows,x=p.track,E=L,m=p.prev,y=p.next,C,v,$={};function w(){A(),o(Vt,N)}function N(){k(),w()}function A(){var M=n.arrows;M&&!(m&&y)&&U(),m&&y&&(Mi($,{prev:m,next:y}),_i(E,M?"":"none"),gn(E,v=jr+"--"+n.direction),M&&(b(),R(),je([m,y],Ki,x.id),a(xs,m,y)))}function k(){i.destroy(),xn(E,v),C?(Un(L?[m,y]:E),m=y=null):hn([m,y],Br)}function b(){o([Nn,wi,Rt,Yn,Lo],R),s(y,"click",dt(P,">")),s(m,"click",dt(P,"<"))}function P(M){u.go(M,!0)}function U(){E=L||ci("div",d.arrows),m=f(!0),y=f(!1),C=!0,Vi(E,[m,y]),!L&&Ir(E,x)}function f(M){var j='<button class="'+d.arrow+" "+(M?d.prev:d.next)+'" type="button"><svg xmlns="'+Sc+'" viewBox="0 0 '+Qi+" "+Qi+'" width="'+Qi+'" height="'+Qi+'" focusable="false"><path d="'+(n.arrowPath||$c)+'" />';return cs(j)}function R(){if(m&&y){var M=e.index,j=u.getPrev(),Q=u.getNext(),ue=j>-1&&M<j?c.last:c.prev,z=Q>-1&&M>Q?c.first:c.next;m.disabled=j<0,y.disabled=Q<0,je(m,nn,ue),je(y,nn,z),a(ws,m,y,j,Q)}}return{arrows:$,mount:w,destroy:k,update:R}}var Tc=Ar+"-interval";function Lc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=_o(n.interval,e.go.bind(e,">"),b),c=d.isPaused,p=t.Elements,u=t.Elements,L=u.root,x=u.toggle,E=n.autoplay,m,y,C=E==="pause";function v(){E&&($(),x&&je(x,Ki,p.track.id),C||w(),k())}function $(){n.pauseOnHover&&s(L,"mouseenter mouseleave",function(U){m=U.type==="mouseenter",A()}),n.pauseOnFocus&&s(L,"focusin focusout",function(U){y=U.type==="focusin",A()}),x&&s(x,"click",function(){C?w():N(!0)}),o([Tn,Mo,Rt],d.rewind),o(Tn,P)}function w(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),y=m=C=!1,k(),a(Wr))}function N(U){U===void 0&&(U=!0),C=!!U,k(),c()||(d.pause(),a(Fr))}function A(){C||(m||y?N(!1):w())}function k(){x&&(bn(x,Xn,!C),je(x,nn,n.i18n[C?"play":"pause"]))}function b(U){var f=p.bar;f&&cn(f,"width",U*100+"%"),a(Cs,U)}function P(U){var f=t.Slides.getAt(U);d.set(f&&+dn(f.slide,Tc)||n.interval)}return{mount:v,destroy:d.cancel,play:w,pause:N,isPaused:c}}function Ec(e,t,n){var i=wt(e),o=i.on;function s(){n.cover&&(o(Nr,dt(d,!0)),o([Nn,Vt,Rt],dt(a,!0)))}function a(c){t.Slides.forEach(function(p){var u=Di(p.container||p.slide,"img");u&&u.src&&d(c,u,p)})}function d(c,p,u){u.style("background",c?'center/cover no-repeat url("'+p.src+'")':"",!0),_i(p,c?"none":"")}return{mount:s,destroy:dt(a,!1)}}var Ic=10,Pc=600,Ac=.6,Rc=1.5,Mc=800;function _c(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Move,c=d.getPosition,p=d.getLimit,u=d.exceededLimit,L=d.translate,x=e.is(gi),E,m,y=1;function C(){o(Tn,N),o([Vt,Rt],A)}function v(b,P,U,f,R){var M=c();if(N(),U&&(!x||!u())){var j=t.Layout.sliderSize(),Q=hr(b)*j*To(qt(b)/j)||0;b=d.toPosition(t.Controller.toDest(b%j))+Q}var ue=us(M,b,1);y=1,P=ue?0:P||Co(qt(b-M)/Rc,Mc),m=f,E=_o(P,$,dt(w,M,b,R),1),a(Bi),s(Mo),E.start()}function $(){a(pi),m&&m(),s(Yn)}function w(b,P,U,f){var R=c(),M=b+(P-b)*k(f),j=(M-R)*y;L(R+j),x&&!U&&u()&&(y*=Ac,qt(j)<Ic&&v(p(u(!0)),Pc,!1,m,!0))}function N(){E&&E.cancel()}function A(){E&&!E.isPaused()&&(N(),$())}function k(b){var P=n.easingFunc;return P?P(b):1-Math.pow(1-b,4)}return{mount:C,destroy:N,scroll:v,cancel:A}}var ai={passive:!1,capture:!0};function kc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=i.unbind,c=e.state,p=t.Move,u=t.Scroll,L=t.Controller,x=t.Elements.track,E=t.Media.reduce,m=t.Direction,y=m.resolve,C=m.orient,v=p.getPosition,$=p.exceededLimit,w,N,A,k,b,P=!1,U,f,R;function M(){a(x,Jo,mr,ai),a(x,Zo,mr,ai),a(x,Os,Q,ai),a(x,"click",_,{capture:!0}),a(x,"dragstart",vn),o([Nn,Vt],j)}function j(){var D=n.drag;le(!D),k=D==="free"}function Q(D){if(U=!1,!f){var te=Te(D);he(D.target)&&(te||!D.button)&&(L.isBusy()?vn(D,!0):(R=te?x:window,b=c.is([xi,Bi]),A=null,a(R,Jo,ue,ai),a(R,Zo,z,ai),p.cancel(),u.cancel(),ee(D)))}}function ue(D){if(c.is(go)||(c.set(go),s(ys)),D.cancelable)if(b){p.translate(w+ye(W(D)));var te=se(D)>pa,O=P!==(P=$());(te||O)&&ee(D),U=!0,s(vs),vn(D)}else J(D)&&(b=F(D),vn(D))}function z(D){c.is(go)&&(c.set(pi),s(bs)),b&&(X(D),vn(D)),d(R,Jo,ue),d(R,Zo,z),b=!1}function _(D){!f&&U&&vn(D,!0)}function ee(D){A=N,N=D,w=v()}function X(D){var te=oe(D),O=re(te),ce=n.rewind&&n.rewindByDrag;E(!1),k?L.scroll(O,0,n.snap):e.is(Gi)?L.go(C(hr(te))<0?ce?"<":"-":ce?">":"+"):e.is(gi)&&P&&ce?L.go($(!0)?">":"<"):L.go(L.toDest(O),!0),E(!0)}function F(D){var te=n.dragMinThreshold,O=Pi(te),ce=O&&te.mouse||0,ke=(O?te.touch:+te)||10;return qt(W(D))>(Te(D)?ke:ce)}function J(D){return qt(W(D))>qt(W(D,!0))}function oe(D){if(e.is(Si)||!P){var te=se(D);if(te&&te<pa)return W(D)/te}return 0}function re(D){return v()+hr(D)*kn(qt(D)*(n.flickPower||600),k?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function W(D,te){return ae(D,te)-ae(h(D),te)}function se(D){return gr(D)-gr(h(D))}function h(D){return N===D&&A||N}function ae(D,te){return(Te(D)?D.changedTouches[0]:D)["page"+y(te?"Y":"X")]}function ye(D){return D/(P&&e.is(gi)?mc:1)}function he(D){var te=n.noDrag;return!Ai(D,"."+ks+", ."+Oo)&&(!te||!Ai(D,te))}function Te(D){return typeof TouchEvent<"u"&&D instanceof TouchEvent}function G(){return b}function le(D){f=D}return{mount:M,disable:le,isDragging:G}}var Wc={Spacebar:" ",Right:Fo,Left:Wo,Up:Es,Down:Is};function zr(e){return e=_n(e)?e:e.key,Wc[e]||e}var ma="keydown";function Fc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.unbind,d=e.root,c=t.Direction.resolve,p,u;function L(){x(),o(Vt,E),o(Vt,x),o(Tn,y)}function x(){var v=n.keyboard;v&&(p=v==="global"?window:d,s(p,ma,C))}function E(){a(p,ma)}function m(v){u=v}function y(){var v=u;u=!0,os(function(){u=v})}function C(v){if(!u){var $=zr(v);$===c(Wo)?e.go("<"):$===c(Fo)&&e.go(">")}}return{mount:L,destroy:E,disable:m}}var Li=Ar+"-lazy",yo=Li+"-srcset",Nc="["+Li+"], ["+yo+"]";function Hc(e,t,n){var i=wt(e),o=i.on,s=i.off,a=i.bind,d=i.emit,c=n.lazyLoad==="sequential",p=[wi,Yn],u=[];function L(){n.lazyLoad&&(x(),o(Rt,x))}function x(){Cn(u),E(),c?v():(s(p),o(p,m),m())}function E(){t.Slides.forEach(function($){Pr($.slide,Nc).forEach(function(w){var N=dn(w,Li),A=dn(w,yo);if(N!==w.src||A!==w.srcset){var k=n.classes.spinner,b=w.parentElement,P=Di(b,"."+k)||ci("span",k,b);u.push([w,$,P]),w.src||_i(w,"none")}})})}function m(){u=u.filter(function($){var w=n.perPage*((n.preloadPages||1)+1)-1;return $[1].isWithin(e.index,w)?y($):!0}),u.length||s(p)}function y($){var w=$[0];gn($[1].slide,br),a(w,"load error",dt(C,$)),je(w,"src",dn(w,Li)),je(w,"srcset",dn(w,yo)),hn(w,Li),hn(w,yo)}function C($,w){var N=$[0],A=$[1];xn(A.slide,br),w.type!=="error"&&(Un($[2]),_i(N,""),d(Nr,N,A),d(mi)),c&&v()}function v(){u.length&&y(u.shift())}return{mount:L,destroy:dt(Cn,u),check:m}}function Oc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Slides,c=t.Elements,p=t.Controller,u=p.hasFocus,L=p.getIndex,x=p.go,E=t.Direction.resolve,m=c.pagination,y=[],C,v;function $(){w(),o([Vt,Rt,Lo],$);var f=n.pagination;m&&_i(m,f?"":"none"),f&&(o([Tn,Mo,Yn],U),N(),U(),s(Ss,{list:C,items:y},P(e.index)))}function w(){C&&(Un(m?Fn(C.children):C),xn(C,v),Cn(y),C=null),i.destroy()}function N(){var f=e.length,R=n.classes,M=n.i18n,j=n.perPage,Q=u()?p.getEnd()+1:ki(f/j);C=m||ci("ul",R.pagination,c.track.parentElement),gn(C,v=Bo+"--"+b()),je(C,wn,"tablist"),je(C,nn,M.select),je(C,Or,b()===No?"vertical":"");for(var ue=0;ue<Q;ue++){var z=ci("li",null,C),_=ci("button",{class:R.page,type:"button"},z),ee=d.getIn(ue).map(function(F){return F.slide.id}),X=!u()&&j>1?M.pageX:M.slideX;a(_,"click",dt(A,ue)),n.paginationKeyboard&&a(_,"keydown",dt(k,ue)),je(z,wn,"presentation"),je(_,wn,"tab"),je(_,Ki,ee.join(" ")),je(_,nn,fr(X,ue+1)),je(_,di,-1),y.push({li:z,button:_,page:ue})}}function A(f){x(">"+f,!0)}function k(f,R){var M=y.length,j=zr(R),Q=b(),ue=-1;j===E(Fo,!1,Q)?ue=++f%M:j===E(Wo,!1,Q)?ue=(--f+M)%M:j==="Home"?ue=0:j==="End"&&(ue=M-1);var z=y[ue];z&&(ls(z.button),x(">"+ue),vn(R,!0))}function b(){return n.paginationDirection||n.direction}function P(f){return y[p.toPage(f)]}function U(){var f=P(L(!0)),R=P(L());if(f){var M=f.button;xn(M,Xn),hn(M,sa),je(M,di,-1)}if(R){var j=R.button;gn(j,Xn),je(j,sa,!0),je(j,di,"")}s($s,{list:C,items:y},f,R)}return{items:y,mount:$,destroy:w,getAt:P,update:U}}var Bc=[" ","Enter"];function jc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),i&&u()}function d(){s.forEach(function(m){m.destroy()}),Cn(s)}function c(){d(),a()}function p(m,y){var C=wt(m);C.on(Tn,function(v,$,w){y.go(y.is(Si)?w:v)}),s.push(C)}function u(){var m=wt(e),y=m.on;y(Mr,x),y(Ts,E),y([Nn,Vt],L),s.push(m),m.emit(kr,e.splides)}function L(){je(t.Elements.list,Or,n.direction===No?"vertical":"")}function x(m){e.go(m.index)}function E(m,y){Er(Bc,zr(y))&&(x(m),vn(y))}return{setup:dt(t.Media.set,{slideFocus:ji(o)?i:o},!0),mount:a,destroy:d,remount:c}}function zc(e,t,n){var i=wt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",d,ai)}function d(p){if(p.cancelable){var u=p.deltaY,L=u<0,x=gr(p),E=n.wheelMinThreshold||0,m=n.wheelSleep||0;qt(u)>E&&x-s>m&&(e.go(L?"<":">"),s=x),c(L)&&vn(p)}}function c(p){return!n.releaseWheel||e.state.is(xi)||t.Controller.getAdjacent(p)!==-1}return{mount:a}}var Vc=90;function Dc(e,t,n){var i=wt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,d=ci("span",lc),c=_o(Vc,dt(u,!1));function p(){a&&(x(!t.Autoplay.isPaused()),je(s,da,!0),d.textContent="…",o(Wr,dt(x,!0)),o(Fr,dt(x,!1)),o([wi,Yn],dt(u,!0)))}function u(E){je(s,ca,E),E?(Vi(s,d),c.start()):(Un(d),c.cancel())}function L(){hn(s,[la,da,ca]),Un(d)}function x(E){a&&je(s,la,E?"off":"polite")}return{mount:p,disable:x,destroy:L}}var qc=Object.freeze({__proto__:null,Media:Ql,Direction:ec,Elements:gc,Slides:fc,Layout:yc,Clones:bc,Move:xc,Controller:wc,Arrows:Cc,Autoplay:Lc,Cover:Ec,Scroll:_c,Drag:kc,Keyboard:Fc,LazyLoad:Hc,Pagination:Oc,Sync:jc,Wheel:zc,Live:Dc}),Kc={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"},Gc={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:uc,i18n:Kc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Uc(e,t,n){var i=t.Slides;function o(){wt(e).on([Nn,Rt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function a(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),os(c)}return{mount:o,start:a,cancel:mr}}function Xc(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,d=dt(cn,a,"transition"),c;function p(){wt(e).bind(a,"transitionend",function(E){E.target===a&&c&&(L(),c())})}function u(E,m){var y=i.toPosition(E,!0),C=i.getPosition(),v=x(E);qt(y-C)>=1&&v>=1?n.useScroll?s.scroll(y,v,!1,m):(d("transform "+v+"ms "+n.easing),i.translate(y,!0),c=m):(i.jump(E),m())}function L(){d(""),s.cancel()}function x(E){var m=n.rewindSpeed;if(e.is(gi)&&m){var y=o.getIndex(!0),C=o.getEnd();if(y===0&&E>=C||y>=C&&E===0)return m}return n.speed}return{mount:p,start:u,cancel:L}}var Yc=(function(){function e(n,i){this.event=wt(),this.Components={},this.state=Jl(li),this.splides=[],this._o={},this._E={};var o=_n(n)?ds(document,n):n;Ti(o,o+" is invalid."),this.root=o,i=Mn({label:dn(o,nn)||"",labelledby:dn(o,Hr)||""},Gc,e.defaults,i||{});try{Mn(i,JSON.parse(dn(o,Ar)))}catch{Ti(!1,"Invalid JSON")}this._o=Object.create(Mn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,d=this.Components;Ti(a.is([li,$o]),"Already mounted!"),a.set(li),this._C=d,this._T=o||this._T||(this.is(Gi)?Uc:Xc),this._E=i||this._E;var c=Mi({},qc,this._E,{Transition:this._T});return Gn(c,function(p,u){var L=p(s,d,s._o);d[u]=L,L.setup&&L.setup()}),Gn(d,function(p){p.mount&&p.mount()}),this.emit(Nn),gn(this.root,cc),a.set(pi),this.emit(yr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(pi)&&(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(Fn(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(Rt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(li)?wt(this).on(yr,this.destroy.bind(this,i)):(Gn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(_r),o.destroy(),i&&Cn(this.splides),s.set($o)),this},Kl(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})(),Vr=Yc;Vr.defaults={};Vr.STATES=Ul;var ga=[[Nn,"onMounted"],[yr,"onReady"],[Tn,"onMove"],[wi,"onMoved"],[Mr,"onClick"],[ms,"onActive"],[gs,"onInactive"],[hs,"onVisible"],[fs,"onHidden"],[Rt,"onRefresh"],[Vt,"onUpdated"],[mi,"onResize"],[Ro,"onResized"],[ys,"onDrag"],[vs,"onDragging"],[bs,"onDragged"],[Mo,"onScroll"],[Yn,"onScrolled"],[_r,"onDestroy"],[xs,"onArrowsMounted"],[ws,"onArrowsUpdated"],[Ss,"onPaginationMounted"],[$s,"onPaginationUpdated"],[kr,"onNavigationMounted"],[Wr,"onAutoplayPlay"],[Cs,"onAutoplayPlaying"],[Fr,"onAutoplayPause"],[Nr,"onLazyLoadLoaded"]];function Dr(...e){return e.filter(Boolean).join(" ")}function Eo(e){return e!==null&&typeof e=="object"}function xr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!xr(n,t[i]));if(Eo(e)&&Eo(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!xr(e[o],t[o]))}return e===t}function Jc(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Zc(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 wr(e,t){const n=e;return Zc(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Eo(i)?n[o]=wr(Eo(n[o])?n[o]:{},i):n[o]=i}),n}var Qc=({children:e,className:t,...n})=>l.createElement("div",{className:Dr("splide__track",t),...n},l.createElement("ul",{className:"splide__list"},e)),qr=class extends l.Component{constructor(){super(...arguments),this.splideRef=l.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Vr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=wr({},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&&!xr(this.options,e)&&(this.splide.options=e,this.options=wr({},e));const t=this.getSlides();Jc(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){ga.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 l.createElement(t,{className:Dr("splide",e),ref:this.splideRef,...this.omit(o,["options",...ga.map(s=>s[1])])},n?l.createElement(Qc,null,i):i)}},Kr=({children:e,className:t,...n})=>l.createElement("li",{className:Dr("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 ed="RichTextRenderer-module__link___BWeZ2",td={link:ed},nd=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))},jo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>nd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Zt(e){const{color:t,...n}=e;return n}function _t(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:jo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(n,t),lineHeight:i!==void 0?E.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const gi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:td.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:id(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 id(e){return{...e.fontFamily&&{fontFamily:jo(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 od="SvgImage-module__svg___q3xE-",rd="SvgImage-module__img___VsTm-",ga={svg:od,img:rd},ad=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},sd=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,ln=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=l.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return l.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(d)}},[]),!ad(e)||!s?r.jsx("img",{src:e,alt:"",className:Je(ga.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Je(ga.svg,i),style:{"--svg":sd(e),"--fill":t,"--hover-fill":n,...o??{}}})},ld={"top-left":Te.topLeftAlignment,"top-center":Te.topCenterAlignment,"top-right":Te.topRightAlignment,"middle-left":Te.middleLeftAlignment,"middle-center":Te.middleCenterAlignment,"middle-right":Te.middleRightAlignment,"bottom-left":Te.bottomLeftAlignment,"bottom-center":Te.bottomCenterAlignment,"bottom-right":Te.bottomRightAlignment};function cd({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=l.useState(null),{widthSettings:a,fontSettings:d,letterSpacing:c,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:w,color:L}=n.imageCaption??{},[m,y]=l.useState(void 0),[C,b]=l.useState(null),[$,S]=l.useState(0),[F,P]=l.useState(0),{direction:k,transition:x,controls:I,pagination:G,imageCaption:f,triggers:R}=e,M=l.useRef(x.type),{x:j,y:Z}=e.controls.offset,ue=V=>{o&&o.go(V)};return l.useEffect(()=>{if(!C)return;const V=new ResizeObserver(_=>{if(!o)return;const[Q]=_;y({width:Math.round(Q.contentRect.width),height:Math.round(Q.contentRect.height)})});return V.observe(C),()=>V.unobserve(C)},[C]),l.useEffect(()=>{!o||M.current===x.type||(P(V=>V+1),M.current=x.type)},[x.type]),r.jsx("div",{className:Je(Te.wrapper,{[Te.editor]:i}),ref:b,children:r.jsxs("div",{className:Te.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:x.backgroundColor&&x.type==="fade in"?x.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Je(Te.captionBlock),children:r.jsx("div",{className:Te.captionTextWrapper,children:t.map((V,_)=>r.jsx("div",{className:Je(Te.captionText,ld[f.alignment],{[Te.withPointerEvents]:_===$&&i,[Te.active]:_===$}),style:{fontFamily:jo(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:a.sizing==="auto"?"max-content":E.scalingValue(a.width,i),letterSpacing:E.scalingValue(c,i),wordSpacing:E.scalingValue(u,i),textAlign:p,fontSize:E.scalingValue(T.fontSize,i),lineHeight:E.scalingValue(T.lineHeight,i),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:L,transitionDuration:x.duration?`${Math.round(parseInt(x.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Te.captionTextInner,style:{"--link-hover-color":f.linkHoverColor,"--link-color":f.linkColor,position:"relative",top:E.scalingValue(f.offset.y,i),left:E.scalingValue(f.offset.x,i)},children:r.jsx(gi,{content:V.imageCaption})})},_))})}),r.jsx(Dr,{onMove:V=>{S(V.index)},ref:s,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:k==="horiz"||x.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:x.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((V,_)=>r.jsx(qr,{children:r.jsx("div",{className:Te.sliderItem,children:r.jsx("div",{className:Te.imgWrapper,children:r.jsx("img",{className:Je(Te.sliderImage,{[Te.contain]:V.image.objectFit==="contain",[Te.cover]:V.image.objectFit==="cover"}),src:V.image.url,alt:V.image.name??""})})})},_))},F),I.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Je(Te.arrow,{[Te.arrowVertical]:k==="vert",[Te.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:r.jsxs("button",{onClick:()=>{ue("-1")},className:Te.arrowInner,style:{transform:`translate(${E.scalingValue(j,i)}, ${E.scalingValue(Z*(k==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&r.jsx(ln,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Je(Te.arrowImg,Te.mirror)}),!I.arrowsImgUrl&&r.jsx(ha,{color:I.color,className:Je(Te.arrowIcon,Te.arrowImg,Te.mirror)})]})}),r.jsx("div",{className:Je(Te.arrow,Te.nextArrow,{[Te.arrowVertical]:k==="vert",[Te.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:r.jsxs("button",{className:Te.arrowInner,onClick:()=>ue("+1"),style:{transform:`translate(${E.scalingValue(j*(k==="horiz"?-1:1),i)}, ${E.scalingValue(Z,i)}) scale(${e.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&r.jsx(ln,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Te.arrowImg}),!I.arrowsImgUrl&&r.jsx(ha,{color:I.color,className:Je(Te.arrowIcon,Te.arrowImg)})]})})]}),R.triggersList.click&&r.jsx("div",{className:Te.clickOverlay,onClick:()=>{o&&o.go("+1")}}),G.isActive&&r.jsx("div",{className:Je(Te.pagination,{[Te.paginationInsideBottom]:G.position==="inside-1"&&k==="horiz",[Te.paginationInsideTop]:G.position==="inside-2"&&k==="horiz",[Te.paginationOutsideBottom]:G.position==="outside-1"&&k==="horiz",[Te.paginationOutsideTop]:G.position==="outside-2"&&k==="horiz",[Te.paginationInsideLeft]:G.position==="inside-1"&&k==="vert",[Te.paginationInsideRight]:G.position==="inside-2"&&k==="vert",[Te.paginationOutsideLeft]:G.position==="outside-1"&&k==="vert",[Te.paginationOutsideRight]:G.position==="outside-2"&&k==="vert",[Te.paginationVertical]:k==="vert"}),children:r.jsx("div",{className:Te.paginationInner,style:{backgroundColor:G.colors[2],transform:`scale(${G.scale/100}) translate(${E.scalingValue(G.offset.x,i)}, ${E.scalingValue(G.offset.y,i)}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:t.map((V,_)=>r.jsx("button",{onClick:()=>{o&&o.go(_)},className:Je(Te.paginationItem),children:r.jsx("div",{className:Je(Te.dot,{[Te.activeDot]:_===$}),style:{backgroundColor:_===$?G.colors[0]:G.colors[1],"--pagination-hover-color":G.hover}})},_))})})]})})}function ha({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 dd={element:cd,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"]}},ud="ImageRevealSlider-module__imageRevealSlider___UE5Ob",pd="ImageRevealSlider-module__image___Qjt-e",md="ImageRevealSlider-module__link___N-iLG",gd="ImageRevealSlider-module__cursor___2U03d",ti={imageRevealSlider:ud,image:pd,link:md,cursor:gd};function fa(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,a=o.naturalHeight/o.naturalWidth*s,d=s/2,c=a/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Zo(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function hd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await Zo(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await Zo(e);s=a.height/a.width*o}else{const a=await Zo(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function fd({settings:e,content:t,isEditor:n}){const[i,o]=l.useState(null),[s,a]=l.useState([]),[d,c]=l.useState(0),p=l.useRef(0),[u,T]=l.useState({x:0,y:0}),[w,L]=l.useState(1),[m,y]=l.useState("none"),C=l.useRef({x:0,y:0}),[b,$]=l.useState(!1),{sizeType:S,imageWidth:F,randomRangeImageWidth:P}=e.imageSize,{revealPosition:k,visible:x}=e.position,{cursorType:I,target:G,defaultCursorScale:f,defaultCursor:R,hoverCursorScale:M,hoverCursor:j}=e.cursor;l.useEffect(()=>{if(!i)return;const V=(U,H)=>{const J=i.getBoundingClientRect(),oe=U-J.left,ie=H-J.top;if(T({x:oe,y:ie}),I==="system"){y("none"),L(1);return}const W=oe,ae=ie,g=document.elementFromPoint(J.left+W,J.top+ae);if(g&&g.closest("a")){y("none"),L(1);return}const te=fa(W,ae,s)||G==="area"?{img:j??"none",scale:M}:{img:R??"none",scale:f};y(te.img),L(te.scale)},_=U=>{U.stopPropagation(),C.current={x:U.clientX,y:U.clientY},V(U.clientX,U.clientY)},Q=()=>{b&&V(C.current.x,C.current.y)};return i.addEventListener("mousemove",_),window.addEventListener("scroll",Q,!0),()=>{i.removeEventListener("mousemove",_),window.removeEventListener("scroll",Q,!0)}},[i,b,u,I,G,j,R,M,f,s]),l.useEffect(()=>{b||(y("none"),L(0))},[b]);const Z=async(V,_,Q,U={})=>{const{width:H,height:J,finalWidth:oe}=await hd(V.image.url,S,F,P);let ie=0,W=0;k==="same"?(ie=_/2,W=Q/2):(ie=U.x??Math.random()*_,W=U.y??Math.random()*Q);const ae=Math.min(Math.max(ie,H/2),_-H/2),g=Math.min(Math.max(W,J/2),Q-J/2);return{id:p.current++,url:V.image.url,link:V.link,name:V.image.name,x:ae,y:g,width:oe}};l.useEffect(()=>{if(!i||t.length===0)return;const V=i.getBoundingClientRect(),_=V.width,Q=V.height,U=[];(async()=>{const J=t[0],oe=await Z(J,_,Q);U.push(oe),a(U),c(1)})()},[S,F,P,k,i]),l.useEffect(()=>{x==="last One"&&a(V=>V.length>0?[V[V.length-1]]:[])},[x]);const ue=async V=>{if(!i)return;const _=i.getBoundingClientRect(),Q=V.clientX-_.left,U=V.clientY-_.top;if(G==="image"&&!fa(Q,U,s))return;let H=0,J=0;k==="on Click"?(H=Q,J=U):k==="same"?(H=_.width/2,J=_.height/2):(H=Math.random()*_.width,J=Math.random()*_.height);const oe=t[d],ie=await Z(oe,_.width,_.height,{x:H,y:J});a(W=>x==="all"?[...W,ie]:[ie]),c(W=>W>=t.length-1?0:W+1)};return r.jsxs("div",{ref:o,onClick:ue,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:ti.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(V=>r.jsx("div",{className:ti.wrapper,style:{top:`${V.y}px`,left:`${V.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:V.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:G==="area"&&V.link?r.jsx("a",{href:V.link,target:"_blank",className:ti.link,children:r.jsx("img",{src:V.url,alt:V.name,className:ti.image},V.id)}):r.jsx("img",{src:V.url,alt:V.name,className:ti.image},V.id)},V.id)),b&&r.jsx("div",{className:ti.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${w})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const yd={element:fd,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:""}]}}}},vd="LightBox-module__hidden___9s-9x",bd="LightBox-module__heroImage___sTxNF",xd="LightBox-module__background___rm9ml",wd="LightBox-module__editor___4ACaY",Sd="LightBox-module__contentStyle___Bgnsq",$d="LightBox-module__imageStyle___tLIlB",Cd="LightBox-module__imgWrapper___LuFUp",Td="LightBox-module__contain___8-yaS",Ld="LightBox-module__cover___hNvOG",Ed="LightBox-module__caption___b6L2I",Id="LightBox-module__captionTextInner___rCGNH",Pd="LightBox-module__lightboxSplide___XFuWC",Rd="LightBox-module__arrow___iz38X",Ad="LightBox-module__arrowVertical___Zfz81",Md="LightBox-module__nextArrow___zkAQN",_d="LightBox-module__arrowInner___p48sW",kd="LightBox-module__arrowIcon___3VaFf",Wd="LightBox-module__arrowImg___pNV88",Fd="LightBox-module__mirror___pjeXc",Nd="LightBox-module__thumbsWrapper___GB-nU",Hd="LightBox-module__thumbsContainerVertical___wttk5",Od="LightBox-module__thumbsContainer___osSma",Bd="LightBox-module__thumbsAlignStart___MO6tY",jd="LightBox-module__thumbsAlignCenter___Q4sUx",zd="LightBox-module__thumbsAlignEnd___p4y9R",Vd="LightBox-module__thumbItem___HvnF3",Dd="LightBox-module__closeButton___g2khP",qd="LightBox-module__fadeIn___0m5GW",Kd="LightBox-module__slideInLeft___gPYwC",Gd="LightBox-module__slideInRight___S-pPp",Ud="LightBox-module__slideInTop___DFdAj",Xd="LightBox-module__slideInBottom___m27kZ",Yd="LightBox-module__fadeOut___55qBR",Jd="LightBox-module__slideOutLeft___NvU7P",Zd="LightBox-module__slideOutRight___SK7eC",Qd="LightBox-module__slideOutTop___Vgg0z",eu="LightBox-module__slideOutBottom___nJ0Ef",tu="LightBox-module__scaleSlide___vZriG",fe={hidden:vd,heroImage:bd,background:xd,editor:wd,contentStyle:Sd,imageStyle:$d,imgWrapper:Cd,contain:Td,cover:Ld,caption:Ed,captionTextInner:Id,lightboxSplide:Pd,arrow:Rd,arrowVertical:Ad,nextArrow:Md,arrowInner:_d,arrowIcon:kd,arrowImg:Wd,mirror:Fd,thumbsWrapper:Nd,thumbsContainerVertical:Hd,thumbsContainer:Od,thumbsAlignStart:Bd,thumbsAlignCenter:jd,thumbsAlignEnd:zd,thumbItem:Vd,closeButton:Dd,fadeIn:qd,slideInLeft:Kd,slideInRight:Gd,slideInTop:Ud,slideInBottom:Xd,fadeOut:Yd,slideOutLeft:Jd,slideOutRight:Zd,slideOutTop:Qd,slideOutBottom:eu,scaleSlide:tu},eo=(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% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:i.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,i};function Os(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 ya(e){const t=e.getBoundingClientRect(),n=Os(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,d=i/o,c=s/a;let p,u;c>d?(p=i,u=i/c):(u=o,p=o*c);const T=t.left+n.left,w=t.top+n.top,L=(i-p)/2+T,m=(o-u)/2+w;return{x:L,y:m,width:p,height:u}}function va(e){const t=e.getBoundingClientRect(),n=Os(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ba(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 nu(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 iu=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[d,c]=l.useState(!1),{url:p}=e.thumbnailBlock.cover;return l.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:p,alt:"Cover",className:fe.heroImage,onClick:()=>c(!0)}),r.jsx(ou,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},ou=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:d})=>{var Fe;const{widthSettings:c,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:w,fontSizeLineHeight:L,textAppearance:m,color:y}=i.imageCaption??{},[C,b]=l.useState(0),[$,S]=l.useState(0),[F,P]=l.useState(!1),[k,x]=l.useState(!1),[I,G]=l.useState({}),f=l.useRef(null),R=l.useRef(null),M=l.useRef(null),j=l.useRef(!1),Z=l.useRef(null),ue=l.useRef(null),V=l.useRef(null),_=l.useRef(null),Q=l.useRef(!1),U=l.useRef(null),[H,J]=l.useState(!1),{appear:oe,triggers:ie,slider:W,thumbnail:ae,controls:g,area:te,caption:ye,layout:me}=o.lightboxBlock,{appearClass:_e,backdropAppearClass:X,backdropDisappearClass:de,disappearClass:K}=nu(oe.type,oe.direction),B=(d==null?void 0:d.itemId)??null;l.useEffect(()=>{const z=()=>{setTimeout(()=>{var v,D;(D=(v=f.current)==null?void 0:v.splide)==null||D.refresh()},16)},q=()=>{S(v=>v+1)};return window.addEventListener("ArticleEditor.Layout:change",z),window.addEventListener("ArticleEditor.ComponentContent:change",q),()=>{window.removeEventListener("ArticleEditor.Layout:change",z),window.removeEventListener("ArticleEditor.ComponentContent:change",q)}},[]),l.useEffect(()=>{if(!e||!ae.isActive){J(!1);return}const z=U.current;if(!z)return;const q=()=>{W.direction==="horiz"?J(z.scrollWidth>z.clientWidth):J(z.scrollHeight>z.clientHeight)};q();const v=new ResizeObserver(q);return v.observe(z),()=>v.disconnect()},[e,ae.isActive,n.length,I,W.direction]);const N=l.useCallback(()=>{const z=window.matchMedia("(max-width: 768px)").matches,q=ba(te.color);z&&!a&&q>.9&&(document.body.style.backgroundColor=""),P(!0),j.current=!0;const v=D=>{D.target===Z.current&&D.animationName&&(Z.current&&ue.current&&Z.current.removeEventListener("animationend",ue.current),ue.current=null,j.current&&(j.current=!1,t()),P(!1))};Z.current&&(ue.current=v,Z.current.addEventListener("animationend",v))},[t,te.color,a]),re=(z,q,v)=>{var D,O;if(z){if(ie.type==="click"&&ie.switch==="image")ie.repeat==="close"&&C===n.length-1?N():(D=f.current)==null||D.go("+1");else if(ie.type==="click"&&ie.switch==="50/50"){const ee=z.getBoundingClientRect(),se=q-ee.left,pe=v-ee.top,Ce=ee.width,we=ee.height;let ve;W.direction==="horiz"?ve=se<Ce/2?"-1":"+1":ve=pe<we/2?"-1":"+1",(O=f.current)==null||O.go(ve)}}},$e=z=>{if(Q.current){Q.current=!1;return}const q=n[C],v=(q==null?void 0:q.image.objectFit)==="cover";let D,O;if("changedTouches"in z&&z.changedTouches.length>0)D=z.changedTouches[0].clientX,O=z.changedTouches[0].clientY;else if("clientX"in z)D=z.clientX,O=z.clientY;else return;let ee;if(v&&M.current){const se=va(M.current);ee=D>=se.left&&D<=se.right&&O>=se.top&&O<=se.bottom}else{const se=M.current?ya(M.current):null;if(!se){z.target===z.currentTarget&&N();return}ee=D>=se.x&&D<=se.x+se.width&&O>=se.y&&O<=se.y+se.height}ee?re(M.current,D,O):N()},Ne=z=>{const q=z.target;(q.classList.contains(fe.thumbsWrapper)||q.classList.contains(fe.thumbsContainer))&&$e(z)};l.useEffect(()=>{if(!e)return;const z=q=>{var v,D;if(q.key==="Escape"){N();return}if(q.key==="ArrowRight"){b(O=>(O+1)%Math.max(n.length,1)),(v=f.current)==null||v.go("+1");return}q.key==="ArrowLeft"&&(b(O=>(O-1+Math.max(n.length,1))%Math.max(n.length,1)),(D=f.current)==null||D.go("-1"))};return window.addEventListener("keydown",z),()=>{window.removeEventListener("keydown",z)}},[e,N,n.length]),l.useEffect(()=>{if(e){if(b(0),S(q=>q+1),j.current=!1,P(!1),x(!1),G({}),!B)return;const z=new CustomEvent("page-overlay",{detail:{itemId:B}});window.dispatchEvent(z)}return()=>{Z.current&&ue.current&&(Z.current.removeEventListener("animationend",ue.current),ue.current=null),x(!1)}},[e,B]),l.useEffect(()=>{R.current!==null&&R.current!==W.type&&S(z=>z+1),R.current=W.type},[W.type]),l.useEffect(()=>{if(!e)return;const z=document.body.style.overflow,q=window.matchMedia("(max-width: 768px)").matches,v=ba(te.color);document.body.style.overflow="hidden",x(!1);const D=ee=>{ee.target===Z.current&&!j.current&&ee.animationName&&(q&&!a&&v>.9&&(document.body.style.backgroundColor=te.color),x(!0),Z.current&&V.current&&Z.current.removeEventListener("animationend",V.current),V.current=null)};Z.current&&(V.current=D,Z.current.addEventListener("animationend",D));const O=ee=>{const se=ee.target;se&&(se.closest(`.${fe.thumbsWrapper}`)||se.closest(`.${fe.thumbsContainer}`))||W.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",O,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",O),Z.current&&V.current&&(Z.current.removeEventListener("animationend",V.current),V.current=null),x(!1)}},[e,a,te.color,W.type]),l.useEffect(()=>{if(!e)return;const z=q=>{var D,O;if(j.current){q.stopPropagation();return}if(Q.current){Q.current=!1;return}const v=q.target;if(!(v&&(v.closest(`.${fe.thumbsContainer}`)||v.closest(`.${fe.thumbItem}`)||v.closest(`.${fe.arrow}`)||v.closest(`.${fe.closeButton}`)||v.closest(`.${fe.caption}`)))){if(W.type==="slide"&&ie.type==="drag"&&((O=(D=f.current)==null?void 0:D.splide)!=null&&O.root)){const ee=f.current.splide.root;if(v&&(ee.contains(v)||ee===v))return}if(q.touches.length===0&&q.changedTouches.length>0){const ee=n[C],se=(ee==null?void 0:ee.image.objectFit)==="cover",pe=q.changedTouches[0];let Ce;if(se&&M.current){const we=va(M.current);Ce=pe.clientX>=we.left&&pe.clientX<=we.right&&pe.clientY>=we.top&&pe.clientY<=we.bottom}else{const we=M.current?ya(M.current):null;if(!we)return;Ce=pe.clientX>=we.x&&pe.clientX<=we.x+we.width&&pe.clientY>=we.y&&pe.clientY<=we.y+we.height}if(!Ce){q.stopPropagation(),j.current=!0;const we=ve=>{ve.stopPropagation(),ve.preventDefault(),document.removeEventListener("click",we,!0)};document.addEventListener("click",we,!0),N()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,N,C,n]);const Ie=(W.type==="scale"||W.type==="fade")&&W.direction==="vert"&&ie.type==="drag";l.useEffect(()=>{var ve,Ge;if(!e||!Ie||!((Ge=(ve=f.current)==null?void 0:ve.splide)!=null&&Ge.root))return;const z=f.current.splide.root,q=30,v=(ge,ke)=>{if(_.current){const ze=Math.abs(ge-_.current.x),Le=Math.abs(ke-_.current.y);(ze>0||Le>0)&&(Q.current=!0)}},D=ge=>{_.current&&(ge.preventDefault(),v(ge.clientX,ge.clientY))},O=ge=>{_.current&&ge.touches.length>0&&(ge.preventDefault(),v(ge.touches[0].clientX,ge.touches[0].clientY))},ee=(ge,ke)=>{if(!_.current||!f.current){_.current=null;return}const ze=Math.abs(ge-_.current.x),Le=Math.abs(ke-_.current.y);Le>q&&Le>ze&&f.current.go(ke<_.current.y?"+1":"-1"),_.current=null},se=ge=>{_.current&&ee(ge.clientX,ge.clientY),document.removeEventListener("pointerup",se),document.removeEventListener("pointercancel",se),document.removeEventListener("pointermove",D)},pe=ge=>{if(_.current){if(ge.changedTouches.length>0){const ke=ge.changedTouches[0];ee(ke.clientX,ke.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",O)}},Ce=ge=>{_.current={x:ge.clientX,y:ge.clientY},Q.current=!1,document.addEventListener("pointermove",D,{passive:!1}),document.addEventListener("pointerup",se),document.addEventListener("pointercancel",se)},we=ge=>{ge.touches.length>0&&(_.current={x:ge.touches[0].clientX,y:ge.touches[0].clientY},Q.current=!1,document.addEventListener("touchmove",O,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return z.addEventListener("pointerdown",Ce),z.addEventListener("touchstart",we),()=>{z.removeEventListener("pointerdown",Ce),z.removeEventListener("touchstart",we),document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",se),document.removeEventListener("pointercancel",se),document.removeEventListener("touchmove",O),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),_.current=null,Q.current=!1}},[e,Ie,$]);const xe={backgroundColor:te.color,backdropFilter:`blur(${te.blur}px)`,animationDuration:`${parseInt(oe.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Oi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:Z,className:Je(fe.background,F?de:X,{[fe.editor]:a},{[fe.hidden]:!e}),style:{...xe,...k&&!a&&!F?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?Z:null,className:Je(fe.contentStyle,F?K:_e,{[fe.editor]:a},{[fe.hidden]:!e}),style:{animationDuration:`${parseInt(oe.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Dr,{onMove:z=>b(z.index),ref:f,className:fe.lightboxSplide,options:{arrows:!1,speed:W.duration?parseInt(W.duration):500,direction:W.direction==="horiz"||W.type==="fade"||W.type==="scale"?"ltr":"ttb",pagination:!1,drag:ie.type==="drag"&&!Ie,perPage:1,width:"100%",height:"100%",type:W.type==="fade"||W.type==="scale"?"fade":"loop",padding:0,rewind:ie.repeat!=="close",start:0},style:{"--splide-speed":W.duration},children:n.map((z,q)=>{const v=eo(me.position,me.offset,a),D=`${E.scalingValue(me.padding.top,a)} ${E.scalingValue(me.padding.right,a)} ${E.scalingValue(me.padding.bottom,a)} ${E.scalingValue(me.padding.left,a)}`,O=W.type==="scale"?(()=>{const{transform:ee,...se}=v;return{...se,position:"absolute",padding:D,boxSizing:"border-box","--position-transform":ee||"none"}})():{...v,position:"absolute",padding:D,boxSizing:"border-box"};return r.jsx(qr,{children:r.jsx("div",{className:fe.imgWrapper,onClick:$e,children:r.jsx("img",{ref:q===C?M:null,className:Je(fe.imageStyle,{[fe.contain]:z.image.objectFit==="contain",[fe.cover]:z.image.objectFit==="cover",[fe.scaleSlide]:W.type==="scale"}),src:z.image.url,alt:z.image.name??"",style:{...O,pointerEvents:z.image.objectFit==="contain"?"none":"auto"}})})},q)})},$),g.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Je(fe.arrow,{[fe.arrowVertical]:W.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:r.jsxs("button",{className:fe.arrowInner,style:{transform:`translate(${E.scalingValue(g.offset.x,a)}, ${E.scalingValue(g.offset.y*(W.direction==="horiz"?1:-1),a)}) scale(${g.scale}) rotate(${W.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=f.current)==null?void 0:z.go("-1")},"aria-label":"Previous",children:[g.arrowsImgUrl&&r.jsx(ln,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:Je(fe.arrowImg,fe.mirror)}),!g.arrowsImgUrl&&r.jsx(xa,{color:g.color,className:Je(fe.arrowIcon,fe.arrowImg,fe.mirror)})]})}),r.jsx("div",{className:Je(fe.arrow,fe.nextArrow,{[fe.arrowVertical]:W.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:r.jsxs("button",{className:fe.arrowInner,style:{transform:`translate(${E.scalingValue(g.offset.x*(W.direction==="horiz"?-1:1),a)}, ${E.scalingValue(g.offset.y,a)}) scale(${g.scale}) rotate(${W.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=f.current)==null?void 0:z.go("+1")},"aria-label":"Next",children:[g.arrowsImgUrl&&r.jsx(ln,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:fe.arrowImg}),!g.arrowsImgUrl&&r.jsx(xa,{color:g.color,className:Je(fe.arrowIcon,fe.arrowImg)})]})})]}),te.closeIconUrl&&(()=>{const z=eo(te.closeIconAlign,te.closeIconOffset,a),q=`scale(${te.closeIconScale})`,v=z.transform?`${z.transform} ${q}`:q;return r.jsx("button",{className:fe.closeButton,style:{...z,transform:v},onClick:N,"aria-label":"Close lightbox",children:r.jsx(ln,{url:te.closeIconUrl,fill:te.closeIconColor??"#000000",hoverFill:te.closeIconHover??"#cccccc"})})})(),ye&&ye.isActive&&i.imageCaption&&((Fe=n[C])==null?void 0:Fe.imageCaption)&&r.jsx("div",{className:fe.caption,style:{...eo(ye.alignment,ye.offset,a),fontFamily:jo(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:c.sizing==="auto"?"max-content":E.scalingValue(c.width,a),letterSpacing:E.scalingValue(u,a),wordSpacing:E.scalingValue(w,a),textAlign:T,fontSize:E.scalingValue(L.fontSize,a),lineHeight:E.scalingValue(L.lineHeight,a),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:y},onClick:z=>z.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:fe.captionTextInner,style:{"--link-color":ye.linkColor,"--link-hover-color":ye.linkHoverColor},children:r.jsx(gi,{content:n[C].imageCaption})})}),ae.isActive&&(()=>{const[z,q]=ae.position.split("-"),v=W.direction==="horiz"?`${z}-left`:ae.position,D=eo(v,ae.offset,a),O=()=>{if(W.direction==="horiz"){if(q==="left")return"flex-start";if(q==="center")return"center";if(q==="right")return"flex-end"}else{if(z==="top")return"flex-start";if(z==="middle")return"center";if(z==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:U,className:fe.thumbsWrapper,onClick:ee=>Ne(ee),style:{position:a?"absolute":"fixed",...D,...W.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Je(fe.thumbsContainer,{[fe.thumbsContainerVertical]:W.direction==="vert",[fe.thumbsAlignStart]:ae.align==="start",[fe.thumbsAlignCenter]:ae.align==="center",[fe.thumbsAlignEnd]:ae.align==="end"}),style:{gap:E.scalingValue(ae.grid.gap,a),justifyContent:H?"flex-start":O()},children:n.map((ee,se)=>{const pe=se===C,Ce=I[se],ve=ae.grid.size*(pe?ae.activeState.scale:1),Ge=()=>{if(ae.fit!=="fit")return{};if(!Ce)return W.direction==="horiz"?{height:E.scalingValue(ve,a)}:{width:E.scalingValue(ve,a)};const ge=Ce.width/Ce.height;if(W.direction==="horiz"){const ke=ve,ze=ke*ge;return{width:E.scalingValue(ze,a),height:E.scalingValue(ke,a)}}else{const ke=ve,ze=ke/ge;return{width:E.scalingValue(ke,a),height:E.scalingValue(ze,a)}}};return r.jsx("button",{className:fe.thumbItem,style:{...W.direction==="horiz"&&ae.fit!=="fit"?{height:E.scalingValue(ve,a)}:{},...W.direction==="vert"&&ae.fit!=="fit"?{width:E.scalingValue(ve,a)}:{},...ae.fit==="cover"?{width:E.scalingValue(ve,a),height:E.scalingValue(ve,a)}:{},...Ge(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:ge=>{var ke;ge.stopPropagation(),b(se),(ke=f.current)==null||ke.go(se)},onMouseEnter:()=>{var ge;ae.triggers==="hov"&&((ge=f.current)==null||ge.go(se))},children:r.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:ge=>{const ke=ge.currentTarget;ke.naturalWidth&&ke.naturalHeight&&G(ze=>({...ze,[se]:{width:ke.naturalWidth,height:ke.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${se}`)})})})})()]})]}),document.getElementById(s))};function xa({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 ru={element:iu,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 to(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function au(e){return`
6
+ */const ed="RichTextRenderer-module__link___BWeZ2",td={link:ed},nd=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))},jo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>nd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function on(e){const{color:t,...n}=e;return n}function Nt(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:jo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:I.scalingValue(e.letterSpacing,t),wordSpacing:I.scalingValue(e.wordSpacing,t),fontSize:I.scalingValue(n,t),lineHeight:i!==void 0?I.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const hi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:td.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:id(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 id(e){return{...e.fontFamily&&{fontFamily:jo(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 od="SvgImage-module__svg___q3xE-",rd="SvgImage-module__img___VsTm-",ha={svg:od,img:rd},ad=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},sd=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,un=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=l.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return l.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(d)}},[]),!ad(e)||!s?r.jsx("img",{src:e,alt:"",className:Xe(ha.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Xe(ha.svg,i),style:{"--svg":sd(e),"--fill":t,"--hover-fill":n,...o??{}}})},ld={"top-left":Ie.topLeftAlignment,"top-center":Ie.topCenterAlignment,"top-right":Ie.topRightAlignment,"middle-left":Ie.middleLeftAlignment,"middle-center":Ie.middleCenterAlignment,"middle-right":Ie.middleRightAlignment,"bottom-left":Ie.bottomLeftAlignment,"bottom-center":Ie.bottomCenterAlignment,"bottom-right":Ie.bottomRightAlignment};function cd({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=l.useState(null),{widthSettings:a,fontSettings:d,letterSpacing:c,textAlign:p,wordSpacing:u,fontSizeLineHeight:L,textAppearance:x,color:E}=n.imageCaption??{},[m,y]=l.useState(void 0),[C,v]=l.useState(null),[$,w]=l.useState(0),[N,A]=l.useState(0),{direction:k,transition:b,controls:P,pagination:U,imageCaption:f,triggers:R}=e,M=l.useRef(b.type),{x:j,y:Q}=e.controls.offset,ue=z=>{o&&o.go(z)};return l.useEffect(()=>{if(!C)return;const z=new ResizeObserver(_=>{if(!o)return;const[ee]=_;y({width:Math.round(ee.contentRect.width),height:Math.round(ee.contentRect.height)})});return z.observe(C),()=>z.unobserve(C)},[C]),l.useEffect(()=>{!o||M.current===b.type||(A(z=>z+1),M.current=b.type)},[b.type]),r.jsx("div",{className:Xe(Ie.wrapper,{[Ie.editor]:i}),ref:v,children:r.jsxs("div",{className:Ie.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Xe(Ie.captionBlock),children:r.jsx("div",{className:Ie.captionTextWrapper,children:t.map((z,_)=>r.jsx("div",{className:Xe(Ie.captionText,ld[f.alignment],{[Ie.withPointerEvents]:_===$&&i,[Ie.active]:_===$}),style:{fontFamily:jo(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:a.sizing==="auto"?"max-content":I.scalingValue(a.width,i),letterSpacing:I.scalingValue(c,i),wordSpacing:I.scalingValue(u,i),textAlign:p,fontSize:I.scalingValue(L.fontSize,i),lineHeight:I.scalingValue(L.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:E,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Ie.captionTextInner,style:{"--link-hover-color":f.linkHoverColor,"--link-color":f.linkColor,position:"relative",top:I.scalingValue(f.offset.y,i),left:I.scalingValue(f.offset.x,i)},children:r.jsx(hi,{content:z.imageCaption})})},_))})}),r.jsx(qr,{onMove:z=>{w(z.index)},ref:s,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:k==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((z,_)=>r.jsx(Kr,{children:r.jsx("div",{className:Ie.sliderItem,children:r.jsx("div",{className:Ie.imgWrapper,children:r.jsx("img",{className:Xe(Ie.sliderImage,{[Ie.contain]:z.image.objectFit==="contain",[Ie.cover]:z.image.objectFit==="cover"}),src:z.image.url,alt:z.image.name??""})})})},_))},N),P.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Xe(Ie.arrow,{[Ie.arrowVertical]:k==="vert",[Ie.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:r.jsxs("button",{onClick:()=>{ue("-1")},className:Ie.arrowInner,style:{transform:`translate(${I.scalingValue(j,i)}, ${I.scalingValue(Q*(k==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&r.jsx(un,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Xe(Ie.arrowImg,Ie.mirror)}),!P.arrowsImgUrl&&r.jsx(fa,{color:P.color,className:Xe(Ie.arrowIcon,Ie.arrowImg,Ie.mirror)})]})}),r.jsx("div",{className:Xe(Ie.arrow,Ie.nextArrow,{[Ie.arrowVertical]:k==="vert",[Ie.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:r.jsxs("button",{className:Ie.arrowInner,onClick:()=>ue("+1"),style:{transform:`translate(${I.scalingValue(j*(k==="horiz"?-1:1),i)}, ${I.scalingValue(Q,i)}) scale(${e.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&r.jsx(un,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Ie.arrowImg}),!P.arrowsImgUrl&&r.jsx(fa,{color:P.color,className:Xe(Ie.arrowIcon,Ie.arrowImg)})]})})]}),R.triggersList.click&&r.jsx("div",{className:Ie.clickOverlay,onClick:()=>{o&&o.go("+1")}}),U.isActive&&r.jsx("div",{className:Xe(Ie.pagination,{[Ie.paginationInsideBottom]:U.position==="inside-1"&&k==="horiz",[Ie.paginationInsideTop]:U.position==="inside-2"&&k==="horiz",[Ie.paginationOutsideBottom]:U.position==="outside-1"&&k==="horiz",[Ie.paginationOutsideTop]:U.position==="outside-2"&&k==="horiz",[Ie.paginationInsideLeft]:U.position==="inside-1"&&k==="vert",[Ie.paginationInsideRight]:U.position==="inside-2"&&k==="vert",[Ie.paginationOutsideLeft]:U.position==="outside-1"&&k==="vert",[Ie.paginationOutsideRight]:U.position==="outside-2"&&k==="vert",[Ie.paginationVertical]:k==="vert"}),children:r.jsx("div",{className:Ie.paginationInner,style:{backgroundColor:U.colors[2],transform:`scale(${U.scale/100}) translate(${I.scalingValue(U.offset.x,i)}, ${I.scalingValue(U.offset.y,i)}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:t.map((z,_)=>r.jsx("button",{onClick:()=>{o&&o.go(_)},className:Xe(Ie.paginationItem),children:r.jsx("div",{className:Xe(Ie.dot,{[Ie.activeDot]:_===$}),style:{backgroundColor:_===$?U.colors[0]:U.colors[1],"--pagination-hover-color":U.hover}})},_))})})]})})}function fa({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 dd={element:cd,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"]}},ud="ImageRevealSlider-module__imageRevealSlider___UE5Ob",pd="ImageRevealSlider-module__image___Qjt-e",md="ImageRevealSlider-module__link___N-iLG",gd="ImageRevealSlider-module__cursor___2U03d",ni={imageRevealSlider:ud,image:pd,link:md,cursor:gd};function ya(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,a=o.naturalHeight/o.naturalWidth*s,d=s/2,c=a/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Qo(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function hd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await Qo(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await Qo(e);s=a.height/a.width*o}else{const a=await Qo(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function fd({settings:e,content:t,isEditor:n}){const[i,o]=l.useState(null),[s,a]=l.useState([]),[d,c]=l.useState(0),p=l.useRef(0),[u,L]=l.useState({x:0,y:0}),[x,E]=l.useState(1),[m,y]=l.useState("none"),C=l.useRef({x:0,y:0}),[v,$]=l.useState(!1),{sizeType:w,imageWidth:N,randomRangeImageWidth:A}=e.imageSize,{revealPosition:k,visible:b}=e.position,{cursorType:P,target:U,defaultCursorScale:f,defaultCursor:R,hoverCursorScale:M,hoverCursor:j}=e.cursor;l.useEffect(()=>{if(!i)return;const z=(X,F)=>{const J=i.getBoundingClientRect(),oe=X-J.left,re=F-J.top;if(L({x:oe,y:re}),P==="system"){y("none"),E(1);return}const W=oe,se=re,h=document.elementFromPoint(J.left+W,J.top+se);if(h&&h.closest("a")){y("none"),E(1);return}const ae=ya(W,se,s)||U==="area"?{img:j??"none",scale:M}:{img:R??"none",scale:f};y(ae.img),E(ae.scale)},_=X=>{X.stopPropagation(),C.current={x:X.clientX,y:X.clientY},z(X.clientX,X.clientY)},ee=()=>{v&&z(C.current.x,C.current.y)};return i.addEventListener("mousemove",_),window.addEventListener("scroll",ee,!0),()=>{i.removeEventListener("mousemove",_),window.removeEventListener("scroll",ee,!0)}},[i,v,u,P,U,j,R,M,f,s]),l.useEffect(()=>{v||(y("none"),E(0))},[v]);const Q=async(z,_,ee,X={})=>{const{width:F,height:J,finalWidth:oe}=await hd(z.image.url,w,N,A);let re=0,W=0;k==="same"?(re=_/2,W=ee/2):(re=X.x??Math.random()*_,W=X.y??Math.random()*ee);const se=Math.min(Math.max(re,F/2),_-F/2),h=Math.min(Math.max(W,J/2),ee-J/2);return{id:p.current++,url:z.image.url,link:z.link,name:z.image.name,x:se,y:h,width:oe}};l.useEffect(()=>{if(!i||t.length===0)return;const z=i.getBoundingClientRect(),_=z.width,ee=z.height,X=[];(async()=>{const J=t[0],oe=await Q(J,_,ee);X.push(oe),a(X),c(1)})()},[w,N,A,k,i]),l.useEffect(()=>{b==="last One"&&a(z=>z.length>0?[z[z.length-1]]:[])},[b]);const ue=async z=>{if(!i)return;const _=i.getBoundingClientRect(),ee=z.clientX-_.left,X=z.clientY-_.top;if(U==="image"&&!ya(ee,X,s))return;let F=0,J=0;k==="on Click"?(F=ee,J=X):k==="same"?(F=_.width/2,J=_.height/2):(F=Math.random()*_.width,J=Math.random()*_.height);const oe=t[d],re=await Q(oe,_.width,_.height,{x:F,y:J});a(W=>b==="all"?[...W,re]:[re]),c(W=>W>=t.length-1?0:W+1)};return r.jsxs("div",{ref:o,onClick:ue,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:ni.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(z=>r.jsx("div",{className:ni.wrapper,style:{top:`${z.y}px`,left:`${z.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:z.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:U==="area"&&z.link?r.jsx("a",{href:z.link,target:"_blank",className:ni.link,children:r.jsx("img",{src:z.url,alt:z.name,className:ni.image},z.id)}):r.jsx("img",{src:z.url,alt:z.name,className:ni.image},z.id)},z.id)),v&&r.jsx("div",{className:ni.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const yd={element:fd,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:""}]}}}},vd="LightBox-module__hidden___9s-9x",bd="LightBox-module__heroImage___sTxNF",xd="LightBox-module__background___rm9ml",wd="LightBox-module__editor___4ACaY",Sd="LightBox-module__contentStyle___Bgnsq",$d="LightBox-module__imageStyle___tLIlB",Cd="LightBox-module__imgWrapper___LuFUp",Td="LightBox-module__contain___8-yaS",Ld="LightBox-module__cover___hNvOG",Ed="LightBox-module__caption___b6L2I",Id="LightBox-module__captionTextInner___rCGNH",Pd="LightBox-module__lightboxSplide___XFuWC",Ad="LightBox-module__arrow___iz38X",Rd="LightBox-module__arrowVertical___Zfz81",Md="LightBox-module__nextArrow___zkAQN",_d="LightBox-module__arrowInner___p48sW",kd="LightBox-module__arrowIcon___3VaFf",Wd="LightBox-module__arrowImg___pNV88",Fd="LightBox-module__mirror___pjeXc",Nd="LightBox-module__thumbsWrapper___GB-nU",Hd="LightBox-module__thumbsContainerVertical___wttk5",Od="LightBox-module__thumbsContainer___osSma",Bd="LightBox-module__thumbsAlignStart___MO6tY",jd="LightBox-module__thumbsAlignCenter___Q4sUx",zd="LightBox-module__thumbsAlignEnd___p4y9R",Vd="LightBox-module__thumbItem___HvnF3",Dd="LightBox-module__closeButton___g2khP",qd="LightBox-module__fadeIn___0m5GW",Kd="LightBox-module__slideInLeft___gPYwC",Gd="LightBox-module__slideInRight___S-pPp",Ud="LightBox-module__slideInTop___DFdAj",Xd="LightBox-module__slideInBottom___m27kZ",Yd="LightBox-module__fadeOut___55qBR",Jd="LightBox-module__slideOutLeft___NvU7P",Zd="LightBox-module__slideOutRight___SK7eC",Qd="LightBox-module__slideOutTop___Vgg0z",eu="LightBox-module__slideOutBottom___nJ0Ef",tu="LightBox-module__scaleSlide___vZriG",fe={hidden:vd,heroImage:bd,background:xd,editor:wd,contentStyle:Sd,imageStyle:$d,imgWrapper:Cd,contain:Td,cover:Ld,caption:Ed,captionTextInner:Id,lightboxSplide:Pd,arrow:Ad,arrowVertical:Rd,nextArrow:Md,arrowInner:_d,arrowIcon:kd,arrowImg:Wd,mirror:Fd,thumbsWrapper:Nd,thumbsContainerVertical:Hd,thumbsContainer:Od,thumbsAlignStart:Bd,thumbsAlignCenter:jd,thumbsAlignEnd:zd,thumbItem:Vd,closeButton:Dd,fadeIn:qd,slideInLeft:Kd,slideInRight:Gd,slideInTop:Ud,slideInBottom:Xd,fadeOut:Yd,slideOutLeft:Jd,slideOutRight:Zd,slideOutTop:Qd,slideOutBottom:eu,scaleSlide:tu},eo=(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% + ${I.scalingValue(t.x,n)}), calc(-50% + ${I.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${I.scalingValue(t.x,n)}, calc(-50% + ${I.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${I.scalingValue(t.x,n)}), ${I.scalingValue(t.y,n)})`:i.transform=`translate(${I.scalingValue(t.x,n)}, ${I.scalingValue(t.y,n)})`,i};function Bs(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 va(e){const t=e.getBoundingClientRect(),n=Bs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,d=i/o,c=s/a;let p,u;c>d?(p=i,u=i/c):(u=o,p=o*c);const L=t.left+n.left,x=t.top+n.top,E=(i-p)/2+L,m=(o-u)/2+x;return{x:E,y:m,width:p,height:u}}function ba(e){const t=e.getBoundingClientRect(),n=Bs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function xa(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 nu(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 iu=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[d,c]=l.useState(!1),{url:p}=e.thumbnailBlock.cover;return l.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:p,alt:"Cover",className:fe.heroImage,onClick:()=>c(!0)}),r.jsx(ou,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},ou=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:d})=>{var Me;const{widthSettings:c,fontSettings:p,letterSpacing:u,textAlign:L,wordSpacing:x,fontSizeLineHeight:E,textAppearance:m,color:y}=i.imageCaption??{},[C,v]=l.useState(0),[$,w]=l.useState(0),[N,A]=l.useState(!1),[k,b]=l.useState(!1),[P,U]=l.useState({}),f=l.useRef(null),R=l.useRef(null),M=l.useRef(null),j=l.useRef(!1),Q=l.useRef(null),ue=l.useRef(null),z=l.useRef(null),_=l.useRef(null),ee=l.useRef(!1),X=l.useRef(null),[F,J]=l.useState(!1),{appear:oe,triggers:re,slider:W,thumbnail:se,controls:h,area:ae,caption:ye,layout:he}=o.lightboxBlock,{appearClass:Te,backdropAppearClass:G,backdropDisappearClass:le,disappearClass:D}=nu(oe.type,oe.direction),te=(d==null?void 0:d.itemId)??null;l.useEffect(()=>{const K=()=>{setTimeout(()=>{var S,B;(B=(S=f.current)==null?void 0:S.splide)==null||B.refresh()},16)},V=()=>{w(S=>S+1)};return window.addEventListener("ArticleEditor.Layout:change",K),window.addEventListener("ArticleEditor.ComponentContent:change",V),()=>{window.removeEventListener("ArticleEditor.Layout:change",K),window.removeEventListener("ArticleEditor.ComponentContent:change",V)}},[]),l.useEffect(()=>{if(!e||!se.isActive){J(!1);return}const K=X.current;if(!K)return;const V=()=>{W.direction==="horiz"?J(K.scrollWidth>K.clientWidth):J(K.scrollHeight>K.clientHeight)};V();const S=new ResizeObserver(V);return S.observe(K),()=>S.disconnect()},[e,se.isActive,n.length,P,W.direction]);const O=l.useCallback(()=>{const K=window.matchMedia("(max-width: 768px)").matches,V=xa(ae.color);K&&!a&&V>.9&&(document.body.style.backgroundColor=""),A(!0),j.current=!0;const S=B=>{B.target===Q.current&&B.animationName&&(Q.current&&ue.current&&Q.current.removeEventListener("animationend",ue.current),ue.current=null,j.current&&(j.current=!1,t()),A(!1))};Q.current&&(ue.current=S,Q.current.addEventListener("animationend",S))},[t,ae.color,a]),ce=(K,V,S)=>{var B,H;if(K){if(re.type==="click"&&re.switch==="image")re.repeat==="close"&&C===n.length-1?O():(B=f.current)==null||B.go("+1");else if(re.type==="click"&&re.switch==="50/50"){const Z=K.getBoundingClientRect(),ne=V-Z.left,me=S-Z.top,we=Z.width,Ce=Z.height;let Se;W.direction==="horiz"?Se=ne<we/2?"-1":"+1":Se=me<Ce/2?"-1":"+1",(H=f.current)==null||H.go(Se)}}},ke=K=>{if(ee.current){ee.current=!1;return}const V=n[C],S=(V==null?void 0:V.image.objectFit)==="cover";let B,H;if("changedTouches"in K&&K.changedTouches.length>0)B=K.changedTouches[0].clientX,H=K.changedTouches[0].clientY;else if("clientX"in K)B=K.clientX,H=K.clientY;else return;let Z;if(S&&M.current){const ne=ba(M.current);Z=B>=ne.left&&B<=ne.right&&H>=ne.top&&H<=ne.bottom}else{const ne=M.current?va(M.current):null;if(!ne){K.target===K.currentTarget&&O();return}Z=B>=ne.x&&B<=ne.x+ne.width&&H>=ne.y&&H<=ne.y+ne.height}Z?ce(M.current,B,H):O()},$e=K=>{const V=K.target;(V.classList.contains(fe.thumbsWrapper)||V.classList.contains(fe.thumbsContainer))&&ke(K)};l.useEffect(()=>{if(!e)return;const K=V=>{var S,B;if(V.key==="Escape"){O();return}if(V.key==="ArrowRight"){v(H=>(H+1)%Math.max(n.length,1)),(S=f.current)==null||S.go("+1");return}V.key==="ArrowLeft"&&(v(H=>(H-1+Math.max(n.length,1))%Math.max(n.length,1)),(B=f.current)==null||B.go("-1"))};return window.addEventListener("keydown",K),()=>{window.removeEventListener("keydown",K)}},[e,O,n.length]),l.useEffect(()=>{if(e){if(v(0),w(V=>V+1),j.current=!1,A(!1),b(!1),U({}),!te)return;const K=new CustomEvent("page-overlay",{detail:{itemId:te}});window.dispatchEvent(K)}return()=>{Q.current&&ue.current&&(Q.current.removeEventListener("animationend",ue.current),ue.current=null),b(!1)}},[e,te]),l.useEffect(()=>{R.current!==null&&R.current!==W.type&&w(K=>K+1),R.current=W.type},[W.type]),l.useEffect(()=>{if(!e)return;const K=document.body.style.overflow,V=window.matchMedia("(max-width: 768px)").matches,S=xa(ae.color);document.body.style.overflow="hidden",b(!1);const B=Z=>{Z.target===Q.current&&!j.current&&Z.animationName&&(V&&!a&&S>.9&&(document.body.style.backgroundColor=ae.color),b(!0),Q.current&&z.current&&Q.current.removeEventListener("animationend",z.current),z.current=null)};Q.current&&(z.current=B,Q.current.addEventListener("animationend",B));const H=Z=>{const ne=Z.target;ne&&(ne.closest(`.${fe.thumbsWrapper}`)||ne.closest(`.${fe.thumbsContainer}`))||W.type!=="slide"&&Z.preventDefault()};return document.addEventListener("touchmove",H,{passive:!1}),()=>{document.body.style.overflow=K,document.removeEventListener("touchmove",H),Q.current&&z.current&&(Q.current.removeEventListener("animationend",z.current),z.current=null),b(!1)}},[e,a,ae.color,W.type]),l.useEffect(()=>{if(!e)return;const K=V=>{var B,H;if(j.current){V.stopPropagation();return}if(ee.current){ee.current=!1;return}const S=V.target;if(!(S&&(S.closest(`.${fe.thumbsContainer}`)||S.closest(`.${fe.thumbItem}`)||S.closest(`.${fe.arrow}`)||S.closest(`.${fe.closeButton}`)||S.closest(`.${fe.caption}`)))){if(W.type==="slide"&&re.type==="drag"&&((H=(B=f.current)==null?void 0:B.splide)!=null&&H.root)){const Z=f.current.splide.root;if(S&&(Z.contains(S)||Z===S))return}if(V.touches.length===0&&V.changedTouches.length>0){const Z=n[C],ne=(Z==null?void 0:Z.image.objectFit)==="cover",me=V.changedTouches[0];let we;if(ne&&M.current){const Ce=ba(M.current);we=me.clientX>=Ce.left&&me.clientX<=Ce.right&&me.clientY>=Ce.top&&me.clientY<=Ce.bottom}else{const Ce=M.current?va(M.current):null;if(!Ce)return;we=me.clientX>=Ce.x&&me.clientX<=Ce.x+Ce.width&&me.clientY>=Ce.y&&me.clientY<=Ce.y+Ce.height}if(!we){V.stopPropagation(),j.current=!0;const Ce=Se=>{Se.stopPropagation(),Se.preventDefault(),document.removeEventListener("click",Ce,!0)};document.addEventListener("click",Ce,!0),O()}}}};return document.addEventListener("touchend",K,{passive:!0}),()=>{document.removeEventListener("touchend",K)}},[e,O,C,n]);const Ee=(W.type==="scale"||W.type==="fade")&&W.direction==="vert"&&re.type==="drag";l.useEffect(()=>{var Se,Ke;if(!e||!Ee||!((Ke=(Se=f.current)==null?void 0:Se.splide)!=null&&Ke.root))return;const K=f.current.splide.root,V=30,S=(ge,We)=>{if(_.current){const Ve=Math.abs(ge-_.current.x),Ge=Math.abs(We-_.current.y);(Ve>0||Ge>0)&&(ee.current=!0)}},B=ge=>{_.current&&(ge.preventDefault(),S(ge.clientX,ge.clientY))},H=ge=>{_.current&&ge.touches.length>0&&(ge.preventDefault(),S(ge.touches[0].clientX,ge.touches[0].clientY))},Z=(ge,We)=>{if(!_.current||!f.current){_.current=null;return}const Ve=Math.abs(ge-_.current.x),Ge=Math.abs(We-_.current.y);Ge>V&&Ge>Ve&&f.current.go(We<_.current.y?"+1":"-1"),_.current=null},ne=ge=>{_.current&&Z(ge.clientX,ge.clientY),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("pointermove",B)},me=ge=>{if(_.current){if(ge.changedTouches.length>0){const We=ge.changedTouches[0];Z(We.clientX,We.clientY)}document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),document.removeEventListener("touchmove",H)}},we=ge=>{_.current={x:ge.clientX,y:ge.clientY},ee.current=!1,document.addEventListener("pointermove",B,{passive:!1}),document.addEventListener("pointerup",ne),document.addEventListener("pointercancel",ne)},Ce=ge=>{ge.touches.length>0&&(_.current={x:ge.touches[0].clientX,y:ge.touches[0].clientY},ee.current=!1,document.addEventListener("touchmove",H,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me))};return K.addEventListener("pointerdown",we),K.addEventListener("touchstart",Ce),()=>{K.removeEventListener("pointerdown",we),K.removeEventListener("touchstart",Ce),document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("touchmove",H),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),_.current=null,ee.current=!1}},[e,Ee,$]);const Le={backgroundColor:ae.color,backdropFilter:`blur(${ae.blur}px)`,animationDuration:`${parseInt(oe.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Oi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:Q,className:Xe(fe.background,N?le:G,{[fe.editor]:a},{[fe.hidden]:!e}),style:{...Le,...k&&!a&&!N?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?Q:null,className:Xe(fe.contentStyle,N?D:Te,{[fe.editor]:a},{[fe.hidden]:!e}),style:{animationDuration:`${parseInt(oe.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(qr,{onMove:K=>v(K.index),ref:f,className:fe.lightboxSplide,options:{arrows:!1,speed:W.duration?parseInt(W.duration):500,direction:W.direction==="horiz"||W.type==="fade"||W.type==="scale"?"ltr":"ttb",pagination:!1,drag:re.type==="drag"&&!Ee,perPage:1,width:"100%",height:"100%",type:W.type==="fade"||W.type==="scale"?"fade":"loop",padding:0,rewind:re.repeat!=="close",start:0},style:{"--splide-speed":W.duration},children:n.map((K,V)=>{const S=eo(he.position,he.offset,a),B=`${I.scalingValue(he.padding.top,a)} ${I.scalingValue(he.padding.right,a)} ${I.scalingValue(he.padding.bottom,a)} ${I.scalingValue(he.padding.left,a)}`,H=W.type==="scale"?(()=>{const{transform:Z,...ne}=S;return{...ne,position:"absolute",padding:B,boxSizing:"border-box","--position-transform":Z||"none"}})():{...S,position:"absolute",padding:B,boxSizing:"border-box"};return r.jsx(Kr,{children:r.jsx("div",{className:fe.imgWrapper,onClick:ke,children:r.jsx("img",{ref:V===C?M:null,className:Xe(fe.imageStyle,{[fe.contain]:K.image.objectFit==="contain",[fe.cover]:K.image.objectFit==="cover",[fe.scaleSlide]:W.type==="scale"}),src:K.image.url,alt:K.image.name??"",style:{...H,pointerEvents:K.image.objectFit==="contain"?"none":"auto"}})})},V)})},$),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Xe(fe.arrow,{[fe.arrowVertical]:W.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:fe.arrowInner,style:{transform:`translate(${I.scalingValue(h.offset.x,a)}, ${I.scalingValue(h.offset.y*(W.direction==="horiz"?1:-1),a)}) scale(${h.scale}) rotate(${W.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var K;return(K=f.current)==null?void 0:K.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(un,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Xe(fe.arrowImg,fe.mirror)}),!h.arrowsImgUrl&&r.jsx(wa,{color:h.color,className:Xe(fe.arrowIcon,fe.arrowImg,fe.mirror)})]})}),r.jsx("div",{className:Xe(fe.arrow,fe.nextArrow,{[fe.arrowVertical]:W.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:fe.arrowInner,style:{transform:`translate(${I.scalingValue(h.offset.x*(W.direction==="horiz"?-1:1),a)}, ${I.scalingValue(h.offset.y,a)}) scale(${h.scale}) rotate(${W.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var K;return(K=f.current)==null?void 0:K.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(un,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:fe.arrowImg}),!h.arrowsImgUrl&&r.jsx(wa,{color:h.color,className:Xe(fe.arrowIcon,fe.arrowImg)})]})})]}),ae.closeIconUrl&&(()=>{const K=eo(ae.closeIconAlign,ae.closeIconOffset,a),V=`scale(${ae.closeIconScale})`,S=K.transform?`${K.transform} ${V}`:V;return r.jsx("button",{className:fe.closeButton,style:{...K,transform:S},onClick:O,"aria-label":"Close lightbox",children:r.jsx(un,{url:ae.closeIconUrl,fill:ae.closeIconColor??"#000000",hoverFill:ae.closeIconHover??"#cccccc"})})})(),ye&&ye.isActive&&i.imageCaption&&((Me=n[C])==null?void 0:Me.imageCaption)&&r.jsx("div",{className:fe.caption,style:{...eo(ye.alignment,ye.offset,a),fontFamily:jo(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:c.sizing==="auto"?"max-content":I.scalingValue(c.width,a),letterSpacing:I.scalingValue(u,a),wordSpacing:I.scalingValue(x,a),textAlign:L,fontSize:I.scalingValue(E.fontSize,a),lineHeight:I.scalingValue(E.lineHeight,a),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:y},onClick:K=>K.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:fe.captionTextInner,style:{"--link-color":ye.linkColor,"--link-hover-color":ye.linkHoverColor},children:r.jsx(hi,{content:n[C].imageCaption})})}),se.isActive&&(()=>{const[K,V]=se.position.split("-"),S=W.direction==="horiz"?`${K}-left`:se.position,B=eo(S,se.offset,a),H=()=>{if(W.direction==="horiz"){if(V==="left")return"flex-start";if(V==="center")return"center";if(V==="right")return"flex-end"}else{if(K==="top")return"flex-start";if(K==="middle")return"center";if(K==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:X,className:fe.thumbsWrapper,onClick:Z=>$e(Z),style:{position:a?"absolute":"fixed",...B,...W.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Xe(fe.thumbsContainer,{[fe.thumbsContainerVertical]:W.direction==="vert",[fe.thumbsAlignStart]:se.align==="start",[fe.thumbsAlignCenter]:se.align==="center",[fe.thumbsAlignEnd]:se.align==="end"}),style:{gap:I.scalingValue(se.grid.gap,a),justifyContent:F?"flex-start":H()},children:n.map((Z,ne)=>{const me=ne===C,we=P[ne],Se=se.grid.size*(me?se.activeState.scale:1),Ke=()=>{if(se.fit!=="fit")return{};if(!we)return W.direction==="horiz"?{height:I.scalingValue(Se,a)}:{width:I.scalingValue(Se,a)};const ge=we.width/we.height;if(W.direction==="horiz"){const We=Se,Ve=We*ge;return{width:I.scalingValue(Ve,a),height:I.scalingValue(We,a)}}else{const We=Se,Ve=We/ge;return{width:I.scalingValue(We,a),height:I.scalingValue(Ve,a)}}};return r.jsx("button",{className:fe.thumbItem,style:{...W.direction==="horiz"&&se.fit!=="fit"?{height:I.scalingValue(Se,a)}:{},...W.direction==="vert"&&se.fit!=="fit"?{width:I.scalingValue(Se,a)}:{},...se.fit==="cover"?{width:I.scalingValue(Se,a),height:I.scalingValue(Se,a)}:{},...Ke(),transition:me?"all 0.25s ease-out":"none",opacity:me?se.activeState.opacity/100:se.opacity/100,"--thumb-hover":se.activeState.opacity/100},onClick:ge=>{var We;ge.stopPropagation(),v(ne),(We=f.current)==null||We.go(ne)},onMouseEnter:()=>{var ge;se.triggers==="hov"&&((ge=f.current)==null||ge.go(ne))},children:r.jsx("img",{src:Z.image.url,alt:Z.image.name??"",onLoad:ge=>{const We=ge.currentTarget;We.naturalWidth&&We.naturalHeight&&U(Ve=>({...Ve,[ne]:{width:We.naturalWidth,height:We.naturalHeight}}))},style:{objectFit:se.fit==="cover"?"cover":"contain",...se.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...se.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Z.image.name}-${ne}`)})})})})()]})]}),document.getElementById(s))};function wa({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 ru={element:iu,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 to(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function au(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 su({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,d=i&&t||!t,{prefix:c}=E.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:T=[],buttonLabel:w,gap:L,fieldsGap:m,buttonCorners:y,buttonStroke:C,buttonPadding:b,isButtonFullWidth:$,inputCorners:S,inputStroke:F,inputPadding:P,inputColor:k,inputTextColor:x,inputBorderColor:I,placeholderColor:G,buttonColor:f,buttonTextColor:R,buttonBorderColor:M,labelTextColor:j,successColor:Z,errorColor:ue,fontFamily:V,inputFontSettings:_,inputFontSize:Q,inputLineHeight:U,inputLetterSpacing:H,inputWordSpacing:J,inputTextAppearance:oe,buttonFontSettings:ie,buttonFontSize:W,buttonLineHeight:ae,buttonLetterSpacing:g,buttonWordSpacing:te,buttonTextAppearance:ye,labelFontSettings:me,labelFontSize:_e,labelLineHeight:X,labelLetterSpacing:de,labelWordSpacing:K,labelTextAppearance:B,statusFontSettings:N,statusFontSize:re,statusLineHeight:$e,statusLetterSpacing:Ne,statusWordSpacing:Ie,statusTextAppearance:xe,successMessage:Fe,errorMessage:z,stateOverrides:q}=e,v=p==="B",D=T.slice(0,Math.min(u,T.length)),O={fontSettings:{fontFamily:V,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:U,letterSpacing:H??0,wordSpacing:J??0,textAppearance:oe,color:x},ee=Zt(_t(O,t)),se=E.scalingValue(F??0,t),pe=E.scalingValue((U??Q??.01)+((P==null?void 0:P.top)??0)+((P==null?void 0:P.bottom)??0)+(p==="C"?F??0:(F??0)*2),t),Ce={...ee,borderStyle:"solid",borderRadius:p==="C"?0:E.scalingValue(S??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:se,borderLeftWidth:0}:{borderWidth:se},paddingTop:E.scalingValue((P==null?void 0:P.top)??0,t),paddingRight:E.scalingValue((P==null?void 0:P.right)??0,t),paddingBottom:E.scalingValue((P==null?void 0:P.bottom)??0,t),paddingLeft:E.scalingValue((P==null?void 0:P.left)??0,t),height:pe,minHeight:pe},we={fontSettings:{fontFamily:V,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:W??.01,lineHeight:ae,letterSpacing:g??0,wordSpacing:te??0,textAppearance:ye,color:R},ve=Zt(_t(we,t)),Ge=E.scalingValue(C??0,t),ge={fontSettings:{fontFamily:V,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:_e??.01,lineHeight:X,letterSpacing:de??0,wordSpacing:K??0,textAppearance:B,color:j},ke=_t(ge,t),ze={fontSettings:{fontFamily:V,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:re??.01,lineHeight:$e,letterSpacing:Ne??0,wordSpacing:Ie??0,textAppearance:xe,color:Z},Le=Zt(_t(ze,t)),ot=E.buildColorVars(c,{inputColor:k,inputTextColor:x,inputBorderColor:I,placeholderColor:G!=null&&G.trim()?G:"#cccccc",buttonColor:f,buttonTextColor:R,buttonBorderColor:M,labelTextColor:j,successColor:Z,errorColor:ue},lu,cu,q),[tt,yt]=l.useState(()=>Object.fromEntries(D.map(Oe=>[Oe.name,""]))),[Ke,st]=l.useState("idle"),[Ct,It]=l.useState(null),Rt=s==="success"?"success":s==="error"?"error":Ke,Se=s==="error"?z:Ct,He=s==="filled",Xe=l.useMemo(()=>{if(!He)return tt;let Oe=null;for(const Tt of D)(tt[Tt.name]??"").trim().length>0||(Oe=Oe??{...tt},Oe[Tt.name]="Filled");return Oe??tt},[tt,He,D]),Ue=Rt==="error"?E.getFormFieldValidationError(D,Xe):null,Ot=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Ht=o==null?void 0:o.submitUrl,zt=(Oe,Tt)=>{yt(lt=>({...lt,[Oe]:Tt}))},dn=async Oe=>{if(Oe.preventDefault(),!d)return;const Tt=Object.fromEntries(D.map(et=>{var gt;return[et.name,((gt=tt[et.name])==null?void 0:gt.trim())??""]}).filter(([,et])=>et));if(!Ht){st("error"),It("No integrations were found for this form.");return}if(Object.keys(Tt).length===0)return;const lt=E.getFormFieldValidationError(D,tt);if(lt){st("error"),It(lt);return}st("submitting"),It(null);try{const et=await fetch(Ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Tt)});if(!et.ok){const gt=await et.text();throw new Error(gt||`Request failed: ${et.status}`)}st("success"),yt(Object.fromEntries(D.map(gt=>[gt.name,""])))}catch(et){st("error"),It(et instanceof Error?et.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${p} ${Ot}`.trim(),style:ot,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:au(c)}}),r.jsxs("form",{onSubmit:dn,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:D.map((Oe,Tt)=>r.jsxs(l.Fragment,{children:[Tt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${c}-control`:void 0,style:{height:E.scalingValue(m??0,t)}}),r.jsxs("div",{className:`${c}-field-group${v?` ${c}-labeled`:""}`,children:[v&&r.jsx("span",{className:`${c}-field-label`,style:ke?{...ke,lineHeight:ke.fontSize}:void 0,children:Oe.label||Oe.name}),Oe.type==="textarea"?r.jsx("textarea",{name:Oe.name,autoComplete:"off",value:Xe[Oe.name]??"",onChange:lt=>zt(Oe.name,lt.target.value),placeholder:Oe.placeholder,className:`${c}-input`,style:Ce,rows:1,"data-filled":He||(Xe[Oe.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Oe.type==="phone"?"tel":Oe.type==="email"?"email":"text",name:Oe.name,autoComplete:"off",value:Xe[Oe.name]??"",onChange:lt=>zt(Oe.name,lt.target.value),placeholder:Oe.placeholder,required:Oe.isRequired??Oe.type==="email",className:`${c}-input`,style:Ce,"data-filled":He||(Xe[Oe.name]??"").trim().length>0})]})]},Tt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${c}-control`:void 0,style:{height:E.scalingValue(L??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(y??0,t),borderWidth:Ge,paddingTop:E.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:E.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:E.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:E.scalingValue((b==null?void 0:b.left)??0,t),pointerEvents:d?"auto":void 0,...ve,...$?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:$?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Ke==="submitting"?"...":w})})})]}),Rt==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Le},children:Fe}),Rt==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Le},role:"alert",children:Ue??Se??z})]})}const lu={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"},cu=["hover","focus","filled","success","error"],du=`import React, { useMemo, useState } from 'react';
158
+ `}function su({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,d=i&&t||!t,{prefix:c}=I.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:L=[],buttonLabel:x,gap:E,fieldsGap:m,buttonCorners:y,buttonStroke:C,buttonPadding:v,isButtonFullWidth:$,inputCorners:w,inputStroke:N,inputPadding:A,inputColor:k,inputTextColor:b,inputBorderColor:P,placeholderColor:U,buttonColor:f,buttonTextColor:R,buttonBorderColor:M,labelTextColor:j,successColor:Q,errorColor:ue,fontFamily:z,inputFontSettings:_,inputFontSize:ee,inputLineHeight:X,inputLetterSpacing:F,inputWordSpacing:J,inputTextAppearance:oe,buttonFontSettings:re,buttonFontSize:W,buttonLineHeight:se,buttonLetterSpacing:h,buttonWordSpacing:ae,buttonTextAppearance:ye,labelFontSettings:he,labelFontSize:Te,labelLineHeight:G,labelLetterSpacing:le,labelWordSpacing:D,labelTextAppearance:te,statusFontSettings:O,statusFontSize:ce,statusLineHeight:ke,statusLetterSpacing:$e,statusWordSpacing:Ee,statusTextAppearance:Le,successMessage:Me,errorMessage:K,stateOverrides:V}=e,S=p==="B",B=L.slice(0,Math.min(u,L.length)),H={fontSettings:{fontFamily:z,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:X,letterSpacing:F??0,wordSpacing:J??0,textAppearance:oe,color:b},Z=on(Nt(H,t)),ne=I.scalingValue(N??0,t),me=I.scalingValue((X??ee??.01)+((A==null?void 0:A.top)??0)+((A==null?void 0:A.bottom)??0)+(p==="C"?N??0:(N??0)*2),t),we={...Z,borderStyle:"solid",borderRadius:p==="C"?0:I.scalingValue(w??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ne,borderLeftWidth:0}:{borderWidth:ne},paddingTop:I.scalingValue((A==null?void 0:A.top)??0,t),paddingRight:I.scalingValue((A==null?void 0:A.right)??0,t),paddingBottom:I.scalingValue((A==null?void 0:A.bottom)??0,t),paddingLeft:I.scalingValue((A==null?void 0:A.left)??0,t),height:me,minHeight:me},Ce={fontSettings:{fontFamily:z,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:W??.01,lineHeight:se,letterSpacing:h??0,wordSpacing:ae??0,textAppearance:ye,color:R},Se=on(Nt(Ce,t)),Ke=I.scalingValue(C??0,t),ge={fontSettings:{fontFamily:z,fontWeight:(he==null?void 0:he.fontWeight)??400,fontStyle:(he==null?void 0:he.fontStyle)??"normal"},fontSize:Te??.01,lineHeight:G,letterSpacing:le??0,wordSpacing:D??0,textAppearance:te,color:j},We=Nt(ge,t),Ve={fontSettings:{fontFamily:z,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:ke,letterSpacing:$e??0,wordSpacing:Ee??0,textAppearance:Le,color:Q},Ge=on(Nt(Ve,t)),rt=I.buildColorVars(c,{inputColor:k,inputTextColor:b,inputBorderColor:P,placeholderColor:U!=null&&U.trim()?U:"#cccccc",buttonColor:f,buttonTextColor:R,buttonBorderColor:M,labelTextColor:j,successColor:Q,errorColor:ue},lu,cu,V),[It,Mt]=l.useState(()=>Object.fromEntries(B.map(He=>[He.name,""]))),[Oe,ft]=l.useState("idle"),[ut,St]=l.useState(null),_t=s==="success"?"success":s==="error"?"error":Oe,be=s==="error"?K:ut,De=s==="filled",Ye=l.useMemo(()=>{if(!De)return It;let He=null;for(const Pt of B)(It[Pt.name]??"").trim().length>0||(He=He??{...It},He[Pt.name]="Filled");return He??It},[It,De,B]),Qe=_t==="error"?I.getFormFieldValidationError(B,Ye):null,$t=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),vt=o==null?void 0:o.submitUrl,kt=(He,Pt)=>{Mt(yt=>({...yt,[He]:Pt}))},Wt=async He=>{if(He.preventDefault(),!d)return;const Pt=Object.fromEntries(B.map(nt=>{var bt;return[nt.name,((bt=It[nt.name])==null?void 0:bt.trim())??""]}).filter(([,nt])=>nt));if(!vt){ft("error"),St("No integrations were found for this form.");return}if(Object.keys(Pt).length===0)return;const yt=I.getFormFieldValidationError(B,It);if(yt){ft("error"),St(yt);return}ft("submitting"),St(null);try{const nt=await fetch(vt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Pt)});if(!nt.ok){const bt=await nt.text();throw new Error(bt||`Request failed: ${nt.status}`)}ft("success"),Mt(Object.fromEntries(B.map(bt=>[bt.name,""])))}catch(nt){ft("error"),St(nt instanceof Error?nt.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${p} ${$t}`.trim(),style:rt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:au(c)}}),r.jsxs("form",{onSubmit:Wt,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:B.map((He,Pt)=>r.jsxs(l.Fragment,{children:[Pt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${c}-control`:void 0,style:{height:I.scalingValue(m??0,t)}}),r.jsxs("div",{className:`${c}-field-group${S?` ${c}-labeled`:""}`,children:[S&&r.jsx("span",{className:`${c}-field-label`,style:We?{...We,lineHeight:We.fontSize}:void 0,children:He.label||He.name}),He.type==="textarea"?r.jsx("textarea",{name:He.name,autoComplete:"off",value:Ye[He.name]??"",onChange:yt=>kt(He.name,yt.target.value),placeholder:He.placeholder,className:`${c}-input`,style:we,rows:1,"data-filled":De||(Ye[He.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:He.type==="phone"?"tel":He.type==="email"?"email":"text",name:He.name,autoComplete:"off",value:Ye[He.name]??"",onChange:yt=>kt(He.name,yt.target.value),placeholder:He.placeholder,required:He.isRequired??He.type==="email",className:`${c}-input`,style:we,"data-filled":De||(Ye[He.name]??"").trim().length>0})]})]},Pt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${c}-control`:void 0,style:{height:I.scalingValue(E??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:I.scalingValue(y??0,t),borderWidth:Ke,paddingTop:I.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:I.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:I.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:I.scalingValue((v==null?void 0:v.left)??0,t),pointerEvents:d?"auto":void 0,...Se,...$?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:$?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Oe==="submitting"?"...":x})})})]}),_t==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Ge},children:Me}),_t==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Ge},role:"alert",children:Qe??be??K})]})}const lu={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"},cu=["hover","focus","filled","success","error"],du=`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: ${io(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const fu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=E.useScopedStyles(),a=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:p,fieldsToShow:u=1,fontFamily:T,inputFontSettings:w,inputFontSize:L,inputLineHeight:m,inputLetterSpacing:y,inputWordSpacing:C,inputTextAppearance:b,buttonFontSettings:$,buttonFontSize:S,buttonLineHeight:F,buttonLetterSpacing:P,buttonWordSpacing:k,buttonTextAppearance:x,statusFontSettings:I,statusFontSize:G,statusLineHeight:f,statusLetterSpacing:R,statusWordSpacing:M,statusTextAppearance:j,iconMaxWidth:Z,minHeight:ue,corners:V,stroke:_,stateOverrides:Q,inputPadding:U,buttonPadding:H,successMessage:J="Thanks for subscribing!",errorMessage:oe="Please, fill all required fields."}=e,ie=d.slice(0,Math.min(u,d.length)),[W,ae]=l.useState(()=>Object.fromEntries(ie.map(ge=>[ge.name,""]))),[g,te]=l.useState("idle"),[ye,me]=l.useState(null),_e=o==="success"?"success":o==="error"?"error":g,X=o==="error"?oe:ye,de=o==="filled",K=l.useMemo(()=>{if(!de)return W;let ge=null;for(const ke of ie)(W[ke.name]??"").trim().length>0||(ge=ge??{...W},ge[ke.name]="Filled");return ge??W},[de,W,ie]),B=_e==="error"?E.getFormFieldValidationError(ie,K):null,N=o&&o!=="default"?`${s}-state-${o}`:"",re=ie.some(ge=>(K[ge.name]??"").trim().length>0),$e=N!==`${s}-state-filled`&&re?`${s}-state-filled`:"",Ne=`${N} ${$e}`.trim(),Ie=i==null?void 0:i.submitUrl,xe=p??"",Fe=(c==null?void 0:c.icon)??"",z=(c==null?void 0:c.mode)==="On",q=xe||"Submit",v={fontSettings:{fontFamily:T,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:L??.01,lineHeight:m,letterSpacing:y??0,wordSpacing:C??0,textAppearance:b,color:e.inputTextColor??"#111111"},D={fontSettings:{fontFamily:T,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:S??.01,lineHeight:F,letterSpacing:P??0,wordSpacing:k??0,textAppearance:x,color:e.buttonTextColor??"#ffffff"},O={fontSettings:{fontFamily:T,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:G??.01,lineHeight:f,letterSpacing:R??0,wordSpacing:M??0,textAppearance:j,color:e.successColor??"#22c55e"},ee=Zt(_t(v,t)),se=Zt(_t(D,t)),pe=Zt(_t(O,t)),Ce=E.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(v==null?void 0:v.color)??"#111111",buttonTextColor:e.buttonTextColor??(D==null?void 0:D.color)??"#ffffff"},yu,vu,Q),we={borderRadius:E.scalingValue(V,t),borderWidth:E.scalingValue(_,t),borderStyle:"solid"},ve={borderLeftWidth:E.scalingValue(_,t)},Ge=async ge=>{if(ge.preventDefault(),!a)return;const ke=Object.fromEntries(ie.map(Le=>{var ot;return[Le.name,((ot=W[Le.name])==null?void 0:ot.trim())??""]}).filter(([,Le])=>Le));if(!Ie){te("error"),me("No integrations were found for this form.");return}if(Object.keys(ke).length===0)return;const ze=E.getFormFieldValidationError(ie,W);if(ze){te("error"),me(ze);return}te("submitting"),me(null);try{const Le=await fetch(Ie,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!Le.ok){const ot=await Le.text();throw new Error(ot||`Request failed: ${Le.status}`)}te("success"),ae(Object.fromEntries(ie.map(ot=>[ot.name,""])))}catch(Le){te("error"),me(Le instanceof Error?Le.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Ne}`.trim(),style:Ce,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:hu(s)}}),r.jsxs("form",{onSubmit:Ge,className:`${s}-form`,style:{...we,height:E.scalingValue(ue,t),minHeight:E.scalingValue(ue,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:ie.map(ge=>r.jsx("input",{type:ge.type==="email"?"email":ge.type==="phone"?"tel":"text",name:ge.name,autoComplete:"off",value:K[ge.name]??"",onChange:ke=>ae(ze=>({...ze,[ge.name]:ke.target.value})),placeholder:ge.placeholder,required:ge.isRequired??ge.type==="email",className:`${s}-input`,style:{...ee,paddingRight:E.scalingValue(U.right,t),paddingLeft:E.scalingValue(U.left,t),paddingTop:E.scalingValue(U.top,t),paddingBottom:E.scalingValue(U.bottom,t)}},ge.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":q,style:{...se,...ve,paddingRight:E.scalingValue(H.right,t),paddingLeft:E.scalingValue(H.left,t),paddingTop:E.scalingValue(H.top,t),paddingBottom:E.scalingValue(H.bottom,t),pointerEvents:a?"auto":void 0},children:g==="submitting"?"...":z?Fe&&r.jsx(ln,{url:Fe,className:`${s}-submitBtnIcon`,style:{maxWidth:E.scalingValue(Z??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):xe})})]}),_e==="success"&&r.jsx("p",{className:`${s}-success`,style:{...pe},children:J}),_e==="error"&&r.jsx("p",{className:`${s}-error`,style:{...pe},role:"alert",children:B??X??oe})]})},yu={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"},vu=["hover","focus","filled","success","error"],bu=`import React, { useMemo, useState } from 'react';
983
+ `}const fu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=I.useScopedStyles(),a=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:p,fieldsToShow:u=1,fontFamily:L,inputFontSettings:x,inputFontSize:E,inputLineHeight:m,inputLetterSpacing:y,inputWordSpacing:C,inputTextAppearance:v,buttonFontSettings:$,buttonFontSize:w,buttonLineHeight:N,buttonLetterSpacing:A,buttonWordSpacing:k,buttonTextAppearance:b,statusFontSettings:P,statusFontSize:U,statusLineHeight:f,statusLetterSpacing:R,statusWordSpacing:M,statusTextAppearance:j,iconMaxWidth:Q,minHeight:ue,corners:z,stroke:_,stateOverrides:ee,inputPadding:X,buttonPadding:F,successMessage:J="Thanks for subscribing!",errorMessage:oe="Please, fill all required fields."}=e,re=d.slice(0,Math.min(u,d.length)),[W,se]=l.useState(()=>Object.fromEntries(re.map(ge=>[ge.name,""]))),[h,ae]=l.useState("idle"),[ye,he]=l.useState(null),Te=o==="success"?"success":o==="error"?"error":h,G=o==="error"?oe:ye,le=o==="filled",D=l.useMemo(()=>{if(!le)return W;let ge=null;for(const We of re)(W[We.name]??"").trim().length>0||(ge=ge??{...W},ge[We.name]="Filled");return ge??W},[le,W,re]),te=Te==="error"?I.getFormFieldValidationError(re,D):null,O=o&&o!=="default"?`${s}-state-${o}`:"",ce=re.some(ge=>(D[ge.name]??"").trim().length>0),ke=O!==`${s}-state-filled`&&ce?`${s}-state-filled`:"",$e=`${O} ${ke}`.trim(),Ee=i==null?void 0:i.submitUrl,Le=p??"",Me=(c==null?void 0:c.icon)??"",K=(c==null?void 0:c.mode)==="On",V=Le||"Submit",S={fontSettings:{fontFamily:L,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:E??.01,lineHeight:m,letterSpacing:y??0,wordSpacing:C??0,textAppearance:v,color:e.inputTextColor??"#111111"},B={fontSettings:{fontFamily:L,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:w??.01,lineHeight:N,letterSpacing:A??0,wordSpacing:k??0,textAppearance:b,color:e.buttonTextColor??"#ffffff"},H={fontSettings:{fontFamily:L,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:U??.01,lineHeight:f,letterSpacing:R??0,wordSpacing:M??0,textAppearance:j,color:e.successColor??"#22c55e"},Z=on(Nt(S,t)),ne=on(Nt(B,t)),me=on(Nt(H,t)),we=I.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(S==null?void 0:S.color)??"#111111",buttonTextColor:e.buttonTextColor??(B==null?void 0:B.color)??"#ffffff"},yu,vu,ee),Ce={borderRadius:I.scalingValue(z,t),borderWidth:I.scalingValue(_,t),borderStyle:"solid"},Se={borderLeftWidth:I.scalingValue(_,t)},Ke=async ge=>{if(ge.preventDefault(),!a)return;const We=Object.fromEntries(re.map(Ge=>{var rt;return[Ge.name,((rt=W[Ge.name])==null?void 0:rt.trim())??""]}).filter(([,Ge])=>Ge));if(!Ee){ae("error"),he("No integrations were found for this form.");return}if(Object.keys(We).length===0)return;const Ve=I.getFormFieldValidationError(re,W);if(Ve){ae("error"),he(Ve);return}ae("submitting"),he(null);try{const Ge=await fetch(Ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(We)});if(!Ge.ok){const rt=await Ge.text();throw new Error(rt||`Request failed: ${Ge.status}`)}ae("success"),se(Object.fromEntries(re.map(rt=>[rt.name,""])))}catch(Ge){ae("error"),he(Ge instanceof Error?Ge.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${$e}`.trim(),style:we,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:hu(s)}}),r.jsxs("form",{onSubmit:Ke,className:`${s}-form`,style:{...Ce,height:I.scalingValue(ue,t),minHeight:I.scalingValue(ue,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map(ge=>r.jsx("input",{type:ge.type==="email"?"email":ge.type==="phone"?"tel":"text",name:ge.name,autoComplete:"off",value:D[ge.name]??"",onChange:We=>se(Ve=>({...Ve,[ge.name]:We.target.value})),placeholder:ge.placeholder,required:ge.isRequired??ge.type==="email",className:`${s}-input`,style:{...Z,paddingRight:I.scalingValue(X.right,t),paddingLeft:I.scalingValue(X.left,t),paddingTop:I.scalingValue(X.top,t),paddingBottom:I.scalingValue(X.bottom,t)}},ge.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":V,style:{...ne,...Se,paddingRight:I.scalingValue(F.right,t),paddingLeft:I.scalingValue(F.left,t),paddingTop:I.scalingValue(F.top,t),paddingBottom:I.scalingValue(F.bottom,t),pointerEvents:a?"auto":void 0},children:h==="submitting"?"...":K?Me&&r.jsx(un,{url:Me,className:`${s}-submitBtnIcon`,style:{maxWidth:I.scalingValue(Q??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):Le})})]}),Te==="success"&&r.jsx("p",{className:`${s}-success`,style:{...me},children:J}),Te==="error"&&r.jsx("p",{className:`${s}-error`,style:{...me},role:"alert",children:te??G??oe})]})},yu={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"},vu=["hover","focus","filled","success","error"],bu=`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';
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1557
1557
  };
1558
1558
 
1559
1559
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1560
- `,xu="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),wu=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],Qo={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Su=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],$u={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...Qo.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Qo.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...Qo.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:wu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:xu},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Su],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Cu={element:fu,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:$u,sourceCode:bu};function Tu(e){return`
1560
+ `,xu="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),wu=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],er={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Su=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],$u={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...er.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...er.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...er.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:wu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:xu},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Su],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Cu={element:fu,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:$u,sourceCode:bu};function Tu(e){return`
1561
1561
  .${e}-marquee-wrapper {
1562
1562
  overflow: hidden;
1563
1563
  width: 100%;
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1689
1689
  .${e}-image-hover-grayscale:hover img {
1690
1690
  filter: grayscale(100%);
1691
1691
  }
1692
- `}const Lu=30,Eu=20,er=2,Iu=2,Pu=(e,t)=>Array.from({length:t},()=>e).flat(),Ru=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Au=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Ru(i,e))},Mu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:d,onFirstSetImageDone:c})=>{var x,I,G;const p=l.useRef(null);l.useLayoutEffect(()=>{if(!a)return;const f=p.current;f!=null&&f.complete&&(c==null||c())},[a,(x=e.image)==null?void 0:x.url,c]);const u=n.display==="cover",T=n.ratioValue??"1:1",w=n.reversed??!1,[L,m]=T.split(":").map(Number),b=(w?m:L)/(w?L:m);let $=i,S=$/b;S>o&&(S=o,$=S*b);const F=d($),P=d(S),k=((I=e.image)==null?void 0:I.url)&&r.jsx("img",{ref:p,src:e.image.url,alt:((G=e.image)==null?void 0:G.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:a?c:void 0,onError:a?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:F}:{width:"fit-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:F,height:P,overflow:"hidden"}:{width:"fit-content",maxWidth:d(i),height:d(o)}},children:k&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Je(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:k}):k})})},_u=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),a=l.useMemo(()=>Tu(s),[s]),{speed:d,direction:c,pauseOnHover:p,gap:u,imageMaxWidth:T,imageMaxHeight:w,imageFit:L,hoverEffect:m}=e,y=!!o,C=!n||!!i,b=C&&m!=="off"&&m!=="randomize"?`${s}-image-hover-${m}`:void 0,$=n?!!i:!0,F=((t==null?void 0:t.length)??0)>0&&($||!!n),P=Math.max(0,d)*Lu,k=B=>E.scalingValue(B,n??!1),x=l.useRef(null),I=l.useRef(null),G=l.useRef(null),[f,R]=l.useState(0),[M,j]=l.useState(0),Z=$&&p==="on",[ue,V]=l.useState(!1),[_,Q]=l.useState({}),U=l.useRef(_);U.current=_;const H=l.useRef(null),J=l.useRef(0),oe=l.useRef(null),ie=l.useMemo(()=>(t??[]).map(B=>{var N;return((N=B.image)==null?void 0:N.url)??""}).join("\0"),[t]),[W,ae]=l.useState(er),g=l.useMemo(()=>{const B=t??[];return!$||B.length===0?B:Pu(B,W)},[t,$,W]),te=l.useMemo(()=>g.filter(B=>{var N;return!!((N=B.image)!=null&&N.url)}).length,[g]),ye=F?Iu:1;l.useLayoutEffect(()=>{J.current=0,Q({}),H.current=null,ae(er),R(0)},[ie]),l.useEffect(()=>{if(!C||m!=="randomize")return;const B=x.current;if(!B)return;const N=Ie=>{Q(xe=>{let Fe=null;for(const z of Ie)z in xe&&(Au(B,z)||(Fe||(Fe={...xe}),delete Fe[z]));return Fe??xe})},re=new IntersectionObserver(Ie=>{const xe=new Set;for(const Fe of Ie){const z=Fe.target.dataset.marqueeItemIndex,q=z!==void 0?Number(z):NaN;Number.isNaN(q)||xe.add(q)}xe.size>0&&N(xe)},{root:B,threshold:0});Object.keys(_).forEach(Ie=>{const xe=Number(Ie);B.querySelectorAll(`[data-marquee-item-index="${xe}"]`).forEach(Fe=>re.observe(Fe))});let $e=0;const Ne=()=>{const Ie=Object.keys(U.current);Ie.length!==0&&(N(Ie.map(Number)),$e=requestAnimationFrame(Ne))};return Object.keys(U.current).length>0&&($e=requestAnimationFrame(Ne)),()=>{cancelAnimationFrame($e),re.disconnect()}},[m,_,C]),l.useLayoutEffect(()=>{if(!F)return;const B=x.current,N=G.current;if(!B||!N)return;let re=0;const $e=()=>{const xe=B.getBoundingClientRect().width,Fe=N.getBoundingClientRect().width,z=H.current,q=typeof z=="number"&&Math.abs(z-Fe)<=.25;if(H.current=Fe,$&&Fe>0&&W>0){const v=Fe/W;if(v>0&&xe>0){const D=Math.max(er,Math.ceil(xe/v)+1);if(D!==W){ae(D);return}}}if(Fe>0&&f<=0){R(Fe);return}q&&Fe!==f?R(Fe):!q&&f<=0&&(cancelAnimationFrame(re),re=requestAnimationFrame($e))},Ne=()=>{cancelAnimationFrame(re),re=requestAnimationFrame($e)};oe.current=Ne,Ne();const Ie=new ResizeObserver(Ne);return Ie.observe(B),Ie.observe(N),()=>{oe.current=null,cancelAnimationFrame(re),Ie.disconnect()}},[$,F,f,ie,W]),l.useLayoutEffect(()=>{const B=I.current;if(!F||!B)return;const N=f>0?f:0,re=N>0&&P>0?N/P*1e3:0,$e=`${Math.max(0,re)/1e3}s`;B.style.setProperty("--marquee-distance",`${N}px`),B.style.setProperty("--marquee-duration",$e)},[$,F,P,f]),l.useLayoutEffect(()=>{if(!F){j(0);return}if(f<=0){j(0);return}const B=I.current;if(!B)return;const N=()=>{const $e=B.getBoundingClientRect().height;j($e>0?$e:0)};N();const re=new ResizeObserver(N);return re.observe(B),()=>re.disconnect()},[F,ye,g,n,u,T,w,f,L,_]);const me=()=>{Z&&V(!0)},_e=()=>{Z&&V(!1)},X=l.useCallback(()=>{var B;J.current=Math.min(te,J.current+1),(B=oe.current)==null||B.call(oe)},[te]),de=l.useCallback((B,N)=>{Q(re=>{const $e=re[B]??N,Ne=(t??[]).filter(xe=>xe!==$e);if(Ne.length===0)return re;const Ie=Ne[Math.floor(Math.random()*Ne.length)];return{...re,[B]:Ie}})},[t]),K=(B,N,re,$e)=>{const Ne=C&&m==="randomize"&&L.display==="cover"?_[re]??B:B,Ie=`max(${k(u)}, ${Eu}px)`,xe=`calc(-0.5 * (${Ie} + ${k(u)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":re,onMouseEnter:C&&m==="randomize"&&L.display==="cover"?()=>de(re,B):void 0,children:[r.jsx(Mu,{item:Ne,prefix:s,imageFit:L,imageMaxWidth:T,imageMaxHeight:w,imageHoverClass:b,isEditor:n,isFirstSet:$e,scaled:k,onFirstSetImageDone:X}),y&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:xe,width:Ie,height:"100%"}})]},`${N}-${re}`)};if(F){const B=$?Z&&ue?"paused":"running":"paused";return r.jsxs("div",{ref:x,className:Je(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:f>0&&M>0?{height:M}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{ref:I,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:me,onMouseLeave:_e,style:{"--marquee-play-state":B},children:Array.from({length:ye},(N,re)=>r.jsx("div",{ref:re===0?G:void 0,className:Je(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:k(u),paddingRight:k(u)},"aria-hidden":re>0,children:g.map(($e,Ne)=>K($e,re,Ne,re===0))},`set-${re}`))},"marquee-track")]})}return r.jsxs("div",{ref:x,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{className:Je(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:k(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((B,N)=>K(B,0,N))},"marquee-static")]})},ku=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1692
+ `}const Lu=30,Eu=20,tr=2,Iu=2,Pu=(e,t)=>Array.from({length:t},()=>e).flat(),Au=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Ru=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Au(i,e))},Mu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:d,onFirstSetImageDone:c})=>{var b,P,U;const p=l.useRef(null);l.useLayoutEffect(()=>{if(!a)return;const f=p.current;f!=null&&f.complete&&(c==null||c())},[a,(b=e.image)==null?void 0:b.url,c]);const u=n.display==="cover",L=n.ratioValue??"1:1",x=n.reversed??!1,[E,m]=L.split(":").map(Number),v=(x?m:E)/(x?E:m);let $=i,w=$/v;w>o&&(w=o,$=w*v);const N=d($),A=d(w),k=((P=e.image)==null?void 0:P.url)&&r.jsx("img",{ref:p,src:e.image.url,alt:((U=e.image)==null?void 0:U.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:a?c:void 0,onError:a?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:N}:{width:"fit-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:N,height:A,overflow:"hidden"}:{width:"fit-content",maxWidth:d(i),height:d(o)}},children:k&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Xe(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:k}):k})})},_u=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=I.useScopedStyles(),a=l.useMemo(()=>Tu(s),[s]),{speed:d,direction:c,pauseOnHover:p,gap:u,imageMaxWidth:L,imageMaxHeight:x,imageFit:E,hoverEffect:m}=e,y=!!o,C=!n||!!i,v=C&&m!=="off"&&m!=="randomize"?`${s}-image-hover-${m}`:void 0,$=n?!!i:!0,N=((t==null?void 0:t.length)??0)>0&&($||!!n),A=Math.max(0,d)*Lu,k=te=>I.scalingValue(te,n??!1),b=l.useRef(null),P=l.useRef(null),U=l.useRef(null),[f,R]=l.useState(0),[M,j]=l.useState(0),Q=$&&p==="on",[ue,z]=l.useState(!1),[_,ee]=l.useState({}),X=l.useRef(_);X.current=_;const F=l.useRef(null),J=l.useRef(0),oe=l.useRef(null),re=l.useMemo(()=>(t??[]).map(te=>{var O;return((O=te.image)==null?void 0:O.url)??""}).join("\0"),[t]),[W,se]=l.useState(tr),h=l.useMemo(()=>{const te=t??[];return!$||te.length===0?te:Pu(te,W)},[t,$,W]),ae=l.useMemo(()=>h.filter(te=>{var O;return!!((O=te.image)!=null&&O.url)}).length,[h]),ye=N?Iu:1;l.useLayoutEffect(()=>{J.current=0,ee({}),F.current=null,se(tr),R(0)},[re]),l.useEffect(()=>{if(!C||m!=="randomize")return;const te=b.current;if(!te)return;const O=Ee=>{ee(Le=>{let Me=null;for(const K of Ee)K in Le&&(Ru(te,K)||(Me||(Me={...Le}),delete Me[K]));return Me??Le})},ce=new IntersectionObserver(Ee=>{const Le=new Set;for(const Me of Ee){const K=Me.target.dataset.marqueeItemIndex,V=K!==void 0?Number(K):NaN;Number.isNaN(V)||Le.add(V)}Le.size>0&&O(Le)},{root:te,threshold:0});Object.keys(_).forEach(Ee=>{const Le=Number(Ee);te.querySelectorAll(`[data-marquee-item-index="${Le}"]`).forEach(Me=>ce.observe(Me))});let ke=0;const $e=()=>{const Ee=Object.keys(X.current);Ee.length!==0&&(O(Ee.map(Number)),ke=requestAnimationFrame($e))};return Object.keys(X.current).length>0&&(ke=requestAnimationFrame($e)),()=>{cancelAnimationFrame(ke),ce.disconnect()}},[m,_,C]),l.useLayoutEffect(()=>{if(!N)return;const te=b.current,O=U.current;if(!te||!O)return;let ce=0;const ke=()=>{const Le=te.getBoundingClientRect().width,Me=O.getBoundingClientRect().width,K=F.current,V=typeof K=="number"&&Math.abs(K-Me)<=.25;if(F.current=Me,$&&Me>0&&W>0){const S=Me/W;if(S>0&&Le>0){const B=Math.max(tr,Math.ceil(Le/S)+1);if(B!==W){se(B);return}}}if(Me>0&&f<=0){R(Me);return}V&&Me!==f?R(Me):!V&&f<=0&&(cancelAnimationFrame(ce),ce=requestAnimationFrame(ke))},$e=()=>{cancelAnimationFrame(ce),ce=requestAnimationFrame(ke)};oe.current=$e,$e();const Ee=new ResizeObserver($e);return Ee.observe(te),Ee.observe(O),()=>{oe.current=null,cancelAnimationFrame(ce),Ee.disconnect()}},[$,N,f,re,W]),l.useLayoutEffect(()=>{const te=P.current;if(!N||!te)return;const O=f>0?f:0,ce=O>0&&A>0?O/A*1e3:0,ke=`${Math.max(0,ce)/1e3}s`;te.style.setProperty("--marquee-distance",`${O}px`),te.style.setProperty("--marquee-duration",ke)},[$,N,A,f]),l.useLayoutEffect(()=>{if(!N){j(0);return}if(f<=0){j(0);return}const te=P.current;if(!te)return;const O=()=>{const ke=te.getBoundingClientRect().height;j(ke>0?ke:0)};O();const ce=new ResizeObserver(O);return ce.observe(te),()=>ce.disconnect()},[N,ye,h,n,u,L,x,f,E,_]);const he=()=>{Q&&z(!0)},Te=()=>{Q&&z(!1)},G=l.useCallback(()=>{var te;J.current=Math.min(ae,J.current+1),(te=oe.current)==null||te.call(oe)},[ae]),le=l.useCallback((te,O)=>{ee(ce=>{const ke=ce[te]??O,$e=(t??[]).filter(Le=>Le!==ke);if($e.length===0)return ce;const Ee=$e[Math.floor(Math.random()*$e.length)];return{...ce,[te]:Ee}})},[t]),D=(te,O,ce,ke)=>{const $e=C&&m==="randomize"&&E.display==="cover"?_[ce]??te:te,Ee=`max(${k(u)}, ${Eu}px)`,Le=`calc(-0.5 * (${Ee} + ${k(u)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":ce,onMouseEnter:C&&m==="randomize"&&E.display==="cover"?()=>le(ce,te):void 0,children:[r.jsx(Mu,{item:$e,prefix:s,imageFit:E,imageMaxWidth:L,imageMaxHeight:x,imageHoverClass:v,isEditor:n,isFirstSet:ke,scaled:k,onFirstSetImageDone:G}),y&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:Le,width:Ee,height:"100%"}})]},`${O}-${ce}`)};if(N){const te=$?Q&&ue?"paused":"running":"paused";return r.jsxs("div",{ref:b,className:Xe(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:f>0&&M>0?{height:M}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{ref:P,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:he,onMouseLeave:Te,style:{"--marquee-play-state":te},children:Array.from({length:ye},(O,ce)=>r.jsx("div",{ref:ce===0?U:void 0,className:Xe(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:k(u),paddingRight:k(u)},"aria-hidden":ce>0,children:h.map((ke,$e)=>D(ke,ce,$e,ce===0))},`set-${ce}`))},"marquee-track")]})}return r.jsxs("div",{ref:b,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{className:Xe(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:k(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((te,O)=>D(te,0,O))},"marquee-static")]})},ku=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1693
1693
  import cn from 'classnames';
1694
1694
  import { CommonComponentProps } from '../props';
1695
1695
  import { scalingValue } from '../utils/scalingValue';
@@ -2320,7 +2320,7 @@ type MarqueeProps = {
2320
2320
  isPreviewMode?: boolean;
2321
2321
  isEditMode?: boolean;
2322
2322
  } & CommonComponentProps;
2323
- `,Wu={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"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},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"]},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",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},Fu={element:_u,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:400},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Wu,sourceCode:ku,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function wa(e){return`
2323
+ `,Wu={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"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},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"]},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",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},Fu={element:_u,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:400},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Wu,sourceCode:ku,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Sa(e){return`
2324
2324
  .${e}-marquee-wrapper {
2325
2325
  overflow: hidden;
2326
2326
  width: 100%;
@@ -2407,7 +2407,7 @@ type MarqueeProps = {
2407
2407
  pointer-events: auto;
2408
2408
  z-index: 10;
2409
2409
  }
2410
- `}const Nu=30,Sa=2,Hu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),{align:a,speed:d,direction:c,pauseOnHover:p,gap:u,cardWidth:T,corners:w,stroke:L,strokeColor:m,bgColor:y,padding:C,logoMarginTop:b,logoWidth:$,logoHeight:S,captionMarginTop:F}=e,P=!!o,k=((t==null?void 0:t.length)??0)>0,x=d>0&&(!n||i),I=k&&(x||n),G=Math.max(0,d)*Nu,f=v=>E.scalingValue(v,n??!1),R=l.useRef(null),M=l.useRef(null),j=l.useRef(null),[Z,ue]=l.useState(0),[V,_]=l.useState(0),[Q,U]=l.useState(0),H=x&&p==="on",[J,oe]=l.useState(!1),ie=l.useRef(null),[W,ae]=l.useState(0),[g,te]=l.useState(0),ye=l.useRef(null),me=v=>{var O,ee,se,pe,Ce;return{fontSettings:{fontFamily:(e==null?void 0:e[`${v}FontFamily`])??"Arial",fontWeight:((O=e==null?void 0:e[`${v}FontSettings`])==null?void 0:O.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${v}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((se=e==null?void 0:e[`${v}TextAppearance`])==null?void 0:se.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${v}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((Ce=e==null?void 0:e[`${v}TextAppearance`])==null?void 0:Ce.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${v}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${v}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${v}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${v}LineHeight`])??.01,color:(e==null?void 0:e[`${v}Color`])??"#000000"}},_e=me("text"),X=me("caption"),de=l.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(v=>{var D,O;return(((D=v.text)==null?void 0:D.length)??0)>0||(((O=v.caption)==null?void 0:O.length)??0)>0}),[t]),K=l.useMemo(()=>!I||(t==null?void 0:t.length)===0?1:V<=0||Z<=0?Sa:Math.max(Sa,Math.ceil(Z/V)+1),[I,t==null?void 0:t.length,V,Z]);l.useLayoutEffect(()=>{if(!I)return;const v=R.current,D=j.current;if(!v||!D)return;let O=0;const ee=()=>{const Ce=v.getBoundingClientRect().width,we=D.getBoundingClientRect().width,ve=ye.current,Ge=typeof ve=="number"&&Math.abs(ve-we)<=.25;if(ye.current=we,ue(Ce),typeof we=="number"&&we>0&&V<=0){_(we);return}Ge&&we!==V?_(we):!Ge&&V<=0&&(cancelAnimationFrame(O),O=requestAnimationFrame(ee))},se=()=>{cancelAnimationFrame(O),O=requestAnimationFrame(ee)};se();const pe=new ResizeObserver(se);return pe.observe(v),pe.observe(D),()=>{cancelAnimationFrame(O),pe.disconnect()}},[x,I,V]),l.useLayoutEffect(()=>{const v=M.current;if(!I||!v)return;const D=V>0?V:0,O=D>0&&G>0?D/G*1e3:0,ee=`${Math.max(0,O)/1e3}s`;v.style.setProperty("--marquee-distance",`${D}px`),v.style.setProperty("--marquee-duration",ee)},[x,I,G,V]),l.useLayoutEffect(()=>{if(!I){U(0);return}const v=j.current,D=M.current;if(!v||!D)return;const O=()=>{let se=0;for(let pe=0;pe<v.children.length;pe++){const we=v.children[pe].firstElementChild;we&&(se=Math.max(se,we.offsetHeight))}se<=0&&(se=D.offsetHeight),U(se>0?se:0)};O();const ee=new ResizeObserver(O);return ee.observe(v),ee.observe(D),()=>{ee.disconnect()}},[I,K,t,n,u,T,C,L,w,$,S,W,g]);const B=()=>{H&&oe(!0)},N=()=>{H&&oe(!1)},re=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),$e=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),Ne=l.useCallback((v,D,O,ee)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:re,width:"100%"},children:[r.jsx("div",{"data-controls":P?ee==null?void 0:ee.controlsName:void 0,"data-controls-axis":P?"y":void 0,className:P?`${s}-control`:void 0,style:{height:f((ee==null?void 0:ee.marginTop)??0)}}),r.jsx("div",{...ee!=null&&ee.dataMeasureKind?{"data-testimonial-measure":ee.dataMeasureKind}:{},style:{..._t(v,n),textAlign:$e,pointerEvents:"auto",...typeof(ee==null?void 0:ee.minHeightPx)=="number"&&ee.minHeightPx>0?{minHeight:ee.minHeightPx}:{}},children:r.jsx(gi,{content:D})})]},O),[re,$e,n,P,s,f]),Ie=l.useCallback((v,D,O)=>{var ee,se,pe;return r.jsxs("div",{style:{padding:`${f(C.top)} ${f(C.right)} ${f(C.bottom)} ${f(C.left)}`,width:f(T+L*2),height:"100%",borderRadius:f(w),border:`${f(L)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:y}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:re,textAlign:$e},children:[v.text&&Ne(_e,v.text,"text",O!=null&&O.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(O==null?void 0:O.textMinHeightPx)=="number"&&O.textMinHeightPx>0?{minHeightPx:O.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:re,width:"100%"},children:[r.jsx("div",{"data-controls":P&&!(O!=null&&O.dataMeasureAttrs)?"logoMarginTop":void 0,className:P&&!(O!=null&&O.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:f(b)}}),r.jsx("div",{style:{width:f($),height:f(S)},children:((ee=v.logo)==null?void 0:ee.url)&&r.jsx("img",{src:v.logo.url,alt:((se=v.logo)==null?void 0:se.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((pe=v.logo)==null?void 0:pe.objectFit)||"contain"}})})]}),v.caption&&Ne(X,v.caption,"caption",{...O!=null&&O.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:F,...O!=null&&O.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(O==null?void 0:O.captionMinHeightPx)=="number"&&O.captionMinHeightPx>0?{minHeightPx:O.captionMinHeightPx}:{}})]})]},D)},[y,F,X,T,w,S,b,$,re,$e,C.bottom,C.left,C.right,C.top,Ne,L,m,_e,n,P,s]),xe=l.useCallback(v=>{ae(v.maxTextPx),te(v.maxCaptionPx)},[]);l.useLayoutEffect(()=>{if(!de){xe({maxTextPx:0,maxCaptionPx:0});return}const v=ie.current;if(!v)return;const D=()=>{E.readTestimonialTextMeasure(v,xe)};D();const O=new ResizeObserver(D);return O.observe(v),()=>{O.disconnect()}},[de,xe,t,Ie]);const Fe=de?{textMinHeightPx:W,captionMinHeightPx:g}:void 0,z=de?r.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((v,D)=>Ie(v,`measure-${D}`,{dataMeasureAttrs:!0}))}):null,q=(v,D)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Ie(v,`card-${D}`,Fe),P&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(u)})`,width:f(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},D);if(I){const v=x?H&&J?"paused":"running":"paused";return r.jsxs("div",{ref:R,className:Je(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...Q>0?{height:Q}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:wa(s)}}),z,r.jsx("div",{ref:M,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:B,onMouseLeave:N,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":v},children:Array.from({length:K},(D,O)=>r.jsx("div",{ref:O===0?j:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:f(u),paddingRight:f(u)},"aria-hidden":O>0,children:t==null?void 0:t.map((ee,se)=>q(ee,`${O}-${se}`))},`set-${O}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:wa(s)}}),z,r.jsx("div",{style:{gap:f(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((v,D)=>q(v,D))})]})},Ou=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2410
+ `}const Nu=30,$a=2,Hu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=I.useScopedStyles(),{align:a,speed:d,direction:c,pauseOnHover:p,gap:u,cardWidth:L,corners:x,stroke:E,strokeColor:m,bgColor:y,padding:C,logoMarginTop:v,logoWidth:$,logoHeight:w,captionMarginTop:N}=e,A=!!o,k=((t==null?void 0:t.length)??0)>0,b=d>0&&(!n||i),P=k&&(b||n),U=Math.max(0,d)*Nu,f=S=>I.scalingValue(S,n??!1),R=l.useRef(null),M=l.useRef(null),j=l.useRef(null),[Q,ue]=l.useState(0),[z,_]=l.useState(0),[ee,X]=l.useState(0),F=b&&p==="on",[J,oe]=l.useState(!1),re=l.useRef(null),[W,se]=l.useState(0),[h,ae]=l.useState(0),ye=l.useRef(null),he=S=>{var H,Z,ne,me,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${S}FontFamily`])??"Arial",fontWeight:((H=e==null?void 0:e[`${S}FontSettings`])==null?void 0:H.fontWeight)??400,fontStyle:((Z=e==null?void 0:e[`${S}FontSettings`])==null?void 0:Z.fontStyle)??"normal"},textAppearance:{textTransform:((ne=e==null?void 0:e[`${S}TextAppearance`])==null?void 0:ne.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${S}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${S}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${S}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${S}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${S}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${S}LineHeight`])??.01,color:(e==null?void 0:e[`${S}Color`])??"#000000"}},Te=he("text"),G=he("caption"),le=l.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(S=>{var B,H;return(((B=S.text)==null?void 0:B.length)??0)>0||(((H=S.caption)==null?void 0:H.length)??0)>0}),[t]),D=l.useMemo(()=>!P||(t==null?void 0:t.length)===0?1:z<=0||Q<=0?$a:Math.max($a,Math.ceil(Q/z)+1),[P,t==null?void 0:t.length,z,Q]);l.useLayoutEffect(()=>{if(!P)return;const S=R.current,B=j.current;if(!S||!B)return;let H=0;const Z=()=>{const we=S.getBoundingClientRect().width,Ce=B.getBoundingClientRect().width,Se=ye.current,Ke=typeof Se=="number"&&Math.abs(Se-Ce)<=.25;if(ye.current=Ce,ue(we),typeof Ce=="number"&&Ce>0&&z<=0){_(Ce);return}Ke&&Ce!==z?_(Ce):!Ke&&z<=0&&(cancelAnimationFrame(H),H=requestAnimationFrame(Z))},ne=()=>{cancelAnimationFrame(H),H=requestAnimationFrame(Z)};ne();const me=new ResizeObserver(ne);return me.observe(S),me.observe(B),()=>{cancelAnimationFrame(H),me.disconnect()}},[b,P,z]),l.useLayoutEffect(()=>{const S=M.current;if(!P||!S)return;const B=z>0?z:0,H=B>0&&U>0?B/U*1e3:0,Z=`${Math.max(0,H)/1e3}s`;S.style.setProperty("--marquee-distance",`${B}px`),S.style.setProperty("--marquee-duration",Z)},[b,P,U,z]),l.useLayoutEffect(()=>{if(!P){X(0);return}const S=j.current,B=M.current;if(!S||!B)return;const H=()=>{let ne=0;for(let me=0;me<S.children.length;me++){const Ce=S.children[me].firstElementChild;Ce&&(ne=Math.max(ne,Ce.offsetHeight))}ne<=0&&(ne=B.offsetHeight),X(ne>0?ne:0)};H();const Z=new ResizeObserver(H);return Z.observe(S),Z.observe(B),()=>{Z.disconnect()}},[P,D,t,n,u,L,C,E,x,$,w,W,h]);const te=()=>{F&&oe(!0)},O=()=>{F&&oe(!1)},ce=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),ke=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),$e=l.useCallback((S,B,H,Z)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ce,width:"100%"},children:[r.jsx("div",{"data-controls":A?Z==null?void 0:Z.controlsName:void 0,"data-controls-axis":A?"y":void 0,className:A?`${s}-control`:void 0,style:{height:f((Z==null?void 0:Z.marginTop)??0)}}),r.jsx("div",{...Z!=null&&Z.dataMeasureKind?{"data-testimonial-measure":Z.dataMeasureKind}:{},style:{...Nt(S,n),textAlign:ke,pointerEvents:"auto",...typeof(Z==null?void 0:Z.minHeightPx)=="number"&&Z.minHeightPx>0?{minHeight:Z.minHeightPx}:{}},children:r.jsx(hi,{content:B})})]},H),[ce,ke,n,A,s,f]),Ee=l.useCallback((S,B,H)=>{var Z,ne,me;return r.jsxs("div",{style:{padding:`${f(C.top)} ${f(C.right)} ${f(C.bottom)} ${f(C.left)}`,width:f(L+E*2),height:"100%",borderRadius:f(x),border:`${f(E)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:y}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:ce,textAlign:ke},children:[S.text&&$e(Te,S.text,"text",H!=null&&H.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(H==null?void 0:H.textMinHeightPx)=="number"&&H.textMinHeightPx>0?{minHeightPx:H.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ce,width:"100%"},children:[r.jsx("div",{"data-controls":A&&!(H!=null&&H.dataMeasureAttrs)?"logoMarginTop":void 0,className:A&&!(H!=null&&H.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:f(v)}}),r.jsx("div",{style:{width:f($),height:f(w)},children:((Z=S.logo)==null?void 0:Z.url)&&r.jsx("img",{src:S.logo.url,alt:((ne=S.logo)==null?void 0:ne.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((me=S.logo)==null?void 0:me.objectFit)||"contain"}})})]}),S.caption&&$e(G,S.caption,"caption",{...H!=null&&H.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:N,...H!=null&&H.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(H==null?void 0:H.captionMinHeightPx)=="number"&&H.captionMinHeightPx>0?{minHeightPx:H.captionMinHeightPx}:{}})]})]},B)},[y,N,G,L,x,w,v,$,ce,ke,C.bottom,C.left,C.right,C.top,$e,E,m,Te,n,A,s]),Le=l.useCallback(S=>{se(S.maxTextPx),ae(S.maxCaptionPx)},[]);l.useLayoutEffect(()=>{if(!le){Le({maxTextPx:0,maxCaptionPx:0});return}const S=re.current;if(!S)return;const B=()=>{I.readTestimonialTextMeasure(S,Le)};B();const H=new ResizeObserver(B);return H.observe(S),()=>{H.disconnect()}},[le,Le,t,Ee]);const Me=le?{textMinHeightPx:W,captionMinHeightPx:h}:void 0,K=le?r.jsx("div",{ref:re,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((S,B)=>Ee(S,`measure-${B}`,{dataMeasureAttrs:!0}))}):null,V=(S,B)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Ee(S,`card-${B}`,Me),A&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(u)})`,width:f(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},B);if(P){const S=b?F&&J?"paused":"running":"paused";return r.jsxs("div",{ref:R,className:Xe(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...ee>0?{height:ee}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Sa(s)}}),K,r.jsx("div",{ref:M,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:te,onMouseLeave:O,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":S},children:Array.from({length:D},(B,H)=>r.jsx("div",{ref:H===0?j:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:f(u),paddingRight:f(u)},"aria-hidden":H>0,children:t==null?void 0:t.map((Z,ne)=>V(Z,`${H}-${ne}`))},`set-${H}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Sa(s)}}),K,r.jsx("div",{style:{gap:f(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((S,B)=>V(S,B))})]})},Ou=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2411
2411
  import cn from 'classnames';
2412
2412
  import { CommonComponentProps } from '../props';
2413
2413
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3022,7 +3022,7 @@ type TestimonialsSettings = {
3022
3022
  logoHeight: number;
3023
3023
  captionMarginTop: number;
3024
3024
  };
3025
- `,$a={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Bu={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:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",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:{...$a.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:{...$a.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:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},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"}]}]}]}},ju={element:Hu,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:Bu,sourceCode:Ou,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function zu(e){return`
3025
+ `,Ca={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Bu={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:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",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:{...Ca.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:{...Ca.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:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},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"}]}]}]}},ju={element:Hu,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:Bu,sourceCode:Ou,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function zu(e){return`
3026
3026
  .${e}-container {
3027
3027
  position: relative;
3028
3028
  overflow-x: clip;
@@ -3146,7 +3146,7 @@ type TestimonialsSettings = {
3146
3146
  width: 100%;
3147
3147
  height: 100%;
3148
3148
  }
3149
- `}const Vu=3e3,Du=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),a=t||[],{speed:d,align:c,width:p,imageMarginTop:u,textMarginTop:T,captionMarginTop:w,imageWidth:L,imageHeight:m,controlsWidth:y,controlsColor:C,controlsHoverColor:b}=e,$=d>0&&(!n||!!i),[S,F]=l.useState(0),[P,k]=l.useState(null),[x,I]=l.useState(!1),G=l.useRef(null),f=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),R=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);l.useEffect(()=>{F(0),k(null),I(!1)},[a.length]);const M=a[S],j=P===null?null:a[P],Z=X=>{var K,B,N,re,$e;return{fontSettings:{fontFamily:(e==null?void 0:e[`${X}FontFamily`])??"Arial",fontWeight:((K=e==null?void 0:e[`${X}FontSettings`])==null?void 0:K.fontWeight)??400,fontStyle:((B=e==null?void 0:e[`${X}FontSettings`])==null?void 0:B.fontStyle)??"normal"},textAppearance:{textTransform:((N=e==null?void 0:e[`${X}TextAppearance`])==null?void 0:N.textTransform)??"none",textDecoration:((re=e==null?void 0:e[`${X}TextAppearance`])==null?void 0:re.textDecoration)??"none",fontVariant:(($e=e==null?void 0:e[`${X}TextAppearance`])==null?void 0:$e.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${X}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${X}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${X}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${X}WordSpacing`])??0,color:(e==null?void 0:e[`${X}Color`])??"#000000"}},ue=Z("text"),V=Z("caption"),_=a.length>1&&a.some(X=>{var de,K;return(((de=X.text)==null?void 0:de.length)??0)>0||(((K=X.caption)==null?void 0:K.length)??0)>0}),Q=l.useRef(null),[U,H]=l.useState(0),[J,oe]=l.useState(0),ie=e.controls??{mode:"Off",icon:null},W=a.length>1,ae=l.useCallback((X,de)=>!W||de===X?X:(G.current&&window.clearTimeout(G.current),k(X),I(!0),G.current=window.setTimeout(()=>{k(null),I(!1),G.current=null},300),de),[W]),g=l.useCallback(()=>{W&&F(X=>ae(X,(X-1+a.length)%a.length))},[W,ae,a.length]),te=l.useCallback(()=>{W&&F(X=>ae(X,(X+1)%a.length))},[W,ae,a.length]);l.useEffect(()=>{if(!$||!W)return;const X=Math.max(300,Vu/d),de=window.setInterval(()=>{F(K=>ae(K,(K+1)%a.length))},X);return()=>{window.clearInterval(de)}},[$,W,ae,a.length,d]),l.useEffect(()=>()=>{G.current&&window.clearTimeout(G.current)},[]);const ye=(X,de)=>{var $e,Ne,Ie,xe;const K=de==null?void 0:de.textMinHeightPx,B=de==null?void 0:de.captionMinHeightPx,N=de==null?void 0:de.dataMeasureAttrs,re=o&&!(de!=null&&de.dataMeasureAttrs)&&!(de!=null&&de.hideControls);return r.jsxs(r.Fragment,{children:[X.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":re?"textMarginTop":void 0,className:re?`${s}-control`:void 0,style:{height:E.scalingValue(T??0,n??!1)}}),r.jsx("div",{...N&&{"data-testimonial-measure":"text"},style:{..._t(ue,n),...K&&K>0?{minHeight:K}:{},textAlign:R,pointerEvents:"auto"},children:r.jsx(gi,{content:X.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":re?"imageMarginTop":void 0,className:re?`${s}-control`:void 0,style:{height:E.scalingValue(u??0,n??!1)}}),r.jsx("div",{style:{width:E.scalingValue(L??0,n??!1),height:E.scalingValue(m??0,n??!1)},children:(($e=X.image)==null?void 0:$e.url)&&r.jsx("img",{src:(Ne=X.image)==null?void 0:Ne.url,alt:((Ie=X.image)==null?void 0:Ie.name)??"",className:`${s}-icon`,style:{objectFit:((xe=X.image)==null?void 0:xe.objectFit)||"contain"}})})]}),X.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":re?"captionMarginTop":void 0,className:re?`${s}-control`:void 0,style:{height:E.scalingValue(w??0,n??!1)}}),r.jsx("div",{...N?{"data-testimonial-measure":"caption"}:{},style:{..._t(V,n),...B&&B>0?{minHeight:B}:{},textAlign:R,pointerEvents:"auto"},children:r.jsx(gi,{content:X.caption})})]})]})},me=l.useCallback(X=>{H(X.maxTextPx),oe(X.maxCaptionPx)},[]);if(l.useLayoutEffect(()=>{if(!_){me({maxTextPx:0,maxCaptionPx:0});return}const X=Q.current;if(!X)return;const de=()=>{E.readTestimonialTextMeasure(X,me)};de();const K=new ResizeObserver(de);return K.observe(X),()=>{K.disconnect()}},[_,me,t]),!M)return r.jsx(r.Fragment,{});const _e=_?{textMinHeightPx:U,captionMinHeightPx:J}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:zu(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:E.scalingValue(p??0,n??!1),alignItems:f},children:[_&&r.jsx("div",{ref:Q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((X,de)=>r.jsx("div",{style:{width:"100%"},children:ye(X,{dataMeasureAttrs:!0})},de))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[j&&x&&r.jsx("div",{className:Je(`${s}-fade-item-prev`,`${s}-fade-out`),children:ye(j,{..._e,hideControls:!0})}),r.jsx("div",{className:Je(`${s}-fade-item-current`,x?`${s}-fade-in`:void 0),children:ye(M,_e)})]})]}),ie.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:E.scalingValue(y??.02,n??!1),height:E.scalingValue(y??.02,n??!1),"--arrow-hover-color":b},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:g,disabled:!W,"aria-label":"Previous testimonial",children:ie.icon&&r.jsx(ln,{url:ie.icon,fill:C,hoverFill:b,className:Je(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:Je(`${s}-arrow`,`${s}-next-arrow`),style:{width:E.scalingValue(y??.02,n??!1),height:E.scalingValue(y??.02,n??!1),"--arrow-hover-color":b},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:te,disabled:!W,"aria-label":"Next testimonial",children:ie.icon&&r.jsx(ln,{url:ie.icon,fill:C,hoverFill:b,className:`${s}-arrow-img`})})})]})]})})},qu=`import cn from 'classnames';
3149
+ `}const Vu=3e3,Du=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=I.useScopedStyles(),a=t||[],{speed:d,align:c,width:p,imageMarginTop:u,textMarginTop:L,captionMarginTop:x,imageWidth:E,imageHeight:m,controlsWidth:y,controlsColor:C,controlsHoverColor:v}=e,$=d>0&&(!n||!!i),[w,N]=l.useState(0),[A,k]=l.useState(null),[b,P]=l.useState(!1),U=l.useRef(null),f=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),R=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);l.useEffect(()=>{N(0),k(null),P(!1)},[a.length]);const M=a[w],j=A===null?null:a[A],Q=G=>{var D,te,O,ce,ke;return{fontSettings:{fontFamily:(e==null?void 0:e[`${G}FontFamily`])??"Arial",fontWeight:((D=e==null?void 0:e[`${G}FontSettings`])==null?void 0:D.fontWeight)??400,fontStyle:((te=e==null?void 0:e[`${G}FontSettings`])==null?void 0:te.fontStyle)??"normal"},textAppearance:{textTransform:((O=e==null?void 0:e[`${G}TextAppearance`])==null?void 0:O.textTransform)??"none",textDecoration:((ce=e==null?void 0:e[`${G}TextAppearance`])==null?void 0:ce.textDecoration)??"none",fontVariant:((ke=e==null?void 0:e[`${G}TextAppearance`])==null?void 0:ke.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${G}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${G}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${G}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${G}WordSpacing`])??0,color:(e==null?void 0:e[`${G}Color`])??"#000000"}},ue=Q("text"),z=Q("caption"),_=a.length>1&&a.some(G=>{var le,D;return(((le=G.text)==null?void 0:le.length)??0)>0||(((D=G.caption)==null?void 0:D.length)??0)>0}),ee=l.useRef(null),[X,F]=l.useState(0),[J,oe]=l.useState(0),re=e.controls??{mode:"Off",icon:null},W=a.length>1,se=l.useCallback((G,le)=>!W||le===G?G:(U.current&&window.clearTimeout(U.current),k(G),P(!0),U.current=window.setTimeout(()=>{k(null),P(!1),U.current=null},300),le),[W]),h=l.useCallback(()=>{W&&N(G=>se(G,(G-1+a.length)%a.length))},[W,se,a.length]),ae=l.useCallback(()=>{W&&N(G=>se(G,(G+1)%a.length))},[W,se,a.length]);l.useEffect(()=>{if(!$||!W)return;const G=Math.max(300,Vu/d),le=window.setInterval(()=>{N(D=>se(D,(D+1)%a.length))},G);return()=>{window.clearInterval(le)}},[$,W,se,a.length,d]),l.useEffect(()=>()=>{U.current&&window.clearTimeout(U.current)},[]);const ye=(G,le)=>{var ke,$e,Ee,Le;const D=le==null?void 0:le.textMinHeightPx,te=le==null?void 0:le.captionMinHeightPx,O=le==null?void 0:le.dataMeasureAttrs,ce=o&&!(le!=null&&le.dataMeasureAttrs)&&!(le!=null&&le.hideControls);return r.jsxs(r.Fragment,{children:[G.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":ce?"textMarginTop":void 0,className:ce?`${s}-control`:void 0,style:{height:I.scalingValue(L??0,n??!1)}}),r.jsx("div",{...O&&{"data-testimonial-measure":"text"},style:{...Nt(ue,n),...D&&D>0?{minHeight:D}:{},textAlign:R,pointerEvents:"auto"},children:r.jsx(hi,{content:G.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":ce?"imageMarginTop":void 0,className:ce?`${s}-control`:void 0,style:{height:I.scalingValue(u??0,n??!1)}}),r.jsx("div",{style:{width:I.scalingValue(E??0,n??!1),height:I.scalingValue(m??0,n??!1)},children:((ke=G.image)==null?void 0:ke.url)&&r.jsx("img",{src:($e=G.image)==null?void 0:$e.url,alt:((Ee=G.image)==null?void 0:Ee.name)??"",className:`${s}-icon`,style:{objectFit:((Le=G.image)==null?void 0:Le.objectFit)||"contain"}})})]}),G.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":ce?"captionMarginTop":void 0,className:ce?`${s}-control`:void 0,style:{height:I.scalingValue(x??0,n??!1)}}),r.jsx("div",{...O?{"data-testimonial-measure":"caption"}:{},style:{...Nt(z,n),...te&&te>0?{minHeight:te}:{},textAlign:R,pointerEvents:"auto"},children:r.jsx(hi,{content:G.caption})})]})]})},he=l.useCallback(G=>{F(G.maxTextPx),oe(G.maxCaptionPx)},[]);if(l.useLayoutEffect(()=>{if(!_){he({maxTextPx:0,maxCaptionPx:0});return}const G=ee.current;if(!G)return;const le=()=>{I.readTestimonialTextMeasure(G,he)};le();const D=new ResizeObserver(le);return D.observe(G),()=>{D.disconnect()}},[_,he,t]),!M)return r.jsx(r.Fragment,{});const Te=_?{textMinHeightPx:X,captionMinHeightPx:J}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:zu(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:I.scalingValue(p??0,n??!1),alignItems:f},children:[_&&r.jsx("div",{ref:ee,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((G,le)=>r.jsx("div",{style:{width:"100%"},children:ye(G,{dataMeasureAttrs:!0})},le))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[j&&b&&r.jsx("div",{className:Xe(`${s}-fade-item-prev`,`${s}-fade-out`),children:ye(j,{...Te,hideControls:!0})}),r.jsx("div",{className:Xe(`${s}-fade-item-current`,b?`${s}-fade-in`:void 0),children:ye(M,Te)})]})]}),re.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:I.scalingValue(y??.02,n??!1),height:I.scalingValue(y??.02,n??!1),"--arrow-hover-color":v},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:h,disabled:!W,"aria-label":"Previous testimonial",children:re.icon&&r.jsx(un,{url:re.icon,fill:C,hoverFill:v,className:Xe(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:Xe(`${s}-arrow`,`${s}-next-arrow`),style:{width:I.scalingValue(y??.02,n??!1),height:I.scalingValue(y??.02,n??!1),"--arrow-hover-color":v},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:ae,disabled:!W,"aria-label":"Next testimonial",children:re.icon&&r.jsx(un,{url:re.icon,fill:C,hoverFill:v,className:`${s}-arrow-img`})})})]})]})})},qu=`import cn from 'classnames';
3150
3150
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3151
3151
  import { CommonComponentProps } from '../props';
3152
3152
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3642,7 +3642,7 @@ type TestimonialsSettings = {
3642
3642
  icon?: string | null;
3643
3643
  };
3644
3644
  };
3645
- `,Ku="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>'),Ca={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Gu={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:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",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:{...Ca.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:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ca.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:"Fill Text"}},defaults:{controls:{mode:"On",icon:Ku},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},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"}]}]}]}},Uu={element:Du,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,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Gu,sourceCode:qu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Xu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ta(e){return((e==null?void 0:e.trim().length)??0)>0}function tr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function nr(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((o-t)/2,i)}}function Yu(e){return`
3645
+ `,Ku="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>'),Ta={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Gu={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:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",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:{...Ta.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:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ta.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:"Fill Text"}},defaults:{controls:{mode:"On",icon:Ku},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},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"}]}]}]}},Uu={element:Du,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,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Gu,sourceCode:qu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Xu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function La(e){return((e==null?void 0:e.trim().length)??0)>0}function nr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ir(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:I.scalingValue((o-t)/2,i)}}function Yu(e){return`
3646
3646
  .${e}-wrapper {
3647
3647
  display: grid;
3648
3648
  align-items: start;
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {
3845
3845
  pointer-events: auto;
3846
3846
  z-index: 10;
3847
3847
  }
3848
- `}const Ut=500,Ju=750,rn="cubic-bezier(0.22, 1, 0.36, 1)",Zu=72,Qu=50;function ep(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 tp(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function np(e){const[t]=e.media;return t!=null&&t.url?t:null}function ip(e){return!Array.isArray(e)||e.length===0?[]:ep(e)?e.flatMap(t=>{const n=tp(t);if(!n)return[];const i=np(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 Ei(e){return e.type==="video"}function op(e){e.pause(),e.removeAttribute("src"),e.load()}function La({media:e,className:t,style:n,onMediaClick:i}){return Ei(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 oo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function rp(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ap({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:d}){return l.useEffect(()=>{const c=n.current;if(c)return()=>{op(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:d,style:i})}function sp({items:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:d,counterClassName:c,counterStyle:p}){const u=n==="cover",T=l.useRef(null),w=l.useRef(null),L=l.useRef(null),m=l.useRef(null),y=l.useRef(0),C=l.useRef(0),b=l.useRef("none"),$=l.useRef(!1),S=l.useRef(!1),F=l.useRef(!1),P=l.useRef(null),[k,x]=l.useState(null),[I,G]=l.useState(i?"opening":"open"),[f,R]=l.useState(!0),[M,j]=l.useState(0),[Z,ue]=l.useState(0),[V,_]=l.useState(!1),[Q,U]=l.useState(!1),[H,J]=l.useState(!1),oe=l.useRef(t),ie=e[t],W=ie?Ei(ie):!1,ae=Z!==0||V,g=l.useCallback(q=>{F.current=q,_(q)},[]),te=l.useCallback(()=>{P.current!==null&&(window.clearTimeout(P.current),P.current=null)},[]),ye=l.useCallback(()=>{te(),P.current=window.setTimeout(()=>{te(),g(!1)},Ut+32)},[te,g]),me=l.useCallback(()=>{const q=w.current,v=L.current;if(!q)return;const D=q.getBoundingClientRect(),O=D.width,ee=D.height;if(!O||!ee)return;if(n==="cover"){x({width:O,height:ee,left:D.left,top:D.top});return}if(!v){x(oo(q));return}const{width:se,height:pe}=rp(v);if(!se||!pe){x(oo(q));return}const Ce=se/pe,we=O/ee;if(Ce>we){const ve=O/Ce;x({width:O,height:ve,left:D.left,top:D.top+(ee-ve)/2})}else{const ve=ee*Ce;x({width:ve,height:ee,left:D.left+(O-ve)/2,top:D.top})}},[n]);l.useEffect(()=>{me();const q=w.current;if(!q)return;const v=new ResizeObserver(()=>me());return v.observe(q),()=>v.disconnect()},[me,t]),l.useEffect(()=>{I==="opening"&&k&&G("open")},[I,k]),l.useEffect(()=>{if(I!=="closing")return;const q=setTimeout(()=>s(),Ut);return()=>clearTimeout(q)},[I,s]),l.useEffect(()=>()=>{te()},[te]),l.useLayoutEffect(()=>{if(oe.current===t)return;te(),R(!1),j(0),ue(0),g(!1),J(!1),U(!1),y.current=0,C.current=0,b.current="none",$.current=!1,m.current=null,S.current=!1;const q=w.current;q&&x(oo(q)),oe.current=t},[t,g,te]),l.useEffect(()=>{if(I!=="open")return;const q=()=>{const pe=Ce=>{Ce.stopPropagation(),Ce.preventDefault(),document.removeEventListener("click",pe,!0)};document.addEventListener("click",pe,!0)},v=pe=>{te(),F.current=!1,_(!1),ue(0),U(!1),$.current=!1,C.current=0,b.current="none",R(!1);const Ce=w.current;Ce&&x(oo(Ce)),pe<0?d():a()},D=pe=>{if(Math.abs(pe)>Qu&&e.length>1){v(pe);return}g(!0),ue(0),ye()},O=pe=>{if(pe.touches.length!==1||F.current)return;const Ce=pe.touches[0];S.current=!0,m.current={x:Ce.clientX,y:Ce.clientY},b.current="none",C.current=0,$.current=!1},ee=pe=>{if(!m.current||pe.touches.length!==1||F.current)return;const Ce=pe.touches[0],we=Ce.clientX-m.current.x,ve=Ce.clientY-m.current.y;if(b.current==="none"){if(Math.abs(we)<10&&Math.abs(ve)<10)return;if(Math.abs(we)>Math.abs(ve)){if(e.length<=1)return;b.current="horizontal"}else if(ve>0)b.current="vertical";else return}if(b.current==="horizontal"){$.current=!0,U(!0),C.current=we,ue(we),pe.preventDefault();return}b.current==="vertical"&&($.current=!0,U(!0),y.current=ve,j(ve),pe.preventDefault())},se=()=>{if(!m.current)return;const pe=b.current,Ce=$.current;if(Ce&&pe==="horizontal")D(C.current),q();else if(Ce&&pe==="vertical"){if(y.current>Zu){const ve=window.innerHeight;y.current=ve,J(!0),j(ve),G("closing")}else y.current=0,j(0);q()}else pe==="horizontal"&&Math.abs(C.current)>0&&(D(C.current),q());m.current=null,b.current="none",C.current=0,$.current=!1,U(!1)};return document.addEventListener("touchstart",O,{passive:!0}),document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",se),document.addEventListener("touchcancel",se),()=>{document.removeEventListener("touchstart",O),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",se),document.removeEventListener("touchcancel",se)}},[I,e.length,d,a,g,ye]),l.useEffect(()=>{const q=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),I!=="closing"&&G("closing"))};return window.addEventListener("keydown",q,!0),()=>window.removeEventListener("keydown",q,!0)},[I]);const _e=()=>{I!=="closing"&&G("closing")},X=I==="open",de=I==="closing",K=de&&o&&!!i&&!H,B=M>0?Math.max(0,1-M/500):1,N=M>0?Math.max(.35,1-M/500):1,re=I==="opening"?i??k:K?i:k,$e=q=>{if(q.stopPropagation(),S.current){S.current=!1;return}if(e.length<=1)return;const v=q.currentTarget.getBoundingClientRect(),D=q.clientY-v.top,O=Math.min(52,v.height*.2);if(!(D>v.height-O)){if(q.clientX-v.left<v.width/2){a();return}d()}},Ne=q=>{if(e.length<=1)return;const v=q.currentTarget.getBoundingClientRect(),D=q.clientX-v.left,O=q.clientY-v.top,ee=Math.min(52,v.height*.2);if(O>v.height-ee){q.currentTarget.style.cursor="default";return}q.currentTarget.style.cursor=D<v.width/2?"w-resize":"e-resize"},Ie=l.useCallback(q=>{q.propertyName!=="transform"||!F.current||(te(),g(!1))},[te,g]),xe=ae?`translateX(${Z}px)`:M>0?`translateY(${M}px)`:void 0,Fe={position:"fixed",top:re==null?void 0:re.top,left:re==null?void 0:re.left,width:re==null?void 0:re.width,height:re==null?void 0:re.height,objectFit:n==="cover"?"cover":"contain",transform:xe,opacity:M>0?N:de&&!K?0:1,transition:Q&&!V?"none":V?`transform ${Ut}ms ${rn}`:H?`transform ${Ut}ms ${rn}, opacity ${Ut}ms ${rn}`:de&&!K?`opacity ${Ut}ms ${rn}`:K||f?`top ${Ut}ms ${rn}, left ${Ut}ms ${rn}, width ${Ut}ms ${rn}, height ${Ut}ms ${rn}`:"none",pointerEvents:W&&X&&!ae?"auto":"none",touchAction:W&&X?"none":void 0,zIndex:9998},z=k?{position:"fixed",top:k.top,height:k.height,width:k.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:T,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:I==="open"?"none":void 0},onClick:_e,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:X?B:0,transition:Q?"none":`opacity ${Ut}ms ${rn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,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:X?1:0,transition:`opacity ${Ut}ms ${rn}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:c,style:p,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:w,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:X?1:0,transition:`opacity ${Ut}ms ${rn}`},children:e.length>1&&r.jsxs("p",{className:c,style:p,children:[t+1," / ",e.length]})})]})}),re&&ie&&(W?r.jsx(ap,{src:ie.url,phase:I,mediaRef:L,mediaStyle:Fe,onLoadedMetadata:me,onClick:$e,onMouseMove:Ne,onTransitionEnd:Ie},`${t}-${ie.url}`):r.jsx("img",{ref:L,src:ie.url,alt:ie.name,onLoad:me,onTransitionEnd:Ie,style:Fe},`${t}-${ie.url}`)),X&&z&&e.length>1&&!W&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...z,left:k.left,cursor:"w-resize",pointerEvents:ae?"none":"auto"},onClick:q=>{if(S.current){S.current=!1;return}q.stopPropagation(),a()}}),r.jsx("div",{style:{...z,left:k.left+k.width/2,cursor:"e-resize",pointerEvents:ae?"none":"auto"},onClick:q=>{if(S.current){S.current=!1;return}q.stopPropagation(),d()}})]})]})}function lp(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function cp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:d}){const{prefix:c}=E.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:w,entriesCount:L,lightbox:m,imageDisplay:y,lightboxImageDisplay:C,slider:b,sliderTiming:$,direction:S,transition:F,titleMarginTop:P,subtitleMarginTop:k,titleColor:x,subtitleColor:I,lightboxCounterColor:G,titleFontFamily:f,titleFontSettings:R,titleFontSize:M,titleLineHeight:j,titleLetterSpacing:Z,titleWordSpacing:ue,titleTextAppearance:V,subtitleFontFamily:_,subtitleFontSettings:Q,subtitleFontSize:U,subtitleLineHeight:H,subtitleLetterSpacing:J,subtitleWordSpacing:oe,subtitleTextAppearance:ie,lightboxCounterFontFamily:W,lightboxCounterFontSettings:ae,lightboxCounterFontSize:g,lightboxCounterLineHeight:te,lightboxCounterLetterSpacing:ye,lightboxCounterWordSpacing:me,lightboxCounterTextAppearance:_e,showText:X="always",alignEntries:de="off"}=e,K={fontSettings:{fontFamily:f,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:M??.01,lineHeight:j,letterSpacing:Z??0,wordSpacing:ue??0,textAppearance:V,color:x},N={...Zt(_t(K,n))},re={fontSettings:{fontFamily:_,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:U??.01,lineHeight:H,letterSpacing:J??0,wordSpacing:oe??0,textAppearance:ie,color:I},Ne={...Zt(_t(re,n))},Ie={fontSettings:{fontFamily:W,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:g??.01,lineHeight:te,letterSpacing:ye??0,wordSpacing:me??0,textAppearance:_e,color:G},Fe={...Zt(_t(Ie,n)),...nr(g,te,c,n)},z=tr(M,j,`${c}-item-title`,`${c}-text-tight-leading`),q=tr(U,H,`${c}-item-subtitle`,`${c}-text-tight-leading`),v=nr(M,j,c,n),D=nr(U,H,c,n),O=tr(g,te,`${c}-lightbox-counter`,`${c}-text-tight-leading`),ee=E.buildColorVars(c,{titleColor:x,subtitleColor:I,lightboxCounterColor:G},dp,up),Ce=`${a&&a!=="default"?`${c}-state-${a}`:""}${X==="on hover"&&(!n||i)?` ${c}-show-text-hover`:""}`.trim(),we=L===0?1/0:L,ve=(t??[]).slice(0,we),Ge=u.entryWidth??.2,ge=(y==null?void 0:y.display)==="cover",ke=(y==null?void 0:y.ratioValue)??"1:1",ze=(y==null?void 0:y.reversed)??!1,[Le,ot]=ke.split(":").map(Number),Ke=`${ze?ot:Le} / ${ze?Le:ot}`,st=E.scalingValue(Ge??0,n),Ct=!ge&&b!=="off",It={width:st,...ge?{aspectRatio:Ke,height:"auto",overflow:"hidden"}:{height:"auto"}},Rt=`${c}-item-image-wrapper${Ct?` ${c}-item-image-wrapper-fit-slider`:""}`.trim(),Se=p==="c",He=Se&&de==="on",Xe=`calc(${E.scalingValue(Ge??0,n)} * (${T} / 100))`,Ue=E.scalingValue(Ge*T/100,n),Nt=ge?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Ot,Ht]=l.useState("ltr"),[zt,dn]=l.useState(0),Oe=l.useRef(null);l.useEffect(()=>{const De=Oe.current;if(!De)return;const Wt=new ResizeObserver(le=>{dn(Math.round(le[0].contentRect.width))});return Wt.observe(De),()=>Wt.disconnect()},[]);const Tt=(()=>{const De={...ee},Wt=Oe.current?getComputedStyle(Oe.current).getPropertyValue("--cntrl-article-width").trim():"";return Wt&&(De["--cntrl-article-width"]=Wt),De})(),[lt,et]=l.useState(!1),[gt,qt]=l.useState([]),[Kt,tn]=l.useState(0),[hn,Ye]=l.useState(null),nn=m==="on"&&(!n||i),At=(De,Wt,le)=>{if(n&&!i||m==="off")return;const be=De.currentTarget.getBoundingClientRect();Ye({top:be.top,left:be.left,width:be.width,height:be.height}),qt(Wt),tn(le),et(!0)};l.useEffect(()=>{if(!lt||m!=="on"||typeof document>"u")return;const De=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=De}},[lt,m]),l.useEffect(()=>{!n||i||(et(!1),Ye(null))},[n,i]);const kt=l.useMemo(()=>Yu(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:kt}}),r.jsx("div",{style:ee,children:r.jsx("div",{ref:Oe,className:`${c}-wrapper ${c}-type-${p}${He?` ${c}-align-entries`:""} ${Ce}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:E.scalingValue(w??0,n),columnGap:E.scalingValue(u.horizontalGap??0,n),width:E.scalingValue(u.wrapperWidth??0,n),...He?{[`--${c}-align-entries-row-gap`]:E.scalingValue(w??0,n)}:{}},children:ve.map((De,Wt)=>{var St;const le=Ta(De.title),be=Ta(De.subtitle),Pe=(((St=De.link)==null?void 0:St.length)??0)>0&&m==="off"?De.link:void 0,Ve=Math.floor(Wt/u.columnsCount)===Math.ceil(ve.length/u.columnsCount)-1,ht=Se?r.jsxs("div",{className:`${c}-item-text-block`,children:[le&&r.jsx("p",{className:z,style:{width:Xe,...N,...v},children:De.title}),le&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:E.scalingValue(P??0,n),width:Ue}}),be&&r.jsx("p",{className:q,style:{width:Xe,...Ne,...D},children:De.subtitle}),be&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:E.scalingValue(k??0,n),width:Ue}})]}):null,wt=Se?r.jsxs("div",{className:`${c}-item-title-row`,children:[le&&r.jsx("p",{className:z,style:{width:Xe,...N,...v},children:De.title}),le&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:E.scalingValue(P??0,n),width:Ue}})]}):null,Me=Se?r.jsxs("div",{className:`${c}-item-subtitle-row`,children:[be&&r.jsx("p",{className:q,style:{width:Xe,...Ne,...D},children:De.subtitle}),be&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:E.scalingValue(k??0,n),width:Ue}})]}):null,ft=Pe?r.jsxs("a",{href:Pe,target:"_blank",className:`${c}-item-text-link`,children:[wt,Me]}):r.jsxs(r.Fragment,{children:[wt,Me]}),qe=ip(De.gallery),rt=qe.filter(Be=>Be.lightboxMedia).map(Be=>Be.lightboxMedia),Qe=r.jsx("div",{className:Rt,style:It,children:qe.length===0?null:b==="off"?(()=>{const{displayMedia:Be,lightboxMedia:xt}=qe[0],at=xt?rt.findIndex(vt=>vt.url===xt.url):-1;return r.jsx(La,{media:Be,className:`${c}-item-${Ei(Be)?"video":"image"}`.trim(),style:Nt,onMediaClick:nn&&at>=0?vt=>At(vt,rt,at):void 0})})():r.jsxs(r.Fragment,{children:[Ct&&r.jsx("div",{className:`${c}-item-image-wrapper-sizer`,"aria-hidden":"true",children:qe.map(({displayMedia:Be})=>Ei(Be)?r.jsx("video",{src:Be.url,muted:!0,playsInline:!0},`sizer-${Be.url}`):r.jsx("img",{src:Be.url,alt:""},`sizer-${Be.url}`))}),r.jsx(Dr,{className:`${c}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:Ju,type:F==="fade"?"fade":"loop",rewind:F==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:F==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":Ot},onMoved:Be=>{if(S!=="random"||F==="fade")return;const xt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Ht(xt),setTimeout(()=>{Be.refresh()},0)},children:qe.map(({displayMedia:Be,lightboxMedia:xt},at)=>{const vt=xt?rt.findIndex(Mt=>Mt.url===xt.url):-1;return r.jsx(qr,{children:r.jsx(La,{media:Be,className:`${c}-item-${Ei(Be)?"video":"image"}`.trim(),style:Nt,onMediaClick:nn&&vt>=0?Mt=>At(Mt,rt,vt):void 0})},at)})},`${F}-${Ge}-${S}-${$}-${zt}-${d}`)]})}),Pt=Se?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&le?"titleMarginTop":void 0,className:o&&le?`${c}-control`:void 0,style:{height:le?E.scalingValue(P??0,n):0,width:Ue}}),r.jsx("p",{className:z,style:{width:Xe,...N,...v},children:De.title}),r.jsx("div",{"data-controls":o&&be?"subtitleMarginTop":void 0,className:o&&be?`${c}-control`:void 0,style:{height:be?E.scalingValue(k??0,n):0,width:Ue}}),r.jsx("p",{className:q,style:{width:Xe,...Ne,...D},children:De.subtitle})]});return r.jsx("div",{className:`${c}-item`.trim(),children:r.jsx("div",{className:`${o?`${c}-item-inner`:`${c}-item-inner-hidden`}${He&&Ve?` ${c}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${E.scalingValue(Ge??0,n)} * (${T} / 100))`:E.scalingValue(Ge??0,n)},children:He?r.jsxs(r.Fragment,{children:[ft,r.jsx("a",{href:Pe,target:"_blank",className:`${c}-item-image-link`,children:Qe})]}):r.jsxs("a",{href:Pe,target:"_blank",className:`${c}-item-image-link`,children:[ht,Qe,Pt]})})},Wt)})})}),(!n||i)&&lt&&typeof document<"u"&&m==="on"&&Oi.createPortal(r.jsx("div",{style:Tt,"data-selection":"none",children:r.jsx(sp,{items:gt,index:Kt,imageDisplay:lp(C),originRect:hn,reverseClose:b==="off",onClose:()=>et(!1),onPrev:()=>tn(De=>(De-1+gt.length)%gt.length),onNext:()=>tn(De=>(De+1)%gt.length),counterClassName:O,counterStyle:Fe})}),document.body)]})}const dp={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},up=["hover","focus","filled","success","error"],pp=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3848
+ `}const Gt=500,Ju=750,ln="cubic-bezier(0.22, 1, 0.36, 1)",Zu=72,Qu=50;function ep(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 tp(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function np(e){const[t]=e.media;return t!=null&&t.url?t:null}function ip(e){return!Array.isArray(e)||e.length===0?[]:ep(e)?e.flatMap(t=>{const n=tp(t);if(!n)return[];const i=np(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 Ei(e){return e.type==="video"}function op(e){e.pause(),e.removeAttribute("src"),e.load()}function Ea({media:e,className:t,style:n,onMediaClick:i}){return Ei(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 oo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function rp(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ap({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:d}){return l.useEffect(()=>{const c=n.current;if(c)return()=>{op(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:d,style:i})}function sp({items:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:d,counterClassName:c,counterStyle:p}){const u=n==="cover",L=l.useRef(null),x=l.useRef(null),E=l.useRef(null),m=l.useRef(null),y=l.useRef(0),C=l.useRef(0),v=l.useRef("none"),$=l.useRef(!1),w=l.useRef(!1),N=l.useRef(!1),A=l.useRef(null),[k,b]=l.useState(null),[P,U]=l.useState(i?"opening":"open"),[f,R]=l.useState(!0),[M,j]=l.useState(0),[Q,ue]=l.useState(0),[z,_]=l.useState(!1),[ee,X]=l.useState(!1),[F,J]=l.useState(!1),oe=l.useRef(t),re=e[t],W=re?Ei(re):!1,se=Q!==0||z,h=l.useCallback(V=>{N.current=V,_(V)},[]),ae=l.useCallback(()=>{A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),ye=l.useCallback(()=>{ae(),A.current=window.setTimeout(()=>{ae(),h(!1)},Gt+32)},[ae,h]),he=l.useCallback(()=>{const V=x.current,S=E.current;if(!V)return;const B=V.getBoundingClientRect(),H=B.width,Z=B.height;if(!H||!Z)return;if(n==="cover"){b({width:H,height:Z,left:B.left,top:B.top});return}if(!S){b(oo(V));return}const{width:ne,height:me}=rp(S);if(!ne||!me){b(oo(V));return}const we=ne/me,Ce=H/Z;if(we>Ce){const Se=H/we;b({width:H,height:Se,left:B.left,top:B.top+(Z-Se)/2})}else{const Se=Z*we;b({width:Se,height:Z,left:B.left+(H-Se)/2,top:B.top})}},[n]);l.useEffect(()=>{he();const V=x.current;if(!V)return;const S=new ResizeObserver(()=>he());return S.observe(V),()=>S.disconnect()},[he,t]),l.useEffect(()=>{P==="opening"&&k&&U("open")},[P,k]),l.useEffect(()=>{if(P!=="closing")return;const V=setTimeout(()=>s(),Gt);return()=>clearTimeout(V)},[P,s]),l.useEffect(()=>()=>{ae()},[ae]),l.useLayoutEffect(()=>{if(oe.current===t)return;ae(),R(!1),j(0),ue(0),h(!1),J(!1),X(!1),y.current=0,C.current=0,v.current="none",$.current=!1,m.current=null,w.current=!1;const V=x.current;V&&b(oo(V)),oe.current=t},[t,h,ae]),l.useEffect(()=>{if(P!=="open")return;const V=()=>{const me=we=>{we.stopPropagation(),we.preventDefault(),document.removeEventListener("click",me,!0)};document.addEventListener("click",me,!0)},S=me=>{ae(),N.current=!1,_(!1),ue(0),X(!1),$.current=!1,C.current=0,v.current="none",R(!1);const we=x.current;we&&b(oo(we)),me<0?d():a()},B=me=>{if(Math.abs(me)>Qu&&e.length>1){S(me);return}h(!0),ue(0),ye()},H=me=>{if(me.touches.length!==1||N.current)return;const we=me.touches[0];w.current=!0,m.current={x:we.clientX,y:we.clientY},v.current="none",C.current=0,$.current=!1},Z=me=>{if(!m.current||me.touches.length!==1||N.current)return;const we=me.touches[0],Ce=we.clientX-m.current.x,Se=we.clientY-m.current.y;if(v.current==="none"){if(Math.abs(Ce)<10&&Math.abs(Se)<10)return;if(Math.abs(Ce)>Math.abs(Se)){if(e.length<=1)return;v.current="horizontal"}else if(Se>0)v.current="vertical";else return}if(v.current==="horizontal"){$.current=!0,X(!0),C.current=Ce,ue(Ce),me.preventDefault();return}v.current==="vertical"&&($.current=!0,X(!0),y.current=Se,j(Se),me.preventDefault())},ne=()=>{if(!m.current)return;const me=v.current,we=$.current;if(we&&me==="horizontal")B(C.current),V();else if(we&&me==="vertical"){if(y.current>Zu){const Se=window.innerHeight;y.current=Se,J(!0),j(Se),U("closing")}else y.current=0,j(0);V()}else me==="horizontal"&&Math.abs(C.current)>0&&(B(C.current),V());m.current=null,v.current="none",C.current=0,$.current=!1,X(!1)};return document.addEventListener("touchstart",H,{passive:!0}),document.addEventListener("touchmove",Z,{passive:!1}),document.addEventListener("touchend",ne),document.addEventListener("touchcancel",ne),()=>{document.removeEventListener("touchstart",H),document.removeEventListener("touchmove",Z),document.removeEventListener("touchend",ne),document.removeEventListener("touchcancel",ne)}},[P,e.length,d,a,h,ye]),l.useEffect(()=>{const V=S=>{S.key==="Escape"&&(S.preventDefault(),S.stopPropagation(),P!=="closing"&&U("closing"))};return window.addEventListener("keydown",V,!0),()=>window.removeEventListener("keydown",V,!0)},[P]);const Te=()=>{P!=="closing"&&U("closing")},G=P==="open",le=P==="closing",D=le&&o&&!!i&&!F,te=M>0?Math.max(0,1-M/500):1,O=M>0?Math.max(.35,1-M/500):1,ce=P==="opening"?i??k:D?i:k,ke=V=>{if(V.stopPropagation(),w.current){w.current=!1;return}if(e.length<=1)return;const S=V.currentTarget.getBoundingClientRect(),B=V.clientY-S.top,H=Math.min(52,S.height*.2);if(!(B>S.height-H)){if(V.clientX-S.left<S.width/2){a();return}d()}},$e=V=>{if(e.length<=1)return;const S=V.currentTarget.getBoundingClientRect(),B=V.clientX-S.left,H=V.clientY-S.top,Z=Math.min(52,S.height*.2);if(H>S.height-Z){V.currentTarget.style.cursor="default";return}V.currentTarget.style.cursor=B<S.width/2?"w-resize":"e-resize"},Ee=l.useCallback(V=>{V.propertyName!=="transform"||!N.current||(ae(),h(!1))},[ae,h]),Le=se?`translateX(${Q}px)`:M>0?`translateY(${M}px)`:void 0,Me={position:"fixed",top:ce==null?void 0:ce.top,left:ce==null?void 0:ce.left,width:ce==null?void 0:ce.width,height:ce==null?void 0:ce.height,objectFit:n==="cover"?"cover":"contain",transform:Le,opacity:M>0?O:le&&!D?0:1,transition:ee&&!z?"none":z?`transform ${Gt}ms ${ln}`:F?`transform ${Gt}ms ${ln}, opacity ${Gt}ms ${ln}`:le&&!D?`opacity ${Gt}ms ${ln}`:D||f?`top ${Gt}ms ${ln}, left ${Gt}ms ${ln}, width ${Gt}ms ${ln}, height ${Gt}ms ${ln}`:"none",pointerEvents:W&&G&&!se?"auto":"none",touchAction:W&&G?"none":void 0,zIndex:9998},K=k?{position:"fixed",top:k.top,height:k.height,width:k.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:L,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:P==="open"?"none":void 0},onClick:Te,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:G?te:0,transition:ee?"none":`opacity ${Gt}ms ${ln}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:x,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:G?1:0,transition:`opacity ${Gt}ms ${ln}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:c,style:p,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:x,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:G?1:0,transition:`opacity ${Gt}ms ${ln}`},children:e.length>1&&r.jsxs("p",{className:c,style:p,children:[t+1," / ",e.length]})})]})}),ce&&re&&(W?r.jsx(ap,{src:re.url,phase:P,mediaRef:E,mediaStyle:Me,onLoadedMetadata:he,onClick:ke,onMouseMove:$e,onTransitionEnd:Ee},`${t}-${re.url}`):r.jsx("img",{ref:E,src:re.url,alt:re.name,onLoad:he,onTransitionEnd:Ee,style:Me},`${t}-${re.url}`)),G&&K&&e.length>1&&!W&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...K,left:k.left,cursor:"w-resize",pointerEvents:se?"none":"auto"},onClick:V=>{if(w.current){w.current=!1;return}V.stopPropagation(),a()}}),r.jsx("div",{style:{...K,left:k.left+k.width/2,cursor:"e-resize",pointerEvents:se?"none":"auto"},onClick:V=>{if(w.current){w.current=!1;return}V.stopPropagation(),d()}})]})]})}function lp(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function cp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:d}){const{prefix:c}=I.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:L=100,verticalGap:x,entriesCount:E,lightbox:m,imageDisplay:y,lightboxImageDisplay:C,slider:v,sliderTiming:$,direction:w,transition:N,titleMarginTop:A,subtitleMarginTop:k,titleColor:b,subtitleColor:P,lightboxCounterColor:U,titleFontFamily:f,titleFontSettings:R,titleFontSize:M,titleLineHeight:j,titleLetterSpacing:Q,titleWordSpacing:ue,titleTextAppearance:z,subtitleFontFamily:_,subtitleFontSettings:ee,subtitleFontSize:X,subtitleLineHeight:F,subtitleLetterSpacing:J,subtitleWordSpacing:oe,subtitleTextAppearance:re,lightboxCounterFontFamily:W,lightboxCounterFontSettings:se,lightboxCounterFontSize:h,lightboxCounterLineHeight:ae,lightboxCounterLetterSpacing:ye,lightboxCounterWordSpacing:he,lightboxCounterTextAppearance:Te,showText:G="always",alignEntries:le="off"}=e,D={fontSettings:{fontFamily:f,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:M??.01,lineHeight:j,letterSpacing:Q??0,wordSpacing:ue??0,textAppearance:z,color:b},O={...on(Nt(D,n))},ce={fontSettings:{fontFamily:_,fontWeight:(ee==null?void 0:ee.fontWeight)??400,fontStyle:(ee==null?void 0:ee.fontStyle)??"normal"},fontSize:X??.01,lineHeight:F,letterSpacing:J??0,wordSpacing:oe??0,textAppearance:re,color:P},$e={...on(Nt(ce,n))},Ee={fontSettings:{fontFamily:W,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ae,letterSpacing:ye??0,wordSpacing:he??0,textAppearance:Te,color:U},Me={...on(Nt(Ee,n)),...ir(h,ae,c,n)},K=nr(M,j,`${c}-item-title`,`${c}-text-tight-leading`),V=nr(X,F,`${c}-item-subtitle`,`${c}-text-tight-leading`),S=ir(M,j,c,n),B=ir(X,F,c,n),H=nr(h,ae,`${c}-lightbox-counter`,`${c}-text-tight-leading`),Z=I.buildColorVars(c,{titleColor:b,subtitleColor:P,lightboxCounterColor:U},dp,up),we=`${a&&a!=="default"?`${c}-state-${a}`:""}${G==="on hover"&&(!n||i)?` ${c}-show-text-hover`:""}`.trim(),Ce=E===0?1/0:E,Se=(t??[]).slice(0,Ce),Ke=u.entryWidth??.2,ge=(y==null?void 0:y.display)==="cover",We=(y==null?void 0:y.ratioValue)??"1:1",Ve=(y==null?void 0:y.reversed)??!1,[Ge,rt]=We.split(":").map(Number),Oe=`${Ve?rt:Ge} / ${Ve?Ge:rt}`,ft=I.scalingValue(Ke??0,n),ut=!ge&&v!=="off",St={width:ft,...ge?{aspectRatio:Oe,height:"auto",overflow:"hidden"}:{height:"auto"}},_t=`${c}-item-image-wrapper${ut?` ${c}-item-image-wrapper-fit-slider`:""}`.trim(),be=p==="c",De=be&&le==="on",Ye=`calc(${I.scalingValue(Ke??0,n)} * (${L} / 100))`,Qe=I.scalingValue(Ke*L/100,n),Ht=ge?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[$t,vt]=l.useState("ltr"),[kt,Wt]=l.useState(0),He=l.useRef(null);l.useEffect(()=>{const Ne=He.current;if(!Ne)return;const At=new ResizeObserver(de=>{Wt(Math.round(de[0].contentRect.width))});return At.observe(Ne),()=>At.disconnect()},[]);const Pt=(()=>{const Ne={...Z},At=He.current?getComputedStyle(He.current).getPropertyValue("--cntrl-article-width").trim():"";return At&&(Ne["--cntrl-article-width"]=At),Ne})(),[yt,nt]=l.useState(!1),[bt,Kt]=l.useState([]),[On,Ut]=l.useState(0),[Xt,et]=l.useState(null),sn=m==="on"&&(!n||i),Ot=(Ne,At,de)=>{if(n&&!i||m==="off")return;const xe=Ne.currentTarget.getBoundingClientRect();et({top:xe.top,left:xe.left,width:xe.width,height:xe.height}),Kt(At),Ut(de),nt(!0)};l.useEffect(()=>{if(!yt||m!=="on"||typeof document>"u")return;const Ne=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ne}},[yt,m]),l.useEffect(()=>{!n||i||(nt(!1),et(null))},[n,i]);const zt=l.useMemo(()=>Yu(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:zt}}),r.jsx("div",{style:Z,children:r.jsx("div",{ref:He,className:`${c}-wrapper ${c}-type-${p}${De?` ${c}-align-entries`:""} ${we}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:De?0:I.scalingValue(x??0,n),columnGap:I.scalingValue(u.horizontalGap??0,n),width:I.scalingValue(u.wrapperWidth??0,n),...De?{[`--${c}-align-entries-row-gap`]:I.scalingValue(x??0,n)}:{}},children:Se.map((Ne,At)=>{var gt;const de=La(Ne.title),xe=La(Ne.subtitle),_e=(((gt=Ne.link)==null?void 0:gt.length)??0)>0&&m==="off"?Ne.link:void 0,ze=Math.floor(At/u.columnsCount)===Math.ceil(Se.length/u.columnsCount)-1,it=be?r.jsxs("div",{className:`${c}-item-text-block`,children:[de&&r.jsx("p",{className:K,style:{width:Ye,...O,...S},children:Ne.title}),de&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:I.scalingValue(A??0,n),width:Qe}}),xe&&r.jsx("p",{className:V,style:{width:Ye,...$e,...B},children:Ne.subtitle}),xe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:I.scalingValue(k??0,n),width:Qe}})]}):null,Ct=be?r.jsxs("div",{className:`${c}-item-title-row`,children:[de&&r.jsx("p",{className:K,style:{width:Ye,...O,...S},children:Ne.title}),de&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:I.scalingValue(A??0,n),width:Qe}})]}):null,Fe=be?r.jsxs("div",{className:`${c}-item-subtitle-row`,children:[xe&&r.jsx("p",{className:V,style:{width:Ye,...$e,...B},children:Ne.subtitle}),xe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:I.scalingValue(k??0,n),width:Qe}})]}):null,pt=_e?r.jsxs("a",{href:_e,target:"_blank",className:`${c}-item-text-link`,children:[Ct,Fe]}):r.jsxs(r.Fragment,{children:[Ct,Fe]}),qe=ip(Ne.gallery),at=qe.filter(Be=>Be.lightboxMedia).map(Be=>Be.lightboxMedia),mt=r.jsx("div",{className:_t,style:St,children:qe.length===0?null:v==="off"?(()=>{const{displayMedia:Be,lightboxMedia:ht}=qe[0],Tt=ht?at.findIndex(xt=>xt.url===ht.url):-1;return r.jsx(Ea,{media:Be,className:`${c}-item-${Ei(Be)?"video":"image"}`.trim(),style:Ht,onMediaClick:sn&&Tt>=0?xt=>Ot(xt,at,Tt):void 0})})():r.jsxs(r.Fragment,{children:[ut&&r.jsx("div",{className:`${c}-item-image-wrapper-sizer`,"aria-hidden":"true",children:qe.map(({displayMedia:Be})=>Ei(Be)?r.jsx("video",{src:Be.url,muted:!0,playsInline:!0},`sizer-${Be.url}`):r.jsx("img",{src:Be.url,alt:""},`sizer-${Be.url}`))}),r.jsx(qr,{className:`${c}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:Ju,type:N==="fade"?"fade":"loop",rewind:N==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:N==="fade"?"ltr":w!=="random"?w==="horizontal"?"ltr":"ttb":$t},onMoved:Be=>{if(w!=="random"||N==="fade")return;const ht=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";vt(ht),setTimeout(()=>{Be.refresh()},0)},children:qe.map(({displayMedia:Be,lightboxMedia:ht},Tt)=>{const xt=ht?at.findIndex(Yt=>Yt.url===ht.url):-1;return r.jsx(Kr,{children:r.jsx(Ea,{media:Be,className:`${c}-item-${Ei(Be)?"video":"image"}`.trim(),style:Ht,onMediaClick:sn&&xt>=0?Yt=>Ot(Yt,at,xt):void 0})},Tt)})},`${N}-${Ke}-${w}-${$}-${kt}-${d}`)]})}),Ft=be?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&de?"titleMarginTop":void 0,className:o&&de?`${c}-control`:void 0,style:{height:de?I.scalingValue(A??0,n):0,width:Qe}}),r.jsx("p",{className:K,style:{width:Ye,...O,...S},children:Ne.title}),r.jsx("div",{"data-controls":o&&xe?"subtitleMarginTop":void 0,className:o&&xe?`${c}-control`:void 0,style:{height:xe?I.scalingValue(k??0,n):0,width:Qe}}),r.jsx("p",{className:V,style:{width:Ye,...$e,...B},children:Ne.subtitle})]});return r.jsx("div",{className:`${c}-item`.trim(),children:r.jsx("div",{className:`${o?`${c}-item-inner`:`${c}-item-inner-hidden`}${De&&ze?` ${c}-item-inner-last-row`:""}`.trim(),style:{width:(L??0)>100?`calc(${I.scalingValue(Ke??0,n)} * (${L} / 100))`:I.scalingValue(Ke??0,n)},children:De?r.jsxs(r.Fragment,{children:[pt,r.jsx("a",{href:_e,target:"_blank",className:`${c}-item-image-link`,children:mt})]}):r.jsxs("a",{href:_e,target:"_blank",className:`${c}-item-image-link`,children:[it,mt,Ft]})})},At)})})}),(!n||i)&&yt&&typeof document<"u"&&m==="on"&&Oi.createPortal(r.jsx("div",{style:Pt,"data-selection":"none",children:r.jsx(sp,{items:bt,index:On,imageDisplay:lp(C),originRect:Xt,reverseClose:v==="off",onClose:()=>nt(!1),onPrev:()=>Ut(Ne=>(Ne-1+bt.length)%bt.length),onNext:()=>Ut(Ne=>(Ne+1)%bt.length),counterClassName:H,counterStyle:Me})}),document.body)]})}const dp={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},up=["hover","focus","filled","success","error"],pp=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3849
3849
  import '@splidejs/react-splide/css/core';
3850
3850
  import { CommonComponentProps } from '../props';
3851
3851
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
@@ -5459,7 +5459,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5459
5459
  };
5460
5460
 
5461
5461
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5462
- `,ir={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},mp=["titleColor","subtitleColor","lightboxCounterColor"],gp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!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:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",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"]},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:"Gap",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"]}},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:{...ir.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:{...ir.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:{...ir.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:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",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:"a",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:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,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:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","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","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{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","sliderTiming"]},{type:"group",title:"",items:["direction","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:[...mp],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},hp={element:cp,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:[]},schema:gp,sourceCode:pp},Ea=12;function fp(e,t="50%"){const n={position:"absolute",width:Ea,height:Ea,pointerEvents:"auto"};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 Ft({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:fp(n,i)})})}function yp(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 vp({media:e,className:t,style:n}){const i=l.useRef(null);return l.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 vo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bp(e){return String(e??"").trim().length>0}function Ia(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 Pa(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 Ra(e,t,n,i,o,s,a){const d=E.scalingValue(s,a),c=E.scalingValue(0,a),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?d:c,borderBottomWidth:!u||i?d:c}}function xp(e,t,n){const i=E.scalingValue(t,n),o=E.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Aa=10;function wp(e){return`
5462
+ `,or={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},mp=["titleColor","subtitleColor","lightboxCounterColor"],gp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!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:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",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"]},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:"Gap",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"]}},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:{...or.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:{...or.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:{...or.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:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",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:"a",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:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,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:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","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","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{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","sliderTiming"]},{type:"group",title:"",items:["direction","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:[...mp],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},hp={element:cp,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:[]},schema:gp,sourceCode:pp},Ia=12;function fp(e,t="50%"){const n={position:"absolute",width:Ia,height:Ia,pointerEvents:"auto"};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 Bt({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:fp(n,i)})})}function yp(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 vp({media:e,className:t,style:n}){const i=l.useRef(null);return l.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 vo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bp(e){return String(e??"").trim().length>0}function Pa(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 Aa(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 Ra(e,t,n,i,o,s,a){const d=I.scalingValue(s,a),c=I.scalingValue(0,a),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?d:c,borderBottomWidth:!u||i?d:c}}function xp(e,t,n){const i=I.scalingValue(t,n),o=I.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ma=10;function wp(e){return`
5463
5463
  .${e}-wrapper {
5464
5464
  display: grid;
5465
5465
  align-items: start;
@@ -5890,7 +5890,7 @@ a.${e}-list-item {
5890
5890
  overflow-wrap: anywhere;
5891
5891
  word-break: break-word;
5892
5892
  }
5893
- `}const Wn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Kr=["AColumn","BColumn","CColumn","DColumn","EColumn"],Tn="cutLabel",Gr=[...Kr,Tn],zo=["A","B","C","D","E"];function Bs(e){return`${e}ColumnVerticalAlign`}const wr=["Top","Center","Bottom"];function Ur(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return zo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Sp(e){const t=Ur(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function $p(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return zo.includes(n)?n:null}function js(e,t,n){const i=$p(e);return i?i===t?!1:Sp(n[Bs(i)]):!0}function Fi(e){const t=Ur(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return zo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Cp(e,t,n){if(zs(e,t,n))return Fi(e);const i=Fi(e);return i.kind==="baseline"?{kind:"top"}:i}function Tp(e){const t=Fi(e);return t.kind==="baseline"?{kind:"top"}:t}function zs(e,t,n){return js(e,n,t)?Fi(e).kind==="baseline":!1}function Lp(e){const t={};let n=!1;for(const i of zo){const o=Bs(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}js(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Ep(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Ip(e){const t=Fi(e).kind;return t==="baseline"?"center":t}function Pp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ma(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Rp(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 or(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=Rp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-c)/2:e.kind==="bottom"&&(p=d.height-c),d.top-t+p+a}function Ap(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 Mp(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const _p={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ze(e,t){return`${e}${t.replace(/^text/,"Text")}`}const kp={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Wp(e){return[Ze(e,"textFontFamily"),Ze(e,"textFontSettings"),{type:"row",items:[Ze(e,"textFontSize"),Ze(e,"textLineHeight"),Ze(e,"textLetterSpacing"),Ze(e,"textWordSpacing")]},Ze(e,"textTextAlign"),Ze(e,"textTextAppearance"),`${e}VerticalAlign`]}function Fp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Gr.map(e=>[kp[e],Wp(e)]))}}function Io(e,t){const n=i=>{const o=Ze(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===Tn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function _a(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 Zt(_t(n,t))}function ka(e,t,n,i){const o=Io(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Wa(e,t,n,i){const o=Io(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((s-a)/2,i)}}const Qt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],hi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],fi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],yi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Np={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Hp=["hover","focus","filled","success","error"],Fa=.004,ai=.004,rr=ai,Xr=50,Ni=1440,Hi=Xr/Ni;function Vs(e){const t=typeof e=="number"&&e>0?e:Ni;return Xr/t}function Op(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 Ni}const Ds={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ii(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Bp(e,t=1){const n=t/e;return Object.fromEntries(Qt.map(i=>[i,n]))}function jp(){return Object.fromEntries([...hi.map(e=>[e,0]),...fi.map(e=>[e,0])])}function zp(){return Object.fromEntries(yi.map(e=>[e,0]))}function ro(e){return Object.fromEntries(Qt.map(t=>[t,typeof e[t]=="number"?e[t]:Ds[t]]))}function qs(e,t,n){const i=e-Hi,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 bo(e,t,n){const i=Yr(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Vp(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=hi[o],a=fi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[a]=="number"?n[a]:0,p=qs(t[o]??0,d,c);p.paddingLeft!==d&&(i[s]=p.paddingLeft),p.paddingRight!==c&&(i[a]=p.paddingRight)}return i}function Yr(e,t,n){if(e<=0)return[];const i=Qt.slice(0,e).map(p=>n[p]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((p,u)=>p+u,0)+Hi;if(t>=a)return i;const d=[...o];let c=a-t;for(let p=d.length-1;p>=0&&c>0;p-=1){const u=d[p]-Hi;if(u<=0)continue;const T=Math.min(c,u);d[p]-=T,c-=T}return[...d,i[e-1]]}function Dp(e,t,n){if(e<=1)return{};const i=Yr(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Qt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function Na(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Wn]}function qp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Kp(e,t,n,i){const o=Math.min(i,e.length,Qt.length),s={};for(let a=0;a<o;a+=1){const d=e[a],c=t.indexOf(d);if(c===-1)continue;const p=Qt[c],u=hi[c],T=fi[c],w=yi[c],L=Qt[a],m=hi[a],y=fi[a],C=yi[a],b=n[p],$=n[u],S=n[T],F=n[w];typeof b=="number"&&(s[L]=b),typeof $=="number"&&(s[m]=$),typeof S=="number"&&(s[y]=S),typeof F=="number"&&(s[C]=F)}return s}function Ks(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 Gp(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ii(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...Bp(n,o),...jp()};if(s)for(const d of yi)typeof t[d]=="number"&&(a[d]=t[d]);else Object.assign(a,zp());return Ks(e,a)?a:e}function Up(e,t,n){const i=Lp(e);i&&(e={...e,...i});const o=Vs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,d=Ii(e),c=Ii(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof s=="number"?s:typeof a=="number"?a:Wn.length,T=S=>{if(p)return S;const F=ro({...t,...S}),P=Ii(S),k=bo(u,P,F),x=Vp(u,k,{...t,...S});return Object.keys(x).length===0?S:{...S,...x}};if(typeof s=="number"&&s!==a)return e;const w=Na(e),L=Na(t);if(!qp(w,L))return T({...e,...Kp(w,L,t,u)});if(d<c&&typeof u=="number"&&!p){const S=ro({...t,...e});return T({...e,...Dp(u,d,S)})}if(p){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,F=Math.max(0,(d-o)/2);return S>F?{...e,textPaddingLR:F}:e}const m=ro({...t,...e}),y=bo(u,c,ro(t)),b=bo(u,d,m).some((S,F)=>S<(y[F]??S)),$=Qt.some(S=>{const F=e[S],P=t[S];return typeof F=="number"&&typeof P=="number"&&F!==P});return b||$?T(e):e}function Xp(e,t,n,i){const o=t.slice(0,e).reduce((a,d)=>a+d,0),s=n.slice(e+1,t.length-1).reduce((a,d)=>a+d,0);return Math.max(Hi,i-o-s-Hi)}function Yp(e,t){return Math.random()*(t-e)+e}function Jp(e){return Object.fromEntries(Qt.map(t=>[t,typeof e[t]=="number"?e[t]:Ds[t]]))}function ar(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Zp(e,t,n,i,o,s){return e.slice(0,t).map((a,d)=>{const c=hi[d],p=fi[d],u=yi[d];return{key:a,textPrefix:_p[a],widthKey:Qt[d],width:n[Qt[d]],paddingLeftKey:c,paddingRightKey:p,paddingBottomKey:u,paddingLeft:i[c],paddingRight:o[p],paddingBottom:s[u]}})}function Qp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:d}){const{prefix:c}=E.useScopedStyles(),p=!!o,{columns:u,type:T,wrapperWidth:w,entriesCount:L,cellMinHeight:m,dividerWidth:y,showVisibility:C,cut:b,showCut:$,cutCellMinHeight:S,cutLabel:F,imageSize:P,imageOnHover:k,entryHoverEffect:x,entryHoverShowOption:I,rowPaddingTop:G,rowPaddingBottom:f,rowPaddingTopB:R,columnsOrder:M,textPaddingLR:j,textColor:Z,backgroundColor:ue,dividerColor:V,textHoverColor:_,backgroundHoverColor:Q,dividerHoverColor:U}=e,[H,J]=l.useState(void 0),[oe,ie]=l.useState(null),W=k==="on"&&(!n||i),ae=(b??0)>0,g=T==="b",te=l.useRef(null),ye=l.useRef(null),[me,_e]=l.useState(null),[X,de]=l.useState(Ni),K=Vs(X),B=Math.max(0,((w??0)-K)/2),N=Math.min(j??0,B),re=Math.max(N,ai),$e=((w??0)+K)/2;l.useLayoutEffect(()=>{if(!n){de(Ni);return}const le=()=>{de(Op(te.current))};le();const be=te.current;if(!be)return;const Pe=new ResizeObserver(le);Pe.observe(be);let Ve=be;for(;Ve&&!Ve.style.getPropertyValue("--cntrl-article-width");)Ve=Ve.parentElement;return Ve&&Pe.observe(Ve),()=>Pe.disconnect()},[n,a]),l.useEffect(()=>{J(void 0)},[b,$,t,L]),l.useEffect(()=>{n&&!i&&J(void 0)},[n,i]);const Ne=E.buildColorVars(c,{textColor:Z,backgroundColor:ue,dividerColor:V,textHoverColor:_,backgroundHoverColor:Q,dividerHoverColor:U},Np,Hp),Ie=s&&s!=="default"?`${c}-state-${s}`:"",Fe=`${!n||i?x==="default"?`${c}-entry-hover-default`:x==="blinds"?`${c}-entry-hover-blinds`:x==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Ie}`.trim(),z=x==="reveal"&&(!n||i),q=(C==null?void 0:C[0])??!1,v=(C==null?void 0:C[1])??!1,D=l.useRef(e),O=l.useRef(a);l.useEffect(()=>{if(!d||!n){D.current=e,O.current=a;return}if(O.current!==a){D.current=e,O.current=a;return}const le=D.current;if(!(le!==e))return;if(typeof le.columns=="number"&&typeof e.columns=="number"&&le.columns!==e.columns){D.current=e;return}const Pe=Up(e,le,{designWidth:X});D.current=e,Ks(e,Pe)&&d(Pe)},[e,d,n,a,X]);const ee=l.useMemo(()=>Jp(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),se=l.useMemo(()=>ar(e,hi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),pe=l.useMemo(()=>ar(e,fi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ce=l.useMemo(()=>ar(e,yi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),we=l.useMemo(()=>Array.isArray(M)&&M.length>0?M:[...Wn],[M]),ve=l.useMemo(()=>Zp(we,u,ee,se,pe,Ce),[we,u,ee,se,pe,Ce]),Ge=Ii(e),ge=l.useMemo(()=>Qt.slice(0,u).map(le=>ee[le]),[u,ee]),ke=l.useMemo(()=>Yr(u,Ge,ee),[u,Ge,ee]),ze=l.useMemo(()=>bo(u,Ge,ee),[u,Ge,ee]),Le=l.useMemo(()=>ve.map((le,be)=>qs(ze[be]??0,le.paddingLeft,le.paddingRight)),[ve,ze]),ot=l.useMemo(()=>{const le=L===0?1/0:L;return(t??[]).slice(0,le).map((Pe,Ve)=>({id:Ve,cells:Object.fromEntries(Wn.map(ht=>[ht,Pe[ht]??""])),image:Pe.image,link:Pe.link}))},[t,L]),tt=ae?H??b:ot.length,yt=l.useMemo(()=>ae?ot.slice(0,tt):ot,[ot,ae,tt]),Ke=ae&&tt<ot.length,st=yt.length>1||Ke,Ct=[q?`${c}-divider-top`:"",v||st?`${c}-divider-bottom`:""].filter(Boolean).join(" "),It=!n||i,Rt=()=>{if(!It)return;const le=H??b;if(!$){J(ot.length);return}J(Math.min(le+$,ot.length))},Se=le=>E.scalingValue(le,n??!1),He=g?R??0:G??0,Xe=f??0,Ue=m??0,Nt=He+Ue/2,Ot=Math.max(Xe,rr),Ht=Ra(0,yt.length,q,v,Ke,y??0,n??!1).borderTopWidth,zt=me!=null?`${me}px`:`calc(${Ht} + ${Se(Nt)})`,dn=g?"rowPaddingTopB":"rowPaddingTop",Oe=ve[0],Tt=ve[ve.length-1],lt=Le[0],et=Le[Le.length-1],gt=Oe&&lt?Math.max(lt.paddingLeft,ai):0,qt=Tt&&et?Math.max(et.paddingRight,ai):0,Kt=Ge,tn=le=>{const be=te.current;if(!be)return{x:0,y:0};const Pe=be.getBoundingClientRect();return{x:le.clientX-Pe.left+Aa,y:le.clientY-Pe.top+Aa}},hn=(le,be)=>{if(!W)return;const Pe=le.image;if(!(Pe!=null&&Pe.url)){ie(null);return}const{x:Ve,y:ht}=tn(be),wt=(P==null?void 0:P.min)??80,Me=(P==null?void 0:P.max)??320,ft=(oe==null?void 0:oe.rowId)===le.id?oe.widthPx:Yp(wt,Me);ie({rowId:le.id,url:Pe.url,objectFit:"contain",isVideo:yp(Pe),widthPx:ft,x:Ve,y:ht})},Ye=le=>{if(!W||!oe)return;const{x:be,y:Pe}=tn(le);ie(Ve=>!Ve||Ve.x===be&&Ve.y===Pe?Ve:{...Ve,x:be,y:Pe})},nn=()=>{ie(null)},At=le=>{z&&Ia(le,c),W&&ie(null)},kt=le=>{z&&Pa(le,c)};l.useLayoutEffect(()=>{if(!p||g){_e(null);return}const le=ye.current,be=le==null?void 0:le.parentElement;if(!le||!be){_e(null);return}const Pe=()=>{const ht=le.querySelector("[data-list-row]");if(!ht){_e(null);return}const wt=be.getBoundingClientRect(),Me=ht.getBoundingClientRect();_e(Me.top-wt.top+Me.height/2)};Pe();const Ve=new ResizeObserver(Pe);return Ve.observe(le),Ve.observe(be),()=>Ve.disconnect()},[p,g,yt,He,Xe,Ue,t,e,ve,ze,X,y,q,v,Ke]);const De=l.useMemo(()=>!g&&Kr.some(le=>{const be=le.charAt(0),Pe=e[`${le}VerticalAlign`];return zs(Pe,e,be)}),[g,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);l.useLayoutEffect(()=>{var ft;const le=te.current;if(!le)return;const be=()=>{le.querySelectorAll("[data-list-col]").forEach(qe=>{qe.style.transform="";const rt=qe.querySelector(`.${c}-list-col`);rt&&(rt.style.minHeight="",rt.style.height="");const Qe=qe.querySelector(`.${c}-list-col-title`);Qe&&(Qe.style.transform="")})};if(g||!De){be();return}const Pe=()=>{const qe=Array.from(le.querySelectorAll("[data-list-row]")),rt=`${c}-list-col`,Qe=`${c}-baseline-probe`;qe.forEach(Pt=>{Pt.querySelectorAll("[data-list-col]").forEach(St=>{St.style.transform="";const Be=St.querySelector(`.${rt}`);Be&&(Be.style.minHeight="",Be.style.height="");const xt=St.querySelector(`.${c}-list-col-title`);xt&&(xt.style.transform="")})}),qe.forEach(Pt=>{const St=Array.from(Pt.querySelectorAll("[data-list-col]"));Ap(Pt,St,rt)}),le.offsetHeight,qe.forEach(Pt=>{const St=Array.from(Pt.querySelectorAll("[data-list-col]")),Be=Pt.getBoundingClientRect().top,xt=new Map,at=St.map(nt=>{const Bt=nt.querySelector(`.${c}-list-col-title`),on={el:nt,titleEl:Bt,letter:nt.getAttribute("data-col-letter")??"",kind:nt.getAttribute("data-valign")??"top",anchor:nt.getAttribute("data-valign-anchor")};return xt.set(on.letter,on),on}),vt=new Map,Mt=(nt,Bt)=>{const on=vt.get(nt.letter);if(on!==void 0)return on;const fn=nt.anchor?xt.get(nt.anchor):void 0;if(nt.kind!=="baseline"||!fn||Bt.has(nt.letter)){const vn=or(nt,Be,rt,Qe);return vt.set(nt.letter,vn),vn}Bt.add(nt.letter);const Pn=Mt(fn,Bt);Bt.delete(nt.letter);const yn=or(nt,Be,rt,Qe),On=Pn-yn;Mp(nt.titleEl,On);const Bn=or(nt,Be,rt,Qe);return vt.set(nt.letter,Bn),Bn};at.forEach(nt=>Mt(nt,new Set))})};let Ve=null;const ht=()=>{Ve===null&&(Ve=requestAnimationFrame(()=>{Ve=null,Pe()}))};Pe();const wt=new ResizeObserver(()=>ht());wt.observe(le);let Me=!1;return typeof document<"u"&&((ft=document.fonts)!=null&&ft.ready)&&document.fonts.ready.then(()=>{Me||ht()}),()=>{Me=!0,Ve!==null&&(cancelAnimationFrame(Ve),Ve=null),wt.disconnect(),be()}},[De,g,e,t,X,yt,ze]);const Wt=l.useMemo(()=>wp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Wt}}),r.jsx("div",{style:Ne,children:r.jsxs("div",{ref:te,className:`${c}-wrapper ${Fe}${Ct?` ${Ct}`:""}${g?` ${c}-type-b`:""}`.trim(),style:{width:E.scalingValue(w??0,n),...!g&&p?{[`--${c}-first-entry-handle-top`]:zt}:{}},onMouseMove:W?Ye:void 0,onMouseLeave:W?nn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[yt.map((le,be)=>{var wt;const Pe=(((wt=le.link)==null?void 0:wt.length)??0)>0,Ve=Pe&&(!n||i)?"a":"div",ht=Ra(be,yt.length,q,v,Ke,y??0,n??!1);return r.jsxs(Ve,{ref:be===0?Me=>{ye.current=Me}:void 0,className:`${c}-list-item${Pe||I==="always"?` ${c}-list-item-has-link`:""}`,...Pe?{href:le.link,target:"_blank"}:{},style:ht,onMouseEnter:Me=>{z&&(Pe||I==="always")&&Ia(Me,c),W&&hn(le,Me)},onMouseLeave:Me=>{z&&(Pe||I==="always")&&Pa(Me,c)},children:[He>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Se(He)}}),r.jsxs("div",{className:`${c}-list-cols-row${g?"":` ${c}-list-cols-row-h`}${p&&be===0&&g?` ${c}-list-cols-row-controls`:""}`,...g?{}:{"data-list-row":""},style:g?void 0:{minHeight:Se(Ue)},children:[ve.map((Me,ft)=>{const qe=ft===ve.length-1,rt=Le[ft],Qe=Me.paddingBottom,Pt=bp(le.cells[Me.key]),St=g&&Pt&&Qe>0,Be=g?{minHeight:Se(Ue)}:{width:Se(ze[ft])},xt=g?{paddingLeft:Se(N),paddingRight:Se(N)}:{paddingLeft:Se(rt.paddingLeft),paddingRight:Se(rt.paddingRight)},at=Me.textPrefix.charAt(0),vt=g?Tp(e[`${Me.textPrefix}VerticalAlign`]):Cp(e[`${Me.textPrefix}VerticalAlign`],e,at),Mt=g&&Pt&&p&&be===0;return r.jsxs("div",{className:g?`${c}-list-col-wrap`:void 0,...g?{}:{"data-list-col":"","data-col-letter":at,"data-valign":vt.kind,...vt.kind==="baseline"?{"data-valign-anchor":vt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${qe?` ${c}-list-col-last`:""}`,style:{...xt,...Be,...g?{justifyContent:Ma(vt.kind)}:{}},"data-test":Me.width,children:r.jsx("span",{className:ka(e,Me.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{..._a(Io(e,Me.textPrefix),n),...Wa(e,Me.textPrefix,c,n),...g?{}:Ep(vt.kind)},children:le.cells[Me.key]??null})}),St&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Se(Qe)}}),Mt&&r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Me.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:Se(Math.max(Qe,rr))}})]},Me.key)}),p&&be===0&&g&&r.jsxs(r.Fragment,{children:[r.jsx(Ft,{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($e),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Se(re),height:"100%"}}),r.jsx(Ft,{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($e),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Se(Math.max(re,Ge-re)),width:Se(re),height:"100%"}})]})]}),!g&&Xe>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Se(Xe)}}),p&&be===0&&!g&&r.jsx(Ft,{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:Se(Ot)}})]},le.id)}),p&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":dn,"data-controls-static-handle":"",...g?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:g?"center":"left-y",areaStyle:{position:"absolute",top:Ht,left:0,width:"100%",height:Se(Math.max(He,rr))}})},"row-padding-handles"),p&&!g&&Oe&&Tt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Oe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[0]-((lt==null?void 0:lt.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Se(gt),height:"100%"}}),r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Tt.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(ze[ve.length-1]-((et==null?void 0:et.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(Kt-qt),width:Se(qt),height:"100%"}})]},"column-edge-padding-handles"),p&&!g&&ve.slice(0,-1).map((le,be)=>{const Pe=ve[be+1],Ve=ke.slice(0,be+1).reduce((qe,rt)=>qe+rt,0),ht=Le[be],wt=Le[be+1],Me=Math.max(ht.paddingRight,ai),ft=Math.max(wt.paddingLeft,ai);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":le.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(ze[be]-ht.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(Ve-Me),width:Se(Me),height:"100%"}}),r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Pe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[be+1]-wt.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(Ve),width:Se(ft),height:"100%"}})]},`${le.paddingRightKey}-padding`)}),p&&!g&&ve.slice(0,-1).map((le,be)=>{const Pe=Xp(be,ke,ge,Ge),ht=ke.slice(0,be+1).reduce((wt,Me)=>wt+Me,0)-Fa/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":le.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Xr),"data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Se(ht),width:Se(Fa),height:"calc(100%)",pointerEvents:"auto"}})},`${le.widthKey}-junction`)})]}),Ke&&(()=>{const le=Io(e,Tn),be=Ip(e.cutLabelVerticalAlign),Pe=le.textTextAlign==="justify"||g;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Se(S??0),cursor:It?"pointer":"default",...xp(v,y??0,n??!1)},onClick:It?Rt:void 0,onMouseEnter:z||W?At:void 0,onMouseLeave:z?kt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...g?{paddingLeft:Se(N),paddingRight:Se(N)}:{},justifyContent:Pp(le.textTextAlign),alignItems:Ma(be)},children:r.jsx("span",{className:ka(e,Tn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{..._a(le,n),...Wa(e,Tn,c,n),...Pe?{width:"100%"}:{}},children:F})})})})(),W&&oe&&(()=>{const le=vo(oe.widthPx),be={width:le,height:"auto",maxHeight:le,objectFit:"contain",left:oe.x,top:oe.y,position:"absolute"};return r.jsx(vp,{media:oe,className:oe.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:be},`${oe.rowId}-${oe.url}`)})()]})})]})}const em=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
5893
+ `}const Wn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Gr=["AColumn","BColumn","CColumn","DColumn","EColumn"],Sn="cutLabel",Ur=[...Gr,Sn],zo=["A","B","C","D","E"];function js(e){return`${e}ColumnVerticalAlign`}const Sr=["Top","Center","Bottom"];function Xr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return zo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Sp(e){const t=Xr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function $p(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return zo.includes(n)?n:null}function zs(e,t,n){const i=$p(e);return i?i===t?!1:Sp(n[js(i)]):!0}function Fi(e){const t=Xr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return zo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Cp(e,t,n){if(Vs(e,t,n))return Fi(e);const i=Fi(e);return i.kind==="baseline"?{kind:"top"}:i}function Tp(e){const t=Fi(e);return t.kind==="baseline"?{kind:"top"}:t}function Vs(e,t,n){return zs(e,n,t)?Fi(e).kind==="baseline":!1}function Lp(e){const t={};let n=!1;for(const i of zo){const o=js(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}zs(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Ep(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Ip(e){const t=Fi(e).kind;return t==="baseline"?"center":t}function Pp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function _a(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Ap(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 rr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=Ap(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-c)/2:e.kind==="bottom"&&(p=d.height-c),d.top-t+p+a}function Rp(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 Mp(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const _p={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Je(e,t){return`${e}${t.replace(/^text/,"Text")}`}const kp={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Wp(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),{type:"row",items:[Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing")]},Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function Fp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ur.map(e=>[kp[e],Wp(e)]))}}function Io(e,t){const n=i=>{const o=Je(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===Sn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function ka(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 on(Nt(n,t))}function Wa(e,t,n,i){const o=Io(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Fa(e,t,n,i){const o=Io(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:I.scalingValue((s-a)/2,i)}}const rn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],fi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],yi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],vi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Np={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Hp=["hover","focus","filled","success","error"],Na=.004,si=.004,ar=si,Yr=50,Ni=1440,Hi=Yr/Ni;function Ds(e){const t=typeof e=="number"&&e>0?e:Ni;return Yr/t}function Op(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 Ni}const qs={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ii(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Bp(e,t=1){const n=t/e;return Object.fromEntries(rn.map(i=>[i,n]))}function jp(){return Object.fromEntries([...fi.map(e=>[e,0]),...yi.map(e=>[e,0])])}function zp(){return Object.fromEntries(vi.map(e=>[e,0]))}function ro(e){return Object.fromEntries(rn.map(t=>[t,typeof e[t]=="number"?e[t]:qs[t]]))}function Ks(e,t,n){const i=e-Hi,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 bo(e,t,n){const i=Jr(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Vp(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=fi[o],a=yi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[a]=="number"?n[a]:0,p=Ks(t[o]??0,d,c);p.paddingLeft!==d&&(i[s]=p.paddingLeft),p.paddingRight!==c&&(i[a]=p.paddingRight)}return i}function Jr(e,t,n){if(e<=0)return[];const i=rn.slice(0,e).map(p=>n[p]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((p,u)=>p+u,0)+Hi;if(t>=a)return i;const d=[...o];let c=a-t;for(let p=d.length-1;p>=0&&c>0;p-=1){const u=d[p]-Hi;if(u<=0)continue;const L=Math.min(c,u);d[p]-=L,c-=L}return[...d,i[e-1]]}function Dp(e,t,n){if(e<=1)return{};const i=Jr(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=rn[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function Ha(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Wn]}function qp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Kp(e,t,n,i){const o=Math.min(i,e.length,rn.length),s={};for(let a=0;a<o;a+=1){const d=e[a],c=t.indexOf(d);if(c===-1)continue;const p=rn[c],u=fi[c],L=yi[c],x=vi[c],E=rn[a],m=fi[a],y=yi[a],C=vi[a],v=n[p],$=n[u],w=n[L],N=n[x];typeof v=="number"&&(s[E]=v),typeof $=="number"&&(s[m]=$),typeof w=="number"&&(s[y]=w),typeof N=="number"&&(s[C]=N)}return s}function Gs(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 Gp(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ii(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...Bp(n,o),...jp()};if(s)for(const d of vi)typeof t[d]=="number"&&(a[d]=t[d]);else Object.assign(a,zp());return Gs(e,a)?a:e}function Up(e,t,n){const i=Lp(e);i&&(e={...e,...i});const o=Ds(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,d=Ii(e),c=Ii(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof s=="number"?s:typeof a=="number"?a:Wn.length,L=w=>{if(p)return w;const N=ro({...t,...w}),A=Ii(w),k=bo(u,A,N),b=Vp(u,k,{...t,...w});return Object.keys(b).length===0?w:{...w,...b}};if(typeof s=="number"&&s!==a)return e;const x=Ha(e),E=Ha(t);if(!qp(x,E))return L({...e,...Kp(x,E,t,u)});if(d<c&&typeof u=="number"&&!p){const w=ro({...t,...e});return L({...e,...Dp(u,d,w)})}if(p){const w=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,N=Math.max(0,(d-o)/2);return w>N?{...e,textPaddingLR:N}:e}const m=ro({...t,...e}),y=bo(u,c,ro(t)),v=bo(u,d,m).some((w,N)=>w<(y[N]??w)),$=rn.some(w=>{const N=e[w],A=t[w];return typeof N=="number"&&typeof A=="number"&&N!==A});return v||$?L(e):e}function Xp(e,t,n,i){const o=t.slice(0,e).reduce((a,d)=>a+d,0),s=n.slice(e+1,t.length-1).reduce((a,d)=>a+d,0);return Math.max(Hi,i-o-s-Hi)}function Yp(e,t){return Math.random()*(t-e)+e}function Jp(e){return Object.fromEntries(rn.map(t=>[t,typeof e[t]=="number"?e[t]:qs[t]]))}function sr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Zp(e,t,n,i,o,s){return e.slice(0,t).map((a,d)=>{const c=fi[d],p=yi[d],u=vi[d];return{key:a,textPrefix:_p[a],widthKey:rn[d],width:n[rn[d]],paddingLeftKey:c,paddingRightKey:p,paddingBottomKey:u,paddingLeft:i[c],paddingRight:o[p],paddingBottom:s[u]}})}function Qp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:d}){const{prefix:c}=I.useScopedStyles(),p=!!o,{columns:u,type:L,wrapperWidth:x,entriesCount:E,cellMinHeight:m,dividerWidth:y,showVisibility:C,cut:v,showCut:$,cutCellMinHeight:w,cutLabel:N,imageSize:A,imageOnHover:k,entryHoverEffect:b,entryHoverShowOption:P,rowPaddingTop:U,rowPaddingBottom:f,rowPaddingTopB:R,columnsOrder:M,textPaddingLR:j,textColor:Q,backgroundColor:ue,dividerColor:z,textHoverColor:_,backgroundHoverColor:ee,dividerHoverColor:X}=e,[F,J]=l.useState(void 0),[oe,re]=l.useState(null),W=k==="on"&&(!n||i),se=(v??0)>0,h=L==="b",ae=l.useRef(null),ye=l.useRef(null),[he,Te]=l.useState(null),[G,le]=l.useState(Ni),D=Ds(G),te=Math.max(0,((x??0)-D)/2),O=Math.min(j??0,te),ce=Math.max(O,si),ke=((x??0)+D)/2;l.useLayoutEffect(()=>{if(!n){le(Ni);return}const de=()=>{le(Op(ae.current))};de();const xe=ae.current;if(!xe)return;const _e=new ResizeObserver(de);_e.observe(xe);let ze=xe;for(;ze&&!ze.style.getPropertyValue("--cntrl-article-width");)ze=ze.parentElement;return ze&&_e.observe(ze),()=>_e.disconnect()},[n,a]),l.useEffect(()=>{J(void 0)},[v,$,t,E]),l.useEffect(()=>{n&&!i&&J(void 0)},[n,i]);const $e=I.buildColorVars(c,{textColor:Q,backgroundColor:ue,dividerColor:z,textHoverColor:_,backgroundHoverColor:ee,dividerHoverColor:X},Np,Hp),Ee=s&&s!=="default"?`${c}-state-${s}`:"",Me=`${!n||i?b==="default"?`${c}-entry-hover-default`:b==="blinds"?`${c}-entry-hover-blinds`:b==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Ee}`.trim(),K=b==="reveal"&&(!n||i),V=(C==null?void 0:C[0])??!1,S=(C==null?void 0:C[1])??!1,B=l.useRef(e),H=l.useRef(a);l.useEffect(()=>{if(!d||!n){B.current=e,H.current=a;return}if(H.current!==a){B.current=e,H.current=a;return}const de=B.current;if(!(de!==e))return;if(typeof de.columns=="number"&&typeof e.columns=="number"&&de.columns!==e.columns){B.current=e;return}const _e=Up(e,de,{designWidth:G});B.current=e,Gs(e,_e)&&d(_e)},[e,d,n,a,G]);const Z=l.useMemo(()=>Jp(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ne=l.useMemo(()=>sr(e,fi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),me=l.useMemo(()=>sr(e,yi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),we=l.useMemo(()=>sr(e,vi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Ce=l.useMemo(()=>Array.isArray(M)&&M.length>0?M:[...Wn],[M]),Se=l.useMemo(()=>Zp(Ce,u,Z,ne,me,we),[Ce,u,Z,ne,me,we]),Ke=Ii(e),ge=l.useMemo(()=>rn.slice(0,u).map(de=>Z[de]),[u,Z]),We=l.useMemo(()=>Jr(u,Ke,Z),[u,Ke,Z]),Ve=l.useMemo(()=>bo(u,Ke,Z),[u,Ke,Z]),Ge=l.useMemo(()=>Se.map((de,xe)=>Ks(Ve[xe]??0,de.paddingLeft,de.paddingRight)),[Se,Ve]),rt=l.useMemo(()=>{const de=E===0?1/0:E;return(t??[]).slice(0,de).map((_e,ze)=>({id:ze,cells:Object.fromEntries(Wn.map(it=>[it,_e[it]??""])),image:_e.image,link:_e.link}))},[t,E]),It=se?F??v:rt.length,Mt=l.useMemo(()=>se?rt.slice(0,It):rt,[rt,se,It]),Oe=se&&It<rt.length,ft=Mt.length>1||Oe,ut=[V?`${c}-divider-top`:"",S||ft?`${c}-divider-bottom`:""].filter(Boolean).join(" "),St=!n||i,_t=()=>{if(!St)return;const de=F??v;if(!$){J(rt.length);return}J(Math.min(de+$,rt.length))},be=de=>I.scalingValue(de,n??!1),De=h?R??0:U??0,Ye=f??0,Qe=m??0,Ht=De+Qe/2,$t=Math.max(Ye,ar),vt=Ra(0,Mt.length,V,S,Oe,y??0,n??!1).borderTopWidth,kt=he!=null?`${he}px`:`calc(${vt} + ${be(Ht)})`,Wt=h?"rowPaddingTopB":"rowPaddingTop",He=Se[0],Pt=Se[Se.length-1],yt=Ge[0],nt=Ge[Ge.length-1],bt=He&&yt?Math.max(yt.paddingLeft,si):0,Kt=Pt&&nt?Math.max(nt.paddingRight,si):0,On=Ke,Ut=de=>{const xe=ae.current;if(!xe)return{x:0,y:0};const _e=xe.getBoundingClientRect();return{x:de.clientX-_e.left+Ma,y:de.clientY-_e.top+Ma}},Xt=(de,xe)=>{if(!W)return;const _e=de.image;if(!(_e!=null&&_e.url)){re(null);return}const{x:ze,y:it}=Ut(xe),Ct=(A==null?void 0:A.min)??80,Fe=(A==null?void 0:A.max)??320,pt=(oe==null?void 0:oe.rowId)===de.id?oe.widthPx:Yp(Ct,Fe);re({rowId:de.id,url:_e.url,objectFit:"contain",isVideo:yp(_e),widthPx:pt,x:ze,y:it})},et=de=>{if(!W||!oe)return;const{x:xe,y:_e}=Ut(de);re(ze=>!ze||ze.x===xe&&ze.y===_e?ze:{...ze,x:xe,y:_e})},sn=()=>{re(null)},Ot=de=>{K&&Pa(de,c),W&&re(null)},zt=de=>{K&&Aa(de,c)};l.useLayoutEffect(()=>{if(!p||h){Te(null);return}const de=ye.current,xe=de==null?void 0:de.parentElement;if(!de||!xe){Te(null);return}const _e=()=>{const it=de.querySelector("[data-list-row]");if(!it){Te(null);return}const Ct=xe.getBoundingClientRect(),Fe=it.getBoundingClientRect();Te(Fe.top-Ct.top+Fe.height/2)};_e();const ze=new ResizeObserver(_e);return ze.observe(de),ze.observe(xe),()=>ze.disconnect()},[p,h,Mt,De,Ye,Qe,t,e,Se,Ve,G,y,V,S,Oe]);const Ne=l.useMemo(()=>!h&&Gr.some(de=>{const xe=de.charAt(0),_e=e[`${de}VerticalAlign`];return Vs(_e,e,xe)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);l.useLayoutEffect(()=>{var pt;const de=ae.current;if(!de)return;const xe=()=>{de.querySelectorAll("[data-list-col]").forEach(qe=>{qe.style.transform="";const at=qe.querySelector(`.${c}-list-col`);at&&(at.style.minHeight="",at.style.height="");const mt=qe.querySelector(`.${c}-list-col-title`);mt&&(mt.style.transform="")})};if(h||!Ne){xe();return}const _e=()=>{const qe=Array.from(de.querySelectorAll("[data-list-row]")),at=`${c}-list-col`,mt=`${c}-baseline-probe`;qe.forEach(Ft=>{Ft.querySelectorAll("[data-list-col]").forEach(gt=>{gt.style.transform="";const Be=gt.querySelector(`.${at}`);Be&&(Be.style.minHeight="",Be.style.height="");const ht=gt.querySelector(`.${c}-list-col-title`);ht&&(ht.style.transform="")})}),qe.forEach(Ft=>{const gt=Array.from(Ft.querySelectorAll("[data-list-col]"));Rp(Ft,gt,at)}),de.offsetHeight,qe.forEach(Ft=>{const gt=Array.from(Ft.querySelectorAll("[data-list-col]")),Be=Ft.getBoundingClientRect().top,ht=new Map,Tt=gt.map(Ze=>{const Jt=Ze.querySelector(`.${c}-list-col-title`),jt={el:Ze,titleEl:Jt,letter:Ze.getAttribute("data-col-letter")??"",kind:Ze.getAttribute("data-valign")??"top",anchor:Ze.getAttribute("data-valign-anchor")};return ht.set(jt.letter,jt),jt}),xt=new Map,Yt=(Ze,Jt)=>{const jt=xt.get(Ze.letter);if(jt!==void 0)return jt;const Zt=Ze.anchor?ht.get(Ze.anchor):void 0;if(Ze.kind!=="baseline"||!Zt||Jt.has(Ze.letter)){const Jn=rr(Ze,Be,at,mt);return xt.set(Ze.letter,Jn),Jn}Jt.add(Ze.letter);const mn=Yt(Zt,Jt);Jt.delete(Ze.letter);const Ln=rr(Ze,Be,at,mt),yn=mn-Ln;Mp(Ze.titleEl,yn);const En=rr(Ze,Be,at,mt);return xt.set(Ze.letter,En),En};Tt.forEach(Ze=>Yt(Ze,new Set))})};let ze=null;const it=()=>{ze===null&&(ze=requestAnimationFrame(()=>{ze=null,_e()}))};_e();const Ct=new ResizeObserver(()=>it());Ct.observe(de);let Fe=!1;return typeof document<"u"&&((pt=document.fonts)!=null&&pt.ready)&&document.fonts.ready.then(()=>{Fe||it()}),()=>{Fe=!0,ze!==null&&(cancelAnimationFrame(ze),ze=null),Ct.disconnect(),xe()}},[Ne,h,e,t,G,Mt,Ve]);const At=l.useMemo(()=>wp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:At}}),r.jsx("div",{style:$e,children:r.jsxs("div",{ref:ae,className:`${c}-wrapper ${Me}${ut?` ${ut}`:""}${h?` ${c}-type-b`:""}`.trim(),style:{width:I.scalingValue(x??0,n),...!h&&p?{[`--${c}-first-entry-handle-top`]:kt}:{}},onMouseMove:W?et:void 0,onMouseLeave:W?sn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Mt.map((de,xe)=>{var Ct;const _e=(((Ct=de.link)==null?void 0:Ct.length)??0)>0,ze=_e&&(!n||i)?"a":"div",it=Ra(xe,Mt.length,V,S,Oe,y??0,n??!1);return r.jsxs(ze,{ref:xe===0?Fe=>{ye.current=Fe}:void 0,className:`${c}-list-item${_e||P==="always"?` ${c}-list-item-has-link`:""}`,..._e?{href:de.link,target:"_blank"}:{},style:it,onMouseEnter:Fe=>{K&&(_e||P==="always")&&Pa(Fe,c),W&&Xt(de,Fe)},onMouseLeave:Fe=>{K&&(_e||P==="always")&&Aa(Fe,c)},children:[De>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:be(De)}}),r.jsxs("div",{className:`${c}-list-cols-row${h?"":` ${c}-list-cols-row-h`}${p&&xe===0&&h?` ${c}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:be(Qe)},children:[Se.map((Fe,pt)=>{const qe=pt===Se.length-1,at=Ge[pt],mt=Fe.paddingBottom,Ft=bp(de.cells[Fe.key]),gt=h&&Ft&&mt>0,Be=h?{minHeight:be(Qe)}:{width:be(Ve[pt])},ht=h?{paddingLeft:be(O),paddingRight:be(O)}:{paddingLeft:be(at.paddingLeft),paddingRight:be(at.paddingRight)},Tt=Fe.textPrefix.charAt(0),xt=h?Tp(e[`${Fe.textPrefix}VerticalAlign`]):Cp(e[`${Fe.textPrefix}VerticalAlign`],e,Tt),Yt=h&&Ft&&p&&xe===0;return r.jsxs("div",{className:h?`${c}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":Tt,"data-valign":xt.kind,...xt.kind==="baseline"?{"data-valign-anchor":xt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${qe?` ${c}-list-col-last`:""}`,style:{...ht,...Be,...h?{justifyContent:_a(xt.kind)}:{}},"data-test":Fe.width,children:r.jsx("span",{className:Wa(e,Fe.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...ka(Io(e,Fe.textPrefix),n),...Fa(e,Fe.textPrefix,c,n),...h?{}:Ep(xt.kind)},children:de.cells[Fe.key]??null})}),gt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:be(mt)}}),Yt&&r.jsx(Bt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Fe.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:be(Math.max(mt,ar))}})]},Fe.key)}),p&&xe===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx(Bt,{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(ke),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:be(ce),height:"100%"}}),r.jsx(Bt,{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(ke),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:be(Math.max(ce,Ke-ce)),width:be(ce),height:"100%"}})]})]}),!h&&Ye>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:be(Ye)}}),p&&xe===0&&!h&&r.jsx(Bt,{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:be($t)}})]},de.id)}),p&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Bt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Wt,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:vt,left:0,width:"100%",height:be(Math.max(De,ar))}})},"row-padding-handles"),p&&!h&&He&&Pt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Bt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":He.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ve[0]-((yt==null?void 0:yt.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:be(bt),height:"100%"}}),r.jsx(Bt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Pt.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(Ve[Se.length-1]-((nt==null?void 0:nt.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:be(On-Kt),width:be(Kt),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&Se.slice(0,-1).map((de,xe)=>{const _e=Se[xe+1],ze=We.slice(0,xe+1).reduce((qe,at)=>qe+at,0),it=Ge[xe],Ct=Ge[xe+1],Fe=Math.max(it.paddingRight,si),pt=Math.max(Ct.paddingLeft,si);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Bt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":de.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(Ve[xe]-it.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:be(ze-Fe),width:be(Fe),height:"100%"}}),r.jsx(Bt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":_e.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ve[xe+1]-Ct.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:be(ze),width:be(pt),height:"100%"}})]},`${de.paddingRightKey}-padding`)}),p&&!h&&Se.slice(0,-1).map((de,xe)=>{const _e=Xp(xe,We,ge,Ke),it=We.slice(0,xe+1).reduce((Ct,Fe)=>Ct+Fe,0)-Na/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":de.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Yr),"data-controls-max-fraction":String(_e),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:be(it),width:be(Na),height:"calc(100%)",pointerEvents:"auto"}})},`${de.widthKey}-junction`)})]}),Oe&&(()=>{const de=Io(e,Sn),xe=Ip(e.cutLabelVerticalAlign),_e=de.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:be(w??0),cursor:St?"pointer":"default",...xp(S,y??0,n??!1)},onClick:St?_t:void 0,onMouseEnter:K||W?Ot:void 0,onMouseLeave:K?zt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...h?{paddingLeft:be(O),paddingRight:be(O)}:{},justifyContent:Pp(de.textTextAlign),alignItems:_a(xe)},children:r.jsx("span",{className:Wa(e,Sn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...ka(de,n),...Fa(e,Sn,c,n),..._e?{width:"100%"}:{}},children:N})})})})(),W&&oe&&(()=>{const de=vo(oe.widthPx),xe={width:de,height:"auto",maxHeight:de,objectFit:"contain",left:oe.x,top:oe.y,position:"absolute"};return r.jsx(vp,{media:oe,className:oe.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:xe},`${oe.rowId}-${oe.url}`)})()]})})]})}const em=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
5894
5894
  import { CommonComponentProps } from '../props';
5895
5895
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
5896
5896
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -8847,7 +8847,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8847
8847
  </>
8848
8848
  );
8849
8849
  }
8850
- `,Si=["A","B","C","D","E"],Ha=[...wr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Dn={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 tm(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function ao(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function nm(){return Object.fromEntries(Si.map((e,t)=>{const n=Wn[t],i=`${e} column`;return[n,tm(i)]}))}function im(){const e={};for(const t of Si)e[`${t}ColumnWidth`]=ao(`${t} column width`),e[`${t}ColumnPaddingLeft`]=ao(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=ao(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=ao(`${t} column padding bottom`);return e}function Oa(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Wn]};for(const s of Si)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 om(e){const t={};if(e===Tn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...wr]},enum:[...wr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ha],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Ha]}}return t[Ze(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ze(e,"textFontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ze(e,"textFontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ze(e,"textLineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ze(e,"textLetterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ze(e,"textWordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ze(e,"textTextAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ze(e,"textTextAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const rm=Gr.reduce((e,t)=>({...e,...om(t)}),{});function am(e){return{verticalAlign:e===Tn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Tn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function sm(e,t={}){var n;return{...am(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Ba=new Set(["textFontFamily","textFontSettings"]);function lm(e,t,n){const i=s=>n===void 0?!0:n==="common"?Ba.has(s):!Ba.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Ur(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Ze(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Ze(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Ze(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Ze(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Ze(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Ze(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Ze(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Ze(e,"textTextAppearance")]=t.textTextAppearance),o}function xo(e={},t){return Gr.reduce((n,i)=>({...n,...lm(i,sm(i,e),t)}),{})}const cm=xo(),dm=Fp();function Gs(e){return[Ze(e,"textFontFamily"),Ze(e,"textFontSettings"),Ze(e,"textFontSize"),Ze(e,"textLineHeight"),Ze(e,"textLetterSpacing"),Ze(e,"textWordSpacing"),Ze(e,"textTextAlign"),Ze(e,"textTextAppearance"),`${e}VerticalAlign`]}function um(){const e=[];return Kr.forEach((t,n)=>{const i=Wn[n],o=Gs(t);for(let s=1;s<Wn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:a,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const pm=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Gs(Tn);const mm=[...Si.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],qn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],gm=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:qn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:qn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:qn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:qn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:qn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:qn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:qn[6],link:""}],hm=[...Si.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],fm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...nm(),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:gm},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"}},...im(),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"}},...rm,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",...cm,...xo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Oa({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},...xo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Oa({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},...xo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...um(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...mm.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}},...Si.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",...hm]},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__",dm]}],paletteBookmark:{items:[...pm],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},ym={element:Qp,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Gp(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:[]},schema:fm,sourceCode:em},ja=300,Rn=.004,vm={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"},bm=["hover","focus","filled","success","error"];function xm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function za(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Va(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:E.scalingValue((o-t)/2,i)}}function wm(e){return`
8850
+ `,$i=["A","B","C","D","E"],Oa=[...Sr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],zn={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 tm(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function ao(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function nm(){return Object.fromEntries($i.map((e,t)=>{const n=Wn[t],i=`${e} column`;return[n,tm(i)]}))}function im(){const e={};for(const t of $i)e[`${t}ColumnWidth`]=ao(`${t} column width`),e[`${t}ColumnPaddingLeft`]=ao(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=ao(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=ao(`${t} column padding bottom`);return e}function Ba(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Wn]};for(const s of $i)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 om(e){const t={};if(e===Sn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Sr]},enum:[...Sr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Oa],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Oa]}}return t[Je(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Je(e,"textFontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Je(e,"textFontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Je(e,"textLineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Je(e,"textLetterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Je(e,"textWordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Je(e,"textTextAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Je(e,"textTextAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const rm=Ur.reduce((e,t)=>({...e,...om(t)}),{});function am(e){return{verticalAlign:e===Sn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Sn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function sm(e,t={}){var n;return{...am(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const ja=new Set(["textFontFamily","textFontSettings"]);function lm(e,t,n){const i=s=>n===void 0?!0:n==="common"?ja.has(s):!ja.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Xr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Je(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Je(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Je(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Je(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Je(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Je(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Je(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Je(e,"textTextAppearance")]=t.textTextAppearance),o}function xo(e={},t){return Ur.reduce((n,i)=>({...n,...lm(i,sm(i,e),t)}),{})}const cm=xo(),dm=Fp();function Us(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing"),Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function um(){const e=[];return Gr.forEach((t,n)=>{const i=Wn[n],o=Us(t);for(let s=1;s<Wn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:a,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const pm=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Us(Sn);const mm=[...$i.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Vn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],gm=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Vn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Vn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Vn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Vn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Vn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Vn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Vn[6],link:""}],hm=[...$i.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],fm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...nm(),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:gm},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"}},...im(),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"}},...rm,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",...cm,...xo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ba({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},...xo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ba({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},...xo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...um(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...mm.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}},...$i.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",...hm]},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__",dm]}],paletteBookmark:{items:[...pm],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},ym={element:Qp,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Gp(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:[]},schema:fm,sourceCode:em},za=300,An=.004,vm={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"},bm=["hover","focus","filled","success","error"];function xm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Va(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Da(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:I.scalingValue((o-t)/2,i)}}function wm(e){return`
8851
8851
  .${e}-wrapper {
8852
8852
  box-sizing: border-box;
8853
8853
  display: flex;
@@ -8937,7 +8937,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8937
8937
  width: var(--${e}-icon-max-width);
8938
8938
  height: var(--${e}-icon-max-width);
8939
8939
  position: relative;
8940
- transition: transform ${ja}ms ease;
8940
+ transition: transform ${za}ms ease;
8941
8941
  }
8942
8942
  .${e}-icon-custom {
8943
8943
  display: flex;
@@ -8972,7 +8972,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8972
8972
  .${e}-panel {
8973
8973
  display: grid;
8974
8974
  grid-template-rows: 0fr;
8975
- transition: grid-template-rows ${ja}ms ease;
8975
+ transition: grid-template-rows ${za}ms ease;
8976
8976
  }
8977
8977
  .${e}-item-open .${e}-panel {
8978
8978
  grid-template-rows: 1fr;
@@ -9040,7 +9040,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
9040
9040
  left: 20px;
9041
9041
  transform: translateY(-50%);
9042
9042
  }
9043
- `}function Da(e,t,n,i,o,s,a,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:a,color:d??"#000000"}}function Sm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=E.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:T="solid",entryHoverEffect:w="default",autoclose:L="off",icon:m,iconMaxWidth:y=.00833,iconPaddingRight:C=0,iconAnimation:b="rotate 45",questionColor:$="#000000",answerColor:S="#000000",dividerColor:F="#0000001F",iconColor:P="#000000",questionHoverColor:k="#666666",iconHoverColor:x="#666666",iconActiveColor:I="#000000",dividerHoverColor:G="#000000",questionFontFamily:f,questionFontSettings:R,questionFontSize:M,questionLineHeight:j,questionLetterSpacing:Z,questionWordSpacing:ue,questionTextAppearance:V,answerFontFamily:_,answerFontSettings:Q,answerFontSize:U,answerLineHeight:H,answerLetterSpacing:J,answerWordSpacing:oe,answerTextAppearance:ie,questionPaddingLeft:W=0,questionPaddingTop:ae=0,questionPaddingBottom:g=0,answerPaddingLeft:te=0,answerPaddingRight:ye=0,answerPaddingTop:me=0,answerPaddingBottom:_e=0}=e,X=t??[],[de,K]=l.useState(()=>new Set),B=!n||i;l.useEffect(()=>{K(new Set)},[L]),l.useEffect(()=>{n&&!o&&!i&&K(new Set)},[n,o,i]);const N=Se=>E.scalingValue(Se,n??!1),re=Math.max(W,Rn),$e=Math.max(ae,Rn),Ne=Math.max(g,Rn),Ie=Math.max(te,Rn),xe=Math.max(ye,Rn),Fe=Math.max(me,Rn),z=Math.max(_e,Rn),q=Math.max(0,(c??1)-C-y),v=Math.max(0,(c??1)-ye),D=Math.max(0,(c??1)-te),O=Math.max(C,Rn),ee=Math.max(0,(c??1)-W-y),se=l.useMemo(()=>de.size===0?0:Math.min(...de),[de]),pe=l.useCallback(Se=>de.has(Se),[de]),Ce=B&&w==="default"?`${a}-entry-hover-default`:"",we=m??"",ve=we!=="",Ge=b.replace(/^rotate /,""),ge=`${a}-icon-anim-${Ge}`,ke=Zt(_t(Da(f,R,M,j,Z,ue,V,$),n)),ze=Zt(_t(Da(_,Q,U,H,J,oe,ie,S),n)),Le=za(M,j,`${a}-question`,`${a}-text-tight-leading`),ot=za(U,H,`${a}-answer-text`,`${a}-text-tight-leading`),tt=Va(M,j,a,n),yt=Va(U,H,a,n),Ke=E.buildColorVars(a,{questionColor:$,answerColor:S,dividerColor:F,iconColor:P,questionHoverColor:k,iconHoverColor:x,iconActiveColor:I,dividerHoverColor:G},vm,bm),st=s&&s!=="default"?`${a}-state-${s}`:"",Ct=l.useCallback(Se=>{B&&K(He=>{if(He.has(Se)){const Ue=new Set(He);return Ue.delete(Se),Ue}if(L==="on")return new Set([Se]);const Xe=new Set(He);return Xe.add(Se),Xe})},[B,L]),It=l.useMemo(()=>wm(a),[a]),Rt={[`--${a}-divider-width`]:E.scalingValue(u,n??!1),[`--${a}-divider-style`]:T,[`--${a}-icon-max-width`]:E.scalingValue(y,n??!1),...p>0?{[`--${a}-question-min-height`]:E.scalingValue(p,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:It}}),r.jsx("div",{style:Ke,children:r.jsx("div",{className:Je(`${a}-wrapper`,n&&!i&&`${a}-editor`,Ce,st),style:{width:E.scalingValue(c,n??!1),maxWidth:"100%",...Rt},children:X.map((Se,He)=>{var zt;const Xe=pe(He),Ue=((zt=Se.question)==null?void 0:zt.trim())??"",Nt=Se.answer,Ot=((Nt==null?void 0:Nt.length)??0)>0,Ht=d&&He===se;return r.jsxs("div",{className:Je(`${a}-item`,Xe&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[Ht&&r.jsxs(r.Fragment,{children:[r.jsx(Ft,{"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:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:N($e),zIndex:2}}),r.jsx(Ft,{"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(q),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:N(re),height:"100%",zIndex:2}}),r.jsx(Ft,{"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(ee),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:N(O),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Xe,style:{...ke,...tt,paddingLeft:N(W),paddingRight:N(C)},onClick:()=>Ct(He),children:[ae>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:N(ae)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:Le,children:Ue}),Ot&&(ve?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${ge}`,"aria-hidden":"true",children:r.jsx(ln,{url:we,fill:P,hoverFill:x,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${ge}`,"aria-hidden":"true"}))]}),g>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:N(g)},"aria-hidden":"true"})]}),Ht&&r.jsx(Ft,{"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:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:N(Ne),zIndex:2}})]}),Ot&&Nt&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Xe,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[Ht&&r.jsxs(r.Fragment,{children:[r.jsx(Ft,{"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:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:N(Fe),zIndex:2}}),r.jsx(Ft,{"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(v),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:N(Ie),height:"100%",zIndex:2}}),r.jsx(Ft,{"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(D),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:N(xe),height:"100%",zIndex:2}})]}),me>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:N(me)}}),r.jsx("div",{className:`${a}-answer`,style:{...ze,...yt,paddingLeft:N(te),paddingRight:N(ye)},children:r.jsx("div",{className:ot,children:r.jsx(gi,{content:Nt})})}),_e>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:N(_e)}}),Ht&&r.jsx(Ft,{"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:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:N(z),zIndex:2}})]})})})]},He)})})})]})}const $m=`import { useCallback, useEffect, useMemo, useState } from 'react';
9043
+ `}function qa(e,t,n,i,o,s,a,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:a,color:d??"#000000"}}function Sm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=I.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:L="solid",entryHoverEffect:x="default",autoclose:E="off",icon:m,iconMaxWidth:y=.00833,iconPaddingRight:C=0,iconAnimation:v="rotate 45",questionColor:$="#000000",answerColor:w="#000000",dividerColor:N="#0000001F",iconColor:A="#000000",questionHoverColor:k="#666666",iconHoverColor:b="#666666",iconActiveColor:P="#000000",dividerHoverColor:U="#000000",questionFontFamily:f,questionFontSettings:R,questionFontSize:M,questionLineHeight:j,questionLetterSpacing:Q,questionWordSpacing:ue,questionTextAppearance:z,answerFontFamily:_,answerFontSettings:ee,answerFontSize:X,answerLineHeight:F,answerLetterSpacing:J,answerWordSpacing:oe,answerTextAppearance:re,questionPaddingLeft:W=0,questionPaddingTop:se=0,questionPaddingBottom:h=0,answerPaddingLeft:ae=0,answerPaddingRight:ye=0,answerPaddingTop:he=0,answerPaddingBottom:Te=0}=e,G=t??[],[le,D]=l.useState(()=>new Set),te=!n||i;l.useEffect(()=>{D(new Set)},[E]),l.useEffect(()=>{n&&!o&&!i&&D(new Set)},[n,o,i]);const O=be=>I.scalingValue(be,n??!1),ce=Math.max(W,An),ke=Math.max(se,An),$e=Math.max(h,An),Ee=Math.max(ae,An),Le=Math.max(ye,An),Me=Math.max(he,An),K=Math.max(Te,An),V=Math.max(0,(c??1)-C-y),S=Math.max(0,(c??1)-ye),B=Math.max(0,(c??1)-ae),H=Math.max(C,An),Z=Math.max(0,(c??1)-W-y),ne=l.useMemo(()=>le.size===0?0:Math.min(...le),[le]),me=l.useCallback(be=>le.has(be),[le]),we=te&&x==="default"?`${a}-entry-hover-default`:"",Ce=m??"",Se=Ce!=="",Ke=v.replace(/^rotate /,""),ge=`${a}-icon-anim-${Ke}`,We=on(Nt(qa(f,R,M,j,Q,ue,z,$),n)),Ve=on(Nt(qa(_,ee,X,F,J,oe,re,w),n)),Ge=Va(M,j,`${a}-question`,`${a}-text-tight-leading`),rt=Va(X,F,`${a}-answer-text`,`${a}-text-tight-leading`),It=Da(M,j,a,n),Mt=Da(X,F,a,n),Oe=I.buildColorVars(a,{questionColor:$,answerColor:w,dividerColor:N,iconColor:A,questionHoverColor:k,iconHoverColor:b,iconActiveColor:P,dividerHoverColor:U},vm,bm),ft=s&&s!=="default"?`${a}-state-${s}`:"",ut=l.useCallback(be=>{te&&D(De=>{if(De.has(be)){const Qe=new Set(De);return Qe.delete(be),Qe}if(E==="on")return new Set([be]);const Ye=new Set(De);return Ye.add(be),Ye})},[te,E]),St=l.useMemo(()=>wm(a),[a]),_t={[`--${a}-divider-width`]:I.scalingValue(u,n??!1),[`--${a}-divider-style`]:L,[`--${a}-icon-max-width`]:I.scalingValue(y,n??!1),...p>0?{[`--${a}-question-min-height`]:I.scalingValue(p,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:St}}),r.jsx("div",{style:Oe,children:r.jsx("div",{className:Xe(`${a}-wrapper`,n&&!i&&`${a}-editor`,we,ft),style:{width:I.scalingValue(c,n??!1),maxWidth:"100%",..._t},children:G.map((be,De)=>{var kt;const Ye=me(De),Qe=((kt=be.question)==null?void 0:kt.trim())??"",Ht=be.answer,$t=((Ht==null?void 0:Ht.length)??0)>0,vt=d&&De===ne;return r.jsxs("div",{className:Xe(`${a}-item`,Ye&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[vt&&r.jsxs(r.Fragment,{children:[r.jsx(Bt,{"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:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:O(ke),zIndex:2}}),r.jsx(Bt,{"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(V),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:O(ce),height:"100%",zIndex:2}}),r.jsx(Bt,{"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(Z),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:O(H),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Ye,style:{...We,...It,paddingLeft:O(W),paddingRight:O(C)},onClick:()=>ut(De),children:[se>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:O(se)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:Ge,children:Qe}),$t&&(Se?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${ge}`,"aria-hidden":"true",children:r.jsx(un,{url:Ce,fill:A,hoverFill:b,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${ge}`,"aria-hidden":"true"}))]}),h>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:O(h)},"aria-hidden":"true"})]}),vt&&r.jsx(Bt,{"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:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:O($e),zIndex:2}})]}),$t&&Ht&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Ye,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[vt&&r.jsxs(r.Fragment,{children:[r.jsx(Bt,{"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:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:O(Me),zIndex:2}}),r.jsx(Bt,{"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(S),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:O(Ee),height:"100%",zIndex:2}}),r.jsx(Bt,{"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(B),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:O(Le),height:"100%",zIndex:2}})]}),he>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:O(he)}}),r.jsx("div",{className:`${a}-answer`,style:{...Ve,...Mt,paddingLeft:O(ae),paddingRight:O(ye)},children:r.jsx("div",{className:rt,children:r.jsx(hi,{content:Ht})})}),Te>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:O(Te)}}),vt&&r.jsx(Bt,{"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:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:O(K),zIndex:2}})]})})})]},De)})})})]})}const $m=`import { useCallback, useEffect, useMemo, useState } from 'react';
9044
9044
  import cn from 'classnames';
9045
9045
  import { CommonComponentProps } from '../props';
9046
9046
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -9837,7 +9837,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9837
9837
  </>
9838
9838
  );
9839
9839
  }
9840
- `;function An(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const qa={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Cm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Tm={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",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:An("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:{...qa.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:{...qa.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:An("Question Padding Left"),questionPaddingTop:An("Question Padding Top"),questionPaddingBottom:An("Question Padding Bottom"),answerPaddingLeft:An("Answer Padding Left"),answerPaddingRight:An("Answer Padding Right"),answerPaddingTop:An("Answer Padding Top"),answerPaddingBottom:An("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:[...Cm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Lm={element:Sm,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"}]},schema:Tm,sourceCode:$m},Ln=e=>e.display==="cover",Vo=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ka=100,Em=.2,Ga=8,Us=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=l.useState(0),[a,d]=l.useState(!1),c=l.useRef(null),p=l.useRef(0);p.current=o;const u=l.useMemo(()=>typeof window>"u"?Ka:Math.max(Ka,window.innerHeight*Em),[]),T=l.useCallback(f=>Math.max(0,1-f/(u*1.5)),[u]),w=l.useCallback(f=>Math.max(0,1-f/(u*.45)),[u]),L=l.useCallback(f=>{const R=typeof window<"u"?window.innerHeight:800,M=Math.max(.88,1-f/R*.12);return`translateY(${f}px) scale(${M})`},[]),m=l.useCallback(()=>{c.current=null},[]),y=l.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),m()},[n,m]),C=l.useCallback(()=>{const f=typeof window<"u"?window.innerHeight:800;d(!0),s(f),window.setTimeout(()=>{t(),m(),d(!1)},Math.min(n,200))},[n,t,m]),b=l.useCallback(f=>{!e||a||f.pointerType==="touch"&&(i!=null&&i(f.target)||(c.current={startX:f.clientX,startY:f.clientY,isLocked:null,pointerId:f.pointerId}))},[e,a,i]),$=l.useCallback(f=>{const R=c.current;if(!e||!R||f.pointerType!=="touch"||R.pointerId!==f.pointerId)return;const M=f.clientX-R.startX,j=f.clientY-R.startY;if(R.isLocked===null){if(Math.abs(M)<Ga&&Math.abs(j)<Ga)return;if(j>0&&j>Math.abs(M))R.isLocked=!0,f.currentTarget.setPointerCapture(f.pointerId);else{R.isLocked=!1,m();return}}if(!R.isLocked)return;f.preventDefault();const Z=Math.max(0,j);p.current=Z,s(Z)},[e,m]),S=l.useCallback(f=>{const R=c.current;if(!e||!R||f.pointerType!=="touch"||R.pointerId!==f.pointerId)return;const M=R.isLocked===!0;if(f.currentTarget.hasPointerCapture(f.pointerId)&&f.currentTarget.releasePointerCapture(f.pointerId),!M){m();return}f.clientY-R.startY>=u?C():y()},[u,C,e,m,y]),F=l.useCallback(f=>{S(f)},[S]),P=l.useCallback(f=>{S(f)},[S]),k=o>0,x=a?`transform ${n}ms ease`:"none",I=a?`opacity ${n}ms ease`:"none",G=o>0||a;return{isSwipeDragging:k,backdropStyle:{opacity:T(o),transition:I},mediaAreaStyle:{transform:L(o),transition:x,touchAction:k?"none":void 0,willChange:k?"transform":void 0},overlayContentStyle:G?{opacity:w(o),transition:I}:void 0,swipeHandlers:e?{onPointerDown:b,onPointerMove:$,onPointerUp:F,onPointerCancel:P}:{},dismissAreaStyle:e?{touchAction:"none"}:void 0}},Im="[data-lightbox-scrollable]",Xs=()=>{l.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 a=d=>{const c=d.target;c instanceof Element&&c.closest(Im)||d.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),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)}},[])},Pm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Rm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Am=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Mm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,d=n-a,c=a-n,p=(m,y)=>{Rm(t),e.scrollLeft=m,y&&(s==null||s())};if(Math.abs(d)<.5)return p(n,!0),()=>{};let u=!1,T=0;const w=()=>{t.removeEventListener("transitionend",L),clearTimeout(T)},L=m=>{m.target!==t||m.propertyName!=="transform"||u||(u=!0,w(),p(n,!0))};return t.addEventListener("transitionend",L),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)`,T=window.setTimeout(()=>{u||(u=!0,w(),p(n,!0))},i+64),()=>{u||(u=!0,w(),p(a-Am(t),!1))}},di=300,_m=900,km=1500,Wm="cubic-bezier(0.16, 1, 0.3, 1)",Fm=3e3,wo=50,Nm=2,Hm=16,Om=.05,Bm=1,Ua=.5,jm=20,ni=.004,Ui=["title1","title2","title3"],zm={title1:"1",title2:"2",title3:"3"},Vm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Dm={title1:.02,title2:.02,title3:.02},sr=e=>`max(${e}, ${jm}px)`,qm=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]}},Km=e=>{for(const t of e)if(t.title1||t.title2||t.title3)return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""};for(const t of e){const n=qm(t.text);if(n.title1||n.title2||n.title3)return{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}return{title1:"",title2:"",title3:""}},ut=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Gm=e=>[ut(e,"fontFamily"),ut(e,"fontSettings"),{type:"row",items:[ut(e,"fontSize"),ut(e,"lineHeight"),ut(e,"letterSpacing"),ut(e,"wordSpacing")]},ut(e,"textAlign"),ut(e,"textAppearance")],Um=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ui.map(e=>[zm[e],Gm(e)]))}),Jr=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...a]}},{overflow:i-1,widths:[]});return o},Ys=(e,t)=>Jr(e,t),so=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Xa=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Jr(e.length,n),effective:Ys(e.length,n)}},Xm=(e,t,n,i,o,s,a)=>{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:a,text:i}),d},lr=(e,t)=>{const n=i=>{const o=ut(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[Vm[t]]}},Ym=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),cr=(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??Dm[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return _t(i,n)},Jm=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:d,thumbnailGap:c,thumbnailMarginBottom:p,imageGap:u,closeIcon:T,closeIconMaxWidth:w,closeIconColor:L,closeIconHoverColor:m,thumbnailTrigger:y,thumbnailVisibility:C,thumbnailObjectFit:b,thumbnailActive:$,thumbnailActiveColor:S,title1Width:F,title2Width:P,title3Width:k,title1MarginLeft:x=0,title2MarginLeft:I=0,title3MarginLeft:G=0,titleRowMarginBottom:f=0,titleHeaderLayout:R="desktop",contentMarginTop:M,iconMarginLeft:j}=n,Z=h=>E.scalingValue(h,i??!1),ue=Z(c),V=Z(p??.02),_=Z(u??0),Q=Z(M??0),U=Z(j??0),{title1:H,title2:J,title3:oe}=Km(t),ie=cr("title1",lr(n,"title1"),i),W=cr("title2",lr(n,"title2"),i),ae=cr("title3",lr(n,"title3"),i),g=R==="mobile",te=!o&&(!i||s),ye=te,me=te,_e=te,X=Ln(b),de=X?{"--image-aspect-ratio":Vo(b)}:void 0,K=!!(H||J||oe),B=l.useMemo(()=>Xm(e,H,J,oe,ie,W,ae),[e,H,J,oe,ie,W,ae]),N=l.useMemo(()=>({title1Width:F,title2Width:P,title3Width:k}),[F,P,k]),re=l.useMemo(()=>B.map(h=>N[h.widthKey]),[B,N]),$e=l.useMemo(()=>Jr(B.length,re),[B.length,re]),Ne=l.useMemo(()=>Ys(B.length,re),[B.length,re]),Ie=l.useMemo(()=>B.filter(h=>h.prefix==="title1"),[B]),xe=l.useMemo(()=>B.filter(h=>h.prefix==="title2"||h.prefix==="title3"),[B]),Fe=l.useMemo(()=>Xa(Ie,N),[Ie,N]),z=l.useMemo(()=>Xa(xe,N),[xe,N]),q=l.useCallback((h,Y)=>{const ne=B.indexOf(h);if(!g||Y==="single-row")return{effectiveWidth:Ne[ne]??0,resolvedWidth:$e[ne]??0,maxWidth:so(ne,$e)};if(Y==="two-row-top"){const Ae=Ie.indexOf(h);return{effectiveWidth:Fe.effective[Ae]??0,resolvedWidth:Fe.resolved[Ae]??0,maxWidth:so(Ae,Fe.resolved)}}const he=xe.indexOf(h);return{effectiveWidth:z.effective[he]??0,resolvedWidth:z.resolved[he]??0,maxWidth:so(he,z.resolved)}},[xe,z,Ne,$e,B,Ie,Fe,g]),v=l.useCallback(h=>E.scalingValue(h,i??!1),[i]),D=v(f??0),O=l.useMemo(()=>({title1MarginLeft:x,title2MarginLeft:I,title3MarginLeft:G}),[x,I,G]),ee=l.useCallback(h=>B.slice(0,h+1).reduce((Y,ne,he)=>Y+(ne!=null&&ne.marginLeftKey?O[ne.marginLeftKey]??0:0)+($e[he]??0),0)+(g?0:x??0),[B,O,$e,g,x]),se=l.useCallback(()=>g?0:x??0,[g,x]),pe=l.useCallback(h=>xe.slice(0,h).reduce((Y,ne,he)=>Y+(ne.marginLeftKey?O[ne.marginLeftKey]??0:0)+(z.resolved[he]??0),0),[xe,z.resolved,O]),Ce=l.useCallback(h=>{const Y=xe[h];return pe(h)+(Y.marginLeftKey?O[Y.marginLeftKey]??0:0)+(z.resolved[h]??0)},[xe,z.resolved,pe,O]),we=(h,Y)=>{const ne=h.marginLeftKey?O[h.marginLeftKey]??0:0,{effectiveWidth:he,resolvedWidth:Ae,maxWidth:ct}=q(h,Y),Lt=o&&Y==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":h.prefix,style:{...Y==="single-row"?{gridArea:h.prefix}:{},width:v(he),...ne>0?{marginLeft:v(ne)}:{}},children:[r.jsx("p",{className:h.className,style:h.style,children:h.text}),Lt&&h.marginLeftKey&&r.jsx("div",{"data-controls":h.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:v(-ne),width:`max(${v(ne)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Lt&&r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ct),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:v(-ni/2),width:v(ni),height:"100%",pointerEvents:"auto"}})]},h.className)},ve=()=>{const h=g?-1:B.findIndex(he=>he.prefix==="title1"),Y=!g&&(o||(x??0)>0)?(()=>{const he=x??0,Ae=h>=0?$e[h]:F??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:0,width:`max(${v(he)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ne=B.flatMap((he,Ae)=>{if(!he.marginLeftKey)return[];const ct=O[he.marginLeftKey]??0,Lt=Ym(B,$e,O,Ae)+se();return r.jsx("div",{"data-controls":he.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String($e[Ae]),style:{position:"absolute",top:0,left:v(Lt),width:`max(${v(ct)}, 10px)`,height:"100%",pointerEvents:"auto"}},he.marginLeftKey)});return Y?[Y,...ne]:ne},Ge=()=>B.map((h,Y)=>{const ne=so(Y,$e),Ae=ee(Y)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ne),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:v(Ae),width:v(ni),height:"100%",pointerEvents:"auto"}})},`${h.widthKey}-junction`)}),ge=()=>xe.flatMap((h,Y)=>{if(!h.marginLeftKey)return[];const ne=O[h.marginLeftKey]??0,he=pe(Y),{resolvedWidth:Ae}=q(h,"two-row-bottom");return r.jsx("div",{"data-controls":h.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:v(he),width:`max(${v(ne)}, 10px)`,height:"100%",pointerEvents:"auto"}},h.marginLeftKey)}),ke=()=>xe.map((h,Y)=>{const{maxWidth:ne}=q(h,"two-row-bottom"),Ae=Ce(Y)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ne),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:v(Ae),width:v(ni),height:"100%",pointerEvents:"auto"}})},`${h.widthKey}-junction`)}),ze=l.useRef(null),Le=l.useRef(null),ot=l.useRef(null),tt=l.useRef([]),yt=l.useRef(0),Ke=l.useRef({isActive:!1,startX:0,scrollLeft:0,hasMoved:!1}),st=l.useRef(null),Ct=l.useRef(null),It=l.useRef(0),Rt=l.useRef("forward"),Se=l.useRef(0),He=l.useRef(null),Xe=l.useRef(!1),Ue=t.length>1&&(!o||!!s),Nt=Ue?3:1,Ot=l.useMemo(()=>Array.from({length:Nt},()=>t).flat(),[t,Nt]),[Ht,zt]=l.useState(!1),[dn,Oe]=l.useState(!1),[Tt,lt]=l.useState(!0),[et,gt]=l.useState(0),qt=l.useRef(et);qt.current=et;const Kt=l.useRef(null),tn=l.useRef(!1),hn=l.useRef(null),Ye=l.useRef(null),nn=ye&&!Tt,At=l.useCallback(()=>{ye&&(lt(!0),Ye.current&&clearTimeout(Ye.current),Ye.current=setTimeout(()=>{Ke.current.isActive||lt(!1)},Fm))},[ye]),kt=l.useCallback(()=>{o||tn.current||(tn.current=!0,Oe(!1),hn.current=setTimeout(()=>{a()},di))},[o,a]),De=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":nn?"true":"false",style:{width:E.scalingValue(w??0,i),height:E.scalingValue(w??0,i),marginRight:U,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:kt,"aria-label":"Close",children:r.jsx(ln,{url:T,fill:L,hoverFill:i&&!s?L:m,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=(h="two-row")=>r.jsx("div",{...h==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:v(x??0),flexShrink:0,...h==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...h==="two-row"&&o?{pointerEvents:"auto"}:{}}}),le=()=>{const h=B.find(he=>he.prefix==="title1"),Y=B.filter(he=>he.prefix==="title2"||he.prefix==="title3"),ne=Y.length>0||o||(f??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(x??0)>0||o?Wt():null,h&&we(h,"two-row-top"),T&&De()]}),ne?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[Y.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[Y.map(he=>we(he,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ge(),ke()]})]}):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:D,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},be=()=>r.jsxs(r.Fragment,{children:[(x??0)>0||o?Wt("single-row"):null,B.map(h=>we(h,"single-row")),o?r.jsxs(r.Fragment,{children:[ve(),Ge()]}):null,T?De():null]}),Pe=l.useCallback(h=>!!(h.closest("[data-controls]")||h.closest(`.${e}-thumbnails`)||h.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ve,backdropStyle:ht,mediaAreaStyle:wt,overlayContentStyle:Me,swipeHandlers:ft,dismissAreaStyle:qe}=Us({enabled:te??!1,onClose:kt,animMs:di,isBlockedTarget:Pe}),rt=()=>{if(!Ue||t.length===0)return yt.current=0,0;const h=tt.current[0],Y=tt.current[t.length];if(!h||!Y)return yt.current;const ne=Y.offsetLeft-h.offsetLeft;return ne>0&&(yt.current=ne),yt.current},Qe=(h=!1)=>{if(!Ue)return;const Y=Le.current,ne=rt();!Y||ne<=0||(Y.scrollLeft<=0?(Y.scrollLeft+=ne,h&&(Ke.current.scrollLeft+=ne),Xe.current&&(Se.current+=ne)):Y.scrollLeft>=ne*2&&(Y.scrollLeft-=ne,h&&(Ke.current.scrollLeft-=ne),Xe.current&&(Se.current-=ne)))},Pt=(h=(Y=>(Y=Le.current)==null?void 0:Y.scrollLeft)()??0)=>{var Lt;const ne=((Lt=Le.current)==null?void 0:Lt.clientWidth)??0,he=h+ne/2;let Ae=-1,ct={flatIndex:0,distance:1/0};return tt.current.forEach((Gt,bn)=>{if(!Gt)return;const xn=Gt.offsetLeft,un=xn+Gt.offsetWidth;Ae===-1&&he>=xn&&he<un&&(Ae=bn);const ei=Math.abs(xn-h);ei<ct.distance&&(ct={flatIndex:bn,distance:ei})}),Ae!==-1?Ae:ct.flatIndex},St=h=>{const Y=Le.current;return!h||!Y?!1:h.offsetWidth>Y.clientWidth+1},Be=h=>{Le.current&&tt.current.forEach(Y=>{Y&&(Y.style.scrollSnapAlign=St(Y)&&h==="backward"?"end":"start")})},xt=h=>{const Y=Le.current;if(!h||!Y||!St(h))return!1;const ne=h.offsetLeft,he=ne+h.offsetWidth;return Y.scrollLeft>=ne-1&&Y.scrollLeft+Y.clientWidth<=he+1},at=()=>{!Le.current||t.length===0||Kt.current===null&&gt(Pt()%t.length)},vt=()=>{Kt.current=null},Mt=h=>{const Y=Le.current;Y&&(Y.style.scrollSnapType=h?"":"none")},nt=()=>{var h;(h=Ct.current)==null||h.call(Ct),Ct.current=null},Bt=()=>{He.current!==null&&(cancelAnimationFrame(He.current),He.current=null),Xe.current=!1},on=()=>{const h=Le.current;if(!h){He.current=null,Xe.current=!1;return}const Y=Se.current-h.scrollLeft;if(Math.abs(Y)<.5){h.scrollLeft=Se.current,Qe(),at(),He.current=null,Xe.current=!1;return}h.scrollLeft+=Y*Om,Qe(),at(),At(),He.current=requestAnimationFrame(on)},fn=()=>{const h=ot.current;h&&(h.style.transition="",h.style.transform="",h.style.willChange="")},Pn=(h,Y,ne,he)=>{fn(),h.scrollLeft=Y,It.current=h.scrollLeft,Qe(),ne!==void 0?gt(ne):at(),Mt(!0),he==null||he()},yn=(h,{behavior:Y="smooth",activeIndex:ne,onComplete:he}={})=>{const Ae=Le.current,ct=ot.current;if(!Ae||!ct)return;if(Bt(),nt(),Mt(!1),Y==="auto"){Pn(Ae,h,ne,he);return}const Lt=Math.abs(h-Ae.scrollLeft),Gt=Pm(Lt,_m,km,Ae.clientWidth*.55);Ct.current=Mm(Ae,ct,h,{duration:Gt,easing:Wm,onComplete:()=>{Ct.current=null,Pn(Ae,h,ne,he)}})},On=(h="smooth")=>{if(!Le.current||t.length===0)return;const ne=Pt(),he=tt.current[ne];he&&yn(he.offsetLeft,{behavior:h,activeIndex:ne%t.length})},Bn=(h,Y="smooth")=>{const ne=Le.current;if(!ne||t.length===0)return;const he=ne.scrollLeft-h,Ae=Pt(h),ct=tt.current[Ae];if(xt(ct)){Mt(!0),at();return}const Lt=tt.current[Ae+1],Gt=ct?Lt?Lt.offsetLeft-ct.offsetLeft:ct.offsetWidth:0,bn=Gt>0?he>Gt*Ua?1:he<-Gt*Ua?-1:0:0,xn=Ue?Ae+bn:Math.max(0,Math.min(Ot.length-1,Ae+bn)),un=tt.current[xn];if(!un){On(Y);return}const Ji=he<0&&St(un)?un.offsetLeft+un.offsetWidth-ne.clientWidth:un.offsetLeft,Ci=xn%t.length;Y==="smooth"&&(Kt.current=Ci),gt(Ci),yn(Ji,{behavior:Y,activeIndex:Ci,onComplete:Y==="smooth"?vt:void 0})},vn=(h,Y="smooth")=>{const ne=Le.current,he=Ue?t.length+h:h,Ae=tt.current[he];!ne||!Ae||(Y==="smooth"?Kt.current=h:Kt.current=null,gt(h),yn(Ae.offsetLeft,{behavior:Y,activeIndex:h,onComplete:Y==="smooth"?vt:void 0}))},jn=()=>{st.current&&(window.removeEventListener("pointerup",st.current),window.removeEventListener("pointercancel",st.current),st.current=null)},Qn=h=>{if(!Ke.current.isActive)return;jn();const Y=Le.current;if(!Y)return;const ne=Ke.current.hasMoved,he=Ke.current.scrollLeft;Qe(!0),Ke.current={isActive:!1,startX:0,scrollLeft:0,hasMoved:!1},zt(!1),h!==void 0&&Y.hasPointerCapture(h)&&Y.releasePointerCapture(h),ne?Bn(he):(Mt(!0),at()),At()},Ko=h=>{if(!me)return;if(h.pointerType==="touch"){Bt(),Mt(!0);return}if(h.pointerType!=="mouse"||h.button!==0||Pe(h.target))return;const Y=Le.current;if(!Y)return;Bt(),nt(),fn(),Kt.current=null,Ke.current={isActive:!0,startX:h.clientX,scrollLeft:Y.scrollLeft,hasMoved:!1},Mt(!1),At(),Y.setPointerCapture(h.pointerId),jn();const ne=he=>{he.pointerType==="mouse"&&Qn(he.pointerId)};st.current=ne,window.addEventListener("pointerup",ne),window.addEventListener("pointercancel",ne)},Go=h=>{if(!me||h.pointerType!=="mouse")return;const Y=Le.current;if(!Y||!Ke.current.isActive)return;if(h.buttons===0){Qn(h.pointerId);return}const ne=h.clientX-Ke.current.startX;Math.abs(ne)>Bm&&(Ke.current.hasMoved=!0,zt(!0)),Ke.current.hasMoved&&(h.preventDefault(),Y.scrollLeft=Ke.current.scrollLeft-ne,Qe(!0),at(),At())},$i=h=>{me&&h.pointerType==="mouse"&&Qn(h.pointerId)},Yi=h=>{!me||h.pointerType!=="mouse"||Qn(h.pointerId)};return Xs(),l.useEffect(()=>{const h=requestAnimationFrame(()=>Oe(!0));return()=>{cancelAnimationFrame(h),nt(),jn(),hn.current&&clearTimeout(hn.current),Ye.current&&clearTimeout(Ye.current)}},[]),l.useEffect(()=>{if(!ye){lt(!0);return}At();const h=ze.current;if(!h)return;const Y=()=>At();return h.addEventListener("pointermove",Y),h.addEventListener("pointerdown",Y),()=>{h.removeEventListener("pointermove",Y),h.removeEventListener("pointerdown",Y),Ye.current&&clearTimeout(Ye.current)}},[ye,At]),l.useEffect(()=>{const h=Y=>{Y.key==="Escape"&&kt()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[kt]),l.useLayoutEffect(()=>{rt()},[_,t.length,Ue]),l.useLayoutEffect(()=>{o||vn(qt.current,"auto")},[_,o]),l.useLayoutEffect(()=>{vn(0,"auto")},[t.length,Ue]),l.useEffect(()=>{const h=Le.current;if(!h||o||!te)return;const Y=ne=>{if(ne.preventDefault(),Math.abs(ne.deltaY)<=Math.abs(ne.deltaX))return;const he=ne.deltaMode===1?Hm:ne.deltaMode===2?h.clientHeight:1,Ae=ne.deltaY*he*Nm;if(Ae!==0){if(nt(),Xe.current||(Xe.current=!0,Se.current=h.scrollLeft,Kt.current=null,Mt(!1)),Se.current+=Ae,!Ue){const ct=h.scrollWidth-h.clientWidth;Se.current=Math.max(0,Math.min(ct,Se.current))}At(),He.current===null&&(He.current=requestAnimationFrame(on))}};return h.addEventListener("wheel",Y,{passive:!1}),()=>{h.removeEventListener("wheel",Y),Bt()}},[o,te,Ue]),l.useEffect(()=>{const h=Le.current;if(!h)return;const Y=()=>{Qe(Ke.current.isActive);const he=h.scrollLeft,Ae=he-It.current;It.current=he;const ct=yt.current>0?yt.current*.5:1/0;if(Ae!==0&&Math.abs(Ae)<ct){const Lt=Ae>0?"forward":"backward";Lt!==Rt.current&&(Rt.current=Lt,Be(Lt))}at()};h.addEventListener("scroll",Y,{passive:!0});const ne=new ResizeObserver(()=>{rt(),Qe(Ke.current.isActive),Be(Rt.current),at()});return ne.observe(h),()=>{nt(),h.removeEventListener("scroll",Y),ne.disconnect()}},[t.length,Ue]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ve||kt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:dn?1:0,transition:`opacity ${di}ms ease`,pointerEvents:dn?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...ht}}),r.jsxs("div",{ref:ze,className:`${e}-lightbox-dismiss-area`,style:qe,...ft,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:wt,onClick:h=>h.stopPropagation(),children:r.jsx("div",{ref:Le,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":me&&t.length>0?"true":"false","data-mouse-dragging":Ht?"true":"false",onPointerDown:Ko,onPointerMove:Go,onPointerUp:$i,onPointerCancel:$i,onLostPointerCapture:Yi,children:r.jsx("div",{ref:ot,className:`${e}-lightbox-strip-track`,style:{gap:_},children:Ot.map((h,Y)=>{const ne=h.image.objectFit??"contain",he=Y%t.length,Ae=Math.floor(Y/t.length),ct=sr(_),Lt=`calc(-0.5 * (${ct} + ${_}))`;return r.jsxs("div",{ref:Gt=>tt.current[Y]=Gt,className:`${e}-strip-item`,style:{height:R==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:h.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ne}}),o&&he<t.length-1&&Ae===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Lt,width:ct,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ae}-${h.image.url}-${he}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":nn?"true":"false",style:Me,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,"data-controls-axis":o?"y":void 0,"data-controls-handle-left-fraction":o?"0.05":void 0,className:o?`${e}-control`:void 0,style:{height:Q,width:"100%",pointerEvents:o?"auto":"none"}}),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${g?` ${e}-lightbox-content-area-stacked`:""}`,children:(K||T)&&r.jsx("div",{className:`${e}-header ${g?`${e}-header-two-row`:`${e}-header-single-row`}`,children:g?le():K||T?be():null})})})]}),t.length>1&&C==="on"&&(()=>{const h=sr(V),Y=`calc(-0.5 * (${V} + ${h}))`;return r.jsxs("div",{className:`${e}-thumbnails`,"data-lightbox-scrollable":"","data-thumbnail-active":$,"data-overlay-content-hidden":nn?"true":"false",onClick:ne=>ne.stopPropagation(),style:{gap:ue,bottom:V,"--thumbnail-active-color":S,...Me},children:[t.map((ne,he)=>{const Ae=sr(ue),ct=`calc(-0.5 * (${Ae} + ${ue}))`;return r.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":et===he?"true":"false",onClick:()=>te&&y==="click"&&vn(he),onMouseEnter:()=>_e&&y==="hover"&&vn(he),"aria-label":ne.image.name?`View ${ne.image.name}`:`View image ${he+1}`,"aria-current":et===he?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${X?` ${e}-thumb-image-cover`:""}`,src:ne.image.url,alt:"",draggable:!1,style:{...de,...b.display==="cover"?{width:wo}:{width:"100%"}}})}),o&&he<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ct,width:Ae,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ne.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:Y,height:h,pointerEvents:"auto",zIndex:3}})]})})()]})]})};function Zm(e){return`
9840
+ `;function Rn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ka={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Cm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Tm={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",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:Rn("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:{...Ka.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:{...Ka.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:Rn("Question Padding Left"),questionPaddingTop:Rn("Question Padding Top"),questionPaddingBottom:Rn("Question Padding Bottom"),answerPaddingLeft:Rn("Answer Padding Left"),answerPaddingRight:Rn("Answer Padding Right"),answerPaddingTop:Rn("Answer Padding Top"),answerPaddingBottom:Rn("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:[...Cm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Lm={element:Sm,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"}]},schema:Tm,sourceCode:$m},$n=e=>e.display==="cover",Vo=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ga=100,Em=.2,Ua=8,Xs=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=l.useState(0),[a,d]=l.useState(!1),c=l.useRef(null),p=l.useRef(0);p.current=o;const u=l.useMemo(()=>typeof window>"u"?Ga:Math.max(Ga,window.innerHeight*Em),[]),L=l.useCallback(f=>Math.max(0,1-f/(u*1.5)),[u]),x=l.useCallback(f=>Math.max(0,1-f/(u*.45)),[u]),E=l.useCallback(f=>{const R=typeof window<"u"?window.innerHeight:800,M=Math.max(.88,1-f/R*.12);return`translateY(${f}px) scale(${M})`},[]),m=l.useCallback(()=>{c.current=null},[]),y=l.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),m()},[n,m]),C=l.useCallback(()=>{const f=typeof window<"u"?window.innerHeight:800;d(!0),s(f),window.setTimeout(()=>{t(),m(),d(!1)},Math.min(n,200))},[n,t,m]),v=l.useCallback(f=>{!e||a||f.pointerType==="touch"&&(i!=null&&i(f.target)||(c.current={startX:f.clientX,startY:f.clientY,isLocked:null,pointerId:f.pointerId}))},[e,a,i]),$=l.useCallback(f=>{const R=c.current;if(!e||!R||f.pointerType!=="touch"||R.pointerId!==f.pointerId)return;const M=f.clientX-R.startX,j=f.clientY-R.startY;if(R.isLocked===null){if(Math.abs(M)<Ua&&Math.abs(j)<Ua)return;if(j>0&&j>Math.abs(M))R.isLocked=!0,f.currentTarget.setPointerCapture(f.pointerId);else{R.isLocked=!1,m();return}}if(!R.isLocked)return;f.preventDefault();const Q=Math.max(0,j);p.current=Q,s(Q)},[e,m]),w=l.useCallback(f=>{const R=c.current;if(!e||!R||f.pointerType!=="touch"||R.pointerId!==f.pointerId)return;const M=R.isLocked===!0;if(f.currentTarget.hasPointerCapture(f.pointerId)&&f.currentTarget.releasePointerCapture(f.pointerId),!M){m();return}f.clientY-R.startY>=u?C():y()},[u,C,e,m,y]),N=l.useCallback(f=>{w(f)},[w]),A=l.useCallback(f=>{w(f)},[w]),k=o>0,b=a?`transform ${n}ms ease`:"none",P=a?`opacity ${n}ms ease`:"none",U=o>0||a;return{isSwipeDragging:k,backdropStyle:{opacity:L(o),transition:P},mediaAreaStyle:{transform:E(o),transition:b,touchAction:k?"none":void 0,willChange:k?"transform":void 0},overlayContentStyle:U?{opacity:x(o),transition:P}:void 0,swipeHandlers:e?{onPointerDown:v,onPointerMove:$,onPointerUp:N,onPointerCancel:A}:{},dismissAreaStyle:e?{touchAction:k?"none":"pan-x"}:void 0}},Im="[data-lightbox-scrollable]",Ys=()=>{l.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 a=d=>{const c=d.target;c instanceof Element&&c.closest(Im)||d.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),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)}},[])},Pm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Am=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Rm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Mm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,d=n-a,c=a-n,p=(m,y)=>{Am(t),e.scrollLeft=m,y&&(s==null||s())};if(Math.abs(d)<.5)return p(n,!0),()=>{};let u=!1,L=0;const x=()=>{t.removeEventListener("transitionend",E),clearTimeout(L)},E=m=>{m.target!==t||m.propertyName!=="transform"||u||(u=!0,x(),p(n,!0))};return t.addEventListener("transitionend",E),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)`,L=window.setTimeout(()=>{u||(u=!0,x(),p(n,!0))},i+64),()=>{u||(u=!0,x(),p(a-Rm(t),!1))}},ui=300,_m=900,km=1500,Wm="cubic-bezier(0.16, 1, 0.3, 1)",Fm=3e3,wo=50,Nm=2,Hm=16,Om=.05,Bm=1,Xa=.3,jm=50,zm=20,ii=.004,Ui=["title1","title2","title3"],Vm={title1:"1",title2:"2",title3:"3"},Dm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},qm={title1:.02,title2:.02,title3:.02},lr=e=>`max(${e}, ${zm}px)`,Km=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]}},Gm=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=Km(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Um=e=>[lt(e,"fontFamily"),lt(e,"fontSettings"),{type:"row",items:[lt(e,"fontSize"),lt(e,"lineHeight"),lt(e,"letterSpacing"),lt(e,"wordSpacing")]},lt(e,"textAlign"),lt(e,"textAppearance")],Xm=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ui.map(e=>[Vm[e],Um(e)]))}),Zr=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...a]}},{overflow:i-1,widths:[]});return o},Js=(e,t)=>Zr(e,t),so=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ya=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Zr(e.length,n),effective:Js(e.length,n)}},Ym=(e,t,n,i,o,s,a)=>{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:a,text:i}),d},cr=(e,t)=>{const n=i=>{const o=lt(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[Dm[t]]}},Jm=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),dr=(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??qm[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Nt(i,n)},Zm=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:d,thumbnailGap:c,thumbnailMarginBottom:p,imageGap:u,closeIcon:L,closeIconMaxWidth:x,closeIconColor:E,closeIconHoverColor:m,thumbnailTrigger:y,thumbnailVisibility:C,thumbnailObjectFit:v,thumbnailActive:$,thumbnailActiveColor:w,title1Width:N,title2Width:A,title3Width:k,title1MarginLeft:b=0,title2MarginLeft:P=0,title3MarginLeft:U=0,titleRowMarginBottom:f=0,titleHeaderLayout:R="desktop",contentMarginTop:M,iconMarginLeft:j}=n,Q=g=>I.scalingValue(g,i??!1),ue=Q(c),z=Q(p??.02),_=Q(u??0),ee=Q(M??0),X=Q(j??0),[F,J]=l.useState(0),oe=l.useRef(F);oe.current=F;const re=t[F],{title1:W,title2:se,title3:h}=Gm(re),ae=dr("title1",cr(n,"title1"),i),ye=dr("title2",cr(n,"title2"),i),he=dr("title3",cr(n,"title3"),i),Te=R==="mobile",G=!o&&(!i||s),le=G,D=G,te=G,O=$n(v),ce=O?{"--image-aspect-ratio":Vo(v)}:void 0,ke=!!(W||se||h),$e=l.useMemo(()=>Ym(e,W,se,h,ae,ye,he),[e,F,W,se,h,ae,ye,he]),Ee=l.useMemo(()=>({title1Width:N,title2Width:A,title3Width:k}),[N,A,k]),Le=l.useMemo(()=>$e.map(g=>Ee[g.widthKey]),[$e,Ee]),Me=l.useMemo(()=>Zr($e.length,Le),[$e.length,Le]),K=l.useMemo(()=>Js($e.length,Le),[$e.length,Le]),V=l.useMemo(()=>$e.filter(g=>g.prefix==="title1"),[$e]),S=l.useMemo(()=>$e.filter(g=>g.prefix==="title2"||g.prefix==="title3"),[$e]),B=l.useMemo(()=>Ya(V,Ee),[V,Ee]),H=l.useMemo(()=>Ya(S,Ee),[S,Ee]),Z=l.useCallback((g,q)=>{const Y=$e.indexOf(g);if(!Te||q==="single-row")return{effectiveWidth:K[Y]??0,resolvedWidth:Me[Y]??0,maxWidth:so(Y,Me)};if(q==="two-row-top"){const ve=V.indexOf(g);return{effectiveWidth:B.effective[ve]??0,resolvedWidth:B.resolved[ve]??0,maxWidth:so(ve,B.resolved)}}const pe=S.indexOf(g);return{effectiveWidth:H.effective[pe]??0,resolvedWidth:H.resolved[pe]??0,maxWidth:so(pe,H.resolved)}},[S,H,K,Me,$e,V,B,Te]),ne=l.useCallback(g=>I.scalingValue(g,i??!1),[i]),me=ne(f??0),we=l.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:P,title3MarginLeft:U}),[b,P,U]),Ce=l.useCallback(g=>$e.slice(0,g+1).reduce((q,Y,pe)=>q+(Y!=null&&Y.marginLeftKey?we[Y.marginLeftKey]??0:0)+(Me[pe]??0),0)+(Te?0:b??0),[$e,we,Me,Te,b]),Se=l.useCallback(()=>Te?0:b??0,[Te,b]),Ke=l.useCallback(g=>S.slice(0,g).reduce((q,Y,pe)=>q+(Y.marginLeftKey?we[Y.marginLeftKey]??0:0)+(H.resolved[pe]??0),0),[S,H.resolved,we]),ge=l.useCallback(g=>{const q=S[g];return Ke(g)+(q.marginLeftKey?we[q.marginLeftKey]??0:0)+(H.resolved[g]??0)},[S,H.resolved,Ke,we]),We=(g,q)=>{const Y=g.marginLeftKey?we[g.marginLeftKey]??0:0,{effectiveWidth:pe,resolvedWidth:ve,maxWidth:Ue}=Z(g,q),ot=o&&q==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":g.prefix,style:{...q==="single-row"?{gridArea:g.prefix}:{},width:ne(pe),...Y>0?{marginLeft:ne(Y)}:{}},children:[r.jsx("p",{className:g.className,style:g.style,children:g.text}),ot&&g.marginLeftKey&&r.jsx("div",{"data-controls":g.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ve),style:{position:"absolute",top:0,left:ne(-Y),width:`max(${ne(Y)}, 10px)`,height:"100%",pointerEvents:"auto"}}),ot&&r.jsx("div",{"data-controls":g.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:ne(-ii/2),width:ne(ii),height:"100%",pointerEvents:"auto"}})]},g.className)},Ve=()=>{const g=Te?-1:$e.findIndex(pe=>pe.prefix==="title1"),q=!Te&&(o||(b??0)>0)?(()=>{const pe=b??0,ve=g>=0?Me[g]:N??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ve),style:{position:"absolute",top:0,left:0,width:`max(${ne(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Y=$e.flatMap((pe,ve)=>{if(!pe.marginLeftKey)return[];const Ue=we[pe.marginLeftKey]??0,ot=Jm($e,Me,we,ve)+Se();return r.jsx("div",{"data-controls":pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me[ve]),style:{position:"absolute",top:0,left:ne(ot),width:`max(${ne(Ue)}, 10px)`,height:"100%",pointerEvents:"auto"}},pe.marginLeftKey)});return q?[q,...Y]:Y},Ge=()=>$e.map((g,q)=>{const Y=so(q,Me),ve=Ce(q)-ii/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":g.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Y),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ne(ve),width:ne(ii),height:"100%",pointerEvents:"auto"}})},`${g.widthKey}-junction`)}),rt=()=>S.flatMap((g,q)=>{if(!g.marginLeftKey)return[];const Y=we[g.marginLeftKey]??0,pe=Ke(q),{resolvedWidth:ve}=Z(g,"two-row-bottom");return r.jsx("div",{"data-controls":g.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ve),style:{position:"absolute",top:0,left:ne(pe),width:`max(${ne(Y)}, 10px)`,height:"100%",pointerEvents:"auto"}},g.marginLeftKey)}),It=()=>S.map((g,q)=>{const{maxWidth:Y}=Z(g,"two-row-bottom"),ve=ge(q)-ii/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":g.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Y),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ne(ve),width:ne(ii),height:"100%",pointerEvents:"auto"}})},`${g.widthKey}-junction`)}),Mt=l.useRef(null),Oe=l.useRef(null),ft=l.useRef(null),ut=l.useRef([]),St=l.useRef(0),_t=l.useRef(null),be=l.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),De=l.useRef(null),Ye=l.useRef(null),Qe=l.useRef(0),Ht=l.useRef("forward"),$t=l.useRef(0),vt=l.useRef(null),kt=l.useRef(!1),Wt=t.length>1&&(!o||!!s),He=Wt?3:1,Pt=l.useMemo(()=>Array.from({length:He},()=>t).flat(),[t,He]),[yt,nt]=l.useState(!1),[bt,Kt]=l.useState(!1),[On,Ut]=l.useState(!0),Xt=l.useRef(null),et=l.useRef(!1),sn=l.useRef(null),Ot=l.useRef(null),zt=le&&!On,Ne=l.useCallback(()=>{le&&(Ut(!0),Ot.current&&clearTimeout(Ot.current),Ot.current=setTimeout(()=>{be.current.isActive||Ut(!1)},Fm))},[le]),At=l.useCallback(()=>{o||et.current||(et.current=!0,Kt(!1),sn.current=setTimeout(()=>{a()},ui))},[o,a]),de=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":zt?"true":"false",style:{width:I.scalingValue(x??0,i),height:I.scalingValue(x??0,i),marginRight:X,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:At,"aria-label":"Close",children:r.jsx(un,{url:L,fill:E,hoverFill:i&&!s?E:m,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:X,height:"100%",pointerEvents:"auto"}})]}),xe=(g="two-row")=>r.jsx("div",{...g==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:ne(b??0),flexShrink:0,...g==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...g==="two-row"&&o?{pointerEvents:"auto"}:{}}}),_e=()=>{const g=$e.find(pe=>pe.prefix==="title1"),q=$e.filter(pe=>pe.prefix==="title2"||pe.prefix==="title3"),Y=q.length>0||o||(f??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(b??0)>0||o?xe():null,g&&We(g,"two-row-top"),L&&de()]}),Y?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[q.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[q.map(pe=>We(pe,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[rt(),It()]})]}):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:me,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ze=()=>r.jsxs(r.Fragment,{children:[(b??0)>0||o?xe("single-row"):null,$e.map(g=>We(g,"single-row")),o?r.jsxs(r.Fragment,{children:[Ve(),Ge()]}):null,L?de():null]}),it=l.useCallback(g=>!!(g.closest("[data-controls]")||g.closest(`.${e}-thumbnails`)||g.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ct,backdropStyle:Fe,mediaAreaStyle:pt,overlayContentStyle:qe,swipeHandlers:at,dismissAreaStyle:mt}=Xs({enabled:G??!1,onClose:At,animMs:ui,isBlockedTarget:it}),Ft=()=>{if(!Wt||t.length===0)return St.current=0,0;const g=ut.current[0],q=ut.current[t.length];if(!g||!q)return St.current;const Y=q.offsetLeft-g.offsetLeft;return Y>0&&(St.current=Y),St.current},gt=(g=!1)=>{if(!Wt)return;const q=Oe.current,Y=Ft();!q||Y<=0||Y<q.clientWidth*.25||(q.scrollLeft<=0?(q.scrollLeft+=Y,g&&(be.current.scrollLeft+=Y),kt.current&&($t.current+=Y)):q.scrollLeft>=Y*2&&(q.scrollLeft-=Y,g&&(be.current.scrollLeft-=Y),kt.current&&($t.current-=Y)))},Be=(g,q=(Y=>(Y=Oe.current)==null?void 0:Y.scrollLeft)()??0)=>{if(!Wt)return g;let pe=t.length+g,ve=1/0;for(let Ue=0;Ue<He;Ue++){const ot=Ue*t.length+g,Lt=ut.current[ot];if(!Lt)continue;const Qt=Math.abs(Lt.offsetLeft-q);Qt<ve&&(ve=Qt,pe=ot)}return pe},ht=(g=(q=>(q=Oe.current)==null?void 0:q.scrollLeft)()??0)=>{var ot;const Y=((ot=Oe.current)==null?void 0:ot.clientWidth)??0,pe=g+Y/2;let ve=-1,Ue={flatIndex:0,distance:1/0};return ut.current.forEach((Lt,Qt)=>{if(!Lt)return;const T=Lt.offsetLeft,ie=T+Lt.offsetWidth;ve===-1&&pe>=T&&pe<ie&&(ve=Qt);const Pe=Math.abs(T+Lt.offsetWidth/2-pe);Pe<Ue.distance&&(Ue={flatIndex:Qt,distance:Pe})}),ve!==-1?ve:Ue.flatIndex},Tt=g=>{const q=Oe.current;return!g||!q?!1:g.offsetWidth>q.clientWidth+1},xt=g=>{Oe.current&&ut.current.forEach(q=>{q&&(q.style.scrollSnapAlign=Tt(q)&&g==="backward"?"end":"start")})},Yt=g=>{const q=Oe.current;if(!g||!q||!Tt(g))return!1;const Y=g.offsetLeft,pe=Y+g.offsetWidth;return q.scrollLeft>=Y-1&&q.scrollLeft+q.clientWidth<=pe+1},Ze=()=>{!Oe.current||t.length===0||Xt.current===null&&J(ht()%t.length)},Jt=()=>{Xt.current=null},jt=g=>{const q=Oe.current;q&&(q.style.scrollSnapType=g?"":"none")},Zt=()=>{var g;(g=Ye.current)==null||g.call(Ye),Ye.current=null},mn=()=>{vt.current!==null&&(cancelAnimationFrame(vt.current),vt.current=null),kt.current=!1},Ln=()=>{const g=Oe.current;if(!g){vt.current=null,kt.current=!1;return}const q=$t.current-g.scrollLeft;if(Math.abs(q)<.5){g.scrollLeft=$t.current,gt(),Ze(),vt.current=null,kt.current=!1;return}g.scrollLeft+=q*Om,gt(),Ze(),Ne(),vt.current=requestAnimationFrame(Ln)},yn=()=>{const g=ft.current;g&&(g.style.transition="",g.style.transform="",g.style.willChange="")},En=(g,q,Y,pe)=>{yn(),g.scrollLeft=q,Qe.current=g.scrollLeft,gt(),Y!==void 0?J(Y):Ze(),jt(!0),pe==null||pe()},Jn=g=>{const q=ht(),Y=ut.current[q];if(!Y)return;const pe=g.scrollLeft+g.clientWidth/2,ve=Y.offsetLeft,Ue=ve+Y.offsetWidth;(pe<ve||pe>=Ue)&&(g.scrollLeft=ve,Qe.current=ve,yn())},Zn=(g,{behavior:q="smooth",activeIndex:Y,onComplete:pe}={})=>{const ve=Oe.current,Ue=ft.current;if(!ve||!Ue)return;if(mn(),Zt(),jt(!1),q==="auto"){En(ve,g,Y,pe);return}Jn(ve);const ot=Math.abs(g-ve.scrollLeft),Lt=Pm(ot,_m,km,ve.clientWidth*.55);Ye.current=Mm(ve,Ue,g,{duration:Lt,easing:Wm,onComplete:()=>{Ye.current=null,En(ve,g,Y,pe)}})},Ko=(g="smooth")=>{const q=Oe.current;if(!q||t.length===0)return;const Y=ht()%t.length,pe=Be(Y,q.scrollLeft),ve=ut.current[pe];ve&&Zn(ve.offsetLeft,{behavior:g,activeIndex:Y})},Go=(g,q="smooth",Y,pe)=>{const ve=Oe.current;if(!ve||t.length===0)return;const Ue=(pe??ve.scrollLeft)-g,ot=ht(g),Lt=ut.current[ot];if(Yt(Lt)){jt(!0),Ze();return}const Qt=ut.current[ot+1],T=Lt?Qt?Qt.offsetLeft-Lt.offsetLeft:Lt.offsetWidth:0,ie=T>0?Ue>T*Xa?1:Ue<-T*Xa?-1:0:0;if(ie!==0){const Pe=Y??ot%t.length,Ae=Wt?(Pe+ie+t.length)%t.length:Math.max(0,Math.min(t.length-1,Pe+ie));In(Ae,q);return}Ko(q)},In=(g,q="smooth")=>{const Y=Oe.current;if(!Y||t.length===0)return;const pe=Be(g,Y.scrollLeft),ve=ut.current[pe];ve&&(q==="smooth"?Xt.current=g:Xt.current=null,J(g),Zn(ve.offsetLeft,{behavior:q,activeIndex:g,onComplete:q==="smooth"?Jt:void 0}))},Qn=()=>{De.current&&(window.removeEventListener("pointerup",De.current),window.removeEventListener("pointercancel",De.current),De.current=null)},Yi=(g,q,Y,pe,ve)=>{const Ue=Y-g,ot=pe-q,Lt=Math.abs(Ue),Qt=Math.abs(ot);if(Lt<jm||Lt<=Qt)return!1;const T=Ue<0?1:-1,ie=Wt?(ve+T+t.length)%t.length:Math.max(0,Math.min(t.length-1,ve+T));return ie===ve?!1:(In(ie),!0)},Pn=g=>{if(!be.current.isActive)return;Qn();const q=Oe.current;if(!q)return;const{scrollLeft:Y,startActiveIndex:pe,hasMoved:ve}=be.current,Ue=q.scrollLeft;gt(!0),be.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},nt(!1),g!==void 0&&q.hasPointerCapture(g)&&q.releasePointerCapture(g),ve?Go(Y,"smooth",pe,Ue):(jt(!0),Ze()),Ne()},Ci=(g,q)=>{const Y=_t.current;_t.current=null,Y&&(Yi(Y.startX,Y.startY,g,q,Y.startActiveIndex),Ne())},ei=g=>{if(!D)return;if(g.pointerType==="touch"){if(mn(),jt(!0),it(g.target))return;_t.current={startX:g.clientX,startY:g.clientY,startActiveIndex:oe.current};return}if(g.pointerType!=="mouse"||g.button!==0||it(g.target))return;const q=Oe.current;if(!q)return;mn(),Zt(),yn(),Xt.current=null,be.current={isActive:!0,startX:g.clientX,scrollLeft:q.scrollLeft,startActiveIndex:oe.current,hasMoved:!1},jt(!1),Ne(),q.setPointerCapture(g.pointerId),Qn();const Y=pe=>{pe.pointerType==="mouse"&&Pn(pe.pointerId)};De.current=Y,window.addEventListener("pointerup",Y),window.addEventListener("pointercancel",Y)},ti=g=>{if(!D||g.pointerType!=="mouse")return;const q=Oe.current;if(!q||!be.current.isActive)return;if(g.buttons===0){Pn(g.pointerId);return}const Y=g.clientX-be.current.startX;Math.abs(Y)>Bm&&(be.current.hasMoved=!0,nt(!0)),be.current.hasMoved&&(g.preventDefault(),q.scrollLeft=be.current.scrollLeft-Y,gt(!0),Ze(),Ne())},Ji=g=>{if(D){if(g.pointerType==="touch"){g.type==="pointerup"?Ci(g.clientX,g.clientY):_t.current=null;return}g.pointerType==="mouse"&&Pn(g.pointerId)}},Uo=g=>{!D||g.pointerType!=="mouse"||Pn(g.pointerId)};return Ys(),l.useEffect(()=>{const g=requestAnimationFrame(()=>Kt(!0));return()=>{cancelAnimationFrame(g),Zt(),Qn(),sn.current&&clearTimeout(sn.current),Ot.current&&clearTimeout(Ot.current)}},[]),l.useEffect(()=>{if(!le){Ut(!0);return}Ne();const g=Mt.current;if(!g)return;const q=()=>Ne();return g.addEventListener("pointermove",q),g.addEventListener("pointerdown",q),()=>{g.removeEventListener("pointermove",q),g.removeEventListener("pointerdown",q),Ot.current&&clearTimeout(Ot.current)}},[le,Ne]),l.useEffect(()=>{const g=q=>{q.key==="Escape"&&At()};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[At]),l.useLayoutEffect(()=>{Ft()},[_,t.length,Wt]),l.useLayoutEffect(()=>{o||In(oe.current,"auto")},[_,o]),l.useLayoutEffect(()=>{In(0,"auto")},[t.length,Wt]),l.useEffect(()=>{const g=Oe.current;if(!g||o||!G)return;const q=Y=>{if(Y.preventDefault(),Math.abs(Y.deltaY)<=Math.abs(Y.deltaX))return;const pe=Y.deltaMode===1?Hm:Y.deltaMode===2?g.clientHeight:1,ve=Y.deltaY*pe*Nm;if(ve!==0){if(Zt(),kt.current||(kt.current=!0,$t.current=g.scrollLeft,Xt.current=null,jt(!1)),$t.current+=ve,!Wt){const Ue=g.scrollWidth-g.clientWidth;$t.current=Math.max(0,Math.min(Ue,$t.current))}Ne(),vt.current===null&&(vt.current=requestAnimationFrame(Ln))}};return g.addEventListener("wheel",q,{passive:!1}),()=>{g.removeEventListener("wheel",q),mn()}},[o,G,Wt]),l.useEffect(()=>{const g=Oe.current;if(!g)return;const q=()=>{gt(be.current.isActive);const pe=g.scrollLeft,ve=pe-Qe.current;Qe.current=pe;const Ue=St.current>0?St.current*.5:1/0;if(ve!==0&&Math.abs(ve)<Ue){const ot=ve>0?"forward":"backward";ot!==Ht.current&&(Ht.current=ot,xt(ot))}Ze()};g.addEventListener("scroll",q,{passive:!0});const Y=new ResizeObserver(()=>{Ft(),gt(be.current.isActive),xt(Ht.current),Ze()});return Y.observe(g),()=>{Zt(),g.removeEventListener("scroll",q),Y.disconnect()}},[t.length,Wt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ct||At()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:bt?1:0,transition:`opacity ${ui}ms ease`,pointerEvents:bt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Fe}}),r.jsxs("div",{ref:Mt,className:`${e}-lightbox-dismiss-area`,style:mt,...at,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:pt,onClick:g=>g.stopPropagation(),children:r.jsx("div",{ref:Oe,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":D&&t.length>0?"true":"false","data-mouse-dragging":yt?"true":"false",onPointerDown:ei,onPointerMove:ti,onPointerUp:Ji,onPointerCancel:Ji,onLostPointerCapture:Uo,children:r.jsx("div",{ref:ft,className:`${e}-lightbox-strip-track`,style:{gap:_},children:Pt.map((g,q)=>{const Y=g.image.objectFit??"contain",pe=q%t.length,ve=Math.floor(q/t.length),Ue=lr(_),ot=`calc(-0.5 * (${Ue} + ${_}))`;return r.jsxs("div",{ref:Lt=>ut.current[q]=Lt,className:`${e}-strip-item`,style:{height:R==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:g.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:Y}}),o&&pe<t.length-1&&ve===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ot,width:Ue,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ve}-${g.image.url}-${pe}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":zt?"true":"false",style:qe,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,"data-controls-axis":o?"y":void 0,"data-controls-handle-left-fraction":o?"0.05":void 0,className:o?`${e}-control`:void 0,style:{height:ee,width:"100%",pointerEvents:o?"auto":"none"}}),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${Te?` ${e}-lightbox-content-area-stacked`:""}`,children:(ke||L)&&r.jsx("div",{className:`${e}-header ${Te?`${e}-header-two-row`:`${e}-header-single-row`}`,children:Te?_e():ke||L?ze():null})})})]}),t.length>1&&C==="on"&&(()=>{const g=lr(z),q=`calc(-0.5 * (${z} + ${g}))`;return r.jsxs("div",{className:`${e}-thumbnails`,"data-lightbox-scrollable":"","data-thumbnail-active":$,"data-overlay-content-hidden":zt?"true":"false",onClick:Y=>Y.stopPropagation(),style:{gap:ue,bottom:z,"--thumbnail-active-color":w,...qe},children:[t.map((Y,pe)=>{const ve=lr(ue),Ue=`calc(-0.5 * (${ve} + ${ue}))`;return r.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":F===pe?"true":"false",onClick:()=>G&&y==="click"&&In(pe),onMouseEnter:()=>te&&y==="hover"&&In(pe),"aria-label":Y.image.name?`View ${Y.image.name}`:`View image ${pe+1}`,"aria-current":F===pe?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${O?` ${e}-thumb-image-cover`:""}`,src:Y.image.url,alt:"",draggable:!1,style:{...ce,...v.display==="cover"?{width:wo}:{width:"100%"}}})}),o&&pe<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ue,width:ve,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${Y.image.url}-${pe}`)}),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:q,height:g,pointerEvents:"auto",zIndex:3}})]})})()]})]})};function Qm(e){return`
9841
9841
  .${e}-wrapper {
9842
9842
  position: relative;
9843
9843
  width: 100%;
@@ -9998,7 +9998,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9998
9998
  scrollbar-width: none;
9999
9999
  pointer-events: auto;
10000
10000
  opacity: 1;
10001
- transition: opacity ${di}ms ease;
10001
+ transition: opacity ${ui}ms ease;
10002
10002
  }
10003
10003
 
10004
10004
  .${e}-thumbnails[data-overlay-content-hidden="true"] {
@@ -10072,7 +10072,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
10072
10072
  background-color: transparent;
10073
10073
  padding: 0;
10074
10074
  opacity: 1;
10075
- transition: opacity ${di}ms ease;
10075
+ transition: opacity ${ui}ms ease;
10076
10076
  }
10077
10077
 
10078
10078
  .${e}-close-icon[data-overlay-content-hidden="true"] {
@@ -10197,7 +10197,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
10197
10197
  display: flex;
10198
10198
  flex-direction: column;
10199
10199
  opacity: 1;
10200
- transition: opacity ${di}ms ease;
10200
+ transition: opacity ${ui}ms ease;
10201
10201
  }
10202
10202
 
10203
10203
  .${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
@@ -10238,7 +10238,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
10238
10238
  pointer-events: auto;
10239
10239
  z-index: 10;
10240
10240
  }
10241
- `}const Qm=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=E.useScopedStyles(),{cover:d,coverFit:c}=e,p=l.useRef(null),[u,T]=l.useState(!1),w=t??[],L=u&&w.length>0,m=()=>{w.length!==0&&T(!0)};return l.useEffect(()=>{!n||i||o||T(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:p,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Zm(a)}}),d&&r.jsx("div",{className:`${a}-cover ${Ln(c)?`${a}-ratio-wrapper-cover`:`${a}-ratio-wrapper-fit`}`,onClick:()=>m(),style:{...Ln(c)?{"--image-aspect-ratio":Vo(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${a}-cover-image ${Ln(c)?`${a}-cover-image-cover`:`${a}-cover-image-fit`}`,src:d,alt:"cover"})})]}),L&&typeof document<"u"&&(()=>{const y=(s?document.getElementById(s):null)??document.body;return Oi.createPortal(r.jsx(Jm,{prefix:a,images:w,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>T(!1)}),y)})()]})},eg=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
10241
+ `}const eg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=I.useScopedStyles(),{cover:d,coverFit:c}=e,p=l.useRef(null),[u,L]=l.useState(!1),x=t??[],E=u&&x.length>0,m=()=>{x.length!==0&&L(!0)};return l.useEffect(()=>{!n||i||o||L(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:p,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Qm(a)}}),d&&r.jsx("div",{className:`${a}-cover ${$n(c)?`${a}-ratio-wrapper-cover`:`${a}-ratio-wrapper-fit`}`,onClick:()=>m(),style:{...$n(c)?{"--image-aspect-ratio":Vo(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${a}-cover-image ${$n(c)?`${a}-cover-image-cover`:`${a}-cover-image-fit`}`,src:d,alt:"cover"})})]}),E&&typeof document<"u"&&(()=>{const y=(s?document.getElementById(s):null)??document.body;return Oi.createPortal(r.jsx(Zm,{prefix:a,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>L(!1)}),y)})()]})},tg=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
10242
10242
  import { createPortal } from 'react-dom';
10243
10243
  import { CommonComponentProps } from '../props';
10244
10244
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -10251,7 +10251,7 @@ export {
10251
10251
  createStripTextStyleTabContentItems,
10252
10252
  extractTitlesFromLegacyText,
10253
10253
  getStripTextStyleSettingKey,
10254
- resolveSharedStripTitles,
10254
+ resolveStripItemTitles,
10255
10255
  STRIP_GLOBAL_TEXT_STYLE_KEYS,
10256
10256
  STRIP_TEXT_STYLE_PREFIXES,
10257
10257
  STRIP_TEXT_STYLE_TAB_LABELS,
@@ -10679,12 +10679,6 @@ export type LightboxStripItem = {
10679
10679
  title3?: string;
10680
10680
  };
10681
10681
 
10682
- export type SharedStripTitles = {
10683
- title1: string;
10684
- title2: string;
10685
- title3: string;
10686
- };
10687
-
10688
10682
  export type LightboxStripSettings = {
10689
10683
  cover: string | null;
10690
10684
  coverFit: ImageRatioFit;
@@ -10805,7 +10799,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10805
10799
  </>
10806
10800
  );
10807
10801
  };
10808
- `,tg="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>'),Kn={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 ng(e){const t={};return t[ut(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ut(e,"fontSettings")]={...Kn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ut(e,"fontSize")]={...Kn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ut(e,"lineHeight")]={...Kn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ut(e,"letterSpacing")]={...Kn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ut(e,"wordSpacing")]={...Kn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ut(e,"textAlign")]={...Kn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ut(e,"textAppearance")]={...Kn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ig=Ui.reduce((e,t)=>({...e,...ng(t)}),{}),og=Ui.reduce((e,t)=>({...e,[ut(t,"fontFamily")]:"Arial",[ut(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ut(t,"letterSpacing")]:0,[ut(t,"wordSpacing")]:0,[ut(t,"textAlign")]:"left",[ut(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ya(e){return Ui.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ut(n,"fontSize")]=i),o!==void 0&&(t[ut(n,"lineHeight")]=o),t},{})}const rg=Um(),ag={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"}}},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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",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"]}},thumbnailActiveColor:{type:"string",scope:"common",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:"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"}},...ig,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/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:tg,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...og},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Ya({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.3,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Ya({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,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:[rg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input",supportsMainImage:!0}},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/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"}}]}},sg={element:Qm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:ag,sourceCode:eg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ui.map(e=>({path:`styles.${ut(e,"fontSettings")}`}))}},lg=50,Ja=10,Zr="cntrl-lightbox-journal",Do=Zr,Sr=`${Zr}-`,qo=e=>`${Zr}-${e}`,Qr=e=>e===Do||e.startsWith(Sr),Za=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Qa=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Za(t.get(qo(e)));if(i)return i}const n=Za(t.get(Do));if(n)return n;for(const[i]of t){if(!i.startsWith(Sr))continue;const o=i.slice(Sr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},es=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Js=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{Qr(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(qo(t),String(e)):i.searchParams.set(Do,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},cg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===qo(e)||i===Do:Qr(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)}},Zs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(qo(e)):[...t.keys()].some(n=>Qr(n))},dg=(e,t)=>{if(Zs(t)){if(e){window.history.back();return}cg(t)}},ug=20,pg=2,dr=e=>`max(${e}, ${ug}px)`,vi=e=>((e==null?void 0:e.image)??[]).slice(0,pg),Qs=e=>e.reduce((t,n)=>t+vi(n).length,0),mg=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+vi(s).length,1),i=vi(e[t]).length;return{start:n,end:n+i-1}},gg=(e,t)=>{const n=Qs(e),{start:i,end:o}=mg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},So=(e,t)=>t==="B"?e.flatMap((n,i)=>vi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:vi(n)})),hg=(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 gg(i,o)},ts=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",fg=(e,t,n)=>e==="B"?t.length>1:Qs(n)>1,ii=.004,lo=.004,ur={title1Width:.13,title2Width:.13,title3Width:.14},co=(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},Po=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...a]}},{overflow:i-1,widths:[]});return o},$r=(e,t)=>Po(e,t),Gn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},uo=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Po(e.length,n),effective:$r(e.length,n)}},yg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),vg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Xi=["title1","title2","title3","count"],pt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,bg={title1:"1",title2:"2",title3:"3",count:"Count"},xg=e=>[pt(e,"fontFamily"),pt(e,"fontSettings"),{type:"row",items:[pt(e,"fontSize"),pt(e,"lineHeight"),pt(e,"letterSpacing"),pt(e,"wordSpacing")]},pt(e,"textAlign"),pt(e,"textAppearance")],wg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Xi.map(e=>[bg[e],xg(e)]))}),Sg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},$g={title1:.02,title2:.02,title3:.02,count:.017},po=(e,t)=>{const n=i=>{const o=pt(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[Sg[t]]}},mo=(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??$g[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return _t(i,n)},Cg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:p,onClose:u})=>{const{type:T,coverFit:w,backgroundColor:L,imageGap:m,maxWidth:y,maxHeight:C,textTransition:b,title1Width:$,title2Width:S,title3Width:F,title1MarginLeft:P=0,title2MarginLeft:k=0,title3MarginLeft:x=0,titleRowMarginBottom:I=0,titleHeaderLayout:G="single-row",countCloseGap:f=0,closeIcon:R,closeIconMaxWidth:M,closeIconColor:j,closeIconHoverColor:Z,contentMarginTop:ue=0,iconMarginRight:V=0}=n,_=l.useCallback(A=>E.scalingValue(A,i??!1),[i]),Q=_(m??0),U=`${y}%`,H=`${C}%`,J=_(f),oe=_(ue),ie=_(V),W=mo("title1",po(n,"title1"),i),ae=mo("title2",po(n,"title2"),i),g=mo("title3",po(n,"title3"),i),te=mo("count",po(n,"count"),i),ye=G==="mobile",me=!i||!!s,_e=!o&&(!i||!!s),X=l.useMemo(()=>So(t,T),[t,T]),[de,K]=l.useState(a),B=X[de],N=B==null?void 0:B.entry,[re,$e]=l.useState(!1),[Ne,Ie]=l.useState(null),[xe,Fe]=l.useState(!1),[z,q]=l.useState(null),[v,D]=l.useState(!1),[O,ee]=l.useState(0),[se,pe]=l.useState(),[Ce,we]=l.useState(),[ve,Ge]=l.useState(null),ge=l.useRef(null),ke=l.useRef(0),ze=l.useRef(0),Le=l.useRef(0),ot=l.useRef(!1),tt=l.useRef(null),yt=l.useRef(null),Ke=l.useRef(null),st=l.useRef(null),Ct=l.useRef(null),It=l.useRef(null),Rt=l.useRef(null),Se=l.useCallback(()=>{const A=yt.current;if(!A)return;const ce=A.closest(`.${e}-lightbox-content-area`);if(!ce)return A.getBoundingClientRect().width;const We=Array.from(ce.children).reduce((Re,Ee)=>!(Ee instanceof HTMLElement)||Ee.contains(A)?Re:Re+Ee.getBoundingClientRect().width,0);return ce.getBoundingClientRect().width-We},[e]),He=l.useCallback(()=>{ge.current&&(clearTimeout(ge.current),ge.current=null)},[]),Xe=l.useCallback(A=>{A===ke.current&&(q(null),D(!1))},[]),Ue=l.useCallback(()=>{o||ot.current||(ot.current=!0,p==null||p(),$e(!1),tt.current=setTimeout(()=>{u()},300))},[o,p,u]),Nt=l.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ot,backdropStyle:Ht,mediaAreaStyle:zt,overlayContentStyle:dn,swipeHandlers:Oe,dismissAreaStyle:Tt}=Us({enabled:_e,onClose:Ue,animMs:300,isBlockedTarget:Nt}),lt=l.useCallback(A=>{d&&Js(A+1,c,!0)},[d,c]),et=l.useCallback(A=>{if(A)return A.getBoundingClientRect().height},[]),gt=l.useCallback(A=>{if(X.length===0)return;const ce=(A%X.length+X.length)%X.length;if(ce===de)return;const We=X[de],Re=X[ce];ke.current+=1;const Ee=ke.current,dt=b==="fade"&&ts(We==null?void 0:We.entry)!==ts(Re==null?void 0:Re.entry),$t=et(Ke.current),it=dt?(()=>{const Xt=Se();Oi.flushSync(()=>{Ge(Re.entry)}),Ke.current&&Xt&&(Ke.current.style.width=`${Xt}px`);const Zi=et(Ke.current);return Ke.current&&(Ke.current.style.width=""),{measuredIncomingTitlesHeight:Zi,incomingTitlesMeasureWidth:Xt}})():void 0,Vt=Math.max($t??0,(it==null?void 0:it.measuredIncomingTitlesHeight)??0)||void 0;ee(Ee),q(de),D(!0),K(ce),lt(ce),Le.current=ce,dt?(He(),Vt&&pe(Vt),it!=null&&it.incomingTitlesMeasureWidth&&we(it.incomingTitlesMeasureWidth),Ie((We==null?void 0:We.entryIndex)??null),Fe(!0),ze.current=Re.entryIndex,ge.current=setTimeout(()=>{Ie(null),Fe(!1),pe(void 0),we(void 0),Ge(null),ge.current=null},400)):(He(),Ie(null),Fe(!1),pe(void 0),we(void 0),Ge(null),ze.current=Re.entryIndex)},[de,He,Se,et,X,lt,b]),qt=l.useCallback(()=>{Rt.current=null},[]),Kt=l.useCallback(A=>{!me||X.length<=1||A.pointerType==="mouse"&&A.button!==0||A.target.closest("[data-controls]")||(Rt.current={startX:A.clientX,startY:A.clientY,pointerId:A.pointerId})},[me,X.length]),tn=l.useCallback(A=>{var Xt;if(!me||X.length<=1||A.pointerType==="mouse"&&A.button!==0)return;if(Ot){qt();return}const ce=Rt.current;if(!ce||ce.pointerId!==A.pointerId||(qt(),A.target.closest("[data-controls]")))return;const Re=A.clientX-ce.startX,Ee=A.clientY-ce.startY,dt=Math.abs(Re),$t=Math.abs(Ee);if(dt>=lg&&dt>$t){gt(Re>0?de-1:de+1);return}if(dt>Ja||$t>Ja)return;const it=(Xt=st.current)==null?void 0:Xt.getBoundingClientRect(),Vt=it?it.left+it.width/2:window.innerWidth/2;gt(A.clientX<Vt?de-1:de+1)},[de,me,gt,Ot,qt,X.length]),hn=l.useCallback(A=>{const ce=Rt.current;(ce==null?void 0:ce.pointerId)===A.pointerId&&qt()},[qt]);Xs(),l.useEffect(()=>{It.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const A=requestAnimationFrame(()=>{$e(!0),requestAnimationFrame(()=>{Ct.current?Ct.current.focus():st.current&&st.current.focus()})});return()=>{cancelAnimationFrame(A),tt.current&&clearTimeout(tt.current),ge.current&&clearTimeout(ge.current);const ce=It.current;ce&&document.contains(ce)&&ce.focus()}},[]),l.useEffect(()=>{var A;b!=="fade"&&(ze.current=((A=X[de])==null?void 0:A.entryIndex)??0,He(),Ie(null),Fe(!1),pe(void 0),we(void 0))},[de,He,X,b]),l.useEffect(()=>{const A=ce=>{if(ce.key==="Escape"){Ue();return}if(ce.key==="ArrowLeft"&&X.length>1){gt(de-1);return}if(ce.key==="ArrowRight"&&X.length>1){gt(de+1);return}if(ce.key==="Tab"&&st.current){const We=st.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),Re=Array.from(We).filter(it=>!it.closest('[aria-hidden="true"]'));if(Re.length===0)return;const Ee=Re[0],dt=Re[Re.length-1],$t=document.activeElement;ce.shiftKey?($t===Ee||!st.current.contains($t))&&(ce.preventDefault(),dt.focus()):($t===dt||!st.current.contains($t))&&(ce.preventDefault(),Ee.focus())}};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[gt,Ue,de,X.length]),l.useLayoutEffect(()=>{He(),ke.current=0,ee(0),q(null),D(!1),Ie(null),Fe(!1),pe(void 0),we(void 0),Ge(null),K(A=>{const ce=Math.max(0,X.length-1);return Math.min(A,ce)})},[He,t.length,T,X.length]),l.useLayoutEffect(()=>{var We;const A=Math.max(0,X.length-1),ce=Math.min(Math.max(0,a),A);Le.current=ce,ze.current=((We=X[ce])==null?void 0:We.entryIndex)??0,K(ce)},[a]);const Ye=Ne!==null?t[Ne]:null,nn=z!==null?X[z]:null,At=(N==null?void 0:N.title1)||(N==null?void 0:N.title2)||(N==null?void 0:N.title3)||(Ye==null?void 0:Ye.title1)||(Ye==null?void 0:Ye.title2)||(Ye==null?void 0:Ye.title3),kt=fg(T,X,t),De=R!==null,Wt=At||kt||De,le=kt&&De?{gap:J}:void 0,be=`${e}-titles-stack${ye?` ${e}-titles-stack-stacked`:""}`,Pe=`${e}-titles-layer-out${ye?` ${e}-titles-layer-out-stacked`:""}`,Ve=`${e}-titles-layer-out`,ht=(P??0)>0||o,wt=_(I),Me=l.useMemo(()=>({title1Width:$??ur.title1Width,title2Width:S??ur.title2Width,title3Width:F??ur.title3Width}),[$,S,F]),ft=l.useMemo(()=>({title2MarginLeft:k,title3MarginLeft:x}),[k,x]),qe=l.useMemo(()=>N?co(e,N,W,ae,g):[],[e,N,W,ae,g]),rt=l.useMemo(()=>qe.map(A=>Me[A.widthKey]),[qe,Me]),Qe=l.useMemo(()=>Po(qe.length,rt),[qe.length,rt]),Pt=l.useMemo(()=>$r(qe.length,rt),[qe.length,rt]),St=l.useMemo(()=>qe.filter(A=>A.prefix==="title1"),[qe]),Be=l.useMemo(()=>qe.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[qe]),xt=l.useMemo(()=>uo(St,Me),[St,Me]),at=l.useMemo(()=>uo(Be,Me),[Be,Me]),vt=l.useCallback((A,ce)=>{const We=qe.findIndex(Ee=>Ee.prefix===A.prefix);if(!ye||ce==="single-row")return{effectiveWidth:Pt[We]??0,resolvedWidth:Qe[We]??0,maxWidth:Gn(We,Qe)};if(ce==="two-row-top"){const Ee=St.findIndex(dt=>dt.prefix===A.prefix);return{effectiveWidth:xt.effective[Ee]??0,resolvedWidth:xt.resolved[Ee]??0,maxWidth:Gn(Ee,xt.resolved)}}const Re=Be.findIndex(Ee=>Ee.prefix===A.prefix);return{effectiveWidth:at.effective[Re]??0,resolvedWidth:at.resolved[Re]??0,maxWidth:Gn(Re,at.resolved)}},[qe,Be,at,Pt,Qe,St,xt,ye]),Mt=l.useCallback(A=>vg(qe,Qe,ft,A)+(ye?0:P??0),[qe,Qe,ft,ye,P]),nt=l.useCallback(()=>ye?0:P??0,[ye,P]),Bt=l.useCallback(A=>Be.slice(0,A).reduce((ce,We,Re)=>ce+(We.marginLeftKey?ft[We.marginLeftKey]??0:0)+(at.resolved[Re]??0),0),[Be,at.resolved,ft]),on=l.useCallback(A=>{const ce=Be[A];return Bt(A)+(ce.marginLeftKey?ft[ce.marginLeftKey]??0:0)+(at.resolved[A]??0)},[Be,at.resolved,Bt,ft]),fn=l.useCallback((A,ce,We)=>{if(!ye||We==="single-row"){const it=A.findIndex(zn=>zn.prefix===ce.prefix),Vt=A.map(zn=>Me[zn.widthKey]),Xt=Po(A.length,Vt);return{effectiveWidth:$r(A.length,Vt)[it]??0,resolvedWidth:Xt[it]??0,maxWidth:Gn(it,Xt)}}if(We==="two-row-top"){const it=A.filter(zn=>zn.prefix==="title1"),Vt=it.findIndex(zn=>zn.prefix===ce.prefix),{resolved:Xt,effective:Zi}=uo(it,Me);return{effectiveWidth:Zi[Vt]??0,resolvedWidth:Xt[Vt]??0,maxWidth:Gn(Vt,Xt)}}const Re=A.filter(it=>it.prefix==="title2"||it.prefix==="title3"),Ee=Re.findIndex(it=>it.prefix===ce.prefix),{resolved:dt,effective:$t}=uo(Re,Me);return{effectiveWidth:$t[Ee]??0,resolvedWidth:dt[Ee]??0,maxWidth:Gn(Ee,dt)}},[Me,ye]),Pn=(A,ce,We)=>{const Re=A.marginLeftKey?ft[A.marginLeftKey]??0:0,{effectiveWidth:Ee,resolvedWidth:dt,maxWidth:$t}=We??vt(A,ce),it=Math.max(Re,lo),Vt=o&&ce==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{width:_(Ee),...Re>0?{marginLeft:_(Re)}:{}},children:[r.jsx("p",{className:A.className,style:A.style,children:A.text}),Vt&&A.marginLeftKey?r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt),style:{position:"absolute",top:0,left:_(-Re),width:_(it),height:"100%",pointerEvents:"auto"}}):null,Vt?r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($t),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:_(-ii/2),width:_(ii),height:"100%",pointerEvents:"auto"}}):null]},A.className)},yn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:_(P??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),On=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),Bn=()=>r.jsx("span",{className:`${e}-entry-counter`,style:te,"aria-live":"polite","aria-atomic":"true",children:hg(X,de,T,t)}),vn=()=>kt?o&&De?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Bn(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${dr(J)} + ${J}))`,width:dr(J),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Bn():null,jn=()=>!kt&&!De?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:le,children:[vn(),De?Go():null]}),Qn=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[kt||At?On():null,ht?yn():null,Yi(N),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),jn(),bn()]}),Ko=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%"},children:[kt||At?On():null,ht?yn():null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:xe&&se?{minHeight:se}:void 0,children:[r.jsx("div",{ref:Ke,className:be,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:he(ve||N)}),r.jsxs("div",{ref:yt,className:be,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%",...xe&&Ce?{width:Ce,maxWidth:"100%"}:void 0},children:[Ye&&xe?r.jsx("div",{className:`${Pe} ${e}-titles-fade-out`,children:he(Ye)}):null,r.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:he(N)})]}),bn()]}),jn()]}),Go=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(M??0,i),height:E.scalingValue(M??0,i),marginRight:ie,"--close-icon-hover-color":Z},children:[r.jsx("button",{ref:Ct,type:"button",className:`${e}-close-icon-inner`,onClick:Ue,"aria-label":"Close",children:r.jsx(ln,{url:R??"",fill:j,hoverFill:i&&!s?j:Z,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:ie,height:"100%",pointerEvents:"auto"}})]}),$i=(A,ce)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[kt||At?On():null,ht?yn():null,ce!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:ce},children:A}):r.jsxs(r.Fragment,{children:[A,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),jn()]}),Yi=A=>{if(!A)return null;const ce=co(e,A,W,ae,g);return r.jsx(r.Fragment,{children:ce.map(We=>Pn(We,"single-row",fn(ce,We,"single-row")))})},h=A=>{if(!A)return null;const ce=co(e,A,W,ae,g),We=ce.find(Re=>Re.prefix==="title1");return We?Pn(We,"two-row-top",fn(ce,We,"two-row-top")):null},Y=(A,ce=!1)=>{const We=A?co(e,A,W,ae,g):[],Re=We.filter($t=>$t.prefix==="title2"||$t.prefix==="title3"),Ee=o&&ce;return Re.length>0||Ee||(I??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Re.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[Re.map($t=>Pn($t,"two-row-bottom",fn(We,$t,"two-row-bottom"))),ce&&o?r.jsxs(r.Fragment,{children:[Lt(),Gt()]}):null]}):null,(I??0)>0||Ee?r.jsx("div",{"data-controls":Ee?"titleRowMarginBottom":void 0,"data-controls-axis":Ee?"y":void 0,"data-controls-reverse":Ee?"":void 0,className:Ee?`${e}-control`:void 0,style:{height:wt,width:"100%",flexShrink:0,pointerEvents:Ee?"auto":"none"}}):null]}):null},ne=(A,ce=!1)=>r.jsxs(r.Fragment,{children:[$i(h(A)),Y(A,ce)]}),he=A=>ye?r.jsx("div",{className:`${e}-titles-row-two-row`,children:ne(A)}):A?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Yi(A)}):null,Ae=()=>{const A=ye?-1:qe.findIndex(Re=>Re.prefix==="title1"),ce=!ye&&(o||(P??0)>0)?(()=>{const Ee=Math.max(P??0,lo),dt=A>=0?Qe[A]:$;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt),style:{position:"absolute",top:0,left:0,width:_(Ee),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,We=qe.flatMap((Re,Ee)=>{if(!Re.marginLeftKey)return[];const dt=ft[Re.marginLeftKey]??0,$t=yg(qe,Qe,ft,Ee)+nt(),it=Math.max(dt,lo);return r.jsx("div",{"data-controls":Re.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Qe[Ee]),style:{position:"absolute",top:0,left:_($t),width:_(it),height:"100%",pointerEvents:"auto"}},Re.marginLeftKey)});return ce?[ce,...We]:We},ct=()=>qe.map((A,ce)=>{const We=Gn(ce,Qe),Ee=Mt(ce)-ii/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.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,left:_(Ee),width:_(ii),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Lt=()=>Be.flatMap((A,ce)=>{if(!A.marginLeftKey)return[];const We=ft[A.marginLeftKey]??0,Re=Bt(ce),Ee=Math.max(We,lo),{resolvedWidth:dt}=vt(A,"two-row-bottom");return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt),style:{position:"absolute",top:0,left:_(Re),width:_(Ee),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),Gt=()=>Be.map((A,ce)=>{const{maxWidth:We}=vt(A,"two-row-bottom"),Ee=on(ce)-ii/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.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,left:_(Ee),width:_(ii),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),bn=()=>!o||ye?null:r.jsxs(r.Fragment,{children:[Ae(),ct()]}),xn=A=>{const ce=!A.objectFit&&Ln(w);return{className:`${e}-slide-image-cell${ce?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:U,maxHeight:H,...ce?{"--image-aspect-ratio":Vo(w)}:{}}}},un=A=>A.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":A.objectFit}}:Ln(w)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ei=A=>{if(A.length===0)return null;const ce=A.length>1,We=dr(Q),Re=`calc(-0.5 * (${We} + ${Q}))`;if(A.length===1){const Ee=A[0];return r.jsx("div",{...xn(Ee),children:r.jsx("img",{...un(Ee),src:Ee.url,alt:Ee.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ce?{gap:Q}:void 0,children:A.map((Ee,dt)=>r.jsxs("div",{...xn(Ee),children:[r.jsx("img",{...un(Ee),src:Ee.url,alt:Ee.name??"",draggable:!1}),o&&ce&&dt<A.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Re,width:We,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ee.url}-${dt}`))})},Ji=!!(N!=null&&N.title2||N!=null&&N.title3||Ye!=null&&Ye.title2||Ye!=null&&Ye.title3||(I??0)>0||o),Ci=()=>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:Ke,className:be,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ne(ve||N)}),r.jsxs("div",{ref:yt,className:`${e}-titles-row-two-row`,style:{...xe&&se?{minHeight:se}:void 0,...xe&&Ce?{width:Ce,maxWidth:"100%"}:void 0},children:[$i(r.jsxs("div",{className:be,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%"},children:[Ye&&xe?r.jsx("div",{className:`${Ve} ${e}-titles-fade-out`,children:h(Ye)}):null,r.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:h(N)})]}),xe&&se?se:void 0),Ji?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ye&&xe?r.jsx("div",{className:`${Pe} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Y(Ye)}):null,r.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ye?` ${e}-titles-layer-in-stacked`:""}`,children:Y(N,!0)})]}):null]})]}),el=()=>{const A=Ji;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...A?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:A?void 0:{flex:"0 0 auto",height:"auto"},children:ne(N,!0)}),bn()]})};return r.jsxs("div",{ref:st,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ot||Ue()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:De?void 0:-1,style:{opacity:re?1:0,transition:"opacity 300ms ease",pointerEvents:re?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:L,...Ht}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Tt,...Oe,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:zt,onClick:A=>A.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":me&&X.length>1?"true":"false",onPointerDown:me?Kt:void 0,onPointerUp:me?tn:void 0,onPointerCancel:me?hn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[nn&&v?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:A=>{A.target===A.currentTarget&&Xe(O)},children:r.jsx("div",{className:`${e}-slide-area`,children:ei(nn.images)})},`slide-out-${O}`):null,r.jsx("div",{className:`${e}-slide-layer-in${v?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:B?ei(B.images):null})},`slide-in-${O}-${de}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:dn,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:oe,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...ye?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${ye?` ${e}-lightbox-content-area-stacked`:""}`,children:Wt&&r.jsx("div",{className:`${e}-text-bar-cell${ye?` ${e}-text-bar-cell-stacked`:""}`,style:ye?void 0:{flex:1,minWidth:0,width:"100%"},children:ye?b==="fade"?Ci():el():b==="fade"?Ko():Qn()})})})]})]})]})};function Tg(e){return`
10802
+ `,ng="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>'),Dn={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 ig(e){const t={};return t[lt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[lt(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[lt(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[lt(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[lt(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[lt(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const og=Ui.reduce((e,t)=>({...e,...ig(t)}),{}),rg=Ui.reduce((e,t)=>({...e,[lt(t,"fontFamily")]:"Arial",[lt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[lt(t,"letterSpacing")]:0,[lt(t,"wordSpacing")]:0,[lt(t,"textAlign")]:"left",[lt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ja(e){return Ui.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[lt(n,"fontSize")]=i),o!==void 0&&(t[lt(n,"lineHeight")]=o),t},{})}const ag=Xm(),sg={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"}}},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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",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"]}},thumbnailActiveColor:{type:"string",scope:"common",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:"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"}},...og,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/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:ng,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...rg},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Ja({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.3,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.025,iconMarginLeft:.02,...Ja({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,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:[ag]}],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,type:"media-input",supportsMainImage:!0}},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/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},lg={element:eg,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:sg,sourceCode:tg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ui.map(e=>({path:`styles.${lt(e,"fontSettings")}`}))}},cg=50,Za=10,Qr="cntrl-lightbox-journal",Do=Qr,$r=`${Qr}-`,qo=e=>`${Qr}-${e}`,ea=e=>e===Do||e.startsWith($r),Qa=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},es=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Qa(t.get(qo(e)));if(i)return i}const n=Qa(t.get(Do));if(n)return n;for(const[i]of t){if(!i.startsWith($r))continue;const o=i.slice($r.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},ts=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Zs=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{ea(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(qo(t),String(e)):i.searchParams.set(Do,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},dg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===qo(e)||i===Do:ea(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)}},Qs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(qo(e)):[...t.keys()].some(n=>ea(n))},ug=(e,t)=>{if(Qs(t)){if(e){window.history.back();return}dg(t)}},pg=20,mg=2,ur=e=>`max(${e}, ${pg}px)`,bi=e=>((e==null?void 0:e.image)??[]).slice(0,mg),el=e=>e.reduce((t,n)=>t+bi(n).length,0),gg=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+bi(s).length,1),i=bi(e[t]).length;return{start:n,end:n+i-1}},hg=(e,t)=>{const n=el(e),{start:i,end:o}=gg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},So=(e,t)=>t==="B"?e.flatMap((n,i)=>bi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:bi(n)})),fg=(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 hg(i,o)},ns=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",yg=(e,t,n)=>e==="B"?t.length>1:el(n)>1,oi=.004,lo=.004,pr={title1Width:.13,title2Width:.13,title3Width:.14},co=(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},Po=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...a]}},{overflow:i-1,widths:[]});return o},Cr=(e,t)=>Po(e,t),qn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},uo=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Po(e.length,n),effective:Cr(e.length,n)}},vg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),bg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Xi=["title1","title2","title3","count"],ct=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,xg={title1:"1",title2:"2",title3:"3",count:"Count"},wg=e=>[ct(e,"fontFamily"),ct(e,"fontSettings"),{type:"row",items:[ct(e,"fontSize"),ct(e,"lineHeight"),ct(e,"letterSpacing"),ct(e,"wordSpacing")]},ct(e,"textAlign"),ct(e,"textAppearance")],Sg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Xi.map(e=>[xg[e],wg(e)]))}),$g={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Cg={title1:.02,title2:.02,title3:.02,count:.017},po=(e,t)=>{const n=i=>{const o=ct(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[$g[t]]}},mo=(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??Cg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Nt(i,n)},Tg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:p,onClose:u})=>{const{type:L,coverFit:x,backgroundColor:E,imageGap:m,maxWidth:y,maxHeight:C,textTransition:v,title1Width:$,title2Width:w,title3Width:N,title1MarginLeft:A=0,title2MarginLeft:k=0,title3MarginLeft:b=0,titleRowMarginBottom:P=0,titleHeaderLayout:U="single-row",countCloseGap:f=0,closeIcon:R,closeIconMaxWidth:M,closeIconColor:j,closeIconHoverColor:Q,contentMarginTop:ue=0,iconMarginRight:z=0}=n,_=l.useCallback(T=>I.scalingValue(T,i??!1),[i]),ee=_(m??0),X=`${y}%`,F=`${C}%`,J=_(f),oe=_(ue),re=_(z),W=mo("title1",po(n,"title1"),i),se=mo("title2",po(n,"title2"),i),h=mo("title3",po(n,"title3"),i),ae=mo("count",po(n,"count"),i),ye=U==="mobile",he=!i||!!s,Te=!o&&(!i||!!s),G=l.useMemo(()=>So(t,L),[t,L]),[le,D]=l.useState(a),te=G[le],O=te==null?void 0:te.entry,[ce,ke]=l.useState(!1),[$e,Ee]=l.useState(null),[Le,Me]=l.useState(!1),[K,V]=l.useState(null),[S,B]=l.useState(!1),[H,Z]=l.useState(0),[ne,me]=l.useState(),[we,Ce]=l.useState(),[Se,Ke]=l.useState(null),ge=l.useRef(null),We=l.useRef(0),Ve=l.useRef(0),Ge=l.useRef(0),rt=l.useRef(!1),It=l.useRef(null),Mt=l.useRef(null),Oe=l.useRef(null),ft=l.useRef(null),ut=l.useRef(null),St=l.useRef(null),_t=l.useRef(null),be=l.useCallback(()=>{const T=Mt.current;if(!T)return;const ie=T.closest(`.${e}-lightbox-content-area`);if(!ie)return T.getBoundingClientRect().width;const Pe=Array.from(ie.children).reduce((Ae,Re)=>!(Re instanceof HTMLElement)||Re.contains(T)?Ae:Ae+Re.getBoundingClientRect().width,0);return ie.getBoundingClientRect().width-Pe},[e]),De=l.useCallback(()=>{ge.current&&(clearTimeout(ge.current),ge.current=null)},[]),Ye=l.useCallback(T=>{T===We.current&&(V(null),B(!1))},[]),Qe=l.useCallback(()=>{o||rt.current||(rt.current=!0,p==null||p(),ke(!1),It.current=setTimeout(()=>{u()},300))},[o,p,u]),Ht=l.useCallback(T=>!!(T.closest("[data-controls]")||T.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:$t,backdropStyle:vt,mediaAreaStyle:kt,overlayContentStyle:Wt,swipeHandlers:He,dismissAreaStyle:Pt}=Xs({enabled:Te,onClose:Qe,animMs:300,isBlockedTarget:Ht}),yt=l.useCallback(T=>{d&&Zs(T+1,c,!0)},[d,c]),nt=l.useCallback(T=>{if(T)return T.getBoundingClientRect().height},[]),bt=l.useCallback(T=>{if(G.length===0)return;const ie=(T%G.length+G.length)%G.length;if(ie===le)return;const Pe=G[le],Ae=G[ie];We.current+=1;const Re=We.current,st=v==="fade"&&ns(Pe==null?void 0:Pe.entry)!==ns(Ae==null?void 0:Ae.entry),Et=nt(Oe.current),tt=st?(()=>{const en=be();Oi.flushSync(()=>{Ke(Ae.entry)}),Oe.current&&en&&(Oe.current.style.width=`${en}px`);const Zi=nt(Oe.current);return Oe.current&&(Oe.current.style.width=""),{measuredIncomingTitlesHeight:Zi,incomingTitlesMeasureWidth:en}})():void 0,Dt=Math.max(Et??0,(tt==null?void 0:tt.measuredIncomingTitlesHeight)??0)||void 0;Z(Re),V(le),B(!0),D(ie),yt(ie),Ge.current=ie,st?(De(),Dt&&me(Dt),tt!=null&&tt.incomingTitlesMeasureWidth&&Ce(tt.incomingTitlesMeasureWidth),Ee((Pe==null?void 0:Pe.entryIndex)??null),Me(!0),Ve.current=Ae.entryIndex,ge.current=setTimeout(()=>{Ee(null),Me(!1),me(void 0),Ce(void 0),Ke(null),ge.current=null},400)):(De(),Ee(null),Me(!1),me(void 0),Ce(void 0),Ke(null),Ve.current=Ae.entryIndex)},[le,De,be,nt,G,yt,v]),Kt=l.useCallback(()=>{_t.current=null},[]),On=l.useCallback(T=>{!he||G.length<=1||T.pointerType==="mouse"&&T.button!==0||T.target.closest("[data-controls]")||(_t.current={startX:T.clientX,startY:T.clientY,pointerId:T.pointerId})},[he,G.length]),Ut=l.useCallback(T=>{var en;if(!he||G.length<=1||T.pointerType==="mouse"&&T.button!==0)return;if($t){Kt();return}const ie=_t.current;if(!ie||ie.pointerId!==T.pointerId||(Kt(),T.target.closest("[data-controls]")))return;const Ae=T.clientX-ie.startX,Re=T.clientY-ie.startY,st=Math.abs(Ae),Et=Math.abs(Re);if(st>=cg&&st>Et){bt(Ae>0?le-1:le+1);return}if(st>Za||Et>Za)return;const tt=(en=ft.current)==null?void 0:en.getBoundingClientRect(),Dt=tt?tt.left+tt.width/2:window.innerWidth/2;bt(T.clientX<Dt?le-1:le+1)},[le,he,bt,$t,Kt,G.length]),Xt=l.useCallback(T=>{const ie=_t.current;(ie==null?void 0:ie.pointerId)===T.pointerId&&Kt()},[Kt]);Ys(),l.useEffect(()=>{St.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const T=requestAnimationFrame(()=>{ke(!0),requestAnimationFrame(()=>{ut.current?ut.current.focus():ft.current&&ft.current.focus()})});return()=>{cancelAnimationFrame(T),It.current&&clearTimeout(It.current),ge.current&&clearTimeout(ge.current);const ie=St.current;ie&&document.contains(ie)&&ie.focus()}},[]),l.useEffect(()=>{var T;v!=="fade"&&(Ve.current=((T=G[le])==null?void 0:T.entryIndex)??0,De(),Ee(null),Me(!1),me(void 0),Ce(void 0))},[le,De,G,v]),l.useEffect(()=>{const T=ie=>{if(ie.key==="Escape"){Qe();return}if(ie.key==="ArrowLeft"&&G.length>1){bt(le-1);return}if(ie.key==="ArrowRight"&&G.length>1){bt(le+1);return}if(ie.key==="Tab"&&ft.current){const Pe=ft.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),Ae=Array.from(Pe).filter(tt=>!tt.closest('[aria-hidden="true"]'));if(Ae.length===0)return;const Re=Ae[0],st=Ae[Ae.length-1],Et=document.activeElement;ie.shiftKey?(Et===Re||!ft.current.contains(Et))&&(ie.preventDefault(),st.focus()):(Et===st||!ft.current.contains(Et))&&(ie.preventDefault(),Re.focus())}};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[bt,Qe,le,G.length]),l.useLayoutEffect(()=>{De(),We.current=0,Z(0),V(null),B(!1),Ee(null),Me(!1),me(void 0),Ce(void 0),Ke(null),D(T=>{const ie=Math.max(0,G.length-1);return Math.min(T,ie)})},[De,t.length,L,G.length]),l.useLayoutEffect(()=>{var Pe;const T=Math.max(0,G.length-1),ie=Math.min(Math.max(0,a),T);Ge.current=ie,Ve.current=((Pe=G[ie])==null?void 0:Pe.entryIndex)??0,D(ie)},[a]);const et=$e!==null?t[$e]:null,sn=K!==null?G[K]:null,Ot=(O==null?void 0:O.title1)||(O==null?void 0:O.title2)||(O==null?void 0:O.title3)||(et==null?void 0:et.title1)||(et==null?void 0:et.title2)||(et==null?void 0:et.title3),zt=yg(L,G,t),Ne=R!==null,At=Ot||zt||Ne,de=zt&&Ne?{gap:J}:void 0,xe=`${e}-titles-stack${ye?` ${e}-titles-stack-stacked`:""}`,_e=`${e}-titles-layer-out${ye?` ${e}-titles-layer-out-stacked`:""}`,ze=`${e}-titles-layer-out`,it=(A??0)>0||o,Ct=_(P),Fe=l.useMemo(()=>({title1Width:$??pr.title1Width,title2Width:w??pr.title2Width,title3Width:N??pr.title3Width}),[$,w,N]),pt=l.useMemo(()=>({title2MarginLeft:k,title3MarginLeft:b}),[k,b]),qe=l.useMemo(()=>O?co(e,O,W,se,h):[],[e,O,W,se,h]),at=l.useMemo(()=>qe.map(T=>Fe[T.widthKey]),[qe,Fe]),mt=l.useMemo(()=>Po(qe.length,at),[qe.length,at]),Ft=l.useMemo(()=>Cr(qe.length,at),[qe.length,at]),gt=l.useMemo(()=>qe.filter(T=>T.prefix==="title1"),[qe]),Be=l.useMemo(()=>qe.filter(T=>T.prefix==="title2"||T.prefix==="title3"),[qe]),ht=l.useMemo(()=>uo(gt,Fe),[gt,Fe]),Tt=l.useMemo(()=>uo(Be,Fe),[Be,Fe]),xt=l.useCallback((T,ie)=>{const Pe=qe.findIndex(Re=>Re.prefix===T.prefix);if(!ye||ie==="single-row")return{effectiveWidth:Ft[Pe]??0,resolvedWidth:mt[Pe]??0,maxWidth:qn(Pe,mt)};if(ie==="two-row-top"){const Re=gt.findIndex(st=>st.prefix===T.prefix);return{effectiveWidth:ht.effective[Re]??0,resolvedWidth:ht.resolved[Re]??0,maxWidth:qn(Re,ht.resolved)}}const Ae=Be.findIndex(Re=>Re.prefix===T.prefix);return{effectiveWidth:Tt.effective[Ae]??0,resolvedWidth:Tt.resolved[Ae]??0,maxWidth:qn(Ae,Tt.resolved)}},[qe,Be,Tt,Ft,mt,gt,ht,ye]),Yt=l.useCallback(T=>bg(qe,mt,pt,T)+(ye?0:A??0),[qe,mt,pt,ye,A]),Ze=l.useCallback(()=>ye?0:A??0,[ye,A]),Jt=l.useCallback(T=>Be.slice(0,T).reduce((ie,Pe,Ae)=>ie+(Pe.marginLeftKey?pt[Pe.marginLeftKey]??0:0)+(Tt.resolved[Ae]??0),0),[Be,Tt.resolved,pt]),jt=l.useCallback(T=>{const ie=Be[T];return Jt(T)+(ie.marginLeftKey?pt[ie.marginLeftKey]??0:0)+(Tt.resolved[T]??0)},[Be,Tt.resolved,Jt,pt]),Zt=l.useCallback((T,ie,Pe)=>{if(!ye||Pe==="single-row"){const tt=T.findIndex(Bn=>Bn.prefix===ie.prefix),Dt=T.map(Bn=>Fe[Bn.widthKey]),en=Po(T.length,Dt);return{effectiveWidth:Cr(T.length,Dt)[tt]??0,resolvedWidth:en[tt]??0,maxWidth:qn(tt,en)}}if(Pe==="two-row-top"){const tt=T.filter(Bn=>Bn.prefix==="title1"),Dt=tt.findIndex(Bn=>Bn.prefix===ie.prefix),{resolved:en,effective:Zi}=uo(tt,Fe);return{effectiveWidth:Zi[Dt]??0,resolvedWidth:en[Dt]??0,maxWidth:qn(Dt,en)}}const Ae=T.filter(tt=>tt.prefix==="title2"||tt.prefix==="title3"),Re=Ae.findIndex(tt=>tt.prefix===ie.prefix),{resolved:st,effective:Et}=uo(Ae,Fe);return{effectiveWidth:Et[Re]??0,resolvedWidth:st[Re]??0,maxWidth:qn(Re,st)}},[Fe,ye]),mn=(T,ie,Pe)=>{const Ae=T.marginLeftKey?pt[T.marginLeftKey]??0:0,{effectiveWidth:Re,resolvedWidth:st,maxWidth:Et}=Pe??xt(T,ie),tt=Math.max(Ae,lo),Dt=o&&ie==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":T.prefix,style:{width:_(Re),...Ae>0?{marginLeft:_(Ae)}:{}},children:[r.jsx("p",{className:T.className,style:T.style,children:T.text}),Dt&&T.marginLeftKey?r.jsx("div",{"data-controls":T.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(st),style:{position:"absolute",top:0,left:_(-Ae),width:_(tt),height:"100%",pointerEvents:"auto"}}):null,Dt?r.jsx("div",{"data-controls":T.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Et),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:_(-oi/2),width:_(oi),height:"100%",pointerEvents:"auto"}}):null]},T.className)},Ln=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:_(A??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),yn=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),En=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ae,"aria-live":"polite","aria-atomic":"true",children:fg(G,le,L,t)}),Jn=()=>zt?o&&Ne?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[En(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ur(J)} + ${J}))`,width:ur(J),height:"100%",pointerEvents:"auto",zIndex:3}})]}):En():null,Zn=()=>!zt&&!Ne?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:de,children:[Jn(),Ne?In():null]}),Ko=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[zt||Ot?yn():null,it?Ln():null,Yi(O),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Zn(),Y()]}),Go=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%"},children:[zt||Ot?yn():null,it?Ln():null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:Le&&ne?{minHeight:ne}:void 0,children:[r.jsx("div",{ref:Oe,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ti(Se||O)}),r.jsxs("div",{ref:Mt,className:xe,style:{position:Le?"absolute":"relative",inset:Le?0:void 0,width:"100%",...Le&&we?{width:we,maxWidth:"100%"}:void 0},children:[et&&Le?r.jsx("div",{className:`${_e} ${e}-titles-fade-out`,children:ti(et)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Le?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ti(O)})]}),Y()]}),Zn()]}),In=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:I.scalingValue(M??0,i),height:I.scalingValue(M??0,i),marginRight:re,"--close-icon-hover-color":Q},children:[r.jsx("button",{ref:ut,type:"button",className:`${e}-close-icon-inner`,onClick:Qe,"aria-label":"Close",children:r.jsx(un,{url:R??"",fill:j,hoverFill:i&&!s?j:Q,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:re,height:"100%",pointerEvents:"auto"}})]}),Qn=(T,ie)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[zt||Ot?yn():null,it?Ln():null,ie!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:ie},children:T}):r.jsxs(r.Fragment,{children:[T,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Zn()]}),Yi=T=>{if(!T)return null;const ie=co(e,T,W,se,h);return r.jsx(r.Fragment,{children:ie.map(Pe=>mn(Pe,"single-row",Zt(ie,Pe,"single-row")))})},Pn=T=>{if(!T)return null;const ie=co(e,T,W,se,h),Pe=ie.find(Ae=>Ae.prefix==="title1");return Pe?mn(Pe,"two-row-top",Zt(ie,Pe,"two-row-top")):null},Ci=(T,ie=!1)=>{const Pe=T?co(e,T,W,se,h):[],Ae=Pe.filter(Et=>Et.prefix==="title2"||Et.prefix==="title3"),Re=o&&ie;return Ae.length>0||Re||(P??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Ae.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[Ae.map(Et=>mn(Et,"two-row-bottom",Zt(Pe,Et,"two-row-bottom"))),ie&&o?r.jsxs(r.Fragment,{children:[g(),q()]}):null]}):null,(P??0)>0||Re?r.jsx("div",{"data-controls":Re?"titleRowMarginBottom":void 0,"data-controls-axis":Re?"y":void 0,"data-controls-reverse":Re?"":void 0,className:Re?`${e}-control`:void 0,style:{height:Ct,width:"100%",flexShrink:0,pointerEvents:Re?"auto":"none"}}):null]}):null},ei=(T,ie=!1)=>r.jsxs(r.Fragment,{children:[Qn(Pn(T)),Ci(T,ie)]}),ti=T=>ye?r.jsx("div",{className:`${e}-titles-row-two-row`,children:ei(T)}):T?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Yi(T)}):null,Ji=()=>{const T=ye?-1:qe.findIndex(Ae=>Ae.prefix==="title1"),ie=!ye&&(o||(A??0)>0)?(()=>{const Re=Math.max(A??0,lo),st=T>=0?mt[T]:$;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(st),style:{position:"absolute",top:0,left:0,width:_(Re),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Pe=qe.flatMap((Ae,Re)=>{if(!Ae.marginLeftKey)return[];const st=pt[Ae.marginLeftKey]??0,Et=vg(qe,mt,pt,Re)+Ze(),tt=Math.max(st,lo);return r.jsx("div",{"data-controls":Ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(mt[Re]),style:{position:"absolute",top:0,left:_(Et),width:_(tt),height:"100%",pointerEvents:"auto"}},Ae.marginLeftKey)});return ie?[ie,...Pe]:Pe},Uo=()=>qe.map((T,ie)=>{const Pe=qn(ie,mt),Re=Yt(ie)-oi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":T.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(Re),width:_(oi),height:"100%",pointerEvents:"auto"}})},`${T.widthKey}-junction`)}),g=()=>Be.flatMap((T,ie)=>{if(!T.marginLeftKey)return[];const Pe=pt[T.marginLeftKey]??0,Ae=Jt(ie),Re=Math.max(Pe,lo),{resolvedWidth:st}=xt(T,"two-row-bottom");return r.jsx("div",{"data-controls":T.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(st),style:{position:"absolute",top:0,left:_(Ae),width:_(Re),height:"100%",pointerEvents:"auto"}},T.marginLeftKey)}),q=()=>Be.map((T,ie)=>{const{maxWidth:Pe}=xt(T,"two-row-bottom"),Re=jt(ie)-oi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":T.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(Re),width:_(oi),height:"100%",pointerEvents:"auto"}})},`${T.widthKey}-junction`)}),Y=()=>!o||ye?null:r.jsxs(r.Fragment,{children:[Ji(),Uo()]}),pe=T=>{const ie=!T.objectFit&&$n(x);return{className:`${e}-slide-image-cell${ie?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:X,maxHeight:F,...ie?{"--image-aspect-ratio":Vo(x)}:{}}}},ve=T=>T.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":T.objectFit}}:$n(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Ue=T=>{if(T.length===0)return null;const ie=T.length>1,Pe=ur(ee),Ae=`calc(-0.5 * (${Pe} + ${ee}))`;if(T.length===1){const Re=T[0];return r.jsx("div",{...pe(Re),children:r.jsx("img",{...ve(Re),src:Re.url,alt:Re.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ie?{gap:ee}:void 0,children:T.map((Re,st)=>r.jsxs("div",{...pe(Re),children:[r.jsx("img",{...ve(Re),src:Re.url,alt:Re.name??"",draggable:!1}),o&&ie&&st<T.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ae,width:Pe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Re.url}-${st}`))})},ot=!!(O!=null&&O.title2||O!=null&&O.title3||et!=null&&et.title2||et!=null&&et.title3||(P??0)>0||o),Lt=()=>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:Oe,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(Se||O)}),r.jsxs("div",{ref:Mt,className:`${e}-titles-row-two-row`,style:{...Le&&ne?{minHeight:ne}:void 0,...Le&&we?{width:we,maxWidth:"100%"}:void 0},children:[Qn(r.jsxs("div",{className:xe,style:{position:Le?"absolute":"relative",inset:Le?0:void 0,width:"100%"},children:[et&&Le?r.jsx("div",{className:`${ze} ${e}-titles-fade-out`,children:Pn(et)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Le?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Pn(O)})]}),Le&&ne?ne:void 0),ot?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[et&&Le?r.jsx("div",{className:`${_e} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Ci(et)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Le?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ye?` ${e}-titles-layer-in-stacked`:""}`,children:Ci(O,!0)})]}):null]})]}),Qt=()=>{const T=ot;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...T?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:T?void 0:{flex:"0 0 auto",height:"auto"},children:ei(O,!0)}),Y()]})};return r.jsxs("div",{ref:ft,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{$t||Qe()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Ne?void 0:-1,style:{opacity:ce?1:0,transition:"opacity 300ms ease",pointerEvents:ce?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:E,...vt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Pt,...He,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:kt,onClick:T=>T.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":he&&G.length>1?"true":"false",onPointerDown:he?On:void 0,onPointerUp:he?Ut:void 0,onPointerCancel:he?Xt:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[sn&&S?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:T=>{T.target===T.currentTarget&&Ye(H)},children:r.jsx("div",{className:`${e}-slide-area`,children:Ue(sn.images)})},`slide-out-${H}`):null,r.jsx("div",{className:`${e}-slide-layer-in${S?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:te?Ue(te.images):null})},`slide-in-${H}-${le}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Wt,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:oe,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...ye?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${ye?` ${e}-lightbox-content-area-stacked`:""}`,children:At&&r.jsx("div",{className:`${e}-text-bar-cell${ye?` ${e}-text-bar-cell-stacked`:""}`,style:ye?void 0:{flex:1,minWidth:0,width:"100%"},children:ye?v==="fade"?Lt():Qt():v==="fade"?Go():Ko()})})})]})]})]})};function Lg(e){return`
10809
10803
  .${e}-wrapper {
10810
10804
  position: relative;
10811
10805
  width: 100%;
@@ -11339,7 +11333,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11339
11333
  pointer-events: auto;
11340
11334
  z-index: 10;
11341
11335
  }
11342
- `}const Lg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:d}=E.useScopedStyles(),c=(a==null?void 0:a.itemId)??null,{cover:p,coverFit:u,type:T}=e,w=l.useRef(null),[L,m]=l.useState(!1),[y,C]=l.useState(0),b=l.useRef(!1),$=l.useRef(!1),S=l.useRef(!1),F=l.useMemo(()=>(t??[]).filter(f=>vi(f).length>0),[t]),P=L&&F.length>0,k=!n,x=l.useCallback(()=>{k&&(S.current=!0,dg($.current,c),$.current=!1)},[k,c]),I=(f=0)=>{if(F.length===0||n&&!i&&!o)return;const R=So(F,T),M=Math.max(0,Math.min(f,R.length-1));if(C(M),k){const j=Zs();Js(M+1,c,j),$.current=!j}m(!0)},G=l.useCallback(()=>{m(!1),S.current=!1},[]);return l.useEffect(()=>{!n||i||o||m(!1)},[n,i,o]),l.useEffect(()=>{if(!k||b.current)return;b.current=!0;const f=Qa(c);if(!f)return;const R=es(f,So(F,T).length);R<0||(C(R),m(!0))},[F,c,k,T]),l.useEffect(()=>{if(!k)return;const f=()=>{if(S.current){S.current=!1,m(!1);return}const R=Qa(c);if(!R){m(!1);return}const M=es(R,So(F,T).length);if(M<0){m(!1);return}$.current=!1,C(M),m(!0)};return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[F,c,k,T]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:w,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Tg(d)}}),p?r.jsx("button",{type:"button",className:`${d}-cover ${Ln(u)?`${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,...Ln(u)?{"--image-aspect-ratio":Vo(u)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Ln(u)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:p,alt:"cover"})}):null]}),P&&typeof document<"u"&&(()=>{const f=(s?document.getElementById(s):null)??document.body;return Oi.createPortal(r.jsx(Cg,{prefix:d,entries:F,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:y,enableUrlSync:k,journalItemId:c,onBeforeClose:x,onClose:G}),f)})()]})},Eg=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
11336
+ `}const Eg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:d}=I.useScopedStyles(),c=(a==null?void 0:a.itemId)??null,{cover:p,coverFit:u,type:L}=e,x=l.useRef(null),[E,m]=l.useState(!1),[y,C]=l.useState(0),v=l.useRef(!1),$=l.useRef(!1),w=l.useRef(!1),N=l.useMemo(()=>(t??[]).filter(f=>bi(f).length>0),[t]),A=E&&N.length>0,k=!n,b=l.useCallback(()=>{k&&(w.current=!0,ug($.current,c),$.current=!1)},[k,c]),P=(f=0)=>{if(N.length===0||n&&!i&&!o)return;const R=So(N,L),M=Math.max(0,Math.min(f,R.length-1));if(C(M),k){const j=Qs();Zs(M+1,c,j),$.current=!j}m(!0)},U=l.useCallback(()=>{m(!1),w.current=!1},[]);return l.useEffect(()=>{!n||i||o||m(!1)},[n,i,o]),l.useEffect(()=>{if(!k||v.current)return;v.current=!0;const f=es(c);if(!f)return;const R=ts(f,So(N,L).length);R<0||(C(R),m(!0))},[N,c,k,L]),l.useEffect(()=>{if(!k)return;const f=()=>{if(w.current){w.current=!1,m(!1);return}const R=es(c);if(!R){m(!1);return}const M=ts(R,So(N,L).length);if(M<0){m(!1);return}$.current=!1,C(M),m(!0)};return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[N,c,k,L]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:x,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Lg(d)}}),p?r.jsx("button",{type:"button",className:`${d}-cover ${$n(u)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>P(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...$n(u)?{"--image-aspect-ratio":Vo(u)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${$n(u)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:p,alt:"cover"})}):null]}),A&&typeof document<"u"&&(()=>{const f=(s?document.getElementById(s):null)??document.body;return Oi.createPortal(r.jsx(Tg,{prefix:d,entries:N,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:y,enableUrlSync:k,journalItemId:c,onBeforeClose:b,onClose:U}),f)})()]})},Ig=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
11343
11337
  import { createPortal } from 'react-dom';
11344
11338
  import { CommonComponentProps } from '../props';
11345
11339
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -12107,4 +12101,4 @@ export type LightboxJournalSettings = {
12107
12101
  closeIconColor: string;
12108
12102
  closeIconHoverColor: string;
12109
12103
  };
12110
- `,Ig="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>'),Un={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 Pg(e){const t={};return t[pt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[pt(e,"fontSettings")]={...Un.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[pt(e,"fontSize")]={...Un.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[pt(e,"lineHeight")]={...Un.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[pt(e,"letterSpacing")]={...Un.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[pt(e,"wordSpacing")]={...Un.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[pt(e,"textAlign")]={...Un.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[pt(e,"textAppearance")]={...Un.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Rg=Xi.reduce((e,t)=>({...e,...Pg(t)}),{}),Ag=Xi.reduce((e,t)=>({...e,[pt(t,"fontFamily")]:"Goudy Bookletter 1911",[pt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[pt(t,"letterSpacing")]:0,[pt(t,"wordSpacing")]:0,[pt(t,"textAlign")]:"left",[pt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ns(e){return Xi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[pt(n,"fontSize")]=i),o!==void 0&&(t[pt(n,"lineHeight")]=o),t},{})}const Mg=wg(),_g={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"}},...Rg,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/journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Ig,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Ag,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...ns({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},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,...ns({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:[Mg]}],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:"Dorothy Manners & Julanne Johnston",title2:"by Evans Studio",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Inez Nadeau",title2:"Melbourne Spurr",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_4.jpg",name:"",objectFit:"contain"}]},{title1:"Colleen Moore",title2:"Clarence S. Bull",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Gloria Swanson",title2:"Donald Biddle Keyes",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_6.jpg",name:"",objectFit:"contain"}]}]}},kg={element:Lg,id:"lightbox-journal",name:"Lightbox Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:_g,sourceCode:Eg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Xi.map(e=>({path:`styles.${pt(e,"fontSettings")}`}))}},Wg=[dd,yd,ru,gu,Cu,Fu,ju,Uu,hp,ym,Lm,sg,kg];exports.components=Wg;exports.isSchemaV1=tl;
12104
+ `,Pg="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>'),Kn={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 Ag(e){const t={};return t[ct(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSettings")]={...Kn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSize")]={...Kn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ct(e,"lineHeight")]={...Kn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ct(e,"letterSpacing")]={...Kn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ct(e,"wordSpacing")]={...Kn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ct(e,"textAlign")]={...Kn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ct(e,"textAppearance")]={...Kn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Rg=Xi.reduce((e,t)=>({...e,...Ag(t)}),{}),Mg=Xi.reduce((e,t)=>({...e,[ct(t,"fontFamily")]:"Goudy Bookletter 1911",[ct(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ct(t,"letterSpacing")]:0,[ct(t,"wordSpacing")]:0,[ct(t,"textAlign")]:"left",[ct(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function is(e){return Xi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ct(n,"fontSize")]=i),o!==void 0&&(t[ct(n,"lineHeight")]=o),t},{})}const _g=Sg(),kg={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"}},...Rg,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/journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Pg,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Mg,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...is({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},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,...is({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:[_g]}],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:"Dorothy Manners & Julanne Johnston",title2:"by Evans Studio",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Inez Nadeau",title2:"Melbourne Spurr",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_4.jpg",name:"",objectFit:"contain"}]},{title1:"Colleen Moore",title2:"Clarence S. Bull",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Gloria Swanson",title2:"Donald Biddle Keyes",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_6.jpg",name:"",objectFit:"contain"}]}]}},Wg={element:Eg,id:"lightbox-journal",name:"Lightbox Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:kg,sourceCode:Ig,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Xi.map(e=>({path:`styles.${ct(e,"fontSettings")}`}))}},Fg=[dd,yd,ru,gu,Cu,Fu,ju,Uu,hp,ym,Lm,lg,Wg];exports.components=Fg;exports.isSchemaV1=tl;